@revolist/revogrid 4.9.4 → 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 +4 -4
- 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 +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 +4 -4
- 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-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/revoGrid/revo-grid.d.ts +2 -1
- package/dist/types/components.d.ts +2 -2
- 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 +300 -351
- package/hydrate/index.mjs +300 -351
- 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/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
|
|
|
@@ -10593,8 +10593,8 @@ class RevoEdit {
|
|
|
10593
10593
|
}; }
|
|
10594
10594
|
}
|
|
10595
10595
|
|
|
10596
|
-
var baseIteratee$
|
|
10597
|
-
isArrayLike$
|
|
10596
|
+
var baseIteratee$1 = _baseIteratee,
|
|
10597
|
+
isArrayLike$1 = isArrayLike_1,
|
|
10598
10598
|
keys = keys_1;
|
|
10599
10599
|
|
|
10600
10600
|
/**
|
|
@@ -10607,8 +10607,8 @@ var baseIteratee$2 = _baseIteratee,
|
|
|
10607
10607
|
function createFind$1(findIndexFunc) {
|
|
10608
10608
|
return function(collection, predicate, fromIndex) {
|
|
10609
10609
|
var iterable = Object(collection);
|
|
10610
|
-
if (!isArrayLike$
|
|
10611
|
-
var iteratee = baseIteratee$
|
|
10610
|
+
if (!isArrayLike$1(collection)) {
|
|
10611
|
+
var iteratee = baseIteratee$1(predicate);
|
|
10612
10612
|
collection = keys(collection);
|
|
10613
10613
|
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
|
10614
10614
|
}
|
|
@@ -10662,219 +10662,142 @@ var find = createFind(findIndex);
|
|
|
10662
10662
|
|
|
10663
10663
|
var find_1 = find;
|
|
10664
10664
|
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
baseEach$1(collection, function(value, key, collection) {
|
|
10681
|
-
result[++index] = iteratee(value, key, collection);
|
|
10682
|
-
});
|
|
10683
|
-
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;
|
|
10684
10679
|
}
|
|
10685
|
-
|
|
10686
|
-
var _baseMap = baseMap$1;
|
|
10687
|
-
|
|
10688
|
-
var arrayMap = _arrayMap,
|
|
10689
|
-
baseIteratee$1 = _baseIteratee,
|
|
10690
|
-
baseMap = _baseMap,
|
|
10691
|
-
isArray$2 = isArray_1;
|
|
10692
|
-
|
|
10693
10680
|
/**
|
|
10694
|
-
*
|
|
10695
|
-
* `iteratee`. The iteratee is invoked with three arguments:
|
|
10696
|
-
* (value, index|key, collection).
|
|
10697
|
-
*
|
|
10698
|
-
* Many lodash methods are guarded to work as iteratees for methods like
|
|
10699
|
-
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
|
|
10700
|
-
*
|
|
10701
|
-
* The guarded methods are:
|
|
10702
|
-
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
|
|
10703
|
-
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
|
|
10704
|
-
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
|
|
10705
|
-
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
|
|
10706
|
-
*
|
|
10707
|
-
* @static
|
|
10708
|
-
* @memberOf _
|
|
10709
|
-
* @since 0.1.0
|
|
10710
|
-
* @category Collection
|
|
10711
|
-
* @param {Array|Object} collection The collection to iterate over.
|
|
10712
|
-
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
10713
|
-
* @returns {Array} Returns the new mapped array.
|
|
10714
|
-
* @example
|
|
10715
|
-
*
|
|
10716
|
-
* function square(n) {
|
|
10717
|
-
* return n * n;
|
|
10718
|
-
* }
|
|
10719
|
-
*
|
|
10720
|
-
* _.map([4, 8], square);
|
|
10721
|
-
* // => [16, 64]
|
|
10722
|
-
*
|
|
10723
|
-
* _.map({ 'a': 4, 'b': 8 }, square);
|
|
10724
|
-
* // => [16, 64] (iteration order is not guaranteed)
|
|
10725
|
-
*
|
|
10726
|
-
* var users = [
|
|
10727
|
-
* { 'user': 'barney' },
|
|
10728
|
-
* { 'user': 'fred' }
|
|
10729
|
-
* ];
|
|
10730
|
-
*
|
|
10731
|
-
* // The `_.property` iteratee shorthand.
|
|
10732
|
-
* _.map(users, 'user');
|
|
10733
|
-
* // => ['barney', 'fred']
|
|
10681
|
+
* Check if column is grouping column
|
|
10734
10682
|
*/
|
|
10735
|
-
function
|
|
10736
|
-
|
|
10737
|
-
return func(collection, baseIteratee$1(iteratee));
|
|
10683
|
+
function isColGrouping(colData) {
|
|
10684
|
+
return !!colData.children;
|
|
10738
10685
|
}
|
|
10739
|
-
|
|
10740
|
-
var map_1 = map;
|
|
10741
|
-
|
|
10742
10686
|
/**
|
|
10743
|
-
*
|
|
10744
|
-
* Provide minimal starting core for plugins to work
|
|
10745
|
-
* Extend this class to create plugin
|
|
10687
|
+
* This function is used to create a collection of columns.
|
|
10746
10688
|
*/
|
|
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
|
-
|
|
10779
|
-
if (keepDefault === false) {
|
|
10780
|
-
return;
|
|
10781
|
-
}
|
|
10782
|
-
// Continue with native behavior
|
|
10783
|
-
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.set) === null || _a === void 0 ? void 0 : _a.call(this, val);
|
|
10784
|
-
},
|
|
10785
|
-
get() {
|
|
10786
|
-
var _a;
|
|
10787
|
-
// Continue with native behavior
|
|
10788
|
-
return (_a = nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.get) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
10789
|
-
},
|
|
10790
|
-
});
|
|
10791
|
-
if (immediate) {
|
|
10792
|
-
callback(nativeValueDesc === null || nativeValueDesc === void 0 ? void 0 : nativeValueDesc.value);
|
|
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
|
|
10793
10721
|
}
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
|
|
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
|
+
}
|
|
10818
10754
|
}
|
|
10819
10755
|
}
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
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);
|
|
10825
10761
|
}
|
|
10762
|
+
res.maxLevel = Math.max(res.maxLevel, collection.maxLevel);
|
|
10763
|
+
res.sort = Object.assign(Object.assign({}, res.sort), collection.sort);
|
|
10764
|
+
return res;
|
|
10826
10765
|
}
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
for (let k in collection.columns) {
|
|
10834
|
-
const key = k;
|
|
10835
|
-
const resultItem = res.columns[key];
|
|
10836
|
-
const collectionItem = collection.columns[key];
|
|
10837
|
-
// if column data
|
|
10838
|
-
if (isArray_1(resultItem) && isArray_1(collectionItem)) {
|
|
10839
|
-
// fill columns
|
|
10840
|
-
resultItem.push(...collectionItem);
|
|
10841
|
-
// fill grouping
|
|
10842
|
-
if (collectionItem.length) {
|
|
10843
|
-
res.columnGrouping[key].push(Object.assign(Object.assign({}, group), { ids: map_1(collectionItem, 'prop') }));
|
|
10844
|
-
}
|
|
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;
|
|
10845
10772
|
}
|
|
10846
10773
|
}
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
const key = k;
|
|
10850
|
-
const collectionItem = collection.columnGrouping[key];
|
|
10851
|
-
res.columnGrouping[key].push(...collectionItem);
|
|
10774
|
+
else if (c.prop === prop) {
|
|
10775
|
+
return c;
|
|
10852
10776
|
}
|
|
10853
|
-
res.maxLevel = Math.max(res.maxLevel, collection.maxLevel);
|
|
10854
|
-
res.sort = Object.assign(Object.assign({}, res.sort), collection.sort);
|
|
10855
|
-
return res;
|
|
10856
10777
|
}
|
|
10778
|
+
return undefined;
|
|
10857
10779
|
}
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
*/
|
|
10861
|
-
function isColGrouping(colData) {
|
|
10862
|
-
return !!colData.children;
|
|
10780
|
+
function getColumnByProp(columns, prop) {
|
|
10781
|
+
return findColumn(columns, prop);
|
|
10863
10782
|
}
|
|
10864
10783
|
|
|
10865
10784
|
class ColumnDataProvider {
|
|
10866
10785
|
get order() {
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
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;
|
|
10871
10794
|
}
|
|
10872
10795
|
get stores() {
|
|
10873
10796
|
return this.dataSources;
|
|
10874
10797
|
}
|
|
10875
10798
|
constructor() {
|
|
10876
10799
|
this.sorting = null;
|
|
10877
|
-
this.dataSources =
|
|
10800
|
+
this.dataSources = columnTypes.reduce((sources, k) => {
|
|
10878
10801
|
sources[k] = new DataStore(k);
|
|
10879
10802
|
return sources;
|
|
10880
10803
|
}, {});
|
|
@@ -10936,7 +10859,7 @@ class ColumnDataProvider {
|
|
|
10936
10859
|
updateColumns(cols) {
|
|
10937
10860
|
// collect column by type and propert
|
|
10938
10861
|
const columnByKey = cols.reduce((res, c) => {
|
|
10939
|
-
const type =
|
|
10862
|
+
const type = getColumnType(c);
|
|
10940
10863
|
if (!res[type]) {
|
|
10941
10864
|
res[type] = {};
|
|
10942
10865
|
}
|
|
@@ -10945,20 +10868,32 @@ class ColumnDataProvider {
|
|
|
10945
10868
|
}, {});
|
|
10946
10869
|
// find indexes in source
|
|
10947
10870
|
const colByIndex = {};
|
|
10948
|
-
|
|
10871
|
+
for (const t in columnByKey) {
|
|
10872
|
+
if (!columnByKey.hasOwnProperty(t)) {
|
|
10873
|
+
continue;
|
|
10874
|
+
}
|
|
10875
|
+
const type = t;
|
|
10876
|
+
const colsToUpdate = columnByKey[type];
|
|
10949
10877
|
const items = this.dataSources[type].store.get('source');
|
|
10950
|
-
colByIndex[type] =
|
|
10878
|
+
colByIndex[type] = {};
|
|
10879
|
+
for (let i = 0; i < items.length; i++) {
|
|
10880
|
+
const rgCol = items[i];
|
|
10951
10881
|
const colToUpdateIfExists = colsToUpdate === null || colsToUpdate === void 0 ? void 0 : colsToUpdate[rgCol.prop];
|
|
10952
10882
|
if (colToUpdateIfExists) {
|
|
10953
|
-
|
|
10883
|
+
colByIndex[type][i] = colToUpdateIfExists;
|
|
10954
10884
|
}
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10958
|
-
|
|
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
|
+
}
|
|
10959
10894
|
}
|
|
10960
10895
|
updateColumn(column, index) {
|
|
10961
|
-
const type =
|
|
10896
|
+
const type = getColumnType(column);
|
|
10962
10897
|
setSourceByVirtualIndex(this.dataSources[type].store, { [index]: column });
|
|
10963
10898
|
}
|
|
10964
10899
|
updateColumnSorting(column, index, sorting, additive) {
|
|
@@ -10975,7 +10910,7 @@ class ColumnDataProvider {
|
|
|
10975
10910
|
}
|
|
10976
10911
|
clearSorting() {
|
|
10977
10912
|
const types = reduce_1(this.sorting, (r, c) => {
|
|
10978
|
-
const k =
|
|
10913
|
+
const k = getColumnType(c);
|
|
10979
10914
|
r[k] = true;
|
|
10980
10915
|
return r;
|
|
10981
10916
|
}, {});
|
|
@@ -10986,78 +10921,6 @@ class ColumnDataProvider {
|
|
|
10986
10921
|
});
|
|
10987
10922
|
this.sorting = {};
|
|
10988
10923
|
}
|
|
10989
|
-
static getSizes(cols) {
|
|
10990
|
-
return reduce_1(cols, (res, c, i) => {
|
|
10991
|
-
if (c.size) {
|
|
10992
|
-
res[i] = c.size;
|
|
10993
|
-
}
|
|
10994
|
-
return res;
|
|
10995
|
-
}, {});
|
|
10996
|
-
}
|
|
10997
|
-
static getColumnByProp(columns, prop) {
|
|
10998
|
-
return find_1(columns, c => {
|
|
10999
|
-
if (isColGrouping(c)) {
|
|
11000
|
-
return ColumnDataProvider.getColumnByProp(c.children, prop);
|
|
11001
|
-
}
|
|
11002
|
-
return c.prop === prop;
|
|
11003
|
-
});
|
|
11004
|
-
}
|
|
11005
|
-
// columns processing
|
|
11006
|
-
static getColumns(columns, level = 0, types) {
|
|
11007
|
-
const collection = {
|
|
11008
|
-
// columns as they are in stores per type
|
|
11009
|
-
columns: {
|
|
11010
|
-
rgCol: [],
|
|
11011
|
-
colPinStart: [],
|
|
11012
|
-
colPinEnd: [],
|
|
11013
|
-
},
|
|
11014
|
-
// columns grouped by prop for quick access
|
|
11015
|
-
columnByProp: {},
|
|
11016
|
-
// column grouping
|
|
11017
|
-
columnGrouping: {
|
|
11018
|
-
rgCol: [],
|
|
11019
|
-
colPinStart: [],
|
|
11020
|
-
colPinEnd: [],
|
|
11021
|
-
},
|
|
11022
|
-
// max depth level for column grouping
|
|
11023
|
-
maxLevel: level,
|
|
11024
|
-
// sorting
|
|
11025
|
-
sort: {},
|
|
11026
|
-
};
|
|
11027
|
-
return reduce_1(columns, (res, colData) => {
|
|
11028
|
-
// Grouped column
|
|
11029
|
-
if (isColGrouping(colData)) {
|
|
11030
|
-
return GroupingColumnPlugin.gatherGroup(res, colData, ColumnDataProvider.getColumns(colData.children, level + 1, types), level);
|
|
11031
|
-
}
|
|
11032
|
-
// Regular column
|
|
11033
|
-
const regularColumn = Object.assign(Object.assign({}, (colData.columnType && types && types[colData.columnType])), colData);
|
|
11034
|
-
// Regular column, no Pin
|
|
11035
|
-
if (!regularColumn.pin) {
|
|
11036
|
-
res.columns.rgCol.push(regularColumn);
|
|
11037
|
-
// Pin
|
|
11038
|
-
}
|
|
11039
|
-
else {
|
|
11040
|
-
res.columns[regularColumn.pin].push(regularColumn);
|
|
11041
|
-
}
|
|
11042
|
-
if (regularColumn.order) {
|
|
11043
|
-
res.sort[regularColumn.prop] = regularColumn;
|
|
11044
|
-
}
|
|
11045
|
-
// technically it's possible that some columns have same prop, but better to avoid it
|
|
11046
|
-
if (!res.columnByProp[regularColumn.prop]) {
|
|
11047
|
-
res.columnByProp[regularColumn.prop] = [];
|
|
11048
|
-
}
|
|
11049
|
-
res.columnByProp[regularColumn.prop].push(regularColumn);
|
|
11050
|
-
// trigger setup hook if present
|
|
11051
|
-
regularColumn.beforeSetup && regularColumn.beforeSetup(regularColumn);
|
|
11052
|
-
return res;
|
|
11053
|
-
}, collection);
|
|
11054
|
-
}
|
|
11055
|
-
static getColumnType(rgCol) {
|
|
11056
|
-
if (rgCol.pin) {
|
|
11057
|
-
return rgCol.pin;
|
|
11058
|
-
}
|
|
11059
|
-
return 'rgCol';
|
|
11060
|
-
}
|
|
11061
10924
|
}
|
|
11062
10925
|
|
|
11063
10926
|
/**
|
|
@@ -11208,7 +11071,7 @@ class DimensionProvider {
|
|
|
11208
11071
|
// setItemCount
|
|
11209
11072
|
this.stores[type].setStore({ count: items.length });
|
|
11210
11073
|
// setCustomSizes
|
|
11211
|
-
const newSizes =
|
|
11074
|
+
const newSizes = getColumnSizes(items);
|
|
11212
11075
|
this.stores[type].setDimensionSize(newSizes);
|
|
11213
11076
|
const vpUpdate = {
|
|
11214
11077
|
// this triggers drop on realCount change
|
|
@@ -11346,6 +11209,113 @@ class ThemeService {
|
|
|
11346
11209
|
}
|
|
11347
11210
|
}
|
|
11348
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
|
+
|
|
11349
11319
|
/**
|
|
11350
11320
|
* Plugin module for revo-grid grid system
|
|
11351
11321
|
* Add support for automatic column resize
|
|
@@ -11388,7 +11358,7 @@ class AutoSizeColumnPlugin extends BasePlugin {
|
|
|
11388
11358
|
this.columnSet(columns);
|
|
11389
11359
|
};
|
|
11390
11360
|
const headerDblClick = ({ detail }) => {
|
|
11391
|
-
const type =
|
|
11361
|
+
const type = getColumnType(detail.column);
|
|
11392
11362
|
const size = this.getColumnSize(detail.index, type);
|
|
11393
11363
|
if (size) {
|
|
11394
11364
|
this.providers.dimension.setCustomSizes(type, {
|
|
@@ -12211,7 +12181,7 @@ class SortingPlugin extends BasePlugin {
|
|
|
12211
12181
|
const columns = (await this.revogrid.getColumns());
|
|
12212
12182
|
const sortingFunc = {};
|
|
12213
12183
|
for (let prop in order) {
|
|
12214
|
-
const cmp = this.getComparer(
|
|
12184
|
+
const cmp = this.getComparer(getColumnByProp(columns, prop), order[prop]);
|
|
12215
12185
|
sortingFunc[prop] = cmp;
|
|
12216
12186
|
}
|
|
12217
12187
|
this.runSorting(order, sortingFunc);
|
|
@@ -13724,27 +13694,6 @@ class ColumnOrderHandler {
|
|
|
13724
13694
|
}
|
|
13725
13695
|
}
|
|
13726
13696
|
|
|
13727
|
-
/**
|
|
13728
|
-
* Dispatches a custom event to a specified target element.
|
|
13729
|
-
*
|
|
13730
|
-
* @param target - The target element to dispatch the event to.
|
|
13731
|
-
* @param eventName - The name of the custom event.
|
|
13732
|
-
* @param detail - Optional. The detail of the custom event.
|
|
13733
|
-
* @returns The custom event that was dispatched.
|
|
13734
|
-
*/
|
|
13735
|
-
function dispatch(target, eventName, detail) {
|
|
13736
|
-
// Create a new CustomEvent with the specified event name and detail.
|
|
13737
|
-
const event = new CustomEvent(eventName, {
|
|
13738
|
-
detail,
|
|
13739
|
-
cancelable: true, // Indicates whether the event can be canceled.
|
|
13740
|
-
bubbles: true, // Indicates whether the event bubbles up through the DOM.
|
|
13741
|
-
});
|
|
13742
|
-
// Dispatch the event on the target element.
|
|
13743
|
-
target === null || target === void 0 ? void 0 : target.dispatchEvent(event);
|
|
13744
|
-
// Return the custom event that was dispatched.
|
|
13745
|
-
return event;
|
|
13746
|
-
}
|
|
13747
|
-
|
|
13748
13697
|
var ResizeEvents;
|
|
13749
13698
|
(function (ResizeEvents) {
|
|
13750
13699
|
ResizeEvents["start"] = "resize:start";
|
|
@@ -14381,7 +14330,7 @@ class RevoGridComponent {
|
|
|
14381
14330
|
/** Open editor for cell. */
|
|
14382
14331
|
async setCellEdit(rgRow, prop, rowSource = 'rgRow') {
|
|
14383
14332
|
var _a;
|
|
14384
|
-
const rgCol =
|
|
14333
|
+
const rgCol = getColumnByProp(this.columns, prop);
|
|
14385
14334
|
if (!rgCol) {
|
|
14386
14335
|
return;
|
|
14387
14336
|
}
|
|
@@ -14605,7 +14554,7 @@ class RevoGridComponent {
|
|
|
14605
14554
|
this.columnChanged(this.columns);
|
|
14606
14555
|
}
|
|
14607
14556
|
columnChanged(newVal = []) {
|
|
14608
|
-
const columnGather =
|
|
14557
|
+
const columnGather = getColumns(newVal, 0, this.columnTypes);
|
|
14609
14558
|
this.beforecolumnsset.emit(columnGather);
|
|
14610
14559
|
this.dimensionProvider.applyNewColumns(columnGather.columns, this.disableVirtualX);
|
|
14611
14560
|
this.beforecolumnapplied.emit(columnGather);
|
|
@@ -14915,7 +14864,7 @@ class RevoGridComponent {
|
|
|
14915
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 });
|
|
14916
14865
|
// Column headers
|
|
14917
14866
|
const dataViews = [
|
|
14918
|
-
hAsync("revogr-header", Object.assign({ key: '
|
|
14867
|
+
hAsync("revogr-header", Object.assign({ key: 'bada77126c317da09a9826312186c16617c7b0af' }, headerProperties, { slot: HEADER_SLOT })),
|
|
14919
14868
|
];
|
|
14920
14869
|
// Render viewport data (vertical sections)
|
|
14921
14870
|
view.dataPorts.forEach(data => {
|
|
@@ -14937,12 +14886,12 @@ class RevoGridComponent {
|
|
|
14937
14886
|
const typeCol = 'rgCol';
|
|
14938
14887
|
const viewports = this.viewportProvider.stores;
|
|
14939
14888
|
const dimensions = this.dimensionProvider.stores;
|
|
14940
|
-
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) => {
|
|
14941
14890
|
var _a;
|
|
14942
14891
|
if (e.currentTarget === e.target) {
|
|
14943
14892
|
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
|
|
14944
14893
|
}
|
|
14945
|
-
} }, 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));
|
|
14946
14895
|
}
|
|
14947
14896
|
disconnectedCallback() {
|
|
14948
14897
|
// Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed
|