jsl-ui 9.18.3 → 9.18.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/lib/components/IntervalComponent.d.ts +17 -0
- package/lib/components/IntervalComponent.js +68 -0
- package/lib/components/auto-suggest/AutoSuggestComponent.d.ts +22 -0
- package/lib/components/auto-suggest/AutoSuggestComponent.js +49 -0
- package/lib/components/button/ButtonComponent.d.ts +18 -0
- package/lib/components/button/ButtonComponent.js +46 -0
- package/lib/components/checkbox/CheckBoxComponent.d.ts +28 -0
- package/lib/components/checkbox/CheckBoxComponent.js +94 -0
- package/lib/components/checkbox/CheckBoxStyle.scss +86 -0
- package/lib/components/date/DateComponent.d.ts +32 -0
- package/lib/components/date/DateComponent.js +106 -0
- package/lib/components/date-range/DateRangeComponent.d.ts +35 -0
- package/lib/components/date-range/DateRangeComponent.js +136 -0
- package/lib/components/date-range/DateRangeStyle.scss +12 -0
- package/lib/components/date-time/DateTimeComponent.d.ts +15 -0
- package/lib/components/date-time/DateTimeComponent.js +53 -0
- package/lib/components/date-time/DateTimeStyle.scss +7 -0
- package/lib/components/dialog/DialogComponent.d.ts +67 -0
- package/lib/components/dialog/DialogComponent.js +242 -0
- package/lib/components/drop-down/DropDownComponent.d.ts +27 -0
- package/lib/components/drop-down/DropDownComponent.js +74 -0
- package/lib/components/expander/ExpanderComponent.d.ts +27 -0
- package/lib/components/expander/ExpanderComponent.js +90 -0
- package/lib/components/expander/ExpanderStyle.scss +47 -0
- package/lib/components/expander/OldExpanderStyle.scss +37 -0
- package/lib/components/form-field/FormComponent.d.ts +12 -0
- package/lib/components/form-field/FormComponent.js +26 -0
- package/lib/components/form-field/FormFieldComponent.d.ts +38 -0
- package/lib/components/form-field/FormFieldComponent.js +139 -0
- package/lib/components/form-field/FormFieldStyle.scss +87 -0
- package/lib/components/grid/GridComponent.d.ts +26 -0
- package/lib/components/grid/GridComponent.js +116 -0
- package/lib/components/input/InputComponent.d.ts +33 -0
- package/lib/components/input/InputComponent.js +144 -0
- package/lib/components/loading/LoadingComponent.d.ts +8 -0
- package/lib/components/loading/LoadingComponent.js +22 -0
- package/lib/components/loading/LoadingStyle.css +29 -0
- package/lib/components/navigation/NavigationComponent.d.ts +34 -0
- package/lib/components/navigation/NavigationComponent.js +70 -0
- package/lib/components/navigation/NavigationStyle.scss +226 -0
- package/lib/components/notification/Notification.d.ts +17 -0
- package/lib/components/notification/Notification.js +56 -0
- package/lib/components/notification/Notification.scss +19 -0
- package/lib/components/number/NumberComponent.d.ts +25 -0
- package/lib/components/number/NumberComponent.js +87 -0
- package/lib/components/overlay/OverlayComponent.d.ts +27 -0
- package/lib/components/overlay/OverlayComponent.js +149 -0
- package/lib/components/overlay/overlay.css +57 -0
- package/lib/components/progress/ProgressComponent.d.ts +18 -0
- package/lib/components/progress/ProgressComponent.js +42 -0
- package/lib/components/progress/ProgressStyle.scss +15 -0
- package/lib/components/ribbon-menu/RibbonMenuComponent.d.ts +12 -0
- package/lib/components/ribbon-menu/RibbonMenuComponent.js +34 -0
- package/lib/components/ribbon-menu/RibbonMenuStyle.scss +76 -0
- package/lib/components/select/SelectComponent.d.ts +79 -0
- package/lib/components/select/SelectComponent.js +362 -0
- package/lib/components/select/SelectDDAreaComponent.d.ts +32 -0
- package/lib/components/select/SelectDDAreaComponent.js +317 -0
- package/lib/components/select/SelectStyle.scss +187 -0
- package/lib/components/slider/nouislider.css +310 -0
- package/lib/components/slider/nouislider.d.ts +44 -0
- package/lib/components/slider/nouislider.js +2158 -0
- package/lib/components/stack-panel/SplitterComponent.d.ts +21 -0
- package/lib/components/stack-panel/SplitterComponent.js +126 -0
- package/lib/components/stack-panel/SplitterStyle.scss +45 -0
- package/lib/components/stack-panel/StackPanelComponent.d.ts +20 -0
- package/lib/components/stack-panel/StackPanelComponent.js +64 -0
- package/lib/components/stack-panel/StackPanelStyle.scss +53 -0
- package/lib/components/tabs/TabsComponent.d.ts +39 -0
- package/lib/components/tabs/TabsComponent.js +177 -0
- package/lib/components/tabs/TabsStyle.scss +76 -0
- package/lib/components/time/TimeComponent.d.ts +29 -0
- package/lib/components/time/TimeComponent.js +113 -0
- package/lib/components/time/TimeComponent.scss +4 -0
- package/lib/components/tree-view/TreeViewComponent.d.ts +23 -0
- package/lib/components/tree-view/TreeViewComponent.js +45 -0
- package/lib/components/tree-view/TreeViewStyle.scss +96 -0
- package/lib/components/virtual-render/VirtualRenderComponent.d.ts +30 -0
- package/lib/components/virtual-render/VirtualRenderComponent.js +104 -0
- package/lib/components/virtual-render/VirtualRenderStyle.scss +9 -0
- package/lib/core/culture.d.ts +5 -0
- package/lib/core/culture.js +385 -0
- package/lib/core/date.d.ts +14 -0
- package/lib/core/date.js +350 -0
- package/lib/core/helper.d.ts +12 -0
- package/lib/core/helper.js +101 -0
- package/lib/core/jq.d.ts +37 -0
- package/lib/core/jq.js +371 -0
- package/lib/core/lang.d.ts +24 -0
- package/lib/core/lang.js +28 -0
- package/lib/core/numeric.d.ts +7 -0
- package/lib/core/numeric.js +143 -0
- package/lib/core/polyfills.d.ts +0 -0
- package/lib/core/polyfills.js +22 -0
- package/lib/core.d.ts +6 -0
- package/lib/core.js +6 -0
- package/lib/grid/controls/slick.columnpicker.css +46 -0
- package/lib/grid/controls/slick.draggablegrouping.css +52 -0
- package/lib/grid/controls/slick.gridmenu.css +127 -0
- package/lib/grid/controls/slick.pager.css +41 -0
- package/lib/grid/examples/examples.css +203 -0
- package/lib/grid/filterDialogs/dateRangeFilter.d.ts +7 -0
- package/lib/grid/filterDialogs/dateRangeFilter.js +156 -0
- package/lib/grid/filterDialogs/excelFilter.d.ts +9 -0
- package/lib/grid/filterDialogs/excelFilter.js +313 -0
- package/lib/grid/plugins/ext.overlay.css +28 -0
- package/lib/grid/plugins/ext.overlay.d.ts +2 -0
- package/lib/grid/plugins/ext.overlay.js +291 -0
- package/lib/grid/plugins/slick.cellrangedecorator.d.ts +12 -0
- package/lib/grid/plugins/slick.cellrangedecorator.js +68 -0
- package/lib/grid/plugins/slick.cellrangeselector.d.ts +1 -0
- package/lib/grid/plugins/slick.cellrangeselector.js +144 -0
- package/lib/grid/plugins/slick.cellselectionmodel.d.ts +1 -0
- package/lib/grid/plugins/slick.cellselectionmodel.js +194 -0
- package/lib/grid/plugins/slick.headerbuttons.css +40 -0
- package/lib/grid/plugins/slick.headerbuttons.d.ts +55 -0
- package/lib/grid/plugins/slick.headerbuttons.js +156 -0
- package/lib/grid/plugins/slick.headermenu.css +101 -0
- package/lib/grid/plugins/slick.headermenu.d.ts +74 -0
- package/lib/grid/plugins/slick.headermenu.js +260 -0
- package/lib/grid/plugins/slick.rowdetailview.css +37 -0
- package/lib/grid/plugins/slick.rowmovemanager.css +8 -0
- package/lib/grid/plugins/slick.rowmovemanager.d.ts +18 -0
- package/lib/grid/plugins/slick.rowmovemanager.js +249 -0
- package/lib/grid/plugins/slick.rowselectionmodel.d.ts +1 -0
- package/lib/grid/plugins/slick.rowselectionmodel.js +167 -0
- package/lib/grid/slick-default-theme.css +154 -0
- package/lib/grid/slick.core.d.ts +90 -0
- package/lib/grid/slick.core.js +574 -0
- package/lib/grid/slick.creator.d.ts +80 -0
- package/lib/grid/slick.creator.js +723 -0
- package/lib/grid/slick.dataview.d.ts +71 -0
- package/lib/grid/slick.dataview.js +1080 -0
- package/lib/grid/slick.editors.core.d.ts +4 -0
- package/lib/grid/slick.editors.core.js +232 -0
- package/lib/grid/slick.editors.date.d.ts +2 -0
- package/lib/grid/slick.editors.date.js +125 -0
- package/lib/grid/slick.editors.lookup.d.ts +14 -0
- package/lib/grid/slick.editors.lookup.js +353 -0
- package/lib/grid/slick.editors.nav.d.ts +6 -0
- package/lib/grid/slick.editors.nav.js +22 -0
- package/lib/grid/slick.formatters.d.ts +17 -0
- package/lib/grid/slick.formatters.js +137 -0
- package/lib/grid/slick.grid.css +325 -0
- package/lib/grid/slick.grid.d.ts +284 -0
- package/lib/grid/slick.grid.js +5395 -0
- package/lib/grid/slick.groupitemmetadataprovider.d.ts +39 -0
- package/lib/grid/slick.groupitemmetadataprovider.js +165 -0
- package/lib/grid/slick.tree.css +20 -0
- package/lib/grid/slick.tree.d.ts +33 -0
- package/lib/grid/slick.tree.js +220 -0
- package/lib/grid.d.ts +13 -0
- package/lib/grid.js +13 -0
- package/lib/index.css +2576 -0
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +56 -0
- package/lib/index.js +61 -10198
- package/lib/index.js.map +1 -1
- package/lib/interaction/dataconverter.d.ts +4 -0
- package/lib/interaction/dataconverter.js +1 -0
- package/lib/interaction/eventhandler.d.ts +13 -0
- package/lib/interaction/eventhandler.js +42 -0
- package/lib/interaction/moveable.css +0 -0
- package/lib/interaction/moveable.d.ts +39 -0
- package/lib/interaction/moveable.js +172 -0
- package/lib/interaction/resizable.css +33 -0
- package/lib/interaction/resizable.d.ts +37 -0
- package/lib/interaction/resizable.js +123 -0
- package/lib/ui/auto.suggest.css +14 -0
- package/lib/ui/auto.suggest.d.ts +17 -0
- package/lib/ui/auto.suggest.js +255 -0
- package/lib/ui/base.css +150 -0
- package/lib/ui/date.picker/css/date-range-picker.css +87 -0
- package/lib/ui/date.picker/css/tiny-date-picker.css +326 -0
- package/lib/ui/date.picker/date-picker-options.d.ts +11 -0
- package/lib/ui/date.picker/date-picker-options.js +76 -0
- package/lib/ui/date.picker/lib/date-manip.d.ts +74 -0
- package/lib/ui/date.picker/lib/date-manip.js +120 -0
- package/lib/ui/date.picker/lib/dom.d.ts +23 -0
- package/lib/ui/date.picker/lib/dom.js +28 -0
- package/lib/ui/date.picker/lib/emitter.d.ts +13 -0
- package/lib/ui/date.picker/lib/emitter.js +49 -0
- package/lib/ui/date.picker/lib/fns.d.ts +23 -0
- package/lib/ui/date.picker/lib/fns.js +43 -0
- package/lib/ui/date.picker/mode/base-mode.d.ts +26 -0
- package/lib/ui/date.picker/mode/base-mode.js +248 -0
- package/lib/ui/date.picker/mode/dropdown-mode.d.ts +28 -0
- package/lib/ui/date.picker/mode/dropdown-mode.js +50 -0
- package/lib/ui/date.picker/mode/index.d.ts +28 -0
- package/lib/ui/date.picker/mode/index.js +18 -0
- package/lib/ui/date.picker/mode/modal-mode.d.ts +25 -0
- package/lib/ui/date.picker/mode/modal-mode.js +17 -0
- package/lib/ui/date.picker/mode/permanent-mode.d.ts +29 -0
- package/lib/ui/date.picker/mode/permanent-mode.js +19 -0
- package/lib/ui/date.picker/views/day-picker.d.ts +40 -0
- package/lib/ui/date.picker/views/day-picker.js +155 -0
- package/lib/ui/date.picker/views/month-picker.d.ts +26 -0
- package/lib/ui/date.picker/views/month-picker.js +65 -0
- package/lib/ui/date.picker/views/year-picker.d.ts +20 -0
- package/lib/ui/date.picker/views/year-picker.js +66 -0
- package/lib/ui/date.picker.d.ts +66 -0
- package/lib/ui/date.picker.js +32 -0
- package/lib/ui/dialog.css +109 -0
- package/lib/ui/dialog.d.ts +22 -0
- package/lib/ui/dialog.js +113 -0
- package/lib/ui/drop.down.css +472 -0
- package/lib/ui/drop.down.d.ts +52 -0
- package/lib/ui/drop.down.js +2112 -0
- package/lib/ui/number.input.css +3 -0
- package/lib/ui/number.input.d.ts +12 -0
- package/lib/ui/number.input.js +64 -0
- package/lib/ui/tabs.css +53 -0
- package/package.json +1 -1
package/lib/core/jq.js
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
function deepExtend(out) {
|
|
2
|
+
var a = [];
|
|
3
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
4
|
+
a[_i - 1] = arguments[_i];
|
|
5
|
+
}
|
|
6
|
+
out = out || {};
|
|
7
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
8
|
+
var obj = arguments[i];
|
|
9
|
+
if (!obj)
|
|
10
|
+
continue;
|
|
11
|
+
for (var key in obj) {
|
|
12
|
+
if (obj.hasOwnProperty(key)) {
|
|
13
|
+
if (obj[key] !== null && typeof obj[key] === 'object')
|
|
14
|
+
out[key] = deepExtend((Array.isArray(obj[key]) && out[key] === undefined) ? [] : out[key], obj[key]);
|
|
15
|
+
else
|
|
16
|
+
out[key] = obj[key];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return out;
|
|
21
|
+
}
|
|
22
|
+
function getParentWithClass(el, c, stopAt) {
|
|
23
|
+
if (el.classList.contains(c))
|
|
24
|
+
return el;
|
|
25
|
+
if (stopAt !== undefined && el.classList.contains(stopAt))
|
|
26
|
+
return undefined;
|
|
27
|
+
if (el.parentElement) {
|
|
28
|
+
return getParentWithClass(el.parentElement, c);
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
function jQWrapper(elements) {
|
|
33
|
+
var _elements = elements;
|
|
34
|
+
_elements.empty = function () {
|
|
35
|
+
for (var _i = 0, _elements_1 = _elements; _i < _elements_1.length; _i++) {
|
|
36
|
+
var x = _elements_1[_i];
|
|
37
|
+
x.innerHTML = '';
|
|
38
|
+
}
|
|
39
|
+
return this;
|
|
40
|
+
};
|
|
41
|
+
_elements.appendTo = function (selector) {
|
|
42
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
43
|
+
if (selector instanceof HTMLElement) {
|
|
44
|
+
selector.appendChild(_elements[i]);
|
|
45
|
+
}
|
|
46
|
+
else if (typeof (selector) === "string") {
|
|
47
|
+
var parents = document.querySelectorAll(selector);
|
|
48
|
+
for (var i_1 = 0, len = parents.length; i_1 < len; i_1++) {
|
|
49
|
+
parents[i_1].appendChild(_elements[i_1]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
for (var j = 0; j < selector.length; j++) {
|
|
54
|
+
selector[j].appendChild(_elements[i]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return this;
|
|
59
|
+
};
|
|
60
|
+
_elements.append = function (el) {
|
|
61
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
62
|
+
_elements[i].appendChild(el);
|
|
63
|
+
}
|
|
64
|
+
return this;
|
|
65
|
+
};
|
|
66
|
+
_elements.add = function (selector) {
|
|
67
|
+
if (selector !== undefined) {
|
|
68
|
+
if (selector instanceof HTMLElement) {
|
|
69
|
+
_elements.push(selector);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
for (var i = 0; i < selector.length; i++) {
|
|
73
|
+
_elements.push(selector[i]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return this;
|
|
78
|
+
};
|
|
79
|
+
_elements.css = function (key, value) {
|
|
80
|
+
// TODO: support object instead of just simple keys
|
|
81
|
+
if (value === undefined) {
|
|
82
|
+
if (typeof (key) === "string") {
|
|
83
|
+
if (!_elements.length) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
var computed = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight",
|
|
87
|
+
"borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"];
|
|
88
|
+
if (computed.indexOf(key) < 0) {
|
|
89
|
+
return _elements[0].style[key];
|
|
90
|
+
}
|
|
91
|
+
return window.getComputedStyle(_elements[0])[key];
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
for (var keyEl in key) {
|
|
95
|
+
if (!key.hasOwnProperty(keyEl)) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
99
|
+
if (["height", "width", "top", "left", "bottom", "right"].indexOf(keyEl) >= 0 && typeof key[keyEl] === "number") {
|
|
100
|
+
_elements[i].style[keyEl] = key[keyEl] + "px";
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
_elements[i].style[keyEl] = key[keyEl];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
110
|
+
if (["height", "width", "top", "left", "bottom", "right"].indexOf(key) >= 0 && typeof value === "number") {
|
|
111
|
+
_elements[i].style[key] = value + "px";
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
_elements[i].style[key] = value;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return this;
|
|
118
|
+
};
|
|
119
|
+
_elements.attr = function (key, value) {
|
|
120
|
+
if (value === undefined) {
|
|
121
|
+
return _elements.length ? _elements[0][key] : undefined;
|
|
122
|
+
}
|
|
123
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
124
|
+
_elements[i][key] = value;
|
|
125
|
+
}
|
|
126
|
+
return this;
|
|
127
|
+
};
|
|
128
|
+
_elements.closestClass = function (name, stopAt) {
|
|
129
|
+
var result = jQueryReplacement();
|
|
130
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
131
|
+
var match = getParentWithClass(_elements[i], name, stopAt);
|
|
132
|
+
result.add(match);
|
|
133
|
+
}
|
|
134
|
+
return result;
|
|
135
|
+
};
|
|
136
|
+
_elements.remove = function () {
|
|
137
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
138
|
+
var el = _elements[i];
|
|
139
|
+
if (el.parentNode) {
|
|
140
|
+
el.parentNode.removeChild(el);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
_elements.data = function (name, value) {
|
|
145
|
+
if (_elements.length === 0)
|
|
146
|
+
return undefined;
|
|
147
|
+
if (value === undefined) {
|
|
148
|
+
return _elements[0][name];
|
|
149
|
+
}
|
|
150
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
151
|
+
_elements[i][name] = value;
|
|
152
|
+
}
|
|
153
|
+
return this;
|
|
154
|
+
};
|
|
155
|
+
_elements.html = function (value) {
|
|
156
|
+
if (value === undefined) {
|
|
157
|
+
return _elements.length ? _elements[0].innerHTML : undefined;
|
|
158
|
+
}
|
|
159
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
160
|
+
_elements[i].innerHTML = value;
|
|
161
|
+
}
|
|
162
|
+
return this;
|
|
163
|
+
};
|
|
164
|
+
_elements.text = function (value) {
|
|
165
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
166
|
+
_elements[i].innerText = value;
|
|
167
|
+
}
|
|
168
|
+
return this;
|
|
169
|
+
};
|
|
170
|
+
_elements.height = function (value) {
|
|
171
|
+
if (value === undefined) {
|
|
172
|
+
if (!_elements.length) {
|
|
173
|
+
return undefined;
|
|
174
|
+
}
|
|
175
|
+
var cssHeight = parseInt(_elements[0].style.height);
|
|
176
|
+
if (isNaN(cssHeight)) {
|
|
177
|
+
return _elements[0].offsetHeight;
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
return cssHeight;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
184
|
+
if (typeof value === "string") {
|
|
185
|
+
_elements[i].style.height = value;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
//_elements[i].offsetHeight = value;
|
|
189
|
+
_elements[i].style.height = value + "px";
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return this;
|
|
193
|
+
};
|
|
194
|
+
_elements.width = function (value) {
|
|
195
|
+
if (value === undefined) {
|
|
196
|
+
if (!_elements.length) {
|
|
197
|
+
return undefined;
|
|
198
|
+
}
|
|
199
|
+
// let cssHeight = parseInt(_elements[0].style.width);
|
|
200
|
+
// if (isNaN(cssHeight)) {
|
|
201
|
+
return _elements[0].offsetWidth;
|
|
202
|
+
// } else {
|
|
203
|
+
// return cssHeight;
|
|
204
|
+
// }
|
|
205
|
+
}
|
|
206
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
207
|
+
if (typeof value === "string") {
|
|
208
|
+
_elements[i].style.width = value;
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
//_elements[i].offsetWidth = value;
|
|
212
|
+
_elements[i].style.width = value + "px";
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return this;
|
|
216
|
+
};
|
|
217
|
+
_elements.removeClass = function (name) {
|
|
218
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
219
|
+
if (name.indexOf(' ') > 0) {
|
|
220
|
+
var names = name.split(' ');
|
|
221
|
+
for (var nIdx = 0; nIdx < names.length; nIdx++) {
|
|
222
|
+
_elements[i].classList.remove(names[nIdx]);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
_elements[i].classList.remove(name);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return this;
|
|
230
|
+
};
|
|
231
|
+
_elements.offset = function () {
|
|
232
|
+
if (_elements.length === 0)
|
|
233
|
+
return undefined;
|
|
234
|
+
var el = _elements[0];
|
|
235
|
+
var rect = el.getBoundingClientRect();
|
|
236
|
+
return {
|
|
237
|
+
top: rect.top + document.body.scrollTop,
|
|
238
|
+
left: rect.left + document.body.scrollLeft
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
_elements.children = function () {
|
|
242
|
+
var result = [];
|
|
243
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
244
|
+
for (var cidx = 0; cidx < _elements[i].children.length; cidx++) {
|
|
245
|
+
result.push(_elements[i].children[cidx]);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return jQWrapper(result);
|
|
249
|
+
};
|
|
250
|
+
_elements.on = function (eventname, fnc) {
|
|
251
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
252
|
+
_elements[i].addEventListener(eventname, fnc);
|
|
253
|
+
}
|
|
254
|
+
return this;
|
|
255
|
+
};
|
|
256
|
+
_elements.toggleClass = function (name, state) {
|
|
257
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
258
|
+
if (state === false || _elements[i].classList.contains(name)) {
|
|
259
|
+
_elements[i].classList.remove(name);
|
|
260
|
+
}
|
|
261
|
+
else if (state === true || !_elements[i].classList.contains(name)) {
|
|
262
|
+
_elements[i].classList.add(name);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return this;
|
|
266
|
+
};
|
|
267
|
+
_elements.find = function (selector) {
|
|
268
|
+
var result = jQueryReplacement();
|
|
269
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
270
|
+
var found = _elements[i].querySelectorAll(selector);
|
|
271
|
+
for (var j = 0; j < found.length; j++) {
|
|
272
|
+
result.add(found[j]);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return result;
|
|
276
|
+
};
|
|
277
|
+
_elements.slideDown = function (speed, done) {
|
|
278
|
+
//TODO
|
|
279
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
280
|
+
_elements[i].style.display = '';
|
|
281
|
+
}
|
|
282
|
+
return this;
|
|
283
|
+
};
|
|
284
|
+
_elements.slideUp = function (speed, done) {
|
|
285
|
+
//TODO
|
|
286
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
287
|
+
_elements[i].style.display = 'none';
|
|
288
|
+
}
|
|
289
|
+
return this;
|
|
290
|
+
};
|
|
291
|
+
_elements.addClass = function (name) {
|
|
292
|
+
if (name) {
|
|
293
|
+
{
|
|
294
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
295
|
+
_elements[i].classList.add(name);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return this;
|
|
300
|
+
};
|
|
301
|
+
_elements.hasClass = function (name) {
|
|
302
|
+
for (var i = 0; i < _elements.length; i++) {
|
|
303
|
+
if (_elements[i].classList.contains(name))
|
|
304
|
+
return true;
|
|
305
|
+
}
|
|
306
|
+
return false;
|
|
307
|
+
};
|
|
308
|
+
_elements.index = function () {
|
|
309
|
+
var index = 0;
|
|
310
|
+
var node = _elements[0];
|
|
311
|
+
if (!node)
|
|
312
|
+
return -1;
|
|
313
|
+
while ((node = node.previousElementSibling)) {
|
|
314
|
+
index++;
|
|
315
|
+
}
|
|
316
|
+
return index;
|
|
317
|
+
};
|
|
318
|
+
return _elements;
|
|
319
|
+
}
|
|
320
|
+
var jqueryCreate = function (selector) {
|
|
321
|
+
var elements = [];
|
|
322
|
+
if (typeof selector === "string") {
|
|
323
|
+
if (selector[0] === '<') {
|
|
324
|
+
var tmp = document.createElement("div");
|
|
325
|
+
tmp.innerHTML = selector;
|
|
326
|
+
elements.push(tmp.firstElementChild);
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
var q = document.querySelectorAll(selector);
|
|
330
|
+
if (q) {
|
|
331
|
+
for (var i = 0; i < q.length; i++) {
|
|
332
|
+
var node = q[i];
|
|
333
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
334
|
+
elements.push(node);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
if (selector !== undefined) {
|
|
342
|
+
elements.push(selector);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return jQWrapper(elements);
|
|
346
|
+
};
|
|
347
|
+
function each(array, fnc) {
|
|
348
|
+
for (var i = 0; i < array.length; i++) {
|
|
349
|
+
fnc(i, array[i]);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
function shallowExtend(out) {
|
|
353
|
+
var rest = [];
|
|
354
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
355
|
+
rest[_i - 1] = arguments[_i];
|
|
356
|
+
}
|
|
357
|
+
out = out || {};
|
|
358
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
359
|
+
if (!arguments[i])
|
|
360
|
+
continue;
|
|
361
|
+
for (var key in arguments[i]) {
|
|
362
|
+
if (arguments[i].hasOwnProperty(key))
|
|
363
|
+
out[key] = arguments[i][key];
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return out;
|
|
367
|
+
}
|
|
368
|
+
jqueryCreate.deepExtend = deepExtend;
|
|
369
|
+
jqueryCreate.each = each;
|
|
370
|
+
jqueryCreate.shallowExtend = shallowExtend;
|
|
371
|
+
export var jQueryReplacement = jqueryCreate;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare class UILang {
|
|
2
|
+
static core: {
|
|
3
|
+
All: string;
|
|
4
|
+
Ok: string;
|
|
5
|
+
Cancel: string;
|
|
6
|
+
};
|
|
7
|
+
static grid: {
|
|
8
|
+
Sort: string;
|
|
9
|
+
Asc: string;
|
|
10
|
+
Desc: string;
|
|
11
|
+
Filter: string;
|
|
12
|
+
ClearFilter: string;
|
|
13
|
+
Search: string;
|
|
14
|
+
};
|
|
15
|
+
static dropDown: {
|
|
16
|
+
SelectOption: string;
|
|
17
|
+
SelectOptionMultiple: string;
|
|
18
|
+
NoResults: string;
|
|
19
|
+
NoOptions: string;
|
|
20
|
+
MaxSelection: string;
|
|
21
|
+
AlreadyInUse: string;
|
|
22
|
+
Search: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
package/lib/core/lang.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var UILang = /** @class */ (function () {
|
|
2
|
+
function UILang() {
|
|
3
|
+
}
|
|
4
|
+
UILang.core = {
|
|
5
|
+
All: "All",
|
|
6
|
+
Ok: "Ok",
|
|
7
|
+
Cancel: "Cancel"
|
|
8
|
+
};
|
|
9
|
+
UILang.grid = {
|
|
10
|
+
Sort: "Sort",
|
|
11
|
+
Asc: "Ascending",
|
|
12
|
+
Desc: "Descending",
|
|
13
|
+
Filter: "Filter",
|
|
14
|
+
ClearFilter: "Clear Filter",
|
|
15
|
+
Search: "Search"
|
|
16
|
+
};
|
|
17
|
+
UILang.dropDown = {
|
|
18
|
+
SelectOption: "Select an option...",
|
|
19
|
+
SelectOptionMultiple: "Enter options...",
|
|
20
|
+
NoResults: "No results",
|
|
21
|
+
NoOptions: "No options available",
|
|
22
|
+
MaxSelection: "A maximum of {max} items can be selected",
|
|
23
|
+
AlreadyInUse: "That tag is already in use",
|
|
24
|
+
Search: "Search ..."
|
|
25
|
+
};
|
|
26
|
+
return UILang;
|
|
27
|
+
}());
|
|
28
|
+
export { UILang };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import culture from "./culture";
|
|
2
|
+
var numeric = /** @class */ (function () {
|
|
3
|
+
function numeric() {
|
|
4
|
+
}
|
|
5
|
+
numeric.parse = function (nrAsString) {
|
|
6
|
+
if (nrAsString === "" || nrAsString === undefined || nrAsString === null) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
if (!nrAsString) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
if (culture.info.decimalSep && culture.info.decimalSep.length > 1) {
|
|
13
|
+
throw "DecimalSep cannot be more than one character";
|
|
14
|
+
}
|
|
15
|
+
if (culture.info.thousandSep && culture.info.thousandSep.length > 1) {
|
|
16
|
+
throw "ThousandSep cannot be more than one character";
|
|
17
|
+
}
|
|
18
|
+
var str = "";
|
|
19
|
+
var comma_sep = culture.info.decimalSep;
|
|
20
|
+
for (var i = 0; i < nrAsString.length; i++) {
|
|
21
|
+
var c = nrAsString.charAt(i);
|
|
22
|
+
if (c === comma_sep) {
|
|
23
|
+
str += '.';
|
|
24
|
+
}
|
|
25
|
+
else if (c === '0' || c === '1' || c === '2' || c === '3' || c === '4' || c === '5' || c === '6' || c === '7' || c === '8' || c === '9' || (c === '-' && str === "")) {
|
|
26
|
+
str += c;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return parseFloat(str);
|
|
30
|
+
};
|
|
31
|
+
numeric.format = function (nr, format) {
|
|
32
|
+
if (isNaN(nr) || nr === null || nr === undefined) {
|
|
33
|
+
return "";
|
|
34
|
+
}
|
|
35
|
+
if (culture.info.decimalSep && culture.info.decimalSep.length > 1) {
|
|
36
|
+
throw "DecimalSep cannot be more than one character";
|
|
37
|
+
}
|
|
38
|
+
if (culture.info.thousandSep && culture.info.thousandSep.length > 1) {
|
|
39
|
+
throw "ThousandSep cannot be more than one character";
|
|
40
|
+
}
|
|
41
|
+
var f = format || culture.info.numberFormat;
|
|
42
|
+
var cacheEntry = numeric.formatCache[f];
|
|
43
|
+
if (!cacheEntry) {
|
|
44
|
+
numeric.formatCache[f] = cacheEntry = numeric.parseNrFormat(f);
|
|
45
|
+
}
|
|
46
|
+
return numeric.formatNumber(nr, cacheEntry);
|
|
47
|
+
};
|
|
48
|
+
numeric.parseNrFormat = function (format) {
|
|
49
|
+
var prefix = "";
|
|
50
|
+
var suffix = "";
|
|
51
|
+
var show_sep = format.indexOf(',#') > 0 || format.indexOf(',0') > 0;
|
|
52
|
+
var min_length = 0;
|
|
53
|
+
for (var i = 0; i < format.length; i++) {
|
|
54
|
+
if (format.charAt(i) === '.') {
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
if (format.charAt(i) === '0') {
|
|
58
|
+
min_length++;
|
|
59
|
+
}
|
|
60
|
+
if (min_length === 0 && format.charAt(i) !== ',' && format.charAt(i) !== '0' && format.charAt(i) !== '.' && format.charAt(i) !== '#') {
|
|
61
|
+
prefix += format.charAt(i);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
var max_comma_places = 0;
|
|
65
|
+
var min_comma_places = 0;
|
|
66
|
+
var comma_pos = format.indexOf('.');
|
|
67
|
+
if (comma_pos >= 0) {
|
|
68
|
+
for (var j = comma_pos + 1; j < format.length; j++) {
|
|
69
|
+
if (format.charAt(j) === '0') {
|
|
70
|
+
min_comma_places++;
|
|
71
|
+
}
|
|
72
|
+
else if (format.charAt(j) === '#') {
|
|
73
|
+
max_comma_places++;
|
|
74
|
+
}
|
|
75
|
+
else if (format.charAt(j) !== ',' && format.charAt(j) !== '.') {
|
|
76
|
+
suffix += format.charAt(j);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
max_comma_places += min_comma_places;
|
|
81
|
+
return { max_comma_places: max_comma_places, min_comma_places: min_comma_places, min_length: min_length, prefix: prefix, suffix: suffix, show_sep: show_sep };
|
|
82
|
+
};
|
|
83
|
+
numeric.formatNumber = function (nr, format) {
|
|
84
|
+
//defaults
|
|
85
|
+
var comma_separator = culture.info.decimalSep;
|
|
86
|
+
var thousand_separator = culture.info.thousandSep;
|
|
87
|
+
var cp_min = format.min_comma_places || 0;
|
|
88
|
+
var cp_max = format.max_comma_places || 0;
|
|
89
|
+
var ml = format.min_length || 0;
|
|
90
|
+
//check if number is negative
|
|
91
|
+
var negative = nr < 0;
|
|
92
|
+
if (negative) {
|
|
93
|
+
nr = -nr;
|
|
94
|
+
}
|
|
95
|
+
//convert number to a string and round
|
|
96
|
+
var nr_str_raw = nr.toFixed(cp_max);
|
|
97
|
+
var cp = cp_max;
|
|
98
|
+
//remove comma-places which are not necessary
|
|
99
|
+
var end = nr_str_raw.indexOf('.') + cp_min;
|
|
100
|
+
if (end >= 0) {
|
|
101
|
+
var x = nr_str_raw.length - 1;
|
|
102
|
+
while (x > end) {
|
|
103
|
+
if (nr_str_raw.charAt(x) === '0') {
|
|
104
|
+
cp--;
|
|
105
|
+
nr_str_raw = nr_str_raw.slice(0, -1);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
x--;
|
|
111
|
+
}
|
|
112
|
+
if (nr_str_raw.charAt(x) === '.') {
|
|
113
|
+
nr_str_raw = nr_str_raw.slice(0, -1);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
var nr_str = comma_separator !== "." ? nr_str_raw.replace(".", comma_separator) : nr_str_raw;
|
|
117
|
+
var t = cp ? cp + 1 : 0;
|
|
118
|
+
// add "0" at the front if necessary
|
|
119
|
+
while (nr_str.length < ml + t) {
|
|
120
|
+
nr_str = "0" + nr_str;
|
|
121
|
+
}
|
|
122
|
+
// insert thousand-separator if necessary
|
|
123
|
+
t += 3;
|
|
124
|
+
while (nr_str.length > t && format.show_sep) {
|
|
125
|
+
nr_str = nr_str.substr(0, nr_str.length - t) + thousand_separator + nr_str.substr(nr_str.length - t);
|
|
126
|
+
t += 4;
|
|
127
|
+
}
|
|
128
|
+
//remove first 0 if necessary
|
|
129
|
+
if (ml === 0 && nr_str.charAt(0) === '0') {
|
|
130
|
+
nr_str = nr_str.slice(1);
|
|
131
|
+
}
|
|
132
|
+
//return number
|
|
133
|
+
if (negative && parseFloat(nr_str_raw) !== 0) {
|
|
134
|
+
return (format.prefix || "") + "-" + nr_str + (format.suffix || "");
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
return (format.prefix || "") + nr_str + (format.suffix || "");
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
numeric.formatCache = {};
|
|
141
|
+
return numeric;
|
|
142
|
+
}());
|
|
143
|
+
export { numeric };
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// source: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
|
|
2
|
+
(function () {
|
|
3
|
+
if (typeof window.CustomEvent === "function") {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
;
|
|
7
|
+
function CustomEvent(event, params) {
|
|
8
|
+
params = params || { bubbles: false, cancelable: false, detail: undefined };
|
|
9
|
+
var evt = document.createEvent("CustomEvent");
|
|
10
|
+
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
|
11
|
+
return evt;
|
|
12
|
+
}
|
|
13
|
+
CustomEvent.prototype = window.Event.prototype;
|
|
14
|
+
window.CustomEvent = CustomEvent;
|
|
15
|
+
if (!("remove" in Element.prototype)) {
|
|
16
|
+
Element.prototype.remove = function () {
|
|
17
|
+
if (this.parentNode) {
|
|
18
|
+
this.parentNode.removeChild(this);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
})();
|
package/lib/core.d.ts
ADDED
package/lib/core.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.slick-columnpicker {
|
|
2
|
+
border: 1px solid #718BB7;
|
|
3
|
+
background: #f0f0f0;
|
|
4
|
+
padding: 6px;
|
|
5
|
+
-moz-box-shadow: 2px 2px 2px silver;
|
|
6
|
+
-webkit-box-shadow: 2px 2px 2px silver;
|
|
7
|
+
box-shadow: 2px 2px 2px silver;
|
|
8
|
+
min-width: 150px;
|
|
9
|
+
cursor: default;
|
|
10
|
+
position:absolute;
|
|
11
|
+
z-index:20;
|
|
12
|
+
overflow:auto;
|
|
13
|
+
resize: both;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.slick-columnpicker > .close {
|
|
17
|
+
float: right;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.slick-columnpicker .title {
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
width: 60%;
|
|
23
|
+
border-bottom: solid 1px #d6d6d6;
|
|
24
|
+
margin-bottom: 10px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.slick-columnpicker li {
|
|
28
|
+
list-style: none;
|
|
29
|
+
margin: 0;
|
|
30
|
+
padding: 0;
|
|
31
|
+
background: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.slick-columnpicker input {
|
|
35
|
+
margin: 4px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.slick-columnpicker li a {
|
|
39
|
+
display: block;
|
|
40
|
+
padding: 4px;
|
|
41
|
+
font-weight: bold;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.slick-columnpicker li a:hover {
|
|
45
|
+
background: white;
|
|
46
|
+
}
|