@lemonadejs/calendar 1.1.0 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +18 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
;(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
|
-
global.
|
|
4
|
+
global.Calendar = factory();
|
|
5
5
|
}(this, (function () {
|
|
6
6
|
|
|
7
|
-
// Load
|
|
7
|
+
// Load LemonadeJS
|
|
8
8
|
if (typeof(lemonade) == 'undefined') {
|
|
9
9
|
if (typeof(require) === 'function') {
|
|
10
10
|
var lemonade = require('lemonadejs');
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
// Load
|
|
16
|
+
// Load LemonadeJS
|
|
17
17
|
if (typeof(jSuites) == 'undefined') {
|
|
18
18
|
if (typeof(require) === 'function') {
|
|
19
19
|
var jSuites = require('jsuites');
|
|
@@ -25,13 +25,26 @@
|
|
|
25
25
|
return function() {
|
|
26
26
|
var self = this;
|
|
27
27
|
|
|
28
|
+
self.onchange = function(prop) {
|
|
29
|
+
if (self.instance && prop === 'value') {
|
|
30
|
+
self.instance.setValue(self.value);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
28
34
|
self.create = function(o) {
|
|
35
|
+
if (this.time || this.time == 'true') {
|
|
36
|
+
this.time = true;
|
|
37
|
+
}
|
|
38
|
+
|
|
29
39
|
self.instance = jSuites.calendar(o, this);
|
|
30
40
|
}
|
|
31
41
|
|
|
32
|
-
|
|
42
|
+
if (self.type == 'input') {
|
|
43
|
+
var template = `<input type="text" @ready="self.create(this)" name="{{self.name}}" value="{{self.value}}" />`;
|
|
44
|
+
} else {
|
|
45
|
+
var template = `<div @ready="self.create(this)" name="{{self.name}}" value="{{self.value}}"></div>`;
|
|
46
|
+
}
|
|
33
47
|
|
|
34
48
|
return lemonade.element(template, self);
|
|
35
49
|
}
|
|
36
|
-
|
|
37
50
|
})));
|
package/package.json
CHANGED