@revolist/revogrid 4.8.15 → 4.8.16
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/{base.plugin-a323e377.js → base.plugin-20638e28.js} +3 -2
- package/dist/cjs/base.plugin-20638e28.js.map +1 -0
- package/dist/cjs/index.cjs.js +3 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/plugins/base.plugin.js +2 -0
- package/dist/collection/plugins/base.plugin.js.map +1 -1
- package/dist/esm/{base.plugin-5eec30ac.js → base.plugin-be5554eb.js} +3 -2
- package/dist/esm/base.plugin-be5554eb.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/revo-grid.entry.js +1 -1
- package/dist/revo-grid/base.plugin-be5554eb.js +5 -0
- package/dist/revo-grid/base.plugin-be5554eb.js.map +1 -0
- package/dist/revo-grid/index.esm.js +1 -1
- package/dist/revo-grid/revo-grid.entry.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/plugins/base.plugin.d.ts +2 -0
- package/hydrate/index.js +1 -0
- package/hydrate/index.mjs +1 -0
- package/package.json +1 -1
- package/standalone/index.js +1 -1
- package/standalone/revo-grid.js +1 -0
- package/standalone/revo-grid.js.map +1 -1
- package/dist/cjs/base.plugin-a323e377.js.map +0 -1
- package/dist/esm/base.plugin-5eec30ac.js.map +0 -1
- package/dist/revo-grid/base.plugin-5eec30ac.js +0 -5
- package/dist/revo-grid/base.plugin-5eec30ac.js.map +0 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
const dimension_helpers = require('./dimension.helpers-75de0b84.js');
|
|
7
7
|
require('./toNumber-838e6ff5.js');
|
|
8
|
-
require('./index-a2370c46.js');
|
|
8
|
+
const index = require('./index-a2370c46.js');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Storing pre-calculated
|
|
@@ -133,6 +133,7 @@ class BasePlugin {
|
|
|
133
133
|
constructor(revogrid, providers) {
|
|
134
134
|
this.revogrid = revogrid;
|
|
135
135
|
this.providers = providers;
|
|
136
|
+
this.h = index.h;
|
|
136
137
|
this.subscriptions = {};
|
|
137
138
|
}
|
|
138
139
|
/**
|
|
@@ -215,4 +216,4 @@ exports.columnTypes = columnTypes;
|
|
|
215
216
|
exports.isRowType = isRowType;
|
|
216
217
|
exports.rowTypes = rowTypes;
|
|
217
218
|
|
|
218
|
-
//# sourceMappingURL=base.plugin-
|
|
219
|
+
//# sourceMappingURL=base.plugin-20638e28.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"base.plugin-20638e28.js","mappings":";;;;;;;;;AAAA;;;;AAuBA,MAAM,aAAa,GAAG,CACpB,KAAqB;IAErB,IAAI,WAAW,GAAoC,EAAE,CAAC;IAEtD,MAAM,UAAU,GAAG,CACjB,KAAsC,EACtC,OAA0C;QAE1C,MAAM,OAAO,qBAAQ,KAAK,CAAE,CAAC;QAC7B,WAAW,GAAG,EAAE,CAAC;QACjBA,sBAAI,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK;YACrB,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;gBACvB,WAAW,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;gBACpC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;aACvB;SACF,CAAC,CAAC;QACH,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;KACjC,CAAC;IACF,OAAO;QACL,GAAG,CAAC,GAAG,EAAE,GAAG;YACV,QAAQ,GAAG;gBACT,KAAK,SAAS;oBACZ,MAAM,IAAI,GAAG,GAAwC,CAAC;oBACtD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;;oBAEvC,UAAU,iCAAM,KAA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B,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC;QAC5E,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;KACtC;;;;;IAMD,IAAI,CAAU,SAAiB,EAAE,MAAU;QACzC,MAAM,KAAK,GAAG,IAAI,WAAW,CAAI,SAAS,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,KAAK,CAAC;KACd;;;;IAKD,kBAAkB;QAChB,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE;YACnC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;SAChC;KACF;;;;IAKD,OAAO;QACL,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;;;;;;;;;","names":["each","createStore","reduce","setStore","calculateDimensionData","h"],"sources":["src/store/dimension/dimension.store.ts","src/store/index.ts","src/plugins/base.plugin.ts"],"sourcesContent":["/**\n * Storing pre-calculated\n * Dimension information and sizes\n */\nimport reduce from 'lodash/reduce';\nimport { createStore } from '@stencil/store';\n\nimport { setStore, Observable, PluginSubscribe } from '../../utils/store.utils';\nimport { calculateDimensionData } from './dimension.helpers';\nimport each from 'lodash/each';\nimport {\n DimensionCalc,\n DimensionSettingsState,\n ViewSettingSizeProp,\n MultiDimensionType,\n} from '@type';\n\nexport type DimensionStoreCollection = {\n [T in MultiDimensionType]: DimensionStore;\n};\n\ntype Item = keyof DimensionSettingsState;\n\nconst trimmedPlugin = (\n store: DimensionStore,\n): PluginSubscribe<DimensionSettingsState> => {\n let trimmedSize: DimensionSettingsState['sizes'] = {};\n\n const setTrimmed = (\n sizes: DimensionSettingsState['sizes'],\n trimmed: DimensionSettingsState['trimmed'],\n ) => {\n const newSize = { ...sizes };\n trimmedSize = {};\n each(trimmed, (v, index) => {\n if (v && newSize[index]) {\n trimmedSize[index] = newSize[index];\n delete newSize[index];\n }\n });\n store.setDimensionSize(newSize);\n };\n return {\n set(key, val) {\n switch (key) {\n case 'trimmed':\n const trim = val as DimensionSettingsState['trimmed'];\n const sizes = store.store.get('sizes');\n // recover trimmed, apply new trim\n setTrimmed({ ...sizes, ...trimmedSize }, trim);\n break;\n }\n },\n };\n};\n\nconst realSizePlugin = (\n store: DimensionStore,\n): PluginSubscribe<DimensionSettingsState> => {\n return {\n set(k) {\n switch (k) {\n case 'count':\n case 'sizes':\n case 'originItemSize':\n let realSize = 0;\n const count = store.store.get('count');\n for (let i = 0; i < count; i++) {\n realSize +=\n store.store.get('sizes')[i] || store.store.get('originItemSize');\n }\n store.setStore({ realSize });\n }\n },\n };\n};\n\nfunction initialBase(): DimensionCalc {\n return {\n indexes: [],\n count: 0,\n\n // plugin support\n trimmed: {},\n\n // size operations, this provider stores only changed sizes, not all of them\n // same as indexes but for sizes and positions\n // item index to size\n sizes: {},\n // order in indexes[] to coordinate\n positionIndexToItem: {},\n // initial element to coordinate ^\n indexToItem: {},\n positionIndexes: [],\n };\n}\n\nfunction initialState(): DimensionSettingsState {\n return {\n ...initialBase(),\n // size which all items can take\n realSize: 0,\n\n // initial item size if it wasn't changed\n originItemSize: 0,\n };\n}\n\nexport class DimensionStore {\n readonly store: Observable<DimensionSettingsState>;\n constructor() {\n this.store = createStore(initialState());\n this.store.use(trimmedPlugin(this));\n this.store.use(realSizePlugin(this));\n }\n\n getCurrentState(): DimensionSettingsState {\n const state = initialState();\n const keys = Object.keys(state);\n return reduce(\n keys,\n (r: DimensionSettingsState, k: Item) => {\n const data = this.store.get(k);\n r[k] = data as never;\n return r;\n },\n state,\n );\n }\n\n dispose() {\n setStore(this.store, initialState());\n }\n\n setStore<T extends Record<string, any>>(data: Partial<T>) {\n setStore(this.store, data);\n }\n\n drop() {\n setStore(this.store, initialBase());\n }\n\n /**\n * Set custom dimension sizes and overwrite old\n * Generates new indexes based on sizes\n * @param sizes - sizes to set\n */\n setDimensionSize(sizes: ViewSettingSizeProp) {\n const dimensionData = calculateDimensionData(\n this.store.get('originItemSize'),\n sizes,\n );\n setStore(this.store, dimensionData);\n }\n}\n","import type { DimensionCols, DimensionRows } from '@type';\n\nexport * from './dataSource';\nexport * from './dimension';\nexport * from './selection';\nexport * from './vp';\n\nexport const rowTypes: DimensionRows[] = ['rowPinStart', 'rgRow', 'rowPinEnd'];\nexport const columnTypes: DimensionCols[] = [\n 'colPinStart',\n 'rgCol',\n 'colPinEnd',\n];\n\nexport function isRowType(type: DimensionRows | any): type is DimensionRows {\n return rowTypes.indexOf(type) > -1;\n}\n","import { h } from '@stencil/core';\nimport { PluginProviders, PluginBaseComponent } from '..';\n\ntype WatchConfig = { immediate: boolean };\n\n/**\n * Base layer for plugins\n * Provide minimal starting core for plugins to work\n * Extend this class to create plugin\n */\nexport class BasePlugin implements PluginBaseComponent {\n readonly h = h;\n readonly subscriptions: Record<string, (...args: any[]) => void> = {};\n constructor(public revogrid: HTMLRevoGridElement, public providers: PluginProviders) {}\n /**\n *\n * @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')\n * @param callback - callback function for event\n */\n addEventListener(\n eventName: string,\n callback: (e: CustomEvent) => void,\n ) {\n this.revogrid.addEventListener(eventName, callback);\n this.subscriptions[eventName] = callback;\n }\n\n /**\n * Subscribe to property change in revo-grid component\n * You can return false in callback to prevent default value set\n *\n * @param prop - property name\n * @param callback - callback function\n * @param immediate - trigger callback immediately with current value\n */\n watch<T extends any>(\n prop: string,\n callback: (arg: T) => boolean | void,\n { immediate }: Partial<WatchConfig> = { immediate: false },\n ) {\n const nativeValueDesc =\n Object.getOwnPropertyDescriptor(this.revogrid, prop) ||\n Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);\n\n // Overwrite property descriptor for this instance\n Object.defineProperty(this.revogrid, prop, {\n set(val: T) {\n const keepDefault = callback(val);\n if (keepDefault === false) {\n return;\n }\n // Continue with native behavior\n return nativeValueDesc?.set?.call(this, val);\n },\n get() {\n // Continue with native behavior\n return nativeValueDesc?.get?.call(this);\n },\n });\n if (immediate) {\n callback(nativeValueDesc?.value);\n }\n }\n\n /**\n * Remove event listener\n * @param eventName\n */\n removeEventListener(eventName: string) {\n this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);\n delete this.subscriptions[eventName];\n }\n\n /**\n * Emit event from revo-grid component\n * Event can be cancelled by calling event.preventDefault() in callback\n */\n emit<T = any>(eventName: string, detail?: T) {\n const event = new CustomEvent<T>(eventName, { detail, cancelable: true });\n this.revogrid.dispatchEvent(event);\n return event;\n }\n\n /**\n * Clear all subscriptions\n */\n clearSubscriptions() {\n for (let type in this.subscriptions) {\n this.removeEventListener(type);\n }\n }\n\n /**\n * Destroy plugin and clear all subscriptions\n */\n destroy() {\n this.clearSubscriptions();\n }\n}\n"],"version":3}
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const base_plugin = require('./base.plugin-
|
|
8
|
+
const base_plugin = require('./base.plugin-20638e28.js');
|
|
9
9
|
const dispatcher = require('./dispatcher-998aa470.js');
|
|
10
10
|
const dimension_helpers = require('./dimension.helpers-75de0b84.js');
|
|
11
|
+
const index = require('./index-a2370c46.js');
|
|
11
12
|
const selection_helpers = require('./selection.helpers-4982680f.js');
|
|
12
13
|
const viewport_store = require('./viewport.store-aa91fe75.js');
|
|
13
14
|
require('./toNumber-838e6ff5.js');
|
|
14
|
-
require('./index-a2370c46.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -37,6 +37,7 @@ exports.setSourceByPhysicalIndex = dimension_helpers.setSourceByPhysicalIndex;
|
|
|
37
37
|
exports.setSourceByVirtualIndex = dimension_helpers.setSourceByVirtualIndex;
|
|
38
38
|
exports.setStore = dimension_helpers.setStore;
|
|
39
39
|
exports.trimmedPlugin = dimension_helpers.trimmedPlugin;
|
|
40
|
+
exports.h = index.h;
|
|
40
41
|
exports.SelectionStore = selection_helpers.SelectionStore;
|
|
41
42
|
exports.cropCellToMax = selection_helpers.cropCellToMax;
|
|
42
43
|
exports.getRange = selection_helpers.getRange;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.cjs.js","mappings":"
|
|
1
|
+
{"file":"index.cjs.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
|
|
8
8
|
const index$1 = require('./index-a2370c46.js');
|
|
9
9
|
const dimension_helpers = require('./dimension.helpers-75de0b84.js');
|
|
10
|
-
const base_plugin = require('./base.plugin-
|
|
10
|
+
const base_plugin = require('./base.plugin-20638e28.js');
|
|
11
11
|
const toNumber = require('./toNumber-838e6ff5.js');
|
|
12
12
|
const selection_helpers = require('./selection.helpers-4982680f.js');
|
|
13
13
|
const debounce = require('./debounce-e2b7c6fb.js');
|
package/dist/collection/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC","sourcesContent":["export * from './types';\nexport * from './store';\nexport * from './plugins/base.plugin';\nexport * from './plugins/dispatcher';\nexport * from './components';\nexport * from './utils/store.utils';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export * from './types';\nexport * from './store';\nexport * from './plugins/base.plugin';\nexport * from './plugins/dispatcher';\nexport * from './components';\nexport * from './utils/store.utils';\nexport { h } from '@stencil/core';\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
+
import { h } from "@stencil/core";
|
|
4
5
|
/**
|
|
5
6
|
* Base layer for plugins
|
|
6
7
|
* Provide minimal starting core for plugins to work
|
|
@@ -10,6 +11,7 @@ export class BasePlugin {
|
|
|
10
11
|
constructor(revogrid, providers) {
|
|
11
12
|
this.revogrid = revogrid;
|
|
12
13
|
this.providers = providers;
|
|
14
|
+
this.h = h;
|
|
13
15
|
this.subscriptions = {};
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.plugin.js","sourceRoot":"","sources":["../../src/plugins/base.plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.plugin.js","sourceRoot":"","sources":["../../src/plugins/base.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAKlC;;;;GAIG;AACH,MAAM,OAAO,UAAU;IAGrB,YAAmB,QAA6B,EAAS,SAA0B;QAAhE,aAAQ,GAAR,QAAQ,CAAqB;QAAS,cAAS,GAAT,SAAS,CAAiB;QAF1E,MAAC,GAAG,CAAC,CAAC;QACN,kBAAa,GAA6C,EAAE,CAAC;IACgB,CAAC;IACvF;;;;OAIG;IACH,gBAAgB,CACd,SAAiB,EACjB,QAAkC;QAElC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QACpD,IAAI,CAAC,aAAa,CAAC,S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CAAU,SAAiB,EAAE,MAAU;QACzC,MAAM,KAAK,GAAG,IAAI,WAAW,CAAI,SAAS,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACnC,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACpC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { h } from '@stencil/core';\nimport { PluginProviders, PluginBaseComponent } from '..';\n\ntype WatchConfig = { immediate: boolean };\n\n/**\n * Base layer for plugins\n * Provide minimal starting core for plugins to work\n * Extend this class to create plugin\n */\nexport class BasePlugin implements PluginBaseComponent {\n readonly h = h;\n readonly subscriptions: Record<string, (...args: any[]) => void> = {};\n constructor(public revogrid: HTMLRevoGridElement, public providers: PluginProviders) {}\n /**\n *\n * @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')\n * @param callback - callback function for event\n */\n addEventListener(\n eventName: string,\n callback: (e: CustomEvent) => void,\n ) {\n this.revogrid.addEventListener(eventName, callback);\n this.subscriptions[eventName] = callback;\n }\n\n /**\n * Subscribe to property change in revo-grid component\n * You can return false in callback to prevent default value set\n *\n * @param prop - property name\n * @param callback - callback function\n * @param immediate - trigger callback immediately with current value\n */\n watch<T extends any>(\n prop: string,\n callback: (arg: T) => boolean | void,\n { immediate }: Partial<WatchConfig> = { immediate: false },\n ) {\n const nativeValueDesc =\n Object.getOwnPropertyDescriptor(this.revogrid, prop) ||\n Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);\n\n // Overwrite property descriptor for this instance\n Object.defineProperty(this.revogrid, prop, {\n set(val: T) {\n const keepDefault = callback(val);\n if (keepDefault === false) {\n return;\n }\n // Continue with native behavior\n return nativeValueDesc?.set?.call(this, val);\n },\n get() {\n // Continue with native behavior\n return nativeValueDesc?.get?.call(this);\n },\n });\n if (immediate) {\n callback(nativeValueDesc?.value);\n }\n }\n\n /**\n * Remove event listener\n * @param eventName\n */\n removeEventListener(eventName: string) {\n this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);\n delete this.subscriptions[eventName];\n }\n\n /**\n * Emit event from revo-grid component\n * Event can be cancelled by calling event.preventDefault() in callback\n */\n emit<T = any>(eventName: string, detail?: T) {\n const event = new CustomEvent<T>(eventName, { detail, cancelable: true });\n this.revogrid.dispatchEvent(event);\n return event;\n }\n\n /**\n * Clear all subscriptions\n */\n clearSubscriptions() {\n for (let type in this.subscriptions) {\n this.removeEventListener(type);\n }\n }\n\n /**\n * Destroy plugin and clear all subscriptions\n */\n destroy() {\n this.clearSubscriptions();\n }\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { l as createStore, r as reduce_1, k as setStore, h as calculateDimensionData, m as each } from './dimension.helpers-beca689b.js';
|
|
5
5
|
import './toNumber-8de324a7.js';
|
|
6
|
-
import './index-8b791a74.js';
|
|
6
|
+
import { h } from './index-8b791a74.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Storing pre-calculated
|
|
@@ -131,6 +131,7 @@ class BasePlugin {
|
|
|
131
131
|
constructor(revogrid, providers) {
|
|
132
132
|
this.revogrid = revogrid;
|
|
133
133
|
this.providers = providers;
|
|
134
|
+
this.h = h;
|
|
134
135
|
this.subscriptions = {};
|
|
135
136
|
}
|
|
136
137
|
/**
|
|
@@ -209,4 +210,4 @@ class BasePlugin {
|
|
|
209
210
|
|
|
210
211
|
export { BasePlugin as B, DimensionStore as D, columnTypes as c, isRowType as i, rowTypes as r };
|
|
211
212
|
|
|
212
|
-
//# sourceMappingURL=base.plugin-
|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;QAChB,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE;YACnC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;SAChC;KACF;;;;IAKD,OAAO;QACL,IAAI,CAAC,kBAAkB,EAAE,CAAC;KAC3B;;;;;","names":["reduce"],"sources":["src/store/dimension/dimension.store.ts","src/store/index.ts","src/plugins/base.plugin.ts"],"sourcesContent":["/**\n * Storing pre-calculated\n * Dimension information and sizes\n */\nimport reduce from 'lodash/reduce';\nimport { createStore } from '@stencil/store';\n\nimport { setStore, Observable, PluginSubscribe } from '../../utils/store.utils';\nimport { calculateDimensionData } from './dimension.helpers';\nimport each from 'lodash/each';\nimport {\n DimensionCalc,\n DimensionSettingsState,\n ViewSettingSizeProp,\n MultiDimensionType,\n} from '@type';\n\nexport type DimensionStoreCollection = {\n [T in MultiDimensionType]: DimensionStore;\n};\n\ntype Item = keyof DimensionSettingsState;\n\nconst trimmedPlugin = (\n store: DimensionStore,\n): PluginSubscribe<DimensionSettingsState> => {\n let trimmedSize: DimensionSettingsState['sizes'] = {};\n\n const setTrimmed = (\n sizes: DimensionSettingsState['sizes'],\n trimmed: DimensionSettingsState['trimmed'],\n ) => {\n const newSize = { ...sizes };\n trimmedSize = {};\n each(trimmed, (v, index) => {\n if (v && newSize[index]) {\n trimmedSize[index] = newSize[index];\n delete newSize[index];\n }\n });\n store.setDimensionSize(newSize);\n };\n return {\n set(key, val) {\n switch (key) {\n case 'trimmed':\n const trim = val as DimensionSettingsState['trimmed'];\n const sizes = store.store.get('sizes');\n // recover trimmed, apply new trim\n setTrimmed({ ...sizes, ...trimmedSize }, trim);\n break;\n }\n },\n };\n};\n\nconst realSizePlugin = (\n store: DimensionStore,\n): PluginSubscribe<DimensionSettingsState> => {\n return {\n set(k) {\n switch (k) {\n case 'count':\n case 'sizes':\n case 'originItemSize':\n let realSize = 0;\n const count = store.store.get('count');\n for (let i = 0; i < count; i++) {\n realSize +=\n store.store.get('sizes')[i] || store.store.get('originItemSize');\n }\n store.setStore({ realSize });\n }\n },\n };\n};\n\nfunction initialBase(): DimensionCalc {\n return {\n indexes: [],\n count: 0,\n\n // plugin support\n trimmed: {},\n\n // size operations, this provider stores only changed sizes, not all of them\n // same as indexes but for sizes and positions\n // item index to size\n sizes: {},\n // order in indexes[] to coordinate\n positionIndexToItem: {},\n // initial element to coordinate ^\n indexToItem: {},\n positionIndexes: [],\n };\n}\n\nfunction initialState(): DimensionSettingsState {\n return {\n ...initialBase(),\n // size which all items can take\n realSize: 0,\n\n // initial item size if it wasn't changed\n originItemSize: 0,\n };\n}\n\nexport class DimensionStore {\n readonly store: Observable<DimensionSettingsState>;\n constructor() {\n this.store = createStore(initialState());\n this.store.use(trimmedPlugin(this));\n this.store.use(realSizePlugin(this));\n }\n\n getCurrentState(): DimensionSettingsState {\n const state = initialState();\n const keys = Object.keys(state);\n return reduce(\n keys,\n (r: DimensionSettingsState, k: Item) => {\n const data = this.store.get(k);\n r[k] = data as never;\n return r;\n },\n state,\n );\n }\n\n dispose() {\n setStore(this.store, initialState());\n }\n\n setStore<T extends Record<string, any>>(data: Partial<T>) {\n setStore(this.store, data);\n }\n\n drop() {\n setStore(this.store, initialBase());\n }\n\n /**\n * Set custom dimension sizes and overwrite old\n * Generates new indexes based on sizes\n * @param sizes - sizes to set\n */\n setDimensionSize(sizes: ViewSettingSizeProp) {\n const dimensionData = calculateDimensionData(\n this.store.get('originItemSize'),\n sizes,\n );\n setStore(this.store, dimensionData);\n }\n}\n","import type { DimensionCols, DimensionRows } from '@type';\n\nexport * from './dataSource';\nexport * from './dimension';\nexport * from './selection';\nexport * from './vp';\n\nexport const rowTypes: DimensionRows[] = ['rowPinStart', 'rgRow', 'rowPinEnd'];\nexport const columnTypes: DimensionCols[] = [\n 'colPinStart',\n 'rgCol',\n 'colPinEnd',\n];\n\nexport function isRowType(type: DimensionRows | any): type is DimensionRows {\n return rowTypes.indexOf(type) > -1;\n}\n","import { h } from '@stencil/core';\nimport { PluginProviders, PluginBaseComponent } from '..';\n\ntype WatchConfig = { immediate: boolean };\n\n/**\n * Base layer for plugins\n * Provide minimal starting core for plugins to work\n * Extend this class to create plugin\n */\nexport class BasePlugin implements PluginBaseComponent {\n readonly h = h;\n readonly subscriptions: Record<string, (...args: any[]) => void> = {};\n constructor(public revogrid: HTMLRevoGridElement, public providers: PluginProviders) {}\n /**\n *\n * @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')\n * @param callback - callback function for event\n */\n addEventListener(\n eventName: string,\n callback: (e: CustomEvent) => void,\n ) {\n this.revogrid.addEventListener(eventName, callback);\n this.subscriptions[eventName] = callback;\n }\n\n /**\n * Subscribe to property change in revo-grid component\n * You can return false in callback to prevent default value set\n *\n * @param prop - property name\n * @param callback - callback function\n * @param immediate - trigger callback immediately with current value\n */\n watch<T extends any>(\n prop: string,\n callback: (arg: T) => boolean | void,\n { immediate }: Partial<WatchConfig> = { immediate: false },\n ) {\n const nativeValueDesc =\n Object.getOwnPropertyDescriptor(this.revogrid, prop) ||\n Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);\n\n // Overwrite property descriptor for this instance\n Object.defineProperty(this.revogrid, prop, {\n set(val: T) {\n const keepDefault = callback(val);\n if (keepDefault === false) {\n return;\n }\n // Continue with native behavior\n return nativeValueDesc?.set?.call(this, val);\n },\n get() {\n // Continue with native behavior\n return nativeValueDesc?.get?.call(this);\n },\n });\n if (immediate) {\n callback(nativeValueDesc?.value);\n }\n }\n\n /**\n * Remove event listener\n * @param eventName\n */\n removeEventListener(eventName: string) {\n this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);\n delete this.subscriptions[eventName];\n }\n\n /**\n * Emit event from revo-grid component\n * Event can be cancelled by calling event.preventDefault() in callback\n */\n emit<T = any>(eventName: string, detail?: T) {\n const event = new CustomEvent<T>(eventName, { detail, cancelable: true });\n this.revogrid.dispatchEvent(event);\n return event;\n }\n\n /**\n * Clear all subscriptions\n */\n clearSubscriptions() {\n for (let type in this.subscriptions) {\n this.removeEventListener(type);\n }\n }\n\n /**\n * Destroy plugin and clear all subscriptions\n */\n destroy() {\n this.clearSubscriptions();\n }\n}\n"],"version":3}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
-
export { B as BasePlugin, D as DimensionStore, c as columnTypes, i as isRowType, r as rowTypes } from './base.plugin-
|
|
4
|
+
export { B as BasePlugin, D as DimensionStore, c as columnTypes, i as isRowType, r as rowTypes } from './base.plugin-be5554eb.js';
|
|
5
5
|
export { d as dispatch, a as dispatchByEvent } from './dispatcher-ea08404f.js';
|
|
6
6
|
export { D as DataStore, h as calculateDimensionData, f as gatherTrimmedItems, j as getItemByIndex, i as getItemByPosition, g as getPhysical, b as getSourceItem, e as getSourceItemVirtualIndexByProp, a as getVisibleSourceItem, p as proxyPlugin, d as setItems, c as setSourceByPhysicalIndex, s as setSourceByVirtualIndex, k as setStore, t as trimmedPlugin } from './dimension.helpers-beca689b.js';
|
|
7
|
+
export { h } from './index-8b791a74.js';
|
|
7
8
|
export { S as SelectionStore, c as cropCellToMax, g as getRange, i as isHiddenStore, a as isRangeSingleCell, n as nextCell } from './selection.helpers-7ab1d0f9.js';
|
|
8
9
|
export { V as ViewportStore, a as addMissingItems, d as getFirstItem, b as getItems, e as getLastItem, g as getUpdatedItemsByPosition, i as isActiveRange, c as isActiveRangeOutsideLastItem, r as recombineByOffset, s as setItemSizes, u as updateMissingAndRange } from './viewport.store-3ff983a5.js';
|
|
9
10
|
import './toNumber-8de324a7.js';
|
|
10
|
-
import './index-8b791a74.js';
|
|
11
11
|
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { h, r as registerInstance, c as createEvent, H as Host, a as getElement } from './index-8b791a74.js';
|
|
5
5
|
import { _ as _baseIteratee, n as isArrayLike_1, o as keys_1, q as findIndex_1, u as _baseEach, v as _arrayMap, w as isArray_1, r as reduce_1, D as DataStore, b as getSourceItem, e as getSourceItemVirtualIndexByProp, m as each, s as setSourceByVirtualIndex, a as getVisibleSourceItem, f as gatherTrimmedItems, j as getItemByIndex, x as _baseProperty, y as _baseKeys, z as _getTag, A as range_1, k as setStore, B as toInteger_1, C as _isIterateeCall, g as getPhysical, d as setItems, i as getItemByPosition } from './dimension.helpers-beca689b.js';
|
|
6
|
-
import { B as BasePlugin, c as columnTypes, r as rowTypes, i as isRowType, D as DimensionStore } from './base.plugin-
|
|
6
|
+
import { B as BasePlugin, c as columnTypes, r as rowTypes, i as isRowType, D as DimensionStore } from './base.plugin-be5554eb.js';
|
|
7
7
|
import { _ as _baseGetTag, c as isObjectLike_1 } from './toNumber-8de324a7.js';
|
|
8
8
|
import { E as EMPTY_INDEX, b as SelectionStoreConnector } from './selection.helpers-7ab1d0f9.js';
|
|
9
9
|
import { d as debounce_1 } from './debounce-7781346d.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Revolist OU ❤️
|
|
3
|
+
*/
|
|
4
|
+
import{l as t,r as e,k as s,h as i,m as n}from"./dimension.helpers-beca689b.js";import"./toNumber-8de324a7.js";import{h as o}from"./index-8b791a74.js";const r=t=>{let e={};const s=(s,i)=>{const o=Object.assign({},s);e={};n(i,((t,s)=>{if(t&&o[s]){e[s]=o[s];delete o[s]}}));t.setDimensionSize(o)};return{set(i,n){switch(i){case"trimmed":const i=n;const o=t.store.get("sizes");s(Object.assign(Object.assign({},o),e),i);break}}}};const c=t=>({set(e){switch(e){case"count":case"sizes":case"originItemSize":let e=0;const s=t.store.get("count");for(let i=0;i<s;i++){e+=t.store.get("sizes")[i]||t.store.get("originItemSize")}t.setStore({realSize:e})}}});function a(){return{indexes:[],count:0,trimmed:{},sizes:{},positionIndexToItem:{},indexToItem:{},positionIndexes:[]}}function h(){return Object.assign(Object.assign({},a()),{realSize:0,originItemSize:0})}class d{constructor(){this.store=t(h());this.store.use(r(this));this.store.use(c(this))}getCurrentState(){const t=h();const s=Object.keys(t);return e(s,((t,e)=>{const s=this.store.get(e);t[e]=s;return t}),t)}dispose(){s(this.store,h())}setStore(t){s(this.store,t)}drop(){s(this.store,a())}setDimensionSize(t){const e=i(this.store.get("originItemSize"),t);s(this.store,e)}}const l=["rowPinStart","rgRow","rowPinEnd"];const u=["colPinStart","rgCol","colPinEnd"];function m(t){return l.indexOf(t)>-1}class b{constructor(t,e){this.revogrid=t;this.providers=e;this.h=o;this.subscriptions={}}addEventListener(t,e){this.revogrid.addEventListener(t,e);this.subscriptions[t]=e}watch(t,e,{immediate:s}={immediate:false}){const i=Object.getOwnPropertyDescriptor(this.revogrid,t)||Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype,t);Object.defineProperty(this.revogrid,t,{set(t){var s;const n=e(t);if(n===false){return}return(s=i===null||i===void 0?void 0:i.set)===null||s===void 0?void 0:s.call(this,t)},get(){var t;return(t=i===null||i===void 0?void 0:i.get)===null||t===void 0?void 0:t.call(this)}});if(s){e(i===null||i===void 0?void 0:i.value)}}removeEventListener(t){this.revogrid.removeEventListener(t,this.subscriptions[t]);delete this.subscriptions[t]}emit(t,e){const s=new CustomEvent(t,{detail:e,cancelable:true});this.revogrid.dispatchEvent(s);return s}clearSubscriptions(){for(let t in this.subscriptions){this.removeEventListener(t)}}destroy(){this.clearSubscriptions()}}export{b as B,d as D,u as c,m as i,l as r};
|
|
5
|
+
//# sourceMappingURL=base.plugin-be5554eb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["trimmedPlugin","store","trimmedSize","setTrimmed","sizes","trimmed","newSize","Object","assign","each","v","index","setDimensionSize","set","key","val","trim","get","realSizePlugin","k","realSize","count","i","setStore","initialBase","indexes","positionIndexToItem","indexToItem","positionIndexes","initialState","originItemSize","DimensionStore","constructor","this","createStore","use","getCurrentState","state","keys","reduce","r","data","dispose","drop","dimensionData","calculateDimensionData","rowTypes","columnTypes","isRowType","type","indexOf","BasePlugin","revogrid","providers","h","subscriptions","addEventListener","eventName","callback","watch","prop","immediate","nativeValueDesc","getOwnPropertyDescriptor","prototype","defineProperty","keepDefault","_a","call","value","removeEventListener","emit","detail","event","CustomEvent","cancelable","dispatchEvent","clearSubscriptions","destroy"],"sources":["src/store/dimension/dimension.store.ts","src/store/index.ts","src/plugins/base.plugin.ts"],"sourcesContent":["/**\n * Storing pre-calculated\n * Dimension information and sizes\n */\nimport reduce from 'lodash/reduce';\nimport { createStore } from '@stencil/store';\n\nimport { setStore, Observable, PluginSubscribe } from '../../utils/store.utils';\nimport { calculateDimensionData } from './dimension.helpers';\nimport each from 'lodash/each';\nimport {\n DimensionCalc,\n DimensionSettingsState,\n ViewSettingSizeProp,\n MultiDimensionType,\n} from '@type';\n\nexport type DimensionStoreCollection = {\n [T in MultiDimensionType]: DimensionStore;\n};\n\ntype Item = keyof DimensionSettingsState;\n\nconst trimmedPlugin = (\n store: DimensionStore,\n): PluginSubscribe<DimensionSettingsState> => {\n let trimmedSize: DimensionSettingsState['sizes'] = {};\n\n const setTrimmed = (\n sizes: DimensionSettingsState['sizes'],\n trimmed: DimensionSettingsState['trimmed'],\n ) => {\n const newSize = { ...sizes };\n trimmedSize = {};\n each(trimmed, (v, index) => {\n if (v && newSize[index]) {\n trimmedSize[index] = newSize[index];\n delete newSize[index];\n }\n });\n store.setDimensionSize(newSize);\n };\n return {\n set(key, val) {\n switch (key) {\n case 'trimmed':\n const trim = val as DimensionSettingsState['trimmed'];\n const sizes = store.store.get('sizes');\n // recover trimmed, apply new trim\n setTrimmed({ ...sizes, ...trimmedSize }, trim);\n break;\n }\n },\n };\n};\n\nconst realSizePlugin = (\n store: DimensionStore,\n): PluginSubscribe<DimensionSettingsState> => {\n return {\n set(k) {\n switch (k) {\n case 'count':\n case 'sizes':\n case 'originItemSize':\n let realSize = 0;\n const count = store.store.get('count');\n for (let i = 0; i < count; i++) {\n realSize +=\n store.store.get('sizes')[i] || store.store.get('originItemSize');\n }\n store.setStore({ realSize });\n }\n },\n };\n};\n\nfunction initialBase(): DimensionCalc {\n return {\n indexes: [],\n count: 0,\n\n // plugin support\n trimmed: {},\n\n // size operations, this provider stores only changed sizes, not all of them\n // same as indexes but for sizes and positions\n // item index to size\n sizes: {},\n // order in indexes[] to coordinate\n positionIndexToItem: {},\n // initial element to coordinate ^\n indexToItem: {},\n positionIndexes: [],\n };\n}\n\nfunction initialState(): DimensionSettingsState {\n return {\n ...initialBase(),\n // size which all items can take\n realSize: 0,\n\n // initial item size if it wasn't changed\n originItemSize: 0,\n };\n}\n\nexport class DimensionStore {\n readonly store: Observable<DimensionSettingsState>;\n constructor() {\n this.store = createStore(initialState());\n this.store.use(trimmedPlugin(this));\n this.store.use(realSizePlugin(this));\n }\n\n getCurrentState(): DimensionSettingsState {\n const state = initialState();\n const keys = Object.keys(state);\n return reduce(\n keys,\n (r: DimensionSettingsState, k: Item) => {\n const data = this.store.get(k);\n r[k] = data as never;\n return r;\n },\n state,\n );\n }\n\n dispose() {\n setStore(this.store, initialState());\n }\n\n setStore<T extends Record<string, any>>(data: Partial<T>) {\n setStore(this.store, data);\n }\n\n drop() {\n setStore(this.store, initialBase());\n }\n\n /**\n * Set custom dimension sizes and overwrite old\n * Generates new indexes based on sizes\n * @param sizes - sizes to set\n */\n setDimensionSize(sizes: ViewSettingSizeProp) {\n const dimensionData = calculateDimensionData(\n this.store.get('originItemSize'),\n sizes,\n );\n setStore(this.store, dimensionData);\n }\n}\n","import type { DimensionCols, DimensionRows } from '@type';\n\nexport * from './dataSource';\nexport * from './dimension';\nexport * from './selection';\nexport * from './vp';\n\nexport const rowTypes: DimensionRows[] = ['rowPinStart', 'rgRow', 'rowPinEnd'];\nexport const columnTypes: DimensionCols[] = [\n 'colPinStart',\n 'rgCol',\n 'colPinEnd',\n];\n\nexport function isRowType(type: DimensionRows | any): type is DimensionRows {\n return rowTypes.indexOf(type) > -1;\n}\n","import { h } from '@stencil/core';\nimport { PluginProviders, PluginBaseComponent } from '..';\n\ntype WatchConfig = { immediate: boolean };\n\n/**\n * Base layer for plugins\n * Provide minimal starting core for plugins to work\n * Extend this class to create plugin\n */\nexport class BasePlugin implements PluginBaseComponent {\n readonly h = h;\n readonly subscriptions: Record<string, (...args: any[]) => void> = {};\n constructor(public revogrid: HTMLRevoGridElement, public providers: PluginProviders) {}\n /**\n *\n * @param eventName - event name to subscribe to in revo-grid component (e.g. 'beforeheaderclick')\n * @param callback - callback function for event\n */\n addEventListener(\n eventName: string,\n callback: (e: CustomEvent) => void,\n ) {\n this.revogrid.addEventListener(eventName, callback);\n this.subscriptions[eventName] = callback;\n }\n\n /**\n * Subscribe to property change in revo-grid component\n * You can return false in callback to prevent default value set\n *\n * @param prop - property name\n * @param callback - callback function\n * @param immediate - trigger callback immediately with current value\n */\n watch<T extends any>(\n prop: string,\n callback: (arg: T) => boolean | void,\n { immediate }: Partial<WatchConfig> = { immediate: false },\n ) {\n const nativeValueDesc =\n Object.getOwnPropertyDescriptor(this.revogrid, prop) ||\n Object.getOwnPropertyDescriptor(this.revogrid.constructor.prototype, prop);\n\n // Overwrite property descriptor for this instance\n Object.defineProperty(this.revogrid, prop, {\n set(val: T) {\n const keepDefault = callback(val);\n if (keepDefault === false) {\n return;\n }\n // Continue with native behavior\n return nativeValueDesc?.set?.call(this, val);\n },\n get() {\n // Continue with native behavior\n return nativeValueDesc?.get?.call(this);\n },\n });\n if (immediate) {\n callback(nativeValueDesc?.value);\n }\n }\n\n /**\n * Remove event listener\n * @param eventName\n */\n removeEventListener(eventName: string) {\n this.revogrid.removeEventListener(eventName, this.subscriptions[eventName]);\n delete this.subscriptions[eventName];\n }\n\n /**\n * Emit event from revo-grid component\n * Event can be cancelled by calling event.preventDefault() in callback\n */\n emit<T = any>(eventName: string, detail?: T) {\n const event = new CustomEvent<T>(eventName, { detail, cancelable: true });\n this.revogrid.dispatchEvent(event);\n return event;\n }\n\n /**\n * Clear all subscriptions\n */\n clearSubscriptions() {\n for (let type in this.subscriptions) {\n this.removeEventListener(type);\n }\n }\n\n /**\n * Destroy plugin and clear all subscriptions\n */\n destroy() {\n this.clearSubscriptions();\n }\n}\n"],"mappings":";;;uJAuBA,MAAMA,EACJC,IAEA,IAAIC,EAA+C,GAEnD,MAAMC,EAAa,CACjBC,EACAC,KAEA,MAAMC,EAAOC,OAAAC,OAAA,GAAQJ,GACrBF,EAAc,GACdO,EAAKJ,GAAS,CAACK,EAAGC,KAChB,GAAID,GAAKJ,EAAQK,GAAQ,CACvBT,EAAYS,GAASL,EAAQK,UACtBL,EAAQK,E,KAGnBV,EAAMW,iBAAiBN,EAAQ,EAEjC,MAAO,CACL,GAAAO,CAAIC,EAAKC,GACP,OAAQD,GACN,IAAK,UACH,MAAME,EAAOD,EACb,MAAMX,EAAQH,EAAMA,MAAMgB,IAAI,SAE9Bd,EAAUI,OAAAC,OAAAD,OAAAC,OAAA,GAAMJ,GAAUF,GAAec,GACzC,M,EAGP,EAGH,MAAME,EACJjB,IAEO,CACL,GAAAY,CAAIM,GACF,OAAQA,GACN,IAAK,QACL,IAAK,QACL,IAAK,iBACH,IAAIC,EAAW,EACf,MAAMC,EAAQpB,EAAMA,MAAMgB,IAAI,SAC9B,IAAK,IAAIK,EAAI,EAAGA,EAAID,EAAOC,IAAK,CAC9BF,GACEnB,EAAMA,MAAMgB,IAAI,SAASK,IAAMrB,EAAMA,MAAMgB,IAAI,iB,CAEnDhB,EAAMsB,SAAS,CAAEH,a,IAM3B,SAASI,IACP,MAAO,CACLC,QAAS,GACTJ,MAAO,EAGPhB,QAAS,GAKTD,MAAO,GAEPsB,oBAAqB,GAErBC,YAAa,GACbC,gBAAiB,GAErB,CAEA,SAASC,IACP,OAAAtB,OAAAC,OAAAD,OAAAC,OAAA,GACKgB,KAAa,CAEhBJ,SAAU,EAGVU,eAAgB,GAEpB,C,MAEaC,EAEX,WAAAC,GACEC,KAAKhC,MAAQiC,EAAYL,KACzBI,KAAKh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AL,IAAe,MAAfA,SAAe,SAAfA,EAAiBjD,OAAG,MAAAsD,SAAA,SAAAA,EAAEC,KAAKnC,KAAMlB,E,EAE1C,GAAAE,G,MAEE,OAAOkD,EAAAL,IAAe,MAAfA,SAAe,SAAfA,EAAiB7C,OAAG,MAAAkD,SAAA,SAAAA,EAAEC,KAAKnC,K,IAGtC,GAAI4B,EAAW,CACbH,EAASI,IAAe,MAAfA,SAAe,SAAfA,EAAiBO,M,EAQ9B,mBAAAC,CAAoBb,GAClBxB,KAAKmB,SAASkB,oBAAoBb,EAAWxB,KAAKsB,cAAcE,WACzDxB,KAAKsB,cAAcE,E,CAO5B,IAAAc,CAAcd,EAAmBe,GAC/B,MAAMC,EAAQ,IAAIC,YAAejB,EAAW,CAAEe,SAAQG,WAAY,OAClE1C,KAAKmB,SAASwB,cAAcH,GAC5B,OAAOA,C,CAMT,kBAAAI,GACE,IAAK,IAAI5B,KAAQhB,KAAKsB,cAAe,CACnCtB,KAAKqC,oBAAoBrB,E,EAO7B,OAAA6B,GACE7C,KAAK4C,oB","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built by Revolist OU ❤️
|
|
3
3
|
*/
|
|
4
|
-
export{B as BasePlugin,D as DimensionStore,c as columnTypes,i as isRowType,r as rowTypes}from"./base.plugin-
|
|
4
|
+
export{B as BasePlugin,D as DimensionStore,c as columnTypes,i as isRowType,r as rowTypes}from"./base.plugin-be5554eb.js";export{d as dispatch,a as dispatchByEvent}from"./dispatcher-ea08404f.js";export{D as DataStore,h as calculateDimensionData,f as gatherTrimmedItems,j as getItemByIndex,i as getItemByPosition,g as getPhysical,b as getSourceItem,e as getSourceItemVirtualIndexByProp,a as getVisibleSourceItem,p as proxyPlugin,d as setItems,c as setSourceByPhysicalIndex,s as setSourceByVirtualIndex,k as setStore,t as trimmedPlugin}from"./dimension.helpers-beca689b.js";export{h}from"./index-8b791a74.js";export{S as SelectionStore,c as cropCellToMax,g as getRange,i as isHiddenStore,a as isRangeSingleCell,n as nextCell}from"./selection.helpers-7ab1d0f9.js";export{V as ViewportStore,a as addMissingItems,d as getFirstItem,b as getItems,e as getLastItem,g as getUpdatedItemsByPosition,i as isActiveRange,c as isActiveRangeOutsideLastItem,r as recombineByOffset,s as setItemSizes,u as updateMissingAndRange}from"./viewport.store-3ff983a5.js";import"./toNumber-8de324a7.js";
|
|
5
5
|
//# sourceMappingURL=index.esm.js.map
|