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,192 @@
|
|
|
1
|
+
import { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
computed,
|
|
6
|
+
DestroyRef,
|
|
7
|
+
inject,
|
|
8
|
+
input,
|
|
9
|
+
model,
|
|
10
|
+
OnDestroy,
|
|
11
|
+
output,
|
|
12
|
+
signal,
|
|
13
|
+
} from '@angular/core';
|
|
14
|
+
import { PolymorphContent, PolymorphModule } from '@prizm-ui/components';
|
|
15
|
+
import { debounceTime, Subject } from 'rxjs';
|
|
16
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
17
|
+
import { CommonModule } from '@angular/common';
|
|
18
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
19
|
+
import { TuiButton, TuiDataListDirective, TuiHint, TuiLoader } from '@taiga-ui/core';
|
|
20
|
+
import { TuiDataListWrapperComponent, TuiPagination } from '@taiga-ui/kit';
|
|
21
|
+
import { TuiComboBoxModule, TuiTextfieldControllerModule } from '@taiga-ui/legacy';
|
|
22
|
+
import { IPaginatorOptions, IPaginatorOutput } from './types/paginator.types';
|
|
23
|
+
import { DividerComponent } from '../divider/divider.component';
|
|
24
|
+
import { NumberOnlyDirective } from '../../directives/number/number-only.directive';
|
|
25
|
+
|
|
26
|
+
export enum SvgSrc {
|
|
27
|
+
CHEVRONS_DOUBLE_LEFT = 'assets/ngx-register-base/icons/chevrons-double-left.svg',
|
|
28
|
+
CHEVRONS_DOUBLE_RIGHT = 'assets/ngx-register-base/icons/chevrons-double-right.svg',
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@Component({
|
|
32
|
+
selector: 'sproc-paginator',
|
|
33
|
+
imports: [
|
|
34
|
+
DividerComponent,
|
|
35
|
+
CommonModule,
|
|
36
|
+
PolymorphModule,
|
|
37
|
+
ReactiveFormsModule,
|
|
38
|
+
FormsModule,
|
|
39
|
+
TuiPagination,
|
|
40
|
+
TuiButton,
|
|
41
|
+
TuiComboBoxModule,
|
|
42
|
+
TuiDataListWrapperComponent,
|
|
43
|
+
TuiTextfieldControllerModule,
|
|
44
|
+
TuiDataListDirective,
|
|
45
|
+
TuiLoader,
|
|
46
|
+
TuiHint,
|
|
47
|
+
NumberOnlyDirective,
|
|
48
|
+
],
|
|
49
|
+
templateUrl: './paginator.component.html',
|
|
50
|
+
styleUrls: ['./paginator.component.less'],
|
|
51
|
+
standalone: true,
|
|
52
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
53
|
+
})
|
|
54
|
+
export class PaginatorComponent implements OnDestroy {
|
|
55
|
+
public textOnPage = input<PolymorphContent>('Строк на странице');
|
|
56
|
+
public totalRecords = input(0, {
|
|
57
|
+
transform: (value: NumberInput) => Math.max(coerceNumberProperty(value), 0),
|
|
58
|
+
});
|
|
59
|
+
/** Количество видимых страниц вокруг активной страницы */
|
|
60
|
+
public pageLinkSize = input(3);
|
|
61
|
+
public showMoreDisabled = input(false);
|
|
62
|
+
public disabled = input(false);
|
|
63
|
+
/** Количество отображаемых строк на странице */
|
|
64
|
+
public rows = model<NumberInput>(0);
|
|
65
|
+
/** Текущая страница */
|
|
66
|
+
public page = model<NumberInput>(1);
|
|
67
|
+
public paginatorOptions = input<IPaginatorOptions>({
|
|
68
|
+
noRowsSelector: false,
|
|
69
|
+
noRowsSelectorLabel: false,
|
|
70
|
+
noFilterInfo: false,
|
|
71
|
+
noInfo: false,
|
|
72
|
+
noPages: false,
|
|
73
|
+
});
|
|
74
|
+
public rowsCountOptions = input(new Array<number>());
|
|
75
|
+
public selectedCounter = input(0);
|
|
76
|
+
public totalNotFiltered = input(0);
|
|
77
|
+
public isLoading = input(false);
|
|
78
|
+
/** Ограничения на количество отображаемых строк на странице */
|
|
79
|
+
public minRowsCount = input<number>(1);
|
|
80
|
+
public maxRowsCount = input<number>(99);
|
|
81
|
+
protected isIncorrectRowsCount = signal(false);
|
|
82
|
+
protected rowsCountErrorMessage = signal('');
|
|
83
|
+
|
|
84
|
+
public paginatorChange = output<IPaginatorOutput>();
|
|
85
|
+
public pageChange = output<number>();
|
|
86
|
+
public rowsChange = output<number | null>();
|
|
87
|
+
|
|
88
|
+
protected readonly SvgSrc = SvgSrc;
|
|
89
|
+
protected pagesCount = computed(() => {
|
|
90
|
+
const total = this.totalRecords();
|
|
91
|
+
this.rows();
|
|
92
|
+
|
|
93
|
+
return Math.ceil(total / this.currentRows);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
private readonly _dr = inject(DestroyRef);
|
|
97
|
+
|
|
98
|
+
protected readonly currentRowsInputChange = new Subject<NumberInput>();
|
|
99
|
+
|
|
100
|
+
constructor() {
|
|
101
|
+
this.currentRowsInputChange
|
|
102
|
+
.pipe(debounceTime(500), takeUntilDestroyed(this._dr))
|
|
103
|
+
.subscribe((value) => {
|
|
104
|
+
this.changeRows(value);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public ngOnDestroy(): void {
|
|
109
|
+
this.currentRowsInputChange.complete();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
protected changePage(page: number): void {
|
|
113
|
+
const prev = this.currentPage;
|
|
114
|
+
this.page.set(page);
|
|
115
|
+
|
|
116
|
+
if (this.currentPage !== prev) {
|
|
117
|
+
this.emitPageChange();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
protected toFirstPage(): void {
|
|
122
|
+
this.changePage(0);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
protected toLastPage(): void {
|
|
126
|
+
this.changePage(this.pagesCount());
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
private emitPageChange(): void {
|
|
130
|
+
this.pageChange.emit(this.currentPage);
|
|
131
|
+
this._emitPaginatorChanges();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
protected changeRows(rows: NumberInput): void {
|
|
135
|
+
const rowsCount = Number(rows);
|
|
136
|
+
|
|
137
|
+
if (!rowsCount) {
|
|
138
|
+
this.rowsCountErrorMessage.set('');
|
|
139
|
+
this.isIncorrectRowsCount.set(false);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const min = this.minRowsCount();
|
|
144
|
+
const max = this.maxRowsCount();
|
|
145
|
+
|
|
146
|
+
if (rowsCount < min || rowsCount > max) {
|
|
147
|
+
this.rowsCountErrorMessage.set(`Поле принимает значение от ${min} до ${max}`);
|
|
148
|
+
this.isIncorrectRowsCount.set(true);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
this.rowsCountErrorMessage.set('');
|
|
153
|
+
this.isIncorrectRowsCount.set(false);
|
|
154
|
+
|
|
155
|
+
if (this.currentRows === rows) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
this.rows.set(rows);
|
|
160
|
+
this.rowsChange.emit(this.currentRows);
|
|
161
|
+
|
|
162
|
+
if (this.currentPage > this.pagesCount()) {
|
|
163
|
+
this.changePage(0);
|
|
164
|
+
} else {
|
|
165
|
+
this._emitPaginatorChanges();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
private _emitPaginatorChanges(): void {
|
|
170
|
+
this.paginatorChange.emit({
|
|
171
|
+
page: this.currentPage,
|
|
172
|
+
first: (this.currentPage - 1) * this.currentRows + 1,
|
|
173
|
+
rows: this.currentRows,
|
|
174
|
+
pagesCount: this.pagesCount(),
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** get-методы */
|
|
179
|
+
protected get currentPage(): number {
|
|
180
|
+
return Math.max(coerceNumberProperty(this.page()), 1);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
protected get currentRows(): number {
|
|
184
|
+
let inputRows = Math.max(coerceNumberProperty(this.rows()), 0);
|
|
185
|
+
|
|
186
|
+
if (!inputRows) {
|
|
187
|
+
[inputRows] = this.rowsCountOptions();
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return inputRows;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IPaginatorOutput {
|
|
2
|
+
page: number;
|
|
3
|
+
first: number;
|
|
4
|
+
rows: number;
|
|
5
|
+
pagesCount: number | null;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IPaginatorOptions {
|
|
9
|
+
noRowsSelector?: boolean;
|
|
10
|
+
noRowsSelectorLabel?: boolean;
|
|
11
|
+
noFilterInfo?: boolean;
|
|
12
|
+
noInfo?: boolean;
|
|
13
|
+
noPages?: boolean;
|
|
14
|
+
noToFirstPageBtn?: boolean;
|
|
15
|
+
noToLastPageBtn?: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Directive, Input, TemplateRef } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
selector: '[cellTemplateName]',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class CellTemplateDirective {
|
|
8
|
+
@Input() cellTemplateName!: string;
|
|
9
|
+
|
|
10
|
+
constructor(public tpl: TemplateRef<any>) {}
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Directive, input, TemplateRef } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
selector: '[headerTemplateName]',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class HeaderTemplateDirective {
|
|
8
|
+
public headerTemplateName = input.required<string>();
|
|
9
|
+
|
|
10
|
+
constructor(public tpl: TemplateRef<any>) {}
|
|
11
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { OrderBy, WhereBoolExp } from 'hasura';
|
|
2
|
+
|
|
3
|
+
export type ColumnDataTypes = 'text' | 'num' | 'checkbox' | 'icon' | 'iconSvg' | 'empty' | 'date';
|
|
4
|
+
|
|
5
|
+
export enum EColumnDataType {
|
|
6
|
+
TEXT = 'text',
|
|
7
|
+
NUM = 'num',
|
|
8
|
+
CHECKBOX = 'checkbox',
|
|
9
|
+
ICON = 'icon',
|
|
10
|
+
ICON_SVG = 'iconSvg',
|
|
11
|
+
DATE = 'date',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface IColumnData {
|
|
15
|
+
name: string;
|
|
16
|
+
type: EColumnDataType | ColumnDataTypes;
|
|
17
|
+
value?: string;
|
|
18
|
+
width?: string;
|
|
19
|
+
isHeadTemplate?: boolean;
|
|
20
|
+
isTemplate?: boolean;
|
|
21
|
+
sortable?: boolean;
|
|
22
|
+
tooltipText?: string;
|
|
23
|
+
textStyle?: Record<string, string>;
|
|
24
|
+
rowspan?: number;
|
|
25
|
+
colspan?: number;
|
|
26
|
+
children?: IColumnData[];
|
|
27
|
+
datePattern?: string;
|
|
28
|
+
numberPipe?: string;
|
|
29
|
+
svgSrc?: string;
|
|
30
|
+
isCell?: boolean;
|
|
31
|
+
class?: string;
|
|
32
|
+
classTd?: string;
|
|
33
|
+
isLoading?: boolean;
|
|
34
|
+
postfix?: string;
|
|
35
|
+
fixed?: boolean;
|
|
36
|
+
headerStyle?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type ThWidthEntry = Pick<IColumnData, 'name' | 'width'>;
|
|
40
|
+
|
|
41
|
+
export interface IHasuraQueryFilter<T extends Record<string, any>> {
|
|
42
|
+
where?: WhereBoolExp<T>;
|
|
43
|
+
distinct_on?: (keyof T)[];
|
|
44
|
+
limit?: number;
|
|
45
|
+
offset?: number;
|
|
46
|
+
order_by?: OrderBy<T>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type RegisterTableSortOptions = {
|
|
50
|
+
order: RegisterTableCellSortOrder;
|
|
51
|
+
id: string;
|
|
52
|
+
};
|
|
53
|
+
export type RegisterTableCellSorterHandler<T> = (
|
|
54
|
+
a: T,
|
|
55
|
+
b: T,
|
|
56
|
+
options: RegisterTableSortOptions
|
|
57
|
+
) => number;
|
|
58
|
+
export type RegisterTableCellSorter<T> = {
|
|
59
|
+
options: RegisterTableSortOptions;
|
|
60
|
+
sorter?: RegisterTableCellSorterHandler<T>;
|
|
61
|
+
};
|
|
62
|
+
export type RegisterTableCellSortOrder = 'asc' | 'desc';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
import { ColumnDataTypes, EColumnDataType } from '../model/schema';
|
|
3
|
+
|
|
4
|
+
@Pipe({
|
|
5
|
+
name: 'classByType',
|
|
6
|
+
standalone: true,
|
|
7
|
+
})
|
|
8
|
+
export class ClassByTypePipe implements PipeTransform {
|
|
9
|
+
transform(type: ColumnDataTypes | EColumnDataType, element: 'th' | 'td' = 'th'): string {
|
|
10
|
+
let classNamePostfix = 'text';
|
|
11
|
+
|
|
12
|
+
if (element === 'td') {
|
|
13
|
+
if (type === EColumnDataType.CHECKBOX) {
|
|
14
|
+
classNamePostfix = 'checkbox';
|
|
15
|
+
} else if (type === EColumnDataType.NUM) {
|
|
16
|
+
classNamePostfix = 'num';
|
|
17
|
+
} else if (type === EColumnDataType.DATE) {
|
|
18
|
+
classNamePostfix = 'date';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (type === EColumnDataType.ICON || type === EColumnDataType.ICON_SVG) {
|
|
23
|
+
classNamePostfix = 'icon';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return `register-table__cell-${classNamePostfix}`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Pipe({
|
|
4
|
+
name: 'stickyColumn',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class StickyColumnPipe implements PipeTransform {
|
|
8
|
+
transform(value: string, array: string[] | undefined): boolean {
|
|
9
|
+
return array?.includes(value) ?? false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
<section class="register-table__section">
|
|
2
|
+
<tui-scrollbar class="register-table__scrollable" (scrollend)="saveScrollEndPosition()">
|
|
3
|
+
<tui-loader class="register-table__loader" [showLoader]="isLoading() || false" [overlay]="true">
|
|
4
|
+
<table
|
|
5
|
+
tuiTable
|
|
6
|
+
class="table"
|
|
7
|
+
stickyRelative
|
|
8
|
+
[columns]="columnsWithCheckboxes()"
|
|
9
|
+
[style.width.px]="tableWidth()"
|
|
10
|
+
tuiSortBy=""
|
|
11
|
+
(sortChange)="sortChange($event)"
|
|
12
|
+
>
|
|
13
|
+
<thead>
|
|
14
|
+
@for (hrow of headerRows(); track $index) {
|
|
15
|
+
<tr tuiThGroup>
|
|
16
|
+
@if ($first && checkboxColumn()) {
|
|
17
|
+
<th
|
|
18
|
+
tuiTh
|
|
19
|
+
*tuiHead="CHECKBOX_SELECTOR_KEY"
|
|
20
|
+
class="register-table__th-background--table-cell-blue register-table__cell-icon register-table__cell-checkbox-selector"
|
|
21
|
+
[style.width.px]="CHECKBOX_SELECTOR_WIDTH_PX"
|
|
22
|
+
[sorter]="null"
|
|
23
|
+
[rowSpan]="maxDepth()"
|
|
24
|
+
>
|
|
25
|
+
<sproc-checkbox-selector
|
|
26
|
+
[selected]="selectedIds()"
|
|
27
|
+
[totalRecords]="totalRecords()"
|
|
28
|
+
[loading]="isSelectloading()"
|
|
29
|
+
[disabled]="checkboxDisabled()"
|
|
30
|
+
(onApply)="selectChanged.emit($event)"
|
|
31
|
+
></sproc-checkbox-selector>
|
|
32
|
+
</th>
|
|
33
|
+
}
|
|
34
|
+
@for (cell of hrow; track cell.col.name) {
|
|
35
|
+
@let thClass = cell.col.class ?? '';
|
|
36
|
+
@let thType = cell.col.type;
|
|
37
|
+
@let thName = cell.col.name;
|
|
38
|
+
@let sortable = checkAvailableColumnSorting(cell.col);
|
|
39
|
+
@let resizeBlocked = checkResizeBlocked(cell.col);
|
|
40
|
+
<th
|
|
41
|
+
tuiTh
|
|
42
|
+
tuiResizable
|
|
43
|
+
*tuiHead="thName"
|
|
44
|
+
[ngClass]="['register-table__th', thType | classByType, thClass]"
|
|
45
|
+
[stickyLeft]="cell.col.fixed ?? (thName | stickyColumn: stickyLeftIds())"
|
|
46
|
+
[stickyRight]="cell.col.fixed ?? (thName | stickyColumn: stickyRightIds())"
|
|
47
|
+
[stylesOnSticky]="stickyThStyle"
|
|
48
|
+
[style]="cell.col.headerStyle ?? ''"
|
|
49
|
+
[style.min-width.px]="getThWidth(thName)"
|
|
50
|
+
[style.width.px]="getThWidth(thName)"
|
|
51
|
+
[style.max-width.px]="getThWidth(thName)"
|
|
52
|
+
[tuiSortable]="sortable"
|
|
53
|
+
[sorter]="sortable ? setThName(thName) : null"
|
|
54
|
+
[tuiHint]="cell.col.tooltipText ?? null"
|
|
55
|
+
[rowSpan]="cell.rowspan"
|
|
56
|
+
[colSpan]="cell.colspan"
|
|
57
|
+
[attr.order]="columnOrders.get(thName)?.options?.order"
|
|
58
|
+
>
|
|
59
|
+
@if (cell.col.isHeadTemplate) {
|
|
60
|
+
@let thProjection = getProjectionHeaderByName(thName);
|
|
61
|
+
|
|
62
|
+
@if (thProjection) {
|
|
63
|
+
<ng-container
|
|
64
|
+
[ngTemplateOutlet]="thProjection"
|
|
65
|
+
[ngTemplateOutletContext]="{
|
|
66
|
+
$implicit: cell.col,
|
|
67
|
+
}"
|
|
68
|
+
></ng-container>
|
|
69
|
+
}
|
|
70
|
+
} @else {
|
|
71
|
+
@switch (thType) {
|
|
72
|
+
@case (EColumnDataType.ICON) {
|
|
73
|
+
<tui-icon
|
|
74
|
+
class="register-table--icon-color"
|
|
75
|
+
[icon]="cell.col.value!"
|
|
76
|
+
></tui-icon>
|
|
77
|
+
}
|
|
78
|
+
@case (EColumnDataType.ICON_SVG) {
|
|
79
|
+
<img [src]="cell.col.value" [alt]="thName" />
|
|
80
|
+
}
|
|
81
|
+
@case (EColumnDataType.TEXT) {
|
|
82
|
+
@if (cell.col.svgSrc) {
|
|
83
|
+
<img [src]="cell.col.svgSrc" [alt]="thName" />
|
|
84
|
+
}
|
|
85
|
+
<span class="text-overflow--ellipsis" [ngStyle]="cell.col.textStyle">
|
|
86
|
+
{{ cell.col.value }}
|
|
87
|
+
</span>
|
|
88
|
+
}
|
|
89
|
+
@case (EColumnDataType.NUM) {
|
|
90
|
+
<span [ngStyle]="cell.col.textStyle">
|
|
91
|
+
{{ cell.col.value }}
|
|
92
|
+
</span>
|
|
93
|
+
}
|
|
94
|
+
@case (EColumnDataType.DATE) {
|
|
95
|
+
<span [ngStyle]="cell.col.textStyle">
|
|
96
|
+
{{ cell.col.value }}
|
|
97
|
+
</span>
|
|
98
|
+
}
|
|
99
|
+
@case (EColumnDataType.CHECKBOX) {
|
|
100
|
+
{{ cell.col.value }}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
@if (!resizeBlocked) {
|
|
105
|
+
<div
|
|
106
|
+
class="register-table__cell-resizer"
|
|
107
|
+
[tuiResizer]="[1, 0]"
|
|
108
|
+
(tuiSizeChange)="thResizeChanges(cell.col.name, $event[0])"
|
|
109
|
+
(click)="$event.stopPropagation()"
|
|
110
|
+
></div>
|
|
111
|
+
}
|
|
112
|
+
</th>
|
|
113
|
+
}
|
|
114
|
+
</tr>
|
|
115
|
+
}
|
|
116
|
+
</thead>
|
|
117
|
+
@let rows = rowData();
|
|
118
|
+
<tbody tuiTbody>
|
|
119
|
+
@for (row of rows; track row.id) {
|
|
120
|
+
@let state = stateObjects?.();
|
|
121
|
+
@let trSelected =
|
|
122
|
+
state
|
|
123
|
+
? state.get(row.id)?.state === ERegisterObjectState.SELECTED
|
|
124
|
+
: selectedIds().has(row.id);
|
|
125
|
+
|
|
126
|
+
<tr
|
|
127
|
+
#bodyRow
|
|
128
|
+
tuiTr
|
|
129
|
+
class="register-table__row"
|
|
130
|
+
[class.selected]="trSelected"
|
|
131
|
+
[class.shift-pressed]="markRowBeforeSelect(row)"
|
|
132
|
+
(mouseenter)="onRowHover(row)"
|
|
133
|
+
(mouseleave)="onRowHover(null)"
|
|
134
|
+
(click)="onRowClick($event, row)"
|
|
135
|
+
(dblclick)="rowDblClick.emit(row)"
|
|
136
|
+
>
|
|
137
|
+
@if (checkboxColumn()) {
|
|
138
|
+
<td
|
|
139
|
+
tuiTd
|
|
140
|
+
*tuiCell="CHECKBOX_SELECTOR_KEY"
|
|
141
|
+
class="register-table__cell-checkbox-selector"
|
|
142
|
+
>
|
|
143
|
+
<input
|
|
144
|
+
tuiCheckbox
|
|
145
|
+
size="s"
|
|
146
|
+
type="checkbox"
|
|
147
|
+
class="checkbox"
|
|
148
|
+
[checked]="trSelected"
|
|
149
|
+
[disabled]="checkboxDisabled()"
|
|
150
|
+
/>
|
|
151
|
+
</td>
|
|
152
|
+
}
|
|
153
|
+
@for (columnData of leaves(); track columnData.name) {
|
|
154
|
+
@let tdType = columnData.type;
|
|
155
|
+
@let tdKey = columnData.name;
|
|
156
|
+
@let tdValue = row[tdKey];
|
|
157
|
+
@let tdClass = columnData.classTd ?? '';
|
|
158
|
+
|
|
159
|
+
<td
|
|
160
|
+
tuiTd
|
|
161
|
+
*tuiCell="tdKey"
|
|
162
|
+
[ngClass]="[tdType | classByType: 'td', tdClass]"
|
|
163
|
+
[stickyLeft]="tdKey | stickyColumn: stickyLeftIds()"
|
|
164
|
+
[stickyRight]="tdKey | stickyColumn: stickyRightIds()"
|
|
165
|
+
[stylesOnSticky]="stickyTdStyle"
|
|
166
|
+
>
|
|
167
|
+
@if (columnData.isTemplate) {
|
|
168
|
+
@let tdProjection = getProjectionCellByName(tdKey);
|
|
169
|
+
|
|
170
|
+
@if (tdProjection) {
|
|
171
|
+
<ng-container
|
|
172
|
+
[ngTemplateOutlet]="tdProjection"
|
|
173
|
+
[ngTemplateOutletContext]="{
|
|
174
|
+
$implicit: tdValue,
|
|
175
|
+
row,
|
|
176
|
+
}"
|
|
177
|
+
></ng-container>
|
|
178
|
+
}
|
|
179
|
+
} @else {
|
|
180
|
+
@switch (tdType) {
|
|
181
|
+
@case (EColumnDataType.ICON) {
|
|
182
|
+
@if (tdValue) {
|
|
183
|
+
<tui-icon
|
|
184
|
+
class="register-table--icon-color"
|
|
185
|
+
[icon]="columnData.value!"
|
|
186
|
+
></tui-icon>
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
@case (EColumnDataType.ICON_SVG) {
|
|
190
|
+
@if (tdValue) {
|
|
191
|
+
<img [src]="columnData.value" [alt]="tdKey" />
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
@case (EColumnDataType.CHECKBOX) {
|
|
195
|
+
<input
|
|
196
|
+
tuiCheckbox
|
|
197
|
+
size="s"
|
|
198
|
+
type="checkbox"
|
|
199
|
+
class="checkbox"
|
|
200
|
+
[checked]="!!tdValue"
|
|
201
|
+
[disabled]="true"
|
|
202
|
+
/>
|
|
203
|
+
}
|
|
204
|
+
@case (EColumnDataType.TEXT) {
|
|
205
|
+
<span [tuiHint]="tdValue">
|
|
206
|
+
{{ tdValue ?? '' }}
|
|
207
|
+
</span>
|
|
208
|
+
<span>
|
|
209
|
+
{{ tdValue ? columnData.postfix : '' }}
|
|
210
|
+
</span>
|
|
211
|
+
}
|
|
212
|
+
@case (EColumnDataType.NUM) {
|
|
213
|
+
{{ tdValue ?? '' | number: columnData.numberPipe }}
|
|
214
|
+
{{ tdValue ? columnData.postfix : '' }}
|
|
215
|
+
}
|
|
216
|
+
@case (EColumnDataType.DATE) {
|
|
217
|
+
{{
|
|
218
|
+
(tdValue
|
|
219
|
+
| formatDate
|
|
220
|
+
: ETimezone.UTC
|
|
221
|
+
: columnData.datePattern ?? EDatePattern.DATE_TIME_WITHOUT_SECONDS
|
|
222
|
+
: (timeZoneChanges$ | async)) ?? ''
|
|
223
|
+
}}
|
|
224
|
+
{{ tdValue ? columnData.postfix : '' }}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
</td>
|
|
229
|
+
}
|
|
230
|
+
</tr>
|
|
231
|
+
} @empty {
|
|
232
|
+
<tr class="empty-layer">
|
|
233
|
+
<td colspan="100%">
|
|
234
|
+
<div class="centered-text">{{ emptyText() }}</div>
|
|
235
|
+
</td>
|
|
236
|
+
</tr>
|
|
237
|
+
}
|
|
238
|
+
</tbody>
|
|
239
|
+
</table>
|
|
240
|
+
</tui-loader>
|
|
241
|
+
</tui-scrollbar>
|
|
242
|
+
|
|
243
|
+
<sproc-paginator
|
|
244
|
+
class="register-table__paginator"
|
|
245
|
+
[page]="page()"
|
|
246
|
+
[rows]="limit()"
|
|
247
|
+
[pageLinkSize]="1"
|
|
248
|
+
[totalRecords]="totalRecords()"
|
|
249
|
+
[totalNotFiltered]="totalNotFiltered()"
|
|
250
|
+
[rowsCountOptions]="[30, 40, 50]"
|
|
251
|
+
[selectedCounter]="selectedCounter()"
|
|
252
|
+
(paginatorChange)="paginatorChange.emit($event)"
|
|
253
|
+
[disabled]="paginatorDisabled()"
|
|
254
|
+
[isLoading]="isPaginatorLoading()"
|
|
255
|
+
>
|
|
256
|
+
</sproc-paginator>
|
|
257
|
+
</section>
|