New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

aurelia-bootstrap-datetimepicker

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aurelia-bootstrap-datetimepicker - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

71

dist/amd/abp-datetime-picker.js

@@ -72,2 +72,4 @@ define(['exports', 'aurelia-framework', 'moment', 'jquery', './picker-global-options', 'eonasdan-bootstrap-datetimepicker'], function (exports, _aureliaFramework, _moment, _jquery, _pickerGlobalOptions) {

function AbpDatetimePickerCustomElement(elm) {
var _this = this;
_classCallCheck(this, AbpDatetimePickerCustomElement);

@@ -101,6 +103,10 @@

this.elm = elm;
elm.focus = function () {
return _this.input.focus();
};
}
AbpDatetimePickerCustomElement.prototype.attached = function attached() {
var _this = this;
var _this2 = this;

@@ -121,4 +127,4 @@ this.domElm = (0, _jquery2.default)(this.elm).find('.date');

this.domElm.on('dp.change', function (e) {
_this.model = (0, _moment2.default)(e.date).toDate();
_this.value = (0, _moment2.default)(e.date).format(_this._format);
_this2.model = (0, _moment2.default)(e.date).toDate();
_this2.value = (0, _moment2.default)(e.date).format(_this2._format);
});

@@ -184,10 +190,10 @@

AbpDatetimePickerCustomElement.prototype.applyExposeEvents = function applyExposeEvents() {
var _this2 = this;
var _this3 = this;
this.domElm.on('dp.hide', function (e) {
if (typeof _this2.onHide === 'function') {
_this2.onHide(e);
if (typeof _this3.onHide === 'function') {
_this3.onHide(e);
}
if (typeof _this2._events.onHide === 'function') {
_this2._events.onHide(e);
if (typeof _this3._events.onHide === 'function') {
_this3._events.onHide(e);
}

@@ -197,7 +203,7 @@ });

this.domElm.on('dp.show', function (e) {
if (typeof _this2.onShow === 'function') {
_this2.onShow(e);
if (typeof _this3.onShow === 'function') {
_this3.onShow(e);
}
if (typeof _this2._events.onShow === 'function') {
_this2._events.onShow(e);
if (typeof _this3._events.onShow === 'function') {
_this3._events.onShow(e);
}

@@ -207,7 +213,7 @@ });

this.domElm.on('dp.change', function (e) {
if (typeof _this2.onChange === 'function') {
_this2.onChange(e);
if (typeof _this3.onChange === 'function') {
_this3.onChange(e);
}
if (typeof _this2._events.onChange === 'function') {
_this2._events.onChange(e);
if (typeof _this3._events.onChange === 'function') {
_this3._events.onChange(e);
}

@@ -217,7 +223,7 @@ });

this.domElm.on('dp.error', function (e) {
if (typeof _this2.onError === 'function') {
_this2.onError(e);
if (typeof _this3.onError === 'function') {
_this3.onError(e);
}
if (typeof _this2._events.onError === 'function') {
_this2._events.onError(e);
if (typeof _this3._events.onError === 'function') {
_this3._events.onError(e);
}

@@ -227,7 +233,7 @@ });

this.domElm.on('dp.update', function (e) {
if (typeof _this2.onUpdate === 'function') {
_this2.onUpdate(e);
if (typeof _this3.onUpdate === 'function') {
_this3.onUpdate(e);
}
if (typeof _this2._events.onUpdate === 'function') {
_this2._events.onUpdate(e);
if (typeof _this3._events.onUpdate === 'function') {
_this3._events.onUpdate(e);
}

@@ -237,4 +243,9 @@ });

AbpDatetimePickerCustomElement.prototype.blur = function blur() {
var event = _aureliaFramework.DOM.createCustomEvent('blur');
this.elm.dispatchEvent(event);
};
AbpDatetimePickerCustomElement.prototype.constructMethod = function constructMethod(methodType, methodName) {
var _this3 = this;
var _this4 = this;

@@ -245,5 +256,5 @@ switch (methodType) {

if (value) {
return _this3.domElm.data('DateTimePicker')[methodName](value);
return _this4.domElm.data('DateTimePicker')[methodName](value);
}
return _this3.domElm.data('DateTimePicker')[methodName]();
return _this4.domElm.data('DateTimePicker')[methodName]();
};

@@ -254,3 +265,3 @@ case 'caller':

return function (value) {
return _this3.domElm.data('DateTimePicker')[methodName]();
return _this4.domElm.data('DateTimePicker')[methodName]();
};

@@ -261,3 +272,3 @@ }

AbpDatetimePickerCustomElement.prototype.exposeMethods = function exposeMethods() {
var _this4 = this;
var _this5 = this;

@@ -268,3 +279,3 @@ var methodList = [{ name: 'allowInputToggle', type: 'getterSetter' }, { name: 'calendarWeeks', type: 'getterSetter' }, { name: 'clear', type: 'caller' }, { name: 'collapse', type: 'getterSetter' }, { name: 'date', type: 'getterSetter' }, { name: 'daysOfWeekDisabled', type: 'getterSetter' }, { name: 'dayViewHeaderFormat', type: 'getterSetter' }, { name: 'defaultDate', type: 'getterSetter' }, { name: 'destroy', type: 'caller' }, { name: 'debug', type: 'caller' }, { name: 'disable', type: 'caller' }, { name: 'disabledDates', type: 'getterSetter' }, { name: 'disabledHours', type: 'getterSetter' }, { name: 'disabledTimeIntervals', type: 'getterSetter' }, { name: 'enable', type: 'caller' }, { name: 'enabledDates', type: 'getterSetter' }, { name: 'enabledHours', type: 'getterSetter' }, { name: 'extraFormats', type: 'getterSetter' }, { name: 'focusOnShow', type: 'getterSetter' }, { name: 'format', type: 'getterSetter' }, { name: 'hide', type: 'caller' }, { name: 'icons', type: 'getterSetter' }, { name: 'ignoreReadonly', type: 'getterSetter' }, { name: 'inline', type: 'getterSetter' }, { name: 'keepInvalid', type: 'getterSetter' }, { name: 'keyBinds', type: 'getterSetter' }, { name: 'locale', type: 'getterSetter' }, { name: 'maxDate', type: 'getterSetter' }, { name: 'minDate', type: 'getterSetter' }, { name: 'options', type: 'getterSetter' }, { name: 'parseInputDate', type: 'getterSetter' }, { name: 'show', type: 'caller' }, { name: 'showClear', type: 'getterSetter' }, { name: 'showClose', type: 'getterSetter' }, { name: 'showTodayButton', type: 'getterSetter' }, { name: 'sideBySide', type: 'getterSetter' }, { name: 'stepping', type: 'getterSetter' }, { name: 'toggle', type: 'caller' }, { name: 'toolbarplacement', type: 'getterSetter' }, { name: 'tooltips', type: 'getterSetter' }, { name: 'useCurrent', type: 'getterSetter' }, { name: 'useStrict', type: 'getterSetter' }, { name: 'viewDate', type: 'getterSetter' }, { name: 'viewMode', type: 'getterSetter' }, { name: 'widgetPositioning', type: 'getterSetter' }];

methodList.forEach(function (method) {
methods[method.name] = _this4.constructMethod(method.type, method.name);
methods[method.name] = _this5.constructMethod(method.type, method.name);
});

@@ -271,0 +282,0 @@

@@ -73,2 +73,4 @@ 'use strict';

function AbpDatetimePickerCustomElement(elm) {
var _this = this;
_classCallCheck(this, AbpDatetimePickerCustomElement);

@@ -102,6 +104,10 @@

this.elm = elm;
elm.focus = function () {
return _this.input.focus();
};
}
AbpDatetimePickerCustomElement.prototype.attached = function attached() {
var _this = this;
var _this2 = this;

@@ -122,4 +128,4 @@ this.domElm = (0, _jquery2.default)(this.elm).find('.date');

this.domElm.on('dp.change', function (e) {
_this.model = (0, _moment2.default)(e.date).toDate();
_this.value = (0, _moment2.default)(e.date).format(_this._format);
_this2.model = (0, _moment2.default)(e.date).toDate();
_this2.value = (0, _moment2.default)(e.date).format(_this2._format);
});

@@ -185,10 +191,10 @@

AbpDatetimePickerCustomElement.prototype.applyExposeEvents = function applyExposeEvents() {
var _this2 = this;
var _this3 = this;
this.domElm.on('dp.hide', function (e) {
if (typeof _this2.onHide === 'function') {
_this2.onHide(e);
if (typeof _this3.onHide === 'function') {
_this3.onHide(e);
}
if (typeof _this2._events.onHide === 'function') {
_this2._events.onHide(e);
if (typeof _this3._events.onHide === 'function') {
_this3._events.onHide(e);
}

@@ -198,7 +204,7 @@ });

this.domElm.on('dp.show', function (e) {
if (typeof _this2.onShow === 'function') {
_this2.onShow(e);
if (typeof _this3.onShow === 'function') {
_this3.onShow(e);
}
if (typeof _this2._events.onShow === 'function') {
_this2._events.onShow(e);
if (typeof _this3._events.onShow === 'function') {
_this3._events.onShow(e);
}

@@ -208,7 +214,7 @@ });

this.domElm.on('dp.change', function (e) {
if (typeof _this2.onChange === 'function') {
_this2.onChange(e);
if (typeof _this3.onChange === 'function') {
_this3.onChange(e);
}
if (typeof _this2._events.onChange === 'function') {
_this2._events.onChange(e);
if (typeof _this3._events.onChange === 'function') {
_this3._events.onChange(e);
}

@@ -218,7 +224,7 @@ });

this.domElm.on('dp.error', function (e) {
if (typeof _this2.onError === 'function') {
_this2.onError(e);
if (typeof _this3.onError === 'function') {
_this3.onError(e);
}
if (typeof _this2._events.onError === 'function') {
_this2._events.onError(e);
if (typeof _this3._events.onError === 'function') {
_this3._events.onError(e);
}

@@ -228,7 +234,7 @@ });

this.domElm.on('dp.update', function (e) {
if (typeof _this2.onUpdate === 'function') {
_this2.onUpdate(e);
if (typeof _this3.onUpdate === 'function') {
_this3.onUpdate(e);
}
if (typeof _this2._events.onUpdate === 'function') {
_this2._events.onUpdate(e);
if (typeof _this3._events.onUpdate === 'function') {
_this3._events.onUpdate(e);
}

@@ -238,4 +244,9 @@ });

AbpDatetimePickerCustomElement.prototype.blur = function blur() {
var event = _aureliaFramework.DOM.createCustomEvent('blur');
this.elm.dispatchEvent(event);
};
AbpDatetimePickerCustomElement.prototype.constructMethod = function constructMethod(methodType, methodName) {
var _this3 = this;
var _this4 = this;

@@ -246,5 +257,5 @@ switch (methodType) {

if (value) {
return _this3.domElm.data('DateTimePicker')[methodName](value);
return _this4.domElm.data('DateTimePicker')[methodName](value);
}
return _this3.domElm.data('DateTimePicker')[methodName]();
return _this4.domElm.data('DateTimePicker')[methodName]();
};

@@ -255,3 +266,3 @@ case 'caller':

return function (value) {
return _this3.domElm.data('DateTimePicker')[methodName]();
return _this4.domElm.data('DateTimePicker')[methodName]();
};

@@ -262,3 +273,3 @@ }

AbpDatetimePickerCustomElement.prototype.exposeMethods = function exposeMethods() {
var _this4 = this;
var _this5 = this;

@@ -269,3 +280,3 @@ var methodList = [{ name: 'allowInputToggle', type: 'getterSetter' }, { name: 'calendarWeeks', type: 'getterSetter' }, { name: 'clear', type: 'caller' }, { name: 'collapse', type: 'getterSetter' }, { name: 'date', type: 'getterSetter' }, { name: 'daysOfWeekDisabled', type: 'getterSetter' }, { name: 'dayViewHeaderFormat', type: 'getterSetter' }, { name: 'defaultDate', type: 'getterSetter' }, { name: 'destroy', type: 'caller' }, { name: 'debug', type: 'caller' }, { name: 'disable', type: 'caller' }, { name: 'disabledDates', type: 'getterSetter' }, { name: 'disabledHours', type: 'getterSetter' }, { name: 'disabledTimeIntervals', type: 'getterSetter' }, { name: 'enable', type: 'caller' }, { name: 'enabledDates', type: 'getterSetter' }, { name: 'enabledHours', type: 'getterSetter' }, { name: 'extraFormats', type: 'getterSetter' }, { name: 'focusOnShow', type: 'getterSetter' }, { name: 'format', type: 'getterSetter' }, { name: 'hide', type: 'caller' }, { name: 'icons', type: 'getterSetter' }, { name: 'ignoreReadonly', type: 'getterSetter' }, { name: 'inline', type: 'getterSetter' }, { name: 'keepInvalid', type: 'getterSetter' }, { name: 'keyBinds', type: 'getterSetter' }, { name: 'locale', type: 'getterSetter' }, { name: 'maxDate', type: 'getterSetter' }, { name: 'minDate', type: 'getterSetter' }, { name: 'options', type: 'getterSetter' }, { name: 'parseInputDate', type: 'getterSetter' }, { name: 'show', type: 'caller' }, { name: 'showClear', type: 'getterSetter' }, { name: 'showClose', type: 'getterSetter' }, { name: 'showTodayButton', type: 'getterSetter' }, { name: 'sideBySide', type: 'getterSetter' }, { name: 'stepping', type: 'getterSetter' }, { name: 'toggle', type: 'caller' }, { name: 'toolbarplacement', type: 'getterSetter' }, { name: 'tooltips', type: 'getterSetter' }, { name: 'useCurrent', type: 'getterSetter' }, { name: 'useStrict', type: 'getterSetter' }, { name: 'viewDate', type: 'getterSetter' }, { name: 'viewMode', type: 'getterSetter' }, { name: 'widgetPositioning', type: 'getterSetter' }];

methodList.forEach(function (method) {
methods[method.name] = _this4.constructMethod(method.type, method.name);
methods[method.name] = _this5.constructMethod(method.type, method.name);
});

@@ -272,0 +283,0 @@

@@ -46,3 +46,3 @@ var _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;

import { inject, bindable, bindingMode } from 'aurelia-framework';
import { inject, bindable, bindingMode, DOM } from 'aurelia-framework';
import moment from 'moment';

@@ -82,2 +82,4 @@ import $ from 'jquery';

this.elm = elm;
elm.focus = () => this.input.focus();
}

@@ -208,2 +210,7 @@

blur() {
const event = DOM.createCustomEvent('blur');
this.elm.dispatchEvent(event);
}
constructMethod(methodType, methodName) {

@@ -210,0 +217,0 @@ switch (methodType) {

@@ -6,3 +6,3 @@ 'use strict';

var inject, bindable, bindingMode, moment, $, globalExtraOptions, globalPickerOptions, _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, AbpDatetimePickerCustomElement;
var inject, bindable, bindingMode, DOM, moment, $, globalExtraOptions, globalPickerOptions, _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, AbpDatetimePickerCustomElement;

@@ -63,2 +63,3 @@ function _initDefineProp(target, property, descriptor, context) {

bindingMode = _aureliaFramework.bindingMode;
DOM = _aureliaFramework.DOM;
}, function (_moment) {

@@ -75,2 +76,4 @@ moment = _moment.default;

function AbpDatetimePickerCustomElement(elm) {
var _this = this;
_classCallCheck(this, AbpDatetimePickerCustomElement);

@@ -104,6 +107,10 @@

this.elm = elm;
elm.focus = function () {
return _this.input.focus();
};
}
AbpDatetimePickerCustomElement.prototype.attached = function attached() {
var _this = this;
var _this2 = this;

@@ -124,4 +131,4 @@ this.domElm = $(this.elm).find('.date');

this.domElm.on('dp.change', function (e) {
_this.model = moment(e.date).toDate();
_this.value = moment(e.date).format(_this._format);
_this2.model = moment(e.date).toDate();
_this2.value = moment(e.date).format(_this2._format);
});

@@ -187,10 +194,10 @@

AbpDatetimePickerCustomElement.prototype.applyExposeEvents = function applyExposeEvents() {
var _this2 = this;
var _this3 = this;
this.domElm.on('dp.hide', function (e) {
if (typeof _this2.onHide === 'function') {
_this2.onHide(e);
if (typeof _this3.onHide === 'function') {
_this3.onHide(e);
}
if (typeof _this2._events.onHide === 'function') {
_this2._events.onHide(e);
if (typeof _this3._events.onHide === 'function') {
_this3._events.onHide(e);
}

@@ -200,7 +207,7 @@ });

this.domElm.on('dp.show', function (e) {
if (typeof _this2.onShow === 'function') {
_this2.onShow(e);
if (typeof _this3.onShow === 'function') {
_this3.onShow(e);
}
if (typeof _this2._events.onShow === 'function') {
_this2._events.onShow(e);
if (typeof _this3._events.onShow === 'function') {
_this3._events.onShow(e);
}

@@ -210,7 +217,7 @@ });

this.domElm.on('dp.change', function (e) {
if (typeof _this2.onChange === 'function') {
_this2.onChange(e);
if (typeof _this3.onChange === 'function') {
_this3.onChange(e);
}
if (typeof _this2._events.onChange === 'function') {
_this2._events.onChange(e);
if (typeof _this3._events.onChange === 'function') {
_this3._events.onChange(e);
}

@@ -220,7 +227,7 @@ });

this.domElm.on('dp.error', function (e) {
if (typeof _this2.onError === 'function') {
_this2.onError(e);
if (typeof _this3.onError === 'function') {
_this3.onError(e);
}
if (typeof _this2._events.onError === 'function') {
_this2._events.onError(e);
if (typeof _this3._events.onError === 'function') {
_this3._events.onError(e);
}

@@ -230,7 +237,7 @@ });

this.domElm.on('dp.update', function (e) {
if (typeof _this2.onUpdate === 'function') {
_this2.onUpdate(e);
if (typeof _this3.onUpdate === 'function') {
_this3.onUpdate(e);
}
if (typeof _this2._events.onUpdate === 'function') {
_this2._events.onUpdate(e);
if (typeof _this3._events.onUpdate === 'function') {
_this3._events.onUpdate(e);
}

@@ -240,4 +247,9 @@ });

AbpDatetimePickerCustomElement.prototype.blur = function blur() {
var event = DOM.createCustomEvent('blur');
this.elm.dispatchEvent(event);
};
AbpDatetimePickerCustomElement.prototype.constructMethod = function constructMethod(methodType, methodName) {
var _this3 = this;
var _this4 = this;

@@ -248,5 +260,5 @@ switch (methodType) {

if (value) {
return _this3.domElm.data('DateTimePicker')[methodName](value);
return _this4.domElm.data('DateTimePicker')[methodName](value);
}
return _this3.domElm.data('DateTimePicker')[methodName]();
return _this4.domElm.data('DateTimePicker')[methodName]();
};

@@ -257,3 +269,3 @@ case 'caller':

return function (value) {
return _this3.domElm.data('DateTimePicker')[methodName]();
return _this4.domElm.data('DateTimePicker')[methodName]();
};

@@ -264,3 +276,3 @@ }

AbpDatetimePickerCustomElement.prototype.exposeMethods = function exposeMethods() {
var _this4 = this;
var _this5 = this;

@@ -271,3 +283,3 @@ var methodList = [{ name: 'allowInputToggle', type: 'getterSetter' }, { name: 'calendarWeeks', type: 'getterSetter' }, { name: 'clear', type: 'caller' }, { name: 'collapse', type: 'getterSetter' }, { name: 'date', type: 'getterSetter' }, { name: 'daysOfWeekDisabled', type: 'getterSetter' }, { name: 'dayViewHeaderFormat', type: 'getterSetter' }, { name: 'defaultDate', type: 'getterSetter' }, { name: 'destroy', type: 'caller' }, { name: 'debug', type: 'caller' }, { name: 'disable', type: 'caller' }, { name: 'disabledDates', type: 'getterSetter' }, { name: 'disabledHours', type: 'getterSetter' }, { name: 'disabledTimeIntervals', type: 'getterSetter' }, { name: 'enable', type: 'caller' }, { name: 'enabledDates', type: 'getterSetter' }, { name: 'enabledHours', type: 'getterSetter' }, { name: 'extraFormats', type: 'getterSetter' }, { name: 'focusOnShow', type: 'getterSetter' }, { name: 'format', type: 'getterSetter' }, { name: 'hide', type: 'caller' }, { name: 'icons', type: 'getterSetter' }, { name: 'ignoreReadonly', type: 'getterSetter' }, { name: 'inline', type: 'getterSetter' }, { name: 'keepInvalid', type: 'getterSetter' }, { name: 'keyBinds', type: 'getterSetter' }, { name: 'locale', type: 'getterSetter' }, { name: 'maxDate', type: 'getterSetter' }, { name: 'minDate', type: 'getterSetter' }, { name: 'options', type: 'getterSetter' }, { name: 'parseInputDate', type: 'getterSetter' }, { name: 'show', type: 'caller' }, { name: 'showClear', type: 'getterSetter' }, { name: 'showClose', type: 'getterSetter' }, { name: 'showTodayButton', type: 'getterSetter' }, { name: 'sideBySide', type: 'getterSetter' }, { name: 'stepping', type: 'getterSetter' }, { name: 'toggle', type: 'caller' }, { name: 'toolbarplacement', type: 'getterSetter' }, { name: 'tooltips', type: 'getterSetter' }, { name: 'useCurrent', type: 'getterSetter' }, { name: 'useStrict', type: 'getterSetter' }, { name: 'viewDate', type: 'getterSetter' }, { name: 'viewMode', type: 'getterSetter' }, { name: 'widgetPositioning', type: 'getterSetter' }];

methodList.forEach(function (method) {
methods[method.name] = _this4.constructMethod(method.type, method.name);
methods[method.name] = _this5.constructMethod(method.type, method.name);
});

@@ -274,0 +286,0 @@

{
"name": "aurelia-bootstrap-datetimepicker",
"version": "1.0.6",
"version": "1.0.7",
"description": "An Aurelia Custom Element for the 3rd party addon [Eonasdan Bootstrap Datepicker]",

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

@@ -1,2 +0,2 @@

import {inject, bindable, bindingMode} from 'aurelia-framework';
import {inject, bindable, bindingMode, DOM} from 'aurelia-framework';
import moment from 'moment';

@@ -37,2 +37,5 @@ import $ from 'jquery';

this.elm = elm;
// ensure the element exposes a "focus" method for Aurelia-Validation
elm.focus = () => this.input.focus();
}

@@ -179,2 +182,12 @@

/**
* forward "blur" events to the custom element
* As described in Aurelia-Validation
* https://www.danyow.net/aurelia-validation-alpha/
*/
blur() {
const event = DOM.createCustomEvent('blur');
this.elm.dispatchEvent(event);
}
/**
* Construct a method by it's type and name

@@ -181,0 +194,0 @@ * We do this to avoid typing multiple line of the same, on 100 functions that makes a big difference in number of code lines.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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