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.
Files changed (214) hide show
  1. package/lib/grid.css +0 -8
  2. package/lib/index.css.map +1 -1
  3. package/lib/index.js +10198 -61
  4. package/lib/index.js.map +1 -1
  5. package/package.json +1 -1
  6. package/lib/components/IntervalComponent.d.ts +0 -17
  7. package/lib/components/IntervalComponent.js +0 -68
  8. package/lib/components/auto-suggest/AutoSuggestComponent.d.ts +0 -22
  9. package/lib/components/auto-suggest/AutoSuggestComponent.js +0 -49
  10. package/lib/components/button/ButtonComponent.d.ts +0 -18
  11. package/lib/components/button/ButtonComponent.js +0 -46
  12. package/lib/components/checkbox/CheckBoxComponent.d.ts +0 -28
  13. package/lib/components/checkbox/CheckBoxComponent.js +0 -94
  14. package/lib/components/checkbox/CheckBoxStyle.scss +0 -86
  15. package/lib/components/date/DateComponent.d.ts +0 -32
  16. package/lib/components/date/DateComponent.js +0 -106
  17. package/lib/components/date-range/DateRangeComponent.d.ts +0 -35
  18. package/lib/components/date-range/DateRangeComponent.js +0 -136
  19. package/lib/components/date-range/DateRangeStyle.scss +0 -12
  20. package/lib/components/date-time/DateTimeComponent.d.ts +0 -15
  21. package/lib/components/date-time/DateTimeComponent.js +0 -53
  22. package/lib/components/date-time/DateTimeStyle.scss +0 -7
  23. package/lib/components/dialog/DialogComponent.d.ts +0 -67
  24. package/lib/components/dialog/DialogComponent.js +0 -242
  25. package/lib/components/drop-down/DropDownComponent.d.ts +0 -27
  26. package/lib/components/drop-down/DropDownComponent.js +0 -74
  27. package/lib/components/expander/ExpanderComponent.d.ts +0 -27
  28. package/lib/components/expander/ExpanderComponent.js +0 -90
  29. package/lib/components/expander/ExpanderStyle.scss +0 -47
  30. package/lib/components/expander/OldExpanderStyle.scss +0 -37
  31. package/lib/components/form-field/FormComponent.d.ts +0 -12
  32. package/lib/components/form-field/FormComponent.js +0 -26
  33. package/lib/components/form-field/FormFieldComponent.d.ts +0 -38
  34. package/lib/components/form-field/FormFieldComponent.js +0 -139
  35. package/lib/components/form-field/FormFieldStyle.scss +0 -87
  36. package/lib/components/grid/GridComponent.d.ts +0 -26
  37. package/lib/components/grid/GridComponent.js +0 -116
  38. package/lib/components/input/InputComponent.d.ts +0 -33
  39. package/lib/components/input/InputComponent.js +0 -144
  40. package/lib/components/loading/LoadingComponent.d.ts +0 -8
  41. package/lib/components/loading/LoadingComponent.js +0 -22
  42. package/lib/components/loading/LoadingStyle.css +0 -29
  43. package/lib/components/navigation/NavigationComponent.d.ts +0 -34
  44. package/lib/components/navigation/NavigationComponent.js +0 -70
  45. package/lib/components/navigation/NavigationStyle.scss +0 -226
  46. package/lib/components/notification/Notification.d.ts +0 -17
  47. package/lib/components/notification/Notification.js +0 -56
  48. package/lib/components/notification/Notification.scss +0 -19
  49. package/lib/components/number/NumberComponent.d.ts +0 -25
  50. package/lib/components/number/NumberComponent.js +0 -87
  51. package/lib/components/overlay/OverlayComponent.d.ts +0 -27
  52. package/lib/components/overlay/OverlayComponent.js +0 -149
  53. package/lib/components/overlay/overlay.css +0 -57
  54. package/lib/components/progress/ProgressComponent.d.ts +0 -18
  55. package/lib/components/progress/ProgressComponent.js +0 -42
  56. package/lib/components/progress/ProgressStyle.scss +0 -15
  57. package/lib/components/ribbon-menu/RibbonMenuComponent.d.ts +0 -12
  58. package/lib/components/ribbon-menu/RibbonMenuComponent.js +0 -34
  59. package/lib/components/ribbon-menu/RibbonMenuStyle.scss +0 -76
  60. package/lib/components/select/SelectComponent.d.ts +0 -79
  61. package/lib/components/select/SelectComponent.js +0 -362
  62. package/lib/components/select/SelectDDAreaComponent.d.ts +0 -32
  63. package/lib/components/select/SelectDDAreaComponent.js +0 -317
  64. package/lib/components/select/SelectStyle.scss +0 -187
  65. package/lib/components/slider/nouislider.css +0 -310
  66. package/lib/components/slider/nouislider.d.ts +0 -44
  67. package/lib/components/slider/nouislider.js +0 -2158
  68. package/lib/components/stack-panel/SplitterComponent.d.ts +0 -21
  69. package/lib/components/stack-panel/SplitterComponent.js +0 -126
  70. package/lib/components/stack-panel/SplitterStyle.scss +0 -45
  71. package/lib/components/stack-panel/StackPanelComponent.d.ts +0 -20
  72. package/lib/components/stack-panel/StackPanelComponent.js +0 -64
  73. package/lib/components/stack-panel/StackPanelStyle.scss +0 -53
  74. package/lib/components/tabs/TabsComponent.d.ts +0 -39
  75. package/lib/components/tabs/TabsComponent.js +0 -177
  76. package/lib/components/tabs/TabsStyle.scss +0 -76
  77. package/lib/components/time/TimeComponent.d.ts +0 -29
  78. package/lib/components/time/TimeComponent.js +0 -113
  79. package/lib/components/time/TimeComponent.scss +0 -4
  80. package/lib/components/tree-view/TreeViewComponent.d.ts +0 -23
  81. package/lib/components/tree-view/TreeViewComponent.js +0 -45
  82. package/lib/components/tree-view/TreeViewStyle.scss +0 -96
  83. package/lib/components/virtual-render/VirtualRenderComponent.d.ts +0 -30
  84. package/lib/components/virtual-render/VirtualRenderComponent.js +0 -104
  85. package/lib/components/virtual-render/VirtualRenderStyle.scss +0 -9
  86. package/lib/core/culture.d.ts +0 -5
  87. package/lib/core/culture.js +0 -385
  88. package/lib/core/date.d.ts +0 -14
  89. package/lib/core/date.js +0 -350
  90. package/lib/core/helper.d.ts +0 -12
  91. package/lib/core/helper.js +0 -101
  92. package/lib/core/jq.d.ts +0 -37
  93. package/lib/core/jq.js +0 -371
  94. package/lib/core/lang.d.ts +0 -24
  95. package/lib/core/lang.js +0 -28
  96. package/lib/core/numeric.d.ts +0 -7
  97. package/lib/core/numeric.js +0 -143
  98. package/lib/core/polyfills.d.ts +0 -0
  99. package/lib/core/polyfills.js +0 -22
  100. package/lib/core.d.ts +0 -6
  101. package/lib/core.js +0 -6
  102. package/lib/grid/controls/slick.columnpicker.css +0 -46
  103. package/lib/grid/controls/slick.draggablegrouping.css +0 -52
  104. package/lib/grid/controls/slick.gridmenu.css +0 -127
  105. package/lib/grid/controls/slick.pager.css +0 -41
  106. package/lib/grid/examples/examples.css +0 -203
  107. package/lib/grid/filterDialogs/dateRangeFilter.d.ts +0 -7
  108. package/lib/grid/filterDialogs/dateRangeFilter.js +0 -156
  109. package/lib/grid/filterDialogs/excelFilter.d.ts +0 -9
  110. package/lib/grid/filterDialogs/excelFilter.js +0 -313
  111. package/lib/grid/plugins/ext.overlay.css +0 -28
  112. package/lib/grid/plugins/ext.overlay.d.ts +0 -2
  113. package/lib/grid/plugins/ext.overlay.js +0 -291
  114. package/lib/grid/plugins/slick.cellrangedecorator.d.ts +0 -12
  115. package/lib/grid/plugins/slick.cellrangedecorator.js +0 -68
  116. package/lib/grid/plugins/slick.cellrangeselector.d.ts +0 -1
  117. package/lib/grid/plugins/slick.cellrangeselector.js +0 -144
  118. package/lib/grid/plugins/slick.cellselectionmodel.d.ts +0 -1
  119. package/lib/grid/plugins/slick.cellselectionmodel.js +0 -194
  120. package/lib/grid/plugins/slick.headerbuttons.css +0 -40
  121. package/lib/grid/plugins/slick.headerbuttons.d.ts +0 -55
  122. package/lib/grid/plugins/slick.headerbuttons.js +0 -156
  123. package/lib/grid/plugins/slick.headermenu.css +0 -101
  124. package/lib/grid/plugins/slick.headermenu.d.ts +0 -74
  125. package/lib/grid/plugins/slick.headermenu.js +0 -260
  126. package/lib/grid/plugins/slick.rowdetailview.css +0 -37
  127. package/lib/grid/plugins/slick.rowmovemanager.css +0 -8
  128. package/lib/grid/plugins/slick.rowmovemanager.d.ts +0 -18
  129. package/lib/grid/plugins/slick.rowmovemanager.js +0 -249
  130. package/lib/grid/plugins/slick.rowselectionmodel.d.ts +0 -1
  131. package/lib/grid/plugins/slick.rowselectionmodel.js +0 -167
  132. package/lib/grid/slick-default-theme.css +0 -154
  133. package/lib/grid/slick.core.d.ts +0 -90
  134. package/lib/grid/slick.core.js +0 -574
  135. package/lib/grid/slick.creator.d.ts +0 -80
  136. package/lib/grid/slick.creator.js +0 -723
  137. package/lib/grid/slick.dataview.d.ts +0 -71
  138. package/lib/grid/slick.dataview.js +0 -1080
  139. package/lib/grid/slick.editors.core.d.ts +0 -4
  140. package/lib/grid/slick.editors.core.js +0 -232
  141. package/lib/grid/slick.editors.date.d.ts +0 -2
  142. package/lib/grid/slick.editors.date.js +0 -125
  143. package/lib/grid/slick.editors.lookup.d.ts +0 -14
  144. package/lib/grid/slick.editors.lookup.js +0 -353
  145. package/lib/grid/slick.editors.nav.d.ts +0 -6
  146. package/lib/grid/slick.editors.nav.js +0 -22
  147. package/lib/grid/slick.formatters.d.ts +0 -17
  148. package/lib/grid/slick.formatters.js +0 -137
  149. package/lib/grid/slick.grid.css +0 -325
  150. package/lib/grid/slick.grid.d.ts +0 -284
  151. package/lib/grid/slick.grid.js +0 -5395
  152. package/lib/grid/slick.groupitemmetadataprovider.d.ts +0 -39
  153. package/lib/grid/slick.groupitemmetadataprovider.js +0 -165
  154. package/lib/grid/slick.tree.css +0 -20
  155. package/lib/grid/slick.tree.d.ts +0 -33
  156. package/lib/grid/slick.tree.js +0 -220
  157. package/lib/grid.d.ts +0 -13
  158. package/lib/grid.js +0 -13
  159. package/lib/index.css +0 -2584
  160. package/lib/index.d.ts +0 -56
  161. package/lib/interaction/dataconverter.d.ts +0 -4
  162. package/lib/interaction/dataconverter.js +0 -1
  163. package/lib/interaction/eventhandler.d.ts +0 -13
  164. package/lib/interaction/eventhandler.js +0 -42
  165. package/lib/interaction/moveable.css +0 -0
  166. package/lib/interaction/moveable.d.ts +0 -39
  167. package/lib/interaction/moveable.js +0 -172
  168. package/lib/interaction/resizable.css +0 -33
  169. package/lib/interaction/resizable.d.ts +0 -37
  170. package/lib/interaction/resizable.js +0 -123
  171. package/lib/ui/auto.suggest.css +0 -14
  172. package/lib/ui/auto.suggest.d.ts +0 -17
  173. package/lib/ui/auto.suggest.js +0 -255
  174. package/lib/ui/base.css +0 -150
  175. package/lib/ui/date.picker/css/date-range-picker.css +0 -87
  176. package/lib/ui/date.picker/css/tiny-date-picker.css +0 -326
  177. package/lib/ui/date.picker/date-picker-options.d.ts +0 -11
  178. package/lib/ui/date.picker/date-picker-options.js +0 -76
  179. package/lib/ui/date.picker/lib/date-manip.d.ts +0 -74
  180. package/lib/ui/date.picker/lib/date-manip.js +0 -120
  181. package/lib/ui/date.picker/lib/dom.d.ts +0 -23
  182. package/lib/ui/date.picker/lib/dom.js +0 -28
  183. package/lib/ui/date.picker/lib/emitter.d.ts +0 -13
  184. package/lib/ui/date.picker/lib/emitter.js +0 -49
  185. package/lib/ui/date.picker/lib/fns.d.ts +0 -23
  186. package/lib/ui/date.picker/lib/fns.js +0 -43
  187. package/lib/ui/date.picker/mode/base-mode.d.ts +0 -26
  188. package/lib/ui/date.picker/mode/base-mode.js +0 -248
  189. package/lib/ui/date.picker/mode/dropdown-mode.d.ts +0 -28
  190. package/lib/ui/date.picker/mode/dropdown-mode.js +0 -50
  191. package/lib/ui/date.picker/mode/index.d.ts +0 -28
  192. package/lib/ui/date.picker/mode/index.js +0 -18
  193. package/lib/ui/date.picker/mode/modal-mode.d.ts +0 -25
  194. package/lib/ui/date.picker/mode/modal-mode.js +0 -17
  195. package/lib/ui/date.picker/mode/permanent-mode.d.ts +0 -29
  196. package/lib/ui/date.picker/mode/permanent-mode.js +0 -19
  197. package/lib/ui/date.picker/views/day-picker.d.ts +0 -40
  198. package/lib/ui/date.picker/views/day-picker.js +0 -155
  199. package/lib/ui/date.picker/views/month-picker.d.ts +0 -26
  200. package/lib/ui/date.picker/views/month-picker.js +0 -65
  201. package/lib/ui/date.picker/views/year-picker.d.ts +0 -20
  202. package/lib/ui/date.picker/views/year-picker.js +0 -66
  203. package/lib/ui/date.picker.d.ts +0 -66
  204. package/lib/ui/date.picker.js +0 -32
  205. package/lib/ui/dialog.css +0 -109
  206. package/lib/ui/dialog.d.ts +0 -22
  207. package/lib/ui/dialog.js +0 -113
  208. package/lib/ui/drop.down.css +0 -472
  209. package/lib/ui/drop.down.d.ts +0 -52
  210. package/lib/ui/drop.down.js +0 -2112
  211. package/lib/ui/number.input.css +0 -3
  212. package/lib/ui/number.input.d.ts +0 -12
  213. package/lib/ui/number.input.js +0 -64
  214. package/lib/ui/tabs.css +0 -53
@@ -1,21 +0,0 @@
1
- import "./SplitterStyle.scss";
2
- import { IJSLComponent, IJSLVNode } from "jsl-render";
3
- import { EventHandler } from "../../interaction/eventhandler";
4
- export interface ISplitterComponentOptions {
5
- minSizesInPX?: number[];
6
- maxSizesInPX?: number[];
7
- onResize?: EventHandler<void>;
8
- onResizeDone?: EventHandler<ISplitterDoneArgs>;
9
- }
10
- export interface ISplitterDoneArgs {
11
- size1InPX?: number;
12
- }
13
- export declare class SplitterComponent implements IJSLComponent {
14
- private static listenerRegistered;
15
- _is_splitter: boolean;
16
- private options;
17
- constructor(options?: ISplitterComponentOptions);
18
- isEqual(node: IJSLComponent): boolean;
19
- render(): IJSLVNode;
20
- private registerListener;
21
- }
@@ -1,126 +0,0 @@
1
- import "./SplitterStyle.scss";
2
- var SplitterComponent = /** @class */ (function () {
3
- function SplitterComponent(options) {
4
- // tslint:disable-next-line: variable-name
5
- this._is_splitter = true;
6
- this.options = options !== null && options !== void 0 ? options : {};
7
- if (this.options.minSizesInPX == null) {
8
- this.options.minSizesInPX = [];
9
- }
10
- if (this.options.minSizesInPX[0] == null) {
11
- this.options.minSizesInPX[0] = 0;
12
- }
13
- if (this.options.minSizesInPX[1] == null) {
14
- this.options.minSizesInPX[1] = 0;
15
- }
16
- if (this.options.maxSizesInPX == null) {
17
- this.options.maxSizesInPX = [];
18
- }
19
- if (!SplitterComponent.listenerRegistered) {
20
- SplitterComponent.listenerRegistered = true;
21
- this.registerListener();
22
- }
23
- }
24
- SplitterComponent.prototype.isEqual = function (node) {
25
- return this.__proto__ === node.__proto__;
26
- };
27
- SplitterComponent.prototype.render = function () {
28
- return { tag: "div", attr: { class: "split-comp" } };
29
- };
30
- SplitterComponent.prototype.registerListener = function () {
31
- var dragStartX = 0;
32
- var draggedEl;
33
- var elLeft;
34
- var elRight;
35
- var elLeftWidth;
36
- var elRightWidth;
37
- var isDown;
38
- function mousemove(e) {
39
- var _a;
40
- if (!isDown) {
41
- return;
42
- }
43
- e.preventDefault();
44
- // e.stopPropagation();
45
- // e.stopImmediatePropagation();
46
- var x;
47
- var orientation = draggedEl.parentElement.classList.contains("vstackpanel") ? "vertical" : "horizontal";
48
- var component = draggedEl._component;
49
- if (orientation === "horizontal") {
50
- x = e.pageX != null ? e.pageX : e.touches[0].pageX;
51
- }
52
- else {
53
- x = e.pageY != null ? e.pageY : e.touches[0].pageY;
54
- }
55
- var delta = dragStartX - x;
56
- if ((elLeftWidth - delta) < component.options.minSizesInPX[0] ||
57
- (elRightWidth + delta) < component.options.minSizesInPX[1]) {
58
- return;
59
- }
60
- if ((elLeftWidth - delta) > component.options.maxSizesInPX[0] ||
61
- (elRightWidth + delta) > component.options.maxSizesInPX[1]) {
62
- return;
63
- }
64
- if (orientation === "horizontal") {
65
- elLeft.style.width = (elLeftWidth - delta) + "px";
66
- elRight.style.width = (elRightWidth + delta) + "px";
67
- }
68
- else {
69
- elLeft.style.height = (elLeftWidth - delta) + "px";
70
- elRight.style.height = (elRightWidth + delta) + "px";
71
- }
72
- (_a = component.options.onResize) === null || _a === void 0 ? void 0 : _a.notify();
73
- }
74
- function mouseup(e) {
75
- var _a;
76
- isDown = false;
77
- // document.removeEventListener("mousemove", mousemove);
78
- // document.removeEventListener("touchmove", mousemove);
79
- document.removeEventListener("mouseup", mousedown);
80
- document.removeEventListener("touchend", mousedown);
81
- var component = draggedEl._component;
82
- var area1 = draggedEl.previousElementSibling;
83
- var args = {};
84
- if (area1 != null) {
85
- args.size1InPX = area1.getBoundingClientRect().width;
86
- }
87
- (_a = component.options.onResizeDone) === null || _a === void 0 ? void 0 : _a.notify(args);
88
- }
89
- function mousedown(e) {
90
- if (e.target.classList.contains("split-comp")) {
91
- isDown = true;
92
- var orientation_1 = e.target.parentElement.classList.contains("vstackpanel") ? "vertical" : "horizontal";
93
- if (orientation_1 === "horizontal") {
94
- dragStartX = e.pageX != null ? e.pageX : e.touches[0].pageX;
95
- }
96
- else {
97
- dragStartX = e.pageY != null ? e.pageY : e.touches[0].pageY;
98
- }
99
- draggedEl = e.target;
100
- elLeft = draggedEl.previousElementSibling;
101
- elRight = draggedEl.nextElementSibling;
102
- if (elLeft != null && elRight != null) {
103
- if (orientation_1 === "horizontal") {
104
- elLeftWidth = elLeft.getBoundingClientRect().width;
105
- elRightWidth = elRight.getBoundingClientRect().width;
106
- }
107
- else {
108
- elLeftWidth = elLeft.getBoundingClientRect().height;
109
- elRightWidth = elRight.getBoundingClientRect().height;
110
- }
111
- document.body.addEventListener("mousemove", mousemove, { passive: false });
112
- document.body.addEventListener("touchmove", mousemove, { passive: false });
113
- document.body.addEventListener("mouseup", mouseup, false);
114
- document.body.addEventListener("touchend", mouseup, false);
115
- }
116
- }
117
- }
118
- document.addEventListener("mousedown", mousedown);
119
- document.addEventListener("touchstart", mousedown);
120
- document.removeEventListener("mousemove", mousemove);
121
- document.removeEventListener("touchmove", mousemove);
122
- };
123
- SplitterComponent.listenerRegistered = false;
124
- return SplitterComponent;
125
- }());
126
- export { SplitterComponent };
@@ -1,45 +0,0 @@
1
- .stackpanel-comp.hstackpanel > .split-comp {
2
- width: 14px !important;
3
- background: #d5d5d5;
4
- cursor: w-resize;
5
- position: relative;
6
-
7
- &::before {
8
- height: 4rem;
9
- background: #696969;
10
- width: 7px;
11
- position: absolute;
12
- top: calc(50% - 2rem);
13
- content: "";
14
- left: 3px;
15
- border-radius: 3px;
16
- }
17
-
18
- &:hover {
19
- box-shadow: 0px 0px 3px 2px rgba(0, 0, 0, 0.3);
20
- }
21
- }
22
-
23
- .stackpanel-comp.vstackpanel > .split-comp {
24
- height: 14px !important;
25
- flex-basis: 14px;
26
- flex-grow: 0;
27
- background: #d5d5d5;
28
- cursor: n-resize;
29
- position: relative;
30
-
31
- &::before {
32
- background: #696969;
33
- height: 7px;
34
- width: 4rem;
35
- position: absolute;
36
- left: calc(50% - 2rem);
37
- content: "";
38
- top: 3px;
39
- border-radius: 3px;
40
- }
41
-
42
- &:hover {
43
- box-shadow: 0px 0px 3px 2px rgba(0, 0, 0, 0.3);
44
- }
45
- }
@@ -1,20 +0,0 @@
1
- import "./StackPanelStyle.scss";
2
- import { IJSLComponent, IJSLVNode } from "jsl-render";
3
- export interface IStackPanelOptions {
4
- orientation?: "horizontal" | "vertical";
5
- valign?: "center" | "stretch" | "top" | "bottom" | "baseline";
6
- class?: string;
7
- style?: string;
8
- responsive?: boolean;
9
- flexForChildren?: boolean;
10
- sizes?: Array<string | undefined>;
11
- wrap?: boolean;
12
- }
13
- export declare class StackPanelComponent implements IJSLComponent {
14
- private children;
15
- private options;
16
- constructor(children: Array<IJSLVNode | IJSLComponent>, options?: IStackPanelOptions);
17
- isEqual(node: IJSLComponent): boolean;
18
- render(): IJSLVNode;
19
- private getSize;
20
- }
@@ -1,64 +0,0 @@
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
- import "./StackPanelStyle.scss";
13
- var StackPanelComponent = /** @class */ (function () {
14
- function StackPanelComponent(children, options) {
15
- this.children = children;
16
- this.options = __assign({ orientation: "horizontal", valign: "stretch" }, options);
17
- }
18
- StackPanelComponent.prototype.isEqual = function (node) {
19
- return this.__proto__ === node.__proto__;
20
- };
21
- StackPanelComponent.prototype.render = function () {
22
- var _this = this;
23
- var c = this.options.orientation === "horizontal" ? "stackpanel-comp hstackpanel" : "stackpanel-comp vstackpanel";
24
- if (this.options.responsive) {
25
- c += " responsive";
26
- }
27
- if (this.options.wrap) {
28
- c += " wrap";
29
- }
30
- if (this.options.class) {
31
- c += " " + this.options.class;
32
- }
33
- var va = this.options.valign;
34
- var s = "align-items:" + (va === "top" ? "flex-start" : (va === "bottom" ? "flex-end" : va));
35
- if (this.options.style) {
36
- s += ";" + this.options.style;
37
- }
38
- return {
39
- tag: "div", attr: { class: c, style: s },
40
- children: this.children.map(function (x, idx) { return x != null && x._is_splitter === true ? x : ({
41
- tag: "div",
42
- attr: { style: _this.getSize(idx) + (_this.options.flexForChildren ? ";display:flex" : "") },
43
- children: [x]
44
- }); })
45
- };
46
- };
47
- StackPanelComponent.prototype.getSize = function (idx) {
48
- if (this.options.sizes != null && this.options.sizes[idx] != null) {
49
- var s = this.options.sizes[idx];
50
- if (s === "*") {
51
- return undefined;
52
- }
53
- if (this.options.orientation === "vertical") {
54
- return "height: " + s;
55
- }
56
- else {
57
- return "width:" + s;
58
- }
59
- }
60
- return "flex-grow:1;";
61
- };
62
- return StackPanelComponent;
63
- }());
64
- export { StackPanelComponent };
@@ -1,53 +0,0 @@
1
-
2
- .stackpanel-comp.hstackpanel {
3
- position: relative;
4
- }
5
-
6
- @media (max-width: 70em) {
7
- .stackpanel-comp.hstackpanel.responsive > div {
8
- width: auto!important;
9
- }
10
- }
11
-
12
- .stackpanel-comp.hstackpanel:not(.responsive) {
13
- // flex-grow: 1;
14
- position: relative;
15
- display: flex;
16
- width: 100%;
17
- }
18
-
19
- // .stackpanel-comp.hstackpanel:not(.responsive) > div {
20
- // display: flex;
21
- // }
22
-
23
- @media (min-width: 70em) {
24
-
25
- .stackpanel-comp.hstackpanel {
26
- // flex-grow: 1;
27
- position: relative;
28
- display: flex;
29
- width: 100%;
30
- }
31
-
32
- }
33
-
34
- .stackpanel-comp.wrap {
35
- flex-wrap: wrap;
36
- }
37
-
38
- .stackpanel-comp.vstackpanel {
39
- position: relative;
40
- }
41
-
42
- // .stackpanel-comp.vstackpanel > div {
43
- // display: block;
44
- // }
45
-
46
- .stackpanel-comp.vstackpanel > div {
47
- display: flex;
48
- flex-direction: column;
49
- height: 100%;
50
- flex-basis: auto;
51
- flex-grow: 1;
52
- flex-shrink: 1;
53
- }
@@ -1,39 +0,0 @@
1
- import "./TabsStyle.scss";
2
- import { IJSLComponent, IJSLVNode, JSLRender } from "jsl-render";
3
- export interface ITabItemOption {
4
- id?: string;
5
- header: IJSLVNode | string | IJSLComponent;
6
- enabled?: boolean;
7
- content?: IJSLVNode | string | IJSLComponent;
8
- onCreate?: () => IJSLVNode | string | IJSLComponent;
9
- canClose?: boolean;
10
- onClosing?: () => boolean;
11
- }
12
- export interface ITabOptions {
13
- tabs?: ITabItemOption[];
14
- contentClass?: string;
15
- class?: string;
16
- style?: string;
17
- selectedIndex?: number;
18
- onSelect?: (index?: number) => boolean | void;
19
- maxHeight?: string;
20
- preserveContent?: boolean;
21
- }
22
- export declare class TabsComponent implements IJSLComponent {
23
- private options?;
24
- State: {
25
- selectedIndex: any;
26
- };
27
- private renderer;
28
- constructor(options?: ITabOptions);
29
- render(): IJSLVNode;
30
- AddTab(tabItem: ITabItemOption): number;
31
- EnableAll(): void;
32
- DisableAll(): void;
33
- GetByID(id: string): ITabItemOption;
34
- closeTabIndex(index: number): void;
35
- onInit(renderer: JSLRender): void;
36
- SetSelectedTab(index: number): void;
37
- private toNode;
38
- private checkForDuplicateIds;
39
- }
@@ -1,177 +0,0 @@
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));
9
- };
10
- import "./TabsStyle.scss";
11
- import { helper } from "../../core/helper";
12
- var TabsComponent = /** @class */ (function () {
13
- function TabsComponent(options) {
14
- var _a, _b, _c;
15
- this.options = options;
16
- this.State = { selectedIndex: null };
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;
20
- }
21
- TabsComponent.prototype.render = function () {
22
- var _this = this;
23
- var _a, _b, _c, _d, _e;
24
- this.checkForDuplicateIds();
25
- var index = -1;
26
- var activeIndex = (_a = this.State.selectedIndex) !== null && _a !== void 0 ? _a : this.options.selectedIndex;
27
- if (activeIndex > -1 &&
28
- this.options.tabs[activeIndex].content == null &&
29
- this.options.tabs[activeIndex].onCreate) {
30
- this.options.tabs[activeIndex].content = this.options.tabs[activeIndex].onCreate();
31
- }
32
- var tabs = [];
33
- for (var idx = 0; idx < this.options.tabs.length; idx++) {
34
- if (!this.options.tabs[idx].id) {
35
- this.options.tabs[idx].id = helper.newDomGuid();
36
- }
37
- if (idx === activeIndex) {
38
- tabs.push({
39
- tag: "div", attr: {
40
- class: "tab-content " + ((_b = this.options.contentClass) !== null && _b !== void 0 ? _b : ""),
41
- style: { "max-height": ((_c = this.options.maxHeight) !== null && _c !== void 0 ? _c : "100%") },
42
- id: this.options.tabs[idx].id
43
- },
44
- children: [this.toNode(this.options.tabs[idx].content)]
45
- });
46
- }
47
- else if (this.options.preserveContent) {
48
- tabs.push({
49
- tag: "div", attr: {
50
- class: "tab-content tab-hidden " + ((_d = this.options.contentClass) !== null && _d !== void 0 ? _d : ""),
51
- style: { "max-height": ((_e = this.options.maxHeight) !== null && _e !== void 0 ? _e : "100%") },
52
- id: this.options.tabs[idx].id
53
- },
54
- children: [this.toNode(this.options.tabs[idx].content)]
55
- });
56
- }
57
- }
58
- return {
59
- tag: "div", attr: { class: "stabcomponent " + (this.options.class || ""), style: this.options.style }, children: __spreadArray([
60
- {
61
- tag: "div", attr: { class: "tab-header-row" }, children: this.options.tabs.map(function (x) {
62
- index++;
63
- var currIndex = index;
64
- return {
65
- tag: "div", attr: {
66
- class: "tab-item " + (index === activeIndex ? "active " : "") + (_this.options.tabs[currIndex].enabled === false ? "disabled " : ""),
67
- click: function (evt) {
68
- var _a;
69
- if ((_a = _this.options.tabs[currIndex].enabled) !== null && _a !== void 0 ? _a : true) {
70
- _this.SetSelectedTab(currIndex);
71
- if (_this.options.onSelect) {
72
- _this.options.onSelect(currIndex);
73
- }
74
- }
75
- }
76
- }, children: [
77
- { tag: "span", attr: { style: "vertical-align: middle; vertical-align: -webkit-baseline-middle; vertical-align: -moz-middle-with-baseline;" }, children: [_this.toNode(x.header, "span")] },
78
- _this.options.tabs[index].canClose
79
- ?
80
- {
81
- tag: "div", attr: {
82
- class: "close-button", click: function (evt) {
83
- var _a;
84
- if ((_a = _this.options.tabs[currIndex].enabled) !== null && _a !== void 0 ? _a : true) {
85
- evt.stopPropagation();
86
- _this.closeTabIndex(currIndex);
87
- }
88
- }
89
- }, content: "X"
90
- }
91
- :
92
- undefined
93
- ]
94
- };
95
- })
96
- }
97
- ], tabs, true)
98
- };
99
- };
100
- TabsComponent.prototype.AddTab = function (tabItem) {
101
- var _a;
102
- tabItem.enabled = (_a = tabItem.enabled) !== null && _a !== void 0 ? _a : true;
103
- this.options.tabs.push(tabItem);
104
- this.checkForDuplicateIds();
105
- return this.options.tabs.length - 1;
106
- };
107
- TabsComponent.prototype.EnableAll = function () {
108
- for (var i = 0; i < this.options.tabs.length; i++) {
109
- this.options.tabs[i].enabled = true;
110
- }
111
- this.renderer.refresh();
112
- };
113
- TabsComponent.prototype.DisableAll = function () {
114
- for (var i = 0; i < this.options.tabs.length; i++) {
115
- this.options.tabs[i].enabled = false;
116
- }
117
- this.renderer.refresh();
118
- };
119
- TabsComponent.prototype.GetByID = function (id) {
120
- return this.options.tabs.filter(function (f) { return f.id === id; })[0];
121
- };
122
- TabsComponent.prototype.closeTabIndex = function (index) {
123
- var _a, _b;
124
- // console.log("closing tab index " + index);
125
- if (this.options.tabs[index].onClosing) {
126
- if (this.options.tabs[index].onClosing() === false) {
127
- return;
128
- }
129
- }
130
- var currIdx = 0;
131
- this.options.tabs = this.options.tabs.filter(function (x) { return currIdx++ !== index; });
132
- if (this.options.tabs.length <= ((_a = this.State.selectedIndex) !== null && _a !== void 0 ? _a : this.options.selectedIndex)) {
133
- this.SetSelectedTab(((_b = this.State.selectedIndex) !== null && _b !== void 0 ? _b : this.options.selectedIndex) - 1);
134
- }
135
- };
136
- // public onCreate(node: IJSLVNode) {
137
- // this.ref = node.dom as HTMLDivElement;
138
- // }
139
- // public onUpdate(node: IJSLVNode) {
140
- // this.ref = node.dom as HTMLDivElement;
141
- // }
142
- TabsComponent.prototype.onInit = function (renderer) {
143
- this.renderer = renderer;
144
- };
145
- TabsComponent.prototype.SetSelectedTab = function (index) {
146
- // console.log("setActiveTab: " + index);
147
- if (this.options.tabs[index].content == null) {
148
- this.options.tabs[index].content = this.options.tabs[index].onCreate();
149
- }
150
- this.options.selectedIndex = index;
151
- this.State.selectedIndex = index;
152
- this.renderer.refresh();
153
- };
154
- TabsComponent.prototype.toNode = function (content, tag) {
155
- if (content == null) {
156
- return undefined;
157
- }
158
- if (typeof content === "string") {
159
- return { tag: tag !== null && tag !== void 0 ? tag : "div", content: content };
160
- }
161
- return content;
162
- };
163
- TabsComponent.prototype.checkForDuplicateIds = function () {
164
- if (this.options.tabs == null || this.options.tabs.length === 0) {
165
- return;
166
- }
167
- var ids = {};
168
- for (var _i = 0, _a = this.options.tabs; _i < _a.length; _i++) {
169
- var tab = _a[_i];
170
- if (tab.id && ids[tab.id] !== undefined) {
171
- throw new Error("Tab Control has duplicate id " + tab.id);
172
- }
173
- }
174
- };
175
- return TabsComponent;
176
- }());
177
- export { TabsComponent };
@@ -1,76 +0,0 @@
1
-
2
- .stabcomponent {
3
- .tab-header-row {
4
- display: flex;
5
- .tab-item {
6
- display: inline-block;
7
- margin-right: 0.1rem;
8
- padding: 0.5rem 0.5rem 0.5rem 0.5rem;
9
- box-sizing: border-box;
10
- border: 1px solid transparent;
11
- border-radius: 4px 4px 0 0;
12
- text-decoration: none;
13
- border-color: #C0C0C0;
14
- border-bottom: 1px solid #ddd;
15
- vertical-align: middle;
16
- vertical-align: -webkit-baseline-middle;
17
- vertical-align: -moz-middle-with-baseline;
18
- cursor: pointer;
19
-
20
- &:hover {
21
- background:#c9e2f9;
22
- color: black;
23
- }
24
-
25
- .close-button {
26
- background: linear-gradient(#d9d8d6, #d9d8d6);
27
- border: 1px solid #88898d;
28
- border-radius: 0.2rem;
29
- color: #000;
30
- cursor: pointer;
31
- float: right;
32
- padding: 0.3rem;
33
- min-width: 1rem;
34
- text-align: center;
35
- margin-left: 0.5rem;
36
- margin-right: -0.5rem;
37
-
38
- &:hover {
39
- color: #000;
40
- border-color: #000;
41
- background: linear-gradient(#ff634b, #ff3313);
42
- }
43
- }
44
- }
45
-
46
- .active {
47
- cursor: default;
48
- background: #3B99FF;
49
- color: white;
50
- font-weight: bold;
51
- border: 1px solid rgb(116, 116, 116);
52
- border-bottom-color: transparent;
53
- }
54
-
55
- .disabled {
56
- cursor: default;
57
- color: #88898d;
58
- background: #d9d8d6;
59
-
60
- &:hover {
61
- color: #88898d;
62
- background: #d9d8d6;
63
- }
64
- }
65
- }
66
-
67
- .tab-content {
68
- max-height: calc(100vh - 9.6rem);
69
- overflow:auto;
70
- border:1px solid #C0C0C0;
71
- }
72
-
73
- .tab-hidden {
74
- display: none;
75
- }
76
- }
@@ -1,29 +0,0 @@
1
- import "./TimeComponent.scss";
2
- import { IJSLComponent, IJSLVNode } from "jsl-render";
3
- import { EventHandler } from "../../interaction/eventhandler";
4
- import { IDataConverter } from "../../interaction/dataconverter";
5
- export interface ITimeComponentOptions<T> {
6
- id?: string;
7
- class?: string;
8
- style?: string;
9
- placeholder?: string;
10
- value?: Date;
11
- onChange?: EventHandler<Date> | ((v?: Date) => void);
12
- bindTo?: T;
13
- property?: keyof T;
14
- bindMode?: "toModel" | "fromModel" | "both";
15
- converter?: IDataConverter<any, Date>;
16
- enabled?: boolean;
17
- inputMode?: "HourMinute" | "HourMinuteSecond";
18
- }
19
- export declare class TimeComponent<T = any> implements IJSLComponent {
20
- private options;
21
- private currentDom;
22
- constructor(options: ITimeComponentOptions<T>);
23
- render(): IJSLVNode;
24
- onCreate(node: IJSLVNode): void;
25
- onUpdate(node: IJSLVNode): void;
26
- getValue(): string;
27
- getValueAsDate(datePart: Date): Date;
28
- private raiseChangeEvent;
29
- }