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,84 +0,0 @@
|
|
|
1
|
-
<ng-container [ngTemplateOutlet]="readmode ? readTemplate : editTemplate">
|
|
2
|
-
<ng-template #readTemplate>
|
|
3
|
-
<div class="container container--read" [attr.sproc-param-style]="paramStyle">
|
|
4
|
-
<ng-container *ngIf="label">
|
|
5
|
-
<ng-container [ngSwitch]="paramStyle">
|
|
6
|
-
<ng-template ngSwitchCase="filter">
|
|
7
|
-
<div class="label-wrapper">
|
|
8
|
-
<span class="label">{{ label }}</span>
|
|
9
|
-
<div class="dashed-row"></div>
|
|
10
|
-
</div>
|
|
11
|
-
</ng-template>
|
|
12
|
-
<ng-template ngSwitchDefault>
|
|
13
|
-
<span class="label">{{ label }}</span>
|
|
14
|
-
<div class="dashed-row"></div>
|
|
15
|
-
</ng-template>
|
|
16
|
-
</ng-container>
|
|
17
|
-
</ng-container>
|
|
18
|
-
<ng-container [ngTemplateOutlet]="value ? showedValueTemplate : emptyTemplate">
|
|
19
|
-
<ng-template #showedValueTemplate>
|
|
20
|
-
<ng-container [ngSwitch]="paramStyle">
|
|
21
|
-
<ng-template ngSwitchCase="filter">
|
|
22
|
-
<pre class="value">{{ showedValue }}</pre>
|
|
23
|
-
</ng-template>
|
|
24
|
-
<ng-template ngSwitchDefault>
|
|
25
|
-
<div class="value" [tuiHint]="showedValue">
|
|
26
|
-
<span>{{ showedValue }}</span>
|
|
27
|
-
</div>
|
|
28
|
-
</ng-template>
|
|
29
|
-
</ng-container>
|
|
30
|
-
</ng-template>
|
|
31
|
-
<ng-template #emptyTemplate>
|
|
32
|
-
<span class="value">-</span>
|
|
33
|
-
</ng-template>
|
|
34
|
-
</ng-container>
|
|
35
|
-
</div>
|
|
36
|
-
</ng-template>
|
|
37
|
-
<ng-template #editTemplate>
|
|
38
|
-
<div class="container container--edit" [attr.sproc-param-style]="paramStyle">
|
|
39
|
-
<div *ngIf="label" class="label-wrapper" [class.applied]="applied()">
|
|
40
|
-
<span class="label" [class.required]="required">
|
|
41
|
-
{{ label }}
|
|
42
|
-
</span>
|
|
43
|
-
<tui-icon
|
|
44
|
-
*ngIf="hint"
|
|
45
|
-
icon="assets/ngx-register-base/icons/circle-info-empty.svg"
|
|
46
|
-
[tuiHint]="hint"
|
|
47
|
-
class="hintIcon"
|
|
48
|
-
></tui-icon>
|
|
49
|
-
</div>
|
|
50
|
-
<tui-multi-select
|
|
51
|
-
[formControl]="control"
|
|
52
|
-
[tuiTextfieldLabelOutside]="true"
|
|
53
|
-
[tuiTextfieldCleaner]="true"
|
|
54
|
-
tuiAppearance="sproc-input-appearance"
|
|
55
|
-
[valueContent]="valueContent"
|
|
56
|
-
tuiTextfieldSize="m"
|
|
57
|
-
[stringify]="stringify()"
|
|
58
|
-
[identityMatcher]="identityMatcher()"
|
|
59
|
-
(searchChange)="onSearch($event)"
|
|
60
|
-
[editable]="searchable"
|
|
61
|
-
>
|
|
62
|
-
<span class="placeholder">{{ placeholder() }}</span>
|
|
63
|
-
|
|
64
|
-
<tui-data-list-wrapper
|
|
65
|
-
*tuiDataList
|
|
66
|
-
tuiMultiSelectGroup
|
|
67
|
-
[items]="items"
|
|
68
|
-
[itemContent]="listItemTemplate ?? itemContent"
|
|
69
|
-
></tui-data-list-wrapper>
|
|
70
|
-
</tui-multi-select>
|
|
71
|
-
|
|
72
|
-
<ng-template #itemContent let-data>
|
|
73
|
-
{{ data.name }}
|
|
74
|
-
</ng-template>
|
|
75
|
-
<ng-template #valueContent let-list>
|
|
76
|
-
@let isSingle = list.length === 1;
|
|
77
|
-
<span [class]="isSingle ? 'choosed choosed-one' : 'choosed choosed-many'">
|
|
78
|
-
{{ isSingle ? list[0].name : shortPickedLength() ? 'Выбрано: ' : null }}
|
|
79
|
-
{{ getListLength(list) }}
|
|
80
|
-
</span>
|
|
81
|
-
</ng-template>
|
|
82
|
-
</div>
|
|
83
|
-
</ng-template>
|
|
84
|
-
</ng-container>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
@import 'fonts';
|
|
2
|
-
@import 'common-param';
|
|
3
|
-
|
|
4
|
-
:host {
|
|
5
|
-
@customZIndex: 22;
|
|
6
|
-
|
|
7
|
-
.choosed {
|
|
8
|
-
display: flex;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
align-items: center;
|
|
11
|
-
position: absolute;
|
|
12
|
-
justify-content: space-between;
|
|
13
|
-
z-index: @customZIndex;
|
|
14
|
-
border-radius: 2px;
|
|
15
|
-
height: 16px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.choosed-many {
|
|
19
|
-
color: var(--main-black);
|
|
20
|
-
background: var(--input-hover-background-color);
|
|
21
|
-
padding-left: 8px;
|
|
22
|
-
width: 80px;
|
|
23
|
-
|
|
24
|
-
.table-text-12px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.choosed-one {
|
|
28
|
-
display: block;
|
|
29
|
-
min-width: 0;
|
|
30
|
-
text-overflow: ellipsis;
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
white-space: nowrap;
|
|
33
|
-
width: 200px;
|
|
34
|
-
flex-shrink: 0;
|
|
35
|
-
|
|
36
|
-
.input-text-14px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.container {
|
|
40
|
-
&--read {
|
|
41
|
-
.read-style-card;
|
|
42
|
-
.read-style-filter;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&--edit {
|
|
46
|
-
.edit-style-card;
|
|
47
|
-
.edit-style-filter;
|
|
48
|
-
|
|
49
|
-
&[sproc-param-style='card'] {
|
|
50
|
-
.label-wrapper {
|
|
51
|
-
.default-label-wrapper;
|
|
52
|
-
|
|
53
|
-
width: 100%;
|
|
54
|
-
display: flex;
|
|
55
|
-
justify-content: space-between;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.placeholder {
|
|
59
|
-
.input-text-14px;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&[sproc-param-style='filter'] {
|
|
64
|
-
.placeholder {
|
|
65
|
-
margin-left: 8px;
|
|
66
|
-
|
|
67
|
-
.input-text-12px;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.selected-item-wrapper {
|
|
72
|
-
display: flex;
|
|
73
|
-
flex-direction: row;
|
|
74
|
-
padding: 4px;
|
|
75
|
-
margin: 0 2px;
|
|
76
|
-
min-width: 4px;
|
|
77
|
-
max-width: 100%;
|
|
78
|
-
align-items: center;
|
|
79
|
-
justify-content: space-between;
|
|
80
|
-
border-radius: 2px;
|
|
81
|
-
background: var(--chip-background);
|
|
82
|
-
color: var(--main-black);
|
|
83
|
-
cursor: pointer;
|
|
84
|
-
|
|
85
|
-
.input-text-14px;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.hintIcon {
|
|
91
|
-
width: 16px;
|
|
92
|
-
height: 16px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
::ng-deep {
|
|
96
|
-
.choosed {
|
|
97
|
-
display: none;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.empty {
|
|
101
|
-
position: relative;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.t-value-content {
|
|
105
|
-
padding-left: 16px;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
@@ -1,448 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DOCUMENT,
|
|
3
|
-
NgIf,
|
|
4
|
-
NgSwitch,
|
|
5
|
-
NgSwitchCase,
|
|
6
|
-
NgSwitchDefault,
|
|
7
|
-
NgTemplateOutlet,
|
|
8
|
-
} from '@angular/common';
|
|
9
|
-
import {
|
|
10
|
-
ChangeDetectionStrategy,
|
|
11
|
-
Component,
|
|
12
|
-
forwardRef,
|
|
13
|
-
Inject,
|
|
14
|
-
Injector,
|
|
15
|
-
input,
|
|
16
|
-
OnDestroy,
|
|
17
|
-
output,
|
|
18
|
-
signal,
|
|
19
|
-
} from '@angular/core';
|
|
20
|
-
import { PrizmMultiSelectSearchMatcher } from '@prizm-ui/components';
|
|
21
|
-
import {
|
|
22
|
-
BehaviorSubject,
|
|
23
|
-
combineLatest,
|
|
24
|
-
debounceTime,
|
|
25
|
-
delay,
|
|
26
|
-
distinctUntilChanged,
|
|
27
|
-
filter,
|
|
28
|
-
map,
|
|
29
|
-
of,
|
|
30
|
-
skip,
|
|
31
|
-
Subscription,
|
|
32
|
-
switchMap,
|
|
33
|
-
tap,
|
|
34
|
-
} from 'rxjs';
|
|
35
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
36
|
-
import { TUI_ITEMS_HANDLERS, TuiAppearance, TuiHint, TuiIcon, TuiTextfield } from '@taiga-ui/core';
|
|
37
|
-
import { TuiMultiSelectModule, TuiTextfieldControllerModule } from '@taiga-ui/legacy';
|
|
38
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
39
|
-
import { TuiContext, TuiIdentityMatcher, TuiStringHandler } from '@taiga-ui/cdk';
|
|
40
|
-
import { FastQueryStore } from '../../../store/fast-query-store.service';
|
|
41
|
-
import { IFilterSelectValue, MetaQuery } from '../../../types/params.types';
|
|
42
|
-
import { ParamSelectBase } from '../../../core/param/param-select-base';
|
|
43
|
-
import { SELECT_ALL_ID, selectAllItem } from '../../../utils/select-all-utils';
|
|
44
|
-
import { distinctUntilChangedJSONs } from '../../../utils';
|
|
45
|
-
import { PARAM_SEARCH_INPUT_DEBOUNCE_TIME_MLS } from '../../../consts/params.consts';
|
|
46
|
-
|
|
47
|
-
@Component({
|
|
48
|
-
selector: 'sproc-param-multi-select',
|
|
49
|
-
templateUrl: './param-multi-select.component.html',
|
|
50
|
-
styleUrls: ['./param-multi-select.component.less'],
|
|
51
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
52
|
-
providers: [
|
|
53
|
-
FastQueryStore,
|
|
54
|
-
{
|
|
55
|
-
provide: TUI_ITEMS_HANDLERS,
|
|
56
|
-
deps: [forwardRef(() => ParamMultiSelectComponent)],
|
|
57
|
-
useFactory: (component: ParamMultiSelectComponent) => ({
|
|
58
|
-
stringify: component.stringify,
|
|
59
|
-
identityMatcher: component.identityMatcher,
|
|
60
|
-
disabledItemHandler: signal((_: IFilterSelectValue) => false),
|
|
61
|
-
}),
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
standalone: true,
|
|
65
|
-
imports: [
|
|
66
|
-
NgTemplateOutlet,
|
|
67
|
-
NgIf,
|
|
68
|
-
NgSwitch,
|
|
69
|
-
NgSwitchCase,
|
|
70
|
-
NgSwitchDefault,
|
|
71
|
-
TuiIcon,
|
|
72
|
-
TuiHint,
|
|
73
|
-
TuiMultiSelectModule,
|
|
74
|
-
ReactiveFormsModule,
|
|
75
|
-
TuiTextfield,
|
|
76
|
-
TuiAppearance,
|
|
77
|
-
TuiTextfieldControllerModule,
|
|
78
|
-
],
|
|
79
|
-
})
|
|
80
|
-
export class ParamMultiSelectComponent
|
|
81
|
-
extends ParamSelectBase<IFilterSelectValue[], IFilterSelectValue[]>
|
|
82
|
-
implements OnDestroy
|
|
83
|
-
{
|
|
84
|
-
override readonly placeholder = input('Выберите значения');
|
|
85
|
-
readonly itemSelectAll = input(false);
|
|
86
|
-
readonly searchMatcher = input<PrizmMultiSelectSearchMatcher<IFilterSelectValue>>(
|
|
87
|
-
(search: string, item: IFilterSelectValue) =>
|
|
88
|
-
item.name?.toLowerCase().includes(search.toLowerCase())
|
|
89
|
-
);
|
|
90
|
-
readonly shortPickedLength = input(true);
|
|
91
|
-
|
|
92
|
-
readonly stringify = input<TuiStringHandler<IFilterSelectValue | TuiContext<IFilterSelectValue>>>(
|
|
93
|
-
(item) => ('name' in item ? item.name : item.$implicit.name)
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
readonly identityMatcher = input<TuiIdentityMatcher<IFilterSelectValue>>(
|
|
97
|
-
(a, b) => a?.id === b?.id
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
override readonly buildShowedValue = input(
|
|
101
|
-
(values: IFilterSelectValue[]): string => values?.map((v) => v.name).join(',\n') ?? '-'
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
readonly onSelect = output<IFilterSelectValue[]>();
|
|
105
|
-
|
|
106
|
-
protected readonly selectAllItem: IFilterSelectValue = selectAllItem;
|
|
107
|
-
|
|
108
|
-
protected onCancelButtonSubscription!: Subscription;
|
|
109
|
-
|
|
110
|
-
protected searchValue = '';
|
|
111
|
-
|
|
112
|
-
protected readonly onSearch$: BehaviorSubject<string> = new BehaviorSubject<string>('');
|
|
113
|
-
private onSearchSubscription: Subscription | null = null;
|
|
114
|
-
private cachedString = '';
|
|
115
|
-
|
|
116
|
-
private onClearButtonSubscription: Subscription | null = null;
|
|
117
|
-
public choosedHint = '';
|
|
118
|
-
|
|
119
|
-
constructor(
|
|
120
|
-
injector: Injector,
|
|
121
|
-
@Inject(DOCUMENT) private document: Document
|
|
122
|
-
) {
|
|
123
|
-
super(injector);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
public override onInit(): void {
|
|
127
|
-
this._subscribeOnSearch();
|
|
128
|
-
|
|
129
|
-
if (this.itemSelectAll()) {
|
|
130
|
-
this.items.unshift(this.selectAllItem);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
private _subscribeOnSearch() {
|
|
135
|
-
this.onSearch$
|
|
136
|
-
.pipe(
|
|
137
|
-
debounceTime(PARAM_SEARCH_INPUT_DEBOUNCE_TIME_MLS),
|
|
138
|
-
distinctUntilChanged(),
|
|
139
|
-
takeUntilDestroyed(this.dr)
|
|
140
|
-
)
|
|
141
|
-
.subscribe((value) => {
|
|
142
|
-
this.fetchItems(value);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
public override afterViewInit(): void {
|
|
147
|
-
if (this.meta?.table && this.searchable) {
|
|
148
|
-
this._subscribeOnClearButton();
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
if (this.meta) {
|
|
152
|
-
this._observeFetchItems();
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
this._subscribeOnMetaChanges();
|
|
156
|
-
this._subscribeOnValueControl();
|
|
157
|
-
|
|
158
|
-
if (this.control?.value?.some((elem: any) => elem.id === SELECT_ALL_ID)) {
|
|
159
|
-
if (this.items.length > 0) {
|
|
160
|
-
this.control.setValue(this.items);
|
|
161
|
-
}
|
|
162
|
-
if (this.items.length === 1) {
|
|
163
|
-
this.fetchItems();
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
private _observeFetchItems(): void {
|
|
169
|
-
this.control.valueChanges
|
|
170
|
-
.pipe(
|
|
171
|
-
filter(Boolean),
|
|
172
|
-
filter((values) => {
|
|
173
|
-
const someValueNotHaveName = values.some((value) => !value.name);
|
|
174
|
-
const everyValuesExistsInItems = values.every(({ id }) =>
|
|
175
|
-
this.items.some((item) => item.id === id)
|
|
176
|
-
);
|
|
177
|
-
|
|
178
|
-
return someValueNotHaveName && everyValuesExistsInItems;
|
|
179
|
-
}),
|
|
180
|
-
takeUntilDestroyed(this.dr)
|
|
181
|
-
)
|
|
182
|
-
.subscribe((values) => {
|
|
183
|
-
const ids = new Set(values.map((value) => value.id));
|
|
184
|
-
const filledValues = this.items.filter(({ id }) => ids.has(id));
|
|
185
|
-
|
|
186
|
-
this.control.setValue(filledValues, { emitEvent: false });
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
combineLatest([
|
|
190
|
-
this.control.valueChanges.pipe(
|
|
191
|
-
map((values) => values?.map((value) => value.id) ?? []),
|
|
192
|
-
distinctUntilChangedJSONs(),
|
|
193
|
-
filter((ids) => ids.some((id) => !this.items.some((item) => item.id === id)))
|
|
194
|
-
),
|
|
195
|
-
this.meta$,
|
|
196
|
-
])
|
|
197
|
-
.pipe(takeUntilDestroyed(this.dr))
|
|
198
|
-
.subscribe(() => {
|
|
199
|
-
this.fetchItems();
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
private _subscribeOnMetaChanges(): void {
|
|
204
|
-
this.meta$.pipe(takeUntilDestroyed(this.dr)).subscribe(() => {
|
|
205
|
-
this.fetchItems();
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
private _subscribeOnValueControl(): void {
|
|
210
|
-
let controlValue = this.control.value;
|
|
211
|
-
|
|
212
|
-
this.control?.valueChanges
|
|
213
|
-
.pipe(
|
|
214
|
-
distinctUntilChangedJSONs(),
|
|
215
|
-
map((values) => values ?? []),
|
|
216
|
-
takeUntilDestroyed(this.dr)
|
|
217
|
-
)
|
|
218
|
-
.subscribe((values) => {
|
|
219
|
-
if (this.itemSelectAll()) {
|
|
220
|
-
if (
|
|
221
|
-
this.items.length - values.length === 1 &&
|
|
222
|
-
values.filter((elem) => elem.id === SELECT_ALL_ID).length === 0 &&
|
|
223
|
-
controlValue.includes(this.selectAllItem)
|
|
224
|
-
) {
|
|
225
|
-
this.control.setValue([], { emitEvent: false });
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
if (values?.some((elem) => elem.id === SELECT_ALL_ID)) {
|
|
229
|
-
this.control.setValue(this.items, { emitEvent: false });
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
if (
|
|
233
|
-
this.items.length !== values.length &&
|
|
234
|
-
controlValue?.includes(this.selectAllItem) &&
|
|
235
|
-
values?.some((elem) => elem.id === SELECT_ALL_ID)
|
|
236
|
-
) {
|
|
237
|
-
this.control.setValue(
|
|
238
|
-
values.filter((elem) => elem !== this.selectAllItem),
|
|
239
|
-
{ emitEvent: false }
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
controlValue = this.control.value;
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
public ngOnDestroy(): void {
|
|
248
|
-
this.onSearch$.complete();
|
|
249
|
-
this.onSearchSubscription?.unsubscribe();
|
|
250
|
-
this.onCancelButtonSubscription?.unsubscribe();
|
|
251
|
-
this.onClearButtonSubscription?.unsubscribe();
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
protected fetchItems(searchValue?: string): void {
|
|
255
|
-
const { idField, valueField } = this.metaFields;
|
|
256
|
-
if (!this.meta?.table?.name || idField === null || valueField === null) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
const selectedItemIDs = this._getSelectedItemIDs(searchValue);
|
|
261
|
-
|
|
262
|
-
this.loading = true;
|
|
263
|
-
const where = this.buildWhere(searchValue);
|
|
264
|
-
const selectedItemIdsWhere = this._buildSelectedItemIdsWhere(where, selectedItemIDs, idField);
|
|
265
|
-
let fetchAll = false;
|
|
266
|
-
|
|
267
|
-
if (this.control.value?.some((elem: any) => elem.id === SELECT_ALL_ID)) {
|
|
268
|
-
fetchAll = true;
|
|
269
|
-
}
|
|
270
|
-
const qParams: MetaQuery = {
|
|
271
|
-
table: this.meta.table,
|
|
272
|
-
where,
|
|
273
|
-
order_by: this.meta.order_by,
|
|
274
|
-
offset: this.meta.offset,
|
|
275
|
-
distinct_on: this.meta.distinct_on,
|
|
276
|
-
subquery: this.meta.subquery,
|
|
277
|
-
};
|
|
278
|
-
if (!fetchAll) {
|
|
279
|
-
qParams.limit = this.meta.limit ?? this.limit;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
this.store
|
|
283
|
-
.getResults(qParams, true, selectedItemIdsWhere)
|
|
284
|
-
.pipe(
|
|
285
|
-
tap((data) => {
|
|
286
|
-
this._handleResults(data, idField, valueField, selectedItemIDs);
|
|
287
|
-
}),
|
|
288
|
-
tap(() => {
|
|
289
|
-
if (
|
|
290
|
-
this.itemSelectAll() &&
|
|
291
|
-
this.items.length > 0 &&
|
|
292
|
-
!this.items.includes(this.selectAllItem)
|
|
293
|
-
) {
|
|
294
|
-
this.items.unshift(this.selectAllItem);
|
|
295
|
-
}
|
|
296
|
-
if (fetchAll) {
|
|
297
|
-
this.control.setValue(this.items, { emitEvent: false });
|
|
298
|
-
}
|
|
299
|
-
this.loading = false;
|
|
300
|
-
this.cdr.markForCheck();
|
|
301
|
-
}),
|
|
302
|
-
takeUntilDestroyed(this.dr)
|
|
303
|
-
)
|
|
304
|
-
.subscribe(() => {
|
|
305
|
-
this.choosedHint =
|
|
306
|
-
this.control
|
|
307
|
-
.getRawValue()
|
|
308
|
-
?.map((elem: any) => elem.name)
|
|
309
|
-
.join(', ') ?? '';
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
private _subscribeOnClearButton(): void {
|
|
314
|
-
this.onClearButtonSubscription?.unsubscribe();
|
|
315
|
-
this.onClearButtonSubscription = this.onSearch$
|
|
316
|
-
.pipe(
|
|
317
|
-
skip(1),
|
|
318
|
-
switchMap((value) => {
|
|
319
|
-
if (value.length > 0 && this.cachedString.length === 0) {
|
|
320
|
-
const elements = this.document.querySelectorAll('.input-search');
|
|
321
|
-
const clearButtonClicks$ = [];
|
|
322
|
-
for (let i = 0; i < elements.length; i++) {
|
|
323
|
-
const founded = elements.item(i);
|
|
324
|
-
const item = founded?.parentElement;
|
|
325
|
-
if (founded && item && item.className === 'prizm-input-form-body') {
|
|
326
|
-
clearButtonClicks$.push(
|
|
327
|
-
of(null).pipe(
|
|
328
|
-
delay(300),
|
|
329
|
-
switchMap(() => {
|
|
330
|
-
const clearButton = item.parentElement?.getElementsByClassName(
|
|
331
|
-
'prizm-input-label-clear-btn prizm-input-button-default clear-icon interactive ng-star-inserted'
|
|
332
|
-
);
|
|
333
|
-
if (clearButton?.[0]) {
|
|
334
|
-
clearButton[0].addEventListener('click', () => {
|
|
335
|
-
this.onSearch$.next('');
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
return of(null);
|
|
339
|
-
})
|
|
340
|
-
)
|
|
341
|
-
);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
return clearButtonClicks$.length > 0 ? clearButtonClicks$[0] : of(null);
|
|
345
|
-
}
|
|
346
|
-
this.cachedString = value;
|
|
347
|
-
return of(null);
|
|
348
|
-
}),
|
|
349
|
-
takeUntilDestroyed(this.dr)
|
|
350
|
-
)
|
|
351
|
-
.subscribe();
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
private _getSelectedItemIDs(searchValue?: string): string[] | undefined {
|
|
355
|
-
if (!searchValue || searchValue === '') {
|
|
356
|
-
return this.value?.filter((elem) => elem.id !== SELECT_ALL_ID).map((val: any) => val.id);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
private _buildSelectedItemIdsWhere(
|
|
363
|
-
where: any,
|
|
364
|
-
selectedItemIDs: string[] | undefined,
|
|
365
|
-
idField: string
|
|
366
|
-
): object | undefined {
|
|
367
|
-
if (where && selectedItemIDs && selectedItemIDs.length > 0) {
|
|
368
|
-
return { _and: [{ [idField]: { _in: selectedItemIDs } }, where] };
|
|
369
|
-
}
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
private _handleResults(
|
|
374
|
-
data: any,
|
|
375
|
-
idField: string,
|
|
376
|
-
valueField: string,
|
|
377
|
-
selectedItemIDs: string[] | undefined
|
|
378
|
-
): void {
|
|
379
|
-
this.items = data.data.map((item: any) => ({
|
|
380
|
-
...item,
|
|
381
|
-
id: item[idField] ?? '',
|
|
382
|
-
name: this._getNameFromField(item, valueField),
|
|
383
|
-
}));
|
|
384
|
-
|
|
385
|
-
if (this.itemSelectAll() && this.items.length > 0) {
|
|
386
|
-
this.items.unshift(this.selectAllItem);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
this._updateControlValues(data, idField, valueField, selectedItemIDs);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
private _updateControlValues(
|
|
393
|
-
data: any,
|
|
394
|
-
idField: string,
|
|
395
|
-
valueField: string,
|
|
396
|
-
selectedItemIDs: string[] | undefined
|
|
397
|
-
): void {
|
|
398
|
-
const idsSelectedValues = new Set(this.value?.map((val: any) => val[idField]) ?? []);
|
|
399
|
-
const availableItems =
|
|
400
|
-
data.selectedIdsQuery
|
|
401
|
-
?.filter((item: any) => idsSelectedValues.has(item[idField]))
|
|
402
|
-
.map((item: any) => ({
|
|
403
|
-
...item,
|
|
404
|
-
id: item[idField] ?? '',
|
|
405
|
-
name: this._getNameFromField(item, valueField),
|
|
406
|
-
})) ?? [];
|
|
407
|
-
|
|
408
|
-
if (selectedItemIDs && selectedItemIDs.length > 0 && availableItems.length > 0) {
|
|
409
|
-
this.control?.setValue(availableItems, { emitEvent: !this.itemSelectAll });
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
const itemsThatDontExist = availableItems.filter(
|
|
413
|
-
(new_item: any) => !this.items?.some((value: any) => value.id === new_item.id)
|
|
414
|
-
);
|
|
415
|
-
|
|
416
|
-
this.items.push(...itemsThatDontExist);
|
|
417
|
-
this.itemsChange.emit(this.items);
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
private _getNameFromField(item: any, field: string): string {
|
|
421
|
-
if (field.includes('.')) {
|
|
422
|
-
return this._getNameFromDeepField(item, field);
|
|
423
|
-
}
|
|
424
|
-
return this.formatShowedValue(item, field);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
private _getNameFromDeepField(item: any, field: string): string {
|
|
428
|
-
const deepFields = field.split('.');
|
|
429
|
-
let tempObject = { ...item };
|
|
430
|
-
|
|
431
|
-
for (const deepField of deepFields) {
|
|
432
|
-
tempObject = tempObject[deepField];
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
return tempObject;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
protected onSearch(value: string | null): void {
|
|
439
|
-
if (this.searchable) {
|
|
440
|
-
this.onSearch$.next(value ?? '');
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
protected getListLength(list: IFilterSelectValue[]): string {
|
|
445
|
-
const length = list.some((item) => item?.id === SELECT_ALL_ID) ? list.length - 1 : list.length;
|
|
446
|
-
return length === 1 ? '' : String(length);
|
|
447
|
-
}
|
|
448
|
-
}
|