ngx-register-base 1.3.0 → 1.3.1
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/ng-package.json +15 -0
- package/package.json +12 -15
- package/schematics/ng-update/replace-menu-state-token/index.ts +33 -0
- package/schematics/ng-update/update-prefix/index.ts +38 -0
- package/schematics/utils/{utils.d.ts → utils.ts} +9 -2
- package/src/lib/components/checkbox-selector/checkbox-selector.component.html +91 -0
- package/src/lib/components/checkbox-selector/checkbox-selector.component.less +67 -0
- package/src/lib/components/checkbox-selector/checkbox-selector.component.ts +176 -0
- package/src/lib/components/checkbox-selector/checkbox-selector.types.ts +8 -0
- package/src/lib/components/column-settings/column-settings.component.html +160 -0
- package/src/lib/components/column-settings/column-settings.component.less +131 -0
- package/src/lib/components/column-settings/column-settings.component.ts +352 -0
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.html +65 -0
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.less +79 -0
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.ts +114 -0
- package/src/lib/components/column-settings/consts/column-settings.consts.ts +9 -0
- package/src/lib/components/column-settings/types/column-settings.types.ts +26 -0
- package/src/lib/components/divider/divider.component.html +4 -0
- package/src/lib/components/divider/divider.component.less +10 -0
- package/src/lib/components/divider/divider.component.ts +12 -0
- package/src/lib/components/filter-button/filter-button.component.html +20 -0
- package/src/lib/components/filter-button/filter-button.component.less +41 -0
- package/src/lib/components/filter-button/filter-button.component.ts +18 -0
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.html +22 -0
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.less +23 -0
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.ts +31 -0
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.html +49 -0
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.less +37 -0
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.ts +66 -0
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.html +147 -0
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.less +45 -0
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.ts +114 -0
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.html +44 -0
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.less +49 -0
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.ts +167 -0
- package/src/lib/components/filters/components/filter-list/filter-list.service.ts +97 -0
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.html +18 -0
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.less +55 -0
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.ts +69 -0
- package/src/lib/components/filters/components/filter-list.module.ts +29 -0
- package/src/lib/components/filters/register-table-filter.component.html +53 -0
- package/src/lib/components/filters/register-table-filter.component.less +17 -0
- package/src/lib/components/filters/register-table-filter.component.ts +167 -0
- package/src/lib/components/filters/register-table-filter.module.ts +22 -0
- package/src/lib/components/inputs/inputs.module.ts +104 -0
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.html +49 -0
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.less +70 -0
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.ts +52 -0
- package/src/lib/components/inputs/param-custom/param-custom.component.html +1 -0
- package/src/lib/components/inputs/param-custom/param-custom.component.ts +9 -0
- package/src/lib/components/inputs/param-date/param-date.component.html +55 -0
- package/src/lib/components/inputs/param-date/param-date.component.less +67 -0
- package/src/lib/components/inputs/param-date/param-date.component.ts +77 -0
- package/src/lib/components/inputs/param-date-range/param-date-range.component.html +45 -0
- package/src/lib/components/inputs/param-date-range/param-date-range.component.less +75 -0
- package/src/lib/components/inputs/param-date-range/param-date-range.component.ts +67 -0
- package/src/lib/components/inputs/param-date-time/param-date-time.component.html +70 -0
- package/src/lib/components/inputs/param-date-time/param-date-time.component.less +72 -0
- package/src/lib/components/inputs/param-date-time/param-date-time.component.ts +101 -0
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.html +67 -0
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.less +103 -0
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.ts +128 -0
- package/src/lib/components/inputs/param-month/param-month.component.html +46 -0
- package/src/lib/components/inputs/param-month/param-month.component.less +72 -0
- package/src/lib/components/inputs/param-month/param-month.component.ts +55 -0
- package/src/lib/components/inputs/param-month-range/param-month-range.component.html +39 -0
- package/src/lib/components/inputs/param-month-range/param-month-range.component.less +71 -0
- package/src/lib/components/inputs/param-month-range/param-month-range.component.ts +76 -0
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.html +84 -0
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.less +108 -0
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.ts +448 -0
- package/src/lib/components/inputs/param-select/param-select.component.html +106 -0
- package/src/lib/components/inputs/param-select/param-select.component.less +26 -0
- package/src/lib/components/inputs/param-select/param-select.component.ts +318 -0
- package/src/lib/components/inputs/param-switcher/param-switcher.component.html +8 -0
- package/src/lib/components/inputs/param-switcher/param-switcher.component.less +53 -0
- package/src/lib/components/inputs/param-switcher/param-switcher.component.ts +13 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.ts +29 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.html +19 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.less +76 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.ts +134 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.ts +8 -0
- package/src/lib/components/inputs/param-text/param-text.component.html +59 -0
- package/src/lib/components/inputs/param-text/param-text.component.less +33 -0
- package/src/lib/components/inputs/param-text/param-text.component.ts +36 -0
- package/src/lib/components/inputs/param-textarea/param-textarea.component.html +61 -0
- package/src/lib/components/inputs/param-textarea/param-textarea.component.less +21 -0
- package/src/lib/components/inputs/param-textarea/param-textarea.component.ts +33 -0
- package/src/lib/components/inputs/param-toggle/param-toggle.component.html +40 -0
- package/src/lib/components/inputs/param-toggle/param-toggle.component.less +69 -0
- package/src/lib/components/inputs/param-toggle/param-toggle.component.ts +14 -0
- package/src/lib/components/inputs/param-tree/consts/param-tree.consts.ts +59 -0
- package/src/lib/components/inputs/param-tree/param-tree.component.html +51 -0
- package/src/lib/components/inputs/param-tree/param-tree.component.less +3 -0
- package/src/lib/components/inputs/param-tree/param-tree.component.ts +282 -0
- package/src/lib/components/inputs/param-tree/services/param-tree.service.ts +176 -0
- package/src/lib/components/inputs/param-tree/services/sync-tree-loader.service.ts +18 -0
- package/{lib/components/inputs/param-tree/tokens/param-tree.tokens.d.ts → src/lib/components/inputs/param-tree/tokens/param-tree.tokens.ts} +2 -1
- package/src/lib/components/inputs/param-tree/types/param-tree.types.ts +39 -0
- package/src/lib/components/inputs/param-tree/utils/param-tree.utils.ts +18 -0
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.html +78 -0
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.less +109 -0
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.ts +89 -0
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.html +54 -0
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.less +56 -0
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.ts +91 -0
- package/src/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.html +5 -0
- package/src/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.ts +13 -0
- package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.html +4 -0
- package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.ts +11 -0
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.html +95 -0
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.less +183 -0
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.ts +687 -0
- package/src/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.ts +32 -0
- package/src/lib/components/menu-constructor/store/sproc-menu-constructor.consts.ts +46 -0
- package/{lib/components/menu-constructor/store/sproc-menu.tokens.d.ts → src/lib/components/menu-constructor/store/sproc-menu.tokens.ts} +4 -1
- package/src/lib/components/page-menu/README.md +60 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.consts.ts +8 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.schema.ts +35 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.tokens.ts +5 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.types.ts +42 -0
- package/src/lib/components/page-menu/sproc-page-menu.component.html +166 -0
- package/src/lib/components/page-menu/sproc-page-menu.component.less +228 -0
- package/src/lib/components/page-menu/sproc-page-menu.component.ts +337 -0
- package/src/lib/components/paginator/paginator.component.html +97 -0
- package/src/lib/components/paginator/paginator.component.less +101 -0
- package/src/lib/components/paginator/paginator.component.ts +192 -0
- package/src/lib/components/paginator/types/paginator.types.ts +16 -0
- package/src/lib/components/register-table/consts/register-table.consts.ts +3 -0
- package/src/lib/components/register-table/directives/cell-template.directive.ts +11 -0
- package/src/lib/components/register-table/directives/header-template.directive.ts +11 -0
- package/src/lib/components/register-table/model/schema.ts +62 -0
- package/src/lib/components/register-table/pipes/class-by-type.pipe.ts +28 -0
- package/src/lib/components/register-table/pipes/sticky-column.pipe.ts +11 -0
- package/src/lib/components/register-table/register-table.component.html +257 -0
- package/src/lib/components/register-table/register-table.component.less +151 -0
- package/src/lib/components/register-table/register-table.component.ts +743 -0
- package/src/lib/components/reset-settings-form/reset-settings-form.component.html +14 -0
- package/src/lib/components/reset-settings-form/reset-settings-form.component.less +26 -0
- package/src/lib/components/reset-settings-form/reset-settings-form.component.ts +15 -0
- package/src/lib/components/search-input/search-input.component.html +6 -0
- package/src/lib/components/search-input/search-input.component.less +17 -0
- package/src/lib/components/search-input/search-input.component.ts +31 -0
- package/src/lib/components/sliding-panel/sliding-panel.component.html +13 -0
- package/src/lib/components/sliding-panel/sliding-panel.component.less +112 -0
- package/src/lib/components/sliding-panel/sliding-panel.component.ts +36 -0
- package/src/lib/components/sliding-panel/sliding-panel.module.ts +11 -0
- package/src/lib/consts/date-time.consts.ts +1 -0
- package/src/lib/consts/index.ts +8 -0
- package/src/lib/consts/inputs.consts.ts +9 -0
- package/src/lib/consts/month.consts.ts +82 -0
- package/src/lib/consts/params.consts.ts +1 -0
- package/src/lib/consts/register-base.consts.ts +40 -0
- package/src/lib/core/form-group-wrapper/errors-consts.ts +6 -0
- package/src/lib/core/form-group-wrapper/form-group-wrapper.ts +109 -0
- package/src/lib/core/input-control/input-control.ts +30 -0
- package/src/lib/core/param/param-base.ts +262 -0
- package/src/lib/core/param/param-date-base.ts +30 -0
- package/src/lib/core/param/param-select-base.ts +118 -0
- package/src/lib/core/param/param-text-base.ts +23 -0
- package/{lib/core/param/param.tokens.d.ts → src/lib/core/param/param.tokens.ts} +2 -1
- package/src/lib/core/register-base/register-base.store.ts +84 -0
- package/src/lib/core/register-base/register-base.ts +854 -0
- package/src/lib/directives/date/date-time.types.ts +36 -0
- package/src/lib/directives/date/format-date.pipe.ts +28 -0
- package/src/lib/directives/number/number-only.directive.ts +36 -0
- package/src/lib/directives/sticky/sticky-relative.directive.ts +30 -0
- package/src/lib/directives/sticky/sticky-relative.service.ts +34 -0
- package/src/lib/directives/sticky/sticky.directive.ts +189 -0
- package/src/lib/services/date-time.service.ts +399 -0
- package/src/lib/services/dialog/dialog.service.ts +62 -0
- package/{lib/services/dialog/dialog.types.d.ts → src/lib/services/dialog/dialog.types.ts} +8 -4
- package/src/lib/services/dom-intersection.service.ts +23 -0
- package/src/lib/services/filter/filters-state.service.ts +83 -0
- package/src/lib/services/filter/filters-transmit.service.ts +105 -0
- package/src/lib/services/filter/filters.service.ts +21 -0
- package/src/lib/services/inputs-state.service.ts +157 -0
- package/src/lib/services/inputs.service.ts +114 -0
- package/src/lib/services/key-pressed.service.ts +40 -0
- package/src/lib/services/resize-window-observer.service.ts +37 -0
- package/src/lib/services/selected-objects-state.service.ts +159 -0
- package/src/lib/store/fast-query-store.service.ts +132 -0
- package/{lib/types/event.types.d.ts → src/lib/types/event.types.ts} +1 -1
- package/src/lib/types/hasura.types.ts +41 -0
- package/src/lib/types/inputs.types.ts +63 -0
- package/src/lib/types/params.types.ts +42 -0
- package/src/lib/types/register-base.types.ts +161 -0
- package/src/lib/types/sub-types.ts +15 -0
- package/src/lib/types/user-profile.types.ts +18 -0
- package/src/lib/utils/functions.ts +11 -0
- package/src/lib/utils/get-url-segment.ts +46 -0
- package/src/lib/utils/prizm.shared.module.ts +176 -0
- package/src/lib/utils/rxjs.ts +33 -0
- package/src/lib/utils/select-all-utils.ts +16 -0
- package/tsconfig.lib.json +16 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.schematics.json +26 -0
- package/tsconfig.spec.json +15 -0
- package/esm2022/lib/components/checkbox-selector/checkbox-selector.component.mjs +0 -129
- package/esm2022/lib/components/checkbox-selector/checkbox-selector.types.mjs +0 -8
- package/esm2022/lib/components/column-settings/column-settings.component.mjs +0 -249
- package/esm2022/lib/components/column-settings/components/column-settings-template/column-settings-template.component.mjs +0 -80
- package/esm2022/lib/components/column-settings/consts/column-settings.consts.mjs +0 -10
- package/esm2022/lib/components/column-settings/index.mjs +0 -3
- package/esm2022/lib/components/column-settings/types/column-settings.types.mjs +0 -7
- package/esm2022/lib/components/divider/divider.component.mjs +0 -16
- package/esm2022/lib/components/filter-button/filter-button.component.mjs +0 -19
- package/esm2022/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.mjs +0 -31
- package/esm2022/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.mjs +0 -57
- package/esm2022/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.mjs +0 -110
- package/esm2022/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.mjs +0 -130
- package/esm2022/lib/components/filters/components/filter-list/filter-list.service.mjs +0 -89
- package/esm2022/lib/components/filters/components/filter-list/filters-section/filters-section.component.mjs +0 -41
- package/esm2022/lib/components/filters/components/filter-list.module.mjs +0 -45
- package/esm2022/lib/components/filters/index.mjs +0 -3
- package/esm2022/lib/components/filters/register-table-filter.component.mjs +0 -155
- package/esm2022/lib/components/filters/register-table-filter.module.mjs +0 -39
- package/esm2022/lib/components/index.mjs +0 -11
- package/esm2022/lib/components/inputs/index.mjs +0 -20
- package/esm2022/lib/components/inputs/inputs.module.mjs +0 -166
- package/esm2022/lib/components/inputs/param-calendar-year/param-calendar-year.component.mjs +0 -45
- package/esm2022/lib/components/inputs/param-custom/param-custom.component.mjs +0 -12
- package/esm2022/lib/components/inputs/param-date/param-date.component.mjs +0 -76
- package/esm2022/lib/components/inputs/param-date-range/param-date-range.component.mjs +0 -61
- package/esm2022/lib/components/inputs/param-date-time/param-date-time.component.mjs +0 -86
- package/esm2022/lib/components/inputs/param-date-time-range/param-date-time-range.component.mjs +0 -96
- package/esm2022/lib/components/inputs/param-month/param-month.component.mjs +0 -50
- package/esm2022/lib/components/inputs/param-month-range/param-month-range.component.mjs +0 -62
- package/esm2022/lib/components/inputs/param-multi-select/param-multi-select.component.mjs +0 -309
- package/esm2022/lib/components/inputs/param-select/param-select.component.mjs +0 -209
- package/esm2022/lib/components/inputs/param-switcher/param-switcher.component.mjs +0 -21
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.mjs +0 -28
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/index.mjs +0 -3
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.mjs +0 -105
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.mjs +0 -10
- package/esm2022/lib/components/inputs/param-text/param-text.component.mjs +0 -40
- package/esm2022/lib/components/inputs/param-textarea/param-textarea.component.mjs +0 -38
- package/esm2022/lib/components/inputs/param-toggle/param-toggle.component.mjs +0 -20
- package/esm2022/lib/components/inputs/param-tree/consts/param-tree.consts.mjs +0 -37
- package/esm2022/lib/components/inputs/param-tree/index.mjs +0 -8
- package/esm2022/lib/components/inputs/param-tree/param-tree.component.mjs +0 -207
- package/esm2022/lib/components/inputs/param-tree/services/param-tree.service.mjs +0 -116
- package/esm2022/lib/components/inputs/param-tree/services/sync-tree-loader.service.mjs +0 -20
- package/esm2022/lib/components/inputs/param-tree/tokens/param-tree.tokens.mjs +0 -3
- package/esm2022/lib/components/inputs/param-tree/types/param-tree.types.mjs +0 -2
- package/esm2022/lib/components/inputs/param-tree/utils/param-tree.utils.mjs +0 -9
- package/esm2022/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.mjs +0 -80
- package/esm2022/lib/components/inputs/param-tree-select/param-tree-select.component.mjs +0 -85
- package/esm2022/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.mjs +0 -15
- package/esm2022/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.mjs +0 -12
- package/esm2022/lib/components/menu-constructor/index.mjs +0 -5
- package/esm2022/lib/components/menu-constructor/sproc-menu-constructor.component.mjs +0 -559
- package/esm2022/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.mjs +0 -3
- package/esm2022/lib/components/menu-constructor/store/sproc-menu-constructor.consts.mjs +0 -5
- package/esm2022/lib/components/menu-constructor/store/sproc-menu.tokens.mjs +0 -3
- package/esm2022/lib/components/page-menu/index.mjs +0 -6
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.consts.mjs +0 -9
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.schema.mjs +0 -2
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.tokens.mjs +0 -4
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.types.mjs +0 -3
- package/esm2022/lib/components/page-menu/sproc-page-menu.component.mjs +0 -275
- package/esm2022/lib/components/paginator/paginator.component.mjs +0 -159
- package/esm2022/lib/components/paginator/types/paginator.types.mjs +0 -2
- package/esm2022/lib/components/register-table/consts/register-table.consts.mjs +0 -4
- package/esm2022/lib/components/register-table/directives/cell-template.directive.mjs +0 -19
- package/esm2022/lib/components/register-table/directives/header-template.directive.mjs +0 -18
- package/esm2022/lib/components/register-table/index.mjs +0 -4
- package/esm2022/lib/components/register-table/model/schema.mjs +0 -10
- package/esm2022/lib/components/register-table/pipes/class-by-type.pipe.mjs +0 -33
- package/esm2022/lib/components/register-table/pipes/sticky-column.pipe.mjs +0 -17
- package/esm2022/lib/components/register-table/register-table.component.mjs +0 -544
- package/esm2022/lib/components/reset-settings-form/reset-settings-form.component.mjs +0 -18
- package/esm2022/lib/components/search-input/search-input.component.mjs +0 -28
- package/esm2022/lib/components/sliding-panel/sliding-panel.component.mjs +0 -48
- package/esm2022/lib/components/sliding-panel/sliding-panel.module.mjs +0 -19
- package/esm2022/lib/consts/date-time.consts.mjs +0 -2
- package/esm2022/lib/consts/index.mjs +0 -4
- package/esm2022/lib/consts/inputs.consts.mjs +0 -4
- package/esm2022/lib/consts/month.consts.mjs +0 -77
- package/esm2022/lib/consts/params.consts.mjs +0 -2
- package/esm2022/lib/consts/register-base.consts.mjs +0 -26
- package/esm2022/lib/core/form-group-wrapper/errors-consts.mjs +0 -8
- package/esm2022/lib/core/form-group-wrapper/form-group-wrapper.mjs +0 -81
- package/esm2022/lib/core/form-group-wrapper/index.mjs +0 -2
- package/esm2022/lib/core/index.mjs +0 -5
- package/esm2022/lib/core/input-control/index.mjs +0 -2
- package/esm2022/lib/core/input-control/input-control.mjs +0 -11
- package/esm2022/lib/core/param/index.mjs +0 -6
- package/esm2022/lib/core/param/param-base.mjs +0 -215
- package/esm2022/lib/core/param/param-date-base.mjs +0 -26
- package/esm2022/lib/core/param/param-select-base.mjs +0 -114
- package/esm2022/lib/core/param/param-text-base.mjs +0 -25
- package/esm2022/lib/core/param/param.tokens.mjs +0 -4
- package/esm2022/lib/core/register-base/index.mjs +0 -3
- package/esm2022/lib/core/register-base/register-base.mjs +0 -575
- package/esm2022/lib/core/register-base/register-base.store.mjs +0 -43
- package/esm2022/lib/directives/date/date-time.types.mjs +0 -34
- package/esm2022/lib/directives/date/format-date.pipe.mjs +0 -33
- package/esm2022/lib/directives/index.mjs +0 -3
- package/esm2022/lib/directives/number/number-only.directive.mjs +0 -41
- package/esm2022/lib/directives/sticky/index.mjs +0 -3
- package/esm2022/lib/directives/sticky/sticky-relative.directive.mjs +0 -32
- package/esm2022/lib/directives/sticky/sticky-relative.service.mjs +0 -32
- package/esm2022/lib/directives/sticky/sticky.directive.mjs +0 -169
- package/esm2022/lib/services/date-time.service.mjs +0 -314
- package/esm2022/lib/services/dialog/dialog.service.mjs +0 -53
- package/esm2022/lib/services/dialog/dialog.types.mjs +0 -2
- package/esm2022/lib/services/dialog/index.mjs +0 -3
- package/esm2022/lib/services/dom-intersection.service.mjs +0 -22
- package/esm2022/lib/services/filter/filters-state.service.mjs +0 -65
- package/esm2022/lib/services/filter/filters-transmit.service.mjs +0 -82
- package/esm2022/lib/services/filter/filters.service.mjs +0 -23
- package/esm2022/lib/services/index.mjs +0 -8
- package/esm2022/lib/services/inputs-state.service.mjs +0 -130
- package/esm2022/lib/services/inputs.service.mjs +0 -88
- package/esm2022/lib/services/key-pressed.service.mjs +0 -37
- package/esm2022/lib/services/resize-window-observer.service.mjs +0 -33
- package/esm2022/lib/services/selected-objects-state.service.mjs +0 -123
- package/esm2022/lib/store/fast-query-store.service.mjs +0 -110
- package/esm2022/lib/store/index.mjs +0 -2
- package/esm2022/lib/types/event.types.mjs +0 -2
- package/esm2022/lib/types/hasura.types.mjs +0 -2
- package/esm2022/lib/types/index.mjs +0 -7
- package/esm2022/lib/types/inputs.types.mjs +0 -19
- package/esm2022/lib/types/params.types.mjs +0 -2
- package/esm2022/lib/types/register-base.types.mjs +0 -6
- package/esm2022/lib/types/sub-types.mjs +0 -2
- package/esm2022/lib/types/user-profile.types.mjs +0 -2
- package/esm2022/lib/utils/functions.mjs +0 -10
- package/esm2022/lib/utils/get-url-segment.mjs +0 -35
- package/esm2022/lib/utils/index.mjs +0 -5
- package/esm2022/lib/utils/prizm.shared.module.mjs +0 -284
- package/esm2022/lib/utils/rxjs.mjs +0 -28
- package/esm2022/lib/utils/select-all-utils.mjs +0 -11
- package/esm2022/ngx-register-base.mjs +0 -5
- package/esm2022/public-api.mjs +0 -9
- package/fesm2022/ngx-register-base.mjs +0 -7465
- package/fesm2022/ngx-register-base.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/checkbox-selector/checkbox-selector.component.d.ts +0 -33
- package/lib/components/checkbox-selector/checkbox-selector.types.d.ts +0 -7
- package/lib/components/column-settings/column-settings.component.d.ts +0 -80
- package/lib/components/column-settings/components/column-settings-template/column-settings-template.component.d.ts +0 -24
- package/lib/components/column-settings/consts/column-settings.consts.d.ts +0 -8
- package/lib/components/column-settings/types/column-settings.types.d.ts +0 -22
- package/lib/components/divider/divider.component.d.ts +0 -6
- package/lib/components/filter-button/filter-button.component.d.ts +0 -8
- package/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.d.ts +0 -14
- package/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.d.ts +0 -25
- package/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.d.ts +0 -39
- package/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.d.ts +0 -41
- package/lib/components/filters/components/filter-list/filter-list.service.d.ts +0 -20
- package/lib/components/filters/components/filter-list/filters-section/filters-section.component.d.ts +0 -15
- package/lib/components/filters/components/filter-list.module.d.ts +0 -15
- package/lib/components/filters/register-table-filter.component.d.ts +0 -40
- package/lib/components/filters/register-table-filter.module.d.ts +0 -13
- package/lib/components/inputs/inputs.module.d.ts +0 -31
- package/lib/components/inputs/param-calendar-year/param-calendar-year.component.d.ts +0 -19
- package/lib/components/inputs/param-custom/param-custom.component.d.ts +0 -6
- package/lib/components/inputs/param-date/param-date.component.d.ts +0 -20
- package/lib/components/inputs/param-date-range/param-date-range.component.d.ts +0 -26
- package/lib/components/inputs/param-date-time/param-date-time.component.d.ts +0 -25
- package/lib/components/inputs/param-date-time-range/param-date-time-range.component.d.ts +0 -28
- package/lib/components/inputs/param-month/param-month.component.d.ts +0 -18
- package/lib/components/inputs/param-month-range/param-month-range.component.d.ts +0 -21
- package/lib/components/inputs/param-multi-select/param-multi-select.component.d.ts +0 -46
- package/lib/components/inputs/param-select/param-select.component.d.ts +0 -30
- package/lib/components/inputs/param-switcher/param-switcher.component.d.ts +0 -8
- package/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.d.ts +0 -2
- package/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.d.ts +0 -19
- package/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.d.ts +0 -8
- package/lib/components/inputs/param-text/param-text.component.d.ts +0 -10
- package/lib/components/inputs/param-textarea/param-textarea.component.d.ts +0 -10
- package/lib/components/inputs/param-toggle/param-toggle.component.d.ts +0 -9
- package/lib/components/inputs/param-tree/consts/param-tree.consts.d.ts +0 -7
- package/lib/components/inputs/param-tree/param-tree.component.d.ts +0 -41
- package/lib/components/inputs/param-tree/services/param-tree.service.d.ts +0 -37
- package/lib/components/inputs/param-tree/services/sync-tree-loader.service.d.ts +0 -10
- package/lib/components/inputs/param-tree/types/param-tree.types.d.ts +0 -32
- package/lib/components/inputs/param-tree/utils/param-tree.utils.d.ts +0 -7
- package/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.d.ts +0 -31
- package/lib/components/inputs/param-tree-select/param-tree-select.component.d.ts +0 -30
- package/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.d.ts +0 -6
- package/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.d.ts +0 -5
- package/lib/components/menu-constructor/sproc-menu-constructor.component.d.ts +0 -113
- package/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.d.ts +0 -24
- package/lib/components/menu-constructor/store/sproc-menu-constructor.consts.d.ts +0 -36
- package/lib/components/page-menu/schema/sproc-page-menu.consts.d.ts +0 -7
- package/lib/components/page-menu/schema/sproc-page-menu.schema.d.ts +0 -30
- package/lib/components/page-menu/schema/sproc-page-menu.tokens.d.ts +0 -3
- package/lib/components/page-menu/schema/sproc-page-menu.types.d.ts +0 -36
- package/lib/components/page-menu/sproc-page-menu.component.d.ts +0 -48
- package/lib/components/paginator/paginator.component.d.ts +0 -52
- package/lib/components/paginator/types/paginator.types.d.ts +0 -15
- package/lib/components/register-table/consts/register-table.consts.d.ts +0 -3
- package/lib/components/register-table/directives/cell-template.directive.d.ts +0 -9
- package/lib/components/register-table/directives/header-template.directive.d.ts +0 -9
- package/lib/components/register-table/model/schema.d.ts +0 -52
- package/lib/components/register-table/pipes/class-by-type.pipe.d.ts +0 -8
- package/lib/components/register-table/pipes/sticky-column.pipe.d.ts +0 -7
- package/lib/components/register-table/register-table.component.d.ts +0 -165
- package/lib/components/reset-settings-form/reset-settings-form.component.d.ts +0 -9
- package/lib/components/search-input/search-input.component.d.ts +0 -11
- package/lib/components/sliding-panel/sliding-panel.component.d.ts +0 -14
- package/lib/components/sliding-panel/sliding-panel.module.d.ts +0 -9
- package/lib/consts/date-time.consts.d.ts +0 -1
- package/lib/consts/index.d.ts +0 -3
- package/lib/consts/inputs.consts.d.ts +0 -4
- package/lib/consts/month.consts.d.ts +0 -49
- package/lib/consts/params.consts.d.ts +0 -1
- package/lib/consts/register-base.consts.d.ts +0 -19
- package/lib/core/form-group-wrapper/errors-consts.d.ts +0 -5
- package/lib/core/form-group-wrapper/form-group-wrapper.d.ts +0 -15
- package/lib/core/input-control/input-control.d.ts +0 -11
- package/lib/core/param/param-base.d.ts +0 -68
- package/lib/core/param/param-date-base.d.ts +0 -18
- package/lib/core/param/param-select-base.d.ts +0 -42
- package/lib/core/param/param-text-base.d.ts +0 -15
- package/lib/core/register-base/register-base.d.ts +0 -168
- package/lib/core/register-base/register-base.store.d.ts +0 -35
- package/lib/directives/date/date-time.types.d.ts +0 -32
- package/lib/directives/date/format-date.pipe.d.ts +0 -10
- package/lib/directives/number/number-only.directive.d.ts +0 -10
- package/lib/directives/sticky/sticky-relative.directive.d.ts +0 -13
- package/lib/directives/sticky/sticky-relative.service.d.ts +0 -15
- package/lib/directives/sticky/sticky.directive.d.ts +0 -27
- package/lib/services/date-time.service.d.ts +0 -80
- package/lib/services/dialog/dialog.service.d.ts +0 -22
- package/lib/services/dom-intersection.service.d.ts +0 -8
- package/lib/services/filter/filters-state.service.d.ts +0 -21
- package/lib/services/filter/filters-transmit.service.d.ts +0 -28
- package/lib/services/filter/filters.service.d.ts +0 -12
- package/lib/services/inputs-state.service.d.ts +0 -57
- package/lib/services/inputs.service.d.ts +0 -28
- package/lib/services/key-pressed.service.d.ts +0 -15
- package/lib/services/resize-window-observer.service.d.ts +0 -11
- package/lib/services/selected-objects-state.service.d.ts +0 -47
- package/lib/store/fast-query-store.service.d.ts +0 -19
- package/lib/types/hasura.types.d.ts +0 -35
- package/lib/types/inputs.types.d.ts +0 -41
- package/lib/types/params.types.d.ts +0 -27
- package/lib/types/register-base.types.d.ts +0 -123
- package/lib/types/sub-types.d.ts +0 -8
- package/lib/types/user-profile.types.d.ts +0 -17
- package/lib/utils/functions.d.ts +0 -3
- package/lib/utils/get-url-segment.d.ts +0 -7
- package/lib/utils/prizm.shared.module.d.ts +0 -14
- package/lib/utils/rxjs.d.ts +0 -10
- package/lib/utils/select-all-utils.d.ts +0 -8
- package/schematics/ng-update/replace-menu-state-token/index.d.ts +0 -2
- package/schematics/ng-update/replace-menu-state-token/index.js +0 -29
- package/schematics/ng-update/replace-menu-state-token/index.js.map +0 -1
- package/schematics/ng-update/update-prefix/index.d.ts +0 -2
- package/schematics/ng-update/update-prefix/index.js +0 -33
- package/schematics/ng-update/update-prefix/index.js.map +0 -1
- package/schematics/utils/utils.js +0 -25
- package/schematics/utils/utils.js.map +0 -1
- /package/{lib/components/column-settings/index.d.ts → src/lib/components/column-settings/index.ts} +0 -0
- /package/{lib/components/filters/index.d.ts → src/lib/components/filters/index.ts} +0 -0
- /package/{lib/components/index.d.ts → src/lib/components/index.ts} +0 -0
- /package/{lib/components/inputs/index.d.ts → src/lib/components/inputs/index.ts} +0 -0
- /package/{lib/components/inputs/param-switcher-date-time-range/index.d.ts → src/lib/components/inputs/param-switcher-date-time-range/index.ts} +0 -0
- /package/{lib/components/inputs/param-tree/index.d.ts → src/lib/components/inputs/param-tree/index.ts} +0 -0
- /package/{lib/components/menu-constructor/index.d.ts → src/lib/components/menu-constructor/index.ts} +0 -0
- /package/{lib/components/page-menu/index.d.ts → src/lib/components/page-menu/index.ts} +0 -0
- /package/{lib/components/register-table/index.d.ts → src/lib/components/register-table/index.ts} +0 -0
- /package/{lib/core/form-group-wrapper/index.d.ts → src/lib/core/form-group-wrapper/index.ts} +0 -0
- /package/{lib/core/index.d.ts → src/lib/core/index.ts} +0 -0
- /package/{lib/core/input-control/index.d.ts → src/lib/core/input-control/index.ts} +0 -0
- /package/{lib/core/param/index.d.ts → src/lib/core/param/index.ts} +0 -0
- /package/{lib/core/register-base/index.d.ts → src/lib/core/register-base/index.ts} +0 -0
- /package/{lib/directives/index.d.ts → src/lib/directives/index.ts} +0 -0
- /package/{lib/directives/sticky/index.d.ts → src/lib/directives/sticky/index.ts} +0 -0
- /package/{lib/services/dialog/index.d.ts → src/lib/services/dialog/index.ts} +0 -0
- /package/{lib/services/index.d.ts → src/lib/services/index.ts} +0 -0
- /package/{lib/store/index.d.ts → src/lib/store/index.ts} +0 -0
- /package/{lib/types/index.d.ts → src/lib/types/index.ts} +0 -0
- /package/{lib/utils/index.d.ts → src/lib/utils/index.ts} +0 -0
- /package/{public-api.d.ts → src/public-api.ts} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
@import 'fonts';
|
|
2
|
+
@import 'buttons';
|
|
3
|
+
@import '@taiga-ui/core/styles/taiga-ui-local.less';
|
|
4
|
+
|
|
5
|
+
.gray {
|
|
6
|
+
color: var(--gray-icon);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.column-settings {
|
|
10
|
+
&__main-button {
|
|
11
|
+
.top-icon-button();
|
|
12
|
+
|
|
13
|
+
&:disabled {
|
|
14
|
+
.top-icon-button--disabled;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__icon {
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__popup {
|
|
23
|
+
top: var(--header-height);
|
|
24
|
+
width: 302px;
|
|
25
|
+
border-radius: 2px 2px 0 0;
|
|
26
|
+
box-shadow: -1px 0 12px rgba(71, 83, 38, 23%);
|
|
27
|
+
|
|
28
|
+
.header {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: row;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
align-items: center;
|
|
33
|
+
padding: 0 0 0 16px;
|
|
34
|
+
gap: 8px;
|
|
35
|
+
border-radius: 2px 2px 0 0;
|
|
36
|
+
border-bottom: 1px solid var(--stroke1);
|
|
37
|
+
background: var(--table-header);
|
|
38
|
+
box-shadow: unset;
|
|
39
|
+
|
|
40
|
+
&__title {
|
|
41
|
+
.static-title-h4;
|
|
42
|
+
|
|
43
|
+
color: var(--main-black);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__buttons {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 4px;
|
|
50
|
+
|
|
51
|
+
.reset-button {
|
|
52
|
+
color: var(--gray-icon);
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
color: var(--main-black);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
sproc-divider {
|
|
60
|
+
height: 24px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.close-button {
|
|
64
|
+
color: var(--brand-danger-active);
|
|
65
|
+
|
|
66
|
+
&:hover {
|
|
67
|
+
color: var(--brand-danger-hovered);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.column-container {
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
// padding-bottom задается напрямую через переменную ts
|
|
77
|
+
padding-top: 8px;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
|
|
80
|
+
.subtitle {
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
color: var(--main-black);
|
|
84
|
+
|
|
85
|
+
.main-subtitle;
|
|
86
|
+
|
|
87
|
+
&--flex-grow-1 {
|
|
88
|
+
flex-grow: 1;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.show-all {
|
|
93
|
+
color: var(--text-secondary);
|
|
94
|
+
|
|
95
|
+
.main-body-text-12px;
|
|
96
|
+
|
|
97
|
+
&:hover {
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
color: var(--main-black);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.footer {
|
|
105
|
+
display: flex;
|
|
106
|
+
padding: 8px 16px;
|
|
107
|
+
align-items: center;
|
|
108
|
+
|
|
109
|
+
.save-button {
|
|
110
|
+
width: 100%;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.column-list {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
|
|
120
|
+
&__label-container {
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: row;
|
|
123
|
+
align-items: center;
|
|
124
|
+
padding: 0 8px 0 12px;
|
|
125
|
+
cursor: default;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
::ng-deep &.cdk-drop-list-dragging .column-item:not(.cdk-drag-placeholder) {
|
|
129
|
+
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
DestroyRef,
|
|
6
|
+
effect,
|
|
7
|
+
inject,
|
|
8
|
+
input,
|
|
9
|
+
OnInit,
|
|
10
|
+
signal,
|
|
11
|
+
TemplateRef,
|
|
12
|
+
untracked,
|
|
13
|
+
viewChild,
|
|
14
|
+
} from '@angular/core';
|
|
15
|
+
import { Router } from '@angular/router';
|
|
16
|
+
import { filter, map, skip } from 'rxjs';
|
|
17
|
+
import { TuiButton, TuiIcon, TuiPopup, TuiScrollbar } from '@taiga-ui/core';
|
|
18
|
+
import { TuiDrawer } from '@taiga-ui/kit';
|
|
19
|
+
import {
|
|
20
|
+
CdkDragDrop,
|
|
21
|
+
CdkDropList,
|
|
22
|
+
CdkDropListGroup,
|
|
23
|
+
moveItemInArray,
|
|
24
|
+
transferArrayItem,
|
|
25
|
+
} from '@angular/cdk/drag-drop';
|
|
26
|
+
import {
|
|
27
|
+
outputFromObservable,
|
|
28
|
+
takeUntilDestroyed,
|
|
29
|
+
toObservable,
|
|
30
|
+
toSignal,
|
|
31
|
+
} from '@angular/core/rxjs-interop';
|
|
32
|
+
import {
|
|
33
|
+
EColumnStatus,
|
|
34
|
+
IColumnSettings,
|
|
35
|
+
IColumnSettingsChanges,
|
|
36
|
+
ITableColumnSettings,
|
|
37
|
+
} from './types/column-settings.types';
|
|
38
|
+
import { WaResizeObserver } from '@ng-web-apis/resize-observer';
|
|
39
|
+
import { ColumnSettingsTemplateComponent } from './components/column-settings-template/column-settings-template.component';
|
|
40
|
+
import { ICON_CANCEL_CLOSE, ICON_ERASER, ICON_SETTINGS } from './consts/column-settings.consts';
|
|
41
|
+
import { DialogService, ResizeWindowObserverService } from '../../services';
|
|
42
|
+
import { getLastSegmentOfPathName, isNonNull } from '../../utils';
|
|
43
|
+
import { SETTINGS_TYPE, USER_PROFILE_LOADER, USER_SETTINGS_LOADER } from '../../consts';
|
|
44
|
+
import { ResetSettingsFormComponent } from '../reset-settings-form/reset-settings-form.component';
|
|
45
|
+
import { DividerComponent } from '../divider/divider.component';
|
|
46
|
+
import { ITpUserSettings } from '../../types';
|
|
47
|
+
|
|
48
|
+
@Component({
|
|
49
|
+
selector: 'sproc-column-settings',
|
|
50
|
+
standalone: true,
|
|
51
|
+
templateUrl: './column-settings.component.html',
|
|
52
|
+
styleUrls: ['./column-settings.component.less'],
|
|
53
|
+
imports: [
|
|
54
|
+
TuiButton,
|
|
55
|
+
TuiIcon,
|
|
56
|
+
TuiDrawer,
|
|
57
|
+
TuiPopup,
|
|
58
|
+
DividerComponent,
|
|
59
|
+
ResetSettingsFormComponent,
|
|
60
|
+
CdkDropList,
|
|
61
|
+
CdkDropListGroup,
|
|
62
|
+
TuiScrollbar,
|
|
63
|
+
WaResizeObserver,
|
|
64
|
+
ColumnSettingsTemplateComponent,
|
|
65
|
+
],
|
|
66
|
+
providers: [ResizeWindowObserverService],
|
|
67
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
68
|
+
})
|
|
69
|
+
export class ColumnSettingsComponent implements OnInit {
|
|
70
|
+
public resetColumnSettingsRef = viewChild('resetSettings', { read: TemplateRef<unknown> });
|
|
71
|
+
public resetColumnSettingsFooter = viewChild('resetSettingsFooter', {
|
|
72
|
+
read: TemplateRef<unknown>,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
public defaultSettings = input.required<ITableColumnSettings>();
|
|
76
|
+
/** Высота всего компонента настроек */
|
|
77
|
+
public height = input<number | undefined>();
|
|
78
|
+
public disabled = input(false);
|
|
79
|
+
/** показ заголовка листа фикс. слева колонок */
|
|
80
|
+
public showLeftListHeader = input(true);
|
|
81
|
+
/** показ заголовка листа фикс. справа колонок */
|
|
82
|
+
public showRightListHeader = input(true);
|
|
83
|
+
/** заголовок листа с колонками (нефиксированные) */
|
|
84
|
+
public columnsListHeader = input('Колонки');
|
|
85
|
+
/** показ фикс. справа колонок */
|
|
86
|
+
public showFixedRightList = input(false);
|
|
87
|
+
/** функция предикат - возможность добавления элемента в лист фикс. слева колонок */
|
|
88
|
+
public fixedLeftListEnterPredicate = input<() => boolean>(() => true);
|
|
89
|
+
/** функция предикат - возможность добавления элемента в лист колонок (нефиксированные) */
|
|
90
|
+
public columnsListEnterPredicate = input<() => boolean>(() => true);
|
|
91
|
+
/** функция предикат - возможность добавления элемента в лист фикс. справа колонок */
|
|
92
|
+
public fixedRightListEnterPredicate = input<() => boolean>(() => true);
|
|
93
|
+
|
|
94
|
+
protected readonly openSettings = signal(false);
|
|
95
|
+
protected readonly inputSettings = signal<ITableColumnSettings | null>(null);
|
|
96
|
+
protected readonly fixedLeftColumns = computed(() => this.inputSettings()?.stickyLeft ?? []);
|
|
97
|
+
protected readonly columns = computed(() => this.inputSettings()?.columns ?? []);
|
|
98
|
+
protected readonly fixedRightColumns = computed(() => this.inputSettings()?.stickyRight ?? []);
|
|
99
|
+
|
|
100
|
+
public columnsChanges = outputFromObservable<IColumnSettingsChanges>(
|
|
101
|
+
toObservable(this.inputSettings).pipe(
|
|
102
|
+
skip(1),
|
|
103
|
+
map((settings) => ({ settings }))
|
|
104
|
+
)
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
protected readonly settingsStore = inject(USER_SETTINGS_LOADER);
|
|
108
|
+
|
|
109
|
+
private readonly _dr = inject(DestroyRef);
|
|
110
|
+
private readonly _router = inject(Router);
|
|
111
|
+
private readonly _userProfileService = inject(USER_PROFILE_LOADER);
|
|
112
|
+
private readonly _dialogService = inject(DialogService);
|
|
113
|
+
private readonly _resizeWindowObserver = inject(ResizeWindowObserverService);
|
|
114
|
+
|
|
115
|
+
protected readonly iconSettings = ICON_SETTINGS;
|
|
116
|
+
protected readonly iconEraser = ICON_ERASER;
|
|
117
|
+
protected readonly iconCancelClose = ICON_CANCEL_CLOSE;
|
|
118
|
+
|
|
119
|
+
protected readonly columnSettingsHeaderHeightPx = 40;
|
|
120
|
+
protected readonly columnSettingsSubtitleHeightPx = 32;
|
|
121
|
+
protected readonly scrollBoxFixedColumnsHeightPx = signal(0);
|
|
122
|
+
protected readonly scrollBoxRightFixedColumnsHeightPx = signal(0);
|
|
123
|
+
protected readonly scrollBoxFixedColumnsMaxHeightPx = 287;
|
|
124
|
+
protected readonly scrollBoxColumnsMaxHeightPx = signal(0);
|
|
125
|
+
protected readonly columnSettingsFooterHeightPx = 48;
|
|
126
|
+
protected readonly columnListHeightPx = toSignal(
|
|
127
|
+
this._resizeWindowObserver.innerHeight$.pipe(
|
|
128
|
+
skip(1),
|
|
129
|
+
map((innerHeight) => this._calcColumnListHeightPx(innerHeight))
|
|
130
|
+
),
|
|
131
|
+
{
|
|
132
|
+
initialValue: this._calcColumnListHeightPx(this._resizeWindowObserver.innerHeight()),
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
protected readonly columnListBottomPaddingPx = 8;
|
|
136
|
+
|
|
137
|
+
private readonly _idUser = this._userProfileService.getUserProfile().id;
|
|
138
|
+
private readonly _moduleName = getLastSegmentOfPathName(this._router.url);
|
|
139
|
+
|
|
140
|
+
private _columnsSettings: ITpUserSettings | undefined;
|
|
141
|
+
|
|
142
|
+
constructor() {
|
|
143
|
+
this.setDefaultSettings();
|
|
144
|
+
this._effectOnSetScrollBoxColumnsMaxHeight();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
public setDefaultSettings(): void {
|
|
148
|
+
effect(() => {
|
|
149
|
+
const defaultSettings = this.defaultSettings();
|
|
150
|
+
const clonedSettings = JSON.parse(JSON.stringify(defaultSettings));
|
|
151
|
+
|
|
152
|
+
untracked(() => {
|
|
153
|
+
this.inputSettings.set(clonedSettings);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
private _effectOnSetScrollBoxColumnsMaxHeight(): void {
|
|
159
|
+
effect(() => {
|
|
160
|
+
const parentHeightPx = this.columnListHeightPx();
|
|
161
|
+
const fixedHeightPx = this.scrollBoxFixedColumnsHeightPx();
|
|
162
|
+
const rightFixedHeightPx = this.scrollBoxRightFixedColumnsHeightPx();
|
|
163
|
+
const sumFixedHeightPx = fixedHeightPx + rightFixedHeightPx;
|
|
164
|
+
|
|
165
|
+
untracked(() => {
|
|
166
|
+
const newHeightPx = this._calcScrollBoxColumnsMaxHeightPx(parentHeightPx, sumFixedHeightPx);
|
|
167
|
+
this.scrollBoxColumnsMaxHeightPx.set(newHeightPx);
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
public ngOnInit(): void {
|
|
173
|
+
this.subscribeOnSettings();
|
|
174
|
+
this.fetchSettings(this._idUser, this._moduleName);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
private fetchSettings(userId: string, moduleName: string): void {
|
|
178
|
+
this.settingsStore.fetchUserSettingsByUserId({
|
|
179
|
+
userId,
|
|
180
|
+
settingsType: SETTINGS_TYPE.COLUMNS,
|
|
181
|
+
moduleName,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
private subscribeOnSettings(): void {
|
|
186
|
+
this.settingsStore.settings$
|
|
187
|
+
.pipe(
|
|
188
|
+
filter((settings) => settings.length > 0),
|
|
189
|
+
map(([settings]) => settings),
|
|
190
|
+
filter((settings) => isNonNull(settings)),
|
|
191
|
+
takeUntilDestroyed(this._dr)
|
|
192
|
+
)
|
|
193
|
+
.subscribe((settings) => {
|
|
194
|
+
this._columnsSettings = settings;
|
|
195
|
+
const { tableFields } = settings.settings;
|
|
196
|
+
|
|
197
|
+
if (tableFields) {
|
|
198
|
+
this.inputSettings.set(tableFields);
|
|
199
|
+
this.close();
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
protected deleteSettings(): void {
|
|
205
|
+
const clonedSettings = JSON.parse(JSON.stringify(this.defaultSettings()));
|
|
206
|
+
this.inputSettings.set(clonedSettings);
|
|
207
|
+
|
|
208
|
+
if (this._columnsSettings) {
|
|
209
|
+
this.settingsStore.deleteUserSettingsById({
|
|
210
|
+
id: this._columnsSettings?.id,
|
|
211
|
+
updateSettings: true,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
this.close();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
protected saveSettings(settings: ITableColumnSettings): void {
|
|
219
|
+
this.settingsStore.upsertUserSettingsByUserId({
|
|
220
|
+
settings: {
|
|
221
|
+
id: this._columnsSettings?.id,
|
|
222
|
+
module_name: this._moduleName,
|
|
223
|
+
settings: {
|
|
224
|
+
...this._columnsSettings?.settings,
|
|
225
|
+
tableFields: settings,
|
|
226
|
+
},
|
|
227
|
+
settings_type: SETTINGS_TYPE.COLUMNS,
|
|
228
|
+
},
|
|
229
|
+
updateSettings: true,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
protected saveTableSettings(): void {
|
|
234
|
+
this.saveSettings({
|
|
235
|
+
stickyLeft: this.fixedLeftColumns(),
|
|
236
|
+
columns: this.columns(),
|
|
237
|
+
stickyRight: this.fixedRightColumns(),
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
protected openResetDialog(): void {
|
|
242
|
+
this._dialogService
|
|
243
|
+
.openModal(this.resetColumnSettingsRef(), {
|
|
244
|
+
closeable: true,
|
|
245
|
+
width: 466,
|
|
246
|
+
footer: this.resetColumnSettingsFooter(),
|
|
247
|
+
dismissible: true,
|
|
248
|
+
})
|
|
249
|
+
.subscribe();
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
protected toggle(): void {
|
|
253
|
+
this.openSettings.update((isOpen) => !isOpen);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
protected close(): void {
|
|
257
|
+
this.openSettings.set(false);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
protected dropIntoFixedLeft(event: CdkDragDrop<IColumnSettings[]>): void {
|
|
261
|
+
const droppedElement = event.previousContainer.data[event.previousIndex];
|
|
262
|
+
this._setStatusRecursive(droppedElement, EColumnStatus.STICKY);
|
|
263
|
+
this._moveDroppedItem(event);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
protected dropIntoColumns(event: CdkDragDrop<IColumnSettings[]>): void {
|
|
267
|
+
const fromOther = event.previousContainer !== event.container;
|
|
268
|
+
|
|
269
|
+
if (fromOther) {
|
|
270
|
+
const droppedElement = event.previousContainer.data[event.previousIndex];
|
|
271
|
+
this._setStatusRecursive(droppedElement, EColumnStatus.DEFAULT);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
this._moveDroppedItem(event);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
private _moveDroppedItem(event: CdkDragDrop<IColumnSettings[]>): void {
|
|
278
|
+
if (event.previousContainer === event.container) {
|
|
279
|
+
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
280
|
+
} else {
|
|
281
|
+
transferArrayItem(
|
|
282
|
+
event.previousContainer.data,
|
|
283
|
+
event.container.data,
|
|
284
|
+
event.previousIndex,
|
|
285
|
+
event.currentIndex
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
protected toggleVisibility(col: IColumnSettings): void {
|
|
291
|
+
const isHidden = col.status === EColumnStatus.HIDDEN;
|
|
292
|
+
col.status = isHidden ? EColumnStatus.DEFAULT : EColumnStatus.HIDDEN;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
protected showAllColumns(): void {
|
|
296
|
+
const settings = this.inputSettings();
|
|
297
|
+
|
|
298
|
+
if (!settings) {
|
|
299
|
+
throw new Error('Настройки таблицы не инициализированы');
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
this._setColumnsStatusRecursive(settings.columns, EColumnStatus.DEFAULT);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
protected isHiddenColumn(column: IColumnSettings): boolean {
|
|
306
|
+
return column.status === EColumnStatus.HIDDEN;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
protected onFixedScrollbarResize([fixedScrollbar]: readonly ResizeObserverEntry[]): void {
|
|
310
|
+
this.scrollBoxFixedColumnsHeightPx.set(fixedScrollbar.contentRect.height);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
protected onRightFixedScrollbarResize([fixedScrollbar]: readonly ResizeObserverEntry[]): void {
|
|
314
|
+
this.scrollBoxRightFixedColumnsHeightPx.set(fixedScrollbar.contentRect.height);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
private _calcColumnListHeightPx(windowInnerHeight: number): number {
|
|
318
|
+
const mainHeaderPx = 52;
|
|
319
|
+
const columnSettingsHeaderFooterSumHeightPx =
|
|
320
|
+
this.columnSettingsHeaderHeightPx + this.columnSettingsFooterHeightPx;
|
|
321
|
+
|
|
322
|
+
return windowInnerHeight - mainHeaderPx - columnSettingsHeaderFooterSumHeightPx;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
private _calcScrollBoxColumnsMaxHeightPx(
|
|
326
|
+
parentHeightPx: number,
|
|
327
|
+
fixedScrollbarHeightPx: number
|
|
328
|
+
): number {
|
|
329
|
+
const twoSubtitleHeightPx = 2 * this.columnSettingsSubtitleHeightPx;
|
|
330
|
+
const bottomPaddingPx = this.columnListBottomPaddingPx;
|
|
331
|
+
|
|
332
|
+
return parentHeightPx - twoSubtitleHeightPx - fixedScrollbarHeightPx - bottomPaddingPx;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
private _setStatusRecursive(column: IColumnSettings, status: EColumnStatus): void {
|
|
336
|
+
column.status = status;
|
|
337
|
+
|
|
338
|
+
if (column.children) {
|
|
339
|
+
this._setColumnsStatusRecursive(column.children, status);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
private _setColumnsStatusRecursive(columns: IColumnSettings[], status: EColumnStatus): void {
|
|
344
|
+
for (const [index, col] of columns.entries()) {
|
|
345
|
+
columns[index] = { ...col, status };
|
|
346
|
+
|
|
347
|
+
if (col.children) {
|
|
348
|
+
this._setColumnsStatusRecursive(col.children, status);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@let col = column();
|
|
2
|
+
@let isHidden = isHiddenColumn(col);
|
|
3
|
+
@let currentEyeIcon = isHidden ? iconEyeClosed : iconEye;
|
|
4
|
+
@let childrenColumns = col.children ?? [];
|
|
5
|
+
|
|
6
|
+
<div
|
|
7
|
+
class="column-item"
|
|
8
|
+
[class.hidden]="isHidden"
|
|
9
|
+
cdkDrag
|
|
10
|
+
[cdkDragData]="col"
|
|
11
|
+
(cdkDragStarted)="collapseNested()"
|
|
12
|
+
>
|
|
13
|
+
<img [ngSrc]="iconEditorDots" [width]="16" [height]="32" alt="" />
|
|
14
|
+
@if (canExpand()) {
|
|
15
|
+
<img
|
|
16
|
+
class="expanded"
|
|
17
|
+
[ngSrc]="iconChevron"
|
|
18
|
+
[width]="16"
|
|
19
|
+
[height]="16"
|
|
20
|
+
[attr.expanded]="expanded()"
|
|
21
|
+
alt=""
|
|
22
|
+
(click)="toggleNested()"
|
|
23
|
+
/>
|
|
24
|
+
}
|
|
25
|
+
<span class="column-item__name">{{ col.name }}</span>
|
|
26
|
+
@if (status() === EColumnStatus.STICKY) {
|
|
27
|
+
<img
|
|
28
|
+
class="pointer"
|
|
29
|
+
[ngSrc]="iconLock"
|
|
30
|
+
[width]="16"
|
|
31
|
+
[height]="16"
|
|
32
|
+
tuiHint="Нельзя скрыть закрепленную колонку"
|
|
33
|
+
/>
|
|
34
|
+
} @else {
|
|
35
|
+
<img
|
|
36
|
+
class="eye-icon"
|
|
37
|
+
[ngSrc]="currentEyeIcon"
|
|
38
|
+
[width]="16"
|
|
39
|
+
[height]="16"
|
|
40
|
+
tuiHint="Показать/Скрыть колонку"
|
|
41
|
+
(click)="toggleVisibility(col)"
|
|
42
|
+
/>
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
<ng-template cdkDragPlaceholder>
|
|
46
|
+
<div class="custom-placeholder"></div>
|
|
47
|
+
</ng-template>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
@if (canExpand()) {
|
|
51
|
+
<tui-expand
|
|
52
|
+
class="nested-columns"
|
|
53
|
+
cdkDropList
|
|
54
|
+
[expanded]="expanded()"
|
|
55
|
+
[cdkDropListData]="childrenColumns"
|
|
56
|
+
(cdkDropListDropped)="dropIntoChildren($event)"
|
|
57
|
+
>
|
|
58
|
+
@for (childCol of childrenColumns; track childCol.id) {
|
|
59
|
+
<sproc-column-settings-template
|
|
60
|
+
[column]="childCol"
|
|
61
|
+
[parent]="col"
|
|
62
|
+
></sproc-column-settings-template>
|
|
63
|
+
}
|
|
64
|
+
</tui-expand>
|
|
65
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@import 'fonts';
|
|
2
|
+
|
|
3
|
+
.column-item {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
padding: 0 12px 0 8px;
|
|
7
|
+
gap: 8px;
|
|
8
|
+
height: 32px;
|
|
9
|
+
|
|
10
|
+
&__name {
|
|
11
|
+
flex-grow: 1;
|
|
12
|
+
color: var(--text-main);
|
|
13
|
+
|
|
14
|
+
.table-text-12px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pointer {
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.expanded {
|
|
22
|
+
.pointer;
|
|
23
|
+
|
|
24
|
+
transition: transform 0.2s linear;
|
|
25
|
+
|
|
26
|
+
&[expanded='true'] {
|
|
27
|
+
transform: rotate(90deg);
|
|
28
|
+
transform-origin: center center;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.eye-icon {
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
transition: opacity 0.2s ease-in-out;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.hidden {
|
|
39
|
+
.eye-icon {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
background: var(--brand-hovered);
|
|
46
|
+
cursor: ns-resize;
|
|
47
|
+
|
|
48
|
+
.eye-icon {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.nested-columns {
|
|
55
|
+
margin-left: 24px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.custom-placeholder {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
height: 32px;
|
|
62
|
+
padding: 0 8px;
|
|
63
|
+
border: 1px dashed #cccccc;
|
|
64
|
+
border-radius: 3px;
|
|
65
|
+
background-color: #fafafa;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
color: #888888;
|
|
68
|
+
font-style: italic;
|
|
69
|
+
user-select: none;
|
|
70
|
+
width: 100%;
|
|
71
|
+
margin: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.cdk-drag-preview {
|
|
75
|
+
.column-item;
|
|
76
|
+
|
|
77
|
+
box-shadow: -1px 0 12px rgba(71, 83, 38, 23%);
|
|
78
|
+
background: var(--main-white);
|
|
79
|
+
}
|