@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.
- package/dist/cjs/{column.service-01f4a6c7.js → column.service-0615a373.js} +11 -12
- package/dist/cjs/column.service-0615a373.js.map +1 -0
- package/dist/cjs/{base.plugin-bf5f43a0.js → column.utils-694677fa.js} +136 -11
- package/dist/cjs/column.utils-694677fa.js.map +1 -0
- package/dist/cjs/edit.utils-2e1f4278.js +20 -0
- package/dist/cjs/edit.utils-2e1f4278.js.map +1 -0
- package/dist/cjs/{events-b28cc194.js → events-af8f6914.js} +1 -8
- package/dist/cjs/events-af8f6914.js.map +1 -0
- package/dist/cjs/{header-cell-renderer-3bc70679.js → header-cell-renderer-360528aa.js} +2 -2
- package/dist/cjs/{header-cell-renderer-3bc70679.js.map → header-cell-renderer-360528aa.js.map} +1 -1
- package/dist/cjs/{dimension.helpers-a6788214.js → index-2991afbb.js} +262 -4
- package/dist/cjs/index-2991afbb.js.map +1 -0
- package/dist/cjs/index.cjs.js +97 -35
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/key.utils-b84b0eba.js +111 -0
- package/dist/cjs/key.utils-b84b0eba.js.map +1 -0
- package/dist/cjs/revo-grid.cjs.entry.js +140 -311
- package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-attribution_6.cjs.entry.js +37 -37
- package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +10 -10
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-data_4.cjs.entry.js +13 -14
- package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
- package/dist/cjs/{viewport.store-35a3e7ee.js → row-header-utils-b5266b12.js} +13 -6
- package/dist/cjs/row-header-utils-b5266b12.js.map +1 -0
- package/dist/cjs/{selection.helpers-1a8c8d49.js → selection.helpers-4374518f.js} +13 -13
- package/dist/cjs/selection.helpers-4374518f.js.map +1 -0
- package/dist/cjs/{throttle-52be9e67.js → throttle-8885fd65.js} +2 -2
- package/dist/cjs/{throttle-52be9e67.js.map → throttle-8885fd65.js.map} +1 -1
- package/dist/collection/components/clipboard/revogr-clipboard.js +2 -2
- package/dist/collection/components/clipboard/revogr-clipboard.js.map +1 -1
- package/dist/collection/components/editors/revogr-edit.js +1 -1
- package/dist/collection/components/header/revogr-header.js +1 -1
- package/dist/collection/components/overlay/revogr-overlay-selection.js +1 -1
- package/dist/collection/components/revoGrid/revo-grid.js +12 -11
- package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/plugins/base.plugin.js.map +1 -1
- package/dist/collection/plugins/column.auto-size.plugin.js +2 -2
- package/dist/collection/plugins/column.auto-size.plugin.js.map +1 -1
- package/dist/collection/plugins/column.stretch.plugin.js.map +1 -1
- package/dist/collection/plugins/groupingRow/grouping.row.plugin.js.map +1 -1
- package/dist/collection/plugins/moveColumn/column.drag.plugin.js +1 -1
- package/dist/collection/plugins/moveColumn/column.drag.plugin.js.map +1 -1
- package/dist/collection/plugins/sorting/sorting.plugin.js +2 -2
- package/dist/collection/plugins/sorting/sorting.plugin.js.map +1 -1
- package/dist/collection/services/column.data.provider.js +32 -88
- package/dist/collection/services/column.data.provider.js.map +1 -1
- package/dist/collection/services/dimension.provider.js +2 -2
- package/dist/collection/services/dimension.provider.js.map +1 -1
- package/dist/collection/types/interfaces.js.map +1 -1
- package/dist/collection/utils/column.utils.js +124 -0
- package/dist/collection/utils/column.utils.js.map +1 -0
- package/dist/collection/utils/index.js +7 -0
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/esm/{column.service-5d14e7e9.js → column.service-af0694c5.js} +3 -4
- package/dist/esm/column.service-af0694c5.js.map +1 -0
- package/dist/esm/{base.plugin-5e7a3c51.js → column.utils-78dd3ef2.js} +122 -3
- package/dist/esm/column.utils-78dd3ef2.js.map +1 -0
- package/dist/esm/edit.utils-ca303802.js +17 -0
- package/dist/esm/edit.utils-ca303802.js.map +1 -0
- package/dist/esm/{events-77b43b40.js → events-cf0893a3.js} +2 -8
- package/dist/esm/events-cf0893a3.js.map +1 -0
- package/dist/esm/{header-cell-renderer-fc999784.js → header-cell-renderer-261317c3.js} +2 -2
- package/dist/esm/{header-cell-renderer-fc999784.js.map → header-cell-renderer-261317c3.js.map} +1 -1
- package/dist/esm/{dimension.helpers-56298828.js → index-f65def08.js} +231 -4
- package/dist/esm/index-f65def08.js.map +1 -0
- package/dist/esm/index.js +5 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/key.utils-4b0093d5.js +98 -0
- package/dist/esm/key.utils-4b0093d5.js.map +1 -0
- package/dist/esm/revo-grid.entry.js +50 -221
- package/dist/esm/revo-grid.entry.js.map +1 -1
- package/dist/esm/revogr-attribution_6.entry.js +8 -8
- package/dist/esm/revogr-clipboard_3.entry.js +5 -5
- package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
- package/dist/esm/revogr-data_4.entry.js +5 -6
- package/dist/esm/revogr-data_4.entry.js.map +1 -1
- package/dist/esm/{viewport.store-d8e03528.js → row-header-utils-6081260c.js} +9 -3
- package/dist/esm/row-header-utils-6081260c.js.map +1 -0
- package/dist/esm/{selection.helpers-accaad4a.js → selection.helpers-d92697e1.js} +2 -2
- package/dist/esm/{selection.helpers-accaad4a.js.map → selection.helpers-d92697e1.js.map} +1 -1
- package/dist/esm/{throttle-7283692c.js → throttle-041ded8e.js} +2 -2
- package/dist/esm/{throttle-7283692c.js.map → throttle-041ded8e.js.map} +1 -1
- package/dist/revo-grid/column.service-af0694c5.js +5 -0
- package/dist/revo-grid/{column.service-5d14e7e9.js.map → column.service-af0694c5.js.map} +1 -1
- package/dist/revo-grid/column.utils-78dd3ef2.js +5 -0
- package/dist/revo-grid/column.utils-78dd3ef2.js.map +1 -0
- package/dist/revo-grid/edit.utils-ca303802.js +5 -0
- package/dist/revo-grid/edit.utils-ca303802.js.map +1 -0
- package/dist/revo-grid/events-cf0893a3.js +5 -0
- package/dist/revo-grid/events-cf0893a3.js.map +1 -0
- package/dist/revo-grid/{header-cell-renderer-fc999784.js → header-cell-renderer-261317c3.js} +2 -2
- package/dist/revo-grid/index-f65def08.js +5 -0
- package/dist/revo-grid/index-f65def08.js.map +1 -0
- package/dist/revo-grid/index.esm.js +1 -1
- package/dist/revo-grid/key.utils-4b0093d5.js +5 -0
- package/dist/revo-grid/key.utils-4b0093d5.js.map +1 -0
- 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/revogr-attribution_6.entry.js +1 -1
- 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/row-header-utils-6081260c.js +5 -0
- package/dist/revo-grid/row-header-utils-6081260c.js.map +1 -0
- package/dist/revo-grid/selection.helpers-d92697e1.js +5 -0
- package/dist/revo-grid/{selection.helpers-accaad4a.js.map → selection.helpers-d92697e1.js.map} +1 -1
- package/dist/revo-grid/{throttle-7283692c.js → throttle-041ded8e.js} +2 -2
- package/dist/types/components/revoGrid/revo-grid.d.ts +2 -1
- package/dist/types/components.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/plugins/base.plugin.d.ts +1 -1
- package/dist/types/plugins/column.auto-size.plugin.d.ts +2 -4
- package/dist/types/plugins/column.stretch.plugin.d.ts +2 -4
- package/dist/types/services/column.data.provider.d.ts +2 -13
- package/dist/types/services/dimension.provider.d.ts +0 -1
- package/dist/types/types/interfaces.d.ts +11 -11
- package/dist/types/utils/column.utils.d.ts +46 -0
- package/dist/types/utils/index.d.ts +7 -0
- package/hydrate/index.js +304 -357
- package/hydrate/index.mjs +304 -357
- package/package.json +2 -2
- package/standalone/_stringToPath.js +1389 -0
- package/standalone/_stringToPath.js.map +1 -0
- package/standalone/column.service.js +4 -3
- package/standalone/column.service.js.map +1 -1
- package/standalone/consts.js +1 -1
- package/standalone/data.store.js +31 -1410
- package/standalone/data.store.js.map +1 -1
- package/standalone/debounce.js +2 -1
- package/standalone/debounce.js.map +1 -1
- package/standalone/dimension.helpers.js +2 -2
- package/standalone/index.js +6 -3
- package/standalone/index.js.map +1 -1
- package/standalone/index2.js +160 -1
- package/standalone/index2.js.map +1 -1
- package/standalone/isObjectLike.js +195 -0
- package/standalone/isObjectLike.js.map +1 -0
- package/standalone/revo-grid.js +168 -218
- package/standalone/revo-grid.js.map +1 -1
- package/standalone/revogr-clipboard2.js +2 -2
- package/standalone/revogr-clipboard2.js.map +1 -1
- package/standalone/revogr-data2.js +3 -2
- package/standalone/revogr-data2.js.map +1 -1
- package/standalone/revogr-edit.js +1 -1
- package/standalone/revogr-edit2.js +57 -83
- package/standalone/revogr-edit2.js.map +1 -1
- package/standalone/revogr-focus2.js +2 -1
- package/standalone/revogr-focus2.js.map +1 -1
- package/standalone/revogr-header2.js +4 -3
- package/standalone/revogr-header2.js.map +1 -1
- package/standalone/revogr-order-editor2.js +3 -2
- package/standalone/revogr-order-editor2.js.map +1 -1
- package/standalone/revogr-overlay-selection2.js +5 -5
- package/standalone/revogr-row-headers2.js +3 -2
- package/standalone/revogr-row-headers2.js.map +1 -1
- package/standalone/selection.utils.js +2 -1
- package/standalone/selection.utils.js.map +1 -1
- package/standalone/throttle.js +1 -1
- package/standalone/toNumber.js +2 -189
- package/standalone/toNumber.js.map +1 -1
- package/dist/cjs/base.plugin-bf5f43a0.js.map +0 -1
- package/dist/cjs/column.service-01f4a6c7.js.map +0 -1
- package/dist/cjs/dimension.helpers-a6788214.js.map +0 -1
- package/dist/cjs/events-b28cc194.js.map +0 -1
- package/dist/cjs/index-2410bbd9.js +0 -103
- package/dist/cjs/index-2410bbd9.js.map +0 -1
- package/dist/cjs/key.utils-1e48ab8f.js +0 -144
- package/dist/cjs/key.utils-1e48ab8f.js.map +0 -1
- package/dist/cjs/selection.helpers-1a8c8d49.js.map +0 -1
- package/dist/cjs/viewport.store-35a3e7ee.js.map +0 -1
- package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js +0 -43
- package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js.map +0 -1
- package/dist/esm/base.plugin-5e7a3c51.js.map +0 -1
- package/dist/esm/column.service-5d14e7e9.js.map +0 -1
- package/dist/esm/dimension.helpers-56298828.js.map +0 -1
- package/dist/esm/events-77b43b40.js.map +0 -1
- package/dist/esm/index-4e881436.js +0 -77
- package/dist/esm/index-4e881436.js.map +0 -1
- package/dist/esm/key.utils-425c987d.js +0 -133
- package/dist/esm/key.utils-425c987d.js.map +0 -1
- package/dist/esm/viewport.store-d8e03528.js.map +0 -1
- package/dist/revo-grid/base.plugin-5e7a3c51.js +0 -5
- package/dist/revo-grid/base.plugin-5e7a3c51.js.map +0 -1
- package/dist/revo-grid/column.service-5d14e7e9.js +0 -5
- package/dist/revo-grid/dimension.helpers-56298828.js +0 -5
- package/dist/revo-grid/dimension.helpers-56298828.js.map +0 -1
- package/dist/revo-grid/events-77b43b40.js +0 -5
- package/dist/revo-grid/events-77b43b40.js.map +0 -1
- package/dist/revo-grid/index-4e881436.js +0 -5
- package/dist/revo-grid/index-4e881436.js.map +0 -1
- package/dist/revo-grid/key.utils-425c987d.js +0 -5
- package/dist/revo-grid/key.utils-425c987d.js.map +0 -1
- package/dist/revo-grid/selection.helpers-accaad4a.js +0 -5
- package/dist/revo-grid/viewport.store-d8e03528.js +0 -5
- package/dist/revo-grid/viewport.store-d8e03528.js.map +0 -1
- package/dist/types/plugins/groupingColumn/grouping.col.plugin.d.ts +0 -17
- /package/dist/revo-grid/{header-cell-renderer-fc999784.js.map → header-cell-renderer-261317c3.js.map} +0 -0
- /package/dist/revo-grid/{throttle-7283692c.js.map → throttle-041ded8e.js.map} +0 -0
package/hydrate/index.js
CHANGED
|
@@ -160,7 +160,7 @@ function queryNonceMetaTagContent(doc2) {
|
|
|
160
160
|
var result_exports = {};
|
|
161
161
|
__export(result_exports, {
|
|
162
162
|
err: () => err,
|
|
163
|
-
map: () => map
|
|
163
|
+
map: () => map,
|
|
164
164
|
ok: () => ok,
|
|
165
165
|
unwrap: () => unwrap$1,
|
|
166
166
|
unwrapErr: () => unwrapErr
|
|
@@ -175,7 +175,7 @@ var err = (value) => ({
|
|
|
175
175
|
isErr: true,
|
|
176
176
|
value
|
|
177
177
|
});
|
|
178
|
-
function map
|
|
178
|
+
function map(result, fn) {
|
|
179
179
|
if (result.isOk) {
|
|
180
180
|
const val = fn(result.value);
|
|
181
181
|
if (val instanceof Promise) {
|
|
@@ -2295,13 +2295,13 @@ class Clipboard {
|
|
|
2295
2295
|
registerInstance(this, hostRef);
|
|
2296
2296
|
this.beforePaste = createEvent(this, "beforepaste", 7);
|
|
2297
2297
|
this.beforePasteApply = createEvent(this, "beforepasteapply", 7);
|
|
2298
|
-
this.pasteRegion = createEvent(this, "pasteregion",
|
|
2298
|
+
this.pasteRegion = createEvent(this, "pasteregion", 7);
|
|
2299
2299
|
this.afterPasteApply = createEvent(this, "afterpasteapply", 7);
|
|
2300
2300
|
this.beforeCut = createEvent(this, "beforecut", 7);
|
|
2301
2301
|
this.clearRegion = createEvent(this, "clearregion", 7);
|
|
2302
2302
|
this.beforeCopy = createEvent(this, "beforecopy", 7);
|
|
2303
2303
|
this.beforeCopyApply = createEvent(this, "beforecopyapply", 7);
|
|
2304
|
-
this.copyRegion = createEvent(this, "copyregion",
|
|
2304
|
+
this.copyRegion = createEvent(this, "copyregion", 7);
|
|
2305
2305
|
this.readonly = undefined;
|
|
2306
2306
|
}
|
|
2307
2307
|
onPaste(e) {
|
|
@@ -4625,12 +4625,12 @@ var _arrayPush = arrayPush$1;
|
|
|
4625
4625
|
* // => false
|
|
4626
4626
|
*/
|
|
4627
4627
|
|
|
4628
|
-
var isArray$
|
|
4628
|
+
var isArray$c = Array.isArray;
|
|
4629
4629
|
|
|
4630
|
-
var isArray_1 = isArray$
|
|
4630
|
+
var isArray_1 = isArray$c;
|
|
4631
4631
|
|
|
4632
4632
|
var arrayPush = _arrayPush,
|
|
4633
|
-
isArray$
|
|
4633
|
+
isArray$b = isArray_1;
|
|
4634
4634
|
|
|
4635
4635
|
/**
|
|
4636
4636
|
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
@@ -4645,7 +4645,7 @@ var arrayPush = _arrayPush,
|
|
|
4645
4645
|
*/
|
|
4646
4646
|
function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
|
|
4647
4647
|
var result = keysFunc(object);
|
|
4648
|
-
return isArray$
|
|
4648
|
+
return isArray$b(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
4649
4649
|
}
|
|
4650
4650
|
|
|
4651
4651
|
var _baseGetAllKeys = baseGetAllKeys$1;
|
|
@@ -5080,7 +5080,7 @@ var isTypedArray_1 = isTypedArray$2;
|
|
|
5080
5080
|
|
|
5081
5081
|
var baseTimes = _baseTimes,
|
|
5082
5082
|
isArguments$1 = isArguments_1,
|
|
5083
|
-
isArray$
|
|
5083
|
+
isArray$a = isArray_1,
|
|
5084
5084
|
isBuffer$1 = isBuffer$2.exports,
|
|
5085
5085
|
isIndex$2 = _isIndex,
|
|
5086
5086
|
isTypedArray$1 = isTypedArray_1;
|
|
@@ -5100,7 +5100,7 @@ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
|
5100
5100
|
* @returns {Array} Returns the array of property names.
|
|
5101
5101
|
*/
|
|
5102
5102
|
function arrayLikeKeys$1(value, inherited) {
|
|
5103
|
-
var isArr = isArray$
|
|
5103
|
+
var isArr = isArray$a(value),
|
|
5104
5104
|
isArg = !isArr && isArguments$1(value),
|
|
5105
5105
|
isBuff = !isArr && !isArg && isBuffer$1(value),
|
|
5106
5106
|
isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
|
|
@@ -5231,15 +5231,15 @@ var isFunction = isFunction_1,
|
|
|
5231
5231
|
* _.isArrayLike(_.noop);
|
|
5232
5232
|
* // => false
|
|
5233
5233
|
*/
|
|
5234
|
-
function isArrayLike$
|
|
5234
|
+
function isArrayLike$5(value) {
|
|
5235
5235
|
return value != null && isLength$1(value.length) && !isFunction(value);
|
|
5236
5236
|
}
|
|
5237
5237
|
|
|
5238
|
-
var isArrayLike_1 = isArrayLike$
|
|
5238
|
+
var isArrayLike_1 = isArrayLike$5;
|
|
5239
5239
|
|
|
5240
5240
|
var arrayLikeKeys = _arrayLikeKeys,
|
|
5241
5241
|
baseKeys$1 = _baseKeys,
|
|
5242
|
-
isArrayLike$
|
|
5242
|
+
isArrayLike$4 = isArrayLike_1;
|
|
5243
5243
|
|
|
5244
5244
|
/**
|
|
5245
5245
|
* Creates an array of the own enumerable property names of `object`.
|
|
@@ -5270,7 +5270,7 @@ var arrayLikeKeys = _arrayLikeKeys,
|
|
|
5270
5270
|
* // => ['0', '1']
|
|
5271
5271
|
*/
|
|
5272
5272
|
function keys$4(object) {
|
|
5273
|
-
return isArrayLike$
|
|
5273
|
+
return isArrayLike$4(object) ? arrayLikeKeys(object) : baseKeys$1(object);
|
|
5274
5274
|
}
|
|
5275
5275
|
|
|
5276
5276
|
var keys_1 = keys$4;
|
|
@@ -5479,7 +5479,7 @@ var Stack$1 = _Stack,
|
|
|
5479
5479
|
equalByTag = _equalByTag,
|
|
5480
5480
|
equalObjects = _equalObjects,
|
|
5481
5481
|
getTag$1 = _getTag,
|
|
5482
|
-
isArray$
|
|
5482
|
+
isArray$9 = isArray_1,
|
|
5483
5483
|
isBuffer = isBuffer$2.exports,
|
|
5484
5484
|
isTypedArray = isTypedArray_1;
|
|
5485
5485
|
|
|
@@ -5512,8 +5512,8 @@ var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
5512
5512
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
5513
5513
|
*/
|
|
5514
5514
|
function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
|
|
5515
|
-
var objIsArr = isArray$
|
|
5516
|
-
othIsArr = isArray$
|
|
5515
|
+
var objIsArr = isArray$9(object),
|
|
5516
|
+
othIsArr = isArray$9(other),
|
|
5517
5517
|
objTag = objIsArr ? arrayTag : getTag$1(object),
|
|
5518
5518
|
othTag = othIsArr ? arrayTag : getTag$1(other);
|
|
5519
5519
|
|
|
@@ -5736,7 +5736,7 @@ function baseMatches$1(source) {
|
|
|
5736
5736
|
|
|
5737
5737
|
var _baseMatches = baseMatches$1;
|
|
5738
5738
|
|
|
5739
|
-
var isArray$
|
|
5739
|
+
var isArray$8 = isArray_1,
|
|
5740
5740
|
isSymbol$4 = isSymbol_1;
|
|
5741
5741
|
|
|
5742
5742
|
/** Used to match property names within property paths. */
|
|
@@ -5752,7 +5752,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
|
5752
5752
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
5753
5753
|
*/
|
|
5754
5754
|
function isKey$3(value, object) {
|
|
5755
|
-
if (isArray$
|
|
5755
|
+
if (isArray$8(value)) {
|
|
5756
5756
|
return false;
|
|
5757
5757
|
}
|
|
5758
5758
|
var type = typeof value;
|
|
@@ -5905,7 +5905,7 @@ var _stringToPath = stringToPath$1;
|
|
|
5905
5905
|
* @returns {Array} Returns the new mapped array.
|
|
5906
5906
|
*/
|
|
5907
5907
|
|
|
5908
|
-
function arrayMap$
|
|
5908
|
+
function arrayMap$1(array, iteratee) {
|
|
5909
5909
|
var index = -1,
|
|
5910
5910
|
length = array == null ? 0 : array.length,
|
|
5911
5911
|
result = Array(length);
|
|
@@ -5916,11 +5916,11 @@ function arrayMap$2(array, iteratee) {
|
|
|
5916
5916
|
return result;
|
|
5917
5917
|
}
|
|
5918
5918
|
|
|
5919
|
-
var _arrayMap = arrayMap$
|
|
5919
|
+
var _arrayMap = arrayMap$1;
|
|
5920
5920
|
|
|
5921
5921
|
var Symbol = _Symbol,
|
|
5922
|
-
arrayMap
|
|
5923
|
-
isArray$
|
|
5922
|
+
arrayMap = _arrayMap,
|
|
5923
|
+
isArray$7 = isArray_1,
|
|
5924
5924
|
isSymbol$3 = isSymbol_1;
|
|
5925
5925
|
|
|
5926
5926
|
/** Used as references for various `Number` constants. */
|
|
@@ -5943,9 +5943,9 @@ function baseToString$1(value) {
|
|
|
5943
5943
|
if (typeof value == 'string') {
|
|
5944
5944
|
return value;
|
|
5945
5945
|
}
|
|
5946
|
-
if (isArray$
|
|
5946
|
+
if (isArray$7(value)) {
|
|
5947
5947
|
// Recursively convert values (susceptible to call stack limits).
|
|
5948
|
-
return arrayMap
|
|
5948
|
+
return arrayMap(value, baseToString$1) + '';
|
|
5949
5949
|
}
|
|
5950
5950
|
if (isSymbol$3(value)) {
|
|
5951
5951
|
return symbolToString ? symbolToString.call(value) : '';
|
|
@@ -5985,7 +5985,7 @@ function toString$1(value) {
|
|
|
5985
5985
|
|
|
5986
5986
|
var toString_1 = toString$1;
|
|
5987
5987
|
|
|
5988
|
-
var isArray$
|
|
5988
|
+
var isArray$6 = isArray_1,
|
|
5989
5989
|
isKey$2 = _isKey,
|
|
5990
5990
|
stringToPath = _stringToPath,
|
|
5991
5991
|
toString = toString_1;
|
|
@@ -5999,7 +5999,7 @@ var isArray$7 = isArray_1,
|
|
|
5999
5999
|
* @returns {Array} Returns the cast property path array.
|
|
6000
6000
|
*/
|
|
6001
6001
|
function castPath$2(value, object) {
|
|
6002
|
-
if (isArray$
|
|
6002
|
+
if (isArray$6(value)) {
|
|
6003
6003
|
return value;
|
|
6004
6004
|
}
|
|
6005
6005
|
return isKey$2(value, object) ? [value] : stringToPath(toString(value));
|
|
@@ -6105,7 +6105,7 @@ var _baseHasIn = baseHasIn$1;
|
|
|
6105
6105
|
|
|
6106
6106
|
var castPath = _castPath,
|
|
6107
6107
|
isArguments = isArguments_1,
|
|
6108
|
-
isArray$
|
|
6108
|
+
isArray$5 = isArray_1,
|
|
6109
6109
|
isIndex$1 = _isIndex,
|
|
6110
6110
|
isLength = isLength_1,
|
|
6111
6111
|
toKey$2 = _toKey;
|
|
@@ -6138,7 +6138,7 @@ function hasPath$1(object, path, hasFunc) {
|
|
|
6138
6138
|
}
|
|
6139
6139
|
length = object == null ? 0 : object.length;
|
|
6140
6140
|
return !!length && isLength(length) && isIndex$1(key, length) &&
|
|
6141
|
-
(isArray$
|
|
6141
|
+
(isArray$5(object) || isArguments(object));
|
|
6142
6142
|
}
|
|
6143
6143
|
|
|
6144
6144
|
var _hasPath = hasPath$1;
|
|
@@ -6304,7 +6304,7 @@ var property_1 = property$1;
|
|
|
6304
6304
|
var baseMatches = _baseMatches,
|
|
6305
6305
|
baseMatchesProperty = _baseMatchesProperty,
|
|
6306
6306
|
identity$2 = identity_1,
|
|
6307
|
-
isArray$
|
|
6307
|
+
isArray$4 = isArray_1,
|
|
6308
6308
|
property = property_1;
|
|
6309
6309
|
|
|
6310
6310
|
/**
|
|
@@ -6314,7 +6314,7 @@ var baseMatches = _baseMatches,
|
|
|
6314
6314
|
* @param {*} [value=_.identity] The value to convert to an iteratee.
|
|
6315
6315
|
* @returns {Function} Returns the iteratee.
|
|
6316
6316
|
*/
|
|
6317
|
-
function baseIteratee$
|
|
6317
|
+
function baseIteratee$4(value) {
|
|
6318
6318
|
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
|
|
6319
6319
|
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
|
|
6320
6320
|
if (typeof value == 'function') {
|
|
@@ -6324,14 +6324,14 @@ function baseIteratee$5(value) {
|
|
|
6324
6324
|
return identity$2;
|
|
6325
6325
|
}
|
|
6326
6326
|
if (typeof value == 'object') {
|
|
6327
|
-
return isArray$
|
|
6327
|
+
return isArray$4(value)
|
|
6328
6328
|
? baseMatchesProperty(value[0], value[1])
|
|
6329
6329
|
: baseMatches(value);
|
|
6330
6330
|
}
|
|
6331
6331
|
return property(value);
|
|
6332
6332
|
}
|
|
6333
6333
|
|
|
6334
|
-
var _baseIteratee = baseIteratee$
|
|
6334
|
+
var _baseIteratee = baseIteratee$4;
|
|
6335
6335
|
|
|
6336
6336
|
var toNumber = toNumber_1;
|
|
6337
6337
|
|
|
@@ -6414,7 +6414,7 @@ function toInteger$4(value) {
|
|
|
6414
6414
|
var toInteger_1 = toInteger$4;
|
|
6415
6415
|
|
|
6416
6416
|
var baseFindIndex = _baseFindIndex,
|
|
6417
|
-
baseIteratee$
|
|
6417
|
+
baseIteratee$3 = _baseIteratee,
|
|
6418
6418
|
toInteger$3 = toInteger_1;
|
|
6419
6419
|
|
|
6420
6420
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
@@ -6464,7 +6464,7 @@ function findIndex$1(array, predicate, fromIndex) {
|
|
|
6464
6464
|
if (index < 0) {
|
|
6465
6465
|
index = nativeMax$1(length + index, 0);
|
|
6466
6466
|
}
|
|
6467
|
-
return baseFindIndex(array, baseIteratee$
|
|
6467
|
+
return baseFindIndex(array, baseIteratee$3(predicate), index);
|
|
6468
6468
|
}
|
|
6469
6469
|
|
|
6470
6470
|
var findIndex_1 = findIndex$1;
|
|
@@ -6500,7 +6500,7 @@ function baseRange$1(start, end, step, fromRight) {
|
|
|
6500
6500
|
var _baseRange = baseRange$1;
|
|
6501
6501
|
|
|
6502
6502
|
var eq$1 = eq_1,
|
|
6503
|
-
isArrayLike$
|
|
6503
|
+
isArrayLike$3 = isArrayLike_1,
|
|
6504
6504
|
isIndex = _isIndex,
|
|
6505
6505
|
isObject$1 = isObject_1;
|
|
6506
6506
|
|
|
@@ -6520,7 +6520,7 @@ function isIterateeCall$3(value, index, object) {
|
|
|
6520
6520
|
}
|
|
6521
6521
|
var type = typeof index;
|
|
6522
6522
|
if (type == 'number'
|
|
6523
|
-
? (isArrayLike$
|
|
6523
|
+
? (isArrayLike$3(object) && isIndex(index, object.length))
|
|
6524
6524
|
: (type == 'string' && index in object)
|
|
6525
6525
|
) {
|
|
6526
6526
|
return eq$1(object[index], value);
|
|
@@ -7043,7 +7043,7 @@ function baseForOwn$1(object, iteratee) {
|
|
|
7043
7043
|
|
|
7044
7044
|
var _baseForOwn = baseForOwn$1;
|
|
7045
7045
|
|
|
7046
|
-
var isArrayLike$
|
|
7046
|
+
var isArrayLike$2 = isArrayLike_1;
|
|
7047
7047
|
|
|
7048
7048
|
/**
|
|
7049
7049
|
* Creates a `baseEach` or `baseEachRight` function.
|
|
@@ -7058,7 +7058,7 @@ function createBaseEach$1(eachFunc, fromRight) {
|
|
|
7058
7058
|
if (collection == null) {
|
|
7059
7059
|
return collection;
|
|
7060
7060
|
}
|
|
7061
|
-
if (!isArrayLike$
|
|
7061
|
+
if (!isArrayLike$2(collection)) {
|
|
7062
7062
|
return eachFunc(collection, iteratee);
|
|
7063
7063
|
}
|
|
7064
7064
|
var length = collection.length,
|
|
@@ -7087,9 +7087,9 @@ var baseForOwn = _baseForOwn,
|
|
|
7087
7087
|
* @param {Function} iteratee The function invoked per iteration.
|
|
7088
7088
|
* @returns {Array|Object} Returns `collection`.
|
|
7089
7089
|
*/
|
|
7090
|
-
var baseEach$
|
|
7090
|
+
var baseEach$3 = createBaseEach(baseForOwn);
|
|
7091
7091
|
|
|
7092
|
-
var _baseEach = baseEach$
|
|
7092
|
+
var _baseEach = baseEach$3;
|
|
7093
7093
|
|
|
7094
7094
|
/**
|
|
7095
7095
|
* The base implementation of `_.reduce` and `_.reduceRight`, without support
|
|
@@ -7117,10 +7117,10 @@ function baseReduce$1(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
|
7117
7117
|
var _baseReduce = baseReduce$1;
|
|
7118
7118
|
|
|
7119
7119
|
var arrayReduce = _arrayReduce,
|
|
7120
|
-
baseEach$
|
|
7121
|
-
baseIteratee$
|
|
7120
|
+
baseEach$2 = _baseEach,
|
|
7121
|
+
baseIteratee$2 = _baseIteratee,
|
|
7122
7122
|
baseReduce = _baseReduce,
|
|
7123
|
-
isArray$
|
|
7123
|
+
isArray$3 = isArray_1;
|
|
7124
7124
|
|
|
7125
7125
|
/**
|
|
7126
7126
|
* Reduces `collection` to a value which is the accumulated result of running
|
|
@@ -7160,10 +7160,10 @@ var arrayReduce = _arrayReduce,
|
|
|
7160
7160
|
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
|
|
7161
7161
|
*/
|
|
7162
7162
|
function reduce(collection, iteratee, accumulator) {
|
|
7163
|
-
var func = isArray$
|
|
7163
|
+
var func = isArray$3(collection) ? arrayReduce : baseReduce,
|
|
7164
7164
|
initAccum = arguments.length < 3;
|
|
7165
7165
|
|
|
7166
|
-
return func(collection, baseIteratee$
|
|
7166
|
+
return func(collection, baseIteratee$2(iteratee), accumulator, initAccum, baseEach$2);
|
|
7167
7167
|
}
|
|
7168
7168
|
|
|
7169
7169
|
var reduce_1 = reduce;
|
|
@@ -7208,9 +7208,9 @@ function castFunction$1(value) {
|
|
|
7208
7208
|
var _castFunction = castFunction$1;
|
|
7209
7209
|
|
|
7210
7210
|
var arrayEach = _arrayEach,
|
|
7211
|
-
baseEach$
|
|
7211
|
+
baseEach$1 = _baseEach,
|
|
7212
7212
|
castFunction = _castFunction,
|
|
7213
|
-
isArray$
|
|
7213
|
+
isArray$2 = isArray_1;
|
|
7214
7214
|
|
|
7215
7215
|
/**
|
|
7216
7216
|
* Iterates over elements of `collection` and invokes `iteratee` for each element.
|
|
@@ -7243,7 +7243,7 @@ var arrayEach = _arrayEach,
|
|
|
7243
7243
|
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
|
7244
7244
|
*/
|
|
7245
7245
|
function forEach(collection, iteratee) {
|
|
7246
|
-
var func = isArray$
|
|
7246
|
+
var func = isArray$2(collection) ? arrayEach : baseEach$1;
|
|
7247
7247
|
return func(collection, castFunction(iteratee));
|
|
7248
7248
|
}
|
|
7249
7249
|
|
|
@@ -9437,8 +9437,131 @@ function isAll(event) {
|
|
|
9437
9437
|
(event.metaKey && event.code === 'KeyA')); // Cmd + A on Mac
|
|
9438
9438
|
}
|
|
9439
9439
|
|
|
9440
|
-
|
|
9440
|
+
function getColumnType(rgCol) {
|
|
9441
|
+
if (rgCol.pin) {
|
|
9442
|
+
return rgCol.pin;
|
|
9443
|
+
}
|
|
9444
|
+
return 'rgCol';
|
|
9445
|
+
}
|
|
9446
|
+
function getColumnSizes(cols) {
|
|
9447
|
+
const res = {};
|
|
9448
|
+
for (const [i, c] of cols.entries()) {
|
|
9449
|
+
if (c.size) {
|
|
9450
|
+
res[i] = c.size;
|
|
9451
|
+
}
|
|
9452
|
+
}
|
|
9453
|
+
return res;
|
|
9454
|
+
}
|
|
9455
|
+
/**
|
|
9456
|
+
* Check if column is grouping column
|
|
9441
9457
|
*/
|
|
9458
|
+
function isColGrouping(colData) {
|
|
9459
|
+
return !!colData.children;
|
|
9460
|
+
}
|
|
9461
|
+
/**
|
|
9462
|
+
* This function is used to create a collection of columns.
|
|
9463
|
+
*/
|
|
9464
|
+
function getColumns(columns, level = 0, types) {
|
|
9465
|
+
const collection = {
|
|
9466
|
+
// columns as they are in stores per type
|
|
9467
|
+
columns: {
|
|
9468
|
+
rgCol: [],
|
|
9469
|
+
colPinStart: [],
|
|
9470
|
+
colPinEnd: [],
|
|
9471
|
+
},
|
|
9472
|
+
// columns indexed by prop for quick access
|
|
9473
|
+
columnByProp: {},
|
|
9474
|
+
// column grouping
|
|
9475
|
+
columnGrouping: {
|
|
9476
|
+
rgCol: [],
|
|
9477
|
+
colPinStart: [],
|
|
9478
|
+
colPinEnd: [],
|
|
9479
|
+
},
|
|
9480
|
+
// max depth level for column grouping
|
|
9481
|
+
maxLevel: level,
|
|
9482
|
+
// sorting
|
|
9483
|
+
sort: {},
|
|
9484
|
+
};
|
|
9485
|
+
return reduce_1(columns, (res, colData) => {
|
|
9486
|
+
// Grouped column
|
|
9487
|
+
if (isColGrouping(colData)) {
|
|
9488
|
+
return gatherGroup(res, colData, getColumns(colData.children, level + 1, types), level);
|
|
9489
|
+
}
|
|
9490
|
+
// Regular column
|
|
9491
|
+
const regularColumn = Object.assign(Object.assign({}, (colData.columnType && types && types[colData.columnType])), colData);
|
|
9492
|
+
// Regular column, no Pin
|
|
9493
|
+
if (!regularColumn.pin) {
|
|
9494
|
+
res.columns.rgCol.push(regularColumn);
|
|
9495
|
+
// Pin
|
|
9496
|
+
}
|
|
9497
|
+
else {
|
|
9498
|
+
res.columns[regularColumn.pin].push(regularColumn);
|
|
9499
|
+
}
|
|
9500
|
+
if (regularColumn.order) {
|
|
9501
|
+
res.sort[regularColumn.prop] = regularColumn;
|
|
9502
|
+
}
|
|
9503
|
+
// it's possible that some columns have same prop, but better to avoid it
|
|
9504
|
+
if (!res.columnByProp[regularColumn.prop]) {
|
|
9505
|
+
res.columnByProp[regularColumn.prop] = [];
|
|
9506
|
+
}
|
|
9507
|
+
res.columnByProp[regularColumn.prop].push(regularColumn);
|
|
9508
|
+
// trigger setup hook if present
|
|
9509
|
+
regularColumn.beforeSetup && regularColumn.beforeSetup(regularColumn);
|
|
9510
|
+
return res;
|
|
9511
|
+
}, collection);
|
|
9512
|
+
}
|
|
9513
|
+
function gatherGroup(res, colData, collection, level = 0) {
|
|
9514
|
+
// group template
|
|
9515
|
+
const group = Object.assign(Object.assign({}, colData), { level, ids: [] });
|
|
9516
|
+
// check columns for update
|
|
9517
|
+
for (let k in collection.columns) {
|
|
9518
|
+
const key = k;
|
|
9519
|
+
const resultItem = res.columns[key];
|
|
9520
|
+
const collectionItem = collection.columns[key];
|
|
9521
|
+
// if column data
|
|
9522
|
+
if (isArray_1(resultItem) && isArray_1(collectionItem)) {
|
|
9523
|
+
// fill columns
|
|
9524
|
+
resultItem.push(...collectionItem);
|
|
9525
|
+
// fill grouping
|
|
9526
|
+
if (collectionItem.length) {
|
|
9527
|
+
res.columnGrouping[key].push(Object.assign(Object.assign({}, group), { ids: collectionItem.map(item => item.prop) }));
|
|
9528
|
+
}
|
|
9529
|
+
}
|
|
9530
|
+
}
|
|
9531
|
+
// merge column groupings
|
|
9532
|
+
for (let k in collection.columnGrouping) {
|
|
9533
|
+
const key = k;
|
|
9534
|
+
const collectionItem = collection.columnGrouping[key];
|
|
9535
|
+
res.columnGrouping[key].push(...collectionItem);
|
|
9536
|
+
}
|
|
9537
|
+
res.maxLevel = Math.max(res.maxLevel, collection.maxLevel);
|
|
9538
|
+
res.sort = Object.assign(Object.assign({}, res.sort), collection.sort);
|
|
9539
|
+
return res;
|
|
9540
|
+
}
|
|
9541
|
+
function findColumn(columns, prop) {
|
|
9542
|
+
for (const c of columns) {
|
|
9543
|
+
if (isColGrouping(c)) {
|
|
9544
|
+
const found = findColumn(c.children, prop);
|
|
9545
|
+
if (found) {
|
|
9546
|
+
return found;
|
|
9547
|
+
}
|
|
9548
|
+
}
|
|
9549
|
+
else if (c.prop === prop) {
|
|
9550
|
+
return c;
|
|
9551
|
+
}
|
|
9552
|
+
}
|
|
9553
|
+
return undefined;
|
|
9554
|
+
}
|
|
9555
|
+
function getColumnByProp(columns, prop) {
|
|
9556
|
+
return findColumn(columns, prop);
|
|
9557
|
+
}
|
|
9558
|
+
|
|
9559
|
+
const LETTER_BLOCK_SIZE$1 = 10;
|
|
9560
|
+
const calculateRowHeaderSize = (itemsLength, rowHeaderColumn, minWidth = 50) => {
|
|
9561
|
+
return ((rowHeaderColumn === null || rowHeaderColumn === void 0 ? void 0 : rowHeaderColumn.size) ||
|
|
9562
|
+
Math.max((itemsLength.toString().length + 1) * LETTER_BLOCK_SIZE$1, minWidth));
|
|
9563
|
+
};
|
|
9564
|
+
|
|
9442
9565
|
/**
|
|
9443
9566
|
* Calculate system scrollbar size
|
|
9444
9567
|
*/
|
|
@@ -10593,8 +10716,8 @@ class RevoEdit {
|
|
|
10593
10716
|
}; }
|
|
10594
10717
|
}
|
|
10595
10718
|
|
|
10596
|
-
var baseIteratee$
|
|
10597
|
-
isArrayLike$
|
|
10719
|
+
var baseIteratee$1 = _baseIteratee,
|
|
10720
|
+
isArrayLike$1 = isArrayLike_1,
|
|
10598
10721
|
keys = keys_1;
|
|
10599
10722
|
|
|
10600
10723
|
/**
|
|
@@ -10607,8 +10730,8 @@ var baseIteratee$2 = _baseIteratee,
|
|
|
10607
10730
|
function createFind$1(findIndexFunc) {
|
|
10608
10731
|
return function(collection, predicate, fromIndex) {
|
|
10609
10732
|
var iterable = Object(collection);
|
|
10610
|
-
if (!isArrayLike$
|
|
10611
|
-
var iteratee = baseIteratee$
|
|
10733
|
+
if (!isArrayLike$1(collection)) {
|
|
10734
|
+
var iteratee = baseIteratee$1(predicate);
|
|
10612
10735
|
collection = keys(collection);
|
|
10613
10736
|
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
|
10614
10737
|
}
|
|
@@ -10662,219 +10785,23 @@ var find = createFind(findIndex);
|
|
|
10662
10785
|
|
|
10663
10786
|
var find_1 = find;
|
|
10664
10787
|
|
|
10665
|
-
var baseEach$1 = _baseEach,
|
|
10666
|
-
isArrayLike$1 = isArrayLike_1;
|
|
10667
|
-
|
|
10668
|
-
/**
|
|
10669
|
-
* The base implementation of `_.map` without support for iteratee shorthands.
|
|
10670
|
-
*
|
|
10671
|
-
* @private
|
|
10672
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
10673
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
10674
|
-
* @returns {Array} Returns the new mapped array.
|
|
10675
|
-
*/
|
|
10676
|
-
function baseMap$1(collection, iteratee) {
|
|
10677
|
-
var index = -1,
|
|
10678
|
-
result = isArrayLike$1(collection) ? Array(collection.length) : [];
|
|
10679
|
-
|
|
10680
|
-
baseEach$1(collection, function(value, key, collection) {
|
|
10681
|
-
result[++index] = iteratee(value, key, collection);
|
|
10682
|
-
});
|
|
10683
|
-
return result;
|
|
10684
|
-
}
|
|
10685
|
-
|
|
10686
|
-
var _baseMap = baseMap$1;
|
|
10687
|
-
|
|
10688
|
-
var arrayMap = _arrayMap,
|
|
10689
|
-
baseIteratee$1 = _baseIteratee,
|
|
10690
|
-
baseMap = _baseMap,
|
|
10691
|
-
isArray$2 = isArray_1;
|
|
10692
|
-
|
|
10693
|
-
/**
|
|
10694
|
-
* Creates an array of values by running each element in `collection` thru
|
|
10695
|
-
* `iteratee`. The iteratee is invoked with three arguments:
|
|
10696
|
-
* (value, index|key, collection).
|
|
10697
|
-
*
|
|
10698
|
-
* Many lodash methods are guarded to work as iteratees for methods like
|
|
10699
|
-
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
|
|
10700
|
-
*
|
|
10701
|
-
* The guarded methods are:
|
|
10702
|
-
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
|
|
10703
|
-
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
|
|
10704
|
-
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
|
|
10705
|
-
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
|
|
10706
|
-
*
|
|
10707
|
-
* @static
|
|
10708
|
-
* @memberOf _
|
|
10709
|
-
* @since 0.1.0
|
|
10710
|
-
* @category Collection
|
|
10711
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
10712
|
-
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
10713
|
-
* @returns {Array} Returns the new mapped array.
|
|
10714
|
-
* @example
|
|
10715
|
-
*
|
|
10716
|
-
* function square(n) {
|
|
10717
|
-
* return n * n;
|
|
10718
|
-
* }
|
|
10719
|
-
*
|
|
10720
|
-
* _.map([4, 8], square);
|
|
10721
|
-
* // => [16, 64]
|
|
10722
|
-
*
|
|
10723
|
-
* _.map({ 'a': 4, 'b': 8 }, square);
|
|
10724
|
-
* // => [16, 64] (iteration order is not guaranteed)
|
|
10725
|
-
*
|
|
10726
|
-
* var users = [
|
|
10727
|
-
* { 'user': 'barney' },
|
|
10728
|
-
* { 'user': 'fred' }
|
|
10729
|
-
* ];
|
|
10730
|
-
*
|
|
10731
|
-
* // The `_.property` iteratee shorthand.
|
|
10732
|
-
* _.map(users, 'user');
|
|
10733
|
-
* // => ['barney', 'fred']
|
|
10734
|
-
*/
|
|
10735
|
-
function map(collection, iteratee) {
|
|
10736
|
-
var func = isArray$2(collection) ? arrayMap : baseMap;
|
|
10737
|
-
return func(collection, baseIteratee$1(iteratee));
|
|
10738
|
-
}
|
|
10739
|
-
|
|
10740
|
-
var map_1 = map;
|
|
10741
|
-
|
|
10742
|
-
/**
|
|
10743
|
-
* Base layer for plugins
|
|
10744
|
-
* Provide minimal starting core for plugins to work
|
|
10745
|
-
* Extend this class to create plugin
|
|
10746
|
-
*/
|
|
10747
|
-
class BasePlugin {
|
|
10748
|
-
constructor(revogrid, providers) {
|
|
10749
|
-
this.revogrid = revogrid;
|
|
10750
|
-
this.providers = providers;
|
|
10751
|
-
this.h = hAsync;
|
|
10752
|
-
this.subscriptions = {};
|
|
10753
|
-
}
|
|
10754
|
-
/**
|
|
10755
|
-
*
|
|
10756
|
-
* @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')
|
|
10757
|
-
* @param callback - callback function for event
|
|
10758
|
-
*/
|
|
10759
|
-
addEventListener(eventName, callback) {
|
|
10760
|
-
this.revogrid.addEventListener(eventName, callback);
|
|
10761
|
-
this.subscriptions[eventName] = callback;
|
|
10762
|
-
}
|
|
10763
|
-
/**
|
|
10764
|
-
* Subscribe to property change in revo-grid component
|
|
10765
|
-
* You can return false in callback to prevent default value set
|
|
10766
|
-
*
|
|
10767
|
-
* @param prop - property name
|
|
10768
|
-
* @param callback - callback function
|
|
10769
|
-
* @param immediate - trigger callback immediately with current value
|
|
10770
|
-
*/
|
|
10771
|
-
watch(prop, callback, { immediate } = { immediate: false }) {
|
|
10772
|
-
const nativeValueDesc = Object.getOwnPropertyDescriptor(this.revogrid, prop) ||
|
|
10773
|
-
Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);
|
|
10774
|
-
// Overwrite property descriptor for this instance
|
|
10775
|
-
Object.defineProperty(this.revogrid, prop, {
|
|
10776
|
-
set(val) {
|
|
10777
|
-
var _a;
|
|
10778
|
-
const keepDefault = callback(val);
|
|
10779
|
-
if (keepDefault === false) {
|
|
10780
|
-
return;
|
|
10781
|
-
}
|
|
10782
|
-
// Continue with native behavior
|
|
10783
|
-
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.set) === null || _a === void 0 ? void 0 : _a.call(this, val);
|
|
10784
|
-
},
|
|
10785
|
-
get() {
|
|
10786
|
-
var _a;
|
|
10787
|
-
// Continue with native behavior
|
|
10788
|
-
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
10789
|
-
},
|
|
10790
|
-
});
|
|
10791
|
-
if (immediate) {
|
|
10792
|
-
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
10793
|
-
}
|
|
10794
|
-
}
|
|
10795
|
-
/**
|
|
10796
|
-
* Remove event listener
|
|
10797
|
-
* @param eventName
|
|
10798
|
-
*/
|
|
10799
|
-
removeEventListener(eventName) {
|
|
10800
|
-
this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);
|
|
10801
|
-
delete this.subscriptions[eventName];
|
|
10802
|
-
}
|
|
10803
|
-
/**
|
|
10804
|
-
* Emit event from revo-grid component
|
|
10805
|
-
* Event can be cancelled by calling event.preventDefault() in callback
|
|
10806
|
-
*/
|
|
10807
|
-
emit(eventName, detail) {
|
|
10808
|
-
const event = new CustomEvent(eventName, { detail, cancelable: true });
|
|
10809
|
-
this.revogrid.dispatchEvent(event);
|
|
10810
|
-
return event;
|
|
10811
|
-
}
|
|
10812
|
-
/**
|
|
10813
|
-
* Clear all subscriptions
|
|
10814
|
-
*/
|
|
10815
|
-
clearSubscriptions() {
|
|
10816
|
-
for (let type in this.subscriptions) {
|
|
10817
|
-
this.removeEventListener(type);
|
|
10818
|
-
}
|
|
10819
|
-
}
|
|
10820
|
-
/**
|
|
10821
|
-
* Destroy plugin and clear all subscriptions
|
|
10822
|
-
*/
|
|
10823
|
-
destroy() {
|
|
10824
|
-
this.clearSubscriptions();
|
|
10825
|
-
}
|
|
10826
|
-
}
|
|
10827
|
-
|
|
10828
|
-
class GroupingColumnPlugin extends BasePlugin {
|
|
10829
|
-
static gatherGroup(res, colData, collection, level = 0) {
|
|
10830
|
-
// group template
|
|
10831
|
-
const group = Object.assign(Object.assign({}, colData), { level, ids: [] });
|
|
10832
|
-
// check columns for update
|
|
10833
|
-
for (let k in collection.columns) {
|
|
10834
|
-
const key = k;
|
|
10835
|
-
const resultItem = res.columns[key];
|
|
10836
|
-
const collectionItem = collection.columns[key];
|
|
10837
|
-
// if column data
|
|
10838
|
-
if (isArray_1(resultItem) && isArray_1(collectionItem)) {
|
|
10839
|
-
// fill columns
|
|
10840
|
-
resultItem.push(...collectionItem);
|
|
10841
|
-
// fill grouping
|
|
10842
|
-
if (collectionItem.length) {
|
|
10843
|
-
res.columnGrouping[key].push(Object.assign(Object.assign({}, group), { ids: map_1(collectionItem, 'prop') }));
|
|
10844
|
-
}
|
|
10845
|
-
}
|
|
10846
|
-
}
|
|
10847
|
-
// merge column groupings
|
|
10848
|
-
for (let k in collection.columnGrouping) {
|
|
10849
|
-
const key = k;
|
|
10850
|
-
const collectionItem = collection.columnGrouping[key];
|
|
10851
|
-
res.columnGrouping[key].push(...collectionItem);
|
|
10852
|
-
}
|
|
10853
|
-
res.maxLevel = Math.max(res.maxLevel, collection.maxLevel);
|
|
10854
|
-
res.sort = Object.assign(Object.assign({}, res.sort), collection.sort);
|
|
10855
|
-
return res;
|
|
10856
|
-
}
|
|
10857
|
-
}
|
|
10858
|
-
/**
|
|
10859
|
-
* Check if column is grouping column
|
|
10860
|
-
*/
|
|
10861
|
-
function isColGrouping(colData) {
|
|
10862
|
-
return !!colData.children;
|
|
10863
|
-
}
|
|
10864
|
-
|
|
10865
10788
|
class ColumnDataProvider {
|
|
10866
10789
|
get order() {
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10790
|
+
const order = {};
|
|
10791
|
+
const sorting = this.sorting;
|
|
10792
|
+
if (sorting) {
|
|
10793
|
+
Object.keys(sorting).forEach((prop) => {
|
|
10794
|
+
order[prop] = sorting[prop].order;
|
|
10795
|
+
});
|
|
10796
|
+
}
|
|
10797
|
+
return order;
|
|
10871
10798
|
}
|
|
10872
10799
|
get stores() {
|
|
10873
10800
|
return this.dataSources;
|
|
10874
10801
|
}
|
|
10875
10802
|
constructor() {
|
|
10876
10803
|
this.sorting = null;
|
|
10877
|
-
this.dataSources =
|
|
10804
|
+
this.dataSources = columnTypes.reduce((sources, k) => {
|
|
10878
10805
|
sources[k] = new DataStore(k);
|
|
10879
10806
|
return sources;
|
|
10880
10807
|
}, {});
|
|
@@ -10936,7 +10863,7 @@ class ColumnDataProvider {
|
|
|
10936
10863
|
updateColumns(cols) {
|
|
10937
10864
|
// collect column by type and propert
|
|
10938
10865
|
const columnByKey = cols.reduce((res, c) => {
|
|
10939
|
-
const type =
|
|
10866
|
+
const type = getColumnType(c);
|
|
10940
10867
|
if (!res[type]) {
|
|
10941
10868
|
res[type] = {};
|
|
10942
10869
|
}
|
|
@@ -10945,20 +10872,32 @@ class ColumnDataProvider {
|
|
|
10945
10872
|
}, {});
|
|
10946
10873
|
// find indexes in source
|
|
10947
10874
|
const colByIndex = {};
|
|
10948
|
-
|
|
10875
|
+
for (const t in columnByKey) {
|
|
10876
|
+
if (!columnByKey.hasOwnProperty(t)) {
|
|
10877
|
+
continue;
|
|
10878
|
+
}
|
|
10879
|
+
const type = t;
|
|
10880
|
+
const colsToUpdate = columnByKey[type];
|
|
10949
10881
|
const items = this.dataSources[type].store.get('source');
|
|
10950
|
-
colByIndex[type] =
|
|
10882
|
+
colByIndex[type] = {};
|
|
10883
|
+
for (let i = 0; i < items.length; i++) {
|
|
10884
|
+
const rgCol = items[i];
|
|
10951
10885
|
const colToUpdateIfExists = colsToUpdate === null || colsToUpdate === void 0 ? void 0 : colsToUpdate[rgCol.prop];
|
|
10952
10886
|
if (colToUpdateIfExists) {
|
|
10953
|
-
|
|
10887
|
+
colByIndex[type][i] = colToUpdateIfExists;
|
|
10954
10888
|
}
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
10889
|
+
}
|
|
10890
|
+
}
|
|
10891
|
+
for (const t in colByIndex) {
|
|
10892
|
+
if (!colByIndex.hasOwnProperty(t)) {
|
|
10893
|
+
continue;
|
|
10894
|
+
}
|
|
10895
|
+
const type = t;
|
|
10896
|
+
setSourceByVirtualIndex(this.dataSources[type].store, colByIndex[type] || {});
|
|
10897
|
+
}
|
|
10959
10898
|
}
|
|
10960
10899
|
updateColumn(column, index) {
|
|
10961
|
-
const type =
|
|
10900
|
+
const type = getColumnType(column);
|
|
10962
10901
|
setSourceByVirtualIndex(this.dataSources[type].store, { [index]: column });
|
|
10963
10902
|
}
|
|
10964
10903
|
updateColumnSorting(column, index, sorting, additive) {
|
|
@@ -10975,7 +10914,7 @@ class ColumnDataProvider {
|
|
|
10975
10914
|
}
|
|
10976
10915
|
clearSorting() {
|
|
10977
10916
|
const types = reduce_1(this.sorting, (r, c) => {
|
|
10978
|
-
const k =
|
|
10917
|
+
const k = getColumnType(c);
|
|
10979
10918
|
r[k] = true;
|
|
10980
10919
|
return r;
|
|
10981
10920
|
}, {});
|
|
@@ -10986,78 +10925,6 @@ class ColumnDataProvider {
|
|
|
10986
10925
|
});
|
|
10987
10926
|
this.sorting = {};
|
|
10988
10927
|
}
|
|
10989
|
-
static getSizes(cols) {
|
|
10990
|
-
return reduce_1(cols, (res, c, i) => {
|
|
10991
|
-
if (c.size) {
|
|
10992
|
-
res[i] = c.size;
|
|
10993
|
-
}
|
|
10994
|
-
return res;
|
|
10995
|
-
}, {});
|
|
10996
|
-
}
|
|
10997
|
-
static getColumnByProp(columns, prop) {
|
|
10998
|
-
return find_1(columns, c => {
|
|
10999
|
-
if (isColGrouping(c)) {
|
|
11000
|
-
return ColumnDataProvider.getColumnByProp(c.children, prop);
|
|
11001
|
-
}
|
|
11002
|
-
return c.prop === prop;
|
|
11003
|
-
});
|
|
11004
|
-
}
|
|
11005
|
-
// columns processing
|
|
11006
|
-
static getColumns(columns, level = 0, types) {
|
|
11007
|
-
const collection = {
|
|
11008
|
-
// columns as they are in stores per type
|
|
11009
|
-
columns: {
|
|
11010
|
-
rgCol: [],
|
|
11011
|
-
colPinStart: [],
|
|
11012
|
-
colPinEnd: [],
|
|
11013
|
-
},
|
|
11014
|
-
// columns grouped by prop for quick access
|
|
11015
|
-
columnByProp: {},
|
|
11016
|
-
// column grouping
|
|
11017
|
-
columnGrouping: {
|
|
11018
|
-
rgCol: [],
|
|
11019
|
-
colPinStart: [],
|
|
11020
|
-
colPinEnd: [],
|
|
11021
|
-
},
|
|
11022
|
-
// max depth level for column grouping
|
|
11023
|
-
maxLevel: level,
|
|
11024
|
-
// sorting
|
|
11025
|
-
sort: {},
|
|
11026
|
-
};
|
|
11027
|
-
return reduce_1(columns, (res, colData) => {
|
|
11028
|
-
// Grouped column
|
|
11029
|
-
if (isColGrouping(colData)) {
|
|
11030
|
-
return GroupingColumnPlugin.gatherGroup(res, colData, ColumnDataProvider.getColumns(colData.children, level + 1, types), level);
|
|
11031
|
-
}
|
|
11032
|
-
// Regular column
|
|
11033
|
-
const regularColumn = Object.assign(Object.assign({}, (colData.columnType && types && types[colData.columnType])), colData);
|
|
11034
|
-
// Regular column, no Pin
|
|
11035
|
-
if (!regularColumn.pin) {
|
|
11036
|
-
res.columns.rgCol.push(regularColumn);
|
|
11037
|
-
// Pin
|
|
11038
|
-
}
|
|
11039
|
-
else {
|
|
11040
|
-
res.columns[regularColumn.pin].push(regularColumn);
|
|
11041
|
-
}
|
|
11042
|
-
if (regularColumn.order) {
|
|
11043
|
-
res.sort[regularColumn.prop] = regularColumn;
|
|
11044
|
-
}
|
|
11045
|
-
// technically it's possible that some columns have same prop, but better to avoid it
|
|
11046
|
-
if (!res.columnByProp[regularColumn.prop]) {
|
|
11047
|
-
res.columnByProp[regularColumn.prop] = [];
|
|
11048
|
-
}
|
|
11049
|
-
res.columnByProp[regularColumn.prop].push(regularColumn);
|
|
11050
|
-
// trigger setup hook if present
|
|
11051
|
-
regularColumn.beforeSetup && regularColumn.beforeSetup(regularColumn);
|
|
11052
|
-
return res;
|
|
11053
|
-
}, collection);
|
|
11054
|
-
}
|
|
11055
|
-
static getColumnType(rgCol) {
|
|
11056
|
-
if (rgCol.pin) {
|
|
11057
|
-
return rgCol.pin;
|
|
11058
|
-
}
|
|
11059
|
-
return 'rgCol';
|
|
11060
|
-
}
|
|
11061
10928
|
}
|
|
11062
10929
|
|
|
11063
10930
|
/**
|
|
@@ -11208,7 +11075,7 @@ class DimensionProvider {
|
|
|
11208
11075
|
// setItemCount
|
|
11209
11076
|
this.stores[type].setStore({ count: items.length });
|
|
11210
11077
|
// setCustomSizes
|
|
11211
|
-
const newSizes =
|
|
11078
|
+
const newSizes = getColumnSizes(items);
|
|
11212
11079
|
this.stores[type].setDimensionSize(newSizes);
|
|
11213
11080
|
const vpUpdate = {
|
|
11214
11081
|
// this triggers drop on realCount change
|
|
@@ -11346,11 +11213,97 @@ class ThemeService {
|
|
|
11346
11213
|
}
|
|
11347
11214
|
}
|
|
11348
11215
|
|
|
11216
|
+
/**
|
|
11217
|
+
* Base layer for plugins
|
|
11218
|
+
* Provide minimal starting core for plugins to work
|
|
11219
|
+
* Extend this class to create plugin
|
|
11220
|
+
*/
|
|
11221
|
+
class BasePlugin {
|
|
11222
|
+
constructor(revogrid, providers) {
|
|
11223
|
+
this.revogrid = revogrid;
|
|
11224
|
+
this.providers = providers;
|
|
11225
|
+
this.h = hAsync;
|
|
11226
|
+
this.subscriptions = {};
|
|
11227
|
+
}
|
|
11228
|
+
/**
|
|
11229
|
+
*
|
|
11230
|
+
* @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')
|
|
11231
|
+
* @param callback - callback function for event
|
|
11232
|
+
*/
|
|
11233
|
+
addEventListener(eventName, callback) {
|
|
11234
|
+
this.revogrid.addEventListener(eventName, callback);
|
|
11235
|
+
this.subscriptions[eventName] = callback;
|
|
11236
|
+
}
|
|
11237
|
+
/**
|
|
11238
|
+
* Subscribe to property change in revo-grid component
|
|
11239
|
+
* You can return false in callback to prevent default value set
|
|
11240
|
+
*
|
|
11241
|
+
* @param prop - property name
|
|
11242
|
+
* @param callback - callback function
|
|
11243
|
+
* @param immediate - trigger callback immediately with current value
|
|
11244
|
+
*/
|
|
11245
|
+
watch(prop, callback, { immediate } = { immediate: false }) {
|
|
11246
|
+
const nativeValueDesc = Object.getOwnPropertyDescriptor(this.revogrid, prop) ||
|
|
11247
|
+
Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);
|
|
11248
|
+
// Overwrite property descriptor for this instance
|
|
11249
|
+
Object.defineProperty(this.revogrid, prop, {
|
|
11250
|
+
set(val) {
|
|
11251
|
+
var _a;
|
|
11252
|
+
const keepDefault = callback(val);
|
|
11253
|
+
if (keepDefault === false) {
|
|
11254
|
+
return;
|
|
11255
|
+
}
|
|
11256
|
+
// Continue with native behavior
|
|
11257
|
+
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.set) === null || _a === void 0 ? void 0 : _a.call(this, val);
|
|
11258
|
+
},
|
|
11259
|
+
get() {
|
|
11260
|
+
var _a;
|
|
11261
|
+
// Continue with native behavior
|
|
11262
|
+
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
11263
|
+
},
|
|
11264
|
+
});
|
|
11265
|
+
if (immediate) {
|
|
11266
|
+
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
11267
|
+
}
|
|
11268
|
+
}
|
|
11269
|
+
/**
|
|
11270
|
+
* Remove event listener
|
|
11271
|
+
* @param eventName
|
|
11272
|
+
*/
|
|
11273
|
+
removeEventListener(eventName) {
|
|
11274
|
+
this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);
|
|
11275
|
+
delete this.subscriptions[eventName];
|
|
11276
|
+
}
|
|
11277
|
+
/**
|
|
11278
|
+
* Emit event from revo-grid component
|
|
11279
|
+
* Event can be cancelled by calling event.preventDefault() in callback
|
|
11280
|
+
*/
|
|
11281
|
+
emit(eventName, detail) {
|
|
11282
|
+
const event = new CustomEvent(eventName, { detail, cancelable: true });
|
|
11283
|
+
this.revogrid.dispatchEvent(event);
|
|
11284
|
+
return event;
|
|
11285
|
+
}
|
|
11286
|
+
/**
|
|
11287
|
+
* Clear all subscriptions
|
|
11288
|
+
*/
|
|
11289
|
+
clearSubscriptions() {
|
|
11290
|
+
for (let type in this.subscriptions) {
|
|
11291
|
+
this.removeEventListener(type);
|
|
11292
|
+
}
|
|
11293
|
+
}
|
|
11294
|
+
/**
|
|
11295
|
+
* Destroy plugin and clear all subscriptions
|
|
11296
|
+
*/
|
|
11297
|
+
destroy() {
|
|
11298
|
+
this.clearSubscriptions();
|
|
11299
|
+
}
|
|
11300
|
+
}
|
|
11301
|
+
|
|
11349
11302
|
/**
|
|
11350
11303
|
* Plugin module for revo-grid grid system
|
|
11351
11304
|
* Add support for automatic column resize
|
|
11352
11305
|
*/
|
|
11353
|
-
const LETTER_BLOCK_SIZE
|
|
11306
|
+
const LETTER_BLOCK_SIZE = 7;
|
|
11354
11307
|
var ColumnAutoSizeMode;
|
|
11355
11308
|
(function (ColumnAutoSizeMode) {
|
|
11356
11309
|
// increases column width on header click according the largest text value
|
|
@@ -11369,7 +11322,7 @@ class AutoSizeColumnPlugin extends BasePlugin {
|
|
|
11369
11322
|
/** for edge case when no columns defined before data */
|
|
11370
11323
|
this.dataResolve = null;
|
|
11371
11324
|
this.dataReject = null;
|
|
11372
|
-
this.letterBlockSize = (config === null || config === void 0 ? void 0 : config.letterBlockSize) || LETTER_BLOCK_SIZE
|
|
11325
|
+
this.letterBlockSize = (config === null || config === void 0 ? void 0 : config.letterBlockSize) || LETTER_BLOCK_SIZE;
|
|
11373
11326
|
// create test container to check text width
|
|
11374
11327
|
if (config === null || config === void 0 ? void 0 : config.preciseSize) {
|
|
11375
11328
|
this.precsizeCalculationArea = this.initiatePresizeElement();
|
|
@@ -11388,7 +11341,7 @@ class AutoSizeColumnPlugin extends BasePlugin {
|
|
|
11388
11341
|
this.columnSet(columns);
|
|
11389
11342
|
};
|
|
11390
11343
|
const headerDblClick = ({ detail }) => {
|
|
11391
|
-
const type =
|
|
11344
|
+
const type = getColumnType(detail.column);
|
|
11392
11345
|
const size = this.getColumnSize(detail.index, type);
|
|
11393
11346
|
if (size) {
|
|
11394
11347
|
this.providers.dimension.setCustomSizes(type, {
|
|
@@ -12211,7 +12164,7 @@ class SortingPlugin extends BasePlugin {
|
|
|
12211
12164
|
const columns = (await this.revogrid.getColumns());
|
|
12212
12165
|
const sortingFunc = {};
|
|
12213
12166
|
for (let prop in order) {
|
|
12214
|
-
const cmp = this.getComparer(
|
|
12167
|
+
const cmp = this.getComparer(getColumnByProp(columns, prop), order[prop]);
|
|
12215
12168
|
sortingFunc[prop] = cmp;
|
|
12216
12169
|
}
|
|
12217
12170
|
this.runSorting(order, sortingFunc);
|
|
@@ -13533,12 +13486,6 @@ const OrderRenderer = ({ ref }) => {
|
|
|
13533
13486
|
hAsync("div", { class: "drag-position", ref: e => (service.rgRow = e) })));
|
|
13534
13487
|
};
|
|
13535
13488
|
|
|
13536
|
-
const LETTER_BLOCK_SIZE = 10;
|
|
13537
|
-
const calculateRowHeaderSize = (itemsLength, rowHeaderColumn, minWidth = 50) => {
|
|
13538
|
-
return ((rowHeaderColumn === null || rowHeaderColumn === void 0 ? void 0 : rowHeaderColumn.size) ||
|
|
13539
|
-
Math.max((itemsLength.toString().length + 1) * LETTER_BLOCK_SIZE, minWidth));
|
|
13540
|
-
};
|
|
13541
|
-
|
|
13542
13489
|
class StretchColumn extends BasePlugin {
|
|
13543
13490
|
constructor(revogrid, providers) {
|
|
13544
13491
|
super(revogrid, providers);
|
|
@@ -14381,7 +14328,7 @@ class RevoGridComponent {
|
|
|
14381
14328
|
/** Open editor for cell. */
|
|
14382
14329
|
async setCellEdit(rgRow, prop, rowSource = 'rgRow') {
|
|
14383
14330
|
var _a;
|
|
14384
|
-
const rgCol =
|
|
14331
|
+
const rgCol = getColumnByProp(this.columns, prop);
|
|
14385
14332
|
if (!rgCol) {
|
|
14386
14333
|
return;
|
|
14387
14334
|
}
|
|
@@ -14605,7 +14552,7 @@ class RevoGridComponent {
|
|
|
14605
14552
|
this.columnChanged(this.columns);
|
|
14606
14553
|
}
|
|
14607
14554
|
columnChanged(newVal = []) {
|
|
14608
|
-
const columnGather =
|
|
14555
|
+
const columnGather = getColumns(newVal, 0, this.columnTypes);
|
|
14609
14556
|
this.beforecolumnsset.emit(columnGather);
|
|
14610
14557
|
this.dimensionProvider.applyNewColumns(columnGather.columns, this.disableVirtualX);
|
|
14611
14558
|
this.beforecolumnapplied.emit(columnGather);
|
|
@@ -14915,7 +14862,7 @@ class RevoGridComponent {
|
|
|
14915
14862
|
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 });
|
|
14916
14863
|
// Column headers
|
|
14917
14864
|
const dataViews = [
|
|
14918
|
-
hAsync("revogr-header", Object.assign({ key: '
|
|
14865
|
+
hAsync("revogr-header", Object.assign({ key: 'bada77126c317da09a9826312186c16617c7b0af' }, headerProperties, { slot: HEADER_SLOT })),
|
|
14919
14866
|
];
|
|
14920
14867
|
// Render viewport data (vertical sections)
|
|
14921
14868
|
view.dataPorts.forEach(data => {
|
|
@@ -14937,12 +14884,12 @@ class RevoGridComponent {
|
|
|
14937
14884
|
const typeCol = 'rgCol';
|
|
14938
14885
|
const viewports = this.viewportProvider.stores;
|
|
14939
14886
|
const dimensions = this.dimensionProvider.stores;
|
|
14940
|
-
return (hAsync(Host, { key: '
|
|
14887
|
+
return (hAsync(Host, { key: '9b95aef4de8af770036a733986e7e0fe2dd3ffda' }, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("div", { key: '68dbc0fca826a0089402157d301c49a0776e9007', class: "main-viewport", onClick: (e) => {
|
|
14941
14888
|
var _a;
|
|
14942
14889
|
if (e.currentTarget === e.target) {
|
|
14943
14890
|
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
|
|
14944
14891
|
}
|
|
14945
|
-
} }, hAsync("div", { key: '
|
|
14892
|
+
} }, hAsync("div", { key: '6f927e04dd8c7e542a87fdc0a4f6d74248c65ccb', class: "viewports" }, hAsync("slot", { key: 'b6d421fa412b34ce9821cd1fa30a80ae37282f37', name: "viewport" }), viewportSections, hAsync("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) }), hAsync(OrderRenderer, { key: 'e5bd92c37bdc31f0601a4d4cf4a62026e0e25406', ref: e => (this.orderService = e) }))), hAsync("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));
|
|
14946
14893
|
}
|
|
14947
14894
|
disconnectedCallback() {
|
|
14948
14895
|
// Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed
|