ngx-register-base 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ng-package.json +15 -0
- package/package.json +12 -15
- package/schematics/ng-update/replace-menu-state-token/index.ts +33 -0
- package/schematics/ng-update/update-prefix/index.ts +38 -0
- package/schematics/utils/{utils.d.ts → utils.ts} +9 -2
- package/src/lib/components/checkbox-selector/checkbox-selector.component.html +91 -0
- package/src/lib/components/checkbox-selector/checkbox-selector.component.less +67 -0
- package/src/lib/components/checkbox-selector/checkbox-selector.component.ts +176 -0
- package/src/lib/components/checkbox-selector/checkbox-selector.types.ts +8 -0
- package/src/lib/components/column-settings/column-settings.component.html +160 -0
- package/src/lib/components/column-settings/column-settings.component.less +131 -0
- package/src/lib/components/column-settings/column-settings.component.ts +352 -0
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.html +65 -0
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.less +79 -0
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.ts +114 -0
- package/src/lib/components/column-settings/consts/column-settings.consts.ts +9 -0
- package/src/lib/components/column-settings/types/column-settings.types.ts +26 -0
- package/src/lib/components/divider/divider.component.html +4 -0
- package/src/lib/components/divider/divider.component.less +10 -0
- package/src/lib/components/divider/divider.component.ts +12 -0
- package/src/lib/components/filter-button/filter-button.component.html +20 -0
- package/src/lib/components/filter-button/filter-button.component.less +41 -0
- package/src/lib/components/filter-button/filter-button.component.ts +18 -0
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.html +22 -0
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.less +23 -0
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.ts +31 -0
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.html +49 -0
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.less +37 -0
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.ts +66 -0
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.html +147 -0
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.less +45 -0
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.ts +114 -0
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.html +44 -0
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.less +49 -0
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.ts +167 -0
- package/src/lib/components/filters/components/filter-list/filter-list.service.ts +97 -0
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.html +18 -0
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.less +55 -0
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.ts +69 -0
- package/src/lib/components/filters/components/filter-list.module.ts +29 -0
- package/src/lib/components/filters/register-table-filter.component.html +53 -0
- package/src/lib/components/filters/register-table-filter.component.less +17 -0
- package/src/lib/components/filters/register-table-filter.component.ts +167 -0
- package/src/lib/components/filters/register-table-filter.module.ts +22 -0
- package/src/lib/components/inputs/inputs.module.ts +104 -0
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.html +49 -0
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.less +70 -0
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.ts +52 -0
- package/src/lib/components/inputs/param-custom/param-custom.component.html +1 -0
- package/src/lib/components/inputs/param-custom/param-custom.component.ts +9 -0
- package/src/lib/components/inputs/param-date/param-date.component.html +55 -0
- package/src/lib/components/inputs/param-date/param-date.component.less +67 -0
- package/src/lib/components/inputs/param-date/param-date.component.ts +77 -0
- package/src/lib/components/inputs/param-date-range/param-date-range.component.html +45 -0
- package/src/lib/components/inputs/param-date-range/param-date-range.component.less +75 -0
- package/src/lib/components/inputs/param-date-range/param-date-range.component.ts +67 -0
- package/src/lib/components/inputs/param-date-time/param-date-time.component.html +70 -0
- package/src/lib/components/inputs/param-date-time/param-date-time.component.less +72 -0
- package/src/lib/components/inputs/param-date-time/param-date-time.component.ts +101 -0
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.html +67 -0
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.less +103 -0
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.ts +128 -0
- package/src/lib/components/inputs/param-month/param-month.component.html +46 -0
- package/src/lib/components/inputs/param-month/param-month.component.less +72 -0
- package/src/lib/components/inputs/param-month/param-month.component.ts +55 -0
- package/src/lib/components/inputs/param-month-range/param-month-range.component.html +39 -0
- package/src/lib/components/inputs/param-month-range/param-month-range.component.less +71 -0
- package/src/lib/components/inputs/param-month-range/param-month-range.component.ts +76 -0
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.html +84 -0
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.less +108 -0
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.ts +448 -0
- package/src/lib/components/inputs/param-select/param-select.component.html +106 -0
- package/src/lib/components/inputs/param-select/param-select.component.less +26 -0
- package/src/lib/components/inputs/param-select/param-select.component.ts +318 -0
- package/src/lib/components/inputs/param-switcher/param-switcher.component.html +8 -0
- package/src/lib/components/inputs/param-switcher/param-switcher.component.less +53 -0
- package/src/lib/components/inputs/param-switcher/param-switcher.component.ts +13 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.ts +29 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.html +19 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.less +76 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.ts +134 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.ts +8 -0
- package/src/lib/components/inputs/param-text/param-text.component.html +59 -0
- package/src/lib/components/inputs/param-text/param-text.component.less +33 -0
- package/src/lib/components/inputs/param-text/param-text.component.ts +36 -0
- package/src/lib/components/inputs/param-textarea/param-textarea.component.html +61 -0
- package/src/lib/components/inputs/param-textarea/param-textarea.component.less +21 -0
- package/src/lib/components/inputs/param-textarea/param-textarea.component.ts +33 -0
- package/src/lib/components/inputs/param-toggle/param-toggle.component.html +40 -0
- package/src/lib/components/inputs/param-toggle/param-toggle.component.less +69 -0
- package/src/lib/components/inputs/param-toggle/param-toggle.component.ts +14 -0
- package/src/lib/components/inputs/param-tree/consts/param-tree.consts.ts +59 -0
- package/src/lib/components/inputs/param-tree/param-tree.component.html +51 -0
- package/src/lib/components/inputs/param-tree/param-tree.component.less +3 -0
- package/src/lib/components/inputs/param-tree/param-tree.component.ts +282 -0
- package/src/lib/components/inputs/param-tree/services/param-tree.service.ts +176 -0
- package/src/lib/components/inputs/param-tree/services/sync-tree-loader.service.ts +18 -0
- package/{lib/components/inputs/param-tree/tokens/param-tree.tokens.d.ts → src/lib/components/inputs/param-tree/tokens/param-tree.tokens.ts} +2 -1
- package/src/lib/components/inputs/param-tree/types/param-tree.types.ts +39 -0
- package/src/lib/components/inputs/param-tree/utils/param-tree.utils.ts +18 -0
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.html +78 -0
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.less +109 -0
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.ts +89 -0
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.html +54 -0
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.less +56 -0
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.ts +91 -0
- package/src/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.html +5 -0
- package/src/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.ts +13 -0
- package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.html +4 -0
- package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.ts +11 -0
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.html +95 -0
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.less +183 -0
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.ts +687 -0
- package/src/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.ts +32 -0
- package/src/lib/components/menu-constructor/store/sproc-menu-constructor.consts.ts +46 -0
- package/{lib/components/menu-constructor/store/sproc-menu.tokens.d.ts → src/lib/components/menu-constructor/store/sproc-menu.tokens.ts} +4 -1
- package/src/lib/components/page-menu/README.md +60 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.consts.ts +8 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.schema.ts +35 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.tokens.ts +5 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.types.ts +42 -0
- package/src/lib/components/page-menu/sproc-page-menu.component.html +166 -0
- package/src/lib/components/page-menu/sproc-page-menu.component.less +228 -0
- package/src/lib/components/page-menu/sproc-page-menu.component.ts +337 -0
- package/src/lib/components/paginator/paginator.component.html +97 -0
- package/src/lib/components/paginator/paginator.component.less +101 -0
- package/src/lib/components/paginator/paginator.component.ts +192 -0
- package/src/lib/components/paginator/types/paginator.types.ts +16 -0
- package/src/lib/components/register-table/consts/register-table.consts.ts +3 -0
- package/src/lib/components/register-table/directives/cell-template.directive.ts +11 -0
- package/src/lib/components/register-table/directives/header-template.directive.ts +11 -0
- package/src/lib/components/register-table/model/schema.ts +62 -0
- package/src/lib/components/register-table/pipes/class-by-type.pipe.ts +28 -0
- package/src/lib/components/register-table/pipes/sticky-column.pipe.ts +11 -0
- package/src/lib/components/register-table/register-table.component.html +257 -0
- package/src/lib/components/register-table/register-table.component.less +151 -0
- package/src/lib/components/register-table/register-table.component.ts +743 -0
- package/src/lib/components/reset-settings-form/reset-settings-form.component.html +14 -0
- package/src/lib/components/reset-settings-form/reset-settings-form.component.less +26 -0
- package/src/lib/components/reset-settings-form/reset-settings-form.component.ts +15 -0
- package/src/lib/components/search-input/search-input.component.html +6 -0
- package/src/lib/components/search-input/search-input.component.less +17 -0
- package/src/lib/components/search-input/search-input.component.ts +31 -0
- package/src/lib/components/sliding-panel/sliding-panel.component.html +13 -0
- package/src/lib/components/sliding-panel/sliding-panel.component.less +112 -0
- package/src/lib/components/sliding-panel/sliding-panel.component.ts +36 -0
- package/src/lib/components/sliding-panel/sliding-panel.module.ts +11 -0
- package/src/lib/consts/date-time.consts.ts +1 -0
- package/src/lib/consts/index.ts +8 -0
- package/src/lib/consts/inputs.consts.ts +9 -0
- package/src/lib/consts/month.consts.ts +82 -0
- package/src/lib/consts/params.consts.ts +1 -0
- package/src/lib/consts/register-base.consts.ts +40 -0
- package/src/lib/core/form-group-wrapper/errors-consts.ts +6 -0
- package/src/lib/core/form-group-wrapper/form-group-wrapper.ts +109 -0
- package/src/lib/core/input-control/input-control.ts +30 -0
- package/src/lib/core/param/param-base.ts +262 -0
- package/src/lib/core/param/param-date-base.ts +30 -0
- package/src/lib/core/param/param-select-base.ts +118 -0
- package/src/lib/core/param/param-text-base.ts +23 -0
- package/{lib/core/param/param.tokens.d.ts → src/lib/core/param/param.tokens.ts} +2 -1
- package/src/lib/core/register-base/register-base.store.ts +84 -0
- package/src/lib/core/register-base/register-base.ts +854 -0
- package/src/lib/directives/date/date-time.types.ts +36 -0
- package/src/lib/directives/date/format-date.pipe.ts +28 -0
- package/src/lib/directives/number/number-only.directive.ts +36 -0
- package/src/lib/directives/sticky/sticky-relative.directive.ts +30 -0
- package/src/lib/directives/sticky/sticky-relative.service.ts +34 -0
- package/src/lib/directives/sticky/sticky.directive.ts +189 -0
- package/src/lib/services/date-time.service.ts +399 -0
- package/src/lib/services/dialog/dialog.service.ts +62 -0
- package/{lib/services/dialog/dialog.types.d.ts → src/lib/services/dialog/dialog.types.ts} +8 -4
- package/src/lib/services/dom-intersection.service.ts +23 -0
- package/src/lib/services/filter/filters-state.service.ts +83 -0
- package/src/lib/services/filter/filters-transmit.service.ts +105 -0
- package/src/lib/services/filter/filters.service.ts +21 -0
- package/src/lib/services/inputs-state.service.ts +157 -0
- package/src/lib/services/inputs.service.ts +114 -0
- package/src/lib/services/key-pressed.service.ts +40 -0
- package/src/lib/services/resize-window-observer.service.ts +37 -0
- package/src/lib/services/selected-objects-state.service.ts +159 -0
- package/src/lib/store/fast-query-store.service.ts +132 -0
- package/{lib/types/event.types.d.ts → src/lib/types/event.types.ts} +1 -1
- package/src/lib/types/hasura.types.ts +41 -0
- package/src/lib/types/inputs.types.ts +63 -0
- package/src/lib/types/params.types.ts +42 -0
- package/src/lib/types/register-base.types.ts +161 -0
- package/src/lib/types/sub-types.ts +15 -0
- package/src/lib/types/user-profile.types.ts +18 -0
- package/src/lib/utils/functions.ts +11 -0
- package/src/lib/utils/get-url-segment.ts +46 -0
- package/src/lib/utils/prizm.shared.module.ts +176 -0
- package/src/lib/utils/rxjs.ts +33 -0
- package/src/lib/utils/select-all-utils.ts +16 -0
- package/tsconfig.lib.json +16 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.schematics.json +26 -0
- package/tsconfig.spec.json +15 -0
- package/esm2022/lib/components/checkbox-selector/checkbox-selector.component.mjs +0 -129
- package/esm2022/lib/components/checkbox-selector/checkbox-selector.types.mjs +0 -8
- package/esm2022/lib/components/column-settings/column-settings.component.mjs +0 -249
- package/esm2022/lib/components/column-settings/components/column-settings-template/column-settings-template.component.mjs +0 -80
- package/esm2022/lib/components/column-settings/consts/column-settings.consts.mjs +0 -10
- package/esm2022/lib/components/column-settings/index.mjs +0 -3
- package/esm2022/lib/components/column-settings/types/column-settings.types.mjs +0 -7
- package/esm2022/lib/components/divider/divider.component.mjs +0 -16
- package/esm2022/lib/components/filter-button/filter-button.component.mjs +0 -19
- package/esm2022/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.mjs +0 -31
- package/esm2022/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.mjs +0 -57
- package/esm2022/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.mjs +0 -110
- package/esm2022/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.mjs +0 -130
- package/esm2022/lib/components/filters/components/filter-list/filter-list.service.mjs +0 -89
- package/esm2022/lib/components/filters/components/filter-list/filters-section/filters-section.component.mjs +0 -41
- package/esm2022/lib/components/filters/components/filter-list.module.mjs +0 -45
- package/esm2022/lib/components/filters/index.mjs +0 -3
- package/esm2022/lib/components/filters/register-table-filter.component.mjs +0 -155
- package/esm2022/lib/components/filters/register-table-filter.module.mjs +0 -39
- package/esm2022/lib/components/index.mjs +0 -11
- package/esm2022/lib/components/inputs/index.mjs +0 -20
- package/esm2022/lib/components/inputs/inputs.module.mjs +0 -166
- package/esm2022/lib/components/inputs/param-calendar-year/param-calendar-year.component.mjs +0 -45
- package/esm2022/lib/components/inputs/param-custom/param-custom.component.mjs +0 -12
- package/esm2022/lib/components/inputs/param-date/param-date.component.mjs +0 -76
- package/esm2022/lib/components/inputs/param-date-range/param-date-range.component.mjs +0 -61
- package/esm2022/lib/components/inputs/param-date-time/param-date-time.component.mjs +0 -86
- package/esm2022/lib/components/inputs/param-date-time-range/param-date-time-range.component.mjs +0 -96
- package/esm2022/lib/components/inputs/param-month/param-month.component.mjs +0 -50
- package/esm2022/lib/components/inputs/param-month-range/param-month-range.component.mjs +0 -62
- package/esm2022/lib/components/inputs/param-multi-select/param-multi-select.component.mjs +0 -309
- package/esm2022/lib/components/inputs/param-select/param-select.component.mjs +0 -209
- package/esm2022/lib/components/inputs/param-switcher/param-switcher.component.mjs +0 -21
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.mjs +0 -28
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/index.mjs +0 -3
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.mjs +0 -105
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.mjs +0 -10
- package/esm2022/lib/components/inputs/param-text/param-text.component.mjs +0 -40
- package/esm2022/lib/components/inputs/param-textarea/param-textarea.component.mjs +0 -38
- package/esm2022/lib/components/inputs/param-toggle/param-toggle.component.mjs +0 -20
- package/esm2022/lib/components/inputs/param-tree/consts/param-tree.consts.mjs +0 -37
- package/esm2022/lib/components/inputs/param-tree/index.mjs +0 -8
- package/esm2022/lib/components/inputs/param-tree/param-tree.component.mjs +0 -207
- package/esm2022/lib/components/inputs/param-tree/services/param-tree.service.mjs +0 -116
- package/esm2022/lib/components/inputs/param-tree/services/sync-tree-loader.service.mjs +0 -20
- package/esm2022/lib/components/inputs/param-tree/tokens/param-tree.tokens.mjs +0 -3
- package/esm2022/lib/components/inputs/param-tree/types/param-tree.types.mjs +0 -2
- package/esm2022/lib/components/inputs/param-tree/utils/param-tree.utils.mjs +0 -9
- package/esm2022/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.mjs +0 -80
- package/esm2022/lib/components/inputs/param-tree-select/param-tree-select.component.mjs +0 -85
- package/esm2022/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.mjs +0 -15
- package/esm2022/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.mjs +0 -12
- package/esm2022/lib/components/menu-constructor/index.mjs +0 -5
- package/esm2022/lib/components/menu-constructor/sproc-menu-constructor.component.mjs +0 -559
- package/esm2022/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.mjs +0 -3
- package/esm2022/lib/components/menu-constructor/store/sproc-menu-constructor.consts.mjs +0 -5
- package/esm2022/lib/components/menu-constructor/store/sproc-menu.tokens.mjs +0 -3
- package/esm2022/lib/components/page-menu/index.mjs +0 -6
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.consts.mjs +0 -9
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.schema.mjs +0 -2
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.tokens.mjs +0 -4
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.types.mjs +0 -3
- package/esm2022/lib/components/page-menu/sproc-page-menu.component.mjs +0 -275
- package/esm2022/lib/components/paginator/paginator.component.mjs +0 -159
- package/esm2022/lib/components/paginator/types/paginator.types.mjs +0 -2
- package/esm2022/lib/components/register-table/consts/register-table.consts.mjs +0 -4
- package/esm2022/lib/components/register-table/directives/cell-template.directive.mjs +0 -19
- package/esm2022/lib/components/register-table/directives/header-template.directive.mjs +0 -18
- package/esm2022/lib/components/register-table/index.mjs +0 -4
- package/esm2022/lib/components/register-table/model/schema.mjs +0 -10
- package/esm2022/lib/components/register-table/pipes/class-by-type.pipe.mjs +0 -33
- package/esm2022/lib/components/register-table/pipes/sticky-column.pipe.mjs +0 -17
- package/esm2022/lib/components/register-table/register-table.component.mjs +0 -544
- package/esm2022/lib/components/reset-settings-form/reset-settings-form.component.mjs +0 -18
- package/esm2022/lib/components/search-input/search-input.component.mjs +0 -28
- package/esm2022/lib/components/sliding-panel/sliding-panel.component.mjs +0 -48
- package/esm2022/lib/components/sliding-panel/sliding-panel.module.mjs +0 -19
- package/esm2022/lib/consts/date-time.consts.mjs +0 -2
- package/esm2022/lib/consts/index.mjs +0 -4
- package/esm2022/lib/consts/inputs.consts.mjs +0 -4
- package/esm2022/lib/consts/month.consts.mjs +0 -77
- package/esm2022/lib/consts/params.consts.mjs +0 -2
- package/esm2022/lib/consts/register-base.consts.mjs +0 -26
- package/esm2022/lib/core/form-group-wrapper/errors-consts.mjs +0 -8
- package/esm2022/lib/core/form-group-wrapper/form-group-wrapper.mjs +0 -81
- package/esm2022/lib/core/form-group-wrapper/index.mjs +0 -2
- package/esm2022/lib/core/index.mjs +0 -5
- package/esm2022/lib/core/input-control/index.mjs +0 -2
- package/esm2022/lib/core/input-control/input-control.mjs +0 -11
- package/esm2022/lib/core/param/index.mjs +0 -6
- package/esm2022/lib/core/param/param-base.mjs +0 -215
- package/esm2022/lib/core/param/param-date-base.mjs +0 -26
- package/esm2022/lib/core/param/param-select-base.mjs +0 -114
- package/esm2022/lib/core/param/param-text-base.mjs +0 -25
- package/esm2022/lib/core/param/param.tokens.mjs +0 -4
- package/esm2022/lib/core/register-base/index.mjs +0 -3
- package/esm2022/lib/core/register-base/register-base.mjs +0 -575
- package/esm2022/lib/core/register-base/register-base.store.mjs +0 -43
- package/esm2022/lib/directives/date/date-time.types.mjs +0 -34
- package/esm2022/lib/directives/date/format-date.pipe.mjs +0 -33
- package/esm2022/lib/directives/index.mjs +0 -3
- package/esm2022/lib/directives/number/number-only.directive.mjs +0 -41
- package/esm2022/lib/directives/sticky/index.mjs +0 -3
- package/esm2022/lib/directives/sticky/sticky-relative.directive.mjs +0 -32
- package/esm2022/lib/directives/sticky/sticky-relative.service.mjs +0 -32
- package/esm2022/lib/directives/sticky/sticky.directive.mjs +0 -169
- package/esm2022/lib/services/date-time.service.mjs +0 -314
- package/esm2022/lib/services/dialog/dialog.service.mjs +0 -53
- package/esm2022/lib/services/dialog/dialog.types.mjs +0 -2
- package/esm2022/lib/services/dialog/index.mjs +0 -3
- package/esm2022/lib/services/dom-intersection.service.mjs +0 -22
- package/esm2022/lib/services/filter/filters-state.service.mjs +0 -65
- package/esm2022/lib/services/filter/filters-transmit.service.mjs +0 -82
- package/esm2022/lib/services/filter/filters.service.mjs +0 -23
- package/esm2022/lib/services/index.mjs +0 -8
- package/esm2022/lib/services/inputs-state.service.mjs +0 -130
- package/esm2022/lib/services/inputs.service.mjs +0 -88
- package/esm2022/lib/services/key-pressed.service.mjs +0 -37
- package/esm2022/lib/services/resize-window-observer.service.mjs +0 -33
- package/esm2022/lib/services/selected-objects-state.service.mjs +0 -123
- package/esm2022/lib/store/fast-query-store.service.mjs +0 -110
- package/esm2022/lib/store/index.mjs +0 -2
- package/esm2022/lib/types/event.types.mjs +0 -2
- package/esm2022/lib/types/hasura.types.mjs +0 -2
- package/esm2022/lib/types/index.mjs +0 -7
- package/esm2022/lib/types/inputs.types.mjs +0 -19
- package/esm2022/lib/types/params.types.mjs +0 -2
- package/esm2022/lib/types/register-base.types.mjs +0 -6
- package/esm2022/lib/types/sub-types.mjs +0 -2
- package/esm2022/lib/types/user-profile.types.mjs +0 -2
- package/esm2022/lib/utils/functions.mjs +0 -10
- package/esm2022/lib/utils/get-url-segment.mjs +0 -35
- package/esm2022/lib/utils/index.mjs +0 -5
- package/esm2022/lib/utils/prizm.shared.module.mjs +0 -284
- package/esm2022/lib/utils/rxjs.mjs +0 -28
- package/esm2022/lib/utils/select-all-utils.mjs +0 -11
- package/esm2022/ngx-register-base.mjs +0 -5
- package/esm2022/public-api.mjs +0 -9
- package/fesm2022/ngx-register-base.mjs +0 -7465
- package/fesm2022/ngx-register-base.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/checkbox-selector/checkbox-selector.component.d.ts +0 -33
- package/lib/components/checkbox-selector/checkbox-selector.types.d.ts +0 -7
- package/lib/components/column-settings/column-settings.component.d.ts +0 -80
- package/lib/components/column-settings/components/column-settings-template/column-settings-template.component.d.ts +0 -24
- package/lib/components/column-settings/consts/column-settings.consts.d.ts +0 -8
- package/lib/components/column-settings/types/column-settings.types.d.ts +0 -22
- package/lib/components/divider/divider.component.d.ts +0 -6
- package/lib/components/filter-button/filter-button.component.d.ts +0 -8
- package/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.d.ts +0 -14
- package/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.d.ts +0 -25
- package/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.d.ts +0 -39
- package/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.d.ts +0 -41
- package/lib/components/filters/components/filter-list/filter-list.service.d.ts +0 -20
- package/lib/components/filters/components/filter-list/filters-section/filters-section.component.d.ts +0 -15
- package/lib/components/filters/components/filter-list.module.d.ts +0 -15
- package/lib/components/filters/register-table-filter.component.d.ts +0 -40
- package/lib/components/filters/register-table-filter.module.d.ts +0 -13
- package/lib/components/inputs/inputs.module.d.ts +0 -31
- package/lib/components/inputs/param-calendar-year/param-calendar-year.component.d.ts +0 -19
- package/lib/components/inputs/param-custom/param-custom.component.d.ts +0 -6
- package/lib/components/inputs/param-date/param-date.component.d.ts +0 -20
- package/lib/components/inputs/param-date-range/param-date-range.component.d.ts +0 -26
- package/lib/components/inputs/param-date-time/param-date-time.component.d.ts +0 -25
- package/lib/components/inputs/param-date-time-range/param-date-time-range.component.d.ts +0 -28
- package/lib/components/inputs/param-month/param-month.component.d.ts +0 -18
- package/lib/components/inputs/param-month-range/param-month-range.component.d.ts +0 -21
- package/lib/components/inputs/param-multi-select/param-multi-select.component.d.ts +0 -46
- package/lib/components/inputs/param-select/param-select.component.d.ts +0 -30
- package/lib/components/inputs/param-switcher/param-switcher.component.d.ts +0 -8
- package/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.d.ts +0 -2
- package/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.d.ts +0 -19
- package/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.d.ts +0 -8
- package/lib/components/inputs/param-text/param-text.component.d.ts +0 -10
- package/lib/components/inputs/param-textarea/param-textarea.component.d.ts +0 -10
- package/lib/components/inputs/param-toggle/param-toggle.component.d.ts +0 -9
- package/lib/components/inputs/param-tree/consts/param-tree.consts.d.ts +0 -7
- package/lib/components/inputs/param-tree/param-tree.component.d.ts +0 -41
- package/lib/components/inputs/param-tree/services/param-tree.service.d.ts +0 -37
- package/lib/components/inputs/param-tree/services/sync-tree-loader.service.d.ts +0 -10
- package/lib/components/inputs/param-tree/types/param-tree.types.d.ts +0 -32
- package/lib/components/inputs/param-tree/utils/param-tree.utils.d.ts +0 -7
- package/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.d.ts +0 -31
- package/lib/components/inputs/param-tree-select/param-tree-select.component.d.ts +0 -30
- package/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.d.ts +0 -6
- package/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.d.ts +0 -5
- package/lib/components/menu-constructor/sproc-menu-constructor.component.d.ts +0 -113
- package/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.d.ts +0 -24
- package/lib/components/menu-constructor/store/sproc-menu-constructor.consts.d.ts +0 -36
- package/lib/components/page-menu/schema/sproc-page-menu.consts.d.ts +0 -7
- package/lib/components/page-menu/schema/sproc-page-menu.schema.d.ts +0 -30
- package/lib/components/page-menu/schema/sproc-page-menu.tokens.d.ts +0 -3
- package/lib/components/page-menu/schema/sproc-page-menu.types.d.ts +0 -36
- package/lib/components/page-menu/sproc-page-menu.component.d.ts +0 -48
- package/lib/components/paginator/paginator.component.d.ts +0 -52
- package/lib/components/paginator/types/paginator.types.d.ts +0 -15
- package/lib/components/register-table/consts/register-table.consts.d.ts +0 -3
- package/lib/components/register-table/directives/cell-template.directive.d.ts +0 -9
- package/lib/components/register-table/directives/header-template.directive.d.ts +0 -9
- package/lib/components/register-table/model/schema.d.ts +0 -52
- package/lib/components/register-table/pipes/class-by-type.pipe.d.ts +0 -8
- package/lib/components/register-table/pipes/sticky-column.pipe.d.ts +0 -7
- package/lib/components/register-table/register-table.component.d.ts +0 -165
- package/lib/components/reset-settings-form/reset-settings-form.component.d.ts +0 -9
- package/lib/components/search-input/search-input.component.d.ts +0 -11
- package/lib/components/sliding-panel/sliding-panel.component.d.ts +0 -14
- package/lib/components/sliding-panel/sliding-panel.module.d.ts +0 -9
- package/lib/consts/date-time.consts.d.ts +0 -1
- package/lib/consts/index.d.ts +0 -3
- package/lib/consts/inputs.consts.d.ts +0 -4
- package/lib/consts/month.consts.d.ts +0 -49
- package/lib/consts/params.consts.d.ts +0 -1
- package/lib/consts/register-base.consts.d.ts +0 -19
- package/lib/core/form-group-wrapper/errors-consts.d.ts +0 -5
- package/lib/core/form-group-wrapper/form-group-wrapper.d.ts +0 -15
- package/lib/core/input-control/input-control.d.ts +0 -11
- package/lib/core/param/param-base.d.ts +0 -68
- package/lib/core/param/param-date-base.d.ts +0 -18
- package/lib/core/param/param-select-base.d.ts +0 -42
- package/lib/core/param/param-text-base.d.ts +0 -15
- package/lib/core/register-base/register-base.d.ts +0 -168
- package/lib/core/register-base/register-base.store.d.ts +0 -35
- package/lib/directives/date/date-time.types.d.ts +0 -32
- package/lib/directives/date/format-date.pipe.d.ts +0 -10
- package/lib/directives/number/number-only.directive.d.ts +0 -10
- package/lib/directives/sticky/sticky-relative.directive.d.ts +0 -13
- package/lib/directives/sticky/sticky-relative.service.d.ts +0 -15
- package/lib/directives/sticky/sticky.directive.d.ts +0 -27
- package/lib/services/date-time.service.d.ts +0 -80
- package/lib/services/dialog/dialog.service.d.ts +0 -22
- package/lib/services/dom-intersection.service.d.ts +0 -8
- package/lib/services/filter/filters-state.service.d.ts +0 -21
- package/lib/services/filter/filters-transmit.service.d.ts +0 -28
- package/lib/services/filter/filters.service.d.ts +0 -12
- package/lib/services/inputs-state.service.d.ts +0 -57
- package/lib/services/inputs.service.d.ts +0 -28
- package/lib/services/key-pressed.service.d.ts +0 -15
- package/lib/services/resize-window-observer.service.d.ts +0 -11
- package/lib/services/selected-objects-state.service.d.ts +0 -47
- package/lib/store/fast-query-store.service.d.ts +0 -19
- package/lib/types/hasura.types.d.ts +0 -35
- package/lib/types/inputs.types.d.ts +0 -41
- package/lib/types/params.types.d.ts +0 -27
- package/lib/types/register-base.types.d.ts +0 -123
- package/lib/types/sub-types.d.ts +0 -8
- package/lib/types/user-profile.types.d.ts +0 -17
- package/lib/utils/functions.d.ts +0 -3
- package/lib/utils/get-url-segment.d.ts +0 -7
- package/lib/utils/prizm.shared.module.d.ts +0 -14
- package/lib/utils/rxjs.d.ts +0 -10
- package/lib/utils/select-all-utils.d.ts +0 -8
- package/schematics/ng-update/replace-menu-state-token/index.d.ts +0 -2
- package/schematics/ng-update/replace-menu-state-token/index.js +0 -29
- package/schematics/ng-update/replace-menu-state-token/index.js.map +0 -1
- package/schematics/ng-update/update-prefix/index.d.ts +0 -2
- package/schematics/ng-update/update-prefix/index.js +0 -33
- package/schematics/ng-update/update-prefix/index.js.map +0 -1
- package/schematics/utils/utils.js +0 -25
- package/schematics/utils/utils.js.map +0 -1
- /package/{lib/components/column-settings/index.d.ts → src/lib/components/column-settings/index.ts} +0 -0
- /package/{lib/components/filters/index.d.ts → src/lib/components/filters/index.ts} +0 -0
- /package/{lib/components/index.d.ts → src/lib/components/index.ts} +0 -0
- /package/{lib/components/inputs/index.d.ts → src/lib/components/inputs/index.ts} +0 -0
- /package/{lib/components/inputs/param-switcher-date-time-range/index.d.ts → src/lib/components/inputs/param-switcher-date-time-range/index.ts} +0 -0
- /package/{lib/components/inputs/param-tree/index.d.ts → src/lib/components/inputs/param-tree/index.ts} +0 -0
- /package/{lib/components/menu-constructor/index.d.ts → src/lib/components/menu-constructor/index.ts} +0 -0
- /package/{lib/components/page-menu/index.d.ts → src/lib/components/page-menu/index.ts} +0 -0
- /package/{lib/components/register-table/index.d.ts → src/lib/components/register-table/index.ts} +0 -0
- /package/{lib/core/form-group-wrapper/index.d.ts → src/lib/core/form-group-wrapper/index.ts} +0 -0
- /package/{lib/core/index.d.ts → src/lib/core/index.ts} +0 -0
- /package/{lib/core/input-control/index.d.ts → src/lib/core/input-control/index.ts} +0 -0
- /package/{lib/core/param/index.d.ts → src/lib/core/param/index.ts} +0 -0
- /package/{lib/core/register-base/index.d.ts → src/lib/core/register-base/index.ts} +0 -0
- /package/{lib/directives/index.d.ts → src/lib/directives/index.ts} +0 -0
- /package/{lib/directives/sticky/index.d.ts → src/lib/directives/sticky/index.ts} +0 -0
- /package/{lib/services/dialog/index.d.ts → src/lib/services/dialog/index.ts} +0 -0
- /package/{lib/services/index.d.ts → src/lib/services/index.ts} +0 -0
- /package/{lib/store/index.d.ts → src/lib/store/index.ts} +0 -0
- /package/{lib/types/index.d.ts → src/lib/types/index.ts} +0 -0
- /package/{lib/utils/index.d.ts → src/lib/utils/index.ts} +0 -0
- /package/{public-api.d.ts → src/public-api.ts} +0 -0
package/ng-package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"dest": "../../dist/ngx-register-base",
|
|
4
|
+
"assets": [
|
|
5
|
+
"icons",
|
|
6
|
+
"styles",
|
|
7
|
+
"assets"
|
|
8
|
+
],
|
|
9
|
+
"inlineStyleLanguage": "less",
|
|
10
|
+
"lib": {
|
|
11
|
+
"entryFile": "src/public-api.ts",
|
|
12
|
+
"styleIncludePaths": ["./styles"],
|
|
13
|
+
"cssUrl": "inline"
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-register-base",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"build": "tsc -p tsconfig.schematics.json",
|
|
6
|
+
"postbuild": "copyfiles schematics/*/schema.json schematics/*/files/** schematics/collection.json schematics/migration-collection.json ../../dist/ngx-register-base/"
|
|
7
|
+
},
|
|
4
8
|
"schematics": "./schematics/collection.json",
|
|
5
9
|
"ng-update": {
|
|
6
10
|
"migrations": "./schematics/migration-collection.json"
|
|
7
11
|
},
|
|
8
12
|
"exports": {
|
|
9
13
|
"./icons/*": "./icons/*",
|
|
10
|
-
"./styles/*": "./styles/*"
|
|
11
|
-
"./package.json": {
|
|
12
|
-
"default": "./package.json"
|
|
13
|
-
},
|
|
14
|
-
".": {
|
|
15
|
-
"types": "./index.d.ts",
|
|
16
|
-
"esm2022": "./esm2022/ngx-register-base.mjs",
|
|
17
|
-
"esm": "./esm2022/ngx-register-base.mjs",
|
|
18
|
-
"default": "./fesm2022/ngx-register-base.mjs"
|
|
19
|
-
}
|
|
14
|
+
"./styles/*": "./styles/*"
|
|
20
15
|
},
|
|
21
16
|
"peerDependencies": {
|
|
22
17
|
"@angular/cdk": "^18.2.0",
|
|
@@ -45,7 +40,9 @@
|
|
|
45
40
|
"dependencies": {
|
|
46
41
|
"tslib": "^2.3.0"
|
|
47
42
|
},
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"copyfiles": "file:../../node_modules/copyfiles",
|
|
45
|
+
"typescript": "file:../../node_modules/typescript"
|
|
46
|
+
},
|
|
47
|
+
"sideEffects": false
|
|
48
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { hasFileExtension, shouldSkipFile } from '../../utils/utils';
|
|
3
|
+
|
|
4
|
+
export function replaceMenuStateToken(): Rule {
|
|
5
|
+
return (tree: Tree, context: SchematicContext) => {
|
|
6
|
+
const tokenRegex = /\bMENU_STATE_SERVICE\b/g;
|
|
7
|
+
const newToken = 'PAGE_MENU_STATE';
|
|
8
|
+
|
|
9
|
+
tree.visit((filePath) => {
|
|
10
|
+
if (shouldSkipFile(filePath) || !hasFileExtension(filePath, ['.ts'])) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const buffer = tree.read(filePath);
|
|
15
|
+
if (!buffer) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const content = buffer.toString('utf-8');
|
|
20
|
+
|
|
21
|
+
if (tokenRegex.test(content)) {
|
|
22
|
+
const updatedContent = content.replace(tokenRegex, newToken);
|
|
23
|
+
|
|
24
|
+
if (content !== updatedContent) {
|
|
25
|
+
tree.overwrite(filePath, updatedContent);
|
|
26
|
+
context.logger.info(`Updated token in: ${filePath}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return tree;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { hasFileExtension, shouldSkipFile } from '../../utils/utils';
|
|
3
|
+
|
|
4
|
+
export function updatePrefix(): Rule {
|
|
5
|
+
return (tree: Tree, _context: SchematicContext) => {
|
|
6
|
+
tree.visit((filePath) => {
|
|
7
|
+
if (shouldSkipFile(filePath)) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const contentBuffer = tree.read(filePath);
|
|
12
|
+
if (!contentBuffer) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const content = contentBuffer.toString('utf-8');
|
|
17
|
+
|
|
18
|
+
if (hasFileExtension(filePath, ['.html', '.ts'])) {
|
|
19
|
+
const newContent = content.replace(/<sma-/g, '<sproc-').replace(/<\/sma-/g, '</sproc-');
|
|
20
|
+
|
|
21
|
+
if (content !== newContent) {
|
|
22
|
+
tree.overwrite(filePath, newContent);
|
|
23
|
+
}
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (hasFileExtension(filePath, ['.css', '.less', '.scss'])) {
|
|
28
|
+
const newContent = content.replace(/\bsma-/g, 'sproc-');
|
|
29
|
+
|
|
30
|
+
if (content !== newContent) {
|
|
31
|
+
tree.overwrite(filePath, newContent);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return tree;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
const IGNORED_DIRECTORIES = ['/node_modules/', '/dist/', '/.angular/', '/.git/'];
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Проверяет, следует ли пропустить файл при обработке.
|
|
3
5
|
*
|
|
4
6
|
* @param filePath Путь к файлу для проверки.
|
|
5
7
|
* @returns Возвращает `true`, если файл нужно пропустить, иначе `false`.
|
|
6
8
|
*/
|
|
7
|
-
export
|
|
9
|
+
export function shouldSkipFile(filePath: string): boolean {
|
|
10
|
+
return IGNORED_DIRECTORIES.some((dir) => filePath.includes(dir));
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
/**
|
|
9
14
|
* Проверяет, соответствует ли файл хотя бы одному из переданных расширений.
|
|
10
15
|
*
|
|
@@ -12,4 +17,6 @@ export declare function shouldSkipFile(filePath: string): boolean;
|
|
|
12
17
|
* @param extensions Массив расширений, например ['.html', '.ts']
|
|
13
18
|
* @returns Возвращает `true`, если файл соответствует одному из переданных ресширений, иначе `false`.
|
|
14
19
|
*/
|
|
15
|
-
export
|
|
20
|
+
export function hasFileExtension(filePath: string, extensions: string[]): boolean {
|
|
21
|
+
return extensions.some((ext) => filePath.endsWith(ext));
|
|
22
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<div class="checkbox__container" (click)="toggle(); $event.stopImmediatePropagation()">
|
|
2
|
+
@let indeterminate = calcIndeterminate();
|
|
3
|
+
@let checked = calcChecked();
|
|
4
|
+
|
|
5
|
+
<input
|
|
6
|
+
tuiCheckbox
|
|
7
|
+
size="s"
|
|
8
|
+
type="checkbox"
|
|
9
|
+
[indeterminate]="indeterminate"
|
|
10
|
+
[tuiDropdown]="dropdown"
|
|
11
|
+
[tuiDropdownManual]="isOpen()"
|
|
12
|
+
[checked]="checked"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<ng-template #dropdown>
|
|
17
|
+
<section class="dropdown__content" id="checkbox__dropdown__content">
|
|
18
|
+
@let selected = selectedElement();
|
|
19
|
+
|
|
20
|
+
<span
|
|
21
|
+
class="dropdown__element"
|
|
22
|
+
[class.dropdown__element_selected]="selected === ESelectionTypes.ALL"
|
|
23
|
+
(click)="selectElement(ESelectionTypes.ALL)"
|
|
24
|
+
>
|
|
25
|
+
Выбрать все
|
|
26
|
+
</span>
|
|
27
|
+
<span
|
|
28
|
+
class="dropdown__element"
|
|
29
|
+
[class.dropdown__element_selected]="selected === ESelectionTypes.VISIBLE"
|
|
30
|
+
(click)="selectElement(ESelectionTypes.VISIBLE)"
|
|
31
|
+
>
|
|
32
|
+
Выбрать видимое
|
|
33
|
+
</span>
|
|
34
|
+
<span
|
|
35
|
+
class="dropdown__element"
|
|
36
|
+
[class.dropdown__element_selected]="selected === ESelectionTypes.INVERSE"
|
|
37
|
+
(click)="selectElement(ESelectionTypes.INVERSE)"
|
|
38
|
+
>
|
|
39
|
+
Кроме выделенного
|
|
40
|
+
</span>
|
|
41
|
+
<div
|
|
42
|
+
class="dropdown__select-value"
|
|
43
|
+
[class.dropdown__element_selected]="selected === ESelectionTypes.COUNT"
|
|
44
|
+
>
|
|
45
|
+
<span>Выбрать</span>
|
|
46
|
+
<tui-textfield
|
|
47
|
+
tuiTextfieldSize="s"
|
|
48
|
+
tuiTextfieldAppearance="textfield"
|
|
49
|
+
[tuiTextfieldCleaner]="true"
|
|
50
|
+
class="flex-1"
|
|
51
|
+
>
|
|
52
|
+
<input
|
|
53
|
+
tuiInputNumber
|
|
54
|
+
placeholder="Введите число"
|
|
55
|
+
[max]="inputMaxValue()"
|
|
56
|
+
[ngModel]="inputValue()"
|
|
57
|
+
(ngModelChange)="inputValueChanges($event)"
|
|
58
|
+
(focusin)="onInputFocus()"
|
|
59
|
+
/>
|
|
60
|
+
|
|
61
|
+
@if (inputDescription()) {
|
|
62
|
+
<tui-icon
|
|
63
|
+
icon="assets/ngx-register-base/icons/circle-question-empty.svg"
|
|
64
|
+
[tuiTooltip]="inputDescription()"
|
|
65
|
+
/>
|
|
66
|
+
}
|
|
67
|
+
</tui-textfield>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="dropdown__footer">
|
|
70
|
+
<button
|
|
71
|
+
tuiButton
|
|
72
|
+
class="dropdown__button dropdown__button__apply"
|
|
73
|
+
size="m"
|
|
74
|
+
appearance="outline"
|
|
75
|
+
[loading]="loading()"
|
|
76
|
+
(click)="applySelection()"
|
|
77
|
+
>
|
|
78
|
+
Применить
|
|
79
|
+
</button>
|
|
80
|
+
<button
|
|
81
|
+
tuiButton
|
|
82
|
+
class="dropdown__button dropdown__button__cancel"
|
|
83
|
+
size="m"
|
|
84
|
+
appearance="outline-grayscale"
|
|
85
|
+
(click)="dropSelection()"
|
|
86
|
+
>
|
|
87
|
+
Отмена
|
|
88
|
+
</button>
|
|
89
|
+
</div>
|
|
90
|
+
</section>
|
|
91
|
+
</ng-template>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@import 'fonts';
|
|
2
|
+
|
|
3
|
+
.dropdown {
|
|
4
|
+
&__content {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
padding: 8px 0;
|
|
8
|
+
width: 260px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&__element,
|
|
12
|
+
&__select-value,
|
|
13
|
+
&__button {
|
|
14
|
+
padding: 8px 16px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__button {
|
|
18
|
+
padding: 2px 0;
|
|
19
|
+
flex: 1;
|
|
20
|
+
width: 109px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__element {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
.input-text-14px;
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
background: #f7f9fa;
|
|
30
|
+
color: var(--text-main);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&_selected {
|
|
34
|
+
background: #d0edff;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__select-value {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
padding: 4px 16px;
|
|
42
|
+
gap: 8px;
|
|
43
|
+
|
|
44
|
+
span {
|
|
45
|
+
cursor: default;
|
|
46
|
+
|
|
47
|
+
.input-text-14px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
tui-textfield input {
|
|
51
|
+
font: var(--input-text-14px) !important;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__footer {
|
|
56
|
+
padding: 0 16px;
|
|
57
|
+
display: flex;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
gap: 10px;
|
|
60
|
+
margin-top: 4px;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.flex-1 {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex: 1;
|
|
67
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
effect,
|
|
6
|
+
inject,
|
|
7
|
+
input,
|
|
8
|
+
output,
|
|
9
|
+
signal,
|
|
10
|
+
untracked,
|
|
11
|
+
} from '@angular/core';
|
|
12
|
+
import { SelectionTypes, ApplySelectionTypes } from './checkbox-selector.types';
|
|
13
|
+
import { TuiButtonLoading, TuiCheckbox, TuiInputNumber, TuiTooltip } from '@taiga-ui/kit';
|
|
14
|
+
import { TuiButton, TuiDropdown, TuiIcon, TuiTextfield } from '@taiga-ui/core';
|
|
15
|
+
import { FormsModule } from '@angular/forms';
|
|
16
|
+
import { TuiTextfieldControllerModule } from '@taiga-ui/legacy';
|
|
17
|
+
import { ScalarUUID } from 'hasura';
|
|
18
|
+
import { ERegisterObjectState } from '../../types';
|
|
19
|
+
import { SelectedObjectsStateService } from '../../services';
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
selector: 'sproc-checkbox-selector',
|
|
23
|
+
templateUrl: './checkbox-selector.component.html',
|
|
24
|
+
styleUrls: ['./checkbox-selector.component.less'],
|
|
25
|
+
standalone: true,
|
|
26
|
+
imports: [
|
|
27
|
+
TuiCheckbox,
|
|
28
|
+
TuiDropdown,
|
|
29
|
+
TuiTextfield,
|
|
30
|
+
FormsModule,
|
|
31
|
+
TuiTextfieldControllerModule,
|
|
32
|
+
TuiButton,
|
|
33
|
+
TuiButtonLoading,
|
|
34
|
+
TuiInputNumber,
|
|
35
|
+
TuiTooltip,
|
|
36
|
+
TuiIcon,
|
|
37
|
+
],
|
|
38
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
39
|
+
})
|
|
40
|
+
export class CheckboxSelectorComponent {
|
|
41
|
+
public totalRecords = input<number>();
|
|
42
|
+
/** @deprecated используйте stateObjects */
|
|
43
|
+
public selected = input(new Set<ScalarUUID>());
|
|
44
|
+
public disabled = input(false);
|
|
45
|
+
public loading = input<boolean | null>(false);
|
|
46
|
+
public inputMaxValue = input<number | null>(null);
|
|
47
|
+
|
|
48
|
+
public onApply = output<ApplySelectionTypes>();
|
|
49
|
+
|
|
50
|
+
private readonly _selectedService = inject(SelectedObjectsStateService, { optional: true });
|
|
51
|
+
|
|
52
|
+
protected readonly ESelectionTypes = SelectionTypes;
|
|
53
|
+
|
|
54
|
+
protected isOpen = signal(false);
|
|
55
|
+
protected selectedElement = signal<SelectionTypes | null>(null);
|
|
56
|
+
protected inputValue = signal<number | null>(null);
|
|
57
|
+
|
|
58
|
+
protected readonly inputDescription = computed(() => {
|
|
59
|
+
const max = this.inputMaxValue();
|
|
60
|
+
|
|
61
|
+
if (max === null) {
|
|
62
|
+
return '';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return `Максимум для ввода - ${max}`;
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
protected stateObjects = this._selectedService?.state;
|
|
69
|
+
protected stateUnfetchedObjects = this._selectedService?.stateUnfetchedObjects;
|
|
70
|
+
|
|
71
|
+
constructor() {
|
|
72
|
+
effect(() => {
|
|
73
|
+
const loading = this.loading();
|
|
74
|
+
const isOpen = this.loading();
|
|
75
|
+
|
|
76
|
+
if (loading === false && isOpen) {
|
|
77
|
+
untracked(() => {
|
|
78
|
+
this.close();
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
protected selectElement(newElement: SelectionTypes): void {
|
|
85
|
+
this.selectedElement.update((currentElement) =>
|
|
86
|
+
currentElement === newElement ? null : newElement
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
protected onInputFocus(): void {
|
|
91
|
+
this.selectedElement.set(SelectionTypes.COUNT);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
protected applySelection(): void {
|
|
95
|
+
let result: SelectionTypes | number | null = this.selectedElement();
|
|
96
|
+
|
|
97
|
+
if (!result) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (result === SelectionTypes.COUNT) {
|
|
102
|
+
result = this.inputValue();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
this.onApply.emit(result);
|
|
106
|
+
this.close();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
protected toggle(): void {
|
|
110
|
+
if (!this.disabled()) {
|
|
111
|
+
this.isOpen.update((isOpen) => !isOpen);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
protected calcIndeterminate(): boolean {
|
|
116
|
+
const state = this.stateObjects?.();
|
|
117
|
+
|
|
118
|
+
if (state) {
|
|
119
|
+
const fetchedObjects = [...state.values()];
|
|
120
|
+
const selectedObjects = fetchedObjects.filter(
|
|
121
|
+
(obj) => obj.state === ERegisterObjectState.SELECTED
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
const someFetchedIsNotSelected = fetchedObjects.length !== selectedObjects.length;
|
|
125
|
+
const fetchedIsAll = fetchedObjects.length === this.totalRecords();
|
|
126
|
+
const unfetchedAreSelected = this.stateUnfetchedObjects!() === ERegisterObjectState.SELECTED;
|
|
127
|
+
|
|
128
|
+
if (selectedObjects.length > 0) {
|
|
129
|
+
return someFetchedIsNotSelected || !(fetchedIsAll || unfetchedAreSelected);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return !fetchedIsAll && unfetchedAreSelected;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return this.selected().size > 0 && this.selected().size !== this.totalRecords();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
protected calcChecked(): boolean {
|
|
139
|
+
const state = this.stateObjects?.();
|
|
140
|
+
|
|
141
|
+
if (state) {
|
|
142
|
+
const fetchedObjects = [...state.values()];
|
|
143
|
+
const selectedObjects = fetchedObjects.filter(
|
|
144
|
+
(obj) => obj.state === ERegisterObjectState.SELECTED
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
const fetchedAreSelected = fetchedObjects.length === selectedObjects.length;
|
|
148
|
+
const selectedIsAll = selectedObjects.length === this.totalRecords();
|
|
149
|
+
const unfetchedAreSelected = this.stateUnfetchedObjects!() === ERegisterObjectState.SELECTED;
|
|
150
|
+
|
|
151
|
+
return (
|
|
152
|
+
selectedObjects.length > 0 && fetchedAreSelected && (selectedIsAll || unfetchedAreSelected)
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return this.selected().size > 0 && this.selected().size === this.totalRecords();
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
protected close(): void {
|
|
160
|
+
if (!this.disabled()) {
|
|
161
|
+
this.isOpen.set(false);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
protected inputValueChanges(value: number): void {
|
|
166
|
+
this.selectedElement.set(SelectionTypes.COUNT);
|
|
167
|
+
this.inputValue.set(value);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
protected dropSelection(): void {
|
|
171
|
+
this.inputValue.set(null);
|
|
172
|
+
this.selectedElement.set(null);
|
|
173
|
+
this.onApply.emit(null);
|
|
174
|
+
this.close();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<button
|
|
2
|
+
tuiButton
|
|
3
|
+
class="column-settings__main-button"
|
|
4
|
+
appearance="outline-grayscale"
|
|
5
|
+
size="m"
|
|
6
|
+
[disabled]="disabled()"
|
|
7
|
+
(click)="toggle()"
|
|
8
|
+
>
|
|
9
|
+
<tui-icon class="column-settings__icon gray" [icon]="iconSettings"></tui-icon>
|
|
10
|
+
</button>
|
|
11
|
+
|
|
12
|
+
<tui-drawer
|
|
13
|
+
*tuiPopup="openSettings()"
|
|
14
|
+
class="column-settings__popup"
|
|
15
|
+
direction="right"
|
|
16
|
+
[overlay]="true"
|
|
17
|
+
(click.self)="close()"
|
|
18
|
+
>
|
|
19
|
+
<header class="header" [style.height.px]="columnSettingsHeaderHeightPx">
|
|
20
|
+
<span class="header__title">Настройка таблицы</span>
|
|
21
|
+
<div class="header__buttons">
|
|
22
|
+
<button
|
|
23
|
+
tuiIconButton
|
|
24
|
+
class="reset-button"
|
|
25
|
+
appearance="flat"
|
|
26
|
+
size="m"
|
|
27
|
+
(click)="openResetDialog()"
|
|
28
|
+
>
|
|
29
|
+
<tui-icon class="column-settings__icon" [icon]="iconEraser"></tui-icon>
|
|
30
|
+
</button>
|
|
31
|
+
<sproc-divider layout="vertical"></sproc-divider>
|
|
32
|
+
<button tuiIconButton class="close-button" appearance="flat" size="m" (click)="close()">
|
|
33
|
+
<tui-icon class="column-settings__icon" [icon]="iconCancelClose"></tui-icon>
|
|
34
|
+
</button>
|
|
35
|
+
</div>
|
|
36
|
+
</header>
|
|
37
|
+
<div
|
|
38
|
+
cdkDropListGroup
|
|
39
|
+
class="column-container tui__t-content--no-default-padding"
|
|
40
|
+
[style.height.px]="columnListHeightPx()"
|
|
41
|
+
>
|
|
42
|
+
<div
|
|
43
|
+
cdkDropList
|
|
44
|
+
class="column-list"
|
|
45
|
+
[cdkDropListData]="fixedLeftColumns()"
|
|
46
|
+
(cdkDropListDropped)="dropIntoFixedLeft($event)"
|
|
47
|
+
[cdkDropListEnterPredicate]="fixedLeftListEnterPredicate()"
|
|
48
|
+
>
|
|
49
|
+
@if (showLeftListHeader()) {
|
|
50
|
+
<div class="column-list__label-container">
|
|
51
|
+
<span class="subtitle" [style.height.px]="columnSettingsSubtitleHeightPx">
|
|
52
|
+
Фиксированные колонки слева
|
|
53
|
+
</span>
|
|
54
|
+
</div>
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
<tui-scrollbar
|
|
58
|
+
[style.max-height.px]="scrollBoxFixedColumnsMaxHeightPx"
|
|
59
|
+
(waResizeObserver)="onFixedScrollbarResize($event)"
|
|
60
|
+
>
|
|
61
|
+
@for (fixedLeftColumn of fixedLeftColumns(); track fixedLeftColumn.id) {
|
|
62
|
+
<sproc-column-settings-template
|
|
63
|
+
[column]="fixedLeftColumn"
|
|
64
|
+
></sproc-column-settings-template>
|
|
65
|
+
}
|
|
66
|
+
</tui-scrollbar>
|
|
67
|
+
</div>
|
|
68
|
+
<sproc-divider></sproc-divider>
|
|
69
|
+
<div
|
|
70
|
+
cdkDropList
|
|
71
|
+
class="column-list"
|
|
72
|
+
[style.padding-bottom.px]="columnListBottomPaddingPx"
|
|
73
|
+
[cdkDropListData]="columns()"
|
|
74
|
+
(cdkDropListDropped)="dropIntoColumns($event)"
|
|
75
|
+
[cdkDropListEnterPredicate]="columnsListEnterPredicate()"
|
|
76
|
+
>
|
|
77
|
+
<div class="column-list__label-container">
|
|
78
|
+
<span
|
|
79
|
+
class="subtitle subtitle--flex-grow-1"
|
|
80
|
+
[style.height.px]="columnSettingsSubtitleHeightPx"
|
|
81
|
+
>{{ columnsListHeader() }}</span
|
|
82
|
+
>
|
|
83
|
+
<span class="show-all" (click)="showAllColumns()">Показать все</span>
|
|
84
|
+
</div>
|
|
85
|
+
<tui-scrollbar [style.max-height.px]="scrollBoxColumnsMaxHeightPx()">
|
|
86
|
+
@for (column of columns(); track column.id) {
|
|
87
|
+
<sproc-column-settings-template [column]="column"></sproc-column-settings-template>
|
|
88
|
+
}
|
|
89
|
+
</tui-scrollbar>
|
|
90
|
+
</div>
|
|
91
|
+
@if (showFixedRightList()) {
|
|
92
|
+
<sproc-divider></sproc-divider>
|
|
93
|
+
<div
|
|
94
|
+
cdkDropList
|
|
95
|
+
class="column-list"
|
|
96
|
+
[style.padding-bottom.px]="columnListBottomPaddingPx"
|
|
97
|
+
[cdkDropListData]="fixedRightColumns()"
|
|
98
|
+
(cdkDropListDropped)="dropIntoColumns($event)"
|
|
99
|
+
[cdkDropListEnterPredicate]="fixedRightListEnterPredicate()"
|
|
100
|
+
>
|
|
101
|
+
@if (showRightListHeader()) {
|
|
102
|
+
<div class="column-list__label-container">
|
|
103
|
+
<span
|
|
104
|
+
class="subtitle subtitle--flex-grow-1"
|
|
105
|
+
[style.height.px]="columnSettingsSubtitleHeightPx"
|
|
106
|
+
>Фиксированные колонки справа</span
|
|
107
|
+
>
|
|
108
|
+
</div>
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
<tui-scrollbar
|
|
112
|
+
[style.max-height.px]="scrollBoxFixedColumnsMaxHeightPx"
|
|
113
|
+
(waResizeObserver)="onRightFixedScrollbarResize($event)"
|
|
114
|
+
>
|
|
115
|
+
@for (column of fixedRightColumns(); track column.id) {
|
|
116
|
+
<sproc-column-settings-template [column]="column"></sproc-column-settings-template>
|
|
117
|
+
}
|
|
118
|
+
</tui-scrollbar>
|
|
119
|
+
</div>
|
|
120
|
+
}
|
|
121
|
+
</div>
|
|
122
|
+
<footer class="footer" [style.height.px]="columnSettingsFooterHeightPx">
|
|
123
|
+
<button
|
|
124
|
+
tuiButton
|
|
125
|
+
class="save-button"
|
|
126
|
+
size="m"
|
|
127
|
+
appearance="primary"
|
|
128
|
+
(click)="saveTableSettings()"
|
|
129
|
+
>
|
|
130
|
+
Сохранить
|
|
131
|
+
</button>
|
|
132
|
+
</footer>
|
|
133
|
+
</tui-drawer>
|
|
134
|
+
|
|
135
|
+
<ng-template #resetSettings>
|
|
136
|
+
<sproc-reset-settings-form></sproc-reset-settings-form>
|
|
137
|
+
</ng-template>
|
|
138
|
+
|
|
139
|
+
<ng-template #resetSettingsFooter let-completeWith="completeWith">
|
|
140
|
+
<div style="width: 100%; display: flex; justify-content: center; gap: 8px">
|
|
141
|
+
<button
|
|
142
|
+
tuiButton
|
|
143
|
+
style="width: 196px"
|
|
144
|
+
appearance="primary-destructive"
|
|
145
|
+
size="l"
|
|
146
|
+
(click)="deleteSettings(); completeWith(true)"
|
|
147
|
+
>
|
|
148
|
+
Сбросить
|
|
149
|
+
</button>
|
|
150
|
+
<button
|
|
151
|
+
tuiButton
|
|
152
|
+
style="width: 196px"
|
|
153
|
+
appearance="outline-grayscale"
|
|
154
|
+
size="l"
|
|
155
|
+
(click)="completeWith(false)"
|
|
156
|
+
>
|
|
157
|
+
Отмена
|
|
158
|
+
</button>
|
|
159
|
+
</div>
|
|
160
|
+
</ng-template>
|