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,4 +0,0 @@
1
- export declare function TextEditor(args: any): void;
2
- export declare function MultiLineTextEditor(args: any): void;
3
- export declare function NumericEditor(args: any): void;
4
- export declare function BooleanEditor(args: any): void;
@@ -1,232 +0,0 @@
1
- /*
2
- * Contains basic SlickGrid editors.
3
- */
4
- import { numeric } from "../core/numeric";
5
- import { handleKeydownLRNav, handleKeydownLRNoNav } from "./slick.editors.nav";
6
- export function TextEditor(args) {
7
- var input;
8
- var defaultValue;
9
- var scope = this;
10
- this.init = function () {
11
- var navOnLR = args.grid.getOptions().editorCellNavOnLRKeys;
12
- input = document.createElement("input");
13
- input.type = "text";
14
- input.className = "editor-text";
15
- if (args.column.maxLength > 0) {
16
- input.maxLength = args.column.maxLength;
17
- }
18
- input.addEventListener("keydown", navOnLR ? handleKeydownLRNav : handleKeydownLRNoNav);
19
- args.container.appendChild(input);
20
- input.focus();
21
- input.select();
22
- };
23
- this.destroy = function () {
24
- input.parentElement.removeChild(input);
25
- };
26
- this.focus = function () {
27
- input.focus();
28
- };
29
- this.getValue = function () {
30
- return input.value;
31
- };
32
- this.setValue = function (val) {
33
- input.value = val;
34
- };
35
- this.loadValue = function (item) {
36
- defaultValue = item[args.column.field] || "";
37
- input.value = defaultValue;
38
- input.defaultValue = defaultValue;
39
- input.select();
40
- };
41
- this.serializeValue = function () {
42
- return input.value;
43
- };
44
- this.applyValue = function (item, state) {
45
- item[args.column.field] = state;
46
- };
47
- this.isValueChanged = function () {
48
- return (!(input.value == "" && defaultValue == null)) && (input.value != defaultValue);
49
- };
50
- this.validate = function () {
51
- if (args.column.validator) {
52
- var validationResults = args.column.validator(input.value);
53
- if (!validationResults.valid) {
54
- return validationResults;
55
- }
56
- }
57
- return {
58
- valid: true,
59
- msg: null
60
- };
61
- };
62
- this.init();
63
- }
64
- export function MultiLineTextEditor(args) {
65
- var input;
66
- var defaultValue;
67
- var scope = this;
68
- this.init = function () {
69
- var navOnLR = args.grid.getOptions().editorCellNavOnLRKeys;
70
- input = document.createElement("textarea");
71
- if (args.column.maxLength > 0) {
72
- input.maxLength = args.column.maxLength;
73
- }
74
- input.className = "editor-text";
75
- input.addEventListener("keydown", navOnLR ? handleKeydownLRNav : handleKeydownLRNoNav);
76
- args.container.appendChild(input);
77
- input.focus();
78
- input.select();
79
- };
80
- this.destroy = function () {
81
- input.parentElement.removeChild(input);
82
- };
83
- this.focus = function () {
84
- input.focus();
85
- };
86
- this.getValue = function () {
87
- return input.value;
88
- };
89
- this.setValue = function (val) {
90
- input.value = val;
91
- };
92
- this.loadValue = function (item) {
93
- defaultValue = item[args.column.field] || "";
94
- input.value = defaultValue;
95
- input.defaultValue = defaultValue;
96
- input.select();
97
- };
98
- this.serializeValue = function () {
99
- return input.value;
100
- };
101
- this.applyValue = function (item, state) {
102
- item[args.column.field] = state;
103
- };
104
- this.isValueChanged = function () {
105
- return (!(input.value == "" && defaultValue == null)) && (input.value != defaultValue);
106
- };
107
- this.validate = function () {
108
- if (args.column.validator) {
109
- var validationResults = args.column.validator(input.value);
110
- if (!validationResults.valid) {
111
- return validationResults;
112
- }
113
- }
114
- return {
115
- valid: true,
116
- msg: null
117
- };
118
- };
119
- this.init();
120
- }
121
- export function NumericEditor(args) {
122
- var input;
123
- var defaultValue;
124
- var scope = this;
125
- this.init = function () {
126
- var navOnLR = args.grid.getOptions().editorCellNavOnLRKeys;
127
- input = document.createElement("input");
128
- input.type = "text";
129
- input.className = "editor-text right";
130
- input.addEventListener("keydown", navOnLR ? handleKeydownLRNav : handleKeydownLRNoNav);
131
- args.container.appendChild(input);
132
- input.focus();
133
- input.select();
134
- };
135
- this.destroy = function () {
136
- input.parentElement.removeChild(input);
137
- };
138
- this.focus = function () {
139
- input.focus();
140
- };
141
- // function getDecimalPlaces() {
142
- // // returns the number of fixed decimal places or null
143
- // var rtn = args.column.editorFixedDecimalPlaces;
144
- // if (typeof rtn == 'undefined') {
145
- // rtn = (<any>FloatEditor).DefaultDecimalPlaces;
146
- // }
147
- // return (!rtn && rtn!==0 ? null : rtn);
148
- // }
149
- this.loadValue = function (item) {
150
- defaultValue = item[args.column.field];
151
- var val_as_str = numeric.format(defaultValue, args.column.format);
152
- input.value = val_as_str;
153
- input.select();
154
- };
155
- this.serializeValue = function () {
156
- return numeric.parse(input.value);
157
- };
158
- this.applyValue = function (item, state) {
159
- item[args.column.field] = state;
160
- };
161
- this.isValueChanged = function () {
162
- return numeric.parse(input.value) !== defaultValue;
163
- };
164
- this.validate = function () {
165
- if (input.value !== "" && numeric.parse(input.value) === undefined) {
166
- return {
167
- valid: false,
168
- msg: "Please enter a valid number"
169
- };
170
- }
171
- if (args.column.validator) {
172
- var validationResults = args.column.validator(numeric.parse(input.value));
173
- if (!validationResults.valid) {
174
- return validationResults;
175
- }
176
- }
177
- return {
178
- valid: true,
179
- msg: null
180
- };
181
- };
182
- this.init();
183
- }
184
- export function BooleanEditor(args) {
185
- var $select;
186
- var defaultValue;
187
- var scope = this;
188
- this.init = function () {
189
- $select = document.createElement("select");
190
- $select.setAttribute("tabIndex", "0");
191
- $select.className = "editor-yesno"; // <OPTION value='-'>-</OPTION>
192
- $select.innerHTML = "<OPTION value='yes'>✔</OPTION><OPTION value='no'>-</OPTION>";
193
- args.container.appendChild($select);
194
- args.container.style.textAlign = "center";
195
- $select.focus();
196
- };
197
- this.destroy = function () {
198
- $select.parentElement.removeChild($select);
199
- };
200
- this.focus = function () {
201
- $select.focus();
202
- };
203
- this.loadValue = function (item) {
204
- defaultValue = item[args.column.field];
205
- $select.value = defaultValue == null ? "-" : (defaultValue ? "yes" : "no");
206
- $select.focus();
207
- //$select.select();
208
- };
209
- this.serializeValue = function () {
210
- if ($select.value === "-") {
211
- return null;
212
- }
213
- return ($select.value === "yes");
214
- };
215
- this.applyValue = function (item, state) {
216
- item[args.column.field] = state;
217
- };
218
- this.isValueChanged = function () {
219
- if ($select.value === "-" && defaultValue == null) {
220
- return false;
221
- }
222
- var v = $select.value === "yes";
223
- return (v !== defaultValue);
224
- };
225
- this.validate = function () {
226
- return {
227
- valid: true,
228
- msg: null
229
- };
230
- };
231
- this.init();
232
- }
@@ -1,2 +0,0 @@
1
- export declare function DateEditor(args: any): void;
2
- export declare function TimeEditor(args: any): void;
@@ -1,125 +0,0 @@
1
- import { handleKeydownLRNav, handleKeydownLRNoNav } from "./slick.editors.nav";
2
- import { DatePicker } from "../ui/date.picker";
3
- import { date } from "../core/date";
4
- export function DateEditor(args) {
5
- var input;
6
- var defaultValue;
7
- var scope = this;
8
- var datePicker;
9
- this.init = function () {
10
- var navOnLR = args.grid.getOptions().editorCellNavOnLRKeys;
11
- input = document.createElement("input");
12
- input.type = "text";
13
- input.className = "editor-text";
14
- input.addEventListener("keydown", navOnLR ? handleKeydownLRNav : handleKeydownLRNoNav);
15
- args.container.appendChild(input);
16
- datePicker = DatePicker(input, { mode: 'dp-below' });
17
- datePicker.on("close", function () {
18
- input.focus();
19
- input.select();
20
- });
21
- input.focus();
22
- };
23
- this.destroy = function () {
24
- datePicker.destroy();
25
- input.remove();
26
- };
27
- this.show = function () {
28
- //so far not necessary
29
- };
30
- this.hide = function () {
31
- datePicker.close();
32
- };
33
- this.position = function (position) {
34
- //so far not necessary
35
- };
36
- this.focus = function () {
37
- input.focus();
38
- };
39
- this.loadValue = function (item) {
40
- defaultValue = date.onlyDate(item[args.column.field]);
41
- var val_as_str = date.format(defaultValue, args.column.format);
42
- input.value = val_as_str;
43
- input.select();
44
- };
45
- this.serializeValue = function () {
46
- return date.onlyDate(date.parse(input.value, args.column.format));
47
- };
48
- this.applyValue = function (item, state) {
49
- item[args.column.field] = state;
50
- };
51
- this.isValueChanged = function () {
52
- return (!(input.value == "" && !defaultValue)) && !date.equal(date.onlyDate(date.parse(input.value, args.column.format)), defaultValue);
53
- };
54
- this.validate = function () {
55
- if (args.column.validator) {
56
- var validationResults = args.column.validator(date.onlyDate(date.parse(input.value, args.column.format)));
57
- if (!validationResults.valid) {
58
- return validationResults;
59
- }
60
- }
61
- return {
62
- valid: true,
63
- msg: null
64
- };
65
- };
66
- this.init();
67
- }
68
- export function TimeEditor(args) {
69
- var input;
70
- var defaultValue;
71
- var scope = this;
72
- this.init = function () {
73
- var navOnLR = args.grid.getOptions().editorCellNavOnLRKeys;
74
- input = document.createElement("input");
75
- input.type = "time";
76
- input.className = "editor-text";
77
- if (args.column.maxLength > 0) {
78
- input.maxLength = args.column.maxLength;
79
- }
80
- input.addEventListener("keydown", navOnLR ? handleKeydownLRNav : handleKeydownLRNoNav);
81
- args.container.appendChild(input);
82
- input.focus();
83
- input.select();
84
- };
85
- this.destroy = function () {
86
- input.parentElement.removeChild(input);
87
- };
88
- this.focus = function () {
89
- input.focus();
90
- };
91
- this.getValue = function () {
92
- return input.value;
93
- };
94
- this.setValue = function (val) {
95
- input.value = val;
96
- };
97
- this.loadValue = function (item) {
98
- defaultValue = item[args.column.field] || "";
99
- input.value = defaultValue;
100
- input.defaultValue = defaultValue;
101
- input.select();
102
- };
103
- this.serializeValue = function () {
104
- return input.value;
105
- };
106
- this.applyValue = function (item, state) {
107
- item[args.column.field] = state;
108
- };
109
- this.isValueChanged = function () {
110
- return (!(input.value == "" && defaultValue == null)) && (input.value != defaultValue);
111
- };
112
- this.validate = function () {
113
- if (args.column.validator) {
114
- var validationResults = args.column.validator(input.value);
115
- if (!validationResults.valid) {
116
- return validationResults;
117
- }
118
- }
119
- return {
120
- valid: true,
121
- msg: null
122
- };
123
- };
124
- this.init();
125
- }
@@ -1,14 +0,0 @@
1
- import { IJSLVNode } from "jsl-render";
2
- import { ISelectRenderArg } from "../components/select/SelectComponent";
3
- export declare function MultiLookupEditor(args: any): void;
4
- export interface ILookupEditorOptions {
5
- enableSearch?: boolean;
6
- class?: string;
7
- placeholder?: boolean;
8
- allowEmpty?: boolean;
9
- rowHeight?: number;
10
- onRender?: (args: ISelectRenderArg) => void | IJSLVNode;
11
- matchSearch?: (data: any, term: string) => boolean;
12
- }
13
- export declare function LookupEditor(args: any): void;
14
- export declare function AutoSuggestEditor(args: any): void;