ngx-register-base 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/checkbox-selector/checkbox-selector.component.mjs +129 -0
- package/esm2022/lib/components/checkbox-selector/checkbox-selector.types.mjs +8 -0
- package/esm2022/lib/components/column-settings/column-settings.component.mjs +249 -0
- package/esm2022/lib/components/column-settings/components/column-settings-template/column-settings-template.component.mjs +80 -0
- package/esm2022/lib/components/column-settings/consts/column-settings.consts.mjs +10 -0
- package/esm2022/lib/components/column-settings/index.mjs +3 -0
- package/esm2022/lib/components/column-settings/types/column-settings.types.mjs +7 -0
- package/esm2022/lib/components/divider/divider.component.mjs +16 -0
- package/esm2022/lib/components/filter-button/filter-button.component.mjs +19 -0
- package/esm2022/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.mjs +31 -0
- package/esm2022/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.mjs +57 -0
- package/esm2022/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.mjs +110 -0
- package/esm2022/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.mjs +130 -0
- package/esm2022/lib/components/filters/components/filter-list/filter-list.service.mjs +89 -0
- package/esm2022/lib/components/filters/components/filter-list/filters-section/filters-section.component.mjs +41 -0
- package/esm2022/lib/components/filters/components/filter-list.module.mjs +45 -0
- package/esm2022/lib/components/filters/index.mjs +3 -0
- package/esm2022/lib/components/filters/register-table-filter.component.mjs +155 -0
- package/esm2022/lib/components/filters/register-table-filter.module.mjs +39 -0
- package/esm2022/lib/components/index.mjs +11 -0
- package/esm2022/lib/components/inputs/index.mjs +20 -0
- package/esm2022/lib/components/inputs/inputs.module.mjs +166 -0
- package/esm2022/lib/components/inputs/param-calendar-year/param-calendar-year.component.mjs +45 -0
- package/esm2022/lib/components/inputs/param-custom/param-custom.component.mjs +12 -0
- package/esm2022/lib/components/inputs/param-date/param-date.component.mjs +76 -0
- package/esm2022/lib/components/inputs/param-date-range/param-date-range.component.mjs +60 -0
- package/esm2022/lib/components/inputs/param-date-time/param-date-time.component.mjs +86 -0
- package/esm2022/lib/components/inputs/param-date-time-range/param-date-time-range.component.mjs +95 -0
- package/esm2022/lib/components/inputs/param-month/param-month.component.mjs +50 -0
- package/esm2022/lib/components/inputs/param-month-range/param-month-range.component.mjs +62 -0
- package/esm2022/lib/components/inputs/param-multi-select/param-multi-select.component.mjs +309 -0
- package/esm2022/lib/components/inputs/param-select/param-select.component.mjs +225 -0
- package/esm2022/lib/components/inputs/param-switcher/param-switcher.component.mjs +21 -0
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.mjs +28 -0
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/index.mjs +3 -0
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.mjs +105 -0
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.mjs +10 -0
- package/esm2022/lib/components/inputs/param-text/param-text.component.mjs +40 -0
- package/esm2022/lib/components/inputs/param-textarea/param-textarea.component.mjs +38 -0
- package/esm2022/lib/components/inputs/param-toggle/param-toggle.component.mjs +20 -0
- package/esm2022/lib/components/inputs/param-tree/consts/param-tree.consts.mjs +37 -0
- package/esm2022/lib/components/inputs/param-tree/index.mjs +8 -0
- package/esm2022/lib/components/inputs/param-tree/param-tree.component.mjs +207 -0
- package/esm2022/lib/components/inputs/param-tree/services/param-tree.service.mjs +116 -0
- package/esm2022/lib/components/inputs/param-tree/services/sync-tree-loader.service.mjs +20 -0
- package/esm2022/lib/components/inputs/param-tree/tokens/param-tree.tokens.mjs +3 -0
- package/esm2022/lib/components/inputs/param-tree/types/param-tree.types.mjs +2 -0
- package/esm2022/lib/components/inputs/param-tree/utils/param-tree.utils.mjs +9 -0
- package/esm2022/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.mjs +80 -0
- package/esm2022/lib/components/inputs/param-tree-select/param-tree-select.component.mjs +85 -0
- package/esm2022/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.mjs +15 -0
- package/esm2022/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.mjs +12 -0
- package/esm2022/lib/components/menu-constructor/index.mjs +5 -0
- package/esm2022/lib/components/menu-constructor/sproc-menu-constructor.component.mjs +559 -0
- package/esm2022/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.mjs +3 -0
- package/esm2022/lib/components/menu-constructor/store/sproc-menu-constructor.consts.mjs +5 -0
- package/esm2022/lib/components/menu-constructor/store/sproc-menu.tokens.mjs +3 -0
- package/esm2022/lib/components/page-menu/index.mjs +6 -0
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.consts.mjs +9 -0
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.schema.mjs +2 -0
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.tokens.mjs +4 -0
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.types.mjs +3 -0
- package/esm2022/lib/components/page-menu/sproc-page-menu.component.mjs +275 -0
- package/esm2022/lib/components/paginator/paginator.component.mjs +159 -0
- package/esm2022/lib/components/paginator/types/paginator.types.mjs +2 -0
- package/esm2022/lib/components/register-table/consts/register-table.consts.mjs +4 -0
- package/esm2022/lib/components/register-table/directives/cell-template.directive.mjs +19 -0
- package/esm2022/lib/components/register-table/directives/header-template.directive.mjs +18 -0
- package/esm2022/lib/components/register-table/index.mjs +4 -0
- package/esm2022/lib/components/register-table/model/schema.mjs +10 -0
- package/esm2022/lib/components/register-table/pipes/class-by-type.pipe.mjs +33 -0
- package/esm2022/lib/components/register-table/pipes/sticky-column.pipe.mjs +17 -0
- package/esm2022/lib/components/register-table/register-table.component.mjs +544 -0
- package/esm2022/lib/components/reset-settings-form/reset-settings-form.component.mjs +18 -0
- package/esm2022/lib/components/search-input/search-input.component.mjs +28 -0
- package/esm2022/lib/components/sliding-panel/sliding-panel.component.mjs +48 -0
- package/esm2022/lib/components/sliding-panel/sliding-panel.module.mjs +19 -0
- package/esm2022/lib/consts/date-time.consts.mjs +2 -0
- package/esm2022/lib/consts/index.mjs +4 -0
- package/esm2022/lib/consts/inputs.consts.mjs +4 -0
- package/esm2022/lib/consts/month.consts.mjs +77 -0
- package/esm2022/lib/consts/params.consts.mjs +2 -0
- package/esm2022/lib/consts/register-base.consts.mjs +26 -0
- package/esm2022/lib/core/form-group-wrapper/errors-consts.mjs +8 -0
- package/esm2022/lib/core/form-group-wrapper/form-group-wrapper.mjs +81 -0
- package/esm2022/lib/core/form-group-wrapper/index.mjs +2 -0
- package/esm2022/lib/core/index.mjs +5 -0
- package/esm2022/lib/core/input-control/index.mjs +2 -0
- package/esm2022/lib/core/input-control/input-control.mjs +11 -0
- package/esm2022/lib/core/param/index.mjs +6 -0
- package/esm2022/lib/core/param/param-base.mjs +215 -0
- package/esm2022/lib/core/param/param-date-base.mjs +26 -0
- package/esm2022/lib/core/param/param-select-base.mjs +114 -0
- package/esm2022/lib/core/param/param-text-base.mjs +25 -0
- package/esm2022/lib/core/param/param.tokens.mjs +4 -0
- package/esm2022/lib/core/register-base/index.mjs +3 -0
- package/esm2022/lib/core/register-base/register-base.mjs +575 -0
- package/esm2022/lib/core/register-base/register-base.store.mjs +43 -0
- package/esm2022/lib/directives/date/date-time.types.mjs +34 -0
- package/esm2022/lib/directives/date/format-date.pipe.mjs +33 -0
- package/esm2022/lib/directives/index.mjs +3 -0
- package/esm2022/lib/directives/number/number-only.directive.mjs +41 -0
- package/esm2022/lib/directives/sticky/index.mjs +3 -0
- package/esm2022/lib/directives/sticky/sticky-relative.directive.mjs +32 -0
- package/esm2022/lib/directives/sticky/sticky-relative.service.mjs +32 -0
- package/esm2022/lib/directives/sticky/sticky.directive.mjs +169 -0
- package/esm2022/lib/services/date-time.service.mjs +314 -0
- package/esm2022/lib/services/dialog/dialog.service.mjs +53 -0
- package/esm2022/lib/services/dialog/dialog.types.mjs +2 -0
- package/esm2022/lib/services/dialog/index.mjs +3 -0
- package/esm2022/lib/services/dom-intersection.service.mjs +22 -0
- package/esm2022/lib/services/filter/filters-state.service.mjs +65 -0
- package/esm2022/lib/services/filter/filters-transmit.service.mjs +82 -0
- package/esm2022/lib/services/filter/filters.service.mjs +23 -0
- package/esm2022/lib/services/index.mjs +8 -0
- package/esm2022/lib/services/inputs-state.service.mjs +130 -0
- package/esm2022/lib/services/inputs.service.mjs +88 -0
- package/esm2022/lib/services/key-pressed.service.mjs +37 -0
- package/esm2022/lib/services/resize-window-observer.service.mjs +33 -0
- package/esm2022/lib/services/selected-objects-state.service.mjs +123 -0
- package/esm2022/lib/store/fast-query-store.service.mjs +110 -0
- package/esm2022/lib/store/index.mjs +2 -0
- package/esm2022/lib/types/event.types.mjs +2 -0
- package/esm2022/lib/types/hasura.types.mjs +2 -0
- package/esm2022/lib/types/index.mjs +7 -0
- package/esm2022/lib/types/inputs.types.mjs +19 -0
- package/esm2022/lib/types/params.types.mjs +2 -0
- package/esm2022/lib/types/register-base.types.mjs +6 -0
- package/esm2022/lib/types/sub-types.mjs +2 -0
- package/esm2022/lib/types/user-profile.types.mjs +2 -0
- package/esm2022/lib/utils/functions.mjs +10 -0
- package/esm2022/lib/utils/get-url-segment.mjs +35 -0
- package/esm2022/lib/utils/index.mjs +5 -0
- package/esm2022/lib/utils/prizm.shared.module.mjs +284 -0
- package/esm2022/lib/utils/rxjs.mjs +28 -0
- package/esm2022/lib/utils/select-all-utils.mjs +11 -0
- package/esm2022/ngx-register-base.mjs +5 -0
- package/esm2022/public-api.mjs +9 -0
- package/fesm2022/ngx-register-base.mjs +7479 -0
- package/fesm2022/ngx-register-base.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/checkbox-selector/checkbox-selector.component.d.ts +33 -0
- package/lib/components/checkbox-selector/checkbox-selector.types.d.ts +7 -0
- package/lib/components/column-settings/column-settings.component.d.ts +80 -0
- package/lib/components/column-settings/components/column-settings-template/column-settings-template.component.d.ts +24 -0
- package/lib/components/column-settings/consts/column-settings.consts.d.ts +8 -0
- package/lib/components/column-settings/types/column-settings.types.d.ts +22 -0
- package/lib/components/divider/divider.component.d.ts +6 -0
- package/lib/components/filter-button/filter-button.component.d.ts +8 -0
- package/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.d.ts +14 -0
- package/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.d.ts +25 -0
- package/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.d.ts +39 -0
- package/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.d.ts +41 -0
- package/lib/components/filters/components/filter-list/filter-list.service.d.ts +20 -0
- package/lib/components/filters/components/filter-list/filters-section/filters-section.component.d.ts +15 -0
- package/lib/components/filters/components/filter-list.module.d.ts +15 -0
- package/lib/components/filters/register-table-filter.component.d.ts +40 -0
- package/lib/components/filters/register-table-filter.module.d.ts +13 -0
- package/lib/components/inputs/inputs.module.d.ts +31 -0
- package/lib/components/inputs/param-calendar-year/param-calendar-year.component.d.ts +19 -0
- package/lib/components/inputs/param-custom/param-custom.component.d.ts +6 -0
- package/lib/components/inputs/param-date/param-date.component.d.ts +20 -0
- package/lib/components/inputs/param-date-range/param-date-range.component.d.ts +26 -0
- package/lib/components/inputs/param-date-time/param-date-time.component.d.ts +25 -0
- package/lib/components/inputs/param-date-time-range/param-date-time-range.component.d.ts +28 -0
- package/lib/components/inputs/param-month/param-month.component.d.ts +18 -0
- package/lib/components/inputs/param-month-range/param-month-range.component.d.ts +21 -0
- package/lib/components/inputs/param-multi-select/param-multi-select.component.d.ts +46 -0
- package/lib/components/inputs/param-select/param-select.component.d.ts +34 -0
- package/lib/components/inputs/param-switcher/param-switcher.component.d.ts +8 -0
- package/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.d.ts +2 -0
- package/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.d.ts +19 -0
- package/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.d.ts +8 -0
- package/lib/components/inputs/param-text/param-text.component.d.ts +10 -0
- package/lib/components/inputs/param-textarea/param-textarea.component.d.ts +10 -0
- package/lib/components/inputs/param-toggle/param-toggle.component.d.ts +9 -0
- package/lib/components/inputs/param-tree/consts/param-tree.consts.d.ts +7 -0
- package/lib/components/inputs/param-tree/param-tree.component.d.ts +41 -0
- package/lib/components/inputs/param-tree/services/param-tree.service.d.ts +37 -0
- package/lib/components/inputs/param-tree/services/sync-tree-loader.service.d.ts +10 -0
- package/{src/lib/components/inputs/param-tree/tokens/param-tree.tokens.ts → lib/components/inputs/param-tree/tokens/param-tree.tokens.d.ts} +1 -2
- package/lib/components/inputs/param-tree/types/param-tree.types.d.ts +32 -0
- package/lib/components/inputs/param-tree/utils/param-tree.utils.d.ts +7 -0
- package/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.d.ts +31 -0
- package/lib/components/inputs/param-tree-select/param-tree-select.component.d.ts +30 -0
- package/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.d.ts +6 -0
- package/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.d.ts +5 -0
- package/lib/components/menu-constructor/sproc-menu-constructor.component.d.ts +113 -0
- package/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.d.ts +24 -0
- package/lib/components/menu-constructor/store/sproc-menu-constructor.consts.d.ts +36 -0
- package/{src/lib/components/menu-constructor/store/sproc-menu.tokens.ts → lib/components/menu-constructor/store/sproc-menu.tokens.d.ts} +1 -4
- package/lib/components/page-menu/schema/sproc-page-menu.consts.d.ts +7 -0
- package/lib/components/page-menu/schema/sproc-page-menu.schema.d.ts +30 -0
- package/lib/components/page-menu/schema/sproc-page-menu.tokens.d.ts +3 -0
- package/lib/components/page-menu/schema/sproc-page-menu.types.d.ts +36 -0
- package/lib/components/page-menu/sproc-page-menu.component.d.ts +48 -0
- package/lib/components/paginator/paginator.component.d.ts +52 -0
- package/lib/components/paginator/types/paginator.types.d.ts +15 -0
- package/lib/components/register-table/consts/register-table.consts.d.ts +3 -0
- package/lib/components/register-table/directives/cell-template.directive.d.ts +9 -0
- package/lib/components/register-table/directives/header-template.directive.d.ts +9 -0
- package/lib/components/register-table/model/schema.d.ts +52 -0
- package/lib/components/register-table/pipes/class-by-type.pipe.d.ts +8 -0
- package/lib/components/register-table/pipes/sticky-column.pipe.d.ts +7 -0
- package/lib/components/register-table/register-table.component.d.ts +165 -0
- package/lib/components/reset-settings-form/reset-settings-form.component.d.ts +9 -0
- package/lib/components/search-input/search-input.component.d.ts +11 -0
- package/lib/components/sliding-panel/sliding-panel.component.d.ts +14 -0
- package/lib/components/sliding-panel/sliding-panel.module.d.ts +9 -0
- package/lib/consts/date-time.consts.d.ts +1 -0
- package/lib/consts/index.d.ts +3 -0
- package/lib/consts/inputs.consts.d.ts +4 -0
- package/lib/consts/month.consts.d.ts +49 -0
- package/lib/consts/params.consts.d.ts +1 -0
- package/lib/consts/register-base.consts.d.ts +19 -0
- package/lib/core/form-group-wrapper/errors-consts.d.ts +5 -0
- package/lib/core/form-group-wrapper/form-group-wrapper.d.ts +15 -0
- package/lib/core/input-control/input-control.d.ts +11 -0
- package/lib/core/param/param-base.d.ts +68 -0
- package/lib/core/param/param-date-base.d.ts +18 -0
- package/lib/core/param/param-select-base.d.ts +42 -0
- package/lib/core/param/param-text-base.d.ts +15 -0
- package/{src/lib/core/param/param.tokens.ts → lib/core/param/param.tokens.d.ts} +1 -2
- package/lib/core/register-base/register-base.d.ts +168 -0
- package/lib/core/register-base/register-base.store.d.ts +35 -0
- package/lib/directives/date/date-time.types.d.ts +32 -0
- package/lib/directives/date/format-date.pipe.d.ts +10 -0
- package/lib/directives/number/number-only.directive.d.ts +10 -0
- package/lib/directives/sticky/sticky-relative.directive.d.ts +13 -0
- package/lib/directives/sticky/sticky-relative.service.d.ts +15 -0
- package/lib/directives/sticky/sticky.directive.d.ts +27 -0
- package/lib/services/date-time.service.d.ts +80 -0
- package/lib/services/dialog/dialog.service.d.ts +22 -0
- package/{src/lib/services/dialog/dialog.types.ts → lib/services/dialog/dialog.types.d.ts} +4 -8
- package/lib/services/dom-intersection.service.d.ts +8 -0
- package/lib/services/filter/filters-state.service.d.ts +21 -0
- package/lib/services/filter/filters-transmit.service.d.ts +28 -0
- package/lib/services/filter/filters.service.d.ts +12 -0
- package/lib/services/inputs-state.service.d.ts +57 -0
- package/lib/services/inputs.service.d.ts +28 -0
- package/lib/services/key-pressed.service.d.ts +15 -0
- package/lib/services/resize-window-observer.service.d.ts +11 -0
- package/lib/services/selected-objects-state.service.d.ts +47 -0
- package/lib/store/fast-query-store.service.d.ts +19 -0
- package/{src/lib/types/event.types.ts → lib/types/event.types.d.ts} +1 -1
- package/lib/types/hasura.types.d.ts +35 -0
- package/lib/types/inputs.types.d.ts +41 -0
- package/lib/types/params.types.d.ts +27 -0
- package/lib/types/register-base.types.d.ts +123 -0
- package/lib/types/sub-types.d.ts +8 -0
- package/lib/types/user-profile.types.d.ts +17 -0
- package/lib/utils/functions.d.ts +3 -0
- package/lib/utils/get-url-segment.d.ts +7 -0
- package/lib/utils/prizm.shared.module.d.ts +14 -0
- package/lib/utils/rxjs.d.ts +10 -0
- package/lib/utils/select-all-utils.d.ts +8 -0
- package/package.json +15 -12
- package/schematics/ng-update/replace-menu-state-token/index.d.ts +2 -0
- package/schematics/ng-update/replace-menu-state-token/index.js +29 -0
- package/schematics/ng-update/replace-menu-state-token/index.js.map +1 -0
- package/schematics/ng-update/update-prefix/index.d.ts +2 -0
- package/schematics/ng-update/update-prefix/index.js +33 -0
- package/schematics/ng-update/update-prefix/index.js.map +1 -0
- package/schematics/utils/{utils.ts → utils.d.ts} +2 -9
- package/schematics/utils/utils.js +25 -0
- package/schematics/utils/utils.js.map +1 -0
- package/ng-package.json +0 -15
- package/schematics/ng-update/replace-menu-state-token/index.ts +0 -33
- package/schematics/ng-update/update-prefix/index.ts +0 -38
- package/src/lib/components/checkbox-selector/checkbox-selector.component.html +0 -91
- package/src/lib/components/checkbox-selector/checkbox-selector.component.less +0 -67
- package/src/lib/components/checkbox-selector/checkbox-selector.component.ts +0 -176
- package/src/lib/components/checkbox-selector/checkbox-selector.types.ts +0 -8
- package/src/lib/components/column-settings/column-settings.component.html +0 -160
- package/src/lib/components/column-settings/column-settings.component.less +0 -131
- package/src/lib/components/column-settings/column-settings.component.ts +0 -352
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.html +0 -65
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.less +0 -79
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.ts +0 -114
- package/src/lib/components/column-settings/consts/column-settings.consts.ts +0 -9
- package/src/lib/components/column-settings/types/column-settings.types.ts +0 -26
- package/src/lib/components/divider/divider.component.html +0 -4
- package/src/lib/components/divider/divider.component.less +0 -10
- package/src/lib/components/divider/divider.component.ts +0 -12
- package/src/lib/components/filter-button/filter-button.component.html +0 -20
- package/src/lib/components/filter-button/filter-button.component.less +0 -41
- package/src/lib/components/filter-button/filter-button.component.ts +0 -18
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.html +0 -22
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.less +0 -23
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.ts +0 -31
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.html +0 -49
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.less +0 -37
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.ts +0 -66
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.html +0 -147
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.less +0 -45
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.ts +0 -114
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.html +0 -44
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.less +0 -49
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.ts +0 -167
- package/src/lib/components/filters/components/filter-list/filter-list.service.ts +0 -97
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.html +0 -18
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.less +0 -55
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.ts +0 -69
- package/src/lib/components/filters/components/filter-list.module.ts +0 -29
- package/src/lib/components/filters/register-table-filter.component.html +0 -53
- package/src/lib/components/filters/register-table-filter.component.less +0 -17
- package/src/lib/components/filters/register-table-filter.component.ts +0 -167
- package/src/lib/components/filters/register-table-filter.module.ts +0 -22
- package/src/lib/components/inputs/inputs.module.ts +0 -104
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.html +0 -49
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.less +0 -70
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.ts +0 -52
- package/src/lib/components/inputs/param-custom/param-custom.component.html +0 -1
- package/src/lib/components/inputs/param-custom/param-custom.component.ts +0 -9
- package/src/lib/components/inputs/param-date/param-date.component.html +0 -55
- package/src/lib/components/inputs/param-date/param-date.component.less +0 -67
- package/src/lib/components/inputs/param-date/param-date.component.ts +0 -77
- package/src/lib/components/inputs/param-date-range/param-date-range.component.html +0 -45
- package/src/lib/components/inputs/param-date-range/param-date-range.component.less +0 -75
- package/src/lib/components/inputs/param-date-range/param-date-range.component.ts +0 -67
- package/src/lib/components/inputs/param-date-time/param-date-time.component.html +0 -70
- package/src/lib/components/inputs/param-date-time/param-date-time.component.less +0 -72
- package/src/lib/components/inputs/param-date-time/param-date-time.component.ts +0 -101
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.html +0 -67
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.less +0 -103
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.ts +0 -128
- package/src/lib/components/inputs/param-month/param-month.component.html +0 -46
- package/src/lib/components/inputs/param-month/param-month.component.less +0 -72
- package/src/lib/components/inputs/param-month/param-month.component.ts +0 -55
- package/src/lib/components/inputs/param-month-range/param-month-range.component.html +0 -39
- package/src/lib/components/inputs/param-month-range/param-month-range.component.less +0 -71
- package/src/lib/components/inputs/param-month-range/param-month-range.component.ts +0 -76
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.html +0 -84
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.less +0 -108
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.ts +0 -448
- package/src/lib/components/inputs/param-select/param-select.component.html +0 -106
- package/src/lib/components/inputs/param-select/param-select.component.less +0 -26
- package/src/lib/components/inputs/param-select/param-select.component.ts +0 -318
- package/src/lib/components/inputs/param-switcher/param-switcher.component.html +0 -8
- package/src/lib/components/inputs/param-switcher/param-switcher.component.less +0 -53
- package/src/lib/components/inputs/param-switcher/param-switcher.component.ts +0 -13
- package/src/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.ts +0 -29
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.html +0 -19
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.less +0 -76
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.ts +0 -134
- package/src/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.ts +0 -8
- package/src/lib/components/inputs/param-text/param-text.component.html +0 -59
- package/src/lib/components/inputs/param-text/param-text.component.less +0 -33
- package/src/lib/components/inputs/param-text/param-text.component.ts +0 -36
- package/src/lib/components/inputs/param-textarea/param-textarea.component.html +0 -61
- package/src/lib/components/inputs/param-textarea/param-textarea.component.less +0 -21
- package/src/lib/components/inputs/param-textarea/param-textarea.component.ts +0 -33
- package/src/lib/components/inputs/param-toggle/param-toggle.component.html +0 -40
- package/src/lib/components/inputs/param-toggle/param-toggle.component.less +0 -69
- package/src/lib/components/inputs/param-toggle/param-toggle.component.ts +0 -14
- package/src/lib/components/inputs/param-tree/consts/param-tree.consts.ts +0 -59
- package/src/lib/components/inputs/param-tree/param-tree.component.html +0 -51
- package/src/lib/components/inputs/param-tree/param-tree.component.less +0 -3
- package/src/lib/components/inputs/param-tree/param-tree.component.ts +0 -282
- package/src/lib/components/inputs/param-tree/services/param-tree.service.ts +0 -176
- package/src/lib/components/inputs/param-tree/services/sync-tree-loader.service.ts +0 -18
- package/src/lib/components/inputs/param-tree/types/param-tree.types.ts +0 -39
- package/src/lib/components/inputs/param-tree/utils/param-tree.utils.ts +0 -18
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.html +0 -78
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.less +0 -109
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.ts +0 -89
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.html +0 -54
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.less +0 -56
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.ts +0 -91
- package/src/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.html +0 -5
- package/src/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.ts +0 -13
- package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.html +0 -4
- package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.ts +0 -11
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.html +0 -95
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.less +0 -183
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.ts +0 -687
- package/src/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.ts +0 -32
- package/src/lib/components/menu-constructor/store/sproc-menu-constructor.consts.ts +0 -46
- package/src/lib/components/page-menu/README.md +0 -60
- package/src/lib/components/page-menu/schema/sproc-page-menu.consts.ts +0 -8
- package/src/lib/components/page-menu/schema/sproc-page-menu.schema.ts +0 -35
- package/src/lib/components/page-menu/schema/sproc-page-menu.tokens.ts +0 -5
- package/src/lib/components/page-menu/schema/sproc-page-menu.types.ts +0 -42
- package/src/lib/components/page-menu/sproc-page-menu.component.html +0 -166
- package/src/lib/components/page-menu/sproc-page-menu.component.less +0 -228
- package/src/lib/components/page-menu/sproc-page-menu.component.ts +0 -337
- package/src/lib/components/paginator/paginator.component.html +0 -97
- package/src/lib/components/paginator/paginator.component.less +0 -101
- package/src/lib/components/paginator/paginator.component.ts +0 -192
- package/src/lib/components/paginator/types/paginator.types.ts +0 -16
- package/src/lib/components/register-table/consts/register-table.consts.ts +0 -3
- package/src/lib/components/register-table/directives/cell-template.directive.ts +0 -11
- package/src/lib/components/register-table/directives/header-template.directive.ts +0 -11
- package/src/lib/components/register-table/model/schema.ts +0 -62
- package/src/lib/components/register-table/pipes/class-by-type.pipe.ts +0 -28
- package/src/lib/components/register-table/pipes/sticky-column.pipe.ts +0 -11
- package/src/lib/components/register-table/register-table.component.html +0 -257
- package/src/lib/components/register-table/register-table.component.less +0 -151
- package/src/lib/components/register-table/register-table.component.ts +0 -743
- package/src/lib/components/reset-settings-form/reset-settings-form.component.html +0 -14
- package/src/lib/components/reset-settings-form/reset-settings-form.component.less +0 -26
- package/src/lib/components/reset-settings-form/reset-settings-form.component.ts +0 -15
- package/src/lib/components/search-input/search-input.component.html +0 -6
- package/src/lib/components/search-input/search-input.component.less +0 -17
- package/src/lib/components/search-input/search-input.component.ts +0 -31
- package/src/lib/components/sliding-panel/sliding-panel.component.html +0 -13
- package/src/lib/components/sliding-panel/sliding-panel.component.less +0 -112
- package/src/lib/components/sliding-panel/sliding-panel.component.ts +0 -36
- package/src/lib/components/sliding-panel/sliding-panel.module.ts +0 -11
- package/src/lib/consts/date-time.consts.ts +0 -1
- package/src/lib/consts/index.ts +0 -8
- package/src/lib/consts/inputs.consts.ts +0 -9
- package/src/lib/consts/month.consts.ts +0 -82
- package/src/lib/consts/params.consts.ts +0 -1
- package/src/lib/consts/register-base.consts.ts +0 -40
- package/src/lib/core/form-group-wrapper/errors-consts.ts +0 -6
- package/src/lib/core/form-group-wrapper/form-group-wrapper.ts +0 -109
- package/src/lib/core/input-control/input-control.ts +0 -30
- package/src/lib/core/param/param-base.ts +0 -262
- package/src/lib/core/param/param-date-base.ts +0 -30
- package/src/lib/core/param/param-select-base.ts +0 -118
- package/src/lib/core/param/param-text-base.ts +0 -23
- package/src/lib/core/register-base/register-base.store.ts +0 -84
- package/src/lib/core/register-base/register-base.ts +0 -854
- package/src/lib/directives/date/date-time.types.ts +0 -36
- package/src/lib/directives/date/format-date.pipe.ts +0 -28
- package/src/lib/directives/number/number-only.directive.ts +0 -36
- package/src/lib/directives/sticky/sticky-relative.directive.ts +0 -30
- package/src/lib/directives/sticky/sticky-relative.service.ts +0 -34
- package/src/lib/directives/sticky/sticky.directive.ts +0 -189
- package/src/lib/services/date-time.service.ts +0 -399
- package/src/lib/services/dialog/dialog.service.ts +0 -62
- package/src/lib/services/dom-intersection.service.ts +0 -23
- package/src/lib/services/filter/filters-state.service.ts +0 -83
- package/src/lib/services/filter/filters-transmit.service.ts +0 -105
- package/src/lib/services/filter/filters.service.ts +0 -21
- package/src/lib/services/inputs-state.service.ts +0 -157
- package/src/lib/services/inputs.service.ts +0 -114
- package/src/lib/services/key-pressed.service.ts +0 -40
- package/src/lib/services/resize-window-observer.service.ts +0 -37
- package/src/lib/services/selected-objects-state.service.ts +0 -159
- package/src/lib/store/fast-query-store.service.ts +0 -132
- package/src/lib/types/hasura.types.ts +0 -41
- package/src/lib/types/inputs.types.ts +0 -63
- package/src/lib/types/params.types.ts +0 -42
- package/src/lib/types/register-base.types.ts +0 -161
- package/src/lib/types/sub-types.ts +0 -15
- package/src/lib/types/user-profile.types.ts +0 -18
- package/src/lib/utils/functions.ts +0 -11
- package/src/lib/utils/get-url-segment.ts +0 -46
- package/src/lib/utils/prizm.shared.module.ts +0 -176
- package/src/lib/utils/rxjs.ts +0 -33
- package/src/lib/utils/select-all-utils.ts +0 -16
- package/tsconfig.lib.json +0 -16
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.schematics.json +0 -26
- package/tsconfig.spec.json +0 -15
- /package/{src/lib/components/column-settings/index.ts → lib/components/column-settings/index.d.ts} +0 -0
- /package/{src/lib/components/filters/index.ts → lib/components/filters/index.d.ts} +0 -0
- /package/{src/lib/components/index.ts → lib/components/index.d.ts} +0 -0
- /package/{src/lib/components/inputs/index.ts → lib/components/inputs/index.d.ts} +0 -0
- /package/{src/lib/components/inputs/param-switcher-date-time-range/index.ts → lib/components/inputs/param-switcher-date-time-range/index.d.ts} +0 -0
- /package/{src/lib/components/inputs/param-tree/index.ts → lib/components/inputs/param-tree/index.d.ts} +0 -0
- /package/{src/lib/components/menu-constructor/index.ts → lib/components/menu-constructor/index.d.ts} +0 -0
- /package/{src/lib/components/page-menu/index.ts → lib/components/page-menu/index.d.ts} +0 -0
- /package/{src/lib/components/register-table/index.ts → lib/components/register-table/index.d.ts} +0 -0
- /package/{src/lib/core/form-group-wrapper/index.ts → lib/core/form-group-wrapper/index.d.ts} +0 -0
- /package/{src/lib/core/index.ts → lib/core/index.d.ts} +0 -0
- /package/{src/lib/core/input-control/index.ts → lib/core/input-control/index.d.ts} +0 -0
- /package/{src/lib/core/param/index.ts → lib/core/param/index.d.ts} +0 -0
- /package/{src/lib/core/register-base/index.ts → lib/core/register-base/index.d.ts} +0 -0
- /package/{src/lib/directives/index.ts → lib/directives/index.d.ts} +0 -0
- /package/{src/lib/directives/sticky/index.ts → lib/directives/sticky/index.d.ts} +0 -0
- /package/{src/lib/services/dialog/index.ts → lib/services/dialog/index.d.ts} +0 -0
- /package/{src/lib/services/index.ts → lib/services/index.d.ts} +0 -0
- /package/{src/lib/store/index.ts → lib/store/index.d.ts} +0 -0
- /package/{src/lib/types/index.ts → lib/types/index.d.ts} +0 -0
- /package/{src/lib/utils/index.ts → lib/utils/index.d.ts} +0 -0
- /package/{src/public-api.ts → public-api.d.ts} +0 -0
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterContentInit,
|
|
3
|
-
AfterViewInit,
|
|
4
|
-
ChangeDetectorRef,
|
|
5
|
-
computed,
|
|
6
|
-
DestroyRef,
|
|
7
|
-
Directive,
|
|
8
|
-
forwardRef,
|
|
9
|
-
inject,
|
|
10
|
-
Injector,
|
|
11
|
-
input,
|
|
12
|
-
Input,
|
|
13
|
-
OnInit,
|
|
14
|
-
Optional,
|
|
15
|
-
Self,
|
|
16
|
-
} from '@angular/core';
|
|
17
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl, Validators } from '@angular/forms';
|
|
18
|
-
import { filter, skip, tap } from 'rxjs';
|
|
19
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
20
|
-
import { IInputControl, InputControlGqlValue, InputControlSaveValue } from '../../types';
|
|
21
|
-
import {
|
|
22
|
-
FormatterGqlValueType,
|
|
23
|
-
FormatterSavedValueType,
|
|
24
|
-
ParserSavedValueType,
|
|
25
|
-
} from '../../types/params.types';
|
|
26
|
-
import { distinctUntilChangedJSONs } from '../../utils';
|
|
27
|
-
|
|
28
|
-
@Directive({
|
|
29
|
-
providers: [
|
|
30
|
-
{
|
|
31
|
-
provide: NG_VALUE_ACCESSOR,
|
|
32
|
-
useExisting: forwardRef(() => ParamBase),
|
|
33
|
-
multi: true,
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
})
|
|
37
|
-
export abstract class ParamBase<
|
|
38
|
-
ValueType extends any | null,
|
|
39
|
-
SavedValueType extends InputControlSaveValue,
|
|
40
|
-
>
|
|
41
|
-
implements ControlValueAccessor, OnInit, AfterViewInit, AfterContentInit
|
|
42
|
-
{
|
|
43
|
-
/** Название */
|
|
44
|
-
@Input() label = '';
|
|
45
|
-
/** Текст при пустом значении control (null) */
|
|
46
|
-
placeholder = input<string>('');
|
|
47
|
-
/** Режим просмотра, по умолчанию выключен */
|
|
48
|
-
@Input() readmode = false;
|
|
49
|
-
/** Кнопка быстрой очистки поля, по умолчанию включена */
|
|
50
|
-
@Input() forceClear = true;
|
|
51
|
-
/** Текст при наведении на значение control */
|
|
52
|
-
@Input() hint: string | null = null;
|
|
53
|
-
/** Готовые стили для использования поля в панели фильтров/параметров или на карточке, по умолчанию стили для карточки */
|
|
54
|
-
@Input() paramStyle: 'filter' | 'card' = 'card';
|
|
55
|
-
/** Метод для конвертации значения control при сохранении (используется при сохранении фильтров в БД) */
|
|
56
|
-
@Input() set formatSavedValue(
|
|
57
|
-
formatter: FormatterSavedValueType<ValueType, SavedValueType> | undefined
|
|
58
|
-
) {
|
|
59
|
-
if (formatter) {
|
|
60
|
-
this.formatterSavedValue = formatter;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/** Метод для конвертации сохраненного значения в control (используется при установке сохраненных фильтров из БД) */
|
|
64
|
-
@Input() set parseSavedValue(
|
|
65
|
-
parser: ParserSavedValueType<SavedValueType, ValueType> | undefined
|
|
66
|
-
) {
|
|
67
|
-
if (parser) {
|
|
68
|
-
this.parserSavedValue = parser;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
/** Метод для конвертации значения control в GQL-значение (используется при вычислении gql_value control) */
|
|
72
|
-
@Input() set formatGqlValue(formatter: FormatterGqlValueType<ValueType> | undefined) {
|
|
73
|
-
if (formatter) {
|
|
74
|
-
this.formatterGqlValue = formatter;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
/** Метод для отображения значения в режиме просмотра */
|
|
78
|
-
buildShowedValue = input((_: ValueType): string => '');
|
|
79
|
-
|
|
80
|
-
@Input() set required(required: boolean) {
|
|
81
|
-
this._required = required;
|
|
82
|
-
this._setControlRequired(required);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
public get required(): boolean {
|
|
86
|
-
return this.control?.hasValidator(Validators.required) ?? false;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@Input() set disabled(disabled: boolean) {
|
|
90
|
-
this._disabled = disabled;
|
|
91
|
-
this._setControlDisabled(disabled);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
public get disabled(): boolean {
|
|
95
|
-
return this.control?.disabled ?? false;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@Optional()
|
|
99
|
-
@Self()
|
|
100
|
-
private readonly _ngControl = inject(NgControl);
|
|
101
|
-
|
|
102
|
-
protected readonly cdr = inject(ChangeDetectorRef);
|
|
103
|
-
protected readonly dr = inject(DestroyRef);
|
|
104
|
-
|
|
105
|
-
protected control!: IInputControl<ValueType, SavedValueType>;
|
|
106
|
-
protected formatterSavedValue: (value: ValueType, injector?: Injector) => SavedValueType = (
|
|
107
|
-
value
|
|
108
|
-
) => value as unknown as SavedValueType;
|
|
109
|
-
protected parserSavedValue: (value: SavedValueType, injector?: Injector) => ValueType = (value) =>
|
|
110
|
-
value as unknown as ValueType;
|
|
111
|
-
protected formatterGqlValue: (value: ValueType, injector?: Injector) => InputControlGqlValue = (
|
|
112
|
-
_
|
|
113
|
-
) => undefined as InputControlGqlValue;
|
|
114
|
-
|
|
115
|
-
private _required = false;
|
|
116
|
-
private _disabled = false;
|
|
117
|
-
private _isOuterUpdatingSavedValue = true;
|
|
118
|
-
|
|
119
|
-
protected showedValue = '';
|
|
120
|
-
|
|
121
|
-
protected readonly applied = computed(() => this.control.applied?.() ?? false);
|
|
122
|
-
|
|
123
|
-
constructor(private _injector: Injector) {
|
|
124
|
-
if (this._ngControl) {
|
|
125
|
-
this._ngControl.valueAccessor = this;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
public get value(): ValueType | undefined {
|
|
130
|
-
return this.control?.getRawValue();
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
public writeValue(value: ValueType): void {
|
|
134
|
-
this._updateShowedValue(value);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
public clear(): void {
|
|
138
|
-
this.control.reset();
|
|
139
|
-
this.control.markAsDirty();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
public registerOnChange(onChange: (value: ValueType) => void): void {
|
|
143
|
-
this.onChange = onChange;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
protected onChange: (value: ValueType) => void = () => {};
|
|
147
|
-
|
|
148
|
-
public registerOnTouched(onTouched: () => void): void {
|
|
149
|
-
this.onTouched = onTouched;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
protected onTouched = (): void => {};
|
|
153
|
-
|
|
154
|
-
public ngOnInit(): void {
|
|
155
|
-
this.onInit();
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
protected onInit(): void {}
|
|
159
|
-
|
|
160
|
-
public ngAfterViewInit(): void {
|
|
161
|
-
this.afterViewInit();
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
protected afterViewInit(): void {}
|
|
165
|
-
|
|
166
|
-
protected get isInvalidAndNotPristine(): boolean {
|
|
167
|
-
return this.control.invalid && !this.control.pristine;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
protected isNotEmpty(): boolean {
|
|
171
|
-
const v = this.value;
|
|
172
|
-
|
|
173
|
-
return !(
|
|
174
|
-
v === null ||
|
|
175
|
-
v === undefined ||
|
|
176
|
-
(typeof v === 'string' && v.trim() === '') ||
|
|
177
|
-
(Array.isArray(v) && v.length === 0) ||
|
|
178
|
-
(typeof v === 'object' && !Array.isArray(v) && Object.keys(v).length === 0)
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
public ngAfterContentInit(): void {
|
|
183
|
-
this.control =
|
|
184
|
-
this._ngControl && (this._ngControl.control as IInputControl<ValueType, SavedValueType>);
|
|
185
|
-
|
|
186
|
-
if (this.control) {
|
|
187
|
-
if (this._required) {
|
|
188
|
-
this._setControlRequired(this._required);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
if (this._disabled) {
|
|
192
|
-
this._setControlDisabled(this._disabled);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
this._subscribeOnValue();
|
|
196
|
-
this._subscribeOnSavedValue();
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
this.afterContentInit();
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
private _subscribeOnValue(): void {
|
|
203
|
-
this.control.valueChanges
|
|
204
|
-
.pipe(
|
|
205
|
-
distinctUntilChangedJSONs(),
|
|
206
|
-
tap((value) => this._updateSavedValue(value)),
|
|
207
|
-
takeUntilDestroyed(this.dr)
|
|
208
|
-
)
|
|
209
|
-
.subscribe((value) => {
|
|
210
|
-
this.control.gql_value = this.formatterGqlValue(value, this._injector);
|
|
211
|
-
this._updateShowedValue(value);
|
|
212
|
-
|
|
213
|
-
if (this.isNotEmpty()) {
|
|
214
|
-
this.control.applied?.set(false);
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
private _updateShowedValue(value: ValueType): void {
|
|
220
|
-
this.showedValue = this.buildShowedValue()(value);
|
|
221
|
-
this.cdr.markForCheck();
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
private _updateSavedValue(value: ValueType): void {
|
|
225
|
-
this._isOuterUpdatingSavedValue = false;
|
|
226
|
-
const savedValue = this.formatterSavedValue(value, this._injector);
|
|
227
|
-
this.control.saved_value$?.next(savedValue);
|
|
228
|
-
this._isOuterUpdatingSavedValue = true;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
private _subscribeOnSavedValue(): void {
|
|
232
|
-
this.control.saved_value$
|
|
233
|
-
?.pipe(
|
|
234
|
-
skip(1), // при подписывании на saved_value$ первым приходит null - пропускаем
|
|
235
|
-
filter(() => this._isOuterUpdatingSavedValue),
|
|
236
|
-
takeUntilDestroyed(this.dr)
|
|
237
|
-
)
|
|
238
|
-
.subscribe((savedValue) => {
|
|
239
|
-
const value =
|
|
240
|
-
savedValue === null ? null : this.parserSavedValue(savedValue, this._injector);
|
|
241
|
-
this.control.setValue(value as ValueType);
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
protected afterContentInit(): void {}
|
|
246
|
-
|
|
247
|
-
private _setControlRequired(required: boolean): void {
|
|
248
|
-
if (required) {
|
|
249
|
-
this.control?.addValidators(Validators.required);
|
|
250
|
-
} else {
|
|
251
|
-
this.control?.removeValidators(Validators.required);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
private _setControlDisabled(disabled: boolean): void {
|
|
256
|
-
if (disabled) {
|
|
257
|
-
this.control?.disable();
|
|
258
|
-
} else {
|
|
259
|
-
this.control?.enable();
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Directive, Injector } from '@angular/core';
|
|
2
|
-
import { DateTimeService } from '../../services/date-time.service';
|
|
3
|
-
import { ParamBase } from './param-base';
|
|
4
|
-
import { PrizmDateTypes } from '../../utils/prizm.shared.module';
|
|
5
|
-
import { InputControlSaveValue } from '../../types';
|
|
6
|
-
import { EDatePattern, ETimezone } from '../../directives/date/date-time.types';
|
|
7
|
-
|
|
8
|
-
@Directive()
|
|
9
|
-
export abstract class ParamDateBase<
|
|
10
|
-
ValueType extends PrizmDateTypes | null,
|
|
11
|
-
SavedValueType extends InputControlSaveValue,
|
|
12
|
-
> extends ParamBase<ValueType, SavedValueType> {
|
|
13
|
-
protected readonly ETimezone = ETimezone;
|
|
14
|
-
protected readonly EDatePattern = EDatePattern;
|
|
15
|
-
|
|
16
|
-
protected readonly _dts = this._dateInjector.get(DateTimeService);
|
|
17
|
-
|
|
18
|
-
protected readonly timezoneChange = this._dts.isTimeZoneChanged$;
|
|
19
|
-
|
|
20
|
-
constructor(private _dateInjector: Injector) {
|
|
21
|
-
super(_dateInjector);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
protected rebuildDateInNewTimezone(date: Date, prevDiff: string, currDiff: string): Date {
|
|
25
|
-
const iso = this._dts.convertDateToISOWithTZ(date, prevDiff);
|
|
26
|
-
const utc = new Date(iso).toISOString();
|
|
27
|
-
|
|
28
|
-
return this._dts.isoToLocalDate(utc, currDiff);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { Directive, Injector, Input, output } from '@angular/core';
|
|
2
|
-
import { ParamBase } from './param-base';
|
|
3
|
-
import { BehaviorSubject } from 'rxjs';
|
|
4
|
-
import { PolymorphContent } from '@prizm-ui/components';
|
|
5
|
-
import { InputControlSaveValue } from '../../types';
|
|
6
|
-
import { InferArrayType } from '../../types/sub-types';
|
|
7
|
-
import { MetaQuery } from '../../types/params.types';
|
|
8
|
-
import { FastQueryStore } from '../../store/fast-query-store.service';
|
|
9
|
-
|
|
10
|
-
@Directive()
|
|
11
|
-
export abstract class ParamSelectBase<
|
|
12
|
-
ValueType,
|
|
13
|
-
SavedValueType extends InputControlSaveValue,
|
|
14
|
-
> extends ParamBase<ValueType, SavedValueType> {
|
|
15
|
-
@Input() items: NonNullable<InferArrayType<ValueType>>[] = [];
|
|
16
|
-
@Input() searchable: boolean = false;
|
|
17
|
-
@Input() maxDropdownHeight = 342;
|
|
18
|
-
@Input() valueTemplate?: PolymorphContent;
|
|
19
|
-
@Input() listItemTemplate?: PolymorphContent;
|
|
20
|
-
@Input() nullContent: PolymorphContent | string | null = 'Не выбрано';
|
|
21
|
-
/** Массив полей по которым будет производиться фильтрация _or */
|
|
22
|
-
@Input() searchSubfields: string[] = [];
|
|
23
|
-
/** Флаг строгого поиска: строгий - _eq, не строгий - _ilike */
|
|
24
|
-
@Input() strictSearch = false;
|
|
25
|
-
@Input() selectClasses?: string;
|
|
26
|
-
@Input() limit = 50;
|
|
27
|
-
/** форматтер для задания кастомного отображения значения в поле */
|
|
28
|
-
@Input() formatShowedValue: (value: any, field: string) => string = (value, field) =>
|
|
29
|
-
value[field];
|
|
30
|
-
/** мета для автоматической подргузки значений из таблицы */
|
|
31
|
-
@Input() set meta(meta: MetaQuery | null) {
|
|
32
|
-
if (JSON.stringify(meta) !== JSON.stringify(this.meta)) {
|
|
33
|
-
this._meta$.next(meta);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
public get meta(): MetaQuery | null {
|
|
37
|
-
return this._meta$.getValue();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
public itemsChange = output<NonNullable<InferArrayType<ValueType>>[]>();
|
|
41
|
-
|
|
42
|
-
private readonly _meta$ = new BehaviorSubject<MetaQuery | null>(null);
|
|
43
|
-
|
|
44
|
-
protected readonly meta$ = this._meta$.asObservable();
|
|
45
|
-
|
|
46
|
-
protected readonly store = this._selectInjector.get(FastQueryStore);
|
|
47
|
-
|
|
48
|
-
public loading = false;
|
|
49
|
-
|
|
50
|
-
constructor(private _selectInjector: Injector) {
|
|
51
|
-
super(_selectInjector);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
protected buildWhere(searchValue?: string): object | undefined {
|
|
55
|
-
const paramWhere = this.meta?.where;
|
|
56
|
-
const { valueField } = this.metaFields;
|
|
57
|
-
|
|
58
|
-
// Создаем массив условий _ilike для дополнительных полей
|
|
59
|
-
const ilikeConditions = [];
|
|
60
|
-
|
|
61
|
-
if (searchValue) {
|
|
62
|
-
if (this.searchSubfields) {
|
|
63
|
-
ilikeConditions.push(
|
|
64
|
-
...this.searchSubfields.map((field) =>
|
|
65
|
-
this.buildNestedCondition(field, searchValue, false)
|
|
66
|
-
)
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (valueField) {
|
|
71
|
-
ilikeConditions.push(this.buildNestedCondition(valueField, searchValue, this.strictSearch));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Если параметр where не задан, но есть значение для поиска и поле valueField, возвращаем только условия _ilike
|
|
76
|
-
if (!paramWhere && ilikeConditions.length > 0) {
|
|
77
|
-
return { _or: ilikeConditions };
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Если параметр where задан, добавляем условия _ilike к существующим условиям
|
|
81
|
-
if (paramWhere) {
|
|
82
|
-
return {
|
|
83
|
-
...(paramWhere as object),
|
|
84
|
-
_or: ilikeConditions.length === 0 ? undefined : ilikeConditions,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// Если ничего не задано, возвращаем undefined
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
protected buildNestedCondition(field: string, value: string, strict: boolean): object {
|
|
93
|
-
const parts = field.split('.');
|
|
94
|
-
const current = {};
|
|
95
|
-
let temp: any = current;
|
|
96
|
-
|
|
97
|
-
for (let i = 0; i < parts.length - 1; i++) {
|
|
98
|
-
const part = parts[i];
|
|
99
|
-
temp[part] = {};
|
|
100
|
-
temp = temp[part];
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
const lastPart = parts[parts.length - 1];
|
|
104
|
-
temp[lastPart] = strict ? { _eq: value } : { _ilike: `%${value}%` };
|
|
105
|
-
|
|
106
|
-
return current;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
protected get metaFields(): { idField: string | null; valueField: string | null } {
|
|
110
|
-
const idField = this.meta?.table.idField ?? null;
|
|
111
|
-
const valueField = this.meta?.table.valueField.split(' ')[0] ?? null;
|
|
112
|
-
|
|
113
|
-
return {
|
|
114
|
-
idField,
|
|
115
|
-
valueField,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Directive, inject, input } from '@angular/core';
|
|
2
|
-
import { ParamBase } from './param-base';
|
|
3
|
-
import { MAX_LENGTH_TEXT_PARAMS } from './param.tokens';
|
|
4
|
-
|
|
5
|
-
const DEFAULT_MAX_LENGTH = 1000;
|
|
6
|
-
|
|
7
|
-
@Directive()
|
|
8
|
-
export abstract class ParamTextBase extends ParamBase<string | null, string | null> {
|
|
9
|
-
private readonly _initMaxLength =
|
|
10
|
-
inject(MAX_LENGTH_TEXT_PARAMS, { optional: true }) ?? DEFAULT_MAX_LENGTH;
|
|
11
|
-
|
|
12
|
-
public override placeholder = input('Введите значение');
|
|
13
|
-
public override buildShowedValue = input(
|
|
14
|
-
(value: string | null): string => value?.toString() ?? '-'
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Максимальное кол-во символов
|
|
19
|
-
*
|
|
20
|
-
* @default 1000
|
|
21
|
-
* */
|
|
22
|
-
public maxLength = input(this._initMaxLength);
|
|
23
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { inject, Injectable } from '@angular/core';
|
|
2
|
-
import { ComponentStore } from '@ngrx/component-store';
|
|
3
|
-
import { PrizmTableCellSorter } from '@prizm-ui/components';
|
|
4
|
-
import { Apollo, MutationResult } from 'apollo-angular';
|
|
5
|
-
import { Observable, ReplaySubject, Subscription } from 'rxjs';
|
|
6
|
-
import { IHasuraQueryFilter } from '../../components/register-table/model/schema';
|
|
7
|
-
import { GqlFields } from '../../types/inputs.types';
|
|
8
|
-
import { IBaseRegisterStore, IBaseRegisterStoreState } from '../../types/register-base.types';
|
|
9
|
-
import { HasuraError } from '../../types/hasura.types';
|
|
10
|
-
|
|
11
|
-
@Injectable()
|
|
12
|
-
export abstract class RegisterBaseStore<
|
|
13
|
-
Type extends Record<string, any>,
|
|
14
|
-
State extends IBaseRegisterStoreState<Type> = IBaseRegisterStoreState<Type>,
|
|
15
|
-
>
|
|
16
|
-
extends ComponentStore<State>
|
|
17
|
-
implements IBaseRegisterStore<Type>
|
|
18
|
-
{
|
|
19
|
-
protected apollo = inject(Apollo);
|
|
20
|
-
|
|
21
|
-
readonly error = (e: HasuraError): void => {
|
|
22
|
-
console.error(e);
|
|
23
|
-
this.setLoading(false);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
public getBaseFilter(params?: any): Record<string, any> {
|
|
27
|
-
return {} as Record<string, any>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
readonly mutationCompleted$ = new ReplaySubject<boolean>();
|
|
31
|
-
readonly loading$ = this.select((state) => state.loading);
|
|
32
|
-
readonly count$ = this.select((state) => state.count);
|
|
33
|
-
readonly total$ = this.select((state) => state.total);
|
|
34
|
-
|
|
35
|
-
readonly objects$ = this.select((state) => state.objects);
|
|
36
|
-
readonly setObjects = this.updater(
|
|
37
|
-
(store, objects: Type[]): State => ({
|
|
38
|
-
...store,
|
|
39
|
-
loading: false,
|
|
40
|
-
objects,
|
|
41
|
-
})
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
readonly setLoading = this.updater((store, loading: boolean): State => ({ ...store, loading }));
|
|
45
|
-
readonly setCount = this.updater(
|
|
46
|
-
(store, count: number): State => ({
|
|
47
|
-
...store,
|
|
48
|
-
count,
|
|
49
|
-
})
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
readonly setTotal = this.updater(
|
|
53
|
-
(state, total: number): State => ({
|
|
54
|
-
...state,
|
|
55
|
-
total,
|
|
56
|
-
})
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
abstract readonly deleteByIds: (
|
|
60
|
-
ids: string[],
|
|
61
|
-
...args: unknown[]
|
|
62
|
-
) => Observable<MutationResult<Type[]> | null>;
|
|
63
|
-
abstract readonly fetchTotal: (
|
|
64
|
-
observableOrValue: Record<string, any> | Observable<Record<string, any>>
|
|
65
|
-
) => Subscription;
|
|
66
|
-
abstract readonly fetchObjects: (
|
|
67
|
-
observableOrValue:
|
|
68
|
-
| {
|
|
69
|
-
filter: IHasuraQueryFilter<Type>;
|
|
70
|
-
callback?: (data: Type[]) => void;
|
|
71
|
-
}
|
|
72
|
-
| Observable<{
|
|
73
|
-
filter: IHasuraQueryFilter<Type>;
|
|
74
|
-
callback?: (data: Type[]) => void;
|
|
75
|
-
}>
|
|
76
|
-
) => Subscription;
|
|
77
|
-
|
|
78
|
-
abstract buildFilter(
|
|
79
|
-
limit: number | undefined,
|
|
80
|
-
offset: number | undefined,
|
|
81
|
-
gqlFilter: GqlFields | undefined,
|
|
82
|
-
sorter?: PrizmTableCellSorter<Type>[]
|
|
83
|
-
): IHasuraQueryFilter<Type>;
|
|
84
|
-
}
|