@revolist/revogrid 4.3.0-next.2 → 4.3.0-next.20
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/custom-element/columnService.js +2 -2
- package/custom-element/columnService.js.map +1 -1
- package/custom-element/index.d.ts +12 -16
- package/custom-element/index.js +39 -14
- package/custom-element/index.js.map +1 -1
- package/custom-element/revo-grid.js +29 -21
- package/custom-element/revo-grid.js.map +1 -1
- package/custom-element/revogr-data2.js +5 -2
- package/custom-element/revogr-data2.js.map +1 -1
- package/custom-element/revogr-header2.js +12 -10
- package/custom-element/revogr-header2.js.map +1 -1
- package/custom-element/revogr-overlay-selection2.js +50 -41
- package/custom-element/revogr-overlay-selection2.js.map +1 -1
- package/custom-element/revogr-row-headers2.js +63 -35
- package/custom-element/revogr-row-headers2.js.map +1 -1
- package/custom-element/revogr-temp-range2.js.map +1 -1
- package/custom-element/selection.utils.js +24 -24
- package/custom-element/selection.utils.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.js +1 -1
- package/dist/cjs/revo-grid_11.cjs.entry.js +174 -126
- package/dist/cjs/revo-grid_11.cjs.entry.js.map +1 -1
- package/dist/collection/components/data/columnService.d.ts +1 -1
- package/dist/collection/components/data/columnService.js +2 -2
- package/dist/collection/components/data/columnService.js.map +1 -1
- package/dist/collection/components/data/revogr-data.d.ts +15 -0
- package/dist/collection/components/data/revogr-data.js +28 -5
- package/dist/collection/components/data/revogr-data.js.map +1 -1
- package/dist/collection/components/header/headerCellRenderer.d.ts +3 -2
- package/dist/collection/components/header/headerCellRenderer.js +2 -2
- package/dist/collection/components/header/headerCellRenderer.js.map +1 -1
- package/dist/collection/components/header/headerRenderer.d.ts +1 -0
- package/dist/collection/components/header/headerRenderer.js +1 -1
- package/dist/collection/components/header/headerRenderer.js.map +1 -1
- package/dist/collection/components/header/revogr-header.d.ts +1 -0
- package/dist/collection/components/header/revogr-header.js +21 -2
- package/dist/collection/components/header/revogr-header.js.map +1 -1
- package/dist/collection/components/overlay/autofill.service.d.ts +5 -1
- package/dist/collection/components/overlay/autofill.service.js +26 -26
- package/dist/collection/components/overlay/autofill.service.js.map +1 -1
- package/dist/collection/components/overlay/revogr-overlay-selection.d.ts +28 -7
- package/dist/collection/components/overlay/revogr-overlay-selection.js +34 -22
- package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
- package/dist/collection/components/overlay/selection.utils.d.ts +0 -3
- package/dist/collection/components/overlay/selection.utils.js +23 -23
- package/dist/collection/components/overlay/selection.utils.js.map +1 -1
- package/dist/collection/components/revoGrid/revo-grid-style.css +3 -0
- package/dist/collection/components/revoGrid/revo-grid.d.ts +3 -2
- package/dist/collection/components/revoGrid/revo-grid.js +27 -8
- package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.section.d.ts +2 -1
- package/dist/collection/components/revoGrid/viewport.section.js +3 -3
- package/dist/collection/components/revoGrid/viewport.section.js.map +1 -1
- package/dist/collection/components/rowHeaders/revogr-row-headers.d.ts +2 -0
- package/dist/collection/components/rowHeaders/revogr-row-headers.js +18 -0
- package/dist/collection/components/rowHeaders/revogr-row-headers.js.map +1 -1
- package/dist/collection/components/selectionTempRange/revogr-temp-range.d.ts +12 -1
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js +6 -3
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -1
- package/dist/collection/components.d.ts +108 -8
- package/dist/collection/interfaces.d.ts +2 -4
- package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.d.ts +2 -1
- package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js +2 -2
- package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js.map +1 -1
- package/dist/collection/plugins/groupingColumn/headerGroupRenderer.d.ts +1 -0
- package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js +1 -1
- package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js.map +1 -1
- package/dist/collection/plugins/moveColumn/columnDragPlugin.js +2 -1
- package/dist/collection/plugins/moveColumn/columnDragPlugin.js.map +1 -1
- package/dist/collection/plugins/moveColumn/columnOrderHandler.d.ts +3 -2
- package/dist/collection/plugins/moveColumn/columnOrderHandler.js +5 -2
- package/dist/collection/plugins/moveColumn/columnOrderHandler.js.map +1 -1
- package/dist/collection/services/dimension.provider.d.ts +2 -2
- package/dist/collection/services/dimension.provider.js +4 -4
- package/dist/collection/services/dimension.provider.js.map +1 -1
- package/dist/collection/services/resizable.directive.js +1 -1
- package/dist/collection/services/resizable.directive.js.map +1 -1
- package/dist/collection/store/viewPort/viewport.helpers.d.ts +12 -3
- package/dist/collection/store/viewPort/viewport.helpers.js +32 -23
- package/dist/collection/store/viewPort/viewport.helpers.js.map +1 -1
- package/dist/collection/store/viewPort/viewport.store.d.ts +5 -1
- package/dist/collection/store/viewPort/viewport.store.js +29 -12
- package/dist/collection/store/viewPort/viewport.store.js.map +1 -1
- package/dist/collection/utils/events.d.ts +1 -0
- package/dist/collection/utils/events.js +13 -0
- package/dist/collection/utils/events.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/revo-grid.js +1 -1
- package/dist/esm/revo-grid_11.entry.js +174 -126
- package/dist/esm/revo-grid_11.entry.js.map +1 -1
- package/dist/revo-grid/revo-grid.esm.js +1 -1
- package/dist/revo-grid/revo-grid.esm.js.map +1 -1
- package/dist/revo-grid/revo-grid_11.entry.js +1 -1
- package/dist/revo-grid/revo-grid_11.entry.js.map +1 -1
- package/dist/types/components/data/columnService.d.ts +1 -1
- package/dist/types/components/data/revogr-data.d.ts +15 -0
- package/dist/types/components/header/headerCellRenderer.d.ts +3 -2
- package/dist/types/components/header/headerRenderer.d.ts +1 -0
- package/dist/types/components/header/revogr-header.d.ts +1 -0
- package/dist/types/components/overlay/autofill.service.d.ts +5 -1
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +28 -7
- package/dist/types/components/overlay/selection.utils.d.ts +0 -3
- package/dist/types/components/revoGrid/revo-grid.d.ts +3 -2
- package/dist/types/components/revoGrid/viewport.section.d.ts +2 -1
- package/dist/types/components/rowHeaders/revogr-row-headers.d.ts +2 -0
- package/dist/types/components/selectionTempRange/revogr-temp-range.d.ts +12 -1
- package/dist/types/components.d.ts +108 -8
- package/dist/types/interfaces.d.ts +2 -4
- package/dist/types/plugins/groupingColumn/columnGroupsRenderer.d.ts +2 -1
- package/dist/types/plugins/groupingColumn/headerGroupRenderer.d.ts +1 -0
- package/dist/types/plugins/moveColumn/columnOrderHandler.d.ts +3 -2
- package/dist/types/services/dimension.provider.d.ts +2 -2
- package/dist/types/store/viewPort/viewport.helpers.d.ts +12 -3
- package/dist/types/store/viewPort/viewport.store.d.ts +5 -1
- package/dist/types/utils/events.d.ts +1 -0
- package/package.json +6 -6
- package/dist/loader/cdn.js +0 -5
- package/dist/loader/index.cjs.js +0 -5
- package/dist/loader/index.d.ts +0 -21
- package/dist/loader/index.es2017.js +0 -5
- package/dist/loader/index.js +0 -6
- package/dist/loader/package.json +0 -11
|
@@ -584,11 +584,11 @@ class ColumnService {
|
|
|
584
584
|
}
|
|
585
585
|
return props;
|
|
586
586
|
}
|
|
587
|
-
customRenderer(
|
|
587
|
+
customRenderer(c, model, providers, additionalData) {
|
|
588
588
|
var _a;
|
|
589
589
|
const tpl = (_a = this.columns[c]) === null || _a === void 0 ? void 0 : _a.cellTemplate;
|
|
590
590
|
if (tpl) {
|
|
591
|
-
return tpl(h, Object.assign(Object.assign({}, model), { providers }));
|
|
591
|
+
return tpl(h, Object.assign(Object.assign({}, model), { providers }), additionalData);
|
|
592
592
|
}
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"columnService.js","mappings":";;;;;;;;MAEa,WAAW,GAAG,GAAG,cAAc,SAAS;MACxC,iBAAiB,GAAG,GAAG,cAAc,QAAQ;MAC7C,oBAAoB,GAAG,GAAG,cAAc,MAAM;MAC9C,uB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0B,EAAE,CAAC;MACxC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;;MAGhB,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;QACtB,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;;QAGrC,IAAI,CAAC,IAAI,EAAE;UACT,SAAS;SACV;QACD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChB,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;OACxB;MAED,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACpB;IACD,OAAO;MACL,IAAI,EAAE,MAAM;MACZ,OAAO;KACR,CAAC;GACH;EAED,OAAO,OAAO,CAAC,GAAS;IACtB,IAAI,OAAO,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,IAAI,EAAE;MAC9C,OAAO,EAAE,CAAC;KACX;IACD,OAAO,GAAG,CAAC;GACZ;EAED,OAAO;IACL,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;GACpC;;;;;","names":["slice"],"sources":["./src/plugins/groupingRow/grouping.const.ts","./src/plugins/groupingRow/grouping.service.ts","./src/store/selection/selection.helpers.ts","./src/store/selection/selection.store.ts","./src/services/selection.store.connector.ts","./src/components/data/columnService.ts"],"sourcesContent":["import { GRID_INTERNALS } from '../../utils/consts';\n\nexport const GROUP_DEPTH = `${GRID_INTERNALS}-depth`;\nexport const PSEUDO_GROUP_ITEM = `${GRID_INTERNALS}-name`;\nexport const PSEUDO_GROUP_ITEM_ID = `${GRID_INTERNALS}-id`;\nexport const PSEUDO_GROUP_ITEM_VALUE = `${GRID_INTERNALS}-value`;\nexport const PSEUDO_GROUP_COLUMN = `${GRID_INTERNALS}-column`;\nexport const GROUP_EXPANDED = `${GRID_INTERNALS}-expanded`;\nexport const GROUP_ORIGINAL_INDEX = `${GRID_INTERNALS}-original-index`;\nexport const GROUP_EXPAND_BTN = `group-expand`;\nexport const GROUP_EXPAND_EVENT = `groupExpandClick`;\nexport const GROUPING_ROW_TYPE = 'rgRow';\n","import { RevoGrid } from '../../interfaces';\nimport {\n GROUP_DEPTH,\n GROUP_EXPANDED,\n PSEUDO_GROUP_COLUMN,\n PSEUDO_GROUP_ITEM,\n PSEUDO_GROUP_ITEM_ID,\n PSEUDO_GROUP_ITEM_VALUE,\n GROUP_ORIGINAL_INDEX,\n } from './grouping.const';\nimport { GroupLabelTemplateFunc } from './grouping.row.types';\n\nexport type ExpandedOptions = {\n prevExpanded?: Record<string, boolean>;\n expandedAll?: boolean; // skip trim\n groupLabelTemplate?: GroupLabelTemplateFunc;\n};\n\ntype GroupedData = Map<string, GroupedData | RevoGrid.DataType[]>\n\n\n/**\n * Gather data for grouping\n * @param array - flat data array\n * @param groupIds - ids of groups\n * @param expanded - potentially expanded items if present\n */\nexport function gatherGrouping(array: RevoGrid.DataType[], groupIds: RevoGrid.ColumnProp[], { prevExpanded, expandedAll }: ExpandedOptions) {\n const groupedItems: GroupedData = new Map();\n array.forEach((item, originalIndex) => {\n const groupLevelValues = groupIds.map((groupId) => item[groupId] || null);\n const lastLevelValue = groupLevelValues.pop();\n let currentGroupLevel = groupedItems;\n groupLevelValues.forEach((value) => {\n if (!currentGroupLevel.has(value)) {\n currentGroupLevel.set(value, new Map());\n }\n currentGroupLevel = currentGroupLevel.get(value) as GroupedData;\n })\n if (!currentGroupLevel.has(lastLevelValue)) {\n currentGroupLevel.set(lastLevelValue, []);\n }\n item[GROUP_ORIGINAL_INDEX] = originalIndex;\n const lastLevelItems = currentGroupLevel.get(lastLevelValue) as RevoGrid.DataType[];\n lastLevelItems.push(item);\n });\n\n let itemIndex = -1;\n const groupingDepth = groupIds.length;\n // collapse all groups in the beginning\n const trimmed: Record<number, boolean> = {};\n // index mapping\n const oldNewIndexMap: Record<number, number> = {};\n // check if group header exists\n const pseudoGroupTest: Record<string, number[]> = {};\n const sourceWithGroups: RevoGrid.DataType[] = [];\n function flattenGroupMaps(groupedValues: GroupedData, parentIds: string[], isExpanded: boolean) {\n const depth = parentIds.length;\n groupedValues.forEach((innerGroupedValues, groupId) => {\n const levelIds = [...parentIds, groupId];\n const mergedIds = levelIds.join(',');\n const isGroupExpanded = isExpanded && (!!expandedAll || !!prevExpanded?.[mergedIds]);\n sourceWithGroups.push({\n [PSEUDO_GROUP_ITEM]: groupId,\n [GROUP_DEPTH]: depth,\n [PSEUDO_GROUP_ITEM_ID]: JSON.stringify(levelIds),\n [PSEUDO_GROUP_ITEM_VALUE]: mergedIds,\n [GROUP_EXPANDED]: isGroupExpanded,\n });\n itemIndex += 1;\n if (!isGroupExpanded && depth) {\n trimmed[itemIndex] = true;\n }\n if (Array.isArray(innerGroupedValues)) {\n innerGroupedValues.forEach((value) => {\n itemIndex += 1;\n if (!isGroupExpanded) {\n trimmed[itemIndex] = true;\n }\n oldNewIndexMap[value[GROUP_ORIGINAL_INDEX]] = itemIndex;\n const pseudoGroupTestIds = levelIds.map((_value, index) => levelIds.slice(0, index + 1).join(','));\n pseudoGroupTestIds.forEach((pseudoGroupTestId) => {\n if (!pseudoGroupTest[pseudoGroupTestId]) {\n pseudoGroupTest[pseudoGroupTestId] = [];\n }\n pseudoGroupTest[pseudoGroupTestId].push(itemIndex);\n });\n });\n sourceWithGroups.push(...innerGroupedValues);\n } else {\n flattenGroupMaps(innerGroupedValues, levelIds, isGroupExpanded);\n }\n });\n }\n flattenGroupMaps(groupedItems, [], true);\n\n return {\n sourceWithGroups, // updates source mirror\n depth: groupingDepth, // largest depth for grouping\n trimmed, // used for expand/collapse grouping values\n oldNewIndexMap, // used for mapping old values to new\n childrenByGroup: pseudoGroupTest, // used to get child items in group\n };\n}\n\nexport function getGroupingName(rgRow?: RevoGrid.DataType) {\n return rgRow && rgRow[PSEUDO_GROUP_ITEM];\n}\n\nexport function isGrouping(rgRow?: RevoGrid.DataType) {\n return rgRow && typeof rgRow[PSEUDO_GROUP_ITEM] !== 'undefined';\n}\n\nexport function isGroupingColumn(column?: RevoGrid.ColumnRegular) {\n return column && typeof column[PSEUDO_GROUP_COLUMN] !== 'undefined';\n}\n\nexport function measureEqualDepth<T>(groupA: T[], groupB: T[]) {\n const ln = groupA.length;\n let i = 0;\n for (; i < ln; i++) {\n if (groupA[i] !== groupB[i]) {\n return i;\n }\n }\n return i;\n}\n\nexport function getParsedGroup(id: string): any[] {\n const parseGroup = JSON.parse(id);\n // extra precaution and type safe guard\n if (!Array.isArray(parseGroup)) {\n return null;\n }\n return parseGroup;\n}\n\n// check if items is child of current clicked group\nexport function isSameGroup(currentGroup: any[], currentModel: RevoGrid.DataType, nextModel: RevoGrid.DataType) {\n const nextGroup = getParsedGroup(nextModel[PSEUDO_GROUP_ITEM_ID]);\n if (!nextGroup) {\n return false;\n }\n\n const depth = measureEqualDepth(currentGroup, nextGroup);\n return currentModel[GROUP_DEPTH] < depth;\n}\n","import { Selection } from '../../interfaces';\nimport { EMPTY_INDEX } from '../../services/selection.store.connector';\nimport Cell = Selection.Cell;\nimport RangeArea = Selection.RangeArea;\n\nexport function isHiddenStore(pos: number) {\n return pos === EMPTY_INDEX;\n}\n\nexport function nextCell(cell: Cell, lastCell: Cell): Partial<Cell> | null {\n const nextItem: Partial<Cell> = {};\n let types: (keyof Cell)[] = ['x', 'y'];\n\n // previous item check\n for (let t of types) {\n if (cell[t] < 0) {\n nextItem[t] = cell[t];\n return nextItem;\n }\n }\n // next item check\n for (let t of types) {\n if (cell[t] >= lastCell[t]) {\n nextItem[t] = cell[t] - lastCell[t];\n return nextItem;\n }\n }\n return null;\n}\n\nexport function cropCellToMax(cell: Cell, lastCell: Cell): Cell {\n const newCell: Cell = { ...cell };\n let types: (keyof Cell)[] = ['x', 'y'];\n // previous item check\n for (let t of types) {\n if (cell[t] < 0) {\n newCell[t] = 0;\n }\n }\n // next item check\n for (let t of types) {\n if (cell[t] >= lastCell[t]) {\n newCell[t] = lastCell[t] - 1;\n }\n }\n return newCell;\n}\n\nexport function getRange(start?: Cell, end?: Cell): RangeArea | null {\n return start && end\n ? {\n x: Math.min(start.x, end.x),\n y: Math.min(start.y, end.y),\n x1: Math.max(start.x, end.x),\n y1: Math.max(start.y, end.y),\n }\n : null;\n}\n\nexport function isRangeSingleCell(a: RangeArea): boolean {\n return a.x === a.x1 && a.y === a.y1;\n}\n","import { createStore } from '@stencil/store';\nimport { Observable, Selection } from '../../interfaces';\nimport { setStore } from '../../utils/store.utils';\nimport { getRange } from './selection.helpers';\n\ntype StoreState = Selection.SelectionStoreState;\n\nfunction defaultState(): StoreState {\n return {\n range: null,\n tempRange: null,\n tempRangeType: null,\n focus: null,\n edit: null,\n lastCell: null,\n };\n}\n\nexport class SelectionStore {\n readonly store: Observable<Selection.SelectionStoreState>;\n private unsubscribe: { (): void }[] = [];\n constructor() {\n this.store = createStore(defaultState());\n this.store.on('set', (key, newVal) => {\n if (key === 'tempRange' && !newVal) {\n this.store.set('tempRangeType', null);\n }\n });\n }\n\n onChange<Key extends keyof StoreState>(propName: Key, cb: (newValue: StoreState[Key]) => void) {\n this.unsubscribe.push(this.store.onChange(propName, cb));\n }\n\n clearFocus() {\n setStore(this.store, { focus: null, range: null, edit: null, tempRange: null });\n }\n\n setFocus(focus: Selection.Cell, end?: Selection.Cell) {\n if (!end) {\n setStore(this.store, { focus });\n } else {\n setStore(this.store, {\n focus,\n range: getRange(focus, end),\n edit: null,\n tempRange: null,\n });\n }\n }\n\n setTempArea(range: Selection.TempRange | null) {\n setStore(this.store, { tempRange: range?.area, tempRangeType: range?.type, edit: null });\n }\n\n clearTemp() {\n setStore(this.store, { tempRange: null });\n }\n\n /** Can be applied from selection change or from simple keyboard change clicks */\n setRangeArea(range: Selection.RangeArea) {\n setStore(this.store, { range, edit: null, tempRange: null });\n }\n setRange(start: Selection.Cell, end: Selection.Cell) {\n this.setRangeArea(getRange(start, end));\n }\n\n setLastCell(lastCell: Selection.Cell) {\n setStore(this.store, { lastCell });\n }\n\n setEdit(val: string | boolean) {\n const focus = this.store.get('focus');\n if (focus && typeof val === 'string') {\n setStore(this.store, {\n edit: { x: focus.x, y: focus.y, val },\n });\n return;\n }\n setStore(this.store, { edit: null });\n }\n\n dispose() {\n this.unsubscribe.forEach(f => f());\n this.store.dispose();\n }\n}\n","import { Edition, Selection, RevoGrid } from '../interfaces';\nimport { cropCellToMax, isHiddenStore, nextCell } from '../store/selection/selection.helpers';\nimport { SelectionStore } from '../store/selection/selection.store';\n\nimport Cell = Selection.Cell;\nimport EditCellStore = Edition.EditCellStore;\n\ntype StoreByDimension = Record<number, SelectionStore>;\ntype FocusedStore = {\n entity: SelectionStore;\n cell: Selection.Cell;\n position: Selection.Cell;\n};\n\ntype StoresMapping<T> = { [xOrY: number]: Partial<T> };\n\nexport const EMPTY_INDEX = -1;\n\nexport default class SelectionStoreConnector {\n // dirty flag required to cleanup whole store in case visibility of panels changed\n private dirty = false;\n readonly stores: { [y: number]: { [x: number]: SelectionStore } } = {};\n\n readonly columnStores: StoreByDimension = {};\n readonly rowStores: { [y: number]: SelectionStore } = {};\n\n /**\n * Helpers for data conversion\n */\n readonly storesByType: Partial<Record<RevoGrid.MultiDimensionType, number>> = {};\n readonly storesXToType: StoresMapping<RevoGrid.DimensionCols> = {};\n readonly storesYToType: StoresMapping<RevoGrid.DimensionRows> = {};\n\n get focusedStore(): FocusedStore | null {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const focused = this.stores[y][x]?.store.get('focus');\n if (focused) {\n return {\n entity: this.stores[y][x],\n cell: focused,\n position: {\n x: parseInt(x, 10),\n y: parseInt(y, 10),\n },\n };\n }\n }\n }\n return null;\n }\n\n get edit(): EditCellStore | undefined {\n return this.focusedStore?.entity.store.get('edit');\n }\n\n get focused(): Cell | undefined {\n return this.focusedStore?.entity.store.get('focus');\n }\n\n get selectedRange(): Selection.RangeArea | undefined {\n return this.focusedStore?.entity.store.get('range');\n }\n\n private readonly sections: Element[] = [];\n\n registerSection(e?: Element) {\n if (!e) {\n this.sections.length = 0;\n // some elements removed, rebuild stores\n this.dirty = true;\n return;\n }\n if (this.sections.indexOf(e) === -1) {\n this.sections.push(e);\n }\n }\n\n // check if require to cleanup all stores\n beforeUpdate() {\n if (this.dirty) {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n this.stores[y][x].dispose();\n }\n }\n this.dirty = false;\n }\n }\n\n registerColumn(x: number, type: RevoGrid.DimensionCols): SelectionStore {\n\n // if hidden just create store but no operations needed\n if (isHiddenStore(x)) {\n return new SelectionStore();\n }\n if (this.columnStores[x]) {\n return this.columnStores[x];\n }\n this.columnStores[x] = new SelectionStore();\n // build cross linking type to position\n this.storesByType[type] = x;\n this.storesXToType[x] = type;\n return this.columnStores[x];\n }\n\n registerRow(y: number, type: RevoGrid.DimensionRows): SelectionStore {\n // if hidden just create store\n if (isHiddenStore(y)) {\n return new SelectionStore();\n }\n if (this.rowStores[y]) {\n return this.rowStores[y];\n }\n this.rowStores[y] = new SelectionStore();\n // build cross linking type to position\n this.storesByType[type] = y;\n this.storesYToType[y] = type;\n return this.rowStores[y];\n }\n\n /**\n * Cross store proxy, based on multiple dimensions\n */\n register({ x, y }: Selection.Cell): SelectionStore {\n // if hidden just create store\n if (isHiddenStore(x) || isHiddenStore(y)) {\n return new SelectionStore();\n }\n if (!this.stores[y]) {\n this.stores[y] = {};\n }\n if (this.stores[y][x]) {\n // Store already registered. Do not register twice\n return this.stores[y][x];\n }\n this.stores[y][x] = new SelectionStore();\n // proxy update, column store trigger only range area\n this.stores[y][x]?.onChange('range', c => {\n this.columnStores[x].setRangeArea(c);\n this.rowStores[y].setRangeArea(c);\n });\n // clean up on remove\n this.stores[y][x]?.store.on('dispose', () => this.destroy(x, y));\n return this.stores[y][x];\n }\n\n private destroy(x: number, y: number) {\n this.columnStores[x]?.dispose();\n this.rowStores[y]?.dispose();\n\n delete this.rowStores[y];\n delete this.columnStores[x];\n // clear x cross link\n if (this.storesXToType[x]) {\n const type = this.storesXToType[x];\n delete this.storesXToType[x];\n delete this.storesByType[type];\n }\n // clear y cross link\n if (this.storesYToType[y]) {\n const type = this.storesYToType[y];\n delete this.storesYToType[y];\n delete this.storesByType[type];\n }\n if (this.stores[y]) {\n delete this.stores[y][x];\n }\n // clear empty rows\n if (!Object.keys(this.stores[y] || {}).length) {\n delete this.stores[y];\n }\n }\n\n setEditByCell<T extends Selection.Cell>(storePos: T, editCell: T) {\n this.focusByCell(storePos, editCell, editCell);\n this.setEdit('');\n }\n\n focusByCell<T extends Selection.Cell>(storePos: T, start: T, end: T) {\n const store = this.stores[storePos.y][storePos.x];\n this.focus(store, { focus: start, end });\n }\n\n focus(store: SelectionStore, { focus, end }: { focus: Cell; end: Cell }) {\n let currentStorePointer: Selection.Cell;\n // clear all stores focus leave only active one\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const s = this.stores[y][x];\n // clear other stores, only one area can be selected\n if (s !== store) {\n s.clearFocus();\n } else {\n currentStorePointer = { x: parseInt(x, 10), y: parseInt(y, 10) };\n }\n }\n }\n if (!currentStorePointer) {\n return null;\n }\n\n // check is focus in next store\n const lastCell = store.store.get('lastCell');\n // item in new store\n const nextItem: Partial<Cell> | null = nextCell(focus, lastCell);\n\n let nextStore;\n if (nextItem) {\n for (let i in nextItem) {\n let type: keyof Cell = i as keyof Cell;\n let stores;\n switch (type) {\n case 'x':\n stores = this.getXStores(currentStorePointer.y);\n break;\n case 'y':\n stores = this.getYStores(currentStorePointer.x);\n break;\n }\n if (nextItem[type] >= 0) {\n nextStore = stores[++currentStorePointer[type]];\n } else {\n nextStore = stores[--currentStorePointer[type]];\n const nextLastCell = nextStore?.store.get('lastCell');\n if (nextLastCell) {\n nextItem[type] = nextLastCell[type] + nextItem[type];\n }\n }\n }\n }\n // if next store present - update\n if (nextStore) {\n let item = { ...focus, ...nextItem };\n this.focus(nextStore, { focus: item, end: item });\n return null;\n }\n\n focus = cropCellToMax(focus, lastCell);\n end = cropCellToMax(end, lastCell);\n\n store.setFocus(focus, end);\n return focus;\n }\n\n clearAll(): void {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n this.stores[y][x]?.clearFocus();\n }\n }\n }\n\n setEdit(val: string | boolean) {\n if (!this.focusedStore) {\n return;\n }\n this.focusedStore.entity.setEdit(val);\n }\n\n /**\n * Select all cells across all stores\n */\n selectAll() {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const store = this.stores[y][x];\n if (!store) {\n continue;\n }\n const lastCell = store.store.get('lastCell');\n store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });\n }\n }\n }\n\n private getXStores(y: number) {\n return this.stores[y];\n }\n\n private getYStores(x: number) {\n const stores: { [p: number]: SelectionStore } = {};\n for (let i in this.stores) {\n stores[i] = this.stores[i][x];\n }\n return stores;\n }\n}\n","import { h, VNode } from '@stencil/core';\nimport { DataSourceState, getSourceItem, getVisibleSourceItem, setSourceByVirtualIndex } from '../../store/dataSource/data.store';\nimport { CELL_CLASS, DISABLED_CLASS } from '../../utils/consts';\nimport { Edition, Observable, RevoGrid, Selection } from '../../interfaces';\nimport { getRange } from '../../store/selection/selection.helpers';\n\nimport { isGroupingColumn } from '../../plugins/groupingRow/grouping.service';\nimport { slice } from 'lodash';\n\nexport type ColumnSource = Observable<DataSourceState<RevoGrid.ColumnRegular, RevoGrid.DimensionCols>>;\nexport type RowSource = Observable<DataSourceState<RevoGrid.DataType, RevoGrid.DimensionRows>>;\n\nexport type ColumnStores = {\n [T in RevoGrid.DimensionCols]: ColumnSource;\n};\nexport type RowStores = {\n [T in RevoGrid.DimensionRows]: RowSource;\n};\n\nexport default class ColumnService {\n private unsubscribe: { (): void }[] = [];\n get columns(): RevoGrid.ColumnRegular[] {\n return getVisibleSourceItem(this.source);\n }\n\n hasGrouping = false;\n type: RevoGrid.DimensionCols;\n\n constructor(private dataStore: RowSource, private source: ColumnSource) {\n this.unsubscribe.push(source.onChange('source', s => this.checkGrouping(s)));\n this.checkGrouping(source.get('source'));\n this.type = source.get('type');\n }\n\n private checkGrouping(cols: RevoGrid.ColumnRegular[]) {\n for (let rgCol of cols) {\n if (isGroupingColumn(rgCol)) {\n this.hasGrouping = true;\n return;\n }\n this.hasGrouping = false;\n }\n }\n\n isReadOnly(r: number, c: number): boolean {\n const readOnly: RevoGrid.ReadOnlyFormat = this.columns[c]?.readonly;\n if (typeof readOnly === 'function') {\n const data = this.rowDataModel(r, c);\n return readOnly(data);\n }\n return readOnly;\n }\n\n static doMerge(existing: RevoGrid.CellProps, extra: RevoGrid.CellProps) {\n let props: RevoGrid.CellProps = { ...extra, ...existing };\n // extend existing props\n if (extra.class) {\n if (typeof extra.class === 'object' && typeof props.class === 'object') {\n props.class = { ...extra.class, ...props.class };\n } else if (typeof extra.class === 'string' && typeof props.class === 'object') {\n props.class[extra.class] = true;\n } else if (typeof props.class === 'string') {\n props.class += ' ' + extra.class;\n }\n }\n if (extra.style) {\n props.style = { ...extra.style, ...props.style };\n }\n return props;\n }\n\n mergeProperties(r: number, c: number, defaultProps: RevoGrid.CellProps): RevoGrid.CellProps {\n const cellClass: { [key: string]: boolean } = {\n [CELL_CLASS]: true,\n [DISABLED_CLASS]: this.isReadOnly(r, c),\n };\n let props: RevoGrid.CellProps = {\n ...defaultProps,\n class: cellClass,\n };\n const extraPropsFunc = this.columns[c]?.cellProperties;\n if (extraPropsFunc) {\n const data = this.rowDataModel(r, c);\n const extra = extraPropsFunc(data);\n if (!extra) {\n return props;\n }\n return ColumnService.doMerge(props, extra);\n }\n return props;\n }\n\n customRenderer(\n _: number, c: number, model: RevoGrid.ColumnDataSchemaModel, providers: RevoGrid.Providers): VNode | string | void {\n const tpl = this.columns[c]?.cellTemplate;\n if (tpl) {\n return tpl(h, { ...model, providers });\n }\n return;\n }\n\n getRowClass(r: number, prop: string): string {\n const model = getSourceItem(this.dataStore, r) || {};\n return model[prop] || '';\n }\n\n getCellData(r: number, c: number): string {\n const data = this.rowDataModel(r, c);\n return ColumnService.getData(data.model[data.prop as number]);\n }\n\n getSaveData(rowIndex: number, c: number, val?: string): Edition.BeforeSaveDataDetails {\n if (typeof val === 'undefined') {\n val = this.getCellData(rowIndex, c);\n }\n const data = this.rowDataModel(rowIndex, c);\n return {\n prop: data.prop,\n rowIndex,\n val,\n model: data.model,\n type: this.dataStore.get('type'),\n };\n }\n\n getCellEditor(_r: number, c: number, editors: Edition.Editors): Edition.EditorCtr | undefined {\n const editor = this.columns[c]?.editor;\n if (!editor) {\n return undefined;\n }\n // reference\n if (typeof editor === 'string') {\n return editors[editor];\n }\n return editor;\n }\n\n rowDataModel(rowIndex: number, c: number): RevoGrid.ColumnDataSchemaModel {\n const column = this.columns[c];\n const prop: RevoGrid.ColumnProp | undefined = column?.prop;\n const model = getSourceItem(this.dataStore, rowIndex) || {};\n return {\n prop,\n model,\n data: this.dataStore.get('source'),\n column,\n rowIndex,\n };\n }\n\n getRangeData(d: Selection.ChangedRange, columns: RevoGrid.ColumnRegular[]): {\n changed: RevoGrid.DataLookup,\n mapping: Selection.OldNewRangeMapping,\n } {\n const changed: RevoGrid.DataLookup = {};\n\n // get original length sizes\n const copyColLength = d.oldRange.x1 - d.oldRange.x + 1;\n const copyRowLength = d.oldRange.y1 - d.oldRange.y + 1;\n const mapping: Selection.OldNewRangeMapping = {};\n\n // rows\n for (let rowIndex = d.newRange.y, i = 0; rowIndex < d.newRange.y1 + 1; rowIndex++, i++) {\n // copy original data link\n const oldRowIndex = d.oldRange.y + i % copyRowLength;\n const copyRow = getSourceItem(this.dataStore, oldRowIndex) || {};\n\n // columns\n for (let colIndex = d.newRange.x, j = 0; colIndex < d.newRange.x1 + 1; colIndex++, j++) {\n // check if old range area\n if (rowIndex >= d.oldRange.y && rowIndex <= d.oldRange.y1 && colIndex >= d.oldRange.x && colIndex <= d.oldRange.x1) {\n continue;\n }\n\n // requested column beyond range\n if (!this.columns[colIndex]) {\n continue;\n }\n const prop = this.columns[colIndex]?.prop;\n const copyColIndex = d.oldRange.x + j % copyColLength;\n const copyColumnProp = columns[copyColIndex].prop;\n\n /** if can write */\n if (!this.isReadOnly(rowIndex, colIndex)) {\n /** to show before save */\n if (!changed[rowIndex]) {\n changed[rowIndex] = {};\n }\n changed[rowIndex][prop] = copyRow[copyColumnProp];\n /** Generate mapping object */\n if (!mapping[rowIndex]) {\n mapping[rowIndex] = {};\n }\n mapping[rowIndex][prop] = {\n colProp: copyColumnProp,\n rowIndex: oldRowIndex\n };\n }\n }\n }\n return {\n changed,\n mapping,\n };\n }\n\n getTransformedDataToApply(\n start: Selection.Cell,\n data: RevoGrid.DataFormat[][],\n ): {\n changed: RevoGrid.DataLookup;\n range: Selection.RangeArea;\n } {\n const changed: RevoGrid.DataLookup = {};\n const copyRowLength = data.length;\n const colLength = this.columns.length;\n const rowLength = this.dataStore.get('items').length;\n // rows\n let rowIndex = start.y;\n let maxCol = 0;\n for (let i = 0; rowIndex < rowLength && i < copyRowLength; rowIndex++, i++) {\n // copy original data link\n const copyRow = data[i % copyRowLength];\n const copyColLength = copyRow?.length || 0;\n // columns\n let colIndex = start.x;\n for (let j = 0; colIndex < colLength && j < copyColLength; colIndex++, j++) {\n const p = this.columns[colIndex].prop;\n const currentCol = j % colLength;\n\n /** if can write */\n if (!this.isReadOnly(rowIndex, colIndex)) {\n /** to show before save */\n if (!changed[rowIndex]) {\n changed[rowIndex] = {};\n }\n changed[rowIndex][p] = copyRow[currentCol];\n }\n }\n maxCol = Math.max(maxCol, colIndex - 1);\n }\n const range = getRange(start, {\n y: rowIndex - 1,\n x: maxCol,\n });\n return {\n changed,\n range,\n };\n }\n\n applyRangeData(data: RevoGrid.DataLookup) {\n const items: Record<number, RevoGrid.DataType> = {};\n for (let rowIndex in data) {\n const oldModel = (items[rowIndex] = getSourceItem(this.dataStore, parseInt(rowIndex, 10)));\n if (!oldModel) {\n continue;\n }\n for (let prop in data[rowIndex]) {\n oldModel[prop] = data[rowIndex][prop];\n }\n }\n setSourceByVirtualIndex(this.dataStore, items);\n }\n\n getRangeStaticData(d: Selection.RangeArea, value: RevoGrid.DataFormat): RevoGrid.DataLookup {\n const changed: RevoGrid.DataLookup = {};\n\n // rows\n for (let rowIndex = d.y, i = 0; rowIndex < d.y1 + 1; rowIndex++, i++) {\n // columns\n for (let colIndex = d.x, j = 0; colIndex < d.x1 + 1; colIndex++, j++) {\n // requested column beyond range\n if (!this.columns[colIndex]) {\n continue;\n }\n const p = this.columns[colIndex].prop;\n\n /** if can write */\n if (!this.isReadOnly(rowIndex, colIndex)) {\n /** to show before save */\n if (!changed[rowIndex]) {\n changed[rowIndex] = {};\n }\n changed[rowIndex][p] = value;\n }\n }\n }\n return changed;\n }\n\n getRangeTransformedToProps(\n d: Selection.RangeArea,\n store: Observable<DataSourceState<RevoGrid.DataType, RevoGrid.DimensionRows>>,\n ) {\n const area: {\n prop: RevoGrid.ColumnProp,\n rowIndex: number,\n model: RevoGrid.DataSource,\n type: RevoGrid.MultiDimensionType,\n }[] = [];\n\n const type = this.dataStore.get('type');\n // rows\n for (let rowIndex = d.y, i = 0; rowIndex < d.y1 + 1; rowIndex++, i++) {\n // columns\n for (let colIndex = d.x, j = 0; colIndex < d.x1 + 1; colIndex++, j++) {\n const prop = this.columns[colIndex]?.prop;\n area.push({\n prop,\n rowIndex,\n model: getSourceItem(store, rowIndex),\n type,\n });\n }\n }\n return area;\n }\n\n copyRangeArray(\n range: Selection.RangeArea,\n store: Observable<DataSourceState<RevoGrid.DataType, RevoGrid.DimensionRows>>,\n ) {\n const cols = [...this.columns];\n const props = slice(cols, range.x, range.x1 + 1).map(v => v.prop);\n const toCopy: RevoGrid.DataFormat[][] = [];\n const mapping: { [rowIndex: number]: { [colProp: RevoGrid.ColumnProp]: any } } = {};\n\n // rows indexes\n for (let i = range.y; i <= range.y1; i++) {\n const rgRow: RevoGrid.DataFormat[] = [];\n mapping[i] = {};\n\n // columns indexes\n for (let prop of props) {\n const item = getSourceItem(store, i);\n\n // if no item - skip\n if (!item) {\n continue;\n }\n const val = item[prop];\n rgRow.push(val);\n mapping[i][prop] = val;\n }\n\n toCopy.push(rgRow);\n }\n return {\n data: toCopy,\n mapping\n };\n }\n\n static getData(val?: any) {\n if (typeof val === 'undefined' || val === null) {\n return '';\n }\n return val;\n }\n\n destroy() {\n this.unsubscribe.forEach(f => f());\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"columnService.js","mappings":";;;;;;;;MAEa,WAAW,GAAG,GAAG,cAAc,SAAS;MACxC,iBAAiB,GAAG,GAAG,cAAc,QAAQ;MAC7C,oBAAoB,GAAG,GAAG,cAAc,MAAM;MAC9C,uBAAuB,GAAG,GAAG,cAAc,SAAS;MACpD,mBAAmB,GAAG,GAAG,cAAc,UAAU;MACjD,cAAc,GAAG,GAAG,cAAc,YAAY;AACpD,MAAM,oBAAoB,GAAG,GAAG,cAAc,iBAAiB,CAAC;MAC1D,gBAAgB,GAAG,eAAe;MAClC,kBAAkB,GAAG,mBAAmB;MACxC,iBAAiB,GAAG;;ACUjC;;;;;;SAMgB,cAAc,CAAC,KAA0B,EAAE,QAA+B,EAAE,EAAE,YAAY,EAAE,WAAW,EAAmB;EACxI,MAAM,YAAY,GAAgB,IAAI,GAAG,EAAE,CAAC;EAC5C,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,aAAa;IAChC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC;IAC1E,MAAM,cAAc,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC;IAC9C,IAAI,iBAAiB,GAAG,YAAY,CAAC;IACrC,gBAAgB,CAAC,OAAO,CAAC,CAAC,KAAK;MAC7B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QACjC,iBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;OACzC;MACD,iBAAiB,GA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selection/selection.helpers.ts","./src/store/selection/selection.store.ts","./src/services/selection.store.connector.ts","./src/components/data/columnService.ts"],"sourcesContent":["import { GRID_INTERNALS } from '../../utils/consts';\n\nexport const GROUP_DEPTH = `${GRID_INTERNALS}-depth`;\nexport const PSEUDO_GROUP_ITEM = `${GRID_INTERNALS}-name`;\nexport const PSEUDO_GROUP_ITEM_ID = `${GRID_INTERNALS}-id`;\nexport const PSEUDO_GROUP_ITEM_VALUE = `${GRID_INTERNALS}-value`;\nexport const PSEUDO_GROUP_COLUMN = `${GRID_INTERNALS}-column`;\nexport const GROUP_EXPANDED = `${GRID_INTERNALS}-expanded`;\nexport const GROUP_ORIGINAL_INDEX = `${GRID_INTERNALS}-original-index`;\nexport const GROUP_EXPAND_BTN = `group-expand`;\nexport const GROUP_EXPAND_EVENT = `groupExpandClick`;\nexport const GROUPING_ROW_TYPE = 'rgRow';\n","import { RevoGrid } from '../../interfaces';\nimport {\n GROUP_DEPTH,\n GROUP_EXPANDED,\n PSEUDO_GROUP_COLUMN,\n PSEUDO_GROUP_ITEM,\n PSEUDO_GROUP_ITEM_ID,\n PSEUDO_GROUP_ITEM_VALUE,\n GROUP_ORIGINAL_INDEX,\n } from './grouping.const';\nimport { GroupLabelTemplateFunc } from './grouping.row.types';\n\nexport type ExpandedOptions = {\n prevExpanded?: Record<string, boolean>;\n expandedAll?: boolean; // skip trim\n groupLabelTemplate?: GroupLabelTemplateFunc;\n};\n\ntype GroupedData = Map<string, GroupedData | RevoGrid.DataType[]>\n\n\n/**\n * Gather data for grouping\n * @param array - flat data array\n * @param groupIds - ids of groups\n * @param expanded - potentially expanded items if present\n */\nexport function gatherGrouping(array: RevoGrid.DataType[], groupIds: RevoGrid.ColumnProp[], { prevExpanded, expandedAll }: ExpandedOptions) {\n const groupedItems: GroupedData = new Map();\n array.forEach((item, originalIndex) => {\n const groupLevelValues = groupIds.map((groupId) => item[groupId] || null);\n const lastLevelValue = groupLevelValues.pop();\n let currentGroupLevel = groupedItems;\n groupLevelValues.forEach((value) => {\n if (!currentGroupLevel.has(value)) {\n currentGroupLevel.set(value, new Map());\n }\n currentGroupLevel = currentGroupLevel.get(value) as GroupedData;\n })\n if (!currentGroupLevel.has(lastLevelValue)) {\n currentGroupLevel.set(lastLevelValue, []);\n }\n item[GROUP_ORIGINAL_INDEX] = originalIndex;\n const lastLevelItems = currentGroupLevel.get(lastLevelValue) as RevoGrid.DataType[];\n lastLevelItems.push(item);\n });\n\n let itemIndex = -1;\n const groupingDepth = groupIds.length;\n // collapse all groups in the beginning\n const trimmed: Record<number, boolean> = {};\n // index mapping\n const oldNewIndexMap: Record<number, number> = {};\n // check if group header exists\n const pseudoGroupTest: Record<string, number[]> = {};\n const sourceWithGroups: RevoGrid.DataType[] = [];\n function flattenGroupMaps(groupedValues: GroupedData, parentIds: string[], isExpanded: boolean) {\n const depth = parentIds.length;\n groupedValues.forEach((innerGroupedValues, groupId) => {\n const levelIds = [...parentIds, groupId];\n const mergedIds = levelIds.join(',');\n const isGroupExpanded = isExpanded && (!!expandedAll || !!prevExpanded?.[mergedIds]);\n sourceWithGroups.push({\n [PSEUDO_GROUP_ITEM]: groupId,\n [GROUP_DEPTH]: depth,\n [PSEUDO_GROUP_ITEM_ID]: JSON.stringify(levelIds),\n [PSEUDO_GROUP_ITEM_VALUE]: mergedIds,\n [GROUP_EXPANDED]: isGroupExpanded,\n });\n itemIndex += 1;\n if (!isGroupExpanded && depth) {\n trimmed[itemIndex] = true;\n }\n if (Array.isArray(innerGroupedValues)) {\n innerGroupedValues.forEach((value) => {\n itemIndex += 1;\n if (!isGroupExpanded) {\n trimmed[itemIndex] = true;\n }\n oldNewIndexMap[value[GROUP_ORIGINAL_INDEX]] = itemIndex;\n const pseudoGroupTestIds = levelIds.map((_value, index) => levelIds.slice(0, index + 1).join(','));\n pseudoGroupTestIds.forEach((pseudoGroupTestId) => {\n if (!pseudoGroupTest[pseudoGroupTestId]) {\n pseudoGroupTest[pseudoGroupTestId] = [];\n }\n pseudoGroupTest[pseudoGroupTestId].push(itemIndex);\n });\n });\n sourceWithGroups.push(...innerGroupedValues);\n } else {\n flattenGroupMaps(innerGroupedValues, levelIds, isGroupExpanded);\n }\n });\n }\n flattenGroupMaps(groupedItems, [], true);\n\n return {\n sourceWithGroups, // updates source mirror\n depth: groupingDepth, // largest depth for grouping\n trimmed, // used for expand/collapse grouping values\n oldNewIndexMap, // used for mapping old values to new\n childrenByGroup: pseudoGroupTest, // used to get child items in group\n };\n}\n\nexport function getGroupingName(rgRow?: RevoGrid.DataType) {\n return rgRow && rgRow[PSEUDO_GROUP_ITEM];\n}\n\nexport function isGrouping(rgRow?: RevoGrid.DataType) {\n return rgRow && typeof rgRow[PSEUDO_GROUP_ITEM] !== 'undefined';\n}\n\nexport function isGroupingColumn(column?: RevoGrid.ColumnRegular) {\n return column && typeof column[PSEUDO_GROUP_COLUMN] !== 'undefined';\n}\n\nexport function measureEqualDepth<T>(groupA: T[], groupB: T[]) {\n const ln = groupA.length;\n let i = 0;\n for (; i < ln; i++) {\n if (groupA[i] !== groupB[i]) {\n return i;\n }\n }\n return i;\n}\n\nexport function getParsedGroup(id: string): any[] {\n const parseGroup = JSON.parse(id);\n // extra precaution and type safe guard\n if (!Array.isArray(parseGroup)) {\n return null;\n }\n return parseGroup;\n}\n\n// check if items is child of current clicked group\nexport function isSameGroup(currentGroup: any[], currentModel: RevoGrid.DataType, nextModel: RevoGrid.DataType) {\n const nextGroup = getParsedGroup(nextModel[PSEUDO_GROUP_ITEM_ID]);\n if (!nextGroup) {\n return false;\n }\n\n const depth = measureEqualDepth(currentGroup, nextGroup);\n return currentModel[GROUP_DEPTH] < depth;\n}\n","import { Selection } from '../../interfaces';\nimport { EMPTY_INDEX } from '../../services/selection.store.connector';\nimport Cell = Selection.Cell;\nimport RangeArea = Selection.RangeArea;\n\nexport function isHiddenStore(pos: number) {\n return pos === EMPTY_INDEX;\n}\n\nexport function nextCell(cell: Cell, lastCell: Cell): Partial<Cell> | null {\n const nextItem: Partial<Cell> = {};\n let types: (keyof Cell)[] = ['x', 'y'];\n\n // previous item check\n for (let t of types) {\n if (cell[t] < 0) {\n nextItem[t] = cell[t];\n return nextItem;\n }\n }\n // next item check\n for (let t of types) {\n if (cell[t] >= lastCell[t]) {\n nextItem[t] = cell[t] - lastCell[t];\n return nextItem;\n }\n }\n return null;\n}\n\nexport function cropCellToMax(cell: Cell, lastCell: Cell): Cell {\n const newCell: Cell = { ...cell };\n let types: (keyof Cell)[] = ['x', 'y'];\n // previous item check\n for (let t of types) {\n if (cell[t] < 0) {\n newCell[t] = 0;\n }\n }\n // next item check\n for (let t of types) {\n if (cell[t] >= lastCell[t]) {\n newCell[t] = lastCell[t] - 1;\n }\n }\n return newCell;\n}\n\nexport function getRange(start?: Cell, end?: Cell): RangeArea | null {\n return start && end\n ? {\n x: Math.min(start.x, end.x),\n y: Math.min(start.y, end.y),\n x1: Math.max(start.x, end.x),\n y1: Math.max(start.y, end.y),\n }\n : null;\n}\n\nexport function isRangeSingleCell(a: RangeArea): boolean {\n return a.x === a.x1 && a.y === a.y1;\n}\n","import { createStore } from '@stencil/store';\nimport { Observable, Selection } from '../../interfaces';\nimport { setStore } from '../../utils/store.utils';\nimport { getRange } from './selection.helpers';\n\ntype StoreState = Selection.SelectionStoreState;\n\nfunction defaultState(): StoreState {\n return {\n range: null,\n tempRange: null,\n tempRangeType: null,\n focus: null,\n edit: null,\n lastCell: null,\n };\n}\n\nexport class SelectionStore {\n readonly store: Observable<Selection.SelectionStoreState>;\n private unsubscribe: { (): void }[] = [];\n constructor() {\n this.store = createStore(defaultState());\n this.store.on('set', (key, newVal) => {\n if (key === 'tempRange' && !newVal) {\n this.store.set('tempRangeType', null);\n }\n });\n }\n\n onChange<Key extends keyof StoreState>(propName: Key, cb: (newValue: StoreState[Key]) => void) {\n this.unsubscribe.push(this.store.onChange(propName, cb));\n }\n\n clearFocus() {\n setStore(this.store, { focus: null, range: null, edit: null, tempRange: null });\n }\n\n setFocus(focus: Selection.Cell, end?: Selection.Cell) {\n if (!end) {\n setStore(this.store, { focus });\n } else {\n setStore(this.store, {\n focus,\n range: getRange(focus, end),\n edit: null,\n tempRange: null,\n });\n }\n }\n\n setTempArea(range: Selection.TempRange | null) {\n setStore(this.store, { tempRange: range?.area, tempRangeType: range?.type, edit: null });\n }\n\n clearTemp() {\n setStore(this.store, { tempRange: null });\n }\n\n /** Can be applied from selection change or from simple keyboard change clicks */\n setRangeArea(range: Selection.RangeArea) {\n setStore(this.store, { range, edit: null, tempRange: null });\n }\n setRange(start: Selection.Cell, end: Selection.Cell) {\n this.setRangeArea(getRange(start, end));\n }\n\n setLastCell(lastCell: Selection.Cell) {\n setStore(this.store, { lastCell });\n }\n\n setEdit(val: string | boolean) {\n const focus = this.store.get('focus');\n if (focus && typeof val === 'string') {\n setStore(this.store, {\n edit: { x: focus.x, y: focus.y, val },\n });\n return;\n }\n setStore(this.store, { edit: null });\n }\n\n dispose() {\n this.unsubscribe.forEach(f => f());\n this.store.dispose();\n }\n}\n","import { Edition, Selection, RevoGrid } from '../interfaces';\nimport { cropCellToMax, isHiddenStore, nextCell } from '../store/selection/selection.helpers';\nimport { SelectionStore } from '../store/selection/selection.store';\n\nimport Cell = Selection.Cell;\nimport EditCellStore = Edition.EditCellStore;\n\ntype StoreByDimension = Record<number, SelectionStore>;\ntype FocusedStore = {\n entity: SelectionStore;\n cell: Selection.Cell;\n position: Selection.Cell;\n};\n\ntype StoresMapping<T> = { [xOrY: number]: Partial<T> };\n\nexport const EMPTY_INDEX = -1;\n\nexport default class SelectionStoreConnector {\n // dirty flag required to cleanup whole store in case visibility of panels changed\n private dirty = false;\n readonly stores: { [y: number]: { [x: number]: SelectionStore } } = {};\n\n readonly columnStores: StoreByDimension = {};\n readonly rowStores: { [y: number]: SelectionStore } = {};\n\n /**\n * Helpers for data conversion\n */\n readonly storesByType: Partial<Record<RevoGrid.MultiDimensionType, number>> = {};\n readonly storesXToType: StoresMapping<RevoGrid.DimensionCols> = {};\n readonly storesYToType: StoresMapping<RevoGrid.DimensionRows> = {};\n\n get focusedStore(): FocusedStore | null {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const focused = this.stores[y][x]?.store.get('focus');\n if (focused) {\n return {\n entity: this.stores[y][x],\n cell: focused,\n position: {\n x: parseInt(x, 10),\n y: parseInt(y, 10),\n },\n };\n }\n }\n }\n return null;\n }\n\n get edit(): EditCellStore | undefined {\n return this.focusedStore?.entity.store.get('edit');\n }\n\n get focused(): Cell | undefined {\n return this.focusedStore?.entity.store.get('focus');\n }\n\n get selectedRange(): Selection.RangeArea | undefined {\n return this.focusedStore?.entity.store.get('range');\n }\n\n private readonly sections: Element[] = [];\n\n registerSection(e?: Element) {\n if (!e) {\n this.sections.length = 0;\n // some elements removed, rebuild stores\n this.dirty = true;\n return;\n }\n if (this.sections.indexOf(e) === -1) {\n this.sections.push(e);\n }\n }\n\n // check if require to cleanup all stores\n beforeUpdate() {\n if (this.dirty) {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n this.stores[y][x].dispose();\n }\n }\n this.dirty = false;\n }\n }\n\n registerColumn(x: number, type: RevoGrid.DimensionCols): SelectionStore {\n\n // if hidden just create store but no operations needed\n if (isHiddenStore(x)) {\n return new SelectionStore();\n }\n if (this.columnStores[x]) {\n return this.columnStores[x];\n }\n this.columnStores[x] = new SelectionStore();\n // build cross linking type to position\n this.storesByType[type] = x;\n this.storesXToType[x] = type;\n return this.columnStores[x];\n }\n\n registerRow(y: number, type: RevoGrid.DimensionRows): SelectionStore {\n // if hidden just create store\n if (isHiddenStore(y)) {\n return new SelectionStore();\n }\n if (this.rowStores[y]) {\n return this.rowStores[y];\n }\n this.rowStores[y] = new SelectionStore();\n // build cross linking type to position\n this.storesByType[type] = y;\n this.storesYToType[y] = type;\n return this.rowStores[y];\n }\n\n /**\n * Cross store proxy, based on multiple dimensions\n */\n register({ x, y }: Selection.Cell): SelectionStore {\n // if hidden just create store\n if (isHiddenStore(x) || isHiddenStore(y)) {\n return new SelectionStore();\n }\n if (!this.stores[y]) {\n this.stores[y] = {};\n }\n if (this.stores[y][x]) {\n // Store already registered. Do not register twice\n return this.stores[y][x];\n }\n this.stores[y][x] = new SelectionStore();\n // proxy update, column store trigger only range area\n this.stores[y][x]?.onChange('range', c => {\n this.columnStores[x].setRangeArea(c);\n this.rowStores[y].setRangeArea(c);\n });\n // clean up on remove\n this.stores[y][x]?.store.on('dispose', () => this.destroy(x, y));\n return this.stores[y][x];\n }\n\n private destroy(x: number, y: number) {\n this.columnStores[x]?.dispose();\n this.rowStores[y]?.dispose();\n\n delete this.rowStores[y];\n delete this.columnStores[x];\n // clear x cross link\n if (this.storesXToType[x]) {\n const type = this.storesXToType[x];\n delete this.storesXToType[x];\n delete this.storesByType[type];\n }\n // clear y cross link\n if (this.storesYToType[y]) {\n const type = this.storesYToType[y];\n delete this.storesYToType[y];\n delete this.storesByType[type];\n }\n if (this.stores[y]) {\n delete this.stores[y][x];\n }\n // clear empty rows\n if (!Object.keys(this.stores[y] || {}).length) {\n delete this.stores[y];\n }\n }\n\n setEditByCell<T extends Selection.Cell>(storePos: T, editCell: T) {\n this.focusByCell(storePos, editCell, editCell);\n this.setEdit('');\n }\n\n focusByCell<T extends Selection.Cell>(storePos: T, start: T, end: T) {\n const store = this.stores[storePos.y][storePos.x];\n this.focus(store, { focus: start, end });\n }\n\n focus(store: SelectionStore, { focus, end }: { focus: Cell; end: Cell }) {\n let currentStorePointer: Selection.Cell;\n // clear all stores focus leave only active one\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const s = this.stores[y][x];\n // clear other stores, only one area can be selected\n if (s !== store) {\n s.clearFocus();\n } else {\n currentStorePointer = { x: parseInt(x, 10), y: parseInt(y, 10) };\n }\n }\n }\n if (!currentStorePointer) {\n return null;\n }\n\n // check is focus in next store\n const lastCell = store.store.get('lastCell');\n // item in new store\n const nextItem: Partial<Cell> | null = nextCell(focus, lastCell);\n\n let nextStore;\n if (nextItem) {\n for (let i in nextItem) {\n let type: keyof Cell = i as keyof Cell;\n let stores;\n switch (type) {\n case 'x':\n stores = this.getXStores(currentStorePointer.y);\n break;\n case 'y':\n stores = this.getYStores(currentStorePointer.x);\n break;\n }\n if (nextItem[type] >= 0) {\n nextStore = stores[++currentStorePointer[type]];\n } else {\n nextStore = stores[--currentStorePointer[type]];\n const nextLastCell = nextStore?.store.get('lastCell');\n if (nextLastCell) {\n nextItem[type] = nextLastCell[type] + nextItem[type];\n }\n }\n }\n }\n // if next store present - update\n if (nextStore) {\n let item = { ...focus, ...nextItem };\n this.focus(nextStore, { focus: item, end: item });\n return null;\n }\n\n focus = cropCellToMax(focus, lastCell);\n end = cropCellToMax(end, lastCell);\n\n store.setFocus(focus, end);\n return focus;\n }\n\n clearAll(): void {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n this.stores[y][x]?.clearFocus();\n }\n }\n }\n\n setEdit(val: string | boolean) {\n if (!this.focusedStore) {\n return;\n }\n this.focusedStore.entity.setEdit(val);\n }\n\n /**\n * Select all cells across all stores\n */\n selectAll() {\n for (let y in this.stores) {\n for (let x in this.stores[y]) {\n const store = this.stores[y][x];\n if (!store) {\n continue;\n }\n const lastCell = store.store.get('lastCell');\n store.setRange({ x: 0, y: 0 }, { x: lastCell.x - 1, y: lastCell.y - 1 });\n }\n }\n }\n\n private getXStores(y: number) {\n return this.stores[y];\n }\n\n private getYStores(x: number) {\n const stores: { [p: number]: SelectionStore } = {};\n for (let i in this.stores) {\n stores[i] = this.stores[i][x];\n }\n return stores;\n }\n}\n","import { h, VNode } from '@stencil/core';\nimport { DataSourceState, getSourceItem, getVisibleSourceItem, setSourceByVirtualIndex } from '../../store/dataSource/data.store';\nimport { CELL_CLASS, DISABLED_CLASS } from '../../utils/consts';\nimport { Edition, Observable, RevoGrid, Selection } from '../../interfaces';\nimport { getRange } from '../../store/selection/selection.helpers';\n\nimport { isGroupingColumn } from '../../plugins/groupingRow/grouping.service';\nimport { slice } from 'lodash';\n\nexport type ColumnSource = Observable<DataSourceState<RevoGrid.ColumnRegular, RevoGrid.DimensionCols>>;\nexport type RowSource = Observable<DataSourceState<RevoGrid.DataType, RevoGrid.DimensionRows>>;\n\nexport type ColumnStores = {\n [T in RevoGrid.DimensionCols]: ColumnSource;\n};\nexport type RowStores = {\n [T in RevoGrid.DimensionRows]: RowSource;\n};\n\nexport default class ColumnService {\n private unsubscribe: { (): void }[] = [];\n get columns(): RevoGrid.ColumnRegular[] {\n return getVisibleSourceItem(this.source);\n }\n\n hasGrouping = false;\n type: RevoGrid.DimensionCols;\n\n constructor(private dataStore: RowSource, private source: ColumnSource) {\n this.unsubscribe.push(source.onChange('source', s => this.checkGrouping(s)));\n this.checkGrouping(source.get('source'));\n this.type = source.get('type');\n }\n\n private checkGrouping(cols: RevoGrid.ColumnRegular[]) {\n for (let rgCol of cols) {\n if (isGroupingColumn(rgCol)) {\n this.hasGrouping = true;\n return;\n }\n this.hasGrouping = false;\n }\n }\n\n isReadOnly(r: number, c: number): boolean {\n const readOnly: RevoGrid.ReadOnlyFormat = this.columns[c]?.readonly;\n if (typeof readOnly === 'function') {\n const data = this.rowDataModel(r, c);\n return readOnly(data);\n }\n return readOnly;\n }\n\n static doMerge(existing: RevoGrid.CellProps, extra: RevoGrid.CellProps) {\n let props: RevoGrid.CellProps = { ...extra, ...existing };\n // extend existing props\n if (extra.class) {\n if (typeof extra.class === 'object' && typeof props.class === 'object') {\n props.class = { ...extra.class, ...props.class };\n } else if (typeof extra.class === 'string' && typeof props.class === 'object') {\n props.class[extra.class] = true;\n } else if (typeof props.class === 'string') {\n props.class += ' ' + extra.class;\n }\n }\n if (extra.style) {\n props.style = { ...extra.style, ...props.style };\n }\n return props;\n }\n\n mergeProperties(r: number, c: number, defaultProps: RevoGrid.CellProps): RevoGrid.CellProps {\n const cellClass: { [key: string]: boolean } = {\n [CELL_CLASS]: true,\n [DISABLED_CLASS]: this.isReadOnly(r, c),\n };\n let props: RevoGrid.CellProps = {\n ...defaultProps,\n class: cellClass,\n };\n const extraPropsFunc = this.columns[c]?.cellProperties;\n if (extraPropsFunc) {\n const data = this.rowDataModel(r, c);\n const extra = extraPropsFunc(data);\n if (!extra) {\n return props;\n }\n return ColumnService.doMerge(props, extra);\n }\n return props;\n }\n\n customRenderer(\n c: number, model: RevoGrid.ColumnDataSchemaModel, providers: RevoGrid.Providers, additionalData: any\n ): VNode | string | void {\n const tpl = this.columns[c]?.cellTemplate;\n if (tpl) {\n return tpl(h, { ...model, providers }, additionalData);\n }\n return;\n }\n\n getRowClass(r: number, prop: string): string {\n const model = getSourceItem(this.dataStore, r) || {};\n return model[prop] || '';\n }\n\n getCellData(r: number, c: number): string {\n const data = this.rowDataModel(r, c);\n return ColumnService.getData(data.model[data.prop as number]);\n }\n\n getSaveData(rowIndex: number, c: number, val?: string): Edition.BeforeSaveDataDetails {\n if (typeof val === 'undefined') {\n val = this.getCellData(rowIndex, c);\n }\n const data = this.rowDataModel(rowIndex, c);\n return {\n prop: data.prop,\n rowIndex,\n val,\n model: data.model,\n type: this.dataStore.get('type'),\n };\n }\n\n getCellEditor(_r: number, c: number, editors: Edition.Editors): Edition.EditorCtr | undefined {\n const editor = this.columns[c]?.editor;\n if (!editor) {\n return undefined;\n }\n // reference\n if (typeof editor === 'string') {\n return editors[editor];\n }\n return editor;\n }\n\n rowDataModel(rowIndex: number, c: number): RevoGrid.ColumnDataSchemaModel {\n const column = this.columns[c];\n const prop: RevoGrid.ColumnProp | undefined = column?.prop;\n const model = getSourceItem(this.dataStore, rowIndex) || {};\n return {\n prop,\n model,\n data: this.dataStore.get('source'),\n column,\n rowIndex,\n };\n }\n\n getRangeData(d: Selection.ChangedRange, columns: RevoGrid.ColumnRegular[]): {\n changed: RevoGrid.DataLookup,\n mapping: Selection.OldNewRangeMapping,\n } {\n const changed: RevoGrid.DataLookup = {};\n\n // get original length sizes\n const copyColLength = d.oldRange.x1 - d.oldRange.x + 1;\n const copyRowLength = d.oldRange.y1 - d.oldRange.y + 1;\n const mapping: Selection.OldNewRangeMapping = {};\n\n // rows\n for (let rowIndex = d.newRange.y, i = 0; rowIndex < d.newRange.y1 + 1; rowIndex++, i++) {\n // copy original data link\n const oldRowIndex = d.oldRange.y + i % copyRowLength;\n const copyRow = getSourceItem(this.dataStore, oldRowIndex) || {};\n\n // columns\n for (let colIndex = d.newRange.x, j = 0; colIndex < d.newRange.x1 + 1; colIndex++, j++) {\n // check if old range area\n if (rowIndex >= d.oldRange.y && rowIndex <= d.oldRange.y1 && colIndex >= d.oldRange.x && colIndex <= d.oldRange.x1) {\n continue;\n }\n\n // requested column beyond range\n if (!this.columns[colIndex]) {\n continue;\n }\n const prop = this.columns[colIndex]?.prop;\n const copyColIndex = d.oldRange.x + j % copyColLength;\n const copyColumnProp = columns[copyColIndex].prop;\n\n /** if can write */\n if (!this.isReadOnly(rowIndex, colIndex)) {\n /** to show before save */\n if (!changed[rowIndex]) {\n changed[rowIndex] = {};\n }\n changed[rowIndex][prop] = copyRow[copyColumnProp];\n /** Generate mapping object */\n if (!mapping[rowIndex]) {\n mapping[rowIndex] = {};\n }\n mapping[rowIndex][prop] = {\n colProp: copyColumnProp,\n rowIndex: oldRowIndex\n };\n }\n }\n }\n return {\n changed,\n mapping,\n };\n }\n\n getTransformedDataToApply(\n start: Selection.Cell,\n data: RevoGrid.DataFormat[][],\n ): {\n changed: RevoGrid.DataLookup;\n range: Selection.RangeArea;\n } {\n const changed: RevoGrid.DataLookup = {};\n const copyRowLength = data.length;\n const colLength = this.columns.length;\n const rowLength = this.dataStore.get('items').length;\n // rows\n let rowIndex = start.y;\n let maxCol = 0;\n for (let i = 0; rowIndex < rowLength && i < copyRowLength; rowIndex++, i++) {\n // copy original data link\n const copyRow = data[i % copyRowLength];\n const copyColLength = copyRow?.length || 0;\n // columns\n let colIndex = start.x;\n for (let j = 0; colIndex < colLength && j < copyColLength; colIndex++, j++) {\n const p = this.columns[colIndex].prop;\n const currentCol = j % colLength;\n\n /** if can write */\n if (!this.isReadOnly(rowIndex, colIndex)) {\n /** to show before save */\n if (!changed[rowIndex]) {\n changed[rowIndex] = {};\n }\n changed[rowIndex][p] = copyRow[currentCol];\n }\n }\n maxCol = Math.max(maxCol, colIndex - 1);\n }\n const range = getRange(start, {\n y: rowIndex - 1,\n x: maxCol,\n });\n return {\n changed,\n range,\n };\n }\n\n applyRangeData(data: RevoGrid.DataLookup) {\n const items: Record<number, RevoGrid.DataType> = {};\n for (let rowIndex in data) {\n const oldModel = (items[rowIndex] = getSourceItem(this.dataStore, parseInt(rowIndex, 10)));\n if (!oldModel) {\n continue;\n }\n for (let prop in data[rowIndex]) {\n oldModel[prop] = data[rowIndex][prop];\n }\n }\n setSourceByVirtualIndex(this.dataStore, items);\n }\n\n getRangeStaticData(d: Selection.RangeArea, value: RevoGrid.DataFormat): RevoGrid.DataLookup {\n const changed: RevoGrid.DataLookup = {};\n\n // rows\n for (let rowIndex = d.y, i = 0; rowIndex < d.y1 + 1; rowIndex++, i++) {\n // columns\n for (let colIndex = d.x, j = 0; colIndex < d.x1 + 1; colIndex++, j++) {\n // requested column beyond range\n if (!this.columns[colIndex]) {\n continue;\n }\n const p = this.columns[colIndex].prop;\n\n /** if can write */\n if (!this.isReadOnly(rowIndex, colIndex)) {\n /** to show before save */\n if (!changed[rowIndex]) {\n changed[rowIndex] = {};\n }\n changed[rowIndex][p] = value;\n }\n }\n }\n return changed;\n }\n\n getRangeTransformedToProps(\n d: Selection.RangeArea,\n store: Observable<DataSourceState<RevoGrid.DataType, RevoGrid.DimensionRows>>,\n ) {\n const area: {\n prop: RevoGrid.ColumnProp,\n rowIndex: number,\n model: RevoGrid.DataSource,\n type: RevoGrid.MultiDimensionType,\n }[] = [];\n\n const type = this.dataStore.get('type');\n // rows\n for (let rowIndex = d.y, i = 0; rowIndex < d.y1 + 1; rowIndex++, i++) {\n // columns\n for (let colIndex = d.x, j = 0; colIndex < d.x1 + 1; colIndex++, j++) {\n const prop = this.columns[colIndex]?.prop;\n area.push({\n prop,\n rowIndex,\n model: getSourceItem(store, rowIndex),\n type,\n });\n }\n }\n return area;\n }\n\n copyRangeArray(\n range: Selection.RangeArea,\n store: Observable<DataSourceState<RevoGrid.DataType, RevoGrid.DimensionRows>>,\n ) {\n const cols = [...this.columns];\n const props = slice(cols, range.x, range.x1 + 1).map(v => v.prop);\n const toCopy: RevoGrid.DataFormat[][] = [];\n const mapping: { [rowIndex: number]: { [colProp: RevoGrid.ColumnProp]: any } } = {};\n\n // rows indexes\n for (let i = range.y; i <= range.y1; i++) {\n const rgRow: RevoGrid.DataFormat[] = [];\n mapping[i] = {};\n\n // columns indexes\n for (let prop of props) {\n const item = getSourceItem(store, i);\n\n // if no item - skip\n if (!item) {\n continue;\n }\n const val = item[prop];\n rgRow.push(val);\n mapping[i][prop] = val;\n }\n\n toCopy.push(rgRow);\n }\n return {\n data: toCopy,\n mapping\n };\n }\n\n static getData(val?: any) {\n if (typeof val === 'undefined' || val === null) {\n return '';\n }\n return val;\n }\n\n destroy() {\n this.unsubscribe.forEach(f => f());\n }\n}\n"],"version":3}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/* RevoGrid custom elements */
|
|
2
|
-
export { RevoGridComponent as RevoGrid } from '../dist/types/components/revoGrid/revo-grid';
|
|
3
|
-
export { Clipboard as RevogrClipboard } from '../dist/types/components/clipboard/revogr-clipboard';
|
|
4
|
-
export { RevogrData as RevogrData } from '../dist/types/components/data/revogr-data';
|
|
5
|
-
export { RevoEdit as RevogrEdit } from '../dist/types/components/overlay/revogr-edit';
|
|
6
|
-
export { FilterPanel as RevogrFilterPanel } from '../dist/types/plugins/filter/filter.pop';
|
|
7
|
-
export { RevogrFocus as RevogrFocus } from '../dist/types/components/selectionFocus/revogr-focus';
|
|
8
|
-
export { RevogrHeaderComponent as RevogrHeader } from '../dist/types/components/header/revogr-header';
|
|
9
|
-
export { OrderEditor as RevogrOrderEditor } from '../dist/types/components/order/revogr-order-editor';
|
|
10
|
-
export { OverlaySelection as RevogrOverlaySelection } from '../dist/types/components/overlay/revogr-overlay-selection';
|
|
11
|
-
export { RevogrRowHeaders as RevogrRowHeaders } from '../dist/types/components/rowHeaders/revogr-row-headers';
|
|
12
|
-
export { RevogrScrollVirtual as RevogrScrollVirtual } from '../dist/types/components/scrollable/revogr-scroll-virtual';
|
|
13
|
-
export { RevogrFocus as RevogrTempRange } from '../dist/types/components/selectionTempRange/revogr-temp-range';
|
|
14
|
-
export { RevogrViewportScroll as RevogrViewportScroll } from '../dist/types/components/scroll/revogr-viewport-scroll';
|
|
15
|
-
|
|
16
1
|
/**
|
|
17
2
|
* Used to manually set the base path where assets can be found.
|
|
18
3
|
* If the script is used as "module", it's recommended to use "import.meta.url",
|
|
@@ -40,4 +25,15 @@ export interface SetPlatformOptions {
|
|
|
40
25
|
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
41
26
|
}
|
|
42
27
|
export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
|
|
43
|
-
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Utility to define all custom elements within this package using the tag name provided in the component's source.
|
|
31
|
+
* When defining each custom element, it will also check it's safe to define by:
|
|
32
|
+
*
|
|
33
|
+
* 1. Ensuring the "customElements" registry is available in the global context (window).
|
|
34
|
+
* 2. Ensuring that the component tag name is not already defined.
|
|
35
|
+
*
|
|
36
|
+
* Use the standard [customElements.define()](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define)
|
|
37
|
+
* method instead to define custom elements individually, or to provide a different tag name.
|
|
38
|
+
*/
|
|
39
|
+
export declare const defineCustomElements: (opts?: any) => void;
|
package/custom-element/index.js
CHANGED
|
@@ -3,20 +3,19 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { setMode } from '@stencil/core/internal/client';
|
|
5
5
|
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
6
|
-
import { T as ThemeService } from './revo-grid.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export { RevogrViewportScroll, defineCustomElement as defineCustomElementRevogrViewportScroll } from './revogr-viewport-scroll.js';
|
|
6
|
+
import { T as ThemeService, RevoGrid } from './revo-grid.js';
|
|
7
|
+
import { RevogrClipboard } from './revogr-clipboard.js';
|
|
8
|
+
import { RevogrData } from './revogr-data.js';
|
|
9
|
+
import { RevogrEdit } from './revogr-edit.js';
|
|
10
|
+
import { RevogrFilterPanel } from './revogr-filter-panel.js';
|
|
11
|
+
import { RevogrFocus } from './revogr-focus.js';
|
|
12
|
+
import { RevogrHeader } from './revogr-header.js';
|
|
13
|
+
import { RevogrOrderEditor } from './revogr-order-editor.js';
|
|
14
|
+
import { RevogrOverlaySelection } from './revogr-overlay-selection.js';
|
|
15
|
+
import { RevogrRowHeaders } from './revogr-row-headers.js';
|
|
16
|
+
import { RevogrScrollVirtual } from './revogr-scroll-virtual.js';
|
|
17
|
+
import { RevogrTempRange } from './revogr-temp-range.js';
|
|
18
|
+
import { RevogrViewportScroll } from './revogr-viewport-scroll.js';
|
|
20
19
|
|
|
21
20
|
setMode(elm => {
|
|
22
21
|
let theme = elm.theme || elm.getAttribute('theme');
|
|
@@ -30,4 +29,30 @@ setMode(elm => {
|
|
|
30
29
|
return parsedTheme;
|
|
31
30
|
});
|
|
32
31
|
|
|
32
|
+
const defineCustomElements = (opts) => {
|
|
33
|
+
if (typeof customElements !== 'undefined') {
|
|
34
|
+
[
|
|
35
|
+
RevoGrid,
|
|
36
|
+
RevogrClipboard,
|
|
37
|
+
RevogrData,
|
|
38
|
+
RevogrEdit,
|
|
39
|
+
RevogrFilterPanel,
|
|
40
|
+
RevogrFocus,
|
|
41
|
+
RevogrHeader,
|
|
42
|
+
RevogrOrderEditor,
|
|
43
|
+
RevogrOverlaySelection,
|
|
44
|
+
RevogrRowHeaders,
|
|
45
|
+
RevogrScrollVirtual,
|
|
46
|
+
RevogrTempRange,
|
|
47
|
+
RevogrViewportScroll,
|
|
48
|
+
].forEach(cmp => {
|
|
49
|
+
if (!customElements.get(cmp.is)) {
|
|
50
|
+
customElements.define(cmp.is, cmp, opts);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export { defineCustomElements };
|
|
57
|
+
|
|
33
58
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.js","mappings":"
|
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;AAGA,OAAO,CAAC,GAAG;EACT,IAAI,KAAK,GAAwB;EACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;IAC7B,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;GACtB;EAED;EACA,IAAI,WAAW,KAAK,KAAK,EAAE;IACzB,GAAG,CAAC,YAAY,CAAC,OAAO,EAAE;GAC3B;EACD;AACF,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/global/global.ts"],"sourcesContent":["import { setMode } from '@stencil/core';\nimport ThemeService from '../themeManager/themeService';\n\nsetMode(elm => {\n let theme: string | undefined = (elm as any).theme || elm.getAttribute('theme');\n if (typeof theme === 'string') {\n theme = theme.trim();\n }\n\n const parsedTheme = ThemeService.getTheme(theme);\n if (parsedTheme !== theme) {\n elm.setAttribute('theme', parsedTheme);\n }\n return parsedTheme;\n});\n"],"version":3}
|