@revolist/revogrid 4.9.3 → 4.9.5
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-08df359f.js} +3 -3
- package/dist/cjs/{column.service-01f4a6c7.js.map → column.service-08df359f.js.map} +1 -1
- package/dist/cjs/{base.plugin-bf5f43a0.js → column.utils-0f0f4dc4.js} +127 -2
- package/dist/cjs/column.utils-0f0f4dc4.js.map +1 -0
- package/dist/cjs/{dimension.helpers-a6788214.js → dimension.helpers-85294778.js} +1 -2
- package/dist/cjs/dimension.helpers-85294778.js.map +1 -0
- package/dist/cjs/{header-cell-renderer-3bc70679.js → header-cell-renderer-fb2f9a2d.js} +2 -2
- package/dist/cjs/{header-cell-renderer-3bc70679.js.map → header-cell-renderer-fb2f9a2d.js.map} +1 -1
- package/dist/cjs/index.cjs.js +15 -9
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +80 -250
- package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-attribution_6.cjs.entry.js +8 -7
- package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +3 -3
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-data_4.cjs.entry.js +4 -4
- package/dist/cjs/{selection.helpers-1a8c8d49.js → selection.helpers-371a38aa.js} +2 -2
- package/dist/cjs/{selection.helpers-1a8c8d49.js.map → selection.helpers-371a38aa.js.map} +1 -1
- package/dist/cjs/{viewport.store-35a3e7ee.js → viewport.store-300977e4.js} +2 -2
- package/dist/cjs/{viewport.store-35a3e7ee.js.map → viewport.store-300977e4.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/overlay/revogr-overlay-selection.js +19 -8
- package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
- package/dist/collection/components/overlay/selection.utils.js.map +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 -0
- 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/esm/{column.service-5d14e7e9.js → column.service-cfc1149b.js} +3 -3
- package/dist/esm/{column.service-5d14e7e9.js.map → column.service-cfc1149b.js.map} +1 -1
- package/dist/esm/{base.plugin-5e7a3c51.js → column.utils-f6300fb5.js} +122 -3
- package/dist/esm/column.utils-f6300fb5.js.map +1 -0
- package/dist/esm/{dimension.helpers-56298828.js → dimension.helpers-938ea850.js} +2 -2
- package/dist/esm/dimension.helpers-938ea850.js.map +1 -0
- package/dist/esm/{header-cell-renderer-fc999784.js → header-cell-renderer-6f8eb067.js} +2 -2
- package/dist/esm/{header-cell-renderer-fc999784.js.map → header-cell-renderer-6f8eb067.js.map} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/revo-grid.entry.js +49 -219
- package/dist/esm/revo-grid.entry.js.map +1 -1
- package/dist/esm/revogr-attribution_6.entry.js +8 -7
- package/dist/esm/revogr-attribution_6.entry.js.map +1 -1
- package/dist/esm/revogr-clipboard_3.entry.js +3 -3
- package/dist/esm/revogr-clipboard_3.entry.js.map +1 -1
- package/dist/esm/revogr-data_4.entry.js +4 -4
- package/dist/esm/{selection.helpers-accaad4a.js → selection.helpers-a49a3d09.js} +2 -2
- package/dist/esm/{selection.helpers-accaad4a.js.map → selection.helpers-a49a3d09.js.map} +1 -1
- package/dist/esm/{viewport.store-d8e03528.js → viewport.store-a690096b.js} +2 -2
- package/dist/esm/{viewport.store-d8e03528.js.map → viewport.store-a690096b.js.map} +1 -1
- package/dist/revo-grid/{column.service-5d14e7e9.js → column.service-cfc1149b.js} +2 -2
- package/dist/revo-grid/column.utils-f6300fb5.js +5 -0
- package/dist/revo-grid/column.utils-f6300fb5.js.map +1 -0
- package/dist/revo-grid/{dimension.helpers-56298828.js → dimension.helpers-938ea850.js} +2 -2
- package/dist/revo-grid/{header-cell-renderer-fc999784.js → header-cell-renderer-6f8eb067.js} +2 -2
- package/dist/revo-grid/index.esm.js +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/revogr-attribution_6.entry.js +1 -1
- package/dist/revo-grid/revogr-attribution_6.entry.js.map +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/{selection.helpers-accaad4a.js → selection.helpers-a49a3d09.js} +2 -2
- package/dist/revo-grid/{viewport.store-d8e03528.js → viewport.store-a690096b.js} +2 -2
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +6 -2
- package/dist/types/components/overlay/selection.utils.d.ts +2 -1
- package/dist/types/components/revoGrid/revo-grid.d.ts +2 -1
- package/dist/types/components.d.ts +8 -6
- package/dist/types/index.d.ts +1 -0
- package/dist/types/plugins/base.plugin.d.ts +1 -1
- package/dist/types/plugins/column.auto-size.plugin.d.ts +1 -2
- 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/hydrate/index.js +304 -354
- package/hydrate/index.mjs +304 -354
- package/package.json +1 -1
- package/standalone/column.service.js +1 -1
- package/standalone/data.store.js +1 -1
- package/standalone/data.store.js.map +1 -1
- package/standalone/dimension.helpers.js +1 -1
- package/standalone/index.js +1 -1
- package/standalone/revo-grid.js +165 -216
- 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-header2.js +1 -1
- package/standalone/revogr-overlay-selection2.js +4 -3
- package/standalone/revogr-overlay-selection2.js.map +1 -1
- package/standalone/selection.utils.js.map +1 -1
- package/dist/cjs/base.plugin-bf5f43a0.js.map +0 -1
- package/dist/cjs/dimension.helpers-a6788214.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/dimension.helpers-56298828.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/types/plugins/groupingColumn/grouping.col.plugin.d.ts +0 -17
- /package/dist/revo-grid/{column.service-5d14e7e9.js.map → column.service-cfc1149b.js.map} +0 -0
- /package/dist/revo-grid/{dimension.helpers-56298828.js.map → dimension.helpers-938ea850.js.map} +0 -0
- /package/dist/revo-grid/{header-cell-renderer-fc999784.js.map → header-cell-renderer-6f8eb067.js.map} +0 -0
- /package/dist/revo-grid/{selection.helpers-accaad4a.js.map → selection.helpers-a49a3d09.js.map} +0 -0
- /package/dist/revo-grid/{viewport.store-d8e03528.js.map → viewport.store-a690096b.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
|
|
|
@@ -9925,7 +9925,7 @@ class OverlaySelection {
|
|
|
9925
9925
|
*/
|
|
9926
9926
|
onKeyUp(e) {
|
|
9927
9927
|
// Emit before key up event.
|
|
9928
|
-
this.beforeKeyUp.emit(e);
|
|
9928
|
+
this.beforeKeyUp.emit(Object.assign({ original: e }, this.getData()));
|
|
9929
9929
|
}
|
|
9930
9930
|
/**
|
|
9931
9931
|
* Get keyboard down from element.
|
|
@@ -9934,7 +9934,7 @@ class OverlaySelection {
|
|
|
9934
9934
|
onKeyDown(e) {
|
|
9935
9935
|
var _a;
|
|
9936
9936
|
// Emit before key down event and check if default prevention is set.
|
|
9937
|
-
const proxy = this.beforeKeyDown.emit(e);
|
|
9937
|
+
const proxy = this.beforeKeyDown.emit(Object.assign({ original: e }, this.getData()));
|
|
9938
9938
|
if (e.defaultPrevented || proxy.defaultPrevented) {
|
|
9939
9939
|
return;
|
|
9940
9940
|
}
|
|
@@ -10084,7 +10084,7 @@ class OverlaySelection {
|
|
|
10084
10084
|
nodes.push(hAsync("revogr-order-editor", { ref: e => (this.orderEditor = e), dataStore: this.dataStore, dimensionRow: this.dimensionRow, dimensionCol: this.dimensionCol, parent: this.element, onRowdragstartinit: e => this.rowDragStart(e) }));
|
|
10085
10085
|
}
|
|
10086
10086
|
}
|
|
10087
|
-
return (hAsync(Host, { key: '
|
|
10087
|
+
return (hAsync(Host, { key: '1913cd032d2cede0a8d560e330358a178500dc21', class: { mobile: this.isMobileDevice }, onDblClick: (e) => this.onElementDblClick(e), onMouseDown: (e) => this.onElementMouseDown(e), onTouchStart: (e) => this.onElementMouseDown(e, true) }, nodes, hAsync("slot", { key: '96cc5bc4e39d5d229f4d3c7ae98d092cc5ff9102', name: "data" })));
|
|
10088
10088
|
}
|
|
10089
10089
|
/**
|
|
10090
10090
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -10325,6 +10325,7 @@ class OverlaySelection {
|
|
|
10325
10325
|
lastCell: this.lastCell,
|
|
10326
10326
|
focus: this.selectionStore.get('focus'),
|
|
10327
10327
|
range: this.selectionStore.get('range'),
|
|
10328
|
+
edit: this.selectionStore.get('edit'),
|
|
10328
10329
|
};
|
|
10329
10330
|
}
|
|
10330
10331
|
get element() { return getElement(this); }
|
|
@@ -10592,8 +10593,8 @@ class RevoEdit {
|
|
|
10592
10593
|
}; }
|
|
10593
10594
|
}
|
|
10594
10595
|
|
|
10595
|
-
var baseIteratee$
|
|
10596
|
-
isArrayLike$
|
|
10596
|
+
var baseIteratee$1 = _baseIteratee,
|
|
10597
|
+
isArrayLike$1 = isArrayLike_1,
|
|
10597
10598
|
keys = keys_1;
|
|
10598
10599
|
|
|
10599
10600
|
/**
|
|
@@ -10606,8 +10607,8 @@ var baseIteratee$2 = _baseIteratee,
|
|
|
10606
10607
|
function createFind$1(findIndexFunc) {
|
|
10607
10608
|
return function(collection, predicate, fromIndex) {
|
|
10608
10609
|
var iterable = Object(collection);
|
|
10609
|
-
if (!isArrayLike$
|
|
10610
|
-
var iteratee = baseIteratee$
|
|
10610
|
+
if (!isArrayLike$1(collection)) {
|
|
10611
|
+
var iteratee = baseIteratee$1(predicate);
|
|
10611
10612
|
collection = keys(collection);
|
|
10612
10613
|
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
|
10613
10614
|
}
|
|
@@ -10661,219 +10662,142 @@ var find = createFind(findIndex);
|
|
|
10661
10662
|
|
|
10662
10663
|
var find_1 = find;
|
|
10663
10664
|
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
baseEach$1(collection, function(value, key, collection) {
|
|
10680
|
-
result[++index] = iteratee(value, key, collection);
|
|
10681
|
-
});
|
|
10682
|
-
return result;
|
|
10665
|
+
function getColumnType(rgCol) {
|
|
10666
|
+
if (rgCol.pin) {
|
|
10667
|
+
return rgCol.pin;
|
|
10668
|
+
}
|
|
10669
|
+
return 'rgCol';
|
|
10670
|
+
}
|
|
10671
|
+
function getColumnSizes(cols) {
|
|
10672
|
+
const res = {};
|
|
10673
|
+
for (const [i, c] of cols.entries()) {
|
|
10674
|
+
if (c.size) {
|
|
10675
|
+
res[i] = c.size;
|
|
10676
|
+
}
|
|
10677
|
+
}
|
|
10678
|
+
return res;
|
|
10683
10679
|
}
|
|
10684
|
-
|
|
10685
|
-
var _baseMap = baseMap$1;
|
|
10686
|
-
|
|
10687
|
-
var arrayMap = _arrayMap,
|
|
10688
|
-
baseIteratee$1 = _baseIteratee,
|
|
10689
|
-
baseMap = _baseMap,
|
|
10690
|
-
isArray$2 = isArray_1;
|
|
10691
|
-
|
|
10692
10680
|
/**
|
|
10693
|
-
*
|
|
10694
|
-
* `iteratee`. The iteratee is invoked with three arguments:
|
|
10695
|
-
* (value, index|key, collection).
|
|
10696
|
-
*
|
|
10697
|
-
* Many lodash methods are guarded to work as iteratees for methods like
|
|
10698
|
-
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
|
|
10699
|
-
*
|
|
10700
|
-
* The guarded methods are:
|
|
10701
|
-
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
|
|
10702
|
-
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
|
|
10703
|
-
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
|
|
10704
|
-
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
|
|
10705
|
-
*
|
|
10706
|
-
* @static
|
|
10707
|
-
* @memberOf _
|
|
10708
|
-
* @since 0.1.0
|
|
10709
|
-
* @category Collection
|
|
10710
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
10711
|
-
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
10712
|
-
* @returns {Array} Returns the new mapped array.
|
|
10713
|
-
* @example
|
|
10714
|
-
*
|
|
10715
|
-
* function square(n) {
|
|
10716
|
-
* return n * n;
|
|
10717
|
-
* }
|
|
10718
|
-
*
|
|
10719
|
-
* _.map([4, 8], square);
|
|
10720
|
-
* // => [16, 64]
|
|
10721
|
-
*
|
|
10722
|
-
* _.map({ 'a': 4, 'b': 8 }, square);
|
|
10723
|
-
* // => [16, 64] (iteration order is not guaranteed)
|
|
10724
|
-
*
|
|
10725
|
-
* var users = [
|
|
10726
|
-
* { 'user': 'barney' },
|
|
10727
|
-
* { 'user': 'fred' }
|
|
10728
|
-
* ];
|
|
10729
|
-
*
|
|
10730
|
-
* // The `_.property` iteratee shorthand.
|
|
10731
|
-
* _.map(users, 'user');
|
|
10732
|
-
* // => ['barney', 'fred']
|
|
10681
|
+
* Check if column is grouping column
|
|
10733
10682
|
*/
|
|
10734
|
-
function
|
|
10735
|
-
|
|
10736
|
-
return func(collection, baseIteratee$1(iteratee));
|
|
10683
|
+
function isColGrouping(colData) {
|
|
10684
|
+
return !!colData.children;
|
|
10737
10685
|
}
|
|
10738
|
-
|
|
10739
|
-
var map_1 = map;
|
|
10740
|
-
|
|
10741
10686
|
/**
|
|
10742
|
-
*
|
|
10743
|
-
* Provide minimal starting core for plugins to work
|
|
10744
|
-
* Extend this class to create plugin
|
|
10687
|
+
* This function is used to create a collection of columns.
|
|
10745
10688
|
*/
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
|
|
10753
|
-
|
|
10754
|
-
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
if (keepDefault === false) {
|
|
10779
|
-
return;
|
|
10780
|
-
}
|
|
10781
|
-
// Continue with native behavior
|
|
10782
|
-
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.set) === null || _a === void 0 ? void 0 : _a.call(this, val);
|
|
10783
|
-
},
|
|
10784
|
-
get() {
|
|
10785
|
-
var _a;
|
|
10786
|
-
// Continue with native behavior
|
|
10787
|
-
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
10788
|
-
},
|
|
10789
|
-
});
|
|
10790
|
-
if (immediate) {
|
|
10791
|
-
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
10689
|
+
function getColumns(columns, level = 0, types) {
|
|
10690
|
+
const collection = {
|
|
10691
|
+
// columns as they are in stores per type
|
|
10692
|
+
columns: {
|
|
10693
|
+
rgCol: [],
|
|
10694
|
+
colPinStart: [],
|
|
10695
|
+
colPinEnd: [],
|
|
10696
|
+
},
|
|
10697
|
+
// columns indexed by prop for quick access
|
|
10698
|
+
columnByProp: {},
|
|
10699
|
+
// column grouping
|
|
10700
|
+
columnGrouping: {
|
|
10701
|
+
rgCol: [],
|
|
10702
|
+
colPinStart: [],
|
|
10703
|
+
colPinEnd: [],
|
|
10704
|
+
},
|
|
10705
|
+
// max depth level for column grouping
|
|
10706
|
+
maxLevel: level,
|
|
10707
|
+
// sorting
|
|
10708
|
+
sort: {},
|
|
10709
|
+
};
|
|
10710
|
+
return reduce_1(columns, (res, colData) => {
|
|
10711
|
+
// Grouped column
|
|
10712
|
+
if (isColGrouping(colData)) {
|
|
10713
|
+
return gatherGroup(res, colData, getColumns(colData.children, level + 1, types), level);
|
|
10714
|
+
}
|
|
10715
|
+
// Regular column
|
|
10716
|
+
const regularColumn = Object.assign(Object.assign({}, (colData.columnType && types && types[colData.columnType])), colData);
|
|
10717
|
+
// Regular column, no Pin
|
|
10718
|
+
if (!regularColumn.pin) {
|
|
10719
|
+
res.columns.rgCol.push(regularColumn);
|
|
10720
|
+
// Pin
|
|
10792
10721
|
}
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10722
|
+
else {
|
|
10723
|
+
res.columns[regularColumn.pin].push(regularColumn);
|
|
10724
|
+
}
|
|
10725
|
+
if (regularColumn.order) {
|
|
10726
|
+
res.sort[regularColumn.prop] = regularColumn;
|
|
10727
|
+
}
|
|
10728
|
+
// it's possible that some columns have same prop, but better to avoid it
|
|
10729
|
+
if (!res.columnByProp[regularColumn.prop]) {
|
|
10730
|
+
res.columnByProp[regularColumn.prop] = [];
|
|
10731
|
+
}
|
|
10732
|
+
res.columnByProp[regularColumn.prop].push(regularColumn);
|
|
10733
|
+
// trigger setup hook if present
|
|
10734
|
+
regularColumn.beforeSetup && regularColumn.beforeSetup(regularColumn);
|
|
10735
|
+
return res;
|
|
10736
|
+
}, collection);
|
|
10737
|
+
}
|
|
10738
|
+
function gatherGroup(res, colData, collection, level = 0) {
|
|
10739
|
+
// group template
|
|
10740
|
+
const group = Object.assign(Object.assign({}, colData), { level, ids: [] });
|
|
10741
|
+
// check columns for update
|
|
10742
|
+
for (let k in collection.columns) {
|
|
10743
|
+
const key = k;
|
|
10744
|
+
const resultItem = res.columns[key];
|
|
10745
|
+
const collectionItem = collection.columns[key];
|
|
10746
|
+
// if column data
|
|
10747
|
+
if (isArray_1(resultItem) && isArray_1(collectionItem)) {
|
|
10748
|
+
// fill columns
|
|
10749
|
+
resultItem.push(...collectionItem);
|
|
10750
|
+
// fill grouping
|
|
10751
|
+
if (collectionItem.length) {
|
|
10752
|
+
res.columnGrouping[key].push(Object.assign(Object.assign({}, group), { ids: collectionItem.map(item => item.prop) }));
|
|
10753
|
+
}
|
|
10817
10754
|
}
|
|
10818
10755
|
}
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10756
|
+
// merge column groupings
|
|
10757
|
+
for (let k in collection.columnGrouping) {
|
|
10758
|
+
const key = k;
|
|
10759
|
+
const collectionItem = collection.columnGrouping[key];
|
|
10760
|
+
res.columnGrouping[key].push(...collectionItem);
|
|
10824
10761
|
}
|
|
10762
|
+
res.maxLevel = Math.max(res.maxLevel, collection.maxLevel);
|
|
10763
|
+
res.sort = Object.assign(Object.assign({}, res.sort), collection.sort);
|
|
10764
|
+
return res;
|
|
10825
10765
|
}
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
for (let k in collection.columns) {
|
|
10833
|
-
const key = k;
|
|
10834
|
-
const resultItem = res.columns[key];
|
|
10835
|
-
const collectionItem = collection.columns[key];
|
|
10836
|
-
// if column data
|
|
10837
|
-
if (isArray_1(resultItem) && isArray_1(collectionItem)) {
|
|
10838
|
-
// fill columns
|
|
10839
|
-
resultItem.push(...collectionItem);
|
|
10840
|
-
// fill grouping
|
|
10841
|
-
if (collectionItem.length) {
|
|
10842
|
-
res.columnGrouping[key].push(Object.assign(Object.assign({}, group), { ids: map_1(collectionItem, 'prop') }));
|
|
10843
|
-
}
|
|
10766
|
+
function findColumn(columns, prop) {
|
|
10767
|
+
for (const c of columns) {
|
|
10768
|
+
if (isColGrouping(c)) {
|
|
10769
|
+
const found = findColumn(c.children, prop);
|
|
10770
|
+
if (found) {
|
|
10771
|
+
return found;
|
|
10844
10772
|
}
|
|
10845
10773
|
}
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
const key = k;
|
|
10849
|
-
const collectionItem = collection.columnGrouping[key];
|
|
10850
|
-
res.columnGrouping[key].push(...collectionItem);
|
|
10774
|
+
else if (c.prop === prop) {
|
|
10775
|
+
return c;
|
|
10851
10776
|
}
|
|
10852
|
-
res.maxLevel = Math.max(res.maxLevel, collection.maxLevel);
|
|
10853
|
-
res.sort = Object.assign(Object.assign({}, res.sort), collection.sort);
|
|
10854
|
-
return res;
|
|
10855
10777
|
}
|
|
10778
|
+
return undefined;
|
|
10856
10779
|
}
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
*/
|
|
10860
|
-
function isColGrouping(colData) {
|
|
10861
|
-
return !!colData.children;
|
|
10780
|
+
function getColumnByProp(columns, prop) {
|
|
10781
|
+
return findColumn(columns, prop);
|
|
10862
10782
|
}
|
|
10863
10783
|
|
|
10864
10784
|
class ColumnDataProvider {
|
|
10865
10785
|
get order() {
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10786
|
+
const order = {};
|
|
10787
|
+
const sorting = this.sorting;
|
|
10788
|
+
if (sorting) {
|
|
10789
|
+
Object.keys(sorting).forEach((prop) => {
|
|
10790
|
+
order[prop] = sorting[prop].order;
|
|
10791
|
+
});
|
|
10792
|
+
}
|
|
10793
|
+
return order;
|
|
10870
10794
|
}
|
|
10871
10795
|
get stores() {
|
|
10872
10796
|
return this.dataSources;
|
|
10873
10797
|
}
|
|
10874
10798
|
constructor() {
|
|
10875
10799
|
this.sorting = null;
|
|
10876
|
-
this.dataSources =
|
|
10800
|
+
this.dataSources = columnTypes.reduce((sources, k) => {
|
|
10877
10801
|
sources[k] = new DataStore(k);
|
|
10878
10802
|
return sources;
|
|
10879
10803
|
}, {});
|
|
@@ -10935,7 +10859,7 @@ class ColumnDataProvider {
|
|
|
10935
10859
|
updateColumns(cols) {
|
|
10936
10860
|
// collect column by type and propert
|
|
10937
10861
|
const columnByKey = cols.reduce((res, c) => {
|
|
10938
|
-
const type =
|
|
10862
|
+
const type = getColumnType(c);
|
|
10939
10863
|
if (!res[type]) {
|
|
10940
10864
|
res[type] = {};
|
|
10941
10865
|
}
|
|
@@ -10944,20 +10868,32 @@ class ColumnDataProvider {
|
|
|
10944
10868
|
}, {});
|
|
10945
10869
|
// find indexes in source
|
|
10946
10870
|
const colByIndex = {};
|
|
10947
|
-
|
|
10871
|
+
for (const t in columnByKey) {
|
|
10872
|
+
if (!columnByKey.hasOwnProperty(t)) {
|
|
10873
|
+
continue;
|
|
10874
|
+
}
|
|
10875
|
+
const type = t;
|
|
10876
|
+
const colsToUpdate = columnByKey[type];
|
|
10948
10877
|
const items = this.dataSources[type].store.get('source');
|
|
10949
|
-
colByIndex[type] =
|
|
10878
|
+
colByIndex[type] = {};
|
|
10879
|
+
for (let i = 0; i < items.length; i++) {
|
|
10880
|
+
const rgCol = items[i];
|
|
10950
10881
|
const colToUpdateIfExists = colsToUpdate === null || colsToUpdate === void 0 ? void 0 : colsToUpdate[rgCol.prop];
|
|
10951
10882
|
if (colToUpdateIfExists) {
|
|
10952
|
-
|
|
10883
|
+
colByIndex[type][i] = colToUpdateIfExists;
|
|
10953
10884
|
}
|
|
10954
|
-
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10885
|
+
}
|
|
10886
|
+
}
|
|
10887
|
+
for (const t in colByIndex) {
|
|
10888
|
+
if (!colByIndex.hasOwnProperty(t)) {
|
|
10889
|
+
continue;
|
|
10890
|
+
}
|
|
10891
|
+
const type = t;
|
|
10892
|
+
setSourceByVirtualIndex(this.dataSources[type].store, colByIndex[type] || {});
|
|
10893
|
+
}
|
|
10958
10894
|
}
|
|
10959
10895
|
updateColumn(column, index) {
|
|
10960
|
-
const type =
|
|
10896
|
+
const type = getColumnType(column);
|
|
10961
10897
|
setSourceByVirtualIndex(this.dataSources[type].store, { [index]: column });
|
|
10962
10898
|
}
|
|
10963
10899
|
updateColumnSorting(column, index, sorting, additive) {
|
|
@@ -10974,7 +10910,7 @@ class ColumnDataProvider {
|
|
|
10974
10910
|
}
|
|
10975
10911
|
clearSorting() {
|
|
10976
10912
|
const types = reduce_1(this.sorting, (r, c) => {
|
|
10977
|
-
const k =
|
|
10913
|
+
const k = getColumnType(c);
|
|
10978
10914
|
r[k] = true;
|
|
10979
10915
|
return r;
|
|
10980
10916
|
}, {});
|
|
@@ -10985,78 +10921,6 @@ class ColumnDataProvider {
|
|
|
10985
10921
|
});
|
|
10986
10922
|
this.sorting = {};
|
|
10987
10923
|
}
|
|
10988
|
-
static getSizes(cols) {
|
|
10989
|
-
return reduce_1(cols, (res, c, i) => {
|
|
10990
|
-
if (c.size) {
|
|
10991
|
-
res[i] = c.size;
|
|
10992
|
-
}
|
|
10993
|
-
return res;
|
|
10994
|
-
}, {});
|
|
10995
|
-
}
|
|
10996
|
-
static getColumnByProp(columns, prop) {
|
|
10997
|
-
return find_1(columns, c => {
|
|
10998
|
-
if (isColGrouping(c)) {
|
|
10999
|
-
return ColumnDataProvider.getColumnByProp(c.children, prop);
|
|
11000
|
-
}
|
|
11001
|
-
return c.prop === prop;
|
|
11002
|
-
});
|
|
11003
|
-
}
|
|
11004
|
-
// columns processing
|
|
11005
|
-
static getColumns(columns, level = 0, types) {
|
|
11006
|
-
const collection = {
|
|
11007
|
-
// columns as they are in stores per type
|
|
11008
|
-
columns: {
|
|
11009
|
-
rgCol: [],
|
|
11010
|
-
colPinStart: [],
|
|
11011
|
-
colPinEnd: [],
|
|
11012
|
-
},
|
|
11013
|
-
// columns grouped by prop for quick access
|
|
11014
|
-
columnByProp: {},
|
|
11015
|
-
// column grouping
|
|
11016
|
-
columnGrouping: {
|
|
11017
|
-
rgCol: [],
|
|
11018
|
-
colPinStart: [],
|
|
11019
|
-
colPinEnd: [],
|
|
11020
|
-
},
|
|
11021
|
-
// max depth level for column grouping
|
|
11022
|
-
maxLevel: level,
|
|
11023
|
-
// sorting
|
|
11024
|
-
sort: {},
|
|
11025
|
-
};
|
|
11026
|
-
return reduce_1(columns, (res, colData) => {
|
|
11027
|
-
// Grouped column
|
|
11028
|
-
if (isColGrouping(colData)) {
|
|
11029
|
-
return GroupingColumnPlugin.gatherGroup(res, colData, ColumnDataProvider.getColumns(colData.children, level + 1, types), level);
|
|
11030
|
-
}
|
|
11031
|
-
// Regular column
|
|
11032
|
-
const regularColumn = Object.assign(Object.assign({}, (colData.columnType && types && types[colData.columnType])), colData);
|
|
11033
|
-
// Regular column, no Pin
|
|
11034
|
-
if (!regularColumn.pin) {
|
|
11035
|
-
res.columns.rgCol.push(regularColumn);
|
|
11036
|
-
// Pin
|
|
11037
|
-
}
|
|
11038
|
-
else {
|
|
11039
|
-
res.columns[regularColumn.pin].push(regularColumn);
|
|
11040
|
-
}
|
|
11041
|
-
if (regularColumn.order) {
|
|
11042
|
-
res.sort[regularColumn.prop] = regularColumn;
|
|
11043
|
-
}
|
|
11044
|
-
// technically it's possible that some columns have same prop, but better to avoid it
|
|
11045
|
-
if (!res.columnByProp[regularColumn.prop]) {
|
|
11046
|
-
res.columnByProp[regularColumn.prop] = [];
|
|
11047
|
-
}
|
|
11048
|
-
res.columnByProp[regularColumn.prop].push(regularColumn);
|
|
11049
|
-
// trigger setup hook if present
|
|
11050
|
-
regularColumn.beforeSetup && regularColumn.beforeSetup(regularColumn);
|
|
11051
|
-
return res;
|
|
11052
|
-
}, collection);
|
|
11053
|
-
}
|
|
11054
|
-
static getColumnType(rgCol) {
|
|
11055
|
-
if (rgCol.pin) {
|
|
11056
|
-
return rgCol.pin;
|
|
11057
|
-
}
|
|
11058
|
-
return 'rgCol';
|
|
11059
|
-
}
|
|
11060
10924
|
}
|
|
11061
10925
|
|
|
11062
10926
|
/**
|
|
@@ -11207,7 +11071,7 @@ class DimensionProvider {
|
|
|
11207
11071
|
// setItemCount
|
|
11208
11072
|
this.stores[type].setStore({ count: items.length });
|
|
11209
11073
|
// setCustomSizes
|
|
11210
|
-
const newSizes =
|
|
11074
|
+
const newSizes = getColumnSizes(items);
|
|
11211
11075
|
this.stores[type].setDimensionSize(newSizes);
|
|
11212
11076
|
const vpUpdate = {
|
|
11213
11077
|
// this triggers drop on realCount change
|
|
@@ -11345,6 +11209,113 @@ class ThemeService {
|
|
|
11345
11209
|
}
|
|
11346
11210
|
}
|
|
11347
11211
|
|
|
11212
|
+
/**
|
|
11213
|
+
* Base layer for plugins
|
|
11214
|
+
* Provide minimal starting core for plugins to work
|
|
11215
|
+
* Extend this class to create plugin
|
|
11216
|
+
*/
|
|
11217
|
+
class BasePlugin {
|
|
11218
|
+
constructor(revogrid, providers) {
|
|
11219
|
+
this.revogrid = revogrid;
|
|
11220
|
+
this.providers = providers;
|
|
11221
|
+
this.h = hAsync;
|
|
11222
|
+
this.subscriptions = {};
|
|
11223
|
+
}
|
|
11224
|
+
/**
|
|
11225
|
+
*
|
|
11226
|
+
* @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')
|
|
11227
|
+
* @param callback - callback function for event
|
|
11228
|
+
*/
|
|
11229
|
+
addEventListener(eventName, callback) {
|
|
11230
|
+
this.revogrid.addEventListener(eventName, callback);
|
|
11231
|
+
this.subscriptions[eventName] = callback;
|
|
11232
|
+
}
|
|
11233
|
+
/**
|
|
11234
|
+
* Subscribe to property change in revo-grid component
|
|
11235
|
+
* You can return false in callback to prevent default value set
|
|
11236
|
+
*
|
|
11237
|
+
* @param prop - property name
|
|
11238
|
+
* @param callback - callback function
|
|
11239
|
+
* @param immediate - trigger callback immediately with current value
|
|
11240
|
+
*/
|
|
11241
|
+
watch(prop, callback, { immediate } = { immediate: false }) {
|
|
11242
|
+
const nativeValueDesc = Object.getOwnPropertyDescriptor(this.revogrid, prop) ||
|
|
11243
|
+
Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);
|
|
11244
|
+
// Overwrite property descriptor for this instance
|
|
11245
|
+
Object.defineProperty(this.revogrid, prop, {
|
|
11246
|
+
set(val) {
|
|
11247
|
+
var _a;
|
|
11248
|
+
const keepDefault = callback(val);
|
|
11249
|
+
if (keepDefault === false) {
|
|
11250
|
+
return;
|
|
11251
|
+
}
|
|
11252
|
+
// Continue with native behavior
|
|
11253
|
+
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.set) === null || _a === void 0 ? void 0 : _a.call(this, val);
|
|
11254
|
+
},
|
|
11255
|
+
get() {
|
|
11256
|
+
var _a;
|
|
11257
|
+
// Continue with native behavior
|
|
11258
|
+
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
11259
|
+
},
|
|
11260
|
+
});
|
|
11261
|
+
if (immediate) {
|
|
11262
|
+
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
11263
|
+
}
|
|
11264
|
+
}
|
|
11265
|
+
/**
|
|
11266
|
+
* Remove event listener
|
|
11267
|
+
* @param eventName
|
|
11268
|
+
*/
|
|
11269
|
+
removeEventListener(eventName) {
|
|
11270
|
+
this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);
|
|
11271
|
+
delete this.subscriptions[eventName];
|
|
11272
|
+
}
|
|
11273
|
+
/**
|
|
11274
|
+
* Emit event from revo-grid component
|
|
11275
|
+
* Event can be cancelled by calling event.preventDefault() in callback
|
|
11276
|
+
*/
|
|
11277
|
+
emit(eventName, detail) {
|
|
11278
|
+
const event = new CustomEvent(eventName, { detail, cancelable: true });
|
|
11279
|
+
this.revogrid.dispatchEvent(event);
|
|
11280
|
+
return event;
|
|
11281
|
+
}
|
|
11282
|
+
/**
|
|
11283
|
+
* Clear all subscriptions
|
|
11284
|
+
*/
|
|
11285
|
+
clearSubscriptions() {
|
|
11286
|
+
for (let type in this.subscriptions) {
|
|
11287
|
+
this.removeEventListener(type);
|
|
11288
|
+
}
|
|
11289
|
+
}
|
|
11290
|
+
/**
|
|
11291
|
+
* Destroy plugin and clear all subscriptions
|
|
11292
|
+
*/
|
|
11293
|
+
destroy() {
|
|
11294
|
+
this.clearSubscriptions();
|
|
11295
|
+
}
|
|
11296
|
+
}
|
|
11297
|
+
|
|
11298
|
+
/**
|
|
11299
|
+
* Dispatches a custom event to a specified target element.
|
|
11300
|
+
*
|
|
11301
|
+
* @param target - The target element to dispatch the event to.
|
|
11302
|
+
* @param eventName - The name of the custom event.
|
|
11303
|
+
* @param detail - Optional. The detail of the custom event.
|
|
11304
|
+
* @returns The custom event that was dispatched.
|
|
11305
|
+
*/
|
|
11306
|
+
function dispatch(target, eventName, detail) {
|
|
11307
|
+
// Create a new CustomEvent with the specified event name and detail.
|
|
11308
|
+
const event = new CustomEvent(eventName, {
|
|
11309
|
+
detail,
|
|
11310
|
+
cancelable: true, // Indicates whether the event can be canceled.
|
|
11311
|
+
bubbles: true, // Indicates whether the event bubbles up through the DOM.
|
|
11312
|
+
});
|
|
11313
|
+
// Dispatch the event on the target element.
|
|
11314
|
+
target === null || target === void 0 ? void 0 : target.dispatchEvent(event);
|
|
11315
|
+
// Return the custom event that was dispatched.
|
|
11316
|
+
return event;
|
|
11317
|
+
}
|
|
11318
|
+
|
|
11348
11319
|
/**
|
|
11349
11320
|
* Plugin module for revo-grid grid system
|
|
11350
11321
|
* Add support for automatic column resize
|
|
@@ -11387,7 +11358,7 @@ class AutoSizeColumnPlugin extends BasePlugin {
|
|
|
11387
11358
|
this.columnSet(columns);
|
|
11388
11359
|
};
|
|
11389
11360
|
const headerDblClick = ({ detail }) => {
|
|
11390
|
-
const type =
|
|
11361
|
+
const type = getColumnType(detail.column);
|
|
11391
11362
|
const size = this.getColumnSize(detail.index, type);
|
|
11392
11363
|
if (size) {
|
|
11393
11364
|
this.providers.dimension.setCustomSizes(type, {
|
|
@@ -12210,7 +12181,7 @@ class SortingPlugin extends BasePlugin {
|
|
|
12210
12181
|
const columns = (await this.revogrid.getColumns());
|
|
12211
12182
|
const sortingFunc = {};
|
|
12212
12183
|
for (let prop in order) {
|
|
12213
|
-
const cmp = this.getComparer(
|
|
12184
|
+
const cmp = this.getComparer(getColumnByProp(columns, prop), order[prop]);
|
|
12214
12185
|
sortingFunc[prop] = cmp;
|
|
12215
12186
|
}
|
|
12216
12187
|
this.runSorting(order, sortingFunc);
|
|
@@ -13723,27 +13694,6 @@ class ColumnOrderHandler {
|
|
|
13723
13694
|
}
|
|
13724
13695
|
}
|
|
13725
13696
|
|
|
13726
|
-
/**
|
|
13727
|
-
* Dispatches a custom event to a specified target element.
|
|
13728
|
-
*
|
|
13729
|
-
* @param target - The target element to dispatch the event to.
|
|
13730
|
-
* @param eventName - The name of the custom event.
|
|
13731
|
-
* @param detail - Optional. The detail of the custom event.
|
|
13732
|
-
* @returns The custom event that was dispatched.
|
|
13733
|
-
*/
|
|
13734
|
-
function dispatch(target, eventName, detail) {
|
|
13735
|
-
// Create a new CustomEvent with the specified event name and detail.
|
|
13736
|
-
const event = new CustomEvent(eventName, {
|
|
13737
|
-
detail,
|
|
13738
|
-
cancelable: true, // Indicates whether the event can be canceled.
|
|
13739
|
-
bubbles: true, // Indicates whether the event bubbles up through the DOM.
|
|
13740
|
-
});
|
|
13741
|
-
// Dispatch the event on the target element.
|
|
13742
|
-
target === null || target === void 0 ? void 0 : target.dispatchEvent(event);
|
|
13743
|
-
// Return the custom event that was dispatched.
|
|
13744
|
-
return event;
|
|
13745
|
-
}
|
|
13746
|
-
|
|
13747
13697
|
var ResizeEvents;
|
|
13748
13698
|
(function (ResizeEvents) {
|
|
13749
13699
|
ResizeEvents["start"] = "resize:start";
|
|
@@ -14380,7 +14330,7 @@ class RevoGridComponent {
|
|
|
14380
14330
|
/** Open editor for cell. */
|
|
14381
14331
|
async setCellEdit(rgRow, prop, rowSource = 'rgRow') {
|
|
14382
14332
|
var _a;
|
|
14383
|
-
const rgCol =
|
|
14333
|
+
const rgCol = getColumnByProp(this.columns, prop);
|
|
14384
14334
|
if (!rgCol) {
|
|
14385
14335
|
return;
|
|
14386
14336
|
}
|
|
@@ -14604,7 +14554,7 @@ class RevoGridComponent {
|
|
|
14604
14554
|
this.columnChanged(this.columns);
|
|
14605
14555
|
}
|
|
14606
14556
|
columnChanged(newVal = []) {
|
|
14607
|
-
const columnGather =
|
|
14557
|
+
const columnGather = getColumns(newVal, 0, this.columnTypes);
|
|
14608
14558
|
this.beforecolumnsset.emit(columnGather);
|
|
14609
14559
|
this.dimensionProvider.applyNewColumns(columnGather.columns, this.disableVirtualX);
|
|
14610
14560
|
this.beforecolumnapplied.emit(columnGather);
|
|
@@ -14914,7 +14864,7 @@ class RevoGridComponent {
|
|
|
14914
14864
|
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 });
|
|
14915
14865
|
// Column headers
|
|
14916
14866
|
const dataViews = [
|
|
14917
|
-
hAsync("revogr-header", Object.assign({ key: '
|
|
14867
|
+
hAsync("revogr-header", Object.assign({ key: 'bada77126c317da09a9826312186c16617c7b0af' }, headerProperties, { slot: HEADER_SLOT })),
|
|
14918
14868
|
];
|
|
14919
14869
|
// Render viewport data (vertical sections)
|
|
14920
14870
|
view.dataPorts.forEach(data => {
|
|
@@ -14936,12 +14886,12 @@ class RevoGridComponent {
|
|
|
14936
14886
|
const typeCol = 'rgCol';
|
|
14937
14887
|
const viewports = this.viewportProvider.stores;
|
|
14938
14888
|
const dimensions = this.dimensionProvider.stores;
|
|
14939
|
-
return (hAsync(Host, { key: '
|
|
14889
|
+
return (hAsync(Host, { key: '9b95aef4de8af770036a733986e7e0fe2dd3ffda' }, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("div", { key: '68dbc0fca826a0089402157d301c49a0776e9007', class: "main-viewport", onClick: (e) => {
|
|
14940
14890
|
var _a;
|
|
14941
14891
|
if (e.currentTarget === e.target) {
|
|
14942
14892
|
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
|
|
14943
14893
|
}
|
|
14944
|
-
} }, hAsync("div", { key: '
|
|
14894
|
+
} }, 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));
|
|
14945
14895
|
}
|
|
14946
14896
|
disconnectedCallback() {
|
|
14947
14897
|
// Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed
|