@revolist/revogrid 4.9.28 → 4.9.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{column.drag.plugin-34501a1e.js → column.drag.plugin-350ccc11.js} +100 -34
- package/dist/cjs/column.drag.plugin-350ccc11.js.map +1 -0
- package/dist/cjs/{column.service-9d63ff18.js → column.service-affe0219.js} +191 -3
- package/dist/cjs/column.service-affe0219.js.map +1 -0
- package/dist/cjs/{edit.utils-093fe9cd.js → edit.utils-c726b9a0.js} +2 -2
- package/dist/cjs/{edit.utils-093fe9cd.js.map → edit.utils-c726b9a0.js.map} +1 -1
- package/dist/cjs/{header-cell-renderer-e4258dfd.js → header-cell-renderer-820a866d.js} +2 -2
- package/dist/cjs/{header-cell-renderer-e4258dfd.js.map → header-cell-renderer-820a866d.js.map} +1 -1
- package/dist/cjs/{index-a9ee8eef.js → index-01270cfd.js} +12 -263
- package/dist/cjs/index-01270cfd.js.map +1 -0
- package/dist/cjs/index-10d10c55.js +2 -2
- package/dist/cjs/index.cjs.js +9 -7
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{key.utils-1438f2ac.js → key.utils-9739c6e8.js} +2 -2
- package/dist/cjs/{key.utils-1438f2ac.js.map → key.utils-9739c6e8.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/revo-grid.cjs.entry.js +89 -50
- package/dist/cjs/revo-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/revo-grid.cjs.js +1 -1
- package/dist/cjs/{revogr-attribution_6.cjs.entry.js → revogr-attribution_7.cjs.entry.js} +76 -35
- package/dist/cjs/revogr-attribution_7.cjs.entry.js.map +1 -0
- package/dist/cjs/revogr-clipboard_3.cjs.entry.js +5 -5
- package/dist/cjs/revogr-data_4.cjs.entry.js +14 -10
- package/dist/cjs/revogr-data_4.cjs.entry.js.map +1 -1
- package/dist/cjs/revogr-filter-panel.cjs.entry.js +21 -9
- package/dist/cjs/revogr-filter-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/{row-header-utils-eb5949b3.js → row-header-utils-63591189.js} +2 -2
- package/dist/cjs/{row-header-utils-eb5949b3.js.map → row-header-utils-63591189.js.map} +1 -1
- package/dist/cjs/{text-editor-ea3badef.js → text-editor-fc7b1ea9.js} +3 -3
- package/dist/cjs/{text-editor-ea3badef.js.map → text-editor-fc7b1ea9.js.map} +1 -1
- package/dist/cjs/{throttle-6fecba1e.js → throttle-64eee101.js} +2 -2
- package/dist/cjs/{throttle-6fecba1e.js.map → throttle-64eee101.js.map} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/data/revogr-data-style.css +3 -3
- package/dist/collection/components/editors/revogr-edit-style.css +3 -3
- package/dist/collection/components/extra/revogr-extra.js +78 -0
- package/dist/collection/components/extra/revogr-extra.js.map +1 -0
- package/dist/collection/components/header/revogr-header-style.css +3 -3
- package/dist/collection/components/header/revogr-header.js +31 -2
- package/dist/collection/components/header/revogr-header.js.map +1 -1
- package/dist/collection/components/overlay/autofill.service.js.map +1 -1
- package/dist/collection/components/overlay/revogr-overlay-selection.js +66 -19
- package/dist/collection/components/overlay/revogr-overlay-selection.js.map +1 -1
- package/dist/collection/components/overlay/revogr-overlay-style.css +3 -3
- package/dist/collection/components/overlay/selection.utils.js +1 -5
- package/dist/collection/components/overlay/selection.utils.js.map +1 -1
- package/dist/collection/components/revoGrid/revo-grid-style.css +3 -3
- package/dist/collection/components/revoGrid/revo-grid.js +56 -16
- package/dist/collection/components/revoGrid/revo-grid.js.map +1 -1
- package/dist/collection/components/revoGrid/viewport.service.js +8 -7
- package/dist/collection/components/revoGrid/viewport.service.js.map +1 -1
- package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +3 -3
- package/dist/collection/components/scrollable/revogr-scroll-style.css +3 -3
- package/dist/collection/components/selectionFocus/revogr-focus-style.css +3 -3
- package/dist/collection/components/selectionFocus/revogr-focus.js +10 -3
- package/dist/collection/components/selectionFocus/revogr-focus.js.map +1 -1
- package/dist/collection/components/selectionTempRange/revogr-temp-range-style.css +3 -3
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js +10 -4
- package/dist/collection/components/selectionTempRange/revogr-temp-range.js.map +1 -1
- package/dist/collection/plugins/filter/filter.panel.js +22 -10
- package/dist/collection/plugins/filter/filter.panel.js.map +1 -1
- package/dist/collection/plugins/filter/filter.plugin.js +10 -13
- package/dist/collection/plugins/filter/filter.plugin.js.map +1 -1
- package/dist/collection/plugins/filter/filter.style.css +6 -3
- package/dist/collection/plugins/filter/filter.types.js.map +1 -1
- package/dist/collection/serve/controller.js +1 -1
- package/dist/collection/serve/data.js +5 -1
- package/dist/collection/services/column.data.provider.js +16 -13
- package/dist/collection/services/column.data.provider.js.map +1 -1
- package/dist/collection/services/dimension.provider.js +15 -7
- package/dist/collection/services/dimension.provider.js.map +1 -1
- package/dist/collection/store/dataSource/data.store.js +6 -3
- package/dist/collection/store/dataSource/data.store.js.map +1 -1
- package/dist/collection/store/dimension/dimension.helpers.js +2 -8
- package/dist/collection/store/dimension/dimension.helpers.js.map +1 -1
- package/dist/collection/types/interfaces.js.map +1 -1
- package/dist/collection/utils/column.utils.js +3 -0
- package/dist/collection/utils/column.utils.js.map +1 -1
- package/dist/esm/{column.drag.plugin-1474c3ae.js → column.drag.plugin-cab965af.js} +85 -21
- package/dist/esm/column.drag.plugin-cab965af.js.map +1 -0
- package/dist/esm/{column.service-9e1f693c.js → column.service-c66e75f2.js} +189 -3
- package/dist/esm/column.service-c66e75f2.js.map +1 -0
- package/dist/esm/{edit.utils-1eeabeab.js → edit.utils-19a4c775.js} +2 -2
- package/dist/esm/{edit.utils-1eeabeab.js.map → edit.utils-19a4c775.js.map} +1 -1
- package/dist/esm/{header-cell-renderer-2ef5f8a1.js → header-cell-renderer-39ed6d63.js} +2 -2
- package/dist/esm/{header-cell-renderer-2ef5f8a1.js.map → header-cell-renderer-39ed6d63.js.map} +1 -1
- package/dist/esm/index-a61f225b.js +2 -2
- package/dist/esm/{index-b6586f9b.js → index-ba44e9d4.js} +10 -261
- package/dist/esm/index-ba44e9d4.js.map +1 -0
- package/dist/esm/index.js +7 -7
- package/dist/esm/{key.utils-562c749e.js → key.utils-7d553ef4.js} +2 -2
- package/dist/esm/{key.utils-562c749e.js.map → key.utils-7d553ef4.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/revo-grid.entry.js +82 -43
- package/dist/esm/revo-grid.entry.js.map +1 -1
- package/dist/esm/revo-grid.js +1 -1
- package/dist/esm/{revogr-attribution_6.entry.js → revogr-attribution_7.entry.js} +76 -36
- package/dist/esm/revogr-attribution_7.entry.js.map +1 -0
- package/dist/esm/revogr-clipboard_3.entry.js +5 -5
- package/dist/esm/revogr-data_4.entry.js +13 -9
- package/dist/esm/revogr-data_4.entry.js.map +1 -1
- package/dist/esm/revogr-filter-panel.entry.js +21 -9
- package/dist/esm/revogr-filter-panel.entry.js.map +1 -1
- package/dist/esm/{row-header-utils-e043f744.js → row-header-utils-0e99306d.js} +2 -2
- package/dist/esm/{row-header-utils-e043f744.js.map → row-header-utils-0e99306d.js.map} +1 -1
- package/dist/esm/{text-editor-654f5d53.js → text-editor-b624b721.js} +3 -3
- package/dist/esm/{text-editor-654f5d53.js.map → text-editor-b624b721.js.map} +1 -1
- package/dist/esm/{throttle-bb3169c7.js → throttle-d31899f3.js} +2 -2
- package/dist/esm/{throttle-bb3169c7.js.map → throttle-d31899f3.js.map} +1 -1
- package/dist/revo-grid/column.drag.plugin-cab965af.js +5 -0
- package/dist/revo-grid/column.drag.plugin-cab965af.js.map +1 -0
- package/dist/revo-grid/column.service-c66e75f2.js +5 -0
- package/dist/revo-grid/column.service-c66e75f2.js.map +1 -0
- package/dist/revo-grid/{edit.utils-1eeabeab.js → edit.utils-19a4c775.js} +2 -2
- package/dist/revo-grid/{header-cell-renderer-2ef5f8a1.js → header-cell-renderer-39ed6d63.js} +2 -2
- package/dist/revo-grid/{index-b6586f9b.js → index-ba44e9d4.js} +2 -2
- package/dist/revo-grid/index-ba44e9d4.js.map +1 -0
- package/dist/revo-grid/index.esm.js +1 -1
- package/dist/revo-grid/key.utils-7d553ef4.js +5 -0
- package/dist/revo-grid/{key.utils-562c749e.js.map → key.utils-7d553ef4.js.map} +1 -1
- package/dist/revo-grid/revo-grid.entry.js +1 -1
- package/dist/revo-grid/revo-grid.entry.js.map +1 -1
- package/dist/revo-grid/revo-grid.esm.js +1 -1
- package/dist/revo-grid/revo-grid.esm.js.map +1 -1
- package/dist/revo-grid/revogr-attribution_7.entry.js +5 -0
- package/dist/revo-grid/revogr-attribution_7.entry.js.map +1 -0
- package/dist/revo-grid/revogr-clipboard_3.entry.js +1 -1
- package/dist/revo-grid/revogr-clipboard_3.entry.js.map +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js +1 -1
- package/dist/revo-grid/revogr-data_4.entry.js.map +1 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js +1 -1
- package/dist/revo-grid/revogr-filter-panel.entry.js.map +1 -1
- package/dist/revo-grid/row-header-utils-0e99306d.js +5 -0
- package/dist/revo-grid/text-editor-b624b721.js +5 -0
- package/dist/revo-grid/{throttle-bb3169c7.js → throttle-d31899f3.js} +2 -2
- package/dist/types/components/extra/revogr-extra.d.ts +24 -0
- package/dist/types/components/header/revogr-header.d.ts +7 -2
- package/dist/types/components/overlay/autofill.service.d.ts +1 -1
- package/dist/types/components/overlay/revogr-overlay-selection.d.ts +8 -2
- package/dist/types/components/overlay/selection.utils.d.ts +7 -4
- package/dist/types/components/revoGrid/revo-grid.d.ts +22 -13
- package/dist/types/components.d.ts +52 -6
- package/dist/types/plugins/filter/filter.panel.d.ts +3 -0
- package/dist/types/plugins/filter/filter.plugin.d.ts +2 -5
- package/dist/types/plugins/filter/filter.types.d.ts +3 -2
- package/dist/types/services/column.data.provider.d.ts +5 -1
- package/dist/types/services/dimension.provider.d.ts +5 -0
- package/dist/types/store/dataSource/data.store.d.ts +2 -1
- package/dist/types/store/dimension/dimension.helpers.d.ts +1 -1
- package/dist/types/types/interfaces.d.ts +3 -1
- package/dist/types/utils/column.utils.d.ts +3 -0
- package/hydrate/index.js +301 -172
- package/hydrate/index.mjs +301 -172
- package/package.json +1 -1
- package/standalone/column.service.js +188 -2
- package/standalone/column.service.js.map +1 -1
- package/standalone/{reduce.js → data.store.js} +8 -188
- package/standalone/data.store.js.map +1 -0
- package/standalone/dimension.helpers.js +4 -75
- package/standalone/dimension.helpers.js.map +1 -1
- package/standalone/index.d.ts +2 -0
- package/standalone/index.js +3 -2
- package/standalone/index.js.map +1 -1
- package/standalone/revo-grid.js +174 -65
- package/standalone/revo-grid.js.map +1 -1
- package/standalone/revogr-data2.js +3 -3
- package/standalone/revogr-edit2.js +1 -1
- package/standalone/revogr-extra.d.ts +11 -0
- package/standalone/revogr-extra.js +11 -0
- package/standalone/revogr-extra.js.map +1 -0
- package/standalone/revogr-extra2.js +45 -0
- package/standalone/revogr-extra2.js.map +1 -0
- package/standalone/revogr-filter-panel.js +21 -9
- package/standalone/revogr-filter-panel.js.map +1 -1
- package/standalone/revogr-focus2.js +12 -5
- package/standalone/revogr-focus2.js.map +1 -1
- package/standalone/revogr-header2.js +9 -5
- package/standalone/revogr-header2.js.map +1 -1
- package/standalone/revogr-order-editor2.js +1 -1
- package/standalone/revogr-overlay-selection2.js +30 -18
- package/standalone/revogr-overlay-selection2.js.map +1 -1
- package/standalone/revogr-row-headers2.js +1 -1
- package/standalone/revogr-scroll-virtual2.js +1 -1
- package/standalone/revogr-temp-range2.js +11 -5
- package/standalone/revogr-temp-range2.js.map +1 -1
- package/standalone/revogr-viewport-scroll2.js +1 -1
- package/standalone/selection.utils.js +2 -6
- package/standalone/selection.utils.js.map +1 -1
- package/dist/cjs/column.drag.plugin-34501a1e.js.map +0 -1
- package/dist/cjs/column.service-9d63ff18.js.map +0 -1
- package/dist/cjs/index-a9ee8eef.js.map +0 -1
- package/dist/cjs/revogr-attribution_6.cjs.entry.js.map +0 -1
- package/dist/esm/column.drag.plugin-1474c3ae.js.map +0 -1
- package/dist/esm/column.service-9e1f693c.js.map +0 -1
- package/dist/esm/index-b6586f9b.js.map +0 -1
- package/dist/esm/revogr-attribution_6.entry.js.map +0 -1
- package/dist/revo-grid/column.drag.plugin-1474c3ae.js +0 -5
- package/dist/revo-grid/column.drag.plugin-1474c3ae.js.map +0 -1
- package/dist/revo-grid/column.service-9e1f693c.js +0 -5
- package/dist/revo-grid/column.service-9e1f693c.js.map +0 -1
- package/dist/revo-grid/index-b6586f9b.js.map +0 -1
- package/dist/revo-grid/key.utils-562c749e.js +0 -5
- package/dist/revo-grid/revogr-attribution_6.entry.js +0 -5
- package/dist/revo-grid/revogr-attribution_6.entry.js.map +0 -1
- package/dist/revo-grid/row-header-utils-e043f744.js +0 -5
- package/dist/revo-grid/text-editor-654f5d53.js +0 -5
- package/standalone/reduce.js.map +0 -1
- /package/dist/revo-grid/{edit.utils-1eeabeab.js.map → edit.utils-19a4c775.js.map} +0 -0
- /package/dist/revo-grid/{header-cell-renderer-2ef5f8a1.js.map → header-cell-renderer-39ed6d63.js.map} +0 -0
- /package/dist/revo-grid/{row-header-utils-e043f744.js.map → row-header-utils-0e99306d.js.map} +0 -0
- /package/dist/revo-grid/{text-editor-654f5d53.js.map → text-editor-b624b721.js.map} +0 -0
- /package/dist/revo-grid/{throttle-bb3169c7.js.map → throttle-d31899f3.js.map} +0 -0
|
@@ -111,7 +111,7 @@ export function isBeforeFirst({ x, y }) {
|
|
|
111
111
|
// }
|
|
112
112
|
// return null;
|
|
113
113
|
// }
|
|
114
|
-
function styleByCellProps(styles) {
|
|
114
|
+
export function styleByCellProps(styles) {
|
|
115
115
|
return {
|
|
116
116
|
left: `${styles.left}px`,
|
|
117
117
|
top: `${styles.top}px`,
|
|
@@ -133,8 +133,4 @@ export function getCell({ x, y, x1, y1 }, dimensionRow, dimensionCol) {
|
|
|
133
133
|
height: bottom - top,
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
export function getElStyle(range, dimensionRow, dimensionCol) {
|
|
137
|
-
const styles = getCell(range, dimensionRow, dimensionCol);
|
|
138
|
-
return styleByCellProps(styles);
|
|
139
|
-
}
|
|
140
136
|
//# sourceMappingURL=selection.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection.utils.js","sourceRoot":"","sources":["../../../src/components/overlay/selection.utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"selection.utils.js","sourceRoot":"","sources":["../../../src/components/overlay/selection.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,cAAc,EACd,iBAAiB,EACjB,aAAa,GACd,MAAM,QAAQ,CAAC;AAWhB,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAa1D,MAAM,UAAU,oBAAoB,CAClC,IAAgB,EAChB,KAAwD;IAExD,MAAM,MAAM,GAAwB,EAAE,CAAC;IACvC,KAAK,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;QACnB,MAAM,QAAQ,GAAG,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACjC,MAAM,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,CAA0B,EAC1B,IAAe;IAEf,wCAAwC;IACxC,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oCAAoC;IACpC,MAAM,CAAC,GAAG,oBAAoB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAC7C,MAAM,CAAC,GAAG,oBAAoB,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;IAE7C,2CAA2C;IAC3C,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC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AK;QACL,GAAG;QACH,MAAM;QACN,KAAK,EAAE,KAAK,GAAG,IAAI;QACnB,MAAM,EAAE,MAAM,GAAG,GAAG;KACrB,CAAC;AACJ,CAAC","sourcesContent":["import {\n DimensionIndexInput,\n DSourceState,\n getItemByIndex,\n getItemByPosition,\n getSourceItem,\n} from '@store';\nimport type {\n DimensionSettingsState,\n Cell,\n RangeArea,\n RangeAreaCss,\n DataLookup,\n DimensionRows,\n DataType,\n EditCellStore,\n} from '@type';\nimport { getPropertyFromEvent } from '../../utils/events';\nimport { Observable } from '../../utils/store.utils';\n\nexport type EventData = {\n el: HTMLElement;\n rows: DimensionSettingsState;\n cols: DimensionSettingsState;\n lastCell: Cell;\n focus: Cell | null;\n range: RangeArea | null;\n edit: EditCellStore | null;\n};\n\nexport function collectModelsOfRange(\n data: DataLookup,\n store: Observable<DSourceState<DataType, DimensionRows>>,\n) {\n const models: Partial<DataLookup> = {};\n for (let i in data) {\n const rowIndex = parseInt(i, 10);\n models[rowIndex] = getSourceItem(store, rowIndex);\n }\n\n return models;\n}\n\nexport function getFocusCellBasedOnEvent(\n e: MouseEvent | TouchEvent,\n data: EventData,\n): Cell | null {\n // If event default is prevented, return\n if (e.defaultPrevented) {\n return null;\n }\n\n // Get coordinates from event object\n const x = getPropertyFromEvent(e, 'clientX');\n const y = getPropertyFromEvent(e, 'clientY');\n\n // If coordinates are not available, return\n if (x === null || y === null) {\n return null;\n }\n\n // Get current cell based on coordinates and data\n const focusCell = getCurrentCell({ x, y }, data);\n // If current cell is not available, return\n if (isAfterLast(focusCell, data.lastCell)) {\n return null;\n }\n\n return focusCell;\n}\n\n/**\n * Calculate cell based on x, y position\n */\nexport function getCurrentCell(\n { x, y }: Cell,\n { el, rows, cols }: Pick<EventData, 'el' | 'rows' | 'cols'>,\n): Cell {\n // Get the bounding rectangle of the element\n const { top, left, height, width } = el.getBoundingClientRect();\n\n // Calculate the cell position relative to the element\n let cellY = y - top;\n let cellX = x - left;\n\n // Limit the cell position to the element height\n if (cellY >= height) {\n cellY = height - 1;\n }\n\n // Limit the cell position to the element width\n if (cellX >= width) {\n cellX = width - 1;\n }\n\n // Get the row and column items based on the cell position\n const rgRow = getItemByPosition(rows, cellY);\n const rgCol = getItemByPosition(cols, cellX);\n\n // Set the row and column index to 0 if they are before the first item\n if (rgCol.itemIndex < 0) {\n rgCol.itemIndex = 0;\n }\n\n if (rgRow.itemIndex < 0) {\n rgRow.itemIndex = 0;\n }\n\n return { x: rgCol.itemIndex, y: rgRow.itemIndex };\n}\n\nexport function getCoordinate(\n range: RangeArea,\n focus: Cell,\n changes: Partial<Cell>,\n isMulti = false,\n) {\n const updateCoordinate = (c: keyof Cell, pos = 0) => {\n const start = { x: range.x, y: range.y };\n const end = isMulti ? { x: range.x1, y: range.y1 } : start;\n const point = end[c] > focus[c] ? end : start;\n point[c] += pos;\n return { start, end };\n };\n\n if (changes.x) {\n return updateCoordinate('x', changes['x']);\n }\n if (changes.y) {\n return updateCoordinate('y', changes['y']);\n }\n return null;\n}\n\n/**\n * Check if the x coordinate of the cell position is after or equal to the x coordinate of the last cell position\n * or if the y coordinate of the cell position is after or equal to the y coordinate of the last cell position\n */\nexport function isAfterLast({ x, y }: Cell, lastCell: Cell) {\n return x >= lastCell.x || y >= lastCell.y;\n}\n\n/** check if out of range */\nexport function isBeforeFirst({ x, y }: Cell) {\n return x < 0 || y < 0;\n}\n\n/** Compare cells, only 1 coordinate difference is possible */\n// export function getDirectionCoordinate(initial: Cell, last: Cell): Partial<Cell> | null {\n// const c: (keyof Cell)[] = ['x', 'y'];\n// for (let k of c) {\n// if (initial[k] !== last[k]) {\n// return { [k]: 1 };\n// }\n// }\n// return null;\n// }\n\n// export function getLargestAxis(initial: Cell, last: Cell): Partial<Cell> | null {\n// const cell: Partial<Cell> = {};\n// const c: (keyof Cell)[] = ['x', 'y'];\n// for (let k of c) {\n// cell[k] = Math.abs(initial[k] - last[k]);\n// }\n// if (cell.x > cell.y) {\n// return { x: 1 };\n// }\n// if (cell.y > cell.x) {\n// return { y: 1 };\n// }\n// return null;\n// }\n\nexport function styleByCellProps(styles: { [key: string]: number }): RangeAreaCss {\n return {\n left: `${styles.left}px`,\n top: `${styles.top}px`,\n width: `${styles.width}px`,\n height: `${styles.height}px`,\n };\n}\n\nexport function getCell(\n { x, y, x1, y1 }: RangeArea,\n dimensionRow: Pick<\n DimensionIndexInput,\n 'indexToItem' | 'indexes' | 'originItemSize'\n >,\n dimensionCol: Pick<\n DimensionIndexInput,\n 'indexToItem' | 'indexes' | 'originItemSize'\n >,\n) {\n const top = getItemByIndex(dimensionRow, y).start;\n const left = getItemByIndex(dimensionCol, x).start;\n const bottom = getItemByIndex(dimensionRow, y1).end;\n const right = getItemByIndex(dimensionCol, x1).end;\n\n return {\n left,\n right,\n top,\n bottom,\n width: right - left,\n height: bottom - top,\n };\n}\n"]}
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
overflow: hidden;
|
|
39
39
|
color: #fff;
|
|
40
40
|
background-color: #6200ee;
|
|
41
|
-
height:
|
|
42
|
-
line-height:
|
|
41
|
+
height: 32px;
|
|
42
|
+
line-height: 32px;
|
|
43
43
|
padding: 0 15px;
|
|
44
44
|
outline: 0;
|
|
45
45
|
border: 0;
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
.revo-button.light {
|
|
63
63
|
border: 1px solid #cedefa;
|
|
64
|
-
line-height:
|
|
64
|
+
line-height: 30px;
|
|
65
65
|
background: none;
|
|
66
66
|
color: #000;
|
|
67
67
|
box-shadow: none;
|
|
@@ -79,7 +79,7 @@ export class RevoGridComponent {
|
|
|
79
79
|
this.trimmedRows = {};
|
|
80
80
|
this.exporting = false;
|
|
81
81
|
this.grouping = undefined;
|
|
82
|
-
this.stretch =
|
|
82
|
+
this.stretch = false;
|
|
83
83
|
this.additionalData = {};
|
|
84
84
|
this.disableVirtualX = false;
|
|
85
85
|
this.disableVirtualY = false;
|
|
@@ -142,7 +142,7 @@ export class RevoGridComponent {
|
|
|
142
142
|
* Scrolls viewport to specified column by prop
|
|
143
143
|
*/
|
|
144
144
|
async scrollToColumnProp(prop, dimension = 'rgCol') {
|
|
145
|
-
if (!this.dimensionProvider) {
|
|
145
|
+
if (!this.dimensionProvider || !this.columnProvider) {
|
|
146
146
|
throw new Error('Not connected');
|
|
147
147
|
}
|
|
148
148
|
const coordinate = this.columnProvider.getColumnIndexByProp(prop, dimension);
|
|
@@ -158,7 +158,8 @@ export class RevoGridComponent {
|
|
|
158
158
|
}
|
|
159
159
|
/** Update columns */
|
|
160
160
|
async updateColumns(cols) {
|
|
161
|
-
|
|
161
|
+
var _a;
|
|
162
|
+
(_a = this.columnProvider) === null || _a === void 0 ? void 0 : _a.updateColumns(cols);
|
|
162
163
|
}
|
|
163
164
|
/** Add trimmed by type */
|
|
164
165
|
async addTrimmed(trimmed, trimmedType = 'external', type = 'rgRow') {
|
|
@@ -191,6 +192,9 @@ export class RevoGridComponent {
|
|
|
191
192
|
}
|
|
192
193
|
await timeout();
|
|
193
194
|
const colGroup = rgCol.pin || 'rgCol';
|
|
195
|
+
if (!this.columnProvider) {
|
|
196
|
+
throw new Error('Not connected');
|
|
197
|
+
}
|
|
194
198
|
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.setEdit(rgRow, this.columnProvider.getColumnIndexByProp(prop, colGroup), colGroup, rowSource);
|
|
195
199
|
}
|
|
196
200
|
/** Set focus range. */
|
|
@@ -233,6 +237,9 @@ export class RevoGridComponent {
|
|
|
233
237
|
* @param type - type of column
|
|
234
238
|
*/
|
|
235
239
|
async getColumnStore(type = 'rgCol') {
|
|
240
|
+
if (!this.columnProvider) {
|
|
241
|
+
throw new Error('Not connected');
|
|
242
|
+
}
|
|
236
243
|
return this.columnProvider.stores[type].store;
|
|
237
244
|
}
|
|
238
245
|
/**
|
|
@@ -243,18 +250,27 @@ export class RevoGridComponent {
|
|
|
243
250
|
* @param additive - if false will replace current order
|
|
244
251
|
*/
|
|
245
252
|
async updateColumnSorting(column, index, order, additive) {
|
|
253
|
+
if (!this.columnProvider) {
|
|
254
|
+
throw new Error('Not connected');
|
|
255
|
+
}
|
|
246
256
|
return this.columnProvider.updateColumnSorting(column, index, order, additive);
|
|
247
257
|
}
|
|
248
258
|
/**
|
|
249
259
|
* Clears column sorting
|
|
250
260
|
*/
|
|
251
261
|
async clearSorting() {
|
|
262
|
+
if (!this.columnProvider) {
|
|
263
|
+
throw new Error('Not connected');
|
|
264
|
+
}
|
|
252
265
|
this.columnProvider.clearSorting();
|
|
253
266
|
}
|
|
254
267
|
/**
|
|
255
268
|
* Receive all columns in data source
|
|
256
269
|
*/
|
|
257
270
|
async getColumns() {
|
|
271
|
+
if (!this.columnProvider) {
|
|
272
|
+
throw new Error('Not connected');
|
|
273
|
+
}
|
|
258
274
|
return this.columnProvider.getColumns();
|
|
259
275
|
}
|
|
260
276
|
/**
|
|
@@ -425,14 +441,20 @@ export class RevoGridComponent {
|
|
|
425
441
|
this.columnChanged(this.columns);
|
|
426
442
|
}
|
|
427
443
|
columnChanged(newVal = []) {
|
|
428
|
-
if (!this.dimensionProvider) {
|
|
444
|
+
if (!this.dimensionProvider || !this.columnProvider) {
|
|
429
445
|
return;
|
|
430
446
|
}
|
|
431
447
|
const columnGather = getColumns(newVal, 0, this.columnTypes);
|
|
432
|
-
this.beforecolumnsset.emit(columnGather);
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
448
|
+
const beforeSetEvent = this.beforecolumnsset.emit(columnGather);
|
|
449
|
+
if (beforeSetEvent.defaultPrevented) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
this.dimensionProvider.applyNewColumns(beforeSetEvent.detail.columns, this.disableVirtualX);
|
|
453
|
+
const beforeApplyEvent = this.beforecolumnapplied.emit(columnGather);
|
|
454
|
+
if (beforeApplyEvent.defaultPrevented) {
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
const columns = this.columnProvider.setColumns(beforeApplyEvent.detail);
|
|
436
458
|
this.aftercolumnsset.emit({
|
|
437
459
|
columns,
|
|
438
460
|
order: this.columnProvider.order,
|
|
@@ -570,7 +592,7 @@ export class RevoGridComponent {
|
|
|
570
592
|
* Stretch Plugin Apply
|
|
571
593
|
*/
|
|
572
594
|
applyStretch(isStretch) {
|
|
573
|
-
if (!this.dimensionProvider || !this.dataProvider) {
|
|
595
|
+
if (!this.dimensionProvider || !this.dataProvider || !this.columnProvider || !this.viewportProvider) {
|
|
574
596
|
return;
|
|
575
597
|
}
|
|
576
598
|
if (isStretch === 'false') {
|
|
@@ -666,7 +688,7 @@ export class RevoGridComponent {
|
|
|
666
688
|
this.pluginsChanged(this.plugins);
|
|
667
689
|
}
|
|
668
690
|
getPluginData() {
|
|
669
|
-
if (!this.dimensionProvider || !this.dataProvider) {
|
|
691
|
+
if (!this.dimensionProvider || !this.dataProvider || !this.columnProvider || !this.viewportProvider) {
|
|
670
692
|
return;
|
|
671
693
|
}
|
|
672
694
|
// pass data provider to plugins
|
|
@@ -745,8 +767,11 @@ export class RevoGridComponent {
|
|
|
745
767
|
}
|
|
746
768
|
return Promise.all(this.jobsBeforeRender);
|
|
747
769
|
}
|
|
770
|
+
componentDidRender() {
|
|
771
|
+
this.aftergridrender.emit();
|
|
772
|
+
}
|
|
748
773
|
render() {
|
|
749
|
-
if (!this.dimensionProvider || !this.dataProvider) {
|
|
774
|
+
if (!this.dimensionProvider || !this.dataProvider || !this.columnProvider || !this.viewportProvider) {
|
|
750
775
|
return;
|
|
751
776
|
}
|
|
752
777
|
const contentHeight = this.dimensionProvider.stores['rgRow'].store.get('realSize');
|
|
@@ -811,7 +836,7 @@ export class RevoGridComponent {
|
|
|
811
836
|
if (e.currentTarget === e.target) {
|
|
812
837
|
(_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearEdit();
|
|
813
838
|
}
|
|
814
|
-
} }, h("div", { class: "viewports" }, h("slot", { name: "viewport" }), viewportSections, h("revogr-scroll-virtual", { class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), h(OrderRenderer, { ref: e => (this.orderService = e) }))), h("revogr-scroll-virtual", { class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), this.extraElements));
|
|
839
|
+
} }, h("div", { class: "viewports" }, h("slot", { name: "viewport" }), viewportSections, h("revogr-scroll-virtual", { class: "vertical", dimension: typeRow, viewportStore: viewports[typeRow].store, dimensionStore: dimensions[typeRow].store, ref: el => this.scrollingService.registerElement(el, 'rowScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), h(OrderRenderer, { ref: e => (this.orderService = e) }))), h("revogr-scroll-virtual", { class: "horizontal", dimension: typeCol, viewportStore: viewports[typeCol].store, dimensionStore: dimensions[typeCol].store, ref: el => this.scrollingService.registerElement(el, 'colScroll'), onScrollvirtual: e => this.scrollingService.proxyScroll(e.detail) }), h("revogr-extra", { nodes: this.extraElements })));
|
|
815
840
|
}
|
|
816
841
|
disconnectedCallback() {
|
|
817
842
|
// Remove all plugins, to avoid memory leaks and unexpected behaviour when the component is removed
|
|
@@ -1267,7 +1292,7 @@ export class RevoGridComponent {
|
|
|
1267
1292
|
"mutable": false,
|
|
1268
1293
|
"complexType": {
|
|
1269
1294
|
"original": "boolean | ColumnFilterConfig",
|
|
1270
|
-
"resolved": "boolean | { collection?: FilterCollection | undefined; include?: string[] | undefined; customFilters?: Record<string, CustomFilter
|
|
1295
|
+
"resolved": "boolean | { collection?: FilterCollection | undefined; include?: string[] | undefined; customFilters?: Record<string, CustomFilter<any, LogicFunctionExtraParam>> | undefined; filterProp?: string | undefined; localization?: FilterLocalization | undefined; multiFilterItems?: MultiFilterItem | undefined; disableDynamicFiltering?: boolean | undefined; }",
|
|
1271
1296
|
"references": {
|
|
1272
1297
|
"ColumnFilterConfig": {
|
|
1273
1298
|
"location": "import",
|
|
@@ -1401,7 +1426,7 @@ export class RevoGridComponent {
|
|
|
1401
1426
|
},
|
|
1402
1427
|
"attribute": "stretch",
|
|
1403
1428
|
"reflect": false,
|
|
1404
|
-
"defaultValue": "
|
|
1429
|
+
"defaultValue": "false"
|
|
1405
1430
|
},
|
|
1406
1431
|
"additionalData": {
|
|
1407
1432
|
"type": "any",
|
|
@@ -1500,8 +1525,8 @@ export class RevoGridComponent {
|
|
|
1500
1525
|
"type": "unknown",
|
|
1501
1526
|
"mutable": false,
|
|
1502
1527
|
"complexType": {
|
|
1503
|
-
"original": "VNode[]",
|
|
1504
|
-
"resolved": "VNode[]",
|
|
1528
|
+
"original": "(VNode | (() => VNode))[]",
|
|
1529
|
+
"resolved": "(VNode | (() => VNode))[]",
|
|
1505
1530
|
"references": {
|
|
1506
1531
|
"VNode": {
|
|
1507
1532
|
"location": "import",
|
|
@@ -2234,6 +2259,21 @@ export class RevoGridComponent {
|
|
|
2234
2259
|
"resolved": "any",
|
|
2235
2260
|
"references": {}
|
|
2236
2261
|
}
|
|
2262
|
+
}, {
|
|
2263
|
+
"method": "aftergridrender",
|
|
2264
|
+
"name": "aftergridrender",
|
|
2265
|
+
"bubbles": true,
|
|
2266
|
+
"cancelable": true,
|
|
2267
|
+
"composed": true,
|
|
2268
|
+
"docs": {
|
|
2269
|
+
"tags": [],
|
|
2270
|
+
"text": "Emmited after the grid is rendered."
|
|
2271
|
+
},
|
|
2272
|
+
"complexType": {
|
|
2273
|
+
"original": "any",
|
|
2274
|
+
"resolved": "any",
|
|
2275
|
+
"references": {}
|
|
2276
|
+
}
|
|
2237
2277
|
}, {
|
|
2238
2278
|
"method": "aftergridinit",
|
|
2239
2279
|
"name": "aftergridinit",
|