@revolist/revogrid 4.9.4 → 4.9.6

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 (203) hide show
  1. package/dist/cjs/{column.service-01f4a6c7.js → column.service-0615a373.js} +11 -12
  2. package/dist/cjs/column.service-0615a373.js.map +1 -0
  3. package/dist/cjs/{base.plugin-bf5f43a0.js → column.utils-694677fa.js} +136 -11
  4. package/dist/cjs/column.utils-694677fa.js.map +1 -0
  5. package/dist/cjs/edit.utils-2e1f4278.js +20 -0
  6. package/dist/cjs/edit.utils-2e1f4278.js.map +1 -0
  7. package/dist/cjs/{events-b28cc194.js → events-af8f6914.js} +1 -8
  8. package/dist/cjs/events-af8f6914.js.map +1 -0
  9. package/dist/cjs/{header-cell-renderer-3bc70679.js → header-cell-renderer-360528aa.js} +2 -2
  10. package/dist/cjs/{header-cell-renderer-3bc70679.js.map → header-cell-renderer-360528aa.js.map} +1 -1
  11. package/dist/cjs/{dimension.helpers-a6788214.js → index-2991afbb.js} +262 -4
  12. package/dist/cjs/index-2991afbb.js.map +1 -0
  13. package/dist/cjs/index.cjs.js +97 -35
  14. package/dist/cjs/index.cjs.js.map +1 -1
  15. package/dist/cjs/key.utils-b84b0eba.js +111 -0
  16. package/dist/cjs/key.utils-b84b0eba.js.map +1 -0
  17. package/dist/cjs/revo-grid.cjs.entry.js +140 -311
  18. package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
  19. package/dist/cjs/revogr-attribution_6.cjs.entry.js +37 -37
  20. package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +1 -1
  21. package/dist/cjs/revogr-clipboard_3.cjs.entry.js +10 -10
  22. package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
  23. package/dist/cjs/revogr-data_4.cjs.entry.js +13 -14
  24. package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
  25. package/dist/cjs/{viewport.store-35a3e7ee.js → row-header-utils-b5266b12.js} +13 -6
  26. package/dist/cjs/row-header-utils-b5266b12.js.map +1 -0
  27. package/dist/cjs/{selection.helpers-1a8c8d49.js → selection.helpers-4374518f.js} +13 -13
  28. package/dist/cjs/selection.helpers-4374518f.js.map +1 -0
  29. package/dist/cjs/{throttle-52be9e67.js → throttle-8885fd65.js} +2 -2
  30. package/dist/cjs/{throttle-52be9e67.js.map → throttle-8885fd65.js.map} +1 -1
  31. package/dist/collection/components/clipboard/revogr-clipboard.js +2 -2
  32. package/dist/collection/components/clipboard/revogr-clipboard.js.map +1 -1
  33. package/dist/collection/components/editors/revogr-edit.js +1 -1
  34. package/dist/collection/components/header/revogr-header.js +1 -1
  35. package/dist/collection/components/overlay/revogr-overlay-selection.js +1 -1
  36. package/dist/collection/components/revoGrid/revo-grid.js +12 -11
  37. package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
  38. package/dist/collection/index.js +1 -1
  39. package/dist/collection/index.js.map +1 -1
  40. package/dist/collection/plugins/base.plugin.js.map +1 -1
  41. package/dist/collection/plugins/column.auto-size.plugin.js +2 -2
  42. package/dist/collection/plugins/column.auto-size.plugin.js.map +1 -1
  43. package/dist/collection/plugins/column.stretch.plugin.js.map +1 -1
  44. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +1 -1
  45. package/dist/collection/plugins/moveColumn/column.drag.plugin.js +1 -1
  46. package/dist/collection/plugins/moveColumn/column.drag.plugin.js.map +1 -1
  47. package/dist/collection/plugins/sorting/sorting.plugin.js +2 -2
  48. package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
  49. package/dist/collection/services/column.data.provider.js +32 -88
  50. package/dist/collection/services/column.data.provider.js.map +1 -1
  51. package/dist/collection/services/dimension.provider.js +2 -2
  52. package/dist/collection/services/dimension.provider.js.map +1 -1
  53. package/dist/collection/types/interfaces.js.map +1 -1
  54. package/dist/collection/utils/column.utils.js +124 -0
  55. package/dist/collection/utils/column.utils.js.map +1 -0
  56. package/dist/collection/utils/index.js +7 -0
  57. package/dist/collection/utils/index.js.map +1 -1
  58. package/dist/esm/{column.service-5d14e7e9.js → column.service-af0694c5.js} +3 -4
  59. package/dist/esm/column.service-af0694c5.js.map +1 -0
  60. package/dist/esm/{base.plugin-5e7a3c51.js → column.utils-78dd3ef2.js} +122 -3
  61. package/dist/esm/column.utils-78dd3ef2.js.map +1 -0
  62. package/dist/esm/edit.utils-ca303802.js +17 -0
  63. package/dist/esm/edit.utils-ca303802.js.map +1 -0
  64. package/dist/esm/{events-77b43b40.js → events-cf0893a3.js} +2 -8
  65. package/dist/esm/events-cf0893a3.js.map +1 -0
  66. package/dist/esm/{header-cell-renderer-fc999784.js → header-cell-renderer-261317c3.js} +2 -2
  67. package/dist/esm/{header-cell-renderer-fc999784.js.map → header-cell-renderer-261317c3.js.map} +1 -1
  68. package/dist/esm/{dimension.helpers-56298828.js → index-f65def08.js} +231 -4
  69. package/dist/esm/index-f65def08.js.map +1 -0
  70. package/dist/esm/index.js +5 -4
  71. package/dist/esm/index.js.map +1 -1
  72. package/dist/esm/key.utils-4b0093d5.js +98 -0
  73. package/dist/esm/key.utils-4b0093d5.js.map +1 -0
  74. package/dist/esm/revo-grid.entry.js +50 -221
  75. package/dist/esm/revo-grid.entry.js.map +1 -1
  76. package/dist/esm/revogr-attribution_6.entry.js +8 -8
  77. package/dist/esm/revogr-clipboard_3.entry.js +5 -5
  78. package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
  79. package/dist/esm/revogr-data_4.entry.js +5 -6
  80. package/dist/esm/revogr-data_4.entry.js.map +1 -1
  81. package/dist/esm/{viewport.store-d8e03528.js → row-header-utils-6081260c.js} +9 -3
  82. package/dist/esm/row-header-utils-6081260c.js.map +1 -0
  83. package/dist/esm/{selection.helpers-accaad4a.js → selection.helpers-d92697e1.js} +2 -2
  84. package/dist/esm/{selection.helpers-accaad4a.js.map → selection.helpers-d92697e1.js.map} +1 -1
  85. package/dist/esm/{throttle-7283692c.js → throttle-041ded8e.js} +2 -2
  86. package/dist/esm/{throttle-7283692c.js.map → throttle-041ded8e.js.map} +1 -1
  87. package/dist/revo-grid/column.service-af0694c5.js +5 -0
  88. package/dist/revo-grid/{column.service-5d14e7e9.js.map → column.service-af0694c5.js.map} +1 -1
  89. package/dist/revo-grid/column.utils-78dd3ef2.js +5 -0
  90. package/dist/revo-grid/column.utils-78dd3ef2.js.map +1 -0
  91. package/dist/revo-grid/edit.utils-ca303802.js +5 -0
  92. package/dist/revo-grid/edit.utils-ca303802.js.map +1 -0
  93. package/dist/revo-grid/events-cf0893a3.js +5 -0
  94. package/dist/revo-grid/events-cf0893a3.js.map +1 -0
  95. package/dist/revo-grid/{header-cell-renderer-fc999784.js → header-cell-renderer-261317c3.js} +2 -2
  96. package/dist/revo-grid/index-f65def08.js +5 -0
  97. package/dist/revo-grid/index-f65def08.js.map +1 -0
  98. package/dist/revo-grid/index.esm.js +1 -1
  99. package/dist/revo-grid/key.utils-4b0093d5.js +5 -0
  100. package/dist/revo-grid/key.utils-4b0093d5.js.map +1 -0
  101. package/dist/revo-grid/revo-grid.entry.js +1 -1
  102. package/dist/revo-grid/revo-grid.entry.js.map +1 -1
  103. package/dist/revo-grid/revogr-attribution_6.entry.js +1 -1
  104. package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
  105. package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
  106. package/dist/revo-grid/revogr-data_4.entry.js +1 -1
  107. package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
  108. package/dist/revo-grid/row-header-utils-6081260c.js +5 -0
  109. package/dist/revo-grid/row-header-utils-6081260c.js.map +1 -0
  110. package/dist/revo-grid/selection.helpers-d92697e1.js +5 -0
  111. package/dist/revo-grid/{selection.helpers-accaad4a.js.map → selection.helpers-d92697e1.js.map} +1 -1
  112. package/dist/revo-grid/{throttle-7283692c.js → throttle-041ded8e.js} +2 -2
  113. package/dist/types/components/revoGrid/revo-grid.d.ts +2 -1
  114. package/dist/types/components.d.ts +2 -2
  115. package/dist/types/index.d.ts +1 -1
  116. package/dist/types/plugins/base.plugin.d.ts +1 -1
  117. package/dist/types/plugins/column.auto-size.plugin.d.ts +2 -4
  118. package/dist/types/plugins/column.stretch.plugin.d.ts +2 -4
  119. package/dist/types/services/column.data.provider.d.ts +2 -13
  120. package/dist/types/services/dimension.provider.d.ts +0 -1
  121. package/dist/types/types/interfaces.d.ts +11 -11
  122. package/dist/types/utils/column.utils.d.ts +46 -0
  123. package/dist/types/utils/index.d.ts +7 -0
  124. package/hydrate/index.js +304 -357
  125. package/hydrate/index.mjs +304 -357
  126. package/package.json +2 -2
  127. package/standalone/_stringToPath.js +1389 -0
  128. package/standalone/_stringToPath.js.map +1 -0
  129. package/standalone/column.service.js +4 -3
  130. package/standalone/column.service.js.map +1 -1
  131. package/standalone/consts.js +1 -1
  132. package/standalone/data.store.js +31 -1410
  133. package/standalone/data.store.js.map +1 -1
  134. package/standalone/debounce.js +2 -1
  135. package/standalone/debounce.js.map +1 -1
  136. package/standalone/dimension.helpers.js +2 -2
  137. package/standalone/index.js +6 -3
  138. package/standalone/index.js.map +1 -1
  139. package/standalone/index2.js +160 -1
  140. package/standalone/index2.js.map +1 -1
  141. package/standalone/isObjectLike.js +195 -0
  142. package/standalone/isObjectLike.js.map +1 -0
  143. package/standalone/revo-grid.js +168 -218
  144. package/standalone/revo-grid.js.map +1 -1
  145. package/standalone/revogr-clipboard2.js +2 -2
  146. package/standalone/revogr-clipboard2.js.map +1 -1
  147. package/standalone/revogr-data2.js +3 -2
  148. package/standalone/revogr-data2.js.map +1 -1
  149. package/standalone/revogr-edit.js +1 -1
  150. package/standalone/revogr-edit2.js +57 -83
  151. package/standalone/revogr-edit2.js.map +1 -1
  152. package/standalone/revogr-focus2.js +2 -1
  153. package/standalone/revogr-focus2.js.map +1 -1
  154. package/standalone/revogr-header2.js +4 -3
  155. package/standalone/revogr-header2.js.map +1 -1
  156. package/standalone/revogr-order-editor2.js +3 -2
  157. package/standalone/revogr-order-editor2.js.map +1 -1
  158. package/standalone/revogr-overlay-selection2.js +5 -5
  159. package/standalone/revogr-row-headers2.js +3 -2
  160. package/standalone/revogr-row-headers2.js.map +1 -1
  161. package/standalone/selection.utils.js +2 -1
  162. package/standalone/selection.utils.js.map +1 -1
  163. package/standalone/throttle.js +1 -1
  164. package/standalone/toNumber.js +2 -189
  165. package/standalone/toNumber.js.map +1 -1
  166. package/dist/cjs/base.plugin-bf5f43a0.js.map +0 -1
  167. package/dist/cjs/column.service-01f4a6c7.js.map +0 -1
  168. package/dist/cjs/dimension.helpers-a6788214.js.map +0 -1
  169. package/dist/cjs/events-b28cc194.js.map +0 -1
  170. package/dist/cjs/index-2410bbd9.js +0 -103
  171. package/dist/cjs/index-2410bbd9.js.map +0 -1
  172. package/dist/cjs/key.utils-1e48ab8f.js +0 -144
  173. package/dist/cjs/key.utils-1e48ab8f.js.map +0 -1
  174. package/dist/cjs/selection.helpers-1a8c8d49.js.map +0 -1
  175. package/dist/cjs/viewport.store-35a3e7ee.js.map +0 -1
  176. package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js +0 -43
  177. package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js.map +0 -1
  178. package/dist/esm/base.plugin-5e7a3c51.js.map +0 -1
  179. package/dist/esm/column.service-5d14e7e9.js.map +0 -1
  180. package/dist/esm/dimension.helpers-56298828.js.map +0 -1
  181. package/dist/esm/events-77b43b40.js.map +0 -1
  182. package/dist/esm/index-4e881436.js +0 -77
  183. package/dist/esm/index-4e881436.js.map +0 -1
  184. package/dist/esm/key.utils-425c987d.js +0 -133
  185. package/dist/esm/key.utils-425c987d.js.map +0 -1
  186. package/dist/esm/viewport.store-d8e03528.js.map +0 -1
  187. package/dist/revo-grid/base.plugin-5e7a3c51.js +0 -5
  188. package/dist/revo-grid/base.plugin-5e7a3c51.js.map +0 -1
  189. package/dist/revo-grid/column.service-5d14e7e9.js +0 -5
  190. package/dist/revo-grid/dimension.helpers-56298828.js +0 -5
  191. package/dist/revo-grid/dimension.helpers-56298828.js.map +0 -1
  192. package/dist/revo-grid/events-77b43b40.js +0 -5
  193. package/dist/revo-grid/events-77b43b40.js.map +0 -1
  194. package/dist/revo-grid/index-4e881436.js +0 -5
  195. package/dist/revo-grid/index-4e881436.js.map +0 -1
  196. package/dist/revo-grid/key.utils-425c987d.js +0 -5
  197. package/dist/revo-grid/key.utils-425c987d.js.map +0 -1
  198. package/dist/revo-grid/selection.helpers-accaad4a.js +0 -5
  199. package/dist/revo-grid/viewport.store-d8e03528.js +0 -5
  200. package/dist/revo-grid/viewport.store-d8e03528.js.map +0 -1
  201. package/dist/types/plugins/groupingColumn/grouping.col.plugin.d.ts +0 -17
  202. /package/dist/revo-grid/{header-cell-renderer-fc999784.js.map → header-cell-renderer-261317c3.js.map} +0 -0
  203. /package/dist/revo-grid/{throttle-7283692c.js.map → throttle-041ded8e.js.map} +0 -0
@@ -6,18 +6,17 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index$1 = require('./index-10d10c55.js');
9
- const dimension_helpers = require('./dimension.helpers-a6788214.js');
10
- const base_plugin = require('./base.plugin-bf5f43a0.js');
9
+ const index = require('./index-2991afbb.js');
10
+ const column_utils = require('./column.utils-694677fa.js');
11
11
  const toNumber = require('./toNumber-838e6ff5.js');
12
- const selection_helpers = require('./selection.helpers-1a8c8d49.js');
12
+ const selection_helpers = require('./selection.helpers-4374518f.js');
13
13
  const debounce = require('./debounce-e2b7c6fb.js');
14
- const index = require('./index-2410bbd9.js');
15
- const viewport_store = require('./viewport.store-35a3e7ee.js');
14
+ const rowHeaderUtils = require('./row-header-utils-b5266b12.js');
16
15
  const filter_button = require('./filter.button-afb16244.js');
17
- const column_service = require('./column.service-01f4a6c7.js');
18
- const events = require('./events-b28cc194.js');
16
+ const column_service = require('./column.service-0615a373.js');
19
17
  const dispatcher = require('./dispatcher-998aa470.js');
20
- const headerCellRenderer = require('./header-cell-renderer-3bc70679.js');
18
+ const headerCellRenderer = require('./header-cell-renderer-360528aa.js');
19
+ const events = require('./events-af8f6914.js');
21
20
 
22
21
  class ThemeCompact {
23
22
  constructor() {
@@ -84,9 +83,9 @@ class ThemeService {
84
83
  }
85
84
  }
86
85
 
87
- var baseIteratee$1 = dimension_helpers._baseIteratee,
88
- isArrayLike$2 = dimension_helpers.isArrayLike_1,
89
- keys = dimension_helpers.keys_1;
86
+ var baseIteratee = index._baseIteratee,
87
+ isArrayLike$1 = index.isArrayLike_1,
88
+ keys = index.keys_1;
90
89
 
91
90
  /**
92
91
  * Creates a `_.find` or `_.findLast` function.
@@ -98,8 +97,8 @@ var baseIteratee$1 = dimension_helpers._baseIteratee,
98
97
  function createFind$1(findIndexFunc) {
99
98
  return function(collection, predicate, fromIndex) {
100
99
  var iterable = Object(collection);
101
- if (!isArrayLike$2(collection)) {
102
- var iteratee = baseIteratee$1(predicate);
100
+ if (!isArrayLike$1(collection)) {
101
+ var iteratee = baseIteratee(predicate);
103
102
  collection = keys(collection);
104
103
  predicate = function(key) { return iteratee(iterable[key], key, iterable); };
105
104
  }
@@ -111,7 +110,7 @@ function createFind$1(findIndexFunc) {
111
110
  var _createFind = createFind$1;
112
111
 
113
112
  var createFind = _createFind,
114
- findIndex = dimension_helpers.findIndex_1;
113
+ findIndex = index.findIndex_1;
115
114
 
116
115
  /**
117
116
  * Iterates over elements of `collection`, returning the first element
@@ -153,134 +152,24 @@ var find = createFind(findIndex);
153
152
 
154
153
  var find_1 = find;
155
154
 
156
- var baseEach = dimension_helpers._baseEach,
157
- isArrayLike$1 = dimension_helpers.isArrayLike_1;
158
-
159
- /**
160
- * The base implementation of `_.map` without support for iteratee shorthands.
161
- *
162
- * @private
163
- * @param {Array|Object} collection The collection to iterate over.
164
- * @param {Function} iteratee The function invoked per iteration.
165
- * @returns {Array} Returns the new mapped array.
166
- */
167
- function baseMap$1(collection, iteratee) {
168
- var index = -1,
169
- result = isArrayLike$1(collection) ? Array(collection.length) : [];
170
-
171
- baseEach(collection, function(value, key, collection) {
172
- result[++index] = iteratee(value, key, collection);
173
- });
174
- return result;
175
- }
176
-
177
- var _baseMap = baseMap$1;
178
-
179
- var arrayMap = dimension_helpers._arrayMap,
180
- baseIteratee = dimension_helpers._baseIteratee,
181
- baseMap = _baseMap,
182
- isArray$1 = dimension_helpers.isArray_1;
183
-
184
- /**
185
- * Creates an array of values by running each element in `collection` thru
186
- * `iteratee`. The iteratee is invoked with three arguments:
187
- * (value, index|key, collection).
188
- *
189
- * Many lodash methods are guarded to work as iteratees for methods like
190
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
191
- *
192
- * The guarded methods are:
193
- * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
194
- * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
195
- * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
196
- * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
197
- *
198
- * @static
199
- * @memberOf _
200
- * @since 0.1.0
201
- * @category Collection
202
- * @param {Array|Object} collection The collection to iterate over.
203
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
204
- * @returns {Array} Returns the new mapped array.
205
- * @example
206
- *
207
- * function square(n) {
208
- * return n * n;
209
- * }
210
- *
211
- * _.map([4, 8], square);
212
- * // => [16, 64]
213
- *
214
- * _.map({ 'a': 4, 'b': 8 }, square);
215
- * // => [16, 64] (iteration order is not guaranteed)
216
- *
217
- * var users = [
218
- * { 'user': 'barney' },
219
- * { 'user': 'fred' }
220
- * ];
221
- *
222
- * // The `_.property` iteratee shorthand.
223
- * _.map(users, 'user');
224
- * // => ['barney', 'fred']
225
- */
226
- function map(collection, iteratee) {
227
- var func = isArray$1(collection) ? arrayMap : baseMap;
228
- return func(collection, baseIteratee(iteratee));
229
- }
230
-
231
- var map_1 = map;
232
-
233
- class GroupingColumnPlugin extends base_plugin.BasePlugin {
234
- static gatherGroup(res, colData, collection, level = 0) {
235
- // group template
236
- const group = Object.assign(Object.assign({}, colData), { level, ids: [] });
237
- // check columns for update
238
- for (let k in collection.columns) {
239
- const key = k;
240
- const resultItem = res.columns[key];
241
- const collectionItem = collection.columns[key];
242
- // if column data
243
- if (dimension_helpers.isArray_1(resultItem) && dimension_helpers.isArray_1(collectionItem)) {
244
- // fill columns
245
- resultItem.push(...collectionItem);
246
- // fill grouping
247
- if (collectionItem.length) {
248
- res.columnGrouping[key].push(Object.assign(Object.assign({}, group), { ids: map_1(collectionItem, 'prop') }));
249
- }
250
- }
251
- }
252
- // merge column groupings
253
- for (let k in collection.columnGrouping) {
254
- const key = k;
255
- const collectionItem = collection.columnGrouping[key];
256
- res.columnGrouping[key].push(...collectionItem);
257
- }
258
- res.maxLevel = Math.max(res.maxLevel, collection.maxLevel);
259
- res.sort = Object.assign(Object.assign({}, res.sort), collection.sort);
260
- return res;
261
- }
262
- }
263
- /**
264
- * Check if column is grouping column
265
- */
266
- function isColGrouping(colData) {
267
- return !!colData.children;
268
- }
269
-
270
155
  class ColumnDataProvider {
271
156
  get order() {
272
- return dimension_helpers.reduce_1(this.sorting, (r, c, prop) => {
273
- r[prop] = c.order;
274
- return r;
275
- }, {});
157
+ const order = {};
158
+ const sorting = this.sorting;
159
+ if (sorting) {
160
+ Object.keys(sorting).forEach((prop) => {
161
+ order[prop] = sorting[prop].order;
162
+ });
163
+ }
164
+ return order;
276
165
  }
277
166
  get stores() {
278
167
  return this.dataSources;
279
168
  }
280
169
  constructor() {
281
170
  this.sorting = null;
282
- this.dataSources = dimension_helpers.reduce_1(base_plugin.columnTypes, (sources, k) => {
283
- sources[k] = new dimension_helpers.DataStore(k);
171
+ this.dataSources = column_utils.columnTypes.reduce((sources, k) => {
172
+ sources[k] = new index.DataStore(k);
284
173
  return sources;
285
174
  }, {});
286
175
  }
@@ -288,10 +177,10 @@ class ColumnDataProvider {
288
177
  return this.getColumn(c, pin || 'rgCol');
289
178
  }
290
179
  getColumn(virtualIndex, type) {
291
- return dimension_helpers.getSourceItem(this.dataSources[type].store, virtualIndex);
180
+ return index.getSourceItem(this.dataSources[type].store, virtualIndex);
292
181
  }
293
182
  getRawColumns() {
294
- return dimension_helpers.reduce_1(this.dataSources, (result, item, type) => {
183
+ return index.reduce_1(this.dataSources, (result, item, type) => {
295
184
  result[type] = item.store.get('source');
296
185
  return result;
297
186
  }, {
@@ -304,13 +193,13 @@ class ColumnDataProvider {
304
193
  if (type !== 'all') {
305
194
  return this.dataSources[type].store.get('source');
306
195
  }
307
- return base_plugin.columnTypes.reduce((r, t) => {
196
+ return column_utils.columnTypes.reduce((r, t) => {
308
197
  r.push(...this.dataSources[t].store.get('source'));
309
198
  return r;
310
199
  }, []);
311
200
  }
312
201
  getColumnIndexByProp(prop, type) {
313
- return dimension_helpers.getSourceItemVirtualIndexByProp(this.dataSources[type].store, prop);
202
+ return index.getSourceItemVirtualIndexByProp(this.dataSources[type].store, prop);
314
203
  }
315
204
  getColumnByProp(prop, type) {
316
205
  const items = this.dataSources[type].store.get('source');
@@ -320,7 +209,7 @@ class ColumnDataProvider {
320
209
  this.dataSources[type].refresh();
321
210
  }
322
211
  setColumns(data) {
323
- base_plugin.columnTypes.forEach(k => {
212
+ column_utils.columnTypes.forEach(k => {
324
213
  // set columns data
325
214
  this.dataSources[k].updateData(data.columns[k], {
326
215
  // max depth level
@@ -341,7 +230,7 @@ class ColumnDataProvider {
341
230
  updateColumns(cols) {
342
231
  // collect column by type and propert
343
232
  const columnByKey = cols.reduce((res, c) => {
344
- const type = ColumnDataProvider.getColumnType(c);
233
+ const type = column_utils.getColumnType(c);
345
234
  if (!res[type]) {
346
235
  res[type] = {};
347
236
  }
@@ -350,21 +239,33 @@ class ColumnDataProvider {
350
239
  }, {});
351
240
  // find indexes in source
352
241
  const colByIndex = {};
353
- dimension_helpers.each(columnByKey, (colsToUpdate, type) => {
242
+ for (const t in columnByKey) {
243
+ if (!columnByKey.hasOwnProperty(t)) {
244
+ continue;
245
+ }
246
+ const type = t;
247
+ const colsToUpdate = columnByKey[type];
354
248
  const items = this.dataSources[type].store.get('source');
355
- colByIndex[type] = items.reduce((result, rgCol, index) => {
249
+ colByIndex[type] = {};
250
+ for (let i = 0; i < items.length; i++) {
251
+ const rgCol = items[i];
356
252
  const colToUpdateIfExists = colsToUpdate === null || colsToUpdate === void 0 ? void 0 : colsToUpdate[rgCol.prop];
357
253
  if (colToUpdateIfExists) {
358
- result[index] = colToUpdateIfExists;
254
+ colByIndex[type][i] = colToUpdateIfExists;
359
255
  }
360
- return result;
361
- }, {});
362
- });
363
- dimension_helpers.each(colByIndex, (colsToUpdate, type) => dimension_helpers.setSourceByVirtualIndex(this.dataSources[type].store, colsToUpdate || {}));
256
+ }
257
+ }
258
+ for (const t in colByIndex) {
259
+ if (!colByIndex.hasOwnProperty(t)) {
260
+ continue;
261
+ }
262
+ const type = t;
263
+ index.setSourceByVirtualIndex(this.dataSources[type].store, colByIndex[type] || {});
264
+ }
364
265
  }
365
- updateColumn(column, index) {
366
- const type = ColumnDataProvider.getColumnType(column);
367
- dimension_helpers.setSourceByVirtualIndex(this.dataSources[type].store, { [index]: column });
266
+ updateColumn(column, index$1) {
267
+ const type = column_utils.getColumnType(column);
268
+ index.setSourceByVirtualIndex(this.dataSources[type].store, { [index$1]: column });
368
269
  }
369
270
  updateColumnSorting(column, index, sorting, additive) {
370
271
  if (!additive) {
@@ -379,90 +280,18 @@ class ColumnDataProvider {
379
280
  return column;
380
281
  }
381
282
  clearSorting() {
382
- const types = dimension_helpers.reduce_1(this.sorting, (r, c) => {
383
- const k = ColumnDataProvider.getColumnType(c);
283
+ const types = index.reduce_1(this.sorting, (r, c) => {
284
+ const k = column_utils.getColumnType(c);
384
285
  r[k] = true;
385
286
  return r;
386
287
  }, {});
387
- dimension_helpers.each(types, (_, type) => {
288
+ index.each(types, (_, type) => {
388
289
  const cols = this.dataSources[type].store.get('source');
389
- dimension_helpers.each(cols, (c) => (c.order = undefined));
290
+ index.each(cols, (c) => (c.order = undefined));
390
291
  this.dataSources[type].setData({ source: [...cols] });
391
292
  });
392
293
  this.sorting = {};
393
294
  }
394
- static getSizes(cols) {
395
- return dimension_helpers.reduce_1(cols, (res, c, i) => {
396
- if (c.size) {
397
- res[i] = c.size;
398
- }
399
- return res;
400
- }, {});
401
- }
402
- static getColumnByProp(columns, prop) {
403
- return find_1(columns, c => {
404
- if (isColGrouping(c)) {
405
- return ColumnDataProvider.getColumnByProp(c.children, prop);
406
- }
407
- return c.prop === prop;
408
- });
409
- }
410
- // columns processing
411
- static getColumns(columns, level = 0, types) {
412
- const collection = {
413
- // columns as they are in stores per type
414
- columns: {
415
- rgCol: [],
416
- colPinStart: [],
417
- colPinEnd: [],
418
- },
419
- // columns grouped by prop for quick access
420
- columnByProp: {},
421
- // column grouping
422
- columnGrouping: {
423
- rgCol: [],
424
- colPinStart: [],
425
- colPinEnd: [],
426
- },
427
- // max depth level for column grouping
428
- maxLevel: level,
429
- // sorting
430
- sort: {},
431
- };
432
- return dimension_helpers.reduce_1(columns, (res, colData) => {
433
- // Grouped column
434
- if (isColGrouping(colData)) {
435
- return GroupingColumnPlugin.gatherGroup(res, colData, ColumnDataProvider.getColumns(colData.children, level + 1, types), level);
436
- }
437
- // Regular column
438
- const regularColumn = Object.assign(Object.assign({}, (colData.columnType && types && types[colData.columnType])), colData);
439
- // Regular column, no Pin
440
- if (!regularColumn.pin) {
441
- res.columns.rgCol.push(regularColumn);
442
- // Pin
443
- }
444
- else {
445
- res.columns[regularColumn.pin].push(regularColumn);
446
- }
447
- if (regularColumn.order) {
448
- res.sort[regularColumn.prop] = regularColumn;
449
- }
450
- // technically it's possible that some columns have same prop, but better to avoid it
451
- if (!res.columnByProp[regularColumn.prop]) {
452
- res.columnByProp[regularColumn.prop] = [];
453
- }
454
- res.columnByProp[regularColumn.prop].push(regularColumn);
455
- // trigger setup hook if present
456
- regularColumn.beforeSetup && regularColumn.beforeSetup(regularColumn);
457
- return res;
458
- }, collection);
459
- }
460
- static getColumnType(rgCol) {
461
- if (rgCol.pin) {
462
- return rgCol.pin;
463
- }
464
- return 'rgCol';
465
- }
466
295
  }
467
296
 
468
297
  /**
@@ -471,8 +300,8 @@ class ColumnDataProvider {
471
300
  class DataProvider {
472
301
  constructor(dimensionProvider) {
473
302
  this.dimensionProvider = dimensionProvider;
474
- this.stores = dimension_helpers.reduce_1(base_plugin.rowTypes, (sources, k) => {
475
- sources[k] = new dimension_helpers.DataStore(k);
303
+ this.stores = index.reduce_1(column_utils.rowTypes, (sources, k) => {
304
+ sources[k] = new index.DataStore(k);
476
305
  return sources;
477
306
  }, {});
478
307
  }
@@ -486,18 +315,18 @@ class DataProvider {
486
315
  }
487
316
  getModel(virtualIndex, type = 'rgRow') {
488
317
  const store = this.stores[type].store;
489
- return dimension_helpers.getSourceItem(store, virtualIndex);
318
+ return index.getSourceItem(store, virtualIndex);
490
319
  }
491
320
  setCellData({ type, rowIndex, prop, val }, mutate = true) {
492
321
  const model = this.getModel(rowIndex, type);
493
322
  model[prop] = val;
494
323
  // apply data to source
495
- dimension_helpers.setSourceByVirtualIndex(this.stores[type].store, { [rowIndex]: model }, mutate);
324
+ index.setSourceByVirtualIndex(this.stores[type].store, { [rowIndex]: model }, mutate);
496
325
  }
497
326
  setRangeData(data, type) {
498
327
  const items = {};
499
328
  for (let rowIndex in data) {
500
- const oldModel = (items[rowIndex] = dimension_helpers.getSourceItem(this.stores[type].store, parseInt(rowIndex, 10)));
329
+ const oldModel = (items[rowIndex] = index.getSourceItem(this.stores[type].store, parseInt(rowIndex, 10)));
501
330
  if (!oldModel) {
502
331
  continue;
503
332
  }
@@ -506,13 +335,13 @@ class DataProvider {
506
335
  }
507
336
  }
508
337
  // apply data to source
509
- dimension_helpers.setSourceByVirtualIndex(this.stores[type].store, items);
338
+ index.setSourceByVirtualIndex(this.stores[type].store, items);
510
339
  }
511
340
  refresh(type = 'all') {
512
- if (base_plugin.isRowType(type)) {
341
+ if (column_utils.isRowType(type)) {
513
342
  this.refreshItems(type);
514
343
  }
515
- base_plugin.rowTypes.forEach((t) => this.refreshItems(t));
344
+ column_utils.rowTypes.forEach((t) => this.refreshItems(t));
516
345
  }
517
346
  refreshItems(type = 'rgRow') {
518
347
  const items = this.stores[type].store.get('items');
@@ -526,7 +355,7 @@ class DataProvider {
526
355
  store.addTrimmed(trimmed);
527
356
  this.dimensionProvider.setTrimmed(trimmed, type);
528
357
  if (type === 'rgRow') {
529
- this.dimensionProvider.setData(dimension_helpers.getVisibleSourceItem(store.store).length, type);
358
+ this.dimensionProvider.setData(index.getVisibleSourceItem(store.store).length, type);
530
359
  }
531
360
  }
532
361
  }
@@ -539,8 +368,8 @@ class DimensionProvider {
539
368
  constructor(viewports, config) {
540
369
  this.viewports = viewports;
541
370
  const sizeChanged = debounce.debounce_1((k) => config.realSizeChanged(k), index.RESIZE_INTERVAL);
542
- this.stores = dimension_helpers.reduce_1([...base_plugin.rowTypes, ...base_plugin.columnTypes], (sources, k) => {
543
- sources[k] = new base_plugin.DimensionStore();
371
+ this.stores = index.reduce_1([...column_utils.rowTypes, ...column_utils.columnTypes], (sources, k) => {
372
+ sources[k] = new column_utils.DimensionStore();
544
373
  sources[k].store.onChange('realSize', () => sizeChanged(k));
545
374
  return sources;
546
375
  }, {});
@@ -581,7 +410,7 @@ class DimensionProvider {
581
410
  * @param type
582
411
  */
583
412
  setTrimmed(trimmed, type) {
584
- const allTrimmed = dimension_helpers.gatherTrimmedItems(trimmed);
413
+ const allTrimmed = index.gatherTrimmedItems(trimmed);
585
414
  const dimStoreType = this.stores[type];
586
415
  dimStoreType.setStore({ trimmed: allTrimmed });
587
416
  this.updateViewport(type, true);
@@ -604,7 +433,7 @@ class DimensionProvider {
604
433
  this.updateViewport(type);
605
434
  }
606
435
  applyNewColumns(columns, disableVirtualX) {
607
- for (let type of base_plugin.columnTypes) {
436
+ for (let type of column_utils.columnTypes) {
608
437
  // clear existing data
609
438
  this.stores[type].drop();
610
439
  const items = columns[type];
@@ -613,7 +442,7 @@ class DimensionProvider {
613
442
  // setItemCount
614
443
  this.stores[type].setStore({ count: items.length });
615
444
  // setCustomSizes
616
- const newSizes = ColumnDataProvider.getSizes(items);
445
+ const newSizes = column_utils.getColumnSizes(items);
617
446
  this.stores[type].setDimensionSize(newSizes);
618
447
  const vpUpdate = {
619
448
  // this triggers drop on realCount change
@@ -634,10 +463,10 @@ class DimensionProvider {
634
463
  var _a, _b;
635
464
  let x = 0;
636
465
  let y = 0;
637
- for (let type of base_plugin.columnTypes) {
466
+ for (let type of column_utils.columnTypes) {
638
467
  x += ((_a = this.stores[type]) === null || _a === void 0 ? void 0 : _a.store.get('realSize')) || 0;
639
468
  }
640
- for (let type of base_plugin.rowTypes) {
469
+ for (let type of column_utils.rowTypes) {
641
470
  y += ((_b = this.stores[type]) === null || _b === void 0 ? void 0 : _b.store.get('realSize')) || 0;
642
471
  }
643
472
  return { y, x };
@@ -655,17 +484,17 @@ class DimensionProvider {
655
484
  }
656
485
  getViewPortPos(e) {
657
486
  const dimension = this.stores[e.dimension].getCurrentState();
658
- const item = dimension_helpers.getItemByIndex(dimension, e.coordinate);
487
+ const item = index.getItemByIndex(dimension, e.coordinate);
659
488
  return item.start;
660
489
  }
661
490
  setSettings(data, dimensionType) {
662
491
  let stores = [];
663
492
  switch (dimensionType) {
664
493
  case 'rgCol':
665
- stores = base_plugin.columnTypes;
494
+ stores = column_utils.columnTypes;
666
495
  break;
667
496
  case 'rgRow':
668
- stores = base_plugin.rowTypes;
497
+ stores = column_utils.rowTypes;
669
498
  break;
670
499
  }
671
500
  for (let s of stores) {
@@ -676,8 +505,8 @@ class DimensionProvider {
676
505
 
677
506
  class ViewportProvider {
678
507
  constructor() {
679
- this.stores = dimension_helpers.reduce_1([...base_plugin.rowTypes, ...base_plugin.columnTypes], (sources, k) => {
680
- sources[k] = new viewport_store.ViewportStore(k);
508
+ this.stores = index.reduce_1([...column_utils.rowTypes, ...column_utils.columnTypes], (sources, k) => {
509
+ sources[k] = new rowHeaderUtils.ViewportStore(k);
681
510
  return sources;
682
511
  }, {});
683
512
  }
@@ -700,7 +529,7 @@ var ColumnAutoSizeMode;
700
529
  // increases and decreases column width based on all items sizes, worst for performance
701
530
  ColumnAutoSizeMode["autoSizeAll"] = "autoSizeAll";
702
531
  })(ColumnAutoSizeMode || (ColumnAutoSizeMode = {}));
703
- class AutoSizeColumnPlugin extends base_plugin.BasePlugin {
532
+ class AutoSizeColumnPlugin extends column_utils.BasePlugin {
704
533
  constructor(revogrid, providers, config) {
705
534
  super(revogrid, providers);
706
535
  this.providers = providers;
@@ -728,7 +557,7 @@ class AutoSizeColumnPlugin extends base_plugin.BasePlugin {
728
557
  this.columnSet(columns);
729
558
  };
730
559
  const headerDblClick = ({ detail }) => {
731
- const type = ColumnDataProvider.getColumnType(detail.column);
560
+ const type = column_utils.getColumnType(detail.column);
732
561
  const size = this.getColumnSize(detail.index, type);
733
562
  if (size) {
734
563
  this.providers.dimension.setCustomSizes(type, {
@@ -771,9 +600,9 @@ class AutoSizeColumnPlugin extends base_plugin.BasePlugin {
771
600
  }
772
601
  }
773
602
  // calculate sizes
774
- dimension_helpers.each(autoSize, (_v, type) => {
603
+ index.each(autoSize, (_v, type) => {
775
604
  const sizes = {};
776
- dimension_helpers.each(autoSize[type], rgCol => {
605
+ index.each(autoSize[type], rgCol => {
777
606
  // calculate size
778
607
  rgCol.size = sizes[rgCol.index] = source.reduce((prev, rgRow) => Math.max(prev, this.getLength(rgRow[rgCol.prop])), this.getLength(rgCol.name || ''));
779
608
  });
@@ -807,12 +636,12 @@ class AutoSizeColumnPlugin extends base_plugin.BasePlugin {
807
636
  else {
808
637
  data = { 0: { [e.prop]: e.val } };
809
638
  }
810
- dimension_helpers.each(this.autoSizeColumns, (columns, type) => {
639
+ index.each(this.autoSizeColumns, (columns, type) => {
811
640
  const sizes = {};
812
- dimension_helpers.each(columns, rgCol => {
641
+ index.each(columns, rgCol => {
813
642
  var _a;
814
643
  // calculate size
815
- const size = dimension_helpers.reduce_1(data, (prev, rgRow) => {
644
+ const size = index.reduce_1(data, (prev, rgRow) => {
816
645
  if (typeof rgRow[rgCol.prop] === 'undefined') {
817
646
  return prev;
818
647
  }
@@ -828,14 +657,14 @@ class AutoSizeColumnPlugin extends base_plugin.BasePlugin {
828
657
  afterEditAll(e) {
829
658
  const props = {};
830
659
  if (this.isRangeEdit(e)) {
831
- dimension_helpers.each(e.data, r => dimension_helpers.each(r, (_v, p) => (props[p] = true)));
660
+ index.each(e.data, r => index.each(r, (_v, p) => (props[p] = true)));
832
661
  }
833
662
  else {
834
663
  props[e.prop] = true;
835
664
  }
836
- dimension_helpers.each(this.autoSizeColumns, (columns, type) => {
665
+ index.each(this.autoSizeColumns, (columns, type) => {
837
666
  const sizes = {};
838
- dimension_helpers.each(columns, rgCol => {
667
+ index.each(columns, rgCol => {
839
668
  if (props[rgCol.prop]) {
840
669
  const size = this.getColumnSize(rgCol.index, type);
841
670
  if (size) {
@@ -846,15 +675,15 @@ class AutoSizeColumnPlugin extends base_plugin.BasePlugin {
846
675
  this.providers.dimension.setCustomSizes(type, sizes, true);
847
676
  });
848
677
  }
849
- getColumnSize(index, type) {
678
+ getColumnSize(index$1, type) {
850
679
  var _a, _b;
851
- const rgCol = (_b = (_a = this.autoSizeColumns) === null || _a === void 0 ? void 0 : _a[type]) === null || _b === void 0 ? void 0 : _b[index];
680
+ const rgCol = (_b = (_a = this.autoSizeColumns) === null || _a === void 0 ? void 0 : _a[type]) === null || _b === void 0 ? void 0 : _b[index$1];
852
681
  if (!rgCol) {
853
682
  return 0;
854
683
  }
855
- return dimension_helpers.reduce_1(this.providers.data.stores, (r, s) => {
856
- const perStore = dimension_helpers.reduce_1(s.store.get('items'), (prev, _row, i) => {
857
- const item = dimension_helpers.getSourceItem(s.store, i);
684
+ return index.reduce_1(this.providers.data.stores, (r, s) => {
685
+ const perStore = index.reduce_1(s.store.get('items'), (prev, _row, i) => {
686
+ const item = index.getSourceItem(s.store, i);
858
687
  return Math.max(prev || 0, this.getLength(item[rgCol.prop]));
859
688
  }, 0);
860
689
  return Math.max(r, perStore);
@@ -862,7 +691,7 @@ class AutoSizeColumnPlugin extends base_plugin.BasePlugin {
862
691
  }
863
692
  columnSet(columns) {
864
693
  var _a;
865
- for (let t of base_plugin.columnTypes) {
694
+ for (let t of column_utils.columnTypes) {
866
695
  const type = t;
867
696
  const cols = columns[type];
868
697
  for (let i in cols) {
@@ -1043,7 +872,7 @@ const filterTypes = {
1043
872
 
1044
873
  const FILTER_TRIMMED_TYPE = 'filter';
1045
874
  const FILTER_CONFIG_CHANGED_EVENT = 'filterconfigchanged';
1046
- class FilterPlugin extends base_plugin.BasePlugin {
875
+ class FilterPlugin extends column_utils.BasePlugin {
1047
876
  constructor(revogrid, providers, config) {
1048
877
  var _a;
1049
878
  super(revogrid, providers);
@@ -1134,7 +963,7 @@ class FilterPlugin extends base_plugin.BasePlugin {
1134
963
  }
1135
964
  }
1136
965
  if (config.collection) {
1137
- this.filterCollection = dimension_helpers.reduce_1(config.collection, (result, item, prop) => {
966
+ this.filterCollection = index.reduce_1(config.collection, (result, item, prop) => {
1138
967
  if (this.possibleFilterEntities[item.type]) {
1139
968
  result[prop] = item;
1140
969
  }
@@ -1333,7 +1162,7 @@ class FilterPlugin extends base_plugin.BasePlugin {
1333
1162
  }
1334
1163
 
1335
1164
  var baseGetTag = toNumber._baseGetTag,
1336
- isArray = dimension_helpers.isArray_1,
1165
+ isArray = index.isArray_1,
1337
1166
  isObjectLike = toNumber.isObjectLike_1;
1338
1167
 
1339
1168
  /** `Object#toString` result references. */
@@ -1363,7 +1192,7 @@ function isString$1(value) {
1363
1192
 
1364
1193
  var isString_1 = isString$1;
1365
1194
 
1366
- var baseProperty = dimension_helpers._baseProperty;
1195
+ var baseProperty = index._baseProperty;
1367
1196
 
1368
1197
  /**
1369
1198
  * Gets the size of an ASCII `string`.
@@ -1469,9 +1298,9 @@ function stringSize$1(string) {
1469
1298
 
1470
1299
  var _stringSize = stringSize$1;
1471
1300
 
1472
- var baseKeys = dimension_helpers._baseKeys,
1473
- getTag = dimension_helpers._getTag,
1474
- isArrayLike = dimension_helpers.isArrayLike_1,
1301
+ var baseKeys = index._baseKeys,
1302
+ getTag = index._getTag,
1303
+ isArrayLike = index.isArrayLike_1,
1475
1304
  isString = isString_1,
1476
1305
  stringSize = _stringSize;
1477
1306
 
@@ -1525,7 +1354,7 @@ var size_1 = size;
1525
1354
  *
1526
1355
  * Note: If you prevent an event, it will not proceed to the subsequent steps.
1527
1356
  */
1528
- class SortingPlugin extends base_plugin.BasePlugin {
1357
+ class SortingPlugin extends column_utils.BasePlugin {
1529
1358
  async runSorting(order, comparison) {
1530
1359
  var _a;
1531
1360
  await this.sort(order, comparison);
@@ -1551,7 +1380,7 @@ class SortingPlugin extends base_plugin.BasePlugin {
1551
1380
  const columns = (await this.revogrid.getColumns());
1552
1381
  const sortingFunc = {};
1553
1382
  for (let prop in order) {
1554
- const cmp = this.getComparer(ColumnDataProvider.getColumnByProp(columns, prop), order[prop]);
1383
+ const cmp = this.getComparer(column_utils.getColumnByProp(columns, prop), order[prop]);
1555
1384
  sortingFunc[prop] = cmp;
1556
1385
  }
1557
1386
  this.runSorting(order, sortingFunc);
@@ -1659,8 +1488,8 @@ class SortingPlugin extends base_plugin.BasePlugin {
1659
1488
  // row data
1660
1489
  const source = store.get('source');
1661
1490
  // row indexes
1662
- const proxyItems = dimension_helpers.range_1(0, source.length);
1663
- dimension_helpers.setStore(store, {
1491
+ const proxyItems = index.range_1(0, source.length);
1492
+ index.setStore(store, {
1664
1493
  proxyItems,
1665
1494
  source: [...source],
1666
1495
  });
@@ -1679,7 +1508,7 @@ class SortingPlugin extends base_plugin.BasePlugin {
1679
1508
  // row indexes
1680
1509
  const proxyItems = store.get('proxyItems');
1681
1510
  const data = this.sortIndexByItems([...proxyItems], source, sortingFunc);
1682
- dimension_helpers.setStore(store, {
1511
+ index.setStore(store, {
1683
1512
  proxyItems: data,
1684
1513
  source: [...source],
1685
1514
  });
@@ -1762,7 +1591,7 @@ function baseClamp$1(number, lower, upper) {
1762
1591
  var _baseClamp = baseClamp$1;
1763
1592
 
1764
1593
  var baseClamp = _baseClamp,
1765
- toInteger$1 = dimension_helpers.toInteger_1;
1594
+ toInteger$1 = index.toInteger_1;
1766
1595
 
1767
1596
  /** Used as references for the maximum length and index of an array. */
1768
1597
  var MAX_ARRAY_LENGTH = 4294967295;
@@ -1800,7 +1629,7 @@ function toLength$1(value) {
1800
1629
 
1801
1630
  var toLength_1 = toLength$1;
1802
1631
 
1803
- var toInteger = dimension_helpers.toInteger_1,
1632
+ var toInteger = index.toInteger_1,
1804
1633
  toLength = toLength_1;
1805
1634
 
1806
1635
  /**
@@ -1834,7 +1663,7 @@ function baseFill$1(array, value, start, end) {
1834
1663
  var _baseFill = baseFill$1;
1835
1664
 
1836
1665
  var baseFill = _baseFill,
1837
- isIterateeCall = dimension_helpers._isIterateeCall;
1666
+ isIterateeCall = index._isIterateeCall;
1838
1667
 
1839
1668
  /**
1840
1669
  * Fills elements of `array` with `value` from `start` up to, but not
@@ -1951,7 +1780,7 @@ var ExportTypes;
1951
1780
  (function (ExportTypes) {
1952
1781
  ExportTypes["csv"] = "csv";
1953
1782
  })(ExportTypes || (ExportTypes = {}));
1954
- class ExportFilePlugin extends base_plugin.BasePlugin {
1783
+ class ExportFilePlugin extends column_utils.BasePlugin {
1955
1784
  /** Exports string */
1956
1785
  async exportString(options = {}, t = ExportTypes.csv) {
1957
1786
  const data = await this.beforeexport();
@@ -2009,7 +1838,7 @@ class ExportFilePlugin extends base_plugin.BasePlugin {
2009
1838
  const data = await this.getSource();
2010
1839
  const colSource = [];
2011
1840
  const colPromises = [];
2012
- base_plugin.columnTypes.forEach((t, i) => {
1841
+ column_utils.columnTypes.forEach((t, i) => {
2013
1842
  colPromises.push(this.getColPerSource(t).then(s => (colSource[i] = s)));
2014
1843
  });
2015
1844
  await Promise.all(colPromises);
@@ -2085,7 +1914,7 @@ class ExportFilePlugin extends base_plugin.BasePlugin {
2085
1914
  async getSource() {
2086
1915
  const data = [];
2087
1916
  const promisesData = [];
2088
- base_plugin.rowTypes.forEach(t => {
1917
+ column_utils.rowTypes.forEach(t => {
2089
1918
  const dataPart = [];
2090
1919
  data.push(dataPart);
2091
1920
  const promise = this.revogrid.getVisibleSource(t).then((d) => dataPart.push(...d));
@@ -2227,7 +2056,7 @@ function processDoubleConversionTrimmed(initiallyTrimed, firstLevelMap, secondLe
2227
2056
  return trimemedOptionsToUpgrade;
2228
2057
  }
2229
2058
 
2230
- class GroupingRowPlugin extends base_plugin.BasePlugin {
2059
+ class GroupingRowPlugin extends column_utils.BasePlugin {
2231
2060
  get hasProps() {
2232
2061
  var _a, _b, _c;
2233
2062
  return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.props) && ((_c = (_b = this.options) === null || _b === void 0 ? void 0 : _b.props) === null || _c === void 0 ? void 0 : _c.length);
@@ -2257,14 +2086,14 @@ class GroupingRowPlugin extends base_plugin.BasePlugin {
2257
2086
  onExpand({ virtualIndex }) {
2258
2087
  const { source } = this.getSource();
2259
2088
  let newTrimmed = this.trimmed[TRIMMED_GROUPING];
2260
- let i = dimension_helpers.getPhysical(this.store, virtualIndex);
2089
+ let i = index.getPhysical(this.store, virtualIndex);
2261
2090
  const model = source[i];
2262
2091
  const prevExpanded = model[column_service.GROUP_EXPANDED];
2263
2092
  if (!prevExpanded) {
2264
2093
  const { trimmed, items } = doExpand(virtualIndex, source, this.rowItems);
2265
2094
  newTrimmed = Object.assign(Object.assign({}, newTrimmed), trimmed);
2266
2095
  if (items) {
2267
- dimension_helpers.setItems(this.store, items);
2096
+ index.setItems(this.store, items);
2268
2097
  }
2269
2098
  }
2270
2099
  else {
@@ -2314,7 +2143,7 @@ class GroupingRowPlugin extends base_plugin.BasePlugin {
2314
2143
  return false;
2315
2144
  }
2316
2145
  setColumns({ columns }) {
2317
- for (let type of base_plugin.columnTypes) {
2146
+ for (let type of column_utils.columnTypes) {
2318
2147
  if (this.setColumnGrouping(columns[type])) {
2319
2148
  break;
2320
2149
  }
@@ -2433,7 +2262,7 @@ class GroupingRowPlugin extends base_plugin.BasePlugin {
2433
2262
  this.doSourceUpdate(Object.assign({}, options));
2434
2263
  }
2435
2264
  // props exist and columns inited
2436
- for (let t of base_plugin.columnTypes) {
2265
+ for (let t of column_utils.columnTypes) {
2437
2266
  if (this.setColumnGrouping(this.providers.column.getColumns(t))) {
2438
2267
  this.providers.column.refreshByType(t);
2439
2268
  break;
@@ -2445,7 +2274,7 @@ class GroupingRowPlugin extends base_plugin.BasePlugin {
2445
2274
  // clear grouping
2446
2275
  clearGrouping() {
2447
2276
  // clear columns
2448
- base_plugin.columnTypes.forEach(t => {
2277
+ column_utils.columnTypes.forEach(t => {
2449
2278
  const cols = this.providers.column.getColumns(t);
2450
2279
  let deleted = false;
2451
2280
  cols.forEach(c => {
@@ -2491,7 +2320,7 @@ function gatherColumnData(data) {
2491
2320
  style: data.fixWidth ? { minWidth: `${realWidth}px` } : undefined,
2492
2321
  };
2493
2322
  const headerProp = {
2494
- colData: dimension_helpers.getVisibleSourceItem(data.colStore),
2323
+ colData: index.getVisibleSourceItem(data.colStore),
2495
2324
  dimensionCol: colDimension,
2496
2325
  type: data.colType,
2497
2326
  groups: data.colStore.get('groups'),
@@ -2516,7 +2345,7 @@ class ViewportService {
2516
2345
  // Transform data from stores and apply it to different components
2517
2346
  const columns = [];
2518
2347
  let x = 0; // we increase x only if column present
2519
- base_plugin.columnTypes.forEach(val => {
2348
+ column_utils.columnTypes.forEach(val => {
2520
2349
  const colStore = config.columnProvider.stores[val].store;
2521
2350
  // only columns that have data show
2522
2351
  if (!colStore.get('items').length) {
@@ -2578,11 +2407,11 @@ class ViewportService {
2578
2407
  onColumnResize(type, { detail }, store) {
2579
2408
  var _a;
2580
2409
  (_a = this.config.dimensionProvider) === null || _a === void 0 ? void 0 : _a.setCustomSizes(type, detail, true);
2581
- const changedItems = dimension_helpers.reduce_1(detail || {}, (r, size, i) => {
2582
- const index = parseInt(i, 10);
2583
- const item = dimension_helpers.getSourceItem(store, index);
2410
+ const changedItems = index.reduce_1(detail || {}, (r, size, i) => {
2411
+ const index$1 = parseInt(i, 10);
2412
+ const item = index.getSourceItem(store, index$1);
2584
2413
  if (item) {
2585
- r[index] = Object.assign(Object.assign({}, item), { size });
2414
+ r[index$1] = Object.assign(Object.assign({}, item), { size });
2586
2415
  }
2587
2416
  return r;
2588
2417
  }, {});
@@ -2609,7 +2438,7 @@ class ViewportService {
2609
2438
  };
2610
2439
  // y position for selection
2611
2440
  let y = 0;
2612
- return base_plugin.rowTypes.reduce((result, type) => {
2441
+ return column_utils.rowTypes.reduce((result, type) => {
2613
2442
  // filter out empty sources, we still need to return source to keep slot working
2614
2443
  const isPresent = data.viewports[type].store.get('realCount') || type === 'rgRow';
2615
2444
  const rgCol = Object.assign(Object.assign({}, data), { position: Object.assign(Object.assign({}, data.position), { y: isPresent ? y : selection_helpers.EMPTY_INDEX }) });
@@ -2739,9 +2568,9 @@ class GridScrollingService {
2739
2568
  if (elKey === key) {
2740
2569
  continue;
2741
2570
  }
2742
- if (base_plugin.columnTypes.includes(key) &&
2571
+ if (column_utils.columnTypes.includes(key) &&
2743
2572
  (elKey === 'headerRow' ||
2744
- base_plugin.columnTypes.includes(elKey))) {
2573
+ column_utils.columnTypes.includes(elKey))) {
2745
2574
  for (let el of this.elements[elKey]) {
2746
2575
  await ((_a = el.changeScroll) === null || _a === void 0 ? void 0 : _a.call(el, e, true));
2747
2576
  }
@@ -2827,7 +2656,7 @@ const OrderRenderer = ({ ref }) => {
2827
2656
  index$1.h("div", { class: "drag-position", ref: e => (service.rgRow = e) })));
2828
2657
  };
2829
2658
 
2830
- class StretchColumn extends base_plugin.BasePlugin {
2659
+ class StretchColumn extends column_utils.BasePlugin {
2831
2660
  constructor(revogrid, providers) {
2832
2661
  super(revogrid, providers);
2833
2662
  this.providers = providers;
@@ -2874,14 +2703,14 @@ class StretchColumn extends base_plugin.BasePlugin {
2874
2703
  this.dropChanges();
2875
2704
  // calculate grid size
2876
2705
  let sizeDifference = this.revogrid.clientWidth - 1;
2877
- dimension_helpers.each(columns, (_, type) => {
2706
+ index.each(columns, (_, type) => {
2878
2707
  const realSize = this.providers.dimension.stores[type].store.get('realSize');
2879
2708
  sizeDifference -= realSize;
2880
2709
  });
2881
2710
  if (this.revogrid.rowHeaders) {
2882
2711
  const itemsLength = this.providers.data.stores.rgRow.store.get('source').length;
2883
2712
  const header = this.revogrid.rowHeaders;
2884
- const rowHeaderSize = events.calculateRowHeaderSize(itemsLength, typeof header === 'object' ? header : undefined);
2713
+ const rowHeaderSize = rowHeaderUtils.calculateRowHeaderSize(itemsLength, typeof header === 'object' ? header : undefined);
2885
2714
  if (rowHeaderSize) {
2886
2715
  sizeDifference -= rowHeaderSize;
2887
2716
  }
@@ -3021,7 +2850,7 @@ const DRAG_END = 'columndragend';
3021
2850
  const BEFORE_DRAG_END = 'beforecolumndragend';
3022
2851
  // use this event subscription to drop D&D for particular columns
3023
2852
  const DRAG_START = 'columndragstart';
3024
- class ColumnPlugin extends base_plugin.BasePlugin {
2853
+ class ColumnPlugin extends column_utils.BasePlugin {
3025
2854
  constructor(revogrid, providers) {
3026
2855
  super(revogrid, providers);
3027
2856
  this.revogrid = revogrid;
@@ -3067,13 +2896,13 @@ class ColumnPlugin extends base_plugin.BasePlugin {
3067
2896
  return;
3068
2897
  }
3069
2898
  // no grouping drag and no row header column drag
3070
- if (isColGrouping(data) || data.providers.type === 'rowHeaders') {
2899
+ if (column_utils.isColGrouping(data) || data.providers.type === 'rowHeaders') {
3071
2900
  return;
3072
2901
  }
3073
2902
  const cols = this.getDimension(data.pin || 'rgCol');
3074
2903
  const gridRect = this.revogrid.getBoundingClientRect();
3075
2904
  const elRect = dataEl.getBoundingClientRect();
3076
- const startItem = dimension_helpers.getItemByPosition(cols, getLeftRelative(event.x, gridRect.left, elRect.left - gridRect.left));
2905
+ const startItem = index.getItemByPosition(cols, getLeftRelative(event.x, gridRect.left, elRect.left - gridRect.left));
3077
2906
  this.staticDragData = {
3078
2907
  startPos: event.x,
3079
2908
  startItem,
@@ -3098,7 +2927,7 @@ class ColumnPlugin extends base_plugin.BasePlugin {
3098
2927
  const start = this.staticDragData.startPos;
3099
2928
  if (Math.abs(start - e.x) > 10) {
3100
2929
  const x = getLeftRelative(e.x, this.dragData.gridRect.left, this.dragData.scrollOffset);
3101
- const rgCol = dimension_helpers.getItemByPosition(this.staticDragData.cols, x);
2930
+ const rgCol = index.getItemByPosition(this.staticDragData.cols, x);
3102
2931
  this.orderUi.autoscroll(x, dragData.elRect.width);
3103
2932
  this.orderUi.showHandler(rgCol.end + dragData.scrollOffset, dragData.gridRect.width);
3104
2933
  }
@@ -3118,7 +2947,7 @@ class ColumnPlugin extends base_plugin.BasePlugin {
3118
2947
  if (relativePos < 0) {
3119
2948
  relativePos = 0;
3120
2949
  }
3121
- const newPosition = dimension_helpers.getItemByPosition(this.staticDragData.cols, relativePos);
2950
+ const newPosition = index.getItemByPosition(this.staticDragData.cols, relativePos);
3122
2951
  const store = this.providers.column.stores[this.dragData.type].store;
3123
2952
  const items = [...store.get('items')];
3124
2953
  // prevent position change if needed
@@ -3134,7 +2963,7 @@ class ColumnPlugin extends base_plugin.BasePlugin {
3134
2963
  this.clearOrder();
3135
2964
  }
3136
2965
  clearLocalSubscriptions() {
3137
- dimension_helpers.each(this.localSubscriptions, ({ target, callback }, key) => target.removeEventListener(key, callback));
2966
+ index.each(this.localSubscriptions, ({ target, callback }, key) => target.removeEventListener(key, callback));
3138
2967
  }
3139
2968
  clearOrder() {
3140
2969
  this.staticDragData = null;
@@ -3339,7 +3168,7 @@ const RevoGridComponent = class {
3339
3168
  /** Open editor for cell. */
3340
3169
  async setCellEdit(rgRow, prop, rowSource = 'rgRow') {
3341
3170
  var _a;
3342
- const rgCol = ColumnDataProvider.getColumnByProp(this.columns, prop);
3171
+ const rgCol = column_utils.getColumnByProp(this.columns, prop);
3343
3172
  if (!rgCol) {
3344
3173
  return;
3345
3174
  }
@@ -3362,7 +3191,7 @@ const RevoGridComponent = class {
3362
3191
  * @param type - type of source
3363
3192
  */
3364
3193
  async getVisibleSource(type = 'rgRow') {
3365
- return dimension_helpers.getVisibleSourceItem(this.dataProvider.stores[type].store);
3194
+ return index.getVisibleSourceItem(this.dataProvider.stores[type].store);
3366
3195
  }
3367
3196
  /**
3368
3197
  * Provides access to rows internal store observer
@@ -3563,7 +3392,7 @@ const RevoGridComponent = class {
3563
3392
  this.columnChanged(this.columns);
3564
3393
  }
3565
3394
  columnChanged(newVal = []) {
3566
- const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
3395
+ const columnGather = column_utils.getColumns(newVal, 0, this.columnTypes);
3567
3396
  this.beforecolumnsset.emit(columnGather);
3568
3397
  this.dimensionProvider.applyNewColumns(columnGather.columns, this.disableVirtualX);
3569
3398
  this.beforecolumnapplied.emit(columnGather);
@@ -3873,7 +3702,7 @@ const RevoGridComponent = class {
3873
3702
  const headerProperties = Object.assign(Object.assign({}, view.headerProp), { type: view.type, additionalData: this.additionalData, viewportCol: view.viewportCol, selectionStore: view.columnSelectionStore, canResize: this.resize, readonly: this.readonly, columnFilter: !!this.filter });
3874
3703
  // Column headers
3875
3704
  const dataViews = [
3876
- index$1.h("revogr-header", Object.assign({ key: 'b08c837765cf20c88cb5b253a876f0f442c31628' }, headerProperties, { slot: column_service.HEADER_SLOT })),
3705
+ index$1.h("revogr-header", Object.assign({ key: 'bada77126c317da09a9826312186c16617c7b0af' }, headerProperties, { slot: column_service.HEADER_SLOT })),
3877
3706
  ];
3878
3707
  // Render viewport data (vertical sections)
3879
3708
  view.dataPorts.forEach(data => {
@@ -3895,12 +3724,12 @@ const RevoGridComponent = class {
3895
3724
  const typeCol = 'rgCol';
3896
3725
  const viewports = this.viewportProvider.stores;
3897
3726
  const dimensions = this.dimensionProvider.stores;
3898
- return (index$1.h(index$1.Host, { key: '057a2cf1a64aaeec12d2aca17b09316fb3cbfde6' }, this.hideAttribution ? null : (index$1.h("revogr-attribution", { class: "attribution" })), index$1.h("div", { key: 'e89e3d136d756f80421f42f47e09583985edb1bc', class: "main-viewport", onClick: (e) => {
3727
+ return (index$1.h(index$1.Host, { key: '9b95aef4de8af770036a733986e7e0fe2dd3ffda' }, this.hideAttribution ? null : (index$1.h("revogr-attribution", { class: "attribution" })), index$1.h("div", { key: '68dbc0fca826a0089402157d301c49a0776e9007', class: "main-viewport", onClick: (e) => {
3899
3728
  var _a;
3900
3729
  if (e.currentTarget === e.target) {
3901
3730
  (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
3902
3731
  }
3903
- } }, index$1.h("div", { key: '177db78970907d36b8d56549386a18a683573944', class: "viewports" }, index$1.h("slot", { key: '481d830a232b1969fcaa2519a5306fafaff58fb4', name: "viewport" }), viewportSections, index$1.h("revogr-scroll-virtual", { key: '6a123b2e84bec95d7a63a73322fe167248e8415e', class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), index$1.h(OrderRenderer, { key: 'fea1be24668f2039746fff93d0ab5e76d932a166', ref: e => (this.orderService = e) }))), index$1.h("revogr-scroll-virtual", { key: '74c6e05c81b2782320755c910b098edf8858d6db', class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
3732
+ } }, index$1.h("div", { key: '6f927e04dd8c7e542a87fdc0a4f6d74248c65ccb', class: "viewports" }, index$1.h("slot", { key: 'b6d421fa412b34ce9821cd1fa30a80ae37282f37', name: "viewport" }), viewportSections, index$1.h("revogr-scroll-virtual", { key: '4ce3045201685f6c6c617c84fddc5a3d531034bd', class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), index$1.h(OrderRenderer, { key: 'e5bd92c37bdc31f0601a4d4cf4a62026e0e25406', ref: e => (this.orderService = e) }))), index$1.h("revogr-scroll-virtual", { key: 'dbda0fb90cf6a9eb6ac66ca16bcff30cf254b1e1', class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
3904
3733
  }
3905
3734
  disconnectedCallback() {
3906
3735
  // Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed