ngx-register-base 1.2.3 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ng-package.json +15 -0
- package/package.json +12 -15
- package/schematics/ng-update/replace-menu-state-token/index.ts +33 -0
- package/schematics/ng-update/update-prefix/index.ts +38 -0
- package/schematics/utils/{utils.d.ts → utils.ts} +9 -2
- package/src/lib/components/checkbox-selector/checkbox-selector.component.html +91 -0
- package/src/lib/components/checkbox-selector/checkbox-selector.component.less +67 -0
- package/src/lib/components/checkbox-selector/checkbox-selector.component.ts +176 -0
- package/src/lib/components/checkbox-selector/checkbox-selector.types.ts +8 -0
- package/src/lib/components/column-settings/column-settings.component.html +160 -0
- package/src/lib/components/column-settings/column-settings.component.less +131 -0
- package/src/lib/components/column-settings/column-settings.component.ts +352 -0
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.html +65 -0
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.less +79 -0
- package/src/lib/components/column-settings/components/column-settings-template/column-settings-template.component.ts +114 -0
- package/src/lib/components/column-settings/consts/column-settings.consts.ts +9 -0
- package/src/lib/components/column-settings/types/column-settings.types.ts +26 -0
- package/src/lib/components/divider/divider.component.html +4 -0
- package/src/lib/components/divider/divider.component.less +10 -0
- package/src/lib/components/divider/divider.component.ts +12 -0
- package/src/lib/components/filter-button/filter-button.component.html +20 -0
- package/src/lib/components/filter-button/filter-button.component.less +41 -0
- package/src/lib/components/filter-button/filter-button.component.ts +18 -0
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.html +22 -0
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.less +23 -0
- package/src/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.ts +31 -0
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.html +49 -0
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.less +37 -0
- package/src/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.ts +66 -0
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.html +147 -0
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.less +45 -0
- package/src/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.ts +114 -0
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.html +44 -0
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.less +49 -0
- package/src/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.ts +167 -0
- package/src/lib/components/filters/components/filter-list/filter-list.service.ts +97 -0
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.html +18 -0
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.less +55 -0
- package/src/lib/components/filters/components/filter-list/filters-section/filters-section.component.ts +69 -0
- package/src/lib/components/filters/components/filter-list.module.ts +29 -0
- package/src/lib/components/filters/register-table-filter.component.html +53 -0
- package/src/lib/components/filters/register-table-filter.component.less +17 -0
- package/src/lib/components/filters/register-table-filter.component.ts +167 -0
- package/src/lib/components/filters/register-table-filter.module.ts +22 -0
- package/src/lib/components/inputs/inputs.module.ts +104 -0
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.html +49 -0
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.less +70 -0
- package/src/lib/components/inputs/param-calendar-year/param-calendar-year.component.ts +52 -0
- package/src/lib/components/inputs/param-custom/param-custom.component.html +1 -0
- package/src/lib/components/inputs/param-custom/param-custom.component.ts +9 -0
- package/src/lib/components/inputs/param-date/param-date.component.html +55 -0
- package/src/lib/components/inputs/param-date/param-date.component.less +67 -0
- package/src/lib/components/inputs/param-date/param-date.component.ts +77 -0
- package/src/lib/components/inputs/param-date-range/param-date-range.component.html +45 -0
- package/src/lib/components/inputs/param-date-range/param-date-range.component.less +75 -0
- package/src/lib/components/inputs/param-date-range/param-date-range.component.ts +67 -0
- package/src/lib/components/inputs/param-date-time/param-date-time.component.html +70 -0
- package/src/lib/components/inputs/param-date-time/param-date-time.component.less +72 -0
- package/src/lib/components/inputs/param-date-time/param-date-time.component.ts +101 -0
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.html +67 -0
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.less +103 -0
- package/src/lib/components/inputs/param-date-time-range/param-date-time-range.component.ts +128 -0
- package/src/lib/components/inputs/param-month/param-month.component.html +46 -0
- package/src/lib/components/inputs/param-month/param-month.component.less +72 -0
- package/src/lib/components/inputs/param-month/param-month.component.ts +55 -0
- package/src/lib/components/inputs/param-month-range/param-month-range.component.html +39 -0
- package/src/lib/components/inputs/param-month-range/param-month-range.component.less +71 -0
- package/src/lib/components/inputs/param-month-range/param-month-range.component.ts +76 -0
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.html +84 -0
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.less +108 -0
- package/src/lib/components/inputs/param-multi-select/param-multi-select.component.ts +448 -0
- package/src/lib/components/inputs/param-select/param-select.component.html +106 -0
- package/src/lib/components/inputs/param-select/param-select.component.less +26 -0
- package/src/lib/components/inputs/param-select/param-select.component.ts +318 -0
- package/src/lib/components/inputs/param-switcher/param-switcher.component.html +8 -0
- package/src/lib/components/inputs/param-switcher/param-switcher.component.less +53 -0
- package/src/lib/components/inputs/param-switcher/param-switcher.component.ts +13 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.ts +29 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.html +19 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.less +76 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.ts +134 -0
- package/src/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.ts +8 -0
- package/src/lib/components/inputs/param-text/param-text.component.html +59 -0
- package/src/lib/components/inputs/param-text/param-text.component.less +33 -0
- package/src/lib/components/inputs/param-text/param-text.component.ts +36 -0
- package/src/lib/components/inputs/param-textarea/param-textarea.component.html +61 -0
- package/src/lib/components/inputs/param-textarea/param-textarea.component.less +21 -0
- package/src/lib/components/inputs/param-textarea/param-textarea.component.ts +33 -0
- package/src/lib/components/inputs/param-toggle/param-toggle.component.html +40 -0
- package/src/lib/components/inputs/param-toggle/param-toggle.component.less +69 -0
- package/src/lib/components/inputs/param-toggle/param-toggle.component.ts +14 -0
- package/src/lib/components/inputs/param-tree/consts/param-tree.consts.ts +59 -0
- package/src/lib/components/inputs/param-tree/param-tree.component.html +51 -0
- package/src/lib/components/inputs/param-tree/param-tree.component.less +3 -0
- package/src/lib/components/inputs/param-tree/param-tree.component.ts +282 -0
- package/src/lib/components/inputs/param-tree/services/param-tree.service.ts +176 -0
- package/src/lib/components/inputs/param-tree/services/sync-tree-loader.service.ts +18 -0
- package/{lib/components/inputs/param-tree/tokens/param-tree.tokens.d.ts → src/lib/components/inputs/param-tree/tokens/param-tree.tokens.ts} +2 -1
- package/src/lib/components/inputs/param-tree/types/param-tree.types.ts +39 -0
- package/src/lib/components/inputs/param-tree/utils/param-tree.utils.ts +18 -0
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.html +78 -0
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.less +109 -0
- package/src/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.ts +89 -0
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.html +54 -0
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.less +56 -0
- package/src/lib/components/inputs/param-tree-select/param-tree-select.component.ts +91 -0
- package/src/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.html +5 -0
- package/src/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.ts +13 -0
- package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.html +4 -0
- package/src/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.ts +11 -0
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.html +95 -0
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.less +183 -0
- package/src/lib/components/menu-constructor/sproc-menu-constructor.component.ts +687 -0
- package/src/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.ts +32 -0
- package/src/lib/components/menu-constructor/store/sproc-menu-constructor.consts.ts +46 -0
- package/{lib/components/menu-constructor/store/sproc-menu.tokens.d.ts → src/lib/components/menu-constructor/store/sproc-menu.tokens.ts} +4 -1
- package/src/lib/components/page-menu/README.md +60 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.consts.ts +8 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.schema.ts +35 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.tokens.ts +5 -0
- package/src/lib/components/page-menu/schema/sproc-page-menu.types.ts +42 -0
- package/src/lib/components/page-menu/sproc-page-menu.component.html +166 -0
- package/src/lib/components/page-menu/sproc-page-menu.component.less +228 -0
- package/src/lib/components/page-menu/sproc-page-menu.component.ts +337 -0
- package/src/lib/components/paginator/paginator.component.html +97 -0
- package/src/lib/components/paginator/paginator.component.less +101 -0
- package/src/lib/components/paginator/paginator.component.ts +192 -0
- package/src/lib/components/paginator/types/paginator.types.ts +16 -0
- package/src/lib/components/register-table/consts/register-table.consts.ts +3 -0
- package/src/lib/components/register-table/directives/cell-template.directive.ts +11 -0
- package/src/lib/components/register-table/directives/header-template.directive.ts +11 -0
- package/src/lib/components/register-table/model/schema.ts +62 -0
- package/src/lib/components/register-table/pipes/class-by-type.pipe.ts +28 -0
- package/src/lib/components/register-table/pipes/sticky-column.pipe.ts +11 -0
- package/src/lib/components/register-table/register-table.component.html +257 -0
- package/src/lib/components/register-table/register-table.component.less +151 -0
- package/src/lib/components/register-table/register-table.component.ts +743 -0
- package/src/lib/components/reset-settings-form/reset-settings-form.component.html +14 -0
- package/src/lib/components/reset-settings-form/reset-settings-form.component.less +26 -0
- package/src/lib/components/reset-settings-form/reset-settings-form.component.ts +15 -0
- package/src/lib/components/search-input/search-input.component.html +6 -0
- package/src/lib/components/search-input/search-input.component.less +17 -0
- package/src/lib/components/search-input/search-input.component.ts +31 -0
- package/src/lib/components/sliding-panel/sliding-panel.component.html +13 -0
- package/src/lib/components/sliding-panel/sliding-panel.component.less +112 -0
- package/src/lib/components/sliding-panel/sliding-panel.component.ts +36 -0
- package/src/lib/components/sliding-panel/sliding-panel.module.ts +11 -0
- package/src/lib/consts/date-time.consts.ts +1 -0
- package/src/lib/consts/index.ts +8 -0
- package/src/lib/consts/inputs.consts.ts +9 -0
- package/src/lib/consts/month.consts.ts +82 -0
- package/src/lib/consts/params.consts.ts +1 -0
- package/src/lib/consts/register-base.consts.ts +40 -0
- package/src/lib/core/form-group-wrapper/errors-consts.ts +6 -0
- package/src/lib/core/form-group-wrapper/form-group-wrapper.ts +109 -0
- package/src/lib/core/input-control/input-control.ts +30 -0
- package/src/lib/core/param/param-base.ts +262 -0
- package/src/lib/core/param/param-date-base.ts +30 -0
- package/src/lib/core/param/param-select-base.ts +118 -0
- package/src/lib/core/param/param-text-base.ts +23 -0
- package/{lib/core/param/param.tokens.d.ts → src/lib/core/param/param.tokens.ts} +2 -1
- package/src/lib/core/register-base/register-base.store.ts +84 -0
- package/src/lib/core/register-base/register-base.ts +854 -0
- package/src/lib/directives/date/date-time.types.ts +36 -0
- package/src/lib/directives/date/format-date.pipe.ts +28 -0
- package/src/lib/directives/number/number-only.directive.ts +36 -0
- package/src/lib/directives/sticky/sticky-relative.directive.ts +30 -0
- package/src/lib/directives/sticky/sticky-relative.service.ts +34 -0
- package/src/lib/directives/sticky/sticky.directive.ts +189 -0
- package/src/lib/services/date-time.service.ts +399 -0
- package/src/lib/services/dialog/dialog.service.ts +62 -0
- package/{lib/services/dialog/dialog.types.d.ts → src/lib/services/dialog/dialog.types.ts} +8 -4
- package/src/lib/services/dom-intersection.service.ts +23 -0
- package/src/lib/services/filter/filters-state.service.ts +83 -0
- package/src/lib/services/filter/filters-transmit.service.ts +105 -0
- package/src/lib/services/filter/filters.service.ts +21 -0
- package/src/lib/services/inputs-state.service.ts +157 -0
- package/src/lib/services/inputs.service.ts +114 -0
- package/src/lib/services/key-pressed.service.ts +40 -0
- package/src/lib/services/resize-window-observer.service.ts +37 -0
- package/src/lib/services/selected-objects-state.service.ts +159 -0
- package/src/lib/store/fast-query-store.service.ts +132 -0
- package/{lib/types/event.types.d.ts → src/lib/types/event.types.ts} +1 -1
- package/src/lib/types/hasura.types.ts +41 -0
- package/src/lib/types/inputs.types.ts +63 -0
- package/src/lib/types/params.types.ts +42 -0
- package/src/lib/types/register-base.types.ts +161 -0
- package/src/lib/types/sub-types.ts +15 -0
- package/src/lib/types/user-profile.types.ts +18 -0
- package/src/lib/utils/functions.ts +11 -0
- package/src/lib/utils/get-url-segment.ts +46 -0
- package/src/lib/utils/prizm.shared.module.ts +176 -0
- package/src/lib/utils/rxjs.ts +33 -0
- package/src/lib/utils/select-all-utils.ts +16 -0
- package/tsconfig.lib.json +16 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.schematics.json +26 -0
- package/tsconfig.spec.json +15 -0
- package/esm2022/lib/components/checkbox-selector/checkbox-selector.component.mjs +0 -129
- package/esm2022/lib/components/checkbox-selector/checkbox-selector.types.mjs +0 -8
- package/esm2022/lib/components/column-settings/column-settings.component.mjs +0 -249
- package/esm2022/lib/components/column-settings/components/column-settings-template/column-settings-template.component.mjs +0 -80
- package/esm2022/lib/components/column-settings/consts/column-settings.consts.mjs +0 -10
- package/esm2022/lib/components/column-settings/index.mjs +0 -3
- package/esm2022/lib/components/column-settings/types/column-settings.types.mjs +0 -7
- package/esm2022/lib/components/divider/divider.component.mjs +0 -16
- package/esm2022/lib/components/filter-button/filter-button.component.mjs +0 -19
- package/esm2022/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.mjs +0 -31
- package/esm2022/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.mjs +0 -57
- package/esm2022/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.mjs +0 -110
- package/esm2022/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.mjs +0 -130
- package/esm2022/lib/components/filters/components/filter-list/filter-list.service.mjs +0 -89
- package/esm2022/lib/components/filters/components/filter-list/filters-section/filters-section.component.mjs +0 -41
- package/esm2022/lib/components/filters/components/filter-list.module.mjs +0 -45
- package/esm2022/lib/components/filters/index.mjs +0 -3
- package/esm2022/lib/components/filters/register-table-filter.component.mjs +0 -155
- package/esm2022/lib/components/filters/register-table-filter.module.mjs +0 -39
- package/esm2022/lib/components/index.mjs +0 -11
- package/esm2022/lib/components/inputs/index.mjs +0 -20
- package/esm2022/lib/components/inputs/inputs.module.mjs +0 -166
- package/esm2022/lib/components/inputs/param-calendar-year/param-calendar-year.component.mjs +0 -45
- package/esm2022/lib/components/inputs/param-custom/param-custom.component.mjs +0 -12
- package/esm2022/lib/components/inputs/param-date/param-date.component.mjs +0 -76
- package/esm2022/lib/components/inputs/param-date-range/param-date-range.component.mjs +0 -61
- package/esm2022/lib/components/inputs/param-date-time/param-date-time.component.mjs +0 -86
- package/esm2022/lib/components/inputs/param-date-time-range/param-date-time-range.component.mjs +0 -96
- package/esm2022/lib/components/inputs/param-month/param-month.component.mjs +0 -50
- package/esm2022/lib/components/inputs/param-month-range/param-month-range.component.mjs +0 -62
- package/esm2022/lib/components/inputs/param-multi-select/param-multi-select.component.mjs +0 -309
- package/esm2022/lib/components/inputs/param-select/param-select.component.mjs +0 -209
- package/esm2022/lib/components/inputs/param-switcher/param-switcher.component.mjs +0 -21
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.mjs +0 -28
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/index.mjs +0 -3
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.mjs +0 -105
- package/esm2022/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.mjs +0 -10
- package/esm2022/lib/components/inputs/param-text/param-text.component.mjs +0 -40
- package/esm2022/lib/components/inputs/param-textarea/param-textarea.component.mjs +0 -38
- package/esm2022/lib/components/inputs/param-toggle/param-toggle.component.mjs +0 -20
- package/esm2022/lib/components/inputs/param-tree/consts/param-tree.consts.mjs +0 -37
- package/esm2022/lib/components/inputs/param-tree/index.mjs +0 -8
- package/esm2022/lib/components/inputs/param-tree/param-tree.component.mjs +0 -207
- package/esm2022/lib/components/inputs/param-tree/services/param-tree.service.mjs +0 -116
- package/esm2022/lib/components/inputs/param-tree/services/sync-tree-loader.service.mjs +0 -20
- package/esm2022/lib/components/inputs/param-tree/tokens/param-tree.tokens.mjs +0 -3
- package/esm2022/lib/components/inputs/param-tree/types/param-tree.types.mjs +0 -2
- package/esm2022/lib/components/inputs/param-tree/utils/param-tree.utils.mjs +0 -9
- package/esm2022/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.mjs +0 -80
- package/esm2022/lib/components/inputs/param-tree-select/param-tree-select.component.mjs +0 -85
- package/esm2022/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.mjs +0 -15
- package/esm2022/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.mjs +0 -12
- package/esm2022/lib/components/menu-constructor/index.mjs +0 -5
- package/esm2022/lib/components/menu-constructor/sproc-menu-constructor.component.mjs +0 -559
- package/esm2022/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.mjs +0 -3
- package/esm2022/lib/components/menu-constructor/store/sproc-menu-constructor.consts.mjs +0 -5
- package/esm2022/lib/components/menu-constructor/store/sproc-menu.tokens.mjs +0 -3
- package/esm2022/lib/components/page-menu/index.mjs +0 -6
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.consts.mjs +0 -9
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.schema.mjs +0 -2
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.tokens.mjs +0 -4
- package/esm2022/lib/components/page-menu/schema/sproc-page-menu.types.mjs +0 -3
- package/esm2022/lib/components/page-menu/sproc-page-menu.component.mjs +0 -275
- package/esm2022/lib/components/paginator/paginator.component.mjs +0 -159
- package/esm2022/lib/components/paginator/types/paginator.types.mjs +0 -2
- package/esm2022/lib/components/register-table/consts/register-table.consts.mjs +0 -4
- package/esm2022/lib/components/register-table/directives/cell-template.directive.mjs +0 -19
- package/esm2022/lib/components/register-table/directives/header-template.directive.mjs +0 -18
- package/esm2022/lib/components/register-table/index.mjs +0 -4
- package/esm2022/lib/components/register-table/model/schema.mjs +0 -10
- package/esm2022/lib/components/register-table/pipes/class-by-type.pipe.mjs +0 -33
- package/esm2022/lib/components/register-table/pipes/sticky-column.pipe.mjs +0 -17
- package/esm2022/lib/components/register-table/register-table.component.mjs +0 -544
- package/esm2022/lib/components/reset-settings-form/reset-settings-form.component.mjs +0 -18
- package/esm2022/lib/components/search-input/search-input.component.mjs +0 -28
- package/esm2022/lib/components/sliding-panel/sliding-panel.component.mjs +0 -48
- package/esm2022/lib/components/sliding-panel/sliding-panel.module.mjs +0 -19
- package/esm2022/lib/consts/date-time.consts.mjs +0 -2
- package/esm2022/lib/consts/index.mjs +0 -4
- package/esm2022/lib/consts/inputs.consts.mjs +0 -4
- package/esm2022/lib/consts/month.consts.mjs +0 -77
- package/esm2022/lib/consts/params.consts.mjs +0 -2
- package/esm2022/lib/consts/register-base.consts.mjs +0 -26
- package/esm2022/lib/core/form-group-wrapper/errors-consts.mjs +0 -8
- package/esm2022/lib/core/form-group-wrapper/form-group-wrapper.mjs +0 -81
- package/esm2022/lib/core/form-group-wrapper/index.mjs +0 -2
- package/esm2022/lib/core/index.mjs +0 -5
- package/esm2022/lib/core/input-control/index.mjs +0 -2
- package/esm2022/lib/core/input-control/input-control.mjs +0 -11
- package/esm2022/lib/core/param/index.mjs +0 -6
- package/esm2022/lib/core/param/param-base.mjs +0 -215
- package/esm2022/lib/core/param/param-date-base.mjs +0 -26
- package/esm2022/lib/core/param/param-select-base.mjs +0 -114
- package/esm2022/lib/core/param/param-text-base.mjs +0 -25
- package/esm2022/lib/core/param/param.tokens.mjs +0 -4
- package/esm2022/lib/core/register-base/index.mjs +0 -3
- package/esm2022/lib/core/register-base/register-base.mjs +0 -575
- package/esm2022/lib/core/register-base/register-base.store.mjs +0 -43
- package/esm2022/lib/directives/date/date-time.types.mjs +0 -34
- package/esm2022/lib/directives/date/format-date.pipe.mjs +0 -33
- package/esm2022/lib/directives/index.mjs +0 -3
- package/esm2022/lib/directives/number/number-only.directive.mjs +0 -41
- package/esm2022/lib/directives/sticky/index.mjs +0 -3
- package/esm2022/lib/directives/sticky/sticky-relative.directive.mjs +0 -32
- package/esm2022/lib/directives/sticky/sticky-relative.service.mjs +0 -32
- package/esm2022/lib/directives/sticky/sticky.directive.mjs +0 -169
- package/esm2022/lib/services/date-time.service.mjs +0 -314
- package/esm2022/lib/services/dialog/dialog.service.mjs +0 -53
- package/esm2022/lib/services/dialog/dialog.types.mjs +0 -2
- package/esm2022/lib/services/dialog/index.mjs +0 -3
- package/esm2022/lib/services/dom-intersection.service.mjs +0 -22
- package/esm2022/lib/services/filter/filters-state.service.mjs +0 -65
- package/esm2022/lib/services/filter/filters-transmit.service.mjs +0 -82
- package/esm2022/lib/services/filter/filters.service.mjs +0 -23
- package/esm2022/lib/services/index.mjs +0 -8
- package/esm2022/lib/services/inputs-state.service.mjs +0 -130
- package/esm2022/lib/services/inputs.service.mjs +0 -88
- package/esm2022/lib/services/key-pressed.service.mjs +0 -37
- package/esm2022/lib/services/resize-window-observer.service.mjs +0 -33
- package/esm2022/lib/services/selected-objects-state.service.mjs +0 -123
- package/esm2022/lib/store/fast-query-store.service.mjs +0 -110
- package/esm2022/lib/store/index.mjs +0 -2
- package/esm2022/lib/types/event.types.mjs +0 -2
- package/esm2022/lib/types/hasura.types.mjs +0 -2
- package/esm2022/lib/types/index.mjs +0 -7
- package/esm2022/lib/types/inputs.types.mjs +0 -19
- package/esm2022/lib/types/params.types.mjs +0 -2
- package/esm2022/lib/types/register-base.types.mjs +0 -6
- package/esm2022/lib/types/sub-types.mjs +0 -2
- package/esm2022/lib/types/user-profile.types.mjs +0 -2
- package/esm2022/lib/utils/functions.mjs +0 -10
- package/esm2022/lib/utils/get-url-segment.mjs +0 -35
- package/esm2022/lib/utils/index.mjs +0 -5
- package/esm2022/lib/utils/prizm.shared.module.mjs +0 -284
- package/esm2022/lib/utils/rxjs.mjs +0 -28
- package/esm2022/lib/utils/select-all-utils.mjs +0 -11
- package/esm2022/ngx-register-base.mjs +0 -5
- package/esm2022/public-api.mjs +0 -9
- package/fesm2022/ngx-register-base.mjs +0 -7465
- package/fesm2022/ngx-register-base.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/checkbox-selector/checkbox-selector.component.d.ts +0 -33
- package/lib/components/checkbox-selector/checkbox-selector.types.d.ts +0 -7
- package/lib/components/column-settings/column-settings.component.d.ts +0 -80
- package/lib/components/column-settings/components/column-settings-template/column-settings-template.component.d.ts +0 -24
- package/lib/components/column-settings/consts/column-settings.consts.d.ts +0 -8
- package/lib/components/column-settings/types/column-settings.types.d.ts +0 -22
- package/lib/components/divider/divider.component.d.ts +0 -6
- package/lib/components/filter-button/filter-button.component.d.ts +0 -8
- package/lib/components/filters/components/filter-list/filter-edit/filter-edit.component.d.ts +0 -14
- package/lib/components/filters/components/filter-list/filter-list-footer/filter-list-footer.component.d.ts +0 -25
- package/lib/components/filters/components/filter-list/filter-list-header/filter-list-header.component.d.ts +0 -39
- package/lib/components/filters/components/filter-list/filter-list-saved/filter-list-saved.component.d.ts +0 -41
- package/lib/components/filters/components/filter-list/filter-list.service.d.ts +0 -20
- package/lib/components/filters/components/filter-list/filters-section/filters-section.component.d.ts +0 -15
- package/lib/components/filters/components/filter-list.module.d.ts +0 -15
- package/lib/components/filters/register-table-filter.component.d.ts +0 -40
- package/lib/components/filters/register-table-filter.module.d.ts +0 -13
- package/lib/components/inputs/inputs.module.d.ts +0 -31
- package/lib/components/inputs/param-calendar-year/param-calendar-year.component.d.ts +0 -19
- package/lib/components/inputs/param-custom/param-custom.component.d.ts +0 -6
- package/lib/components/inputs/param-date/param-date.component.d.ts +0 -20
- package/lib/components/inputs/param-date-range/param-date-range.component.d.ts +0 -26
- package/lib/components/inputs/param-date-time/param-date-time.component.d.ts +0 -25
- package/lib/components/inputs/param-date-time-range/param-date-time-range.component.d.ts +0 -28
- package/lib/components/inputs/param-month/param-month.component.d.ts +0 -18
- package/lib/components/inputs/param-month-range/param-month-range.component.d.ts +0 -21
- package/lib/components/inputs/param-multi-select/param-multi-select.component.d.ts +0 -46
- package/lib/components/inputs/param-select/param-select.component.d.ts +0 -30
- package/lib/components/inputs/param-switcher/param-switcher.component.d.ts +0 -8
- package/lib/components/inputs/param-switcher-date-time-range/consts/param-switcher-date-time-range.consts.d.ts +0 -2
- package/lib/components/inputs/param-switcher-date-time-range/param-switcher-date-time-range.component.d.ts +0 -19
- package/lib/components/inputs/param-switcher-date-time-range/types/param-switcher-date-time-range.types.d.ts +0 -8
- package/lib/components/inputs/param-text/param-text.component.d.ts +0 -10
- package/lib/components/inputs/param-textarea/param-textarea.component.d.ts +0 -10
- package/lib/components/inputs/param-toggle/param-toggle.component.d.ts +0 -9
- package/lib/components/inputs/param-tree/consts/param-tree.consts.d.ts +0 -7
- package/lib/components/inputs/param-tree/param-tree.component.d.ts +0 -41
- package/lib/components/inputs/param-tree/services/param-tree.service.d.ts +0 -37
- package/lib/components/inputs/param-tree/services/sync-tree-loader.service.d.ts +0 -10
- package/lib/components/inputs/param-tree/types/param-tree.types.d.ts +0 -32
- package/lib/components/inputs/param-tree/utils/param-tree.utils.d.ts +0 -7
- package/lib/components/inputs/param-tree-multi-select/param-tree-multi-select.component.d.ts +0 -31
- package/lib/components/inputs/param-tree-select/param-tree-select.component.d.ts +0 -30
- package/lib/components/inputs/sub-components/param-delete-content-icon/param-delete-content-btn.component.d.ts +0 -6
- package/lib/components/inputs/sub-components/param-invalid-icon/param-invalid-icon.component.d.ts +0 -5
- package/lib/components/menu-constructor/sproc-menu-constructor.component.d.ts +0 -113
- package/lib/components/menu-constructor/store/sproc-abstract-menu-constructor.store.d.ts +0 -24
- package/lib/components/menu-constructor/store/sproc-menu-constructor.consts.d.ts +0 -36
- package/lib/components/page-menu/schema/sproc-page-menu.consts.d.ts +0 -7
- package/lib/components/page-menu/schema/sproc-page-menu.schema.d.ts +0 -30
- package/lib/components/page-menu/schema/sproc-page-menu.tokens.d.ts +0 -3
- package/lib/components/page-menu/schema/sproc-page-menu.types.d.ts +0 -36
- package/lib/components/page-menu/sproc-page-menu.component.d.ts +0 -48
- package/lib/components/paginator/paginator.component.d.ts +0 -52
- package/lib/components/paginator/types/paginator.types.d.ts +0 -15
- package/lib/components/register-table/consts/register-table.consts.d.ts +0 -3
- package/lib/components/register-table/directives/cell-template.directive.d.ts +0 -9
- package/lib/components/register-table/directives/header-template.directive.d.ts +0 -9
- package/lib/components/register-table/model/schema.d.ts +0 -52
- package/lib/components/register-table/pipes/class-by-type.pipe.d.ts +0 -8
- package/lib/components/register-table/pipes/sticky-column.pipe.d.ts +0 -7
- package/lib/components/register-table/register-table.component.d.ts +0 -165
- package/lib/components/reset-settings-form/reset-settings-form.component.d.ts +0 -9
- package/lib/components/search-input/search-input.component.d.ts +0 -11
- package/lib/components/sliding-panel/sliding-panel.component.d.ts +0 -14
- package/lib/components/sliding-panel/sliding-panel.module.d.ts +0 -9
- package/lib/consts/date-time.consts.d.ts +0 -1
- package/lib/consts/index.d.ts +0 -3
- package/lib/consts/inputs.consts.d.ts +0 -4
- package/lib/consts/month.consts.d.ts +0 -49
- package/lib/consts/params.consts.d.ts +0 -1
- package/lib/consts/register-base.consts.d.ts +0 -19
- package/lib/core/form-group-wrapper/errors-consts.d.ts +0 -5
- package/lib/core/form-group-wrapper/form-group-wrapper.d.ts +0 -15
- package/lib/core/input-control/input-control.d.ts +0 -11
- package/lib/core/param/param-base.d.ts +0 -68
- package/lib/core/param/param-date-base.d.ts +0 -18
- package/lib/core/param/param-select-base.d.ts +0 -42
- package/lib/core/param/param-text-base.d.ts +0 -15
- package/lib/core/register-base/register-base.d.ts +0 -168
- package/lib/core/register-base/register-base.store.d.ts +0 -35
- package/lib/directives/date/date-time.types.d.ts +0 -32
- package/lib/directives/date/format-date.pipe.d.ts +0 -10
- package/lib/directives/number/number-only.directive.d.ts +0 -10
- package/lib/directives/sticky/sticky-relative.directive.d.ts +0 -13
- package/lib/directives/sticky/sticky-relative.service.d.ts +0 -15
- package/lib/directives/sticky/sticky.directive.d.ts +0 -27
- package/lib/services/date-time.service.d.ts +0 -80
- package/lib/services/dialog/dialog.service.d.ts +0 -22
- package/lib/services/dom-intersection.service.d.ts +0 -8
- package/lib/services/filter/filters-state.service.d.ts +0 -21
- package/lib/services/filter/filters-transmit.service.d.ts +0 -28
- package/lib/services/filter/filters.service.d.ts +0 -12
- package/lib/services/inputs-state.service.d.ts +0 -57
- package/lib/services/inputs.service.d.ts +0 -28
- package/lib/services/key-pressed.service.d.ts +0 -15
- package/lib/services/resize-window-observer.service.d.ts +0 -11
- package/lib/services/selected-objects-state.service.d.ts +0 -47
- package/lib/store/fast-query-store.service.d.ts +0 -19
- package/lib/types/hasura.types.d.ts +0 -35
- package/lib/types/inputs.types.d.ts +0 -41
- package/lib/types/params.types.d.ts +0 -27
- package/lib/types/register-base.types.d.ts +0 -123
- package/lib/types/sub-types.d.ts +0 -8
- package/lib/types/user-profile.types.d.ts +0 -17
- package/lib/utils/functions.d.ts +0 -3
- package/lib/utils/get-url-segment.d.ts +0 -7
- package/lib/utils/prizm.shared.module.d.ts +0 -14
- package/lib/utils/rxjs.d.ts +0 -10
- package/lib/utils/select-all-utils.d.ts +0 -8
- package/schematics/ng-update/replace-menu-state-token/index.d.ts +0 -2
- package/schematics/ng-update/replace-menu-state-token/index.js +0 -29
- package/schematics/ng-update/replace-menu-state-token/index.js.map +0 -1
- package/schematics/ng-update/update-prefix/index.d.ts +0 -2
- package/schematics/ng-update/update-prefix/index.js +0 -33
- package/schematics/ng-update/update-prefix/index.js.map +0 -1
- package/schematics/utils/utils.js +0 -25
- package/schematics/utils/utils.js.map +0 -1
- /package/{lib/components/column-settings/index.d.ts → src/lib/components/column-settings/index.ts} +0 -0
- /package/{lib/components/filters/index.d.ts → src/lib/components/filters/index.ts} +0 -0
- /package/{lib/components/index.d.ts → src/lib/components/index.ts} +0 -0
- /package/{lib/components/inputs/index.d.ts → src/lib/components/inputs/index.ts} +0 -0
- /package/{lib/components/inputs/param-switcher-date-time-range/index.d.ts → src/lib/components/inputs/param-switcher-date-time-range/index.ts} +0 -0
- /package/{lib/components/inputs/param-tree/index.d.ts → src/lib/components/inputs/param-tree/index.ts} +0 -0
- /package/{lib/components/menu-constructor/index.d.ts → src/lib/components/menu-constructor/index.ts} +0 -0
- /package/{lib/components/page-menu/index.d.ts → src/lib/components/page-menu/index.ts} +0 -0
- /package/{lib/components/register-table/index.d.ts → src/lib/components/register-table/index.ts} +0 -0
- /package/{lib/core/form-group-wrapper/index.d.ts → src/lib/core/form-group-wrapper/index.ts} +0 -0
- /package/{lib/core/index.d.ts → src/lib/core/index.ts} +0 -0
- /package/{lib/core/input-control/index.d.ts → src/lib/core/input-control/index.ts} +0 -0
- /package/{lib/core/param/index.d.ts → src/lib/core/param/index.ts} +0 -0
- /package/{lib/core/register-base/index.d.ts → src/lib/core/register-base/index.ts} +0 -0
- /package/{lib/directives/index.d.ts → src/lib/directives/index.ts} +0 -0
- /package/{lib/directives/sticky/index.d.ts → src/lib/directives/sticky/index.ts} +0 -0
- /package/{lib/services/dialog/index.d.ts → src/lib/services/dialog/index.ts} +0 -0
- /package/{lib/services/index.d.ts → src/lib/services/index.ts} +0 -0
- /package/{lib/store/index.d.ts → src/lib/store/index.ts} +0 -0
- /package/{lib/types/index.d.ts → src/lib/types/index.ts} +0 -0
- /package/{lib/utils/index.d.ts → src/lib/utils/index.ts} +0 -0
- /package/{public-api.d.ts → src/public-api.ts} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Injectable, Injector, Optional } from '@angular/core';
|
|
2
|
+
import { InputsService } from '../inputs.service';
|
|
3
|
+
import { FiltersTransmitService } from './filters-transmit.service';
|
|
4
|
+
import { FormGroupWrapper } from '../../core/form-group-wrapper/form-group-wrapper';
|
|
5
|
+
|
|
6
|
+
@Injectable()
|
|
7
|
+
export class FiltersService<FormType> extends InputsService<FormType> {
|
|
8
|
+
constructor(
|
|
9
|
+
injector: Injector,
|
|
10
|
+
@Optional() private readonly _transmitter: FiltersTransmitService
|
|
11
|
+
) {
|
|
12
|
+
super(injector);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public override init(group: FormGroupWrapper<FormType>): void {
|
|
16
|
+
super.init(group);
|
|
17
|
+
|
|
18
|
+
this._transmitter?.setForm(this.inputs);
|
|
19
|
+
this._transmitter?.setSearchInput(this.searchInput);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { DestroyRef, inject, Injectable, OnDestroy } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject, Subject } from 'rxjs';
|
|
3
|
+
import { EInputsAction, EInputsState, GqlFields, IInputsState } from '../types';
|
|
4
|
+
import { Router } from '@angular/router';
|
|
5
|
+
import { getLastSegmentOfPathName } from '../utils';
|
|
6
|
+
import { RegisterTableCellSorter } from '../components/register-table/model/schema';
|
|
7
|
+
|
|
8
|
+
export const DEFAULT_LIMIT = 30;
|
|
9
|
+
|
|
10
|
+
@Injectable()
|
|
11
|
+
export class InputsStateService<T = any> implements OnDestroy {
|
|
12
|
+
protected readonly unsubscribe$ = new Subject<void>();
|
|
13
|
+
|
|
14
|
+
protected readonly _page$ = new BehaviorSubject<number>(1);
|
|
15
|
+
protected readonly _limit$ = new BehaviorSubject<number | null>(null);
|
|
16
|
+
protected readonly _offset$ = new BehaviorSubject<number>(0);
|
|
17
|
+
protected readonly _count$ = new BehaviorSubject<number>(0);
|
|
18
|
+
protected readonly _sorter$ = new BehaviorSubject<RegisterTableCellSorter<T>[]>([]);
|
|
19
|
+
protected readonly _name$ = new BehaviorSubject<string>('');
|
|
20
|
+
protected readonly _state$ = new BehaviorSubject<IInputsState>({
|
|
21
|
+
state: EInputsState.HIDDEN,
|
|
22
|
+
action: EInputsAction.OPEN,
|
|
23
|
+
});
|
|
24
|
+
// TODO: заменить на нормальный тип
|
|
25
|
+
protected readonly _gqlValues$ = new BehaviorSubject<GqlFields>([]);
|
|
26
|
+
protected readonly _pinned$ = new BehaviorSubject<boolean>(false);
|
|
27
|
+
|
|
28
|
+
public readonly page$ = this._page$.asObservable();
|
|
29
|
+
public readonly limit$ = this._limit$.asObservable();
|
|
30
|
+
public readonly offset$ = this._offset$.asObservable();
|
|
31
|
+
public readonly count$ = this._count$.asObservable();
|
|
32
|
+
public readonly sorter$ = this._sorter$.asObservable();
|
|
33
|
+
public readonly name$ = this._name$.asObservable();
|
|
34
|
+
public readonly state$ = this._state$.asObservable();
|
|
35
|
+
public readonly gqlValues$ = this._gqlValues$.asObservable();
|
|
36
|
+
public readonly pinned$ = this._pinned$.asObservable();
|
|
37
|
+
|
|
38
|
+
protected readonly destroyRef = inject(DestroyRef);
|
|
39
|
+
|
|
40
|
+
protected readonly router = inject(Router);
|
|
41
|
+
|
|
42
|
+
protected readonly modulePath = getLastSegmentOfPathName(this.router.url);
|
|
43
|
+
|
|
44
|
+
public readonly pinStorageKey = `@pin/${this.modulePath}`;
|
|
45
|
+
public readonly pinnedInputsStorageKey = `@pinned-inputs/${this.modulePath}`;
|
|
46
|
+
|
|
47
|
+
public toggle(): void {
|
|
48
|
+
const isOpen = this.state.state !== EInputsState.HIDDEN;
|
|
49
|
+
|
|
50
|
+
// если фильтр был открыт, значит его закрывают - открепляем
|
|
51
|
+
if (isOpen) {
|
|
52
|
+
this.setPin(false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
this.setState({
|
|
56
|
+
state: isOpen ? EInputsState.HIDDEN : EInputsState.FILTER_LIST,
|
|
57
|
+
action: EInputsAction.OPEN,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public togglePin(): void {
|
|
62
|
+
this.setPin(!this.isPin);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public ngOnDestroy(): void {
|
|
66
|
+
this._page$.complete();
|
|
67
|
+
this._limit$.complete();
|
|
68
|
+
this._name$.complete();
|
|
69
|
+
this._offset$.complete();
|
|
70
|
+
this._count$.complete();
|
|
71
|
+
this._state$.complete();
|
|
72
|
+
this._sorter$.complete();
|
|
73
|
+
this._gqlValues$.complete();
|
|
74
|
+
this._pinned$.complete();
|
|
75
|
+
|
|
76
|
+
this.unsubscribe$.next();
|
|
77
|
+
this.unsubscribe$.complete();
|
|
78
|
+
|
|
79
|
+
this.onDestroy();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
protected onDestroy(): void {}
|
|
83
|
+
|
|
84
|
+
public setPage(page: number): void {
|
|
85
|
+
this._page$.next(page);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
public setLimit(limit: number): void {
|
|
89
|
+
this._limit$.next(limit);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
public setOffset(offset: number): void {
|
|
93
|
+
this._offset$.next(offset);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
public setSorter(sort: RegisterTableCellSorter<T>[]): void {
|
|
97
|
+
this._sorter$.next(sort);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public setName(name: string): void {
|
|
101
|
+
this._name$.next(name);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public setCount(count: number): void {
|
|
105
|
+
this._count$.next(count);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public setState(state: IInputsState): void {
|
|
109
|
+
if (!(this.isPin && state.state === EInputsState.HIDDEN)) {
|
|
110
|
+
this._state$.next(state);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
public setGqlValues(values: GqlFields): void {
|
|
115
|
+
this._gqlValues$.next(values);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
public setPin(isPin: boolean): void {
|
|
119
|
+
this._pinned$.next(isPin);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
public get page(): number {
|
|
123
|
+
return this._page$.getValue();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
public get limit(): number {
|
|
127
|
+
return this._limit$.getValue() ?? DEFAULT_LIMIT;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
public get offset(): number {
|
|
131
|
+
return this._offset$.getValue();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
public get state(): IInputsState {
|
|
135
|
+
return this._state$.getValue();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
public get count(): number {
|
|
139
|
+
return this._count$.getValue();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
public get sorter(): RegisterTableCellSorter<T>[] {
|
|
143
|
+
return this._sorter$.getValue();
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
public get name(): string {
|
|
147
|
+
return this._name$.getValue();
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
public get gqlValues(): GqlFields {
|
|
151
|
+
return this._gqlValues$.getValue();
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
public get isPin(): boolean {
|
|
155
|
+
return this._pinned$.getValue();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Injectable, Injector, OnDestroy } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { FormGroupWrapper } from '../core/form-group-wrapper/form-group-wrapper';
|
|
4
|
+
import { ITpUserSettingsSettingsFilter } from '../types/register-base.types';
|
|
5
|
+
import { ExtractForm } from '../types/sub-types';
|
|
6
|
+
import { IInputControl, IInputsStateConfig } from '../types/inputs.types';
|
|
7
|
+
import { InputControl } from '../core/input-control/input-control';
|
|
8
|
+
import { INPUTS_STATE_CONFIG_KEY, WARN_SEARCH_INPUT_UNDEFINED } from '../consts/inputs.consts';
|
|
9
|
+
|
|
10
|
+
@Injectable()
|
|
11
|
+
export class InputsService<FormType> implements OnDestroy {
|
|
12
|
+
protected readonly config: IInputsStateConfig;
|
|
13
|
+
protected readonly unsubscribe$ = new Subject<void>();
|
|
14
|
+
|
|
15
|
+
private readonly _searchInput: IInputControl<string | null> | undefined;
|
|
16
|
+
public inputs!: FormGroupWrapper<FormType>;
|
|
17
|
+
|
|
18
|
+
constructor(private readonly injector: Injector) {
|
|
19
|
+
this.config = this.injector.get(INPUTS_STATE_CONFIG_KEY, {});
|
|
20
|
+
|
|
21
|
+
const { searchInput } = this.config;
|
|
22
|
+
|
|
23
|
+
if (searchInput) {
|
|
24
|
+
this._searchInput = new InputControl<string | null>(null);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public get searchInput(): IInputControl<string | null> | undefined {
|
|
29
|
+
if (!this._searchInput) {
|
|
30
|
+
console.warn(WARN_SEARCH_INPUT_UNDEFINED);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return this._searchInput;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public get searchValue(): string | null | undefined {
|
|
37
|
+
return this.searchInput?.getRawValue();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public init(group: FormGroupWrapper<FormType>): void {
|
|
41
|
+
this.inputs = group;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public get values(): ExtractForm<FormType> {
|
|
45
|
+
return this.inputs.getRawValue() as ExtractForm<FormType>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public get dirtyValues(): Partial<ExtractForm<FormType>> {
|
|
49
|
+
return this.inputs.getDirtyValues();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public clear(): void {
|
|
53
|
+
this.inputs.reset();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public setUserSettingsFilterValues(values: ITpUserSettingsSettingsFilter[]): void {
|
|
57
|
+
this.clear();
|
|
58
|
+
|
|
59
|
+
for (const { id, value } of values) {
|
|
60
|
+
const key = id as keyof FormType;
|
|
61
|
+
const control = this._control<any, any>(key);
|
|
62
|
+
|
|
63
|
+
if (control?.saved_value$) {
|
|
64
|
+
control.saved_value$.next(value);
|
|
65
|
+
} else {
|
|
66
|
+
console.warn(`Не найдено поле: ${id} для установки значения:`, value);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private _control<ValueType extends FormType[keyof FormType], SavedValueType>(
|
|
72
|
+
key: keyof FormType
|
|
73
|
+
): IInputControl<ValueType, SavedValueType> {
|
|
74
|
+
return this.inputs.controls[key] as IInputControl<ValueType, SavedValueType>;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
public get userSettingsFilter(): ITpUserSettingsSettingsFilter[] {
|
|
78
|
+
return Object.entries(this.inputs.controls).map(([id, abstractControl]) => {
|
|
79
|
+
const control = abstractControl as IInputControl;
|
|
80
|
+
const value = control.saved_value$.getValue();
|
|
81
|
+
const savedValue = value === null ? null : value;
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
id,
|
|
85
|
+
value: savedValue,
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
public get gqlFilter(): Record<string, any>[] {
|
|
91
|
+
const filter: Record<string, any>[] = [];
|
|
92
|
+
|
|
93
|
+
for (const abstractControl of Object.values(this.inputs.controls)) {
|
|
94
|
+
const control = abstractControl as IInputControl;
|
|
95
|
+
|
|
96
|
+
if (control.gql_value) {
|
|
97
|
+
filter.push(control.gql_value);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
control.applied?.set(!!control.gql_value);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (this.searchValue && this.searchInput?.gql_value) {
|
|
104
|
+
filter.push(this.searchInput.gql_value);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return filter;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
public ngOnDestroy(): void {
|
|
111
|
+
this.unsubscribe$.next();
|
|
112
|
+
this.unsubscribe$.complete();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { inject, Injectable, InjectionToken, OnDestroy } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
|
|
4
|
+
export const KEY_PRESSED = new InjectionToken<string>('KEY_PRESSED_TOKEN');
|
|
5
|
+
|
|
6
|
+
@Injectable()
|
|
7
|
+
export class KeyPressedService implements OnDestroy {
|
|
8
|
+
private _keyName = inject(KEY_PRESSED);
|
|
9
|
+
|
|
10
|
+
private readonly _isPressed$ = new BehaviorSubject(false);
|
|
11
|
+
|
|
12
|
+
public readonly isPressed$ = this._isPressed$.asObservable();
|
|
13
|
+
|
|
14
|
+
constructor() {
|
|
15
|
+
window.addEventListener('keydown', this._keydownListener);
|
|
16
|
+
window.addEventListener('keyup', this._keyupListener);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public isPressed(): boolean {
|
|
20
|
+
return this._isPressed$.getValue();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public ngOnDestroy(): void {
|
|
24
|
+
this._isPressed$.complete();
|
|
25
|
+
window.removeEventListener('keydown', this._keydownListener);
|
|
26
|
+
window.removeEventListener('keyup', this._keyupListener);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
private readonly _keydownListener = (event: KeyboardEvent) => {
|
|
30
|
+
if (event.key === this._keyName) {
|
|
31
|
+
this._isPressed$.next(true);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
private readonly _keyupListener = (event: KeyboardEvent) => {
|
|
36
|
+
if (event.key === this._keyName) {
|
|
37
|
+
this._isPressed$.next(false);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { afterNextRender, DestroyRef, inject, Injectable, NgZone, signal } from '@angular/core';
|
|
2
|
+
import { debounceTime, distinctUntilChanged, fromEvent, map } from 'rxjs';
|
|
3
|
+
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
4
|
+
|
|
5
|
+
const RESIZE_WINDOW_DEBOUNCE_MLS = 100;
|
|
6
|
+
|
|
7
|
+
@Injectable()
|
|
8
|
+
export class ResizeWindowObserverService {
|
|
9
|
+
private readonly _zone = inject(NgZone);
|
|
10
|
+
private readonly _destroyRef = inject(DestroyRef);
|
|
11
|
+
|
|
12
|
+
public readonly innerHeight = signal(window.innerHeight);
|
|
13
|
+
public readonly innerWidth = signal(window.innerWidth);
|
|
14
|
+
|
|
15
|
+
public readonly innerHeight$ = toObservable(this.innerHeight);
|
|
16
|
+
|
|
17
|
+
constructor() {
|
|
18
|
+
afterNextRender(() => {
|
|
19
|
+
this._zone.runOutsideAngular(() => {
|
|
20
|
+
fromEvent(window, 'resize')
|
|
21
|
+
.pipe(
|
|
22
|
+
debounceTime(RESIZE_WINDOW_DEBOUNCE_MLS),
|
|
23
|
+
map(() => ({
|
|
24
|
+
height: window.innerHeight,
|
|
25
|
+
width: window.innerWidth,
|
|
26
|
+
})),
|
|
27
|
+
distinctUntilChanged(),
|
|
28
|
+
takeUntilDestroyed(this._destroyRef)
|
|
29
|
+
)
|
|
30
|
+
.subscribe(({ height, width }) => {
|
|
31
|
+
this.innerHeight.set(height);
|
|
32
|
+
this.innerWidth.set(width);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { computed, DestroyRef, inject, Injectable, signal } from '@angular/core';
|
|
2
|
+
import { ScalarUUID } from 'hasura';
|
|
3
|
+
import { BehaviorSubject, skip, take } from 'rxjs';
|
|
4
|
+
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { ERegisterObjectState, IRegisterObject } from '../types/register-base.types';
|
|
6
|
+
import { invertState } from '../consts/register-base.consts';
|
|
7
|
+
import { isDefined } from '../utils';
|
|
8
|
+
import {
|
|
9
|
+
ApplySelectionTypes,
|
|
10
|
+
SelectionTypes,
|
|
11
|
+
} from '../components/checkbox-selector/checkbox-selector.types';
|
|
12
|
+
|
|
13
|
+
/** Сервис хранения состояния выбранных в реестре объектов */
|
|
14
|
+
@Injectable()
|
|
15
|
+
export class SelectedObjectsStateService<T extends { id: ScalarUUID } = any> {
|
|
16
|
+
/** Состояние всех загруженных объектов реестра */
|
|
17
|
+
public readonly state = signal(new Map<ScalarUUID, IRegisterObject<T>>());
|
|
18
|
+
/** Ключи всех выбранных объектов реестра */
|
|
19
|
+
public readonly selectedKeys = computed(() => {
|
|
20
|
+
const selected = this._filterStateObjectsByState(this.state(), ERegisterObjectState.SELECTED);
|
|
21
|
+
|
|
22
|
+
return new Set(selected.keys());
|
|
23
|
+
});
|
|
24
|
+
/** Ключи всех выбранных или не выбранных объектов реестра (зависит от stateUnfetchedObjects) */
|
|
25
|
+
public readonly keys = computed(() => {
|
|
26
|
+
const unfetchedState = this.stateUnfetchedObjects();
|
|
27
|
+
|
|
28
|
+
return new Set(
|
|
29
|
+
this._filterStateObjectsByState(this.state(), invertState(unfetchedState)).keys()
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
/** Значения всех выбранных объектов реестра */
|
|
33
|
+
public readonly selectedValues = computed(() => {
|
|
34
|
+
const selected = this._filterStateObjectsByState(this.state(), ERegisterObjectState.SELECTED);
|
|
35
|
+
|
|
36
|
+
return new Set(
|
|
37
|
+
[...selected.values()].map(({ object }) => object).filter((object) => isDefined(object))
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
/** Значения всех не выбранных объектов реестра */
|
|
41
|
+
public readonly unselectedValues = computed(() => {
|
|
42
|
+
const selected = this._filterStateObjectsByState(this.state(), ERegisterObjectState.UNSELECTED);
|
|
43
|
+
|
|
44
|
+
return new Set(
|
|
45
|
+
[...selected.values()].map(({ object }) => object).filter((object) => isDefined(object))
|
|
46
|
+
);
|
|
47
|
+
});
|
|
48
|
+
/** Значения всех выбранных или не выбранных объектов реестра (зависит от stateUnfetchedObjects) */
|
|
49
|
+
public readonly values = computed(() => {
|
|
50
|
+
const unfetchedState = this.stateUnfetchedObjects();
|
|
51
|
+
|
|
52
|
+
return new Set(
|
|
53
|
+
[...this._filterStateObjectsByState(this.state(), invertState(unfetchedState)).values()]
|
|
54
|
+
.map(({ object }) => object)
|
|
55
|
+
.filter((object) => isDefined(object))
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
public readonly selectionType$ = new BehaviorSubject<ApplySelectionTypes>(null);
|
|
60
|
+
public readonly stateUnfetchedObjects$ = new BehaviorSubject<ERegisterObjectState>(
|
|
61
|
+
ERegisterObjectState.UNSELECTED
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
public readonly stateUnfetchedObjects = toSignal(this.stateUnfetchedObjects$.asObservable(), {
|
|
65
|
+
initialValue: ERegisterObjectState.UNSELECTED,
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
private readonly _dr = inject(DestroyRef);
|
|
69
|
+
|
|
70
|
+
constructor() {
|
|
71
|
+
this._subscribeOnSelectionType();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Установить состояние всем загруженным объектам
|
|
76
|
+
*
|
|
77
|
+
* @param nextState - устанавливаемое состояние
|
|
78
|
+
* */
|
|
79
|
+
public setAllStateObjectsByState(nextState: ERegisterObjectState): void {
|
|
80
|
+
if (nextState === ERegisterObjectState.UNSELECTED) {
|
|
81
|
+
this.stateUnfetchedObjects$.next(ERegisterObjectState.UNSELECTED);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
for (const key of this.state().keys()) {
|
|
85
|
+
this.setStateObjectByKey(key, { state: nextState });
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
this._refresh();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Обновить свойства загруженного объекта по ключу
|
|
93
|
+
*
|
|
94
|
+
* @param key - ключ загруженного объекта
|
|
95
|
+
* @param updates - обновление, содержащее свойства которые нужно обновить
|
|
96
|
+
* */
|
|
97
|
+
public setStateObjectByKey(key: ScalarUUID, updates: Partial<IRegisterObject<T>>): void {
|
|
98
|
+
const objects = new Map(this.state());
|
|
99
|
+
|
|
100
|
+
const stateObject = objects.get(key) ?? { state: ERegisterObjectState.UNSELECTED };
|
|
101
|
+
objects.set(key, { ...stateObject, ...updates });
|
|
102
|
+
|
|
103
|
+
this.state.set(objects);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
public loadStateObjects(data: T[]): void {
|
|
107
|
+
const state = this.stateUnfetchedObjects$?.getValue();
|
|
108
|
+
|
|
109
|
+
for (const object of data) {
|
|
110
|
+
if (!this.state().has(object.id)) {
|
|
111
|
+
this.setStateObjectByKey(object.id, { object, state });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
this._refresh();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
private _refresh(): void {
|
|
119
|
+
this.state.update((state) => new Map(state));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
public resetState(data?: T[]): void {
|
|
123
|
+
this.stateUnfetchedObjects$
|
|
124
|
+
.asObservable()
|
|
125
|
+
.pipe(skip(1), take(1))
|
|
126
|
+
.subscribe(() => {
|
|
127
|
+
this.state.set(new Map());
|
|
128
|
+
|
|
129
|
+
if (data) {
|
|
130
|
+
this.loadStateObjects(data);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
this.selectionType$.next(null);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private _filterStateObjectsByState(
|
|
137
|
+
stateObjects: Map<ScalarUUID, IRegisterObject<T>>,
|
|
138
|
+
filterState: ERegisterObjectState
|
|
139
|
+
) {
|
|
140
|
+
return new Map([...stateObjects].filter(([_, { state }]) => state === filterState));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
private _subscribeOnSelectionType(): void {
|
|
144
|
+
this.selectionType$
|
|
145
|
+
.asObservable()
|
|
146
|
+
.pipe(takeUntilDestroyed(this._dr))
|
|
147
|
+
.subscribe((type) => {
|
|
148
|
+
let newState = ERegisterObjectState.UNSELECTED;
|
|
149
|
+
|
|
150
|
+
if (type === SelectionTypes.ALL) {
|
|
151
|
+
newState = ERegisterObjectState.SELECTED;
|
|
152
|
+
} else if (type === SelectionTypes.INVERSE) {
|
|
153
|
+
newState = invertState(this.stateUnfetchedObjects$.getValue());
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
this.stateUnfetchedObjects$.next(newState);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { inject, Injectable } from '@angular/core';
|
|
2
|
+
import { Apollo } from 'apollo-angular';
|
|
3
|
+
import { DocumentNode } from 'graphql/language';
|
|
4
|
+
import gql from 'graphql-tag';
|
|
5
|
+
import { QueryOptions } from '@apollo/client/core';
|
|
6
|
+
import { map, Observable, of, take } from 'rxjs';
|
|
7
|
+
import { MetaQuery } from '../types/params.types';
|
|
8
|
+
|
|
9
|
+
@Injectable()
|
|
10
|
+
export class FastQueryStore {
|
|
11
|
+
private cachedTime = -12_345;
|
|
12
|
+
private cachedVariables = '';
|
|
13
|
+
private cachedData: { data: Record<string, any>[]; totalElements: number } = {
|
|
14
|
+
data: [],
|
|
15
|
+
totalElements: 0,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
private readonly _apollo = inject(Apollo);
|
|
19
|
+
|
|
20
|
+
public getResults(
|
|
21
|
+
meta: MetaQuery,
|
|
22
|
+
withoutAggregate?: boolean,
|
|
23
|
+
selectedIdsWhere?: object
|
|
24
|
+
): Observable<{ data: Record<string, any>[]; totalElements: number; selectedIdsQuery?: any[] }> {
|
|
25
|
+
const offset = meta.offset ?? 0;
|
|
26
|
+
const { limit } = meta;
|
|
27
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
28
|
+
const { order_by } = meta;
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
30
|
+
const { distinct_on, where } = meta;
|
|
31
|
+
let variables: Record<string, any> = { offset, limit, order_by, distinct_on };
|
|
32
|
+
|
|
33
|
+
if (where) {
|
|
34
|
+
variables = {
|
|
35
|
+
...variables,
|
|
36
|
+
where,
|
|
37
|
+
...(selectedIdsWhere && { selectedIdsWhere }),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const currentTime = Date.now();
|
|
42
|
+
const diff = (currentTime - this.cachedTime) / 20_000;
|
|
43
|
+
if (JSON.stringify(variables) === this.cachedVariables && diff <= 1) {
|
|
44
|
+
return of(this.cachedData);
|
|
45
|
+
}
|
|
46
|
+
const query = this.generateGqlQuery(meta, withoutAggregate, !!where && !!selectedIdsWhere);
|
|
47
|
+
const queryOptions: QueryOptions = {
|
|
48
|
+
query,
|
|
49
|
+
fetchPolicy: 'no-cache',
|
|
50
|
+
variables,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return this._apollo.watchQuery<any>(queryOptions).valueChanges.pipe(
|
|
54
|
+
take(1),
|
|
55
|
+
map(({ data }) => {
|
|
56
|
+
const { table } = meta;
|
|
57
|
+
|
|
58
|
+
const totalElements = withoutAggregate
|
|
59
|
+
? data[table.name].length
|
|
60
|
+
: data[`${table.name}_aggregate`].aggregate.count;
|
|
61
|
+
const selectedIdsQuery = data?.selectedIdsQuery;
|
|
62
|
+
const result = { data: data[table.name], totalElements, selectedIdsQuery };
|
|
63
|
+
this.cachedVariables = JSON.stringify(variables);
|
|
64
|
+
this.cachedData = result;
|
|
65
|
+
this.cachedTime = Date.now();
|
|
66
|
+
return result;
|
|
67
|
+
})
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public generateGqlQuery(
|
|
72
|
+
meta: MetaQuery,
|
|
73
|
+
withoutAggregate?: boolean,
|
|
74
|
+
withPickedSearch?: boolean
|
|
75
|
+
): DocumentNode {
|
|
76
|
+
const data = this._buildDeepDataFromValue(meta.table.valueField);
|
|
77
|
+
|
|
78
|
+
return gql`
|
|
79
|
+
query queryFilter${meta.table.name}(
|
|
80
|
+
$where: ${meta.table.name}_bool_exp
|
|
81
|
+
$selectedIdsWhere: ${meta.table.name}_bool_exp
|
|
82
|
+
$limit: Int
|
|
83
|
+
$offset: Int
|
|
84
|
+
$order_by: [${meta.table.name}_order_by!]
|
|
85
|
+
$distinct_on: [${meta.table.name}_select_column!]
|
|
86
|
+
) {
|
|
87
|
+
${
|
|
88
|
+
meta.table.name
|
|
89
|
+
} (where: $where, limit: $limit, offset: $offset, order_by: $order_by, distinct_on: $distinct_on) {
|
|
90
|
+
${meta.table.idField}
|
|
91
|
+
${data}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
${
|
|
95
|
+
withoutAggregate
|
|
96
|
+
? ''
|
|
97
|
+
: `${meta.table.name}_aggregate (where: $where) {
|
|
98
|
+
aggregate {
|
|
99
|
+
count
|
|
100
|
+
}
|
|
101
|
+
}`
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
${
|
|
105
|
+
withPickedSearch
|
|
106
|
+
? `
|
|
107
|
+
selectedIdsQuery: ${meta.table.name}(where: $selectedIdsWhere) {
|
|
108
|
+
${meta.table.idField}
|
|
109
|
+
${data}
|
|
110
|
+
}
|
|
111
|
+
`
|
|
112
|
+
: ''
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
private _buildDeepDataFromValue(value: string): string {
|
|
120
|
+
const resultArray = value.split(' ');
|
|
121
|
+
const arr = [];
|
|
122
|
+
for (const el of resultArray) {
|
|
123
|
+
let result = '';
|
|
124
|
+
const deepValues = el.split('.');
|
|
125
|
+
for (let i = deepValues.length - 1; i > 0; i--) {
|
|
126
|
+
result = `{${deepValues[i]} ${result}}`;
|
|
127
|
+
}
|
|
128
|
+
arr.push(deepValues[0] + result);
|
|
129
|
+
}
|
|
130
|
+
return arr.join(' ');
|
|
131
|
+
}
|
|
132
|
+
}
|