@guiexpert/table 1.1.17 → 1.1.20
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/.eslintrc.json +16 -0
- package/dist/README.md +101 -0
- package/dist/css/main.css +350 -0
- package/dist/css/table-classes.css +42 -0
- package/dist/css/table-color-classes.css +98 -0
- package/dist/css/table-color-vars.css +158 -0
- package/dist/css/table-tree.css +53 -0
- package/dist/index.cjs +351 -0
- package/{index.d.ts → dist/index.d.ts} +3 -0
- package/{index.js → dist/index.js} +902 -831
- package/dist/lib/common/decorator/avoid-double-execution.decorator.d.ts +7 -0
- package/{lib → dist/lib}/table/event-listener.if.d.ts +3 -1
- package/dist/lib/table/focus/event-focus-changed-listener.if.d.ts +4 -0
- package/{lib → dist/lib}/table/focus/focus-model.d.ts +6 -0
- package/dist/lib/table/focus/focus-model.if.d.ts +12 -0
- package/dist/lib/table/renderer/positive-and-negative-number-renderer.d.ts +8 -0
- package/dist/lib/table/selection/event-selection-changed-listener.if.d.ts +4 -0
- package/{lib → dist/lib}/table/selection/multi-rows-selection-model.d.ts +9 -0
- package/{lib → dist/lib}/table/selection/selection-model.d.ts +7 -0
- package/{lib → dist/lib}/table/selection/selection-model.if.d.ts +4 -0
- package/{lib → dist/lib}/table/table-scope.d.ts +6 -2
- package/dist/package.json +51 -0
- package/doc.css +1565 -0
- package/package.json +27 -8
- package/patch.js +16 -0
- package/src/index.ts +176 -0
- package/src/lib/common/decorator/avoid-double-execution.decorator.ts +21 -0
- package/src/lib/table/action/action-id.type.ts +36 -0
- package/src/lib/table/action/on-action-triggered.if.ts +14 -0
- package/src/lib/table/action/osx-shortcut-actionId-mapping.ts +39 -0
- package/src/lib/table/action/shortcut-actionid-mapping.type.ts +7 -0
- package/src/lib/table/action/shortcut.service.ts +162 -0
- package/src/lib/table/action/windows-shortcut-actionId-mapping.ts +35 -0
- package/src/lib/table/checkbox/checkbox-model.if.ts +16 -0
- package/src/lib/table/checkbox/checkbox-model.ts +62 -0
- package/src/lib/table/checkbox/tree-checkbox-model.ts +123 -0
- package/src/lib/table/color/color-rgb.if.ts +12 -0
- package/src/lib/table/color/color-rgb.ts +10 -0
- package/src/lib/table/color/ge-css-color-util.ts +43 -0
- package/src/lib/table/color/three-color-gradient-arg.if.ts +15 -0
- package/src/lib/table/color/three-color-gradient-arg.ts +14 -0
- package/src/lib/table/color/two-color-gradient-arg.if.ts +12 -0
- package/src/lib/table/color/two-color-gradient-arg.ts +12 -0
- package/src/lib/table/css-vars.ts +243 -0
- package/src/lib/table/data/chunk/chunk.data-event.if.ts +8 -0
- package/src/lib/table/data/chunk/chunk.data-event.ts +27 -0
- package/src/lib/table/data/chunk/request-chunk.if.ts +9 -0
- package/src/lib/table/data/chunk/request-chunk.ts +15 -0
- package/src/lib/table/data/common/aligns.ts +42 -0
- package/src/lib/table/data/common/area-map-factory.ts +20 -0
- package/src/lib/table/data/common/area-map.ts +18 -0
- package/src/lib/table/data/common/area-map.type.ts +5 -0
- package/src/lib/table/data/common/args-adjust-columns-to-row-parent-params.ts +21 -0
- package/src/lib/table/data/common/args-render-cell-div.ts +34 -0
- package/src/lib/table/data/common/boolean-function.ts +16 -0
- package/src/lib/table/data/common/cell-range.ts +66 -0
- package/src/lib/table/data/common/checkbox-column-def.ts +31 -0
- package/src/lib/table/data/common/checked-type.ts +6 -0
- package/src/lib/table/data/common/event/ge-cell-indices.ts +12 -0
- package/src/lib/table/data/common/event/ge-key-event.ts +15 -0
- package/src/lib/table/data/common/event/ge-model-change-event.ts +16 -0
- package/src/lib/table/data/common/event/ge-mouse-event.ts +41 -0
- package/src/lib/table/data/common/event/input/table-cell-update-event.if.ts +58 -0
- package/src/lib/table/data/common/event/input/table-cell-update-event.ts +27 -0
- package/src/lib/table/data/common/filter-function.ts +9 -0
- package/src/lib/table/data/common/get-t.ts +7 -0
- package/src/lib/table/data/common/index-and-px.ts +12 -0
- package/src/lib/table/data/common/size.if.ts +8 -0
- package/src/lib/table/data/common/size.ts +9 -0
- package/src/lib/table/data/common/sizes.ts +35 -0
- package/src/lib/table/data/common/sort-item.ts +14 -0
- package/src/lib/table/data/common/sort-state.type.ts +7 -0
- package/src/lib/table/data/common/tree-arrow.type.ts +8 -0
- package/src/lib/table/data/common/tree-row-if.ts +15 -0
- package/src/lib/table/data/common/tree-row.ts +22 -0
- package/src/lib/table/data/common/value-label.if.ts +6 -0
- package/src/lib/table/data/common/value-label.ts +13 -0
- package/src/lib/table/data/div-scope.type.ts +14 -0
- package/src/lib/table/data/event/mouse-target-data.ts +48 -0
- package/src/lib/table/data/geo-data.ts +16 -0
- package/src/lib/table/data/options/auto-restore-options.if.ts +21 -0
- package/src/lib/table/data/options/auto-restore-options.ts +50 -0
- package/src/lib/table/data/options/default-row-heights.if.ts +5 -0
- package/src/lib/table/data/options/default-row-heights.ts +10 -0
- package/src/lib/table/data/options/header-group-options.if.ts +9 -0
- package/src/lib/table/data/options/header-group-options.ts +23 -0
- package/src/lib/table/data/options/icon.if.ts +20 -0
- package/src/lib/table/data/options/icon.ts +10 -0
- package/src/lib/table/data/options/sorted-options.if.ts +13 -0
- package/src/lib/table/data/options/sorted-options.ts +15 -0
- package/src/lib/table/data/options/table-options.if.ts +240 -0
- package/src/lib/table/data/options/table-options.ts +68 -0
- package/src/lib/table/data/options/tree-options.if.ts +10 -0
- package/src/lib/table/data/options/tree-options.ts +32 -0
- package/src/lib/table/data/side-ident.type.ts +4 -0
- package/src/lib/table/data/table-model-and-options.if.ts +11 -0
- package/src/lib/table/data/table-model-and-options.ts +16 -0
- package/src/lib/table/data/tablemodel/area-ident.type.ts +18 -0
- package/src/lib/table/data/tablemodel/areamodel/abstract-area-model.ts +184 -0
- package/src/lib/table/data/tablemodel/areamodel/area-model-array-of-arrays.ts +63 -0
- package/src/lib/table/data/tablemodel/areamodel/area-model-cell-groups.ts +236 -0
- package/src/lib/table/data/tablemodel/areamodel/area-model-hidden.ts +126 -0
- package/src/lib/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.ts +28 -0
- package/src/lib/table/data/tablemodel/areamodel/area-model-object-array.ts +120 -0
- package/src/lib/table/data/tablemodel/areamodel/area-model-tree.ts +224 -0
- package/src/lib/table/data/tablemodel/areamodel/area-model.if.ts +192 -0
- package/src/lib/table/data/tablemodel/areamodel/area-model.ts +117 -0
- package/src/lib/table/data/tablemodel/areamodel/async-area-model-object-array.ts +110 -0
- package/src/lib/table/data/tablemodel/areamodel/col-and-rowspan-model.ts +64 -0
- package/src/lib/table/data/tablemodel/areamodel/has-default-row-height-if.ts +3 -0
- package/src/lib/table/data/tablemodel/areamodel/object-array-holder.if.ts +8 -0
- package/src/lib/table/data/tablemodel/cellgroup/cell-group-ext.ts +172 -0
- package/src/lib/table/data/tablemodel/cellgroup/cell-group.if.ts +12 -0
- package/src/lib/table/data/tablemodel/cellgroup/cell-group.ts +18 -0
- package/src/lib/table/data/tablemodel/cellgroup/cellgroup-factory.ts +148 -0
- package/src/lib/table/data/tablemodel/column/column-def.if.ts +141 -0
- package/src/lib/table/data/tablemodel/column/column-def.ts +108 -0
- package/src/lib/table/data/tablemodel/padding.ts +12 -0
- package/src/lib/table/data/tablemodel/table-model.if.ts +256 -0
- package/src/lib/table/data/tablemodel/table-model.ts +542 -0
- package/src/lib/table/ele-scope.ts +309 -0
- package/src/lib/table/event-adapter.ts +43 -0
- package/src/lib/table/event-listener.if.ts +32 -0
- package/src/lib/table/factory/table-factory.ts +379 -0
- package/src/lib/table/factory/tree-factory.ts +52 -0
- package/src/lib/table/focus/event-focus-changed-listener.if.ts +8 -0
- package/src/lib/table/focus/focus-model.if.ts +20 -0
- package/src/lib/table/focus/focus-model.ts +76 -0
- package/src/lib/table/focus/focus.type.ts +4 -0
- package/src/lib/table/input-handler.ts +48 -0
- package/src/lib/table/instanceof-workaround.ts +41 -0
- package/src/lib/table/license-manager.ts +47 -0
- package/src/lib/table/mouse-handler.ts +307 -0
- package/src/lib/table/render-scope.ts +1440 -0
- package/src/lib/table/renderer/cell-group-ext-cell-renderer.ts +123 -0
- package/src/lib/table/renderer/cell-render.if.ts +16 -0
- package/src/lib/table/renderer/checkbox-boolean-property-cell-renderer.ts +63 -0
- package/src/lib/table/renderer/checkbox-cell-renderer.ts +39 -0
- package/src/lib/table/renderer/date-to-int-date-cell-renderer.ts +39 -0
- package/src/lib/table/renderer/date-to-iso-cell-renderer.ts +25 -0
- package/src/lib/table/renderer/date-to-locale-date-cell-renderer.ts +24 -0
- package/src/lib/table/renderer/date-to-tec-cell-renderer.ts +28 -0
- package/src/lib/table/renderer/edit/edit-cell-renderer.type.ts +3 -0
- package/src/lib/table/renderer/edit/edit-input-pipe-for-number.ts +6 -0
- package/src/lib/table/renderer/edit/edit-input-pipe.if.ts +15 -0
- package/src/lib/table/renderer/edit/input-cell-renderer.ts +41 -0
- package/src/lib/table/renderer/edit/select-cell-renderer.ts +60 -0
- package/src/lib/table/renderer/male-female-to-icon-cell-renderer.ts +26 -0
- package/src/lib/table/renderer/number-cell-progress-bar-cell-renderer.ts +57 -0
- package/src/lib/table/renderer/number-cell-renderer.ts +38 -0
- package/src/lib/table/renderer/positive-and-negative-number-renderer.ts +45 -0
- package/src/lib/table/renderer/progress-bar-cell-renderer.ts +60 -0
- package/src/lib/table/renderer/renderer-cleanup-fn.type.ts +1 -0
- package/src/lib/table/renderer/renderer.ts +11 -0
- package/src/lib/table/renderer/star-rating-cell-renderer.ts +45 -0
- package/src/lib/table/renderer/true-false-cell-renderer.ts +28 -0
- package/src/lib/table/selection/event-selection-changed-listener.if.ts +8 -0
- package/src/lib/table/selection/multi-rows-selection-model.ts +118 -0
- package/src/lib/table/selection/selection-model.if.ts +56 -0
- package/src/lib/table/selection/selection-model.ts +182 -0
- package/src/lib/table/selection/selection-service.ts +129 -0
- package/src/lib/table/selection/selection.type.ts +6 -0
- package/src/lib/table/service/abstract-store-state.service.ts +105 -0
- package/src/lib/table/service/convenience-dom.service.ts +574 -0
- package/src/lib/table/service/copy-service.if.ts +45 -0
- package/src/lib/table/service/copy-service.ts +130 -0
- package/src/lib/table/service/data/collapsed-expanded.data.ts +11 -0
- package/src/lib/table/service/data/html-style.type.ts +1 -0
- package/src/lib/table/service/dom-service.if.ts +18 -0
- package/src/lib/table/service/ge-filter.service.ts +123 -0
- package/src/lib/table/service/simple-dom-service.ts +55 -0
- package/src/lib/table/service/sorter.service.ts +30 -0
- package/src/lib/table/service/store-state-collapsed-expand.service.ts +76 -0
- package/src/lib/table/service/store-state-scroll-pos.service.ts +40 -0
- package/src/lib/table/service/store-state-sorting.service.ts +41 -0
- package/src/lib/table/service/tree-row.service.ts +32 -0
- package/src/lib/table/table-api.ts +234 -0
- package/src/lib/table/table-scope.ts +770 -0
- package/tsconfig.json +21 -0
- package/tsconfig.lib.json +10 -0
- package/tsconfig.spec.json +25 -0
- package/vite.config.ts +56 -0
- package/index.cjs +0 -351
- package/lib/table/focus/focus-model.if.d.ts +0 -8
- package/lib/table/renderer/positive-and-negative-number-renderer.d.ts +0 -4
- /package/{lib → dist/lib}/table/action/action-id.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/action/on-action-triggered.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/action/osx-shortcut-actionId-mapping.d.ts +0 -0
- /package/{lib → dist/lib}/table/action/shortcut-actionid-mapping.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/action/shortcut.service.d.ts +0 -0
- /package/{lib → dist/lib}/table/action/windows-shortcut-actionId-mapping.d.ts +0 -0
- /package/{lib → dist/lib}/table/checkbox/checkbox-model.d.ts +0 -0
- /package/{lib → dist/lib}/table/checkbox/checkbox-model.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/checkbox/tree-checkbox-model.d.ts +0 -0
- /package/{lib → dist/lib}/table/color/color-rgb.d.ts +0 -0
- /package/{lib → dist/lib}/table/color/color-rgb.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/color/ge-css-color-util.d.ts +0 -0
- /package/{lib → dist/lib}/table/color/three-color-gradient-arg.d.ts +0 -0
- /package/{lib → dist/lib}/table/color/three-color-gradient-arg.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/color/two-color-gradient-arg.d.ts +0 -0
- /package/{lib → dist/lib}/table/color/two-color-gradient-arg.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/css-vars.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/chunk/chunk.data-event.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/chunk/chunk.data-event.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/chunk/request-chunk.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/chunk/request-chunk.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/aligns.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/area-map-factory.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/area-map.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/area-map.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/args-adjust-columns-to-row-parent-params.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/args-render-cell-div.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/boolean-function.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/cell-range.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/checkbox-column-def.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/checked-type.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/event/ge-cell-indices.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/event/ge-key-event.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/event/ge-model-change-event.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/event/ge-mouse-event.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/event/input/table-cell-update-event.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/event/input/table-cell-update-event.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/filter-function.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/get-t.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/index-and-px.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/size.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/size.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/sizes.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/sort-item.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/sort-state.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/tree-arrow.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/tree-row-if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/tree-row.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/value-label.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/common/value-label.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/div-scope.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/event/mouse-target-data.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/geo-data.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/auto-restore-options.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/auto-restore-options.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/default-row-heights.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/default-row-heights.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/header-group-options.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/header-group-options.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/icon.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/icon.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/sorted-options.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/sorted-options.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/table-options.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/table-options.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/tree-options.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/options/tree-options.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/side-ident.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/table-model-and-options.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/table-model-and-options.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/area-ident.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/abstract-area-model.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/area-model-array-of-arrays.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/area-model-cell-groups.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/area-model-hidden.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/area-model-object-array-with-columndefs.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/area-model-object-array.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/area-model-tree.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/area-model.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/area-model.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/async-area-model-object-array.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/col-and-rowspan-model.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/has-default-row-height-if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/areamodel/object-array-holder.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/cellgroup/cell-group-ext.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/cellgroup/cell-group.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/cellgroup/cell-group.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/cellgroup/cellgroup-factory.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/column/column-def.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/column/column-def.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/padding.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/table-model.d.ts +0 -0
- /package/{lib → dist/lib}/table/data/tablemodel/table-model.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/ele-scope.d.ts +0 -0
- /package/{lib → dist/lib}/table/event-adapter.d.ts +0 -0
- /package/{lib → dist/lib}/table/factory/table-factory.d.ts +0 -0
- /package/{lib → dist/lib}/table/factory/tree-factory.d.ts +0 -0
- /package/{lib → dist/lib}/table/focus/focus.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/input-handler.d.ts +0 -0
- /package/{lib → dist/lib}/table/instanceof-workaround.d.ts +0 -0
- /package/{lib → dist/lib}/table/license-manager.d.ts +0 -0
- /package/{lib → dist/lib}/table/mouse-handler.d.ts +0 -0
- /package/{lib → dist/lib}/table/render-scope.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/cell-group-ext-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/cell-render.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/checkbox-boolean-property-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/checkbox-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/date-to-int-date-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/date-to-iso-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/date-to-locale-date-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/date-to-tec-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/edit/edit-cell-renderer.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/edit/edit-input-pipe-for-number.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/edit/edit-input-pipe.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/edit/input-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/edit/select-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/male-female-to-icon-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/number-cell-progress-bar-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/number-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/progress-bar-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/renderer-cleanup-fn.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/star-rating-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/renderer/true-false-cell-renderer.d.ts +0 -0
- /package/{lib → dist/lib}/table/selection/selection-service.d.ts +0 -0
- /package/{lib → dist/lib}/table/selection/selection.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/abstract-store-state.service.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/convenience-dom.service.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/copy-service.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/copy-service.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/data/collapsed-expanded.data.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/data/html-style.type.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/dom-service.if.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/ge-filter.service.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/simple-dom-service.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/sorter.service.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/store-state-collapsed-expand.service.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/store-state-scroll-pos.service.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/store-state-sorting.service.d.ts +0 -0
- /package/{lib → dist/lib}/table/service/tree-row.service.d.ts +0 -0
- /package/{lib → dist/lib}/table/table-api.d.ts +0 -0
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
function et(c = 500) {
|
|
2
|
+
return function(e, t, o) {
|
|
3
|
+
let i = 0;
|
|
4
|
+
const s = o.value;
|
|
5
|
+
return o.value = function(...r) {
|
|
6
|
+
if (!(Date.now() - i < c))
|
|
7
|
+
return i = Date.now(), s.apply(this, r);
|
|
8
|
+
}, o;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
class L {
|
|
2
12
|
// The constructor is private to prevent direct construction calls
|
|
3
13
|
// with the `new` operator
|
|
4
14
|
constructor() {
|
|
5
15
|
this.alreadySet = !1;
|
|
6
16
|
}
|
|
7
17
|
static getInstance() {
|
|
8
|
-
return
|
|
18
|
+
return L.instance || (L.instance = new L()), L.instance;
|
|
9
19
|
}
|
|
10
20
|
/**
|
|
11
21
|
* Method to set the license key for the application.
|
|
@@ -23,21 +33,21 @@ class P {
|
|
|
23
33
|
}
|
|
24
34
|
}
|
|
25
35
|
}
|
|
26
|
-
function
|
|
36
|
+
function H(c) {
|
|
27
37
|
return c && c.type === "TreeRow";
|
|
28
38
|
}
|
|
29
|
-
function
|
|
39
|
+
function K(c) {
|
|
30
40
|
return c && c.type === "AreaModelTree";
|
|
31
41
|
}
|
|
32
42
|
function ye(c) {
|
|
33
43
|
return c && c.type === "CheckboxColumnDef";
|
|
34
44
|
}
|
|
35
|
-
class
|
|
36
|
-
constructor(e = -1, t = -1, o = -1,
|
|
37
|
-
this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft =
|
|
45
|
+
class Q {
|
|
46
|
+
constructor(e = -1, t = -1, o = -1, i = -1, s, r, l, n = 0, d = 0, a = 0, h = "") {
|
|
47
|
+
this.rowIndex = e, this.rowTop = t, this.columnIndex = o, this.columnLeft = i, this.areaIdent = s, this.sideIdent = r, this.originalEvent = l, this.clickCount = n, this.draggingX = d, this.draggingY = a, this.action = h;
|
|
38
48
|
}
|
|
39
49
|
clone() {
|
|
40
|
-
return new
|
|
50
|
+
return new Q(
|
|
41
51
|
this.rowIndex,
|
|
42
52
|
this.rowTop,
|
|
43
53
|
this.columnIndex,
|
|
@@ -52,34 +62,34 @@ class K {
|
|
|
52
62
|
);
|
|
53
63
|
}
|
|
54
64
|
}
|
|
55
|
-
class
|
|
65
|
+
class $ {
|
|
56
66
|
constructor(e = ">", t = "", o = []) {
|
|
57
67
|
this.content = e, this.style = t, this.classes = o;
|
|
58
68
|
}
|
|
59
69
|
}
|
|
60
|
-
class
|
|
61
|
-
constructor(e = new
|
|
70
|
+
class fe {
|
|
71
|
+
constructor(e = new $(
|
|
62
72
|
">",
|
|
63
73
|
"transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
|
|
64
74
|
["gt-table-tree-arrow-expanded"]
|
|
65
|
-
), t = new
|
|
75
|
+
), t = new $(
|
|
66
76
|
">",
|
|
67
77
|
"",
|
|
68
78
|
["ge-table-tree-arrow-collapsed"]
|
|
69
|
-
), o = new
|
|
79
|
+
), o = new $(
|
|
70
80
|
">",
|
|
71
81
|
"color:transparent;",
|
|
72
82
|
["gt-table-tree-arrow-hidden"]
|
|
73
|
-
),
|
|
83
|
+
), i = new $(
|
|
74
84
|
"↕",
|
|
75
85
|
"",
|
|
76
86
|
["gt-table-tree-arrow-expanded-all"]
|
|
77
87
|
)) {
|
|
78
|
-
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = o, this.arrowExpandCollapseAll =
|
|
88
|
+
this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = o, this.arrowExpandCollapseAll = i;
|
|
79
89
|
}
|
|
80
90
|
}
|
|
81
|
-
class
|
|
82
|
-
constructor(e = new
|
|
91
|
+
class me {
|
|
92
|
+
constructor(e = new $("↑", "", ["ge-header-sorted-asc"]), t = new $("↓", "", ["ge-header-sorted-desc"]), o = new $("↑", "color:transparent;", [])) {
|
|
83
93
|
this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = o;
|
|
84
94
|
}
|
|
85
95
|
}
|
|
@@ -102,7 +112,7 @@ class ve {
|
|
|
102
112
|
return this.domService.setStyle(e, "display", "block"), e;
|
|
103
113
|
}
|
|
104
114
|
applyStyleInPx(e, t) {
|
|
105
|
-
return Object.entries(t).forEach(([o,
|
|
115
|
+
return Object.entries(t).forEach(([o, i]) => this.domService.setStyle(e, o, i + "px")), e;
|
|
106
116
|
}
|
|
107
117
|
applyStylePosistionRelative(e) {
|
|
108
118
|
return this.domService.setStyle(e, "position", "relative"), this.domService.setStyle(e, "overflow", "clip"), e;
|
|
@@ -148,116 +158,116 @@ class ve {
|
|
|
148
158
|
setAttribute(e, t, o) {
|
|
149
159
|
return t && o && this.domService.setAttribute(e, t, o), e;
|
|
150
160
|
}
|
|
151
|
-
createAreaDivWithClass(e, t, o,
|
|
152
|
-
const
|
|
153
|
-
return this.addClass(e,
|
|
161
|
+
createAreaDivWithClass(e, t, o, i) {
|
|
162
|
+
const s = this.domService.createElement("div");
|
|
163
|
+
return this.addClass(e, s), this.domService.setAttribute(s, "data-area", o), this.domService.setAttribute(s, "data-side", i), this.domService.appendChild(t, s), s;
|
|
154
164
|
}
|
|
155
165
|
createDivWithClass(e, t) {
|
|
156
166
|
const o = this.domService.createElement("div");
|
|
157
167
|
return this.addClass(e, o), this.domService.appendChild(t, o), o;
|
|
158
168
|
}
|
|
159
|
-
addRowDiv(e, t, o = -1,
|
|
160
|
-
const
|
|
161
|
-
if (this.domService.addClass(
|
|
169
|
+
addRowDiv(e, t, o = -1, i, s, r = "") {
|
|
170
|
+
const l = t.index ?? -1, n = this.getDivOrCreateDiv(l, e);
|
|
171
|
+
if (this.domService.addClass(n, "ge-table-row-div"), this.domService.addClass(n, `ge-table-row-div-${t.index}`), i === "body" && s === "center") {
|
|
162
172
|
const d = ((t == null ? void 0 : t.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
163
|
-
this.domService.addClass(
|
|
173
|
+
this.domService.addClass(n, `ge-table-row-${d}`);
|
|
164
174
|
}
|
|
165
|
-
if (this.domService.setStyle(
|
|
175
|
+
if (this.domService.setStyle(n, "display", "clip"), this.domService.setStyle(n, "position", "absolute"), this.domService.setStyle(n, "left", `${t.left}px`), this.domService.setStyle(n, "top", `${t.top}px`), this.domService.setStyle(n, "width", `${t.width}px`), this.domService.setStyle(n, "height", `${t.height}px`), this.domService.setAttribute(n, "data-row-index", `${o}`), this.domService.setAttribute(n, "data-area", `${i}`), r) {
|
|
166
176
|
const d = this.domService.createText(r);
|
|
167
|
-
this.domService.appendChild(
|
|
177
|
+
this.domService.appendChild(n, d);
|
|
168
178
|
}
|
|
169
|
-
return this.domService.appendChild(e.child,
|
|
179
|
+
return this.domService.appendChild(e.child, n), n;
|
|
170
180
|
}
|
|
171
181
|
addColumnDiv(e) {
|
|
172
|
-
const { parent: t, geo: o, rowIndex:
|
|
173
|
-
this.domService.addClass(f, "ge-table-col-div"), this.domService.addClass(f, `ge-table-col-div-${o.index}`), this.domService.setAttribute(f, "data-col-index", `${o.index}`), this.domService.setAttribute(f, "data-row-index", `${
|
|
182
|
+
const { parent: t, geo: o, rowIndex: i = -1, columnIndex: s = -1, areaIdent: r, sideIdent: l, text: n = "", treeArrow: d, tableOptions: a, checkedType: h = void 0, sortState: u } = e, m = a == null ? void 0 : a.treeOptions, b = a == null ? void 0 : a.showCheckboxWihoutExtraColumn, f = this.domService.createElement("div");
|
|
183
|
+
this.domService.addClass(f, "ge-table-col-div"), this.domService.addClass(f, `ge-table-col-div-${o.index}`), this.domService.setAttribute(f, "data-col-index", `${o.index}`), this.domService.setAttribute(f, "data-row-index", `${i}`), this.domService.setAttribute(f, "data-area", `${r}`);
|
|
174
184
|
const g = ((o == null ? void 0 : o.index) ?? 0) % 2 === 0 ? "even" : "odd";
|
|
175
|
-
if (r === "body" &&
|
|
176
|
-
const p = d !== "none" &&
|
|
177
|
-
this.addLabelDiv(f,
|
|
185
|
+
if (r === "body" && l === "center" && this.domService.addClass(f, `ge-table-column-${g}`), this.domService.setStyle(f, "display", "clip"), this.domService.setStyle(f, "position", "absolute"), this.domService.setStyle(f, "left", `${o.left}px`), this.domService.setStyle(f, "top", `${o.top}px`), this.domService.setStyle(f, "width", `${o.width}px`), this.domService.setStyle(f, "height", `${o.height}px`), d && d !== "none" && (this.domService.addClass(f, "ge-table-col-tree"), this.addArrowDiv(f, d, m, i, s, r)), b && s === 0 && h && this.addCheckboxToDiv(f, h, r, i), n) {
|
|
186
|
+
const p = d !== "none" && s === 0;
|
|
187
|
+
this.addLabelDiv(f, n, p, i, s, r);
|
|
178
188
|
}
|
|
179
|
-
return u && this.addSortedIcon(f, u, a == null ? void 0 : a.sortedOptions,
|
|
189
|
+
return u && this.addSortedIcon(f, u, a == null ? void 0 : a.sortedOptions, s), this.domService.appendChild(t, f), f;
|
|
180
190
|
}
|
|
181
|
-
addCheckboxToDiv(e, t, o,
|
|
182
|
-
const
|
|
183
|
-
return
|
|
191
|
+
addCheckboxToDiv(e, t, o, i) {
|
|
192
|
+
const s = this.domService.createElement("div"), r = t === "full" ? "checked" : "";
|
|
193
|
+
return s.innerHTML = `
|
|
184
194
|
<input
|
|
185
195
|
type="checkbox"
|
|
186
196
|
data-area="${o}"
|
|
187
|
-
data-row-index="${
|
|
197
|
+
data-row-index="${i}"
|
|
188
198
|
data-input-type="checkbox"
|
|
189
199
|
${r}
|
|
190
|
-
class="ge-table-row-checkbox"> `, this.domService.setStyle(
|
|
200
|
+
class="ge-table-row-checkbox"> `, this.domService.setStyle(s, "display", "inline"), this.domService.setStyle(s, "width", "inherit"), this.domService.setAttribute(s, "data-row-index", `${i}`), this.domService.appendChild(e, s), s;
|
|
191
201
|
}
|
|
192
|
-
addLabelDiv(e, t = "", o = !1,
|
|
193
|
-
const
|
|
194
|
-
if (this.domService.addClass(
|
|
202
|
+
addLabelDiv(e, t = "", o = !1, i = -1, s = -1, r = "body") {
|
|
203
|
+
const l = this.domService.createElement("div");
|
|
204
|
+
if (this.domService.addClass(l, "ge-table-label-div"), this.domService.setStyle(l, "position", "relative"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "width", "100%"), this.domService.setStyle(l, "height", "100%"), this.domService.setAttribute(l, "data-row-index", `${i}`), this.domService.setAttribute(l, "data-col-index", `${s}`), this.domService.setAttribute(l, "data-area", `${r}`), t)
|
|
195
205
|
if (o) {
|
|
196
|
-
const
|
|
197
|
-
this.domService.appendChild(
|
|
206
|
+
const n = this.domService.createText(t);
|
|
207
|
+
this.domService.appendChild(l, n);
|
|
198
208
|
} else {
|
|
199
|
-
const
|
|
200
|
-
this.domService.appendChild(
|
|
209
|
+
const n = this.domService.createElement("div");
|
|
210
|
+
this.domService.appendChild(l, n);
|
|
201
211
|
const d = this.domService.createText(t);
|
|
202
|
-
this.domService.addClass(
|
|
212
|
+
this.domService.addClass(n, "ge-table-label"), this.domService.appendChild(n, d), this.domService.setAttribute(n, "data-row-index", `${i}`), this.domService.setAttribute(n, "data-col-index", `${s}`), this.domService.setAttribute(n, "data-area", `${r}`);
|
|
203
213
|
}
|
|
204
|
-
return this.domService.appendChild(e,
|
|
214
|
+
return this.domService.appendChild(e, l), l;
|
|
205
215
|
}
|
|
206
|
-
addSortedIcon(e, t = "", o = new
|
|
207
|
-
const
|
|
208
|
-
this.domService.addClass(
|
|
216
|
+
addSortedIcon(e, t = "", o = new me(), i = -1) {
|
|
217
|
+
const s = this.domService.createElement("div");
|
|
218
|
+
this.domService.addClass(s, "ge-table-sorted-icon-div"), this.domService.setStyle(s, "position", "absolute"), this.domService.setStyle(s, "top", "0"), this.domService.setStyle(s, "right", "0"), this.domService.setStyle(s, "width", "20px"), this.domService.setStyle(s, "background", "transparent"), this.domService.setStyle(s, "cursor", "pointer"), this.domService.setAttribute(s, "data-col-index", `${i}`), this.domService.setAttribute(s, "data-area", "header");
|
|
209
219
|
let r;
|
|
210
220
|
t === "asc" ? r = o.iconAsc : t === "desc" ? r = o.iconDesc : r = o.iconPlaceholder;
|
|
211
|
-
const
|
|
212
|
-
this.domService.appendChild(
|
|
221
|
+
const l = r.content, n = this.domService.createText(l);
|
|
222
|
+
this.domService.appendChild(s, n), r.style && this.applyStyleString(s, r.style);
|
|
213
223
|
for (const d of r.classes)
|
|
214
|
-
this.domService.addClass(
|
|
215
|
-
return this.domService.appendChild(e,
|
|
216
|
-
}
|
|
217
|
-
addArrowDiv(e, t = "none", o = new
|
|
218
|
-
const
|
|
219
|
-
this.domService.addClass(
|
|
220
|
-
let
|
|
221
|
-
t === "expanded" ?
|
|
222
|
-
const d =
|
|
223
|
-
this.domService.appendChild(
|
|
224
|
-
for (const h of
|
|
225
|
-
this.domService.addClass(
|
|
226
|
-
return this.domService.appendChild(e,
|
|
227
|
-
}
|
|
228
|
-
addColumnBorderDivs(e, t, o,
|
|
224
|
+
this.domService.addClass(s, d);
|
|
225
|
+
return this.domService.appendChild(e, s), s;
|
|
226
|
+
}
|
|
227
|
+
addArrowDiv(e, t = "none", o = new fe(), i = -1, s = -1, r = "body") {
|
|
228
|
+
const l = this.domService.createElement("div");
|
|
229
|
+
this.domService.addClass(l, "ge-table-tree-arrow-div"), this.domService.setStyle(l, "display", "inline-block"), this.domService.setStyle(l, "position", ""), this.domService.setStyle(l, "width", "20px"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "cursor", "pointer"), this.domService.setAttribute(l, "data-row-index", `${i}`), this.domService.setAttribute(l, "data-col-index", `${s}`), this.domService.setAttribute(l, "data-area", `${r}`);
|
|
230
|
+
let n;
|
|
231
|
+
t === "expanded" ? n = o.arrowExpanded : t === "collapsed" ? n = o.arrowCollapsed : n = o.arrowPlaceholder;
|
|
232
|
+
const d = n.content, a = this.domService.createText(d);
|
|
233
|
+
this.domService.appendChild(l, a), n.style && this.applyStyleString(l, n.style);
|
|
234
|
+
for (const h of n.classes)
|
|
235
|
+
this.domService.addClass(l, h);
|
|
236
|
+
return this.domService.appendChild(e, l), l;
|
|
237
|
+
}
|
|
238
|
+
addColumnBorderDivs(e, t, o, i, s) {
|
|
229
239
|
if (e.verticalBorderVisible) {
|
|
230
|
-
const r = `ge-table-${
|
|
240
|
+
const r = `ge-table-${i}-${s}-vertical-border`;
|
|
231
241
|
this.addVerticalBorder(o, t, r);
|
|
232
242
|
}
|
|
233
243
|
if (e.horizontalBorderVisible) {
|
|
234
|
-
const r = `ge-table-${
|
|
244
|
+
const r = `ge-table-${i}-${s}-horizontal-border`;
|
|
235
245
|
this.addHorizontalBorder(o, t, r);
|
|
236
246
|
}
|
|
237
247
|
return t;
|
|
238
248
|
}
|
|
239
249
|
addHorizontalBorder(e, t, o = "ge-table-body-center-horizontal-border") {
|
|
240
|
-
const
|
|
241
|
-
return this.domService.addClass(
|
|
250
|
+
const i = this.domService.createElement("div");
|
|
251
|
+
return this.domService.addClass(i, o), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${e.left}px`), this.domService.setStyle(i, "top", `${e.top}px`), this.domService.setStyle(i, "width", `${e.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.appendChild(t, i), i;
|
|
242
252
|
}
|
|
243
253
|
addFocusBorderDivs(e, t, o) {
|
|
244
254
|
t = { ...t, width: t.width + 1, height: t.height + 1 };
|
|
245
|
-
let
|
|
246
|
-
return this.domService.addClass(
|
|
255
|
+
let i = this.domService.createElement("div");
|
|
256
|
+
return this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, o), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left + t.width - 1}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, o), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, o), this.domService.appendChild(e, i), i = this.domService.createElement("div"), this.domService.addClass(i, "ge-table-focus-border"), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top + t.height - 1}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", "1px"), this.domService.setStyle(i, "z-index", "9999"), this.applyStyle(i, o), this.domService.appendChild(e, i), e;
|
|
247
257
|
}
|
|
248
258
|
addVerticalBorder(e, t, o = "ge-table-body-center-vertical-border") {
|
|
249
|
-
const
|
|
250
|
-
return this.domService.addClass(
|
|
259
|
+
const i = this.domService.createElement("div");
|
|
260
|
+
return this.domService.addClass(i, o), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${e.left}px`), this.domService.setStyle(i, "top", `${e.top}px`), this.domService.setStyle(i, "width", "1px"), this.domService.setStyle(i, "height", `${e.height}px`), this.domService.appendChild(t, i), i;
|
|
251
261
|
}
|
|
252
262
|
addDiv(e, t, o = "") {
|
|
253
|
-
const
|
|
254
|
-
return o && this.domService.addClass(
|
|
263
|
+
const i = this.domService.createElement("div");
|
|
264
|
+
return o && this.domService.addClass(i, o), this.domService.setStyle(i, "display", "clip"), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "left", `${t.left}px`), this.domService.setStyle(i, "top", `${t.top}px`), this.domService.setStyle(i, "width", `${t.width}px`), this.domService.setStyle(i, "height", `${t.height}px`), this.domService.appendChild(e, i), i;
|
|
255
265
|
}
|
|
256
266
|
applyStyleString(e, t) {
|
|
257
|
-
const o = t.split(";").map((
|
|
258
|
-
for (const
|
|
259
|
-
const [
|
|
260
|
-
this.domService.setStyle(e,
|
|
267
|
+
const o = t.split(";").map((i) => i.trim()).filter((i) => i);
|
|
268
|
+
for (const i of o) {
|
|
269
|
+
const [s, r] = i.split(":");
|
|
270
|
+
this.domService.setStyle(e, s.trim(), r.trim());
|
|
261
271
|
}
|
|
262
272
|
}
|
|
263
273
|
getDivOrCreateDiv(e, t) {
|
|
@@ -265,15 +275,15 @@ class ve {
|
|
|
265
275
|
return o ? (o.innerText = "", o) : (o = this.domService.createElement("div"), t.cache[e] = o, o);
|
|
266
276
|
}
|
|
267
277
|
}
|
|
268
|
-
const
|
|
278
|
+
const Z = (c) => c === "header" ? "header" : c === "footer" ? "footer" : "body";
|
|
269
279
|
class Re {
|
|
270
280
|
constructor(e, t) {
|
|
271
281
|
if (this.rowIdx = -1, this.colIdx = -1, this.action = null, this.inputType = null, this.className = "", e !== null && (e instanceof HTMLDivElement || e instanceof HTMLSpanElement || e instanceof HTMLInputElement)) {
|
|
272
282
|
this.className = e.className, this.action = e.getAttribute("data-ge-action"), this.inputType = e.getAttribute("data-input-type"), this.rowIdx = Number(e.getAttribute("data-row-index")), this.colIdx = Number(e.getAttribute("data-col-index"));
|
|
273
283
|
const o = e.getAttribute("data-area");
|
|
274
|
-
if (o && (this.areaIdent =
|
|
275
|
-
const
|
|
276
|
-
this.value =
|
|
284
|
+
if (o && (this.areaIdent = Z(o), this.areaModel = t.tableModel.getAreaModel(this.areaIdent), this.row = this.areaModel.getRowByIndex(this.rowIdx)), e instanceof HTMLInputElement) {
|
|
285
|
+
const i = e;
|
|
286
|
+
this.value = i.value;
|
|
277
287
|
}
|
|
278
288
|
}
|
|
279
289
|
}
|
|
@@ -315,17 +325,17 @@ class Ae {
|
|
|
315
325
|
this.tableScope.toggleHeaderGroup(o), e.preventDefault(), e.stopPropagation();
|
|
316
326
|
else if (o.inputType === "checkbox" && o.areaIdent)
|
|
317
327
|
this.tableScope.toggleRowCheckbox(o.rowIdx, o.colIdx, o.areaIdent), e.preventDefault(), e.stopPropagation();
|
|
318
|
-
else if (
|
|
319
|
-
const
|
|
320
|
-
if (
|
|
328
|
+
else if (H(o.row) && o.areaModel) {
|
|
329
|
+
const i = o.colIdx === this.getArrowColumnIndex() && e.altKey, s = o.className.includes("ge-table-tree-arrow-div");
|
|
330
|
+
if (i || s) {
|
|
321
331
|
e.preventDefault(), e.stopPropagation();
|
|
322
332
|
const r = o.row;
|
|
323
333
|
r.expanded = !r.expanded, "recalcVisibleTreeRows" in o.areaModel && o.areaModel.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(r);
|
|
324
334
|
}
|
|
325
335
|
}
|
|
326
336
|
if (o.areaIdent === "body" && this.tableScope.tableOptions.getFocusModel) {
|
|
327
|
-
const
|
|
328
|
-
|
|
337
|
+
const i = this.tableScope.tableOptions.getFocusModel();
|
|
338
|
+
i == null || i.clear(), i == null || i.setFocus(o.rowIdx, o.colIdx);
|
|
329
339
|
}
|
|
330
340
|
this.publishGeMouseEvent(e, 1);
|
|
331
341
|
}
|
|
@@ -337,15 +347,15 @@ class Ae {
|
|
|
337
347
|
*/
|
|
338
348
|
onHostElementDblClicked(e) {
|
|
339
349
|
if (this.lastClicked = Date.now(), e.target instanceof HTMLElement) {
|
|
340
|
-
const t = e.target, o = t.getAttribute("data-area"),
|
|
341
|
-
if (o &&
|
|
342
|
-
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e,
|
|
350
|
+
const t = e.target, o = t.getAttribute("data-area"), i = Z(o), s = Number(t.getAttribute("data-row-index")), r = Number(t.getAttribute("data-col-index")), l = this.tableScope.tableModel.getAreaModel(i);
|
|
351
|
+
if (o && i === "header")
|
|
352
|
+
this.tableScope.tableModel.isSortable(r) && (this.tableScope.clearSelection(), this.tableScope.onHeaderDblClicked(e, s, r));
|
|
343
353
|
else if (t.getAttribute("data-row-index")) {
|
|
344
|
-
const
|
|
345
|
-
if (o &&
|
|
354
|
+
const n = l.getRowByIndex(s);
|
|
355
|
+
if (o && i === "body" && l.isEditable(s, r) && (this.tableScope.clearSelection(), this.tableScope.initRenderEditor(s, r)), H(n) && r === this.getArrowColumnIndex()) {
|
|
346
356
|
e.preventDefault(), e.stopPropagation();
|
|
347
|
-
const d =
|
|
348
|
-
d.expanded = !d.expanded, "recalcVisibleTreeRows" in
|
|
357
|
+
const d = n;
|
|
358
|
+
d.expanded = !d.expanded, "recalcVisibleTreeRows" in l && l.recalcVisibleTreeRows(), this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth), this.tableScope.adjustContainersAndRows(), this.updateCollapsedExpandedState(d);
|
|
349
359
|
}
|
|
350
360
|
}
|
|
351
361
|
}
|
|
@@ -370,11 +380,11 @@ class Ae {
|
|
|
370
380
|
* @returns {void}
|
|
371
381
|
*/
|
|
372
382
|
updateCollapsedExpandedState(e) {
|
|
373
|
-
var o,
|
|
374
|
-
const t = (
|
|
383
|
+
var o, i, s, r, l;
|
|
384
|
+
const t = (i = (o = this.tableScope.tableOptions) == null ? void 0 : o.autoRestoreOptions) == null ? void 0 : i.getRowId;
|
|
375
385
|
if (t) {
|
|
376
|
-
const
|
|
377
|
-
d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : a && ((
|
|
386
|
+
const n = (s = this.tableScope.storeStateCollapsedExpandService) == null ? void 0 : s.collapsedExpandedStateGet().mode, d = n === "collapsed" && !e.expanded || n === "expanded" && e.expanded, a = n === "collapsed" && e.expanded || n === "expanded" && !e.expanded, h = t(e.data);
|
|
387
|
+
d ? (r = this.tableScope.storeStateCollapsedExpandService) == null || r.collapsedStateIdsPush(h) : a && ((l = this.tableScope.storeStateCollapsedExpandService) == null || l.collapsedStateIdsRemove(h));
|
|
378
388
|
}
|
|
379
389
|
}
|
|
380
390
|
getArrowColumnIndex() {
|
|
@@ -595,7 +605,7 @@ class Me {
|
|
|
595
605
|
return this.tableScope.selectionModel();
|
|
596
606
|
}
|
|
597
607
|
}
|
|
598
|
-
class
|
|
608
|
+
class ee {
|
|
599
609
|
constructor(e) {
|
|
600
610
|
this.getStorageKeyFn = e;
|
|
601
611
|
}
|
|
@@ -603,12 +613,12 @@ class q {
|
|
|
603
613
|
const t = {};
|
|
604
614
|
if (e instanceof Map) {
|
|
605
615
|
const o = e;
|
|
606
|
-
for (const
|
|
616
|
+
for (const i of [...o]) {
|
|
607
617
|
const [
|
|
608
|
-
|
|
618
|
+
s,
|
|
609
619
|
r
|
|
610
|
-
] =
|
|
611
|
-
t[
|
|
620
|
+
] = i;
|
|
621
|
+
t[s] = r;
|
|
612
622
|
}
|
|
613
623
|
}
|
|
614
624
|
return t;
|
|
@@ -616,14 +626,14 @@ class q {
|
|
|
616
626
|
checkAndPersistItem(e, t) {
|
|
617
627
|
const o = this.getStorageKeyFn;
|
|
618
628
|
if (o) {
|
|
619
|
-
const
|
|
620
|
-
if (
|
|
621
|
-
const
|
|
629
|
+
const i = o();
|
|
630
|
+
if (i) {
|
|
631
|
+
const s = i + e;
|
|
622
632
|
if ((t + "").includes("Map")) {
|
|
623
633
|
const r = this.autoConvertMapToObject(t);
|
|
624
|
-
this.persistItem(
|
|
634
|
+
this.persistItem(s, r);
|
|
625
635
|
} else
|
|
626
|
-
this.persistItem(
|
|
636
|
+
this.persistItem(s, t);
|
|
627
637
|
}
|
|
628
638
|
}
|
|
629
639
|
}
|
|
@@ -670,7 +680,7 @@ class q {
|
|
|
670
680
|
// }
|
|
671
681
|
// }
|
|
672
682
|
}
|
|
673
|
-
class Ee extends
|
|
683
|
+
class Ee extends ee {
|
|
674
684
|
constructor(e) {
|
|
675
685
|
super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
|
|
676
686
|
}
|
|
@@ -686,18 +696,18 @@ class Ee extends q {
|
|
|
686
696
|
const t = e();
|
|
687
697
|
if (t) {
|
|
688
698
|
const o = t + this.SCROLL_STATE;
|
|
689
|
-
let
|
|
690
|
-
this.scrollOffset =
|
|
699
|
+
let i = this.loadFromLocalStorage(o);
|
|
700
|
+
this.scrollOffset = i || [0, 0];
|
|
691
701
|
}
|
|
692
702
|
}
|
|
693
703
|
}
|
|
694
704
|
}
|
|
695
705
|
class Ie {
|
|
696
|
-
constructor(e = "collapsed", t = [], o = !1,
|
|
697
|
-
this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded =
|
|
706
|
+
constructor(e = "collapsed", t = [], o = !1, i = !1) {
|
|
707
|
+
this.mode = e, this.rowIds = t, this.allCollapsed = o, this.allExpanded = i;
|
|
698
708
|
}
|
|
699
709
|
}
|
|
700
|
-
class ke extends
|
|
710
|
+
class ke extends ee {
|
|
701
711
|
constructor(e) {
|
|
702
712
|
super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new Ie(), this.load();
|
|
703
713
|
}
|
|
@@ -722,8 +732,8 @@ class ke extends q {
|
|
|
722
732
|
if (e) {
|
|
723
733
|
const t = e();
|
|
724
734
|
if (t) {
|
|
725
|
-
const o = t + this.COLLAPSED_EXPANDED_STATE,
|
|
726
|
-
|
|
735
|
+
const o = t + this.COLLAPSED_EXPANDED_STATE, i = this.loadFromLocalStorage(o);
|
|
736
|
+
i && (this.collapsedExpandedState = i);
|
|
727
737
|
}
|
|
728
738
|
}
|
|
729
739
|
}
|
|
@@ -731,7 +741,7 @@ class ke extends q {
|
|
|
731
741
|
this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
|
|
732
742
|
}
|
|
733
743
|
}
|
|
734
|
-
class Te extends
|
|
744
|
+
class Te extends ee {
|
|
735
745
|
constructor(e) {
|
|
736
746
|
super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
|
|
737
747
|
}
|
|
@@ -746,69 +756,69 @@ class Te extends q {
|
|
|
746
756
|
if (e) {
|
|
747
757
|
const t = e();
|
|
748
758
|
if (t) {
|
|
749
|
-
const o = t + this.SORTING_STATE,
|
|
750
|
-
this.sortItems =
|
|
759
|
+
const o = t + this.SORTING_STATE, i = this.loadFromLocalStorage(o);
|
|
760
|
+
this.sortItems = i || [];
|
|
751
761
|
}
|
|
752
762
|
}
|
|
753
763
|
}
|
|
754
764
|
}
|
|
755
|
-
class
|
|
756
|
-
constructor(e = 0, t = 0, o = 0,
|
|
757
|
-
this.left = e, this.width = t, this.height = o, this.top =
|
|
765
|
+
class F {
|
|
766
|
+
constructor(e = 0, t = 0, o = 0, i = 0, s) {
|
|
767
|
+
this.left = e, this.width = t, this.height = o, this.top = i, this.index = s;
|
|
758
768
|
}
|
|
759
769
|
}
|
|
760
770
|
class De {
|
|
761
|
-
constructor(e, t, o,
|
|
762
|
-
this.hostElement = e, this.tableModel = t, this.dom = o, this.tableOptions =
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
this.dom.addClass("ge-table",
|
|
771
|
+
constructor(e, t, o, i) {
|
|
772
|
+
this.hostElement = e, this.tableModel = t, this.dom = o, this.tableOptions = i, this.scrollTop = 0, this.areaBodyWestGeo = new F(), this.areaBodyCenterGeo = new F(), this.areaBodyEastGeo = new F();
|
|
773
|
+
const s = this.hostElement;
|
|
774
|
+
s.innerText = "", this.dom.setAttribute(s, "tabindex", "0"), this.dom.setStyle(
|
|
775
|
+
this.dom.addClass("ge-table", s),
|
|
766
776
|
"position",
|
|
767
777
|
"relative"
|
|
768
778
|
), this.hoverRow = o.applyStylePosistionAbsolute(
|
|
769
|
-
o.createDivWithClass("ge-table-hover-row",
|
|
779
|
+
o.createDivWithClass("ge-table-hover-row", s)
|
|
770
780
|
), this.hoverColumn = o.applyStylePosistionAbsolute(
|
|
771
|
-
o.createDivWithClass("ge-table-hover-column",
|
|
781
|
+
o.createDivWithClass("ge-table-hover-column", s)
|
|
772
782
|
), this.draggingColumn = o.applyStylePosistionAbsolute(
|
|
773
|
-
o.createDivWithClass("ge-table-dragging-column",
|
|
783
|
+
o.createDivWithClass("ge-table-dragging-column", s)
|
|
774
784
|
), this.areaHeaderWest = o.appendRelativeChildDiv(
|
|
775
785
|
o.applyStylePosistionAbsolute(
|
|
776
|
-
o.createAreaDivWithClass("ge-table-header ge-table-header-west",
|
|
786
|
+
o.createAreaDivWithClass("ge-table-header ge-table-header-west", s, "header", "west")
|
|
777
787
|
)
|
|
778
788
|
), this.areaHeaderCenter = o.appendRelativeChildDiv(
|
|
779
789
|
o.applyStylePosistionAbsolute(
|
|
780
|
-
o.createAreaDivWithClass("ge-table-header ge-table-header-center",
|
|
790
|
+
o.createAreaDivWithClass("ge-table-header ge-table-header-center", s, "header", "center")
|
|
781
791
|
)
|
|
782
792
|
), this.areaHeaderEast = o.appendRelativeChildDiv(
|
|
783
793
|
o.applyStylePosistionAbsolute(
|
|
784
|
-
o.createAreaDivWithClass("ge-table-header ge-table-header-east",
|
|
794
|
+
o.createAreaDivWithClass("ge-table-header ge-table-header-east", s, "body", "east")
|
|
785
795
|
)
|
|
786
796
|
), this.areaBodyWest = o.appendRelativeChildDiv(
|
|
787
797
|
o.applyStylePosistionAbsolute(
|
|
788
|
-
o.createAreaDivWithClass("ge-table-body ge-table-body-west",
|
|
798
|
+
o.createAreaDivWithClass("ge-table-body ge-table-body-west", s, "body", "west")
|
|
789
799
|
)
|
|
790
800
|
), this.areaBodyEast = o.appendRelativeChildDiv(
|
|
791
801
|
o.applyStylePosistionAbsolute(
|
|
792
|
-
o.createAreaDivWithClass("ge-table-body ge-table-body-east",
|
|
802
|
+
o.createAreaDivWithClass("ge-table-body ge-table-body-east", s, "body", "east")
|
|
793
803
|
)
|
|
794
804
|
), this.areaFooterWest = o.appendRelativeChildDiv(
|
|
795
805
|
o.applyStylePosistionAbsolute(
|
|
796
|
-
o.createAreaDivWithClass("ge-table-footer ge-table-footer-west",
|
|
806
|
+
o.createAreaDivWithClass("ge-table-footer ge-table-footer-west", s, "footer", "west")
|
|
797
807
|
)
|
|
798
808
|
), this.areaFooterCenter = o.appendRelativeChildDiv(
|
|
799
809
|
o.applyStylePosistionAbsolute(
|
|
800
|
-
o.createAreaDivWithClass("ge-table-footer ge-table-footer-center",
|
|
810
|
+
o.createAreaDivWithClass("ge-table-footer ge-table-footer-center", s, "footer", "center")
|
|
801
811
|
)
|
|
802
812
|
), this.areaFooterEast = o.appendRelativeChildDiv(
|
|
803
813
|
o.applyStylePosistionAbsolute(
|
|
804
|
-
o.createAreaDivWithClass("ge-table-footer ge-table-footer-east",
|
|
814
|
+
o.createAreaDivWithClass("ge-table-footer ge-table-footer-east", s, "footer", "east")
|
|
805
815
|
)
|
|
806
816
|
), this.scrollViewport = o.applyStyleOverflowAuto(
|
|
807
817
|
this.tableOptions.overflowX ?? "auto",
|
|
808
818
|
this.tableOptions.overflowY ?? "auto",
|
|
809
819
|
o.applyStyleNoPadding(
|
|
810
820
|
o.applyStylePosistionAbsolute(
|
|
811
|
-
o.createAreaDivWithClass("ge-table-scroll-viewport",
|
|
821
|
+
o.createAreaDivWithClass("ge-table-scroll-viewport", s, "body", "center")
|
|
812
822
|
)
|
|
813
823
|
)
|
|
814
824
|
), this.contentWrapperDiv = o.applyStyleNoPadding(
|
|
@@ -822,13 +832,13 @@ class De {
|
|
|
822
832
|
), this.areaBodyCenter = o.appendRelativeChildDiv(
|
|
823
833
|
o.createDivWithClass("ge-table-body-center", this.contentDiv)
|
|
824
834
|
), this.borderHeaderBottom = o.applyStylePosistionAbsolute(
|
|
825
|
-
o.createDivWithClass("ge-table-header-border",
|
|
835
|
+
o.createDivWithClass("ge-table-header-border", s)
|
|
826
836
|
), this.borderFixedWest = o.applyStylePosistionAbsolute(
|
|
827
|
-
o.createDivWithClass("ge-table-west-fixed-column-border",
|
|
837
|
+
o.createDivWithClass("ge-table-west-fixed-column-border", s)
|
|
828
838
|
), this.borderFixedEast = o.applyStylePosistionAbsolute(
|
|
829
|
-
o.createDivWithClass("ge-table-east-fixed-column-border",
|
|
839
|
+
o.createDivWithClass("ge-table-east-fixed-column-border", s)
|
|
830
840
|
), this.borderFooterTop = o.applyStylePosistionAbsolute(
|
|
831
|
-
o.createDivWithClass("ge-table-footer-border",
|
|
841
|
+
o.createDivWithClass("ge-table-footer-border", s)
|
|
832
842
|
);
|
|
833
843
|
}
|
|
834
844
|
/**
|
|
@@ -938,8 +948,8 @@ class A {
|
|
|
938
948
|
* @param {number} c2 - The value for c2.
|
|
939
949
|
* @param {boolean} [gammaRange=false] - The value for gammaRange. Defaults to false. gammaRange will be used for AreaModelCellGroups, but it's not implemented yet!
|
|
940
950
|
*/
|
|
941
|
-
constructor(e, t, o,
|
|
942
|
-
this.r1 = e, this.c1 = t, this.r2 = o, this.c2 =
|
|
951
|
+
constructor(e, t, o, i, s = !1) {
|
|
952
|
+
this.r1 = e, this.c1 = t, this.r2 = o, this.c2 = i, this.gammaRange = s;
|
|
943
953
|
}
|
|
944
954
|
static create(e) {
|
|
945
955
|
return e.gammaRange === void 0 && (e.gammaRange = !1), new A(
|
|
@@ -973,13 +983,13 @@ class _e {
|
|
|
973
983
|
this.colAndRowspanRanges = [];
|
|
974
984
|
const e = this.areaModel.getRowCount(), t = this.tableModel.getColumnCount();
|
|
975
985
|
for (let o = 0; o < e; o++)
|
|
976
|
-
for (let
|
|
977
|
-
let
|
|
978
|
-
if (
|
|
979
|
-
|
|
980
|
-
const
|
|
986
|
+
for (let i = 0; i < t; i++) {
|
|
987
|
+
let s = this.areaModel.getColspanAt(o, i), r = this.areaModel.getRowspanAt(o, i);
|
|
988
|
+
if (s > 1 || r > 1) {
|
|
989
|
+
s === 0 && (s = 1), r === 0 && (r = 1);
|
|
990
|
+
const l = "gammaCells" in this.areaModel;
|
|
981
991
|
this.colAndRowspanRanges.push(
|
|
982
|
-
new A(o,
|
|
992
|
+
new A(o, i, o + r - 1, i + s - 1, l)
|
|
983
993
|
);
|
|
984
994
|
}
|
|
985
995
|
}
|
|
@@ -1001,17 +1011,17 @@ class T {
|
|
|
1001
1011
|
this.header = e, this.body = t, this.footer = o;
|
|
1002
1012
|
}
|
|
1003
1013
|
}
|
|
1004
|
-
class
|
|
1005
|
-
constructor(e, t, o,
|
|
1006
|
-
var r,
|
|
1007
|
-
super(e, t, o,
|
|
1014
|
+
class Fe extends De {
|
|
1015
|
+
constructor(e, t, o, i) {
|
|
1016
|
+
var r, l;
|
|
1017
|
+
super(e, t, o, i), this.dragging = !1, this.editing = !1, this.storedColumnWidths = [], this.scrollLeft = 0, this.scrollViewportLeft = 0, this.scrollFactorY = 0, this.scrollFactorX = 0, this.cleanupFunctions = {
|
|
1008
1018
|
header: [],
|
|
1009
1019
|
body: [],
|
|
1010
1020
|
footer: []
|
|
1011
|
-
}, this.tree = !1, this.colAndRowspanModels = new T(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (
|
|
1012
|
-
(
|
|
1021
|
+
}, this.tree = !1, this.colAndRowspanModels = new T(), this.firstVisibleRowIndex = -1, this.draggingTargetColumnIndex = -1, this.removables = [], this.tableModel.getSelectionModel ? this.getSelectionModel = this.tableModel.getSelectionModel : (r = this.tableOptions) != null && r.getSelectionModel && (this.getSelectionModel = this.tableOptions.getSelectionModel), (l = this.tableOptions) != null && l.getFocusModel && (this.getFocusModel = this.tableOptions.getFocusModel), K(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
|
|
1022
|
+
(n) => {
|
|
1013
1023
|
var d;
|
|
1014
|
-
this.colAndRowspanModels[
|
|
1024
|
+
this.colAndRowspanModels[n] = new _e(t, t.getAreaModel(n)), (d = this.colAndRowspanModels[n]) == null || d.init();
|
|
1015
1025
|
}
|
|
1016
1026
|
);
|
|
1017
1027
|
}
|
|
@@ -1049,13 +1059,13 @@ class $e extends De {
|
|
|
1049
1059
|
* @param {number} colIdx - The index of the column.
|
|
1050
1060
|
*/
|
|
1051
1061
|
initRenderEditor(e, t) {
|
|
1052
|
-
var
|
|
1053
|
-
let o = (
|
|
1062
|
+
var i;
|
|
1063
|
+
let o = (i = this.tableModel.getColumnDef(t)) == null ? void 0 : i.getEditRenderer;
|
|
1054
1064
|
if (o || (o = this.tableOptions.getEditRenderer), o)
|
|
1055
1065
|
if (this.editorRenderer = o(e, t), this.editorRenderer) {
|
|
1056
1066
|
this.editorRendererRow = e, this.editorRendererColumn = t, this.editing = !0, this.repaint();
|
|
1057
|
-
const
|
|
1058
|
-
|
|
1067
|
+
const s = document.querySelector("input.ge-table-cell-editor-input");
|
|
1068
|
+
s && s.focus();
|
|
1059
1069
|
} else
|
|
1060
1070
|
this.resetEditorRenderer();
|
|
1061
1071
|
}
|
|
@@ -1086,19 +1096,19 @@ class $e extends De {
|
|
|
1086
1096
|
for (const t of this.removables)
|
|
1087
1097
|
t.remove();
|
|
1088
1098
|
this.hideHoverRow(), this.hideHoverColumn(), this.scrollTop = this.scrollViewport.scrollTop, this.scrollLeft = this.scrollViewport.scrollLeft, this.debounce(this.checkForScrollPosSaving.bind(this)), this.scrollFactorY = this.scrollTop / (this.scrollViewport.scrollHeight - this.scrollViewport.clientHeight), this.scrollFactorX = this.scrollLeft / (this.scrollViewport.scrollWidth - this.scrollViewport.clientWidth), isNaN(this.scrollFactorY) && (this.scrollFactorY = 0), isNaN(this.scrollFactorX) && (this.scrollFactorX = 0), this.adjustBody(), this.adjustArea("footer"), this.adjustArea("header"), this.tableOptions.tableTopBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1089
|
-
new
|
|
1099
|
+
new F(0, this.hostElement.clientWidth, 1, 0),
|
|
1090
1100
|
this.hostElement,
|
|
1091
1101
|
"ge-table-border"
|
|
1092
1102
|
)), this.tableOptions.tableBottomBorderVisible && this.removables.push(this.dom.addHorizontalBorder(
|
|
1093
|
-
new
|
|
1103
|
+
new F(0, this.hostElement.clientWidth, 1, this.hostElement.clientHeight - 1),
|
|
1094
1104
|
this.hostElement,
|
|
1095
1105
|
"ge-table-border"
|
|
1096
1106
|
)), this.tableModel.getFixedLeftColumnCount() > 0 && this.removables.push(this.dom.addVerticalBorder(
|
|
1097
|
-
new
|
|
1107
|
+
new F(this.areaBodyWest.child.clientWidth, 1, this.hostElement.clientHeight, 0),
|
|
1098
1108
|
this.hostElement,
|
|
1099
1109
|
"ge-table-body-west-vertical-border"
|
|
1100
1110
|
)), ((e = this.tableModel.getAreaModel("header")) == null ? void 0 : e.getRowCount()) > 0 && this.removables.push(this.dom.addHorizontalBorder(
|
|
1101
|
-
new
|
|
1111
|
+
new F(0, this.hostElement.clientWidth, 1, this.areaHeaderCenter.child.clientHeight),
|
|
1102
1112
|
this.hostElement,
|
|
1103
1113
|
"ge-table-body-west-vertical-border"
|
|
1104
1114
|
));
|
|
@@ -1136,23 +1146,23 @@ class $e extends De {
|
|
|
1136
1146
|
* @param {any} value - The new value to be displayed in the cell.
|
|
1137
1147
|
* @param {string[]} cssClasses - An array of CSS classes to be applied to the cell.
|
|
1138
1148
|
*/
|
|
1139
|
-
rerenderCellContent({ area: e, rowIndex: t, columnIndex: o, value:
|
|
1140
|
-
const r = this.tableModel.getAreaModel(e),
|
|
1141
|
-
if (
|
|
1149
|
+
rerenderCellContent({ area: e, rowIndex: t, columnIndex: o, value: i, cssClasses: s }) {
|
|
1150
|
+
const r = this.tableModel.getAreaModel(e), l = 'div[data-col-index="' + o + '"][data-row-index="' + t + '"][data-area="' + e + '"]', n = document.querySelector(l);
|
|
1151
|
+
if (n) {
|
|
1142
1152
|
let d;
|
|
1143
1153
|
const h = this.editorRenderer && this.editorRendererRow === t && this.editorRendererColumn === o ? this.editorRenderer : r.getCellRenderer(t, o);
|
|
1144
|
-
if (
|
|
1145
|
-
d = h.render(
|
|
1154
|
+
if (n.innerText = "", this.applyCssClasses(n, s), h)
|
|
1155
|
+
d = h.render(n, t, o, e, r, i, this.dom.domService), d && this.cleanupFunctions[e].push(d);
|
|
1146
1156
|
else {
|
|
1147
|
-
const b = `${
|
|
1148
|
-
this.dom.addLabelDiv(
|
|
1157
|
+
const b = `${i}`;
|
|
1158
|
+
this.dom.addLabelDiv(n, b, !1, t, o, e);
|
|
1149
1159
|
}
|
|
1150
1160
|
const u = r.getCustomClassesAt(t, o);
|
|
1151
|
-
u.length && this.dom.addClasses(u,
|
|
1161
|
+
u.length && this.dom.addClasses(u, n);
|
|
1152
1162
|
const m = r.getCustomStyleAt(t, o);
|
|
1153
1163
|
if (m)
|
|
1154
1164
|
for (const b in m)
|
|
1155
|
-
this.dom.setStyle(
|
|
1165
|
+
this.dom.setStyle(n, b, m[b]);
|
|
1156
1166
|
}
|
|
1157
1167
|
}
|
|
1158
1168
|
/**
|
|
@@ -1229,9 +1239,9 @@ class $e extends De {
|
|
|
1229
1239
|
getNumberByAttr(e, t) {
|
|
1230
1240
|
var o;
|
|
1231
1241
|
if (e) {
|
|
1232
|
-
const
|
|
1233
|
-
if (
|
|
1234
|
-
return Number(
|
|
1242
|
+
const i = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
|
|
1243
|
+
if (i)
|
|
1244
|
+
return Number(i);
|
|
1235
1245
|
}
|
|
1236
1246
|
return -1;
|
|
1237
1247
|
}
|
|
@@ -1246,9 +1256,9 @@ class $e extends De {
|
|
|
1246
1256
|
getStringByAttr(e, t) {
|
|
1247
1257
|
var o;
|
|
1248
1258
|
if (e) {
|
|
1249
|
-
const
|
|
1250
|
-
if (
|
|
1251
|
-
return
|
|
1259
|
+
const i = (o = e.closest("[" + t + "]")) == null ? void 0 : o.getAttribute(t);
|
|
1260
|
+
if (i)
|
|
1261
|
+
return i;
|
|
1252
1262
|
}
|
|
1253
1263
|
return "";
|
|
1254
1264
|
}
|
|
@@ -1262,9 +1272,9 @@ class $e extends De {
|
|
|
1262
1272
|
*/
|
|
1263
1273
|
adjustArea(e, t = 0) {
|
|
1264
1274
|
var g;
|
|
1265
|
-
const o = this.getArea(e, "west"),
|
|
1266
|
-
o.child.innerText = "",
|
|
1267
|
-
const
|
|
1275
|
+
const o = this.getArea(e, "west"), i = this.getArea(e, "center"), s = this.getArea(e, "east"), r = i.child.clientHeight;
|
|
1276
|
+
o.child.innerText = "", i.child.innerText = "", s.child.innerText = "";
|
|
1277
|
+
const l = 0, n = this.areaBodyCenterGeo.width, d = this.tableModel.getPadding(), a = this.tableModel.getAreaModel(e), h = a.getRowCount();
|
|
1268
1278
|
for (; this.cleanupFunctions[e].length; ) {
|
|
1269
1279
|
const p = this.cleanupFunctions[e].shift();
|
|
1270
1280
|
p && p();
|
|
@@ -1275,36 +1285,36 @@ class $e extends De {
|
|
|
1275
1285
|
const C = u, y = p === h - 1, R = this.tableModel.getRowHeight(e, p);
|
|
1276
1286
|
if (C + R > 0) {
|
|
1277
1287
|
this.firstVisibleRowIndex = p;
|
|
1278
|
-
let x = { left:
|
|
1288
|
+
let x = { left: l, width: n, height: R, top: C, index: p }, S = this.dom.addRowDiv(i, x, p, e, "center");
|
|
1279
1289
|
const k = f;
|
|
1280
1290
|
if (this.adjustColumnsToRowParent({
|
|
1281
1291
|
areaIdent: e,
|
|
1282
1292
|
sideIdent: "center",
|
|
1283
1293
|
areaModel: a,
|
|
1284
1294
|
geo: x,
|
|
1285
|
-
parent:
|
|
1295
|
+
parent: S,
|
|
1286
1296
|
rowIndex: p,
|
|
1287
1297
|
columnIndexStart: k,
|
|
1288
1298
|
columnIndexEnd: m - b - 1,
|
|
1289
1299
|
verticalFixed: !1,
|
|
1290
1300
|
lastRowOfModel: y
|
|
1291
|
-
}), d.left > 0 && (x = { left:
|
|
1301
|
+
}), d.left > 0 && (x = { left: l, width: this.areaBodyWestGeo.width, height: R, top: C, index: p }, S = this.dom.addRowDiv(o, x, p, e, "west"), this.adjustColumnsToRowParent({
|
|
1292
1302
|
areaIdent: e,
|
|
1293
1303
|
sideIdent: "west",
|
|
1294
1304
|
areaModel: a,
|
|
1295
1305
|
geo: x,
|
|
1296
|
-
parent:
|
|
1306
|
+
parent: S,
|
|
1297
1307
|
rowIndex: p,
|
|
1298
1308
|
columnIndexStart: 0,
|
|
1299
1309
|
columnIndexEnd: k - 1,
|
|
1300
1310
|
verticalFixed: !0,
|
|
1301
1311
|
lastRowOfModel: y
|
|
1302
|
-
})), d.right > 0 && (x = { left:
|
|
1312
|
+
})), d.right > 0 && (x = { left: l, width: this.areaBodyEastGeo.width, height: R, top: C, index: p }, S = this.dom.addRowDiv(s, x, p, e, "east"), this.adjustColumnsToRowParent({
|
|
1303
1313
|
areaIdent: e,
|
|
1304
1314
|
sideIdent: "east",
|
|
1305
1315
|
areaModel: a,
|
|
1306
1316
|
geo: x,
|
|
1307
|
-
parent:
|
|
1317
|
+
parent: S,
|
|
1308
1318
|
rowIndex: p,
|
|
1309
1319
|
columnIndexStart: m - b,
|
|
1310
1320
|
columnIndexEnd: m - 1,
|
|
@@ -1313,15 +1323,15 @@ class $e extends De {
|
|
|
1313
1323
|
})), e === "header" && this.tree && p === h - 1) {
|
|
1314
1324
|
const M = this.dom.applyStyle(
|
|
1315
1325
|
this.dom.setAttribute(
|
|
1316
|
-
this.dom.addDiv(
|
|
1326
|
+
this.dom.addDiv(S, new F(16, 20, 20, 8)),
|
|
1317
1327
|
"data-ge-action",
|
|
1318
1328
|
"toggleExpandCollapseAll"
|
|
1319
1329
|
),
|
|
1320
1330
|
{ cursor: "pointer" }
|
|
1321
1331
|
), E = this.tableOptions.treeOptions.arrowExpandCollapseAll;
|
|
1322
1332
|
if (E) {
|
|
1323
|
-
const
|
|
1324
|
-
this.dom.domService.appendChild(M,
|
|
1333
|
+
const W = this.dom.domService.createText(E.content);
|
|
1334
|
+
this.dom.domService.appendChild(M, W), E.style && this.dom.applyStyleString(M, E.style);
|
|
1325
1335
|
}
|
|
1326
1336
|
}
|
|
1327
1337
|
}
|
|
@@ -1332,14 +1342,14 @@ class $e extends De {
|
|
|
1332
1342
|
const p = ((g = this.colAndRowspanModels[e]) == null ? void 0 : g.getRanges()) ?? [];
|
|
1333
1343
|
if (p.length)
|
|
1334
1344
|
for (const C of p) {
|
|
1335
|
-
let y = 0, R =
|
|
1345
|
+
let y = 0, R = i.child, x = "center";
|
|
1336
1346
|
if (C.c1 < f)
|
|
1337
1347
|
R = o.child, x = "west";
|
|
1338
1348
|
else if (b > 0 && C.c1 >= m - b)
|
|
1339
|
-
R =
|
|
1349
|
+
R = s.child, x = "east";
|
|
1340
1350
|
else {
|
|
1341
|
-
const
|
|
1342
|
-
y = this.scrollFactorX *
|
|
1351
|
+
const S = this.areaBodyCenterGeo.width - this.tableModel.getContentWidthInPixel();
|
|
1352
|
+
y = this.scrollFactorX * S - this.areaBodyWestGeo.width, x = "center";
|
|
1343
1353
|
}
|
|
1344
1354
|
this.drawBigCell(C, y, t, a, R, x);
|
|
1345
1355
|
}
|
|
@@ -1355,49 +1365,49 @@ class $e extends De {
|
|
|
1355
1365
|
* @param sideIdent SideIdent (west,center,east)
|
|
1356
1366
|
* @protected
|
|
1357
1367
|
*/
|
|
1358
|
-
drawBigCell(e, t, o,
|
|
1359
|
-
const
|
|
1368
|
+
drawBigCell(e, t, o, i, s, r) {
|
|
1369
|
+
const l = o + this.getRowHeights(0, e.r1 - 1, i).reduce((g, p) => g + p, 0), n = this.tableModel.getColumnCount(), d = this.tableModel.getFixedRightColumnCount();
|
|
1360
1370
|
let a = 0;
|
|
1361
|
-
d > 0 && e.c1 >=
|
|
1362
|
-
const h = t + this.getColumnWidths(a, e.c1 - 1).reduce((g, p) => g + p, 0), u = this.getRowHeights(e.r1, e.r2,
|
|
1371
|
+
d > 0 && e.c1 >= n - d && (a = n - d);
|
|
1372
|
+
const h = t + this.getColumnWidths(a, e.c1 - 1).reduce((g, p) => g + p, 0), u = this.getRowHeights(e.r1, e.r2, i).reduce((g, p) => g + p, 0), m = this.getColumnWidths(e.c1, e.c2).reduce((g, p) => g + p, 0);
|
|
1363
1373
|
let b = !1;
|
|
1364
1374
|
const f = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
1365
1375
|
f && (b = f.getSelectionCount(e.r1, e.c1) > 0), e.gammaRange ? this.renderCell({
|
|
1366
|
-
areaModel:
|
|
1367
|
-
areaIdent:
|
|
1376
|
+
areaModel: i,
|
|
1377
|
+
areaIdent: i.areaIdent,
|
|
1368
1378
|
sideIdent: r,
|
|
1369
1379
|
rowIndex: e.r1,
|
|
1370
1380
|
columnIndex: e.c1,
|
|
1371
1381
|
left: h,
|
|
1372
|
-
top:
|
|
1382
|
+
top: l,
|
|
1373
1383
|
width: m,
|
|
1374
1384
|
height: u,
|
|
1375
|
-
parent:
|
|
1385
|
+
parent: s,
|
|
1376
1386
|
cellSelected: b,
|
|
1377
1387
|
lastRowOfModel: !0,
|
|
1378
1388
|
gammaRange: e.gammaRange
|
|
1379
1389
|
}) : this.renderCell({
|
|
1380
|
-
areaModel:
|
|
1381
|
-
areaIdent:
|
|
1390
|
+
areaModel: i,
|
|
1391
|
+
areaIdent: i.areaIdent,
|
|
1382
1392
|
sideIdent: r,
|
|
1383
1393
|
rowIndex: e.r1,
|
|
1384
1394
|
columnIndex: e.c1,
|
|
1385
1395
|
left: h,
|
|
1386
|
-
top:
|
|
1396
|
+
top: l,
|
|
1387
1397
|
width: m,
|
|
1388
1398
|
height: u,
|
|
1389
|
-
parent:
|
|
1399
|
+
parent: s,
|
|
1390
1400
|
cellSelected: b,
|
|
1391
1401
|
lastRowOfModel: !0,
|
|
1392
1402
|
gammaRange: e.gammaRange
|
|
1393
|
-
}),
|
|
1403
|
+
}), i.areaIdent === "header" && this.tableOptions.columnsResizable && this.renderHeaderCellResizeHandle({
|
|
1394
1404
|
rowIndex: e.r1,
|
|
1395
1405
|
columnIndex: e.c1,
|
|
1396
1406
|
cellLeft: h,
|
|
1397
|
-
cellTop:
|
|
1407
|
+
cellTop: l,
|
|
1398
1408
|
cellWidth: m,
|
|
1399
1409
|
cellHeight: u,
|
|
1400
|
-
parent:
|
|
1410
|
+
parent: s
|
|
1401
1411
|
});
|
|
1402
1412
|
}
|
|
1403
1413
|
/**
|
|
@@ -1410,12 +1420,12 @@ class $e extends De {
|
|
|
1410
1420
|
* @protected
|
|
1411
1421
|
*/
|
|
1412
1422
|
findRowOfImportantRowspanCell(e, t, o) {
|
|
1413
|
-
const
|
|
1414
|
-
for (let
|
|
1415
|
-
const r = e.getRowspanAt(
|
|
1416
|
-
if (r > 1 &&
|
|
1417
|
-
return
|
|
1418
|
-
if (t -
|
|
1423
|
+
const i = e.getMaxRowspan();
|
|
1424
|
+
for (let s = t - 1; s > -1; s--) {
|
|
1425
|
+
const r = e.getRowspanAt(s, o);
|
|
1426
|
+
if (r > 1 && s + r + 1 >= t)
|
|
1427
|
+
return s;
|
|
1428
|
+
if (t - s > i)
|
|
1419
1429
|
return -1;
|
|
1420
1430
|
}
|
|
1421
1431
|
return -1;
|
|
@@ -1431,11 +1441,11 @@ class $e extends De {
|
|
|
1431
1441
|
areaIdent: e,
|
|
1432
1442
|
sideIdent: t,
|
|
1433
1443
|
areaModel: o,
|
|
1434
|
-
geo:
|
|
1435
|
-
parent:
|
|
1444
|
+
geo: i,
|
|
1445
|
+
parent: s,
|
|
1436
1446
|
rowIndex: r,
|
|
1437
|
-
columnIndexStart:
|
|
1438
|
-
columnIndexEnd:
|
|
1447
|
+
columnIndexStart: l,
|
|
1448
|
+
columnIndexEnd: n,
|
|
1439
1449
|
verticalFixed: d = !1,
|
|
1440
1450
|
lastRowOfModel: a = !1
|
|
1441
1451
|
}) {
|
|
@@ -1448,21 +1458,21 @@ class $e extends De {
|
|
|
1448
1458
|
}
|
|
1449
1459
|
const u = 0, m = !!(e === "body" && t);
|
|
1450
1460
|
let b = h;
|
|
1451
|
-
for (let g =
|
|
1461
|
+
for (let g = l; g <= n; g++) {
|
|
1452
1462
|
const p = b, C = this.tableModel.getColumnWidth(g);
|
|
1453
1463
|
if (C > 0 && p + C > 0) {
|
|
1454
|
-
let y =
|
|
1464
|
+
let y = i.height;
|
|
1455
1465
|
const R = o.getRowspanAt(r, g), x = o.getColspanAt(r, g);
|
|
1456
1466
|
R > 1 && (y = this.getRowHeights(r, r + R - 1, o).reduce((M, E) => M + E, 0));
|
|
1457
|
-
let
|
|
1458
|
-
x > 1 && (
|
|
1467
|
+
let S = C;
|
|
1468
|
+
x > 1 && (S = this.getColumnWidths(g, g + x - 1).reduce((M, E) => M + E, 0));
|
|
1459
1469
|
let k = !1;
|
|
1460
1470
|
if (this.colAndRowspanModels && this.colAndRowspanModels[e] && (f = this.colAndRowspanModels[e]) != null && f.isInRange(r, g) && (k = !0), this.draggingTargetColumnIndex === g && e !== "header") {
|
|
1461
|
-
this.renderDragTargetDiv(
|
|
1462
|
-
const M = { left: p, top: u, width:
|
|
1463
|
-
this.dom.addColumnBorderDivs(this.tableOptions,
|
|
1471
|
+
this.renderDragTargetDiv(s, p, u, S, y);
|
|
1472
|
+
const M = { left: p, top: u, width: S, height: y };
|
|
1473
|
+
this.dom.addColumnBorderDivs(this.tableOptions, s, M, e, t);
|
|
1464
1474
|
} else {
|
|
1465
|
-
const M = this.renderSelectedBackgroundDiv(k, m, t, o, r, g,
|
|
1475
|
+
const M = this.renderSelectedBackgroundDiv(k, m, t, o, r, g, s, p, u, S, y);
|
|
1466
1476
|
"gammaCells" in o && o.getValueAt(r, g) && (k = !1), k || this.renderCell({
|
|
1467
1477
|
areaModel: o,
|
|
1468
1478
|
areaIdent: e,
|
|
@@ -1471,9 +1481,9 @@ class $e extends De {
|
|
|
1471
1481
|
columnIndex: g,
|
|
1472
1482
|
left: p,
|
|
1473
1483
|
top: u,
|
|
1474
|
-
width:
|
|
1484
|
+
width: S,
|
|
1475
1485
|
height: y,
|
|
1476
|
-
parent:
|
|
1486
|
+
parent: s,
|
|
1477
1487
|
cellSelected: M,
|
|
1478
1488
|
lastRowOfModel: a,
|
|
1479
1489
|
gammaRange: !0
|
|
@@ -1482,16 +1492,16 @@ class $e extends De {
|
|
|
1482
1492
|
columnIndex: g,
|
|
1483
1493
|
cellLeft: p,
|
|
1484
1494
|
cellTop: u,
|
|
1485
|
-
cellWidth:
|
|
1495
|
+
cellWidth: S,
|
|
1486
1496
|
cellHeight: y,
|
|
1487
|
-
parent:
|
|
1497
|
+
parent: s
|
|
1488
1498
|
});
|
|
1489
1499
|
}
|
|
1490
1500
|
}
|
|
1491
1501
|
if (b = b + C, b > this.areaBodyCenterGeo.width)
|
|
1492
1502
|
break;
|
|
1493
1503
|
}
|
|
1494
|
-
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new
|
|
1504
|
+
this.tableOptions.verticalBorderVisible && this.dom.addVerticalBorder(new F(b - 1, 1, i.height, 0), s);
|
|
1495
1505
|
}
|
|
1496
1506
|
/**
|
|
1497
1507
|
* Retrieves the column index of the tree arrow column in the table.
|
|
@@ -1509,33 +1519,33 @@ class $e extends De {
|
|
|
1509
1519
|
areaModel: e,
|
|
1510
1520
|
areaIdent: t,
|
|
1511
1521
|
sideIdent: o,
|
|
1512
|
-
rowIndex:
|
|
1513
|
-
index:
|
|
1522
|
+
rowIndex: i,
|
|
1523
|
+
index: s,
|
|
1514
1524
|
left: r,
|
|
1515
|
-
width:
|
|
1516
|
-
height:
|
|
1525
|
+
width: l,
|
|
1526
|
+
height: n,
|
|
1517
1527
|
top: d,
|
|
1518
1528
|
parent: a,
|
|
1519
1529
|
lastRowOfModel: h
|
|
1520
1530
|
}) {
|
|
1521
|
-
var
|
|
1522
|
-
const m = this.editorRenderer && this.editorRendererRow ===
|
|
1531
|
+
var se;
|
|
1532
|
+
const m = this.editorRenderer && this.editorRendererRow === i && this.editorRendererColumn === s ? this.editorRenderer : e.getCellRenderer(i, s), b = { left: r, width: l, height: n, top: d, index: s }, f = e.getRowByIndex(i);
|
|
1523
1533
|
let g = "none";
|
|
1524
|
-
if (
|
|
1534
|
+
if (s === this.getTreeArrowColumnIndex() && H(f)) {
|
|
1525
1535
|
const v = f;
|
|
1526
|
-
(
|
|
1536
|
+
(se = v.children) != null && se.length ? v.expanded ? g = "expanded" : g = "collapsed" : g = "hidden";
|
|
1527
1537
|
}
|
|
1528
1538
|
let C;
|
|
1529
1539
|
if (t === "header") {
|
|
1530
|
-
const v = this.tableModel.getColumnDef(
|
|
1540
|
+
const v = this.tableModel.getColumnDef(s);
|
|
1531
1541
|
(!(v != null && v.sortIconVisible) || v != null && v.sortIconVisible()) && (C = v == null ? void 0 : v.sortState);
|
|
1532
1542
|
}
|
|
1533
|
-
const y = e.getValueAt(
|
|
1543
|
+
const y = e.getValueAt(i, s), R = m ? "" : `${y}`, x = e.isRowChecked(i), S = this.dom.addColumnDiv(
|
|
1534
1544
|
{
|
|
1535
1545
|
parent: a,
|
|
1536
1546
|
geo: b,
|
|
1537
|
-
rowIndex:
|
|
1538
|
-
columnIndex:
|
|
1547
|
+
rowIndex: i,
|
|
1548
|
+
columnIndex: s,
|
|
1539
1549
|
areaIdent: t,
|
|
1540
1550
|
sideIdent: o,
|
|
1541
1551
|
text: R,
|
|
@@ -1544,23 +1554,23 @@ class $e extends De {
|
|
|
1544
1554
|
checkedType: x,
|
|
1545
1555
|
sortState: C
|
|
1546
1556
|
}
|
|
1547
|
-
), k = e.getTooltipAt(
|
|
1548
|
-
k && this.dom.setAttribute(
|
|
1549
|
-
const M = this.tableModel.getColumnDef(
|
|
1550
|
-
M && M.classes[t] && this.dom.addClasses(M.classes[t],
|
|
1557
|
+
), k = e.getTooltipAt(i, s);
|
|
1558
|
+
k && this.dom.setAttribute(S, "title", k);
|
|
1559
|
+
const M = this.tableModel.getColumnDef(s);
|
|
1560
|
+
M && M.classes[t] && this.dom.addClasses(M.classes[t], S);
|
|
1551
1561
|
let E;
|
|
1552
|
-
m && (E = m.render(
|
|
1553
|
-
const
|
|
1554
|
-
if (
|
|
1562
|
+
m && (E = m.render(S, i, s, t, e, y, this.dom.domService));
|
|
1563
|
+
const W = e.getCustomClassesAt(i, s);
|
|
1564
|
+
if (W.length && this.dom.addClasses(W, S), this.dom.addColumnBorderDivs(this.tableOptions, a, b, t, o), h && this.dom.addHorizontalBorder({ left: r, width: l, height: n, top: d + n }, a), this.getFocusModel && t === "body") {
|
|
1555
1565
|
const v = this.getFocusModel();
|
|
1556
|
-
v != null && v.hasFocus(
|
|
1566
|
+
v != null && v.hasFocus(i, s) && this.dom.addFocusBorderDivs(a, b, {});
|
|
1557
1567
|
}
|
|
1558
|
-
t === "header" && this.dom.setAttribute(
|
|
1559
|
-
const
|
|
1560
|
-
if (
|
|
1561
|
-
for (const v in
|
|
1562
|
-
this.dom.setStyle(
|
|
1563
|
-
return [
|
|
1568
|
+
t === "header" && this.dom.setAttribute(S, "data-ge-action", "drag-column");
|
|
1569
|
+
const X = e.getCustomStyleAt(i, s);
|
|
1570
|
+
if (X)
|
|
1571
|
+
for (const v in X)
|
|
1572
|
+
this.dom.setStyle(S, v, X[v]);
|
|
1573
|
+
return [S, E];
|
|
1564
1574
|
}
|
|
1565
1575
|
/**
|
|
1566
1576
|
* Applies CSS classes to an HTML element.
|
|
@@ -1570,8 +1580,8 @@ class $e extends De {
|
|
|
1570
1580
|
* @protected
|
|
1571
1581
|
*/
|
|
1572
1582
|
applyCssClasses(e, t = {}) {
|
|
1573
|
-
e && Object.entries(t).forEach(([o,
|
|
1574
|
-
|
|
1583
|
+
e && Object.entries(t).forEach(([o, i]) => {
|
|
1584
|
+
i ? this.dom.addClass(o, e) : this.dom.removeClass(o, e);
|
|
1575
1585
|
});
|
|
1576
1586
|
}
|
|
1577
1587
|
/**
|
|
@@ -1584,8 +1594,8 @@ class $e extends De {
|
|
|
1584
1594
|
*/
|
|
1585
1595
|
getColumnWidths(e, t) {
|
|
1586
1596
|
const o = [];
|
|
1587
|
-
for (let
|
|
1588
|
-
o.push(this.tableModel.getColumnWidth(
|
|
1597
|
+
for (let i = e; i <= t; i++)
|
|
1598
|
+
o.push(this.tableModel.getColumnWidth(i));
|
|
1589
1599
|
return o;
|
|
1590
1600
|
}
|
|
1591
1601
|
/**
|
|
@@ -1597,10 +1607,10 @@ class $e extends De {
|
|
|
1597
1607
|
* @return {number[]} - An array containing the heights of the rows within the specified range.
|
|
1598
1608
|
*/
|
|
1599
1609
|
getRowHeights(e, t, o) {
|
|
1600
|
-
const
|
|
1601
|
-
for (let
|
|
1602
|
-
|
|
1603
|
-
return
|
|
1610
|
+
const i = [];
|
|
1611
|
+
for (let s = e; s <= t; s++)
|
|
1612
|
+
i.push(o.getRowHeight(s));
|
|
1613
|
+
return i;
|
|
1604
1614
|
}
|
|
1605
1615
|
/**
|
|
1606
1616
|
* Adjusts the position and size of the hover row based on the mouse move event.
|
|
@@ -1611,10 +1621,10 @@ class $e extends De {
|
|
|
1611
1621
|
*/
|
|
1612
1622
|
adjustHoverRows(e) {
|
|
1613
1623
|
if (this.tableOptions.hoverRowVisible && e.rowIndex > -1) {
|
|
1614
|
-
const t = this.hostElement.clientWidth, o = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex),
|
|
1624
|
+
const t = this.hostElement.clientWidth, o = this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex), i = e.rowTop + this.areaHeaderCenter.parent.clientHeight - this.scrollTop;
|
|
1615
1625
|
this.dom.applyStyle(this.hoverRow, {
|
|
1616
1626
|
left: "0",
|
|
1617
|
-
top:
|
|
1627
|
+
top: i + "px",
|
|
1618
1628
|
width: t + "px",
|
|
1619
1629
|
height: o + "px",
|
|
1620
1630
|
display: "block"
|
|
@@ -1644,9 +1654,9 @@ class $e extends De {
|
|
|
1644
1654
|
*/
|
|
1645
1655
|
adjustHoverColumns(e) {
|
|
1646
1656
|
if (this.tableOptions.hoverColumnVisible && e.rowIndex > -1) {
|
|
1647
|
-
const t = this.hostElement.clientHeight, o = this.tableModel.getColumnWidth(e.columnIndex),
|
|
1657
|
+
const t = this.hostElement.clientHeight, o = this.tableModel.getColumnWidth(e.columnIndex), i = this.areaBodyWestGeo.width, s = e.columnLeft + this.tableModel.getPadding().left - this.scrollLeft - i;
|
|
1648
1658
|
this.dom.applyStyle(this.hoverColumn, {
|
|
1649
|
-
left:
|
|
1659
|
+
left: s + "px",
|
|
1650
1660
|
top: "0px",
|
|
1651
1661
|
width: o + "px",
|
|
1652
1662
|
height: t + "px",
|
|
@@ -1688,11 +1698,11 @@ class $e extends De {
|
|
|
1688
1698
|
* @param {boolean} firstDraggingRendering - Indicates if it's the first rendering of the dragging column.
|
|
1689
1699
|
*/
|
|
1690
1700
|
adjustDraggingColumn(e, t, o) {
|
|
1691
|
-
var
|
|
1701
|
+
var i, s;
|
|
1692
1702
|
if (this.dragging) {
|
|
1693
|
-
const r = this.hostElement.clientHeight,
|
|
1694
|
-
if ((
|
|
1695
|
-
const a = { left: ((
|
|
1703
|
+
const r = this.hostElement.clientHeight, l = this.storedColumnWidths[t];
|
|
1704
|
+
if ((i = e.originalEvent) != null && i.clientX) {
|
|
1705
|
+
const a = { left: ((s = e.originalEvent) == null ? void 0 : s.clientX) - l / 2, width: l, height: r, top: 0, index: t };
|
|
1696
1706
|
this.dom.applyStyle(this.draggingColumn, {
|
|
1697
1707
|
background: "rgba(128,128,128,0.2)",
|
|
1698
1708
|
display: "block",
|
|
@@ -1722,29 +1732,29 @@ class $e extends De {
|
|
|
1722
1732
|
* @return {number} The final y-position after rendering all the content.
|
|
1723
1733
|
*/
|
|
1724
1734
|
renderContentOfDraggingColumnForArea(e, t, o = 0) {
|
|
1725
|
-
const
|
|
1735
|
+
const i = "center", s = this.tableModel.getAreaModel(t), r = s == null ? void 0 : s.getRowCount();
|
|
1726
1736
|
if (r) {
|
|
1727
|
-
const
|
|
1737
|
+
const l = e.index ?? 0, n = this.draggingColumn;
|
|
1728
1738
|
for (let d = 0; d < r; d++) {
|
|
1729
|
-
const a = o, h =
|
|
1730
|
-
parent:
|
|
1739
|
+
const a = o, h = s.getRowHeight(d), u = { left: 0, width: e.width, height: h, top: a, index: d }, m = s.getValueAt(d, l), b = s.getCellRenderer(d, l), f = b ? "" : `${m}`, g = {
|
|
1740
|
+
parent: n,
|
|
1731
1741
|
geo: u,
|
|
1732
1742
|
rowIndex: d,
|
|
1733
|
-
columnIndex:
|
|
1743
|
+
columnIndex: l,
|
|
1734
1744
|
areaIdent: t,
|
|
1735
|
-
sideIdent:
|
|
1745
|
+
sideIdent: i,
|
|
1736
1746
|
text: f
|
|
1737
1747
|
}, p = this.dom.addColumnDiv(g);
|
|
1738
1748
|
let C;
|
|
1739
|
-
b && (C = b.render(p, d,
|
|
1740
|
-
const y =
|
|
1749
|
+
b && (C = b.render(p, d, l, t, s, m, this.dom.domService), C && this.cleanupFunctions[t].push(C));
|
|
1750
|
+
const y = s.getCustomClassesAt(d, l);
|
|
1741
1751
|
y.length && this.dom.addClasses(y, p);
|
|
1742
|
-
const R = this.tableModel.getColumnDef(
|
|
1743
|
-
R && R.classes[t] && this.dom.addClasses(R.classes[t], p), this.dom.addColumnBorderDivs(this.tableOptions,
|
|
1744
|
-
const x =
|
|
1752
|
+
const R = this.tableModel.getColumnDef(l);
|
|
1753
|
+
R && R.classes[t] && this.dom.addClasses(R.classes[t], p), this.dom.addColumnBorderDivs(this.tableOptions, n, u, t, i);
|
|
1754
|
+
const x = s.getCustomStyleAt(d, l);
|
|
1745
1755
|
if (x)
|
|
1746
|
-
for (const
|
|
1747
|
-
this.dom.setStyle(p,
|
|
1756
|
+
for (const S in x)
|
|
1757
|
+
this.dom.setStyle(p, S, x[S]);
|
|
1748
1758
|
o = o + h;
|
|
1749
1759
|
}
|
|
1750
1760
|
}
|
|
@@ -1771,11 +1781,11 @@ class $e extends De {
|
|
|
1771
1781
|
* @param {number} height - The height of the target div in pixels.
|
|
1772
1782
|
* @return {HTMLDivElement} - The rendered draggable target div element.
|
|
1773
1783
|
*/
|
|
1774
|
-
renderDragTargetDiv(e, t, o,
|
|
1784
|
+
renderDragTargetDiv(e, t, o, i, s) {
|
|
1775
1785
|
const r = this.dom.applyStylePosistionAbsolute(
|
|
1776
1786
|
this.dom.createDivWithClass("ge-table-drop-zone", e)
|
|
1777
1787
|
);
|
|
1778
|
-
return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${o}px`), this.dom.setStyle(r, "width", `${
|
|
1788
|
+
return this.dom.setStyle(r, "left", `${t}px`), this.dom.setStyle(r, "top", `${o}px`), this.dom.setStyle(r, "width", `${i}px`), this.dom.setStyle(r, "height", `${s}px`), r;
|
|
1779
1789
|
}
|
|
1780
1790
|
/**
|
|
1781
1791
|
* Render selected background div.
|
|
@@ -1794,19 +1804,19 @@ class $e extends De {
|
|
|
1794
1804
|
* @param {number} height - The height of the div.
|
|
1795
1805
|
* @returns {boolean} - Whether the cell is selected.
|
|
1796
1806
|
*/
|
|
1797
|
-
renderSelectedBackgroundDiv(e, t, o,
|
|
1807
|
+
renderSelectedBackgroundDiv(e, t, o, i, s, r, l, n, d, a, h) {
|
|
1798
1808
|
let u = !1;
|
|
1799
|
-
if (!e && t &&
|
|
1809
|
+
if (!e && t && i.isSelectable(s, r) && this.getSelectionModel) {
|
|
1800
1810
|
const m = this.getSelectionModel();
|
|
1801
1811
|
if (m) {
|
|
1802
|
-
const b = m.getSelectionCount(
|
|
1812
|
+
const b = m.getSelectionCount(s, r);
|
|
1803
1813
|
u = b > 0;
|
|
1804
1814
|
for (let f = 0; f < b; f++) {
|
|
1805
1815
|
const g = this.dom.applyStylePosistionAbsolute(
|
|
1806
1816
|
// ge-table-body-west-selected-range
|
|
1807
|
-
this.dom.createDivWithClass(`ge-table-${
|
|
1817
|
+
this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${o}-selected-range`, l)
|
|
1808
1818
|
);
|
|
1809
|
-
this.dom.setStyle(g, "left", `${
|
|
1819
|
+
this.dom.setStyle(g, "left", `${n}px`), this.dom.setStyle(g, "top", `${d}px`), this.dom.setStyle(g, "width", `${a}px`), this.dom.setStyle(g, "height", `${h}px`);
|
|
1810
1820
|
}
|
|
1811
1821
|
}
|
|
1812
1822
|
}
|
|
@@ -1835,11 +1845,11 @@ class $e extends De {
|
|
|
1835
1845
|
areaModel: e,
|
|
1836
1846
|
areaIdent: t,
|
|
1837
1847
|
sideIdent: o,
|
|
1838
|
-
rowIndex:
|
|
1839
|
-
columnIndex:
|
|
1848
|
+
rowIndex: i,
|
|
1849
|
+
columnIndex: s,
|
|
1840
1850
|
left: r,
|
|
1841
|
-
top:
|
|
1842
|
-
width:
|
|
1851
|
+
top: l,
|
|
1852
|
+
width: n,
|
|
1843
1853
|
height: d,
|
|
1844
1854
|
parent: a,
|
|
1845
1855
|
cellSelected: h,
|
|
@@ -1849,12 +1859,12 @@ class $e extends De {
|
|
|
1849
1859
|
areaModel: e,
|
|
1850
1860
|
areaIdent: t,
|
|
1851
1861
|
sideIdent: o,
|
|
1852
|
-
rowIndex:
|
|
1853
|
-
index:
|
|
1862
|
+
rowIndex: i,
|
|
1863
|
+
index: s,
|
|
1854
1864
|
left: r,
|
|
1855
|
-
width:
|
|
1865
|
+
width: n,
|
|
1856
1866
|
height: d,
|
|
1857
|
-
top:
|
|
1867
|
+
top: l,
|
|
1858
1868
|
parent: a,
|
|
1859
1869
|
lastRowOfModel: u
|
|
1860
1870
|
});
|
|
@@ -1874,17 +1884,17 @@ class $e extends De {
|
|
|
1874
1884
|
*
|
|
1875
1885
|
* @return {void}
|
|
1876
1886
|
*/
|
|
1877
|
-
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop:
|
|
1878
|
-
const
|
|
1879
|
-
|
|
1887
|
+
renderHeaderCellResizeHandle({ rowIndex: e, columnIndex: t, cellLeft: o, cellTop: i, cellWidth: s, cellHeight: r, parent: l }) {
|
|
1888
|
+
const n = this.dom.domService, d = this.tableOptions.columnResizeHandleWidthInPx ?? 2, a = n.createElement("div");
|
|
1889
|
+
n.setAttribute(a, "data-col-index", `${t}`), n.setAttribute(a, "data-row-index", `${e}`), n.setAttribute(a, "data-area", "header"), n.setAttribute(a, "data-ge-action", "resize-column"), n.addClass(a, "ge-table-column-resize-handle"), n.setStyle(a, "display", "clip"), n.setStyle(a, "position", "absolute"), n.setStyle(a, "cursor", "col-resize"), n.setStyle(a, "left", `${o + s - d}px`), n.setStyle(a, "top", `${i}px`), n.setStyle(a, "width", `${d}px`), n.setStyle(a, "height", `${r}px`), n.appendChild(l, a);
|
|
1880
1890
|
}
|
|
1881
1891
|
}
|
|
1882
|
-
class
|
|
1892
|
+
class $e {
|
|
1883
1893
|
constructor(e, t) {
|
|
1884
1894
|
this.columnIndex = e, this.sortState = t;
|
|
1885
1895
|
}
|
|
1886
1896
|
}
|
|
1887
|
-
class
|
|
1897
|
+
class Oe {
|
|
1888
1898
|
constructor(e) {
|
|
1889
1899
|
this.tableScope = e, this.tableScope.hostElement.addEventListener("change", this.onHostElementChanged.bind(this));
|
|
1890
1900
|
}
|
|
@@ -1898,40 +1908,40 @@ class Fe {
|
|
|
1898
1908
|
*/
|
|
1899
1909
|
onHostElementChanged(e) {
|
|
1900
1910
|
if (e.target instanceof HTMLInputElement || e.target instanceof HTMLSelectElement || e.target instanceof HTMLTextAreaElement) {
|
|
1901
|
-
const t = e.target, o = t.getAttribute("data-area"),
|
|
1902
|
-
if (o &&
|
|
1903
|
-
const r =
|
|
1904
|
-
this.tableScope.updateModelValueAfterEdit(r,
|
|
1911
|
+
const t = e.target, o = t.getAttribute("data-area"), i = t.getAttribute("data-row-index"), s = t.getAttribute("data-col-index");
|
|
1912
|
+
if (o && i && s) {
|
|
1913
|
+
const r = Z(o), l = Number(i), n = Number(s);
|
|
1914
|
+
this.tableScope.updateModelValueAfterEdit(r, l, n, t.value);
|
|
1905
1915
|
}
|
|
1906
1916
|
}
|
|
1907
1917
|
}
|
|
1908
1918
|
}
|
|
1909
|
-
class
|
|
1919
|
+
class Le {
|
|
1910
1920
|
constructor(e = -1, t = -1) {
|
|
1911
1921
|
this.rowIndex = e, this.columnIndex = t;
|
|
1912
1922
|
}
|
|
1913
1923
|
}
|
|
1914
|
-
class
|
|
1924
|
+
class te {
|
|
1915
1925
|
constructor(e) {
|
|
1916
1926
|
this.cells = e;
|
|
1917
1927
|
}
|
|
1918
1928
|
static createSingle(e, t) {
|
|
1919
|
-
return new
|
|
1929
|
+
return new te([new Le(e, t)]);
|
|
1920
1930
|
}
|
|
1921
1931
|
}
|
|
1922
|
-
class
|
|
1932
|
+
class Pe {
|
|
1923
1933
|
constructor(e) {
|
|
1924
1934
|
var t, o;
|
|
1925
1935
|
this.tableScope = e, (t = this.tableScope.tableOptions) != null && t.getSelectionModel && (this.getSelectionModel = this.tableScope.tableOptions.getSelectionModel), (o = this.tableScope.tableOptions) != null && o.getFocusModel && (this.getFocusModel = this.tableScope.tableOptions.getFocusModel);
|
|
1926
1936
|
}
|
|
1927
1937
|
onMouseClicked(e, t) {
|
|
1928
|
-
var
|
|
1929
|
-
let o = !1,
|
|
1938
|
+
var s, r, l, n, d, a, h;
|
|
1939
|
+
let o = !1, i = !1;
|
|
1930
1940
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
1931
1941
|
const u = this.getSelectionModel(), m = this.getFocusModel();
|
|
1932
|
-
u && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), this.tableScope.
|
|
1942
|
+
u && m && (m.hasFocus(e.rowIndex, e.columnIndex) || (m.setFocus(e.rowIndex, e.columnIndex), this.tableScope.onFocusChanged(m), o = !0), (s = e.originalEvent) != null && s.shiftKey || u.hasSelection() && (u.clear(), o = !0), (r = e.originalEvent) != null && r.shiftKey && this.previousEvt ? (u.addSelection(this.createRangeByEvents(e, this.previousEvt)), i = !0, o = !0) : (l = e.originalEvent) != null && l.altKey && ((n = e.originalEvent) != null && n.ctrlKey || (d = e.originalEvent) != null && d.metaKey) ? (u.removeSelection(A.singleCell(e.rowIndex, e.columnIndex)), i = !0, o = !0) : (a = e.originalEvent) != null && a.ctrlKey || (h = e.originalEvent) != null && h.metaKey ? (u.addSelection(A.singleCell(e.rowIndex, e.columnIndex)), i = !0, o = !0) : (u.firstClick(e.rowIndex, e.columnIndex), o = !0), this.tableScope.onSelectionChanged(u));
|
|
1933
1943
|
}
|
|
1934
|
-
return
|
|
1944
|
+
return i ? this.previousEvt = void 0 : this.previousEvt = e == null ? void 0 : e.clone(), o;
|
|
1935
1945
|
}
|
|
1936
1946
|
onActionTriggered(e) {
|
|
1937
1947
|
if (this.getSelectionModel && this.getFocusModel) {
|
|
@@ -1942,8 +1952,8 @@ class Le {
|
|
|
1942
1952
|
if (e === "DESELECT_ALL")
|
|
1943
1953
|
return t.clear(), this.tableScope.repaint(), !0;
|
|
1944
1954
|
if (e === "TOGGLE_SELECTION") {
|
|
1945
|
-
const [
|
|
1946
|
-
return t.togglePoint(
|
|
1955
|
+
const [i, s] = o.getFocus();
|
|
1956
|
+
return t.togglePoint(i, s), this.tableScope.repaint(), !0;
|
|
1947
1957
|
}
|
|
1948
1958
|
}
|
|
1949
1959
|
}
|
|
@@ -1951,11 +1961,11 @@ class Le {
|
|
|
1951
1961
|
}
|
|
1952
1962
|
createRangeByEvents(e, t) {
|
|
1953
1963
|
t || (t = e);
|
|
1954
|
-
const o = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex),
|
|
1964
|
+
const o = Math.min(e.rowIndex, t == null ? void 0 : t.rowIndex), i = Math.max(e.rowIndex, t == null ? void 0 : t.rowIndex), s = Math.min(e.columnIndex, t == null ? void 0 : t.columnIndex), r = Math.max(e.columnIndex, t == null ? void 0 : t.columnIndex);
|
|
1955
1965
|
return A.create({
|
|
1956
1966
|
rowIndex1: o,
|
|
1957
|
-
columnIndex1:
|
|
1958
|
-
rowIndex2:
|
|
1967
|
+
columnIndex1: s,
|
|
1968
|
+
rowIndex2: i,
|
|
1959
1969
|
columnIndex2: r
|
|
1960
1970
|
});
|
|
1961
1971
|
}
|
|
@@ -1980,7 +1990,7 @@ class He {
|
|
|
1980
1990
|
};
|
|
1981
1991
|
}
|
|
1982
1992
|
}
|
|
1983
|
-
class
|
|
1993
|
+
class Be {
|
|
1984
1994
|
get() {
|
|
1985
1995
|
return {
|
|
1986
1996
|
f2: "START_EDITING",
|
|
@@ -2002,7 +2012,7 @@ class Ve {
|
|
|
2002
2012
|
};
|
|
2003
2013
|
}
|
|
2004
2014
|
}
|
|
2005
|
-
class
|
|
2015
|
+
class Ve {
|
|
2006
2016
|
constructor(e) {
|
|
2007
2017
|
this.tableScope = e, this.shortcutActionIdMapping = {}, this.listener = [], this.listener.push(e), this.init();
|
|
2008
2018
|
}
|
|
@@ -2023,7 +2033,7 @@ class Be {
|
|
|
2023
2033
|
this.assignPredefinedSystemShortcutMappings(), Object.assign(this.shortcutActionIdMapping, this.tableScope.tableOptions.shortcutActionIdMapping), this.isDebug() && console.debug("ShortcutService", this.shortcutActionIdMapping), this.tableScope.hostElement.addEventListener("keydown", this.onKeyDown.bind(this));
|
|
2024
2034
|
}
|
|
2025
2035
|
assignPredefinedSystemShortcutMappings() {
|
|
2026
|
-
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new
|
|
2036
|
+
this.isMacintosh() ? Object.assign(this.shortcutActionIdMapping, new Be().get()) : Object.assign(this.shortcutActionIdMapping, new He().get());
|
|
2027
2037
|
}
|
|
2028
2038
|
isMacintosh() {
|
|
2029
2039
|
return navigator.platform.indexOf("Mac") > -1;
|
|
@@ -2049,8 +2059,8 @@ class Be {
|
|
|
2049
2059
|
const t = this.getTokenByEvent(e);
|
|
2050
2060
|
this.isDebug() && console.debug("ShortcutService tokens :", t);
|
|
2051
2061
|
for (const o in this.shortcutActionIdMapping) {
|
|
2052
|
-
const
|
|
2053
|
-
if (this.areTokensEquals(t,
|
|
2062
|
+
const i = o.replace(/opt/g, "alt").replace(/cmd/g, "meta").split(/[+ ]/g).sort();
|
|
2063
|
+
if (this.areTokensEquals(t, i))
|
|
2054
2064
|
return this.shortcutActionIdMapping[o];
|
|
2055
2065
|
}
|
|
2056
2066
|
}
|
|
@@ -2075,7 +2085,7 @@ class Be {
|
|
|
2075
2085
|
return this.shortcutActionIdMapping;
|
|
2076
2086
|
}
|
|
2077
2087
|
}
|
|
2078
|
-
class
|
|
2088
|
+
class re {
|
|
2079
2089
|
onCheckboxChanged(e) {
|
|
2080
2090
|
}
|
|
2081
2091
|
onContextmenu(e) {
|
|
@@ -2123,18 +2133,18 @@ class We {
|
|
|
2123
2133
|
}
|
|
2124
2134
|
}
|
|
2125
2135
|
class Ge {
|
|
2126
|
-
render(e, t, o,
|
|
2127
|
-
if (
|
|
2128
|
-
|
|
2129
|
-
const
|
|
2136
|
+
render(e, t, o, i, s, r, l) {
|
|
2137
|
+
if (s.isEditable(t, o)) {
|
|
2138
|
+
l.addClass(e, "ge-table-row-input-div");
|
|
2139
|
+
const n = s.getValueAt(t, o);
|
|
2130
2140
|
e.innerHTML = `
|
|
2131
2141
|
<input
|
|
2132
2142
|
type="text"
|
|
2133
|
-
value="${
|
|
2143
|
+
value="${n}"
|
|
2134
2144
|
autofocus
|
|
2135
2145
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
2136
2146
|
data-listen="change"
|
|
2137
|
-
data-area="${
|
|
2147
|
+
data-area="${i}"
|
|
2138
2148
|
data-row-index="${t}"
|
|
2139
2149
|
data-col-index="${o}"
|
|
2140
2150
|
data-input-type="text"
|
|
@@ -2143,17 +2153,31 @@ class Ge {
|
|
|
2143
2153
|
}
|
|
2144
2154
|
}
|
|
2145
2155
|
}
|
|
2146
|
-
class
|
|
2156
|
+
class we {
|
|
2147
2157
|
constructor(e = "none", t = "single") {
|
|
2148
|
-
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
2158
|
+
this.selectionType = e, this.selectionMode = t, this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.silent = !1, this.listenerArr = [];
|
|
2159
|
+
}
|
|
2160
|
+
getEventSelectionChangedListeners() {
|
|
2161
|
+
return this.listenerArr;
|
|
2162
|
+
}
|
|
2163
|
+
addEventSelectionChangedListener(e) {
|
|
2164
|
+
this.listenerArr.includes(e) || this.listenerArr.push(e);
|
|
2165
|
+
}
|
|
2166
|
+
removeEventSelectionChangedListener(e) {
|
|
2167
|
+
const t = this.listenerArr.indexOf(e, 0);
|
|
2168
|
+
t > -1 && this.listenerArr.splice(t, 1);
|
|
2169
|
+
}
|
|
2170
|
+
//@AvoidDoubleExecution(100)
|
|
2171
|
+
fireChangeEvent() {
|
|
2172
|
+
this.silent || this.listenerArr.forEach((e) => e.onSelectionChanged(this));
|
|
2149
2173
|
}
|
|
2150
2174
|
firstClick(e, t) {
|
|
2151
2175
|
this.selectionType === "row" ? this.addRange(A.singleRow(e)) : this.selectionType === "column" && this.addRange(A.singleColumn(t));
|
|
2152
2176
|
}
|
|
2153
2177
|
getSelectionCount(e, t) {
|
|
2154
2178
|
let o = 0;
|
|
2155
|
-
for (const
|
|
2156
|
-
|
|
2179
|
+
for (const i of this.ranges)
|
|
2180
|
+
i.isInRange(e, t) && o++;
|
|
2157
2181
|
return this.allSelected && o++, this.isInNegativeRange(e, t) && (o = 0), o;
|
|
2158
2182
|
}
|
|
2159
2183
|
isInNegativeRange(e, t) {
|
|
@@ -2166,7 +2190,7 @@ class be {
|
|
|
2166
2190
|
return this.ranges;
|
|
2167
2191
|
}
|
|
2168
2192
|
clear() {
|
|
2169
|
-
this.ranges = [], this.negativeRanges = [], this.allSelected = !1;
|
|
2193
|
+
this.ranges = [], this.negativeRanges = [], this.allSelected = !1, this.fireChangeEvent();
|
|
2170
2194
|
}
|
|
2171
2195
|
hasSelection() {
|
|
2172
2196
|
return this.allSelected || !!this.ranges.length;
|
|
@@ -2187,19 +2211,19 @@ class be {
|
|
|
2187
2211
|
return Array.from(e);
|
|
2188
2212
|
}
|
|
2189
2213
|
selectAll() {
|
|
2190
|
-
this.allSelected = !0;
|
|
2214
|
+
this.allSelected = !0, this.fireChangeEvent();
|
|
2191
2215
|
}
|
|
2192
2216
|
isAllSelected() {
|
|
2193
2217
|
return this.allSelected;
|
|
2194
2218
|
}
|
|
2195
2219
|
addSelection(e) {
|
|
2196
|
-
this.addRange(e);
|
|
2220
|
+
this.addRange(e), this.fireChangeEvent();
|
|
2197
2221
|
}
|
|
2198
2222
|
removeSelection(e) {
|
|
2199
2223
|
if (this.selectionType === "none")
|
|
2200
2224
|
return;
|
|
2201
2225
|
let t = e;
|
|
2202
|
-
this.selectionType === "row" ? t = A.singleRow(e.r1) : this.selectionType === "column" && (t = A.singleColumn(e.c1)), this.negativeRanges.push(t);
|
|
2226
|
+
this.selectionType === "row" ? t = A.singleRow(e.r1) : this.selectionType === "column" && (t = A.singleColumn(e.c1)), this.negativeRanges.push(t), this.fireChangeEvent();
|
|
2203
2227
|
}
|
|
2204
2228
|
togglePoint(e, t) {
|
|
2205
2229
|
this.getSelectionCount(e, t) > 0 ? this.removeSelection(A.singleCell(e, t)) : this.addSelection(A.singleCell(e, t));
|
|
@@ -2208,12 +2232,26 @@ class be {
|
|
|
2208
2232
|
return this.getSelectionCount(e, t) > 0;
|
|
2209
2233
|
}
|
|
2210
2234
|
addRange(e) {
|
|
2211
|
-
this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e));
|
|
2235
|
+
this.selectionType !== "none" && (this.allSelected = !1, this.selectionMode === "single" && (this.ranges = []), this.selectionType === "row" ? (e.c1 = 0, e.c2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "column" ? (e.r1 = 0, e.r2 = Number.MAX_SAFE_INTEGER) : this.selectionType === "cell" ? (e.r2 = e.r1, e.c2 = e.c1) : this.selectionType, this.ranges.push(e), this.fireChangeEvent());
|
|
2212
2236
|
}
|
|
2213
2237
|
}
|
|
2214
2238
|
class Ne {
|
|
2215
2239
|
constructor(e = "none") {
|
|
2216
|
-
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1;
|
|
2240
|
+
this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
|
|
2241
|
+
}
|
|
2242
|
+
getEventFocusChangedListeners() {
|
|
2243
|
+
return this.listenerArr;
|
|
2244
|
+
}
|
|
2245
|
+
addEventFocusChangedListener(e) {
|
|
2246
|
+
this.listenerArr.includes(e) || this.listenerArr.push(e);
|
|
2247
|
+
}
|
|
2248
|
+
removeEventFocusChangedListener(e) {
|
|
2249
|
+
const t = this.listenerArr.indexOf(e, 0);
|
|
2250
|
+
t > -1 && this.listenerArr.splice(t, 1);
|
|
2251
|
+
}
|
|
2252
|
+
//@AvoidDoubleExecution(100)
|
|
2253
|
+
fireChangeEvent() {
|
|
2254
|
+
this.listenerArr.forEach((e) => e.onFocusChanged(this));
|
|
2217
2255
|
}
|
|
2218
2256
|
clearChanged() {
|
|
2219
2257
|
this.changed = !1;
|
|
@@ -2222,10 +2260,10 @@ class Ne {
|
|
|
2222
2260
|
return this.changed;
|
|
2223
2261
|
}
|
|
2224
2262
|
clear() {
|
|
2225
|
-
this.rowIndex = -1, this.columnIndex = -1;
|
|
2263
|
+
this.rowIndex = -1, this.columnIndex = -1, this.fireChangeEvent();
|
|
2226
2264
|
}
|
|
2227
2265
|
setFocus(e, t) {
|
|
2228
|
-
(this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0);
|
|
2266
|
+
(this.rowIndex !== e || this.columnIndex !== t) && (this.rowIndex = e, this.columnIndex = t, this.changed = !0, this.fireChangeEvent());
|
|
2229
2267
|
}
|
|
2230
2268
|
hasFocus(e, t) {
|
|
2231
2269
|
return this.rowIndex === e && this.columnIndex === t;
|
|
@@ -2234,12 +2272,12 @@ class Ne {
|
|
|
2234
2272
|
return [this.rowIndex, this.columnIndex];
|
|
2235
2273
|
}
|
|
2236
2274
|
}
|
|
2237
|
-
class
|
|
2238
|
-
constructor(e = new
|
|
2275
|
+
class oe {
|
|
2276
|
+
constructor(e = new $(
|
|
2239
2277
|
"❯",
|
|
2240
2278
|
"",
|
|
2241
2279
|
["gt-table-icon-expanded"]
|
|
2242
|
-
), t = new
|
|
2280
|
+
), t = new $(
|
|
2243
2281
|
"❯",
|
|
2244
2282
|
"transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",
|
|
2245
2283
|
["ge-table-icon-collapsed"]
|
|
@@ -2248,17 +2286,17 @@ class Q {
|
|
|
2248
2286
|
}
|
|
2249
2287
|
// `⊖ `, `⊕ `;
|
|
2250
2288
|
}
|
|
2251
|
-
const ze = new
|
|
2252
|
-
class
|
|
2289
|
+
const ze = new we(), je = new Ne("cell");
|
|
2290
|
+
class U {
|
|
2253
2291
|
constructor() {
|
|
2254
2292
|
this.overflowX = "auto", this.overflowY = "auto", this.horizontalBorderVisible = !0, this.verticalBorderVisible = !0, this.footerSeparatorBorderVisible = !0, this.headerSeparatorBorderVisible = !0, this.fixedEastSeparatorBorderVisible = !0, this.fixedWestSeparatorBorderVisible = !0, this.tableTopBorderVisible = !0, this.tableBottomBorderVisible = !0, this.hoverRowVisible = !0, this.hoverColumnVisible = !0, this.columnsResizable = !0, this.columnsDraggable = !0, this.columnResizeHandleWidthInPx = 4, this.defaultRowHeights = {
|
|
2255
2293
|
header: 34,
|
|
2256
2294
|
body: 34,
|
|
2257
2295
|
footer: 34
|
|
2258
|
-
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new
|
|
2296
|
+
}, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new fe(), this.headerGroupOptions = new oe(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new me(), this.sortOrder = ["asc", "desc"], this.getEditRenderer = (e, t) => new Ge(), this.getSelectionModel = () => ze, this.getFocusModel = () => je;
|
|
2259
2297
|
}
|
|
2260
2298
|
}
|
|
2261
|
-
const
|
|
2299
|
+
const P = class P {
|
|
2262
2300
|
/**
|
|
2263
2301
|
* Returns the content to be copied based on the provided table model, selection model, and focus model.
|
|
2264
2302
|
*
|
|
@@ -2269,28 +2307,28 @@ const Z = class X {
|
|
|
2269
2307
|
* @throws {string} Throws an error if neither selection nor focus is defined.
|
|
2270
2308
|
*/
|
|
2271
2309
|
createContent(e, t, o) {
|
|
2272
|
-
return new Promise((
|
|
2310
|
+
return new Promise((i, s) => {
|
|
2273
2311
|
if (t != null && t.hasSelection()) {
|
|
2274
2312
|
const r = this.mergeRanges(t.getRanges());
|
|
2275
2313
|
if (r) {
|
|
2276
2314
|
r.c2 = Math.min(r.c2, e.getColumnCount() - 1), r.r2 = Math.min(r.r2, e.getBodyModel().getRowCount() - 1);
|
|
2277
|
-
const
|
|
2278
|
-
for (let
|
|
2315
|
+
const l = [];
|
|
2316
|
+
for (let n = r.r1; n <= r.r2; n++) {
|
|
2279
2317
|
const d = [];
|
|
2280
2318
|
for (let a = r.c1; a <= r.c2; a++) {
|
|
2281
|
-
const h = t.isSelected(
|
|
2319
|
+
const h = t.isSelected(n, a) ? e.getBodyModel().getTextValueAt(n, a) : "";
|
|
2282
2320
|
d.push(h);
|
|
2283
2321
|
}
|
|
2284
|
-
|
|
2322
|
+
l.push(d.join(P.columnSeparatorChar));
|
|
2285
2323
|
}
|
|
2286
|
-
return
|
|
2324
|
+
return i(l.join(P.rowSeparatorChar));
|
|
2287
2325
|
}
|
|
2288
2326
|
}
|
|
2289
2327
|
if (o) {
|
|
2290
|
-
const [r,
|
|
2291
|
-
return
|
|
2328
|
+
const [r, l] = o.getFocus(), n = e.getBodyModel().getTextValueAt(r, l);
|
|
2329
|
+
return i(n);
|
|
2292
2330
|
}
|
|
2293
|
-
|
|
2331
|
+
s("Cannot copy, neither selection nor focus defined.");
|
|
2294
2332
|
});
|
|
2295
2333
|
}
|
|
2296
2334
|
/**
|
|
@@ -2311,19 +2349,19 @@ const Z = class X {
|
|
|
2311
2349
|
* @returns {Promise<string>} A promise that resolves with the copied text if successful, or rejects if an error occurs.
|
|
2312
2350
|
*/
|
|
2313
2351
|
copyToClipboard(e, t, o) {
|
|
2314
|
-
return new Promise((
|
|
2352
|
+
return new Promise((i, s) => {
|
|
2315
2353
|
this.createContent(
|
|
2316
2354
|
e,
|
|
2317
2355
|
t,
|
|
2318
2356
|
o
|
|
2319
2357
|
).then((r) => {
|
|
2320
|
-
r && this.copyContent(r).then((
|
|
2321
|
-
|
|
2322
|
-
}).catch((
|
|
2323
|
-
|
|
2358
|
+
r && this.copyContent(r).then((l) => {
|
|
2359
|
+
i(r);
|
|
2360
|
+
}).catch((l) => {
|
|
2361
|
+
s();
|
|
2324
2362
|
});
|
|
2325
2363
|
}).catch((r) => {
|
|
2326
|
-
|
|
2364
|
+
s();
|
|
2327
2365
|
});
|
|
2328
2366
|
});
|
|
2329
2367
|
}
|
|
@@ -2340,23 +2378,21 @@ const Z = class X {
|
|
|
2340
2378
|
return t;
|
|
2341
2379
|
}
|
|
2342
2380
|
};
|
|
2343
|
-
|
|
2344
|
-
Z.rowSeparatorChar = `
|
|
2381
|
+
P.columnSeparatorChar = " ", P.rowSeparatorChar = `
|
|
2345
2382
|
`;
|
|
2346
|
-
let
|
|
2347
|
-
class
|
|
2348
|
-
constructor(e, t, o,
|
|
2349
|
-
var
|
|
2350
|
-
if (super(
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
new ve(o),
|
|
2354
|
-
s
|
|
2355
|
-
), this.eventListener = i, this.copyService = r, this.licenseManager = P.getInstance(), this.selectionService = new Le(this), this.api = new Me(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, i || (this.eventListener = new oe()), (n = this.tableOptions) != null && n.autoRestoreOptions) {
|
|
2356
|
-
const l = this.tableOptions.autoRestoreOptions, d = l.getStorageKeyFn;
|
|
2357
|
-
d && (l.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ee(d)), l.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ke(d)), l.autoRestoreSortingState && (this.storeSortingService = new Te(d)));
|
|
2383
|
+
let N = P;
|
|
2384
|
+
class Se extends Fe {
|
|
2385
|
+
constructor(e, t, o, i, s, r = new N()) {
|
|
2386
|
+
var d;
|
|
2387
|
+
if (super(e, t, new ve(o), i), this.eventListener = s, this.copyService = r, this.licenseManager = L.getInstance(), this.selectionService = new Pe(this), this.api = new Me(this), this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, s || (this.eventListener = new re()), (d = this.tableOptions) != null && d.autoRestoreOptions) {
|
|
2388
|
+
const a = this.tableOptions.autoRestoreOptions, h = a.getStorageKeyFn;
|
|
2389
|
+
h && (a.autoRestoreScrollPosition && (this.storeScrollPosStateService = new Ee(h)), a.autoRestoreCollapsedExpandedState && (this.storeStateCollapsedExpandService = new ke(h)), a.autoRestoreSortingState && (this.storeSortingService = new Te(h)));
|
|
2358
2390
|
}
|
|
2359
|
-
this.mouseHandler = new Ae(this), this.inputHandler = new
|
|
2391
|
+
this.mouseHandler = new Ae(this), this.inputHandler = new Oe(this), this.shortcutService = new Ve(this), this.shortcutService.addListener(this.selectionService);
|
|
2392
|
+
const l = this.getSelectionModel ? this.getSelectionModel() : void 0;
|
|
2393
|
+
l && l.addEventSelectionChangedListener(this);
|
|
2394
|
+
const n = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
2395
|
+
n && n.addEventFocusChangedListener(this);
|
|
2360
2396
|
}
|
|
2361
2397
|
/**
|
|
2362
2398
|
* Creates a TableScope instance.
|
|
@@ -2370,15 +2406,8 @@ class fe extends $e {
|
|
|
2370
2406
|
*
|
|
2371
2407
|
* @return {TableScope} - The newly created TableScope instance.
|
|
2372
2408
|
*/
|
|
2373
|
-
static create(e, t, o = new
|
|
2374
|
-
return new
|
|
2375
|
-
e,
|
|
2376
|
-
t,
|
|
2377
|
-
i,
|
|
2378
|
-
o,
|
|
2379
|
-
s,
|
|
2380
|
-
r
|
|
2381
|
-
);
|
|
2409
|
+
static create(e, t, o = new U(), i = new re(), s = new We(), r = new N()) {
|
|
2410
|
+
return new Se(e, t, s, o, i, r);
|
|
2382
2411
|
}
|
|
2383
2412
|
/**
|
|
2384
2413
|
* Triggers an action based on the provided actionId.
|
|
@@ -2394,19 +2423,19 @@ class fe extends $e {
|
|
|
2394
2423
|
if (e === "START_EDITING" && this.getFocusModel) {
|
|
2395
2424
|
const t = this.getFocusModel();
|
|
2396
2425
|
if (t) {
|
|
2397
|
-
const [o,
|
|
2398
|
-
this.tableModel.getBodyModel().isEditable(o,
|
|
2426
|
+
const [o, i] = t.getFocus();
|
|
2427
|
+
this.tableModel.getBodyModel().isEditable(o, i) && (this.clearSelection(), this.initRenderEditor(o, i));
|
|
2399
2428
|
}
|
|
2400
2429
|
return !0;
|
|
2401
2430
|
}
|
|
2402
2431
|
if (e === "COPY_2_CLIPBOARD") {
|
|
2403
2432
|
const t = this.getSelectionModel ? this.getSelectionModel() : void 0, o = this.getFocusModel ? this.getFocusModel() : void 0;
|
|
2404
|
-
this.copyService.createContent(this.tableModel, t, o).then((
|
|
2433
|
+
this.copyService.createContent(this.tableModel, t, o).then((i) => this.copyService.copyContent(i));
|
|
2405
2434
|
}
|
|
2406
2435
|
return !1;
|
|
2407
2436
|
}
|
|
2408
|
-
updateModelValueAfterEdit(e, t, o,
|
|
2409
|
-
e === "body" && this.tableModel.getAreaModel(e).setValue(t, o,
|
|
2437
|
+
updateModelValueAfterEdit(e, t, o, i) {
|
|
2438
|
+
e === "body" && this.tableModel.getAreaModel(e).setValue(t, o, i) && (this.resetEditorRenderer(), this.repaint(), this.eventListener.onModelChanged(te.createSingle(t, o)), this.hostElement.focus());
|
|
2410
2439
|
}
|
|
2411
2440
|
/**
|
|
2412
2441
|
* Retrieves the TableApi object.
|
|
@@ -2435,16 +2464,16 @@ class fe extends $e {
|
|
|
2435
2464
|
* @return {GeMouseEvent} - The created GeMouseEvent object.
|
|
2436
2465
|
*/
|
|
2437
2466
|
createGeMouseEvent(e) {
|
|
2438
|
-
const t = new
|
|
2467
|
+
const t = new Q();
|
|
2439
2468
|
if (t.originalEvent = e, e) {
|
|
2440
2469
|
const o = e.target;
|
|
2441
2470
|
if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(o), t.rowIndex = this.getNumberByAttr(o, "data-row-index"), t.columnIndex = this.getNumberByAttr(o, "data-col-index"), t.action = this.getStringByAttr(o, "data-ge-action"), t.areaIdent) {
|
|
2442
|
-
const
|
|
2443
|
-
t.rowTop =
|
|
2471
|
+
const i = this.tableModel.getAreaModel(t.areaIdent);
|
|
2472
|
+
t.rowTop = i.getYPosByRowIndex(t.rowIndex);
|
|
2444
2473
|
}
|
|
2445
2474
|
if (t.columnLeft = this.tableModel.getXPosByColumnIndex(t.columnIndex), e.ctrlKey && e.altKey) {
|
|
2446
|
-
const
|
|
2447
|
-
this.debugOnce(
|
|
2475
|
+
const i = e.clientY - this.hostElement.offsetTop - this.areaHeaderCenter.parent.clientHeight, s = e.clientX - this.hostElement.offsetLeft - this.areaBodyWestGeo.width;
|
|
2476
|
+
this.debugOnce(s, i);
|
|
2448
2477
|
}
|
|
2449
2478
|
}
|
|
2450
2479
|
return t;
|
|
@@ -2505,7 +2534,7 @@ class fe extends $e {
|
|
|
2505
2534
|
toggleExpandCollapseAll(e = !0) {
|
|
2506
2535
|
var o;
|
|
2507
2536
|
const t = this.tableModel.getBodyModel();
|
|
2508
|
-
|
|
2537
|
+
K(t) && (t.toggleExpandCollapseAll(e), this.repaint(), (o = this.storeStateCollapsedExpandService) == null || o.collapsedStateAll(e));
|
|
2509
2538
|
}
|
|
2510
2539
|
/**
|
|
2511
2540
|
* Toggles the checkbox state of a specific row in a table.
|
|
@@ -2517,11 +2546,11 @@ class fe extends $e {
|
|
|
2517
2546
|
* @return {void} - This method does not return anything.
|
|
2518
2547
|
*/
|
|
2519
2548
|
toggleRowCheckbox(e, t, o) {
|
|
2520
|
-
var
|
|
2521
|
-
const
|
|
2522
|
-
|
|
2523
|
-
const
|
|
2524
|
-
this.eventListener.onCheckboxChanged(
|
|
2549
|
+
var n;
|
|
2550
|
+
const i = this.tableModel.getAreaModel(o), s = i.isRowChecked(e), r = s === void 0 || s === "semi" || s === "none";
|
|
2551
|
+
i.setRowChecked(e, r), this.repaint();
|
|
2552
|
+
const l = (n = i.rowSelectionModel) == null ? void 0 : n.getCheckedRows();
|
|
2553
|
+
this.eventListener.onCheckboxChanged(l || []);
|
|
2525
2554
|
}
|
|
2526
2555
|
/**
|
|
2527
2556
|
* Handle mouse click events.
|
|
@@ -2534,8 +2563,8 @@ class fe extends $e {
|
|
|
2534
2563
|
let o = this.selectionService.onMouseClicked(e, t);
|
|
2535
2564
|
if (!o && this.getFocusModel) {
|
|
2536
2565
|
this.resetEditorRenderer();
|
|
2537
|
-
const
|
|
2538
|
-
|
|
2566
|
+
const i = this.getFocusModel();
|
|
2567
|
+
i && (o = i.hasChanged(), i.clearChanged());
|
|
2539
2568
|
}
|
|
2540
2569
|
return o;
|
|
2541
2570
|
}
|
|
@@ -2545,6 +2574,12 @@ class fe extends $e {
|
|
|
2545
2574
|
publishGeMouseEvent(e) {
|
|
2546
2575
|
this.eventListener.onMouseClicked(e);
|
|
2547
2576
|
}
|
|
2577
|
+
onFocusChanged(e) {
|
|
2578
|
+
this.eventListener.onFocusChanged(e);
|
|
2579
|
+
}
|
|
2580
|
+
onSelectionChanged(e) {
|
|
2581
|
+
this.eventListener.onSelectionChanged(e);
|
|
2582
|
+
}
|
|
2548
2583
|
/**
|
|
2549
2584
|
* Updates the table (repaint) when an external filter is changed.
|
|
2550
2585
|
*
|
|
@@ -2565,12 +2600,12 @@ class fe extends $e {
|
|
|
2565
2600
|
* @return {void}
|
|
2566
2601
|
*/
|
|
2567
2602
|
onHeaderDblClicked(e, t, o) {
|
|
2568
|
-
var
|
|
2569
|
-
const
|
|
2570
|
-
if (
|
|
2603
|
+
var s, r;
|
|
2604
|
+
const i = this.tableModel.getColumnDef(o);
|
|
2605
|
+
if (i != null && i.sortable && i.sortable()) {
|
|
2571
2606
|
e.preventDefault(), e.stopPropagation();
|
|
2572
|
-
const
|
|
2573
|
-
this.tableModel.doSort([a]) && ((
|
|
2607
|
+
const l = i.sortStatesOrder ? i.sortStatesOrder : this.tableOptions.sortOrder, n = i.sortState ?? "", d = l[(l.indexOf(n) + 1) % l.length], a = new $e(o, d);
|
|
2608
|
+
this.tableModel.doSort([a]) && ((s = this.tableModel.getColumnDefs()) == null || s.forEach((u) => u.sortState = ""), i.sortState = d), this.repaint(), (r = this.storeSortingService) == null || r.setSortItems([a]);
|
|
2574
2609
|
}
|
|
2575
2610
|
}
|
|
2576
2611
|
/**
|
|
@@ -2592,8 +2627,8 @@ class fe extends $e {
|
|
|
2592
2627
|
* @return {void}
|
|
2593
2628
|
*/
|
|
2594
2629
|
scrollToIndex(e, t) {
|
|
2595
|
-
const
|
|
2596
|
-
this.scrollToPixel(0,
|
|
2630
|
+
const i = this.tableModel.getAreaModel("body").getYPosByRowIndex(t);
|
|
2631
|
+
this.scrollToPixel(0, i);
|
|
2597
2632
|
}
|
|
2598
2633
|
/**
|
|
2599
2634
|
* Sets the selection model for the table.
|
|
@@ -2642,8 +2677,8 @@ class fe extends $e {
|
|
|
2642
2677
|
if (!this.isEditing() && this.getFocusModel) {
|
|
2643
2678
|
const o = this.getFocusModel();
|
|
2644
2679
|
if (o) {
|
|
2645
|
-
const [
|
|
2646
|
-
return o.setFocus(
|
|
2680
|
+
const [i, s] = o.getFocus();
|
|
2681
|
+
return o.setFocus(i + t, s + e), this.repaint(), !0;
|
|
2647
2682
|
}
|
|
2648
2683
|
}
|
|
2649
2684
|
return !1;
|
|
@@ -2712,33 +2747,32 @@ class fe extends $e {
|
|
|
2712
2747
|
autoRestoreCollapsedExpandedState() {
|
|
2713
2748
|
var e, t;
|
|
2714
2749
|
if ((t = (e = this.tableOptions) == null ? void 0 : e.autoRestoreOptions) != null && t.getRowId && this.storeStateCollapsedExpandService) {
|
|
2715
|
-
const o = this.tableOptions.autoRestoreOptions,
|
|
2716
|
-
if (o.autoRestoreCollapsedExpandedState &&
|
|
2717
|
-
const
|
|
2718
|
-
if (
|
|
2719
|
-
const
|
|
2720
|
-
for (let d = 0; d <
|
|
2750
|
+
const o = this.tableOptions.autoRestoreOptions, i = o.getRowId;
|
|
2751
|
+
if (o.autoRestoreCollapsedExpandedState && i) {
|
|
2752
|
+
const s = this.storeStateCollapsedExpandService.collapsedExpandedStateGet(), r = this.tableModel.getAreaModel("body");
|
|
2753
|
+
if (K(r)) {
|
|
2754
|
+
const l = r, n = r.getRowCount();
|
|
2755
|
+
for (let d = 0; d < n; d++) {
|
|
2721
2756
|
const a = r.getRowByIndex(d);
|
|
2722
2757
|
if (a)
|
|
2723
|
-
if (
|
|
2758
|
+
if (s.allExpanded)
|
|
2724
2759
|
a.expanded = !0;
|
|
2725
|
-
else if (
|
|
2760
|
+
else if (s.allCollapsed)
|
|
2726
2761
|
a.expanded = !1;
|
|
2727
2762
|
else {
|
|
2728
|
-
const h =
|
|
2729
|
-
|
|
2763
|
+
const h = i(a.data);
|
|
2764
|
+
s.mode === "expanded" ? a.expanded = this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h) : s.mode === "collapsed" && (a.expanded = !this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h));
|
|
2730
2765
|
}
|
|
2731
2766
|
}
|
|
2732
|
-
|
|
2767
|
+
l.recalcVisibleTreeRows();
|
|
2733
2768
|
}
|
|
2734
2769
|
}
|
|
2735
2770
|
}
|
|
2736
2771
|
}
|
|
2737
2772
|
}
|
|
2738
|
-
class
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
|
-
me.vars = {
|
|
2773
|
+
const z = class z {
|
|
2774
|
+
};
|
|
2775
|
+
z.themes = ["light", "combat", "paper", "blackboard"], z.vars = {
|
|
2742
2776
|
light: `html[data-theme="light"] {
|
|
2743
2777
|
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
2744
2778
|
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
@@ -2972,51 +3006,52 @@ me.vars = {
|
|
|
2972
3006
|
--ge-table-drop-zone-bg: #758129;
|
|
2973
3007
|
}`
|
|
2974
3008
|
};
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
3009
|
+
let ne = z;
|
|
3010
|
+
class le {
|
|
3011
|
+
constructor(e, t = !0, o, i, s = 0, r = !1, l = !1) {
|
|
3012
|
+
this.data = e, this.expanded = t, this.children = o, this.parent = i, this.deep = s, this.checked = r, this.keep = l, this.type = "TreeRow";
|
|
2978
3013
|
}
|
|
2979
3014
|
}
|
|
2980
|
-
class
|
|
3015
|
+
class q {
|
|
2981
3016
|
static buildTreeRows(e, t = "children", o = 12) {
|
|
2982
|
-
const
|
|
2983
|
-
for (const
|
|
2984
|
-
|
|
2985
|
-
return
|
|
3017
|
+
const i = [];
|
|
3018
|
+
for (const s of e)
|
|
3019
|
+
i.push(q.buildTreeRow(s, t, void 0, 0, o));
|
|
3020
|
+
return i;
|
|
2986
3021
|
}
|
|
2987
|
-
static buildTreeRow(e, t = "children", o = new
|
|
2988
|
-
var
|
|
2989
|
-
if (
|
|
2990
|
-
return console.warn("Max deep limit reached: ",
|
|
3022
|
+
static buildTreeRow(e, t = "children", o = new le(e, !0, [], void 0, 0), i = 0, s = 12) {
|
|
3023
|
+
var l;
|
|
3024
|
+
if (i > s)
|
|
3025
|
+
return console.warn("Max deep limit reached: ", i), o;
|
|
2991
3026
|
const r = e[t];
|
|
2992
3027
|
if (r)
|
|
2993
|
-
for (const
|
|
2994
|
-
const d = new
|
|
2995
|
-
if ((
|
|
2996
|
-
|
|
3028
|
+
for (const n of r) {
|
|
3029
|
+
const d = new le(n, !0, [], o, i + 1);
|
|
3030
|
+
if ((l = o.children) == null || l.push(d), q.buildTreeRow(
|
|
3031
|
+
n,
|
|
2997
3032
|
t,
|
|
2998
3033
|
d,
|
|
2999
|
-
|
|
3000
|
-
),
|
|
3001
|
-
return console.warn("Max deep limit reached: ",
|
|
3034
|
+
i + 1
|
|
3035
|
+
), i > s)
|
|
3036
|
+
return console.warn("Max deep limit reached: ", i), o;
|
|
3002
3037
|
}
|
|
3003
3038
|
return o;
|
|
3004
3039
|
}
|
|
3005
3040
|
}
|
|
3006
|
-
class
|
|
3041
|
+
class B {
|
|
3007
3042
|
constructor(e = 34, t = 34, o = 34) {
|
|
3008
3043
|
this.header = e, this.body = t, this.footer = o;
|
|
3009
3044
|
}
|
|
3010
3045
|
}
|
|
3011
|
-
class
|
|
3046
|
+
class w {
|
|
3012
3047
|
constructor(e = 100, t = "px") {
|
|
3013
3048
|
this.value = e, this.unit = t;
|
|
3014
3049
|
}
|
|
3015
3050
|
}
|
|
3016
|
-
const Xe = () => !0,
|
|
3051
|
+
const Xe = () => !0, ae = () => !1;
|
|
3017
3052
|
class V {
|
|
3018
|
-
constructor(e, t, o = new
|
|
3019
|
-
this.property = e, this.headerLabel = t, this.width = o, this.classes =
|
|
3053
|
+
constructor(e, t, o = new w(100, "px"), i = new T(), s = new T(), r = new w(100, "px"), l = new w(100, "px"), n, d, a, h, u, m, b, f, g = () => this.visible) {
|
|
3054
|
+
this.property = e, this.headerLabel = t, this.width = o, this.classes = i, this.rendererMap = s, this.minWidth = r, this.maxWidth = l, this.sortable = n, this.sortComparator = d, this.sortState = a, this.sortStatesOrder = h, this.sortIconVisible = u, this.editable = m, this.getEditRenderer = b, this.editInputPipe = f, this.isVisible = g, this.visible = !0;
|
|
3020
3055
|
}
|
|
3021
3056
|
static bodyRenderer(e) {
|
|
3022
3057
|
return new T(
|
|
@@ -3034,31 +3069,31 @@ class V {
|
|
|
3034
3069
|
e.headerClasses,
|
|
3035
3070
|
e.bodyClasses,
|
|
3036
3071
|
e.footerClasses
|
|
3037
|
-
),
|
|
3072
|
+
), i = e.sortIconVisible ?? e.sortable ?? ae, s = e.editable ?? e.editable ?? ae, r = e.isVisible ?? e.isVisible ?? Xe;
|
|
3038
3073
|
return new V(
|
|
3039
3074
|
e.property ?? "",
|
|
3040
3075
|
e.headerLabel ?? "",
|
|
3041
|
-
e.width ?? new
|
|
3076
|
+
e.width ?? new w(100, "px"),
|
|
3042
3077
|
o,
|
|
3043
3078
|
t,
|
|
3044
|
-
e.minWidth ?? new
|
|
3045
|
-
e.maxWidth ?? new
|
|
3079
|
+
e.minWidth ?? new w(100, "px"),
|
|
3080
|
+
e.maxWidth ?? new w(100, "px"),
|
|
3046
3081
|
e.sortable,
|
|
3047
3082
|
e.sortComparator,
|
|
3048
3083
|
e.sortState,
|
|
3049
3084
|
e.sortStatesOrder,
|
|
3050
|
-
s,
|
|
3051
3085
|
i,
|
|
3086
|
+
s,
|
|
3052
3087
|
e.getEditRenderer,
|
|
3053
3088
|
e.editInputPipe,
|
|
3054
3089
|
r
|
|
3055
3090
|
);
|
|
3056
3091
|
}
|
|
3057
3092
|
}
|
|
3058
|
-
const tt = new
|
|
3059
|
-
class
|
|
3093
|
+
const tt = new w(300, "px"), ot = new w(290, "px"), it = new w(280, "px"), st = new w(270, "px"), rt = new w(260, "px"), nt = new w(250, "px"), lt = new w(240, "px"), at = new w(230, "px"), dt = new w(220, "px"), ht = new w(210, "px"), de = new w(200, "px"), ct = new w(190, "px"), ut = new w(180, "px"), gt = new w(170, "px"), pt = new w(160, "px"), bt = new w(150, "px"), ft = new w(140, "px"), mt = new w(130, "px"), wt = new w(120, "px"), St = new w(110, "px"), xt = new w(100, "px"), Ct = new w(90, "px"), yt = new w(80, "px"), vt = new w(70, "px"), Rt = new w(60, "px"), At = new w(50, "px"), Mt = new w(40, "px"), Et = new w(30, "px"), It = new w(20, "px"), kt = new w(10, "px"), Tt = new w(0, "px");
|
|
3094
|
+
class ie {
|
|
3060
3095
|
constructor(e, t = [], o = -1) {
|
|
3061
|
-
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = o, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((
|
|
3096
|
+
this.areaIdent = e, this.columnDefs = t, this.defaultRowHeight = o, this.rowSelectionModel = void 0, this.yPositions = [], this.cellRenderers = t.map((i) => i.rendererMap[e]);
|
|
3062
3097
|
}
|
|
3063
3098
|
getTextValueAt(e, t) {
|
|
3064
3099
|
return "" + this.getValueAt(e, t);
|
|
@@ -3116,16 +3151,16 @@ class ee {
|
|
|
3116
3151
|
return !1;
|
|
3117
3152
|
}
|
|
3118
3153
|
isEditable(e, t) {
|
|
3119
|
-
var
|
|
3120
|
-
const o = (
|
|
3121
|
-
return ((
|
|
3154
|
+
var i, s;
|
|
3155
|
+
const o = (i = this.columnDefs) == null ? void 0 : i[t];
|
|
3156
|
+
return ((s = o == null ? void 0 : o.editable) == null ? void 0 : s.call(o)) ?? !1;
|
|
3122
3157
|
}
|
|
3123
3158
|
setValue(e, t, o) {
|
|
3124
|
-
var
|
|
3125
|
-
const
|
|
3126
|
-
|
|
3127
|
-
const
|
|
3128
|
-
return r.includes(".") ? this.setPropertyValue(
|
|
3159
|
+
var l;
|
|
3160
|
+
const i = (l = this.columnDefs[t]) == null ? void 0 : l.editInputPipe;
|
|
3161
|
+
i && (o = i(o, e, t));
|
|
3162
|
+
const s = this.getRowByIndex(e), r = this.columnDefs[t].property;
|
|
3163
|
+
return r.includes(".") ? this.setPropertyValue(s, r.split("."), o) : (s[r] = o, !0);
|
|
3129
3164
|
}
|
|
3130
3165
|
isSelectable(e, t) {
|
|
3131
3166
|
return !0;
|
|
@@ -3134,16 +3169,16 @@ class ee {
|
|
|
3134
3169
|
this.arrayMove(this.cellRenderers, e, t);
|
|
3135
3170
|
}
|
|
3136
3171
|
setPropertyValue(e, t, o) {
|
|
3137
|
-
const
|
|
3138
|
-
if (
|
|
3139
|
-
const
|
|
3140
|
-
return
|
|
3172
|
+
const i = t.shift();
|
|
3173
|
+
if (i) {
|
|
3174
|
+
const s = e[i];
|
|
3175
|
+
return s && t.length ? this.setPropertyValue(s, t, o) : (e[i] = o, !0);
|
|
3141
3176
|
}
|
|
3142
3177
|
return !1;
|
|
3143
3178
|
}
|
|
3144
3179
|
arrayMove(e, t, o) {
|
|
3145
|
-
const
|
|
3146
|
-
return e.splice(o, 0,
|
|
3180
|
+
const i = e.splice(t, 1)[0];
|
|
3181
|
+
return e.splice(o, 0, i), e;
|
|
3147
3182
|
}
|
|
3148
3183
|
calcYPositions() {
|
|
3149
3184
|
const e = this.getRowCount();
|
|
@@ -3152,9 +3187,9 @@ class ee {
|
|
|
3152
3187
|
this.yPositions[t + 1] = this.getRowHeight(t) + this.yPositions[t];
|
|
3153
3188
|
}
|
|
3154
3189
|
}
|
|
3155
|
-
class D extends
|
|
3156
|
-
constructor(e, t, o,
|
|
3157
|
-
super(e,
|
|
3190
|
+
class D extends ie {
|
|
3191
|
+
constructor(e, t, o, i = []) {
|
|
3192
|
+
super(e, i, o), this.areaIdent = e, this.arr = t, this.defaultRowHeight = o, this.columnDefs = i, this.filteredArr = [...t];
|
|
3158
3193
|
}
|
|
3159
3194
|
externalFilterChanged(e) {
|
|
3160
3195
|
this.filteredArr = this.arr ? this.arr.filter(e) : [];
|
|
@@ -3166,9 +3201,9 @@ class D extends ee {
|
|
|
3166
3201
|
return this.filteredArr[e][t];
|
|
3167
3202
|
}
|
|
3168
3203
|
setValue(e, t, o) {
|
|
3169
|
-
var
|
|
3170
|
-
const
|
|
3171
|
-
return
|
|
3204
|
+
var s;
|
|
3205
|
+
const i = (s = this.columnDefs[t]) == null ? void 0 : s.editInputPipe;
|
|
3206
|
+
return i && (o = i(o, e, t)), this.arr[e][t] = o, !0;
|
|
3172
3207
|
}
|
|
3173
3208
|
getRowByIndex(e) {
|
|
3174
3209
|
return this.filteredArr[e];
|
|
@@ -3255,15 +3290,15 @@ class _ {
|
|
|
3255
3290
|
class Ye {
|
|
3256
3291
|
flattenTree(e, t = []) {
|
|
3257
3292
|
var o;
|
|
3258
|
-
for (const
|
|
3259
|
-
this.isVisible(
|
|
3293
|
+
for (const i of e)
|
|
3294
|
+
this.isVisible(i) && t.push(i), (o = i.children) != null && o.length && this.flattenTree(i.children, t);
|
|
3260
3295
|
return t;
|
|
3261
3296
|
}
|
|
3262
3297
|
isVisible(e) {
|
|
3263
3298
|
return e.parent ? e.parent.expanded ? this.isVisible(e.parent) : !1 : !0;
|
|
3264
3299
|
}
|
|
3265
3300
|
}
|
|
3266
|
-
class
|
|
3301
|
+
class xe {
|
|
3267
3302
|
genericSortComparator(e, t, o) {
|
|
3268
3303
|
if (typeof e == "number" && typeof t == "number")
|
|
3269
3304
|
return o * (e - t);
|
|
@@ -3274,16 +3309,16 @@ class Se {
|
|
|
3274
3309
|
if (e instanceof Date && t instanceof Date)
|
|
3275
3310
|
return o * (e.getTime() - t.getTime());
|
|
3276
3311
|
if (e instanceof Array && t instanceof Array) {
|
|
3277
|
-
const
|
|
3278
|
-
if (
|
|
3279
|
-
return this.genericSortComparator(
|
|
3312
|
+
const i = e, s = t;
|
|
3313
|
+
if (i.length && s.length)
|
|
3314
|
+
return this.genericSortComparator(i[0], s[0], o);
|
|
3280
3315
|
}
|
|
3281
3316
|
return o * ("" + e).localeCompare("" + t);
|
|
3282
3317
|
}
|
|
3283
3318
|
}
|
|
3284
|
-
class
|
|
3285
|
-
constructor(e, t, o,
|
|
3286
|
-
super(e,
|
|
3319
|
+
class he extends ie {
|
|
3320
|
+
constructor(e, t, o, i = []) {
|
|
3321
|
+
super(e, i, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = i, this.type = "AreaModelTree", this.sorterService = new xe(), this.service = new Ye(), this.properties = i.map((s) => s.property), this.flattenRows = this.service.flattenTree(t), this.filteredFlattenRows = [...this.flattenRows];
|
|
3287
3322
|
}
|
|
3288
3323
|
changeColumnOrder(e, t) {
|
|
3289
3324
|
this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
|
|
@@ -3303,9 +3338,9 @@ class ne extends ee {
|
|
|
3303
3338
|
getValueAt(e, t) {
|
|
3304
3339
|
const o = this.getRowByIndex(e);
|
|
3305
3340
|
if (o) {
|
|
3306
|
-
const
|
|
3307
|
-
if (
|
|
3308
|
-
return
|
|
3341
|
+
const i = this.properties[t];
|
|
3342
|
+
if (i)
|
|
3343
|
+
return i.includes(".") ? this.getPropertyValue(o.data, i.split(".")) : o.data[i];
|
|
3309
3344
|
}
|
|
3310
3345
|
return "";
|
|
3311
3346
|
}
|
|
@@ -3325,8 +3360,8 @@ class ne extends ee {
|
|
|
3325
3360
|
this.lastPredictFn = e, this.doFiltering();
|
|
3326
3361
|
}
|
|
3327
3362
|
doSort(e) {
|
|
3328
|
-
const { columnIndex: t, sortState: o } = e[e.length - 1],
|
|
3329
|
-
return this.treeSort(this.rows,
|
|
3363
|
+
const { columnIndex: t, sortState: o } = e[e.length - 1], i = o === "asc" ? 1 : o === "desc" ? -1 : 0, s = this.properties[t];
|
|
3364
|
+
return this.treeSort(this.rows, s, i), this.flattenRows = this.service.flattenTree(this.rows), this.filteredFlattenRows = [...this.flattenRows], !0;
|
|
3330
3365
|
}
|
|
3331
3366
|
toggleExpandCollapseAll(e) {
|
|
3332
3367
|
this.expandAllRecursive(this.rows, e), this.flattenRows = this.service.flattenTree(this.rows), this.doFiltering();
|
|
@@ -3336,19 +3371,19 @@ class ne extends ee {
|
|
|
3336
3371
|
}
|
|
3337
3372
|
setValue(e, t, o) {
|
|
3338
3373
|
var r;
|
|
3339
|
-
const
|
|
3340
|
-
|
|
3341
|
-
const
|
|
3342
|
-
if (
|
|
3343
|
-
const
|
|
3344
|
-
return
|
|
3374
|
+
const i = (r = this.columnDefs[t]) == null ? void 0 : r.editInputPipe;
|
|
3375
|
+
i && (o = i(o, e, t));
|
|
3376
|
+
const s = this.getRowByIndex(e);
|
|
3377
|
+
if (s) {
|
|
3378
|
+
const l = s.data, n = this.columnDefs[t].property;
|
|
3379
|
+
return n.includes(".") ? this.setPropertyValue(l, n.split("."), o) : (l[n] = o, !0);
|
|
3345
3380
|
}
|
|
3346
3381
|
return !1;
|
|
3347
3382
|
}
|
|
3348
3383
|
genericTreeTableSortComparator(e, t) {
|
|
3349
|
-
return (o,
|
|
3350
|
-
const
|
|
3351
|
-
return this.sorterService.genericSortComparator(
|
|
3384
|
+
return (o, i) => {
|
|
3385
|
+
const s = this.getValueByT(o.data, e), r = this.getValueByT(i.data, e);
|
|
3386
|
+
return this.sorterService.genericSortComparator(s, r, t);
|
|
3352
3387
|
};
|
|
3353
3388
|
}
|
|
3354
3389
|
expandAllRecursive(e, t) {
|
|
@@ -3365,27 +3400,27 @@ class ne extends ee {
|
|
|
3365
3400
|
e = Math.max(e, o.deep);
|
|
3366
3401
|
});
|
|
3367
3402
|
const t = this.flattenRows.filter(
|
|
3368
|
-
(o,
|
|
3403
|
+
(o, i, s) => this.lastPredictFn(o, i, s)
|
|
3369
3404
|
);
|
|
3370
3405
|
this.flattenRows.forEach((o) => o.keep = !1), this.flattenRows.forEach((o) => {
|
|
3371
3406
|
t.includes(o) && (o.keep = !0, this.setAllParentsOk(o));
|
|
3372
3407
|
}), this.filteredFlattenRows = this.flattenRows.filter(
|
|
3373
|
-
(o,
|
|
3408
|
+
(o, i, s) => o.keep
|
|
3374
3409
|
);
|
|
3375
3410
|
}
|
|
3376
3411
|
}
|
|
3377
3412
|
getPropertyValue(e, t) {
|
|
3378
3413
|
const o = t.shift();
|
|
3379
|
-
let
|
|
3380
|
-
return
|
|
3414
|
+
let i = e[o];
|
|
3415
|
+
return i && t.length ? this.getPropertyValue(i, t) : i;
|
|
3381
3416
|
}
|
|
3382
3417
|
treeSort(e, t, o) {
|
|
3383
3418
|
e.sort(this.genericTreeTableSortComparator(t, o));
|
|
3384
|
-
for (const
|
|
3385
|
-
|
|
3419
|
+
for (const i of e)
|
|
3420
|
+
i.children && this.treeSort(i.children, t, o);
|
|
3386
3421
|
}
|
|
3387
3422
|
}
|
|
3388
|
-
class
|
|
3423
|
+
class ce {
|
|
3389
3424
|
constructor(e = []) {
|
|
3390
3425
|
this.allRootNodes = e;
|
|
3391
3426
|
}
|
|
@@ -3425,8 +3460,8 @@ class ae {
|
|
|
3425
3460
|
areAllChildrenChecked(e) {
|
|
3426
3461
|
var t, o;
|
|
3427
3462
|
if ((t = e.children) != null && t.length) {
|
|
3428
|
-
for (const
|
|
3429
|
-
if (!
|
|
3463
|
+
for (const i of e.children)
|
|
3464
|
+
if (!i.checked || (o = i.children) != null && o.length && !this.areAllChildrenChecked(i))
|
|
3430
3465
|
return !1;
|
|
3431
3466
|
}
|
|
3432
3467
|
return !0;
|
|
@@ -3434,8 +3469,8 @@ class ae {
|
|
|
3434
3469
|
areAllChildrenUnchecked(e) {
|
|
3435
3470
|
var t, o;
|
|
3436
3471
|
if ((t = e.children) != null && t.length) {
|
|
3437
|
-
for (const
|
|
3438
|
-
if (
|
|
3472
|
+
for (const i of e.children)
|
|
3473
|
+
if (i.checked || (o = i.children) != null && o.length && !this.areAllChildrenUnchecked(i))
|
|
3439
3474
|
return !1;
|
|
3440
3475
|
}
|
|
3441
3476
|
return !0;
|
|
@@ -3445,9 +3480,9 @@ class ae {
|
|
|
3445
3480
|
o.checked && t.push(o), o.children && this.addSelectedRecursive(o.children, t);
|
|
3446
3481
|
}
|
|
3447
3482
|
}
|
|
3448
|
-
class
|
|
3449
|
-
constructor(e = 0, t = 0, o = 0,
|
|
3450
|
-
this.top = e, this.right = t, this.bottom = o, this.left =
|
|
3483
|
+
class ue {
|
|
3484
|
+
constructor(e = 0, t = 0, o = 0, i = 0) {
|
|
3485
|
+
this.top = e, this.right = t, this.bottom = o, this.left = i;
|
|
3451
3486
|
}
|
|
3452
3487
|
}
|
|
3453
3488
|
class Ke {
|
|
@@ -3481,11 +3516,11 @@ class Ke {
|
|
|
3481
3516
|
}
|
|
3482
3517
|
}
|
|
3483
3518
|
}
|
|
3484
|
-
class
|
|
3485
|
-
constructor(e, t, o,
|
|
3519
|
+
class Y {
|
|
3520
|
+
constructor(e, t, o, i = 0, s = 0, r = !1, l = new B(), n = [], d = [], a = -1, h = 0, u = 400, m = () => {
|
|
3486
3521
|
}) {
|
|
3487
3522
|
var b, f, g, p;
|
|
3488
|
-
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount =
|
|
3523
|
+
this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = o, this.fixedLeftColumnCount = i, this.fixedRightColumnCount = s, this.rowCheckboxVisible = r, this.defaultRowHeights = l, this.columnDefs = n, this.columnSizes = d, this.overridingColumnWidth = a, this.columnCount = h, this.parentSize = u, this.getSelectionModel = m, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new ue(0, 0, 0, 0), this.xPositions = [], e.areaIdent = "header", t.areaIdent = "body", o.areaIdent = "footer", this.columnCount || ((b = this.columnDefs) != null && b.length ? this.columnCount = this.columnDefs.length : (f = this.columnSizes) != null && f.length && (this.columnCount = (g = this.columnSizes) == null ? void 0 : g.length)), (p = this.columnDefs) != null && p.length && ye(this.columnDefs[0]) && !t.rowSelectionModel && (t.rowSelectionModel = new Ke());
|
|
3489
3524
|
}
|
|
3490
3525
|
init() {
|
|
3491
3526
|
this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
|
|
@@ -3565,11 +3600,11 @@ class N {
|
|
|
3565
3600
|
* @returns {void}
|
|
3566
3601
|
*/
|
|
3567
3602
|
recalcPadding() {
|
|
3568
|
-
const e = this.getSideAreaWidth("west"), t = this.getSideAreaWidth("east"), o = this.getAreaHeight("header"),
|
|
3569
|
-
this.padding = new
|
|
3603
|
+
const e = this.getSideAreaWidth("west"), t = this.getSideAreaWidth("east"), o = this.getAreaHeight("header"), i = this.getAreaHeight("footer");
|
|
3604
|
+
this.padding = new ue(
|
|
3570
3605
|
o,
|
|
3571
3606
|
t,
|
|
3572
|
-
|
|
3607
|
+
i,
|
|
3573
3608
|
e
|
|
3574
3609
|
);
|
|
3575
3610
|
}
|
|
@@ -3626,10 +3661,10 @@ class N {
|
|
|
3626
3661
|
const t = this.getModel(e), o = t.getRowCount();
|
|
3627
3662
|
if (this.defaultRowHeights[e])
|
|
3628
3663
|
return o * this.defaultRowHeights[e];
|
|
3629
|
-
let
|
|
3630
|
-
for (let
|
|
3631
|
-
|
|
3632
|
-
return
|
|
3664
|
+
let i = 0;
|
|
3665
|
+
for (let s = 0; s < o; s++)
|
|
3666
|
+
i = i + t.getRowHeight(s);
|
|
3667
|
+
return i;
|
|
3633
3668
|
}
|
|
3634
3669
|
/**
|
|
3635
3670
|
* Returns the total width of the side area identified by sideIdent.
|
|
@@ -3639,10 +3674,10 @@ class N {
|
|
|
3639
3674
|
*/
|
|
3640
3675
|
getSideAreaWidth(e) {
|
|
3641
3676
|
const [t, o] = this.getSideStartAndEndColumnIndex(e);
|
|
3642
|
-
let
|
|
3643
|
-
for (let
|
|
3644
|
-
|
|
3645
|
-
return
|
|
3677
|
+
let i = 0;
|
|
3678
|
+
for (let s = t; s <= o; s++)
|
|
3679
|
+
i = i + this.getColumnWidth(s);
|
|
3680
|
+
return i;
|
|
3646
3681
|
}
|
|
3647
3682
|
/**
|
|
3648
3683
|
* Retrieves the start and end column indices based on the given side identifier.
|
|
@@ -3652,8 +3687,8 @@ class N {
|
|
|
3652
3687
|
*/
|
|
3653
3688
|
getSideStartAndEndColumnIndex(e) {
|
|
3654
3689
|
const t = this.getFixedLeftColumnCount(), o = this.getFixedRightColumnCount();
|
|
3655
|
-
let
|
|
3656
|
-
return e === "west" ?
|
|
3690
|
+
let i = 0, s = this.columnCount - 1;
|
|
3691
|
+
return e === "west" ? s = t - 1 : e === "east" ? i = this.columnCount - o : (i = t, s = this.columnCount - o - 1), [i, s];
|
|
3657
3692
|
}
|
|
3658
3693
|
/**
|
|
3659
3694
|
* Returns the column definition at the specified index.
|
|
@@ -3801,30 +3836,30 @@ class N {
|
|
|
3801
3836
|
* @returns {void}
|
|
3802
3837
|
*/
|
|
3803
3838
|
changeColumnOrder(e, t) {
|
|
3804
|
-
var o,
|
|
3805
|
-
this.arrayMove(this.columnDefs, e, t), this.arrayMove(this.columnSizes, e, t), (o = this.headerAreaModel) == null || o.changeColumnOrder(e, t), (
|
|
3839
|
+
var o, i, s;
|
|
3840
|
+
this.arrayMove(this.columnDefs, e, t), this.arrayMove(this.columnSizes, e, t), (o = this.headerAreaModel) == null || o.changeColumnOrder(e, t), (i = this.bodyAreaModel) == null || i.changeColumnOrder(e, t), (s = this.footerAreaModel) == null || s.changeColumnOrder(e, t), this.calcXPositions();
|
|
3806
3841
|
}
|
|
3807
3842
|
recalcColumnWidthes(e) {
|
|
3808
|
-
var t, o,
|
|
3809
|
-
!((t = this.columnDefs) != null && t.length) && !((o = this.columnSizes) != null && o.length) && (this.columnSizes = new Array(this.getColumnCount()).fill(this.overridingColumnWidth)), (
|
|
3810
|
-
if (
|
|
3811
|
-
let r = Math.floor(
|
|
3812
|
-
if (
|
|
3813
|
-
const
|
|
3814
|
-
r = Math.max(
|
|
3843
|
+
var t, o, i;
|
|
3844
|
+
!((t = this.columnDefs) != null && t.length) && !((o = this.columnSizes) != null && o.length) && (this.columnSizes = new Array(this.getColumnCount()).fill(this.overridingColumnWidth)), (i = this.columnDefs) != null && i.length && (this.columnSizes = this.columnDefs.map((s) => {
|
|
3845
|
+
if (s.width.unit === "%" && e) {
|
|
3846
|
+
let r = Math.floor(s.width.value * e / 100);
|
|
3847
|
+
if (s.minWidth) {
|
|
3848
|
+
const l = s.minWidth.unit === "px" ? s.minWidth.value : Math.floor(s.minWidth.value * e / 100);
|
|
3849
|
+
r = Math.max(l, r);
|
|
3815
3850
|
}
|
|
3816
|
-
if (
|
|
3817
|
-
const
|
|
3818
|
-
r = Math.min(
|
|
3851
|
+
if (s.maxWidth) {
|
|
3852
|
+
const l = s.maxWidth.unit === "px" ? s.maxWidth.value : Math.floor(s.maxWidth.value * e / 100);
|
|
3853
|
+
r = Math.min(l, r);
|
|
3819
3854
|
}
|
|
3820
3855
|
return r;
|
|
3821
3856
|
}
|
|
3822
|
-
return
|
|
3857
|
+
return s.width.value;
|
|
3823
3858
|
}));
|
|
3824
3859
|
}
|
|
3825
3860
|
arrayMove(e, t, o) {
|
|
3826
|
-
const
|
|
3827
|
-
return e.splice(o, 0,
|
|
3861
|
+
const i = e.splice(t, 1)[0];
|
|
3862
|
+
return e.splice(o, 0, i), e;
|
|
3828
3863
|
}
|
|
3829
3864
|
recalcContentWidthInPx() {
|
|
3830
3865
|
this.contentWidthInPx = this.getSideAreaWidth("center");
|
|
@@ -3836,9 +3871,9 @@ class N {
|
|
|
3836
3871
|
this.xPositions[t + 1] = this.getColumnWidth(t) + this.xPositions[t];
|
|
3837
3872
|
}
|
|
3838
3873
|
}
|
|
3839
|
-
class Ue extends
|
|
3840
|
-
constructor(e, t, o,
|
|
3841
|
-
super(e,
|
|
3874
|
+
class Ue extends ie {
|
|
3875
|
+
constructor(e, t, o, i = []) {
|
|
3876
|
+
super(e, i, o), this.areaIdent = e, this.rows = t, this.defaultRowHeight = o, this.columnDefs = i, this.sorterService = new xe(), this.filteredRows = [...t], this.properties = i.map((s) => s.property);
|
|
3842
3877
|
}
|
|
3843
3878
|
setRows(e) {
|
|
3844
3879
|
this.rows = e, this.filteredRows = [...e];
|
|
@@ -3849,8 +3884,8 @@ class Ue extends ee {
|
|
|
3849
3884
|
}
|
|
3850
3885
|
getValueAt(e, t) {
|
|
3851
3886
|
const o = this.properties[t];
|
|
3852
|
-
let
|
|
3853
|
-
return
|
|
3887
|
+
let i = this.filteredRows[e];
|
|
3888
|
+
return H(i) && (i = i.data), i ? this.getValueByT(i, o) : "";
|
|
3854
3889
|
}
|
|
3855
3890
|
getFilteredRows() {
|
|
3856
3891
|
return this.filteredRows;
|
|
@@ -3869,8 +3904,8 @@ class Ue extends ee {
|
|
|
3869
3904
|
}
|
|
3870
3905
|
doSort(e) {
|
|
3871
3906
|
for (const t of e) {
|
|
3872
|
-
const { columnIndex: o, sortState:
|
|
3873
|
-
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(r,
|
|
3907
|
+
const { columnIndex: o, sortState: i } = t, s = i === "asc" ? 1 : i === "desc" ? -1 : 0, r = this.properties[o];
|
|
3908
|
+
this.filteredRows = this.filteredRows.sort(this.genericFlatTableSortComparator(r, s));
|
|
3874
3909
|
}
|
|
3875
3910
|
return !0;
|
|
3876
3911
|
}
|
|
@@ -3881,34 +3916,34 @@ class Ue extends ee {
|
|
|
3881
3916
|
this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
|
|
3882
3917
|
}
|
|
3883
3918
|
genericFlatTableSortComparator(e, t) {
|
|
3884
|
-
return (o,
|
|
3885
|
-
const
|
|
3886
|
-
return this.sorterService.genericSortComparator(
|
|
3919
|
+
return (o, i) => {
|
|
3920
|
+
const s = this.getValueByT(o, e), r = this.getValueByT(i, e);
|
|
3921
|
+
return this.sorterService.genericSortComparator(s, r, t);
|
|
3887
3922
|
};
|
|
3888
3923
|
}
|
|
3889
3924
|
getPropertyValue(e, t) {
|
|
3890
|
-
const o = t.shift(),
|
|
3891
|
-
return
|
|
3925
|
+
const o = t.shift(), i = e[o];
|
|
3926
|
+
return i && t.length ? this.getPropertyValue(i, t) : i;
|
|
3892
3927
|
}
|
|
3893
3928
|
}
|
|
3894
|
-
class
|
|
3895
|
-
constructor(e, t, o,
|
|
3929
|
+
class ge extends Ue {
|
|
3930
|
+
constructor(e, t, o, i) {
|
|
3896
3931
|
super(
|
|
3897
3932
|
e,
|
|
3898
3933
|
t,
|
|
3899
|
-
|
|
3934
|
+
i,
|
|
3900
3935
|
o
|
|
3901
|
-
), this.areaIdent = e, this.rows = t, this.columnDefs = o, this.defaultRowHeight =
|
|
3936
|
+
), this.areaIdent = e, this.rows = t, this.columnDefs = o, this.defaultRowHeight = i;
|
|
3902
3937
|
}
|
|
3903
3938
|
}
|
|
3904
|
-
class
|
|
3939
|
+
class O {
|
|
3905
3940
|
static createTableModel(e) {
|
|
3906
|
-
var t, o,
|
|
3941
|
+
var t, o, i, s, r, l, n, d, a, h, u, m, b, f;
|
|
3907
3942
|
if (e.defaultRowHeights === void 0)
|
|
3908
3943
|
if ((t = e.tableOptions) != null && t.defaultRowHeights)
|
|
3909
3944
|
e.defaultRowHeights = e.tableOptions.defaultRowHeights;
|
|
3910
3945
|
else {
|
|
3911
|
-
if (e.defaultRowHeights = new
|
|
3946
|
+
if (e.defaultRowHeights = new B(), e.headerAreaModel && "defaultRowHeight" in e.headerAreaModel) {
|
|
3912
3947
|
const g = e.headerAreaModel.defaultRowHeight;
|
|
3913
3948
|
g > -1 && (e.defaultRowHeights.header = g);
|
|
3914
3949
|
}
|
|
@@ -3921,7 +3956,7 @@ class F {
|
|
|
3921
3956
|
g > -1 && (e.defaultRowHeights.footer = g);
|
|
3922
3957
|
}
|
|
3923
3958
|
}
|
|
3924
|
-
if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((g) => new V(g, g.toUpperCase(),
|
|
3959
|
+
if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((g) => new V(g, g.toUpperCase(), de)) : (i = e.rows) != null && i.length ? e.columnDefs = Object.keys(e.rows[0]).map((g) => new V(g, g.toUpperCase(), de)) : e.columnDefs = []), e.columnCount === void 0 && ((s = e.columnDefs) != null && s.length ? e.columnCount = e.columnDefs.length : (r = e.headerData) != null && r.length ? e.columnCount = e.headerData[0].length : (l = e.columnSizes) != null && l.length ? e.columnCount = (n = e.columnSizes) == null ? void 0 : n.length : console.warn('Property "columnCount" is missing and cannot be derived from other properties.')), e.headerAreaModel || ((d = e.headerData) != null && d.length ? e.headerAreaModel = new D(
|
|
3925
3960
|
"header",
|
|
3926
3961
|
e.headerData,
|
|
3927
3962
|
e.defaultRowHeights.header,
|
|
@@ -3938,16 +3973,16 @@ class F {
|
|
|
3938
3973
|
e.columnDefs
|
|
3939
3974
|
) : e.footerAreaModel = new _("footer")), !e.bodyAreaModel)
|
|
3940
3975
|
if (e.rows)
|
|
3941
|
-
if ((u = e.rows) != null && u.length &&
|
|
3976
|
+
if ((u = e.rows) != null && u.length && H(e.rows[0])) {
|
|
3942
3977
|
const g = e.rows;
|
|
3943
|
-
e.bodyAreaModel = new
|
|
3978
|
+
e.bodyAreaModel = new he(
|
|
3944
3979
|
"body",
|
|
3945
3980
|
g,
|
|
3946
3981
|
e.defaultRowHeights.body,
|
|
3947
3982
|
e.columnDefs
|
|
3948
|
-
), (e.columnDefs[0].property === "CheckboxColumn" || (m = e.tableOptions) != null && m.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new
|
|
3983
|
+
), (e.columnDefs[0].property === "CheckboxColumn" || (m = e.tableOptions) != null && m.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new ce(g));
|
|
3949
3984
|
} else
|
|
3950
|
-
e.bodyAreaModel = new
|
|
3985
|
+
e.bodyAreaModel = new ge(
|
|
3951
3986
|
"body",
|
|
3952
3987
|
e.rows,
|
|
3953
3988
|
e.columnDefs,
|
|
@@ -3959,7 +3994,7 @@ class F {
|
|
|
3959
3994
|
e.bodyData,
|
|
3960
3995
|
e.defaultRowHeights.body
|
|
3961
3996
|
) : e.bodyAreaModel = new _("body");
|
|
3962
|
-
return e.fixedLeftColumnCount === void 0 && (e.fixedLeftColumnCount = 0), e.fixedRightColumnCount === void 0 && (e.fixedRightColumnCount = 0), e.rowCheckboxVisible === void 0 && (e.rowCheckboxVisible = !1), e.overridingColumnWidth === void 0 && (e.overridingColumnWidth = -1), !e.getSelectionModel && ((b = e.tableOptions) != null && b.getSelectionModel) && (e.getSelectionModel = (f = e.tableOptions) == null ? void 0 : f.getSelectionModel), new
|
|
3997
|
+
return e.fixedLeftColumnCount === void 0 && (e.fixedLeftColumnCount = 0), e.fixedRightColumnCount === void 0 && (e.fixedRightColumnCount = 0), e.rowCheckboxVisible === void 0 && (e.rowCheckboxVisible = !1), e.overridingColumnWidth === void 0 && (e.overridingColumnWidth = -1), !e.getSelectionModel && ((b = e.tableOptions) != null && b.getSelectionModel) && (e.getSelectionModel = (f = e.tableOptions) == null ? void 0 : f.getSelectionModel), new Y(
|
|
3963
3998
|
e.headerAreaModel,
|
|
3964
3999
|
e.bodyAreaModel,
|
|
3965
4000
|
e.footerAreaModel,
|
|
@@ -3976,30 +4011,30 @@ class F {
|
|
|
3976
4011
|
);
|
|
3977
4012
|
}
|
|
3978
4013
|
static buildByTypedRowsParam(e) {
|
|
3979
|
-
return
|
|
4014
|
+
return O.buildByTypedRows(
|
|
3980
4015
|
e.rows ?? [],
|
|
3981
4016
|
e.columnDefs,
|
|
3982
|
-
e.tableOptions ?? new
|
|
4017
|
+
e.tableOptions ?? new U(),
|
|
3983
4018
|
e.fixedLeftColumnCount ?? 0,
|
|
3984
4019
|
e.fixedRightColumnCount ?? 0
|
|
3985
4020
|
);
|
|
3986
4021
|
}
|
|
3987
|
-
static buildByTypedRows(e, t, o = new
|
|
3988
|
-
const r = o.defaultRowHeights,
|
|
3989
|
-
if (e != null && e.length &&
|
|
3990
|
-
const
|
|
4022
|
+
static buildByTypedRows(e, t, o = new U(), i = 0, s = 0) {
|
|
4023
|
+
const r = o.defaultRowHeights, l = t[0].property === "CheckboxColumn";
|
|
4024
|
+
if (e != null && e.length && H(e[0])) {
|
|
4025
|
+
const n = e, d = new he(
|
|
3991
4026
|
"body",
|
|
3992
|
-
|
|
4027
|
+
n,
|
|
3993
4028
|
r.body,
|
|
3994
4029
|
t
|
|
3995
4030
|
);
|
|
3996
|
-
return (
|
|
4031
|
+
return (l || o.showCheckboxWihoutExtraColumn) && (d.rowSelectionModel = new ce(n)), O.createByAreaModelsParam({
|
|
3997
4032
|
headerAreaModel: new D("header", [t.map((a) => a.headerLabel)], r.header),
|
|
3998
4033
|
bodyAreaModel: d,
|
|
3999
4034
|
footerAreaModel: new D("footer", [], r.footer),
|
|
4000
4035
|
columnDefs: t,
|
|
4001
|
-
fixedLeftColumnCount:
|
|
4002
|
-
fixedRightColumnCount:
|
|
4036
|
+
fixedLeftColumnCount: i,
|
|
4037
|
+
fixedRightColumnCount: s,
|
|
4003
4038
|
defaultRowHeights: o.defaultRowHeights,
|
|
4004
4039
|
rowCheckboxVisible: !1,
|
|
4005
4040
|
columnSizes: [],
|
|
@@ -4007,45 +4042,45 @@ class F {
|
|
|
4007
4042
|
overridingColumnWidth: -1
|
|
4008
4043
|
});
|
|
4009
4044
|
}
|
|
4010
|
-
return
|
|
4045
|
+
return O.createByObjectArrayParam({
|
|
4011
4046
|
rows: e,
|
|
4012
4047
|
columnDefs: t,
|
|
4013
|
-
fixedLeftColumnCount:
|
|
4014
|
-
fixedRightColumnCount:
|
|
4048
|
+
fixedLeftColumnCount: i,
|
|
4049
|
+
fixedRightColumnCount: s,
|
|
4015
4050
|
defaultRowHeights: o.defaultRowHeights
|
|
4016
4051
|
});
|
|
4017
4052
|
}
|
|
4018
4053
|
static createByObjectArrayParam(e) {
|
|
4019
4054
|
const t = e.rowCheckboxVisible !== void 0 ? e.rowCheckboxVisible : !1;
|
|
4020
|
-
return
|
|
4055
|
+
return O.createByObjectArray(
|
|
4021
4056
|
e.rows,
|
|
4022
4057
|
e.header ?? [],
|
|
4023
4058
|
e.footer ?? [],
|
|
4024
4059
|
e.fixedLeftColumnCount ?? 0,
|
|
4025
4060
|
e.fixedRightColumnCount ?? 0,
|
|
4026
4061
|
t,
|
|
4027
|
-
e.defaultRowHeights ?? new
|
|
4062
|
+
e.defaultRowHeights ?? new B(),
|
|
4028
4063
|
e.columnDefs ?? [],
|
|
4029
4064
|
e.columnSizes ?? []
|
|
4030
4065
|
);
|
|
4031
4066
|
}
|
|
4032
|
-
static createByAreaModels(e = new _(), t, o = new _(),
|
|
4033
|
-
return new
|
|
4067
|
+
static createByAreaModels(e = new _(), t, o = new _(), i = 0, s = 0, r = !1, l = new B(), n, d = [], a = -1, h) {
|
|
4068
|
+
return new Y(
|
|
4034
4069
|
e,
|
|
4035
4070
|
t,
|
|
4036
4071
|
o,
|
|
4037
|
-
s,
|
|
4038
4072
|
i,
|
|
4073
|
+
s,
|
|
4039
4074
|
r,
|
|
4040
|
-
n,
|
|
4041
4075
|
l,
|
|
4076
|
+
n,
|
|
4042
4077
|
d,
|
|
4043
4078
|
a,
|
|
4044
4079
|
h
|
|
4045
4080
|
);
|
|
4046
4081
|
}
|
|
4047
4082
|
static createByAreaModelsParam(e) {
|
|
4048
|
-
return
|
|
4083
|
+
return O.createByAreaModels(
|
|
4049
4084
|
e.headerAreaModel ?? new _(),
|
|
4050
4085
|
e.bodyAreaModel,
|
|
4051
4086
|
e.footerAreaModel ?? new _(),
|
|
@@ -4059,19 +4094,19 @@ class F {
|
|
|
4059
4094
|
e.columnCount ?? 0
|
|
4060
4095
|
);
|
|
4061
4096
|
}
|
|
4062
|
-
static createByObjectArray(e, t = [], o = [],
|
|
4097
|
+
static createByObjectArray(e, t = [], o = [], i = 0, s = 0, r = !1, l = new B(), n, d = []) {
|
|
4063
4098
|
let a;
|
|
4064
|
-
t != null && t.length ? a = new D("header", t,
|
|
4065
|
-
const h = o ? new D("footer", o,
|
|
4066
|
-
return new
|
|
4099
|
+
t != null && t.length ? a = new D("header", t, l.header, n) : n != null && n.length ? a = new D("header", [n.map((m) => m.headerLabel)], l.header, n) : a = new _();
|
|
4100
|
+
const h = o ? new D("footer", o, l.footer, n) : new _(), u = new ge("body", e, n, l.body);
|
|
4101
|
+
return new Y(
|
|
4067
4102
|
a,
|
|
4068
4103
|
u,
|
|
4069
4104
|
h,
|
|
4070
|
-
s,
|
|
4071
4105
|
i,
|
|
4106
|
+
s,
|
|
4072
4107
|
r,
|
|
4073
|
-
n,
|
|
4074
4108
|
l,
|
|
4109
|
+
n,
|
|
4075
4110
|
d
|
|
4076
4111
|
);
|
|
4077
4112
|
}
|
|
@@ -4100,21 +4135,21 @@ class _t {
|
|
|
4100
4135
|
}
|
|
4101
4136
|
}
|
|
4102
4137
|
class qe {
|
|
4103
|
-
constructor(e, t, o,
|
|
4104
|
-
this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = o, this.filter =
|
|
4138
|
+
constructor(e, t, o, i, s, r, l) {
|
|
4139
|
+
this.emmitDataKey = e, this.emmitCancelKey = t, this.queryId = o, this.filter = i, this.sorting = s, this.startIndex = r, this.endIndex = l;
|
|
4105
4140
|
}
|
|
4106
4141
|
}
|
|
4107
|
-
class
|
|
4108
|
-
constructor(e, t, o,
|
|
4142
|
+
class Ft extends qe {
|
|
4143
|
+
constructor(e, t, o, i, s, r, l, n) {
|
|
4109
4144
|
super(
|
|
4110
4145
|
e,
|
|
4111
4146
|
t,
|
|
4112
4147
|
o,
|
|
4113
|
-
s,
|
|
4114
4148
|
i,
|
|
4149
|
+
s,
|
|
4115
4150
|
r,
|
|
4116
|
-
|
|
4117
|
-
), this.rows =
|
|
4151
|
+
l
|
|
4152
|
+
), this.rows = n;
|
|
4118
4153
|
}
|
|
4119
4154
|
}
|
|
4120
4155
|
class Je {
|
|
@@ -4122,33 +4157,33 @@ class Je {
|
|
|
4122
4157
|
this.value = e, this.label = t;
|
|
4123
4158
|
}
|
|
4124
4159
|
}
|
|
4125
|
-
class
|
|
4160
|
+
class $t {
|
|
4126
4161
|
constructor(e, t) {
|
|
4127
4162
|
this.index = e, this.px = t;
|
|
4128
4163
|
}
|
|
4129
4164
|
}
|
|
4130
|
-
const
|
|
4165
|
+
const Ot = { body: ["ge-table-text-align-left"] }, Lt = { body: ["ge-table-text-align-center"] }, Pt = { body: ["ge-table-text-align-right"] }, Ht = {
|
|
4131
4166
|
header: ["ge-table-text-align-left"],
|
|
4132
4167
|
body: ["ge-table-text-align-left"],
|
|
4133
4168
|
footer: ["ge-table-text-align-left"]
|
|
4134
|
-
},
|
|
4169
|
+
}, Bt = {
|
|
4135
4170
|
header: ["ge-table-text-align-center"],
|
|
4136
4171
|
body: ["ge-table-text-align-center"],
|
|
4137
4172
|
footer: ["ge-table-text-align-center"]
|
|
4138
|
-
},
|
|
4173
|
+
}, Vt = {
|
|
4139
4174
|
header: ["ge-table-text-align-right"],
|
|
4140
4175
|
body: ["ge-table-text-align-right"],
|
|
4141
4176
|
footer: ["ge-table-text-align-right"]
|
|
4142
4177
|
};
|
|
4143
|
-
class
|
|
4144
|
-
render(e, t, o,
|
|
4145
|
-
if (
|
|
4146
|
-
|
|
4147
|
-
const
|
|
4178
|
+
class pe {
|
|
4179
|
+
render(e, t, o, i, s, r, l) {
|
|
4180
|
+
if (s.isRowCheckable(t)) {
|
|
4181
|
+
l.addClass(e, "ge-table-row-checkbox-div");
|
|
4182
|
+
const n = s.isRowChecked(t), d = n === "full" ? "checked" : "", a = n === "semi" ? '<span style="opacity: 0.4;">✓<span>' : "";
|
|
4148
4183
|
e.innerHTML = `
|
|
4149
4184
|
<input
|
|
4150
4185
|
type="checkbox"
|
|
4151
|
-
data-area="${
|
|
4186
|
+
data-area="${i}"
|
|
4152
4187
|
data-row-index="${t}"
|
|
4153
4188
|
data-col-index="${o}"
|
|
4154
4189
|
data-input-type="checkbox"
|
|
@@ -4160,7 +4195,7 @@ class ce {
|
|
|
4160
4195
|
}
|
|
4161
4196
|
class Wt {
|
|
4162
4197
|
constructor() {
|
|
4163
|
-
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new
|
|
4198
|
+
this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new w(50, "px"), this.minWidth = new w(50, "px"), this.maxWidth = new w(100, "px"), this.rendererMap = new T(new pe(), new pe(), void 0), this.classes = new T(
|
|
4164
4199
|
[],
|
|
4165
4200
|
["ge-table-text-align-left"],
|
|
4166
4201
|
[]
|
|
@@ -4188,16 +4223,16 @@ class Nt {
|
|
|
4188
4223
|
}
|
|
4189
4224
|
}
|
|
4190
4225
|
class zt {
|
|
4191
|
-
constructor(e, t, o,
|
|
4192
|
-
this.area = e, this.rowIndex = t, this.columnIndex = o, this.value =
|
|
4226
|
+
constructor(e, t, o, i, s = {}) {
|
|
4227
|
+
this.area = e, this.rowIndex = t, this.columnIndex = o, this.value = i, this.cssClasses = s;
|
|
4193
4228
|
}
|
|
4194
4229
|
}
|
|
4195
4230
|
class jt {
|
|
4196
4231
|
constructor() {
|
|
4197
4232
|
this.autoRestoreSortingState = !1, this.autoRestoreCollapsedExpandedState = !1, this.autoRestoreScrollPosition = !1, this.autoRestoreCheckedState = !1, this.autoRestoreSelectedState = !1, this.getStorageKeyFn = void 0, this.isSame = (e, t, o) => {
|
|
4198
4233
|
if (e && t && o.getRowId) {
|
|
4199
|
-
const
|
|
4200
|
-
return
|
|
4234
|
+
const i = o.getRowId(e), s = o.getRowId(t);
|
|
4235
|
+
return i === s;
|
|
4201
4236
|
}
|
|
4202
4237
|
return !1;
|
|
4203
4238
|
}, this.getRowId = (e) => {
|
|
@@ -4218,12 +4253,12 @@ class jt {
|
|
|
4218
4253
|
}
|
|
4219
4254
|
}
|
|
4220
4255
|
class Qe {
|
|
4221
|
-
constructor(e, t, o,
|
|
4222
|
-
this.data = e, this.property = t, this.toggle = o, this.closed =
|
|
4256
|
+
constructor(e, t, o, i = !1, s = "normal", r = void 0) {
|
|
4257
|
+
this.data = e, this.property = t, this.toggle = o, this.closed = i, this.visibility = s, this.children = r, this.impl = "CellGroup";
|
|
4223
4258
|
}
|
|
4224
4259
|
}
|
|
4225
4260
|
class Ze extends Qe {
|
|
4226
|
-
constructor(e, t = 0, o = 0,
|
|
4261
|
+
constructor(e, t = 0, o = 0, i) {
|
|
4227
4262
|
super(
|
|
4228
4263
|
e.data,
|
|
4229
4264
|
e.property,
|
|
@@ -4231,7 +4266,7 @@ class Ze extends Qe {
|
|
|
4231
4266
|
e.closed,
|
|
4232
4267
|
e.visibility,
|
|
4233
4268
|
e.children
|
|
4234
|
-
), this.rowIndex = t, this.childIndex = o, this.parent =
|
|
4269
|
+
), this.rowIndex = t, this.childIndex = o, this.parent = i, this.impl = "CellGroupExt", this.children = void 0, this.leftNeighbour = void 0, this.rightNeighbour = void 0;
|
|
4235
4270
|
}
|
|
4236
4271
|
ownColumn() {
|
|
4237
4272
|
return !!this.property;
|
|
@@ -4284,8 +4319,8 @@ class Ze extends Qe {
|
|
|
4284
4319
|
getColumnCount(e = this, t = 0) {
|
|
4285
4320
|
var o;
|
|
4286
4321
|
if (e != null && e.claimsSpace() && t++, (o = e == null ? void 0 : e.children) != null && o.length)
|
|
4287
|
-
for (const
|
|
4288
|
-
t = this.getColumnCount(
|
|
4322
|
+
for (const i of e.children)
|
|
4323
|
+
t = this.getColumnCount(i, t);
|
|
4289
4324
|
return t;
|
|
4290
4325
|
}
|
|
4291
4326
|
getRowSpan(e = this, t) {
|
|
@@ -4295,7 +4330,7 @@ class Ze extends Qe {
|
|
|
4295
4330
|
return e.parent && (t = t + 1 + this.getParentCount(e.parent, t)), t;
|
|
4296
4331
|
}
|
|
4297
4332
|
log(e = 10) {
|
|
4298
|
-
const t = " ".substring(0, 2 * this.rowIndex), o = `${this.getColumnIndex()}`,
|
|
4333
|
+
const t = " ".substring(0, 2 * this.rowIndex), o = `${this.getColumnIndex()}`, i = `${this.getColumnCount(this)}`, s = `${this.getRowSpan(this, e)}`, r = `${this.getParentCount(this)}`, l = `${t + this.data}
|
|
4299
4334
|
childIndex:${this.childIndex}
|
|
4300
4335
|
row:${this.rowIndex}
|
|
4301
4336
|
col:${o}
|
|
@@ -4305,13 +4340,13 @@ class Ze extends Qe {
|
|
|
4305
4340
|
isVisible:${this.isVisible()}
|
|
4306
4341
|
ownColumn:${this.ownColumn()}
|
|
4307
4342
|
claimsSpace:${this.claimsSpace()}
|
|
4308
|
-
colCount:${
|
|
4309
|
-
rowSpan:${
|
|
4343
|
+
colCount:${i}
|
|
4344
|
+
rowSpan:${s}
|
|
4310
4345
|
pc:${r}`.replace(/[ \n]+/g, " ");
|
|
4311
4346
|
if (this.children)
|
|
4312
|
-
for (const
|
|
4313
|
-
|
|
4314
|
-
return
|
|
4347
|
+
for (const n of this.children)
|
|
4348
|
+
n.log(e);
|
|
4349
|
+
return l;
|
|
4315
4350
|
}
|
|
4316
4351
|
}
|
|
4317
4352
|
class I {
|
|
@@ -4344,11 +4379,11 @@ class I {
|
|
|
4344
4379
|
return ret;
|
|
4345
4380
|
}
|
|
4346
4381
|
*/
|
|
4347
|
-
static buildGroupExts(e, t = [], o = 0,
|
|
4348
|
-
let
|
|
4382
|
+
static buildGroupExts(e, t = [], o = 0, i) {
|
|
4383
|
+
let s;
|
|
4349
4384
|
for (let r = 0; r < e.length; r++) {
|
|
4350
|
-
const
|
|
4351
|
-
|
|
4385
|
+
const l = e[r], n = new Ze(l, o, r, i);
|
|
4386
|
+
s && (n.leftNeighbour = s, s.rightNeighbour = n), t.push(n), l.children && (n.children = I.buildGroupExts(l.children, [], o + 1, n)), s = n;
|
|
4352
4387
|
}
|
|
4353
4388
|
return t;
|
|
4354
4389
|
}
|
|
@@ -4365,28 +4400,28 @@ class I {
|
|
|
4365
4400
|
|
|
4366
4401
|
*/
|
|
4367
4402
|
static buildArrayOfArrays(e, t) {
|
|
4368
|
-
var
|
|
4369
|
-
let o = -1,
|
|
4403
|
+
var s;
|
|
4404
|
+
let o = -1, i = 99999;
|
|
4370
4405
|
for (const r of e) {
|
|
4371
|
-
if (r.rowIndex <=
|
|
4406
|
+
if (r.rowIndex <= i) {
|
|
4372
4407
|
o++;
|
|
4373
|
-
for (let
|
|
4374
|
-
t[
|
|
4408
|
+
for (let l = 0; l < t.length; l++)
|
|
4409
|
+
t[l][o] = null;
|
|
4375
4410
|
}
|
|
4376
|
-
if (t[r.rowIndex][o] = r,
|
|
4377
|
-
for (let
|
|
4378
|
-
t[
|
|
4411
|
+
if (t[r.rowIndex][o] = r, i = r.rowIndex, r.ownColumn() && ((s = r.children) != null && s.length)) {
|
|
4412
|
+
for (let l = r.rowIndex + 1; l < t.length; l++)
|
|
4413
|
+
t[l][o] = void 0;
|
|
4379
4414
|
o++;
|
|
4380
|
-
for (let
|
|
4381
|
-
t[
|
|
4415
|
+
for (let l = 0; l < t.length; l++)
|
|
4416
|
+
t[l][o] = null;
|
|
4382
4417
|
}
|
|
4383
4418
|
}
|
|
4384
4419
|
return t;
|
|
4385
4420
|
}
|
|
4386
4421
|
static iterateThrowColumns(e = [], t) {
|
|
4387
4422
|
var o;
|
|
4388
|
-
for (const
|
|
4389
|
-
e.push(
|
|
4423
|
+
for (const i of t)
|
|
4424
|
+
e.push(i.data + " rowIndex:" + i.rowIndex), (o = i.children) != null && o.length && I.iterateThrowColumns(e, i.children);
|
|
4390
4425
|
}
|
|
4391
4426
|
}
|
|
4392
4427
|
class Xt {
|
|
@@ -4459,50 +4494,50 @@ class Xt {
|
|
|
4459
4494
|
return !1;
|
|
4460
4495
|
}
|
|
4461
4496
|
}
|
|
4462
|
-
const
|
|
4463
|
-
constructor(e = new
|
|
4497
|
+
const j = class j {
|
|
4498
|
+
constructor(e = new oe()) {
|
|
4464
4499
|
this.headerGroupOptions = e;
|
|
4465
4500
|
}
|
|
4466
|
-
render(e, t, o,
|
|
4467
|
-
const
|
|
4501
|
+
render(e, t, o, i, s, r, l) {
|
|
4502
|
+
const n = r != null && r.data ? r.data : "";
|
|
4468
4503
|
if (r) {
|
|
4469
|
-
const { toggle: d, visibility: a, closed: h } = r, u = d ?
|
|
4470
|
-
this.addText(e,
|
|
4504
|
+
const { toggle: d, visibility: a, closed: h } = r, u = d ? j.toggleHeaderGroup : "";
|
|
4505
|
+
this.addText(e, i, t, o, n, u), d && a !== "always" && this.addArrowDiv(l, e, !h, t, o, i, u);
|
|
4471
4506
|
} else
|
|
4472
|
-
this.addText(e,
|
|
4507
|
+
this.addText(e, i, t, o, n, "");
|
|
4473
4508
|
}
|
|
4474
|
-
addText(e, t, o,
|
|
4509
|
+
addText(e, t, o, i, s, r) {
|
|
4475
4510
|
e.innerHTML = `<span
|
|
4476
4511
|
data-ge-action="${r}"
|
|
4477
4512
|
data-area="${t}"
|
|
4478
4513
|
data-row-index="${o}"
|
|
4479
|
-
data-col-index="${
|
|
4480
|
-
>${
|
|
4514
|
+
data-col-index="${i}"
|
|
4515
|
+
>${s}</span>`;
|
|
4481
4516
|
}
|
|
4482
|
-
addArrowDiv(e, t, o = !0,
|
|
4483
|
-
const
|
|
4484
|
-
e.addClass(
|
|
4517
|
+
addArrowDiv(e, t, o = !0, i = -1, s = -1, r = "header", l) {
|
|
4518
|
+
const n = e.createElement("div");
|
|
4519
|
+
e.addClass(n, "ge-table-toggle-icon-div"), e.setStyle(n, "display", "inline-block"), e.setStyle(n, "position", ""), e.setStyle(n, "width", "20px"), e.setStyle(n, "background", "transparent"), e.setStyle(n, "cursor", "pointer"), e.setAttribute(n, "data-row-index", `${i}`), e.setAttribute(n, "data-col-index", `${s}`), e.setAttribute(n, "data-area", `${r}`), e.setAttribute(n, "data-ge-action", `${l}`);
|
|
4485
4520
|
let d;
|
|
4486
4521
|
o ? d = this.headerGroupOptions.iconExpanded : d = this.headerGroupOptions.iconCollapsed;
|
|
4487
4522
|
const a = d.content, h = e.createText(a);
|
|
4488
|
-
e.appendChild(
|
|
4523
|
+
e.appendChild(n, h), d.style && this.applyStyleString(e, n, d.style);
|
|
4489
4524
|
for (const u of d.classes)
|
|
4490
|
-
e.addClass(
|
|
4491
|
-
return e.appendChild(t,
|
|
4525
|
+
e.addClass(n, u);
|
|
4526
|
+
return e.appendChild(t, n), n;
|
|
4492
4527
|
}
|
|
4493
4528
|
applyStyleString(e, t, o) {
|
|
4494
|
-
const
|
|
4495
|
-
for (const
|
|
4496
|
-
const [r,
|
|
4497
|
-
e.setStyle(t, r.trim(),
|
|
4529
|
+
const i = o.split(";").map((s) => s.trim()).filter((s) => s);
|
|
4530
|
+
for (const s of i) {
|
|
4531
|
+
const [r, l] = s.split(":");
|
|
4532
|
+
e.setStyle(t, r.trim(), l.trim());
|
|
4498
4533
|
}
|
|
4499
4534
|
}
|
|
4500
4535
|
};
|
|
4501
|
-
|
|
4502
|
-
let
|
|
4536
|
+
j.toggleHeaderGroup = "toggleHeaderGroup";
|
|
4537
|
+
let J = j;
|
|
4503
4538
|
class Yt {
|
|
4504
|
-
constructor(e = "header", t, o = [],
|
|
4505
|
-
this.areaIdent = e, this.groups = t, this.columnDefs = o, this.defaultRowHeight =
|
|
4539
|
+
constructor(e = "header", t, o = [], i, s = new oe()) {
|
|
4540
|
+
this.areaIdent = e, this.groups = t, this.columnDefs = o, this.defaultRowHeight = i, this.headerGroupOptions = s, this.gammaCells = !0, this.arr = [], this.groupExts = [], this.cellGroupExtCellRenderer = new J(this.headerGroupOptions), this.groupExts = I.buildGroupExts(t), this.init();
|
|
4506
4541
|
}
|
|
4507
4542
|
init() {
|
|
4508
4543
|
var e;
|
|
@@ -4520,8 +4555,8 @@ class Yt {
|
|
|
4520
4555
|
buildArray() {
|
|
4521
4556
|
const e = I.flattenGroupExts(this.groupExts), t = 1 + Math.max(...e.map((r) => r.rowIndex)), o = [];
|
|
4522
4557
|
I.iterateThrowColumns(o, this.groupExts);
|
|
4523
|
-
const
|
|
4524
|
-
return console.table(
|
|
4558
|
+
const i = Array.from(Array(t).keys()).map((r) => []), s = I.buildArrayOfArrays(e, i);
|
|
4559
|
+
return console.table(s), s;
|
|
4525
4560
|
}
|
|
4526
4561
|
changeColumnOrder(e, t) {
|
|
4527
4562
|
}
|
|
@@ -4556,8 +4591,8 @@ class Yt {
|
|
|
4556
4591
|
getRowspanAt(e, t) {
|
|
4557
4592
|
const o = this.getValueAt(e, t);
|
|
4558
4593
|
if (o) {
|
|
4559
|
-
const
|
|
4560
|
-
return o.getRowSpan(o,
|
|
4594
|
+
const i = this.getRowCount();
|
|
4595
|
+
return o.getRowSpan(o, i);
|
|
4561
4596
|
}
|
|
4562
4597
|
return 0;
|
|
4563
4598
|
}
|
|
@@ -4607,35 +4642,35 @@ class Kt {
|
|
|
4607
4642
|
if (!t)
|
|
4608
4643
|
return !0;
|
|
4609
4644
|
t = t.toLowerCase();
|
|
4610
|
-
const
|
|
4611
|
-
let a = !
|
|
4612
|
-
for (let h = 0; h <
|
|
4613
|
-
(a || o(e).includes(
|
|
4645
|
+
const i = "+", s = "-", r = t.toLowerCase().split(" ").filter((h) => h !== i && h !== s && h !== ""), l = r.filter((h) => !h.startsWith(i) && !h.startsWith(s)), n = r.filter((h) => h.startsWith(i)).map((h) => h.replace(/\+/g, "")), d = r.filter((h) => h.startsWith(s)).map((h) => h.replace(/-/g, ""));
|
|
4646
|
+
let a = !l.length;
|
|
4647
|
+
for (let h = 0; h < l.length; h++)
|
|
4648
|
+
(a || o(e).includes(l[h])) && (a = !0);
|
|
4614
4649
|
if (!a)
|
|
4615
4650
|
return !1;
|
|
4616
|
-
for (let h = 0; h <
|
|
4617
|
-
if (!o(e).includes(
|
|
4651
|
+
for (let h = 0; h < n.length; h++)
|
|
4652
|
+
if (!o(e).includes(n[h]))
|
|
4618
4653
|
return !1;
|
|
4619
4654
|
for (let h = 0; h < d.length; h++)
|
|
4620
4655
|
if (o(e).includes(d[h]))
|
|
4621
4656
|
return !1;
|
|
4622
4657
|
return !0;
|
|
4623
4658
|
}
|
|
4624
|
-
filterRows(e, t, o = (
|
|
4659
|
+
filterRows(e, t, o = (i) => JSON.stringify(i).toLowerCase()) {
|
|
4625
4660
|
if (!e)
|
|
4626
4661
|
return [];
|
|
4627
4662
|
if (!t)
|
|
4628
4663
|
return [...e];
|
|
4629
4664
|
t = t.toLowerCase();
|
|
4630
|
-
const
|
|
4665
|
+
const i = "+", s = "-", r = t.toLowerCase().split(" ").filter((a) => a !== i && a !== s && a !== ""), l = r.filter((a) => !a.startsWith(i) && !a.startsWith(s)), n = r.filter((a) => a.startsWith(i)).map((a) => a.replace(/\+/g, "")), d = r.filter((a) => a.startsWith(s)).map((a) => a.replace(/-/g, ""));
|
|
4631
4666
|
return e == null ? void 0 : e.filter((a) => {
|
|
4632
|
-
let h = !
|
|
4633
|
-
for (let u = 0; u <
|
|
4634
|
-
(h || o(a).includes(
|
|
4667
|
+
let h = !l.length;
|
|
4668
|
+
for (let u = 0; u < l.length; u++)
|
|
4669
|
+
(h || o(a).includes(l[u])) && (h = !0);
|
|
4635
4670
|
if (!h)
|
|
4636
4671
|
return !1;
|
|
4637
|
-
for (let u = 0; u <
|
|
4638
|
-
if (!o(a).includes(
|
|
4672
|
+
for (let u = 0; u < n.length; u++)
|
|
4673
|
+
if (!o(a).includes(n[u]))
|
|
4639
4674
|
return !1;
|
|
4640
4675
|
for (let u = 0; u < d.length; u++)
|
|
4641
4676
|
if (o(a).includes(d[u]))
|
|
@@ -4647,9 +4682,9 @@ class Kt {
|
|
|
4647
4682
|
if (!e)
|
|
4648
4683
|
return "";
|
|
4649
4684
|
const t = [], o = Object.keys(e);
|
|
4650
|
-
for (let
|
|
4651
|
-
const
|
|
4652
|
-
t.push(e[
|
|
4685
|
+
for (let i = 0; i < o.length; i++) {
|
|
4686
|
+
const s = o[i];
|
|
4687
|
+
t.push(e[s]);
|
|
4653
4688
|
}
|
|
4654
4689
|
return t.join(" ").toLowerCase();
|
|
4655
4690
|
}
|
|
@@ -4663,14 +4698,14 @@ class qt {
|
|
|
4663
4698
|
constructor(e, t = !0, o = !1) {
|
|
4664
4699
|
this.property = e, this.skipCheckableCheck = t, this.readonly = o;
|
|
4665
4700
|
}
|
|
4666
|
-
render(e, t, o,
|
|
4667
|
-
if (this.readonly || this.skipCheckableCheck ||
|
|
4668
|
-
|
|
4669
|
-
const
|
|
4670
|
-
if (
|
|
4701
|
+
render(e, t, o, i, s, r, l) {
|
|
4702
|
+
if (this.readonly || this.skipCheckableCheck || s.isRowCheckable(t)) {
|
|
4703
|
+
l.addClass(e, "ge-table-row-checkbox-div");
|
|
4704
|
+
const n = s.getRowByIndex(t), a = s.getValueByT(n, this.property) === !0 ? "checked" : "", h = this.readonly ? " readonly " : "";
|
|
4705
|
+
if (l.addClass(e, "ge-padding-property-checkbox"), e.innerHTML = `
|
|
4671
4706
|
<input
|
|
4672
4707
|
type="checkbox"
|
|
4673
|
-
data-area="${
|
|
4708
|
+
data-area="${i}"
|
|
4674
4709
|
data-row-index="${t}"
|
|
4675
4710
|
data-col-index="${o}"
|
|
4676
4711
|
data-property-index="${this.property}"
|
|
@@ -4679,13 +4714,13 @@ class qt {
|
|
|
4679
4714
|
${h}
|
|
4680
4715
|
class="ge-input-checkbox">`, !this.readonly) {
|
|
4681
4716
|
const u = e.querySelector(".ge-input-checkbox");
|
|
4682
|
-
u && u.addEventListener("click", (m, b) => (
|
|
4717
|
+
u && u.addEventListener("click", (m, b) => (n[this.property] = !n[this.property], !0));
|
|
4683
4718
|
}
|
|
4684
4719
|
}
|
|
4685
4720
|
}
|
|
4686
4721
|
}
|
|
4687
4722
|
class Jt {
|
|
4688
|
-
render(e, t, o,
|
|
4723
|
+
render(e, t, o, i, s, r, l) {
|
|
4689
4724
|
r && (e.innerText = new Date(r).toISOString());
|
|
4690
4725
|
}
|
|
4691
4726
|
}
|
|
@@ -4697,28 +4732,28 @@ class Qt {
|
|
|
4697
4732
|
day: "2-digit"
|
|
4698
4733
|
});
|
|
4699
4734
|
}
|
|
4700
|
-
render(e, t, o,
|
|
4735
|
+
render(e, t, o, i, s, r, l) {
|
|
4701
4736
|
if (r) {
|
|
4702
|
-
let
|
|
4737
|
+
let n = "";
|
|
4703
4738
|
try {
|
|
4704
|
-
|
|
4739
|
+
n = this.formatter.format(new Date(r));
|
|
4705
4740
|
} catch {
|
|
4706
|
-
|
|
4741
|
+
n = r;
|
|
4707
4742
|
}
|
|
4708
4743
|
e.innerHTML = `
|
|
4709
|
-
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${
|
|
4710
|
-
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${
|
|
4744
|
+
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${i}" style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
4745
|
+
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${i}">${n}</div>
|
|
4711
4746
|
</div>`;
|
|
4712
4747
|
}
|
|
4713
4748
|
}
|
|
4714
4749
|
}
|
|
4715
4750
|
class Zt {
|
|
4716
|
-
render(e, t, o,
|
|
4751
|
+
render(e, t, o, i, s, r, l) {
|
|
4717
4752
|
r && (e.innerText = new Date(r).toLocaleDateString());
|
|
4718
4753
|
}
|
|
4719
4754
|
}
|
|
4720
4755
|
class eo {
|
|
4721
|
-
render(e, t, o,
|
|
4756
|
+
render(e, t, o, i, s, r, l) {
|
|
4722
4757
|
r === "male" || r === "m" ? e.innerText = "♂" : (r === "female" || r === "f") && (e.innerText = "♀");
|
|
4723
4758
|
}
|
|
4724
4759
|
}
|
|
@@ -4726,26 +4761,26 @@ class to {
|
|
|
4726
4761
|
constructor(e = 100, t = !1) {
|
|
4727
4762
|
this.maxValue = e, this.labelVisible = t;
|
|
4728
4763
|
}
|
|
4729
|
-
render(e, t, o,
|
|
4730
|
-
if (
|
|
4764
|
+
render(e, t, o, i, s, r, l) {
|
|
4765
|
+
if (l.addClass(e, "ge-progressbar-div"), !isNaN(r)) {
|
|
4731
4766
|
const d = Number(r) * 100 / this.maxValue, a = this.labelVisible ? Math.round(d) + "%" : "";
|
|
4732
4767
|
e.innerHTML = `
|
|
4733
4768
|
<div class="ge-table-label-div"
|
|
4734
4769
|
data-row-index="${t}"
|
|
4735
4770
|
data-col-index="${o}"
|
|
4736
|
-
data-area="${
|
|
4771
|
+
data-area="${i}"
|
|
4737
4772
|
title="${a}"
|
|
4738
4773
|
style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
4739
4774
|
<div class="ge-table-progress-container"
|
|
4740
4775
|
style="width:100%;height:50%;padding:0;margin-top:6px;"
|
|
4741
4776
|
data-row-index="${t}"
|
|
4742
4777
|
data-col-index="${o}"
|
|
4743
|
-
data-area="${
|
|
4778
|
+
data-area="${i}">
|
|
4744
4779
|
<div class="ge-table-progress-bar"
|
|
4745
4780
|
style="width:${d}%;height:100%;padding:0;margin:0;"
|
|
4746
4781
|
data-row-index="${t}"
|
|
4747
4782
|
data-col-index="${o}"
|
|
4748
|
-
data-area="${
|
|
4783
|
+
data-area="${i}">
|
|
4749
4784
|
</div>
|
|
4750
4785
|
</div>
|
|
4751
4786
|
</div>`;
|
|
@@ -4753,91 +4788,91 @@ class to {
|
|
|
4753
4788
|
}
|
|
4754
4789
|
}
|
|
4755
4790
|
class oo {
|
|
4756
|
-
render(e, t, o,
|
|
4791
|
+
render(e, t, o, i, s, r, l) {
|
|
4757
4792
|
r === "true" || r === !0 ? e.innerHTML = '<span class="ge-true-text-color">✅</span>' : r === "false" || r === !1 ? e.innerHTML = '<span class="ge-false-text-color">❌</span>' : e.innerText = "";
|
|
4758
4793
|
}
|
|
4759
4794
|
}
|
|
4760
|
-
class
|
|
4761
|
-
render(e, t, o,
|
|
4795
|
+
class io {
|
|
4796
|
+
render(e, t, o, i, s, r, l) {
|
|
4762
4797
|
r && (e.innerText = new Date(r).toISOString().replace(/T/g, " ").replace(/\..*/g, ""));
|
|
4763
4798
|
}
|
|
4764
4799
|
}
|
|
4765
|
-
class
|
|
4800
|
+
class so {
|
|
4766
4801
|
constructor(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_SAFE_INTEGER) {
|
|
4767
4802
|
this.min = e, this.max = t;
|
|
4768
4803
|
}
|
|
4769
|
-
render(e, t, o,
|
|
4770
|
-
r && (e.innerText = r, (typeof r == "string" || isNaN(r) || r < this.min || r > this.max) &&
|
|
4804
|
+
render(e, t, o, i, s, r, l) {
|
|
4805
|
+
r && (e.innerText = r, (typeof r == "string" || isNaN(r) || r < this.min || r > this.max) && l.addClass(e, "ge-cell-error"));
|
|
4771
4806
|
}
|
|
4772
4807
|
}
|
|
4773
4808
|
class ro {
|
|
4774
4809
|
constructor(e) {
|
|
4775
4810
|
this.property = e;
|
|
4776
4811
|
}
|
|
4777
|
-
render(e, t, o,
|
|
4778
|
-
|
|
4779
|
-
const
|
|
4812
|
+
render(e, t, o, i, s, r, l) {
|
|
4813
|
+
l.addClass(e, "ge-star-rating-div");
|
|
4814
|
+
const n = s.getRowByIndex(t), d = +("" + s.getValueByT(n, this.property));
|
|
4780
4815
|
if (!isNaN(d)) {
|
|
4781
4816
|
const a = [];
|
|
4782
4817
|
for (let u = 0; u < d; u++)
|
|
4783
4818
|
a.push("★");
|
|
4784
4819
|
const h = a.join(" ");
|
|
4785
4820
|
e.innerHTML = `
|
|
4786
|
-
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${
|
|
4787
|
-
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${
|
|
4821
|
+
<div class="ge-table-label-div" data-row-index="${t}" data-col-index="${o}" data-area="${i}" style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
4822
|
+
<div class="ge-table-label" data-row-index="${t}" data-col-index="${o}" data-area="${i}">${h}</div>
|
|
4788
4823
|
</div>`;
|
|
4789
4824
|
}
|
|
4790
4825
|
}
|
|
4791
4826
|
}
|
|
4792
|
-
class
|
|
4827
|
+
class no {
|
|
4793
4828
|
constructor(e, t = 100, o = !1) {
|
|
4794
4829
|
this.property = e, this.maxValue = t, this.labelVisible = o;
|
|
4795
4830
|
}
|
|
4796
|
-
render(e, t, o,
|
|
4797
|
-
|
|
4798
|
-
const
|
|
4831
|
+
render(e, t, o, i, s, r, l) {
|
|
4832
|
+
l.addClass(e, "ge-star-rating-div");
|
|
4833
|
+
const n = s.getRowByIndex(t), d = +("" + s.getValueByT(n, this.property));
|
|
4799
4834
|
if (!isNaN(d)) {
|
|
4800
4835
|
const a = d * 100 / this.maxValue, h = this.labelVisible ? Math.round(a) + "%" : "";
|
|
4801
4836
|
e.innerHTML = `
|
|
4802
4837
|
<div class="ge-table-label-div"
|
|
4803
4838
|
data-row-index="${t}"
|
|
4804
4839
|
data-col-index="${o}"
|
|
4805
|
-
data-area="${
|
|
4840
|
+
data-area="${i}"
|
|
4806
4841
|
title="${h}"
|
|
4807
4842
|
style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
4808
4843
|
<div class="ge-table-progress-container"
|
|
4809
4844
|
style="width:100%;height:50%;padding:0;margin-top:6px;"
|
|
4810
4845
|
data-row-index="${t}"
|
|
4811
4846
|
data-col-index="${o}"
|
|
4812
|
-
data-area="${
|
|
4847
|
+
data-area="${i}">
|
|
4813
4848
|
<div class="ge-table-progress-bar"
|
|
4814
4849
|
style="width:${a}%;height:100%;padding:0;margin:0;"
|
|
4815
4850
|
data-row-index="${t}"
|
|
4816
4851
|
data-col-index="${o}"
|
|
4817
|
-
data-area="${
|
|
4852
|
+
data-area="${i}">
|
|
4818
4853
|
</div>
|
|
4819
4854
|
</div>
|
|
4820
4855
|
</div>`;
|
|
4821
4856
|
}
|
|
4822
4857
|
}
|
|
4823
4858
|
}
|
|
4824
|
-
class
|
|
4825
|
-
render(e, t, o,
|
|
4859
|
+
class lo {
|
|
4860
|
+
render(e, t, o, i, s, r, l) {
|
|
4826
4861
|
if (r) {
|
|
4827
4862
|
e.innerHTML = `
|
|
4828
4863
|
<div
|
|
4829
4864
|
class="ge-table-label-div"
|
|
4830
4865
|
data-row-index=${t}"
|
|
4831
4866
|
data-col-index="${o}"
|
|
4832
|
-
data-area="${
|
|
4867
|
+
data-area="${i}"
|
|
4833
4868
|
style="position: relative; background: transparent; width: 100%; height: 100%;">
|
|
4834
4869
|
<div
|
|
4835
4870
|
class="ge-table-label"
|
|
4836
4871
|
data-row-index="${t}"
|
|
4837
4872
|
data-col-index="${o}"
|
|
4838
|
-
data-area="${
|
|
4839
|
-
const
|
|
4840
|
-
|
|
4873
|
+
data-area="${i}">${r}</div></div>`;
|
|
4874
|
+
const n = Number(r);
|
|
4875
|
+
n > 0 ? l.addClass(e, "ge-positive-text-color") : n < 0 && l.addClass(e, "ge-negative-text-color");
|
|
4841
4876
|
}
|
|
4842
4877
|
}
|
|
4843
4878
|
}
|
|
@@ -4853,23 +4888,23 @@ class Ce {
|
|
|
4853
4888
|
e.map((t) => new Je(t, t))
|
|
4854
4889
|
);
|
|
4855
4890
|
}
|
|
4856
|
-
render(e, t, o,
|
|
4857
|
-
if (
|
|
4858
|
-
|
|
4859
|
-
const
|
|
4891
|
+
render(e, t, o, i, s, r, l) {
|
|
4892
|
+
if (s.isEditable(t, o)) {
|
|
4893
|
+
l.addClass(e, "ge-table-row-select-div");
|
|
4894
|
+
const n = s.getValueAt(t, o);
|
|
4860
4895
|
let d = [];
|
|
4861
4896
|
for (let h of this.options) {
|
|
4862
|
-
const u = h.value ===
|
|
4897
|
+
const u = h.value === n ? " selected " : "";
|
|
4863
4898
|
d.push(`<option value="${h.value}" ${u}>${h.label}</option>`);
|
|
4864
4899
|
}
|
|
4865
4900
|
const a = d.join("");
|
|
4866
4901
|
e.innerHTML = `
|
|
4867
4902
|
<select
|
|
4868
4903
|
type="text"
|
|
4869
|
-
value="${
|
|
4904
|
+
value="${n}"
|
|
4870
4905
|
autofocus
|
|
4871
4906
|
data-listen="change"
|
|
4872
|
-
data-area="${
|
|
4907
|
+
data-area="${i}"
|
|
4873
4908
|
data-row-index="${t}"
|
|
4874
4909
|
data-col-index="${o}"
|
|
4875
4910
|
data-input-type="text"
|
|
@@ -4878,7 +4913,7 @@ class Ce {
|
|
|
4878
4913
|
}
|
|
4879
4914
|
}
|
|
4880
4915
|
}
|
|
4881
|
-
class ho extends
|
|
4916
|
+
class ho extends we {
|
|
4882
4917
|
constructor(e) {
|
|
4883
4918
|
super("row", "multi"), this.model = e;
|
|
4884
4919
|
}
|
|
@@ -4890,7 +4925,7 @@ class ho extends be {
|
|
|
4890
4925
|
*/
|
|
4891
4926
|
getSelectedRowItems(e) {
|
|
4892
4927
|
const t = this.getMergedRowIndices();
|
|
4893
|
-
return this.isAllSelected() ? e : e.filter((o,
|
|
4928
|
+
return this.isAllSelected() ? e : e.filter((o, i) => t.includes(i));
|
|
4894
4929
|
}
|
|
4895
4930
|
/**
|
|
4896
4931
|
* Selects the specified row.
|
|
@@ -4913,7 +4948,42 @@ class ho extends be {
|
|
|
4913
4948
|
* Toggles the selection of items based on current selection state.
|
|
4914
4949
|
*/
|
|
4915
4950
|
toggleSelection() {
|
|
4916
|
-
|
|
4951
|
+
if (this.isAllSelected())
|
|
4952
|
+
this.clear();
|
|
4953
|
+
else if (this.hasNoSelection())
|
|
4954
|
+
this.selectAll();
|
|
4955
|
+
else {
|
|
4956
|
+
const e = this.model.getAllRows();
|
|
4957
|
+
this.silent = !0;
|
|
4958
|
+
for (let t = 0; t < e.length; t++)
|
|
4959
|
+
this.toggleRow(t);
|
|
4960
|
+
this.silent = !1, this.fireChangeEvent();
|
|
4961
|
+
}
|
|
4962
|
+
}
|
|
4963
|
+
/**
|
|
4964
|
+
* Toggles the selection of filtered rows.
|
|
4965
|
+
* If all rows are currently selected, clears the selection.
|
|
4966
|
+
* If no rows are currently selected, selects all filtered rows.
|
|
4967
|
+
* Otherwise, toggles the selection of all filtered rows.
|
|
4968
|
+
*
|
|
4969
|
+
* @return {void}
|
|
4970
|
+
*/
|
|
4971
|
+
toggleFilteredRowsSelection() {
|
|
4972
|
+
if (this.isAllSelected())
|
|
4973
|
+
this.clear();
|
|
4974
|
+
else if (this.hasNoSelection()) {
|
|
4975
|
+
const e = this.model.getFilteredRows();
|
|
4976
|
+
this.silent = !0;
|
|
4977
|
+
for (let t = 0; t < e.length; t++)
|
|
4978
|
+
this.selectRow(t);
|
|
4979
|
+
this.silent = !1, this.fireChangeEvent();
|
|
4980
|
+
} else {
|
|
4981
|
+
const e = this.model.getFilteredRows();
|
|
4982
|
+
this.silent = !0;
|
|
4983
|
+
for (let t = 0; t < e.length; t++)
|
|
4984
|
+
this.toggleRow(t);
|
|
4985
|
+
this.silent = !1, this.fireChangeEvent();
|
|
4986
|
+
}
|
|
4917
4987
|
}
|
|
4918
4988
|
/**
|
|
4919
4989
|
* Toggles the selection state of a row.
|
|
@@ -4931,138 +5001,139 @@ class co {
|
|
|
4931
5001
|
this.r = e, this.g = t, this.b = o;
|
|
4932
5002
|
}
|
|
4933
5003
|
}
|
|
4934
|
-
class
|
|
4935
|
-
constructor(e, t, o,
|
|
4936
|
-
this.minValue = e, this.minColor = t, this.maxValue = o, this.maxColor =
|
|
5004
|
+
class be {
|
|
5005
|
+
constructor(e, t, o, i) {
|
|
5006
|
+
this.minValue = e, this.minColor = t, this.maxValue = o, this.maxColor = i;
|
|
4937
5007
|
}
|
|
4938
5008
|
}
|
|
4939
|
-
class
|
|
4940
|
-
static normalize(e, t, o,
|
|
4941
|
-
return (e - t) / (o - t) * (
|
|
5009
|
+
class G {
|
|
5010
|
+
static normalize(e, t, o, i = 0, s = 1) {
|
|
5011
|
+
return (e - t) / (o - t) * (s - i) + i;
|
|
4942
5012
|
}
|
|
4943
5013
|
static getTwoColorGradientRGB(e, t) {
|
|
4944
|
-
const o =
|
|
4945
|
-
return `rgb(${Math.round(
|
|
5014
|
+
const o = G.normalize(e, t.minValue, t.maxValue, 0, 1), i = t.maxColor.r - t.minColor.r, s = t.maxColor.g - t.minColor.g, r = t.maxColor.b - t.minColor.b, l = i * o + t.minColor.r, n = s * o + t.minColor.g, d = r * o + t.minColor.b;
|
|
5015
|
+
return `rgb(${Math.round(l)}, ${Math.round(n)}, ${Math.round(d)})`;
|
|
4946
5016
|
}
|
|
4947
5017
|
static getThreeColorGradientRGB(e, t) {
|
|
4948
|
-
return e < t.middleValue ?
|
|
5018
|
+
return e < t.middleValue ? G.getTwoColorGradientRGB(e, new be(t.minValue, t.minColor, t.middleValue, t.middleColor)) : e > t.middleValue ? G.getTwoColorGradientRGB(e, new be(t.middleValue, t.middleColor, t.maxValue, t.maxColor)) : `rgb(${t.middleColor.r}, ${t.middleColor.g}, ${t.middleColor.b})`;
|
|
4949
5019
|
}
|
|
4950
5020
|
}
|
|
4951
5021
|
class uo {
|
|
4952
|
-
constructor(e, t, o,
|
|
4953
|
-
this.minValue = e, this.minColor = t, this.middleValue = o, this.middleColor =
|
|
5022
|
+
constructor(e, t, o, i, s, r) {
|
|
5023
|
+
this.minValue = e, this.minColor = t, this.middleValue = o, this.middleColor = i, this.maxValue = s, this.maxColor = r;
|
|
4954
5024
|
}
|
|
4955
5025
|
}
|
|
4956
5026
|
export {
|
|
4957
|
-
|
|
5027
|
+
ie as AbstractAreaModel,
|
|
4958
5028
|
Gt as AreaMapFactory,
|
|
4959
5029
|
Xt as AreaModel,
|
|
4960
5030
|
D as AreaModelArrayOfArrays,
|
|
4961
5031
|
Yt as AreaModelCellGroups,
|
|
4962
5032
|
_ as AreaModelHidden,
|
|
4963
5033
|
Ue as AreaModelObjectArray,
|
|
4964
|
-
|
|
4965
|
-
|
|
5034
|
+
ge as AreaModelObjectArrayWithColumndefs,
|
|
5035
|
+
he as AreaModelTree,
|
|
4966
5036
|
T as AreaObjectMap,
|
|
4967
5037
|
jt as AutoRestoreOptions,
|
|
5038
|
+
et as AvoidDoubleExecution,
|
|
4968
5039
|
Qe as CellGroup,
|
|
4969
5040
|
Ze as CellGroupExt,
|
|
4970
|
-
|
|
5041
|
+
J as CellGroupExtCellRenderer,
|
|
4971
5042
|
A as CellRange,
|
|
4972
5043
|
I as CellgroupFactory,
|
|
4973
5044
|
qt as CheckboxBooleanPropertyCellRenderer,
|
|
4974
|
-
|
|
5045
|
+
pe as CheckboxCellRenderer,
|
|
4975
5046
|
Wt as CheckboxColumnDef,
|
|
4976
5047
|
Ke as CheckboxModel,
|
|
4977
|
-
|
|
5048
|
+
Ft as ChunkData,
|
|
4978
5049
|
_e as ColAndRowspanModel,
|
|
4979
5050
|
Ie as CollapsedExpandedData,
|
|
4980
5051
|
co as ColorRgb,
|
|
4981
5052
|
V as ColumnDef,
|
|
4982
5053
|
ve as ConvenienceDomService,
|
|
4983
|
-
|
|
4984
|
-
|
|
5054
|
+
N as CopyService,
|
|
5055
|
+
ne as CssVars,
|
|
4985
5056
|
Qt as DateToIntlDDMMYYYYCellRenderer,
|
|
4986
5057
|
Jt as DateToIsoCellRenderer,
|
|
4987
5058
|
Zt as DateToLocaleDateCellRenderer,
|
|
4988
|
-
|
|
4989
|
-
|
|
5059
|
+
io as DateToTecCellRenderer,
|
|
5060
|
+
B as DefaultRowHeights,
|
|
4990
5061
|
De as EleScope,
|
|
4991
|
-
|
|
4992
|
-
|
|
5062
|
+
re as EventAdapter,
|
|
5063
|
+
ae as FalseFn,
|
|
4993
5064
|
Ne as FocusModel,
|
|
4994
|
-
|
|
4995
|
-
|
|
5065
|
+
Le as GeCellIndices,
|
|
5066
|
+
G as GeCssColorUtil,
|
|
4996
5067
|
Kt as GeFilterService,
|
|
4997
5068
|
Nt as GeKeyEvent,
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5069
|
+
te as GeModelChangeEvent,
|
|
5070
|
+
Q as GeMouseEvent,
|
|
5071
|
+
F as GeoData,
|
|
5072
|
+
$ as Icon,
|
|
5073
|
+
$t as IndexAndPx,
|
|
5003
5074
|
Ge as InputCellRenderer,
|
|
5004
|
-
|
|
5005
|
-
|
|
5075
|
+
Oe as InputHandler,
|
|
5076
|
+
L as LicenseManager,
|
|
5006
5077
|
eo as MaleFemaleToIconCellRenderer,
|
|
5007
5078
|
Ae as MouseHandler,
|
|
5008
5079
|
Re as MouseTargetData,
|
|
5009
5080
|
ho as MultiRowsSelectionModel,
|
|
5010
5081
|
to as NumberCellProgressBarCellRenderer,
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5082
|
+
so as NumberCellRenderer,
|
|
5083
|
+
Be as OsxShortcutActionIdMapping,
|
|
5084
|
+
ue as Padding,
|
|
5085
|
+
lo as PositiveAndNegativeNumberRenderer,
|
|
5086
|
+
no as ProgressBarCellRenderer,
|
|
5087
|
+
Fe as RenderScope,
|
|
5017
5088
|
Ut as Renderer,
|
|
5018
5089
|
qe as RequestChunk,
|
|
5019
5090
|
Ce as SelectCellRenderer,
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5091
|
+
we as SelectionModel,
|
|
5092
|
+
Pe as SelectionService,
|
|
5093
|
+
Ve as ShortcutService,
|
|
5023
5094
|
We as SimpleDomService,
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5095
|
+
w as Size,
|
|
5096
|
+
$e as SortItem,
|
|
5097
|
+
me as SortedOptions,
|
|
5027
5098
|
ro as StarRatingCellRenderer,
|
|
5028
5099
|
ke as StoreStateCollapsedExpandService,
|
|
5029
5100
|
Ee as StoreStateScrollPosService,
|
|
5030
5101
|
Te as StoreStateSortingService,
|
|
5031
5102
|
Me as TableApi,
|
|
5032
5103
|
zt as TableCellUpdateEvent,
|
|
5033
|
-
|
|
5034
|
-
|
|
5104
|
+
O as TableFactory,
|
|
5105
|
+
Y as TableModel,
|
|
5035
5106
|
_t as TableModelAndOptions,
|
|
5036
|
-
|
|
5037
|
-
|
|
5107
|
+
U as TableOptions,
|
|
5108
|
+
Se as TableScope,
|
|
5038
5109
|
uo as ThreeColorGradientArg,
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5110
|
+
ce as TreeCheckboxModel,
|
|
5111
|
+
q as TreeFactory,
|
|
5112
|
+
fe as TreeOptions,
|
|
5113
|
+
le as TreeRow,
|
|
5043
5114
|
Ye as TreeRowService,
|
|
5044
5115
|
oo as TrueFalseCellRenderer,
|
|
5045
5116
|
Xe as TrueFn,
|
|
5046
|
-
|
|
5117
|
+
be as TwoColorGradientArg,
|
|
5047
5118
|
Je as ValueLabel,
|
|
5048
5119
|
He as WindowsShortcutActionIdMapping,
|
|
5049
5120
|
Dt as actionIds,
|
|
5050
|
-
|
|
5121
|
+
Bt as allCenter,
|
|
5051
5122
|
Ht as allLeft,
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5123
|
+
Vt as allRight,
|
|
5124
|
+
Lt as bodyCenter,
|
|
5125
|
+
Ot as bodyLeft,
|
|
5126
|
+
Pt as bodyRight,
|
|
5056
5127
|
ao as editInputPipeForNumber,
|
|
5057
|
-
|
|
5058
|
-
|
|
5128
|
+
Z as getAreaIdentByString,
|
|
5129
|
+
K as isAreaModelTree,
|
|
5059
5130
|
ye as isCheckboxColumnDef,
|
|
5060
|
-
|
|
5131
|
+
H as isTreeRow,
|
|
5061
5132
|
Tt as px0,
|
|
5062
5133
|
kt as px10,
|
|
5063
5134
|
xt as px100,
|
|
5064
|
-
|
|
5065
|
-
|
|
5135
|
+
St as px110,
|
|
5136
|
+
wt as px120,
|
|
5066
5137
|
mt as px130,
|
|
5067
5138
|
ft as px140,
|
|
5068
5139
|
bt as px150,
|
|
@@ -5071,15 +5142,15 @@ export {
|
|
|
5071
5142
|
ut as px180,
|
|
5072
5143
|
ct as px190,
|
|
5073
5144
|
It as px20,
|
|
5074
|
-
|
|
5145
|
+
de as px200,
|
|
5075
5146
|
ht as px210,
|
|
5076
5147
|
dt as px220,
|
|
5077
5148
|
at as px230,
|
|
5078
|
-
|
|
5079
|
-
|
|
5149
|
+
lt as px240,
|
|
5150
|
+
nt as px250,
|
|
5080
5151
|
rt as px260,
|
|
5081
|
-
|
|
5082
|
-
|
|
5152
|
+
st as px270,
|
|
5153
|
+
it as px280,
|
|
5083
5154
|
ot as px290,
|
|
5084
5155
|
Et as px30,
|
|
5085
5156
|
tt as px300,
|