jsl-ui 9.18.3 → 9.19.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 (213) hide show
  1. package/lib/components/IntervalComponent.d.ts +17 -0
  2. package/lib/components/IntervalComponent.js +68 -0
  3. package/lib/components/auto-suggest/AutoSuggestComponent.d.ts +22 -0
  4. package/lib/components/auto-suggest/AutoSuggestComponent.js +49 -0
  5. package/lib/components/button/ButtonComponent.d.ts +18 -0
  6. package/lib/components/button/ButtonComponent.js +46 -0
  7. package/lib/components/checkbox/CheckBoxComponent.d.ts +28 -0
  8. package/lib/components/checkbox/CheckBoxComponent.js +94 -0
  9. package/lib/components/checkbox/CheckBoxStyle.scss +86 -0
  10. package/lib/components/date/DateComponent.d.ts +32 -0
  11. package/lib/components/date/DateComponent.js +106 -0
  12. package/lib/components/date-range/DateRangeComponent.d.ts +35 -0
  13. package/lib/components/date-range/DateRangeComponent.js +136 -0
  14. package/lib/components/date-range/DateRangeStyle.scss +12 -0
  15. package/lib/components/date-time/DateTimeComponent.d.ts +15 -0
  16. package/lib/components/date-time/DateTimeComponent.js +53 -0
  17. package/lib/components/date-time/DateTimeStyle.scss +7 -0
  18. package/lib/components/dialog/DialogComponent.d.ts +67 -0
  19. package/lib/components/dialog/DialogComponent.js +242 -0
  20. package/lib/components/drop-down/DropDownComponent.d.ts +27 -0
  21. package/lib/components/drop-down/DropDownComponent.js +74 -0
  22. package/lib/components/expander/ExpanderComponent.d.ts +27 -0
  23. package/lib/components/expander/ExpanderComponent.js +90 -0
  24. package/lib/components/expander/ExpanderStyle.scss +47 -0
  25. package/lib/components/expander/OldExpanderStyle.scss +37 -0
  26. package/lib/components/form-field/FormComponent.d.ts +12 -0
  27. package/lib/components/form-field/FormComponent.js +26 -0
  28. package/lib/components/form-field/FormFieldComponent.d.ts +38 -0
  29. package/lib/components/form-field/FormFieldComponent.js +139 -0
  30. package/lib/components/form-field/FormFieldStyle.scss +87 -0
  31. package/lib/components/grid/GridComponent.d.ts +26 -0
  32. package/lib/components/grid/GridComponent.js +116 -0
  33. package/lib/components/input/InputComponent.d.ts +33 -0
  34. package/lib/components/input/InputComponent.js +144 -0
  35. package/lib/components/loading/LoadingComponent.d.ts +8 -0
  36. package/lib/components/loading/LoadingComponent.js +22 -0
  37. package/lib/components/loading/LoadingStyle.css +29 -0
  38. package/lib/components/navigation/NavigationComponent.d.ts +34 -0
  39. package/lib/components/navigation/NavigationComponent.js +70 -0
  40. package/lib/components/navigation/NavigationStyle.scss +226 -0
  41. package/lib/components/notification/Notification.d.ts +17 -0
  42. package/lib/components/notification/Notification.js +56 -0
  43. package/lib/components/notification/Notification.scss +19 -0
  44. package/lib/components/number/NumberComponent.d.ts +25 -0
  45. package/lib/components/number/NumberComponent.js +87 -0
  46. package/lib/components/overlay/OverlayComponent.d.ts +27 -0
  47. package/lib/components/overlay/OverlayComponent.js +149 -0
  48. package/lib/components/overlay/overlay.css +57 -0
  49. package/lib/components/progress/ProgressComponent.d.ts +18 -0
  50. package/lib/components/progress/ProgressComponent.js +42 -0
  51. package/lib/components/progress/ProgressStyle.scss +15 -0
  52. package/lib/components/ribbon-menu/RibbonMenuComponent.d.ts +12 -0
  53. package/lib/components/ribbon-menu/RibbonMenuComponent.js +34 -0
  54. package/lib/components/ribbon-menu/RibbonMenuStyle.scss +76 -0
  55. package/lib/components/select/SelectComponent.d.ts +79 -0
  56. package/lib/components/select/SelectComponent.js +362 -0
  57. package/lib/components/select/SelectDDAreaComponent.d.ts +32 -0
  58. package/lib/components/select/SelectDDAreaComponent.js +317 -0
  59. package/lib/components/select/SelectStyle.scss +187 -0
  60. package/lib/components/slider/nouislider.css +310 -0
  61. package/lib/components/slider/nouislider.d.ts +44 -0
  62. package/lib/components/slider/nouislider.js +2158 -0
  63. package/lib/components/stack-panel/SplitterComponent.d.ts +21 -0
  64. package/lib/components/stack-panel/SplitterComponent.js +126 -0
  65. package/lib/components/stack-panel/SplitterStyle.scss +45 -0
  66. package/lib/components/stack-panel/StackPanelComponent.d.ts +20 -0
  67. package/lib/components/stack-panel/StackPanelComponent.js +64 -0
  68. package/lib/components/stack-panel/StackPanelStyle.scss +53 -0
  69. package/lib/components/tabs/TabsComponent.d.ts +39 -0
  70. package/lib/components/tabs/TabsComponent.js +177 -0
  71. package/lib/components/tabs/TabsStyle.scss +76 -0
  72. package/lib/components/time/TimeComponent.d.ts +29 -0
  73. package/lib/components/time/TimeComponent.js +113 -0
  74. package/lib/components/time/TimeComponent.scss +4 -0
  75. package/lib/components/tree-view/TreeViewComponent.d.ts +23 -0
  76. package/lib/components/tree-view/TreeViewComponent.js +45 -0
  77. package/lib/components/tree-view/TreeViewStyle.scss +96 -0
  78. package/lib/components/virtual-render/VirtualRenderComponent.d.ts +30 -0
  79. package/lib/components/virtual-render/VirtualRenderComponent.js +104 -0
  80. package/lib/components/virtual-render/VirtualRenderStyle.scss +9 -0
  81. package/lib/core/culture.d.ts +5 -0
  82. package/lib/core/culture.js +385 -0
  83. package/lib/core/date.d.ts +14 -0
  84. package/lib/core/date.js +350 -0
  85. package/lib/core/helper.d.ts +12 -0
  86. package/lib/core/helper.js +101 -0
  87. package/lib/core/jq.d.ts +37 -0
  88. package/lib/core/jq.js +371 -0
  89. package/lib/core/lang.d.ts +24 -0
  90. package/lib/core/lang.js +28 -0
  91. package/lib/core/numeric.d.ts +7 -0
  92. package/lib/core/numeric.js +143 -0
  93. package/lib/core/polyfills.d.ts +0 -0
  94. package/lib/core/polyfills.js +22 -0
  95. package/lib/core.d.ts +6 -0
  96. package/lib/core.js +6 -0
  97. package/lib/grid/controls/slick.columnpicker.css +46 -0
  98. package/lib/grid/controls/slick.draggablegrouping.css +52 -0
  99. package/lib/grid/controls/slick.gridmenu.css +127 -0
  100. package/lib/grid/controls/slick.pager.css +41 -0
  101. package/lib/grid/examples/examples.css +203 -0
  102. package/lib/grid/filterDialogs/dateRangeFilter.d.ts +7 -0
  103. package/lib/grid/filterDialogs/dateRangeFilter.js +156 -0
  104. package/lib/grid/filterDialogs/excelFilter.d.ts +9 -0
  105. package/lib/grid/filterDialogs/excelFilter.js +313 -0
  106. package/lib/grid/plugins/ext.overlay.css +28 -0
  107. package/lib/grid/plugins/ext.overlay.d.ts +2 -0
  108. package/lib/grid/plugins/ext.overlay.js +291 -0
  109. package/lib/grid/plugins/slick.cellrangedecorator.d.ts +12 -0
  110. package/lib/grid/plugins/slick.cellrangedecorator.js +68 -0
  111. package/lib/grid/plugins/slick.cellrangeselector.d.ts +1 -0
  112. package/lib/grid/plugins/slick.cellrangeselector.js +144 -0
  113. package/lib/grid/plugins/slick.cellselectionmodel.d.ts +1 -0
  114. package/lib/grid/plugins/slick.cellselectionmodel.js +194 -0
  115. package/lib/grid/plugins/slick.headerbuttons.css +40 -0
  116. package/lib/grid/plugins/slick.headerbuttons.d.ts +55 -0
  117. package/lib/grid/plugins/slick.headerbuttons.js +156 -0
  118. package/lib/grid/plugins/slick.headermenu.css +101 -0
  119. package/lib/grid/plugins/slick.headermenu.d.ts +74 -0
  120. package/lib/grid/plugins/slick.headermenu.js +260 -0
  121. package/lib/grid/plugins/slick.rowdetailview.css +37 -0
  122. package/lib/grid/plugins/slick.rowmovemanager.css +8 -0
  123. package/lib/grid/plugins/slick.rowmovemanager.d.ts +18 -0
  124. package/lib/grid/plugins/slick.rowmovemanager.js +249 -0
  125. package/lib/grid/plugins/slick.rowselectionmodel.d.ts +1 -0
  126. package/lib/grid/plugins/slick.rowselectionmodel.js +167 -0
  127. package/lib/grid/slick-default-theme.css +154 -0
  128. package/lib/grid/slick.core.d.ts +90 -0
  129. package/lib/grid/slick.core.js +574 -0
  130. package/lib/grid/slick.creator.d.ts +80 -0
  131. package/lib/grid/slick.creator.js +723 -0
  132. package/lib/grid/slick.dataview.d.ts +71 -0
  133. package/lib/grid/slick.dataview.js +1080 -0
  134. package/lib/grid/slick.editors.core.d.ts +4 -0
  135. package/lib/grid/slick.editors.core.js +232 -0
  136. package/lib/grid/slick.editors.date.d.ts +2 -0
  137. package/lib/grid/slick.editors.date.js +125 -0
  138. package/lib/grid/slick.editors.lookup.d.ts +14 -0
  139. package/lib/grid/slick.editors.lookup.js +353 -0
  140. package/lib/grid/slick.editors.nav.d.ts +6 -0
  141. package/lib/grid/slick.editors.nav.js +22 -0
  142. package/lib/grid/slick.formatters.d.ts +17 -0
  143. package/lib/grid/slick.formatters.js +137 -0
  144. package/lib/grid/slick.grid.css +325 -0
  145. package/lib/grid/slick.grid.d.ts +284 -0
  146. package/lib/grid/slick.grid.js +5395 -0
  147. package/lib/grid/slick.groupitemmetadataprovider.d.ts +39 -0
  148. package/lib/grid/slick.groupitemmetadataprovider.js +165 -0
  149. package/lib/grid/slick.tree.css +20 -0
  150. package/lib/grid/slick.tree.d.ts +33 -0
  151. package/lib/grid/slick.tree.js +220 -0
  152. package/lib/grid.d.ts +13 -0
  153. package/lib/grid.js +13 -0
  154. package/lib/index.css +2576 -0
  155. package/lib/index.css.map +1 -1
  156. package/lib/index.d.ts +56 -0
  157. package/lib/index.js +61 -10198
  158. package/lib/index.js.map +1 -1
  159. package/lib/interaction/dataconverter.d.ts +4 -0
  160. package/lib/interaction/dataconverter.js +1 -0
  161. package/lib/interaction/eventhandler.d.ts +13 -0
  162. package/lib/interaction/eventhandler.js +42 -0
  163. package/lib/interaction/moveable.css +0 -0
  164. package/lib/interaction/moveable.d.ts +39 -0
  165. package/lib/interaction/moveable.js +172 -0
  166. package/lib/interaction/resizable.css +33 -0
  167. package/lib/interaction/resizable.d.ts +37 -0
  168. package/lib/interaction/resizable.js +123 -0
  169. package/lib/ui/auto.suggest.css +14 -0
  170. package/lib/ui/auto.suggest.d.ts +18 -0
  171. package/lib/ui/auto.suggest.js +258 -0
  172. package/lib/ui/base.css +150 -0
  173. package/lib/ui/date.picker/css/date-range-picker.css +87 -0
  174. package/lib/ui/date.picker/css/tiny-date-picker.css +326 -0
  175. package/lib/ui/date.picker/date-picker-options.d.ts +11 -0
  176. package/lib/ui/date.picker/date-picker-options.js +76 -0
  177. package/lib/ui/date.picker/lib/date-manip.d.ts +74 -0
  178. package/lib/ui/date.picker/lib/date-manip.js +120 -0
  179. package/lib/ui/date.picker/lib/dom.d.ts +23 -0
  180. package/lib/ui/date.picker/lib/dom.js +28 -0
  181. package/lib/ui/date.picker/lib/emitter.d.ts +13 -0
  182. package/lib/ui/date.picker/lib/emitter.js +49 -0
  183. package/lib/ui/date.picker/lib/fns.d.ts +23 -0
  184. package/lib/ui/date.picker/lib/fns.js +43 -0
  185. package/lib/ui/date.picker/mode/base-mode.d.ts +26 -0
  186. package/lib/ui/date.picker/mode/base-mode.js +248 -0
  187. package/lib/ui/date.picker/mode/dropdown-mode.d.ts +28 -0
  188. package/lib/ui/date.picker/mode/dropdown-mode.js +50 -0
  189. package/lib/ui/date.picker/mode/index.d.ts +28 -0
  190. package/lib/ui/date.picker/mode/index.js +18 -0
  191. package/lib/ui/date.picker/mode/modal-mode.d.ts +25 -0
  192. package/lib/ui/date.picker/mode/modal-mode.js +17 -0
  193. package/lib/ui/date.picker/mode/permanent-mode.d.ts +29 -0
  194. package/lib/ui/date.picker/mode/permanent-mode.js +19 -0
  195. package/lib/ui/date.picker/views/day-picker.d.ts +40 -0
  196. package/lib/ui/date.picker/views/day-picker.js +155 -0
  197. package/lib/ui/date.picker/views/month-picker.d.ts +26 -0
  198. package/lib/ui/date.picker/views/month-picker.js +65 -0
  199. package/lib/ui/date.picker/views/year-picker.d.ts +20 -0
  200. package/lib/ui/date.picker/views/year-picker.js +66 -0
  201. package/lib/ui/date.picker.d.ts +66 -0
  202. package/lib/ui/date.picker.js +32 -0
  203. package/lib/ui/dialog.css +109 -0
  204. package/lib/ui/dialog.d.ts +22 -0
  205. package/lib/ui/dialog.js +113 -0
  206. package/lib/ui/drop.down.css +472 -0
  207. package/lib/ui/drop.down.d.ts +52 -0
  208. package/lib/ui/drop.down.js +2112 -0
  209. package/lib/ui/number.input.css +3 -0
  210. package/lib/ui/number.input.d.ts +12 -0
  211. package/lib/ui/number.input.js +64 -0
  212. package/lib/ui/tabs.css +53 -0
  213. package/package.json +1 -1
@@ -0,0 +1,144 @@
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 { EventHandler } from "../../interaction/eventhandler";
13
+ // tslint:disable-next-line: max-classes-per-file
14
+ var InputComponent = /** @class */ (function () {
15
+ function InputComponent(options) {
16
+ var _a;
17
+ this.options = __assign({ type: "text", enabled: true, bindMode: "toModel" }, options);
18
+ if (this.options.bindTo != null && this.options.property != null && this.options.value == null) {
19
+ this.options.value = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
20
+ this.options.converter.toUI(this.options.bindTo[this.options.property]) :
21
+ this.options.bindTo[this.options.property]);
22
+ }
23
+ this.options.onChange = EventHandler.Create(this.options.onChange);
24
+ this.options.onInput = EventHandler.Create(this.options.onInput);
25
+ if (this.options.type === "input") {
26
+ this.options.type = "text";
27
+ }
28
+ }
29
+ Object.defineProperty(InputComponent.prototype, "onChange", {
30
+ get: function () {
31
+ return this.options.onChange;
32
+ },
33
+ enumerable: false,
34
+ configurable: true
35
+ });
36
+ Object.defineProperty(InputComponent.prototype, "onInput", {
37
+ get: function () {
38
+ return this.options.onInput;
39
+ },
40
+ enumerable: false,
41
+ configurable: true
42
+ });
43
+ // public isEqual(node: IJSLComponent): boolean {
44
+ // return (this as any).__proto__ === (node as any).__proto__;
45
+ // }
46
+ InputComponent.prototype.render = function () {
47
+ var _a;
48
+ var val = this.options.value;
49
+ if (this.options.bindMode !== "toModel" && this.options.bindTo != null && this.options.property != null) {
50
+ if (this.onInput.count() > 0) {
51
+ this.options.bindOnInput = true;
52
+ }
53
+ var current = this.getValue();
54
+ var newVal = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
55
+ this.options.converter.toUI(this.options.bindTo[this.options.property]) :
56
+ this.options.bindTo[this.options.property]);
57
+ if (newVal !== current) {
58
+ val = newVal;
59
+ if (this.currentDom != null) {
60
+ this.currentDom.value = val !== null && val !== void 0 ? val : "";
61
+ }
62
+ }
63
+ }
64
+ return {
65
+ tag: this.options.type !== "textarea" ? "input" : "textarea",
66
+ attr: {
67
+ type: this.options.type !== "textarea" ? this.options.type : undefined,
68
+ disabled: !this.options.enabled ? "disabled" : undefined,
69
+ class: this.options.class,
70
+ style: this.options.style,
71
+ change: this.raiseChangeEvent,
72
+ input: this.raiseInputEvent,
73
+ value: this.options.type !== "textarea" ? val : undefined,
74
+ placeholder: this.options.placeholder,
75
+ id: typeof this.options.id === "string" ? this.options.id : undefined,
76
+ maxLength: this.options.maxLength
77
+ },
78
+ content: this.options.type === "textarea" ? val : undefined
79
+ };
80
+ };
81
+ InputComponent.prototype.getValue = function () {
82
+ if (this.currentDom == null) {
83
+ return "";
84
+ }
85
+ return this.currentDom.value;
86
+ };
87
+ InputComponent.prototype.setValue = function (value) {
88
+ var _a;
89
+ if (this.currentDom != null) {
90
+ this.currentDom.value = value;
91
+ }
92
+ if (this.options.bindMode !== "fromModel" && this.options.bindTo && this.options.property) {
93
+ this.options.bindTo[this.options.property] =
94
+ ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
95
+ }
96
+ };
97
+ InputComponent.prototype.onCreate = function (node) {
98
+ this.currentDom = node.dom;
99
+ };
100
+ // public onUpdate(node: IJSLVNode) {
101
+ // this.currentDom = node.dom as HTMLInputElement;
102
+ // if (this.options.bindMode !== "toModel" && this.options.bindTo != null && this.options.property != null) {
103
+ // if (this.onInput.count() > 0) {
104
+ // this.options.bindOnInput = true;
105
+ // }
106
+ // const current = this.getValue();
107
+ // const newVal = (this.options.converter?.toUI ?
108
+ // this.options.converter.toUI(this.options.bindTo[this.options.property]) :
109
+ // this.options.bindTo[this.options.property]) as string;
110
+ // if (newVal !== current) {
111
+ // if (this.currentDom != null) {
112
+ // this.currentDom.value = newVal ?? "";
113
+ // }
114
+ // }
115
+ // }
116
+ // }
117
+ InputComponent.prototype.raiseChangeEvent = function (e, node) {
118
+ var _a;
119
+ if (this.options.enabled) {
120
+ var value = node.dom.value;
121
+ if (this.options.bindMode !== "fromModel" && this.options.bindTo && this.options.property) {
122
+ this.options.bindTo[this.options.property] =
123
+ ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
124
+ }
125
+ this.options.onChange.notify(value);
126
+ }
127
+ };
128
+ InputComponent.prototype.raiseInputEvent = function (e, node) {
129
+ var _a;
130
+ if (this.onInput.count() === 0) {
131
+ return false;
132
+ }
133
+ if (this.options.enabled) {
134
+ var value = node.dom.value;
135
+ if (this.options.bindOnInput && this.options.bindMode !== "fromModel" && this.options.bindTo && this.options.property) {
136
+ this.options.bindTo[this.options.property] =
137
+ ((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
138
+ }
139
+ this.options.onInput.notify(value);
140
+ }
141
+ };
142
+ return InputComponent;
143
+ }());
144
+ export { InputComponent };
@@ -0,0 +1,8 @@
1
+ import "./LoadingStyle.css";
2
+ import { IJSLComponent, IJSLVNode } from "jsl-render";
3
+ export declare class LoadingComponent implements IJSLComponent {
4
+ private sizeInRem?;
5
+ constructor(sizeInRem?: number);
6
+ isEqual(node: IJSLComponent): boolean;
7
+ render(): IJSLVNode;
8
+ }
@@ -0,0 +1,22 @@
1
+ import "./LoadingStyle.css";
2
+ var LoadingComponent = /** @class */ (function () {
3
+ function LoadingComponent(sizeInRem) {
4
+ this.sizeInRem = sizeInRem;
5
+ if (sizeInRem == null) {
6
+ this.sizeInRem = 6;
7
+ }
8
+ }
9
+ LoadingComponent.prototype.isEqual = function (node) {
10
+ return this.__proto__ === node.__proto__;
11
+ };
12
+ LoadingComponent.prototype.render = function () {
13
+ return {
14
+ tag: "div",
15
+ attr: { style: "font-size:" + this.sizeInRem + "rem" },
16
+ content: "<div class='lds-dual-ring'></div>",
17
+ raw: true
18
+ };
19
+ };
20
+ return LoadingComponent;
21
+ }());
22
+ export { LoadingComponent };
@@ -0,0 +1,29 @@
1
+ .lds-dual-ring {
2
+ display: inline-block;
3
+ /* width: 80px;
4
+ height: 80px; */
5
+ width: 1em;
6
+ height: 1em;
7
+ }
8
+ .lds-dual-ring:after {
9
+ content: " ";
10
+ display: block;
11
+ width: 0.75em;
12
+ height: 0.75em;
13
+ margin: 0.2em;
14
+ /* width: 64px;
15
+ height: 64px;
16
+ margin: 8px; */
17
+ border-radius: 50%;
18
+ border: 0.08em solid #444444;
19
+ border-color: #444444 transparent #444444 transparent;
20
+ animation: lds-dual-ring 1.2s linear infinite;
21
+ }
22
+ @keyframes lds-dual-ring {
23
+ 0% {
24
+ transform: rotate(0deg);
25
+ }
26
+ 100% {
27
+ transform: rotate(360deg);
28
+ }
29
+ }
@@ -0,0 +1,34 @@
1
+ import "./NavigationStyle.scss";
2
+ import { IJSLComponent, IJSLVNode } from "jsl-render";
3
+ export interface INavItemChild {
4
+ content: string | IJSLVNode;
5
+ link?: string;
6
+ target?: string;
7
+ click?: (e: MouseEvent) => void;
8
+ }
9
+ export interface INavItem {
10
+ content: string | IJSLVNode;
11
+ link?: string;
12
+ target?: string;
13
+ children?: INavItemChild[];
14
+ click?: (e: MouseEvent) => void;
15
+ }
16
+ export interface INavigationOptions {
17
+ title: string | IJSLVNode;
18
+ titleLink?: string;
19
+ data: INavItem[];
20
+ style?: string;
21
+ class?: string;
22
+ position?: "default" | "static" | "fixed" | "fixed-bottom";
23
+ alignment?: "right" | "left";
24
+ id?: string;
25
+ }
26
+ export declare class NavigationComponent implements IJSLComponent {
27
+ private options;
28
+ constructor(options: INavigationOptions);
29
+ isEqual(node: IJSLComponent): boolean;
30
+ render(): IJSLVNode;
31
+ private itemToNode;
32
+ private isActive;
33
+ private toNode;
34
+ }
@@ -0,0 +1,70 @@
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
+ 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));
20
+ };
21
+ import "./NavigationStyle.scss";
22
+ var NavigationComponent = /** @class */ (function () {
23
+ function NavigationComponent(options) {
24
+ this.options = __assign({ position: "fixed", id: "luxbar-checkbox", alignment: "left" }, options);
25
+ }
26
+ NavigationComponent.prototype.isEqual = function (node) {
27
+ return this.__proto__ === node.__proto__;
28
+ };
29
+ NavigationComponent.prototype.render = function () {
30
+ var _this = this;
31
+ var _a, _b;
32
+ return {
33
+ tag: "header",
34
+ attr: { style: this.options.style, class: "nav-comp " + ((_a = this.options.class) !== null && _a !== void 0 ? _a : "") },
35
+ children: [
36
+ { tag: "div", attr: { class: "luxbar luxbar-" + this.options.position },
37
+ children: [
38
+ { tag: "input", attr: { type: "checkbox", class: "luxbar-checkbox", id: this.options.id } },
39
+ { tag: "div", attr: { class: "luxbar-menu luxbar-menu-" + this.options.alignment + " luxbar-menu-light" },
40
+ children: [{ tag: "ul", attr: { class: "luxbar-navigation" }, children: __spreadArray([
41
+ { tag: "li", attr: { class: "luxbar-header" }, children: [
42
+ { tag: "a", attr: { href: (_b = this.options.titleLink) !== null && _b !== void 0 ? _b : "#", class: "luxbar-brand" }, children: [this.toNode(this.options.title)] },
43
+ { tag: "label", attr: { class: "luxbar-hamburger luxbar-hamburger-spin", for: this.options.id },
44
+ children: [{ tag: "span" }] },
45
+ ] }
46
+ ], this.options.data.map(function (x) { return _this.itemToNode(x); }), true) }] }
47
+ ] }
48
+ ]
49
+ };
50
+ };
51
+ NavigationComponent.prototype.itemToNode = function (x) {
52
+ var _this = this;
53
+ var _a, _b, _c;
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: [
55
+ { tag: "a", attr: { href: (_b = x.link) !== null && _b !== void 0 ? _b : "#", target: x.target, click: x.click }, children: [this.toNode(x.content)] },
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)
57
+ ] };
58
+ };
59
+ NavigationComponent.prototype.isActive = function (link) {
60
+ return location.hash.startsWith(link);
61
+ };
62
+ NavigationComponent.prototype.toNode = function (content) {
63
+ if (typeof content === "string") {
64
+ return { tag: "span", content: content };
65
+ }
66
+ return content;
67
+ };
68
+ return NavigationComponent;
69
+ }());
70
+ export { NavigationComponent };
@@ -0,0 +1,226 @@
1
+ .nav-comp {
2
+
3
+ line-height: 1.9rem;
4
+
5
+ .dropdown ul {
6
+ border-bottom-left-radius: 6px;
7
+ border-bottom-right-radius: 6px;
8
+ }
9
+
10
+ .luxbar-default {
11
+ width: 100%;
12
+ position: relative;
13
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
14
+ z-index: 1010; }
15
+
16
+ .luxbar-static {
17
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
18
+ width: 100%;
19
+ position: absolute;
20
+ top: 0;
21
+ left: 0;
22
+ z-index: 1010; }
23
+ .luxbar-static .luxbar-checkbox:checked ~ .luxbar-menu {
24
+ position: absolute; }
25
+
26
+ .luxbar-fixed {
27
+ width: 100%;
28
+ position: fixed;
29
+ top: 0;
30
+ left: 0;
31
+ z-index: 1010;
32
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); }
33
+
34
+ .luxbar-fixed-bottom {
35
+ width: 100%;
36
+ position: fixed;
37
+ bottom: 0;
38
+ left: 0;
39
+ z-index: 1010;
40
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); }
41
+
42
+ .luxbar-hamburger span, .luxbar-hamburger span::before, .luxbar-hamburger span::after {
43
+ display: block;
44
+ height: 2px;
45
+ width: 26px;
46
+ transition: 0.6s ease; }
47
+
48
+ .luxbar-checkbox:checked ~ .luxbar-menu li .luxbar-hamburger span {
49
+ background-color: transparent; }
50
+ .luxbar-checkbox:checked ~ .luxbar-menu li .luxbar-hamburger span::before, .luxbar-checkbox:checked ~ .luxbar-menu li .luxbar-hamburger span::after {
51
+ margin-top: 0; }
52
+
53
+ .luxbar-header {
54
+ display: flex;
55
+ flex-direction: row;
56
+ justify-content: space-between;
57
+ align-items: center;
58
+ height: 58px; }
59
+
60
+ .luxbar-menu-left .luxbar-navigation,
61
+ .luxbar-menu-left .luxbar-header {
62
+ justify-content: flex-start; }
63
+
64
+ .luxbar-menu-right .luxbar-hamburger {
65
+ margin-left: auto; }
66
+
67
+ .luxbar-brand {
68
+ font-size: 1.6em;
69
+ padding: 18px 24px 18px 24px; }
70
+
71
+ .luxbar-menu {
72
+ min-height: 58px;
73
+ transition: 0.6s ease;
74
+ width: 100%; }
75
+
76
+ .luxbar-navigation {
77
+ display: flex;
78
+ flex-direction: column;
79
+ list-style: none;
80
+ padding-left: 0;
81
+ margin: 0; }
82
+
83
+ .luxbar-menu a,
84
+ .luxbar-item a {
85
+ text-decoration: none;
86
+ color: inherit;
87
+ cursor: pointer; }
88
+
89
+ .luxbar-item {
90
+ height: 58px; }
91
+ .luxbar-item a {
92
+ padding: 18px 24px 18px 24px;
93
+ display: block; }
94
+
95
+ .luxbar-hamburger {
96
+ padding: 18px 24px 18px 24px;
97
+ position: absolute;
98
+ right: 0;
99
+ cursor: pointer; }
100
+ .luxbar-hamburger span::before, .luxbar-hamburger span::after {
101
+ content: '';
102
+ position: absolute; }
103
+ .luxbar-hamburger span::before {
104
+ margin-top: -8px; }
105
+ .luxbar-hamburger span::after {
106
+ margin-top: 8px; }
107
+
108
+ .luxbar-checkbox {
109
+ display: none; }
110
+ .luxbar-checkbox:not(:checked) ~ .luxbar-menu {
111
+ overflow: hidden;
112
+ height: 58px; }
113
+ .luxbar-checkbox:checked ~ .luxbar-menu {
114
+ transition: height 0.6s ease;
115
+ height: 100vh;
116
+ overflow: auto; }
117
+
118
+ .dropdown {
119
+ position: relative;
120
+ height: auto;
121
+ min-height: 58px;
122
+ }
123
+
124
+ .dropdown:hover > ul {
125
+ position: relative;
126
+ display: block;
127
+ min-width: 100%; }
128
+ .dropdown > a::after {
129
+ position: absolute;
130
+ content: '';
131
+ right: 10px;
132
+ top: 25px;
133
+ border-width: 5px 5px 0;
134
+ border-color: transparent;
135
+ border-style: solid; }
136
+ .dropdown > ul {
137
+ display: block;
138
+ overflow-x: hidden;
139
+ list-style: none;
140
+ padding: 0; }
141
+ .dropdown > ul .luxbar-item {
142
+ min-width: 100%;
143
+ height: 29px;
144
+ padding: 5px 10px 5px 40px; }
145
+ .dropdown > ul .luxbar-item a {
146
+ min-height: 29px;
147
+ line-height: 29px;
148
+ padding: 0; }
149
+
150
+ @media screen and (min-width: 768px) {
151
+ .luxbar-navigation {
152
+ flex-flow: row;
153
+ justify-content: flex-end; }
154
+
155
+ .luxbar-hamburger {
156
+ display: none; }
157
+
158
+ .luxbar-checkbox:not(:checked) ~ .luxbar-menu {
159
+ overflow: visible; }
160
+ .luxbar-checkbox:checked ~ .luxbar-menu {
161
+ height: 58px; }
162
+
163
+ .luxbar-menu .luxbar-item {
164
+ border-top: 0; }
165
+
166
+ .luxbar-menu-right .luxbar-header {
167
+ margin-right: auto; }
168
+
169
+ .dropdown {
170
+ height: 58px; }
171
+ .dropdown:hover > ul {
172
+ position: absolute;
173
+ left: 0;
174
+ top: 58px;
175
+ padding: 0; }
176
+ .dropdown > ul {
177
+ display: none; }
178
+ .dropdown > ul .luxbar-item {
179
+ padding: 5px 10px; }
180
+ .dropdown > ul .luxbar-item a {
181
+ white-space: nowrap; } }
182
+ .luxbar-checkbox:checked + .luxbar-menu .luxbar-hamburger-doublespin span::before {
183
+ transform: rotate(225deg); }
184
+ .luxbar-checkbox:checked + .luxbar-menu .luxbar-hamburger-doublespin span::after {
185
+ transform: rotate(-225deg); }
186
+ .luxbar-checkbox:checked + .luxbar-menu .luxbar-hamburger-spin span::before {
187
+ transform: rotate(45deg); }
188
+ .luxbar-checkbox:checked + .luxbar-menu .luxbar-hamburger-spin span::after {
189
+ transform: rotate(-45deg); }
190
+
191
+ .luxbar-menu-dark,
192
+ .luxbar-menu-dark .dropdown ul {
193
+ background-color: #212121;
194
+ color: #fff; }
195
+
196
+ .luxbar-menu-dark .active,
197
+ .luxbar-menu-dark .luxbar-item:hover {
198
+ background-color: #424242; }
199
+ .luxbar-menu-dark .luxbar-hamburger span,
200
+ .luxbar-menu-dark .luxbar-hamburger span::before,
201
+ .luxbar-menu-dark .luxbar-hamburger span::after {
202
+ background-color: #fff; }
203
+
204
+ .luxbar-menu-light {
205
+ background-color: #e0e0e0;
206
+ color: #212121;
207
+ }
208
+
209
+ .luxbar-menu-light .dropdown ul {
210
+ background-color: #ffffff;
211
+ color: #212121;
212
+ // border: 1px solid #e0e0e0;
213
+ box-shadow: 0px 4px 3px 0px rgba(0,0,0,0.36);
214
+ li:not(:last-child) {
215
+ border-bottom: 1px solid #e0e0e0;
216
+ }
217
+ }
218
+
219
+ .luxbar-menu-light .active,
220
+ .luxbar-menu-light .luxbar-item:hover {
221
+ background-color: #bdbdbd; }
222
+ .luxbar-menu-light .luxbar-hamburger span,
223
+ .luxbar-menu-light .luxbar-hamburger span::before,
224
+ .luxbar-menu-light .luxbar-hamburger span::after {
225
+ background-color: #212121; }
226
+ }
@@ -0,0 +1,17 @@
1
+ import "./Notification.scss";
2
+ import { IJSLVNode, IJSLComponent } from "jsl-render";
3
+ export interface INotificationOptions {
4
+ content: string | IJSLVNode | IJSLComponent;
5
+ closeOnClick?: boolean;
6
+ timeOut?: number;
7
+ class?: string;
8
+ style?: string;
9
+ }
10
+ export declare class Notification {
11
+ static show(options: INotificationOptions): void;
12
+ static clearAll(): void;
13
+ private static container;
14
+ private static containerVNode;
15
+ private static renderer;
16
+ private static createContainer;
17
+ }
@@ -0,0 +1,56 @@
1
+ import "./Notification.scss";
2
+ import { JSLRender } from "jsl-render";
3
+ import { helper } from "../../core/helper";
4
+ var Notification = /** @class */ (function () {
5
+ function Notification() {
6
+ }
7
+ Notification.show = function (options) {
8
+ var _a;
9
+ if (Notification.container == null) {
10
+ Notification.createContainer();
11
+ }
12
+ // add
13
+ var notification = {
14
+ tag: "div",
15
+ attr: { id: helper.newDomGuid(), style: options.style, class: "jsl-notification " + (options.class || "") },
16
+ animation: { attr: "opacity", from: 0, to: 1, duration: 600 },
17
+ children: [
18
+ typeof options.content === "string" ? { tag: "div", content: options.content } : options.content
19
+ ]
20
+ };
21
+ Notification.containerVNode.children.push(notification);
22
+ Notification.renderer.refresh();
23
+ // remove
24
+ if (options.timeOut) {
25
+ setTimeout(function () {
26
+ var idx = Notification.containerVNode.children.indexOf(notification);
27
+ if (idx >= 0) {
28
+ Notification.containerVNode.children.splice(idx, 1);
29
+ }
30
+ Notification.renderer.refresh();
31
+ }, options.timeOut);
32
+ }
33
+ if (((_a = options.closeOnClick) !== null && _a !== void 0 ? _a : true) === true) {
34
+ notification.attr.click = function () {
35
+ var idx = Notification.containerVNode.children.indexOf(notification);
36
+ if (idx >= 0) {
37
+ Notification.containerVNode.children.splice(idx, 1);
38
+ }
39
+ };
40
+ }
41
+ };
42
+ Notification.clearAll = function () {
43
+ Notification.containerVNode.children = [];
44
+ Notification.renderer.refresh();
45
+ };
46
+ Notification.createContainer = function () {
47
+ Notification.container = document.createElement("div");
48
+ document.body.appendChild(Notification.container);
49
+ Notification.container.className = "jsl-notification-container";
50
+ Notification.containerVNode = { tag: "div", children: [] };
51
+ Notification.renderer = new JSLRender(Notification.container, false);
52
+ Notification.renderer.render(Notification.containerVNode);
53
+ };
54
+ return Notification;
55
+ }());
56
+ export { Notification };
@@ -0,0 +1,19 @@
1
+ .jsl-notification-container {
2
+ position: fixed;
3
+ top: 1px;
4
+ right: 1px;
5
+ overflow: visible;
6
+ z-index: 3020;
7
+
8
+ .jsl-notification {
9
+ box-sizing: border-box;
10
+ padding: 0.5rem;
11
+ min-width: 12rem;
12
+ border-radius: 0.3rem;
13
+ // border: 1px solid silver;
14
+ color: white;
15
+ background: #3B99FF;
16
+ margin: 0.2rem;
17
+ cursor: pointer;
18
+ }
19
+ }
@@ -0,0 +1,25 @@
1
+ import { IJSLComponent, IJSLVNode } from "jsl-render";
2
+ import { INumberInputOptions } from "../../ui/number.input";
3
+ import { EventHandler } from "../../interaction/eventhandler";
4
+ import { IDataConverter } from "../../interaction/dataconverter";
5
+ export interface INumberComponentOptions<T = any> extends INumberInputOptions {
6
+ id?: string;
7
+ class?: string;
8
+ style?: string;
9
+ placeholder?: string;
10
+ bindTo?: T;
11
+ bindMode?: "toModel" | "fromModel" | "both";
12
+ property?: keyof T;
13
+ converter?: IDataConverter<any, number>;
14
+ }
15
+ export declare class NumberComponent<T = any> implements IJSLComponent {
16
+ private currentDom;
17
+ private id;
18
+ private options;
19
+ constructor(options: INumberComponentOptions<T>);
20
+ get onChange(): EventHandler<number>;
21
+ render(): IJSLVNode;
22
+ getValue(): string;
23
+ getValueAsNumber(): number;
24
+ onCreate(node: IJSLVNode): void;
25
+ }