apex-grid 1.0.1 → 2.0.0
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/LICENSE +76 -5
- package/README.md +520 -10
- package/components/cell.d.ts +74 -0
- package/components/cell.js +376 -0
- package/components/cell.js.map +1 -0
- package/{dist/src/components → components}/filter-row.d.ts +13 -12
- package/components/filter-row.js +396 -0
- package/components/filter-row.js.map +1 -0
- package/components/grid.d.ts +1173 -0
- package/components/grid.js +620 -0
- package/components/grid.js.map +1 -0
- package/components/header-row.d.ts +43 -0
- package/components/header-row.js +205 -0
- package/components/header-row.js.map +1 -0
- package/{dist/src/components → components}/header.d.ts +11 -5
- package/components/header.js +263 -0
- package/components/header.js.map +1 -0
- package/components/paginator.d.ts +56 -0
- package/components/paginator.js +148 -0
- package/components/paginator.js.map +1 -0
- package/components/row.d.ts +43 -0
- package/components/row.js +239 -0
- package/components/row.js.map +1 -0
- package/components/toolbar.d.ts +60 -0
- package/components/toolbar.js +275 -0
- package/components/toolbar.js.map +1 -0
- package/{dist/src/components → components}/virtualizer.d.ts +2 -3
- package/{dist/src/components → components}/virtualizer.js +3 -3
- package/components/virtualizer.js.map +1 -0
- package/controllers/data-operation.d.ts +31 -0
- package/controllers/data-operation.js +53 -0
- package/controllers/data-operation.js.map +1 -0
- package/controllers/dom.d.ts +55 -0
- package/controllers/dom.js +221 -0
- package/controllers/dom.js.map +1 -0
- package/controllers/editing.d.ts +130 -0
- package/controllers/editing.js +197 -0
- package/controllers/editing.js.map +1 -0
- package/controllers/expansion.d.ts +68 -0
- package/controllers/expansion.js +126 -0
- package/controllers/expansion.js.map +1 -0
- package/{dist/src/controllers → controllers}/filter.d.ts +2 -3
- package/controllers/filter.js +105 -0
- package/controllers/filter.js.map +1 -0
- package/{dist/src/controllers → controllers}/navigation.d.ts +18 -8
- package/{dist/src/controllers → controllers}/navigation.js +31 -20
- package/controllers/navigation.js.map +1 -0
- package/controllers/pagination.d.ts +102 -0
- package/controllers/pagination.js +106 -0
- package/controllers/pagination.js.map +1 -0
- package/controllers/reorder.d.ts +78 -0
- package/controllers/reorder.js +124 -0
- package/controllers/reorder.js.map +1 -0
- package/{dist/src/controllers → controllers}/resize.d.ts +2 -3
- package/controllers/resize.js +52 -0
- package/controllers/resize.js.map +1 -0
- package/controllers/selection.d.ts +109 -0
- package/controllers/selection.js +168 -0
- package/controllers/selection.js.map +1 -0
- package/{dist/src/controllers → controllers}/sort.d.ts +1 -2
- package/controllers/sort.js +122 -0
- package/controllers/sort.js.map +1 -0
- package/controllers/state.d.ts +56 -0
- package/controllers/state.js +74 -0
- package/controllers/state.js.map +1 -0
- package/controllers/tree.d.ts +87 -0
- package/controllers/tree.js +0 -0
- package/controllers/tree.js.map +1 -0
- package/custom-elements.json +6901 -1554
- package/{dist/src/define.d.ts → define.d.ts} +0 -1
- package/define.js.map +1 -0
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +127 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1633 -0
- package/docs/classes/ApexGrid.html +371 -0
- package/docs/functions/setup.html +22 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +504 -0
- package/docs/interfaces/ApexCellValueChangedEvent.html +11 -0
- package/docs/interfaces/ApexCellValueChangingEvent.html +13 -0
- package/docs/interfaces/ApexColumnMovedEvent.html +8 -0
- package/docs/interfaces/ApexColumnMovingEvent.html +11 -0
- package/docs/interfaces/ApexColumnPinnedEvent.html +6 -0
- package/docs/interfaces/ApexColumnPinningEvent.html +8 -0
- package/docs/interfaces/ApexDetailContext.html +8 -0
- package/docs/interfaces/ApexFilteredEvent.html +6 -0
- package/docs/interfaces/ApexFilteringEvent.html +12 -0
- package/docs/interfaces/ApexGridEventMap.html +68 -0
- package/docs/interfaces/ApexHeaderContext.html +6 -0
- package/docs/interfaces/ApexPageChangedEvent.html +10 -0
- package/docs/interfaces/ApexPageChangingEvent.html +10 -0
- package/docs/interfaces/ApexQuickFilterChangedEvent.html +4 -0
- package/docs/interfaces/ApexQuickFilterChangingEvent.html +6 -0
- package/docs/interfaces/ApexRowEditEndedEvent.html +6 -0
- package/docs/interfaces/ApexRowEditStartedEvent.html +4 -0
- package/docs/interfaces/ApexRowExpandedEvent.html +8 -0
- package/docs/interfaces/ApexRowExpandingEvent.html +11 -0
- package/docs/interfaces/ApexRowSelectedEvent.html +8 -0
- package/docs/interfaces/ApexRowSelectingEvent.html +11 -0
- package/docs/interfaces/ApexTreeRowExpandedEvent.html +8 -0
- package/docs/interfaces/ApexTreeRowExpandingEvent.html +10 -0
- package/docs/interfaces/BaseApexCellContext.html +16 -0
- package/docs/interfaces/BaseApexEditorContext.html +19 -0
- package/docs/interfaces/BaseColumnConfiguration.html +83 -0
- package/docs/interfaces/BaseColumnSortConfiguration.html +6 -0
- package/docs/interfaces/BaseFilterExpression.html +15 -0
- package/docs/interfaces/BaseSortExpression.html +12 -0
- package/docs/interfaces/CSVExportOptions.html +22 -0
- package/docs/interfaces/ColumnFilterConfiguration.html +4 -0
- package/docs/interfaces/DataPipelineConfiguration.html +15 -0
- package/docs/interfaces/ExportOptions.html +15 -0
- package/docs/interfaces/GridEditingConfiguration.html +10 -0
- package/docs/interfaces/GridExpansionConfiguration.html +15 -0
- package/docs/interfaces/GridSelectionConfiguration.html +11 -0
- package/docs/interfaces/GridSortConfiguration.html +6 -0
- package/docs/interfaces/GridTreeConfiguration.html +33 -0
- package/docs/interfaces/PaginationConfiguration.html +18 -0
- package/docs/interfaces/PaginationState.html +10 -0
- package/docs/interfaces/XLSXExportOptions.html +17 -0
- package/docs/media/package.json +83 -0
- package/docs/media/publish.yml +111 -0
- package/docs/modules.html +1 -0
- package/docs/types/ApexCellContext.html +2 -0
- package/docs/types/ApexEditorContext.html +2 -0
- package/docs/types/BasePropertyType.html +2 -0
- package/docs/types/BaseSortComparer.html +2 -0
- package/docs/types/ColumnConfiguration.html +2 -0
- package/docs/types/ColumnDropPosition.html +2 -0
- package/docs/types/ColumnSortConfiguration.html +2 -0
- package/docs/types/DataPipelineHook.html +2 -0
- package/docs/types/DataPipelineParams.html +8 -0
- package/docs/types/DataType.html +30 -0
- package/docs/types/EditMode.html +6 -0
- package/docs/types/EditTrigger.html +4 -0
- package/docs/types/ExportCellValue.html +5 -0
- package/docs/types/ExportSource.html +8 -0
- package/docs/types/FilterCriteria.html +6 -0
- package/docs/types/FilterExpression.html +2 -0
- package/docs/types/Keys.html +2 -0
- package/docs/types/PaginationMode.html +6 -0
- package/docs/types/PinPosition.html +5 -0
- package/docs/types/PropertyType.html +2 -0
- package/docs/types/SelectionMode.html +7 -0
- package/docs/types/SortComparer.html +2 -0
- package/docs/types/SortExpression.html +2 -0
- package/docs/types/SortState.html +2 -0
- package/docs/types/SortingDirection.html +3 -0
- package/index.d.ts +11 -0
- package/{dist/src/index.js → index.js} +1 -0
- package/index.js.map +1 -0
- package/internal/column-types.d.ts +94 -0
- package/internal/column-types.js +268 -0
- package/internal/column-types.js.map +1 -0
- package/{dist/src/internal → internal}/constants.d.ts +0 -1
- package/internal/constants.js.map +1 -0
- package/internal/export.d.ts +106 -0
- package/internal/export.js +122 -0
- package/internal/export.js.map +1 -0
- package/internal/flip.d.ts +80 -0
- package/internal/flip.js +52 -0
- package/internal/flip.js.map +1 -0
- package/internal/icons.d.ts +24 -0
- package/internal/icons.js +134 -0
- package/internal/icons.js.map +1 -0
- package/{dist/src/internal → internal}/is-defined.d.ts +0 -1
- package/internal/is-defined.js.map +1 -0
- package/{dist/src/internal → internal}/mixins/event-emitter.d.ts +0 -1
- package/internal/mixins/event-emitter.js.map +1 -0
- package/{dist/src/internal → internal}/normalize-case.d.ts +0 -1
- package/internal/normalize-case.js.map +1 -0
- package/{dist/src/internal → internal}/part-map.d.ts +0 -1
- package/{dist/src/internal → internal}/part-map.js +1 -1
- package/internal/part-map.js.map +1 -0
- package/{dist/src/internal → internal}/register.d.ts +3 -4
- package/internal/register.js +9 -0
- package/internal/register.js.map +1 -0
- package/{dist/src/internal → internal}/tags.d.ts +2 -1
- package/{dist/src/internal → internal}/tags.js +2 -0
- package/internal/tags.js.map +1 -0
- package/internal/theming.d.ts +34 -0
- package/internal/theming.js +123 -0
- package/internal/theming.js.map +1 -0
- package/internal/types.d.ts +619 -0
- package/internal/types.js.map +1 -0
- package/internal/utils.d.ts +29 -0
- package/internal/utils.js +75 -0
- package/internal/utils.js.map +1 -0
- package/{dist/src/internal → internal}/watch.d.ts +0 -1
- package/{dist/src/internal → internal}/watch.js +2 -2
- package/internal/watch.js.map +1 -0
- package/internal/xlsx.d.ts +22 -0
- package/internal/xlsx.js +228 -0
- package/internal/xlsx.js.map +1 -0
- package/{dist/src/operations → operations}/base.d.ts +0 -1
- package/operations/base.js.map +1 -0
- package/{dist/src/operations → operations}/filter/operands/boolean.d.ts +0 -1
- package/{dist/src/operations → operations}/filter/operands/boolean.js +5 -5
- package/operations/filter/operands/boolean.js.map +1 -0
- package/{dist/src/operations → operations}/filter/operands/number.d.ts +0 -1
- package/{dist/src/operations → operations}/filter/operands/number.js +2 -2
- package/operations/filter/operands/number.js.map +1 -0
- package/{dist/src/operations → operations}/filter/operands/string.d.ts +0 -1
- package/{dist/src/operations → operations}/filter/operands/string.js +2 -2
- package/operations/filter/operands/string.js.map +1 -0
- package/{dist/src/operations → operations}/filter/state.d.ts +1 -2
- package/{dist/src/operations → operations}/filter/state.js +3 -4
- package/operations/filter/state.js.map +1 -0
- package/{dist/src/operations → operations}/filter/tree.d.ts +1 -2
- package/{dist/src/operations → operations}/filter/tree.js +5 -6
- package/operations/filter/tree.js.map +1 -0
- package/{dist/src/operations → operations}/filter/types.d.ts +0 -1
- package/operations/filter/types.js.map +1 -0
- package/{dist/src/operations → operations}/filter.d.ts +0 -1
- package/{dist/src/operations → operations}/filter.js +4 -7
- package/operations/filter.js.map +1 -0
- package/operations/pagination.d.ts +19 -0
- package/operations/pagination.js +12 -0
- package/operations/pagination.js.map +1 -0
- package/operations/quick-filter.d.ts +21 -0
- package/operations/quick-filter.js +26 -0
- package/operations/quick-filter.js.map +1 -0
- package/{dist/src/operations → operations}/sort/types.d.ts +0 -1
- package/operations/sort/types.js.map +1 -0
- package/{dist/src/operations → operations}/sort.d.ts +0 -1
- package/{dist/src/operations → operations}/sort.js +5 -5
- package/operations/sort.js.map +1 -0
- package/package.json +25 -83
- package/setup.d.ts +58 -0
- package/setup.js +29 -0
- package/setup.js.map +1 -0
- package/{dist/src/styles/body-row/body-row-styles.css.d.ts → styles/_common.css.d.ts} +0 -1
- package/styles/_common.css.js +3 -0
- package/styles/_common.css.js.map +1 -0
- package/{dist/src/styles/body-cell/body-cell-styles.css.d.ts → styles/body-cell/body-cell.css.d.ts} +0 -1
- package/styles/body-cell/body-cell.css.js +3 -0
- package/styles/body-cell/body-cell.css.js.map +1 -0
- package/{dist/src/styles/filter-row/filter-row-styles.css.d.ts → styles/body-row/body-row.css.d.ts} +0 -1
- package/styles/body-row/body-row.css.js +3 -0
- package/styles/body-row/body-row.css.js.map +1 -0
- package/{dist/src/styles/grid/themes/light/grid.fluent-styles.css.d.ts → styles/filter-row/filter-row.css.d.ts} +0 -1
- package/styles/filter-row/filter-row.css.js +3 -0
- package/styles/filter-row/filter-row.css.js.map +1 -0
- package/styles/grid/_grid.base.css.d.ts +1 -0
- package/styles/grid/_grid.base.css.js +3 -0
- package/styles/grid/_grid.base.css.js.map +1 -0
- package/styles/grid/themes/light/grid.bootstrap.css.d.ts +1 -0
- package/styles/grid/themes/light/grid.bootstrap.css.js +3 -0
- package/styles/grid/themes/light/grid.bootstrap.css.js.map +1 -0
- package/styles/grid/themes/light/grid.fluent.css.d.ts +1 -0
- package/styles/grid/themes/light/grid.fluent.css.js +3 -0
- package/styles/grid/themes/light/grid.fluent.css.js.map +1 -0
- package/styles/grid/themes/light/grid.indigo.css.d.ts +1 -0
- package/styles/grid/themes/light/grid.indigo.css.js +3 -0
- package/styles/grid/themes/light/grid.indigo.css.js.map +1 -0
- package/styles/grid/themes/light/grid.material.css.d.ts +1 -0
- package/styles/grid/themes/light/grid.material.css.js +3 -0
- package/styles/grid/themes/light/grid.material.css.js.map +1 -0
- package/styles/header-cell/header-cell.css.d.ts +1 -0
- package/styles/header-cell/header-cell.css.js +3 -0
- package/styles/header-cell/header-cell.css.js.map +1 -0
- package/styles/header-row/header-row.base.css.d.ts +1 -0
- package/styles/header-row/header-row.base.css.js +3 -0
- package/styles/header-row/header-row.base.css.js.map +1 -0
- package/styles/paginator/paginator.css.d.ts +1 -0
- package/styles/paginator/paginator.css.js +3 -0
- package/styles/paginator/paginator.css.js.map +1 -0
- package/styles/toolbar/toolbar.css.d.ts +1 -0
- package/styles/toolbar/toolbar.css.js +3 -0
- package/styles/toolbar/toolbar.css.js.map +1 -0
- package/styles.css +17 -0
- package/dist/bundle.js +0 -2194
- package/dist/docs/assets/highlight.css +0 -43
- package/dist/docs/assets/main.js +0 -58
- package/dist/docs/assets/search.js +0 -1
- package/dist/docs/assets/style.css +0 -1365
- package/dist/docs/classes/ApexGrid.html +0 -327
- package/dist/docs/index.html +0 -82
- package/dist/docs/interfaces/ApexFilteredEvent.html +0 -104
- package/dist/docs/interfaces/ApexFilteringEvent.html +0 -116
- package/dist/docs/interfaces/ApexGridEventMap.html +0 -127
- package/dist/docs/interfaces/ApexHeaderContext.html +0 -104
- package/dist/docs/interfaces/BaseApexCellContext.html +0 -120
- package/dist/docs/interfaces/BaseColumnConfiguration.html +0 -196
- package/dist/docs/interfaces/BaseColumnSortConfiguration.html +0 -106
- package/dist/docs/interfaces/BaseFilterExpression.html +0 -132
- package/dist/docs/interfaces/BaseSortExpression.html +0 -124
- package/dist/docs/interfaces/ColumnFilterConfiguration.html +0 -92
- package/dist/docs/interfaces/DataPipelineConfiguration.html +0 -104
- package/dist/docs/interfaces/GridSortConfiguration.html +0 -99
- package/dist/docs/modules.html +0 -102
- package/dist/docs/types/ApexCellContext.html +0 -74
- package/dist/docs/types/BasePropertyType.html +0 -74
- package/dist/docs/types/BaseSortComparer.html +0 -89
- package/dist/docs/types/ColumnConfiguration.html +0 -74
- package/dist/docs/types/ColumnSortConfiguration.html +0 -74
- package/dist/docs/types/DataPipelineHook.html +0 -85
- package/dist/docs/types/DataPipelineParams.html +0 -87
- package/dist/docs/types/DataType.html +0 -67
- package/dist/docs/types/FilterCriteria.html +0 -71
- package/dist/docs/types/FilterExpression.html +0 -74
- package/dist/docs/types/Keys.html +0 -72
- package/dist/docs/types/PropertyType.html +0 -74
- package/dist/docs/types/SortComparer.html +0 -74
- package/dist/docs/types/SortExpression.html +0 -74
- package/dist/docs/types/SortState.html +0 -72
- package/dist/docs/types/SortingDirection.html +0 -69
- package/dist/src/components/cell.d.ts +0 -36
- package/dist/src/components/cell.d.ts.map +0 -1
- package/dist/src/components/cell.js +0 -55
- package/dist/src/components/cell.js.map +0 -1
- package/dist/src/components/filter-row.d.ts.map +0 -1
- package/dist/src/components/filter-row.js +0 -316
- package/dist/src/components/filter-row.js.map +0 -1
- package/dist/src/components/grid.d.ts +0 -226
- package/dist/src/components/grid.d.ts.map +0 -1
- package/dist/src/components/grid.js +0 -309
- package/dist/src/components/grid.js.map +0 -1
- package/dist/src/components/header-row.d.ts +0 -24
- package/dist/src/components/header-row.d.ts.map +0 -1
- package/dist/src/components/header-row.js +0 -78
- package/dist/src/components/header-row.js.map +0 -1
- package/dist/src/components/header.d.ts.map +0 -1
- package/dist/src/components/header.js +0 -144
- package/dist/src/components/header.js.map +0 -1
- package/dist/src/components/row.d.ts +0 -25
- package/dist/src/components/row.d.ts.map +0 -1
- package/dist/src/components/row.js +0 -68
- package/dist/src/components/row.js.map +0 -1
- package/dist/src/components/virtualizer.d.ts.map +0 -1
- package/dist/src/components/virtualizer.js.map +0 -1
- package/dist/src/controllers/data-operation.d.ts +0 -18
- package/dist/src/controllers/data-operation.d.ts.map +0 -1
- package/dist/src/controllers/data-operation.js +0 -37
- package/dist/src/controllers/data-operation.js.map +0 -1
- package/dist/src/controllers/dom.d.ts +0 -20
- package/dist/src/controllers/dom.d.ts.map +0 -1
- package/dist/src/controllers/dom.js +0 -60
- package/dist/src/controllers/dom.js.map +0 -1
- package/dist/src/controllers/filter.d.ts.map +0 -1
- package/dist/src/controllers/filter.js +0 -119
- package/dist/src/controllers/filter.js.map +0 -1
- package/dist/src/controllers/navigation.d.ts.map +0 -1
- package/dist/src/controllers/navigation.js.map +0 -1
- package/dist/src/controllers/resize.d.ts.map +0 -1
- package/dist/src/controllers/resize.js +0 -70
- package/dist/src/controllers/resize.js.map +0 -1
- package/dist/src/controllers/sort.d.ts.map +0 -1
- package/dist/src/controllers/sort.js +0 -94
- package/dist/src/controllers/sort.js.map +0 -1
- package/dist/src/controllers/state.d.ts +0 -25
- package/dist/src/controllers/state.d.ts.map +0 -1
- package/dist/src/controllers/state.js +0 -40
- package/dist/src/controllers/state.js.map +0 -1
- package/dist/src/define.d.ts.map +0 -1
- package/dist/src/define.js.map +0 -1
- package/dist/src/index.d.ts +0 -9
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js.map +0 -1
- package/dist/src/internal/constants.d.ts.map +0 -1
- package/dist/src/internal/constants.js.map +0 -1
- package/dist/src/internal/icon-registry.d.ts +0 -2
- package/dist/src/internal/icon-registry.d.ts.map +0 -1
- package/dist/src/internal/icon-registry.js +0 -29
- package/dist/src/internal/icon-registry.js.map +0 -1
- package/dist/src/internal/is-defined.d.ts.map +0 -1
- package/dist/src/internal/is-defined.js.map +0 -1
- package/dist/src/internal/mixins/event-emitter.d.ts.map +0 -1
- package/dist/src/internal/mixins/event-emitter.js.map +0 -1
- package/dist/src/internal/normalize-case.d.ts.map +0 -1
- package/dist/src/internal/normalize-case.js.map +0 -1
- package/dist/src/internal/part-map.d.ts.map +0 -1
- package/dist/src/internal/part-map.js.map +0 -1
- package/dist/src/internal/register.d.ts.map +0 -1
- package/dist/src/internal/register.js +0 -9
- package/dist/src/internal/register.js.map +0 -1
- package/dist/src/internal/tags.d.ts.map +0 -1
- package/dist/src/internal/tags.js.map +0 -1
- package/dist/src/internal/types.d.ts +0 -199
- package/dist/src/internal/types.d.ts.map +0 -1
- package/dist/src/internal/types.js.map +0 -1
- package/dist/src/internal/utils.d.ts +0 -7
- package/dist/src/internal/utils.d.ts.map +0 -1
- package/dist/src/internal/utils.js +0 -37
- package/dist/src/internal/utils.js.map +0 -1
- package/dist/src/internal/watch.d.ts.map +0 -1
- package/dist/src/internal/watch.js.map +0 -1
- package/dist/src/operations/base.d.ts.map +0 -1
- package/dist/src/operations/base.js.map +0 -1
- package/dist/src/operations/filter/operands/boolean.d.ts.map +0 -1
- package/dist/src/operations/filter/operands/boolean.js.map +0 -1
- package/dist/src/operations/filter/operands/number.d.ts.map +0 -1
- package/dist/src/operations/filter/operands/number.js.map +0 -1
- package/dist/src/operations/filter/operands/string.d.ts.map +0 -1
- package/dist/src/operations/filter/operands/string.js.map +0 -1
- package/dist/src/operations/filter/state.d.ts.map +0 -1
- package/dist/src/operations/filter/state.js.map +0 -1
- package/dist/src/operations/filter/tree.d.ts.map +0 -1
- package/dist/src/operations/filter/tree.js.map +0 -1
- package/dist/src/operations/filter/types.d.ts.map +0 -1
- package/dist/src/operations/filter/types.js.map +0 -1
- package/dist/src/operations/filter.d.ts.map +0 -1
- package/dist/src/operations/filter.js.map +0 -1
- package/dist/src/operations/sort/types.d.ts.map +0 -1
- package/dist/src/operations/sort/types.js.map +0 -1
- package/dist/src/operations/sort.d.ts.map +0 -1
- package/dist/src/operations/sort.js.map +0 -1
- package/dist/src/styles/body-cell/body-cell-styles.css.d.ts.map +0 -1
- package/dist/src/styles/body-cell/body-cell-styles.css.js +0 -71
- package/dist/src/styles/body-cell/body-cell-styles.css.js.map +0 -1
- package/dist/src/styles/body-row/body-row-styles.css.d.ts.map +0 -1
- package/dist/src/styles/body-row/body-row-styles.css.js +0 -38
- package/dist/src/styles/body-row/body-row-styles.css.js.map +0 -1
- package/dist/src/styles/filter-row/filter-row-styles.css.d.ts.map +0 -1
- package/dist/src/styles/filter-row/filter-row-styles.css.js +0 -96
- package/dist/src/styles/filter-row/filter-row-styles.css.js.map +0 -1
- package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.d.ts +0 -2
- package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.d.ts.map +0 -1
- package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.js +0 -83
- package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.js.map +0 -1
- package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.d.ts.map +0 -1
- package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.js +0 -83
- package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.js.map +0 -1
- package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.d.ts +0 -2
- package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.d.ts.map +0 -1
- package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.js +0 -83
- package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.js.map +0 -1
- package/dist/src/styles/grid/themes/light/grid.material-styles.css.d.ts +0 -2
- package/dist/src/styles/grid/themes/light/grid.material-styles.css.d.ts.map +0 -1
- package/dist/src/styles/grid/themes/light/grid.material-styles.css.js +0 -83
- package/dist/src/styles/grid/themes/light/grid.material-styles.css.js.map +0 -1
- package/dist/src/styles/header-cell/header-cell-styles.css.d.ts +0 -2
- package/dist/src/styles/header-cell/header-cell-styles.css.d.ts.map +0 -1
- package/dist/src/styles/header-cell/header-cell-styles.css.js +0 -141
- package/dist/src/styles/header-cell/header-cell-styles.css.js.map +0 -1
- package/dist/src/styles/header-row/header-row.base-styles.css.d.ts +0 -2
- package/dist/src/styles/header-row/header-row.base-styles.css.d.ts.map +0 -1
- package/dist/src/styles/header-row/header-row.base-styles.css.js +0 -35
- package/dist/src/styles/header-row/header-row.base-styles.css.js.map +0 -1
- /package/{dist/src/define.js → define.js} +0 -0
- /package/{dist/docs → docs}/.nojekyll +0 -0
- /package/{dist/src/internal → internal}/constants.js +0 -0
- /package/{dist/src/internal → internal}/is-defined.js +0 -0
- /package/{dist/src/internal → internal}/mixins/event-emitter.js +0 -0
- /package/{dist/src/internal → internal}/normalize-case.js +0 -0
- /package/{dist/src/internal → internal}/types.js +0 -0
- /package/{dist/src/operations → operations}/base.js +0 -0
- /package/{dist/src/operations → operations}/filter/types.js +0 -0
- /package/{dist/src/operations → operations}/sort/types.js +0 -0
package/LICENSE
CHANGED
|
@@ -1,9 +1,80 @@
|
|
|
1
|
-
|
|
1
|
+
## 📄 License Options for ApexCharts
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
ApexCharts is offered under a **dual-license model** to support individuals, startups, and commercial products of all sizes.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### 🔓 Community License (Free)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
For individuals, non-profits, educators, and small businesses with **less than $2 million USD in annual revenue**.
|
|
10
|
+
|
|
11
|
+
✅ What’s allowed:
|
|
12
|
+
|
|
13
|
+
- Personal, educational, or non-profit use
|
|
14
|
+
- Commercial use by small orgs (< $2M annual revenue)
|
|
15
|
+
- Modifications and redistribution (with attribution)
|
|
16
|
+
|
|
17
|
+
🚫 Not allowed:
|
|
18
|
+
|
|
19
|
+
- Use by companies or entities over $2M/year revenue
|
|
20
|
+
- Use in competing charting products
|
|
21
|
+
- Sublicensing under different terms
|
|
22
|
+
|
|
23
|
+
➡ By using ApexCharts under this license, you confirm that **you qualify as a Small Organization**.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### 💼 Commercial License (Paid)
|
|
28
|
+
|
|
29
|
+
Required if **you or your affiliated organization earns $2 million USD or more per year**.
|
|
30
|
+
|
|
31
|
+
✅ What's included:
|
|
32
|
+
|
|
33
|
+
- Use in internal tools and commercial applications
|
|
34
|
+
- Modifications and app-level distribution
|
|
35
|
+
- 12-month subscription with updates & support
|
|
36
|
+
|
|
37
|
+
🚫 Not allowed:
|
|
38
|
+
|
|
39
|
+
- Redistribution in toolkits, SDKs, or platforms
|
|
40
|
+
- Use by unlicensed developers
|
|
41
|
+
- Competing charting products
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### 🔄 OEM / Redistribution License (Paid)
|
|
46
|
+
|
|
47
|
+
Required if you are **embedding ApexCharts into a product or platform used by other people**, such as:
|
|
48
|
+
|
|
49
|
+
- No-code dashboards
|
|
50
|
+
- Developer platforms
|
|
51
|
+
- Embedded BI tools
|
|
52
|
+
- White-labeled apps or SDKs
|
|
53
|
+
|
|
54
|
+
✅ What's included:
|
|
55
|
+
|
|
56
|
+
- Redistribution rights for 1 application or product
|
|
57
|
+
- 12-month subscription with updates & support
|
|
58
|
+
|
|
59
|
+
✅ OEM **not required** if your app simply renders static charts and users **cannot** configure or interact with them.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### ⚠️ License Acceptance
|
|
64
|
+
|
|
65
|
+
By installing ApexCharts (e.g., via `npm install apexcharts`), you are agreeing to the applicable license based on your usage:
|
|
66
|
+
|
|
67
|
+
- Community License (if under $2M revenue)
|
|
68
|
+
- Commercial License (if over $2M revenue)
|
|
69
|
+
- OEM License (if redistributing to third-party users)
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### 🛠 Need a License or Have Questions?
|
|
74
|
+
|
|
75
|
+
📧 Contact us at [sales@apexcharts.com](mailto:sales@apexcharts.com)
|
|
76
|
+
📚 Read full license agreements here: [https://apexcharts.com/license](https://apexcharts.com/license)
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
Thank you for supporting ApexCharts! Your licensing helps keep it free and open for individuals and small teams.
|
package/README.md
CHANGED
|
@@ -1,16 +1,526 @@
|
|
|
1
|
-
# Apex
|
|
2
|
-
[](https://github.com/apexcharts/apexgrid/actions/workflows/node.js.yml)
|
|
3
|
-
[](https://coveralls.io/github/apexcharts/apexgrid?branch=master)
|
|
1
|
+
# Apex Grid
|
|
4
2
|
|
|
3
|
+
[](https://github.com/apexcharts/apex-grid/actions/workflows/node.js.yml)
|
|
4
|
+
[](https://coveralls.io/github/apexcharts/apex-grid?branch=main)
|
|
5
|
+
[](https://www.npmjs.com/package/apex-grid)
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
A Lit-based, framework-agnostic web component data grid. Ships as a single custom element `<apex-grid>` with a rich, opt-in feature set and full TypeScript types.
|
|
7
8
|
|
|
8
|
-
##
|
|
9
|
+
## Features
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
- **Row virtualization** via `@lit-labs/virtualizer` — only ~20 rows in the DOM at any time, regardless of dataset size.
|
|
12
|
+
- **Sorting** — single or multi-column, tri-state (asc / desc / none), per-column comparers.
|
|
13
|
+
- **Filtering** — per-column filter chips with string / number / boolean / date operands, plus a quick-filter (global search) input.
|
|
14
|
+
- **Pagination** — local slicing or remote mode with a `pageChanging` / `pageChanged` event pair; built-in `<apex-grid-paginator>`.
|
|
15
|
+
- **Column pinning** — pin to start or end; visual reordering only, source `columns` array is preserved.
|
|
16
|
+
- **Column reordering** — drag-and-drop with per-column opt-out, constrained to the column's pinning group.
|
|
17
|
+
- **Column resizing** — pointer-driven, with a min-width safeguard.
|
|
18
|
+
- **Inline editing** — cell or row mode, click or double-click trigger, per-column opt-in.
|
|
19
|
+
- **Row selection** — single or multiple, optional checkbox column, full programmatic API.
|
|
20
|
+
- **Row expansion (master-detail)** — opt-in chevron column with a `detailTemplate`.
|
|
21
|
+
- **Tree data (nested rows)** — AG Grid–style `getDataPath` pattern over a flat array.
|
|
22
|
+
- **CSV / XLSX export** — programmatic methods plus an optional toolbar dropdown.
|
|
23
|
+
- **Toolbar** — opt-in `<apex-grid-toolbar>` with debounced quick filter and export menu.
|
|
24
|
+
- **Templating** — slot-based templates for cells, headers, editors, and detail panels.
|
|
25
|
+
- **Theming** — Bootstrap / Fluent / Indigo / Material themes via `igniteui-webcomponents`, with light and dark variants.
|
|
26
|
+
- **Accessibility** — WCAG 2.2 AA semantics (`role="grid"` / `role="treegrid"`, `aria-rowcount`, `aria-colcount`, focus + keyboard navigation).
|
|
27
|
+
- **Provenance-signed npm releases** with OIDC trusted publishing.
|
|
13
28
|
|
|
14
|
-
|
|
29
|
+
---
|
|
15
30
|
|
|
16
|
-
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
### One-call setup
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { setup } from 'apex-grid';
|
|
37
|
+
import 'igniteui-webcomponents/themes/light/bootstrap.css';
|
|
38
|
+
|
|
39
|
+
setup({ theme: 'bootstrap' });
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
That single call registers `<apex-grid>`, calls `configureTheme('bootstrap')`, and adopts a default host stylesheet (`height: 100%; min-height: 240px`). The Ignite UI theme CSS still has to be imported by you — bundlers can't dynamically import CSS portably.
|
|
43
|
+
|
|
44
|
+
### Render the grid
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
import { html, render } from 'lit';
|
|
48
|
+
import 'apex-grid/define';
|
|
49
|
+
import type { ColumnConfiguration } from 'apex-grid';
|
|
50
|
+
|
|
51
|
+
type User = { id: number; name: string; age: number; subscribed: boolean };
|
|
52
|
+
|
|
53
|
+
const data: User[] = [
|
|
54
|
+
{ id: 1, name: 'Ada Lovelace', age: 36, subscribed: true },
|
|
55
|
+
{ id: 2, name: 'Carl Sagan', age: 62, subscribed: false },
|
|
56
|
+
{ id: 3, name: 'Grace Hopper', age: 85, subscribed: true },
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const columns: ColumnConfiguration<User>[] = [
|
|
60
|
+
{ key: 'id', type: 'number', headerText: 'ID', width: '80px', sort: true, filter: true },
|
|
61
|
+
{ key: 'name', type: 'string', headerText: 'Name', width: '240px', sort: true, filter: true },
|
|
62
|
+
{ key: 'age', type: 'number', headerText: 'Age', width: '100px', sort: true, filter: true },
|
|
63
|
+
{ key: 'subscribed', type: 'boolean', headerText: 'Subscribed', width: '140px', sort: true, filter: true },
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
render(
|
|
67
|
+
html`<apex-grid .data=${data} .columns=${columns}></apex-grid>`,
|
|
68
|
+
document.getElementById('app')!,
|
|
69
|
+
);
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
<style>
|
|
74
|
+
apex-grid { height: 480px; }
|
|
75
|
+
</style>
|
|
76
|
+
<div id="app"></div>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Manual setup (four steps)
|
|
82
|
+
|
|
83
|
+
If you'd rather not use `setup()`, this is what it does under the hood. Skipping any step produces a grid that "runs" but renders broken (no borders, no filter UI, or only a few collapsed rows).
|
|
84
|
+
|
|
85
|
+
### 1. Install
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
npm install apex-grid lit
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`igniteui-webcomponents` ships as a transitive dependency — no separate install.
|
|
92
|
+
|
|
93
|
+
### 2. Register the custom element
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import 'apex-grid/define';
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Equivalent long form:
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
import { ApexGrid } from 'apex-grid';
|
|
103
|
+
ApexGrid.register();
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Without this, `<apex-grid>` is an inert unknown element.
|
|
107
|
+
|
|
108
|
+
### 3. Load a theme
|
|
109
|
+
|
|
110
|
+
The grid's filter dropdowns and sort indicators come from `igniteui-webcomponents`. Both the CSS import **and** the `configureTheme()` call are required:
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
import { configureTheme } from 'igniteui-webcomponents';
|
|
114
|
+
import 'igniteui-webcomponents/themes/light/bootstrap.css';
|
|
115
|
+
|
|
116
|
+
configureTheme('bootstrap'); // 'bootstrap' | 'material' | 'fluent' | 'indigo'
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
For dark mode, swap `light` → `dark` in the import path. The name passed to `configureTheme()` must match the imported CSS file.
|
|
120
|
+
|
|
121
|
+
### 4. Size the host
|
|
122
|
+
|
|
123
|
+
`@lit-labs/virtualizer` requires a **bounded height**. Without one, the virtualizer collapses to its natural content height (~150px) and only a few rows ever render.
|
|
124
|
+
|
|
125
|
+
```css
|
|
126
|
+
apex-grid {
|
|
127
|
+
height: 480px; /* any explicit pixel height; % works if the parent has a height */
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
> [!TIP]
|
|
132
|
+
> `import 'apex-grid/styles.css'` ships a default rule that sets `height: 100%` with a `min-height: 240px` fallback.
|
|
133
|
+
|
|
134
|
+
> [!IMPORTANT]
|
|
135
|
+
> **Do not set `display` on `<apex-grid>`.** The component declares `:host { display: grid }` internally for its track layout (header / filter / body). Any consumer rule that sets `display` (including `block`, `flex`, `inline-block`) collapses the grid. If you accidentally do this, the grid emits a one-shot `console.warn` at startup pointing here.
|
|
136
|
+
|
|
137
|
+
### What success looks like
|
|
138
|
+
|
|
139
|
+
When all four steps are in place you should see:
|
|
140
|
+
|
|
141
|
+
- **Visible borders** between rows and columns.
|
|
142
|
+
- **Sort arrows** (↕) next to each header when `sort: true`.
|
|
143
|
+
- A **filter row** below the headers with a "Filter" chip per column when `filter: true`.
|
|
144
|
+
- **Hover state** on rows.
|
|
145
|
+
- **Smooth scrolling** — DevTools shows only ~20 `<apex-grid-row>` elements at any time.
|
|
146
|
+
|
|
147
|
+
### Troubleshooting
|
|
148
|
+
|
|
149
|
+
| What you see | Likely cause |
|
|
150
|
+
|---|---|
|
|
151
|
+
| Bare table, no borders, no filter UI | Step 3 — theme CSS not imported or `configureTheme()` not called |
|
|
152
|
+
| Only ~3 rows visible regardless of data size | Step 4 — no bounded height, **or** consumer CSS sets `display` on `<apex-grid>` (check console for the warning) |
|
|
153
|
+
| `<apex-grid>` blank tag in DOM | Step 2 — element not registered |
|
|
154
|
+
| Columns shown as literal `[object Object]` | `columns=` used as an attribute — must be a **property** (`.columns=${...}` in Lit, `[columns]=` in Angular, `:columns.prop=` in Vue, `el.columns = ...` in vanilla JS) |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Features in depth
|
|
159
|
+
|
|
160
|
+
Each feature below is fully opt-in — you only pay for what you turn on. Snippets assume `const grid = document.querySelector('apex-grid')!`.
|
|
161
|
+
|
|
162
|
+
### Sorting
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
const columns = [
|
|
166
|
+
{ key: 'name', sort: true }, // UI sort + tri-state
|
|
167
|
+
{ key: 'age', sort: { direction: 'desc' } }, // initial state
|
|
168
|
+
];
|
|
169
|
+
|
|
170
|
+
grid.sortConfiguration = { multiple: true, triState: true };
|
|
171
|
+
grid.sort({ key: 'age', direction: 'asc' });
|
|
172
|
+
grid.clearSort(); // or grid.clearSort('age')
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Events: `sorting` (cancellable), `sorted`.
|
|
176
|
+
|
|
177
|
+
### Filtering
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
const columns = [
|
|
181
|
+
{ key: 'name', filter: true }, // UI filter chip
|
|
182
|
+
{ key: 'age', filter: true, type: 'number' }, // operands by type
|
|
183
|
+
];
|
|
184
|
+
|
|
185
|
+
import { StringOperands } from 'apex-grid';
|
|
186
|
+
grid.filter({ key: 'name', condition: StringOperands.contains, searchTerm: 'Ada' });
|
|
187
|
+
grid.clearFilter();
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Operand classes: `StringOperands`, `NumberOperands`, `BooleanOperands`. Events: `filtering` (cancellable), `filtered`.
|
|
191
|
+
|
|
192
|
+
### Quick filter (global search)
|
|
193
|
+
|
|
194
|
+
```ts
|
|
195
|
+
grid.showQuickFilter = true; // renders the toolbar input
|
|
196
|
+
grid.quickFilter = 'ada'; // or: await grid.setQuickFilter('ada')
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Custom matcher via `dataPipelineConfiguration.quickFilter`. Events: `quickFilterChanging` (cancellable), `quickFilterChanged`. Attribute: `show-quick-filter`, `quick-filter`.
|
|
200
|
+
|
|
201
|
+
### Pagination
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
grid.pagination = {
|
|
205
|
+
enabled: true,
|
|
206
|
+
pageSize: 25,
|
|
207
|
+
pageSizeOptions: [10, 25, 50, 100],
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
await grid.gotoPage(2);
|
|
211
|
+
await grid.setPageSize(50);
|
|
212
|
+
grid.nextPage(); grid.previousPage(); grid.firstPage(); grid.lastPage();
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Remote mode:
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
grid.pagination = { enabled: true, mode: 'remote', pageSize: 25, totalItems: 1280 };
|
|
219
|
+
grid.addEventListener('pageChanged', async (e) => {
|
|
220
|
+
grid.data = await fetchPage(e.detail.page, e.detail.pageSize);
|
|
221
|
+
});
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Properties: `page`, `pageSize`, `pageCount`, `totalItems`, `pageItems`. Events: `pageChanging` (cancellable), `pageChanged`.
|
|
225
|
+
|
|
226
|
+
### Column pinning
|
|
227
|
+
|
|
228
|
+
```ts
|
|
229
|
+
const columns = [
|
|
230
|
+
{ key: 'id', pinned: 'start' },
|
|
231
|
+
{ key: 'name' },
|
|
232
|
+
{ key: 'actions', pinned: 'end' },
|
|
233
|
+
];
|
|
234
|
+
|
|
235
|
+
await grid.pinColumn('name', 'start');
|
|
236
|
+
await grid.unpinColumn('name'); // or pinColumn('name', null)
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
The source `columns` array is **not** reordered — only the visual render order changes. Read `grid.displayColumns` for the render order. Events: `columnPinning` (cancellable), `columnPinned`.
|
|
240
|
+
|
|
241
|
+
### Column reordering
|
|
242
|
+
|
|
243
|
+
```html
|
|
244
|
+
<apex-grid column-reordering></apex-grid>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Or programmatic:
|
|
248
|
+
|
|
249
|
+
```ts
|
|
250
|
+
await grid.moveColumn('email', 'name', 'after');
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Per-column opt-out: `{ key: 'id', reorderable: false }`. Reordering is constrained to the column's own pinning group (start / unpinned / end). Events: `columnMoving` (cancellable), `columnMoved`. Attribute: `column-reordering`.
|
|
254
|
+
|
|
255
|
+
### Inline editing
|
|
256
|
+
|
|
257
|
+
```ts
|
|
258
|
+
const columns = [
|
|
259
|
+
{ key: 'name', editable: true },
|
|
260
|
+
{ key: 'age', editable: true, type: 'number' },
|
|
261
|
+
];
|
|
262
|
+
|
|
263
|
+
grid.editing = { enabled: true, mode: 'cell', trigger: 'doubleClick' };
|
|
264
|
+
|
|
265
|
+
await grid.editCell(0, 'name');
|
|
266
|
+
await grid.commitEdit();
|
|
267
|
+
grid.cancelEdit();
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
`mode: 'row'` puts all editable cells in the row into edit together. Properties: `editingCell`, `editingRow`. Events: `cellValueChanging` (cancellable), `cellValueChanged`, plus `rowEditStarted` / `rowEditEnded` in row mode.
|
|
271
|
+
|
|
272
|
+
### Row selection
|
|
273
|
+
|
|
274
|
+
```ts
|
|
275
|
+
grid.selection = { enabled: true, mode: 'multiple', showCheckboxColumn: true };
|
|
276
|
+
|
|
277
|
+
await grid.selectRow(data[0]);
|
|
278
|
+
await grid.toggleRowSelection(data[1]);
|
|
279
|
+
await grid.selectAllRows();
|
|
280
|
+
await grid.clearSelection();
|
|
281
|
+
grid.selectedRows; // snapshot
|
|
282
|
+
grid.selectedRows = [data[2]]; // replace selection (goes through `rowSelecting`)
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Events: `rowSelecting` (cancellable), `rowSelected`.
|
|
286
|
+
|
|
287
|
+
### Row expansion (master-detail)
|
|
288
|
+
|
|
289
|
+
```ts
|
|
290
|
+
grid.expansion = {
|
|
291
|
+
enabled: true,
|
|
292
|
+
detailTemplate: ({ data }) => html`<order-summary .order=${data}></order-summary>`,
|
|
293
|
+
isExpandable: (row) => row.hasDetails,
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
await grid.expandRow(data[0]);
|
|
297
|
+
await grid.toggleRowExpansion(data[0]);
|
|
298
|
+
await grid.expandAllRows();
|
|
299
|
+
await grid.collapseAllRows();
|
|
300
|
+
grid.expandedRows; // snapshot
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Events: `rowExpanding` (cancellable), `rowExpanded`.
|
|
304
|
+
|
|
305
|
+
### Tree data (nested rows)
|
|
306
|
+
|
|
307
|
+
The data array stays **flat**. The grid derives the hierarchy from a `getDataPath(row)` callback that returns the path from root to that row — AG Grid's "tree data" pattern.
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
type Person = { id: number; name: string; title: string; path: string[] };
|
|
311
|
+
|
|
312
|
+
const data: Person[] = [
|
|
313
|
+
{ id: 1, name: 'Adrian', title: 'CEO', path: ['Adrian'] },
|
|
314
|
+
{ id: 2, name: 'Bryan', title: 'VP Eng', path: ['Adrian', 'Bryan'] },
|
|
315
|
+
{ id: 3, name: 'Cara', title: 'Manager', path: ['Adrian', 'Bryan', 'Cara'] },
|
|
316
|
+
];
|
|
317
|
+
|
|
318
|
+
grid.tree = {
|
|
319
|
+
enabled: true,
|
|
320
|
+
getDataPath: (row) => row.path,
|
|
321
|
+
defaultExpanded: 1, // boolean | number — depth to expand
|
|
322
|
+
groupColumnKey: 'name', // which column shows the chevron + indent
|
|
323
|
+
childIndent: 20, // px per depth level
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
await grid.toggleTreeRow(data[0]);
|
|
327
|
+
await grid.expandAllTreeRows();
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Methods: `toggleTreeRow`, `expandTreeRow`, `collapseTreeRow`, `expandAllTreeRows`, `collapseAllTreeRows`, `isTreeRowExpanded`. Events: `treeRowExpanding` (cancellable), `treeRowExpanded`. When tree mode is active, the host element advertises `role="treegrid"`.
|
|
331
|
+
|
|
332
|
+
### CSV / XLSX export
|
|
333
|
+
|
|
334
|
+
Programmatic:
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
grid.exportToCSV(); // downloads data.csv
|
|
338
|
+
grid.exportToCSV({ filename: 'users', source: 'selected' });
|
|
339
|
+
const text = grid.exportToCSV({ filename: '' }); // no download, returns the string
|
|
340
|
+
|
|
341
|
+
grid.exportToXLSX({ filename: 'users', sheetName: 'Users' });
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
`source` can be `'view'` (default — post-filter/post-sort), `'page'`, `'selected'`, or `'all'`. Per-column opt-out: `{ key: 'secret', exportable: false }`. XLSX preserves native cell types for numbers, booleans, and `Date` values.
|
|
345
|
+
|
|
346
|
+
Toolbar dropdown:
|
|
347
|
+
|
|
348
|
+
```html
|
|
349
|
+
<apex-grid show-export></apex-grid>
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
Renders a download icon in the toolbar's trailing actions area; the menu has "Export CSV" and "Export XLSX" entries. Toolbar `exportFilename` overrides the default `data` filename. Attribute: `show-export`.
|
|
353
|
+
|
|
354
|
+
### Toolbar
|
|
355
|
+
|
|
356
|
+
Rendered automatically above the header row when at least one of `show-quick-filter` or `show-export` is on. CSS parts:
|
|
357
|
+
|
|
358
|
+
| Part | What |
|
|
359
|
+
|---|---|
|
|
360
|
+
| `toolbar` | Root container |
|
|
361
|
+
| `toolbar-search` | Quick-filter input wrapper |
|
|
362
|
+
| `search-field` | The bordered input field |
|
|
363
|
+
| `search-icon`, `search-input` | Leading icon, input element |
|
|
364
|
+
| `toolbar-actions` | Trailing actions area |
|
|
365
|
+
| `export-trigger` | Export menu button |
|
|
366
|
+
| `export-menu` | Dropdown panel |
|
|
367
|
+
| `export-menu-item` | Menu item |
|
|
368
|
+
|
|
369
|
+
Search input has a `debounce` attribute (default `200`ms).
|
|
370
|
+
|
|
371
|
+
### Theming
|
|
372
|
+
|
|
373
|
+
Built-in themes: `bootstrap`, `material`, `fluent`, `indigo` — each with `light` and `dark` variants. Switch at runtime via `configureTheme(name)`.
|
|
374
|
+
|
|
375
|
+
Style with CSS parts on the grid, paginator, and toolbar:
|
|
376
|
+
|
|
377
|
+
```css
|
|
378
|
+
apex-grid::part(paginator) { background: var(--surface-2); }
|
|
379
|
+
apex-grid-toolbar::part(search-input) { font-family: var(--font-mono); }
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## API Reference
|
|
385
|
+
|
|
386
|
+
### Properties
|
|
387
|
+
|
|
388
|
+
| Property | Type | Default | Notes |
|
|
389
|
+
|---|---|---|---|
|
|
390
|
+
| `data` | `T[]` | `[]` | Source records (property only) |
|
|
391
|
+
| `columns` | `ColumnConfiguration<T>[]` | `[]` | Column configuration (property only) |
|
|
392
|
+
| `autoGenerate` | `boolean` | `false` | Infer columns from `data[0]` keys. Attr `auto-generate` |
|
|
393
|
+
| `sortConfiguration` | `GridSortConfiguration` | `{ multiple, triState }` | |
|
|
394
|
+
| `dataPipelineConfiguration` | `DataPipelineConfiguration<T>` | — | Custom sort/filter/pagination hooks |
|
|
395
|
+
| `pagination` | `PaginationConfiguration` | — | |
|
|
396
|
+
| `quickFilter` | `string` | `''` | Attr `quick-filter` |
|
|
397
|
+
| `showQuickFilter` | `boolean` | `false` | Attr `show-quick-filter` |
|
|
398
|
+
| `showExport` | `boolean` | `false` | Attr `show-export` |
|
|
399
|
+
| `columnReordering` | `boolean` | `false` | Attr `column-reordering` |
|
|
400
|
+
| `editing` | `GridEditingConfiguration` | — | |
|
|
401
|
+
| `selection` | `GridSelectionConfiguration` | — | |
|
|
402
|
+
| `expansion` | `GridExpansionConfiguration<T>` | — | |
|
|
403
|
+
| `tree` | `GridTreeConfiguration<T>` | — | |
|
|
404
|
+
| `sortExpressions` | `SortExpression<T>[]` | — | Get/set |
|
|
405
|
+
| `filterExpressions` | `FilterExpression<T>[]` | — | Get/set |
|
|
406
|
+
| `selectedRows` | `T[]` | — | Get/set |
|
|
407
|
+
| `expandedRows` | `T[]` | — | Get/set |
|
|
408
|
+
| `page`, `pageSize`, `pageCount`, `totalItems` | `number` | — | |
|
|
409
|
+
| `pageItems` | `readonly T[]` | — | Currently rendered slice |
|
|
410
|
+
| `dataView` | `readonly T[]` | — | Post-filter, post-sort |
|
|
411
|
+
| `displayColumns` | `readonly ColumnConfiguration<T>[]` | — | Render order (pinned start → unpinned → pinned end) |
|
|
412
|
+
| `editingCell` | `{ rowIndex, columnKey } \| null` | — | |
|
|
413
|
+
| `editingRow` | `number \| null` | — | Row-mode only |
|
|
414
|
+
|
|
415
|
+
### Methods
|
|
416
|
+
|
|
417
|
+
```ts
|
|
418
|
+
sort(expr): void
|
|
419
|
+
filter(expr): void
|
|
420
|
+
clearSort(key?): void
|
|
421
|
+
clearFilter(key?): void
|
|
422
|
+
setQuickFilter(value): Promise<boolean>
|
|
423
|
+
|
|
424
|
+
getColumn(keyOrIndex): ColumnConfiguration<T> | undefined
|
|
425
|
+
updateColumns(columns): void
|
|
426
|
+
pinColumn(key, 'start' | 'end' | null): Promise<boolean>
|
|
427
|
+
unpinColumn(key): Promise<boolean>
|
|
428
|
+
moveColumn(fromKey, toKey, 'before' | 'after'): Promise<boolean>
|
|
429
|
+
|
|
430
|
+
gotoPage(page): Promise<boolean>
|
|
431
|
+
setPageSize(size): Promise<boolean>
|
|
432
|
+
nextPage(); previousPage(); firstPage(); lastPage()
|
|
433
|
+
|
|
434
|
+
editCell(rowIndex, columnKey): Promise<boolean>
|
|
435
|
+
editRow(rowIndex): Promise<boolean>
|
|
436
|
+
commitEdit(): Promise<boolean>
|
|
437
|
+
cancelEdit(): void
|
|
438
|
+
|
|
439
|
+
selectRow(row); deselectRow(row); toggleRowSelection(row)
|
|
440
|
+
selectAllRows(); clearSelection(); isRowSelected(row)
|
|
441
|
+
|
|
442
|
+
expandRow(row); collapseRow(row); toggleRowExpansion(row)
|
|
443
|
+
expandAllRows(); collapseAllRows(); isRowExpanded(row)
|
|
444
|
+
|
|
445
|
+
toggleTreeRow(row); expandTreeRow(row); collapseTreeRow(row)
|
|
446
|
+
expandAllTreeRows(); collapseAllTreeRows(); isTreeRowExpanded(row)
|
|
447
|
+
|
|
448
|
+
exportToCSV(options?): string
|
|
449
|
+
exportToXLSX(options?): Uint8Array
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### Events
|
|
453
|
+
|
|
454
|
+
All events bubble and are composed across shadow boundaries. Names ending in `-ing` are cancellable.
|
|
455
|
+
|
|
456
|
+
| Event | Cancellable | Detail |
|
|
457
|
+
|---|---|---|
|
|
458
|
+
| `sorting` / `sorted` | yes / no | `SortExpression<T>[]` |
|
|
459
|
+
| `filtering` / `filtered` | yes / no | `FilterExpression<T>[]` |
|
|
460
|
+
| `quickFilterChanging` / `quickFilterChanged` | yes / no | `{ value, nextValue? }` |
|
|
461
|
+
| `pageChanging` / `pageChanged` | yes / no | `{ page, pageSize, pageCount, totalItems }` |
|
|
462
|
+
| `columnPinning` / `columnPinned` | yes / no | `{ key, previous, next }` / `{ key, pinned }` |
|
|
463
|
+
| `columnMoving` / `columnMoved` | yes / no | `{ key, fromIndex, toKey, position }` / `{ key, fromIndex, toIndex }` |
|
|
464
|
+
| `cellValueChanging` / `cellValueChanged` | yes / no | `{ row, column, value, newValue }` |
|
|
465
|
+
| `rowEditStarted` / `rowEditEnded` | no / no | row context |
|
|
466
|
+
| `rowSelecting` / `rowSelected` | yes / no | `{ added, removed }` |
|
|
467
|
+
| `rowExpanding` / `rowExpanded` | yes / no | row context |
|
|
468
|
+
| `treeRowExpanding` / `treeRowExpanded` | yes / no | row context |
|
|
469
|
+
|
|
470
|
+
Programmatic `sort()` / `filter()` calls are silent — only UI-initiated changes emit `sorting` / `filtering`.
|
|
471
|
+
|
|
472
|
+
### Attributes
|
|
473
|
+
|
|
474
|
+
`auto-generate`, `quick-filter`, `show-quick-filter`, `show-export`, `column-reordering`.
|
|
475
|
+
|
|
476
|
+
### CSS parts
|
|
477
|
+
|
|
478
|
+
| Component | Parts |
|
|
479
|
+
|---|---|
|
|
480
|
+
| `<apex-grid-toolbar>` | `toolbar`, `toolbar-search`, `search-field`, `search-icon`, `search-input`, `toolbar-actions`, `export-trigger`, `export-menu`, `export-menu-item` |
|
|
481
|
+
| `<apex-grid-paginator>` | `paginator`, `paginator-size`, `paginator-info`, `paginator-controls`, `paginator-page` |
|
|
482
|
+
| `<apex-grid-cell>` | `cell`, `editor` |
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
## Framework integration
|
|
487
|
+
|
|
488
|
+
`<apex-grid>` is a standard custom element. Bind properties (not attributes) for `data` / `columns`:
|
|
489
|
+
|
|
490
|
+
| Framework | Syntax |
|
|
491
|
+
|---|---|
|
|
492
|
+
| Lit | `<apex-grid .data=${data} .columns=${columns}>` |
|
|
493
|
+
| Angular | `<apex-grid [data]="data" [columns]="columns">` (use `CUSTOM_ELEMENTS_SCHEMA`) |
|
|
494
|
+
| Vue | `<apex-grid :data.prop="data" :columns.prop="columns">` |
|
|
495
|
+
| React (19+) | `<apex-grid data={data} columns={columns}>` |
|
|
496
|
+
| Vanilla | `el.data = data; el.columns = columns;` |
|
|
497
|
+
|
|
498
|
+
---
|
|
499
|
+
|
|
500
|
+
## Local development
|
|
501
|
+
|
|
502
|
+
```bash
|
|
503
|
+
git clone https://github.com/apexcharts/apex-grid.git
|
|
504
|
+
cd apex-grid
|
|
505
|
+
npm install
|
|
506
|
+
npm start # demo at http://localhost:5173
|
|
507
|
+
npm test # web-test-runner
|
|
508
|
+
npm run lint
|
|
509
|
+
npm run build # builds dist/ + custom-elements.json + typedoc
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
## Releasing
|
|
513
|
+
|
|
514
|
+
Releases are automated by [.github/workflows/publish.yml](.github/workflows/publish.yml):
|
|
515
|
+
|
|
516
|
+
1. Bump `"version"` in [package.json](package.json) — the single source of truth. The build injects it into `dist/package.json`.
|
|
517
|
+
2. Commit with a message starting with `release:` and the same version, e.g. `release: 2.0.0` or `release: 2.0.0-rc.1`.
|
|
518
|
+
3. Push to `main`.
|
|
519
|
+
|
|
520
|
+
The workflow then verifies the version triple-match, runs lint + tests + build, publishes `dist/` to npm with `--provenance` (OIDC trusted publishing — no token in secrets), and creates a `vX.Y.Z` git tag and GitHub Release with auto-generated notes. Pre-release versions (containing `-`) publish under the `next` dist-tag; stable versions under `latest`.
|
|
521
|
+
|
|
522
|
+
Any push whose head commit does not start with `release:` is a no-op for the workflow.
|
|
523
|
+
|
|
524
|
+
## License
|
|
525
|
+
|
|
526
|
+
See [LICENSE.md](LICENSE.md).
|