@one-grid-core/angular 0.2.0 → 0.4.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.
Files changed (102) hide show
  1. package/README.md +55 -9
  2. package/esm2022/lib/components/one-grid/one-grid.component.mjs +244 -11
  3. package/esm2022/lib/components/one-grid-body/one-grid-body.component.mjs +446 -34
  4. package/esm2022/lib/components/one-grid-cell-currency/one-grid-cell-currency.component.mjs +6 -5
  5. package/esm2022/lib/components/one-grid-cell-group-renderer/one-grid-cell-group-renderer.component.mjs +3 -3
  6. package/esm2022/lib/components/one-grid-cell-option-menu/one-grid-cell-option-menu.component.mjs +3 -3
  7. package/esm2022/lib/components/one-grid-checkbox/one-grid-checkbox.component.mjs +7 -18
  8. package/esm2022/lib/components/one-grid-checkbox-header/one-grid-checkbox-header.component.mjs +6 -6
  9. package/esm2022/lib/components/one-grid-header/one-grid-header.component.mjs +221 -17
  10. package/esm2022/lib/components/one-grid-header-menu/one-grid-header-menu.component.mjs +137 -0
  11. package/esm2022/lib/components/one-grid-pagination/one-grid-pagination.component.mjs +6 -5
  12. package/esm2022/lib/components/one-grid-row-action/one-grid-row-action.component.mjs +4 -4
  13. package/esm2022/lib/components/one-grid-row-drag-handle/one-grid-row-drag-handle.component.mjs +5 -3
  14. package/esm2022/lib/components/one-grid-status/one-grid-status.component.mjs +4 -4
  15. package/esm2022/lib/core/directives/one-cell-input-validator.directive.mjs +3 -3
  16. package/esm2022/lib/core/directives/one-cell-renderer-component.directive.mjs +3 -3
  17. package/esm2022/lib/core/directives/one-cell-text-expand.directive.mjs +3 -3
  18. package/esm2022/lib/core/icons/one-grid-icons.mjs +38 -0
  19. package/esm2022/lib/core/instants/one-grid-api.class.mjs +296 -3
  20. package/esm2022/lib/core/models/one-column-def-types.model.mjs +1 -1
  21. package/esm2022/lib/core/models/one-event-types.model.mjs +1 -1
  22. package/esm2022/lib/core/models/one-filter.model.mjs +1 -1
  23. package/esm2022/lib/core/pipes/aria-sort.pipe.mjs +31 -0
  24. package/esm2022/lib/core/pipes/cell-action-button-enable.pipe.mjs +3 -3
  25. package/esm2022/lib/core/pipes/cell-editable.pipe.mjs +3 -3
  26. package/esm2022/lib/core/pipes/cell-invalid.pipe.mjs +3 -3
  27. package/esm2022/lib/core/pipes/cell-key.pipe.mjs +3 -3
  28. package/esm2022/lib/core/pipes/cell-level-padding.pipe.mjs +3 -3
  29. package/esm2022/lib/core/pipes/cell-selected.pipe.mjs +3 -3
  30. package/esm2022/lib/core/pipes/cell-state-renderer.pipe.mjs +3 -3
  31. package/esm2022/lib/core/pipes/column-sort-state.pipe.mjs +3 -3
  32. package/esm2022/lib/core/pipes/header-checkbox-checked.pipe.mjs +3 -3
  33. package/esm2022/lib/core/pipes/header-checkbox-disabled.pipe.mjs +3 -3
  34. package/esm2022/lib/core/pipes/header-checkbox-indeterminate.pipe.mjs +3 -3
  35. package/esm2022/lib/core/services/og-column.service.mjs +153 -30
  36. package/esm2022/lib/core/services/one-grid-cell.service.mjs +39 -15
  37. package/esm2022/lib/helpers/one-cell.helper.mjs +30 -1
  38. package/esm2022/lib/helpers/one-column-def.helper.mjs +16 -1
  39. package/esm2022/lib/helpers/one-csv.helper.mjs +58 -0
  40. package/esm2022/lib/helpers/one-filter.helper.mjs +11 -1
  41. package/esm2022/lib/helpers/one-row-grouping.helper.mjs +103 -0
  42. package/esm2022/lib/index.mjs +3 -1
  43. package/esm2022/lib/one-grid.module.mjs +24 -114
  44. package/fesm2022/one-grid-core-angular.mjs +2322 -823
  45. package/fesm2022/one-grid-core-angular.mjs.map +1 -1
  46. package/lib/components/one-grid/one-grid.component.d.ts +101 -4
  47. package/lib/components/one-grid-body/one-grid-body.component.d.ts +83 -2
  48. package/lib/components/one-grid-cell-currency/one-grid-cell-currency.component.d.ts +1 -1
  49. package/lib/components/one-grid-cell-group-renderer/one-grid-cell-group-renderer.component.d.ts +1 -1
  50. package/lib/components/one-grid-cell-option-menu/one-grid-cell-option-menu.component.d.ts +1 -1
  51. package/lib/components/one-grid-checkbox/one-grid-checkbox.component.d.ts +1 -1
  52. package/lib/components/one-grid-checkbox-header/one-grid-checkbox-header.component.d.ts +1 -1
  53. package/lib/components/one-grid-header/one-grid-header.component.d.ts +69 -4
  54. package/lib/components/one-grid-header-menu/one-grid-header-menu.component.d.ts +52 -0
  55. package/lib/components/one-grid-pagination/one-grid-pagination.component.d.ts +1 -1
  56. package/lib/components/one-grid-row-action/one-grid-row-action.component.d.ts +1 -1
  57. package/lib/components/one-grid-row-drag-handle/one-grid-row-drag-handle.component.d.ts +1 -1
  58. package/lib/components/one-grid-status/one-grid-status.component.d.ts +1 -1
  59. package/lib/core/directives/one-cell-input-validator.directive.d.ts +1 -1
  60. package/lib/core/directives/one-cell-renderer-component.directive.d.ts +1 -1
  61. package/lib/core/directives/one-cell-text-expand.directive.d.ts +1 -1
  62. package/lib/core/icons/one-grid-icons.d.ts +35 -0
  63. package/lib/core/instants/one-grid-api.class.d.ts +115 -1
  64. package/lib/core/models/one-column-def-types.model.d.ts +77 -2
  65. package/lib/core/models/one-event-types.model.d.ts +19 -0
  66. package/lib/core/models/one-filter.model.d.ts +8 -1
  67. package/lib/core/pipes/aria-sort.pipe.d.ts +15 -0
  68. package/lib/core/pipes/cell-action-button-enable.pipe.d.ts +1 -1
  69. package/lib/core/pipes/cell-editable.pipe.d.ts +1 -1
  70. package/lib/core/pipes/cell-invalid.pipe.d.ts +1 -1
  71. package/lib/core/pipes/cell-key.pipe.d.ts +1 -1
  72. package/lib/core/pipes/cell-level-padding.pipe.d.ts +1 -1
  73. package/lib/core/pipes/cell-selected.pipe.d.ts +1 -1
  74. package/lib/core/pipes/cell-state-renderer.pipe.d.ts +1 -1
  75. package/lib/core/pipes/column-sort-state.pipe.d.ts +1 -1
  76. package/lib/core/pipes/header-checkbox-checked.pipe.d.ts +1 -1
  77. package/lib/core/pipes/header-checkbox-disabled.pipe.d.ts +1 -1
  78. package/lib/core/pipes/header-checkbox-indeterminate.pipe.d.ts +1 -1
  79. package/lib/core/services/og-column.service.d.ts +46 -2
  80. package/lib/core/services/one-grid-cell.service.d.ts +16 -3
  81. package/lib/helpers/one-cell.helper.d.ts +17 -0
  82. package/lib/helpers/one-column-def.helper.d.ts +9 -0
  83. package/lib/helpers/one-csv.helper.d.ts +29 -0
  84. package/lib/helpers/one-row-grouping.helper.d.ts +35 -0
  85. package/lib/index.d.ts +2 -0
  86. package/lib/one-grid.module.d.ts +15 -37
  87. package/package.json +1 -1
  88. package/scss/_one-grid.scss +127 -0
  89. package/esm2022/lib/core/pipes/cell-action-button-visible.pipe.mjs +0 -17
  90. package/esm2022/lib/core/pipes/cell-field-value-empty.pipe.mjs +0 -26
  91. package/esm2022/lib/core/pipes/cell-field-value.pipe.mjs +0 -25
  92. package/esm2022/lib/core/pipes/cell-field.pipe.mjs +0 -20
  93. package/esm2022/lib/core/pipes/cell-number-value.pipe.mjs +0 -19
  94. package/esm2022/lib/core/pipes/cell-state-group-renderer.pipe.mjs +0 -21
  95. package/esm2022/lib/core/pipes/cell-value-getter.pipe.mjs +0 -23
  96. package/lib/core/pipes/cell-action-button-visible.pipe.d.ts +0 -9
  97. package/lib/core/pipes/cell-field-value-empty.pipe.d.ts +0 -7
  98. package/lib/core/pipes/cell-field-value.pipe.d.ts +0 -7
  99. package/lib/core/pipes/cell-field.pipe.d.ts +0 -7
  100. package/lib/core/pipes/cell-number-value.pipe.d.ts +0 -7
  101. package/lib/core/pipes/cell-state-group-renderer.pipe.d.ts +0 -9
  102. package/lib/core/pipes/cell-value-getter.pipe.d.ts +0 -9
package/README.md CHANGED
@@ -18,7 +18,21 @@ Requires Angular 17 or newer.
18
18
 
19
19
  ## Usage
20
20
 
21
- Import the module:
21
+ Everything in the library is standalone, so import the component directly:
22
+
23
+ ```ts
24
+ import { OneGridComponent } from '@one-grid-core/angular';
25
+
26
+ @Component({
27
+ standalone: true,
28
+ imports: [OneGridComponent],
29
+ // ...
30
+ })
31
+ export class MyComponent {}
32
+ ```
33
+
34
+ `OneGridModule` still works and exports the same components, for apps that are
35
+ not standalone yet:
22
36
 
23
37
  ```ts
24
38
  import { OneGridModule } from '@one-grid-core/angular';
@@ -29,6 +43,9 @@ import { OneGridModule } from '@one-grid-core/angular';
29
43
  export class AppModule {}
30
44
  ```
31
45
 
46
+ Both paths render identically — the icons the grid draws travel with the
47
+ components, so nothing extra needs registering either way.
48
+
32
49
  Use the component:
33
50
 
34
51
  ```html
@@ -182,31 +199,60 @@ A header is one cell for the whole column, so there is no row: `columnDef`,
182
199
  ## Features
183
200
 
184
201
  - Column definitions with value getters, value formatters, cell renderers and validation
202
+ - Column visibility (`hide` / `api.setColumnVisible`) and a JSON-safe layout
203
+ round-trip (`api.getColumnStateSnapshot` / `api.applyColumnState`)
185
204
  - Sorting, including multi-column through the sort model
186
- - Quick filter and a programmatic column filter model
205
+ - Quick filter and a programmatic column filter model with thirteen operators,
206
+ including negations, inclusive `inRange` and `blank` / `notBlank`
187
207
  - Tree data with expand/collapse and auto group columns
208
+ - Row grouping (`columnDef.rowGroup`, nesting in column order) with
209
+ aggregation (`columnDef.aggFunc`: sum/min/max/avg/count/first/last or a
210
+ custom function over the leaves)
188
211
  - Master/detail nested grids
189
- - Inline cell editing with input validation
212
+ - Inline cell editing with input validation, including a `select` editor whose
213
+ options commit typed values
214
+ - Full-row editing (`editType="fullRow"`): every editable cell of the row
215
+ opens together, Enter or leaving the row commits, Escape abandons
216
+ - Undo/redo of committed cell edits (`[undoRedoCellEditing]`,
217
+ `api.undoCellEditing` / `redoCellEditing`, Ctrl+Z / Ctrl+Y in the grid)
190
218
  - Row and cell selection, header checkbox select-all
191
219
  - Pinned columns (left/right) and pinned rows (top/bottom)
192
220
  - Row drag & drop, operable by pointer or keyboard
193
221
  - Row action buttons and per-cell option menus
194
222
  - Virtual scrolling (Angular CDK)
223
+ - Flex column sizing (`columnDef.flex`) against the grid's own viewport;
224
+ hand-resizing a column takes it out of the flex pool
225
+ - A default column menu behind the header ⋮ button (`[headerMenu]`) — sort,
226
+ pin, hide — with `(headerMenuClick)` still emitted for hosts that bring
227
+ their own
228
+ - A filter row (`[filterRow]`) with an input under every column whose
229
+ `filterable` resolves true, feeding the filter model debounced
230
+ - Client-side pagination (`[clientSidePagination]` + `[pageSize]`): the grid
231
+ slices the filtered rows and drives its own bar; the default mode still
232
+ leaves paging to the host
233
+ - CSV export (`api.getDataAsCsv` / `api.exportDataAsCsv`), through the same
234
+ value getter/formatter pipeline the cells render with
235
+ - Host outputs for sort changes (`sortChanged`), committed cell edits
236
+ (`cellValueChanged`), and completed column drags and resizes
237
+ (`columnMoved` / `columnResized`)
195
238
 
196
239
  ## Not implemented
197
240
 
198
241
  Declared in the public types but inert, and documented as such rather than
199
242
  quietly omitted:
200
243
 
201
- - `columnDef.flex` — no flex sizing; use explicit widths
202
- - `columnDef.filterable` — no filter UI ships; filtering is API-driven
203
244
  - `columnDef.valueSetter` — never invoked, and its signature could not work
204
245
 
205
- No output reaches the host for a committed cell edit or a sort change; read
206
- `api.sortModel` and handle edits through `node.setDataValue`.
246
+ Deliberately out of scope, so nobody goes looking:
207
247
 
208
- Pagination renders a bar and emits navigation intents it does not page your
209
- rows for you.
248
+ - **Pivoting** row grouping aggregates down a tree; turning values into
249
+ columns is a different engine.
250
+ - **A server-side / infinite row model** — the host-driven pagination
251
+ contract plus the sort and filter models *is* this grid's server story:
252
+ page, sort and filter server-side and hand the grid each page. A block
253
+ cache would duplicate that with more machinery.
254
+ - **Cell/row spanning** — incompatible with fixed-height virtual scrolling
255
+ as built.
210
256
 
211
257
  ## License
212
258