argus-table 0.2.1 → 0.3.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 (69) hide show
  1. package/README.md +1 -1
  2. package/dist/argus-column.js +24 -1
  3. package/dist/argus-column.js.map +1 -1
  4. package/dist/argus-table.js +1026 -167
  5. package/dist/argus-table.js.map +1 -1
  6. package/dist/cdn/argus-table.js +74 -50
  7. package/dist/cdn/argus-table.js.map +1 -1
  8. package/dist/controllers/auto-width.js +11 -0
  9. package/dist/controllers/auto-width.js.map +1 -1
  10. package/dist/controllers/column-window.js +139 -0
  11. package/dist/controllers/column-window.js.map +1 -0
  12. package/dist/controllers/data-controller.js +9 -4
  13. package/dist/controllers/data-controller.js.map +1 -1
  14. package/dist/controllers/plugins.js +102 -0
  15. package/dist/controllers/plugins.js.map +1 -0
  16. package/dist/controllers/reorder-drag.js +9 -10
  17. package/dist/controllers/reorder-drag.js.map +1 -1
  18. package/dist/controllers/row-measure.js +121 -0
  19. package/dist/controllers/row-measure.js.map +1 -0
  20. package/dist/controllers/virtual-controller.js +316 -10
  21. package/dist/controllers/virtual-controller.js.map +1 -1
  22. package/dist/core/src/columns/column-order.js +14 -10
  23. package/dist/core/src/columns/column-order.js.map +1 -1
  24. package/dist/core/src/columns/resolve-columns.js +18 -4
  25. package/dist/core/src/columns/resolve-columns.js.map +1 -1
  26. package/dist/core/src/data/page-cache.js +4 -0
  27. package/dist/core/src/data/page-cache.js.map +1 -1
  28. package/dist/core/src/filters/filter.js +185 -0
  29. package/dist/core/src/filters/filter.js.map +1 -0
  30. package/dist/core/src/state/selection.js +70 -0
  31. package/dist/core/src/state/selection.js.map +1 -0
  32. package/dist/core/src/table/create-table.js +239 -64
  33. package/dist/core/src/table/create-table.js.map +1 -1
  34. package/dist/core/src/table/filtered-row-model.js +48 -0
  35. package/dist/core/src/table/filtered-row-model.js.map +1 -0
  36. package/dist/core/src/table/sorted-row-model.js +13 -2
  37. package/dist/core/src/table/sorted-row-model.js.map +1 -1
  38. package/dist/core/src/virtual/column-window.js +72 -0
  39. package/dist/core/src/virtual/column-window.js.map +1 -0
  40. package/dist/core/src/virtual/row-pool.js +2 -1
  41. package/dist/core/src/virtual/row-pool.js.map +1 -1
  42. package/dist/core/src/virtual/row-sizes.js +156 -0
  43. package/dist/core/src/virtual/row-sizes.js.map +1 -0
  44. package/dist/core/src/virtual/scroll-scale.js +41 -3
  45. package/dist/core/src/virtual/scroll-scale.js.map +1 -1
  46. package/dist/custom-elements.json +1320 -74
  47. package/dist/events.js +9 -1
  48. package/dist/events.js.map +1 -1
  49. package/dist/index.d.ts +609 -74
  50. package/dist/index.js +3 -2
  51. package/dist/interactive.js +22 -0
  52. package/dist/interactive.js.map +1 -0
  53. package/dist/max-height.js +22 -8
  54. package/dist/max-height.js.map +1 -1
  55. package/dist/render/body.js +47 -7
  56. package/dist/render/body.js.map +1 -1
  57. package/dist/render/cells.js +14 -11
  58. package/dist/render/cells.js.map +1 -1
  59. package/dist/render/content-directive.js +115 -0
  60. package/dist/render/content-directive.js.map +1 -0
  61. package/dist/render/content.js +20 -9
  62. package/dist/render/content.js.map +1 -1
  63. package/dist/render/header.js +24 -5
  64. package/dist/render/header.js.map +1 -1
  65. package/dist/render/pinned-rows.js +1 -1
  66. package/dist/render/pinned-rows.js.map +1 -1
  67. package/dist/styles/base.js +1 -1
  68. package/dist/styles/base.js.map +1 -1
  69. package/package.json +1 -1
package/dist/events.js CHANGED
@@ -7,10 +7,18 @@ var SORT_CHANGE = "argus-sort-change";
7
7
  var COLUMN_RESIZE = "argus-column-resize";
8
8
  /** Fired when a column was moved (uncontrolled), or with the proposed order (controlled). */
9
9
  var COLUMN_REORDER = "argus-column-reorder";
10
+ /** Fired when a column was pinned or unpinned (uncontrolled), or with the proposed pins (controlled). */
11
+ var COLUMN_PIN = "argus-column-pin";
12
+ /** Fired when a column was hidden or shown (uncontrolled), or with the proposed visibility (controlled). */
13
+ var COLUMN_HIDE = "argus-column-hide";
14
+ /** Fired when a column's filter was set, changed or cleared (uncontrolled), or with the proposed filters (controlled). */
15
+ var COLUMN_FILTER = "argus-column-filter";
10
16
  /** Fired when a body row was clicked, after `argus-cell-click`. */
11
17
  var ROW_CLICK = "argus-row-click";
12
18
  /** Fired when a body cell was clicked, before `argus-row-click`. */
13
19
  var CELL_CLICK = "argus-cell-click";
20
+ /** Fired when the selected rows changed (uncontrolled), or with the proposed ids (controlled). */
21
+ var ROW_SELECT = "argus-row-select";
14
22
  /** Fired after the update when a `dataSource` page failed to load. */
15
23
  var LOAD_ERROR = "argus-load-error";
16
24
  /** Dispatches a bubbling, composed `CustomEvent`, the shape of every public event. */
@@ -21,6 +29,6 @@ function fire(host, name, detail) {
21
29
  composed: true
22
30
  }));
23
31
  }
24
- export { CELL_CLICK, COLUMN_REORDER, COLUMN_RESIZE, LOAD_ERROR, RANGE_CHANGE, ROW_CLICK, SORT_CHANGE, fire };
32
+ export { CELL_CLICK, COLUMN_FILTER, COLUMN_HIDE, COLUMN_PIN, COLUMN_REORDER, COLUMN_RESIZE, LOAD_ERROR, RANGE_CHANGE, ROW_CLICK, ROW_SELECT, SORT_CHANGE, fire };
25
33
 
26
34
  //# sourceMappingURL=events.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import type {\n CellClickDetail,\n ColumnReorderDetail,\n ColumnResizeDetail,\n LoadErrorDetail,\n RangeChangeDetail,\n RowClickDetail,\n SortChangeDetail,\n} from '@argus-table/core';\n\n/** Fired after an update when the visible row range changed. */\nexport const RANGE_CHANGE = 'argus-range-change';\n\n/** Fired after the sort order changed (uncontrolled), or with the proposed order (controlled). */\nexport const SORT_CHANGE = 'argus-sort-change';\n\n/** Fired when a column was resized (uncontrolled), or with the proposed widths (controlled). */\nexport const COLUMN_RESIZE = 'argus-column-resize';\n\n/** Fired when a column was moved (uncontrolled), or with the proposed order (controlled). */\nexport const COLUMN_REORDER = 'argus-column-reorder';\n\n/** Fired when a body row was clicked, after `argus-cell-click`. */\nexport const ROW_CLICK = 'argus-row-click';\n\n/** Fired when a body cell was clicked, before `argus-row-click`. */\nexport const CELL_CLICK = 'argus-cell-click';\n\n/** Fired after the update when a `dataSource` page failed to load. */\nexport const LOAD_ERROR = 'argus-load-error';\n\ndeclare global {\n interface HTMLElementEventMap {\n 'argus-range-change': CustomEvent<RangeChangeDetail>;\n 'argus-sort-change': CustomEvent<SortChangeDetail>;\n 'argus-column-resize': CustomEvent<ColumnResizeDetail>;\n 'argus-column-reorder': CustomEvent<ColumnReorderDetail>;\n 'argus-row-click': CustomEvent<RowClickDetail<unknown>>;\n 'argus-cell-click': CustomEvent<CellClickDetail<unknown>>;\n 'argus-load-error': CustomEvent<LoadErrorDetail>;\n }\n}\n\n/** Dispatches a bubbling, composed `CustomEvent`, the shape of every public event. */\nexport function fire(host: HTMLElement, name: string, detail: unknown): boolean {\n return host.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));\n}\n"],"mappings":";;AAWA,IAAa,eAAe;;AAG5B,IAAa,cAAc;;AAG3B,IAAa,gBAAgB;;AAG7B,IAAa,iBAAiB;;AAG9B,IAAa,YAAY;;AAGzB,IAAa,aAAa;;AAG1B,IAAa,aAAa;;AAe1B,SAAgB,KAAK,MAAmB,MAAc,QAA0B;CAC9E,OAAO,KAAK,cAAc,IAAI,YAAY,MAAM;EAAE;EAAQ,SAAS;EAAM,UAAU;CAAK,CAAC,CAAC;AAC5F"}
1
+ {"version":3,"file":"events.js","names":[],"sources":["../src/events.ts"],"sourcesContent":["import type {\n CellClickDetail,\n ColumnFilterDetail,\n ColumnHideDetail,\n ColumnPinDetail,\n ColumnReorderDetail,\n ColumnResizeDetail,\n LoadErrorDetail,\n RangeChangeDetail,\n RowClickDetail,\n RowSelectDetail,\n SortChangeDetail,\n} from '@argus-table/core';\n\n/** Fired after an update when the visible row range changed. */\nexport const RANGE_CHANGE = 'argus-range-change';\n\n/** Fired after the sort order changed (uncontrolled), or with the proposed order (controlled). */\nexport const SORT_CHANGE = 'argus-sort-change';\n\n/** Fired when a column was resized (uncontrolled), or with the proposed widths (controlled). */\nexport const COLUMN_RESIZE = 'argus-column-resize';\n\n/** Fired when a column was moved (uncontrolled), or with the proposed order (controlled). */\nexport const COLUMN_REORDER = 'argus-column-reorder';\n\n/** Fired when a column was pinned or unpinned (uncontrolled), or with the proposed pins (controlled). */\nexport const COLUMN_PIN = 'argus-column-pin';\n\n/** Fired when a column was hidden or shown (uncontrolled), or with the proposed visibility (controlled). */\nexport const COLUMN_HIDE = 'argus-column-hide';\n\n/** Fired when a column's filter was set, changed or cleared (uncontrolled), or with the proposed filters (controlled). */\nexport const COLUMN_FILTER = 'argus-column-filter';\n\n/** Fired when a body row was clicked, after `argus-cell-click`. */\nexport const ROW_CLICK = 'argus-row-click';\n\n/** Fired when a body cell was clicked, before `argus-row-click`. */\nexport const CELL_CLICK = 'argus-cell-click';\n\n/** Fired when the selected rows changed (uncontrolled), or with the proposed ids (controlled). */\nexport const ROW_SELECT = 'argus-row-select';\n\n/** Fired after the update when a `dataSource` page failed to load. */\nexport const LOAD_ERROR = 'argus-load-error';\n\ndeclare global {\n interface HTMLElementEventMap {\n 'argus-range-change': CustomEvent<RangeChangeDetail>;\n 'argus-sort-change': CustomEvent<SortChangeDetail>;\n 'argus-column-resize': CustomEvent<ColumnResizeDetail>;\n 'argus-column-reorder': CustomEvent<ColumnReorderDetail>;\n 'argus-column-pin': CustomEvent<ColumnPinDetail>;\n 'argus-column-hide': CustomEvent<ColumnHideDetail>;\n 'argus-column-filter': CustomEvent<ColumnFilterDetail>;\n 'argus-row-click': CustomEvent<RowClickDetail<unknown>>;\n 'argus-cell-click': CustomEvent<CellClickDetail<unknown>>;\n 'argus-load-error': CustomEvent<LoadErrorDetail>;\n 'argus-row-select': CustomEvent<RowSelectDetail>;\n }\n}\n\n/** Dispatches a bubbling, composed `CustomEvent`, the shape of every public event. */\nexport function fire(host: HTMLElement, name: string, detail: unknown): boolean {\n return host.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));\n}\n"],"mappings":";;AAeA,IAAa,eAAe;;AAG5B,IAAa,cAAc;;AAG3B,IAAa,gBAAgB;;AAG7B,IAAa,iBAAiB;;AAG9B,IAAa,aAAa;;AAG1B,IAAa,cAAc;;AAG3B,IAAa,gBAAgB;;AAG7B,IAAa,YAAY;;AAGzB,IAAa,aAAa;;AAG1B,IAAa,aAAa;;AAG1B,IAAa,aAAa;;AAmB1B,SAAgB,KAAK,MAAmB,MAAc,QAA0B;CAC9E,OAAO,KAAK,cAAc,IAAI,YAAY,MAAM;EAAE;EAAQ,SAAS;EAAM,UAAU;CAAK,CAAC,CAAC;AAC5F"}