jsl-ui 9.28.2 → 9.28.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.
Files changed (67) hide show
  1. package/lib/components/IntervalComponent.js +32 -35
  2. package/lib/components/auto-suggest/AutoSuggestComponent.js +19 -21
  3. package/lib/components/button/ButtonComponent.js +13 -30
  4. package/lib/components/checkbox/CheckBoxComponent.js +22 -39
  5. package/lib/components/date/DateComponent.js +29 -46
  6. package/lib/components/date-range/DateRangeComponent.js +48 -63
  7. package/lib/components/date-time/DateTimeComponent.js +17 -31
  8. package/lib/components/dialog/DialogComponent.js +75 -134
  9. package/lib/components/drop-down/DropDownComponent.js +23 -37
  10. package/lib/components/expander/ExpanderComponent.js +20 -23
  11. package/lib/components/form-field/FormComponent.js +9 -12
  12. package/lib/components/form-field/FormFieldComponent.js +28 -30
  13. package/lib/components/grid/GridComponent.js +46 -52
  14. package/lib/components/input/InputComponent.js +26 -47
  15. package/lib/components/loading/LoadingComponent.js +7 -9
  16. package/lib/components/navigation/NavigationComponent.js +20 -43
  17. package/lib/components/notification/Notification.js +18 -22
  18. package/lib/components/number/NumberComponent.js +28 -46
  19. package/lib/components/overlay/OverlayComponent.js +45 -60
  20. package/lib/components/progress/ProgressComponent.js +15 -17
  21. package/lib/components/ribbon-menu/RibbonMenuComponent.js +9 -20
  22. package/lib/components/select/SelectComponent.js +105 -122
  23. package/lib/components/select/SelectDDAreaComponent.js +108 -122
  24. package/lib/components/slider/nouislider.js +1 -1
  25. package/lib/components/stack-panel/SplitterComponent.js +27 -29
  26. package/lib/components/stack-panel/StackPanelComponent.js +17 -31
  27. package/lib/components/tabs/TabsComponent.js +53 -66
  28. package/lib/components/time/TimeComponent.js +32 -43
  29. package/lib/components/tree-view/TreeViewComponent.js +13 -16
  30. package/lib/components/virtual-render/VirtualRenderComponent.js +30 -44
  31. package/lib/core/culture.js +2 -2
  32. package/lib/core/date.js +68 -72
  33. package/lib/core/helper.js +30 -34
  34. package/lib/core/jq.js +54 -63
  35. package/lib/core/lang.js +24 -28
  36. package/lib/core/numeric.js +35 -39
  37. package/lib/grid/filterDialogs/dateRangeFilter.js +98 -148
  38. package/lib/grid/filterDialogs/excelFilter.js +205 -271
  39. package/lib/grid/plugins/ext.overlay.js +9 -9
  40. package/lib/grid/plugins/slick.cellrangedecorator.js +2 -2
  41. package/lib/grid/plugins/slick.cellrangeselector.js +1 -1
  42. package/lib/grid/plugins/slick.cellselectionmodel.js +8 -8
  43. package/lib/grid/plugins/slick.headerbuttons.js +1 -1
  44. package/lib/grid/plugins/slick.headermenu.js +1 -1
  45. package/lib/grid/plugins/slick.rowmovemanager.js +2 -2
  46. package/lib/grid/plugins/slick.rowselectionmodel.js +1 -1
  47. package/lib/grid/slick.core.js +1 -1
  48. package/lib/grid/slick.creator.js +144 -144
  49. package/lib/grid/slick.dataview.js +127 -138
  50. package/lib/grid/slick.editors.core.js +1 -1
  51. package/lib/grid/slick.editors.date.js +2 -2
  52. package/lib/grid/slick.editors.lookup.js +36 -37
  53. package/lib/grid/slick.editors.nav.js +1 -1
  54. package/lib/grid/slick.formatters.js +26 -26
  55. package/lib/grid/slick.grid.js +163 -166
  56. package/lib/grid/slick.groupitemmetadataprovider.js +4 -4
  57. package/lib/grid/slick.tree.js +91 -103
  58. package/lib/index.js.map +1 -1
  59. package/lib/interaction/eventhandler.js +20 -23
  60. package/lib/interaction/moveable.js +76 -90
  61. package/lib/interaction/resizable.js +58 -72
  62. package/lib/ui/auto.suggest.js +13 -28
  63. package/lib/ui/date.picker/lib/fns.js +1 -5
  64. package/lib/ui/dialog.js +28 -43
  65. package/lib/ui/drop.down.js +4 -4
  66. package/lib/ui/number.input.js +8 -19
  67. package/package.json +1 -1
package/lib/ui/dialog.js CHANGED
@@ -1,69 +1,56 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import "./dialog.css";
13
- var defaultOptions = {
2
+ const defaultOptions = {
14
3
  autoOpen: false,
15
4
  autoFocus: "input,button,textarea",
16
5
  closeOnOverlayClick: true,
17
6
  modal: true,
18
7
  closeOnEscape: true
19
8
  };
20
- var JSLDialog = /** @class */ (function () {
21
- function JSLDialog(el, options) {
22
- var _this = this;
9
+ export class JSLDialog {
10
+ constructor(el, options) {
23
11
  this.options = options;
24
12
  this.overlay = el;
25
13
  this.el = el.firstElementChild;
26
14
  if (this.options.closeOnOverlayClick) {
27
- this.overlay.addEventListener("mousedown", function (evt) {
28
- if (evt.target === _this.overlay) {
29
- _this.close();
15
+ this.overlay.addEventListener("mousedown", (evt) => {
16
+ if (evt.target === this.overlay) {
17
+ this.close();
30
18
  }
31
19
  });
32
- this.overlay.addEventListener("touchstart", function (evt) {
33
- if (evt.target === _this.overlay) {
34
- _this.close();
20
+ this.overlay.addEventListener("touchstart", (evt) => {
21
+ if (evt.target === this.overlay) {
22
+ this.close();
35
23
  }
36
24
  });
37
25
  }
38
26
  }
39
- JSLDialog.prototype.open = function (modal) {
40
- var _this = this;
27
+ open(modal) {
41
28
  if ((modal !== undefined && !modal) || !this.options.modal) {
42
29
  this.overlay.style.background = "transparent";
43
30
  this.overlay.style.pointerEvents = "none";
44
31
  }
45
32
  this.overlay.style.display = "block";
46
- var $footer = this.el.querySelector(".dlg-footer");
47
- var $body = this.el.querySelector(".dlg-body");
33
+ const $footer = this.el.querySelector(".dlg-footer");
34
+ const $body = this.el.querySelector(".dlg-body");
48
35
  if ($footer != null && $body != null) {
49
36
  // TODO ?
50
37
  }
51
38
  if (this.options.autoFocus) {
52
- setTimeout(function () {
53
- var firstInput = _this.el.querySelector(_this.options.autoFocus);
39
+ setTimeout(() => {
40
+ const firstInput = this.el.querySelector(this.options.autoFocus);
54
41
  if (firstInput != null) {
55
42
  firstInput.focus();
56
43
  }
57
44
  }, 0);
58
45
  }
59
46
  if (this.options.closeOnEscape || this.options.OkOnEnter) {
60
- this.onKeydownEvent = function (args) {
47
+ this.onKeydownEvent = (args) => {
61
48
  var _a;
62
- if (args.keyCode === 27 && _this.options.closeOnEscape) { // escape
63
- _this.close();
49
+ if (args.keyCode === 27 && this.options.closeOnEscape) { // escape
50
+ this.close();
64
51
  }
65
- else if (args.keyCode === 13 && _this.options.OkOnEnter) { // ok
66
- var ok_btn = _this.el.querySelector(".dlg-ok-btn");
52
+ else if (args.keyCode === 13 && this.options.OkOnEnter) { // ok
53
+ const ok_btn = this.el.querySelector(".dlg-ok-btn");
67
54
  if (ok_btn != null) {
68
55
  (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.blur();
69
56
  ok_btn.click();
@@ -75,8 +62,8 @@ var JSLDialog = /** @class */ (function () {
75
62
  if (this.options.onOpen) {
76
63
  this.options.onOpen();
77
64
  }
78
- };
79
- JSLDialog.prototype.close = function () {
65
+ }
66
+ close() {
80
67
  if (this.options.onClose) {
81
68
  if (this.options.onClose() === false) {
82
69
  return;
@@ -86,23 +73,21 @@ var JSLDialog = /** @class */ (function () {
86
73
  if (this.onKeydownEvent != null) {
87
74
  document.removeEventListener("keydown", this.onKeydownEvent);
88
75
  }
89
- };
90
- JSLDialog.prototype.getOverlay = function () {
76
+ }
77
+ getOverlay() {
91
78
  return this.overlay;
92
- };
93
- return JSLDialog;
94
- }());
95
- export { JSLDialog };
79
+ }
80
+ }
96
81
  export function Dialog(input, options) {
97
- var o = __assign(__assign({}, defaultOptions), options);
98
- var el;
82
+ const o = { ...defaultOptions, ...options };
83
+ let el;
99
84
  if (typeof input === "string") {
100
85
  el = document.querySelector(input);
101
86
  }
102
87
  else {
103
88
  el = input;
104
89
  }
105
- var result = new JSLDialog(el, o);
90
+ const result = new JSLDialog(el, o);
106
91
  if (!o.autoOpen) {
107
92
  el.style.display = "none";
108
93
  }
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import "./drop.down.css";
8
8
  import { UILang } from "../core/lang";
9
- var Selectr;
9
+ let Selectr;
10
10
  (function () {
11
11
  /**
12
12
  * Event Emitter
@@ -341,7 +341,7 @@ var Selectr;
341
341
  };
342
342
  var removeActive = function (container) {
343
343
  var items = container.querySelectorAll("li.active");
344
- for (var i = 0; i < items.length; i++) {
344
+ for (let i = 0; i < items.length; i++) {
345
345
  items[i].classList.remove("active");
346
346
  }
347
347
  };
@@ -1237,7 +1237,7 @@ var Selectr;
1237
1237
  removeActive(that.tree);
1238
1238
  util.addClass(e.target, "active");
1239
1239
  that.navIndex = -1;
1240
- for (var idx = 0; idx < that.items.length; idx++) {
1240
+ for (let idx = 0; idx < that.items.length; idx++) {
1241
1241
  if (that.items[idx].dom === e.target) {
1242
1242
  that.navIndex = idx;
1243
1243
  }
@@ -2107,6 +2107,6 @@ var Selectr;
2107
2107
  return option;
2108
2108
  };
2109
2109
  })();
2110
- export var DropDown = function (input, config) {
2110
+ export let DropDown = function (input, config) {
2111
2111
  return new Selectr(input, config);
2112
2112
  };
@@ -1,21 +1,10 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
1
  import "./number.input.css";
13
2
  import { numeric } from "../core/numeric";
14
3
  import { EventHandler } from "../interaction/eventhandler";
15
- var defaultOptions = { format: "0.###", formatOnBlur: true, commitOnEnter: true, placeholder: false, enabled: true };
4
+ const defaultOptions = { format: "0.###", formatOnBlur: true, commitOnEnter: true, placeholder: false, enabled: true };
16
5
  export function NumberInput(input, options) {
17
- var el;
18
- var o = __assign(__assign({}, defaultOptions), options);
6
+ let el;
7
+ const o = { ...defaultOptions, ...options };
19
8
  o.onChange = EventHandler.Create(o.onChange);
20
9
  if (typeof input === "string") {
21
10
  el = document.querySelector(input);
@@ -43,20 +32,20 @@ export function NumberInput(input, options) {
43
32
  }
44
33
  else {
45
34
  if (o.formatOnBlur) {
46
- el.addEventListener("blur", function (evt) {
47
- var val = numeric.parse(el.value);
35
+ el.addEventListener("blur", (evt) => {
36
+ const val = numeric.parse(el.value);
48
37
  el.value = numeric.format(val, o.format);
49
38
  });
50
39
  }
51
40
  if (o.onChange != null) {
52
- el.addEventListener("change", function (evt) {
41
+ el.addEventListener("change", (evt) => {
53
42
  o.onChange.notify(numeric.parse(el.value));
54
43
  });
55
44
  }
56
- el.addEventListener("keydown", function (evt) {
45
+ el.addEventListener("keydown", (evt) => {
57
46
  if (evt.which === 13) {
58
47
  if (o.formatOnBlur) {
59
- var val = numeric.parse(el.value);
48
+ const val = numeric.parse(el.value);
60
49
  el.value = numeric.format(val, o.format);
61
50
  }
62
51
  o.onChange.notify(numeric.parse(el.value));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsl-ui",
3
- "version": "9.28.2",
3
+ "version": "9.28.4",
4
4
  "description": "javascript UI library",
5
5
  "main": "lib/index.js",
6
6
  "files": [