jsl-ui 9.18.2 → 9.18.3
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/grid.css +0 -8
- package/lib/index.css.map +1 -1
- package/lib/index.js +10198 -61
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/components/IntervalComponent.d.ts +0 -17
- package/lib/components/IntervalComponent.js +0 -68
- package/lib/components/auto-suggest/AutoSuggestComponent.d.ts +0 -22
- package/lib/components/auto-suggest/AutoSuggestComponent.js +0 -49
- package/lib/components/button/ButtonComponent.d.ts +0 -18
- package/lib/components/button/ButtonComponent.js +0 -46
- package/lib/components/checkbox/CheckBoxComponent.d.ts +0 -28
- package/lib/components/checkbox/CheckBoxComponent.js +0 -94
- package/lib/components/checkbox/CheckBoxStyle.scss +0 -86
- package/lib/components/date/DateComponent.d.ts +0 -32
- package/lib/components/date/DateComponent.js +0 -106
- package/lib/components/date-range/DateRangeComponent.d.ts +0 -35
- package/lib/components/date-range/DateRangeComponent.js +0 -136
- package/lib/components/date-range/DateRangeStyle.scss +0 -12
- package/lib/components/date-time/DateTimeComponent.d.ts +0 -15
- package/lib/components/date-time/DateTimeComponent.js +0 -53
- package/lib/components/date-time/DateTimeStyle.scss +0 -7
- package/lib/components/dialog/DialogComponent.d.ts +0 -67
- package/lib/components/dialog/DialogComponent.js +0 -242
- package/lib/components/drop-down/DropDownComponent.d.ts +0 -27
- package/lib/components/drop-down/DropDownComponent.js +0 -74
- package/lib/components/expander/ExpanderComponent.d.ts +0 -27
- package/lib/components/expander/ExpanderComponent.js +0 -90
- package/lib/components/expander/ExpanderStyle.scss +0 -47
- package/lib/components/expander/OldExpanderStyle.scss +0 -37
- package/lib/components/form-field/FormComponent.d.ts +0 -12
- package/lib/components/form-field/FormComponent.js +0 -26
- package/lib/components/form-field/FormFieldComponent.d.ts +0 -38
- package/lib/components/form-field/FormFieldComponent.js +0 -139
- package/lib/components/form-field/FormFieldStyle.scss +0 -87
- package/lib/components/grid/GridComponent.d.ts +0 -26
- package/lib/components/grid/GridComponent.js +0 -116
- package/lib/components/input/InputComponent.d.ts +0 -33
- package/lib/components/input/InputComponent.js +0 -144
- package/lib/components/loading/LoadingComponent.d.ts +0 -8
- package/lib/components/loading/LoadingComponent.js +0 -22
- package/lib/components/loading/LoadingStyle.css +0 -29
- package/lib/components/navigation/NavigationComponent.d.ts +0 -34
- package/lib/components/navigation/NavigationComponent.js +0 -70
- package/lib/components/navigation/NavigationStyle.scss +0 -226
- package/lib/components/notification/Notification.d.ts +0 -17
- package/lib/components/notification/Notification.js +0 -56
- package/lib/components/notification/Notification.scss +0 -19
- package/lib/components/number/NumberComponent.d.ts +0 -25
- package/lib/components/number/NumberComponent.js +0 -87
- package/lib/components/overlay/OverlayComponent.d.ts +0 -27
- package/lib/components/overlay/OverlayComponent.js +0 -149
- package/lib/components/overlay/overlay.css +0 -57
- package/lib/components/progress/ProgressComponent.d.ts +0 -18
- package/lib/components/progress/ProgressComponent.js +0 -42
- package/lib/components/progress/ProgressStyle.scss +0 -15
- package/lib/components/ribbon-menu/RibbonMenuComponent.d.ts +0 -12
- package/lib/components/ribbon-menu/RibbonMenuComponent.js +0 -34
- package/lib/components/ribbon-menu/RibbonMenuStyle.scss +0 -76
- package/lib/components/select/SelectComponent.d.ts +0 -79
- package/lib/components/select/SelectComponent.js +0 -362
- package/lib/components/select/SelectDDAreaComponent.d.ts +0 -32
- package/lib/components/select/SelectDDAreaComponent.js +0 -317
- package/lib/components/select/SelectStyle.scss +0 -187
- package/lib/components/slider/nouislider.css +0 -310
- package/lib/components/slider/nouislider.d.ts +0 -44
- package/lib/components/slider/nouislider.js +0 -2158
- package/lib/components/stack-panel/SplitterComponent.d.ts +0 -21
- package/lib/components/stack-panel/SplitterComponent.js +0 -126
- package/lib/components/stack-panel/SplitterStyle.scss +0 -45
- package/lib/components/stack-panel/StackPanelComponent.d.ts +0 -20
- package/lib/components/stack-panel/StackPanelComponent.js +0 -64
- package/lib/components/stack-panel/StackPanelStyle.scss +0 -53
- package/lib/components/tabs/TabsComponent.d.ts +0 -39
- package/lib/components/tabs/TabsComponent.js +0 -177
- package/lib/components/tabs/TabsStyle.scss +0 -76
- package/lib/components/time/TimeComponent.d.ts +0 -29
- package/lib/components/time/TimeComponent.js +0 -113
- package/lib/components/time/TimeComponent.scss +0 -4
- package/lib/components/tree-view/TreeViewComponent.d.ts +0 -23
- package/lib/components/tree-view/TreeViewComponent.js +0 -45
- package/lib/components/tree-view/TreeViewStyle.scss +0 -96
- package/lib/components/virtual-render/VirtualRenderComponent.d.ts +0 -30
- package/lib/components/virtual-render/VirtualRenderComponent.js +0 -104
- package/lib/components/virtual-render/VirtualRenderStyle.scss +0 -9
- package/lib/core/culture.d.ts +0 -5
- package/lib/core/culture.js +0 -385
- package/lib/core/date.d.ts +0 -14
- package/lib/core/date.js +0 -350
- package/lib/core/helper.d.ts +0 -12
- package/lib/core/helper.js +0 -101
- package/lib/core/jq.d.ts +0 -37
- package/lib/core/jq.js +0 -371
- package/lib/core/lang.d.ts +0 -24
- package/lib/core/lang.js +0 -28
- package/lib/core/numeric.d.ts +0 -7
- package/lib/core/numeric.js +0 -143
- package/lib/core/polyfills.d.ts +0 -0
- package/lib/core/polyfills.js +0 -22
- package/lib/core.d.ts +0 -6
- package/lib/core.js +0 -6
- package/lib/grid/controls/slick.columnpicker.css +0 -46
- package/lib/grid/controls/slick.draggablegrouping.css +0 -52
- package/lib/grid/controls/slick.gridmenu.css +0 -127
- package/lib/grid/controls/slick.pager.css +0 -41
- package/lib/grid/examples/examples.css +0 -203
- package/lib/grid/filterDialogs/dateRangeFilter.d.ts +0 -7
- package/lib/grid/filterDialogs/dateRangeFilter.js +0 -156
- package/lib/grid/filterDialogs/excelFilter.d.ts +0 -9
- package/lib/grid/filterDialogs/excelFilter.js +0 -313
- package/lib/grid/plugins/ext.overlay.css +0 -28
- package/lib/grid/plugins/ext.overlay.d.ts +0 -2
- package/lib/grid/plugins/ext.overlay.js +0 -291
- package/lib/grid/plugins/slick.cellrangedecorator.d.ts +0 -12
- package/lib/grid/plugins/slick.cellrangedecorator.js +0 -68
- package/lib/grid/plugins/slick.cellrangeselector.d.ts +0 -1
- package/lib/grid/plugins/slick.cellrangeselector.js +0 -144
- package/lib/grid/plugins/slick.cellselectionmodel.d.ts +0 -1
- package/lib/grid/plugins/slick.cellselectionmodel.js +0 -194
- package/lib/grid/plugins/slick.headerbuttons.css +0 -40
- package/lib/grid/plugins/slick.headerbuttons.d.ts +0 -55
- package/lib/grid/plugins/slick.headerbuttons.js +0 -156
- package/lib/grid/plugins/slick.headermenu.css +0 -101
- package/lib/grid/plugins/slick.headermenu.d.ts +0 -74
- package/lib/grid/plugins/slick.headermenu.js +0 -260
- package/lib/grid/plugins/slick.rowdetailview.css +0 -37
- package/lib/grid/plugins/slick.rowmovemanager.css +0 -8
- package/lib/grid/plugins/slick.rowmovemanager.d.ts +0 -18
- package/lib/grid/plugins/slick.rowmovemanager.js +0 -249
- package/lib/grid/plugins/slick.rowselectionmodel.d.ts +0 -1
- package/lib/grid/plugins/slick.rowselectionmodel.js +0 -167
- package/lib/grid/slick-default-theme.css +0 -154
- package/lib/grid/slick.core.d.ts +0 -90
- package/lib/grid/slick.core.js +0 -574
- package/lib/grid/slick.creator.d.ts +0 -80
- package/lib/grid/slick.creator.js +0 -723
- package/lib/grid/slick.dataview.d.ts +0 -71
- package/lib/grid/slick.dataview.js +0 -1080
- package/lib/grid/slick.editors.core.d.ts +0 -4
- package/lib/grid/slick.editors.core.js +0 -232
- package/lib/grid/slick.editors.date.d.ts +0 -2
- package/lib/grid/slick.editors.date.js +0 -125
- package/lib/grid/slick.editors.lookup.d.ts +0 -14
- package/lib/grid/slick.editors.lookup.js +0 -353
- package/lib/grid/slick.editors.nav.d.ts +0 -6
- package/lib/grid/slick.editors.nav.js +0 -22
- package/lib/grid/slick.formatters.d.ts +0 -17
- package/lib/grid/slick.formatters.js +0 -137
- package/lib/grid/slick.grid.css +0 -325
- package/lib/grid/slick.grid.d.ts +0 -284
- package/lib/grid/slick.grid.js +0 -5395
- package/lib/grid/slick.groupitemmetadataprovider.d.ts +0 -39
- package/lib/grid/slick.groupitemmetadataprovider.js +0 -165
- package/lib/grid/slick.tree.css +0 -20
- package/lib/grid/slick.tree.d.ts +0 -33
- package/lib/grid/slick.tree.js +0 -220
- package/lib/grid.d.ts +0 -13
- package/lib/grid.js +0 -13
- package/lib/index.css +0 -2584
- package/lib/index.d.ts +0 -56
- package/lib/interaction/dataconverter.d.ts +0 -4
- package/lib/interaction/dataconverter.js +0 -1
- package/lib/interaction/eventhandler.d.ts +0 -13
- package/lib/interaction/eventhandler.js +0 -42
- package/lib/interaction/moveable.css +0 -0
- package/lib/interaction/moveable.d.ts +0 -39
- package/lib/interaction/moveable.js +0 -172
- package/lib/interaction/resizable.css +0 -33
- package/lib/interaction/resizable.d.ts +0 -37
- package/lib/interaction/resizable.js +0 -123
- package/lib/ui/auto.suggest.css +0 -14
- package/lib/ui/auto.suggest.d.ts +0 -17
- package/lib/ui/auto.suggest.js +0 -255
- package/lib/ui/base.css +0 -150
- package/lib/ui/date.picker/css/date-range-picker.css +0 -87
- package/lib/ui/date.picker/css/tiny-date-picker.css +0 -326
- package/lib/ui/date.picker/date-picker-options.d.ts +0 -11
- package/lib/ui/date.picker/date-picker-options.js +0 -76
- package/lib/ui/date.picker/lib/date-manip.d.ts +0 -74
- package/lib/ui/date.picker/lib/date-manip.js +0 -120
- package/lib/ui/date.picker/lib/dom.d.ts +0 -23
- package/lib/ui/date.picker/lib/dom.js +0 -28
- package/lib/ui/date.picker/lib/emitter.d.ts +0 -13
- package/lib/ui/date.picker/lib/emitter.js +0 -49
- package/lib/ui/date.picker/lib/fns.d.ts +0 -23
- package/lib/ui/date.picker/lib/fns.js +0 -43
- package/lib/ui/date.picker/mode/base-mode.d.ts +0 -26
- package/lib/ui/date.picker/mode/base-mode.js +0 -248
- package/lib/ui/date.picker/mode/dropdown-mode.d.ts +0 -28
- package/lib/ui/date.picker/mode/dropdown-mode.js +0 -50
- package/lib/ui/date.picker/mode/index.d.ts +0 -28
- package/lib/ui/date.picker/mode/index.js +0 -18
- package/lib/ui/date.picker/mode/modal-mode.d.ts +0 -25
- package/lib/ui/date.picker/mode/modal-mode.js +0 -17
- package/lib/ui/date.picker/mode/permanent-mode.d.ts +0 -29
- package/lib/ui/date.picker/mode/permanent-mode.js +0 -19
- package/lib/ui/date.picker/views/day-picker.d.ts +0 -40
- package/lib/ui/date.picker/views/day-picker.js +0 -155
- package/lib/ui/date.picker/views/month-picker.d.ts +0 -26
- package/lib/ui/date.picker/views/month-picker.js +0 -65
- package/lib/ui/date.picker/views/year-picker.d.ts +0 -20
- package/lib/ui/date.picker/views/year-picker.js +0 -66
- package/lib/ui/date.picker.d.ts +0 -66
- package/lib/ui/date.picker.js +0 -32
- package/lib/ui/dialog.css +0 -109
- package/lib/ui/dialog.d.ts +0 -22
- package/lib/ui/dialog.js +0 -113
- package/lib/ui/drop.down.css +0 -472
- package/lib/ui/drop.down.d.ts +0 -52
- package/lib/ui/drop.down.js +0 -2112
- package/lib/ui/number.input.css +0 -3
- package/lib/ui/number.input.d.ts +0 -12
- package/lib/ui/number.input.js +0 -64
- package/lib/ui/tabs.css +0 -53
package/lib/core/date.js
DELETED
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
import culture from "./culture";
|
|
2
|
-
/*
|
|
3
|
-
* contains function to parse and format numeric values
|
|
4
|
-
*/
|
|
5
|
-
//*** all following parts are extracted out of jquery-ui library (GPL/MIT license) ***/
|
|
6
|
-
var _helper = {
|
|
7
|
-
_defaults: { shortYearCutoff: "+10", dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] },
|
|
8
|
-
_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
|
|
9
|
-
_daylightSavingAdjust: function (date) {
|
|
10
|
-
if (!date) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
|
|
14
|
-
return date;
|
|
15
|
-
},
|
|
16
|
-
_getDaysInMonth: function (year, month) {
|
|
17
|
-
return 32 - _helper._daylightSavingAdjust(new Date(year, month, 32)).getDate();
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
var date = /** @class */ (function () {
|
|
21
|
-
function date() {
|
|
22
|
-
}
|
|
23
|
-
/* Parse a string value into a date object.
|
|
24
|
-
See formatDate below for the possible formats.
|
|
25
|
-
|
|
26
|
-
@param format string - the expected format of the date
|
|
27
|
-
@param value string - the date in the above format
|
|
28
|
-
@param settings Object - attributes include:
|
|
29
|
-
shortYearCutoff number - the cutoff year for determining the century (optional)
|
|
30
|
-
dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
|
|
31
|
-
dayNames string[7] - names of the days from Sunday (optional)
|
|
32
|
-
monthNamesShort string[12] - abbreviated names of the months (optional)
|
|
33
|
-
monthNames string[12] - names of the months (optional)
|
|
34
|
-
@return Date - the extracted date value or null if value is blank */
|
|
35
|
-
date.parse = function (value, format, settings) {
|
|
36
|
-
if (value === null) {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
if (value === undefined) {
|
|
40
|
-
return undefined;
|
|
41
|
-
}
|
|
42
|
-
if (value == "") {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
format = format || culture.info.dateFormat;
|
|
46
|
-
//value = (typeof value == 'object' ? value.toString() : value + '');
|
|
47
|
-
var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || _helper._defaults.shortYearCutoff;
|
|
48
|
-
shortYearCutoff = (typeof shortYearCutoff != "string" ? shortYearCutoff :
|
|
49
|
-
new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
|
|
50
|
-
var dayNamesShort = (settings ? settings.dayNamesShort : null) || _helper._defaults.dayNamesShort;
|
|
51
|
-
var dayNames = (settings ? settings.dayNames : null) || _helper._defaults.dayNames;
|
|
52
|
-
var monthNamesShort = (settings ? settings.monthNamesShort : null) || _helper._defaults.monthNamesShort;
|
|
53
|
-
var monthNames = (settings ? settings.monthNames : null) || _helper._defaults.monthNames;
|
|
54
|
-
var year = -1;
|
|
55
|
-
var month = -1;
|
|
56
|
-
var day = -1;
|
|
57
|
-
var doy = -1;
|
|
58
|
-
var literal = false;
|
|
59
|
-
// Check whether a format character is doubled
|
|
60
|
-
var lookAhead = function (match) {
|
|
61
|
-
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
|
|
62
|
-
if (matches) {
|
|
63
|
-
iFormat++;
|
|
64
|
-
}
|
|
65
|
-
return matches;
|
|
66
|
-
};
|
|
67
|
-
// Extract a number from the string value
|
|
68
|
-
var getNumber = function (match) {
|
|
69
|
-
var isDoubled = lookAhead(match);
|
|
70
|
-
var size = (match == "@" ? 14 : (match == "!" ? 20 :
|
|
71
|
-
(match == "y" && isDoubled ? 4 : (match == "o" ? 3 : 2))));
|
|
72
|
-
var digits = new RegExp("^\\d{1," + size + "}");
|
|
73
|
-
var num = value.substring(iValue).match(digits);
|
|
74
|
-
if (!num) {
|
|
75
|
-
throw "Missing number at position " + iValue;
|
|
76
|
-
}
|
|
77
|
-
iValue += num[0].length;
|
|
78
|
-
return parseInt(num[0], 10);
|
|
79
|
-
};
|
|
80
|
-
// Extract a name from the string value and convert to an index
|
|
81
|
-
var getName = function (match, shortNames, longNames) {
|
|
82
|
-
var names = (lookAhead(match) ? longNames : shortNames);
|
|
83
|
-
for (var i = 0; i < names.length; i++) {
|
|
84
|
-
if (value.substr(iValue, names[i].length).toLowerCase() == names[i].toLowerCase()) {
|
|
85
|
-
iValue += names[i].length;
|
|
86
|
-
return i + 1;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
throw new Error("Unknown name at position " + iValue);
|
|
90
|
-
};
|
|
91
|
-
// Confirm that a literal character matches the string value
|
|
92
|
-
var checkLiteral = function () {
|
|
93
|
-
if (value.charAt(iValue) != format.charAt(iFormat)) {
|
|
94
|
-
throw "Unexpected literal at position " + iValue;
|
|
95
|
-
}
|
|
96
|
-
iValue++;
|
|
97
|
-
};
|
|
98
|
-
var iValue = 0;
|
|
99
|
-
for (var iFormat = 0; iFormat < format.length; iFormat++) {
|
|
100
|
-
if (literal) {
|
|
101
|
-
if (format.charAt(iFormat) == "'" && !lookAhead("'")) {
|
|
102
|
-
literal = false;
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
checkLiteral();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
switch (format.charAt(iFormat)) {
|
|
110
|
-
case "d":
|
|
111
|
-
day = getNumber("d");
|
|
112
|
-
break;
|
|
113
|
-
case "D":
|
|
114
|
-
getName("D", dayNamesShort, dayNames);
|
|
115
|
-
break;
|
|
116
|
-
case "o":
|
|
117
|
-
doy = getNumber("o");
|
|
118
|
-
break;
|
|
119
|
-
case "m":
|
|
120
|
-
month = getNumber("m");
|
|
121
|
-
break;
|
|
122
|
-
case "M":
|
|
123
|
-
month = getName("M", monthNamesShort, monthNames);
|
|
124
|
-
break;
|
|
125
|
-
case "y":
|
|
126
|
-
year = getNumber("y");
|
|
127
|
-
break;
|
|
128
|
-
case "@":
|
|
129
|
-
var date = new Date(getNumber("@"));
|
|
130
|
-
year = date.getFullYear();
|
|
131
|
-
month = date.getMonth() + 1;
|
|
132
|
-
day = date.getDate();
|
|
133
|
-
break;
|
|
134
|
-
case "!":
|
|
135
|
-
var date = new Date((getNumber("!") - _helper._ticksTo1970) / 10000);
|
|
136
|
-
year = date.getFullYear();
|
|
137
|
-
month = date.getMonth() + 1;
|
|
138
|
-
day = date.getDate();
|
|
139
|
-
break;
|
|
140
|
-
case "'":
|
|
141
|
-
if (lookAhead("'")) {
|
|
142
|
-
checkLiteral();
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
literal = true;
|
|
146
|
-
}
|
|
147
|
-
break;
|
|
148
|
-
default:
|
|
149
|
-
checkLiteral();
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
if (year == -1) {
|
|
154
|
-
year = new Date().getFullYear();
|
|
155
|
-
}
|
|
156
|
-
else if (year < 100) {
|
|
157
|
-
year += new Date().getFullYear() - new Date().getFullYear() % 100 +
|
|
158
|
-
(year <= shortYearCutoff ? 0 : -100);
|
|
159
|
-
}
|
|
160
|
-
if (doy > -1) {
|
|
161
|
-
month = 1;
|
|
162
|
-
day = doy;
|
|
163
|
-
do {
|
|
164
|
-
var dim = _helper._getDaysInMonth(year, month - 1);
|
|
165
|
-
if (day <= dim) {
|
|
166
|
-
break;
|
|
167
|
-
}
|
|
168
|
-
month++;
|
|
169
|
-
day -= dim;
|
|
170
|
-
} while (true);
|
|
171
|
-
}
|
|
172
|
-
var result = _helper._daylightSavingAdjust(new Date(year, month - 1, day));
|
|
173
|
-
if (result.getFullYear() != year || result.getMonth() + 1 != month || result.getDate() != day) {
|
|
174
|
-
throw new Error("Invalid date");
|
|
175
|
-
} // E.g. 31/02/*
|
|
176
|
-
return result;
|
|
177
|
-
};
|
|
178
|
-
/* Format a date object into a string value.
|
|
179
|
-
The format can be combinations of the following:
|
|
180
|
-
d - day of month (no leading zero)
|
|
181
|
-
dd - day of month (two digit)
|
|
182
|
-
o - day of year (no leading zeros)
|
|
183
|
-
oo - day of year (three digit)
|
|
184
|
-
D - day name short
|
|
185
|
-
DD - day name long
|
|
186
|
-
m - month of year (no leading zero)
|
|
187
|
-
mm - month of year (two digit)
|
|
188
|
-
M - month name short
|
|
189
|
-
MM - month name long
|
|
190
|
-
y - year (two digit)
|
|
191
|
-
yy - year (four digit)
|
|
192
|
-
@ - Unix timestamp (ms since 01/01/1970)
|
|
193
|
-
! - Windows ticks (100ns since 01/01/0001)
|
|
194
|
-
'...' - literal text
|
|
195
|
-
'' - single quote
|
|
196
|
-
|
|
197
|
-
@param format string - the desired format of the date
|
|
198
|
-
@param date Date - the date value to format
|
|
199
|
-
@param settings Object - attributes include:
|
|
200
|
-
dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
|
|
201
|
-
dayNames string[7] - names of the days from Sunday (optional)
|
|
202
|
-
monthNamesShort string[12] - abbreviated names of the months (optional)
|
|
203
|
-
monthNames string[12] - names of the months (optional)
|
|
204
|
-
@return string - the date in the above format */
|
|
205
|
-
date.format = function (date, format, settings) {
|
|
206
|
-
if (!date || isNaN(date)) {
|
|
207
|
-
return "";
|
|
208
|
-
}
|
|
209
|
-
format = format || culture.info.dateFormat;
|
|
210
|
-
var dayNamesShort = (settings ? settings.dayNamesShort : null) || _helper._defaults.dayNamesShort;
|
|
211
|
-
var dayNames = (settings ? settings.dayNames : null) || _helper._defaults.dayNames;
|
|
212
|
-
var monthNamesShort = (settings ? settings.monthNamesShort : null) || _helper._defaults.monthNamesShort;
|
|
213
|
-
var monthNames = (settings ? settings.monthNames : null) || _helper._defaults.monthNames;
|
|
214
|
-
// Check whether a format character is doubled
|
|
215
|
-
var lookAhead = function (match) {
|
|
216
|
-
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
|
|
217
|
-
if (matches) {
|
|
218
|
-
iFormat++;
|
|
219
|
-
}
|
|
220
|
-
return matches;
|
|
221
|
-
};
|
|
222
|
-
// Format a number, with leading zero if necessary
|
|
223
|
-
var formatNumber = function (match, value, len) {
|
|
224
|
-
var num = "" + value;
|
|
225
|
-
if (lookAhead(match)) {
|
|
226
|
-
while (num.length < len) {
|
|
227
|
-
num = "0" + num;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
return num;
|
|
231
|
-
};
|
|
232
|
-
// Format a name, short or long as requested
|
|
233
|
-
var formatName = function (match, value, shortNames, longNames) {
|
|
234
|
-
return (lookAhead(match) ? longNames[value] : shortNames[value]);
|
|
235
|
-
};
|
|
236
|
-
var output = "";
|
|
237
|
-
var literal = false;
|
|
238
|
-
if (date) {
|
|
239
|
-
for (var iFormat = 0; iFormat < format.length; iFormat++) {
|
|
240
|
-
if (literal) {
|
|
241
|
-
if (format.charAt(iFormat) == "'" && !lookAhead("'")) {
|
|
242
|
-
literal = false;
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
output += format.charAt(iFormat);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
switch (format.charAt(iFormat)) {
|
|
250
|
-
case "d":
|
|
251
|
-
output += formatNumber("d", date.getDate(), 2);
|
|
252
|
-
break;
|
|
253
|
-
case "D":
|
|
254
|
-
output += formatName("D", date.getDay(), dayNamesShort, dayNames);
|
|
255
|
-
break;
|
|
256
|
-
case "o":
|
|
257
|
-
output += formatNumber("o", (date.getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000, 3);
|
|
258
|
-
break;
|
|
259
|
-
case "m":
|
|
260
|
-
output += formatNumber("m", date.getMonth() + 1, 2);
|
|
261
|
-
break;
|
|
262
|
-
case "M":
|
|
263
|
-
output += formatName("M", date.getMonth(), monthNamesShort, monthNames);
|
|
264
|
-
break;
|
|
265
|
-
case "y":
|
|
266
|
-
output += (lookAhead("y") ? date.getFullYear() :
|
|
267
|
-
(date.getFullYear() % 100 < 10 ? "0" : "") + date.getFullYear() % 100);
|
|
268
|
-
break;
|
|
269
|
-
case "@":
|
|
270
|
-
output += date.getTime();
|
|
271
|
-
break;
|
|
272
|
-
case "!":
|
|
273
|
-
output += date.getTime() * 10000 + _helper._ticksTo1970;
|
|
274
|
-
break;
|
|
275
|
-
case "'":
|
|
276
|
-
if (lookAhead("'")) {
|
|
277
|
-
output += "'";
|
|
278
|
-
}
|
|
279
|
-
else {
|
|
280
|
-
literal = true;
|
|
281
|
-
}
|
|
282
|
-
break;
|
|
283
|
-
default:
|
|
284
|
-
output += format.charAt(iFormat);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
return output;
|
|
290
|
-
};
|
|
291
|
-
date.formatTime = function (value, inputMode) {
|
|
292
|
-
if (inputMode === "HourMinute") {
|
|
293
|
-
return value ? (pad(value.getHours()) + ":" + pad(value.getMinutes())) : "";
|
|
294
|
-
}
|
|
295
|
-
else if (inputMode === "HourMinuteSecond") {
|
|
296
|
-
return value ? (pad(value.getHours()) + ":" + pad(value.getMinutes()) + ":" + pad(value.getSeconds())) : "";
|
|
297
|
-
}
|
|
298
|
-
return "";
|
|
299
|
-
};
|
|
300
|
-
date.now = function () {
|
|
301
|
-
return new Date();
|
|
302
|
-
};
|
|
303
|
-
date.addSeconds = function (d, seconds) {
|
|
304
|
-
var future = new Date(d);
|
|
305
|
-
future.setSeconds(d.getSeconds() + seconds);
|
|
306
|
-
return future;
|
|
307
|
-
};
|
|
308
|
-
date.addMinutes = function (d, minutes) {
|
|
309
|
-
var future = new Date(d);
|
|
310
|
-
future.setMinutes(d.getMinutes() + minutes);
|
|
311
|
-
return future;
|
|
312
|
-
};
|
|
313
|
-
date.addHours = function (d, hours) {
|
|
314
|
-
var future = new Date(d);
|
|
315
|
-
future.setHours(d.getHours() + hours);
|
|
316
|
-
return future;
|
|
317
|
-
};
|
|
318
|
-
date.addDays = function (d, days) {
|
|
319
|
-
var future = new Date(d);
|
|
320
|
-
future.setDate(d.getDate() + days);
|
|
321
|
-
return future;
|
|
322
|
-
};
|
|
323
|
-
date.getDaysBetween = function (startDate, endDate) {
|
|
324
|
-
return Math.round((endDate - startDate) / (1000.0 * 3600.0 * 24.0));
|
|
325
|
-
};
|
|
326
|
-
date.getMsBetween = function (startDate, endDate) {
|
|
327
|
-
return endDate.getTime() - startDate.getTime();
|
|
328
|
-
};
|
|
329
|
-
date.onlyDate = function (d) {
|
|
330
|
-
if (d == null) {
|
|
331
|
-
return d;
|
|
332
|
-
}
|
|
333
|
-
var result = new Date(d);
|
|
334
|
-
result.setHours(0, 0, 0, 0);
|
|
335
|
-
return result;
|
|
336
|
-
};
|
|
337
|
-
date.equal = function (date1, date2) {
|
|
338
|
-
return (date1 && date1.getTime()) === (date2 && date2.getTime());
|
|
339
|
-
};
|
|
340
|
-
return date;
|
|
341
|
-
}());
|
|
342
|
-
export { date };
|
|
343
|
-
function pad(nr) {
|
|
344
|
-
if (nr < 10) {
|
|
345
|
-
return "0" + nr.toString();
|
|
346
|
-
}
|
|
347
|
-
else {
|
|
348
|
-
return nr.toString();
|
|
349
|
-
}
|
|
350
|
-
}
|
package/lib/core/helper.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare abstract class helper {
|
|
2
|
-
static emptyGuid: string;
|
|
3
|
-
static random(): number;
|
|
4
|
-
static newGuid(): string;
|
|
5
|
-
static newSeqGuid(): string;
|
|
6
|
-
static newDomGuid(): string;
|
|
7
|
-
static isObject(obj: any): boolean;
|
|
8
|
-
static isGuid(id: any): boolean;
|
|
9
|
-
static getParams(): any;
|
|
10
|
-
static isCyclic(o: any): boolean;
|
|
11
|
-
static correctDates(data: any): any;
|
|
12
|
-
}
|
package/lib/core/helper.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
var helper = /** @class */ (function () {
|
|
2
|
-
function helper() {
|
|
3
|
-
}
|
|
4
|
-
helper.random = function () {
|
|
5
|
-
return (Math.random() * (new Date().getTime() || 1)) % 1;
|
|
6
|
-
};
|
|
7
|
-
helper.newGuid = function () {
|
|
8
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = helper.random() * 16 | 0, v = c == "x" ? r : r & 0x3 | 0x8; return v.toString(16); });
|
|
9
|
-
};
|
|
10
|
-
helper.newSeqGuid = function () {
|
|
11
|
-
var d = new Date().getTime().toString(16);
|
|
12
|
-
while (d.length < 12) {
|
|
13
|
-
d = "0" + d;
|
|
14
|
-
}
|
|
15
|
-
if (d.length > 12) {
|
|
16
|
-
d = d.substring(0, 12);
|
|
17
|
-
}
|
|
18
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-".replace(/[xy]/g, function (c) { var r = helper.random() * 16 | 0, v = c == "x" ? r : r & 0x3 | 0x8; return v.toString(16); })
|
|
19
|
-
+ d;
|
|
20
|
-
};
|
|
21
|
-
helper.newDomGuid = function () {
|
|
22
|
-
return "axxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = helper.random() * 16 | 0, v = c == "x" ? r : r & 0x3 | 0x8; return v.toString(16); });
|
|
23
|
-
};
|
|
24
|
-
helper.isObject = function (obj) {
|
|
25
|
-
return obj ? Object.prototype.toString.call(obj) === "[object Object]" : false;
|
|
26
|
-
};
|
|
27
|
-
helper.isGuid = function (id) {
|
|
28
|
-
if (!id) {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
return /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(id);
|
|
32
|
-
};
|
|
33
|
-
helper.getParams = function () {
|
|
34
|
-
var match, pl = /\+/g, // Regex for replacing addition symbol with a space
|
|
35
|
-
search = /([^&=]+)=?([^&]*)/g, decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); }, query = window.location.search.substring(1);
|
|
36
|
-
var urlParams = {};
|
|
37
|
-
while (match = search.exec(query))
|
|
38
|
-
urlParams[decode(match[1])] = decode(match[2]);
|
|
39
|
-
return urlParams;
|
|
40
|
-
};
|
|
41
|
-
helper.isCyclic = function (o) {
|
|
42
|
-
var seenObjects = [];
|
|
43
|
-
function detect(obj) {
|
|
44
|
-
if (obj && typeof obj === 'object') {
|
|
45
|
-
if (seenObjects.indexOf(obj) !== -1) {
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
seenObjects.push(obj);
|
|
49
|
-
for (var key in obj) {
|
|
50
|
-
if (obj.hasOwnProperty(key) && detect(obj[key])) {
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
return detect(o);
|
|
58
|
-
};
|
|
59
|
-
helper.correctDates = function (data) {
|
|
60
|
-
for (var key in data) {
|
|
61
|
-
if (data[key] && typeof data[key] === "object")
|
|
62
|
-
data[key] = helper.correctDates(data[key]);
|
|
63
|
-
//else if (data[key] && data[key].toString().substring(0, 6) === "/Date\(")
|
|
64
|
-
// data[key] = new Date(parseInt(data[key].substr(6))+ timezone_offset);
|
|
65
|
-
else if (data[key] && dateISO.test(data[key].toString())) {
|
|
66
|
-
var x = Date.fromString(data[key]);
|
|
67
|
-
data[key] = new Date(x.getTime() + (x.getTimezoneOffset() * 60000));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return data;
|
|
71
|
-
};
|
|
72
|
-
helper.emptyGuid = "00000000-0000-0000-0000-000000000000";
|
|
73
|
-
return helper;
|
|
74
|
-
}());
|
|
75
|
-
export { helper };
|
|
76
|
-
var dateISO = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.*/i;
|
|
77
|
-
(function () {
|
|
78
|
-
var d = window.Date;
|
|
79
|
-
var regexIso8601 = /^(\d{4})-(\d{2})-(\d{2})((T)(\d{2}):(\d{2})(:(\d{2})(\.\d*)?)?)?(Z)?$/;
|
|
80
|
-
d._myparse = function (v) {
|
|
81
|
-
if (v.charAt(v.length - 1) !== "Z")
|
|
82
|
-
v += "Z";
|
|
83
|
-
var m = regexIso8601.exec(v);
|
|
84
|
-
if (m) {
|
|
85
|
-
return new Date(Date.UTC(+m[1], +m[2] - 1, +m[3], +m[6] || 0, +m[7] || 0, +m[9] || 0, parseInt((+m[10]) * 1000) || 0));
|
|
86
|
-
//return Date.UTC(
|
|
87
|
-
// m[1],
|
|
88
|
-
// (m[2] || 1) - 1,
|
|
89
|
-
// m[3] || 1,
|
|
90
|
-
// m[4] - (m[8] ? m[8] + m[9] : 0) || 0,
|
|
91
|
-
// m[5] - (m[8] ? m[8] + m[10] : 0) || 0,
|
|
92
|
-
// m[6] || 0,
|
|
93
|
-
// ((m[7] || 0) + '00').substr(0, 3)
|
|
94
|
-
//);
|
|
95
|
-
}
|
|
96
|
-
return d.parse.apply(this, arguments);
|
|
97
|
-
};
|
|
98
|
-
d.fromString = function (v) {
|
|
99
|
-
return d._myparse(v);
|
|
100
|
-
};
|
|
101
|
-
})();
|
package/lib/core/jq.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export interface IjQueryWrapper {
|
|
2
|
-
length: number;
|
|
3
|
-
empty: () => IjQueryWrapper;
|
|
4
|
-
appendTo: (selector: IjQueryWrapper | HTMLElement) => IjQueryWrapper;
|
|
5
|
-
append: (el: HTMLElement) => IjQueryWrapper;
|
|
6
|
-
add: (selector: IjQueryWrapper | HTMLElement) => IjQueryWrapper;
|
|
7
|
-
css: (key: string, value?: any) => IjQueryWrapper | any;
|
|
8
|
-
attr: (key: string, value?: any) => IjQueryWrapper | string;
|
|
9
|
-
closestClass: (name: string, stopAt?: string) => IjQueryWrapper;
|
|
10
|
-
data: (name: string, value?: any) => any;
|
|
11
|
-
remove(): void;
|
|
12
|
-
html: (value?: any) => string | IjQueryWrapper;
|
|
13
|
-
text: (value: string) => IjQueryWrapper;
|
|
14
|
-
addClass: (name: string) => IjQueryWrapper;
|
|
15
|
-
hasClass: (name: string) => boolean;
|
|
16
|
-
height: (val?: number | string) => number | IjQueryWrapper;
|
|
17
|
-
width: (val?: number | string) => number | IjQueryWrapper;
|
|
18
|
-
removeClass: (name: string) => IjQueryWrapper;
|
|
19
|
-
offset: () => {
|
|
20
|
-
top: number;
|
|
21
|
-
left: number;
|
|
22
|
-
};
|
|
23
|
-
children: () => IjQueryWrapper;
|
|
24
|
-
on: (eventname: string, fnc: Function) => IjQueryWrapper;
|
|
25
|
-
toggleClass: (name: string, state?: boolean) => IjQueryWrapper;
|
|
26
|
-
find: (selector: string) => IjQueryWrapper;
|
|
27
|
-
slideDown: (speed: string, done: Function) => IjQueryWrapper;
|
|
28
|
-
slideUp: (speed: string, done: Function) => IjQueryWrapper;
|
|
29
|
-
index: () => number;
|
|
30
|
-
}
|
|
31
|
-
export interface IjQueryReplacement {
|
|
32
|
-
(selector?: string | HTMLElement | Document): IjQueryWrapper;
|
|
33
|
-
deepExtend: (out: any, ...a: any[]) => any;
|
|
34
|
-
shallowExtend: (out: any, ...a: any[]) => any;
|
|
35
|
-
each: (array: any[] | IjQueryWrapper, fnc: (idx: number, val: any) => void) => void;
|
|
36
|
-
}
|
|
37
|
-
export declare let jQueryReplacement: ((selector?: string | HTMLElement) => IjQueryWrapper) & IjQueryReplacement;
|