ngx-register-base 1.3.1 → 1.3.3
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/esm2022/lib/components/checkbox-selector/checkbox-selector.component.mjs +129 -0
- package/esm2022/lib/components/checkbox-selector/checkbox-selector.types.mjs +8 -0
- package/esm2022/lib/components/column-settings/column-settings.component.mjs +249 -0
- package/esm2022/lib/components/column-settings/components/column-settings-template/column-settings-template.component.mjs +80 -0
- package/esm2022/lib/components/column-settings/consts/column-settings.consts.mjs +10 -0
- package/esm2022/lib/components/column-settings/index.mjs +3 -0
- package/esm2022/lib/components/column-settings/types/column-settings.types.mjs +7 -0
- package/esm2022/lib/components/divider/divider.component.mjs +16 -0
- package/esm2022/lib/components/filter-button/filter-button.component.mjs +19 -0
- package/esm2022/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.mjs +31 -0
- package/esm2022/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.mjs +57 -0
- package/esm2022/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.mjs +110 -0
- package/esm2022/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.mjs +130 -0
- package/esm2022/lib/components/filters/components/filter-list/filter-list.service.mjs +89 -0
- package/esm2022/lib/components/filters/components/filter-list/filters-section/filters-section.component.mjs +41 -0
- package/esm2022/lib/components/filters/components/filter-list.module.mjs +45 -0
- package/esm2022/lib/components/filters/index.mjs +3 -0
- package/esm2022/lib/components/filters/register-table-filter.component.mjs +155 -0
- package/esm2022/lib/components/filters/register-table-filter.module.mjs +39 -0
- package/esm2022/lib/components/index.mjs +11 -0
- package/esm2022/lib/components/inputs/index.mjs +20 -0
- package/esm2022/lib/components/inputs/inputs.module.mjs +166 -0
- package/esm2022/lib/components/inputs/param-calendar-year/param-calendar-year.component.mjs +45 -0
- package/esm2022/lib/components/inputs/param-custom/param-custom.component.mjs +12 -0
- package/esm2022/lib/components/inputs/param-date/param-date.component.mjs +76 -0
- package/esm2022/lib/components/inputs/param-date-range/param-date-range.component.mjs +60 -0
- package/esm2022/lib/components/inputs/param-date-time/param-date-time.component.mjs +86 -0
- package/esm2022/lib/components/inputs/param-date-time-range/param-date-time-range.component.mjs +95 -0
- package/esm2022/lib/components/inputs/param-month/param-month.component.mjs +50 -0
- package/esm2022/lib/components/inputs/param-month-range/param-month-range.component.mjs +62 -0
- package/esm2022/lib/components/inputs/param-multi-select/param-multi-select.component.mjs +309 -0
- package/esm2022/lib/components/inputs/param-select/param-select.component.mjs +233 -0
- package/esm2022/lib/components/inputs/param-switcher/param-switcher.component.mjs +21 -0
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.mjs +28 -0
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/index.mjs +3 -0
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.mjs +105 -0
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.mjs +10 -0
- package/esm2022/lib/components/inputs/param-text/param-text.component.mjs +40 -0
- package/esm2022/lib/components/inputs/param-textarea/param-textarea.component.mjs +38 -0
- package/esm2022/lib/components/inputs/param-toggle/param-toggle.component.mjs +20 -0
- package/esm2022/lib/components/inputs/param-tree/consts/param-tree.consts.mjs +37 -0
- package/esm2022/lib/components/inputs/param-tree/index.mjs +8 -0
- package/esm2022/lib/components/inputs/param-tree/param-tree.component.mjs +207 -0
- package/esm2022/lib/components/inputs/param-tree/services/param-tree.service.mjs +116 -0
- package/esm2022/lib/components/inputs/param-tree/services/sync-tree-loader.service.mjs +20 -0
- package/esm2022/lib/components/inputs/param-tree/tokens/param-tree.tokens.mjs +3 -0
- package/esm2022/lib/components/inputs/param-tree/types/param-tree.types.mjs +2 -0
- package/esm2022/lib/components/inputs/param-tree/utils/param-tree.utils.mjs +9 -0
- package/esm2022/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.mjs +80 -0
- package/esm2022/lib/components/inputs/param-tree-select/param-tree-select.component.mjs +85 -0
- package/esm2022/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.mjs +15 -0
- package/esm2022/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.mjs +12 -0
- package/esm2022/lib/components/menu-constructor/index.mjs +5 -0
- package/esm2022/lib/components/menu-constructor/sproc-menu-constructor.component.mjs +559 -0
- package/esm2022/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.mjs +3 -0
- package/esm2022/lib/components/menu-constructor/store/sproc-menu-constructor.consts.mjs +5 -0
- package/esm2022/lib/components/menu-constructor/store/sproc-menu.tokens.mjs +3 -0
- package/esm2022/lib/components/page-menu/index.mjs +6 -0
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.consts.mjs +9 -0
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.schema.mjs +2 -0
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.tokens.mjs +4 -0
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.types.mjs +3 -0
- package/esm2022/lib/components/page-menu/sproc-page-menu.component.mjs +275 -0
- package/esm2022/lib/components/paginator/paginator.component.mjs +159 -0
- package/esm2022/lib/components/paginator/types/paginator.types.mjs +2 -0
- package/esm2022/lib/components/register-table/consts/register-table.consts.mjs +4 -0
- package/esm2022/lib/components/register-table/directives/cell-template.directive.mjs +19 -0
- package/esm2022/lib/components/register-table/directives/header-template.directive.mjs +18 -0
- package/esm2022/lib/components/register-table/index.mjs +4 -0
- package/esm2022/lib/components/register-table/model/schema.mjs +10 -0
- package/esm2022/lib/components/register-table/pipes/class-by-type.pipe.mjs +33 -0
- package/esm2022/lib/components/register-table/pipes/sticky-column.pipe.mjs +17 -0
- package/esm2022/lib/components/register-table/register-table.component.mjs +544 -0
- package/esm2022/lib/components/reset-settings-form/reset-settings-form.component.mjs +18 -0
- package/esm2022/lib/components/search-input/search-input.component.mjs +28 -0
- package/esm2022/lib/components/sliding-panel/sliding-panel.component.mjs +48 -0
- package/esm2022/lib/components/sliding-panel/sliding-panel.module.mjs +19 -0
- package/esm2022/lib/consts/date-time.consts.mjs +2 -0
- package/esm2022/lib/consts/index.mjs +4 -0
- package/esm2022/lib/consts/inputs.consts.mjs +4 -0
- package/esm2022/lib/consts/month.consts.mjs +77 -0
- package/esm2022/lib/consts/params.consts.mjs +2 -0
- package/esm2022/lib/consts/register-base.consts.mjs +26 -0
- package/esm2022/lib/core/form-group-wrapper/errors-consts.mjs +8 -0
- package/esm2022/lib/core/form-group-wrapper/form-group-wrapper.mjs +81 -0
- package/esm2022/lib/core/form-group-wrapper/index.mjs +2 -0
- package/esm2022/lib/core/index.mjs +5 -0
- package/esm2022/lib/core/input-control/index.mjs +2 -0
- package/esm2022/lib/core/input-control/input-control.mjs +11 -0
- package/esm2022/lib/core/param/index.mjs +6 -0
- package/esm2022/lib/core/param/param-base.mjs +215 -0
- package/esm2022/lib/core/param/param-date-base.mjs +26 -0
- package/esm2022/lib/core/param/param-select-base.mjs +114 -0
- package/esm2022/lib/core/param/param-text-base.mjs +25 -0
- package/esm2022/lib/core/param/param.tokens.mjs +4 -0
- package/esm2022/lib/core/register-base/index.mjs +3 -0
- package/esm2022/lib/core/register-base/register-base.mjs +575 -0
- package/esm2022/lib/core/register-base/register-base.store.mjs +43 -0
- package/esm2022/lib/directives/date/date-time.types.mjs +34 -0
- package/esm2022/lib/directives/date/format-date.pipe.mjs +33 -0
- package/esm2022/lib/directives/index.mjs +3 -0
- package/esm2022/lib/directives/number/number-only.directive.mjs +41 -0
- package/esm2022/lib/directives/sticky/index.mjs +3 -0
- package/esm2022/lib/directives/sticky/sticky-relative.directive.mjs +32 -0
- package/esm2022/lib/directives/sticky/sticky-relative.service.mjs +32 -0
- package/esm2022/lib/directives/sticky/sticky.directive.mjs +169 -0
- package/esm2022/lib/services/date-time.service.mjs +314 -0
- package/esm2022/lib/services/dialog/dialog.service.mjs +53 -0
- package/esm2022/lib/services/dialog/dialog.types.mjs +2 -0
- package/esm2022/lib/services/dialog/index.mjs +3 -0
- package/esm2022/lib/services/dom-intersection.service.mjs +22 -0
- package/esm2022/lib/services/filter/filters-state.service.mjs +65 -0
- package/esm2022/lib/services/filter/filters-transmit.service.mjs +82 -0
- package/esm2022/lib/services/filter/filters.service.mjs +23 -0
- package/esm2022/lib/services/index.mjs +8 -0
- package/esm2022/lib/services/inputs-state.service.mjs +130 -0
- package/esm2022/lib/services/inputs.service.mjs +88 -0
- package/esm2022/lib/services/key-pressed.service.mjs +37 -0
- package/esm2022/lib/services/resize-window-observer.service.mjs +33 -0
- package/esm2022/lib/services/selected-objects-state.service.mjs +123 -0
- package/esm2022/lib/store/fast-query-store.service.mjs +110 -0
- package/esm2022/lib/store/index.mjs +2 -0
- package/esm2022/lib/types/event.types.mjs +2 -0
- package/esm2022/lib/types/hasura.types.mjs +2 -0
- package/esm2022/lib/types/index.mjs +7 -0
- package/esm2022/lib/types/inputs.types.mjs +19 -0
- package/esm2022/lib/types/params.types.mjs +2 -0
- package/esm2022/lib/types/register-base.types.mjs +6 -0
- package/esm2022/lib/types/sub-types.mjs +2 -0
- package/esm2022/lib/types/user-profile.types.mjs +2 -0
- package/esm2022/lib/utils/functions.mjs +10 -0
- package/esm2022/lib/utils/get-url-segment.mjs +35 -0
- package/esm2022/lib/utils/index.mjs +5 -0
- package/esm2022/lib/utils/prizm.shared.module.mjs +284 -0
- package/esm2022/lib/utils/rxjs.mjs +28 -0
- package/esm2022/lib/utils/select-all-utils.mjs +11 -0
- package/esm2022/ngx-register-base.mjs +5 -0
- package/esm2022/public-api.mjs +9 -0
- package/fesm2022/ngx-register-base.mjs +7487 -0
- package/fesm2022/ngx-register-base.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/checkbox-selector/checkbox-selector.component.d.ts +33 -0
- package/lib/components/checkbox-selector/checkbox-selector.types.d.ts +7 -0
- package/lib/components/column-settings/column-settings.component.d.ts +80 -0
- package/lib/components/column-settings/components/column-settings-template/column-settings-template.component.d.ts +24 -0
- package/lib/components/column-settings/consts/column-settings.consts.d.ts +8 -0
- package/lib/components/column-settings/types/column-settings.types.d.ts +22 -0
- package/lib/components/divider/divider.component.d.ts +6 -0
- package/lib/components/filter-button/filter-button.component.d.ts +8 -0
- package/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.d.ts +14 -0
- package/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.d.ts +25 -0
- package/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.d.ts +39 -0
- package/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.d.ts +41 -0
- package/lib/components/filters/components/filter-list/filter-list.service.d.ts +20 -0
- package/lib/components/filters/components/filter-list/filters-section/filters-section.component.d.ts +15 -0
- package/lib/components/filters/components/filter-list.module.d.ts +15 -0
- package/lib/components/filters/register-table-filter.component.d.ts +40 -0
- package/lib/components/filters/register-table-filter.module.d.ts +13 -0
- package/lib/components/inputs/inputs.module.d.ts +31 -0
- package/lib/components/inputs/param-calendar-year/param-calendar-year.component.d.ts +19 -0
- package/lib/components/inputs/param-custom/param-custom.component.d.ts +6 -0
- package/lib/components/inputs/param-date/param-date.component.d.ts +20 -0
- package/lib/components/inputs/param-date-range/param-date-range.component.d.ts +26 -0
- package/lib/components/inputs/param-date-time/param-date-time.component.d.ts +25 -0
- package/lib/components/inputs/param-date-time-range/param-date-time-range.component.d.ts +28 -0
- package/lib/components/inputs/param-month/param-month.component.d.ts +18 -0
- package/lib/components/inputs/param-month-range/param-month-range.component.d.ts +21 -0
- package/lib/components/inputs/param-multi-select/param-multi-select.component.d.ts +46 -0
- package/lib/components/inputs/param-select/param-select.component.d.ts +34 -0
- package/lib/components/inputs/param-switcher/param-switcher.component.d.ts +8 -0
- package/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.d.ts +2 -0
- package/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.d.ts +19 -0
- package/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.d.ts +8 -0
- package/lib/components/inputs/param-text/param-text.component.d.ts +10 -0
- package/lib/components/inputs/param-textarea/param-textarea.component.d.ts +10 -0
- package/lib/components/inputs/param-toggle/param-toggle.component.d.ts +9 -0
- package/lib/components/inputs/param-tree/consts/param-tree.consts.d.ts +7 -0
- package/lib/components/inputs/param-tree/param-tree.component.d.ts +41 -0
- package/lib/components/inputs/param-tree/services/param-tree.service.d.ts +37 -0
- package/lib/components/inputs/param-tree/services/sync-tree-loader.service.d.ts +10 -0
- package/{src/lib/components/inputs/param-tree/tokens/param-tree.tokens.ts → lib/components/inputs/param-tree/tokens/param-tree.tokens.d.ts} +1 -2
- package/lib/components/inputs/param-tree/types/param-tree.types.d.ts +32 -0
- package/lib/components/inputs/param-tree/utils/param-tree.utils.d.ts +7 -0
- package/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.d.ts +31 -0
- package/lib/components/inputs/param-tree-select/param-tree-select.component.d.ts +30 -0
- package/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.d.ts +6 -0
- package/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.d.ts +5 -0
- package/lib/components/menu-constructor/sproc-menu-constructor.component.d.ts +113 -0
- package/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.d.ts +24 -0
- package/lib/components/menu-constructor/store/sproc-menu-constructor.consts.d.ts +36 -0
- package/{src/lib/components/menu-constructor/store/sproc-menu.tokens.ts → lib/components/menu-constructor/store/sproc-menu.tokens.d.ts} +1 -4
- package/lib/components/page-menu/schema/sproc-page-menu.consts.d.ts +7 -0
- package/lib/components/page-menu/schema/sproc-page-menu.schema.d.ts +30 -0
- package/lib/components/page-menu/schema/sproc-page-menu.tokens.d.ts +3 -0
- package/lib/components/page-menu/schema/sproc-page-menu.types.d.ts +36 -0
- package/lib/components/page-menu/sproc-page-menu.component.d.ts +48 -0
- package/lib/components/paginator/paginator.component.d.ts +52 -0
- package/lib/components/paginator/types/paginator.types.d.ts +15 -0
- package/lib/components/register-table/consts/register-table.consts.d.ts +3 -0
- package/lib/components/register-table/directives/cell-template.directive.d.ts +9 -0
- package/lib/components/register-table/directives/header-template.directive.d.ts +9 -0
- package/lib/components/register-table/model/schema.d.ts +52 -0
- package/lib/components/register-table/pipes/class-by-type.pipe.d.ts +8 -0
- package/lib/components/register-table/pipes/sticky-column.pipe.d.ts +7 -0
- package/lib/components/register-table/register-table.component.d.ts +165 -0
- package/lib/components/reset-settings-form/reset-settings-form.component.d.ts +9 -0
- package/lib/components/search-input/search-input.component.d.ts +11 -0
- package/lib/components/sliding-panel/sliding-panel.component.d.ts +14 -0
- package/lib/components/sliding-panel/sliding-panel.module.d.ts +9 -0
- package/lib/consts/date-time.consts.d.ts +1 -0
- package/lib/consts/index.d.ts +3 -0
- package/lib/consts/inputs.consts.d.ts +4 -0
- package/lib/consts/month.consts.d.ts +49 -0
- package/lib/consts/params.consts.d.ts +1 -0
- package/lib/consts/register-base.consts.d.ts +19 -0
- package/lib/core/form-group-wrapper/errors-consts.d.ts +5 -0
- package/lib/core/form-group-wrapper/form-group-wrapper.d.ts +15 -0
- package/lib/core/input-control/input-control.d.ts +11 -0
- package/lib/core/param/param-base.d.ts +68 -0
- package/lib/core/param/param-date-base.d.ts +18 -0
- package/lib/core/param/param-select-base.d.ts +42 -0
- package/lib/core/param/param-text-base.d.ts +15 -0
- package/{src/lib/core/param/param.tokens.ts → lib/core/param/param.tokens.d.ts} +1 -2
- package/lib/core/register-base/register-base.d.ts +168 -0
- package/lib/core/register-base/register-base.store.d.ts +35 -0
- package/lib/directives/date/date-time.types.d.ts +32 -0
- package/lib/directives/date/format-date.pipe.d.ts +10 -0
- package/lib/directives/number/number-only.directive.d.ts +10 -0
- package/lib/directives/sticky/sticky-relative.directive.d.ts +13 -0
- package/lib/directives/sticky/sticky-relative.service.d.ts +15 -0
- package/lib/directives/sticky/sticky.directive.d.ts +27 -0
- package/lib/services/date-time.service.d.ts +80 -0
- package/lib/services/dialog/dialog.service.d.ts +22 -0
- package/{src/lib/services/dialog/dialog.types.ts → lib/services/dialog/dialog.types.d.ts} +4 -8
- package/lib/services/dom-intersection.service.d.ts +8 -0
- package/lib/services/filter/filters-state.service.d.ts +21 -0
- package/lib/services/filter/filters-transmit.service.d.ts +28 -0
- package/lib/services/filter/filters.service.d.ts +12 -0
- package/lib/services/inputs-state.service.d.ts +57 -0
- package/lib/services/inputs.service.d.ts +28 -0
- package/lib/services/key-pressed.service.d.ts +15 -0
- package/lib/services/resize-window-observer.service.d.ts +11 -0
- package/lib/services/selected-objects-state.service.d.ts +47 -0
- package/lib/store/fast-query-store.service.d.ts +19 -0
- package/{src/lib/types/event.types.ts → lib/types/event.types.d.ts} +1 -1
- package/lib/types/hasura.types.d.ts +35 -0
- package/lib/types/inputs.types.d.ts +41 -0
- package/lib/types/params.types.d.ts +27 -0
- package/lib/types/register-base.types.d.ts +123 -0
- package/lib/types/sub-types.d.ts +8 -0
- package/lib/types/user-profile.types.d.ts +17 -0
- package/lib/utils/functions.d.ts +3 -0
- package/lib/utils/get-url-segment.d.ts +7 -0
- package/lib/utils/prizm.shared.module.d.ts +14 -0
- package/lib/utils/rxjs.d.ts +10 -0
- package/lib/utils/select-all-utils.d.ts +8 -0
- package/package.json +15 -12
- package/schematics/ng-update/replace-menu-state-token/index.d.ts +2 -0
- package/schematics/ng-update/replace-menu-state-token/index.js +29 -0
- package/schematics/ng-update/replace-menu-state-token/index.js.map +1 -0
- package/schematics/ng-update/update-prefix/index.d.ts +2 -0
- package/schematics/ng-update/update-prefix/index.js +33 -0
- package/schematics/ng-update/update-prefix/index.js.map +1 -0
- package/schematics/utils/{utils.ts → utils.d.ts} +2 -9
- package/schematics/utils/utils.js +25 -0
- package/schematics/utils/utils.js.map +1 -0
- package/ng-package.json +0 -15
- package/schematics/ng-update/replace-menu-state-token/index.ts +0 -33
- package/schematics/ng-update/update-prefix/index.ts +0 -38
- package/src/lib/components/checkbox-selector/checkbox-selector.component.html +0 -91
- package/src/lib/components/checkbox-selector/checkbox-selector.component.less +0 -67
- package/src/lib/components/checkbox-selector/checkbox-selector.component.ts +0 -176
- package/src/lib/components/checkbox-selector/checkbox-selector.types.ts +0 -8
- package/src/lib/components/column-settings/column-settings.component.html +0 -160
- package/src/lib/components/column-settings/column-settings.component.less +0 -131
- package/src/lib/components/column-settings/column-settings.component.ts +0 -352
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.html +0 -65
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.less +0 -79
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.ts +0 -114
- package/src/lib/components/column-settings/consts/column-settings.consts.ts +0 -9
- package/src/lib/components/column-settings/types/column-settings.types.ts +0 -26
- package/src/lib/components/divider/divider.component.html +0 -4
- package/src/lib/components/divider/divider.component.less +0 -10
- package/src/lib/components/divider/divider.component.ts +0 -12
- package/src/lib/components/filter-button/filter-button.component.html +0 -20
- package/src/lib/components/filter-button/filter-button.component.less +0 -41
- package/src/lib/components/filter-button/filter-button.component.ts +0 -18
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.html +0 -22
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.less +0 -23
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.ts +0 -31
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.html +0 -49
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.less +0 -37
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.ts +0 -66
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.html +0 -147
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.less +0 -45
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.ts +0 -114
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.html +0 -44
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.less +0 -49
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.ts +0 -167
- package/src/lib/components/filters/components/filter-list/filter-list.service.ts +0 -97
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.html +0 -18
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.less +0 -55
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.ts +0 -69
- package/src/lib/components/filters/components/filter-list.module.ts +0 -29
- package/src/lib/components/filters/register-table-filter.component.html +0 -53
- package/src/lib/components/filters/register-table-filter.component.less +0 -17
- package/src/lib/components/filters/register-table-filter.component.ts +0 -167
- package/src/lib/components/filters/register-table-filter.module.ts +0 -22
- package/src/lib/components/inputs/inputs.module.ts +0 -104
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.html +0 -49
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.less +0 -70
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.ts +0 -52
- package/src/lib/components/inputs/param-custom/param-custom.component.html +0 -1
- package/src/lib/components/inputs/param-custom/param-custom.component.ts +0 -9
- package/src/lib/components/inputs/param-date/param-date.component.html +0 -55
- package/src/lib/components/inputs/param-date/param-date.component.less +0 -67
- package/src/lib/components/inputs/param-date/param-date.component.ts +0 -77
- package/src/lib/components/inputs/param-date-range/param-date-range.component.html +0 -45
- package/src/lib/components/inputs/param-date-range/param-date-range.component.less +0 -75
- package/src/lib/components/inputs/param-date-range/param-date-range.component.ts +0 -67
- package/src/lib/components/inputs/param-date-time/param-date-time.component.html +0 -70
- package/src/lib/components/inputs/param-date-time/param-date-time.component.less +0 -72
- package/src/lib/components/inputs/param-date-time/param-date-time.component.ts +0 -101
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.html +0 -67
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.less +0 -103
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.ts +0 -128
- package/src/lib/components/inputs/param-month/param-month.component.html +0 -46
- package/src/lib/components/inputs/param-month/param-month.component.less +0 -72
- package/src/lib/components/inputs/param-month/param-month.component.ts +0 -55
- package/src/lib/components/inputs/param-month-range/param-month-range.component.html +0 -39
- package/src/lib/components/inputs/param-month-range/param-month-range.component.less +0 -71
- package/src/lib/components/inputs/param-month-range/param-month-range.component.ts +0 -76
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.html +0 -84
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.less +0 -108
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.ts +0 -448
- package/src/lib/components/inputs/param-select/param-select.component.html +0 -106
- package/src/lib/components/inputs/param-select/param-select.component.less +0 -26
- package/src/lib/components/inputs/param-select/param-select.component.ts +0 -318
- package/src/lib/components/inputs/param-switcher/param-switcher.component.html +0 -8
- package/src/lib/components/inputs/param-switcher/param-switcher.component.less +0 -53
- package/src/lib/components/inputs/param-switcher/param-switcher.component.ts +0 -13
- package/src/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.ts +0 -29
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.html +0 -19
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.less +0 -76
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.ts +0 -134
- package/src/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.ts +0 -8
- package/src/lib/components/inputs/param-text/param-text.component.html +0 -59
- package/src/lib/components/inputs/param-text/param-text.component.less +0 -33
- package/src/lib/components/inputs/param-text/param-text.component.ts +0 -36
- package/src/lib/components/inputs/param-textarea/param-textarea.component.html +0 -61
- package/src/lib/components/inputs/param-textarea/param-textarea.component.less +0 -21
- package/src/lib/components/inputs/param-textarea/param-textarea.component.ts +0 -33
- package/src/lib/components/inputs/param-toggle/param-toggle.component.html +0 -40
- package/src/lib/components/inputs/param-toggle/param-toggle.component.less +0 -69
- package/src/lib/components/inputs/param-toggle/param-toggle.component.ts +0 -14
- package/src/lib/components/inputs/param-tree/consts/param-tree.consts.ts +0 -59
- package/src/lib/components/inputs/param-tree/param-tree.component.html +0 -51
- package/src/lib/components/inputs/param-tree/param-tree.component.less +0 -3
- package/src/lib/components/inputs/param-tree/param-tree.component.ts +0 -282
- package/src/lib/components/inputs/param-tree/services/param-tree.service.ts +0 -176
- package/src/lib/components/inputs/param-tree/services/sync-tree-loader.service.ts +0 -18
- package/src/lib/components/inputs/param-tree/types/param-tree.types.ts +0 -39
- package/src/lib/components/inputs/param-tree/utils/param-tree.utils.ts +0 -18
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.html +0 -78
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.less +0 -109
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.ts +0 -89
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.html +0 -54
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.less +0 -56
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.ts +0 -91
- package/src/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.html +0 -5
- package/src/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.ts +0 -13
- package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.html +0 -4
- package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.ts +0 -11
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.html +0 -95
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.less +0 -183
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.ts +0 -687
- package/src/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.ts +0 -32
- package/src/lib/components/menu-constructor/store/sproc-menu-constructor.consts.ts +0 -46
- package/src/lib/components/page-menu/README.md +0 -60
- package/src/lib/components/page-menu/schema/sproc-page-menu.consts.ts +0 -8
- package/src/lib/components/page-menu/schema/sproc-page-menu.schema.ts +0 -35
- package/src/lib/components/page-menu/schema/sproc-page-menu.tokens.ts +0 -5
- package/src/lib/components/page-menu/schema/sproc-page-menu.types.ts +0 -42
- package/src/lib/components/page-menu/sproc-page-menu.component.html +0 -166
- package/src/lib/components/page-menu/sproc-page-menu.component.less +0 -228
- package/src/lib/components/page-menu/sproc-page-menu.component.ts +0 -337
- package/src/lib/components/paginator/paginator.component.html +0 -97
- package/src/lib/components/paginator/paginator.component.less +0 -101
- package/src/lib/components/paginator/paginator.component.ts +0 -192
- package/src/lib/components/paginator/types/paginator.types.ts +0 -16
- package/src/lib/components/register-table/consts/register-table.consts.ts +0 -3
- package/src/lib/components/register-table/directives/cell-template.directive.ts +0 -11
- package/src/lib/components/register-table/directives/header-template.directive.ts +0 -11
- package/src/lib/components/register-table/model/schema.ts +0 -62
- package/src/lib/components/register-table/pipes/class-by-type.pipe.ts +0 -28
- package/src/lib/components/register-table/pipes/sticky-column.pipe.ts +0 -11
- package/src/lib/components/register-table/register-table.component.html +0 -257
- package/src/lib/components/register-table/register-table.component.less +0 -151
- package/src/lib/components/register-table/register-table.component.ts +0 -743
- package/src/lib/components/reset-settings-form/reset-settings-form.component.html +0 -14
- package/src/lib/components/reset-settings-form/reset-settings-form.component.less +0 -26
- package/src/lib/components/reset-settings-form/reset-settings-form.component.ts +0 -15
- package/src/lib/components/search-input/search-input.component.html +0 -6
- package/src/lib/components/search-input/search-input.component.less +0 -17
- package/src/lib/components/search-input/search-input.component.ts +0 -31
- package/src/lib/components/sliding-panel/sliding-panel.component.html +0 -13
- package/src/lib/components/sliding-panel/sliding-panel.component.less +0 -112
- package/src/lib/components/sliding-panel/sliding-panel.component.ts +0 -36
- package/src/lib/components/sliding-panel/sliding-panel.module.ts +0 -11
- package/src/lib/consts/date-time.consts.ts +0 -1
- package/src/lib/consts/index.ts +0 -8
- package/src/lib/consts/inputs.consts.ts +0 -9
- package/src/lib/consts/month.consts.ts +0 -82
- package/src/lib/consts/params.consts.ts +0 -1
- package/src/lib/consts/register-base.consts.ts +0 -40
- package/src/lib/core/form-group-wrapper/errors-consts.ts +0 -6
- package/src/lib/core/form-group-wrapper/form-group-wrapper.ts +0 -109
- package/src/lib/core/input-control/input-control.ts +0 -30
- package/src/lib/core/param/param-base.ts +0 -262
- package/src/lib/core/param/param-date-base.ts +0 -30
- package/src/lib/core/param/param-select-base.ts +0 -118
- package/src/lib/core/param/param-text-base.ts +0 -23
- package/src/lib/core/register-base/register-base.store.ts +0 -84
- package/src/lib/core/register-base/register-base.ts +0 -854
- package/src/lib/directives/date/date-time.types.ts +0 -36
- package/src/lib/directives/date/format-date.pipe.ts +0 -28
- package/src/lib/directives/number/number-only.directive.ts +0 -36
- package/src/lib/directives/sticky/sticky-relative.directive.ts +0 -30
- package/src/lib/directives/sticky/sticky-relative.service.ts +0 -34
- package/src/lib/directives/sticky/sticky.directive.ts +0 -189
- package/src/lib/services/date-time.service.ts +0 -399
- package/src/lib/services/dialog/dialog.service.ts +0 -62
- package/src/lib/services/dom-intersection.service.ts +0 -23
- package/src/lib/services/filter/filters-state.service.ts +0 -83
- package/src/lib/services/filter/filters-transmit.service.ts +0 -105
- package/src/lib/services/filter/filters.service.ts +0 -21
- package/src/lib/services/inputs-state.service.ts +0 -157
- package/src/lib/services/inputs.service.ts +0 -114
- package/src/lib/services/key-pressed.service.ts +0 -40
- package/src/lib/services/resize-window-observer.service.ts +0 -37
- package/src/lib/services/selected-objects-state.service.ts +0 -159
- package/src/lib/store/fast-query-store.service.ts +0 -132
- package/src/lib/types/hasura.types.ts +0 -41
- package/src/lib/types/inputs.types.ts +0 -63
- package/src/lib/types/params.types.ts +0 -42
- package/src/lib/types/register-base.types.ts +0 -161
- package/src/lib/types/sub-types.ts +0 -15
- package/src/lib/types/user-profile.types.ts +0 -18
- package/src/lib/utils/functions.ts +0 -11
- package/src/lib/utils/get-url-segment.ts +0 -46
- package/src/lib/utils/prizm.shared.module.ts +0 -176
- package/src/lib/utils/rxjs.ts +0 -33
- package/src/lib/utils/select-all-utils.ts +0 -16
- package/tsconfig.lib.json +0 -16
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.schematics.json +0 -26
- package/tsconfig.spec.json +0 -15
- /package/{src/lib/components/column-settings/index.ts → lib/components/column-settings/index.d.ts} +0 -0
- /package/{src/lib/components/filters/index.ts → lib/components/filters/index.d.ts} +0 -0
- /package/{src/lib/components/index.ts → lib/components/index.d.ts} +0 -0
- /package/{src/lib/components/inputs/index.ts → lib/components/inputs/index.d.ts} +0 -0
- /package/{src/lib/components/inputs/param-switcher-date-time-range/index.ts → lib/components/inputs/param-switcher-date-time-range/index.d.ts} +0 -0
- /package/{src/lib/components/inputs/param-tree/index.ts → lib/components/inputs/param-tree/index.d.ts} +0 -0
- /package/{src/lib/components/menu-constructor/index.ts → lib/components/menu-constructor/index.d.ts} +0 -0
- /package/{src/lib/components/page-menu/index.ts → lib/components/page-menu/index.d.ts} +0 -0
- /package/{src/lib/components/register-table/index.ts → lib/components/register-table/index.d.ts} +0 -0
- /package/{src/lib/core/form-group-wrapper/index.ts → lib/core/form-group-wrapper/index.d.ts} +0 -0
- /package/{src/lib/core/index.ts → lib/core/index.d.ts} +0 -0
- /package/{src/lib/core/input-control/index.ts → lib/core/input-control/index.d.ts} +0 -0
- /package/{src/lib/core/param/index.ts → lib/core/param/index.d.ts} +0 -0
- /package/{src/lib/core/register-base/index.ts → lib/core/register-base/index.d.ts} +0 -0
- /package/{src/lib/directives/index.ts → lib/directives/index.d.ts} +0 -0
- /package/{src/lib/directives/sticky/index.ts → lib/directives/sticky/index.d.ts} +0 -0
- /package/{src/lib/services/dialog/index.ts → lib/services/dialog/index.d.ts} +0 -0
- /package/{src/lib/services/index.ts → lib/services/index.d.ts} +0 -0
- /package/{src/lib/store/index.ts → lib/store/index.d.ts} +0 -0
- /package/{src/lib/types/index.ts → lib/types/index.d.ts} +0 -0
- /package/{src/lib/utils/index.ts → lib/utils/index.d.ts} +0 -0
- /package/{src/public-api.ts → public-api.d.ts} +0 -0
|
@@ -1,743 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
computed,
|
|
5
|
-
contentChildren,
|
|
6
|
-
DestroyRef,
|
|
7
|
-
effect,
|
|
8
|
-
ElementRef,
|
|
9
|
-
inject,
|
|
10
|
-
input,
|
|
11
|
-
OnDestroy,
|
|
12
|
-
output,
|
|
13
|
-
signal,
|
|
14
|
-
TemplateRef,
|
|
15
|
-
untracked,
|
|
16
|
-
viewChild,
|
|
17
|
-
viewChildren,
|
|
18
|
-
} from '@angular/core';
|
|
19
|
-
import { DomIntersectionService } from '../../services/dom-intersection.service';
|
|
20
|
-
import { TuiHint, TuiIcon, TuiLoader, TuiScrollbar } from '@taiga-ui/core';
|
|
21
|
-
import { TuiTable, TuiTableSortChange } from '@taiga-ui/addon-table';
|
|
22
|
-
import { AsyncPipe, DecimalPipe, NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';
|
|
23
|
-
import {
|
|
24
|
-
ColumnDataTypes,
|
|
25
|
-
EColumnDataType,
|
|
26
|
-
IColumnData,
|
|
27
|
-
RegisterTableCellSorter,
|
|
28
|
-
ThWidthEntry,
|
|
29
|
-
} from './model/schema';
|
|
30
|
-
import { TuiCheckbox } from '@taiga-ui/kit';
|
|
31
|
-
import { EDatePattern, ETimezone } from '../../directives/date/date-time.types';
|
|
32
|
-
import {
|
|
33
|
-
outputFromObservable,
|
|
34
|
-
takeUntilDestroyed,
|
|
35
|
-
toObservable,
|
|
36
|
-
toSignal,
|
|
37
|
-
} from '@angular/core/rxjs-interop';
|
|
38
|
-
import { HeaderTemplateDirective } from './directives/header-template.directive';
|
|
39
|
-
import { DateTimeService } from '../../services/date-time.service';
|
|
40
|
-
import { CellTemplateDirective } from './directives/cell-template.directive';
|
|
41
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
42
|
-
import { KEY_PRESSED, KeyPressedService } from '../../services/key-pressed.service';
|
|
43
|
-
import { EOrder, THS_WIDTH_CHANGES_DEBOUNCE_TIME_MLS } from '../../consts/register-base.consts';
|
|
44
|
-
import { ClassByTypePipe } from './pipes/class-by-type.pipe';
|
|
45
|
-
import { StickyColumnPipe } from './pipes/sticky-column.pipe';
|
|
46
|
-
import {
|
|
47
|
-
CHECKBOX_SELECTOR_KEY,
|
|
48
|
-
CHECKBOX_SELECTOR_WIDTH_PX,
|
|
49
|
-
MIN_COL_WIDTH_PX,
|
|
50
|
-
} from './consts/register-table.consts';
|
|
51
|
-
import {
|
|
52
|
-
BehaviorSubject,
|
|
53
|
-
combineLatest,
|
|
54
|
-
debounceTime,
|
|
55
|
-
map,
|
|
56
|
-
skip,
|
|
57
|
-
Subject,
|
|
58
|
-
switchMap,
|
|
59
|
-
tap,
|
|
60
|
-
} from 'rxjs';
|
|
61
|
-
import { CheckboxSelectorComponent } from '../checkbox-selector/checkbox-selector.component';
|
|
62
|
-
import { distinctUntilChangedJSONs } from '../../utils';
|
|
63
|
-
import { StickyDirective, StickyRelativeDirective } from '../../directives';
|
|
64
|
-
import { ScalarUUID } from 'hasura';
|
|
65
|
-
import { ERegisterObjectState, IRegisterObject } from '../../types';
|
|
66
|
-
import { ApplySelectionTypes } from '../checkbox-selector/checkbox-selector.types';
|
|
67
|
-
import { SelectedObjectsStateService } from '../../services';
|
|
68
|
-
import { TuiResizable, TuiResizer } from '@taiga-ui/cdk';
|
|
69
|
-
import { FormatDatePipe } from '../../directives/date/format-date.pipe';
|
|
70
|
-
import { IPaginatorOutput } from '../paginator/types/paginator.types';
|
|
71
|
-
import { PaginatorComponent } from '../paginator/paginator.component';
|
|
72
|
-
|
|
73
|
-
/** Общий компонент для создания таблицы ресстра */
|
|
74
|
-
@Component({
|
|
75
|
-
selector: 'sproc-register-table',
|
|
76
|
-
templateUrl: './register-table.component.html',
|
|
77
|
-
styleUrls: ['./register-table.component.less'],
|
|
78
|
-
standalone: true,
|
|
79
|
-
imports: [
|
|
80
|
-
TuiScrollbar,
|
|
81
|
-
TuiLoader,
|
|
82
|
-
NgClass,
|
|
83
|
-
NgStyle,
|
|
84
|
-
TuiCheckbox,
|
|
85
|
-
NgTemplateOutlet,
|
|
86
|
-
DecimalPipe,
|
|
87
|
-
FormatDatePipe,
|
|
88
|
-
AsyncPipe,
|
|
89
|
-
FormsModule,
|
|
90
|
-
ReactiveFormsModule,
|
|
91
|
-
TuiLoader,
|
|
92
|
-
TuiTable,
|
|
93
|
-
ClassByTypePipe,
|
|
94
|
-
StickyColumnPipe,
|
|
95
|
-
TuiHint,
|
|
96
|
-
PaginatorComponent,
|
|
97
|
-
CheckboxSelectorComponent,
|
|
98
|
-
StickyDirective,
|
|
99
|
-
StickyRelativeDirective,
|
|
100
|
-
TuiIcon,
|
|
101
|
-
TuiResizer,
|
|
102
|
-
TuiResizable,
|
|
103
|
-
],
|
|
104
|
-
providers: [
|
|
105
|
-
DomIntersectionService,
|
|
106
|
-
KeyPressedService,
|
|
107
|
-
{
|
|
108
|
-
provide: KEY_PRESSED,
|
|
109
|
-
useValue: 'Shift',
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
113
|
-
})
|
|
114
|
-
export class RegisterTableComponent implements OnDestroy {
|
|
115
|
-
/** Переданный контент для заголовков таблицы, темплейты с директивой HeaderTemplateDirective */
|
|
116
|
-
public headerTemplates = contentChildren<HeaderTemplateDirective>(HeaderTemplateDirective);
|
|
117
|
-
/** Переданный контент для ячеек таблицы, темплейты с директивой CellTemplateDirective */
|
|
118
|
-
public cellTemplates = contentChildren<CellTemplateDirective>(CellTemplateDirective);
|
|
119
|
-
|
|
120
|
-
/** Элементы строк таблицы */
|
|
121
|
-
public bodyRows = viewChildren('bodyRow', { read: ElementRef });
|
|
122
|
-
/** Элемент скролла таблицы */
|
|
123
|
-
public scrollbar = viewChild(TuiScrollbar, { read: ElementRef });
|
|
124
|
-
/** Состояние загрузки данных таблицы */
|
|
125
|
-
public isLoading = input.required<boolean | null>();
|
|
126
|
-
/** Состояние загрузки данных пагинации */
|
|
127
|
-
public isPaginatorLoading = input<boolean>(false);
|
|
128
|
-
/** Номер страницы */
|
|
129
|
-
public page = input.required<number | null>();
|
|
130
|
-
/** Количество записей на одной странице */
|
|
131
|
-
public limit = input.required<number | null>();
|
|
132
|
-
/** Отображение колонки выбора строк (по умолчанию отображается) */
|
|
133
|
-
public checkboxColumn = input(true);
|
|
134
|
-
/** Список столбцов */
|
|
135
|
-
public columns = input.required<string[]>();
|
|
136
|
-
/** Данные столбцов */
|
|
137
|
-
public columnsData = input.required<IColumnData[]>();
|
|
138
|
-
/** Идентификаторы фиксированных слева столбцов */
|
|
139
|
-
public stickyLeftIds = input<string[] | undefined>();
|
|
140
|
-
/** Идентификаторы фиксированных слева столбцов */
|
|
141
|
-
public stickyRightIds = input<string[] | undefined>();
|
|
142
|
-
/** Всего записей */
|
|
143
|
-
public totalRecords = input.required<number>();
|
|
144
|
-
/** Всего записей, без учета фильтра */
|
|
145
|
-
public totalNotFiltered = input.required<number>();
|
|
146
|
-
/** Значения таблицы */
|
|
147
|
-
public rowData = input.required<any[]>();
|
|
148
|
-
/**
|
|
149
|
-
* @description Идентификаторы выбранных записей
|
|
150
|
-
*
|
|
151
|
-
* @deprecated Используйте stateObjects
|
|
152
|
-
* */
|
|
153
|
-
public selectedIds = input(new Set<ScalarUUID>());
|
|
154
|
-
/**
|
|
155
|
-
* @description Объекты выбранных записей
|
|
156
|
-
*
|
|
157
|
-
* @deprecated Используйте stateObjects
|
|
158
|
-
* */
|
|
159
|
-
public selectedObjects = input(new Set<any>());
|
|
160
|
-
/** Загрузка дополнительных записей при выборе соответствущего пункта в чекбокс-селекторе */
|
|
161
|
-
public isSelectloading = input<boolean | null>(false);
|
|
162
|
-
/** Текст пустой таблицы */
|
|
163
|
-
public emptyText = input<string>('Нет данных');
|
|
164
|
-
/** Дизейбл сортировки */
|
|
165
|
-
public sortingDisabled = input(false);
|
|
166
|
-
/** Максимальное значения выбора чекбоксов через поле ввода */
|
|
167
|
-
public checkboxInputMaxValue = input<number | null>(null);
|
|
168
|
-
/** Дизейбл выбора чекбоксов */
|
|
169
|
-
public checkboxDisabled = input(false);
|
|
170
|
-
/** Дизейбл выбора чекбоксов */
|
|
171
|
-
public paginatorDisabled = input(false);
|
|
172
|
-
|
|
173
|
-
public selectedCounter = computed(() => {
|
|
174
|
-
const selectedSize = this._selectedService?.selectedValues()?.size ?? null;
|
|
175
|
-
const unselectedSize = this._selectedService?.unselectedValues()?.size ?? 0;
|
|
176
|
-
const unfetchedObjects = this._selectedService?.stateUnfetchedObjects();
|
|
177
|
-
const isNotSelected = unfetchedObjects !== ERegisterObjectState.SELECTED;
|
|
178
|
-
|
|
179
|
-
if (selectedSize === null) {
|
|
180
|
-
this._deprecatedSelectedRowsCounter();
|
|
181
|
-
return this.selectedIds().size;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
return isNotSelected ? selectedSize : this.totalRecords() - unselectedSize;
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
protected readonly dts = inject(DateTimeService);
|
|
188
|
-
protected readonly destroyRef = inject(DestroyRef);
|
|
189
|
-
|
|
190
|
-
private readonly _shift = inject(KeyPressedService);
|
|
191
|
-
private readonly _domIntersectionService = inject(DomIntersectionService);
|
|
192
|
-
// TODO удалить optional: true после выполнения задачи SMA2-3134
|
|
193
|
-
private readonly _selectedService = inject(SelectedObjectsStateService, {
|
|
194
|
-
optional: true,
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
/** Событие выбора в чекбокс-селекторе */
|
|
198
|
-
public selectChanged = output<ApplySelectionTypes>();
|
|
199
|
-
/** Событие изменения значений пагинатора */
|
|
200
|
-
public paginatorChange = output<IPaginatorOutput>();
|
|
201
|
-
/** Событие нажатия на строку */
|
|
202
|
-
public rowClick = output<any>();
|
|
203
|
-
/** Событие двойного нажатия на строку */
|
|
204
|
-
public rowDblClick = output<any>();
|
|
205
|
-
/** Событие нажатия на строку */
|
|
206
|
-
public rowSelected = output<{ row: any[]; count: number }>();
|
|
207
|
-
/** Событие сортировки значений в таблице */
|
|
208
|
-
public sort = output<RegisterTableCellSorter<any>[]>();
|
|
209
|
-
/** Событие изменения ширины колонки */
|
|
210
|
-
private readonly _thsWidthMap = computed(
|
|
211
|
-
() => new Map(this.columnsData().map(({ name, width }) => [name, new BehaviorSubject(width)]))
|
|
212
|
-
);
|
|
213
|
-
public thsWidthChange = outputFromObservable<ThWidthEntry[]>(
|
|
214
|
-
toObservable(this._thsWidthMap).pipe(
|
|
215
|
-
switchMap((changes) =>
|
|
216
|
-
combineLatest(
|
|
217
|
-
[...changes.entries()].map(([name, $width]) =>
|
|
218
|
-
$width.asObservable().pipe(map((width) => ({ name, width })))
|
|
219
|
-
)
|
|
220
|
-
).pipe(
|
|
221
|
-
distinctUntilChangedJSONs(),
|
|
222
|
-
debounceTime(THS_WIDTH_CHANGES_DEBOUNCE_TIME_MLS),
|
|
223
|
-
skip(1)
|
|
224
|
-
)
|
|
225
|
-
)
|
|
226
|
-
)
|
|
227
|
-
);
|
|
228
|
-
/** Событие изменения видимых строк таблицы */
|
|
229
|
-
private readonly _observerRowsVisibilityDOM$ = toObservable(this.bodyRows).pipe(
|
|
230
|
-
switchMap((bodyRows) =>
|
|
231
|
-
combineLatest(
|
|
232
|
-
bodyRows.map((bodyRow, index) =>
|
|
233
|
-
this._domIntersectionService.createAndObserve(bodyRow).pipe(
|
|
234
|
-
// TODO удалить tap, как только перестанет использоваться is_visible по проекту
|
|
235
|
-
tap((isVisible) => {
|
|
236
|
-
this.rowData()[index].is_visible = isVisible;
|
|
237
|
-
}),
|
|
238
|
-
map((isVisible) => (isVisible ? this.rowData()[index] : undefined))
|
|
239
|
-
)
|
|
240
|
-
)
|
|
241
|
-
).pipe(map((visibleRows) => visibleRows.filter((visibleRow) => !!visibleRow)))
|
|
242
|
-
)
|
|
243
|
-
);
|
|
244
|
-
public visibleRowsChange = outputFromObservable<any[]>(this._observerRowsVisibilityDOM$);
|
|
245
|
-
|
|
246
|
-
protected readonly EColumnDataType = EColumnDataType;
|
|
247
|
-
protected readonly ETimezone = ETimezone;
|
|
248
|
-
protected readonly EDatePattern = EDatePattern;
|
|
249
|
-
protected readonly ERegisterObjectState = ERegisterObjectState;
|
|
250
|
-
|
|
251
|
-
protected readonly CHECKBOX_SELECTOR_KEY = CHECKBOX_SELECTOR_KEY;
|
|
252
|
-
protected readonly CHECKBOX_SELECTOR_WIDTH_PX = CHECKBOX_SELECTOR_WIDTH_PX;
|
|
253
|
-
|
|
254
|
-
protected readonly stickyThStyle = Object.freeze({ 'z-index': 22 });
|
|
255
|
-
protected readonly stickyTdStyle = Object.freeze({ 'z-index': 21 });
|
|
256
|
-
|
|
257
|
-
protected readonly columnsWithCheckboxes = computed(() => [
|
|
258
|
-
CHECKBOX_SELECTOR_KEY,
|
|
259
|
-
...this.columns(),
|
|
260
|
-
]);
|
|
261
|
-
protected readonly scrollPosition = signal<{ top: number; left: number }>({ top: 0, left: 0 });
|
|
262
|
-
protected readonly tableWidth = toSignal(
|
|
263
|
-
combineLatest([toObservable(this.columnsWithCheckboxes), toObservable(this._thsWidthMap)]).pipe(
|
|
264
|
-
map(
|
|
265
|
-
({ 0: visibleColumns, 1: changes }) =>
|
|
266
|
-
new Map([...changes.entries()].filter(([thName]) => visibleColumns.includes(thName)))
|
|
267
|
-
),
|
|
268
|
-
switchMap((changes) =>
|
|
269
|
-
combineLatest(
|
|
270
|
-
[...changes.entries()].map(({ 1: $width }) =>
|
|
271
|
-
$width.asObservable().pipe(map((width) => width))
|
|
272
|
-
)
|
|
273
|
-
).pipe(
|
|
274
|
-
map((widths) => {
|
|
275
|
-
let tableWidth = this.checkboxColumn() ? CHECKBOX_SELECTOR_WIDTH_PX : 0;
|
|
276
|
-
|
|
277
|
-
for (const width of widths) {
|
|
278
|
-
tableWidth += width ? Number(width) : 0;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
return tableWidth;
|
|
282
|
-
})
|
|
283
|
-
)
|
|
284
|
-
)
|
|
285
|
-
)
|
|
286
|
-
);
|
|
287
|
-
|
|
288
|
-
protected stateObjects = this._selectedService?.state;
|
|
289
|
-
|
|
290
|
-
protected visibleColumnsTree = computed(() =>
|
|
291
|
-
this._filterVisibleColumns(this.columnsData(), this.columns())
|
|
292
|
-
);
|
|
293
|
-
protected maxDepth = computed(() => this._getMaxDepth(this.visibleColumnsTree()));
|
|
294
|
-
protected leaves = computed(() => this._getFlatLeaves(this.visibleColumnsTree()));
|
|
295
|
-
|
|
296
|
-
protected headerRows = computed(() => {
|
|
297
|
-
const maxDepth = this.maxDepth();
|
|
298
|
-
const rows: { col: IColumnData; rowspan: number; colspan: number }[][] = Array.from(
|
|
299
|
-
{ length: maxDepth },
|
|
300
|
-
() => []
|
|
301
|
-
);
|
|
302
|
-
|
|
303
|
-
if (maxDepth === 0) {
|
|
304
|
-
return rows;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
for (const col of this.visibleColumnsTree()) {
|
|
308
|
-
this._buildHeaderRecursive(col, 0, maxDepth, rows);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
return rows;
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
private _deprecatedSelectedRowsCounter = signal(0);
|
|
315
|
-
|
|
316
|
-
protected readonly timeZoneChanges$ = this.dts.isTimeZoneChanged$;
|
|
317
|
-
|
|
318
|
-
protected readonly columnOrders = new Map<string, RegisterTableCellSorter<any>>();
|
|
319
|
-
|
|
320
|
-
private readonly _projectedHeadersMap = new Map<string, TemplateRef<any>>();
|
|
321
|
-
private readonly _projectedCellsMap = new Map<string, TemplateRef<any>>();
|
|
322
|
-
|
|
323
|
-
private readonly _clickedRow$ = new Subject<unknown>();
|
|
324
|
-
|
|
325
|
-
private readonly _hoveredRow$ = new BehaviorSubject<unknown>(null);
|
|
326
|
-
|
|
327
|
-
protected lastSelectedRow: unknown;
|
|
328
|
-
|
|
329
|
-
constructor() {
|
|
330
|
-
this._setScrollPositionAfterDataLoading();
|
|
331
|
-
this._projectHeaderTemplates();
|
|
332
|
-
this._projectCellTemplates();
|
|
333
|
-
// TODO удалить метод, как только перестанет использоваться is_visible по проекту
|
|
334
|
-
this._syncRowVisibilityDOM();
|
|
335
|
-
|
|
336
|
-
effect(() => {
|
|
337
|
-
const data = this.rowData();
|
|
338
|
-
|
|
339
|
-
if (data.length > 0 && !this.lastSelectedRow) {
|
|
340
|
-
[this.lastSelectedRow] = data;
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
private _setScrollPositionAfterDataLoading(): void {
|
|
346
|
-
effect(() => {
|
|
347
|
-
if (!this.isLoading()) {
|
|
348
|
-
untracked(() => {
|
|
349
|
-
const { top, left } = this.scrollPosition();
|
|
350
|
-
const scrollbarElement = this.scrollbar()?.nativeElement;
|
|
351
|
-
|
|
352
|
-
if (scrollbarElement) {
|
|
353
|
-
scrollbarElement.scrollTop = top;
|
|
354
|
-
scrollbarElement.scrollLeft = left;
|
|
355
|
-
}
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
private _projectHeaderTemplates(): void {
|
|
362
|
-
effect(() => {
|
|
363
|
-
this._projectedHeadersMap.clear();
|
|
364
|
-
for (const template of this.headerTemplates()) {
|
|
365
|
-
this._projectedHeadersMap.set(template.headerTemplateName(), template.tpl);
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
private _projectCellTemplates(): void {
|
|
371
|
-
effect(() => {
|
|
372
|
-
this._projectedCellsMap.clear();
|
|
373
|
-
for (const template of this.cellTemplates()) {
|
|
374
|
-
this._projectedCellsMap.set(template.cellTemplateName, template.tpl);
|
|
375
|
-
}
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
private _syncRowVisibilityDOM(): void {
|
|
380
|
-
this._observerRowsVisibilityDOM$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe();
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
public ngOnDestroy(): void {
|
|
384
|
-
this._clickedRow$.complete();
|
|
385
|
-
this._hoveredRow$.complete();
|
|
386
|
-
for (const subject of this._thsWidthMap().values()) {
|
|
387
|
-
subject.complete();
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
protected getProjectionHeaderByName(name: string): TemplateRef<any> | undefined {
|
|
392
|
-
return this._projectedHeadersMap.get(name);
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
protected getProjectionCellByName(name: string): TemplateRef<any> | undefined {
|
|
396
|
-
return this._projectedCellsMap.get(name);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
protected sortChange({ sortComparator }: TuiTableSortChange<Partial<Record<string, any>>>): void {
|
|
400
|
-
if (!sortComparator) {
|
|
401
|
-
return;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
const id = sortComparator({}, {}) as any as string;
|
|
405
|
-
const columnOrder = this.columnOrders.get(id);
|
|
406
|
-
|
|
407
|
-
if (this._shift.isPressed()) {
|
|
408
|
-
this.updateColumnOrder(id, columnOrder);
|
|
409
|
-
} else {
|
|
410
|
-
this.columnOrders.clear();
|
|
411
|
-
this.updateColumnOrder(id, columnOrder);
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
this.sort.emit([...this.columnOrders.values()]);
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
private updateColumnOrder(
|
|
418
|
-
id: string,
|
|
419
|
-
columnOrder: RegisterTableCellSorter<any> | undefined
|
|
420
|
-
): void {
|
|
421
|
-
if (columnOrder) {
|
|
422
|
-
const { options } = columnOrder;
|
|
423
|
-
const { order } = options;
|
|
424
|
-
|
|
425
|
-
if (order === EOrder.DESC) {
|
|
426
|
-
this.columnOrders.delete(id);
|
|
427
|
-
} else {
|
|
428
|
-
this.columnOrders.set(id, { options: { ...options, order: EOrder.DESC } });
|
|
429
|
-
}
|
|
430
|
-
} else {
|
|
431
|
-
this.columnOrders.set(id, { options: { id, order: EOrder.ASC } });
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
protected setThName(thName: string): any {
|
|
436
|
-
return () => thName;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
protected checkAvailableColumnSorting(columnData: IColumnData): boolean {
|
|
440
|
-
const { sortable, type } = columnData;
|
|
441
|
-
const availableSortColumnTypes: ColumnDataTypes[] = [
|
|
442
|
-
EColumnDataType.TEXT,
|
|
443
|
-
EColumnDataType.DATE,
|
|
444
|
-
EColumnDataType.NUM,
|
|
445
|
-
];
|
|
446
|
-
|
|
447
|
-
return !this.sortingDisabled() && sortable !== false && availableSortColumnTypes.includes(type);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
protected checkResizeBlocked(columnData: IColumnData): boolean {
|
|
451
|
-
const resizableBlockedTypes: ColumnDataTypes[] = [
|
|
452
|
-
EColumnDataType.CHECKBOX,
|
|
453
|
-
EColumnDataType.ICON,
|
|
454
|
-
EColumnDataType.ICON_SVG,
|
|
455
|
-
];
|
|
456
|
-
|
|
457
|
-
return columnData.fixed || resizableBlockedTypes.includes(columnData.type);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
protected onRowHover(row: unknown): void {
|
|
461
|
-
this._hoveredRow$.next(row);
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
protected onRowClick(event: MouseEvent, row: unknown): void {
|
|
465
|
-
const blueHighlightsSelected = window.getSelection();
|
|
466
|
-
blueHighlightsSelected?.removeAllRanges();
|
|
467
|
-
|
|
468
|
-
const stateObjects = this.stateObjects?.();
|
|
469
|
-
|
|
470
|
-
// TODO оставить только if после SMA2-3134
|
|
471
|
-
if (stateObjects) {
|
|
472
|
-
if (event.shiftKey) {
|
|
473
|
-
this._changeRangeRowsState(stateObjects, this.lastSelectedRow, row);
|
|
474
|
-
} else {
|
|
475
|
-
if (event.ctrlKey) {
|
|
476
|
-
this._changeOnlyRowState(stateObjects, row, true);
|
|
477
|
-
} else {
|
|
478
|
-
this._changeOnlyRowState(stateObjects, row);
|
|
479
|
-
}
|
|
480
|
-
this.lastSelectedRow = row;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
this.rowClick.emit(row);
|
|
484
|
-
|
|
485
|
-
const selectedObjects = this._selectedService?.selectedValues();
|
|
486
|
-
|
|
487
|
-
if (selectedObjects) {
|
|
488
|
-
this.rowSelected.emit({
|
|
489
|
-
row: [...selectedObjects],
|
|
490
|
-
count: selectedObjects.size,
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
this._clickedRow$.next(row);
|
|
495
|
-
return;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
if (event.shiftKey) {
|
|
499
|
-
this._selectRangeRows(this.lastSelectedRow, row);
|
|
500
|
-
} else {
|
|
501
|
-
if (event.ctrlKey) {
|
|
502
|
-
this._selectOnlyRow(row, true);
|
|
503
|
-
} else {
|
|
504
|
-
this._selectOnlyRow(row);
|
|
505
|
-
}
|
|
506
|
-
this.lastSelectedRow = row;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
this.rowClick.emit(row);
|
|
510
|
-
this.rowSelected.emit({
|
|
511
|
-
row: [...this.selectedObjects()],
|
|
512
|
-
count: this.selectedObjects().size,
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
private _changeOnlyRowState(
|
|
517
|
-
state: Map<ScalarUUID, IRegisterObject>,
|
|
518
|
-
row: unknown,
|
|
519
|
-
saveSelected?: boolean
|
|
520
|
-
): void {
|
|
521
|
-
if (typeof row !== 'object' || !row || !('id' in row)) {
|
|
522
|
-
console.error('Поле id отсутствует в элементе', row);
|
|
523
|
-
return;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
const id = row.id as string;
|
|
527
|
-
const wasSelected = state.get(id)?.state === ERegisterObjectState.SELECTED;
|
|
528
|
-
|
|
529
|
-
if (saveSelected) {
|
|
530
|
-
this.updateStateObjectByKey(id, {
|
|
531
|
-
state: wasSelected ? ERegisterObjectState.UNSELECTED : ERegisterObjectState.SELECTED,
|
|
532
|
-
});
|
|
533
|
-
} else {
|
|
534
|
-
this.updateAllStateObjectsByState(ERegisterObjectState.UNSELECTED);
|
|
535
|
-
this.updateStateObjectByKey(id, { state: ERegisterObjectState.SELECTED });
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
private _selectOnlyRow(row: unknown, saveSelected?: boolean): void {
|
|
540
|
-
if (typeof row !== 'object' || !row || !('id' in row)) {
|
|
541
|
-
console.error('Поле id отсутствует в элементе', row);
|
|
542
|
-
return;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
const id = row.id as string;
|
|
546
|
-
const wasSelected = this.selectedIds().has(id);
|
|
547
|
-
|
|
548
|
-
if (saveSelected) {
|
|
549
|
-
if (wasSelected) {
|
|
550
|
-
this.selectedIds().delete(id);
|
|
551
|
-
this.selectedObjects().delete(row);
|
|
552
|
-
} else {
|
|
553
|
-
this.selectedIds().add(id);
|
|
554
|
-
this.selectedObjects().add(row);
|
|
555
|
-
}
|
|
556
|
-
} else {
|
|
557
|
-
this.selectedIds().clear();
|
|
558
|
-
this.selectedObjects().clear();
|
|
559
|
-
this.selectedIds().add(id);
|
|
560
|
-
this.selectedObjects().add(row);
|
|
561
|
-
}
|
|
562
|
-
this._emitDeprecatedSelectedRows();
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
private _emitDeprecatedSelectedRows(): void {
|
|
566
|
-
this._deprecatedSelectedRowsCounter.update((value) => value + 1);
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
private _changeRangeRowsState(
|
|
570
|
-
stateObjects: Map<ScalarUUID, IRegisterObject>,
|
|
571
|
-
previousRow: unknown,
|
|
572
|
-
currentRow: unknown
|
|
573
|
-
): void {
|
|
574
|
-
this.updateAllStateObjectsByState(ERegisterObjectState.UNSELECTED);
|
|
575
|
-
|
|
576
|
-
let prevIndex = this.rowData().indexOf(previousRow);
|
|
577
|
-
let currIndex = this.rowData().indexOf(currentRow);
|
|
578
|
-
|
|
579
|
-
if (prevIndex > currIndex) {
|
|
580
|
-
const tempIndex = prevIndex;
|
|
581
|
-
prevIndex = currIndex;
|
|
582
|
-
currIndex = tempIndex;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
const idsObjectsShouldSelected: Set<ScalarUUID> = new Set(
|
|
586
|
-
this.rowData()
|
|
587
|
-
.slice(prevIndex === -1 ? 0 : prevIndex, currIndex + 1)
|
|
588
|
-
.map((row) => row.id)
|
|
589
|
-
);
|
|
590
|
-
|
|
591
|
-
const slicedStateObjects = new Map(
|
|
592
|
-
[...stateObjects].filter(([key]) => idsObjectsShouldSelected.has(key))
|
|
593
|
-
);
|
|
594
|
-
|
|
595
|
-
for (const key of slicedStateObjects.keys()) {
|
|
596
|
-
this.updateStateObjectByKey(key, { state: ERegisterObjectState.SELECTED });
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
private _selectRangeRows(previousRow: unknown, currentRow: unknown): void {
|
|
601
|
-
let prevIndex = this.rowData().indexOf(previousRow);
|
|
602
|
-
let currIndex = this.rowData().indexOf(currentRow);
|
|
603
|
-
|
|
604
|
-
if (prevIndex > currIndex) {
|
|
605
|
-
const tempIndex = prevIndex;
|
|
606
|
-
prevIndex = currIndex;
|
|
607
|
-
currIndex = tempIndex;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
const itemsShouldSelected = this.rowData().slice(
|
|
611
|
-
prevIndex === -1 ? 0 : prevIndex,
|
|
612
|
-
currIndex + 1
|
|
613
|
-
);
|
|
614
|
-
|
|
615
|
-
this.selectedIds().clear();
|
|
616
|
-
this.selectedObjects().clear();
|
|
617
|
-
this._emitDeprecatedSelectedRows();
|
|
618
|
-
|
|
619
|
-
for (const item of itemsShouldSelected) {
|
|
620
|
-
this.selectedIds().add(item.id);
|
|
621
|
-
this.selectedObjects().add(item);
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
protected thResizeChanges(name: string, width: number): void {
|
|
626
|
-
const thWidthChangesEntry = this._thsWidthMap().get(name);
|
|
627
|
-
|
|
628
|
-
if (thWidthChangesEntry) {
|
|
629
|
-
const validWidth = width > MIN_COL_WIDTH_PX ? width : MIN_COL_WIDTH_PX;
|
|
630
|
-
thWidthChangesEntry.next(validWidth.toString());
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
protected getThWidth(name: string): string | undefined {
|
|
635
|
-
const thWidthChangesEntry = this._thsWidthMap().get(name);
|
|
636
|
-
|
|
637
|
-
return thWidthChangesEntry?.getValue();
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
protected saveScrollEndPosition(): void {
|
|
641
|
-
const scrollbarElement = this.scrollbar()?.nativeElement;
|
|
642
|
-
|
|
643
|
-
if (scrollbarElement && !this.isLoading()) {
|
|
644
|
-
const { scrollTop, scrollLeft } = scrollbarElement;
|
|
645
|
-
|
|
646
|
-
this.scrollPosition.set({
|
|
647
|
-
top: scrollTop,
|
|
648
|
-
left: scrollLeft,
|
|
649
|
-
});
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
protected updateAllStateObjectsByState(state: ERegisterObjectState): void {
|
|
654
|
-
this._selectedService?.setAllStateObjectsByState(state);
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
protected updateStateObjectByKey(key: ScalarUUID, updates: Partial<IRegisterObject>): void {
|
|
658
|
-
this._selectedService?.setStateObjectByKey(key, updates);
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
protected markRowBeforeSelect(row: unknown): boolean {
|
|
662
|
-
const shiftPressed = this._shift.isPressed();
|
|
663
|
-
const prevRow = this.lastSelectedRow;
|
|
664
|
-
const hoveredRow = this._hoveredRow$.getValue();
|
|
665
|
-
|
|
666
|
-
if (shiftPressed && prevRow && hoveredRow) {
|
|
667
|
-
let beforeIndex = this.rowData().indexOf(prevRow);
|
|
668
|
-
let afterIndex = this.rowData().indexOf(hoveredRow);
|
|
669
|
-
|
|
670
|
-
if (beforeIndex > afterIndex) {
|
|
671
|
-
const tempIndex = beforeIndex;
|
|
672
|
-
beforeIndex = afterIndex;
|
|
673
|
-
afterIndex = tempIndex;
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
const currentIndex = this.rowData().indexOf(row);
|
|
677
|
-
|
|
678
|
-
return beforeIndex <= currentIndex && currentIndex <= afterIndex;
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
return false;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
private _buildHeaderRecursive(
|
|
685
|
-
col: IColumnData,
|
|
686
|
-
level: number,
|
|
687
|
-
maxDepth: number,
|
|
688
|
-
rows: { col: IColumnData; rowspan: number; colspan: number }[][]
|
|
689
|
-
): number {
|
|
690
|
-
const children = col.children || [];
|
|
691
|
-
const hasChildren = children.length > 0;
|
|
692
|
-
|
|
693
|
-
const customRowspan = col.rowspan || 1;
|
|
694
|
-
const nextLevel = level + customRowspan;
|
|
695
|
-
|
|
696
|
-
let colspan = 0;
|
|
697
|
-
|
|
698
|
-
if (hasChildren) {
|
|
699
|
-
for (const child of children) {
|
|
700
|
-
colspan += this._buildHeaderRecursive(child, nextLevel, maxDepth, rows);
|
|
701
|
-
}
|
|
702
|
-
} else {
|
|
703
|
-
colspan = 1;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
const rowspan = hasChildren ? customRowspan : maxDepth - level;
|
|
707
|
-
|
|
708
|
-
if (rows[level]) {
|
|
709
|
-
rows[level].push({ col, rowspan, colspan });
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
return colspan;
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
private _getFlatLeaves(columns: IColumnData[]): IColumnData[] {
|
|
716
|
-
return columns.flatMap((col) => {
|
|
717
|
-
if (col.children && col.children.length > 0) {
|
|
718
|
-
return this._getFlatLeaves(col.children);
|
|
719
|
-
}
|
|
720
|
-
return [col];
|
|
721
|
-
});
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
private _filterVisibleColumns(columns: IColumnData[], showedNames: string[]): IColumnData[] {
|
|
725
|
-
return columns
|
|
726
|
-
.map((col) => {
|
|
727
|
-
if (col.children && col.children.length > 0) {
|
|
728
|
-
const visibleChildren = this._filterVisibleColumns(col.children, showedNames);
|
|
729
|
-
return { ...col, children: visibleChildren };
|
|
730
|
-
}
|
|
731
|
-
return col;
|
|
732
|
-
})
|
|
733
|
-
.filter((col) => showedNames.includes(col.name) || (col.children && col.children.length > 0));
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
private _getMaxDepth(columns: IColumnData[]): number {
|
|
737
|
-
if (!columns || columns.length === 0) {
|
|
738
|
-
return 0;
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
return 1 + Math.max(...columns.map((c) => this._getMaxDepth(c.children || [])));
|
|
742
|
-
}
|
|
743
|
-
}
|