@sdcorejs/angular 19.3.4 → 19.3.6
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/assets/STYLE-GUIDE.md +78 -1
- package/assets/THEME.md +45 -3
- package/assets/scss/core/_popover-panel.scss +90 -0
- package/assets/scss/core/form.scss +5 -2
- package/assets/scss/core/utilities/_grid.scss +15 -0
- package/assets/scss/core/utilities/_sizing.scss +4 -0
- package/assets/scss/themes/_component-tokens.scss +9 -4
- package/assets/scss/themes/_semantic.scss +6 -5
- package/components/anchor/src/components/anchor/anchor.component.d.ts +6 -1
- package/components/button/src/button-item.component.d.ts +7 -1
- package/components/calendar/index.d.ts +12 -0
- package/components/calendar/src/calendar-edge-scroll.d.ts +27 -0
- package/components/calendar/src/calendar-format.d.ts +51 -0
- package/components/calendar/src/calendar-host.d.ts +33 -0
- package/components/calendar/src/calendar-loader.d.ts +18 -0
- package/components/calendar/src/calendar-move.d.ts +189 -0
- package/components/calendar/src/calendar.component.d.ts +325 -0
- package/components/calendar/src/calendar.configuration.d.ts +24 -0
- package/components/calendar/src/calendar.model.d.ts +121 -0
- package/components/calendar/src/calendar.templates.d.ts +65 -0
- package/components/calendar/src/calendar.utils.d.ts +242 -0
- package/components/card/index.d.ts +3 -0
- package/components/card/src/card-actions.directive.d.ts +13 -0
- package/components/card/src/card-group.component.d.ts +32 -1
- package/components/card/src/card.component.d.ts +71 -5
- package/components/card/src/card.configuration.d.ts +20 -0
- package/components/card/src/card.format.d.ts +50 -0
- package/components/card/src/card.model.d.ts +83 -0
- package/components/card/src/card.utils.d.ts +5 -0
- package/components/file-explorer/src/file-explorer.utils.d.ts +1 -4
- package/components/index.d.ts +3 -1
- package/components/kanban/src/kanban-card-outlet.d.ts +16 -0
- package/components/kanban/src/kanban-loader.d.ts +45 -0
- package/components/kanban/src/kanban.component.d.ts +97 -37
- package/components/kanban/src/kanban.model.d.ts +93 -37
- package/components/kanban/src/kanban.utils.d.ts +38 -5
- package/components/modal/src/modal.component.d.ts +15 -1
- package/components/query-bar/index.d.ts +1 -0
- package/components/query-bar/src/components/actions-bar/actions-bar.component.d.ts +6 -2
- package/components/query-bar/src/components/chip-popover/chip-popover.component.d.ts +26 -22
- package/components/query-bar/src/components/field-picker/field-picker.component.d.ts +52 -31
- package/components/query-bar/src/components/inline-chip/inline-chip.component.d.ts +20 -1
- package/components/query-bar/src/components/inline-value-chip/inline-value-chip.component.d.ts +5 -1
- package/components/query-bar/src/components/panel/query-panel.d.ts +110 -0
- package/components/query-bar/src/components/popover-chip/popover-chip.component.d.ts +15 -8
- package/components/query-bar/src/components/saved-filters-menu/saved-filters-menu.component.d.ts +35 -18
- package/components/query-bar/src/components/saved-filters-menu/saved-filters-storage.d.ts +13 -0
- package/components/query-bar/src/query-bar-chip-text.d.ts +27 -0
- package/components/query-bar/src/query-bar-filter.d.ts +8 -0
- package/components/query-bar/src/query-bar.component.d.ts +62 -7
- package/components/query-bar/src/query-bar.model.d.ts +2 -0
- package/components/quick-action/index.d.ts +2 -0
- package/components/quick-action/src/selection-bar/selection-bar.component.d.ts +39 -0
- package/components/quick-action/src/selection-bar/selection-bar.model.d.ts +24 -0
- package/components/scheduler/index.d.ts +4 -0
- package/components/scheduler/src/scheduler.component.d.ts +345 -0
- package/components/scheduler/src/scheduler.model.d.ts +123 -0
- package/components/scheduler/src/scheduler.templates.d.ts +76 -0
- package/components/scheduler/src/scheduler.utils.d.ts +99 -0
- package/components/tab/src/tab-group.component.d.ts +6 -1
- package/components/tab-router/src/utils/tab-activated-route.d.ts +17 -0
- package/components/table/src/components/config/config.component.d.ts +69 -1
- package/components/table/src/components/filter/mobile-filter/mobile-field-sheet.component.d.ts +35 -0
- package/components/table/src/components/filter/mobile-filter/mobile-filter-field.component.d.ts +64 -0
- package/components/table/src/components/filter/mobile-filter/mobile-filter-summary.d.ts +11 -0
- package/components/table/src/components/filter/mobile-filter/mobile-filter.component.d.ts +47 -15
- package/components/table/src/components/filter/quick-search/quick-search.component.d.ts +3 -1
- package/components/table/src/components/mobile-cards/mobile-card-data.component.d.ts +45 -0
- package/components/table/src/components/mobile-cards/mobile-cards.component.d.ts +13 -1
- package/components/table/src/components/mobile-sheet/mobile-sheet.d.ts +35 -0
- package/components/table/src/components/mobile-sort/mobile-sort-sheet.component.d.ts +36 -0
- package/components/table/src/components/mobile-toolbar/mobile-filter-chips.component.d.ts +49 -0
- package/components/table/src/components/mobile-toolbar/mobile-tools-sheet.component.d.ts +48 -0
- package/components/table/src/components/mobile-toolbar/pull-refresh.component.d.ts +21 -0
- package/components/table/src/components/selector-action/action-filter.pipe.d.ts +3 -24
- package/components/table/src/components/selector-action/selector-action.component.d.ts +0 -10
- package/components/table/src/configurations/table.configuration.d.ts +53 -2
- package/components/table/src/models/index.d.ts +1 -0
- package/components/table/src/models/table-mobile.model.d.ts +55 -0
- package/components/table/src/models/table-option.model.d.ts +17 -1
- package/components/table/src/services/config-custom.util.d.ts +11 -3
- package/components/table/src/services/config.service.d.ts +0 -2
- package/components/table/src/services/mobile/mobile-view.util.d.ts +77 -0
- package/components/table/src/services/table-export/table-export.service.d.ts +2 -0
- package/components/table/src/services/table-filter/table-filter-callbacks.util.d.ts +25 -0
- package/components/table/src/services/table-filter/table-filter.model.d.ts +21 -2
- package/components/table/src/services/table-filter/table-mobile-filter.util.d.ts +54 -0
- package/components/table/src/services/table-filter/table-query-bar.util.d.ts +21 -1
- package/components/table/src/services/table-query-params/table-query-params.util.d.ts +48 -0
- package/components/table/src/table.component.d.ts +78 -11
- package/components/timeline/index.d.ts +3 -0
- package/components/timeline/src/timeline.component.d.ts +95 -0
- package/components/timeline/src/timeline.model.d.ts +82 -0
- package/components/timeline/src/timeline.templates.d.ts +28 -0
- package/components/timeline/src/timeline.utils.d.ts +41 -0
- package/components/tree/index.d.ts +1 -0
- package/components/tree/src/tree-empty-def.directive.d.ts +13 -0
- package/components/tree/src/tree.component.d.ts +79 -5
- package/components/tree/src/tree.model.d.ts +29 -0
- package/directives/src/sd-scroll-pointer.service.d.ts +18 -0
- package/directives/src/sd-scroll.directive.d.ts +4 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +61 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +13 -5
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-calendar.mjs +2481 -0
- package/fesm2022/sdcorejs-angular-components-calendar.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-card.mjs +485 -22
- package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +4 -18
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +7 -7
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-kanban.mjs +832 -153
- package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +66 -13
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +1469 -357
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs +68 -2
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-scheduler.mjs +1934 -0
- package/fesm2022/sdcorejs-angular-components-scheduler.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +126 -26
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +30 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +5943 -3666
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-timeline.mjs +473 -0
- package/fesm2022/sdcorejs-angular-components-timeline.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-tree.mjs +596 -35
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +2 -4
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components.mjs +3 -1
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +109 -22
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +140 -42
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +70 -21
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-directives.mjs +4 -3
- package/fesm2022/sdcorejs-angular-forms-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +23 -4
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +812 -52
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-Bk3PrEf3.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-DHrM12Z3.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-Bk3PrEf3.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-DHrM12Z3.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-CwUegGgG.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-f7ysKltl.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-CwUegGgG.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-f7ysKltl.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-lF2trhfp.mjs → sdcorejs-angular-modules-generic-generic-list.page-BdGxuquq.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-lF2trhfp.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-BdGxuquq.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DtPfIB97.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DtPfIB97.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-generic.mjs +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +17 -8
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-DK33LxHm.mjs → sdcorejs-angular-modules-pattern-base-api.service-Bj3iKGg_.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-DK33LxHm.mjs.map → sdcorejs-angular-modules-pattern-base-api.service-Bj3iKGg_.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-CPwGkrNk.mjs → sdcorejs-angular-modules-pattern-create.component-C27vASfj.mjs} +11 -7
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-C27vASfj.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-VCbA_FkZ.mjs → sdcorejs-angular-modules-pattern-create.component-C63mUjRM.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-VCbA_FkZ.mjs.map → sdcorejs-angular-modules-pattern-create.component-C63mUjRM.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-Bi2tMFHf.mjs → sdcorejs-angular-modules-pattern-create.component-DYn8jkTD.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-Bi2tMFHf.mjs.map → sdcorejs-angular-modules-pattern-create.component-DYn8jkTD.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-CehsdBRP.mjs → sdcorejs-angular-modules-pattern-customer.service-BNVk2VIb.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-CehsdBRP.mjs.map → sdcorejs-angular-modules-pattern-customer.service-BNVk2VIb.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-5kI7wGdX.mjs → sdcorejs-angular-modules-pattern-detail.component-Bh8UD7ft.mjs} +57 -54
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-Bh8UD7ft.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-CjAy-B9K.mjs → sdcorejs-angular-modules-pattern-detail.component-S7x8j9i5.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-CjAy-B9K.mjs.map → sdcorejs-angular-modules-pattern-detail.component-S7x8j9i5.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-DObN_wCR.mjs → sdcorejs-angular-modules-pattern-flow.component-CHtskh2X.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-DObN_wCR.mjs.map → sdcorejs-angular-modules-pattern-flow.component-CHtskh2X.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-TTrWCXIT.mjs → sdcorejs-angular-modules-pattern-index.component-W8icBRPe.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-TTrWCXIT.mjs.map → sdcorejs-angular-modules-pattern-index.component-W8icBRPe.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-B1qePLfk.mjs → sdcorejs-angular-modules-pattern-lines-table-form.component-DEwUiNkq.mjs} +5 -5
- package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-B1qePLfk.mjs.map → sdcorejs-angular-modules-pattern-lines-table-form.component-DEwUiNkq.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-8m-QmfUX.mjs +501 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-8m-QmfUX.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-W9vY7HrT.mjs → sdcorejs-angular-modules-pattern-list.component-BDEm2v0W.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-W9vY7HrT.mjs.map → sdcorejs-angular-modules-pattern-list.component-BDEm2v0W.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BgwTyRhE.mjs +506 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BgwTyRhE.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-CJ38CJXg.mjs → sdcorejs-angular-modules-pattern-list.component-BhFkL7tX.mjs} +30 -39
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BhFkL7tX.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-BY5gjtNS.mjs → sdcorejs-angular-modules-pattern-list.component-j7ZFxvlG.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-BY5gjtNS.mjs.map → sdcorejs-angular-modules-pattern-list.component-j7ZFxvlG.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-CI0H_5a4.mjs → sdcorejs-angular-modules-pattern-mock-backend.factory-CPAV_J3j.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-CI0H_5a4.mjs.map → sdcorejs-angular-modules-pattern-mock-backend.factory-CPAV_J3j.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs → sdcorejs-angular-modules-pattern-pattern-source-viewer-DuhyXsGn.mjs} +4 -22
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-DuhyXsGn.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs → sdcorejs-angular-modules-pattern-pattern-source.generated-bfpj85ke.mjs} +26 -27
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-bfpj85ke.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-D829aEk5.mjs → sdcorejs-angular-modules-pattern-product.service-B9Dc2NUr.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-D829aEk5.mjs.map → sdcorejs-angular-modules-pattern-product.service-B9Dc2NUr.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-profile.component-BEFVmSSj.mjs → sdcorejs-angular-modules-pattern-profile.component-097Hf7Bc.mjs} +24 -14
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-097Hf7Bc.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B-TJUSV_.mjs → sdcorejs-angular-modules-pattern-routes-CahNEP9-.mjs} +5 -5
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B-TJUSV_.mjs.map → sdcorejs-angular-modules-pattern-routes-CahNEP9-.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-CjfWGMvJ.mjs +65 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-CjfWGMvJ.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-1kDb9T7_.mjs → sdcorejs-angular-modules-pattern-routes-DeE5hp5x.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-1kDb9T7_.mjs.map → sdcorejs-angular-modules-pattern-routes-DeE5hp5x.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-Di2ceIlM.mjs +56 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-Di2ceIlM.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B6z7KO0P.mjs → sdcorejs-angular-modules-pattern-routes-MEcCUESx.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B6z7KO0P.mjs.map → sdcorejs-angular-modules-pattern-routes-MEcCUESx.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DVlcUUzh.mjs → sdcorejs-angular-modules-pattern-routes-hKorxavO.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DVlcUUzh.mjs.map → sdcorejs-angular-modules-pattern-routes-hKorxavO.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DS39vgzU.mjs → sdcorejs-angular-modules-pattern-routes-sJfnmrVg.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DS39vgzU.mjs.map → sdcorejs-angular-modules-pattern-routes-sJfnmrVg.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DxWDWUdo.mjs → sdcorejs-angular-modules-pattern-routes-ygWsDRk9.mjs} +8 -8
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DxWDWUdo.mjs.map → sdcorejs-angular-modules-pattern-routes-ygWsDRk9.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-nV5dVFx2.mjs → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-C5IG0tkk.mjs} +12 -12
- package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-nV5dVFx2.mjs.map → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-C5IG0tkk.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-0rRaWsuo.mjs → sdcorejs-angular-modules-pattern-shell.component-BPgXiYkB.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-0rRaWsuo.mjs.map → sdcorejs-angular-modules-pattern-shell.component-BPgXiYkB.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DF0pm6_f.mjs +480 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DF0pm6_f.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-DkAcDmsZ.mjs → sdcorejs-angular-modules-pattern-update.component-BXBxoTdB.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-DkAcDmsZ.mjs.map → sdcorejs-angular-modules-pattern-update.component-BXBxoTdB.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-BmsOgENL.mjs → sdcorejs-angular-modules-pattern-update.component-DS253vcu.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-BmsOgENL.mjs.map → sdcorejs-angular-modules-pattern-update.component-DS253vcu.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-DPZ_ucNB.mjs → sdcorejs-angular-modules-pattern-update.component-OOYioclV.mjs} +9 -6
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-OOYioclV.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern.mjs +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +171 -158
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-excel.mjs +34 -0
- package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-query-params.mjs +226 -0
- package/fesm2022/sdcorejs-angular-services-query-params.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs +24 -1
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
- package/forms/date/src/date.component.d.ts +2 -0
- package/forms/directives/src/search-field.component.d.ts +1 -1
- package/i18n/src/en.d.ts +159 -9
- package/modules/layout/components/page-list/page-list.component.d.ts +2 -1
- package/modules/pattern/README.md +5 -4
- package/modules/pattern/docs/detail.md +18 -9
- package/modules/pattern/docs/drawer.md +185 -83
- package/modules/pattern/docs/header-actions.md +1 -1
- package/modules/pattern/docs/list.md +3 -3
- package/modules/pattern/docs/states.md +1 -1
- package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.d.ts +6 -4
- package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +12 -16
- package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.d.ts +13 -5
- package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +58 -29
- package/modules/pattern/features/category/pages/list/list.component.d.ts +15 -3
- package/modules/pattern/features/category/pages/list/list.component.html +11 -3
- package/modules/pattern/features/category/pages/list/list.component.ts +36 -10
- package/modules/pattern/features/category/routes.d.ts +4 -1
- package/modules/pattern/features/category/routes.ts +5 -22
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.d.ts +6 -5
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +7 -11
- package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.d.ts +20 -8
- package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +70 -27
- package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.d.ts +5 -3
- package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +9 -53
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.d.ts +18 -7
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +53 -19
- package/modules/pattern/features/customer/entity.resolver.d.ts +1 -1
- package/modules/pattern/features/customer/entity.resolver.ts +1 -1
- package/modules/pattern/features/customer/pages/list/list.component.d.ts +21 -3
- package/modules/pattern/features/customer/pages/list/list.component.html +18 -3
- package/modules/pattern/features/customer/pages/list/list.component.ts +43 -16
- package/modules/pattern/features/customer/pages/profile/profile.component.d.ts +5 -2
- package/modules/pattern/features/customer/pages/profile/profile.component.ts +17 -8
- package/modules/pattern/features/customer/routes.d.ts +3 -2
- package/modules/pattern/features/customer/routes.ts +6 -27
- package/modules/pattern/features/order/components/approval-steps/approval-steps.component.d.ts +11 -3
- package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +37 -56
- package/modules/pattern/features/order/components/summary-cards/summary-cards.component.d.ts +7 -4
- package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +14 -76
- package/modules/pattern/features/order/pages/create/create.component.d.ts +1 -1
- package/modules/pattern/features/order/pages/create/create.component.ts +7 -3
- package/modules/pattern/features/order/pages/detail/detail.component.ts +1 -1
- package/modules/pattern/features/order/pages/update/update.component.d.ts +1 -1
- package/modules/pattern/features/order/pages/update/update.component.ts +5 -2
- package/package.json +36 -24
- package/services/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.d.ts +6 -1
- package/services/confirm/src/lib/confirm.service.d.ts +23 -12
- package/services/confirm/src/public-api.d.ts +0 -1
- package/services/excel/src/lib/excel.model.d.ts +29 -0
- package/services/excel/src/lib/excel.service.d.ts +30 -0
- package/services/query-params/index.d.ts +1 -0
- package/services/query-params/src/query-param-sync.d.ts +63 -0
- package/utilities/extensions/index.d.ts +1 -0
- package/utilities/extensions/src/format-bytes.d.ts +8 -0
- package/components/history/index.d.ts +0 -1
- package/components/history/models/history.model.d.ts +0 -13
- package/components/history/pipes/view-date.pipe.d.ts +0 -9
- package/components/history/src/history.component.d.ts +0 -7
- package/fesm2022/sdcorejs-angular-components-history.mjs +0 -54
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B1BUBiag.mjs +0 -145
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B1BUBiag.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B27ZX8Co.mjs +0 -144
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B27ZX8Co.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CPwGkrNk.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +0 -18
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-CPhLTiyx.mjs +0 -148
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-CPhLTiyx.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-5kI7wGdX.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D6eKR2cq.mjs +0 -87
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D6eKR2cq.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-FcJS3Nbd.mjs +0 -232
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-FcJS3Nbd.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs +0 -70
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CJ38CJXg.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CdgPtSjJ.mjs +0 -164
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CdgPtSjJ.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DKIwrluh.mjs +0 -118
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DKIwrluh.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-BEFVmSSj.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-r9CTj-8C.mjs +0 -74
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-r9CTj-8C.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-xI1XYRo6.mjs +0 -99
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-xI1XYRo6.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-6uH7sDEg.mjs +0 -143
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-6uH7sDEg.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DglN2sS_.mjs +0 -132
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DglN2sS_.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DPZ_ucNB.mjs.map +0 -1
- package/modules/pattern/features/category/entity.resolver.d.ts +0 -6
- package/modules/pattern/features/category/entity.resolver.ts +0 -27
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { SdModal } from '@sdcorejs/angular/components/modal';
|
|
3
|
+
import type { SdTable } from '../../table.component';
|
|
4
|
+
import type { SdTableMobileAction } from '../mobile-cards/mobile-action.model';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
type ToolTone = 'success' | 'info' | 'primary' | 'secondary';
|
|
7
|
+
interface Tool {
|
|
8
|
+
action: SdTableMobileAction;
|
|
9
|
+
title: string;
|
|
10
|
+
hint: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
tone: ToolTone;
|
|
13
|
+
/** Short note next to the title, e.g. "Customized" while the table uses a setup of its own. */
|
|
14
|
+
badge?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Tools sheet of the phone (⋮, handoff table-mobile 2): the exports as tiles (format, file kind, progress while one runs)
|
|
18
|
+
* and the table settings as a row that says when the table uses a setup of its own. Same chrome as the other phone
|
|
19
|
+
* sheets: handle, title, swipe down and Back close it. An export keeps the sheet open until it is done.
|
|
20
|
+
*/
|
|
21
|
+
export declare class SdTableMobileToolsSheetComponent<T = unknown> {
|
|
22
|
+
#private;
|
|
23
|
+
readonly table: import("@angular/core").InputSignal<SdTable<T>>;
|
|
24
|
+
/** `SdTable.mobileToolsActions`. */
|
|
25
|
+
readonly actions: import("@angular/core").InputSignal<SdTableMobileAction[]>;
|
|
26
|
+
readonly sheet: import("@angular/core").Signal<SdModal>;
|
|
27
|
+
protected readonly head: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
|
|
28
|
+
protected readonly ids: {
|
|
29
|
+
export: string;
|
|
30
|
+
table: string;
|
|
31
|
+
};
|
|
32
|
+
/** Key of the export started from this sheet, until it is done. */
|
|
33
|
+
readonly running: import("@angular/core").WritableSignal<string | undefined>;
|
|
34
|
+
readonly exporting: import("@angular/core").WritableSignal<boolean>;
|
|
35
|
+
readonly tools: import("@angular/core").Signal<Tool[]>;
|
|
36
|
+
readonly exportTools: import("@angular/core").Signal<Tool[]>;
|
|
37
|
+
readonly tableTools: import("@angular/core").Signal<Tool[]>;
|
|
38
|
+
/** Hint of the running export: the percent of a paged export, else "Exporting…". */
|
|
39
|
+
readonly progress: import("@angular/core").Signal<string>;
|
|
40
|
+
constructor();
|
|
41
|
+
open(): void;
|
|
42
|
+
run(tool: Tool): void;
|
|
43
|
+
/** Every close path ends here: drop the history entry, then run a tool that waited for the close. */
|
|
44
|
+
onClosed(): void;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdTableMobileToolsSheetComponent<any>, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdTableMobileToolsSheetComponent<any>, "sd-table-mobile-tools-sheet", never, { "table": { "alias": "table"; "required": true; "isSignal": true; }; "actions": { "alias": "actions"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/** Pull distance that triggers a refresh. */
|
|
3
|
+
export declare const SD_TABLE_PULL_DISTANCE = 64;
|
|
4
|
+
/**
|
|
5
|
+
* Pull to refresh on the phone cards (handoff table-mobile 7). Listens to touches on `target` (the card list); only a
|
|
6
|
+
* pull that starts with the list at the top, while no sheet is open, counts. Past `SD_TABLE_PULL_DISTANCE` the release
|
|
7
|
+
* emits `refresh`; the indicator stays until `loading` turns false. Listeners are passive.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SdTablePullRefreshComponent {
|
|
10
|
+
#private;
|
|
11
|
+
readonly target: import("@angular/core").InputSignal<HTMLElement | undefined>;
|
|
12
|
+
readonly enabled: import("@angular/core").InputSignal<boolean>;
|
|
13
|
+
readonly loading: import("@angular/core").InputSignal<boolean>;
|
|
14
|
+
readonly refresh: import("@angular/core").OutputEmitterRef<void>;
|
|
15
|
+
readonly distance: import("@angular/core").WritableSignal<number>;
|
|
16
|
+
readonly refreshing: import("@angular/core").WritableSignal<boolean>;
|
|
17
|
+
readonly threshold = 64;
|
|
18
|
+
constructor();
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdTablePullRefreshComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdTablePullRefreshComponent, "sd-table-pull-refresh", never, { "target": { "alias": "target"; "required": false; "isSignal": true; }; "enabled": { "alias": "enabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "refresh": "refresh"; }, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
|
2
2
|
import { SdTableAction } from '../../models/table-option-selector.model';
|
|
3
3
|
import { SdTableItem } from '../../models/table-item.model';
|
|
4
|
-
import {
|
|
5
|
-
import { SdUnwrapSignal } from '@sdcorejs/angular/utilities/models';
|
|
4
|
+
import { type ɵSdSelectionBarAction } from '@sdcorejs/angular/components/quick-action';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
/**
|
|
8
7
|
* Resolves the bulk actions a selection is allowed to run.
|
|
@@ -17,25 +16,5 @@ export declare class ActionFilterPipe implements PipeTransform {
|
|
|
17
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<ActionFilterPipe, never>;
|
|
18
17
|
static ɵpipe: i0.ɵɵPipeDeclaration<ActionFilterPipe, "actionFilter", true>;
|
|
19
18
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
variant: 'normal';
|
|
23
|
-
icon?: string;
|
|
24
|
-
fontSet?: SdUnwrapSignal<SdButton['fontSet']>;
|
|
25
|
-
tooltip?: SdUnwrapSignal<SdButton['tooltip']>;
|
|
26
|
-
title?: SdUnwrapSignal<SdButton['title']>;
|
|
27
|
-
color?: SdUnwrapSignal<SdButton['color']>;
|
|
28
|
-
type?: SdUnwrapSignal<SdButton['type']>;
|
|
29
|
-
click: (selectedItems?: T[]) => void;
|
|
30
|
-
}
|
|
31
|
-
interface ActionChildren<T = any> {
|
|
32
|
-
variant: 'children';
|
|
33
|
-
icon?: string;
|
|
34
|
-
fontSet?: SdUnwrapSignal<SdButton['fontSet']>;
|
|
35
|
-
tooltip?: SdUnwrapSignal<SdButton['tooltip']>;
|
|
36
|
-
title?: SdUnwrapSignal<SdButton['title']>;
|
|
37
|
-
color?: SdUnwrapSignal<SdButton['color']>;
|
|
38
|
-
type?: SdUnwrapSignal<SdButton['type']>;
|
|
39
|
-
children: ActionNormal<T>[];
|
|
40
|
-
}
|
|
41
|
-
export {};
|
|
19
|
+
/** Lệnh đã lọc theo lựa chọn, đúng shape mà thanh chọn dùng chung nhận. */
|
|
20
|
+
export type Action<T = any> = ɵSdSelectionBarAction<T>;
|
|
@@ -13,16 +13,6 @@ export declare class SelectorActionComponent {
|
|
|
13
13
|
/** Bulk actions the current selection is allowed to run. */
|
|
14
14
|
actions: import("@angular/core").Signal<Action[]>;
|
|
15
15
|
opened: import("@angular/core").Signal<boolean>;
|
|
16
|
-
readonly directActions: import("@angular/core").Signal<{
|
|
17
|
-
action: Action;
|
|
18
|
-
index: number;
|
|
19
|
-
}[]>;
|
|
20
|
-
readonly overflowActions: import("@angular/core").Signal<{
|
|
21
|
-
action: Action;
|
|
22
|
-
index: number;
|
|
23
|
-
}[]>;
|
|
24
|
-
readonly moreLabel: import("@angular/core").Signal<string>;
|
|
25
|
-
readonly clearLabel: import("@angular/core").Signal<string>;
|
|
26
16
|
onClear: () => void;
|
|
27
17
|
onClickAction: (action: Action) => void;
|
|
28
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectorActionComponent, never>;
|
|
@@ -4,6 +4,12 @@ import { SdTableOptionFilter } from '../services/table-filter/table-filter.model
|
|
|
4
4
|
import { Operator } from '@sdcorejs/utils/models';
|
|
5
5
|
import { SdTableColumn, SdTableOptionLoading } from '../models';
|
|
6
6
|
export interface ISdTableConfiguration {
|
|
7
|
+
/**
|
|
8
|
+
* Khoá của cấu hình, dùng khi một portal có nhiều module với backend khác nhau. Bảng chọn bằng
|
|
9
|
+
* `option.configurationKey`. Không khai `key`: cấu hình mặc định của portal, áp cho mọi bảng và là nền cho các cấu
|
|
10
|
+
* hình có `key` (gộp theo từng field).
|
|
11
|
+
*/
|
|
12
|
+
key?: string;
|
|
7
13
|
paginate?: {
|
|
8
14
|
/** Số dòng mỗi trang. */
|
|
9
15
|
pageSize?: SdTableOptionPaginate['pageSize'];
|
|
@@ -22,8 +28,19 @@ export interface ISdTableConfiguration {
|
|
|
22
28
|
hideExternalFilterToolbar?: SdTableOptionFilter['hideExternalFilterToolbar'];
|
|
23
29
|
/** Giao diện lọc mặc định cho mọi bảng; `option.filter.mode` thắng. Mặc định là `'default'`. */
|
|
24
30
|
mode?: SdTableOptionFilter['mode'];
|
|
25
|
-
/**
|
|
26
|
-
|
|
31
|
+
/** Cho người dùng chọn giao diện lọc trong modal Thiết lập; `option.filter.modeSelectable` thắng. Mặc định là `true`. */
|
|
32
|
+
modeSelectable?: SdTableOptionFilter['modeSelectable'];
|
|
33
|
+
/**
|
|
34
|
+
* Tuỳ chọn mặc định của mode `'query-bar'`; gộp theo từng field với `option.filter.queryBar`. Không có `savedFilters`:
|
|
35
|
+
* khoá bộ lọc đã lưu phải riêng từng bảng.
|
|
36
|
+
*/
|
|
37
|
+
queryBar?: Omit<NonNullable<SdTableOptionFilter['queryBar']>, 'savedFilters'>;
|
|
38
|
+
/**
|
|
39
|
+
* Operator của ô lọc theo cột, theo `type` của cột; chỉ áp cho cột bật `filter.operator.enable`.
|
|
40
|
+
* - `list`: danh sách operator khi cột không khai `filter.operator.list`. Type không khai ở đây dùng bộ mặc định của
|
|
41
|
+
* thư viện (`DEFAULT_TABLE_CONFIG`: `string`, `number`); khai mảng rỗng để type đó không có operator.
|
|
42
|
+
* - `default`: operator chọn sẵn; `filter.operator.default` của cột thắng.
|
|
43
|
+
*/
|
|
27
44
|
operator?: {
|
|
28
45
|
list?: Partial<Record<SdTableColumn['type'], Operator[]>>;
|
|
29
46
|
default?: Partial<Record<SdTableColumn['type'], Operator>>;
|
|
@@ -36,6 +53,40 @@ export interface ISdTableConfiguration {
|
|
|
36
53
|
};
|
|
37
54
|
/** Lớp hiển thị khi đang tải cho mọi bảng; `option.loading` của từng bảng thắng theo từng field. */
|
|
38
55
|
loading?: SdTableOptionLoading;
|
|
56
|
+
mobile?: {
|
|
57
|
+
/**
|
|
58
|
+
* Phone cards for tables without a card body (`sdTableRowMobileDef` or `mobile.template`): the card is built from
|
|
59
|
+
* the visible columns. `mobile.template: false` opts a table out. Mặc định là `false`.
|
|
60
|
+
*/
|
|
61
|
+
autoTemplate?: boolean;
|
|
62
|
+
};
|
|
39
63
|
}
|
|
40
64
|
export declare const DEFAULT_TABLE_CONFIG: ISdTableConfiguration;
|
|
65
|
+
/** Operator áp cho một cột bật `filter.operator.enable`. */
|
|
66
|
+
export interface SdTableColumnOperatorDefaults {
|
|
67
|
+
/** Danh sách của cột nếu cột tự khai, không thì theo type. Luôn là bản sao: bảng gán thẳng vào `column.filter.operator.list`. */
|
|
68
|
+
list: Operator[];
|
|
69
|
+
default?: Operator;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Operator của một cột. Cột tự khai `filter.operator.list` thì dùng danh sách đó; không thì lấy theo `type`: cấu hình của ứng dụng (`SD_TABLE_CONFIGURATION`) thắng theo từng type, type không khai
|
|
73
|
+
* thì dùng bộ mặc định của thư viện. Mảng rỗng trong cấu hình nghĩa là type đó không có operator.
|
|
74
|
+
*
|
|
75
|
+
* Operator chọn sẵn của thư viện chỉ đi cùng danh sách mặc định của thư viện. Cột hay ứng dụng tự khai danh sách mà
|
|
76
|
+
* không khai `default` thì giữ như trước: không operator nào được chọn sẵn.
|
|
77
|
+
*/
|
|
78
|
+
export declare const resolveTableColumnOperators: (type: SdTableColumn["type"], configuration?: ISdTableConfiguration | null, columnList?: readonly Operator[] | null) => SdTableColumnOperatorDefaults;
|
|
79
|
+
/**
|
|
80
|
+
* Cấu hình áp cho một bảng. `SD_TABLE_CONFIGURATION` nhận một cấu hình hoặc một mảng (`multi: true`), giống
|
|
81
|
+
* `SD_UPLOAD_FILE_CONFIGURATION` và `SD_PERMISSION_CONFIGURATION`:
|
|
82
|
+
* - cấu hình không `key` là mặc định của portal;
|
|
83
|
+
* - cấu hình có `key` trùng `option.configurationKey` được gộp lên trên mặc định của portal, theo từng field;
|
|
84
|
+
* - `key` không khớp cấu hình nào thì dùng mặc định của portal.
|
|
85
|
+
*
|
|
86
|
+
* Hai cấu hình trùng `key` (kể cả hai cấu hình không `key`) là lỗi khai báo: ném lỗi thay vì âm thầm chọn một.
|
|
87
|
+
*/
|
|
88
|
+
export declare const resolveTableConfiguration: (source?: ISdTableConfiguration | readonly ISdTableConfiguration[] | null, key?: string | null) => ISdTableConfiguration | null;
|
|
89
|
+
/**
|
|
90
|
+
* Một cấu hình (`useValue`) hoặc nhiều cấu hình (`multi: true`, mỗi cấu hình một `key`). Xem `resolveTableConfiguration`.
|
|
91
|
+
*/
|
|
41
92
|
export declare const SD_TABLE_CONFIGURATION: InjectionToken<ISdTableConfiguration>;
|
|
@@ -4,4 +4,5 @@ export type * from './table-aggregate.model';
|
|
|
4
4
|
export type * from './table-command.model';
|
|
5
5
|
export type * from './table-option-tree.model';
|
|
6
6
|
export type * from './table-option-loading.model';
|
|
7
|
+
export type * from './table-mobile.model';
|
|
7
8
|
export type { SdTableItem, SdTableMeta, SdTableDisplay } from './table-item.model';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { TemplateRef } from '@angular/core';
|
|
2
|
+
import type { SdBadgeData } from '@sdcorejs/angular/components/badge';
|
|
3
|
+
import type { NestedKeyOf } from '@sdcorejs/utils/models';
|
|
4
|
+
import type { SdTableRowMobileDefContext } from '../directives/sd-table-row-mobile-def.directive';
|
|
5
|
+
/** A leaf column of the table, by its `field`. Checked at build time (`NestedKeyOf<T>`) and at run time (leaf column). */
|
|
6
|
+
export type SdTableMobileField<T> = NestedKeyOf<T>;
|
|
7
|
+
/** A column value, or fixed text shown as is. */
|
|
8
|
+
export type SdTableMobileText<T> = SdTableMobileField<T> | {
|
|
9
|
+
text: string;
|
|
10
|
+
};
|
|
11
|
+
/** Slots every mobile layout has. */
|
|
12
|
+
export interface SdTableMobileData<T> {
|
|
13
|
+
/** First line, 15px medium. A missing or unknown field falls back to `mobile.rowLabel`, then `rowKey`. */
|
|
14
|
+
title: SdTableMobileText<T>;
|
|
15
|
+
/** Second line, one line cut with "…". */
|
|
16
|
+
subtitle?: SdTableMobileText<T>;
|
|
17
|
+
/** After the title. A field must be a column with `useBadge` (checked at run time), otherwise it shows as text. */
|
|
18
|
+
badge?: SdTableMobileField<T> | SdBadgeData;
|
|
19
|
+
/** Grid cells with the column title as label, in this order. */
|
|
20
|
+
fields?: SdTableMobileField<T>[];
|
|
21
|
+
}
|
|
22
|
+
/** Data of a `card` (the only layout so far). */
|
|
23
|
+
export interface SdTableMobileCardData<T> extends SdTableMobileData<T> {
|
|
24
|
+
/** First grid cell, medium weight. */
|
|
25
|
+
highlight?: SdTableMobileField<T>;
|
|
26
|
+
/**
|
|
27
|
+
* Grid cells shown before the "{n} more fields" button, `highlight` included.
|
|
28
|
+
* @defaultValue 4
|
|
29
|
+
*/
|
|
30
|
+
maxFields?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Not a card slot. why: TypeScript does not report excess properties of an object returned by an arrow function,
|
|
33
|
+
* so `never` is what rejects `trailing` (a slot of the future `list` layout) on a card.
|
|
34
|
+
*/
|
|
35
|
+
trailing?: never;
|
|
36
|
+
}
|
|
37
|
+
/** Second argument of `mobile.template.data`. */
|
|
38
|
+
export interface SdTableMobileDataContext {
|
|
39
|
+
/** Zero-based data-row position on the current page, as in `SdTableRowMobileDefContext`. */
|
|
40
|
+
index: number;
|
|
41
|
+
selected: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Builds the slots of one row. Called again when the rows are read again or `detectChanges()` runs, and when the index
|
|
45
|
+
* or the selection of the row changes.
|
|
46
|
+
*/
|
|
47
|
+
export type SdTableMobileDataFn<T, D> = (item: T, context: SdTableMobileDataContext) => D;
|
|
48
|
+
/**
|
|
49
|
+
* Body of the phone card: a consumer template, or slots built from the row (`data`). `layout` is fixed per table;
|
|
50
|
+
* leaving it out means `'card'`.
|
|
51
|
+
*/
|
|
52
|
+
export type SdTableMobileTemplate<T> = TemplateRef<SdTableRowMobileDefContext<T>> | {
|
|
53
|
+
layout?: 'card';
|
|
54
|
+
data: SdTableMobileDataFn<T, SdTableMobileCardData<T>>;
|
|
55
|
+
};
|
|
@@ -13,6 +13,7 @@ import { SdTableOptionSelector } from './table-option-selector.model';
|
|
|
13
13
|
import { SdTableOptionSort } from './table-option-sort.model';
|
|
14
14
|
import { SdTableOptionStyle } from './table-option-style.model';
|
|
15
15
|
import { SdTableOptionTree } from './table-option-tree.model';
|
|
16
|
+
import type { SdTableMobileTemplate } from './table-mobile.model';
|
|
16
17
|
import type { SdTableOptionAggregate } from './table-aggregate.model';
|
|
17
18
|
export type SdTableOption<T = any> = SdTableLocalOption<T> | SdTableServerOption<T>;
|
|
18
19
|
interface SdTableBaseOption<T = any> {
|
|
@@ -31,6 +32,12 @@ interface SdTableBaseOption<T = any> {
|
|
|
31
32
|
* ví dụ các option có hỗ trợ cache/config theo key.
|
|
32
33
|
*/
|
|
33
34
|
key?: string;
|
|
35
|
+
/**
|
|
36
|
+
* `key` của cấu hình trong `SD_TABLE_CONFIGURATION` áp cho bảng này (portal có nhiều module, mỗi module một backend).
|
|
37
|
+
* Cấu hình đó được gộp lên trên cấu hình mặc định của portal (cấu hình không `key`). Không khai, hoặc không có cấu
|
|
38
|
+
* hình nào trùng `key`: dùng cấu hình mặc định của portal.
|
|
39
|
+
*/
|
|
40
|
+
configurationKey?: string;
|
|
34
41
|
/**
|
|
35
42
|
* Field định danh của MỘT DÒNG (hỗ trợ dot-notation, vd `'id'` hoặc `'user.id'`).
|
|
36
43
|
*
|
|
@@ -43,10 +50,19 @@ interface SdTableBaseOption<T = any> {
|
|
|
43
50
|
* cần autoId theo dòng ổn định cho E2E.
|
|
44
51
|
*/
|
|
45
52
|
rowKey?: string;
|
|
46
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* Phone layout. Cards activate when the table has a card body: a projected `sdTableRowMobileDef` (wins, with a dev
|
|
55
|
+
* warning when `template` is set too), `template`, or `SD_TABLE_CONFIGURATION.mobile.autoTemplate`.
|
|
56
|
+
*/
|
|
47
57
|
mobile?: {
|
|
48
58
|
/** Row command title and accessible labels; falls back to rowKey, then row number. */
|
|
49
59
|
rowLabel?: (row: T) => string;
|
|
60
|
+
/**
|
|
61
|
+
* Card body on phones: a `TemplateRef`, or `{ data }` to build the card from row values. `false` keeps the desktop
|
|
62
|
+
* table on phones even with `autoTemplate`.
|
|
63
|
+
* @example `template: { data: row => ({ title: 'code', badge: 'status', highlight: 'total' }) }`
|
|
64
|
+
*/
|
|
65
|
+
template?: SdTableMobileTemplate<T> | false;
|
|
50
66
|
};
|
|
51
67
|
/**
|
|
52
68
|
* Cấu hình hiển thị/phục hồi config của table.
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { ConfiguredTable } from '../models/table-option-config.model';
|
|
2
2
|
import { SdTableOption } from '../models/table-option.model';
|
|
3
|
+
import { SdTableOptionFilter } from './table-filter/table-filter.model';
|
|
3
4
|
/** The column setup of an option before anyone changes it: every column that is not `hidden`, in option order. */
|
|
4
5
|
export declare const defaultConfiguredTable: (option: SdTableOption | undefined) => ConfiguredTable;
|
|
6
|
+
/**
|
|
7
|
+
* Whether two column setups build the same table: the same columns in the same order, with the same title, width,
|
|
8
|
+
* visibility, fixed and truncate. A value set back to its original counts as unchanged.
|
|
9
|
+
*/
|
|
10
|
+
export declare const sdTableSameColumnSetup: (left: ConfiguredTable | undefined, right: ConfiguredTable | undefined) => boolean;
|
|
5
11
|
/**
|
|
6
12
|
* Whether the table uses a setup of its own: the stored columns differ from the defaults in order, visibility, title,
|
|
7
|
-
* width (the settings modal or a resize on the table), fixed or truncate,
|
|
8
|
-
* `defaultShowing
|
|
13
|
+
* width (the settings modal or a resize on the table), fixed or truncate, the inline external filters differ from
|
|
14
|
+
* `defaultShowing`, or the stored filter mode differs from `filter.mode` (only while `filter.modeSelectable` is not
|
|
15
|
+
* `false`). Columns added to or removed from the option since the setup was stored do not count.
|
|
9
16
|
*/
|
|
10
|
-
export declare const sdTableHasCustomSetup: ({ option, configuration, inlineExternal, }: {
|
|
17
|
+
export declare const sdTableHasCustomSetup: ({ option, configuration, inlineExternal, filterMode, }: {
|
|
11
18
|
option: SdTableOption | undefined;
|
|
12
19
|
configuration: ConfiguredTable | undefined;
|
|
13
20
|
inlineExternal?: Record<string, boolean>;
|
|
21
|
+
filterMode?: SdTableOptionFilter["mode"];
|
|
14
22
|
}) => boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SdStorageWithDefault } from '@sdcorejs/angular/services';
|
|
2
2
|
import { ConfiguredTable, ConfiguredTableResult } from '../models/table-option-config.model';
|
|
3
3
|
import { SdTableOption } from '../models/table-option.model';
|
|
4
|
-
import { ISdTableConfiguration } from '../configurations';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class ConfigService {
|
|
7
6
|
#private;
|
|
@@ -10,7 +9,6 @@ export declare class ConfigService {
|
|
|
10
9
|
width: string;
|
|
11
10
|
}>;
|
|
12
11
|
private readonly storageService;
|
|
13
|
-
readonly tableConfiguration: ISdTableConfiguration | null;
|
|
14
12
|
constructor();
|
|
15
13
|
loadConfiguredTable: (option: SdTableOption) => ConfiguredTable;
|
|
16
14
|
loadConfigurationResult: (option: SdTableOption, configuration: ConfiguredTable) => ConfiguredTableResult;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type TemplateRef } from '@angular/core';
|
|
2
|
+
import type { SdBadgeData } from '@sdcorejs/angular/components/badge';
|
|
3
|
+
import type { SdTableRowMobileDefContext } from '../../directives/sd-table-row-mobile-def.directive';
|
|
4
|
+
import type { SdTableColumnAnyRow } from '../../models/table-column.model';
|
|
5
|
+
import type { SdTableMobileCardData, SdTableMobileDataFn } from '../../models/table-mobile.model';
|
|
6
|
+
/** What fills a phone card: a template, slots from `mobile.template.data`, or slots derived from the columns. */
|
|
7
|
+
export type SdTableMobileBody<T> = {
|
|
8
|
+
kind: 'template';
|
|
9
|
+
templateRef: TemplateRef<SdTableRowMobileDefContext<T>>;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'data';
|
|
12
|
+
layout: unknown;
|
|
13
|
+
data: SdTableMobileDataFn<T, SdTableMobileCardData<T>>;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'auto';
|
|
16
|
+
};
|
|
17
|
+
/** Grid cells before the "{n} more fields" button when `maxFields` is not set. */
|
|
18
|
+
export declare const SD_TABLE_MOBILE_MAX_FIELDS = 4;
|
|
19
|
+
/** A text slot of a card: the value of a column, or fixed text. */
|
|
20
|
+
export type SdTableMobileTextSlot = {
|
|
21
|
+
column: SdTableColumnAnyRow;
|
|
22
|
+
} | {
|
|
23
|
+
text: string;
|
|
24
|
+
};
|
|
25
|
+
/** The badge slot: a column value (`badge: false` when the column has no `useBadge`) or a fixed badge. */
|
|
26
|
+
export type SdTableMobileBadgeSlot = {
|
|
27
|
+
column: SdTableColumnAnyRow;
|
|
28
|
+
badge: boolean;
|
|
29
|
+
} | {
|
|
30
|
+
data: SdBadgeData;
|
|
31
|
+
};
|
|
32
|
+
/** Card slots checked against the columns. */
|
|
33
|
+
export interface SdTableMobileView {
|
|
34
|
+
layout: 'card';
|
|
35
|
+
/** Missing: the card shows the row label (`mobile.rowLabel`, then `rowKey`, then the row number). */
|
|
36
|
+
title?: SdTableMobileTextSlot;
|
|
37
|
+
subtitle?: SdTableMobileTextSlot;
|
|
38
|
+
badge?: SdTableMobileBadgeSlot;
|
|
39
|
+
/** Grid cells in order. With `highlight` the first cell is the highlighted one. */
|
|
40
|
+
fields: SdTableColumnAnyRow[];
|
|
41
|
+
highlight: boolean;
|
|
42
|
+
maxFields: number;
|
|
43
|
+
}
|
|
44
|
+
export type SdTableMobileIssueKind = 'unknown-field' | 'badge-field' | 'layout';
|
|
45
|
+
export interface SdTableMobileIssue {
|
|
46
|
+
kind: SdTableMobileIssueKind;
|
|
47
|
+
/** The field or layout value that failed. */
|
|
48
|
+
value: string;
|
|
49
|
+
}
|
|
50
|
+
export interface SdTableMobileResolved {
|
|
51
|
+
view: SdTableMobileView;
|
|
52
|
+
issues: SdTableMobileIssue[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Checks the slots returned by `mobile.template.data` against the table columns (leaf columns, children of grouped
|
|
56
|
+
* headers included) and returns the card to draw. Pure: the caller warns about `issues`.
|
|
57
|
+
*
|
|
58
|
+
* - An unknown field drops its slot; a missing title falls back to the row label.
|
|
59
|
+
* - A badge field without `useBadge` shows as text.
|
|
60
|
+
* - An unknown `layout` (plain JavaScript) draws a card.
|
|
61
|
+
* - Hidden, invisible and settings-hidden columns still show: the consumer named them.
|
|
62
|
+
*/
|
|
63
|
+
export declare const resolveMobileView: (columns: readonly SdTableColumnAnyRow[], layout: unknown, data: Record<string, unknown>) => SdTableMobileResolved;
|
|
64
|
+
/**
|
|
65
|
+
* Card built from the columns on screen (`SD_TABLE_CONFIGURATION.mobile.autoTemplate`, or a row whose `data` threw).
|
|
66
|
+
* Title: the `rowKey` column, else the first column. Badge: the first other column with `useBadge`. Subtitle: the
|
|
67
|
+
* first other `string` column. Fields: the rest, in column order. Pass the columns on screen (`shownLeafColumns`):
|
|
68
|
+
* `invisible` there is the option's default, not the settings, so only `hidden` columns are left out here.
|
|
69
|
+
*/
|
|
70
|
+
export declare const autoMobileView: (columns: readonly SdTableColumnAnyRow[], rowKey?: string) => SdTableMobileView;
|
|
71
|
+
/**
|
|
72
|
+
* Leaf columns on screen in the order the settings give: `firstColumns` with each grouped header replaced by its
|
|
73
|
+
* visible children (`secondColumns`).
|
|
74
|
+
*/
|
|
75
|
+
export declare const shownLeafColumns: (firstColumns: readonly SdTableColumnAnyRow[] | undefined, secondColumns: readonly SdTableColumnAnyRow[] | undefined) => SdTableColumnAnyRow[];
|
|
76
|
+
/** `console.warn` once per owner (a table) and key, in dev mode only. */
|
|
77
|
+
export declare const warnMobileOnce: (owner: object, key: string, message: string, ...details: unknown[]) => void;
|
|
@@ -18,6 +18,8 @@ export interface SdTableExportContext<T = any> {
|
|
|
18
18
|
export declare class TableExportService {
|
|
19
19
|
#private;
|
|
20
20
|
exporting: import("@angular/core").WritableSignal<boolean>;
|
|
21
|
+
/** Progress of a paged export in percent; `null` while unknown. */
|
|
22
|
+
readonly exportPercent: import("@angular/core").Signal<number | null>;
|
|
21
23
|
exportTitle: import("@angular/core").Signal<string>;
|
|
22
24
|
/** Đặt tiến độ export (0-100), hoặc null để trả nút về nhãn mặc định. */
|
|
23
25
|
setExportProgress: (percent: number | null) => void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Operator } from '@sdcorejs/utils/models';
|
|
2
|
+
import { SdTableColumn } from '../../models/table-column.model';
|
|
3
|
+
import { SdTableExternalFilter, TableFilterValue } from './table-filter.model';
|
|
4
|
+
/**
|
|
5
|
+
* Deep copy of a filter value for a working copy (mobile filter drawer).
|
|
6
|
+
* why: `JSON.parse(JSON.stringify())` biến `Date` thành chuỗi ISO và bỏ key `undefined`, nên giá trị default kiểu ngày
|
|
7
|
+
* đổi kiểu sau khi Áp dụng và so sánh trước/sau luôn lệch. Object khác plain object/array (File, class) giữ tham chiếu.
|
|
8
|
+
*/
|
|
9
|
+
export declare const cloneTableFilterValue: <T extends object>(value: T | null | undefined) => T;
|
|
10
|
+
/**
|
|
11
|
+
* Callbacks of the filters a commit changed, for UIs that edit a working copy and write it once (mobile filter
|
|
12
|
+
* drawer). The desktop controls call them on each change; here they run once per changed filter, after the write.
|
|
13
|
+
* - external filter `onChange(value)` — every type except `custom` (its template owns its events);
|
|
14
|
+
* - `filter.operatorChange(column, operator)` for a column whose operator changed;
|
|
15
|
+
* - column `filter.onChange(value, column, columnFilter)` only when `columnOnChange(column)` says so (a control that
|
|
16
|
+
* already called it while editing, such as `column-filter`, must not call it twice).
|
|
17
|
+
*/
|
|
18
|
+
export declare const runTableFilterCallbacks: (args: {
|
|
19
|
+
previous: TableFilterValue | undefined;
|
|
20
|
+
next: TableFilterValue | undefined;
|
|
21
|
+
externalFilters?: readonly SdTableExternalFilter[] | null;
|
|
22
|
+
columns?: readonly SdTableColumn[] | null;
|
|
23
|
+
operatorChange?: (column?: SdTableColumn, operator?: Operator) => void;
|
|
24
|
+
columnOnChange?: (column: SdTableColumn) => boolean;
|
|
25
|
+
}) => void;
|
|
@@ -13,6 +13,8 @@ export interface SdTableQuickFilter {
|
|
|
13
13
|
}
|
|
14
14
|
export interface TableFilterConfiguration {
|
|
15
15
|
inlineExternal: Record<string, boolean>;
|
|
16
|
+
/** Giao diện lọc người dùng chọn trong modal Thiết lập; thắng `filter.mode` khi `filter.modeSelectable` khác `false`. */
|
|
17
|
+
mode?: SdTableOptionFilter['mode'];
|
|
16
18
|
}
|
|
17
19
|
export interface TableFilterValue {
|
|
18
20
|
quickSearch?: SdTableQuickSearchValue;
|
|
@@ -71,14 +73,22 @@ export interface SdTableOptionFilter<T = unknown> {
|
|
|
71
73
|
* @defaultValue 'default'
|
|
72
74
|
*/
|
|
73
75
|
mode?: 'default' | 'query-bar';
|
|
76
|
+
/**
|
|
77
|
+
* Cho người dùng chọn giao diện lọc trong modal Thiết lập. Lựa chọn được lưu cùng thiết lập bộ lọc (theo `filter.key`)
|
|
78
|
+
* và thắng `mode`; **Khôi phục mặc định** xoá nó. `false`: luôn dùng `mode` và bỏ qua lựa chọn đã lưu.
|
|
79
|
+
* `SD_TABLE_CONFIGURATION.filter.modeSelectable` đặt cho mọi bảng; option thắng.
|
|
80
|
+
* @defaultValue true
|
|
81
|
+
*/
|
|
82
|
+
modeSelectable?: boolean;
|
|
74
83
|
/** Chỉ dùng khi `mode` là `'query-bar'`. */
|
|
75
84
|
queryBar?: SdTableOptionFilterQueryBar;
|
|
76
85
|
}
|
|
77
86
|
/** Tuỳ chọn của `filter.mode: 'query-bar'`. */
|
|
78
87
|
export interface SdTableOptionFilterQueryBar {
|
|
79
88
|
/**
|
|
80
|
-
* Cách sửa chip:
|
|
81
|
-
*
|
|
89
|
+
* Cách sửa chip: control ngay trên thanh (`sd-query-bar` mode `'inline'`) hoặc popover. `sd-query-bar` đứng riêng
|
|
90
|
+
* vẫn mặc định `'popover'`.
|
|
91
|
+
* @defaultValue 'inline'
|
|
82
92
|
*/
|
|
83
93
|
editor?: 'popover' | 'inline';
|
|
84
94
|
/**
|
|
@@ -88,6 +98,15 @@ export interface SdTableOptionFilterQueryBar {
|
|
|
88
98
|
pinned?: string[];
|
|
89
99
|
/** Field không đưa vào thanh; giá trị đang có vẫn được gửi đi. */
|
|
90
100
|
exclude?: string[];
|
|
101
|
+
/**
|
|
102
|
+
* Bộ lọc đã lưu của thanh (nút bookmark): lưu trên trình duyệt (localStorage) dưới khoá
|
|
103
|
+
* `sd-query-bar:savedFilters:sd-table:<key>`. Chỉ có ở chế độ query bar trên desktop; lưu chip, logic và từ khoá —
|
|
104
|
+
* không lưu sắp xếp, cột hay số dòng. Áp bộ lọc đã lưu đọc dữ liệu một lần; field bảng không còn có thì bị bỏ.
|
|
105
|
+
* Chỉ đọc từ option của bảng, không từ `SD_TABLE_CONFIGURATION` (một key chung sẽ trộn bộ lọc của mọi bảng).
|
|
106
|
+
*/
|
|
107
|
+
savedFilters?: {
|
|
108
|
+
key: string;
|
|
109
|
+
};
|
|
91
110
|
}
|
|
92
111
|
export declare const SdConvertToPagingReq: (filterRequest: SdTableFilterRequest, args: {
|
|
93
112
|
columns?: SdTableColumnAnyRow[];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { SdQueryField } from '@sdcorejs/angular/components/query-bar';
|
|
2
|
+
import type { Filter } from '@sdcorejs/utils/models';
|
|
3
|
+
import type { SdTableFilterDefDirective } from '../../directives/sd-table-filter-def.directive';
|
|
4
|
+
import type { SdTableColumnAnyRow } from '../../models/table-column.model';
|
|
5
|
+
import type { SdTableExternalFilter, TableFilterValue } from './table-filter.model';
|
|
6
|
+
import { type SdTableQueryContext, type SdTableQuerySource } from './table-query-bar.util';
|
|
7
|
+
/**
|
|
8
|
+
* One filter of the phone UI (chip row and filter sheet).
|
|
9
|
+
* - `source` + `field`: a filter the query-bar model can read — it gets a chip, a summary and the built-in controls.
|
|
10
|
+
* - `custom`: a filter only its own control can edit (a template, a time column, an external filter the bar leaves
|
|
11
|
+
* out). It has a row in the filter sheet that opens that control, but no chip and no summary.
|
|
12
|
+
*/
|
|
13
|
+
export interface SdTableMobileFilterItem {
|
|
14
|
+
/** `external:<field>` / `column:<field>` as on the query bar, `custom-*:<field>` otherwise. */
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
source?: SdTableQuerySource;
|
|
18
|
+
field?: SdQueryField;
|
|
19
|
+
custom?: {
|
|
20
|
+
kind: 'column';
|
|
21
|
+
column: SdTableColumnAnyRow;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'external';
|
|
24
|
+
external: SdTableExternalFilter;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'def';
|
|
27
|
+
def: SdTableFilterDefDirective;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Filters in the fixed phone order: external filters, then `sdTableFilterDef` templates, then columns (handoff 3, 5).
|
|
32
|
+
* `ctx` comes from `sdTableQueryFields` over the same columns and external filters.
|
|
33
|
+
*/
|
|
34
|
+
export declare const sdTableMobileFilterItems: (args: {
|
|
35
|
+
ctx: SdTableQueryContext;
|
|
36
|
+
columns: readonly SdTableColumnAnyRow[];
|
|
37
|
+
externalFilters?: readonly SdTableExternalFilter[];
|
|
38
|
+
filterDefs?: readonly SdTableFilterDefDirective[];
|
|
39
|
+
}) => SdTableMobileFilterItem[];
|
|
40
|
+
/** The chip of an item for a raw record, or `undefined` for a custom item. */
|
|
41
|
+
export declare const sdTableMobileFilterChip: (item: SdTableMobileFilterItem, value: TableFilterValue) => {
|
|
42
|
+
filter: Filter;
|
|
43
|
+
active: boolean;
|
|
44
|
+
} | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Whether an item filters something. A custom column counts when its raw value has content; templates write keys
|
|
47
|
+
* the table cannot know, so they never count.
|
|
48
|
+
*/
|
|
49
|
+
export declare const sdTableMobileFilterActive: (item: SdTableMobileFilterItem, value: TableFilterValue) => boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The raw record with one item cleared: no value, and a `NULL` / `NOT_NULL` column operator back to the default.
|
|
52
|
+
* Custom template items are left alone (their keys are unknown).
|
|
53
|
+
*/
|
|
54
|
+
export declare const sdTableMobileFilterClear: (item: SdTableMobileFilterItem, value: TableFilterValue, ctx: SdTableQueryContext) => TableFilterValue;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type SdQuery, type SdQueryField } from '@sdcorejs/angular/components/query-bar';
|
|
2
2
|
import { Filter, Operator } from '@sdcorejs/utils/models';
|
|
3
3
|
import { SdTableColumnAnyRow } from '../../models/table-column.model';
|
|
4
4
|
import type { SdTableExternalFilter, SdTableOptionFilterQueryBar, TableFilterValue } from './table-filter.model';
|
|
@@ -61,6 +61,21 @@ export interface SdTableQueryChange {
|
|
|
61
61
|
/** New column operator, when it changed. */
|
|
62
62
|
operator?: Operator;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* `aria-haspopup` of the header filter icon: what `SdQueryBar.openField` shows for `field` (same steps as `beginBuild`).
|
|
66
|
+
* The popover editor opens the chip popover (a dialog panel). The inline editor only focuses an existing chip; for a field without a chip it
|
|
67
|
+
* builds one, which opens the operator menu, or the value picker of a values / date field (a date skips the operator
|
|
68
|
+
* step when its default operator is allowed).
|
|
69
|
+
*/
|
|
70
|
+
export declare const sdTableQueryTriggerPopup: (field: SdQueryField, editor: "popover" | "inline", hasChip: boolean) => "menu" | "listbox" | "dialog" | null;
|
|
71
|
+
/**
|
|
72
|
+
* Why the query bar cannot show an external filter, or `undefined` when it can. Also tells the settings modal which
|
|
73
|
+
* filters are "not on the bar".
|
|
74
|
+
*/
|
|
75
|
+
export declare const sdTableExternalOffBar: (item: SdTableExternalFilter, args: {
|
|
76
|
+
exclude: ReadonlySet<string>;
|
|
77
|
+
filterDefs: ReadonlySet<string>;
|
|
78
|
+
}) => string | undefined;
|
|
64
79
|
/**
|
|
65
80
|
* Fields of the query bar for a table (handoff section 3): keys, groups, pinned chips, operators, and the filters
|
|
66
81
|
* left out. Order: `quickSearch.filters`, `externalFilters`, then the leaf columns given (children flattened).
|
|
@@ -84,6 +99,11 @@ export declare const sdTableQueryFields: (args: {
|
|
|
84
99
|
/** Items the table loaded for `values` columns whose `items` is a function. */
|
|
85
100
|
cacheValues?: Record<string, unknown[]>;
|
|
86
101
|
}) => SdTableQueryFields;
|
|
102
|
+
/** The chip a field shows for a raw record (active or not): what the bar would draw, shared with the phone filters. */
|
|
103
|
+
export declare const sdTableQueryChipOf: (source: SdTableQuerySource, value: TableFilterValue) => {
|
|
104
|
+
filter: Filter;
|
|
105
|
+
active: boolean;
|
|
106
|
+
};
|
|
87
107
|
/**
|
|
88
108
|
* Raw record → bar query (handoff section 5). Chips: every pinned field, then unpinned fields that filter something,
|
|
89
109
|
* in the order of `prev` and then declaration order. A chip whose operator and data equal the one in `prev` is that
|