@revolist/revogrid 4.9.28 → 4.9.31
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.
- package/dist/cjs/{column.drag.plugin-34501a1e.js → column.drag.plugin-ffe1918f.js} +100 -34
- package/dist/cjs/column.drag.plugin-ffe1918f.js.map +1 -0
- package/dist/cjs/{column.service-9d63ff18.js → column.service-e9ab1aa3.js} +191 -3
- package/dist/cjs/column.service-e9ab1aa3.js.map +1 -0
- package/dist/cjs/{edit.utils-093fe9cd.js → edit.utils-68a4f1c4.js} +2 -2
- package/dist/cjs/{edit.utils-093fe9cd.js.map → edit.utils-68a4f1c4.js.map} +1 -1
- package/dist/cjs/{header-cell-renderer-e4258dfd.js → header-cell-renderer-57fb8f18.js} +2 -2
- package/dist/cjs/{header-cell-renderer-e4258dfd.js.map → header-cell-renderer-57fb8f18.js.map} +1 -1
- package/dist/cjs/index-10d10c55.js +2 -2
- package/dist/cjs/{index-a9ee8eef.js → index-947f3534.js} +15 -263
- package/dist/cjs/index-947f3534.js.map +1 -0
- package/dist/cjs/index.cjs.js +9 -7
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{key.utils-1438f2ac.js → key.utils-da2ead49.js} +2 -2
- package/dist/cjs/{key.utils-1438f2ac.js.map → key.utils-da2ead49.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +89 -50
- package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/revo-grid.cjs.js +1 -1
- package/dist/cjs/{revogr-attribution_6.cjs.entry.js → revogr-attribution_7.cjs.entry.js} +76 -35
- package/dist/cjs/revogr-attribution_7.cjs.entry.js.map +1 -0
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +5 -5
- package/dist/cjs/revogr-data_4.cjs.entry.js +14 -10
- package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +21 -9
- package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/{row-header-utils-eb5949b3.js → row-header-utils-fe2264e7.js} +2 -2
- package/dist/cjs/{row-header-utils-eb5949b3.js.map → row-header-utils-fe2264e7.js.map} +1 -1
- package/dist/cjs/{text-editor-ea3badef.js → text-editor-55511a6a.js} +3 -3
- package/dist/cjs/{text-editor-ea3badef.js.map → text-editor-55511a6a.js.map} +1 -1
- package/dist/cjs/{throttle-6fecba1e.js → throttle-2ae258fb.js} +2 -2
- package/dist/cjs/{throttle-6fecba1e.js.map → throttle-2ae258fb.js.map} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/data/revogr-data-style.css +3 -3
- package/dist/collection/components/editors/revogr-edit-style.css +3 -3
- package/dist/collection/components/extra/revogr-extra.js +78 -0
- package/dist/collection/components/extra/revogr-extra.js.map +1 -0
- package/dist/collection/components/header/revogr-header-style.css +3 -3
- package/dist/collection/components/header/revogr-header.js +31 -2
- package/dist/collection/components/header/revogr-header.js.map +1 -1
- package/dist/collection/components/overlay/autofill.service.js.map +1 -1
- package/dist/collection/components/overlay/revogr-overlay-selection.js +66 -19
- package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
- package/dist/collection/components/overlay/revogr-overlay-style.css +3 -3
- package/dist/collection/components/overlay/selection.utils.js +1 -5
- package/dist/collection/components/overlay/selection.utils.js.map +1 -1
- package/dist/collection/components/revoGrid/revo-grid-style.css +3 -3
- package/dist/collection/components/revoGrid/revo-grid.js +56 -16
- package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.service.js +8 -7
- package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
- package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +3 -3
- package/dist/collection/components/scrollable/revogr-scroll-style.css +3 -3
- package/dist/collection/components/selectionFocus/revogr-focus-style.css +3 -3
- package/dist/collection/components/selectionFocus/revogr-focus.js +10 -3
- package/dist/collection/components/selectionFocus/revogr-focus.js.map +1 -1
- package/dist/collection/components/selectionTempRange/revogr-temp-range-style.css +3 -3
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js +10 -4
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -1
- package/dist/collection/plugins/filter/filter.panel.js +22 -10
- package/dist/collection/plugins/filter/filter.panel.js.map +1 -1
- package/dist/collection/plugins/filter/filter.plugin.js +10 -13
- package/dist/collection/plugins/filter/filter.plugin.js.map +1 -1
- package/dist/collection/plugins/filter/filter.style.css +6 -3
- package/dist/collection/plugins/filter/filter.types.js.map +1 -1
- package/dist/collection/serve/controller.js +1 -1
- package/dist/collection/serve/data.js +5 -1
- package/dist/collection/services/column.data.provider.js +16 -13
- package/dist/collection/services/column.data.provider.js.map +1 -1
- package/dist/collection/services/dimension.provider.js +15 -7
- package/dist/collection/services/dimension.provider.js.map +1 -1
- package/dist/collection/store/dataSource/data.store.js +9 -3
- package/dist/collection/store/dataSource/data.store.js.map +1 -1
- package/dist/collection/store/dimension/dimension.helpers.js +2 -8
- package/dist/collection/store/dimension/dimension.helpers.js.map +1 -1
- package/dist/collection/types/interfaces.js.map +1 -1
- package/dist/collection/utils/column.utils.js +3 -0
- package/dist/collection/utils/column.utils.js.map +1 -1
- package/dist/esm/{column.drag.plugin-1474c3ae.js → column.drag.plugin-bbd79520.js} +85 -21
- package/dist/esm/column.drag.plugin-bbd79520.js.map +1 -0
- package/dist/esm/{column.service-9e1f693c.js → column.service-397b7249.js} +189 -3
- package/dist/esm/column.service-397b7249.js.map +1 -0
- package/dist/esm/{edit.utils-1eeabeab.js → edit.utils-aeb2dc7c.js} +2 -2
- package/dist/esm/{edit.utils-1eeabeab.js.map → edit.utils-aeb2dc7c.js.map} +1 -1
- package/dist/esm/{header-cell-renderer-2ef5f8a1.js → header-cell-renderer-1aec2328.js} +2 -2
- package/dist/esm/{header-cell-renderer-2ef5f8a1.js.map → header-cell-renderer-1aec2328.js.map} +1 -1
- package/dist/esm/{index-b6586f9b.js → index-8eeaa30d.js} +13 -261
- package/dist/esm/index-8eeaa30d.js.map +1 -0
- package/dist/esm/index-a61f225b.js +2 -2
- package/dist/esm/index.js +7 -7
- package/dist/esm/{key.utils-562c749e.js → key.utils-9ee5fa40.js} +2 -2
- package/dist/esm/{key.utils-562c749e.js.map → key.utils-9ee5fa40.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/revo-grid.entry.js +82 -43
- package/dist/esm/revo-grid.entry.js.map +1 -1
- package/dist/esm/revo-grid.js +1 -1
- package/dist/esm/{revogr-attribution_6.entry.js → revogr-attribution_7.entry.js} +76 -36
- package/dist/esm/revogr-attribution_7.entry.js.map +1 -0
- package/dist/esm/revogr-clipboard_3.entry.js +5 -5
- package/dist/esm/revogr-data_4.entry.js +13 -9
- package/dist/esm/revogr-data_4.entry.js.map +1 -1
- package/dist/esm/revogr-filter-panel.entry.js +21 -9
- package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
- package/dist/esm/{row-header-utils-e043f744.js → row-header-utils-3220f80d.js} +2 -2
- package/dist/esm/{row-header-utils-e043f744.js.map → row-header-utils-3220f80d.js.map} +1 -1
- package/dist/esm/{text-editor-654f5d53.js → text-editor-d9dcf56d.js} +3 -3
- package/dist/esm/{text-editor-654f5d53.js.map → text-editor-d9dcf56d.js.map} +1 -1
- package/dist/esm/{throttle-bb3169c7.js → throttle-ce8e57c9.js} +2 -2
- package/dist/esm/{throttle-bb3169c7.js.map → throttle-ce8e57c9.js.map} +1 -1
- package/dist/revo-grid/column.drag.plugin-bbd79520.js +5 -0
- package/dist/revo-grid/column.drag.plugin-bbd79520.js.map +1 -0
- package/dist/revo-grid/column.service-397b7249.js +5 -0
- package/dist/revo-grid/column.service-397b7249.js.map +1 -0
- package/dist/revo-grid/{edit.utils-1eeabeab.js → edit.utils-aeb2dc7c.js} +2 -2
- package/dist/revo-grid/{header-cell-renderer-2ef5f8a1.js → header-cell-renderer-1aec2328.js} +2 -2
- package/dist/revo-grid/{index-b6586f9b.js → index-8eeaa30d.js} +2 -2
- package/dist/revo-grid/index-8eeaa30d.js.map +1 -0
- package/dist/revo-grid/index.esm.js +1 -1
- package/dist/revo-grid/key.utils-9ee5fa40.js +5 -0
- package/dist/revo-grid/{key.utils-562c749e.js.map → key.utils-9ee5fa40.js.map} +1 -1
- package/dist/revo-grid/revo-grid.entry.js +1 -1
- package/dist/revo-grid/revo-grid.entry.js.map +1 -1
- package/dist/revo-grid/revo-grid.esm.js +1 -1
- package/dist/revo-grid/revo-grid.esm.js.map +1 -1
- package/dist/revo-grid/revogr-attribution_7.entry.js +5 -0
- package/dist/revo-grid/revogr-attribution_7.entry.js.map +1 -0
- package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
- package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
- package/dist/revo-grid/row-header-utils-3220f80d.js +5 -0
- package/dist/revo-grid/text-editor-d9dcf56d.js +5 -0
- package/dist/revo-grid/{throttle-bb3169c7.js → throttle-ce8e57c9.js} +2 -2
- package/dist/types/components/extra/revogr-extra.d.ts +24 -0
- package/dist/types/components/header/revogr-header.d.ts +7 -2
- package/dist/types/components/overlay/autofill.service.d.ts +1 -1
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +8 -2
- package/dist/types/components/overlay/selection.utils.d.ts +7 -4
- package/dist/types/components/revoGrid/revo-grid.d.ts +22 -13
- package/dist/types/components.d.ts +52 -6
- package/dist/types/plugins/filter/filter.panel.d.ts +3 -0
- package/dist/types/plugins/filter/filter.plugin.d.ts +2 -5
- package/dist/types/plugins/filter/filter.types.d.ts +3 -2
- package/dist/types/services/column.data.provider.d.ts +5 -1
- package/dist/types/services/dimension.provider.d.ts +5 -0
- package/dist/types/store/dataSource/data.store.d.ts +5 -1
- package/dist/types/store/dimension/dimension.helpers.d.ts +1 -1
- package/dist/types/types/interfaces.d.ts +3 -1
- package/dist/types/utils/column.utils.d.ts +3 -0
- package/hydrate/index.js +304 -172
- package/hydrate/index.mjs +304 -172
- package/package.json +1 -1
- package/standalone/column.service.js +188 -2
- package/standalone/column.service.js.map +1 -1
- package/standalone/{reduce.js → data.store.js} +11 -188
- package/standalone/data.store.js.map +1 -0
- package/standalone/dimension.helpers.js +4 -75
- package/standalone/dimension.helpers.js.map +1 -1
- package/standalone/index.d.ts +2 -0
- package/standalone/index.js +3 -2
- package/standalone/index.js.map +1 -1
- package/standalone/revo-grid.js +174 -65
- package/standalone/revo-grid.js.map +1 -1
- package/standalone/revogr-data2.js +3 -3
- package/standalone/revogr-edit2.js +1 -1
- package/standalone/revogr-extra.d.ts +11 -0
- package/standalone/revogr-extra.js +11 -0
- package/standalone/revogr-extra.js.map +1 -0
- package/standalone/revogr-extra2.js +45 -0
- package/standalone/revogr-extra2.js.map +1 -0
- package/standalone/revogr-filter-panel.js +21 -9
- package/standalone/revogr-filter-panel.js.map +1 -1
- package/standalone/revogr-focus2.js +12 -5
- package/standalone/revogr-focus2.js.map +1 -1
- package/standalone/revogr-header2.js +9 -5
- package/standalone/revogr-header2.js.map +1 -1
- package/standalone/revogr-order-editor2.js +1 -1
- package/standalone/revogr-overlay-selection2.js +30 -18
- package/standalone/revogr-overlay-selection2.js.map +1 -1
- package/standalone/revogr-row-headers2.js +1 -1
- package/standalone/revogr-scroll-virtual2.js +1 -1
- package/standalone/revogr-temp-range2.js +11 -5
- package/standalone/revogr-temp-range2.js.map +1 -1
- package/standalone/revogr-viewport-scroll2.js +1 -1
- package/standalone/selection.utils.js +2 -6
- package/standalone/selection.utils.js.map +1 -1
- package/dist/cjs/column.drag.plugin-34501a1e.js.map +0 -1
- package/dist/cjs/column.service-9d63ff18.js.map +0 -1
- package/dist/cjs/index-a9ee8eef.js.map +0 -1
- package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +0 -1
- package/dist/esm/column.drag.plugin-1474c3ae.js.map +0 -1
- package/dist/esm/column.service-9e1f693c.js.map +0 -1
- package/dist/esm/index-b6586f9b.js.map +0 -1
- package/dist/esm/revogr-attribution_6.entry.js.map +0 -1
- package/dist/revo-grid/column.drag.plugin-1474c3ae.js +0 -5
- package/dist/revo-grid/column.drag.plugin-1474c3ae.js.map +0 -1
- package/dist/revo-grid/column.service-9e1f693c.js +0 -5
- package/dist/revo-grid/column.service-9e1f693c.js.map +0 -1
- package/dist/revo-grid/index-b6586f9b.js.map +0 -1
- package/dist/revo-grid/key.utils-562c749e.js +0 -5
- package/dist/revo-grid/revogr-attribution_6.entry.js +0 -5
- package/dist/revo-grid/revogr-attribution_6.entry.js.map +0 -1
- package/dist/revo-grid/row-header-utils-e043f744.js +0 -5
- package/dist/revo-grid/text-editor-654f5d53.js +0 -5
- package/standalone/reduce.js.map +0 -1
- /package/dist/revo-grid/{edit.utils-1eeabeab.js.map → edit.utils-aeb2dc7c.js.map} +0 -0
- /package/dist/revo-grid/{header-cell-renderer-2ef5f8a1.js.map → header-cell-renderer-1aec2328.js.map} +0 -0
- /package/dist/revo-grid/{row-header-utils-e043f744.js.map → row-header-utils-3220f80d.js.map} +0 -0
- /package/dist/revo-grid/{text-editor-654f5d53.js.map → text-editor-d9dcf56d.js.map} +0 -0
- /package/dist/revo-grid/{throttle-bb3169c7.js.map → throttle-ce8e57c9.js.map} +0 -0
|
@@ -3102,12 +3102,18 @@ function getVisibleSourceItem(store) {
|
|
|
3102
3102
|
* @param virtualIndex - virtual index to process
|
|
3103
3103
|
*/
|
|
3104
3104
|
const getSourceItem = (store, virtualIndex) => {
|
|
3105
|
-
const items = store.get('items');
|
|
3106
3105
|
const source = store.get('source');
|
|
3107
|
-
return source[
|
|
3106
|
+
return source[getSourcePhysicalIndex(store, virtualIndex)];
|
|
3107
|
+
};
|
|
3108
|
+
/**
|
|
3109
|
+
* Get physical index from virtual index
|
|
3110
|
+
*/
|
|
3111
|
+
const getSourcePhysicalIndex = (store, virtualIndex) => {
|
|
3112
|
+
const items = store.get('items');
|
|
3113
|
+
return items[virtualIndex];
|
|
3108
3114
|
};
|
|
3109
3115
|
/**
|
|
3110
|
-
*
|
|
3116
|
+
* Apply silently item/model/row value to data source
|
|
3111
3117
|
* @param store - data source with changes
|
|
3112
3118
|
* @param modelByIndex - collection of rows/values with virtual indexes to setup/replace in store/data source
|
|
3113
3119
|
* @param mutate - if true, store will be mutated and whole viewport will be re-rendered
|
|
@@ -3149,256 +3155,6 @@ function getSourceItemVirtualIndexByProp(store, prop) {
|
|
|
3149
3155
|
return items.indexOf(physicalIndex);
|
|
3150
3156
|
}
|
|
3151
3157
|
|
|
3152
|
-
/**
|
|
3153
|
-
* A specialized version of `_.reduce` for arrays without support for
|
|
3154
|
-
* iteratee shorthands.
|
|
3155
|
-
*
|
|
3156
|
-
* @private
|
|
3157
|
-
* @param {Array} [array] The array to iterate over.
|
|
3158
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
3159
|
-
* @param {*} [accumulator] The initial value.
|
|
3160
|
-
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
3161
|
-
* the initial value.
|
|
3162
|
-
* @returns {*} Returns the accumulated value.
|
|
3163
|
-
*/
|
|
3164
|
-
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
3165
|
-
var index = -1,
|
|
3166
|
-
length = array == null ? 0 : array.length;
|
|
3167
|
-
|
|
3168
|
-
if (initAccum && length) {
|
|
3169
|
-
accumulator = array[++index];
|
|
3170
|
-
}
|
|
3171
|
-
while (++index < length) {
|
|
3172
|
-
accumulator = iteratee(accumulator, array[index], index, array);
|
|
3173
|
-
}
|
|
3174
|
-
return accumulator;
|
|
3175
|
-
}
|
|
3176
|
-
|
|
3177
|
-
/**
|
|
3178
|
-
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
3179
|
-
*
|
|
3180
|
-
* @private
|
|
3181
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
3182
|
-
* @returns {Function} Returns the new base function.
|
|
3183
|
-
*/
|
|
3184
|
-
function createBaseFor(fromRight) {
|
|
3185
|
-
return function(object, iteratee, keysFunc) {
|
|
3186
|
-
var index = -1,
|
|
3187
|
-
iterable = Object(object),
|
|
3188
|
-
props = keysFunc(object),
|
|
3189
|
-
length = props.length;
|
|
3190
|
-
|
|
3191
|
-
while (length--) {
|
|
3192
|
-
var key = props[fromRight ? length : ++index];
|
|
3193
|
-
if (iteratee(iterable[key], key, iterable) === false) {
|
|
3194
|
-
break;
|
|
3195
|
-
}
|
|
3196
|
-
}
|
|
3197
|
-
return object;
|
|
3198
|
-
};
|
|
3199
|
-
}
|
|
3200
|
-
|
|
3201
|
-
/**
|
|
3202
|
-
* The base implementation of `baseForOwn` which iterates over `object`
|
|
3203
|
-
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
3204
|
-
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
3205
|
-
*
|
|
3206
|
-
* @private
|
|
3207
|
-
* @param {Object} object The object to iterate over.
|
|
3208
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
3209
|
-
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
3210
|
-
* @returns {Object} Returns `object`.
|
|
3211
|
-
*/
|
|
3212
|
-
var baseFor = createBaseFor();
|
|
3213
|
-
|
|
3214
|
-
const baseFor$1 = baseFor;
|
|
3215
|
-
|
|
3216
|
-
/**
|
|
3217
|
-
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
|
3218
|
-
*
|
|
3219
|
-
* @private
|
|
3220
|
-
* @param {Object} object The object to iterate over.
|
|
3221
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
3222
|
-
* @returns {Object} Returns `object`.
|
|
3223
|
-
*/
|
|
3224
|
-
function baseForOwn(object, iteratee) {
|
|
3225
|
-
return object && baseFor$1(object, iteratee, keys);
|
|
3226
|
-
}
|
|
3227
|
-
|
|
3228
|
-
/**
|
|
3229
|
-
* Creates a `baseEach` or `baseEachRight` function.
|
|
3230
|
-
*
|
|
3231
|
-
* @private
|
|
3232
|
-
* @param {Function} eachFunc The function to iterate over a collection.
|
|
3233
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
3234
|
-
* @returns {Function} Returns the new base function.
|
|
3235
|
-
*/
|
|
3236
|
-
function createBaseEach(eachFunc, fromRight) {
|
|
3237
|
-
return function(collection, iteratee) {
|
|
3238
|
-
if (collection == null) {
|
|
3239
|
-
return collection;
|
|
3240
|
-
}
|
|
3241
|
-
if (!isArrayLike(collection)) {
|
|
3242
|
-
return eachFunc(collection, iteratee);
|
|
3243
|
-
}
|
|
3244
|
-
var length = collection.length,
|
|
3245
|
-
index = fromRight ? length : -1,
|
|
3246
|
-
iterable = Object(collection);
|
|
3247
|
-
|
|
3248
|
-
while ((fromRight ? index-- : ++index < length)) {
|
|
3249
|
-
if (iteratee(iterable[index], index, iterable) === false) {
|
|
3250
|
-
break;
|
|
3251
|
-
}
|
|
3252
|
-
}
|
|
3253
|
-
return collection;
|
|
3254
|
-
};
|
|
3255
|
-
}
|
|
3256
|
-
|
|
3257
|
-
/**
|
|
3258
|
-
* The base implementation of `_.forEach` without support for iteratee shorthands.
|
|
3259
|
-
*
|
|
3260
|
-
* @private
|
|
3261
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
3262
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
3263
|
-
* @returns {Array|Object} Returns `collection`.
|
|
3264
|
-
*/
|
|
3265
|
-
var baseEach = createBaseEach(baseForOwn);
|
|
3266
|
-
|
|
3267
|
-
const baseEach$1 = baseEach;
|
|
3268
|
-
|
|
3269
|
-
/**
|
|
3270
|
-
* The base implementation of `_.reduce` and `_.reduceRight`, without support
|
|
3271
|
-
* for iteratee shorthands, which iterates over `collection` using `eachFunc`.
|
|
3272
|
-
*
|
|
3273
|
-
* @private
|
|
3274
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
3275
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
3276
|
-
* @param {*} accumulator The initial value.
|
|
3277
|
-
* @param {boolean} initAccum Specify using the first or last element of
|
|
3278
|
-
* `collection` as the initial value.
|
|
3279
|
-
* @param {Function} eachFunc The function to iterate over `collection`.
|
|
3280
|
-
* @returns {*} Returns the accumulated value.
|
|
3281
|
-
*/
|
|
3282
|
-
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
3283
|
-
eachFunc(collection, function(value, index, collection) {
|
|
3284
|
-
accumulator = initAccum
|
|
3285
|
-
? (initAccum = false, value)
|
|
3286
|
-
: iteratee(accumulator, value, index, collection);
|
|
3287
|
-
});
|
|
3288
|
-
return accumulator;
|
|
3289
|
-
}
|
|
3290
|
-
|
|
3291
|
-
/**
|
|
3292
|
-
* Reduces `collection` to a value which is the accumulated result of running
|
|
3293
|
-
* each element in `collection` thru `iteratee`, where each successive
|
|
3294
|
-
* invocation is supplied the return value of the previous. If `accumulator`
|
|
3295
|
-
* is not given, the first element of `collection` is used as the initial
|
|
3296
|
-
* value. The iteratee is invoked with four arguments:
|
|
3297
|
-
* (accumulator, value, index|key, collection).
|
|
3298
|
-
*
|
|
3299
|
-
* Many lodash methods are guarded to work as iteratees for methods like
|
|
3300
|
-
* `_.reduce`, `_.reduceRight`, and `_.transform`.
|
|
3301
|
-
*
|
|
3302
|
-
* The guarded methods are:
|
|
3303
|
-
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
|
|
3304
|
-
* and `sortBy`
|
|
3305
|
-
*
|
|
3306
|
-
* @static
|
|
3307
|
-
* @memberOf _
|
|
3308
|
-
* @since 0.1.0
|
|
3309
|
-
* @category Collection
|
|
3310
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
3311
|
-
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
3312
|
-
* @param {*} [accumulator] The initial value.
|
|
3313
|
-
* @returns {*} Returns the accumulated value.
|
|
3314
|
-
* @see _.reduceRight
|
|
3315
|
-
* @example
|
|
3316
|
-
*
|
|
3317
|
-
* _.reduce([1, 2], function(sum, n) {
|
|
3318
|
-
* return sum + n;
|
|
3319
|
-
* }, 0);
|
|
3320
|
-
* // => 3
|
|
3321
|
-
*
|
|
3322
|
-
* _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
|
|
3323
|
-
* (result[value] || (result[value] = [])).push(key);
|
|
3324
|
-
* return result;
|
|
3325
|
-
* }, {});
|
|
3326
|
-
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
|
|
3327
|
-
*/
|
|
3328
|
-
function reduce(collection, iteratee, accumulator) {
|
|
3329
|
-
var func = isArray$1(collection) ? arrayReduce : baseReduce,
|
|
3330
|
-
initAccum = arguments.length < 3;
|
|
3331
|
-
|
|
3332
|
-
return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach$1);
|
|
3333
|
-
}
|
|
3334
|
-
|
|
3335
|
-
/**
|
|
3336
|
-
* A specialized version of `_.forEach` for arrays without support for
|
|
3337
|
-
* iteratee shorthands.
|
|
3338
|
-
*
|
|
3339
|
-
* @private
|
|
3340
|
-
* @param {Array} [array] The array to iterate over.
|
|
3341
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
3342
|
-
* @returns {Array} Returns `array`.
|
|
3343
|
-
*/
|
|
3344
|
-
function arrayEach(array, iteratee) {
|
|
3345
|
-
var index = -1,
|
|
3346
|
-
length = array == null ? 0 : array.length;
|
|
3347
|
-
|
|
3348
|
-
while (++index < length) {
|
|
3349
|
-
if (iteratee(array[index], index, array) === false) {
|
|
3350
|
-
break;
|
|
3351
|
-
}
|
|
3352
|
-
}
|
|
3353
|
-
return array;
|
|
3354
|
-
}
|
|
3355
|
-
|
|
3356
|
-
/**
|
|
3357
|
-
* Casts `value` to `identity` if it's not a function.
|
|
3358
|
-
*
|
|
3359
|
-
* @private
|
|
3360
|
-
* @param {*} value The value to inspect.
|
|
3361
|
-
* @returns {Function} Returns cast function.
|
|
3362
|
-
*/
|
|
3363
|
-
function castFunction(value) {
|
|
3364
|
-
return typeof value == 'function' ? value : identity;
|
|
3365
|
-
}
|
|
3366
|
-
|
|
3367
|
-
/**
|
|
3368
|
-
* Iterates over elements of `collection` and invokes `iteratee` for each element.
|
|
3369
|
-
* The iteratee is invoked with three arguments: (value, index|key, collection).
|
|
3370
|
-
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
3371
|
-
*
|
|
3372
|
-
* **Note:** As with other "Collections" methods, objects with a "length"
|
|
3373
|
-
* property are iterated like arrays. To avoid this behavior use `_.forIn`
|
|
3374
|
-
* or `_.forOwn` for object iteration.
|
|
3375
|
-
*
|
|
3376
|
-
* @static
|
|
3377
|
-
* @memberOf _
|
|
3378
|
-
* @since 0.1.0
|
|
3379
|
-
* @alias each
|
|
3380
|
-
* @category Collection
|
|
3381
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
3382
|
-
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
3383
|
-
* @returns {Array|Object} Returns `collection`.
|
|
3384
|
-
* @see _.forEachRight
|
|
3385
|
-
* @example
|
|
3386
|
-
*
|
|
3387
|
-
* _.forEach([1, 2], function(value) {
|
|
3388
|
-
* console.log(value);
|
|
3389
|
-
* });
|
|
3390
|
-
* // => Logs `1` then `2`.
|
|
3391
|
-
*
|
|
3392
|
-
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
|
|
3393
|
-
* console.log(key);
|
|
3394
|
-
* });
|
|
3395
|
-
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
|
3396
|
-
*/
|
|
3397
|
-
function forEach(collection, iteratee) {
|
|
3398
|
-
var func = isArray$1(collection) ? arrayEach : baseEach$1;
|
|
3399
|
-
return func(collection, castFunction(iteratee));
|
|
3400
|
-
}
|
|
3401
|
-
|
|
3402
3158
|
/** Used as references for the maximum length and index of an array. */
|
|
3403
3159
|
var MAX_ARRAY_LENGTH$1 = 4294967295,
|
|
3404
3160
|
MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH$1 - 1;
|
|
@@ -3533,13 +3289,9 @@ function calculateDimensionData(originItemSize, newSizes = {}) {
|
|
|
3533
3289
|
// combine all new sizes
|
|
3534
3290
|
const sizes = Object.assign({}, newSizes);
|
|
3535
3291
|
// prepare order sorted new sizes and calculate changed real size
|
|
3536
|
-
|
|
3537
|
-
forEach(newSizes, (_, i) => {
|
|
3538
|
-
const index = parseInt(i, 10);
|
|
3539
|
-
newIndexes[sortedIndex(newIndexes, index)] = index;
|
|
3540
|
-
});
|
|
3292
|
+
const newIndexes = Object.keys(sizes).map(Number).sort((a, b) => a - b);
|
|
3541
3293
|
// fill new coordinates based on what is changed
|
|
3542
|
-
reduce(
|
|
3294
|
+
newIndexes.reduce((previous, itemIndex, i) => {
|
|
3543
3295
|
const newItem = {
|
|
3544
3296
|
itemIndex,
|
|
3545
3297
|
start: 0,
|
|
@@ -3877,7 +3629,6 @@ exports.ROW_HEADER_TYPE = ROW_HEADER_TYPE;
|
|
|
3877
3629
|
exports.SELECTION_BORDER_CLASS = SELECTION_BORDER_CLASS;
|
|
3878
3630
|
exports.TMP_SELECTION_BG_CLASS = TMP_SELECTION_BG_CLASS;
|
|
3879
3631
|
exports.applyMixins = applyMixins;
|
|
3880
|
-
exports.baseEach = baseEach$1;
|
|
3881
3632
|
exports.baseIteratee = baseIteratee;
|
|
3882
3633
|
exports.baseKeys = baseKeys;
|
|
3883
3634
|
exports.baseProperty = baseProperty;
|
|
@@ -3885,7 +3636,6 @@ exports.calculateDimensionData = calculateDimensionData;
|
|
|
3885
3636
|
exports.createStore = createStore;
|
|
3886
3637
|
exports.findIndex = findIndex;
|
|
3887
3638
|
exports.findPositionInArray = findPositionInArray;
|
|
3888
|
-
exports.forEach = forEach;
|
|
3889
3639
|
exports.gatherTrimmedItems = gatherTrimmedItems;
|
|
3890
3640
|
exports.getItemByIndex = getItemByIndex;
|
|
3891
3641
|
exports.getItemByPosition = getItemByPosition;
|
|
@@ -3894,17 +3644,19 @@ exports.getPhysical = getPhysical;
|
|
|
3894
3644
|
exports.getScrollbarSize = getScrollbarSize;
|
|
3895
3645
|
exports.getSourceItem = getSourceItem;
|
|
3896
3646
|
exports.getSourceItemVirtualIndexByProp = getSourceItemVirtualIndexByProp;
|
|
3647
|
+
exports.getSourcePhysicalIndex = getSourcePhysicalIndex;
|
|
3897
3648
|
exports.getTag = getTag$1;
|
|
3898
3649
|
exports.getVisibleSourceItem = getVisibleSourceItem;
|
|
3650
|
+
exports.identity = identity;
|
|
3899
3651
|
exports.isArray = isArray$1;
|
|
3900
3652
|
exports.isArrayLike = isArrayLike;
|
|
3901
3653
|
exports.isIterateeCall = isIterateeCall;
|
|
3654
|
+
exports.keys = keys;
|
|
3902
3655
|
exports.mergeSortedArray = mergeSortedArray;
|
|
3903
3656
|
exports.proxyPlugin = proxyPlugin;
|
|
3904
3657
|
exports.pushSorted = pushSorted;
|
|
3905
3658
|
exports.range = range;
|
|
3906
3659
|
exports.range$1 = range$2;
|
|
3907
|
-
exports.reduce = reduce;
|
|
3908
3660
|
exports.scaleValue = scaleValue;
|
|
3909
3661
|
exports.setItems = setItems;
|
|
3910
3662
|
exports.setSourceByPhysicalIndex = setSourceByPhysicalIndex;
|
|
@@ -3914,4 +3666,4 @@ exports.timeout = timeout;
|
|
|
3914
3666
|
exports.toInteger = toInteger;
|
|
3915
3667
|
exports.trimmedPlugin = trimmedPlugin;
|
|
3916
3668
|
|
|
3917
|
-
//# sourceMappingURL=index-
|
|
3669
|
+
//# sourceMappingURL=index-947f3534.js.map
|