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,317 +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 { VirtualRenderComponent } from "../virtual-render/VirtualRenderComponent";
11
- import { EventHandler } from "../../interaction/eventhandler";
12
- function isInternetExplorer() {
13
- return window.navigator.userAgent.indexOf("MSIE ") > 0 || !!window.navigator.userAgent.match(/Trident.*rv\:11\./);
14
- }
15
- var SelectDDAreaComponent = /** @class */ (function () {
16
- function SelectDDAreaComponent(options, component, args) {
17
- this.options = options;
18
- this.component = component;
19
- this.args = args;
20
- this.onRender = new EventHandler();
21
- this.isScrolling = false;
22
- if (args.searchTxt) {
23
- this.search(args.searchTxt);
24
- }
25
- this.focusFirst();
26
- }
27
- SelectDDAreaComponent.prototype.onCreate = function (node) {
28
- var _this = this;
29
- var _a, _b;
30
- this.dom = node.dom;
31
- this.scrollContainer = this.dom.querySelector(".sel-dd-items");
32
- var item = this.component.getSelected();
33
- if (item != null) {
34
- if (Array.isArray(item)) {
35
- item = item[0];
36
- }
37
- if (item != null) {
38
- var d = (_b = (_a = this.renderedData) !== null && _a !== void 0 ? _a : this.filteredData) !== null && _b !== void 0 ? _b : this.options.data;
39
- var idx = d.indexOf(item);
40
- this.scrollContainer.scrollTop = this.options.rowHeight * idx;
41
- }
42
- }
43
- //bugfix for IE -> blur event of search box is called when user clicks scroll bar
44
- if (isInternetExplorer()) {
45
- this.scrollContainer.addEventListener("scroll", function (e) {
46
- _this.isScrolling = true;
47
- setTimeout(function () {
48
- _this.isScrolling = false;
49
- _this.dom.querySelector(".sel-search input").focus();
50
- }, 20);
51
- });
52
- this.scrollContainer.addEventListener("mousedown", function (e) {
53
- if (e.offsetX > _this.scrollContainer.clientWidth || e.offsetY > _this.scrollContainer.clientHeight) {
54
- _this.isScrolling = true;
55
- setTimeout(function () {
56
- _this.isScrolling = false;
57
- _this.dom.querySelector(".sel-search input").focus();
58
- }, 20);
59
- }
60
- });
61
- }
62
- };
63
- SelectDDAreaComponent.prototype.render = function () {
64
- var _this = this;
65
- var _a;
66
- var data = (_a = this.filteredData) !== null && _a !== void 0 ? _a : this.options.data;
67
- if (this.options.groupProperty != null) {
68
- var sortedData = __spreadArray([], data, true);
69
- sortedData.sort(function (a, b) {
70
- return a[_this.options.groupProperty] < b[_this.options.groupProperty] ? -1
71
- : a[_this.options.groupProperty] > b[_this.options.groupProperty] ? 1 : (data.indexOf(a) - data.indexOf(b) // preserve order if it is for same group
72
- );
73
- });
74
- data = [];
75
- var prevGroupVal = NaN;
76
- for (var _i = 0, sortedData_1 = sortedData; _i < sortedData_1.length; _i++) {
77
- var x = sortedData_1[_i];
78
- if (x[this.options.groupProperty] !== prevGroupVal) {
79
- // create group entry
80
- data.push({ __isGroup: true, __groupValue: x[this.options.groupProperty] });
81
- prevGroupVal = x[this.options.groupProperty];
82
- }
83
- data.push(x);
84
- }
85
- }
86
- this.onRender.notify(data);
87
- this.renderedData = data;
88
- var ddNode = {
89
- tag: "div", animation: this.options.enableAnimation ? { attr: "opacity", from: "0", to: "1", duration: 400 } : undefined, children: [
90
- {
91
- tag: "div", attr: { class: "sel-search", style: this.options.enableSearch ? undefined : "height:0;padding:0;margin:0;border:none;" },
92
- children: [
93
- {
94
- tag: "input", attr: {
95
- type: "text", value: this.args.searchTxt, placeholder: "Search", blur: function (e) {
96
- e.preventDefault();
97
- if (isInternetExplorer()) {
98
- requestAnimationFrame(function () {
99
- if (!_this.isScrolling) {
100
- _this.component.close();
101
- }
102
- });
103
- }
104
- else {
105
- _this.component.close();
106
- }
107
- return false;
108
- }, input: function (e, node) {
109
- if (!_this.options.enableSearch) {
110
- return false;
111
- }
112
- var term = node.dom.value;
113
- if (!term) {
114
- _this.clearSearch();
115
- }
116
- else {
117
- _this.search(term);
118
- }
119
- }, keydown: function (e, node) {
120
- var _a;
121
- if (!_this.options.enableKeyboard) {
122
- return;
123
- }
124
- if (e.which === SelectDDAreaComponent.ESCAPE_KEY) {
125
- node.dom.blur();
126
- }
127
- else if (e.which === SelectDDAreaComponent.DOWN_KEY) {
128
- _this.navigateDown();
129
- }
130
- else if (e.which === SelectDDAreaComponent.UP_KEY) {
131
- _this.navigateUp();
132
- }
133
- else if (e.which === SelectDDAreaComponent.ENTER_KEY) { // TODO: multiselect
134
- var focus_1 = _this.component.getFocus();
135
- if (focus_1 == null) {
136
- // if only 1 result is left then auto select this entry
137
- var d = (_a = _this.filteredData) !== null && _a !== void 0 ? _a : _this.options.data;
138
- if (d.length === 1) {
139
- focus_1 = d[0];
140
- }
141
- }
142
- if (_this.options.multiple) {
143
- if (focus_1 != null) {
144
- var currentSelection = _this.component.getSelected();
145
- if (currentSelection.indexOf(focus_1) >= 0) {
146
- currentSelection.splice(currentSelection.indexOf(focus_1), 1);
147
- }
148
- else {
149
- currentSelection.push(focus_1);
150
- }
151
- _this.component.setSelected(currentSelection);
152
- }
153
- }
154
- else {
155
- if (focus_1 != null) {
156
- _this.component.setSelected(focus_1);
157
- }
158
- node.dom.blur();
159
- }
160
- }
161
- else if (e.which === SelectDDAreaComponent.TAB_KEY) {
162
- e.preventDefault();
163
- node.dom.blur();
164
- }
165
- }
166
- }
167
- }
168
- ]
169
- },
170
- new VirtualRenderComponent({
171
- class: "sel-dd-items" + (this.options.multiple ? " multiple" : ""),
172
- data: data,
173
- style: this.options.enableSearch ? "height:calc(100% - 1.8rem)" : "height:100%",
174
- viewportSizeInPX: this.args.renderHeight + 20,
175
- bufferSizeInPx: 20,
176
- renderRow: function (args) {
177
- var result = { tag: "div", attr: { class: "sel-dd-item" } };
178
- if (_this.options.groupProperty && args.rowData.__isGroup) {
179
- result.attr.class += " sel-dd-group";
180
- var groupValue = args.rowData.__groupValue;
181
- var groupArgs = {
182
- groupValue: groupValue,
183
- node: result
184
- };
185
- var resGroup = _this.options.onRenderGroup(groupArgs);
186
- if (resGroup != null) {
187
- result.children = [resGroup];
188
- }
189
- result.attr.mousedown = function (evt) {
190
- evt.preventDefault();
191
- evt.stopPropagation();
192
- evt.stopImmediatePropagation();
193
- };
194
- return result;
195
- }
196
- var renderArg = {
197
- data: args.rowData,
198
- node: result,
199
- isFocused: _this.component.getFocus() === args.rowData,
200
- isSelected: _this.options.multiple ?
201
- _this.component.getSelected().indexOf(args.rowData) >= 0 :
202
- _this.component.getSelected() === args.rowData,
203
- isCurrent: false
204
- };
205
- if (renderArg.isFocused) {
206
- result.attr.class += " focused";
207
- }
208
- if (renderArg.isSelected) {
209
- result.attr.class += " selected";
210
- }
211
- result.attr.mousedown = function (evt) {
212
- if (_this.options.multiple) {
213
- evt.preventDefault();
214
- evt.stopPropagation();
215
- evt.stopImmediatePropagation();
216
- var currentSelection = _this.component.getSelected();
217
- if (currentSelection.indexOf(args.rowData) >= 0) {
218
- currentSelection.splice(currentSelection.indexOf(args.rowData), 1);
219
- _this.component.setSelected(currentSelection);
220
- }
221
- else {
222
- _this.component.setSelected(args.rowData);
223
- }
224
- }
225
- else {
226
- _this.component.setSelected(args.rowData);
227
- }
228
- };
229
- var res = _this.options.onRender(renderArg);
230
- if (res != null) {
231
- result.children = [res];
232
- }
233
- return result;
234
- },
235
- rowHeight: this.options.rowHeight
236
- })
237
- ]
238
- };
239
- return ddNode;
240
- };
241
- SelectDDAreaComponent.prototype.navigateDown = function () {
242
- var _a, _b, _c;
243
- var d = (_b = (_a = this.renderedData) !== null && _a !== void 0 ? _a : this.filteredData) !== null && _b !== void 0 ? _b : this.options.data;
244
- var selItem = (_c = this.component.getFocus()) !== null && _c !== void 0 ? _c : this.component.getSelected();
245
- if (selItem == null) {
246
- this.component.setFocus(d.filter(function (x) { return !x.__isGroup; })[0]);
247
- return;
248
- }
249
- if (Array.isArray(selItem)) {
250
- selItem = selItem[0];
251
- }
252
- var idx = d.indexOf(selItem);
253
- if (idx < 0) {
254
- this.component.setFocus(d.filter(function (x) { return !x.__isGroup; })[0]);
255
- }
256
- else {
257
- while (idx < d.length - 1) {
258
- idx++;
259
- if (!d[idx].__isGroup) {
260
- this.component.setFocus(d[idx]);
261
- this.scrollContainer.scrollTop = this.options.rowHeight * idx;
262
- break;
263
- }
264
- }
265
- }
266
- };
267
- SelectDDAreaComponent.prototype.navigateUp = function () {
268
- var _a, _b, _c;
269
- var d = (_b = (_a = this.renderedData) !== null && _a !== void 0 ? _a : this.filteredData) !== null && _b !== void 0 ? _b : this.options.data;
270
- var selItem = (_c = this.component.getFocus()) !== null && _c !== void 0 ? _c : this.component.getSelected();
271
- if (selItem == null) {
272
- this.component.setFocus(d.filter(function (x) { return !x.__isGroup; })[0]);
273
- return;
274
- }
275
- if (Array.isArray(selItem)) {
276
- selItem = selItem[0];
277
- }
278
- var idx = d.indexOf(selItem);
279
- while (idx > 0) {
280
- idx--;
281
- if (!d[idx].__isGroup) {
282
- this.component.setFocus(d[idx]);
283
- this.scrollContainer.scrollTop = this.options.rowHeight * idx;
284
- return;
285
- }
286
- }
287
- this.component.setFocus(d.filter(function (x) { return !x.__isGroup; })[0]);
288
- };
289
- SelectDDAreaComponent.prototype.search = function (term) {
290
- var _this = this;
291
- var _a, _b, _c, _d;
292
- var oldLen = (_b = (_a = this.filteredData) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
293
- this.filteredData = this.options.data.filter(function (d) { return _this.options.matchSearch(d, term); });
294
- var newLen = (_d = (_c = this.filteredData) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0;
295
- if (oldLen !== newLen && this.scrollContainer != null) {
296
- this.scrollContainer.scrollTop = 0;
297
- }
298
- this.focusFirst();
299
- };
300
- SelectDDAreaComponent.prototype.clearSearch = function () {
301
- this.filteredData = null;
302
- this.focusFirst();
303
- };
304
- SelectDDAreaComponent.prototype.focusFirst = function () {
305
- var _a;
306
- if (this.options.focusFirstItem && (this.component.getSelected() == null || this.component.getSelected().length === 0)) /* TODO multiselect */ {
307
- this.component.setFocus(((_a = this.filteredData) !== null && _a !== void 0 ? _a : this.options.data)[0]);
308
- }
309
- };
310
- SelectDDAreaComponent.ESCAPE_KEY = 27;
311
- SelectDDAreaComponent.DOWN_KEY = 40;
312
- SelectDDAreaComponent.UP_KEY = 38;
313
- SelectDDAreaComponent.ENTER_KEY = 13;
314
- SelectDDAreaComponent.TAB_KEY = 9;
315
- return SelectDDAreaComponent;
316
- }());
317
- export { SelectDDAreaComponent };
@@ -1,187 +0,0 @@
1
- .select-comp {
2
- border: solid 1px #bdbdbd;
3
- border-radius: 0.2rem;
4
- position: relative;
5
- min-width: 8rem;
6
- display: inline-block;
7
- box-sizing: border-box;
8
- padding-left: 0.2rem;
9
- height: 1.6rem;
10
- line-height: 1.6rem;
11
- vertical-align: middle;
12
-
13
- &.expanded {
14
- border-color: #3B99FF;
15
- }
16
-
17
- &.disabled {
18
- color:#999999;
19
- }
20
-
21
- .sel-result {
22
-
23
- .clear-btn {
24
- position: absolute;
25
- right: 1.2rem;
26
- top: 0;
27
- font-size: 1.4rem;
28
- line-height: 1.4rem;
29
- font-weight: bold;
30
- color: #999999;
31
- font-family: sans-serif;
32
- cursor: pointer;
33
- opacity: 0.3;
34
- z-index: 10;
35
- border: none;
36
- background: none;
37
-
38
- &:not([disabled]):hover {
39
- color:#d00000;
40
- }
41
- }
42
-
43
- &:hover .clear-btn:not([disabled]) {
44
- opacity: 1;
45
- }
46
- }
47
-
48
- .sel-expander {
49
- position: absolute;
50
- top: 0;
51
- right: 0;
52
- bottom: 0;
53
- width: 1.5rem;
54
- box-sizing: border-box;
55
- border: none;
56
- // border-left: solid 2px #bdbdbd;
57
- // border-bottom-left-radius: 3px;
58
- // border-top-left-radius: 3px;
59
- text-align: center;
60
- border-bottom-right-radius: 0.2rem;
61
- border-top-right-radius: 0.2rem;
62
- background: white;
63
- opacity: 0.7;
64
- cursor: pointer;
65
- font-size: 0.65em;
66
-
67
- &:focus {
68
- outline:0;
69
- color: white;
70
- background: #3b9aff;
71
- }
72
- }
73
-
74
- .sel-expander::before {
75
- content: "";
76
- display: block;
77
- position: absolute;
78
- left: 0;
79
- top: 2px;
80
- bottom: 2px;
81
- width: 0;
82
- box-sizing: content-box;
83
- padding: 0;
84
- margin: 0;
85
- border-left: solid 1px #bdbdbd;
86
- // box-shadow: -1px 0px 1px 1px #f0f0f0;
87
- }
88
-
89
- .sel-dd-item {
90
- overflow: hidden;
91
- display: block;
92
- height: 100%;
93
- margin-right: 2.6rem;
94
- white-space: nowrap;
95
- }
96
-
97
- &:hover .sel-expander {
98
- opacity: 1;
99
- background: #dadada;
100
- }
101
- }
102
-
103
- .sel-comp-dd {
104
- position: absolute;
105
- // overflow: hidden;
106
- box-sizing: border-box;
107
- background: white;
108
- z-index:2010;
109
-
110
- > div {
111
- position: absolute;
112
- top: 0; left: 0; right: 0; bottom: 0;
113
- box-sizing: border-box;
114
- border: solid 1px #bcbcbc;
115
- border-radius: 2px;
116
- white-space: nowrap;
117
- overflow: hidden;
118
- cursor: pointer;
119
- }
120
-
121
- .sel-search {
122
- height: 1.8rem;
123
- padding: 0.1rem;
124
- overflow: hidden;
125
- box-sizing: border-box;
126
- }
127
-
128
- .sel-search > input {
129
- height: 1.6rem;
130
- line-height: 1.6rem;
131
- border: none;
132
- border-bottom: 2px solid #c8c8c8;
133
- margin: 0 2px;
134
- width: calc(100% - 4px);
135
- box-sizing: border-box;
136
-
137
- &:focus {
138
- outline: none;
139
- }
140
- }
141
-
142
- .sel-dd-item:not(.sel-dd-group) {
143
- &:hover {
144
- background: #d0d0d0;
145
- }
146
- }
147
-
148
- .sel-dd-items {
149
-
150
- .focused {
151
- background: #CCE8FF;
152
- }
153
- .selected {
154
- background: #3B99FF;
155
- }
156
- }
157
-
158
- .sel-dd-items.multiple {
159
- .sel-dd-item {
160
- padding-left: 1rem;
161
- }
162
- .sel-dd-item.selected {
163
- // padding-left: 0;
164
- &::before {
165
- content: "✓";
166
- position: absolute;
167
- color: #404040;
168
- font-weight: bold;
169
- left: 0;
170
- }
171
- }
172
- }
173
-
174
- .sel-dd-item {
175
- height: 100%;
176
- line-height: 26px;
177
- }
178
-
179
- .sel-dd-group {
180
- font-weight: bold;
181
- background: #e0e0e0;
182
- text-align: center;
183
- // &:hover {
184
- // background: #d0d0d0;
185
- // }
186
- }
187
- }