ngx-register-base 1.2.3 → 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
package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.less
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
@import 'fonts';
|
|
2
|
+
@import 'common-param';
|
|
3
|
+
|
|
4
|
+
:host {
|
|
5
|
+
.container {
|
|
6
|
+
&--read {
|
|
7
|
+
.read-style-card;
|
|
8
|
+
.read-style-filter;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&--edit {
|
|
12
|
+
.edit-style-card;
|
|
13
|
+
.edit-style-filter;
|
|
14
|
+
|
|
15
|
+
&[sproc-param-style='card'] {
|
|
16
|
+
padding: 0 2px;
|
|
17
|
+
|
|
18
|
+
.label-wrapper {
|
|
19
|
+
.default-label-wrapper;
|
|
20
|
+
|
|
21
|
+
width: 100%;
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
::ng-deep {
|
|
27
|
+
input {
|
|
28
|
+
.input-text-14px;
|
|
29
|
+
|
|
30
|
+
color: var(--text-contrast);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&[sproc-param-style='filter'] {
|
|
36
|
+
::ng-deep {
|
|
37
|
+
input {
|
|
38
|
+
.input-text-12px;
|
|
39
|
+
|
|
40
|
+
color: var(--text-contrast);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.selected-item-wrapper {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
padding: 4px;
|
|
49
|
+
margin: 0 2px;
|
|
50
|
+
min-width: 4px;
|
|
51
|
+
max-width: 100%;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
border-radius: 2px;
|
|
55
|
+
background: var(--chip-background);
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
line-height: 16px;
|
|
58
|
+
color: var(--main-black);
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.default-label {
|
|
64
|
+
.input-label;
|
|
65
|
+
|
|
66
|
+
color: var(--main-black);
|
|
67
|
+
|
|
68
|
+
&.required::after {
|
|
69
|
+
content: '*';
|
|
70
|
+
color: var(--brand-danger);
|
|
71
|
+
margin-left: 2px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.hintIcon {
|
|
77
|
+
width: 16px;
|
|
78
|
+
height: 16px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
::ng-deep {
|
|
82
|
+
.choosed {
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.empty {
|
|
87
|
+
position: relative;
|
|
88
|
+
|
|
89
|
+
.choosed {
|
|
90
|
+
display: flex;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
align-items: center;
|
|
93
|
+
position: absolute;
|
|
94
|
+
justify-content: space-between;
|
|
95
|
+
top: 7px;
|
|
96
|
+
left: 8px;
|
|
97
|
+
z-index: 2;
|
|
98
|
+
font-size: 12px;
|
|
99
|
+
font-family: Inter, sans-serif;
|
|
100
|
+
color: #000000;
|
|
101
|
+
padding: 6px;
|
|
102
|
+
border-radius: 2px;
|
|
103
|
+
width: 95px;
|
|
104
|
+
height: 18px;
|
|
105
|
+
background: var(--prizm-v3-status-none-secondary-default);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Component, effect, inject, Injector, input, signal } from '@angular/core';
|
|
2
|
+
import { TuiAppearance, TuiHint, TuiIcon, TuiTextfield } from '@taiga-ui/core';
|
|
3
|
+
import { TUI_TREE_LOADING, TuiChevron, TuiComboBox } from '@taiga-ui/kit';
|
|
4
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
6
|
+
import { TuiTextfieldControllerModule } from '@taiga-ui/legacy';
|
|
7
|
+
import { ITreeNode } from '../param-tree/types/param-tree.types';
|
|
8
|
+
import { ParamTreeComponent } from '../param-tree/param-tree.component';
|
|
9
|
+
import { ParamTreeService } from '../param-tree/services/param-tree.service';
|
|
10
|
+
import { TREE_LOADING_NODE } from '../param-tree/consts/param-tree.consts';
|
|
11
|
+
import { FastQueryStore } from '../../../store/fast-query-store.service';
|
|
12
|
+
import { ParamSelectBase } from '../../../core/param/param-select-base';
|
|
13
|
+
import { distinctUntilChangedJSONs } from '../../../utils';
|
|
14
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
15
|
+
|
|
16
|
+
export type InputTreeSelectSavedValue<T> = ITreeNode<T> & { [key: string]: any };
|
|
17
|
+
|
|
18
|
+
/** Компонент выбора единственного значения из иерархического списка */
|
|
19
|
+
@Component({
|
|
20
|
+
selector: 'sproc-param-tree-multi-select',
|
|
21
|
+
standalone: true,
|
|
22
|
+
imports: [
|
|
23
|
+
NgTemplateOutlet,
|
|
24
|
+
TuiIcon,
|
|
25
|
+
TuiHint,
|
|
26
|
+
ReactiveFormsModule,
|
|
27
|
+
TuiTextfieldControllerModule,
|
|
28
|
+
ParamTreeComponent,
|
|
29
|
+
TuiAppearance,
|
|
30
|
+
TuiTextfield,
|
|
31
|
+
TuiChevron,
|
|
32
|
+
TuiComboBox,
|
|
33
|
+
],
|
|
34
|
+
templateUrl: './param-tree-multi-select.component.html',
|
|
35
|
+
styleUrl: './param-tree-multi-select.component.less',
|
|
36
|
+
providers: [
|
|
37
|
+
ParamTreeService,
|
|
38
|
+
{ provide: TUI_TREE_LOADING, useValue: TREE_LOADING_NODE },
|
|
39
|
+
FastQueryStore,
|
|
40
|
+
],
|
|
41
|
+
})
|
|
42
|
+
export class ParamTreeMultiSelectComponent<T> extends ParamSelectBase<
|
|
43
|
+
ITreeNode<T>[],
|
|
44
|
+
InputTreeSelectSavedValue<T>[]
|
|
45
|
+
> {
|
|
46
|
+
/** Передача загрузочного узла для загрузки начального уровня иерархического списка */
|
|
47
|
+
public loaderNode = input.required<ITreeNode<T>>();
|
|
48
|
+
/**
|
|
49
|
+
* Возможность раскрывать/скрывать узлы иерархического списка.
|
|
50
|
+
* Логическое значение - это значение узла по умолчанию (раскрыты/скрыты).
|
|
51
|
+
*
|
|
52
|
+
* @default Без указания параметра (или значении null) - все узлы раскрыты без возможности изменять состояние.
|
|
53
|
+
* */
|
|
54
|
+
public defaultNodeOpenedState = input<boolean>();
|
|
55
|
+
public stringify = input<(item: ITreeNode<T>) => string>((item) => String(item.name));
|
|
56
|
+
public shortPickedLength = input(true);
|
|
57
|
+
|
|
58
|
+
public override readonly buildShowedValue = input(
|
|
59
|
+
(values: ITreeNode[]): string => values?.map((v) => v.name).join(',\n') ?? '-'
|
|
60
|
+
);
|
|
61
|
+
public override placeholder = input('Выберите значения');
|
|
62
|
+
|
|
63
|
+
private readonly _treeService = inject(ParamTreeService);
|
|
64
|
+
|
|
65
|
+
protected readonly checkedNodes = signal<ITreeNode<T>[]>([]);
|
|
66
|
+
|
|
67
|
+
constructor(injector: Injector) {
|
|
68
|
+
super(injector);
|
|
69
|
+
effect(() => {
|
|
70
|
+
this._treeService.setLoaderNode(this.loaderNode(), this.defaultNodeOpenedState());
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
protected override afterViewInit(): void {
|
|
75
|
+
this._subscribeForUpdateCheckedNodes();
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
private _subscribeForUpdateCheckedNodes(): void {
|
|
79
|
+
this.control.valueChanges
|
|
80
|
+
.pipe(distinctUntilChangedJSONs(), takeUntilDestroyed(this.dr))
|
|
81
|
+
.subscribe((value) => {
|
|
82
|
+
this.checkedNodes.set(value ?? []);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
protected setSelectedNodes(node: ITreeNode<T>[]): void {
|
|
87
|
+
this.control.setValue(node);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<ng-container [ngTemplateOutlet]="readmode ? readTemplate : editTemplate">
|
|
2
|
+
<ng-template #readTemplate>
|
|
3
|
+
<div class="container container--read" [attr.sproc-param-style]="paramStyle">
|
|
4
|
+
@if (label) {
|
|
5
|
+
@switch (paramStyle) {
|
|
6
|
+
@case ('filter') {
|
|
7
|
+
<div class="label-wrapper">
|
|
8
|
+
<span class="label">{{ label }}</span>
|
|
9
|
+
<div class="dashed-row"></div>
|
|
10
|
+
</div>
|
|
11
|
+
}
|
|
12
|
+
@default {
|
|
13
|
+
<span class="label">{{ label }}</span>
|
|
14
|
+
<div class="dashed-row"></div>
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
<div class="value">
|
|
19
|
+
<span>{{ showedValue }}</span>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</ng-template>
|
|
23
|
+
<ng-template #editTemplate>
|
|
24
|
+
<div class="container container--edit" [attr.sproc-param-style]="paramStyle">
|
|
25
|
+
@if (label) {
|
|
26
|
+
<div class="label-wrapper" [class.applied]="applied()">
|
|
27
|
+
<span class="label" [class.required]="required">
|
|
28
|
+
{{ label }}
|
|
29
|
+
</span>
|
|
30
|
+
</div>
|
|
31
|
+
}
|
|
32
|
+
<tui-textfield
|
|
33
|
+
tuiChevron
|
|
34
|
+
tuiTextfieldSize="m"
|
|
35
|
+
tuiAppearance="sproc-input-appearance"
|
|
36
|
+
[stringify]="stringify()"
|
|
37
|
+
[tuiTextfieldLabelOutside]="forceClear"
|
|
38
|
+
[tuiTextfieldCleaner]="true"
|
|
39
|
+
[tuiDropdownMaxHeight]="maxDropdownHeight"
|
|
40
|
+
>
|
|
41
|
+
<input tuiSelect [placeholder]="placeholder()" [formControl]="control" />
|
|
42
|
+
<ng-container *tuiTextfieldDropdown [ngTemplateOutlet]="paramTreeTemplate"></ng-container>
|
|
43
|
+
</tui-textfield>
|
|
44
|
+
</div>
|
|
45
|
+
</ng-template>
|
|
46
|
+
</ng-container>
|
|
47
|
+
|
|
48
|
+
<ng-template #paramTreeTemplate>
|
|
49
|
+
<sproc-param-tree
|
|
50
|
+
[multi]="false"
|
|
51
|
+
[checkedNodes]="checkedNodes()"
|
|
52
|
+
(selectedNodesChange)="setSelectedNodes($event)"
|
|
53
|
+
></sproc-param-tree>
|
|
54
|
+
</ng-template>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@import 'fonts';
|
|
2
|
+
@import 'common-param';
|
|
3
|
+
|
|
4
|
+
:host {
|
|
5
|
+
.container {
|
|
6
|
+
&--read {
|
|
7
|
+
.read-style-card;
|
|
8
|
+
.read-style-filter;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&--edit {
|
|
12
|
+
.edit-style-card;
|
|
13
|
+
.edit-style-filter;
|
|
14
|
+
|
|
15
|
+
&[sproc-param-style='card'] {
|
|
16
|
+
padding: 0 2px;
|
|
17
|
+
|
|
18
|
+
::ng-deep {
|
|
19
|
+
input {
|
|
20
|
+
.input-text-14px;
|
|
21
|
+
|
|
22
|
+
color: var(--text-contrast);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.placeholder {
|
|
26
|
+
.input-text-12px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&[sproc-param-style='filter'] {
|
|
32
|
+
::ng-deep {
|
|
33
|
+
input {
|
|
34
|
+
.input-text-12px;
|
|
35
|
+
|
|
36
|
+
color: var(--text-contrast);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.placeholder {
|
|
40
|
+
.input-text-12px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
._chevron-rotated {
|
|
46
|
+
.textfield-icons-container {
|
|
47
|
+
transition: all 0.4ms;
|
|
48
|
+
|
|
49
|
+
.chevron {
|
|
50
|
+
transform: rotate(-180deg);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Component, effect, inject, Injector, input, signal } from '@angular/core';
|
|
2
|
+
import { ParamTreeComponent } from '../param-tree/param-tree.component';
|
|
3
|
+
import { ITreeNode } from '../param-tree/types/param-tree.types';
|
|
4
|
+
import { TuiAppearance, TuiDropdown, TuiTextfield } from '@taiga-ui/core';
|
|
5
|
+
import { TUI_TREE_LOADING, TuiChevron, TuiSelect, } from '@taiga-ui/kit';
|
|
6
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
|
+
import { TREE_LOADING_NODE } from '../param-tree/consts/param-tree.consts';
|
|
8
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
9
|
+
import { TuiTextfieldControllerModule } from '@taiga-ui/legacy';
|
|
10
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
11
|
+
import { ParamTreeService } from '../param-tree/services/param-tree.service';
|
|
12
|
+
import { FastQueryStore } from '../../../store/fast-query-store.service';
|
|
13
|
+
import { ParamSelectBase } from '../../../core/param/param-select-base';
|
|
14
|
+
import { distinctUntilChangedJSONs } from '../../../utils';
|
|
15
|
+
|
|
16
|
+
export type InputTreeSelectSavedValue<T> = ITreeNode<T> & { [key: string]: any };
|
|
17
|
+
|
|
18
|
+
/** Компонент выбора единственного значения из иерархического списка */
|
|
19
|
+
@Component({
|
|
20
|
+
selector: 'sproc-param-tree-select',
|
|
21
|
+
standalone: true,
|
|
22
|
+
imports: [
|
|
23
|
+
ParamTreeComponent,
|
|
24
|
+
TuiTextfield,
|
|
25
|
+
TuiSelect,
|
|
26
|
+
TuiChevron,
|
|
27
|
+
FormsModule,
|
|
28
|
+
TuiDropdown,
|
|
29
|
+
ReactiveFormsModule,
|
|
30
|
+
NgTemplateOutlet,
|
|
31
|
+
TuiAppearance,
|
|
32
|
+
TuiTextfieldControllerModule,
|
|
33
|
+
],
|
|
34
|
+
templateUrl: './param-tree-select.component.html',
|
|
35
|
+
styleUrl: './param-tree-select.component.less',
|
|
36
|
+
providers: [
|
|
37
|
+
ParamTreeService,
|
|
38
|
+
{ provide: TUI_TREE_LOADING, useValue: TREE_LOADING_NODE },
|
|
39
|
+
FastQueryStore,
|
|
40
|
+
],
|
|
41
|
+
})
|
|
42
|
+
export class ParamTreeSelectComponent<T> extends ParamSelectBase<
|
|
43
|
+
ITreeNode<T>,
|
|
44
|
+
InputTreeSelectSavedValue<T>
|
|
45
|
+
> {
|
|
46
|
+
/** Передача загрузочного узла для загрузки начального уровня иерархического списка */
|
|
47
|
+
public loaderNode = input.required<ITreeNode<T>>();
|
|
48
|
+
/**
|
|
49
|
+
* Возможность раскрывать/скрывать узлы иерархического списка.
|
|
50
|
+
* Логическое значение - это значение узла по умолчанию (раскрыты/скрыты).
|
|
51
|
+
*
|
|
52
|
+
* @default Без указания параметра (или значении null) - все узлы раскрыты без возможности изменять состояние.
|
|
53
|
+
* */
|
|
54
|
+
public defaultNodeOpenedState = input<boolean>();
|
|
55
|
+
|
|
56
|
+
public stringify = input<(item: ITreeNode<T>) => string>((item) => String(item.name));
|
|
57
|
+
|
|
58
|
+
public override buildShowedValue = input((value: ITreeNode<T>): string => value?.name ?? '-');
|
|
59
|
+
public override placeholder = input('Выберите значение');
|
|
60
|
+
|
|
61
|
+
private readonly _treeService = inject(ParamTreeService);
|
|
62
|
+
|
|
63
|
+
protected readonly checkedNodes = signal<ITreeNode<T>[]>([]);
|
|
64
|
+
|
|
65
|
+
constructor(injector: Injector) {
|
|
66
|
+
super(injector);
|
|
67
|
+
effect(() => {
|
|
68
|
+
this._treeService.setLoaderNode(this.loaderNode(), this.defaultNodeOpenedState());
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
protected override afterViewInit(): void {
|
|
73
|
+
this._subscribeForUpdateCheckedNodes();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private _subscribeForUpdateCheckedNodes(): void {
|
|
77
|
+
this.control.valueChanges
|
|
78
|
+
.pipe(distinctUntilChangedJSONs(), takeUntilDestroyed(this.dr))
|
|
79
|
+
.subscribe((value) => {
|
|
80
|
+
if (value) {
|
|
81
|
+
this.checkedNodes.set([value]);
|
|
82
|
+
} else {
|
|
83
|
+
this.checkedNodes.set([]);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
protected setSelectedNodes([node]: ITreeNode<T>[]): void {
|
|
89
|
+
this.control.setValue(node ?? null);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, output } from '@angular/core';
|
|
2
|
+
import { TuiIcon } from '@taiga-ui/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'sproc-param-delete-content-button',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [TuiIcon],
|
|
8
|
+
templateUrl: './param-delete-content-btn.component.html',
|
|
9
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10
|
+
})
|
|
11
|
+
export class ParamDeleteContentBtnComponent {
|
|
12
|
+
readonly iconClicked = output<void>();
|
|
13
|
+
}
|
package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { TuiIcon } from '@taiga-ui/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'sproc-param-invalid-icon',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [TuiIcon],
|
|
8
|
+
templateUrl: './param-invalid-icon.component.html',
|
|
9
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10
|
+
})
|
|
11
|
+
export class ParamInvalidIconComponent {}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<div class="menu-constructor">
|
|
2
|
+
<div class="pane editor">
|
|
3
|
+
<div class="pane-header">
|
|
4
|
+
<h2>Редактор меню</h2>
|
|
5
|
+
<div class="buttons">
|
|
6
|
+
<button [disabled]="$any(loading$ | async)" class="btn secondary" (click)="addNewItem()">
|
|
7
|
+
+
|
|
8
|
+
</button>
|
|
9
|
+
<button [disabled]="$any(loading$ | async)" class="btn secondary" (click)="reset()">
|
|
10
|
+
Сбросить
|
|
11
|
+
</button>
|
|
12
|
+
<button [disabled]="$any(loading$ | async)" class="btn primary" (click)="save()">
|
|
13
|
+
Сохранить
|
|
14
|
+
</button>
|
|
15
|
+
<button [disabled]="$any(loading$ | async)" class="btn primary" (click)="handleFold(false)">
|
|
16
|
+
Раскрыть все элементы
|
|
17
|
+
</button>
|
|
18
|
+
<button [disabled]="$any(loading$ | async)" class="btn primary" (click)="handleFold(true)">
|
|
19
|
+
Скрыть все элементы
|
|
20
|
+
</button>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div
|
|
25
|
+
class="list-wrapper"
|
|
26
|
+
cdkDropList
|
|
27
|
+
[cdkDropListData]="visibleFlatTree()"
|
|
28
|
+
(cdkDropListDropped)="drop($event)"
|
|
29
|
+
[cdkDropListLockAxis]="'y'"
|
|
30
|
+
>
|
|
31
|
+
@for (node of visibleFlatTree(); track node.id + '-' + node.order_num) {
|
|
32
|
+
<div
|
|
33
|
+
class="node"
|
|
34
|
+
[style.marginLeft.px]="node.depth * 24"
|
|
35
|
+
[class.dragged]="isDragged(node)"
|
|
36
|
+
cdkDrag
|
|
37
|
+
(cdkDragStarted)="dragStarted(node)"
|
|
38
|
+
(cdkDragEnded)="dragEnded()"
|
|
39
|
+
>
|
|
40
|
+
<div class="node-bar" cdkDragHandle>
|
|
41
|
+
@if (hasChildren(node)) {
|
|
42
|
+
<button
|
|
43
|
+
class="collapse-btn"
|
|
44
|
+
(click)="toggleCollapse(node); $event.stopPropagation()"
|
|
45
|
+
[title]="node.collapsed ? 'Развернуть' : 'Свернуть'"
|
|
46
|
+
>
|
|
47
|
+
{{ node.collapsed ? '▶' : '▼' }}
|
|
48
|
+
</button>
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@if (node.title === ROOT_TITLE) {
|
|
52
|
+
<span class="root-title">Корневой элемент</span>
|
|
53
|
+
} @else {
|
|
54
|
+
<div class="left-control">
|
|
55
|
+
<span class="grip">⋮⋮</span>
|
|
56
|
+
<input class="inp title" [(ngModel)]="node.title" placeholder="Название" />
|
|
57
|
+
<input
|
|
58
|
+
class="inp code"
|
|
59
|
+
[required]="true"
|
|
60
|
+
[(ngModel)]="node.code"
|
|
61
|
+
placeholder="code"
|
|
62
|
+
/>
|
|
63
|
+
<input class="inp route" [(ngModel)]="node.route" placeholder="route" />
|
|
64
|
+
<input class="inp icon" [(ngModel)]="node.icon" placeholder="icon" />
|
|
65
|
+
<input class="inp roles" [(ngModel)]="node.allowed_roles" placeholder="Роли" />
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div class="depth-controls">
|
|
69
|
+
<button class="btn small" (click)="outdent(node)">←</button>
|
|
70
|
+
<button class="btn small" (click)="indent(node)">→</button>
|
|
71
|
+
@if (hasChildren(node)) {
|
|
72
|
+
<button class="btn small" (click)="outdentBranch(node)">⇐</button>
|
|
73
|
+
<button class="btn small" (click)="indentBranch(node)">⇒</button>
|
|
74
|
+
}
|
|
75
|
+
<button class="btn small" (click)="deleteItem(node)">Удалить</button>
|
|
76
|
+
</div>
|
|
77
|
+
}
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<ng-template cdkDragPreview>
|
|
81
|
+
<div class="drag-branch-preview">
|
|
82
|
+
<div
|
|
83
|
+
class="preview-bar"
|
|
84
|
+
*ngFor="let n of draggedBranch()"
|
|
85
|
+
[style.marginLeft.px]="(n.depth - node.depth) * 20"
|
|
86
|
+
>
|
|
87
|
+
{{ n.title }}
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</ng-template>
|
|
91
|
+
</div>
|
|
92
|
+
}
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|