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,249 +0,0 @@
1
- /**
2
- * Row Move Manager options:
3
- * cssClass: A CSS class to be added to the menu item container.
4
- * columnId: Column definition id (defaults to "_move")
5
- * cancelEditOnDrag: Do we want to cancel any Editing while dragging a row (defaults to false)
6
- * disableRowSelection: Do we want to disable the row selection? (defaults to false)
7
- * hideRowMoveShadow: Do we want to hide the row move shadow clone? (defaults to true)
8
- * rowMoveShadowMarginTop: When row move shadow is shown, optional margin-top (defaults to 0)
9
- * rowMoveShadowMarginLeft: When row move shadow is shown, optional margin-left (defaults to 0)
10
- * rowMoveShadowOpacity: When row move shadow is shown, what is its opacity? (defaults to 0.95)
11
- * rowMoveShadowScale: When row move shadow is shown, what is its size scale? (default to 0.75)
12
- * singleRowMove: Do we want a single row move? Setting this to false means that it's a multple row move (defaults to false)
13
- * width: Width of the column
14
- * usabilityOverride: Callback method that user can override the default behavior of the row being moveable or not
15
- *
16
- */
17
- import "./slick.rowmovemanager.css";
18
- import { jQueryReplacement } from "../../core/jq";
19
- import { Slick } from "../slick.core";
20
- var $ = jQueryReplacement;
21
- // register namespace
22
- $.deepExtend(window, {
23
- "Slick": {
24
- "RowMoveManager": RowMoveManager
25
- }
26
- });
27
- export function RowMoveManager(options) {
28
- var _grid;
29
- var _canvas;
30
- var _dragging;
31
- var _self = this;
32
- var _usabilityOverride = null;
33
- var _handler = new Slick.EventHandler();
34
- var _defaults = {
35
- columnId: "_move",
36
- cssClass: null,
37
- cancelEditOnDrag: false,
38
- disableRowSelection: false,
39
- hideRowMoveShadow: true,
40
- rowMoveShadowMarginTop: 0,
41
- rowMoveShadowMarginLeft: 0,
42
- rowMoveShadowOpacity: 0.95,
43
- rowMoveShadowScale: 0.75,
44
- singleRowMove: false,
45
- width: 40,
46
- };
47
- // user could override the expandable icon logic from within the options or after instantiating the plugin
48
- if (options && typeof options.usabilityOverride === 'function') {
49
- usabilityOverride(options.usabilityOverride);
50
- }
51
- function init(grid) {
52
- options = $.deepExtend({}, _defaults, options);
53
- _grid = grid;
54
- _canvas = _grid.getCanvasNode();
55
- _handler
56
- .subscribe(_grid.onDragInit, handleDragInit)
57
- .subscribe(_grid.onDragStart, handleDragStart)
58
- .subscribe(_grid.onDrag, handleDrag)
59
- .subscribe(_grid.onDragEnd, handleDragEnd);
60
- }
61
- function destroy() {
62
- _handler.unsubscribeAll();
63
- }
64
- function setOptions(newOptions) {
65
- options = $.shallowExtend({}, options, newOptions);
66
- }
67
- function handleDragInit(e) {
68
- // // prevent the grid from cancelling drag'n'drop by default
69
- // e.stopImmediatePropagation();
70
- }
71
- function handleDragStart(e, dd) {
72
- var cell = _grid.getCellFromEvent(e);
73
- var currentRow = cell && cell.row;
74
- var dataContext = _grid.getDataItem(currentRow);
75
- if (!checkUsabilityOverride(currentRow, dataContext, _grid)) {
76
- return;
77
- }
78
- if (options.cancelEditOnDrag && _grid.getEditorLock().isActive()) {
79
- _grid.getEditorLock().cancelCurrentEdit();
80
- }
81
- if (_grid.getEditorLock().isActive() || !isHandlerColumn(cell.cell)) {
82
- return false;
83
- }
84
- _dragging = true;
85
- e.stopImmediatePropagation();
86
- // optionally create a shadow element of the row so that we can see all the time which row exactly we're dragging
87
- if (!options.hideRowMoveShadow) {
88
- var $slickRowElm = $(_grid.getCellNode(cell.row, cell.cell)).closestClass('slick-row');
89
- if ($slickRowElm.length) {
90
- dd.clonedSlickRow = $($slickRowElm[0].cloneNode(true))
91
- .addClass('slick-reorder-shadow-row')
92
- .css("marginTop", options.rowMoveShadowMarginTop || 0)
93
- .css("marginLeft", options.rowMoveShadowMarginLeft || 0)
94
- .css("opacity", options.rowMoveShadowOpacity || 0.95)
95
- .css("transform", "scale(" + options.rowMoveShadowScale + ")")
96
- .css("display", "none")
97
- .appendTo(_canvas);
98
- }
99
- }
100
- var selectedRows = options.singleRowMove ? [cell.row] : _grid.getSelectedRows();
101
- if (selectedRows.length === 0 || selectedRows.indexOf(cell.row) === -1) {
102
- selectedRows = [cell.row];
103
- if (!options.disableRowSelection) {
104
- _grid.setSelectedRows(selectedRows);
105
- }
106
- }
107
- var rowHeight = _grid.getOptions().rowHeight;
108
- dd.selectedRows = selectedRows;
109
- var canvasWidth = _canvas.getBoundingClientRect().width;
110
- dd.selectionProxy = $(document.createElement("div")) //"<div class='slick-reorder-proxy'/>")
111
- .addClass("slick-reorder-proxy")
112
- .css("position", "absolute")
113
- .css("zIndex", "99999")
114
- .css("width", canvasWidth) // $(_canvas).innerWidth())
115
- .css("height", rowHeight * selectedRows.length)
116
- .css("display", "none")
117
- .appendTo(_canvas);
118
- dd.guide = $(document.createElement("div")) // "<div class='slick-reorder-guide'/>")
119
- .addClass("slick-reorder-guide")
120
- .css("position", "absolute")
121
- .css("zIndex", "99998")
122
- .css("width", canvasWidth)
123
- .css("top", -1000)
124
- .appendTo(_canvas);
125
- dd.insertBefore = -1;
126
- }
127
- function handleDrag(e, dd) {
128
- if (!_dragging) {
129
- return;
130
- }
131
- // e.preventDefault();
132
- e.stopImmediatePropagation();
133
- var top = dd.pageY - $(_canvas).offset().top;
134
- dd.selectionProxy.css("top", top - 5).css("display", ""); //.show();
135
- // if the row move shadow is enabled, we'll also make it follow the mouse cursor
136
- if (dd.clonedSlickRow) {
137
- var offsetY = dd.pageY - $(_canvas).offset().top;
138
- dd.clonedSlickRow.css("top", offsetY - 6).css("display", ""); //.show();
139
- }
140
- var insertBefore = Math.max(0, Math.min(Math.round(top / _grid.getOptions().rowHeight), _grid.getDataLength()));
141
- if (insertBefore !== dd.insertBefore) {
142
- var eventData = {
143
- "grid": _grid,
144
- "rows": dd.selectedRows,
145
- "insertBefore": insertBefore
146
- };
147
- if (_self.onBeforeMoveRows.notify(eventData) === false) {
148
- dd.canMove = false;
149
- }
150
- else {
151
- dd.canMove = true;
152
- }
153
- // if there's a UsabilityOverride defined, we also need to verify that the condition is valid
154
- if (_usabilityOverride && dd.canMove) {
155
- var insertBeforeDataContext = _grid.getDataItem(insertBefore);
156
- dd.canMove = checkUsabilityOverride(insertBefore, insertBeforeDataContext, _grid);
157
- }
158
- // if the new target is possible we'll display the dark blue bar (representin the acceptability) at the target position
159
- // else it won't show up (it will be off the screen)
160
- if (!dd.canMove) {
161
- dd.guide.css("top", -1000);
162
- }
163
- else {
164
- dd.guide.css("top", insertBefore * _grid.getOptions().rowHeight);
165
- }
166
- dd.insertBefore = insertBefore;
167
- }
168
- }
169
- function handleDragEnd(e, dd) {
170
- if (!_dragging) {
171
- return;
172
- }
173
- _dragging = false;
174
- e.stopImmediatePropagation();
175
- if (dd.guide == null) {
176
- console.log("dd.guide");
177
- }
178
- else
179
- dd.guide.remove();
180
- if (dd.selectionProxy == null) {
181
- console.log(" dd.selectionProxy");
182
- }
183
- else
184
- dd.selectionProxy.remove();
185
- if (dd.clonedSlickRow) {
186
- dd.clonedSlickRow.remove();
187
- dd.clonedSlickRow = null;
188
- }
189
- if (dd.canMove) {
190
- var eventData = {
191
- "grid": _grid,
192
- "rows": dd.selectedRows,
193
- "insertBefore": dd.insertBefore
194
- };
195
- // TODO: _grid.remapCellCssClasses ?
196
- _self.onMoveRows.notify(eventData);
197
- }
198
- }
199
- function getColumnDefinition() {
200
- return {
201
- id: options.columnId || "_move",
202
- name: "",
203
- field: "move",
204
- width: options.width || 40,
205
- behavior: "selectAndMove",
206
- selectable: false,
207
- resizable: false,
208
- cssClass: options.cssClass,
209
- formatter: moveIconFormatter
210
- };
211
- }
212
- function moveIconFormatter(row, cell, value, columnDef, dataContext, grid) {
213
- if (!checkUsabilityOverride(row, dataContext, grid)) {
214
- return null;
215
- }
216
- else {
217
- return { addClasses: "cell-reorder dnd", text: "" };
218
- }
219
- }
220
- function checkUsabilityOverride(row, dataContext, grid) {
221
- if (typeof _usabilityOverride === 'function') {
222
- return _usabilityOverride(row, dataContext, grid);
223
- }
224
- return true;
225
- }
226
- /**
227
- * Method that user can pass to override the default behavior or making every row moveable.
228
- * In order word, user can choose which rows to be an available as moveable (or not) by providing his own logic show/hide icon and usability.
229
- * @param overrideFn: override function callback
230
- */
231
- function usabilityOverride(overrideFn) {
232
- _usabilityOverride = overrideFn;
233
- }
234
- function isHandlerColumn(columnIndex) {
235
- return /move|selectAndMove/.test(_grid.getColumns()[columnIndex].behavior);
236
- }
237
- $.shallowExtend(this, {
238
- "onBeforeMoveRows": new Slick.Event(),
239
- "onMoveRows": new Slick.Event(),
240
- "init": init,
241
- "destroy": destroy,
242
- "getColumnDefinition": getColumnDefinition,
243
- "setOptions": setOptions,
244
- "usabilityOverride": usabilityOverride,
245
- "isHandlerColumn": isHandlerColumn,
246
- "pluginName": "RowMoveManager"
247
- });
248
- }
249
- // })(jQuery);
@@ -1 +0,0 @@
1
- export declare function RowSelectionModel(options?: any): void;
@@ -1,167 +0,0 @@
1
- import { jQueryReplacement } from '../../core/jq';
2
- import { Slick } from '../slick.core';
3
- var $ = jQueryReplacement;
4
- // register namespace
5
- $.deepExtend(window, {
6
- "Slick": {
7
- "RowSelectionModel": RowSelectionModel
8
- }
9
- });
10
- export function RowSelectionModel(options) {
11
- var _grid;
12
- var _ranges = [];
13
- var _self = this;
14
- var _handler = new Slick.EventHandler();
15
- var _inHandler;
16
- var _options;
17
- var _defaults = {
18
- selectActiveRow: true
19
- };
20
- function init(grid) {
21
- _options = $.deepExtend({}, _defaults, options);
22
- _grid = grid;
23
- _handler.subscribe(_grid.onActiveCellChanged, wrapHandler(handleActiveCellChange));
24
- _handler.subscribe(_grid.onKeyDown, wrapHandler(handleKeyDown));
25
- _handler.subscribe(_grid.onClick, wrapHandler(handleClick));
26
- }
27
- function destroy() {
28
- _handler.unsubscribeAll();
29
- }
30
- function wrapHandler(handler) {
31
- return function () {
32
- if (!_inHandler) {
33
- _inHandler = true;
34
- handler.apply(this, arguments);
35
- _inHandler = false;
36
- }
37
- };
38
- }
39
- function rangesToRows(ranges) {
40
- var rows = [];
41
- for (var i = 0; i < ranges.length; i++) {
42
- for (var j = ranges[i].fromRow; j <= ranges[i].toRow; j++) {
43
- rows.push(j);
44
- }
45
- }
46
- return rows;
47
- }
48
- function rowsToRanges(rows) {
49
- var ranges = [];
50
- var lastCell = _grid.getColumns().length - 1;
51
- for (var i = 0; i < rows.length; i++) {
52
- ranges.push(new Slick.Range(rows[i], 0, rows[i], lastCell));
53
- }
54
- return ranges;
55
- }
56
- function getRowsRange(from, to) {
57
- var i, rows = [];
58
- for (i = from; i <= to; i++) {
59
- rows.push(i);
60
- }
61
- for (i = to; i < from; i++) {
62
- rows.push(i);
63
- }
64
- return rows;
65
- }
66
- function getSelectedRows() {
67
- return rangesToRows(_ranges);
68
- }
69
- function setSelectedRows(rows) {
70
- setSelectedRanges(rowsToRanges(rows));
71
- }
72
- function setSelectedRanges(ranges) {
73
- // simple check for: empty selection didn't change, prevent firing onSelectedRangesChanged
74
- if ((!_ranges || _ranges.length === 0) && (!ranges || ranges.length === 0)) {
75
- return;
76
- }
77
- _ranges = ranges;
78
- _self.onSelectedRangesChanged.notify(_ranges);
79
- }
80
- function getSelectedRanges() {
81
- return _ranges;
82
- }
83
- function handleActiveCellChange(e, data) {
84
- if (_options.selectActiveRow && data.row != null) {
85
- setSelectedRanges([new Slick.Range(data.row, 0, data.row, _grid.getColumns().length - 1)]);
86
- }
87
- }
88
- function handleKeyDown(e) {
89
- var activeRow = _grid.getActiveCell();
90
- if (_grid.getOptions().multiSelect && activeRow
91
- && e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey
92
- && (e.which == Slick.keyCode.UP || e.which == Slick.keyCode.DOWN)) {
93
- var selectedRows = getSelectedRows();
94
- selectedRows.sort(function (x, y) {
95
- return x - y;
96
- });
97
- if (!selectedRows.length) {
98
- selectedRows = [activeRow.row];
99
- }
100
- var top = selectedRows[0];
101
- var bottom = selectedRows[selectedRows.length - 1];
102
- var active;
103
- if (e.which == Slick.keyCode.DOWN) {
104
- active = activeRow.row < bottom || top == bottom ? ++bottom : ++top;
105
- }
106
- else {
107
- active = activeRow.row < bottom ? --bottom : --top;
108
- }
109
- if (active >= 0 && active < _grid.getDataLength()) {
110
- _grid.scrollRowIntoView(active);
111
- var tempRanges = rowsToRanges(getRowsRange(top, bottom));
112
- setSelectedRanges(tempRanges);
113
- }
114
- e.preventDefault();
115
- e.stopPropagation();
116
- }
117
- }
118
- function handleClick(e) {
119
- var cell = _grid.getCellFromEvent(e);
120
- if (!cell || !_grid.canCellBeActive(cell.row, cell.cell)) {
121
- return false;
122
- }
123
- if (!_grid.getOptions().multiSelect || (!e.ctrlKey && !e.shiftKey && !e.metaKey)) {
124
- return false;
125
- }
126
- var selection = rangesToRows(_ranges);
127
- var idx = selection.indexOf(cell.row);
128
- //var idx = $.inArray(cell.row, selection);
129
- if (idx === -1 && (e.ctrlKey || e.metaKey)) {
130
- selection.push(cell.row);
131
- _grid.setActiveCell(cell.row, cell.cell);
132
- }
133
- else if (idx !== -1 && (e.ctrlKey || e.metaKey)) {
134
- selection = selection.filter(function (o, i) {
135
- return (o !== cell.row);
136
- });
137
- _grid.setActiveCell(cell.row, cell.cell);
138
- }
139
- else if (selection.length && e.shiftKey) {
140
- var last = selection.pop();
141
- var from = Math.min(cell.row, last);
142
- var to = Math.max(cell.row, last);
143
- selection = [];
144
- for (var i = from; i <= to; i++) {
145
- if (i !== last) {
146
- selection.push(i);
147
- }
148
- }
149
- selection.push(last);
150
- _grid.setActiveCell(cell.row, cell.cell);
151
- }
152
- var tempRanges = rowsToRanges(selection);
153
- setSelectedRanges(tempRanges);
154
- e.stopImmediatePropagation();
155
- return true;
156
- }
157
- $.shallowExtend(this, {
158
- "getSelectedRows": getSelectedRows,
159
- "setSelectedRows": setSelectedRows,
160
- "getSelectedRanges": getSelectedRanges,
161
- "setSelectedRanges": setSelectedRanges,
162
- "init": init,
163
- "destroy": destroy,
164
- "pluginName": "RowSelectionModel",
165
- "onSelectedRangesChanged": new Slick.Event()
166
- });
167
- }
@@ -1,154 +0,0 @@
1
- /*
2
- IMPORTANT:
3
- In order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes.
4
- No built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS
5
- classes should alter those!
6
- */
7
-
8
- .slick-header-columns {
9
- border-bottom: 2px solid silver;
10
- }
11
-
12
- .slick-header-column {
13
- border-right: 1px solid silver;
14
- text-align: center;
15
- font-weight: bold;
16
- }
17
-
18
- .slick-header-column:hover, .slick-header-column-active {
19
- background: #3B99FF;
20
- color: #ffffff;
21
- }
22
-
23
-
24
- .slick-header-column > .slick-header-menubutton:hover {
25
- background-color: rgba(0,0,0,0.3);
26
- }
27
-
28
- .slick-headerrow {
29
- background: #fafafa;
30
- }
31
-
32
- .slick-headerrow-column {
33
- background: #fafafa;
34
- border-bottom: 0;
35
- height: 100%;
36
- }
37
-
38
- .slick-row.ui-state-active {
39
- background: #F5F7D7;
40
- }
41
-
42
- .slick-row {
43
- position: absolute;
44
- background: white;
45
- border: 0px;
46
- line-height: 26px;
47
- }
48
-
49
- /* what is this used for ? */
50
- .slick-row.selected {
51
- z-index: 10;
52
- background: #DFE8F6;
53
- }
54
-
55
- .slick-cell {
56
- padding-left: 4px;
57
- padding-right: 4px;
58
- }
59
-
60
- .slick-group {
61
- border-bottom: 2px solid silver;
62
- }
63
-
64
- .slick-group .slick-cell {
65
- background:#D4E4EC;
66
- }
67
-
68
- .slick-group-toggle {
69
- width: 9px;
70
- height: 9px;
71
- margin-right: 5px;
72
- }
73
-
74
- .slick-group-toggle.expanded {
75
- background: url('data:image/gif;base64,R0lGODlhCQAJAPcAAAFGeoCAgNXz/+v5/+v6/+z5/+36//L7//X8//j9/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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
- }
80
-
81
- .slick-group-totals {
82
- color: gray;
83
- background: white;
84
- }
85
-
86
- .slick-group-select-checkbox {
87
- width: 13px;
88
- height: 13px;
89
- margin: 3px 10px 0 0;
90
- display: inline-block;
91
- }
92
-
93
- .slick-cell.selected {
94
- background-color: #CDE6F7;
95
- }
96
-
97
- .slick-cell.active {
98
- border-color: #017DBE;
99
- border-style: solid;
100
- }
101
-
102
- .slick-sortable-placeholder {
103
- background: silver !important;
104
- }
105
-
106
- .slick-row.odd {
107
- background: #ededed;
108
- }
109
-
110
- .slick-row.ui-state-active {
111
- background: #F5F7D7;
112
- }
113
-
114
- .slick-row.loading {
115
- opacity: 0.5;
116
- filter: alpha(opacity = 50);
117
- }
118
-
119
- .slick-cell.invalid {
120
- border-color: red;
121
- animation-duration: 0.2s;
122
- -moz-animation-duration: 0.2s;
123
- -webkit-animation-duration: 0.2s;
124
- animation-name: slickgrid-invalid-hilite;
125
- -moz-animation-name: slickgrid-invalid-hilite;
126
- -webkit-animation-name: slickgrid-invalid-hilite;
127
- }
128
-
129
- @keyframes slickgrid-invalid-hilite {
130
- from { box-shadow: 0 0 6px red; }
131
- to { box-shadow: none; }
132
- }
133
-
134
- @-moz-keyframes slickgrid-invalid-hilite {
135
- from { box-shadow: 0 0 6px red; }
136
- to { box-shadow: none; }
137
- }
138
-
139
- @-webkit-keyframes slickgrid-invalid-hilite {
140
- from { box-shadow: 0 0 6px red; }
141
- to { box-shadow: none; }
142
- }
143
-
144
- /* .slick-grid {
145
- background: white;
146
- outline: 0;
147
- border: 1px solid #a0a0a0;
148
- border-radius: 3px;
149
- } */
150
-
151
- .new-row .slick-cell {
152
- border-top: solid 1px #aaaaaa;
153
- background: #3B99FF55;
154
- }
@@ -1,90 +0,0 @@
1
- import { IjQueryReplacement } from "../core/jq";
2
- import { ISlickGrid } from "./slick.grid";
3
- export interface ISlick {
4
- "Event": () => void;
5
- "EventData": () => void;
6
- "EventHandler": () => void;
7
- "Range": (fromRow: number, fromCell: number, toRow?: number, toCell?: number) => void;
8
- "NonDataRow": () => void;
9
- "Group": any;
10
- "GroupTotals": any;
11
- "EditorLock": () => void;
12
- "GlobalEditorLock": any;
13
- "keyCode": any;
14
- "preClickClassName": string;
15
- $: IjQueryReplacement;
16
- }
17
- export interface ISlickEvent<T> {
18
- subscribe(fnc: (e: any, args: T) => any): any;
19
- notify(args: T, e: any): any;
20
- countHandlers(): number;
21
- }
22
- export interface ISlickFormatterResult {
23
- addClasses?: string[];
24
- toolTip?: string;
25
- text?: string;
26
- }
27
- export declare type ISlickFormatter = (row: number, cell: number, value: any, columnDef: ISlickColumn, dataContext: any, grid?: ISlickGrid<any>) => string | ISlickFormatterResult;
28
- export interface ISlickColumn {
29
- id: string;
30
- field?: string;
31
- name?: string;
32
- resizable?: boolean;
33
- sortable?: boolean;
34
- minWidth?: number;
35
- width?: number;
36
- maxWidth?: number;
37
- previousWidth?: number;
38
- rerenderOnResize?: boolean;
39
- headerCssClass?: string;
40
- defaultSortAsc?: boolean;
41
- focusable?: boolean;
42
- selectable?: boolean;
43
- format?: string;
44
- formatter?: ISlickFormatter;
45
- cssClass?: string;
46
- columnGroup?: string;
47
- editor?: any;
48
- editorOptions?: any;
49
- readonly?: boolean;
50
- valueList?: string[] | {
51
- [key: string]: string;
52
- } | Array<{
53
- text: string;
54
- value: any;
55
- }>;
56
- sortByVisibleValue?: boolean;
57
- comparer?: (a: any, b: any) => 0 | 1 | -1;
58
- header?: {
59
- buttons: [{
60
- image?: string;
61
- html?: string;
62
- showOnHover?: boolean;
63
- handler: (e: any) => void;
64
- cssClass?: string;
65
- tooltip?: string;
66
- command?: string;
67
- }];
68
- };
69
- filterable?: boolean;
70
- hideMenu?: boolean;
71
- toolTip?: string;
72
- maxLength?: number;
73
- alwaysRenderColumn?: boolean;
74
- asyncPostRender?: (node: HTMLElement, row: number, item: Text, column: ISlickColumn, status: boolean) => void;
75
- asyncPostRenderCleanup?: (node: HTMLElement, row: number, column: ISlickColumn) => void;
76
- cannotTriggerInsert?: boolean;
77
- groupTotalsFormatter?: (item: any, columnDef: ISlickColumn, grid: any) => string | ISlickFormatterResult;
78
- behavior?: string;
79
- }
80
- export declare let Slick: ISlick;
81
- /***
82
- * A structure containing a range of cells.
83
- * @class Range
84
- * @constructor
85
- * @param fromRow {Integer} Starting row.
86
- * @param fromCell {Integer} Starting cell.
87
- * @param toRow {Integer} Optional. Ending row. Defaults to <code>fromRow</code>.
88
- * @param toCell {Integer} Optional. Ending cell. Defaults to <code>fromCell</code>.
89
- */
90
- export declare function Range(fromRow: number, fromCell: number, toRow?: number, toCell?: number): void;