Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng2-eonasdan-datetimepicker

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng2-eonasdan-datetimepicker - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

82

dist/datetimepicker.directive.js

@@ -12,28 +12,29 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@angular/core");
const $ = require("jquery");
const moment = require("moment");
let DateTimePickerDirective = class DateTimePickerDirective {
constructor(el, renderer) {
var core_1 = require("@angular/core");
var $ = require("jquery");
var moment = require("moment");
var DateTimePickerDirective = (function () {
function DateTimePickerDirective(el, renderer) {
this.onChange = new core_1.EventEmitter();
this.onClick = new core_1.EventEmitter();
let $parent = $(el.nativeElement.parentNode);
var $parent = $(el.nativeElement.parentNode);
this.dpElement = $parent.hasClass('input-group') ? $parent : $(el.nativeElement);
}
ngOnInit() {
DateTimePickerDirective.prototype.ngOnInit = function () {
var _this = this;
this.dpElement.datetimepicker(this.options);
this.dpElement.data('DateTimePicker').date(this.date);
this.dpElement.on('dp.change', (e) => {
if (e.date !== this.date) {
this.date = e.date;
this.onChange.emit(e.date);
this.dpElement.on('dp.change', function (e) {
if (e.date !== _this.date) {
_this.date = e.date;
_this.onChange.emit(e.date);
}
});
this.dpElement.on('click', () => this.onClick.emit());
}
ngOnChanges(changes) {
let dpe = this.dpElement.data('DateTimePicker');
this.dpElement.on('click', function () { return _this.onClick.emit(); });
};
DateTimePickerDirective.prototype.ngOnChanges = function (changes) {
var dpe = this.dpElement.data('DateTimePicker');
if (!!dpe) {
if (changes.options) {
$.map(changes.options.currentValue, (value, key) => {
$.map(changes.options.currentValue, function (value, key) {
dpe[key](value);

@@ -49,26 +50,27 @@ });

}
}
};
__decorate([
core_1.Input(),
__metadata("design:type", Object)
], DateTimePickerDirective.prototype, "date", void 0);
__decorate([
core_1.Input(),
__metadata("design:type", Object)
], DateTimePickerDirective.prototype, "options", void 0);
__decorate([
core_1.Output(),
__metadata("design:type", core_1.EventEmitter)
], DateTimePickerDirective.prototype, "onChange", void 0);
__decorate([
core_1.Output(),
__metadata("design:type", core_1.EventEmitter)
], DateTimePickerDirective.prototype, "onClick", void 0);
DateTimePickerDirective = __decorate([
core_1.Directive({
selector: '[a2e-datetimepicker]'
}),
__metadata("design:paramtypes", [core_1.ElementRef, core_1.Renderer])
], DateTimePickerDirective);
};
__decorate([
core_1.Input(),
__metadata("design:type", Object)
], DateTimePickerDirective.prototype, "date", void 0);
__decorate([
core_1.Input(),
__metadata("design:type", Object)
], DateTimePickerDirective.prototype, "options", void 0);
__decorate([
core_1.Output(),
__metadata("design:type", core_1.EventEmitter)
], DateTimePickerDirective.prototype, "onChange", void 0);
__decorate([
core_1.Output(),
__metadata("design:type", core_1.EventEmitter)
], DateTimePickerDirective.prototype, "onClick", void 0);
DateTimePickerDirective = __decorate([
core_1.Directive({
selector: '[a2e-datetimepicker]'
}),
__metadata("design:paramtypes", [core_1.ElementRef, core_1.Renderer])
], DateTimePickerDirective);
return DateTimePickerDirective;
}());
exports.DateTimePickerDirective = DateTimePickerDirective;

@@ -9,18 +9,21 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const platform_browser_1 = require("@angular/platform-browser");
const core_1 = require("@angular/core");
const datetimepicker_directive_1 = require("./datetimepicker.directive");
let A2Edatetimepicker = class A2Edatetimepicker {
};
A2Edatetimepicker = __decorate([
core_1.NgModule({
imports: [
platform_browser_1.BrowserModule,
],
declarations: [
datetimepicker_directive_1.DateTimePickerDirective
],
exports: [datetimepicker_directive_1.DateTimePickerDirective]
})
], A2Edatetimepicker);
var platform_browser_1 = require("@angular/platform-browser");
var core_1 = require("@angular/core");
var datetimepicker_directive_1 = require("./datetimepicker.directive");
var A2Edatetimepicker = (function () {
function A2Edatetimepicker() {
}
A2Edatetimepicker = __decorate([
core_1.NgModule({
imports: [
platform_browser_1.BrowserModule,
],
declarations: [
datetimepicker_directive_1.DateTimePickerDirective
],
exports: [datetimepicker_directive_1.DateTimePickerDirective]
})
], A2Edatetimepicker);
return A2Edatetimepicker;
}());
exports.A2Edatetimepicker = A2Edatetimepicker;
{
"name": "ng2-eonasdan-datetimepicker",
"version": "0.0.6",
"version": "0.0.7",
"description": "Angular2 component for bootstrap-datetimepicker library.",

@@ -5,0 +5,0 @@ "keywords": [

{
"compilerOptions": {
"target": "es6",
"target": "es5",
"module": "commonjs",

@@ -12,3 +12,4 @@ "moduleResolution": "node",

"sourceMap": false,
"outDir": "dist"
"outDir": "dist",
"lib": ["es2015", "dom"]
},

@@ -21,4 +22,3 @@ "include": [

"**/*.spec.ts"
],
"lib": ["es2017", "dom"]
]
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc