@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.mjs
CHANGED
|
@@ -156,7 +156,7 @@ function queryNonceMetaTagContent(doc2) {
|
|
|
156
156
|
var result_exports = {};
|
|
157
157
|
__export(result_exports, {
|
|
158
158
|
err: () => err,
|
|
159
|
-
map: () => map
|
|
159
|
+
map: () => map,
|
|
160
160
|
ok: () => ok,
|
|
161
161
|
unwrap: () => unwrap$1,
|
|
162
162
|
unwrapErr: () => unwrapErr
|
|
@@ -171,7 +171,7 @@ var err = (value) => ({
|
|
|
171
171
|
isErr: true,
|
|
172
172
|
value
|
|
173
173
|
});
|
|
174
|
-
function map
|
|
174
|
+
function map(result, fn) {
|
|
175
175
|
if (result.isOk) {
|
|
176
176
|
const val = fn(result.value);
|
|
177
177
|
if (val instanceof Promise) {
|
|
@@ -2291,13 +2291,13 @@ class Clipboard {
|
|
|
2291
2291
|
registerInstance(this, hostRef);
|
|
2292
2292
|
this.beforePaste = createEvent(this, "beforepaste", 7);
|
|
2293
2293
|
this.beforePasteApply = createEvent(this, "beforepasteapply", 7);
|
|
2294
|
-
this.pasteRegion = createEvent(this, "pasteregion",
|
|
2294
|
+
this.pasteRegion = createEvent(this, "pasteregion", 7);
|
|
2295
2295
|
this.afterPasteApply = createEvent(this, "afterpasteapply", 7);
|
|
2296
2296
|
this.beforeCut = createEvent(this, "beforecut", 7);
|
|
2297
2297
|
this.clearRegion = createEvent(this, "clearregion", 7);
|
|
2298
2298
|
this.beforeCopy = createEvent(this, "beforecopy", 7);
|
|
2299
2299
|
this.beforeCopyApply = createEvent(this, "beforecopyapply", 7);
|
|
2300
|
-
this.copyRegion = createEvent(this, "copyregion",
|
|
2300
|
+
this.copyRegion = createEvent(this, "copyregion", 7);
|
|
2301
2301
|
this.readonly = undefined;
|
|
2302
2302
|
}
|
|
2303
2303
|
onPaste(e) {
|
|
@@ -4621,12 +4621,12 @@ var _arrayPush = arrayPush$1;
|
|
|
4621
4621
|
* // => false
|
|
4622
4622
|
*/
|
|
4623
4623
|
|
|
4624
|
-
var isArray$
|
|
4624
|
+
var isArray$c = Array.isArray;
|
|
4625
4625
|
|
|
4626
|
-
var isArray_1 = isArray$
|
|
4626
|
+
var isArray_1 = isArray$c;
|
|
4627
4627
|
|
|
4628
4628
|
var arrayPush = _arrayPush,
|
|
4629
|
-
isArray$
|
|
4629
|
+
isArray$b = isArray_1;
|
|
4630
4630
|
|
|
4631
4631
|
/**
|
|
4632
4632
|
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
@@ -4641,7 +4641,7 @@ var arrayPush = _arrayPush,
|
|
|
4641
4641
|
*/
|
|
4642
4642
|
function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
|
|
4643
4643
|
var result = keysFunc(object);
|
|
4644
|
-
return isArray$
|
|
4644
|
+
return isArray$b(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
4645
4645
|
}
|
|
4646
4646
|
|
|
4647
4647
|
var _baseGetAllKeys = baseGetAllKeys$1;
|
|
@@ -5076,7 +5076,7 @@ var isTypedArray_1 = isTypedArray$2;
|
|
|
5076
5076
|
|
|
5077
5077
|
var baseTimes = _baseTimes,
|
|
5078
5078
|
isArguments$1 = isArguments_1,
|
|
5079
|
-
isArray$
|
|
5079
|
+
isArray$a = isArray_1,
|
|
5080
5080
|
isBuffer$1 = isBuffer$2.exports,
|
|
5081
5081
|
isIndex$2 = _isIndex,
|
|
5082
5082
|
isTypedArray$1 = isTypedArray_1;
|
|
@@ -5096,7 +5096,7 @@ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
|
5096
5096
|
* @returns {Array} Returns the array of property names.
|
|
5097
5097
|
*/
|
|
5098
5098
|
function arrayLikeKeys$1(value, inherited) {
|
|
5099
|
-
var isArr = isArray$
|
|
5099
|
+
var isArr = isArray$a(value),
|
|
5100
5100
|
isArg = !isArr && isArguments$1(value),
|
|
5101
5101
|
isBuff = !isArr && !isArg && isBuffer$1(value),
|
|
5102
5102
|
isType = !isArr && !isArg && !isBuff && isTypedArray$1(value),
|
|
@@ -5227,15 +5227,15 @@ var isFunction = isFunction_1,
|
|
|
5227
5227
|
* _.isArrayLike(_.noop);
|
|
5228
5228
|
* // => false
|
|
5229
5229
|
*/
|
|
5230
|
-
function isArrayLike$
|
|
5230
|
+
function isArrayLike$5(value) {
|
|
5231
5231
|
return value != null && isLength$1(value.length) && !isFunction(value);
|
|
5232
5232
|
}
|
|
5233
5233
|
|
|
5234
|
-
var isArrayLike_1 = isArrayLike$
|
|
5234
|
+
var isArrayLike_1 = isArrayLike$5;
|
|
5235
5235
|
|
|
5236
5236
|
var arrayLikeKeys = _arrayLikeKeys,
|
|
5237
5237
|
baseKeys$1 = _baseKeys,
|
|
5238
|
-
isArrayLike$
|
|
5238
|
+
isArrayLike$4 = isArrayLike_1;
|
|
5239
5239
|
|
|
5240
5240
|
/**
|
|
5241
5241
|
* Creates an array of the own enumerable property names of `object`.
|
|
@@ -5266,7 +5266,7 @@ var arrayLikeKeys = _arrayLikeKeys,
|
|
|
5266
5266
|
* // => ['0', '1']
|
|
5267
5267
|
*/
|
|
5268
5268
|
function keys$4(object) {
|
|
5269
|
-
return isArrayLike$
|
|
5269
|
+
return isArrayLike$4(object) ? arrayLikeKeys(object) : baseKeys$1(object);
|
|
5270
5270
|
}
|
|
5271
5271
|
|
|
5272
5272
|
var keys_1 = keys$4;
|
|
@@ -5475,7 +5475,7 @@ var Stack$1 = _Stack,
|
|
|
5475
5475
|
equalByTag = _equalByTag,
|
|
5476
5476
|
equalObjects = _equalObjects,
|
|
5477
5477
|
getTag$1 = _getTag,
|
|
5478
|
-
isArray$
|
|
5478
|
+
isArray$9 = isArray_1,
|
|
5479
5479
|
isBuffer = isBuffer$2.exports,
|
|
5480
5480
|
isTypedArray = isTypedArray_1;
|
|
5481
5481
|
|
|
@@ -5508,8 +5508,8 @@ var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
5508
5508
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
5509
5509
|
*/
|
|
5510
5510
|
function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
|
|
5511
|
-
var objIsArr = isArray$
|
|
5512
|
-
othIsArr = isArray$
|
|
5511
|
+
var objIsArr = isArray$9(object),
|
|
5512
|
+
othIsArr = isArray$9(other),
|
|
5513
5513
|
objTag = objIsArr ? arrayTag : getTag$1(object),
|
|
5514
5514
|
othTag = othIsArr ? arrayTag : getTag$1(other);
|
|
5515
5515
|
|
|
@@ -5732,7 +5732,7 @@ function baseMatches$1(source) {
|
|
|
5732
5732
|
|
|
5733
5733
|
var _baseMatches = baseMatches$1;
|
|
5734
5734
|
|
|
5735
|
-
var isArray$
|
|
5735
|
+
var isArray$8 = isArray_1,
|
|
5736
5736
|
isSymbol$4 = isSymbol_1;
|
|
5737
5737
|
|
|
5738
5738
|
/** Used to match property names within property paths. */
|
|
@@ -5748,7 +5748,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
|
5748
5748
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
5749
5749
|
*/
|
|
5750
5750
|
function isKey$3(value, object) {
|
|
5751
|
-
if (isArray$
|
|
5751
|
+
if (isArray$8(value)) {
|
|
5752
5752
|
return false;
|
|
5753
5753
|
}
|
|
5754
5754
|
var type = typeof value;
|
|
@@ -5901,7 +5901,7 @@ var _stringToPath = stringToPath$1;
|
|
|
5901
5901
|
* @returns {Array} Returns the new mapped array.
|
|
5902
5902
|
*/
|
|
5903
5903
|
|
|
5904
|
-
function arrayMap$
|
|
5904
|
+
function arrayMap$1(array, iteratee) {
|
|
5905
5905
|
var index = -1,
|
|
5906
5906
|
length = array == null ? 0 : array.length,
|
|
5907
5907
|
result = Array(length);
|
|
@@ -5912,11 +5912,11 @@ function arrayMap$2(array, iteratee) {
|
|
|
5912
5912
|
return result;
|
|
5913
5913
|
}
|
|
5914
5914
|
|
|
5915
|
-
var _arrayMap = arrayMap$
|
|
5915
|
+
var _arrayMap = arrayMap$1;
|
|
5916
5916
|
|
|
5917
5917
|
var Symbol = _Symbol,
|
|
5918
|
-
arrayMap
|
|
5919
|
-
isArray$
|
|
5918
|
+
arrayMap = _arrayMap,
|
|
5919
|
+
isArray$7 = isArray_1,
|
|
5920
5920
|
isSymbol$3 = isSymbol_1;
|
|
5921
5921
|
|
|
5922
5922
|
/** Used as references for various `Number` constants. */
|
|
@@ -5939,9 +5939,9 @@ function baseToString$1(value) {
|
|
|
5939
5939
|
if (typeof value == 'string') {
|
|
5940
5940
|
return value;
|
|
5941
5941
|
}
|
|
5942
|
-
if (isArray$
|
|
5942
|
+
if (isArray$7(value)) {
|
|
5943
5943
|
// Recursively convert values (susceptible to call stack limits).
|
|
5944
|
-
return arrayMap
|
|
5944
|
+
return arrayMap(value, baseToString$1) + '';
|
|
5945
5945
|
}
|
|
5946
5946
|
if (isSymbol$3(value)) {
|
|
5947
5947
|
return symbolToString ? symbolToString.call(value) : '';
|
|
@@ -5981,7 +5981,7 @@ function toString$1(value) {
|
|
|
5981
5981
|
|
|
5982
5982
|
var toString_1 = toString$1;
|
|
5983
5983
|
|
|
5984
|
-
var isArray$
|
|
5984
|
+
var isArray$6 = isArray_1,
|
|
5985
5985
|
isKey$2 = _isKey,
|
|
5986
5986
|
stringToPath = _stringToPath,
|
|
5987
5987
|
toString = toString_1;
|
|
@@ -5995,7 +5995,7 @@ var isArray$7 = isArray_1,
|
|
|
5995
5995
|
* @returns {Array} Returns the cast property path array.
|
|
5996
5996
|
*/
|
|
5997
5997
|
function castPath$2(value, object) {
|
|
5998
|
-
if (isArray$
|
|
5998
|
+
if (isArray$6(value)) {
|
|
5999
5999
|
return value;
|
|
6000
6000
|
}
|
|
6001
6001
|
return isKey$2(value, object) ? [value] : stringToPath(toString(value));
|
|
@@ -6101,7 +6101,7 @@ var _baseHasIn = baseHasIn$1;
|
|
|
6101
6101
|
|
|
6102
6102
|
var castPath = _castPath,
|
|
6103
6103
|
isArguments = isArguments_1,
|
|
6104
|
-
isArray$
|
|
6104
|
+
isArray$5 = isArray_1,
|
|
6105
6105
|
isIndex$1 = _isIndex,
|
|
6106
6106
|
isLength = isLength_1,
|
|
6107
6107
|
toKey$2 = _toKey;
|
|
@@ -6134,7 +6134,7 @@ function hasPath$1(object, path, hasFunc) {
|
|
|
6134
6134
|
}
|
|
6135
6135
|
length = object == null ? 0 : object.length;
|
|
6136
6136
|
return !!length && isLength(length) && isIndex$1(key, length) &&
|
|
6137
|
-
(isArray$
|
|
6137
|
+
(isArray$5(object) || isArguments(object));
|
|
6138
6138
|
}
|
|
6139
6139
|
|
|
6140
6140
|
var _hasPath = hasPath$1;
|
|
@@ -6300,7 +6300,7 @@ var property_1 = property$1;
|
|
|
6300
6300
|
var baseMatches = _baseMatches,
|
|
6301
6301
|
baseMatchesProperty = _baseMatchesProperty,
|
|
6302
6302
|
identity$2 = identity_1,
|
|
6303
|
-
isArray$
|
|
6303
|
+
isArray$4 = isArray_1,
|
|
6304
6304
|
property = property_1;
|
|
6305
6305
|
|
|
6306
6306
|
/**
|
|
@@ -6310,7 +6310,7 @@ var baseMatches = _baseMatches,
|
|
|
6310
6310
|
* @param {*} [value=_.identity] The value to convert to an iteratee.
|
|
6311
6311
|
* @returns {Function} Returns the iteratee.
|
|
6312
6312
|
*/
|
|
6313
|
-
function baseIteratee$
|
|
6313
|
+
function baseIteratee$4(value) {
|
|
6314
6314
|
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
|
|
6315
6315
|
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
|
|
6316
6316
|
if (typeof value == 'function') {
|
|
@@ -6320,14 +6320,14 @@ function baseIteratee$5(value) {
|
|
|
6320
6320
|
return identity$2;
|
|
6321
6321
|
}
|
|
6322
6322
|
if (typeof value == 'object') {
|
|
6323
|
-
return isArray$
|
|
6323
|
+
return isArray$4(value)
|
|
6324
6324
|
? baseMatchesProperty(value[0], value[1])
|
|
6325
6325
|
: baseMatches(value);
|
|
6326
6326
|
}
|
|
6327
6327
|
return property(value);
|
|
6328
6328
|
}
|
|
6329
6329
|
|
|
6330
|
-
var _baseIteratee = baseIteratee$
|
|
6330
|
+
var _baseIteratee = baseIteratee$4;
|
|
6331
6331
|
|
|
6332
6332
|
var toNumber = toNumber_1;
|
|
6333
6333
|
|
|
@@ -6410,7 +6410,7 @@ function toInteger$4(value) {
|
|
|
6410
6410
|
var toInteger_1 = toInteger$4;
|
|
6411
6411
|
|
|
6412
6412
|
var baseFindIndex = _baseFindIndex,
|
|
6413
|
-
baseIteratee$
|
|
6413
|
+
baseIteratee$3 = _baseIteratee,
|
|
6414
6414
|
toInteger$3 = toInteger_1;
|
|
6415
6415
|
|
|
6416
6416
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
@@ -6460,7 +6460,7 @@ function findIndex$1(array, predicate, fromIndex) {
|
|
|
6460
6460
|
if (index < 0) {
|
|
6461
6461
|
index = nativeMax$1(length + index, 0);
|
|
6462
6462
|
}
|
|
6463
|
-
return baseFindIndex(array, baseIteratee$
|
|
6463
|
+
return baseFindIndex(array, baseIteratee$3(predicate), index);
|
|
6464
6464
|
}
|
|
6465
6465
|
|
|
6466
6466
|
var findIndex_1 = findIndex$1;
|
|
@@ -6496,7 +6496,7 @@ function baseRange$1(start, end, step, fromRight) {
|
|
|
6496
6496
|
var _baseRange = baseRange$1;
|
|
6497
6497
|
|
|
6498
6498
|
var eq$1 = eq_1,
|
|
6499
|
-
isArrayLike$
|
|
6499
|
+
isArrayLike$3 = isArrayLike_1,
|
|
6500
6500
|
isIndex = _isIndex,
|
|
6501
6501
|
isObject$1 = isObject_1;
|
|
6502
6502
|
|
|
@@ -6516,7 +6516,7 @@ function isIterateeCall$3(value, index, object) {
|
|
|
6516
6516
|
}
|
|
6517
6517
|
var type = typeof index;
|
|
6518
6518
|
if (type == 'number'
|
|
6519
|
-
? (isArrayLike$
|
|
6519
|
+
? (isArrayLike$3(object) && isIndex(index, object.length))
|
|
6520
6520
|
: (type == 'string' && index in object)
|
|
6521
6521
|
) {
|
|
6522
6522
|
return eq$1(object[index], value);
|
|
@@ -7039,7 +7039,7 @@ function baseForOwn$1(object, iteratee) {
|
|
|
7039
7039
|
|
|
7040
7040
|
var _baseForOwn = baseForOwn$1;
|
|
7041
7041
|
|
|
7042
|
-
var isArrayLike$
|
|
7042
|
+
var isArrayLike$2 = isArrayLike_1;
|
|
7043
7043
|
|
|
7044
7044
|
/**
|
|
7045
7045
|
* Creates a `baseEach` or `baseEachRight` function.
|
|
@@ -7054,7 +7054,7 @@ function createBaseEach$1(eachFunc, fromRight) {
|
|
|
7054
7054
|
if (collection == null) {
|
|
7055
7055
|
return collection;
|
|
7056
7056
|
}
|
|
7057
|
-
if (!isArrayLike$
|
|
7057
|
+
if (!isArrayLike$2(collection)) {
|
|
7058
7058
|
return eachFunc(collection, iteratee);
|
|
7059
7059
|
}
|
|
7060
7060
|
var length = collection.length,
|
|
@@ -7083,9 +7083,9 @@ var baseForOwn = _baseForOwn,
|
|
|
7083
7083
|
* @param {Function} iteratee The function invoked per iteration.
|
|
7084
7084
|
* @returns {Array|Object} Returns `collection`.
|
|
7085
7085
|
*/
|
|
7086
|
-
var baseEach$
|
|
7086
|
+
var baseEach$3 = createBaseEach(baseForOwn);
|
|
7087
7087
|
|
|
7088
|
-
var _baseEach = baseEach$
|
|
7088
|
+
var _baseEach = baseEach$3;
|
|
7089
7089
|
|
|
7090
7090
|
/**
|
|
7091
7091
|
* The base implementation of `_.reduce` and `_.reduceRight`, without support
|
|
@@ -7113,10 +7113,10 @@ function baseReduce$1(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
|
7113
7113
|
var _baseReduce = baseReduce$1;
|
|
7114
7114
|
|
|
7115
7115
|
var arrayReduce = _arrayReduce,
|
|
7116
|
-
baseEach$
|
|
7117
|
-
baseIteratee$
|
|
7116
|
+
baseEach$2 = _baseEach,
|
|
7117
|
+
baseIteratee$2 = _baseIteratee,
|
|
7118
7118
|
baseReduce = _baseReduce,
|
|
7119
|
-
isArray$
|
|
7119
|
+
isArray$3 = isArray_1;
|
|
7120
7120
|
|
|
7121
7121
|
/**
|
|
7122
7122
|
* Reduces `collection` to a value which is the accumulated result of running
|
|
@@ -7156,10 +7156,10 @@ var arrayReduce = _arrayReduce,
|
|
|
7156
7156
|
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
|
|
7157
7157
|
*/
|
|
7158
7158
|
function reduce(collection, iteratee, accumulator) {
|
|
7159
|
-
var func = isArray$
|
|
7159
|
+
var func = isArray$3(collection) ? arrayReduce : baseReduce,
|
|
7160
7160
|
initAccum = arguments.length < 3;
|
|
7161
7161
|
|
|
7162
|
-
return func(collection, baseIteratee$
|
|
7162
|
+
return func(collection, baseIteratee$2(iteratee), accumulator, initAccum, baseEach$2);
|
|
7163
7163
|
}
|
|
7164
7164
|
|
|
7165
7165
|
var reduce_1 = reduce;
|
|
@@ -7204,9 +7204,9 @@ function castFunction$1(value) {
|
|
|
7204
7204
|
var _castFunction = castFunction$1;
|
|
7205
7205
|
|
|
7206
7206
|
var arrayEach = _arrayEach,
|
|
7207
|
-
baseEach$
|
|
7207
|
+
baseEach$1 = _baseEach,
|
|
7208
7208
|
castFunction = _castFunction,
|
|
7209
|
-
isArray$
|
|
7209
|
+
isArray$2 = isArray_1;
|
|
7210
7210
|
|
|
7211
7211
|
/**
|
|
7212
7212
|
* Iterates over elements of `collection` and invokes `iteratee` for each element.
|
|
@@ -7239,7 +7239,7 @@ var arrayEach = _arrayEach,
|
|
|
7239
7239
|
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
|
7240
7240
|
*/
|
|
7241
7241
|
function forEach(collection, iteratee) {
|
|
7242
|
-
var func = isArray$
|
|
7242
|
+
var func = isArray$2(collection) ? arrayEach : baseEach$1;
|
|
7243
7243
|
return func(collection, castFunction(iteratee));
|
|
7244
7244
|
}
|
|
7245
7245
|
|
|
@@ -9921,7 +9921,7 @@ class OverlaySelection {
|
|
|
9921
9921
|
*/
|
|
9922
9922
|
onKeyUp(e) {
|
|
9923
9923
|
// Emit before key up event.
|
|
9924
|
-
this.beforeKeyUp.emit(e);
|
|
9924
|
+
this.beforeKeyUp.emit(Object.assign({ original: e }, this.getData()));
|
|
9925
9925
|
}
|
|
9926
9926
|
/**
|
|
9927
9927
|
* Get keyboard down from element.
|
|
@@ -9930,7 +9930,7 @@ class OverlaySelection {
|
|
|
9930
9930
|
onKeyDown(e) {
|
|
9931
9931
|
var _a;
|
|
9932
9932
|
// Emit before key down event and check if default prevention is set.
|
|
9933
|
-
const proxy = this.beforeKeyDown.emit(e);
|
|
9933
|
+
const proxy = this.beforeKeyDown.emit(Object.assign({ original: e }, this.getData()));
|
|
9934
9934
|
if (e.defaultPrevented || proxy.defaultPrevented) {
|
|
9935
9935
|
return;
|
|
9936
9936
|
}
|
|
@@ -10080,7 +10080,7 @@ class OverlaySelection {
|
|
|
10080
10080
|
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) }));
|
|
10081
10081
|
}
|
|
10082
10082
|
}
|
|
10083
|
-
return (hAsync(Host, { key: '
|
|
10083
|
+
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" })));
|
|
10084
10084
|
}
|
|
10085
10085
|
/**
|
|
10086
10086
|
* Executes the focus operation on the specified range of cells.
|
|
@@ -10321,6 +10321,7 @@ class OverlaySelection {
|
|
|
10321
10321
|
lastCell: this.lastCell,
|
|
10322
10322
|
focus: this.selectionStore.get('focus'),
|
|
10323
10323
|
range: this.selectionStore.get('range'),
|
|
10324
|
+
edit: this.selectionStore.get('edit'),
|
|
10324
10325
|
};
|
|
10325
10326
|
}
|
|
10326
10327
|
get element() { return getElement(this); }
|
|
@@ -10588,8 +10589,8 @@ class RevoEdit {
|
|
|
10588
10589
|
}; }
|
|
10589
10590
|
}
|
|
10590
10591
|
|
|
10591
|
-
var baseIteratee$
|
|
10592
|
-
isArrayLike$
|
|
10592
|
+
var baseIteratee$1 = _baseIteratee,
|
|
10593
|
+
isArrayLike$1 = isArrayLike_1,
|
|
10593
10594
|
keys = keys_1;
|
|
10594
10595
|
|
|
10595
10596
|
/**
|
|
@@ -10602,8 +10603,8 @@ var baseIteratee$2 = _baseIteratee,
|
|
|
10602
10603
|
function createFind$1(findIndexFunc) {
|
|
10603
10604
|
return function(collection, predicate, fromIndex) {
|
|
10604
10605
|
var iterable = Object(collection);
|
|
10605
|
-
if (!isArrayLike$
|
|
10606
|
-
var iteratee = baseIteratee$
|
|
10606
|
+
if (!isArrayLike$1(collection)) {
|
|
10607
|
+
var iteratee = baseIteratee$1(predicate);
|
|
10607
10608
|
collection = keys(collection);
|
|
10608
10609
|
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
|
10609
10610
|
}
|
|
@@ -10657,219 +10658,142 @@ var find = createFind(findIndex);
|
|
|
10657
10658
|
|
|
10658
10659
|
var find_1 = find;
|
|
10659
10660
|
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
baseEach$1(collection, function(value, key, collection) {
|
|
10676
|
-
result[++index] = iteratee(value, key, collection);
|
|
10677
|
-
});
|
|
10678
|
-
return result;
|
|
10661
|
+
function getColumnType(rgCol) {
|
|
10662
|
+
if (rgCol.pin) {
|
|
10663
|
+
return rgCol.pin;
|
|
10664
|
+
}
|
|
10665
|
+
return 'rgCol';
|
|
10666
|
+
}
|
|
10667
|
+
function getColumnSizes(cols) {
|
|
10668
|
+
const res = {};
|
|
10669
|
+
for (const [i, c] of cols.entries()) {
|
|
10670
|
+
if (c.size) {
|
|
10671
|
+
res[i] = c.size;
|
|
10672
|
+
}
|
|
10673
|
+
}
|
|
10674
|
+
return res;
|
|
10679
10675
|
}
|
|
10680
|
-
|
|
10681
|
-
var _baseMap = baseMap$1;
|
|
10682
|
-
|
|
10683
|
-
var arrayMap = _arrayMap,
|
|
10684
|
-
baseIteratee$1 = _baseIteratee,
|
|
10685
|
-
baseMap = _baseMap,
|
|
10686
|
-
isArray$2 = isArray_1;
|
|
10687
|
-
|
|
10688
10676
|
/**
|
|
10689
|
-
*
|
|
10690
|
-
* `iteratee`. The iteratee is invoked with three arguments:
|
|
10691
|
-
* (value, index|key, collection).
|
|
10692
|
-
*
|
|
10693
|
-
* Many lodash methods are guarded to work as iteratees for methods like
|
|
10694
|
-
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
|
|
10695
|
-
*
|
|
10696
|
-
* The guarded methods are:
|
|
10697
|
-
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
|
|
10698
|
-
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
|
|
10699
|
-
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
|
|
10700
|
-
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
|
|
10701
|
-
*
|
|
10702
|
-
* @static
|
|
10703
|
-
* @memberOf _
|
|
10704
|
-
* @since 0.1.0
|
|
10705
|
-
* @category Collection
|
|
10706
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
10707
|
-
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
10708
|
-
* @returns {Array} Returns the new mapped array.
|
|
10709
|
-
* @example
|
|
10710
|
-
*
|
|
10711
|
-
* function square(n) {
|
|
10712
|
-
* return n * n;
|
|
10713
|
-
* }
|
|
10714
|
-
*
|
|
10715
|
-
* _.map([4, 8], square);
|
|
10716
|
-
* // => [16, 64]
|
|
10717
|
-
*
|
|
10718
|
-
* _.map({ 'a': 4, 'b': 8 }, square);
|
|
10719
|
-
* // => [16, 64] (iteration order is not guaranteed)
|
|
10720
|
-
*
|
|
10721
|
-
* var users = [
|
|
10722
|
-
* { 'user': 'barney' },
|
|
10723
|
-
* { 'user': 'fred' }
|
|
10724
|
-
* ];
|
|
10725
|
-
*
|
|
10726
|
-
* // The `_.property` iteratee shorthand.
|
|
10727
|
-
* _.map(users, 'user');
|
|
10728
|
-
* // => ['barney', 'fred']
|
|
10677
|
+
* Check if column is grouping column
|
|
10729
10678
|
*/
|
|
10730
|
-
function
|
|
10731
|
-
|
|
10732
|
-
return func(collection, baseIteratee$1(iteratee));
|
|
10679
|
+
function isColGrouping(colData) {
|
|
10680
|
+
return !!colData.children;
|
|
10733
10681
|
}
|
|
10734
|
-
|
|
10735
|
-
var map_1 = map;
|
|
10736
|
-
|
|
10737
10682
|
/**
|
|
10738
|
-
*
|
|
10739
|
-
* Provide minimal starting core for plugins to work
|
|
10740
|
-
* Extend this class to create plugin
|
|
10683
|
+
* This function is used to create a collection of columns.
|
|
10741
10684
|
*/
|
|
10742
|
-
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
|
|
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
|
-
if (keepDefault === false) {
|
|
10775
|
-
return;
|
|
10776
|
-
}
|
|
10777
|
-
// Continue with native behavior
|
|
10778
|
-
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.set) === null || _a === void 0 ? void 0 : _a.call(this, val);
|
|
10779
|
-
},
|
|
10780
|
-
get() {
|
|
10781
|
-
var _a;
|
|
10782
|
-
// Continue with native behavior
|
|
10783
|
-
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
10784
|
-
},
|
|
10785
|
-
});
|
|
10786
|
-
if (immediate) {
|
|
10787
|
-
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
10685
|
+
function getColumns(columns, level = 0, types) {
|
|
10686
|
+
const collection = {
|
|
10687
|
+
// columns as they are in stores per type
|
|
10688
|
+
columns: {
|
|
10689
|
+
rgCol: [],
|
|
10690
|
+
colPinStart: [],
|
|
10691
|
+
colPinEnd: [],
|
|
10692
|
+
},
|
|
10693
|
+
// columns indexed by prop for quick access
|
|
10694
|
+
columnByProp: {},
|
|
10695
|
+
// column grouping
|
|
10696
|
+
columnGrouping: {
|
|
10697
|
+
rgCol: [],
|
|
10698
|
+
colPinStart: [],
|
|
10699
|
+
colPinEnd: [],
|
|
10700
|
+
},
|
|
10701
|
+
// max depth level for column grouping
|
|
10702
|
+
maxLevel: level,
|
|
10703
|
+
// sorting
|
|
10704
|
+
sort: {},
|
|
10705
|
+
};
|
|
10706
|
+
return reduce_1(columns, (res, colData) => {
|
|
10707
|
+
// Grouped column
|
|
10708
|
+
if (isColGrouping(colData)) {
|
|
10709
|
+
return gatherGroup(res, colData, getColumns(colData.children, level + 1, types), level);
|
|
10710
|
+
}
|
|
10711
|
+
// Regular column
|
|
10712
|
+
const regularColumn = Object.assign(Object.assign({}, (colData.columnType && types && types[colData.columnType])), colData);
|
|
10713
|
+
// Regular column, no Pin
|
|
10714
|
+
if (!regularColumn.pin) {
|
|
10715
|
+
res.columns.rgCol.push(regularColumn);
|
|
10716
|
+
// Pin
|
|
10788
10717
|
}
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10718
|
+
else {
|
|
10719
|
+
res.columns[regularColumn.pin].push(regularColumn);
|
|
10720
|
+
}
|
|
10721
|
+
if (regularColumn.order) {
|
|
10722
|
+
res.sort[regularColumn.prop] = regularColumn;
|
|
10723
|
+
}
|
|
10724
|
+
// it's possible that some columns have same prop, but better to avoid it
|
|
10725
|
+
if (!res.columnByProp[regularColumn.prop]) {
|
|
10726
|
+
res.columnByProp[regularColumn.prop] = [];
|
|
10727
|
+
}
|
|
10728
|
+
res.columnByProp[regularColumn.prop].push(regularColumn);
|
|
10729
|
+
// trigger setup hook if present
|
|
10730
|
+
regularColumn.beforeSetup && regularColumn.beforeSetup(regularColumn);
|
|
10731
|
+
return res;
|
|
10732
|
+
}, collection);
|
|
10733
|
+
}
|
|
10734
|
+
function gatherGroup(res, colData, collection, level = 0) {
|
|
10735
|
+
// group template
|
|
10736
|
+
const group = Object.assign(Object.assign({}, colData), { level, ids: [] });
|
|
10737
|
+
// check columns for update
|
|
10738
|
+
for (let k in collection.columns) {
|
|
10739
|
+
const key = k;
|
|
10740
|
+
const resultItem = res.columns[key];
|
|
10741
|
+
const collectionItem = collection.columns[key];
|
|
10742
|
+
// if column data
|
|
10743
|
+
if (isArray_1(resultItem) && isArray_1(collectionItem)) {
|
|
10744
|
+
// fill columns
|
|
10745
|
+
resultItem.push(...collectionItem);
|
|
10746
|
+
// fill grouping
|
|
10747
|
+
if (collectionItem.length) {
|
|
10748
|
+
res.columnGrouping[key].push(Object.assign(Object.assign({}, group), { ids: collectionItem.map(item => item.prop) }));
|
|
10749
|
+
}
|
|
10813
10750
|
}
|
|
10814
10751
|
}
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10752
|
+
// merge column groupings
|
|
10753
|
+
for (let k in collection.columnGrouping) {
|
|
10754
|
+
const key = k;
|
|
10755
|
+
const collectionItem = collection.columnGrouping[key];
|
|
10756
|
+
res.columnGrouping[key].push(...collectionItem);
|
|
10820
10757
|
}
|
|
10758
|
+
res.maxLevel = Math.max(res.maxLevel, collection.maxLevel);
|
|
10759
|
+
res.sort = Object.assign(Object.assign({}, res.sort), collection.sort);
|
|
10760
|
+
return res;
|
|
10821
10761
|
}
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
for (let k in collection.columns) {
|
|
10829
|
-
const key = k;
|
|
10830
|
-
const resultItem = res.columns[key];
|
|
10831
|
-
const collectionItem = collection.columns[key];
|
|
10832
|
-
// if column data
|
|
10833
|
-
if (isArray_1(resultItem) && isArray_1(collectionItem)) {
|
|
10834
|
-
// fill columns
|
|
10835
|
-
resultItem.push(...collectionItem);
|
|
10836
|
-
// fill grouping
|
|
10837
|
-
if (collectionItem.length) {
|
|
10838
|
-
res.columnGrouping[key].push(Object.assign(Object.assign({}, group), { ids: map_1(collectionItem, 'prop') }));
|
|
10839
|
-
}
|
|
10762
|
+
function findColumn(columns, prop) {
|
|
10763
|
+
for (const c of columns) {
|
|
10764
|
+
if (isColGrouping(c)) {
|
|
10765
|
+
const found = findColumn(c.children, prop);
|
|
10766
|
+
if (found) {
|
|
10767
|
+
return found;
|
|
10840
10768
|
}
|
|
10841
10769
|
}
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
const key = k;
|
|
10845
|
-
const collectionItem = collection.columnGrouping[key];
|
|
10846
|
-
res.columnGrouping[key].push(...collectionItem);
|
|
10770
|
+
else if (c.prop === prop) {
|
|
10771
|
+
return c;
|
|
10847
10772
|
}
|
|
10848
|
-
res.maxLevel = Math.max(res.maxLevel, collection.maxLevel);
|
|
10849
|
-
res.sort = Object.assign(Object.assign({}, res.sort), collection.sort);
|
|
10850
|
-
return res;
|
|
10851
10773
|
}
|
|
10774
|
+
return undefined;
|
|
10852
10775
|
}
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
*/
|
|
10856
|
-
function isColGrouping(colData) {
|
|
10857
|
-
return !!colData.children;
|
|
10776
|
+
function getColumnByProp(columns, prop) {
|
|
10777
|
+
return findColumn(columns, prop);
|
|
10858
10778
|
}
|
|
10859
10779
|
|
|
10860
10780
|
class ColumnDataProvider {
|
|
10861
10781
|
get order() {
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10782
|
+
const order = {};
|
|
10783
|
+
const sorting = this.sorting;
|
|
10784
|
+
if (sorting) {
|
|
10785
|
+
Object.keys(sorting).forEach((prop) => {
|
|
10786
|
+
order[prop] = sorting[prop].order;
|
|
10787
|
+
});
|
|
10788
|
+
}
|
|
10789
|
+
return order;
|
|
10866
10790
|
}
|
|
10867
10791
|
get stores() {
|
|
10868
10792
|
return this.dataSources;
|
|
10869
10793
|
}
|
|
10870
10794
|
constructor() {
|
|
10871
10795
|
this.sorting = null;
|
|
10872
|
-
this.dataSources =
|
|
10796
|
+
this.dataSources = columnTypes.reduce((sources, k) => {
|
|
10873
10797
|
sources[k] = new DataStore(k);
|
|
10874
10798
|
return sources;
|
|
10875
10799
|
}, {});
|
|
@@ -10931,7 +10855,7 @@ class ColumnDataProvider {
|
|
|
10931
10855
|
updateColumns(cols) {
|
|
10932
10856
|
// collect column by type and propert
|
|
10933
10857
|
const columnByKey = cols.reduce((res, c) => {
|
|
10934
|
-
const type =
|
|
10858
|
+
const type = getColumnType(c);
|
|
10935
10859
|
if (!res[type]) {
|
|
10936
10860
|
res[type] = {};
|
|
10937
10861
|
}
|
|
@@ -10940,20 +10864,32 @@ class ColumnDataProvider {
|
|
|
10940
10864
|
}, {});
|
|
10941
10865
|
// find indexes in source
|
|
10942
10866
|
const colByIndex = {};
|
|
10943
|
-
|
|
10867
|
+
for (const t in columnByKey) {
|
|
10868
|
+
if (!columnByKey.hasOwnProperty(t)) {
|
|
10869
|
+
continue;
|
|
10870
|
+
}
|
|
10871
|
+
const type = t;
|
|
10872
|
+
const colsToUpdate = columnByKey[type];
|
|
10944
10873
|
const items = this.dataSources[type].store.get('source');
|
|
10945
|
-
colByIndex[type] =
|
|
10874
|
+
colByIndex[type] = {};
|
|
10875
|
+
for (let i = 0; i < items.length; i++) {
|
|
10876
|
+
const rgCol = items[i];
|
|
10946
10877
|
const colToUpdateIfExists = colsToUpdate === null || colsToUpdate === void 0 ? void 0 : colsToUpdate[rgCol.prop];
|
|
10947
10878
|
if (colToUpdateIfExists) {
|
|
10948
|
-
|
|
10879
|
+
colByIndex[type][i] = colToUpdateIfExists;
|
|
10949
10880
|
}
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10881
|
+
}
|
|
10882
|
+
}
|
|
10883
|
+
for (const t in colByIndex) {
|
|
10884
|
+
if (!colByIndex.hasOwnProperty(t)) {
|
|
10885
|
+
continue;
|
|
10886
|
+
}
|
|
10887
|
+
const type = t;
|
|
10888
|
+
setSourceByVirtualIndex(this.dataSources[type].store, colByIndex[type] || {});
|
|
10889
|
+
}
|
|
10954
10890
|
}
|
|
10955
10891
|
updateColumn(column, index) {
|
|
10956
|
-
const type =
|
|
10892
|
+
const type = getColumnType(column);
|
|
10957
10893
|
setSourceByVirtualIndex(this.dataSources[type].store, { [index]: column });
|
|
10958
10894
|
}
|
|
10959
10895
|
updateColumnSorting(column, index, sorting, additive) {
|
|
@@ -10970,7 +10906,7 @@ class ColumnDataProvider {
|
|
|
10970
10906
|
}
|
|
10971
10907
|
clearSorting() {
|
|
10972
10908
|
const types = reduce_1(this.sorting, (r, c) => {
|
|
10973
|
-
const k =
|
|
10909
|
+
const k = getColumnType(c);
|
|
10974
10910
|
r[k] = true;
|
|
10975
10911
|
return r;
|
|
10976
10912
|
}, {});
|
|
@@ -10981,78 +10917,6 @@ class ColumnDataProvider {
|
|
|
10981
10917
|
});
|
|
10982
10918
|
this.sorting = {};
|
|
10983
10919
|
}
|
|
10984
|
-
static getSizes(cols) {
|
|
10985
|
-
return reduce_1(cols, (res, c, i) => {
|
|
10986
|
-
if (c.size) {
|
|
10987
|
-
res[i] = c.size;
|
|
10988
|
-
}
|
|
10989
|
-
return res;
|
|
10990
|
-
}, {});
|
|
10991
|
-
}
|
|
10992
|
-
static getColumnByProp(columns, prop) {
|
|
10993
|
-
return find_1(columns, c => {
|
|
10994
|
-
if (isColGrouping(c)) {
|
|
10995
|
-
return ColumnDataProvider.getColumnByProp(c.children, prop);
|
|
10996
|
-
}
|
|
10997
|
-
return c.prop === prop;
|
|
10998
|
-
});
|
|
10999
|
-
}
|
|
11000
|
-
// columns processing
|
|
11001
|
-
static getColumns(columns, level = 0, types) {
|
|
11002
|
-
const collection = {
|
|
11003
|
-
// columns as they are in stores per type
|
|
11004
|
-
columns: {
|
|
11005
|
-
rgCol: [],
|
|
11006
|
-
colPinStart: [],
|
|
11007
|
-
colPinEnd: [],
|
|
11008
|
-
},
|
|
11009
|
-
// columns grouped by prop for quick access
|
|
11010
|
-
columnByProp: {},
|
|
11011
|
-
// column grouping
|
|
11012
|
-
columnGrouping: {
|
|
11013
|
-
rgCol: [],
|
|
11014
|
-
colPinStart: [],
|
|
11015
|
-
colPinEnd: [],
|
|
11016
|
-
},
|
|
11017
|
-
// max depth level for column grouping
|
|
11018
|
-
maxLevel: level,
|
|
11019
|
-
// sorting
|
|
11020
|
-
sort: {},
|
|
11021
|
-
};
|
|
11022
|
-
return reduce_1(columns, (res, colData) => {
|
|
11023
|
-
// Grouped column
|
|
11024
|
-
if (isColGrouping(colData)) {
|
|
11025
|
-
return GroupingColumnPlugin.gatherGroup(res, colData, ColumnDataProvider.getColumns(colData.children, level + 1, types), level);
|
|
11026
|
-
}
|
|
11027
|
-
// Regular column
|
|
11028
|
-
const regularColumn = Object.assign(Object.assign({}, (colData.columnType && types && types[colData.columnType])), colData);
|
|
11029
|
-
// Regular column, no Pin
|
|
11030
|
-
if (!regularColumn.pin) {
|
|
11031
|
-
res.columns.rgCol.push(regularColumn);
|
|
11032
|
-
// Pin
|
|
11033
|
-
}
|
|
11034
|
-
else {
|
|
11035
|
-
res.columns[regularColumn.pin].push(regularColumn);
|
|
11036
|
-
}
|
|
11037
|
-
if (regularColumn.order) {
|
|
11038
|
-
res.sort[regularColumn.prop] = regularColumn;
|
|
11039
|
-
}
|
|
11040
|
-
// technically it's possible that some columns have same prop, but better to avoid it
|
|
11041
|
-
if (!res.columnByProp[regularColumn.prop]) {
|
|
11042
|
-
res.columnByProp[regularColumn.prop] = [];
|
|
11043
|
-
}
|
|
11044
|
-
res.columnByProp[regularColumn.prop].push(regularColumn);
|
|
11045
|
-
// trigger setup hook if present
|
|
11046
|
-
regularColumn.beforeSetup && regularColumn.beforeSetup(regularColumn);
|
|
11047
|
-
return res;
|
|
11048
|
-
}, collection);
|
|
11049
|
-
}
|
|
11050
|
-
static getColumnType(rgCol) {
|
|
11051
|
-
if (rgCol.pin) {
|
|
11052
|
-
return rgCol.pin;
|
|
11053
|
-
}
|
|
11054
|
-
return 'rgCol';
|
|
11055
|
-
}
|
|
11056
10920
|
}
|
|
11057
10921
|
|
|
11058
10922
|
/**
|
|
@@ -11203,7 +11067,7 @@ class DimensionProvider {
|
|
|
11203
11067
|
// setItemCount
|
|
11204
11068
|
this.stores[type].setStore({ count: items.length });
|
|
11205
11069
|
// setCustomSizes
|
|
11206
|
-
const newSizes =
|
|
11070
|
+
const newSizes = getColumnSizes(items);
|
|
11207
11071
|
this.stores[type].setDimensionSize(newSizes);
|
|
11208
11072
|
const vpUpdate = {
|
|
11209
11073
|
// this triggers drop on realCount change
|
|
@@ -11341,6 +11205,113 @@ class ThemeService {
|
|
|
11341
11205
|
}
|
|
11342
11206
|
}
|
|
11343
11207
|
|
|
11208
|
+
/**
|
|
11209
|
+
* Base layer for plugins
|
|
11210
|
+
* Provide minimal starting core for plugins to work
|
|
11211
|
+
* Extend this class to create plugin
|
|
11212
|
+
*/
|
|
11213
|
+
class BasePlugin {
|
|
11214
|
+
constructor(revogrid, providers) {
|
|
11215
|
+
this.revogrid = revogrid;
|
|
11216
|
+
this.providers = providers;
|
|
11217
|
+
this.h = hAsync;
|
|
11218
|
+
this.subscriptions = {};
|
|
11219
|
+
}
|
|
11220
|
+
/**
|
|
11221
|
+
*
|
|
11222
|
+
* @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')
|
|
11223
|
+
* @param callback - callback function for event
|
|
11224
|
+
*/
|
|
11225
|
+
addEventListener(eventName, callback) {
|
|
11226
|
+
this.revogrid.addEventListener(eventName, callback);
|
|
11227
|
+
this.subscriptions[eventName] = callback;
|
|
11228
|
+
}
|
|
11229
|
+
/**
|
|
11230
|
+
* Subscribe to property change in revo-grid component
|
|
11231
|
+
* You can return false in callback to prevent default value set
|
|
11232
|
+
*
|
|
11233
|
+
* @param prop - property name
|
|
11234
|
+
* @param callback - callback function
|
|
11235
|
+
* @param immediate - trigger callback immediately with current value
|
|
11236
|
+
*/
|
|
11237
|
+
watch(prop, callback, { immediate } = { immediate: false }) {
|
|
11238
|
+
const nativeValueDesc = Object.getOwnPropertyDescriptor(this.revogrid, prop) ||
|
|
11239
|
+
Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);
|
|
11240
|
+
// Overwrite property descriptor for this instance
|
|
11241
|
+
Object.defineProperty(this.revogrid, prop, {
|
|
11242
|
+
set(val) {
|
|
11243
|
+
var _a;
|
|
11244
|
+
const keepDefault = callback(val);
|
|
11245
|
+
if (keepDefault === false) {
|
|
11246
|
+
return;
|
|
11247
|
+
}
|
|
11248
|
+
// Continue with native behavior
|
|
11249
|
+
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.set) === null || _a === void 0 ? void 0 : _a.call(this, val);
|
|
11250
|
+
},
|
|
11251
|
+
get() {
|
|
11252
|
+
var _a;
|
|
11253
|
+
// Continue with native behavior
|
|
11254
|
+
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
11255
|
+
},
|
|
11256
|
+
});
|
|
11257
|
+
if (immediate) {
|
|
11258
|
+
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
11259
|
+
}
|
|
11260
|
+
}
|
|
11261
|
+
/**
|
|
11262
|
+
* Remove event listener
|
|
11263
|
+
* @param eventName
|
|
11264
|
+
*/
|
|
11265
|
+
removeEventListener(eventName) {
|
|
11266
|
+
this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);
|
|
11267
|
+
delete this.subscriptions[eventName];
|
|
11268
|
+
}
|
|
11269
|
+
/**
|
|
11270
|
+
* Emit event from revo-grid component
|
|
11271
|
+
* Event can be cancelled by calling event.preventDefault() in callback
|
|
11272
|
+
*/
|
|
11273
|
+
emit(eventName, detail) {
|
|
11274
|
+
const event = new CustomEvent(eventName, { detail, cancelable: true });
|
|
11275
|
+
this.revogrid.dispatchEvent(event);
|
|
11276
|
+
return event;
|
|
11277
|
+
}
|
|
11278
|
+
/**
|
|
11279
|
+
* Clear all subscriptions
|
|
11280
|
+
*/
|
|
11281
|
+
clearSubscriptions() {
|
|
11282
|
+
for (let type in this.subscriptions) {
|
|
11283
|
+
this.removeEventListener(type);
|
|
11284
|
+
}
|
|
11285
|
+
}
|
|
11286
|
+
/**
|
|
11287
|
+
* Destroy plugin and clear all subscriptions
|
|
11288
|
+
*/
|
|
11289
|
+
destroy() {
|
|
11290
|
+
this.clearSubscriptions();
|
|
11291
|
+
}
|
|
11292
|
+
}
|
|
11293
|
+
|
|
11294
|
+
/**
|
|
11295
|
+
* Dispatches a custom event to a specified target element.
|
|
11296
|
+
*
|
|
11297
|
+
* @param target - The target element to dispatch the event to.
|
|
11298
|
+
* @param eventName - The name of the custom event.
|
|
11299
|
+
* @param detail - Optional. The detail of the custom event.
|
|
11300
|
+
* @returns The custom event that was dispatched.
|
|
11301
|
+
*/
|
|
11302
|
+
function dispatch(target, eventName, detail) {
|
|
11303
|
+
// Create a new CustomEvent with the specified event name and detail.
|
|
11304
|
+
const event = new CustomEvent(eventName, {
|
|
11305
|
+
detail,
|
|
11306
|
+
cancelable: true, // Indicates whether the event can be canceled.
|
|
11307
|
+
bubbles: true, // Indicates whether the event bubbles up through the DOM.
|
|
11308
|
+
});
|
|
11309
|
+
// Dispatch the event on the target element.
|
|
11310
|
+
target === null || target === void 0 ? void 0 : target.dispatchEvent(event);
|
|
11311
|
+
// Return the custom event that was dispatched.
|
|
11312
|
+
return event;
|
|
11313
|
+
}
|
|
11314
|
+
|
|
11344
11315
|
/**
|
|
11345
11316
|
* Plugin module for revo-grid grid system
|
|
11346
11317
|
* Add support for automatic column resize
|
|
@@ -11383,7 +11354,7 @@ class AutoSizeColumnPlugin extends BasePlugin {
|
|
|
11383
11354
|
this.columnSet(columns);
|
|
11384
11355
|
};
|
|
11385
11356
|
const headerDblClick = ({ detail }) => {
|
|
11386
|
-
const type =
|
|
11357
|
+
const type = getColumnType(detail.column);
|
|
11387
11358
|
const size = this.getColumnSize(detail.index, type);
|
|
11388
11359
|
if (size) {
|
|
11389
11360
|
this.providers.dimension.setCustomSizes(type, {
|
|
@@ -12206,7 +12177,7 @@ class SortingPlugin extends BasePlugin {
|
|
|
12206
12177
|
const columns = (await this.revogrid.getColumns());
|
|
12207
12178
|
const sortingFunc = {};
|
|
12208
12179
|
for (let prop in order) {
|
|
12209
|
-
const cmp = this.getComparer(
|
|
12180
|
+
const cmp = this.getComparer(getColumnByProp(columns, prop), order[prop]);
|
|
12210
12181
|
sortingFunc[prop] = cmp;
|
|
12211
12182
|
}
|
|
12212
12183
|
this.runSorting(order, sortingFunc);
|
|
@@ -13719,27 +13690,6 @@ class ColumnOrderHandler {
|
|
|
13719
13690
|
}
|
|
13720
13691
|
}
|
|
13721
13692
|
|
|
13722
|
-
/**
|
|
13723
|
-
* Dispatches a custom event to a specified target element.
|
|
13724
|
-
*
|
|
13725
|
-
* @param target - The target element to dispatch the event to.
|
|
13726
|
-
* @param eventName - The name of the custom event.
|
|
13727
|
-
* @param detail - Optional. The detail of the custom event.
|
|
13728
|
-
* @returns The custom event that was dispatched.
|
|
13729
|
-
*/
|
|
13730
|
-
function dispatch(target, eventName, detail) {
|
|
13731
|
-
// Create a new CustomEvent with the specified event name and detail.
|
|
13732
|
-
const event = new CustomEvent(eventName, {
|
|
13733
|
-
detail,
|
|
13734
|
-
cancelable: true, // Indicates whether the event can be canceled.
|
|
13735
|
-
bubbles: true, // Indicates whether the event bubbles up through the DOM.
|
|
13736
|
-
});
|
|
13737
|
-
// Dispatch the event on the target element.
|
|
13738
|
-
target === null || target === void 0 ? void 0 : target.dispatchEvent(event);
|
|
13739
|
-
// Return the custom event that was dispatched.
|
|
13740
|
-
return event;
|
|
13741
|
-
}
|
|
13742
|
-
|
|
13743
13693
|
var ResizeEvents;
|
|
13744
13694
|
(function (ResizeEvents) {
|
|
13745
13695
|
ResizeEvents["start"] = "resize:start";
|
|
@@ -14376,7 +14326,7 @@ class RevoGridComponent {
|
|
|
14376
14326
|
/** Open editor for cell. */
|
|
14377
14327
|
async setCellEdit(rgRow, prop, rowSource = 'rgRow') {
|
|
14378
14328
|
var _a;
|
|
14379
|
-
const rgCol =
|
|
14329
|
+
const rgCol = getColumnByProp(this.columns, prop);
|
|
14380
14330
|
if (!rgCol) {
|
|
14381
14331
|
return;
|
|
14382
14332
|
}
|
|
@@ -14600,7 +14550,7 @@ class RevoGridComponent {
|
|
|
14600
14550
|
this.columnChanged(this.columns);
|
|
14601
14551
|
}
|
|
14602
14552
|
columnChanged(newVal = []) {
|
|
14603
|
-
const columnGather =
|
|
14553
|
+
const columnGather = getColumns(newVal, 0, this.columnTypes);
|
|
14604
14554
|
this.beforecolumnsset.emit(columnGather);
|
|
14605
14555
|
this.dimensionProvider.applyNewColumns(columnGather.columns, this.disableVirtualX);
|
|
14606
14556
|
this.beforecolumnapplied.emit(columnGather);
|
|
@@ -14910,7 +14860,7 @@ class RevoGridComponent {
|
|
|
14910
14860
|
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 });
|
|
14911
14861
|
// Column headers
|
|
14912
14862
|
const dataViews = [
|
|
14913
|
-
hAsync("revogr-header", Object.assign({ key: '
|
|
14863
|
+
hAsync("revogr-header", Object.assign({ key: 'bada77126c317da09a9826312186c16617c7b0af' }, headerProperties, { slot: HEADER_SLOT })),
|
|
14914
14864
|
];
|
|
14915
14865
|
// Render viewport data (vertical sections)
|
|
14916
14866
|
view.dataPorts.forEach(data => {
|
|
@@ -14932,12 +14882,12 @@ class RevoGridComponent {
|
|
|
14932
14882
|
const typeCol = 'rgCol';
|
|
14933
14883
|
const viewports = this.viewportProvider.stores;
|
|
14934
14884
|
const dimensions = this.dimensionProvider.stores;
|
|
14935
|
-
return (hAsync(Host, { key: '
|
|
14885
|
+
return (hAsync(Host, { key: '9b95aef4de8af770036a733986e7e0fe2dd3ffda' }, this.hideAttribution ? null : (hAsync("revogr-attribution", { class: "attribution" })), hAsync("div", { key: '68dbc0fca826a0089402157d301c49a0776e9007', class: "main-viewport", onClick: (e) => {
|
|
14936
14886
|
var _a;
|
|
14937
14887
|
if (e.currentTarget === e.target) {
|
|
14938
14888
|
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
|
|
14939
14889
|
}
|
|
14940
|
-
} }, hAsync("div", { key: '
|
|
14890
|
+
} }, 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));
|
|
14941
14891
|
}
|
|
14942
14892
|
disconnectedCallback() {
|
|
14943
14893
|
// Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed
|