@guiexpert/table 1.1.23 → 1.1.25
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/package.json +7 -4
- package/.eslintrc.json +0 -16
- package/dist/README.md +0 -101
- package/dist/css/main.css +0 -350
- package/dist/css/table-classes.css +0 -42
- package/dist/css/table-color-classes.css +0 -98
- package/dist/css/table-color-vars.css +0 -158
- package/dist/css/table-tree.css +0 -53
- package/dist/package.json +0 -47
- package/doc.css +0 -1565
- package/patch.js +0 -16
- package/src/index.ts +0 -176
- package/src/lib/common/decorator/avoid-double-execution.decorator.ts +0 -21
- package/src/lib/table/action/action-id.type.ts +0 -36
- package/src/lib/table/action/on-action-triggered.if.ts +0 -14
- package/src/lib/table/action/osx-shortcut-actionId-mapping.ts +0 -39
- package/src/lib/table/action/shortcut-actionid-mapping.type.ts +0 -7
- package/src/lib/table/action/shortcut.service.ts +0 -162
- package/src/lib/table/action/windows-shortcut-actionId-mapping.ts +0 -35
- package/src/lib/table/checkbox/checkbox-model.if.ts +0 -16
- package/src/lib/table/checkbox/checkbox-model.ts +0 -62
- package/src/lib/table/checkbox/tree-checkbox-model.ts +0 -123
- package/src/lib/table/color/color-rgb.if.ts +0 -12
- package/src/lib/table/color/color-rgb.ts +0 -10
- package/src/lib/table/color/ge-css-color-util.ts +0 -43
- package/src/lib/table/color/three-color-gradient-arg.if.ts +0 -15
- package/src/lib/table/color/three-color-gradient-arg.ts +0 -14
- package/src/lib/table/color/two-color-gradient-arg.if.ts +0 -12
- package/src/lib/table/color/two-color-gradient-arg.ts +0 -12
- package/src/lib/table/css-vars.ts +0 -243
- package/src/lib/table/data/chunk/chunk.data-event.if.ts +0 -8
- package/src/lib/table/data/chunk/chunk.data-event.ts +0 -27
- package/src/lib/table/data/chunk/request-chunk.if.ts +0 -9
- package/src/lib/table/data/chunk/request-chunk.ts +0 -15
- package/src/lib/table/data/common/aligns.ts +0 -42
- package/src/lib/table/data/common/area-map-factory.ts +0 -20
- package/src/lib/table/data/common/area-map.ts +0 -18
- package/src/lib/table/data/common/area-map.type.ts +0 -5
- package/src/lib/table/data/common/args-adjust-columns-to-row-parent-params.ts +0 -21
- package/src/lib/table/data/common/args-render-cell-div.ts +0 -34
- package/src/lib/table/data/common/boolean-function.ts +0 -16
- package/src/lib/table/data/common/cell-range.ts +0 -66
- package/src/lib/table/data/common/checkbox-column-def.ts +0 -31
- package/src/lib/table/data/common/checked-type.ts +0 -6
- package/src/lib/table/data/common/event/ge-cell-indices.ts +0 -12
- package/src/lib/table/data/common/event/ge-key-event.ts +0 -15
- package/src/lib/table/data/common/event/ge-model-change-event.ts +0 -16
- package/src/lib/table/data/common/event/ge-mouse-event.ts +0 -41
- package/src/lib/table/data/common/event/input/table-cell-update-event.if.ts +0 -58
- package/src/lib/table/data/common/event/input/table-cell-update-event.ts +0 -27
- package/src/lib/table/data/common/filter-function.ts +0 -9
- package/src/lib/table/data/common/get-t.ts +0 -7
- package/src/lib/table/data/common/index-and-px.ts +0 -12
- package/src/lib/table/data/common/size.if.ts +0 -8
- package/src/lib/table/data/common/size.ts +0 -9
- package/src/lib/table/data/common/sizes.ts +0 -35
- package/src/lib/table/data/common/sort-item.ts +0 -14
- package/src/lib/table/data/common/sort-state.type.ts +0 -7
- package/src/lib/table/data/common/tree-arrow.type.ts +0 -8
- package/src/lib/table/data/common/tree-row-if.ts +0 -15
- package/src/lib/table/data/common/tree-row.ts +0 -22
- package/src/lib/table/data/common/value-label.if.ts +0 -6
- package/src/lib/table/data/common/value-label.ts +0 -13
- package/src/lib/table/data/div-scope.type.ts +0 -14
- package/src/lib/table/data/event/mouse-target-data.ts +0 -48
- package/src/lib/table/data/geo-data.ts +0 -16
- package/src/lib/table/data/options/auto-restore-options.if.ts +0 -21
- package/src/lib/table/data/options/auto-restore-options.ts +0 -50
- package/src/lib/table/data/options/default-row-heights.if.ts +0 -5
- package/src/lib/table/data/options/default-row-heights.ts +0 -10
- package/src/lib/table/data/options/header-group-options.if.ts +0 -9
- package/src/lib/table/data/options/header-group-options.ts +0 -23
- package/src/lib/table/data/options/icon.if.ts +0 -20
- package/src/lib/table/data/options/icon.ts +0 -10
- package/src/lib/table/data/options/sorted-options.if.ts +0 -13
- package/src/lib/table/data/options/sorted-options.ts +0 -15
- package/src/lib/table/data/options/table-options.if.ts +0 -240
- package/src/lib/table/data/options/table-options.ts +0 -68
- package/src/lib/table/data/options/tree-options.if.ts +0 -10
- package/src/lib/table/data/options/tree-options.ts +0 -32
- package/src/lib/table/data/side-ident.type.ts +0 -4
- package/src/lib/table/data/table-model-and-options.if.ts +0 -11
- package/src/lib/table/data/table-model-and-options.ts +0 -16
- package/src/lib/table/data/tablemodel/area-ident.type.ts +0 -18
- package/src/lib/table/data/tablemodel/areamodel/abstract-area-model.ts +0 -184
- package/src/lib/table/data/tablemodel/areamodel/area-model-array-of-arrays.ts +0 -63
- package/src/lib/table/data/tablemodel/areamodel/area-model-cell-groups.ts +0 -236
- package/src/lib/table/data/tablemodel/areamodel/area-model-hidden.ts +0 -126
- package/src/lib/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.ts +0 -28
- package/src/lib/table/data/tablemodel/areamodel/area-model-object-array.ts +0 -120
- package/src/lib/table/data/tablemodel/areamodel/area-model-tree.ts +0 -224
- package/src/lib/table/data/tablemodel/areamodel/area-model.if.ts +0 -192
- package/src/lib/table/data/tablemodel/areamodel/area-model.ts +0 -117
- package/src/lib/table/data/tablemodel/areamodel/async-area-model-object-array.ts +0 -110
- package/src/lib/table/data/tablemodel/areamodel/col-and-rowspan-model.ts +0 -64
- package/src/lib/table/data/tablemodel/areamodel/has-default-row-height-if.ts +0 -3
- package/src/lib/table/data/tablemodel/areamodel/object-array-holder.if.ts +0 -8
- package/src/lib/table/data/tablemodel/cellgroup/cell-group-ext.ts +0 -172
- package/src/lib/table/data/tablemodel/cellgroup/cell-group.if.ts +0 -12
- package/src/lib/table/data/tablemodel/cellgroup/cell-group.ts +0 -18
- package/src/lib/table/data/tablemodel/cellgroup/cellgroup-factory.ts +0 -148
- package/src/lib/table/data/tablemodel/column/column-def.if.ts +0 -141
- package/src/lib/table/data/tablemodel/column/column-def.ts +0 -108
- package/src/lib/table/data/tablemodel/padding.ts +0 -12
- package/src/lib/table/data/tablemodel/table-model.if.ts +0 -256
- package/src/lib/table/data/tablemodel/table-model.ts +0 -542
- package/src/lib/table/ele-scope.ts +0 -309
- package/src/lib/table/event-adapter.ts +0 -43
- package/src/lib/table/event-listener.if.ts +0 -32
- package/src/lib/table/factory/table-factory.ts +0 -379
- package/src/lib/table/factory/tree-factory.ts +0 -52
- package/src/lib/table/focus/event-focus-changed-listener.if.ts +0 -8
- package/src/lib/table/focus/focus-model.if.ts +0 -20
- package/src/lib/table/focus/focus-model.ts +0 -76
- package/src/lib/table/focus/focus.type.ts +0 -4
- package/src/lib/table/input-handler.ts +0 -48
- package/src/lib/table/instanceof-workaround.ts +0 -41
- package/src/lib/table/license-manager.ts +0 -47
- package/src/lib/table/mouse-handler.ts +0 -307
- package/src/lib/table/render-scope.ts +0 -1440
- package/src/lib/table/renderer/cell-group-ext-cell-renderer.ts +0 -123
- package/src/lib/table/renderer/cell-render.if.ts +0 -16
- package/src/lib/table/renderer/checkbox-boolean-property-cell-renderer.ts +0 -63
- package/src/lib/table/renderer/checkbox-cell-renderer.ts +0 -39
- package/src/lib/table/renderer/date-to-int-date-cell-renderer.ts +0 -39
- package/src/lib/table/renderer/date-to-iso-cell-renderer.ts +0 -25
- package/src/lib/table/renderer/date-to-locale-date-cell-renderer.ts +0 -24
- package/src/lib/table/renderer/date-to-tec-cell-renderer.ts +0 -28
- package/src/lib/table/renderer/edit/edit-cell-renderer.type.ts +0 -3
- package/src/lib/table/renderer/edit/edit-input-pipe-for-number.ts +0 -6
- package/src/lib/table/renderer/edit/edit-input-pipe.if.ts +0 -15
- package/src/lib/table/renderer/edit/input-cell-renderer.ts +0 -41
- package/src/lib/table/renderer/edit/select-cell-renderer.ts +0 -60
- package/src/lib/table/renderer/male-female-to-icon-cell-renderer.ts +0 -26
- package/src/lib/table/renderer/number-cell-progress-bar-cell-renderer.ts +0 -57
- package/src/lib/table/renderer/number-cell-renderer.ts +0 -38
- package/src/lib/table/renderer/positive-and-negative-number-renderer.ts +0 -45
- package/src/lib/table/renderer/progress-bar-cell-renderer.ts +0 -60
- package/src/lib/table/renderer/renderer-cleanup-fn.type.ts +0 -1
- package/src/lib/table/renderer/renderer.ts +0 -11
- package/src/lib/table/renderer/star-rating-cell-renderer.ts +0 -45
- package/src/lib/table/renderer/true-false-cell-renderer.ts +0 -28
- package/src/lib/table/selection/event-selection-changed-listener.if.ts +0 -8
- package/src/lib/table/selection/multi-rows-selection-model.ts +0 -118
- package/src/lib/table/selection/selection-model.if.ts +0 -56
- package/src/lib/table/selection/selection-model.ts +0 -182
- package/src/lib/table/selection/selection-service.ts +0 -129
- package/src/lib/table/selection/selection.type.ts +0 -6
- package/src/lib/table/service/abstract-store-state.service.ts +0 -105
- package/src/lib/table/service/convenience-dom.service.ts +0 -574
- package/src/lib/table/service/copy-service.if.ts +0 -45
- package/src/lib/table/service/copy-service.ts +0 -130
- package/src/lib/table/service/data/collapsed-expanded.data.ts +0 -11
- package/src/lib/table/service/data/html-style.type.ts +0 -1
- package/src/lib/table/service/dom-service.if.ts +0 -18
- package/src/lib/table/service/ge-filter.service.ts +0 -123
- package/src/lib/table/service/simple-dom-service.ts +0 -55
- package/src/lib/table/service/sorter.service.ts +0 -30
- package/src/lib/table/service/store-state-collapsed-expand.service.ts +0 -76
- package/src/lib/table/service/store-state-scroll-pos.service.ts +0 -40
- package/src/lib/table/service/store-state-sorting.service.ts +0 -41
- package/src/lib/table/service/tree-row.service.ts +0 -32
- package/src/lib/table/table-api.ts +0 -234
- package/src/lib/table/table-scope.ts +0 -770
- package/tsconfig.json +0 -21
- package/tsconfig.lib.json +0 -10
- package/tsconfig.spec.json +0 -25
- package/vite.config.ts +0 -56
- /package/{dist/index.cjs → index.cjs} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/lib → lib}/common/decorator/avoid-double-execution.decorator.d.ts +0 -0
- /package/{dist/lib → lib}/table/action/action-id.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/action/on-action-triggered.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/action/osx-shortcut-actionId-mapping.d.ts +0 -0
- /package/{dist/lib → lib}/table/action/shortcut-actionid-mapping.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/action/shortcut.service.d.ts +0 -0
- /package/{dist/lib → lib}/table/action/windows-shortcut-actionId-mapping.d.ts +0 -0
- /package/{dist/lib → lib}/table/checkbox/checkbox-model.d.ts +0 -0
- /package/{dist/lib → lib}/table/checkbox/checkbox-model.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/checkbox/tree-checkbox-model.d.ts +0 -0
- /package/{dist/lib → lib}/table/color/color-rgb.d.ts +0 -0
- /package/{dist/lib → lib}/table/color/color-rgb.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/color/ge-css-color-util.d.ts +0 -0
- /package/{dist/lib → lib}/table/color/three-color-gradient-arg.d.ts +0 -0
- /package/{dist/lib → lib}/table/color/three-color-gradient-arg.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/color/two-color-gradient-arg.d.ts +0 -0
- /package/{dist/lib → lib}/table/color/two-color-gradient-arg.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/css-vars.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/chunk/chunk.data-event.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/chunk/chunk.data-event.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/chunk/request-chunk.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/chunk/request-chunk.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/aligns.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/area-map-factory.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/area-map.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/area-map.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/args-adjust-columns-to-row-parent-params.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/args-render-cell-div.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/boolean-function.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/cell-range.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/checkbox-column-def.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/checked-type.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/event/ge-cell-indices.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/event/ge-key-event.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/event/ge-model-change-event.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/event/ge-mouse-event.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/event/input/table-cell-update-event.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/event/input/table-cell-update-event.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/filter-function.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/get-t.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/index-and-px.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/size.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/size.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/sizes.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/sort-item.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/sort-state.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/tree-arrow.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/tree-row-if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/tree-row.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/value-label.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/common/value-label.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/div-scope.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/event/mouse-target-data.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/geo-data.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/auto-restore-options.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/auto-restore-options.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/default-row-heights.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/default-row-heights.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/header-group-options.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/header-group-options.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/icon.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/icon.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/sorted-options.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/sorted-options.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/table-options.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/table-options.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/tree-options.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/options/tree-options.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/side-ident.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/table-model-and-options.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/table-model-and-options.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/area-ident.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/abstract-area-model.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/area-model-array-of-arrays.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/area-model-cell-groups.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/area-model-hidden.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/area-model-object-array.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/area-model-tree.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/area-model.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/area-model.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/async-area-model-object-array.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/col-and-rowspan-model.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/has-default-row-height-if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/areamodel/object-array-holder.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/cellgroup/cell-group-ext.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/cellgroup/cell-group.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/cellgroup/cell-group.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/cellgroup/cellgroup-factory.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/column/column-def.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/column/column-def.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/padding.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/table-model.d.ts +0 -0
- /package/{dist/lib → lib}/table/data/tablemodel/table-model.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/ele-scope.d.ts +0 -0
- /package/{dist/lib → lib}/table/event-adapter.d.ts +0 -0
- /package/{dist/lib → lib}/table/event-listener.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/factory/table-factory.d.ts +0 -0
- /package/{dist/lib → lib}/table/factory/tree-factory.d.ts +0 -0
- /package/{dist/lib → lib}/table/focus/event-focus-changed-listener.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/focus/focus-model.d.ts +0 -0
- /package/{dist/lib → lib}/table/focus/focus-model.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/focus/focus.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/input-handler.d.ts +0 -0
- /package/{dist/lib → lib}/table/instanceof-workaround.d.ts +0 -0
- /package/{dist/lib → lib}/table/license-manager.d.ts +0 -0
- /package/{dist/lib → lib}/table/mouse-handler.d.ts +0 -0
- /package/{dist/lib → lib}/table/render-scope.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/cell-group-ext-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/cell-render.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/checkbox-boolean-property-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/checkbox-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/date-to-int-date-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/date-to-iso-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/date-to-locale-date-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/date-to-tec-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/edit/edit-cell-renderer.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/edit/edit-input-pipe-for-number.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/edit/edit-input-pipe.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/edit/input-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/edit/select-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/male-female-to-icon-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/number-cell-progress-bar-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/number-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/positive-and-negative-number-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/progress-bar-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/renderer-cleanup-fn.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/star-rating-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/renderer/true-false-cell-renderer.d.ts +0 -0
- /package/{dist/lib → lib}/table/selection/event-selection-changed-listener.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/selection/multi-rows-selection-model.d.ts +0 -0
- /package/{dist/lib → lib}/table/selection/selection-model.d.ts +0 -0
- /package/{dist/lib → lib}/table/selection/selection-model.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/selection/selection-service.d.ts +0 -0
- /package/{dist/lib → lib}/table/selection/selection.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/abstract-store-state.service.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/convenience-dom.service.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/copy-service.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/copy-service.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/data/collapsed-expanded.data.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/data/html-style.type.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/dom-service.if.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/ge-filter.service.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/simple-dom-service.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/sorter.service.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/store-state-collapsed-expand.service.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/store-state-scroll-pos.service.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/store-state-sorting.service.d.ts +0 -0
- /package/{dist/lib → lib}/table/service/tree-row.service.d.ts +0 -0
- /package/{dist/lib → lib}/table/table-api.d.ts +0 -0
- /package/{dist/lib → lib}/table/table-scope.d.ts +0 -0
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { TableModelIf } from '../data/tablemodel/table-model.if';
|
|
2
|
-
import { SelectionModelIf } from '../selection/selection-model.if';
|
|
3
|
-
import { FocusModelIf } from '../focus/focus-model.if';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export interface CopyServiceIf {
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Copies the selected data from the table to the clipboard.
|
|
10
|
-
*
|
|
11
|
-
* @param {TableModelIf} tableModel - The table model containing the data.
|
|
12
|
-
* @param {SelectionModelIf | undefined} selectionModel - The selection model containing the selected rows/columns.
|
|
13
|
-
* @param {FocusModelIf | undefined} focusModel - The focus model containing the focused cell.
|
|
14
|
-
*
|
|
15
|
-
* @return {Promise<string>} - A promise that resolves with the copied data as a string.
|
|
16
|
-
*/
|
|
17
|
-
copyToClipboard(
|
|
18
|
-
tableModel: TableModelIf,
|
|
19
|
-
selectionModel: SelectionModelIf | undefined,
|
|
20
|
-
focusModel: FocusModelIf | undefined
|
|
21
|
-
): Promise<string>;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Creates content based on the provided table model, selection model, and focus model.
|
|
25
|
-
*
|
|
26
|
-
* @param {TableModelIf} tableModel - The table model representing the data.
|
|
27
|
-
* @param {SelectionModelIf | undefined} selectionModel - The selection model for the table.
|
|
28
|
-
* @param {FocusModelIf | undefined} focusModel - The focus model for the table.
|
|
29
|
-
*
|
|
30
|
-
* @return {Promise<string>} - A promise that resolves to the generated content as a string.
|
|
31
|
-
*/
|
|
32
|
-
createContent(
|
|
33
|
-
tableModel: TableModelIf,
|
|
34
|
-
selectionModel: SelectionModelIf | undefined,
|
|
35
|
-
focusModel: FocusModelIf | undefined
|
|
36
|
-
): Promise<string>;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Copies the content to a specified location.
|
|
40
|
-
*
|
|
41
|
-
* @param {string} content - The content to be copied.
|
|
42
|
-
* @return {Promise<void>} - A Promise that resolves when the content is successfully copied.
|
|
43
|
-
*/
|
|
44
|
-
copyContent(content: string): Promise<void>;
|
|
45
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { TableModelIf } from '../data/tablemodel/table-model.if';
|
|
2
|
-
import { SelectionModelIf } from '../selection/selection-model.if';
|
|
3
|
-
import { FocusModelIf } from '../focus/focus-model.if';
|
|
4
|
-
import { CopyServiceIf } from './copy-service.if';
|
|
5
|
-
import { CellRange } from '../data/common/cell-range';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export class CopyService implements CopyServiceIf {
|
|
9
|
-
|
|
10
|
-
public static columnSeparatorChar = '\t';
|
|
11
|
-
public static rowSeparatorChar = '\n';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Returns the content to be copied based on the provided table model, selection model, and focus model.
|
|
15
|
-
*
|
|
16
|
-
* @param {TableModelIf} tableModel - The table model for data retrieval.
|
|
17
|
-
* @param {SelectionModelIf} selectionModel - The selection model to determine the selected range.
|
|
18
|
-
* @param {FocusModelIf} focusModel - The focus model to determine the focused cell.
|
|
19
|
-
* @return {Promise<string>} A promise that resolves to the copied content as a string.
|
|
20
|
-
* @throws {string} Throws an error if neither selection nor focus is defined.
|
|
21
|
-
*/
|
|
22
|
-
createContent(
|
|
23
|
-
tableModel: TableModelIf,
|
|
24
|
-
selectionModel: SelectionModelIf,
|
|
25
|
-
focusModel: FocusModelIf
|
|
26
|
-
): Promise<string> {
|
|
27
|
-
|
|
28
|
-
return new Promise<string>((resolve, reject) => {
|
|
29
|
-
|
|
30
|
-
if (selectionModel?.hasSelection()) {
|
|
31
|
-
const range: CellRange | undefined = this.mergeRanges(selectionModel.getRanges());
|
|
32
|
-
|
|
33
|
-
if (range) {
|
|
34
|
-
range.c2 = Math.min(range.c2, tableModel.getColumnCount() - 1);
|
|
35
|
-
range.r2 = Math.min(range.r2, tableModel.getBodyModel().getRowCount() - 1);
|
|
36
|
-
const content: Array<string> = [];
|
|
37
|
-
|
|
38
|
-
for (let rowIndex = range.r1; rowIndex <= range.r2; rowIndex++) {
|
|
39
|
-
const rowData: string[] = [];
|
|
40
|
-
for (let columnIndex = range.c1; columnIndex <= range.c2; columnIndex++) {
|
|
41
|
-
const cellValue = selectionModel.isSelected(rowIndex, columnIndex) ? tableModel.getBodyModel().getTextValueAt(rowIndex, columnIndex) : '';
|
|
42
|
-
rowData.push(cellValue);
|
|
43
|
-
}
|
|
44
|
-
content.push(rowData.join(CopyService.columnSeparatorChar));
|
|
45
|
-
}
|
|
46
|
-
return resolve(content.join(CopyService.rowSeparatorChar));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (focusModel) {
|
|
51
|
-
const [r, c] = focusModel.getFocus();
|
|
52
|
-
const content = tableModel.getBodyModel().getTextValueAt(r, c);
|
|
53
|
-
return resolve(content);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
reject('Cannot copy, neither selection nor focus defined.');
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Copy the provided content to the clipboard.
|
|
62
|
-
*
|
|
63
|
-
* @param {string} content - The content to be copied.
|
|
64
|
-
* @return {Promise<void>} A promise that resolves when the content has been successfully copied to the clipboard.
|
|
65
|
-
*/
|
|
66
|
-
copyContent(content: string): Promise<void> {
|
|
67
|
-
return navigator.clipboard.writeText(content);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Asynchronously copies the content of a table to the clipboard.
|
|
72
|
-
*
|
|
73
|
-
* @param {TableModelIf} tableModel - The table model to copy from.
|
|
74
|
-
* @param {SelectionModelIf} selectionModel - The selection model of the table.
|
|
75
|
-
* @param {FocusModelIf} focusModel - The focus model of the table.
|
|
76
|
-
* @returns {Promise<string>} A promise that resolves with the copied text if successful, or rejects if an error occurs.
|
|
77
|
-
*/
|
|
78
|
-
copyToClipboard(
|
|
79
|
-
tableModel: TableModelIf,
|
|
80
|
-
selectionModel: SelectionModelIf,
|
|
81
|
-
focusModel: FocusModelIf
|
|
82
|
-
) {
|
|
83
|
-
return new Promise<string>((resolve, reject) => {
|
|
84
|
-
this
|
|
85
|
-
.createContent(
|
|
86
|
-
tableModel,
|
|
87
|
-
selectionModel,
|
|
88
|
-
focusModel
|
|
89
|
-
)
|
|
90
|
-
.then(text => {
|
|
91
|
-
if (text) {
|
|
92
|
-
this
|
|
93
|
-
.copyContent(text)
|
|
94
|
-
.then(_ => {
|
|
95
|
-
resolve(text);
|
|
96
|
-
})
|
|
97
|
-
.catch(_ => {
|
|
98
|
-
reject();
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
})
|
|
102
|
-
.catch(_ => {
|
|
103
|
-
reject();
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Merges an array of CellRanges into a single merged CellRange.
|
|
110
|
-
*
|
|
111
|
-
* @param {CellRange[]} ranges - The array of CellRanges to be merged.
|
|
112
|
-
* @return {CellRange | undefined} - The merged CellRange, or undefined if the ranges array is empty.
|
|
113
|
-
*/
|
|
114
|
-
private mergeRanges(ranges: CellRange[]): CellRange | undefined {
|
|
115
|
-
let mergedRange: CellRange | undefined;
|
|
116
|
-
for (const range of ranges) {
|
|
117
|
-
if (!mergedRange) {
|
|
118
|
-
mergedRange = new CellRange(range.r1, range.c1, range.r2, range.c2);
|
|
119
|
-
} else {
|
|
120
|
-
mergedRange.r1 = Math.min(mergedRange.r1, range.r1);
|
|
121
|
-
mergedRange.c1 = Math.min(mergedRange.c1, range.c1);
|
|
122
|
-
mergedRange.r2 = Math.max(mergedRange.r2, range.r2);
|
|
123
|
-
mergedRange.c2 = Math.max(mergedRange.c2, range.c2);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return mergedRange;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type HtmlStyle = { [key: string]: string | number };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface DomServiceIf {
|
|
2
|
-
|
|
3
|
-
setStyle(el: any, style: string, value: any): any;
|
|
4
|
-
|
|
5
|
-
addClass(div: HTMLElement, clazz: string): HTMLDivElement;
|
|
6
|
-
|
|
7
|
-
removeClass(div: HTMLElement, clazz: string): HTMLDivElement;
|
|
8
|
-
|
|
9
|
-
createElement<T>(ele: string): T;
|
|
10
|
-
|
|
11
|
-
createText(text: string): HTMLElement;
|
|
12
|
-
|
|
13
|
-
appendText(parent: HTMLDivElement, text: string): HTMLDivElement;
|
|
14
|
-
|
|
15
|
-
appendChild(parent: HTMLElement, child: HTMLElement): void;
|
|
16
|
-
|
|
17
|
-
setAttribute(ele: HTMLElement, key: string, value: string): void;
|
|
18
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
export class GeFilterService {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
filterPredict<T>(
|
|
5
|
-
item: T,
|
|
6
|
-
filterString: string,
|
|
7
|
-
toString: (t: T) => string = this.objectToString.bind(this)
|
|
8
|
-
): boolean {
|
|
9
|
-
|
|
10
|
-
if (!item) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
if (!filterString) {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
filterString = filterString.toLowerCase();
|
|
17
|
-
|
|
18
|
-
const prefixMust = "+";
|
|
19
|
-
const prefixNot = "-";
|
|
20
|
-
const arr = filterString.toLowerCase().split(" ").filter(s => s !== prefixMust && s !== prefixNot && s !== "");
|
|
21
|
-
|
|
22
|
-
const ors: string[] = arr
|
|
23
|
-
.filter(f => !f.startsWith(prefixMust) && !f.startsWith(prefixNot));
|
|
24
|
-
|
|
25
|
-
const musts: string[] = arr
|
|
26
|
-
.filter(f => f.startsWith(prefixMust))
|
|
27
|
-
.map(s => s.replace(/\+/g, ""));
|
|
28
|
-
|
|
29
|
-
const nots: string[] = arr
|
|
30
|
-
.filter(f => f.startsWith(prefixNot))
|
|
31
|
-
.map(s => s.replace(/-/g, ""));
|
|
32
|
-
|
|
33
|
-
let or = !ors.length;
|
|
34
|
-
for (let i = 0; i < ors.length; i++) {
|
|
35
|
-
if (or || toString(item).includes(ors[i])) {
|
|
36
|
-
or = true;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (!or) {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
for (let i = 0; i < musts.length; i++) {
|
|
43
|
-
if (!toString(item).includes(musts[i])) {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
for (let i = 0; i < nots.length; i++) {
|
|
48
|
-
if (toString(item).includes(nots[i])) {
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
filterRows<T>(
|
|
57
|
-
rows: T[],
|
|
58
|
-
filterString: string,
|
|
59
|
-
toString: (t: T) => string = (t: T) => JSON.stringify(t).toLowerCase()
|
|
60
|
-
): T[] {
|
|
61
|
-
|
|
62
|
-
if (!rows) {
|
|
63
|
-
return [];
|
|
64
|
-
}
|
|
65
|
-
if (!filterString) {
|
|
66
|
-
return [...rows];
|
|
67
|
-
}
|
|
68
|
-
filterString = filterString.toLowerCase();
|
|
69
|
-
|
|
70
|
-
const prefixMust = "+";
|
|
71
|
-
const prefixNot = "-";
|
|
72
|
-
const arr = filterString.toLowerCase().split(" ").filter(s => s !== prefixMust && s !== prefixNot && s !== "");
|
|
73
|
-
|
|
74
|
-
const ors: string[] = arr
|
|
75
|
-
.filter(f => !f.startsWith(prefixMust) && !f.startsWith(prefixNot));
|
|
76
|
-
|
|
77
|
-
const musts: string[] = arr
|
|
78
|
-
.filter(f => f.startsWith(prefixMust))
|
|
79
|
-
.map(s => s.replace(/\+/g, ""));
|
|
80
|
-
|
|
81
|
-
const nots: string[] = arr
|
|
82
|
-
.filter(f => f.startsWith(prefixNot))
|
|
83
|
-
.map(s => s.replace(/-/g, ""));
|
|
84
|
-
|
|
85
|
-
return rows?.filter(f => {
|
|
86
|
-
let or = !ors.length;
|
|
87
|
-
for (let i = 0; i < ors.length; i++) {
|
|
88
|
-
if (or || toString(f).includes(ors[i])) {
|
|
89
|
-
or = true;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (!or) {
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
for (let i = 0; i < musts.length; i++) {
|
|
96
|
-
if (!toString(f).includes(musts[i])) {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
for (let i = 0; i < nots.length; i++) {
|
|
101
|
-
if (toString(f).includes(nots[i])) {
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return true;
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
objectToString<T>(o: T): string {
|
|
110
|
-
if (!o) {
|
|
111
|
-
return "";
|
|
112
|
-
}
|
|
113
|
-
const buf: unknown[] = [];
|
|
114
|
-
const keys = Object.keys(o);
|
|
115
|
-
for (let i = 0; i < keys.length; i++) {
|
|
116
|
-
const key = keys[i];
|
|
117
|
-
// @ts-ignore
|
|
118
|
-
buf.push(o[key]);
|
|
119
|
-
}
|
|
120
|
-
return buf.join(" ").toLowerCase();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { DomServiceIf } from "./dom-service.if";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export class SimpleDomService implements DomServiceIf {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
setStyle(el: any, style: string, value: any): any {
|
|
8
|
-
el.style[style] = value;
|
|
9
|
-
return el;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
appendText(parent: HTMLDivElement, text: string): HTMLDivElement {
|
|
14
|
-
const div = this.createText(text);
|
|
15
|
-
this.appendChild(parent, div);
|
|
16
|
-
return div;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
addClass(div: HTMLDivElement, clazz: string) {
|
|
21
|
-
if (clazz.includes(" ")) {
|
|
22
|
-
clazz.split(" ").forEach(c => div.classList.add(c));
|
|
23
|
-
} else {
|
|
24
|
-
div.classList.add(clazz);
|
|
25
|
-
}
|
|
26
|
-
return div;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
removeClass(div: HTMLDivElement, clazz: string) {
|
|
30
|
-
if (clazz.includes(" ")) {
|
|
31
|
-
clazz.split(" ").forEach(c => div.classList.remove(c));
|
|
32
|
-
} else {
|
|
33
|
-
div.classList.remove(clazz);
|
|
34
|
-
}
|
|
35
|
-
return div;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
appendChild(parent: HTMLElement, child: HTMLElement): void {
|
|
39
|
-
parent.appendChild(child);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
createElement<T>(name: string): T {
|
|
43
|
-
return document.createElement(name) as T;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
createText(value: string): any {
|
|
47
|
-
return document.createTextNode(value);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
setAttribute(ele: HTMLElement, key: string, value: string): void {
|
|
51
|
-
ele.setAttribute(key, value);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export class SorterService {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
genericSortComparator(va: any, vb: any, f: number): number {
|
|
5
|
-
if (typeof va === "number" && typeof vb === "number") {
|
|
6
|
-
return f * (va - vb);
|
|
7
|
-
}
|
|
8
|
-
if (typeof va === "string" && typeof vb === "string") {
|
|
9
|
-
return f * (va.localeCompare(vb));
|
|
10
|
-
}
|
|
11
|
-
if (typeof va === "boolean" && typeof vb === "boolean") {
|
|
12
|
-
const a = va ? -1 : 1;
|
|
13
|
-
const b = vb ? -1 : 1;
|
|
14
|
-
return f * (a - b);
|
|
15
|
-
}
|
|
16
|
-
if (va instanceof Date && vb instanceof Date) {
|
|
17
|
-
return f * (va.getTime() - vb.getTime());
|
|
18
|
-
}
|
|
19
|
-
if (va instanceof Array && vb instanceof Array) {
|
|
20
|
-
const arr1: Array<any> = va;
|
|
21
|
-
const arr2: Array<any> = vb;
|
|
22
|
-
if (arr1.length && arr2.length) {
|
|
23
|
-
return this.genericSortComparator(arr1[0], arr2[0], f);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return f * ("" + va).localeCompare(("" + vb));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { AbstractStoreStateService } from "./abstract-store-state.service";
|
|
2
|
-
import { CollapsedExpandedData } from "./data/collapsed-expanded.data";
|
|
3
|
-
import { GetStorageKeyFn } from "../data/options/auto-restore-options.if";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export class StoreStateCollapsedExpandService extends AbstractStoreStateService {
|
|
7
|
-
|
|
8
|
-
private readonly COLLAPSED_EXPANDED_STATE = "collapsedExpandedState";
|
|
9
|
-
private collapsedExpandedState: CollapsedExpandedData = new CollapsedExpandedData();
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
constructor(
|
|
13
|
-
fn: GetStorageKeyFn | undefined) {
|
|
14
|
-
super(fn);
|
|
15
|
-
this.load();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
collapsedExpandedStateGet(): CollapsedExpandedData {
|
|
20
|
-
return this.collapsedExpandedState;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
collapsedExpandedStateIncludes(rowId: (string | number)): boolean {
|
|
24
|
-
return this.collapsedExpandedState.rowIds.includes(rowId);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
collapsedStateIdsPush(id: (string | number)) {
|
|
29
|
-
if (!this.collapsedExpandedState.rowIds.includes(id)) {
|
|
30
|
-
this.collapsedExpandedState.rowIds.push(id);
|
|
31
|
-
this.collapsedExpandedState.allCollapsed = false;
|
|
32
|
-
this.collapsedExpandedState.allExpanded = false;
|
|
33
|
-
this.persist();
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
collapsedStateIdsRemove(id: (string | number)) {
|
|
38
|
-
const idx = this.collapsedExpandedState.rowIds.indexOf(id);
|
|
39
|
-
if (idx !== -1) {
|
|
40
|
-
this.collapsedExpandedState.rowIds.splice(idx, 1);
|
|
41
|
-
this.collapsedExpandedState.allCollapsed = false;
|
|
42
|
-
this.collapsedExpandedState.allExpanded = false;
|
|
43
|
-
this.persist();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
collapsedStateAll(expand: boolean) {
|
|
49
|
-
this.collapsedExpandedState.rowIds = [];
|
|
50
|
-
this.collapsedExpandedState.mode = expand ? "collapsed" : "expanded"; // if all expanded, rowids are the collapsed ones
|
|
51
|
-
this.collapsedExpandedState.allCollapsed = !expand;
|
|
52
|
-
this.collapsedExpandedState.allExpanded = expand;
|
|
53
|
-
this.persist();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
protected override load() {
|
|
58
|
-
const fn = this.getStorageKeyFn;
|
|
59
|
-
if (fn) {
|
|
60
|
-
const key = fn();
|
|
61
|
-
if (key) {
|
|
62
|
-
const subKey2 = key + this.COLLAPSED_EXPANDED_STATE;
|
|
63
|
-
const data = this.loadFromLocalStorage<CollapsedExpandedData>(subKey2);
|
|
64
|
-
if (data) {
|
|
65
|
-
this.collapsedExpandedState = data;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
private persist() {
|
|
72
|
-
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { AbstractStoreStateService } from "./abstract-store-state.service";
|
|
2
|
-
import { GetStorageKeyFn } from "../data/options/auto-restore-options.if";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export class StoreStateScrollPosService extends AbstractStoreStateService {
|
|
6
|
-
|
|
7
|
-
private readonly SCROLL_STATE = "scrollState";
|
|
8
|
-
private scrollOffset: [number, number] = [0, 0];
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
constructor(fn: GetStorageKeyFn | undefined) {
|
|
12
|
-
super(fn);
|
|
13
|
-
this.load();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
getScrollOffset(): [number, number] {
|
|
17
|
-
return this.scrollOffset;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
updateScrollOffset(xy: [number, number]) {
|
|
21
|
-
this.scrollOffset = xy;
|
|
22
|
-
this.checkAndPersistItem(this.SCROLL_STATE, this.scrollOffset);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
protected override load() {
|
|
27
|
-
const fn = this.getStorageKeyFn;
|
|
28
|
-
if (fn) {
|
|
29
|
-
const key = fn();
|
|
30
|
-
if (key) {
|
|
31
|
-
// A main key is given by function from options
|
|
32
|
-
const subKey4 = key + this.SCROLL_STATE;
|
|
33
|
-
let scrollOffset = this.loadFromLocalStorage<[number, number]>(subKey4);
|
|
34
|
-
this.scrollOffset = scrollOffset ? scrollOffset : [0, 0];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { AbstractStoreStateService } from "./abstract-store-state.service";
|
|
2
|
-
import { GetStorageKeyFn } from "../data/options/auto-restore-options.if";
|
|
3
|
-
import { SortItem } from "../data/common/sort-item";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export class StoreStateSortingService extends AbstractStoreStateService {
|
|
7
|
-
|
|
8
|
-
private readonly SORTING_STATE = "sortingState";
|
|
9
|
-
private sortItems: SortItem[] = [];
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
constructor(fn: GetStorageKeyFn | undefined) {
|
|
13
|
-
super(fn);
|
|
14
|
-
this.load();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
getSortItems(): SortItem[] {
|
|
18
|
-
return this.sortItems;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
setSortItems(sortItems: SortItem[]): void {
|
|
22
|
-
this.sortItems = sortItems;
|
|
23
|
-
this.checkAndPersistItem(this.SORTING_STATE, this.sortItems);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
protected override load() {
|
|
28
|
-
const fn = this.getStorageKeyFn;
|
|
29
|
-
if (fn) {
|
|
30
|
-
const key = fn();
|
|
31
|
-
if (key) {
|
|
32
|
-
// A main key is given by function from options
|
|
33
|
-
const subKey = key + this.SORTING_STATE;
|
|
34
|
-
const sortItems = this.loadFromLocalStorage<SortItem[]>(subKey);
|
|
35
|
-
this.sortItems = sortItems ? sortItems : [];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {TreeRowIf} from "../data/common/tree-row-if";
|
|
3
|
-
|
|
4
|
-
export class TreeRowService {
|
|
5
|
-
|
|
6
|
-
flattenTree<T>(
|
|
7
|
-
rows: TreeRowIf<T>[],
|
|
8
|
-
ret: TreeRowIf<T>[] = []
|
|
9
|
-
): TreeRowIf<T>[] {
|
|
10
|
-
|
|
11
|
-
for (const row of rows) {
|
|
12
|
-
if (this.isVisible(row)) {
|
|
13
|
-
ret.push(row);
|
|
14
|
-
}
|
|
15
|
-
if (row.children?.length) {
|
|
16
|
-
this.flattenTree(row.children, ret);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return ret;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
isVisible(row: TreeRowIf<any>): boolean {
|
|
23
|
-
if (!row.parent) {
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
if (!row.parent.expanded) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
return this.isVisible(row.parent);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}
|