jsl-ui 9.5.0 → 9.6.0

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 (32) hide show
  1. package/lib/components/auto-suggest/AutoSuggestComponent.js +1 -1
  2. package/lib/components/button/ButtonComponent.js +1 -1
  3. package/lib/components/checkbox/CheckBoxComponent.js +1 -1
  4. package/lib/components/date/DateComponent.js +1 -1
  5. package/lib/components/date-range/DateRangeComponent.js +1 -1
  6. package/lib/components/dialog/DialogComponent.js +2 -2
  7. package/lib/components/expander/ExpanderComponent.js +8 -8
  8. package/lib/components/form-field/FormFieldComponent.js +2 -2
  9. package/lib/components/grid/GridComponent.js +1 -1
  10. package/lib/components/input/InputComponent.js +3 -3
  11. package/lib/components/navigation/NavigationComponent.js +13 -11
  12. package/lib/components/notification/Notification.js +1 -1
  13. package/lib/components/number/NumberComponent.js +1 -1
  14. package/lib/components/progress/ProgressComponent.js +2 -2
  15. package/lib/components/ribbon-menu/RibbonMenuComponent.js +9 -7
  16. package/lib/components/select/SelectComponent.js +3 -3
  17. package/lib/components/select/SelectDDAreaComponent.js +23 -19
  18. package/lib/components/stack-panel/SplitterComponent.js +1 -1
  19. package/lib/components/tabs/TabsComponent.js +24 -22
  20. package/lib/components/time/TimeComponent.js +4 -4
  21. package/lib/components/tree-view/TreeViewComponent.js +1 -1
  22. package/lib/components/virtual-render/VirtualRenderComponent.js +2 -2
  23. package/lib/core/culture.js +2 -2
  24. package/lib/grid/filterDialogs/excelFilter.js +4 -4
  25. package/lib/grid/slick.formatters.js +1 -1
  26. package/lib/grid/slick.grid.js +1 -1
  27. package/lib/grid/slick.groupitemmetadataprovider.d.ts +4 -4
  28. package/lib/index.js.map +1 -1
  29. package/lib/interaction/dataconverter.js +1 -0
  30. package/lib/ui/dialog.d.ts +1 -0
  31. package/lib/ui/dialog.js +8 -2
  32. package/package.json +2 -2
@@ -8,7 +8,7 @@ var AutoSuggestComponent = /** @class */ (function () {
8
8
  var _a;
9
9
  return {
10
10
  tag: "input",
11
- attr: { value: this.options.value, class: this.options.class, style: this.options.style, placeholder: (_a = this.options.placeholder, (_a !== null && _a !== void 0 ? _a : "")) }
11
+ attr: { value: this.options.value, class: this.options.class, style: this.options.style, placeholder: (_a = this.options.placeholder) !== null && _a !== void 0 ? _a : "" }
12
12
  };
13
13
  };
14
14
  AutoSuggestComponent.prototype.getRef = function () {
@@ -19,7 +19,7 @@ var ButtonComponent = /** @class */ (function () {
19
19
  get: function () {
20
20
  return this.options.click;
21
21
  },
22
- enumerable: true,
22
+ enumerable: false,
23
23
  configurable: true
24
24
  });
25
25
  ButtonComponent.prototype.isEqual = function (node) {
@@ -30,7 +30,7 @@ var CheckBoxComponent = /** @class */ (function () {
30
30
  get: function () {
31
31
  return this.options.onChange;
32
32
  },
33
- enumerable: true,
33
+ enumerable: false,
34
34
  configurable: true
35
35
  });
36
36
  // public isEqual(node: IJSLComponent): boolean {
@@ -28,7 +28,7 @@ var DateComponent = /** @class */ (function () {
28
28
  get: function () {
29
29
  return this.options.onChange;
30
30
  },
31
- enumerable: true,
31
+ enumerable: false,
32
32
  configurable: true
33
33
  });
34
34
  DateComponent.prototype.render = function () {
@@ -65,7 +65,7 @@ var DateRangeComponent = /** @class */ (function () {
65
65
  DateRangeComponent.prototype.render = function () {
66
66
  var _a;
67
67
  return {
68
- tag: "div", attr: { style: this.options.style, class: "date-range-comp " + (_a = this.options.class, (_a !== null && _a !== void 0 ? _a : "")) }, children: [
68
+ tag: "div", attr: { style: this.options.style, class: "date-range-comp " + ((_a = this.options.class) !== null && _a !== void 0 ? _a : "") }, children: [
69
69
  {
70
70
  tag: "div", children: [
71
71
  this.minDate,
@@ -34,7 +34,7 @@ var DialogComponent = /** @class */ (function () {
34
34
  var _a, _b, _c;
35
35
  var res = {
36
36
  tag: "button", attr: {
37
- class: "jsl-button " + (_a = options.class, (_a !== null && _a !== void 0 ? _a : "")),
37
+ class: "jsl-button " + ((_a = options.class) !== null && _a !== void 0 ? _a : ""),
38
38
  click: function () {
39
39
  if (options.onClick != null && options.onClick() === false) {
40
40
  return;
@@ -43,7 +43,7 @@ var DialogComponent = /** @class */ (function () {
43
43
  DialogComponent.lastRenderedDlg.getRef().close();
44
44
  }
45
45
  }
46
- }, content: (_b = options.content, (_b !== null && _b !== void 0 ? _b : "OK")), raw: (_c = options.raw, (_c !== null && _c !== void 0 ? _c : false))
46
+ }, content: (_b = options.content) !== null && _b !== void 0 ? _b : "OK", raw: (_c = options.raw) !== null && _c !== void 0 ? _c : false
47
47
  };
48
48
  return res;
49
49
  };
@@ -5,11 +5,11 @@ var ExpanderComponent = /** @class */ (function () {
5
5
  this.State = { expanded: false, waitingForAnimation: false };
6
6
  if (body != null) {
7
7
  // old syntax
8
- this.options = { header: optionsOrHeader, body: body, expanded: (expanded !== null && expanded !== void 0 ? expanded : true) };
8
+ this.options = { header: optionsOrHeader, body: body, expanded: expanded !== null && expanded !== void 0 ? expanded : true };
9
9
  }
10
10
  else {
11
11
  this.options = optionsOrHeader;
12
- this.options.expanded = (_a = this.options.expanded, (_a !== null && _a !== void 0 ? _a : true));
12
+ this.options.expanded = (_a = this.options.expanded) !== null && _a !== void 0 ? _a : true;
13
13
  }
14
14
  this.State.expanded = this.options.expanded;
15
15
  }
@@ -21,8 +21,8 @@ var ExpanderComponent = /** @class */ (function () {
21
21
  },
22
22
  raw: true,
23
23
  content: "<svg style='" +
24
- "min-width:" + (_a = this.options.iconSize, (_a !== null && _a !== void 0 ? _a : "1.5rem")) + "; min-height:" + (_b = this.options.iconSize, (_b !== null && _b !== void 0 ? _b : "1.5rem")) +
25
- ";max-width:" + (_c = this.options.iconSize, (_c !== null && _c !== void 0 ? _c : "1.5rem")) + "; max-height:" + (_d = this.options.iconSize, (_d !== null && _d !== void 0 ? _d : "1.5rem")) + ";' " +
24
+ "min-width:" + ((_a = this.options.iconSize) !== null && _a !== void 0 ? _a : "1.5rem") + "; min-height:" + ((_b = this.options.iconSize) !== null && _b !== void 0 ? _b : "1.5rem") +
25
+ ";max-width:" + ((_c = this.options.iconSize) !== null && _c !== void 0 ? _c : "1.5rem") + "; max-height:" + ((_d = this.options.iconSize) !== null && _d !== void 0 ? _d : "1.5rem") + ";' " +
26
26
  "xml:space='preserve' width='1024px' height='1024px' shape-rendering='geometricPrecision' text-rendering='geometricPrecision' image-rendering='optimizeQuality' fill-rule='nonzero' clip-rule='evenodd' viewBox='0 0 10240 10240'>" +
27
27
  (expanded
28
28
  ? "<path id='curve0' fill='#FFFFFF' d='M1273 3989l3621 3620c124,125 328,125 452,0l3621 -3620c124,-125 124,-328 0,-453l-905 -905c-125,-125 -328,-125 -453,0l-2489 2489 -2489 -2489c-125,-125 -328,-125 -453,0l-905 905c-124,125 -124,328 0,453z'/>"
@@ -39,11 +39,11 @@ var ExpanderComponent = /** @class */ (function () {
39
39
  var animate = this.State.waitingForAnimation;
40
40
  this.State.waitingForAnimation = false;
41
41
  return {
42
- tag: "div", attr: { class: "expander-comp " + (this.options.class || ""), style: (_a = this.options.style, (_a !== null && _a !== void 0 ? _a : "")) }, children: [
42
+ tag: "div", attr: { class: "expander-comp " + (this.options.class || ""), style: (_a = this.options.style) !== null && _a !== void 0 ? _a : "" }, children: [
43
43
  {
44
44
  tag: "div", attr: {
45
45
  class: "header",
46
- click: function (evt) { var _a; if (_a = _this.options.isToggleOnHeader, (_a !== null && _a !== void 0 ? _a : true)) {
46
+ click: function (evt) { var _a; if ((_a = _this.options.isToggleOnHeader) !== null && _a !== void 0 ? _a : true) {
47
47
  evt.stopPropagation();
48
48
  _this.toggleExpand();
49
49
  } },
@@ -52,8 +52,8 @@ var ExpanderComponent = /** @class */ (function () {
52
52
  {
53
53
  tag: "span", attr: { class: "toggler", click: function (evt) { evt.stopPropagation(); _this.toggleExpand(); } },
54
54
  children: [this.State.expanded
55
- ? (_b = this.options.expandedIcon, (_b !== null && _b !== void 0 ? _b : this.getIcon(true)))
56
- : (_c = this.options.collapsedIcon, (_c !== null && _c !== void 0 ? _c : this.getIcon(false)))
55
+ ? ((_b = this.options.expandedIcon) !== null && _b !== void 0 ? _b : this.getIcon(true))
56
+ : ((_c = this.options.collapsedIcon) !== null && _c !== void 0 ? _c : this.getIcon(false))
57
57
  ]
58
58
  },
59
59
  { tag: "span", attr: { class: "content" }, children: [this.toNode(this.options.header)] }
@@ -13,7 +13,7 @@ var FormFieldComponent = /** @class */ (function () {
13
13
  var _a, _b;
14
14
  return {
15
15
  tag: "div",
16
- attr: { class: "form-field " + (this.options.value ? "form-field--is-filled " : "") + (_a = this.options.class, (_a !== null && _a !== void 0 ? _a : "")) },
16
+ attr: { class: "form-field " + (this.options.value ? "form-field--is-filled " : "") + ((_a = this.options.class) !== null && _a !== void 0 ? _a : "") },
17
17
  children: [{
18
18
  tag: "div",
19
19
  attr: { class: "form-field__control" + (this.validationMessage ? " failed__valid" : "") },
@@ -23,7 +23,7 @@ var FormFieldComponent = /** @class */ (function () {
23
23
  attr: { for: this.id, class: "form-field__label" },
24
24
  content: this.options.label +
25
25
  (this.options.required ? " *" : "") +
26
- (this.validationMessage ? (" " + (_b = this.validationMessage, (_b !== null && _b !== void 0 ? _b : ""))) : "")
26
+ (this.validationMessage ? (" " + ((_b = this.validationMessage) !== null && _b !== void 0 ? _b : "")) : "")
27
27
  },
28
28
  {
29
29
  tag: "input",
@@ -18,7 +18,7 @@ var GridComponent = /** @class */ (function () {
18
18
  };
19
19
  var style = "";
20
20
  if (!options.autoHeight) {
21
- style = "height:" + ((height !== null && height !== void 0 ? height : "400px"));
21
+ style = "height:" + (height !== null && height !== void 0 ? height : "400px");
22
22
  }
23
23
  this.rootTag = {
24
24
  tag: "div",
@@ -30,14 +30,14 @@ var InputComponent = /** @class */ (function () {
30
30
  get: function () {
31
31
  return this.options.onChange;
32
32
  },
33
- enumerable: true,
33
+ enumerable: false,
34
34
  configurable: true
35
35
  });
36
36
  Object.defineProperty(InputComponent.prototype, "onInput", {
37
37
  get: function () {
38
38
  return this.options.onInput;
39
39
  },
40
- enumerable: true,
40
+ enumerable: false,
41
41
  configurable: true
42
42
  });
43
43
  // public isEqual(node: IJSLComponent): boolean {
@@ -57,7 +57,7 @@ var InputComponent = /** @class */ (function () {
57
57
  if (newVal !== current) {
58
58
  val = newVal;
59
59
  if (this.currentDom != null) {
60
- this.currentDom.value = (val !== null && val !== void 0 ? val : "");
60
+ this.currentDom.value = val !== null && val !== void 0 ? val : "";
61
61
  }
62
62
  }
63
63
  }
@@ -9,12 +9,14 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- var __spreadArrays = (this && this.__spreadArrays) || function () {
13
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
14
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
15
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
16
- r[k] = a[j];
17
- return r;
12
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
+ if (ar || !(i in from)) {
15
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
+ ar[i] = from[i];
17
+ }
18
+ }
19
+ return to.concat(ar || Array.prototype.slice.call(from));
18
20
  };
19
21
  import "./NavigationStyle.scss";
20
22
  var NavigationComponent = /** @class */ (function () {
@@ -29,19 +31,19 @@ var NavigationComponent = /** @class */ (function () {
29
31
  var _a, _b;
30
32
  return {
31
33
  tag: "header",
32
- attr: { style: this.options.style, class: "nav-comp " + (_a = this.options.class, (_a !== null && _a !== void 0 ? _a : "")) },
34
+ attr: { style: this.options.style, class: "nav-comp " + ((_a = this.options.class) !== null && _a !== void 0 ? _a : "") },
33
35
  children: [
34
36
  { tag: "div", attr: { class: "luxbar luxbar-" + this.options.position },
35
37
  children: [
36
38
  { tag: "input", attr: { type: "checkbox", class: "luxbar-checkbox", id: this.options.id } },
37
39
  { tag: "div", attr: { class: "luxbar-menu luxbar-menu-" + this.options.alignment + " luxbar-menu-light" },
38
- children: [{ tag: "ul", attr: { class: "luxbar-navigation" }, children: __spreadArrays([
40
+ children: [{ tag: "ul", attr: { class: "luxbar-navigation" }, children: __spreadArray([
39
41
  { tag: "li", attr: { class: "luxbar-header" }, children: [
40
- { tag: "a", attr: { href: (_b = this.options.titleLink, (_b !== null && _b !== void 0 ? _b : "#")), class: "luxbar-brand" }, children: [this.toNode(this.options.title)] },
42
+ { tag: "a", attr: { href: (_b = this.options.titleLink) !== null && _b !== void 0 ? _b : "#", class: "luxbar-brand" }, children: [this.toNode(this.options.title)] },
41
43
  { tag: "label", attr: { class: "luxbar-hamburger luxbar-hamburger-spin", for: this.options.id },
42
44
  children: [{ tag: "span" }] },
43
45
  ] }
44
- ], this.options.data.map(function (x) { return _this.itemToNode(x); })) }] }
46
+ ], this.options.data.map(function (x) { return _this.itemToNode(x); }), true) }] }
45
47
  ] }
46
48
  ]
47
49
  };
@@ -50,7 +52,7 @@ var NavigationComponent = /** @class */ (function () {
50
52
  var _this = this;
51
53
  var _a, _b, _c;
52
54
  return { tag: "li", attr: { class: "luxbar-item" + (((_a = x.children) === null || _a === void 0 ? void 0 : _a.length) > 0 ? " dropdown" : "") + (this.isActive(x.link) ? " active" : "") }, children: [
53
- { tag: "a", attr: { href: (_b = x.link, (_b !== null && _b !== void 0 ? _b : "#")), target: x.target, click: x.click }, children: [this.toNode(x.content)] },
55
+ { tag: "a", attr: { href: (_b = x.link) !== null && _b !== void 0 ? _b : "#", target: x.target, click: x.click }, children: [this.toNode(x.content)] },
54
56
  (((_c = x.children) === null || _c === void 0 ? void 0 : _c.length) > 0 ? { tag: "ul", children: x.children.map(function (c) { return _this.itemToNode(c); }) } : undefined)
55
57
  ] };
56
58
  };
@@ -30,7 +30,7 @@ var Notification = /** @class */ (function () {
30
30
  Notification.renderer.refresh();
31
31
  }, options.timeOut);
32
32
  }
33
- if ((_a = options.closeOnClick, (_a !== null && _a !== void 0 ? _a : true)) === true) {
33
+ if (((_a = options.closeOnClick) !== null && _a !== void 0 ? _a : true) === true) {
34
34
  notification.attr.click = function () {
35
35
  var idx = Notification.containerVNode.children.indexOf(notification);
36
36
  if (idx >= 0) {
@@ -29,7 +29,7 @@ var NumberComponent = /** @class */ (function () {
29
29
  get: function () {
30
30
  return this.options.onChange;
31
31
  },
32
- enumerable: true,
32
+ enumerable: false,
33
33
  configurable: true
34
34
  });
35
35
  NumberComponent.prototype.render = function () {
@@ -19,11 +19,11 @@ var ProgressComponent = /** @class */ (function () {
19
19
  }
20
20
  var content = "";
21
21
  if ((_c = this.options) === null || _c === void 0 ? void 0 : _c.showPercent) {
22
- content = numeric.format(this.progress, (_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.percentFormat, (_e !== null && _e !== void 0 ? _e : "0. %")));
22
+ content = numeric.format(this.progress, (_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.percentFormat) !== null && _e !== void 0 ? _e : "0. %");
23
23
  }
24
24
  return {
25
25
  tag: "div",
26
- attr: { class: "progress-comp " + (_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.class, (_g !== null && _g !== void 0 ? _g : "")) },
26
+ attr: { class: "progress-comp " + ((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.class) !== null && _g !== void 0 ? _g : "") },
27
27
  children: [{
28
28
  tag: "div",
29
29
  attr: { class: "bar", style: style },
@@ -1,9 +1,11 @@
1
- var __spreadArrays = (this && this.__spreadArrays) || function () {
2
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
3
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
4
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
5
- r[k] = a[j];
6
- return r;
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
6
+ }
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
7
9
  };
8
10
  import "./RibbonMenuStyle.scss";
9
11
  var RibbonMenuComponent = /** @class */ (function () {
@@ -22,7 +24,7 @@ var RibbonMenuComponent = /** @class */ (function () {
22
24
  var _a;
23
25
  return {
24
26
  tag: "div", attr: { class: "ribbon-group" },
25
- children: __spreadArrays([{ tag: "div", attr: { class: "ribbon-legend" }, content: (_a = g.title, (_a !== null && _a !== void 0 ? _a : "")) }], g.children)
27
+ children: __spreadArray([{ tag: "div", attr: { class: "ribbon-legend" }, content: (_a = g.title) !== null && _a !== void 0 ? _a : "" }], g.children, true)
26
28
  };
27
29
  })
28
30
  };
@@ -51,7 +51,7 @@ var SelectComponent = /** @class */ (function () {
51
51
  } : function (args) {
52
52
  args.node.content = args.data[_this.options.textColumn];
53
53
  },
54
- matchSearch: function (data, term) { var _a; return ((_a = data[_this.options.textColumn], (_a !== null && _a !== void 0 ? _a : "")).toString().toLowerCase().indexOf(term.toLowerCase()) >= 0); }
54
+ matchSearch: function (data, term) { var _a; return (((_a = data[_this.options.textColumn]) !== null && _a !== void 0 ? _a : "").toString().toLowerCase().indexOf(term.toLowerCase()) >= 0); }
55
55
  };
56
56
  this.options = __assign(__assign({}, defaultOptions), o);
57
57
  this.options.onChange = EventHandler.Create(o.onChange);
@@ -84,7 +84,7 @@ var SelectComponent = /** @class */ (function () {
84
84
  return {
85
85
  tag: "div", attr: {
86
86
  style: this.options.style,
87
- class: "select-comp " + (this.expanded ? "expanded " : "") + (!this.options.enabled ? "disabled " : "") + (_b = this.options.class, (_b !== null && _b !== void 0 ? _b : "")),
87
+ class: "select-comp " + (this.expanded ? "expanded " : "") + (!this.options.enabled ? "disabled " : "") + ((_b = this.options.class) !== null && _b !== void 0 ? _b : ""),
88
88
  mousedown: function (e) { if (_this.expanded || e.which === 3) {
89
89
  return;
90
90
  } {
@@ -150,7 +150,7 @@ var SelectComponent = /** @class */ (function () {
150
150
  var left = Math.round(dimension.left + window.pageXOffset);
151
151
  var top = Math.round(dimension.top + window.pageYOffset);
152
152
  this.dropdownArea = document.createElement("div");
153
- this.dropdownArea.className = "sel-comp-dd " + (_a = this.options.dropdownClass, (_a !== null && _a !== void 0 ? _a : ""));
153
+ this.dropdownArea.className = "sel-comp-dd " + ((_a = this.options.dropdownClass) !== null && _a !== void 0 ? _a : "");
154
154
  this.dropdownArea.style.width = this.options.dropdownWidth || (Math.round(dimension.width) + "px");
155
155
  this.dropdownArea.style.height = this.options.dropdownHeight;
156
156
  this.dropdownArea.style.left = left + "px";
@@ -1,9 +1,11 @@
1
- var __spreadArrays = (this && this.__spreadArrays) || function () {
2
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
3
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
4
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
5
- r[k] = a[j];
6
- return r;
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
6
+ }
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
7
9
  };
8
10
  import { VirtualRenderComponent } from "../virtual-render/VirtualRenderComponent";
9
11
  import { EventHandler } from "../../interaction/eventhandler";
@@ -33,7 +35,7 @@ var SelectDDAreaComponent = /** @class */ (function () {
33
35
  item = item[0];
34
36
  }
35
37
  if (item != null) {
36
- var d = (_b = (_a = this.renderedData, (_a !== null && _a !== void 0 ? _a : this.filteredData)), (_b !== null && _b !== void 0 ? _b : this.options.data));
38
+ var d = (_b = (_a = this.renderedData) !== null && _a !== void 0 ? _a : this.filteredData) !== null && _b !== void 0 ? _b : this.options.data;
37
39
  var idx = d.indexOf(item);
38
40
  this.scrollContainer.scrollTop = this.options.rowHeight * idx;
39
41
  }
@@ -61,9 +63,9 @@ var SelectDDAreaComponent = /** @class */ (function () {
61
63
  SelectDDAreaComponent.prototype.render = function () {
62
64
  var _this = this;
63
65
  var _a;
64
- var data = (_a = this.filteredData, (_a !== null && _a !== void 0 ? _a : this.options.data));
66
+ var data = (_a = this.filteredData) !== null && _a !== void 0 ? _a : this.options.data;
65
67
  if (this.options.groupProperty != null) {
66
- var sortedData = __spreadArrays(data);
68
+ var sortedData = __spreadArray([], data, true);
67
69
  sortedData.sort(function (a, b) {
68
70
  return a[_this.options.groupProperty] < b[_this.options.groupProperty] ? -1
69
71
  : a[_this.options.groupProperty] > b[_this.options.groupProperty] ? 1 : (data.indexOf(a) - data.indexOf(b) // preserve order if it is for same group
@@ -132,7 +134,7 @@ var SelectDDAreaComponent = /** @class */ (function () {
132
134
  var focus_1 = _this.component.getFocus();
133
135
  if (focus_1 == null) {
134
136
  // if only 1 result is left then auto select this entry
135
- var d = (_a = _this.filteredData, (_a !== null && _a !== void 0 ? _a : _this.options.data));
137
+ var d = (_a = _this.filteredData) !== null && _a !== void 0 ? _a : _this.options.data;
136
138
  if (d.length === 1) {
137
139
  focus_1 = d[0];
138
140
  }
@@ -166,7 +168,8 @@ var SelectDDAreaComponent = /** @class */ (function () {
166
168
  ]
167
169
  },
168
170
  new VirtualRenderComponent({
169
- class: "sel-dd-items" + (this.options.multiple ? " multiple" : ""), data: data,
171
+ class: "sel-dd-items" + (this.options.multiple ? " multiple" : ""),
172
+ data: data,
170
173
  style: this.options.enableSearch ? "height:calc(100% - 1.8rem)" : "height:100%",
171
174
  viewportSizeInPX: this.args.renderHeight + 20,
172
175
  bufferSizeInPx: 20,
@@ -176,7 +179,8 @@ var SelectDDAreaComponent = /** @class */ (function () {
176
179
  result.attr.class += " sel-dd-group";
177
180
  var groupValue = args.rowData.__groupValue;
178
181
  var groupArgs = {
179
- groupValue: groupValue, node: result
182
+ groupValue: groupValue,
183
+ node: result
180
184
  };
181
185
  var resGroup = _this.options.onRenderGroup(groupArgs);
182
186
  if (resGroup != null) {
@@ -236,8 +240,8 @@ var SelectDDAreaComponent = /** @class */ (function () {
236
240
  };
237
241
  SelectDDAreaComponent.prototype.navigateDown = function () {
238
242
  var _a, _b, _c;
239
- var d = (_b = (_a = this.renderedData, (_a !== null && _a !== void 0 ? _a : this.filteredData)), (_b !== null && _b !== void 0 ? _b : this.options.data));
240
- var selItem = (_c = this.component.getFocus(), (_c !== null && _c !== void 0 ? _c : this.component.getSelected()));
243
+ var d = (_b = (_a = this.renderedData) !== null && _a !== void 0 ? _a : this.filteredData) !== null && _b !== void 0 ? _b : this.options.data;
244
+ var selItem = (_c = this.component.getFocus()) !== null && _c !== void 0 ? _c : this.component.getSelected();
241
245
  if (selItem == null) {
242
246
  this.component.setFocus(d.filter(function (x) { return !x.__isGroup; })[0]);
243
247
  return;
@@ -262,8 +266,8 @@ var SelectDDAreaComponent = /** @class */ (function () {
262
266
  };
263
267
  SelectDDAreaComponent.prototype.navigateUp = function () {
264
268
  var _a, _b, _c;
265
- var d = (_b = (_a = this.renderedData, (_a !== null && _a !== void 0 ? _a : this.filteredData)), (_b !== null && _b !== void 0 ? _b : this.options.data));
266
- var selItem = (_c = this.component.getFocus(), (_c !== null && _c !== void 0 ? _c : this.component.getSelected()));
269
+ var d = (_b = (_a = this.renderedData) !== null && _a !== void 0 ? _a : this.filteredData) !== null && _b !== void 0 ? _b : this.options.data;
270
+ var selItem = (_c = this.component.getFocus()) !== null && _c !== void 0 ? _c : this.component.getSelected();
267
271
  if (selItem == null) {
268
272
  this.component.setFocus(d.filter(function (x) { return !x.__isGroup; })[0]);
269
273
  return;
@@ -285,9 +289,9 @@ var SelectDDAreaComponent = /** @class */ (function () {
285
289
  SelectDDAreaComponent.prototype.search = function (term) {
286
290
  var _this = this;
287
291
  var _a, _b, _c, _d;
288
- var oldLen = (_b = (_a = this.filteredData) === null || _a === void 0 ? void 0 : _a.length, (_b !== null && _b !== void 0 ? _b : 0));
292
+ var oldLen = (_b = (_a = this.filteredData) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
289
293
  this.filteredData = this.options.data.filter(function (d) { return _this.options.matchSearch(d, term); });
290
- var newLen = (_d = (_c = this.filteredData) === null || _c === void 0 ? void 0 : _c.length, (_d !== null && _d !== void 0 ? _d : 0));
294
+ var newLen = (_d = (_c = this.filteredData) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0;
291
295
  if (oldLen !== newLen && this.scrollContainer != null) {
292
296
  this.scrollContainer.scrollTop = 0;
293
297
  }
@@ -300,7 +304,7 @@ var SelectDDAreaComponent = /** @class */ (function () {
300
304
  SelectDDAreaComponent.prototype.focusFirst = function () {
301
305
  var _a;
302
306
  if (this.options.focusFirstItem && (this.component.getSelected() == null || this.component.getSelected().length === 0)) /* TODO multiselect */ {
303
- this.component.setFocus((_a = this.filteredData, (_a !== null && _a !== void 0 ? _a : this.options.data))[0]);
307
+ this.component.setFocus(((_a = this.filteredData) !== null && _a !== void 0 ? _a : this.options.data)[0]);
304
308
  }
305
309
  };
306
310
  SelectDDAreaComponent.ESCAPE_KEY = 27;
@@ -3,7 +3,7 @@ var SplitterComponent = /** @class */ (function () {
3
3
  function SplitterComponent(options) {
4
4
  // tslint:disable-next-line: variable-name
5
5
  this._is_splitter = true;
6
- this.options = (options !== null && options !== void 0 ? options : {});
6
+ this.options = options !== null && options !== void 0 ? options : {};
7
7
  if (this.options.minSizesInPX == null) {
8
8
  this.options.minSizesInPX = [];
9
9
  }
@@ -1,9 +1,11 @@
1
- var __spreadArrays = (this && this.__spreadArrays) || function () {
2
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
3
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
4
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
5
- r[k] = a[j];
6
- return r;
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
6
+ }
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
7
9
  };
8
10
  import "./TabsStyle.scss";
9
11
  import { helper } from "../../core/helper";
@@ -12,15 +14,15 @@ var TabsComponent = /** @class */ (function () {
12
14
  var _a, _b, _c;
13
15
  this.options = options;
14
16
  this.State = { selectedIndex: null };
15
- this.options = (_a = this.options, (_a !== null && _a !== void 0 ? _a : {}));
16
- this.options.tabs = (_b = this.options.tabs, (_b !== null && _b !== void 0 ? _b : []));
17
- this.options.selectedIndex = (_c = this.options.selectedIndex, (_c !== null && _c !== void 0 ? _c : 0));
17
+ this.options = (_a = this.options) !== null && _a !== void 0 ? _a : {};
18
+ this.options.tabs = (_b = this.options.tabs) !== null && _b !== void 0 ? _b : [];
19
+ this.options.selectedIndex = (_c = this.options.selectedIndex) !== null && _c !== void 0 ? _c : 0;
18
20
  }
19
21
  TabsComponent.prototype.render = function () {
20
22
  var _this = this;
21
23
  var _a, _b, _c, _d, _e;
22
24
  var index = -1;
23
- var activeIndex = (_a = this.State.selectedIndex, (_a !== null && _a !== void 0 ? _a : this.options.selectedIndex));
25
+ var activeIndex = (_a = this.State.selectedIndex) !== null && _a !== void 0 ? _a : this.options.selectedIndex;
24
26
  if (activeIndex > -1 &&
25
27
  this.options.tabs[activeIndex].content == null &&
26
28
  this.options.tabs[activeIndex].onCreate) {
@@ -34,8 +36,8 @@ var TabsComponent = /** @class */ (function () {
34
36
  if (idx === activeIndex) {
35
37
  tabs.push({
36
38
  tag: "div", attr: {
37
- class: "tab-content " + (_b = this.options.contentClass, (_b !== null && _b !== void 0 ? _b : "")),
38
- style: { "max-height": (_c = this.options.maxHeight, (_c !== null && _c !== void 0 ? _c : "100%")) },
39
+ class: "tab-content " + ((_b = this.options.contentClass) !== null && _b !== void 0 ? _b : ""),
40
+ style: { "max-height": ((_c = this.options.maxHeight) !== null && _c !== void 0 ? _c : "100%") },
39
41
  id: this.options.tabs[idx].id
40
42
  },
41
43
  children: [this.toNode(this.options.tabs[idx].content)]
@@ -44,8 +46,8 @@ var TabsComponent = /** @class */ (function () {
44
46
  else if (this.options.preserveContent) {
45
47
  tabs.push({
46
48
  tag: "div", attr: {
47
- class: "tab-content tab-hidden " + (_d = this.options.contentClass, (_d !== null && _d !== void 0 ? _d : "")),
48
- style: { "max-height": (_e = this.options.maxHeight, (_e !== null && _e !== void 0 ? _e : "100%")) },
49
+ class: "tab-content tab-hidden " + ((_d = this.options.contentClass) !== null && _d !== void 0 ? _d : ""),
50
+ style: { "max-height": ((_e = this.options.maxHeight) !== null && _e !== void 0 ? _e : "100%") },
49
51
  id: this.options.tabs[idx].id
50
52
  },
51
53
  children: [this.toNode(this.options.tabs[idx].content)]
@@ -53,7 +55,7 @@ var TabsComponent = /** @class */ (function () {
53
55
  }
54
56
  }
55
57
  return {
56
- tag: "div", attr: { class: "stabcomponent", style: this.options.style }, children: __spreadArrays([
58
+ tag: "div", attr: { class: "stabcomponent", style: this.options.style }, children: __spreadArray([
57
59
  {
58
60
  tag: "div", attr: { class: "tab-header-row" }, children: this.options.tabs.map(function (x) {
59
61
  index++;
@@ -63,7 +65,7 @@ var TabsComponent = /** @class */ (function () {
63
65
  class: "tab-item " + (index === activeIndex ? "active " : "") + (_this.options.tabs[currIndex].enabled === false ? "disabled " : ""),
64
66
  click: function (evt) {
65
67
  var _a;
66
- if (_a = _this.options.tabs[currIndex].enabled, (_a !== null && _a !== void 0 ? _a : true)) {
68
+ if ((_a = _this.options.tabs[currIndex].enabled) !== null && _a !== void 0 ? _a : true) {
67
69
  _this.SetSelectedTab(currIndex);
68
70
  if (_this.options.onSelect) {
69
71
  _this.options.onSelect(currIndex);
@@ -78,7 +80,7 @@ var TabsComponent = /** @class */ (function () {
78
80
  tag: "div", attr: {
79
81
  class: "close-button", click: function (evt) {
80
82
  var _a;
81
- if (_a = _this.options.tabs[currIndex].enabled, (_a !== null && _a !== void 0 ? _a : true)) {
83
+ if ((_a = _this.options.tabs[currIndex].enabled) !== null && _a !== void 0 ? _a : true) {
82
84
  evt.stopPropagation();
83
85
  _this.closeTabIndex(currIndex);
84
86
  }
@@ -91,12 +93,12 @@ var TabsComponent = /** @class */ (function () {
91
93
  };
92
94
  })
93
95
  }
94
- ], tabs)
96
+ ], tabs, true)
95
97
  };
96
98
  };
97
99
  TabsComponent.prototype.AddTab = function (tabItem) {
98
100
  var _a;
99
- tabItem.enabled = (_a = tabItem.enabled, (_a !== null && _a !== void 0 ? _a : true));
101
+ tabItem.enabled = (_a = tabItem.enabled) !== null && _a !== void 0 ? _a : true;
100
102
  this.options.tabs.push(tabItem);
101
103
  return this.options.tabs.length - 1;
102
104
  };
@@ -125,8 +127,8 @@ var TabsComponent = /** @class */ (function () {
125
127
  }
126
128
  var currIdx = 0;
127
129
  this.options.tabs = this.options.tabs.filter(function (x) { return currIdx++ !== index; });
128
- if (this.options.tabs.length <= (_a = this.State.selectedIndex, (_a !== null && _a !== void 0 ? _a : this.options.selectedIndex))) {
129
- this.SetSelectedTab((_b = this.State.selectedIndex, (_b !== null && _b !== void 0 ? _b : this.options.selectedIndex)) - 1);
130
+ if (this.options.tabs.length <= ((_a = this.State.selectedIndex) !== null && _a !== void 0 ? _a : this.options.selectedIndex)) {
131
+ this.SetSelectedTab(((_b = this.State.selectedIndex) !== null && _b !== void 0 ? _b : this.options.selectedIndex) - 1);
130
132
  }
131
133
  };
132
134
  // public onCreate(node: IJSLVNode) {
@@ -152,7 +154,7 @@ var TabsComponent = /** @class */ (function () {
152
154
  return undefined;
153
155
  }
154
156
  if (typeof content === "string") {
155
- return { tag: (tag !== null && tag !== void 0 ? tag : "div"), content: content };
157
+ return { tag: tag !== null && tag !== void 0 ? tag : "div", content: content };
156
158
  }
157
159
  return content;
158
160
  };
@@ -15,16 +15,16 @@ import { helper } from "../../core/helper";
15
15
  import { date } from "../../core/date";
16
16
  var TimeComponent = /** @class */ (function () {
17
17
  function TimeComponent(options) {
18
- var _a, _b;
18
+ var _a;
19
19
  this.options = __assign({
20
20
  enabled: true,
21
21
  id: helper.newDomGuid(),
22
22
  inputMode: "HourMinute",
23
23
  bindMode: "toModel",
24
- placeholder: ((_a = options) === null || _a === void 0 ? void 0 : _a.inputMode) === "HourMinuteSecond" ? "__:__:__" : "__:__"
24
+ placeholder: (options === null || options === void 0 ? void 0 : options.inputMode) === "HourMinuteSecond" ? "__:__:__" : "__:__"
25
25
  }, options);
26
26
  if (this.options.bindTo != null && this.options.bindMode !== "fromModel" && this.options.property != null && this.options.value == null) {
27
- this.options.value = (((_b = this.options.converter) === null || _b === void 0 ? void 0 : _b.toUI) ?
27
+ this.options.value = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
28
28
  this.options.converter.toUI(this.options.bindTo[this.options.property]) :
29
29
  this.options.bindTo[this.options.property]);
30
30
  }
@@ -51,7 +51,7 @@ var TimeComponent = /** @class */ (function () {
51
51
  id: this.options.id,
52
52
  enabled: this.options.enabled,
53
53
  value: date.formatTime(val, this.options.inputMode),
54
- class: "time-comp " + (_b = this.options.class, (_b !== null && _b !== void 0 ? _b : "")),
54
+ class: "time-comp " + ((_b = this.options.class) !== null && _b !== void 0 ? _b : ""),
55
55
  style: this.options.style,
56
56
  placeholder: this.options.placeholder,
57
57
  change: this.raiseChangeEvent
@@ -9,7 +9,7 @@ var TreeViewComponent = /** @class */ (function () {
9
9
  TreeViewComponent.prototype.render = function () {
10
10
  var _a;
11
11
  return {
12
- tag: "div", attr: { style: this.options.style, class: "treeview-comp hover " + (_a = this.options.class, (_a !== null && _a !== void 0 ? _a : "")) }, children: [
12
+ tag: "div", attr: { style: this.options.style, class: "treeview-comp hover " + ((_a = this.options.class) !== null && _a !== void 0 ? _a : "") }, children: [
13
13
  { tag: "ul", children: [this.renderNode(this.options.data)] }
14
14
  ]
15
15
  };