@sdcorejs/angular 19.3.1 → 19.3.3
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 +25 -5
- package/assets/THEME.md +289 -5
- package/assets/licenses/tiptap-oss-NOTICES.txt +332 -0
- package/assets/scss/ckeditor5.scss +2 -88
- package/assets/scss/core/_control.scss +39 -0
- package/assets/scss/core/form.scss +444 -45
- package/assets/scss/core/view.scss +24 -0
- package/assets/scss/editor-content.scss +173 -0
- package/assets/scss/sd-core.scss +1 -0
- package/assets/scss/themes/_component-tokens.scss +123 -32
- package/assets/scss/themes/_material-tokens.scss +112 -0
- package/assets/scss/themes/_presets.scss +25 -0
- package/assets/scss/themes/_scales.scss +10 -0
- package/assets/scss/themes/_semantic.scss +13 -0
- package/assets/scss/themes/default.scss +8 -2
- package/components/avatar/index.d.ts +1 -0
- package/components/avatar/src/avatar-group.component.d.ts +43 -0
- package/components/avatar/src/avatar.component.d.ts +23 -1
- package/components/badge/index.d.ts +3 -0
- package/components/badge/src/badge-picker.component.d.ts +148 -0
- package/components/badge/src/badge-picker.constants.d.ts +18 -0
- package/components/badge/src/badge.component.d.ts +24 -3
- package/components/badge/src/badge.model.d.ts +19 -0
- package/components/button/src/button.component.d.ts +20 -1
- package/components/ckeditor-styles/src/ckeditor-styles.component.d.ts +3 -18
- package/components/editor/index.d.ts +1 -0
- package/components/editor/src/editor.component.d.ts +17 -15
- package/components/editor/src/models/editor.model.d.ts +5 -4
- package/components/editor/src/plugins/image-upload/utils/validate.utils.d.ts +5 -2
- package/components/editor/src/upload-manager.d.ts +21 -0
- package/components/editor-engine/index.d.ts +3 -0
- package/components/editor-engine/src/engine/editor-engine.d.ts +68 -0
- package/components/editor-engine/src/engine/editor-engine.models.d.ts +51 -0
- package/components/editor-engine/src/engine/editor-html-boundary.d.ts +6 -0
- package/components/editor-engine/src/engine/editor-schema.d.ts +3 -0
- package/components/editor-engine/src/surface/editor-surface.component.d.ts +50 -0
- package/components/editor-engine/src/toolbar/editor-button.directive.d.ts +17 -0
- package/components/editor-engine/src/toolbar/editor-toolbar.component.d.ts +78 -0
- package/components/file-explorer/src/components/actions.component.d.ts +1 -0
- package/components/file-explorer/src/file-explorer.model.d.ts +4 -2
- package/components/file-explorer/src/file-explorer.utils.d.ts +6 -2
- package/components/form-generic/src/components/elements/button-element.component.d.ts +16 -0
- package/components/form-generic/src/components/elements/index.d.ts +2 -0
- package/components/form-generic/src/components/elements/static-element.component.d.ts +26 -0
- package/components/form-generic/src/components/form-builder/canvas/field-preview.component.d.ts +10 -0
- package/components/form-generic/src/components/form-builder/form-builder.component.d.ts +9 -4
- package/components/form-generic/src/components/form-builder/inspector/inspector.component.d.ts +46 -0
- package/components/form-generic/src/components/form-builder/state/builder-document.d.ts +9 -1
- package/components/form-generic/src/components/form-builder/state/builder-palette.d.ts +2 -2
- package/components/form-generic/src/components/form-builder/state/builder-store.d.ts +13 -1
- package/components/form-generic/src/components/form-render/components/item/components/index.d.ts +2 -0
- package/components/form-generic/src/components/form-render/components/item/components/json/json.component.d.ts +26 -0
- package/components/form-generic/src/components/form-render/components/item/components/time/time.component.d.ts +17 -0
- package/components/form-generic/src/components/form-render/form-render.component.d.ts +64 -6
- package/components/form-generic/src/models/form-generic-element.model.d.ts +128 -0
- package/components/form-generic/src/models/form-generic-field.model.d.ts +5 -1
- package/components/form-generic/src/models/form-generic-schema.d.ts +9 -1
- package/components/form-generic/src/models/form-generic-schema.model.d.ts +7 -3
- package/components/form-generic/src/models/index.d.ts +1 -0
- package/components/form-generic/src/rules/form-generic-button.d.ts +21 -0
- package/components/form-generic/src/rules/form-generic-display.d.ts +2 -0
- package/components/form-generic/src/rules/form-generic-filter.d.ts +21 -3
- package/components/form-generic/src/rules/form-generic-url.d.ts +10 -0
- package/components/form-generic/src/rules/form-generic-validation.d.ts +13 -0
- package/components/history/pipes/view-date.pipe.d.ts +1 -0
- package/components/import-excel/src/pipes/column-transform.pipe.d.ts +1 -0
- package/components/index.d.ts +1 -0
- package/components/mini-editor/index.d.ts +1 -0
- package/components/mini-editor/src/mini-editor.component.d.ts +25 -62
- package/components/mini-editor/src/mini-editor.model.d.ts +9 -9
- package/components/modal-resizable/src/modal-resizable.component.d.ts +3 -121
- package/components/operator/index.d.ts +2 -0
- package/components/operator/src/operator-chip.component.d.ts +72 -0
- package/components/operator/src/operator-items.d.ts +49 -0
- package/components/operator/src/operator.component.d.ts +18 -11
- package/components/section/index.d.ts +1 -0
- package/components/section/src/section-registry.d.ts +11 -0
- package/components/splitter/index.d.ts +1 -1
- package/components/tab-router/src/actions/tab-router.action.d.ts +1 -1
- package/components/tab-router/src/components/tab-router-item/tab-router-item.component.d.ts +8 -1
- package/components/tab-router/src/components/tab-router-list-item/tab-router-list-item.component.d.ts +17 -0
- package/components/tab-router/src/components/tab-router-nav/tab-router-nav.component.d.ts +50 -9
- package/components/tab-router/src/components/tab-router-outlet/tab-router-outlet.component.d.ts +6 -1
- package/components/tab-router/src/models/tab-router.model.d.ts +5 -0
- package/components/tab-router/src/pipes/tab-info.pipe.d.ts +7 -0
- package/components/tab-router/src/services/tab-router.service.d.ts +5 -0
- package/components/table/index.d.ts +2 -0
- package/components/table/src/components/filter/column-filter/column-filter.component.d.ts +7 -0
- package/components/table/src/components/filter/external-filter/external-filter.component.d.ts +5 -1
- package/components/table/src/components/mobile-cards/mobile-cards.component.d.ts +4 -0
- package/components/table/src/components/unknown-total-paginator/unknown-total-paginator.component.d.ts +52 -0
- package/components/table/src/configurations/index.d.ts +1 -0
- package/components/table/src/configurations/table-layout.d.ts +16 -0
- package/components/table/src/configurations/table.configuration.d.ts +3 -1
- package/components/table/src/models/index.d.ts +1 -0
- package/components/table/src/models/table-column.model.d.ts +3 -10
- package/components/table/src/models/table-item.model.d.ts +4 -1
- package/components/table/src/models/table-option-loading.model.d.ts +42 -0
- package/components/table/src/models/table-option-paginate.model.d.ts +14 -0
- package/components/table/src/models/table-option.model.d.ts +31 -5
- package/components/table/src/services/table-aggregate.util.d.ts +6 -1
- package/components/table/src/services/table-export/table-export.service.d.ts +4 -3
- package/components/table/src/services/table-filter/table-filter-operator.util.d.ts +16 -0
- package/components/table/src/services/table-filter/table-filter.model.d.ts +12 -0
- package/components/table/src/services/table-loading/table-loading.util.d.ts +91 -0
- package/components/table/src/services/table-local/table-local-sort.util.d.ts +8 -2
- package/components/table/src/services/table-local/table-local.util.d.ts +7 -2
- package/components/table/src/services/table-paging/unknown-total.util.d.ts +28 -0
- package/components/table/src/services/tree/tree.util.d.ts +2 -0
- package/components/table/src/table.component.d.ts +39 -0
- package/components/upload-file/src/components/file-type-icon/file-type-icon.component.d.ts +15 -0
- package/components/upload-file/src/components/preview/preview.component.d.ts +88 -10
- package/components/upload-file/src/configurations/upload-file.configuration.d.ts +1 -1
- package/components/upload-file/src/helpers/file-type.d.ts +25 -0
- package/components/upload-file/src/pipes/file-meta.pipe.d.ts +9 -0
- package/components/upload-file/src/pipes/file-reason.pipe.d.ts +11 -0
- package/components/upload-file/src/pipes/index.d.ts +2 -0
- package/components/upload-file/src/upload-file.component.d.ts +89 -8
- package/components/window/index.d.ts +1 -0
- package/components/window/src/window.component.d.ts +77 -0
- package/components/{modal-resizable/src/modal-resizable.registry.d.ts → window/src/window.registry.d.ts} +7 -4
- package/configurations/src/sd-core.configuration.d.ts +7 -0
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs +5 -5
- package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-avatar.mjs +141 -10
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +546 -22
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +32 -2
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +5 -20
- package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs +1872 -0
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-editor.mjs +456 -755
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +68 -37
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +2119 -1160
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-history.mjs +5 -2
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-image-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +21 -6
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-kanban.mjs +12 -2
- package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +175 -281
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +1 -308
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-operator.mjs +261 -42
- package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +12 -12
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +17 -5
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- 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-splitter.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +557 -92
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +1000 -118
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +886 -173
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-view.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-view.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-window.mjs +486 -0
- package/fesm2022/sdcorejs-angular-components-window.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components.mjs +1 -0
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-configurations.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +18 -1
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +20 -2
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +462 -124
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +421 -121
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +78 -12
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +74 -17
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +79 -16
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-directives.mjs +82 -2
- package/fesm2022/sdcorejs-angular-forms-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +55 -5
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +53 -6
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-models.mjs +88 -5
- package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs +5 -4
- package/fesm2022/sdcorejs-angular-forms-segmented.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +86 -32
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +16 -3
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-time.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-time.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 +1745 -22
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-interceptors.mjs +1 -1
- package/fesm2022/sdcorejs-angular-interceptors.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-Bk3PrEf3.mjs +478 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-Bk3PrEf3.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-CwUegGgG.mjs +214 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-CwUegGgG.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-lF2trhfp.mjs +277 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-lF2trhfp.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs +1556 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic.mjs +2 -0
- package/fesm2022/sdcorejs-angular-modules-generic.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-icon.mjs +96 -3
- package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +2053 -35
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs +23 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs +16 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-CVEKaR8U.mjs +51 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-CVEKaR8U.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-BqHybMk0.mjs +130 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-BqHybMk0.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CND3d2zl.mjs +131 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CND3d2zl.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-BbDoQccI.mjs +99 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-BbDoQccI.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CB_wJIP8.mjs +460 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CB_wJIP8.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DlP4BrhU.mjs +118 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DlP4BrhU.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +18 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-VAMePx_q.mjs +66 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-VAMePx_q.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-BD79VR0c.mjs +148 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-BD79VR0c.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-B1rFhbOc.mjs +172 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-B1rFhbOc.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-BhCjw6ZL.mjs +467 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-BhCjw6ZL.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CnL2FzCx.mjs +90 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CnL2FzCx.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-BeH-NYvE.mjs +514 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-BeH-NYvE.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-DpnYSG2j.mjs +61 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-DpnYSG2j.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-1bi0JZdf.mjs +170 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-1bi0JZdf.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D6eKR2cq.mjs +87 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D6eKR2cq.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-FcJS3Nbd.mjs +232 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-FcJS3Nbd.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs +70 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-BAZLCVci.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-BAZLCVci.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-ikk0cK1M.mjs +522 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-ikk0cK1M.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Cex41xzy.mjs +164 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Cex41xzy.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-D643jEmo.mjs +629 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-D643jEmo.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DTWHhNNl.mjs +71 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DTWHhNNl.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-YJUJsrIZ.mjs +115 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-YJUJsrIZ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-qH-YO6wP.mjs +118 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-qH-YO6wP.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-S0Vuy6Oc.mjs +1069 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-S0Vuy6Oc.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs +186 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs +97 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs +12 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.service-Ba73HPGG.mjs +48 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.service-Ba73HPGG.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-CBlN7eEn.mjs +295 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-CBlN7eEn.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-BvzFafUW.mjs +74 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-BvzFafUW.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-C3uWi8JZ.mjs +165 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-C3uWi8JZ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-C5ELCTEw.mjs +74 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-C5ELCTEw.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ClQwnO4h.mjs +50 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ClQwnO4h.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DTUxYZ6g.mjs +66 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DTUxYZ6g.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DpCuYBlL.mjs +99 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DpCuYBlL.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DwZWxmJf.mjs +45 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DwZWxmJf.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ydOZduls.mjs +43 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ydOZduls.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-D3B5I9hg.mjs +406 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-D3B5I9hg.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BW-i6BHg.mjs +317 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BW-i6BHg.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-By1mYFa_.mjs +132 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-By1mYFa_.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DwcyKb4j.mjs +143 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DwcyKb4j.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-BBR8360C.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-BBR8360C.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CAtqPgIH.mjs +357 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CAtqPgIH.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DjMChf6s.mjs +128 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DjMChf6s.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern.mjs +2 -0
- package/fesm2022/sdcorejs-angular-modules-pattern.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules.mjs +1 -0
- package/fesm2022/sdcorejs-angular-modules.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-pipes.mjs +27 -7
- package/fesm2022/sdcorejs-angular-pipes.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-date-time.mjs +143 -0
- package/fesm2022/sdcorejs-angular-services-date-time.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-services-storage.mjs +44 -8
- package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs +104 -4
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services.mjs +1 -0
- package/fesm2022/sdcorejs-angular-services.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-read-state.mjs +4 -0
- package/fesm2022/sdcorejs-angular-utilities-read-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs +10 -0
- package/fesm2022/sdcorejs-angular-utilities-theme.mjs.map +1 -1
- package/forms/autocomplete/src/autocomplete.component.d.ts +5 -0
- package/forms/chip/src/chip.component.d.ts +135 -19
- package/forms/chip/src/index.d.ts +0 -1
- package/forms/chip-calendar/src/chip-calendar-header.component.d.ts +17 -0
- package/forms/chip-calendar/src/chip-calendar.component.d.ts +147 -19
- package/forms/date/src/date.component.d.ts +23 -2
- package/forms/date-range/src/date-range.component.d.ts +24 -2
- package/forms/datetime/src/datetime-time-zone.adapter.d.ts +15 -0
- package/forms/directives/index.d.ts +1 -0
- package/forms/directives/src/search-field.component.d.ts +45 -0
- package/forms/input/src/input.component.d.ts +23 -2
- package/forms/input-number/src/input-number.component.d.ts +23 -2
- package/forms/models/index.d.ts +1 -0
- package/forms/models/src/sd-calendar-day.d.ts +22 -0
- package/forms/models/src/sd-model-facing-control.d.ts +3 -1
- package/forms/models/src/sd-strict-date-adapter.d.ts +3 -0
- package/forms/models/src/sd-temporal-transform.d.ts +7 -0
- package/forms/select/src/select.component.d.ts +33 -4
- package/i18n/src/en.d.ts +344 -2
- package/modules/generic/index.d.ts +4 -0
- package/modules/generic/src/components/configuration-form/generic-configuration-form.component.d.ts +33 -0
- package/modules/generic/src/components/configuration-general/generic-configuration-general.component.d.ts +28 -0
- package/modules/generic/src/components/configuration-import/generic-configuration-import.component.d.ts +27 -0
- package/modules/generic/src/components/configuration-list/generic-configuration-list.component.d.ts +39 -0
- package/modules/generic/src/components/import-dialog/generic-import-dialog.component.d.ts +15 -0
- package/modules/generic/src/components/property-identity/generic-property-identity.component.d.ts +15 -0
- package/modules/generic/src/core/generic-columns.d.ts +19 -0
- package/modules/generic/src/core/generic-defaults.d.ts +14 -0
- package/modules/generic/src/core/generic-form.d.ts +17 -0
- package/modules/generic/src/core/generic-import.d.ts +49 -0
- package/modules/generic/src/core/generic-merge.d.ts +21 -0
- package/modules/generic/src/core/generic-permission.d.ts +3 -0
- package/modules/generic/src/core/generic-property-icon.d.ts +8 -0
- package/modules/generic/src/core/generic-search.d.ts +19 -0
- package/modules/generic/src/core/generic-title.d.ts +11 -0
- package/modules/generic/src/core/generic-validate.d.ts +8 -0
- package/modules/generic/src/core/index.d.ts +10 -0
- package/modules/generic/src/models/generic-adapter.model.d.ts +49 -0
- package/modules/generic/src/models/generic-entity.model.d.ts +71 -0
- package/modules/generic/src/models/generic-issue.model.d.ts +29 -0
- package/modules/generic/src/models/generic-schema.model.d.ts +133 -0
- package/modules/generic/src/models/index.d.ts +4 -0
- package/modules/generic/src/pages/configuration/generic-configuration.page.d.ts +26 -0
- package/modules/generic/src/pages/form/generic-form-host.page.d.ts +42 -0
- package/modules/generic/src/pages/list/generic-list.page.d.ts +39 -0
- package/modules/generic/src/registry/generic-registry.d.ts +35 -0
- package/modules/generic/src/registry/index.d.ts +2 -0
- package/modules/generic/src/registry/provide-sd-generic.d.ts +15 -0
- package/modules/generic/src/routes/generic-route.guards.d.ts +24 -0
- package/modules/generic/src/routes/sd-generic.routes.d.ts +10 -0
- package/modules/generic/src/services/generic-configuration-store.d.ts +13 -0
- package/modules/generic/src/services/generic-data.service.d.ts +34 -0
- package/modules/generic/src/services/generic-import.service.d.ts +21 -0
- package/modules/generic/src/services/generic-permission.service.d.ts +26 -0
- package/modules/generic/src/services/generic-relation-catalog.d.ts +14 -0
- package/modules/generic/src/services/generic-schema.service.d.ts +28 -0
- package/modules/generic/src/services/index.d.ts +6 -0
- package/modules/icon/src/data-type-icon.d.ts +30 -0
- package/modules/icon/src/icon.model.d.ts +2 -1
- package/modules/icon/src/index.d.ts +1 -0
- package/modules/index.d.ts +1 -0
- package/modules/layout/components/index.d.ts +5 -0
- package/modules/layout/components/layout-main/layout-main.component.d.ts +2 -1
- package/modules/layout/components/page/page-form-leave.guard.d.ts +9 -0
- package/modules/layout/components/page/page.component.d.ts +38 -2
- package/modules/layout/components/page-list/page-list.component.d.ts +42 -0
- package/modules/layout/components/shared/context-switcher/context-switcher.component.d.ts +71 -0
- package/modules/layout/components/shared/user-menu/user-menu.component.d.ts +1 -1
- package/modules/layout/components/sidebar-mobile-v4/main.component.d.ts +95 -0
- package/modules/layout/components/sidebar-v1/components/sidebar/sidebar.component.d.ts +1 -0
- package/modules/layout/components/sidebar-v3/main.component.d.ts +3 -0
- package/modules/layout/components/sidebar-v4/main.component.d.ts +69 -0
- package/modules/layout/components/sidebar-v4/menu-tree/sidebar-v4-menu-tree.component.d.ts +174 -0
- package/modules/layout/configurations/layout.configuration.d.ts +46 -1
- package/modules/layout/services/context/context.model.d.ts +16 -0
- package/modules/layout/services/context/context.runtime.d.ts +14 -0
- package/modules/layout/services/context/context.service.d.ts +54 -0
- package/modules/layout/services/context/index.d.ts +3 -0
- package/modules/layout/services/index.d.ts +1 -0
- package/modules/layout/services/menu/menu.model.d.ts +33 -0
- package/modules/layout/services/menu/menu.utils.d.ts +32 -1
- package/modules/layout/services/storage/storage.service.d.ts +20 -1
- package/modules/pattern/README.md +76 -0
- package/modules/pattern/configurations/pattern.configuration.d.ts +30 -0
- package/modules/pattern/configurations/provide-sd-patterns.d.ts +19 -0
- package/modules/pattern/core/mock-api/mock-api.interceptor.d.ts +8 -0
- package/modules/pattern/core/mock-api/mock-api.model.d.ts +62 -0
- package/modules/pattern/core/mock-api/mock-api.state.d.ts +36 -0
- package/modules/pattern/core/mock-api/mock-backend.d.ts +18 -0
- package/modules/pattern/core/mock-api/mock-backend.factory.d.ts +3 -0
- package/modules/pattern/core/mock-api/prng.d.ts +4 -0
- package/modules/pattern/core/mock-api/resources/approval.resource.d.ts +14 -0
- package/modules/pattern/core/mock-api/resources/category.resource.d.ts +9 -0
- package/modules/pattern/core/mock-api/resources/customer.resource.d.ts +22 -0
- package/modules/pattern/core/mock-api/resources/index.d.ts +3 -0
- package/modules/pattern/core/mock-api/resources/names.d.ts +5 -0
- package/modules/pattern/core/mock-api/resources/order.resource.d.ts +44 -0
- package/modules/pattern/core/mock-api/resources/partner.resource.d.ts +16 -0
- package/modules/pattern/core/mock-api/resources/product.resource.d.ts +13 -0
- package/modules/pattern/core/mock-api/resources/settings.resource.d.ts +18 -0
- package/modules/pattern/core/pattern-shell/catalog/pattern-catalog.d.ts +22 -0
- package/modules/pattern/core/pattern-shell/index/index.component.d.ts +9 -0
- package/modules/pattern/core/pattern-shell/settings/pattern-settings.store.d.ts +57 -0
- package/modules/pattern/core/pattern-shell/settings/settings-button.component.d.ts +44 -0
- package/modules/pattern/core/pattern-shell/shell/pattern-source-viewer.d.ts +8 -0
- package/modules/pattern/core/pattern-shell/shell/shell.component.d.ts +13 -0
- package/modules/pattern/core/pattern-shell/source/pattern-source.generated.d.ts +1 -0
- package/modules/pattern/core/pattern-shell/source/source-drawer.component.d.ts +27 -0
- package/modules/pattern/core/pattern-shell/toolbar/toolbar.component.d.ts +24 -0
- package/modules/pattern/core/permission/pattern-permission.d.ts +15 -0
- package/modules/pattern/core/permission/pattern-role.store.d.ts +13 -0
- package/modules/pattern/core/session-state.d.ts +4 -0
- package/modules/pattern/docs/detail.md +237 -0
- package/modules/pattern/docs/drawer.md +484 -0
- package/modules/pattern/docs/flow.md +631 -0
- package/modules/pattern/docs/form.md +518 -0
- package/modules/pattern/docs/header-actions.md +342 -0
- package/modules/pattern/docs/list.md +247 -0
- package/modules/pattern/docs/relation.md +180 -0
- package/modules/pattern/docs/select.md +206 -0
- package/modules/pattern/docs/split.md +350 -0
- package/modules/pattern/docs/states.md +168 -0
- package/modules/pattern/features/approval/entity.resolver.d.ts +4 -0
- package/modules/pattern/features/approval/entity.resolver.ts +21 -0
- package/modules/pattern/features/approval/pages/detail/detail.component.d.ts +13 -0
- package/modules/pattern/features/approval/pages/detail/detail.component.ts +139 -0
- package/modules/pattern/features/approval/pages/list/approval-inbox.d.ts +7 -0
- package/modules/pattern/features/approval/pages/list/approval-inbox.ts +7 -0
- package/modules/pattern/features/approval/pages/list/list.component.d.ts +26 -0
- package/modules/pattern/features/approval/pages/list/list.component.html +20 -0
- package/modules/pattern/features/approval/pages/list/list.component.ts +149 -0
- package/modules/pattern/features/approval/routes.d.ts +3 -0
- package/modules/pattern/features/approval/routes.ts +30 -0
- package/modules/pattern/features/approval/services/approval.model.d.ts +37 -0
- package/modules/pattern/features/approval/services/approval.model.ts +38 -0
- package/modules/pattern/features/approval/services/approval.service.d.ts +12 -0
- package/modules/pattern/features/approval/services/approval.service.ts +23 -0
- package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.d.ts +23 -0
- package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +123 -0
- package/modules/pattern/features/category/components/general-information-form/general-information-form.component.d.ts +20 -0
- package/modules/pattern/features/category/components/general-information-form/general-information-form.component.ts +61 -0
- package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.d.ts +23 -0
- package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +134 -0
- package/modules/pattern/features/category/entity.resolver.d.ts +6 -0
- package/modules/pattern/features/category/entity.resolver.ts +27 -0
- package/modules/pattern/features/category/pages/list/list.component.d.ts +17 -0
- package/modules/pattern/features/category/pages/list/list.component.html +20 -0
- package/modules/pattern/features/category/pages/list/list.component.ts +105 -0
- package/modules/pattern/features/category/routes.d.ts +3 -0
- package/modules/pattern/features/category/routes.ts +42 -0
- package/modules/pattern/features/category/services/category.model.d.ts +34 -0
- package/modules/pattern/features/category/services/category.model.ts +39 -0
- package/modules/pattern/features/category/services/category.service.d.ts +17 -0
- package/modules/pattern/features/category/services/category.service.ts +36 -0
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.d.ts +24 -0
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +131 -0
- package/modules/pattern/features/customer/components/customer-select/customer-select.component.d.ts +20 -0
- package/modules/pattern/features/customer/components/customer-select/customer-select.component.ts +72 -0
- package/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.d.ts +20 -0
- package/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.ts +30 -0
- package/modules/pattern/features/customer/components/debts-view/debts-view.component.d.ts +11 -0
- package/modules/pattern/features/customer/components/debts-view/debts-view.component.ts +28 -0
- package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.d.ts +20 -0
- package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +106 -0
- package/modules/pattern/features/customer/components/documents-view/documents-view.component.d.ts +14 -0
- package/modules/pattern/features/customer/components/documents-view/documents-view.component.ts +50 -0
- package/modules/pattern/features/customer/components/general-information-form/general-information-form.component.d.ts +33 -0
- package/modules/pattern/features/customer/components/general-information-form/general-information-form.component.ts +140 -0
- package/modules/pattern/features/customer/components/general-information-view/general-information-view.component.d.ts +9 -0
- package/modules/pattern/features/customer/components/general-information-view/general-information-view.component.ts +39 -0
- package/modules/pattern/features/customer/components/orders-view/orders-view.component.d.ts +11 -0
- package/modules/pattern/features/customer/components/orders-view/orders-view.component.ts +35 -0
- package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.d.ts +22 -0
- package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +101 -0
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.d.ts +24 -0
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +127 -0
- package/modules/pattern/features/customer/entity.resolver.d.ts +4 -0
- package/modules/pattern/features/customer/entity.resolver.ts +21 -0
- package/modules/pattern/features/customer/pages/list/list.component.d.ts +19 -0
- package/modules/pattern/features/customer/pages/list/list.component.html +22 -0
- package/modules/pattern/features/customer/pages/list/list.component.ts +113 -0
- package/modules/pattern/features/customer/pages/profile/profile.component.d.ts +31 -0
- package/modules/pattern/features/customer/pages/profile/profile.component.ts +120 -0
- package/modules/pattern/features/customer/pipes/customer-detail.pipe.d.ts +14 -0
- package/modules/pattern/features/customer/pipes/customer-detail.pipe.ts +18 -0
- package/modules/pattern/features/customer/routes.d.ts +6 -0
- package/modules/pattern/features/customer/routes.ts +59 -0
- package/modules/pattern/features/customer/services/customer.model.d.ts +77 -0
- package/modules/pattern/features/customer/services/customer.model.ts +87 -0
- package/modules/pattern/features/customer/services/customer.service.d.ts +24 -0
- package/modules/pattern/features/customer/services/customer.service.ts +79 -0
- package/modules/pattern/features/import/components/mapping-form/mapping-form.component.d.ts +21 -0
- package/modules/pattern/features/import/components/mapping-form/mapping-form.component.ts +41 -0
- package/modules/pattern/features/import/components/preview-view/preview-view.component.d.ts +10 -0
- package/modules/pattern/features/import/components/preview-view/preview-view.component.ts +44 -0
- package/modules/pattern/features/import/pages/flow/flow.component.d.ts +43 -0
- package/modules/pattern/features/import/pages/flow/flow.component.ts +269 -0
- package/modules/pattern/features/import/routes.d.ts +2 -0
- package/modules/pattern/features/import/routes.ts +19 -0
- package/modules/pattern/features/import/services/import.model.d.ts +38 -0
- package/modules/pattern/features/import/services/import.model.ts +82 -0
- package/modules/pattern/features/import/services/import.service.d.ts +15 -0
- package/modules/pattern/features/import/services/import.service.ts +18 -0
- package/modules/pattern/features/order/components/approval-steps/approval-steps.component.d.ts +9 -0
- package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +74 -0
- package/modules/pattern/features/order/components/bulk-result/bulk-result.component.d.ts +22 -0
- package/modules/pattern/features/order/components/bulk-result/bulk-result.component.ts +46 -0
- package/modules/pattern/features/order/components/general-information-form/general-information-form.component.d.ts +30 -0
- package/modules/pattern/features/order/components/general-information-form/general-information-form.component.ts +96 -0
- package/modules/pattern/features/order/components/lines-form/lines-form.component.d.ts +33 -0
- package/modules/pattern/features/order/components/lines-form/lines-form.component.ts +205 -0
- package/modules/pattern/features/order/components/lines-view/lines-view.component.d.ts +12 -0
- package/modules/pattern/features/order/components/lines-view/lines-view.component.ts +42 -0
- package/modules/pattern/features/order/components/summary-cards/summary-cards.component.d.ts +25 -0
- package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +128 -0
- package/modules/pattern/features/order/entity.resolver.d.ts +9 -0
- package/modules/pattern/features/order/entity.resolver.ts +37 -0
- package/modules/pattern/features/order/pages/create/create.component.d.ts +16 -0
- package/modules/pattern/features/order/pages/create/create.component.ts +99 -0
- package/modules/pattern/features/order/pages/detail/detail.component.d.ts +26 -0
- package/modules/pattern/features/order/pages/detail/detail.component.ts +222 -0
- package/modules/pattern/features/order/pages/list/list.component.d.ts +29 -0
- package/modules/pattern/features/order/pages/list/list.component.html +38 -0
- package/modules/pattern/features/order/pages/list/list.component.ts +291 -0
- package/modules/pattern/features/order/pages/update/update.component.d.ts +20 -0
- package/modules/pattern/features/order/pages/update/update.component.ts +119 -0
- package/modules/pattern/features/order/routes.d.ts +7 -0
- package/modules/pattern/features/order/routes.ts +54 -0
- package/modules/pattern/features/order/services/order.model.d.ts +106 -0
- package/modules/pattern/features/order/services/order.model.ts +109 -0
- package/modules/pattern/features/order/services/order.service.d.ts +25 -0
- package/modules/pattern/features/order/services/order.service.ts +63 -0
- package/modules/pattern/features/partner/pages/create/create.component.d.ts +41 -0
- package/modules/pattern/features/partner/pages/create/create.component.ts +324 -0
- package/modules/pattern/features/partner/routes.d.ts +2 -0
- package/modules/pattern/features/partner/routes.ts +20 -0
- package/modules/pattern/features/partner/services/partner.model.d.ts +30 -0
- package/modules/pattern/features/partner/services/partner.model.ts +30 -0
- package/modules/pattern/features/partner/services/partner.service.d.ts +13 -0
- package/modules/pattern/features/partner/services/partner.service.ts +17 -0
- package/modules/pattern/features/product/components/general-information-form/general-information-form.component.d.ts +23 -0
- package/modules/pattern/features/product/components/general-information-form/general-information-form.component.ts +88 -0
- package/modules/pattern/features/product/components/product-select/product-select.component.d.ts +20 -0
- package/modules/pattern/features/product/components/product-select/product-select.component.ts +65 -0
- package/modules/pattern/features/product/components/product-status-select/product-status-select.component.d.ts +22 -0
- package/modules/pattern/features/product/components/product-status-select/product-status-select.component.ts +30 -0
- package/modules/pattern/features/product/entity.resolver.d.ts +4 -0
- package/modules/pattern/features/product/entity.resolver.ts +21 -0
- package/modules/pattern/features/product/pages/create/create.component.d.ts +15 -0
- package/modules/pattern/features/product/pages/create/create.component.ts +85 -0
- package/modules/pattern/features/product/pages/detail/detail.component.d.ts +10 -0
- package/modules/pattern/features/product/pages/detail/detail.component.ts +53 -0
- package/modules/pattern/features/product/pages/list/list.component.d.ts +15 -0
- package/modules/pattern/features/product/pages/list/list.component.html +30 -0
- package/modules/pattern/features/product/pages/list/list.component.ts +71 -0
- package/modules/pattern/features/product/pages/update/update.component.d.ts +16 -0
- package/modules/pattern/features/product/pages/update/update.component.ts +86 -0
- package/modules/pattern/features/product/pipes/product-detail.pipe.d.ts +14 -0
- package/modules/pattern/features/product/pipes/product-detail.pipe.ts +18 -0
- package/modules/pattern/features/product/routes.d.ts +3 -0
- package/modules/pattern/features/product/routes.ts +48 -0
- package/modules/pattern/features/product/services/product.model.d.ts +34 -0
- package/modules/pattern/features/product/services/product.model.ts +38 -0
- package/modules/pattern/features/product/services/product.service.d.ts +17 -0
- package/modules/pattern/features/product/services/product.service.ts +48 -0
- package/modules/pattern/features/settings/pages/update/update.component.d.ts +26 -0
- package/modules/pattern/features/settings/pages/update/update.component.ts +227 -0
- package/modules/pattern/features/settings/routes.d.ts +3 -0
- package/modules/pattern/features/settings/routes.ts +24 -0
- package/modules/pattern/features/settings/services/settings.model.d.ts +17 -0
- package/modules/pattern/features/settings/services/settings.model.ts +18 -0
- package/modules/pattern/features/settings/services/settings.service.d.ts +10 -0
- package/modules/pattern/features/settings/services/settings.service.ts +15 -0
- package/modules/pattern/features/settings/settings.resolver.d.ts +4 -0
- package/modules/pattern/features/settings/settings.resolver.ts +8 -0
- package/modules/pattern/index.d.ts +3 -0
- package/modules/pattern/routes.d.ts +6 -0
- package/modules/pattern/services/base-api.service.d.ts +16 -0
- package/modules/pattern/utils/api-error.d.ts +4 -0
- package/modules/pattern/utils/focus-first-invalid.d.ts +5 -0
- package/modules/pattern/utils/form-api-errors.d.ts +16 -0
- package/modules/pattern/utils/resource-url.d.ts +2 -0
- package/package.json +49 -12
- package/pipes/src/format-date.pipe.d.ts +1 -0
- package/pipes/src/format-datetime.pipe.d.ts +1 -0
- package/services/date-time/index.d.ts +1 -0
- package/services/date-time/src/date-time.service.d.ts +54 -0
- package/services/index.d.ts +1 -0
- package/services/storage/src/storage.model.d.ts +8 -1
- package/services/unsaved-changes/src/unsaved-changes.adapters.d.ts +9 -0
- package/services/unsaved-changes/src/unsaved-changes.model.d.ts +2 -0
- package/utilities/read-state/src/read-state.d.ts +2 -0
- package/utilities/theme/src/theme-tokens.d.ts +1 -1
- package/components/editor/src/plugins/image-upload/image-upload.plugin.d.ts +0 -22
- package/components/editor/src/plugins/image-upload/utils/batch.utils.d.ts +0 -14
- package/components/editor/src/plugins/image-upload/utils/index.d.ts +0 -3
- package/forms/chip/src/pipes/index.d.ts +0 -1
- package/forms/chip/src/pipes/removable-chip.pipe.d.ts +0 -8
- package/forms/chip-calendar/src/pipes/index.d.ts +0 -1
- package/forms/chip-calendar/src/pipes/removable-chip.pipe.d.ts +0 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, inject, TemplateRef, Directive, booleanAttribute, Pipe, isSignal, output, signal, computed, effect, untracked, ChangeDetectionStrategy, Component, viewChild, ElementRef, afterRenderEffect, isDevMode, Input, contentChildren, DestroyRef, ChangeDetectorRef, afterNextRender, model, InjectionToken, Injectable, ViewChild, Renderer2, NgZone, Injector, contentChild } from '@angular/core';
|
|
3
3
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
4
|
-
import * as i3$
|
|
4
|
+
import * as i3$3 from '@angular/material/paginator';
|
|
5
5
|
import { MatPaginatorIntl, MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
6
6
|
import * as i5 from '@angular/material/sort';
|
|
7
7
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
@@ -15,15 +15,16 @@ import { AsyncPipe, NgTemplateOutlet, DOCUMENT, NgStyle, CommonModule, DatePipe,
|
|
|
15
15
|
import * as i1 from '@angular/material/tooltip';
|
|
16
16
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
17
17
|
import { SdViewportService } from '@sdcorejs/angular/services/viewport';
|
|
18
|
+
import { ɵSdSearchField as _SdSearchField, ɵSdSearchFieldInputDirective as _SdSearchFieldInputDirective } from '@sdcorejs/angular/forms/directives';
|
|
18
19
|
import { SdSelect } from '@sdcorejs/angular/forms/select';
|
|
19
20
|
import { SdTranslatePipe, I18nService } from '@sdcorejs/angular/i18n';
|
|
20
|
-
import { SdIcon } from '@sdcorejs/angular/modules/icon';
|
|
21
21
|
import { Utilities, FilterUtilities, StringUtilities, DateUtilities, NumberUtilities, BrowserUtilities, ArrayUtilities } from '@sdcorejs/utils/fns';
|
|
22
22
|
import * as i2 from '@angular/material/button';
|
|
23
23
|
import { MatButtonModule } from '@angular/material/button';
|
|
24
24
|
import { SdQuickAction } from '@sdcorejs/angular/components/quick-action';
|
|
25
25
|
import { SdButton, SdButtonItem, SdButtonItemDivider } from '@sdcorejs/angular/components/button';
|
|
26
26
|
import { SdModal } from '@sdcorejs/angular/components/modal';
|
|
27
|
+
import { SdIcon } from '@sdcorejs/angular/modules/icon';
|
|
27
28
|
import * as i1$1 from '@angular/cdk/drag-drop';
|
|
28
29
|
import { DragDropModule, moveItemInArray } from '@angular/cdk/drag-drop';
|
|
29
30
|
import * as i3 from '@angular/material/checkbox';
|
|
@@ -31,30 +32,33 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
|
31
32
|
import * as i4 from '@angular/material/radio';
|
|
32
33
|
import { MatRadioModule } from '@angular/material/radio';
|
|
33
34
|
import { SdSideDrawer } from '@sdcorejs/angular/components/side-drawer';
|
|
35
|
+
import { ɵSD_LOCAL_DATE_TIME as _SD_LOCAL_DATE_TIME, SdDateTimeService } from '@sdcorejs/angular/services/date-time';
|
|
36
|
+
import * as i2$1 from '@angular/material/form-field';
|
|
37
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
38
|
+
import * as i3$1 from '@angular/material/select';
|
|
39
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
34
40
|
import { CdkTableModule, CdkColumnDef } from '@angular/cdk/table';
|
|
35
|
-
import * as i2$
|
|
41
|
+
import * as i2$3 from '@angular/forms';
|
|
36
42
|
import { FormGroup, FormsModule } from '@angular/forms';
|
|
37
|
-
import * as i6 from '@angular/material/progress-spinner';
|
|
38
|
-
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
39
43
|
import { SdDataStateTemplateDirective, SdDataState } from '@sdcorejs/angular/components/data-state';
|
|
40
44
|
import { SdReadChannel, cloneReadRequest } from '@sdcorejs/angular/utilities/read-state';
|
|
41
45
|
import { SdTooltipDirective, SdScrollDirective, SdHoverCopyDirective } from '@sdcorejs/angular/directives';
|
|
42
46
|
import { SdSafeHtmlPipe, SdFormatDatePipe, SdFormatDatetimePipe, SdFormatNumberPipe } from '@sdcorejs/angular/pipes';
|
|
43
47
|
import { EMPTY_STR, OPERATORS } from '@sdcorejs/utils/constants';
|
|
44
48
|
import { SdBadge } from '@sdcorejs/angular/components/badge';
|
|
45
|
-
import { SdOperator } from '@sdcorejs/angular/components/operator';
|
|
49
|
+
import { ɵsdOperatorHasValue as _sdOperatorHasValue, SdOperator } from '@sdcorejs/angular/components/operator';
|
|
46
50
|
import { SdDate } from '@sdcorejs/angular/forms/date';
|
|
47
51
|
import { SdInput } from '@sdcorejs/angular/forms/input';
|
|
48
52
|
import { SdInputNumber } from '@sdcorejs/angular/forms/input-number';
|
|
49
53
|
import { SdDateRange } from '@sdcorejs/angular/forms/date-range';
|
|
50
54
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
51
|
-
import * as i2$
|
|
55
|
+
import * as i2$2 from '@angular/material/menu';
|
|
52
56
|
import { MatMenuModule } from '@angular/material/menu';
|
|
53
57
|
import { SdSection } from '@sdcorejs/angular/components/section';
|
|
54
58
|
import { SdCheckbox } from '@sdcorejs/angular/forms/checkbox';
|
|
55
59
|
import { SdDatetime } from '@sdcorejs/angular/forms/datetime';
|
|
56
60
|
import { SdConfirmService } from '@sdcorejs/angular/services/confirm';
|
|
57
|
-
import * as i3$
|
|
61
|
+
import * as i3$2 from '@angular/material/chips';
|
|
58
62
|
import { MatChipsModule } from '@angular/material/chips';
|
|
59
63
|
|
|
60
64
|
class SdTableCellDefDirective {
|
|
@@ -410,6 +414,11 @@ const collectFormattedTreeRows = (roots) => {
|
|
|
410
414
|
walk(roots);
|
|
411
415
|
return result;
|
|
412
416
|
};
|
|
417
|
+
/** Rows a tree table shows: the roots plus the formatted children of every expanded row, at every level. */
|
|
418
|
+
const countVisibleTreeRows = (roots) => roots.reduce((count, row) => {
|
|
419
|
+
const children = row.meta.tree?.isExpanded ? row.meta.tree.childItems : undefined;
|
|
420
|
+
return count + 1 + (children?.length ? countVisibleTreeRows(children) : 0);
|
|
421
|
+
}, 0);
|
|
413
422
|
/** Flatten ALL nodes regardless of expand state — used for export */
|
|
414
423
|
const flattenTreeAll = (roots, option, visited = new Set()) => {
|
|
415
424
|
if (!option)
|
|
@@ -667,11 +676,20 @@ class TableQuickSearchComponent {
|
|
|
667
676
|
item.onChange?.(value);
|
|
668
677
|
}
|
|
669
678
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TableQuickSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
670
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TableQuickSearchComponent, isStandalone: true, selector: "sd-table-quick-search", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, rightTemplate: { classPropertyName: "rightTemplate", publicName: "rightTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "@let _option = option();\n@let _value = value();\n@let _valid = valid();\n@let _autoId = autoId();\n@let _inputId = inputId();\n@let _term = term();\n@let _enterHint = 'core.component.table.quick-search.enter' | sdTranslate;\n<div class=\"sd-quick-search-row\">\n <div class=\"sd-quick-search-controls\" role=\"search\" [attr.aria-label]=\"'core.component.table.search' | sdTranslate\">\n @for (control of controls(); track control.item.field) {\n @let item = control.item;\n @let items = item.type === 'values' ? (item.option.items | filterValues | async) : item.option.items;\n <sd-select\n class=\"sd-quick-search-dropdown\"\n [autoId]=\"_autoId ? _autoId + '-quick-search-' + item.field : undefined\"\n [label]=\"item.title\"\n [items]=\"items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [model]=\"_value.filters[item.field]\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"!!item.required\"\n [disabled]=\"control.disabled\"\n (sdChange)=\"onFilterChange(item, $event)\"\n appearance=\"outline\"\n [size]=\"isMobile() ? 'md' : 'sm'\"\n hideInlineError />\n }\n <div class=\"sd-quick-search-keyword\">\n <
|
|
679
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: TableQuickSearchComponent, isStandalone: true, selector: "sd-table-quick-search", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, rightTemplate: { classPropertyName: "rightTemplate", publicName: "rightTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "@let _option = option();\n@let _value = value();\n@let _valid = valid();\n@let _autoId = autoId();\n@let _inputId = inputId();\n@let _term = term();\n@let _enterHint = 'core.component.table.quick-search.enter' | sdTranslate;\n<div class=\"sd-quick-search-row\">\n <div class=\"sd-quick-search-controls\" role=\"search\" [attr.aria-label]=\"'core.component.table.search' | sdTranslate\">\n @for (control of controls(); track control.item.field) {\n @let item = control.item;\n @let items = item.type === 'values' ? (item.option.items | filterValues | async) : item.option.items;\n <sd-select\n class=\"sd-quick-search-dropdown\"\n [autoId]=\"_autoId ? _autoId + '-quick-search-' + item.field : undefined\"\n [label]=\"item.title\"\n [items]=\"items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [model]=\"_value.filters[item.field]\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"!!item.required\"\n [disabled]=\"control.disabled\"\n (sdChange)=\"onFilterChange(item, $event)\"\n appearance=\"outline\"\n [size]=\"isMobile() ? 'md' : 'sm'\"\n hideInlineError />\n }\n <div class=\"sd-quick-search-keyword\">\n <sd-search-field\n class=\"sd-quick-search-field\"\n size=\"sm\"\n clearable\n [clearLabel]=\"'core.component.table.quick-search.clear' | sdTranslate\"\n [autoId]=\"_autoId ? _autoId + '-quick-search' : undefined\"\n (cleared)=\"clear(searchInput)\">\n <input\n #searchInput\n sdSearchFieldInput\n [id]=\"_inputId\"\n type=\"text\"\n enterkeyhint=\"search\"\n autocomplete=\"off\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-term' : null\"\n [attr.aria-label]=\"'core.component.table.search' | sdTranslate\"\n [attr.aria-describedby]=\"_inputId + (_valid ? '-hint' : '-required')\"\n [placeholder]=\"_option.placeholder || ('core.component.table.quick-search.placeholder' | sdTranslate)\"\n [disabled]=\"!_valid\"\n [value]=\"_term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\" />\n <span sdSearchFieldEnd class=\"sd-quick-search-enter\" [matTooltip]=\"_enterHint\" aria-hidden=\"true\">\u21B5</span>\n </sd-search-field>\n </div>\n </div>\n @if (rightTemplate(); as template) {\n <div class=\"sd-quick-search-right\"><ng-container [ngTemplateOutlet]=\"template\" /></div>\n }\n</div>\n<span [id]=\"_inputId + '-hint'\" hidden>{{ _enterHint }}</span>\n@if (!_valid) {\n <p class=\"sd-quick-search-hint\" [id]=\"_inputId + '-required'\">\n {{ 'core.component.table.quick-search.required' | sdTranslate }}\n </p>\n}\n", styles: [":host{display:block;flex:0 0 auto;container-type:inline-size;box-sizing:border-box;padding:12px 16px;background:var(--sd-table-bg, #ffffff);--sd-control-label-bg: var(--sd-table-bg, #ffffff)}.sd-quick-search-row{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px 20px}.sd-quick-search-controls{display:flex;flex:1 1 460px;flex-wrap:wrap;align-items:flex-end;gap:12px;min-width:0}.sd-quick-search-dropdown{display:block;flex:0 1 180px;min-width:140px;max-width:100%}.sd-quick-search-keyword{flex:0 1 360px;min-width:220px;max-width:100%}.sd-quick-search-field:not(.sd-disabled){background:var(--sd-table-bg, #ffffff)}.sd-quick-search-enter{font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);padding:0 4px;border:1px solid var(--sd-border, #e0e3e8);border-radius:var(--sd-radius-4, 4px)}.sd-quick-search-right{margin-left:auto;max-width:100%;min-width:0}.sd-quick-search-hint{margin:6px 0 0;font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #626872)}@container (max-width: 550px){.sd-quick-search-controls{flex-basis:100%}.sd-quick-search-dropdown,.sd-quick-search-keyword{flex:1 1 100%;min-width:0}.sd-quick-search-right{margin-left:0;flex-basis:100%}.sd-quick-search-field{min-height:var(--sd-control-height-coarse, 44px);font-size:var(--sd-font-size-16, 16px);--sd-search-field-clear-size: 40px}}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["operatorChange", "sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "component", type: _SdSearchField, selector: "sd-search-field", inputs: ["size", "clearable", "clearLabel", "autoId"], outputs: ["cleared"] }, { kind: "directive", type: _SdSearchFieldInputDirective, selector: "input[sdSearchFieldInput]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
671
680
|
}
|
|
672
681
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: TableQuickSearchComponent, decorators: [{
|
|
673
682
|
type: Component,
|
|
674
|
-
args: [{ selector: 'sd-table-quick-search', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
683
|
+
args: [{ selector: 'sd-table-quick-search', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
684
|
+
AsyncPipe,
|
|
685
|
+
NgTemplateOutlet,
|
|
686
|
+
MatTooltipModule,
|
|
687
|
+
SdSelect,
|
|
688
|
+
SdTranslatePipe,
|
|
689
|
+
FilterValuesPipe,
|
|
690
|
+
_SdSearchField,
|
|
691
|
+
_SdSearchFieldInputDirective,
|
|
692
|
+
], template: "@let _option = option();\n@let _value = value();\n@let _valid = valid();\n@let _autoId = autoId();\n@let _inputId = inputId();\n@let _term = term();\n@let _enterHint = 'core.component.table.quick-search.enter' | sdTranslate;\n<div class=\"sd-quick-search-row\">\n <div class=\"sd-quick-search-controls\" role=\"search\" [attr.aria-label]=\"'core.component.table.search' | sdTranslate\">\n @for (control of controls(); track control.item.field) {\n @let item = control.item;\n @let items = item.type === 'values' ? (item.option.items | filterValues | async) : item.option.items;\n <sd-select\n class=\"sd-quick-search-dropdown\"\n [autoId]=\"_autoId ? _autoId + '-quick-search-' + item.field : undefined\"\n [label]=\"item.title\"\n [items]=\"items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [model]=\"_value.filters[item.field]\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"!!item.required\"\n [disabled]=\"control.disabled\"\n (sdChange)=\"onFilterChange(item, $event)\"\n appearance=\"outline\"\n [size]=\"isMobile() ? 'md' : 'sm'\"\n hideInlineError />\n }\n <div class=\"sd-quick-search-keyword\">\n <sd-search-field\n class=\"sd-quick-search-field\"\n size=\"sm\"\n clearable\n [clearLabel]=\"'core.component.table.quick-search.clear' | sdTranslate\"\n [autoId]=\"_autoId ? _autoId + '-quick-search' : undefined\"\n (cleared)=\"clear(searchInput)\">\n <input\n #searchInput\n sdSearchFieldInput\n [id]=\"_inputId\"\n type=\"text\"\n enterkeyhint=\"search\"\n autocomplete=\"off\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-term' : null\"\n [attr.aria-label]=\"'core.component.table.search' | sdTranslate\"\n [attr.aria-describedby]=\"_inputId + (_valid ? '-hint' : '-required')\"\n [placeholder]=\"_option.placeholder || ('core.component.table.quick-search.placeholder' | sdTranslate)\"\n [disabled]=\"!_valid\"\n [value]=\"_term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\" />\n <span sdSearchFieldEnd class=\"sd-quick-search-enter\" [matTooltip]=\"_enterHint\" aria-hidden=\"true\">\u21B5</span>\n </sd-search-field>\n </div>\n </div>\n @if (rightTemplate(); as template) {\n <div class=\"sd-quick-search-right\"><ng-container [ngTemplateOutlet]=\"template\" /></div>\n }\n</div>\n<span [id]=\"_inputId + '-hint'\" hidden>{{ _enterHint }}</span>\n@if (!_valid) {\n <p class=\"sd-quick-search-hint\" [id]=\"_inputId + '-required'\">\n {{ 'core.component.table.quick-search.required' | sdTranslate }}\n </p>\n}\n", styles: [":host{display:block;flex:0 0 auto;container-type:inline-size;box-sizing:border-box;padding:12px 16px;background:var(--sd-table-bg, #ffffff);--sd-control-label-bg: var(--sd-table-bg, #ffffff)}.sd-quick-search-row{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px 20px}.sd-quick-search-controls{display:flex;flex:1 1 460px;flex-wrap:wrap;align-items:flex-end;gap:12px;min-width:0}.sd-quick-search-dropdown{display:block;flex:0 1 180px;min-width:140px;max-width:100%}.sd-quick-search-keyword{flex:0 1 360px;min-width:220px;max-width:100%}.sd-quick-search-field:not(.sd-disabled){background:var(--sd-table-bg, #ffffff)}.sd-quick-search-enter{font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);padding:0 4px;border:1px solid var(--sd-border, #e0e3e8);border-radius:var(--sd-radius-4, 4px)}.sd-quick-search-right{margin-left:auto;max-width:100%;min-width:0}.sd-quick-search-hint{margin:6px 0 0;font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #626872)}@container (max-width: 550px){.sd-quick-search-controls{flex-basis:100%}.sd-quick-search-dropdown,.sd-quick-search-keyword{flex:1 1 100%;min-width:0}.sd-quick-search-right{margin-left:0;flex-basis:100%}.sd-quick-search-field{min-height:var(--sd-control-height-coarse, 44px);font-size:var(--sd-font-size-16, 16px);--sd-search-field-clear-size: 40px}}\n"] }]
|
|
675
693
|
}], ctorParameters: () => [] });
|
|
676
694
|
|
|
677
695
|
class SdTableMobileActionsComponent {
|
|
@@ -778,7 +796,7 @@ class SdTableMobileActionsComponent {
|
|
|
778
796
|
owner.focus();
|
|
779
797
|
}
|
|
780
798
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTableMobileActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
781
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTableMobileActionsComponent, isStandalone: true, selector: "sd-table-mobile-actions", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, autoOpen: { classPropertyName: "autoOpen", publicName: "autoOpen", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { end: "end" }, viewQueries: [{ propertyName: "sheet", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _busy = busy();\n@let _error = error();\n@let _autoId = autoId();\n@let _title = title();\n@let _selection = selection();\n@if (_selection) {\n <div class=\"sd-mobile-actions\" role=\"region\" [attr.aria-label]=\"_title\">\n <sd-quick-action opened contained class=\"sd-mobile-quick-action\">\n <span sdMessage class=\"sd-mobile-selection-summary\" [attr.aria-label]=\"_title\">\n <span class=\"sd-mobile-selection-count T14M\">{{ count() }}</span>\n </span>\n <div sdAction class=\"sd-mobile-action-buttons\">\n <div class=\"sd-mobile-action-list\">\n @for (action of direct(); track action.key) {\n <span class=\"sd-mobile-action-direct\">\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-action-' + action.key : null\"\n [title]=\"action.title\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n size=\"sm\"\n [type]=\"action.type || 'text'\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"run(action)\"></sd-button>\n </span>\n }\n @if (overflow().length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-more\"\n [disabled]=\"_busy\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-more' : null\"\n (click)=\"openMore()\">\n <sd-icon name=\"more_horiz\"></sd-icon><span>{{ 'core.component.table.mobile.more' | sdTranslate }}</span>\n </button>\n }\n </div>\n <button\n type=\"button\"\n class=\"sd-mobile-end sd-mobile-clear\"\n [attr.aria-label]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"end.emit()\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-end' : null\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n </div>\n </sd-quick-action>\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n}\n<sd-modal\n #sheet\n [autoId]=\"_autoId ? _autoId + '-mobile-sheet' : undefined\"\n [title]=\"_title\"\n view=\"bottom-sheet\"\n [disableBackdropClose]=\"false\"\n modalClass=\"sd-table-mobile-sheet-panel\"\n (sdClosed)=\"onSheetClosed()\">\n <div class=\"sd-mobile-sheet\">\n @for (action of sheetActions(); track action.key) {\n @if (action.children; as children) {\n <section [attr.aria-label]=\"action.title\" class=\"sd-mobile-action-group\">\n <h3 class=\"T12M\">{{ action.title }}</h3>\n @for (child of children; track child.key) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + child.key : null\"\n [disabled]=\"_busy || action.disabled || child.disabled\"\n (click)=\"runSheet(child)\">\n <sd-icon [name]=\"child.icon || 'chevron_right'\" [fontSet]=\"child.fontSet\" [color]=\"child.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ child.title }}\n @if (child.htmlTemplate) {\n <span [innerHTML]=\"child.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n </section>\n } @else {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + action.key : null\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"runSheet(action)\">\n <sd-icon [name]=\"action.icon || 'chevron_right'\" [fontSet]=\"action.fontSet\" [color]=\"action.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ action.title }}\n @if (action.htmlTemplate) {\n <span [innerHTML]=\"action.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n }\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n</sd-modal>\n", styles: [":host{display:block;min-width:0}.sd-mobile-actions{min-width:0;padding:4px 0 max(4px,env(safe-area-inset-bottom))}.sd-mobile-selection-summary{display:flex;align-items:center}.sd-mobile-selection-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 6px;border-radius:var(--sd-radius-8, 8px);background:var(--sd-success-dark, #2e7d32);color:var(--sd-success-contrast, #fff);font-variant-numeric:tabular-nums}.sd-mobile-action-buttons{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;width:100%;min-width:0;gap:8px}.sd-mobile-action-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,72px),1fr));grid-auto-rows:minmax(40px,1fr);gap:4px 8px;min-width:0}.sd-mobile-action-direct{min-width:0}.sd-mobile-action-direct sd-button{width:100%;height:100%}.sd-mobile-more{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 6px;min-width:0;height:100%}.sd-mobile-end{display:grid;place-items:center;padding:0;width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:var(--sd-text);line-height:0;cursor:pointer}.sd-mobile-end:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}button{min-height:40px;white-space:normal}button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host ::ng-deep .sd-mobile-quick-action .c-quick-action.contained{flex-wrap:nowrap;gap:8px;padding:4px 16px;border-radius:var(--sd-radius-12, 12px)}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-message{flex:0 0 auto}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-action{flex:1 1 auto}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-more .mdc-button__label{display:inline-flex;align-items:center;gap:4px}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct button{width:100%;height:100%;min-height:40px;padding:4px 6px!important;white-space:normal}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct .c-title{white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-mobile-quick-action .mat-mdc-button-touch-target{height:40px}:host ::ng-deep .sd-mobile-quick-action sd-icon,:host ::ng-deep .sd-mobile-quick-action sd-icon mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px);line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct sd-icon mat-icon{width:16px;height:16px;font-size:var(--sd-font-size-16, 16px);line-height:var(--sd-line-height-16, 16px)}.sd-mobile-sheet{padding:0 12px max(12px,env(safe-area-inset-bottom));overflow-wrap:anywhere}.sd-mobile-action-group{padding:8px 0;border-top:1px solid var(--sd-border)}.sd-mobile-action-group:first-child{border-top:0;padding-top:0}.sd-mobile-action-group h3{margin:8px 12px 4px;color:var(--sd-text-secondary)}.sd-mobile-sheet-action{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:48px;padding:12px;text-align:start;border-radius:var(--sd-radius-10, 10px)}.sd-mobile-sheet-label{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4}.sd-mobile-sheet-action sd-icon{flex:0 0 20px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .sd-table-mobile-sheet-panel .sd-mobile-sheet-action .mdc-button__label{display:flex;align-items:center;gap:12px;width:100%}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-title{overflow-wrap:anywhere;font-size:var(--sd-font-size-16, 16px);line-height:1.4}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-header{min-height:64px;padding:12px 20px}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-close-btn{width:40px;height:40px}\n"], dependencies: [{ kind: "component", type: SdQuickAction, selector: "sd-quick-action", inputs: ["opened", "contained"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
799
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTableMobileActionsComponent, isStandalone: true, selector: "sd-table-mobile-actions", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, autoOpen: { classPropertyName: "autoOpen", publicName: "autoOpen", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { end: "end" }, viewQueries: [{ propertyName: "sheet", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _busy = busy();\n@let _error = error();\n@let _autoId = autoId();\n@let _title = title();\n@let _selection = selection();\n@if (_selection) {\n <div class=\"sd-mobile-actions\" role=\"region\" [attr.aria-label]=\"_title\">\n <sd-quick-action opened contained class=\"sd-mobile-quick-action\">\n <span sdMessage class=\"sd-mobile-selection-summary\" [attr.aria-label]=\"_title\">\n <span class=\"sd-mobile-selection-count T14M\">{{ count() }}</span>\n </span>\n <div sdAction class=\"sd-mobile-action-buttons\">\n <div class=\"sd-mobile-action-list\">\n @for (action of direct(); track action.key) {\n <span class=\"sd-mobile-action-direct\">\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-action-' + action.key : null\"\n [title]=\"action.title\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n size=\"sm\"\n [type]=\"action.type || 'text'\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"run(action)\"></sd-button>\n </span>\n }\n @if (overflow().length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-more\"\n [disabled]=\"_busy\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-more' : null\"\n (click)=\"openMore()\">\n <sd-icon name=\"more_horiz\"></sd-icon><span>{{ 'core.component.table.mobile.more' | sdTranslate }}</span>\n </button>\n }\n </div>\n <button\n type=\"button\"\n class=\"sd-mobile-end sd-mobile-clear\"\n [attr.aria-label]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"end.emit()\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-end' : null\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n </div>\n </sd-quick-action>\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n}\n<sd-modal\n #sheet\n [autoId]=\"_autoId ? _autoId + '-mobile-sheet' : undefined\"\n [title]=\"_title\"\n view=\"bottom-sheet\"\n [disableBackdropClose]=\"false\"\n modalClass=\"sd-table-mobile-sheet-panel\"\n (sdClosed)=\"onSheetClosed()\">\n <div class=\"sd-mobile-sheet\">\n @for (action of sheetActions(); track action.key) {\n @if (action.children; as children) {\n <section [attr.aria-label]=\"action.title\" class=\"sd-mobile-action-group\">\n <h3 class=\"T12M\">{{ action.title }}</h3>\n @for (child of children; track child.key) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + child.key : null\"\n [disabled]=\"_busy || action.disabled || child.disabled\"\n (click)=\"runSheet(child)\">\n <sd-icon [name]=\"child.icon || 'chevron_right'\" [fontSet]=\"child.fontSet\" [color]=\"child.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ child.title }}\n @if (child.htmlTemplate) {\n <span [innerHTML]=\"child.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n </section>\n } @else {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-sheet-action\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-' + action.key : null\"\n [disabled]=\"_busy || action.disabled\"\n (click)=\"runSheet(action)\">\n <sd-icon [name]=\"action.icon || 'chevron_right'\" [fontSet]=\"action.fontSet\" [color]=\"action.color\"></sd-icon>\n <span class=\"sd-mobile-sheet-label\"\n >{{ action.title }}\n @if (action.htmlTemplate) {\n <span [innerHTML]=\"action.htmlTemplate\"></span>\n }\n </span>\n </button>\n }\n }\n @if (_error; as message) {\n <p role=\"alert\">{{ message }}</p>\n }\n </div>\n</sd-modal>\n", styles: [":host{display:block;min-width:0}.sd-mobile-actions{min-width:0;padding:4px 0 max(4px,env(safe-area-inset-bottom))}.sd-mobile-selection-summary{display:flex;align-items:center}.sd-mobile-selection-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 6px;border-radius:var(--sd-radius-8, 8px);background:var(--sd-success-dark, #2e7d32);color:var(--sd-success-contrast, #fff);font-variant-numeric:tabular-nums}.sd-mobile-action-buttons{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;width:100%;min-width:0;gap:8px}.sd-mobile-action-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,72px),1fr));grid-auto-rows:minmax(40px,1fr);gap:4px 8px;min-width:0}.sd-mobile-action-direct{min-width:0}.sd-mobile-action-direct sd-button{width:100%;height:100%}.sd-mobile-more{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:0 6px;min-width:0;height:100%}.sd-mobile-end{display:grid;place-items:center;padding:0;width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:var(--sd-text);line-height:0;cursor:pointer}.sd-mobile-end:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}button{min-height:40px;white-space:normal}button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host ::ng-deep .sd-mobile-quick-action .c-quick-action.contained{flex-wrap:nowrap;gap:8px;padding:4px 16px;border-radius:var(--sd-radius-12, 12px)}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-message{flex:0 0 auto}:host ::ng-deep .sd-mobile-quick-action .c-quick-action-action{flex:1 1 auto}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-more .mdc-button__label{display:inline-flex;align-items:center;gap:4px}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct button{width:100%;height:100%;min-height:40px;padding:4px 6px!important;white-space:normal}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct .c-title{white-space:normal;overflow:visible;overflow-wrap:anywhere;text-overflow:clip;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-mobile-quick-action .mat-mdc-button-touch-target{height:40px}:host ::ng-deep .sd-mobile-quick-action sd-icon,:host ::ng-deep .sd-mobile-quick-action sd-icon mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px);line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-mobile-quick-action .sd-mobile-action-direct sd-icon mat-icon{width:16px;height:16px;font-size:var(--sd-font-size-16, 16px);line-height:var(--sd-line-height-16, 16px)}.sd-mobile-sheet{padding:0 12px max(12px,env(safe-area-inset-bottom));overflow-wrap:anywhere}.sd-mobile-action-group{padding:8px 0;border-top:1px solid var(--sd-border)}.sd-mobile-action-group:first-child{border-top:0;padding-top:0}.sd-mobile-action-group h3{margin:8px 12px 4px;color:var(--sd-text-secondary)}.sd-mobile-sheet-action{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:48px;padding:12px;text-align:start;border-radius:var(--sd-radius-10, 10px)}.sd-mobile-sheet-label{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4}.sd-mobile-sheet-action sd-icon{flex:0 0 20px;display:inline-flex;align-items:center;justify-content:center}::ng-deep .sd-table-mobile-sheet-panel .sd-mobile-sheet-action .mdc-button__label{display:flex;align-items:center;gap:12px;width:100%}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-title{overflow-wrap:anywhere;font-size:var(--sd-font-size-16, 16px);line-height:1.4}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-header{min-height:64px;padding:12px 20px}::ng-deep .sd-table-mobile-sheet-panel .sd-modal-close-btn{width:40px;height:40px}\n"], dependencies: [{ kind: "component", type: SdQuickAction, selector: "sd-quick-action", inputs: ["opened", "contained"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
782
800
|
}
|
|
783
801
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTableMobileActionsComponent, decorators: [{
|
|
784
802
|
type: Component,
|
|
@@ -990,6 +1008,174 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
990
1008
|
args: [{ name: 'command', standalone: true }]
|
|
991
1009
|
}] });
|
|
992
1010
|
|
|
1011
|
+
const TABLE_SKELETON_ROWS = 5;
|
|
1012
|
+
const TABLE_SKELETON_MAX_ROWS = 20;
|
|
1013
|
+
const firstFlag = (...values) => values.find((value) => typeof value === 'boolean');
|
|
1014
|
+
const firstNonNegative = (...values) => values.find((value) => typeof value === 'number' && Number.isFinite(value) && value >= 0);
|
|
1015
|
+
/** Field by field: `option.loading`, then `SD_TABLE_CONFIGURATION.loading`, then the defaults. Invalid values count as not set. */
|
|
1016
|
+
function resolveTableLoading(option, configuration) {
|
|
1017
|
+
const rows = firstNonNegative(option?.skeletonRows, configuration?.skeletonRows);
|
|
1018
|
+
return {
|
|
1019
|
+
skeleton: firstFlag(option?.skeleton, configuration?.skeleton) ?? true,
|
|
1020
|
+
skeletonRows: rows === undefined ? undefined : Math.min(TABLE_SKELETON_MAX_ROWS, Math.max(1, Math.floor(rows))),
|
|
1021
|
+
showDelay: firstNonNegative(option?.showDelay, configuration?.showDelay) ?? 300,
|
|
1022
|
+
minDuration: firstNonNegative(option?.minDuration, configuration?.minDuration) ?? 400,
|
|
1023
|
+
dim: firstFlag(option?.dim, configuration?.dim) ?? true,
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1026
|
+
const TEXT_WIDTHS = [72, 54, 84, 62, 46];
|
|
1027
|
+
const NUMBER_WIDTHS = [64, 48, 80, 56, 72];
|
|
1028
|
+
const FIXED_WIDTHS = { date: '76px', datetime: '116px', time: '44px', boolean: '40px' };
|
|
1029
|
+
const TEXT_TYPES = new Set(['string', 'values', 'lazy-values']);
|
|
1030
|
+
const EMPTY_COLUMNS = new Set(['sdCommand', 'sdReorder', 'sdSubInformationAction', 'sdFiller']);
|
|
1031
|
+
function skeletonCell(column, row, dataColumn) {
|
|
1032
|
+
const { field, type } = column;
|
|
1033
|
+
if (field === 'sdSelection')
|
|
1034
|
+
return { field, shape: 'box', align: 'center' };
|
|
1035
|
+
if (field === 'sdIndex')
|
|
1036
|
+
return { field, shape: 'bar', align: 'center', width: '16px' };
|
|
1037
|
+
if (!type || EMPTY_COLUMNS.has(field))
|
|
1038
|
+
return { field, shape: 'none', align: 'start' };
|
|
1039
|
+
if (type === 'children')
|
|
1040
|
+
return { field, shape: 'none', align: 'start', hidden: true };
|
|
1041
|
+
const align = column.align === 'right' ? 'end' : 'start';
|
|
1042
|
+
const step = (row + dataColumn) % 5;
|
|
1043
|
+
if (column.badge)
|
|
1044
|
+
return { field, shape: 'pill', align, width: '64px' };
|
|
1045
|
+
if (type === 'number' && !column.template)
|
|
1046
|
+
return { field, shape: 'bar', align, width: `${NUMBER_WIDTHS[step]}%`, maxWidth: '120px' };
|
|
1047
|
+
if (FIXED_WIDTHS[type] && !column.template)
|
|
1048
|
+
return { field, shape: 'bar', align, width: FIXED_WIDTHS[type], maxWidth: '100%' };
|
|
1049
|
+
if (TEXT_TYPES.has(type) || column.template)
|
|
1050
|
+
return { field, shape: 'bar', align, width: `${TEXT_WIDTHS[step]}%`, maxWidth: '240px' };
|
|
1051
|
+
return { field, shape: 'none', align };
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* `rows` skeleton rows over the displayed columns. Bar widths follow the column type, the row `i` and the data
|
|
1055
|
+
* column `j` (the table's own columns do not count), so the rows look like text without repeating.
|
|
1056
|
+
*/
|
|
1057
|
+
function buildTableSkeleton(columns, rows) {
|
|
1058
|
+
return Array.from({ length: rows }, (_, row) => {
|
|
1059
|
+
let dataColumn = 0;
|
|
1060
|
+
return columns.map(column => skeletonCell(column, row, column.type && column.type !== 'children' ? dataColumn++ : dataColumn));
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
/** 5 rows × 4 text columns, without a header: what the table shows before its configuration is ready. */
|
|
1064
|
+
const TABLE_GENERIC_SKELETON = buildTableSkeleton(['a', 'b', 'c', 'd'].map(field => ({ field, type: 'string' })), TABLE_SKELETON_ROWS);
|
|
1065
|
+
/**
|
|
1066
|
+
* Rows that fill the visible body of a table with a fixed height, at most `pageSize` and 20; `undefined` when
|
|
1067
|
+
* the height is not fixed or not measurable yet.
|
|
1068
|
+
*/
|
|
1069
|
+
function skeletonFillRows(body, rowHeight, pageSize) {
|
|
1070
|
+
if (!(body > 0) || !(rowHeight > 0))
|
|
1071
|
+
return undefined;
|
|
1072
|
+
const rows = Math.max(1, Math.floor(body / rowHeight));
|
|
1073
|
+
return Math.min(rows, TABLE_SKELETON_MAX_ROWS, pageSize && pageSize > 0 ? pageSize : TABLE_SKELETON_MAX_ROWS);
|
|
1074
|
+
}
|
|
1075
|
+
/** A resolved `max-height` in pixels; `undefined` for `none`, percentages and anything else not measurable. */
|
|
1076
|
+
function pixelLength(value) {
|
|
1077
|
+
return value && /^-?\d+(\.\d+)?px$/.test(value.trim()) ? parseFloat(value) : undefined;
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* - `skeleton`: the table has no rows and something is on its way — a read is loading, the first read of the
|
|
1081
|
+
* option is scheduled, the configuration is not ready yet, or a read replaces one that showed the skeleton
|
|
1082
|
+
* (`pending`).
|
|
1083
|
+
* - `refresh`: the progress bar is on and there is something under it: a read, a read waiting to replace it
|
|
1084
|
+
* (`scheduled`), or the rows it keeps.
|
|
1085
|
+
*/
|
|
1086
|
+
function tableLoadingView(state) {
|
|
1087
|
+
if (state.skeleton && !state.rows && (state.loading || state.pending))
|
|
1088
|
+
return 'skeleton';
|
|
1089
|
+
return state.refresh && (state.loading || state.scheduled || state.rows) ? 'refresh' : 'none';
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Turns the progress bar of a table on and off. It comes on once the table has been busy for `showDelay` and
|
|
1093
|
+
* stays for at least `minDuration`. Busy means a read is loading, or a read that replaces it is waiting in the
|
|
1094
|
+
* schedule while the bar already shows: the debounce between two reads must not switch the bar off, but it
|
|
1095
|
+
* never switches the bar on either.
|
|
1096
|
+
*/
|
|
1097
|
+
class TableRefreshTimer {
|
|
1098
|
+
schedule;
|
|
1099
|
+
now;
|
|
1100
|
+
#shown = signal(false);
|
|
1101
|
+
/** Progress bar (and dimmed rows) on. */
|
|
1102
|
+
shown = this.#shown.asReadonly();
|
|
1103
|
+
#busy = false;
|
|
1104
|
+
#shownAt = 0;
|
|
1105
|
+
#cancel;
|
|
1106
|
+
#destroyed = false;
|
|
1107
|
+
constructor(schedule, now = () => Date.now()) {
|
|
1108
|
+
this.schedule = schedule;
|
|
1109
|
+
this.now = now;
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* @param state.loading `loading()` of the table.
|
|
1113
|
+
* @param state.scheduled a read waits in the schedule (debounce).
|
|
1114
|
+
* @param state.skeleton the table draws skeleton rows for this read, so no bar is scheduled.
|
|
1115
|
+
* @param state.rows the table has rows; `minDuration` is only kept over a result with rows.
|
|
1116
|
+
*/
|
|
1117
|
+
update(state, settings) {
|
|
1118
|
+
if (this.#destroyed)
|
|
1119
|
+
return;
|
|
1120
|
+
// why: rows that went away while nothing loads (an option change resets the table) leave nothing for a held
|
|
1121
|
+
// bar to cover; it must not come back over the next rows.
|
|
1122
|
+
if (!state.loading && !state.scheduled && !state.rows && this.#shown()) {
|
|
1123
|
+
this.#clear();
|
|
1124
|
+
this.#shown.set(false);
|
|
1125
|
+
}
|
|
1126
|
+
const busy = state.loading || (this.#shown() && state.scheduled);
|
|
1127
|
+
if (busy === this.#busy)
|
|
1128
|
+
return;
|
|
1129
|
+
this.#busy = busy;
|
|
1130
|
+
this.#clear();
|
|
1131
|
+
if (busy) {
|
|
1132
|
+
// why: a skeleton read has no rows to keep; a bar still held over rows that are gone (an option change
|
|
1133
|
+
// during the hold) must not come back over the new rows.
|
|
1134
|
+
if (state.skeleton) {
|
|
1135
|
+
this.#shown.set(false);
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
// A new read while the bar shows (or is being held) keeps it and its start time.
|
|
1139
|
+
if (this.#shown())
|
|
1140
|
+
return;
|
|
1141
|
+
this.#after(settings.showDelay, () => {
|
|
1142
|
+
this.#shownAt = this.now();
|
|
1143
|
+
this.#shown.set(true);
|
|
1144
|
+
});
|
|
1145
|
+
return;
|
|
1146
|
+
}
|
|
1147
|
+
if (!this.#shown())
|
|
1148
|
+
return;
|
|
1149
|
+
const remaining = this.#shownAt + settings.minDuration - this.now();
|
|
1150
|
+
// why: an empty or failed result removes the rows; its empty/error region must show at once.
|
|
1151
|
+
if (remaining > 0 && state.rows)
|
|
1152
|
+
this.#after(remaining, () => this.#shown.set(false));
|
|
1153
|
+
else
|
|
1154
|
+
this.#shown.set(false);
|
|
1155
|
+
}
|
|
1156
|
+
destroy() {
|
|
1157
|
+
this.#destroyed = true;
|
|
1158
|
+
this.#clear();
|
|
1159
|
+
}
|
|
1160
|
+
#after(ms, callback) {
|
|
1161
|
+
if (ms <= 0) {
|
|
1162
|
+
callback();
|
|
1163
|
+
return;
|
|
1164
|
+
}
|
|
1165
|
+
this.#cancel = this.schedule(() => {
|
|
1166
|
+
this.#cancel = undefined;
|
|
1167
|
+
if (!this.#destroyed)
|
|
1168
|
+
callback();
|
|
1169
|
+
}, ms);
|
|
1170
|
+
}
|
|
1171
|
+
#clear() {
|
|
1172
|
+
this.#cancel?.();
|
|
1173
|
+
this.#cancel = undefined;
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/** A phone screen shows about three cards; more skeleton cards would only be scrolled past. */
|
|
1178
|
+
const MOBILE_SKELETON_CARDS = 3;
|
|
993
1179
|
const INTERACTIVE = 'a[href],button,input,select,textarea,summary,label,[contenteditable]:not([contenteditable="false"]),[role="button"],[role="link"],[role="checkbox"],[role="radio"],[role="switch"],[role="textbox"],[tabindex]:not([tabindex="-1"]),sd-button,sd-table,[cdkDragHandle]';
|
|
994
1180
|
class SdTableMobileCardsComponent {
|
|
995
1181
|
table = input.required();
|
|
@@ -1013,6 +1199,16 @@ class SdTableMobileCardsComponent {
|
|
|
1013
1199
|
#focusOrigin;
|
|
1014
1200
|
#pointer;
|
|
1015
1201
|
#dragged = false;
|
|
1202
|
+
/** Skeleton cards while the table has no rows yet: `loading.skeletonRows`, at most 3. */
|
|
1203
|
+
skeletonCards = computed(() => {
|
|
1204
|
+
const table = this.table();
|
|
1205
|
+
if (table.loadingView() !== 'skeleton')
|
|
1206
|
+
return [];
|
|
1207
|
+
const count = Math.min(table.loadingSettings().skeletonRows ?? TABLE_SKELETON_ROWS, MOBILE_SKELETON_CARDS);
|
|
1208
|
+
return Array.from({ length: count }, (_, index) => index);
|
|
1209
|
+
});
|
|
1210
|
+
/** The cards on screen are being replaced: dim them and ignore taps (scrolling and the keyboard still work). */
|
|
1211
|
+
dimmed = computed(() => this.table().loadingView() === 'refresh' && this.table().loadingSettings().dim);
|
|
1016
1212
|
cards = computed(() => {
|
|
1017
1213
|
const table = this.table();
|
|
1018
1214
|
table.selectedTableItems();
|
|
@@ -1245,7 +1441,7 @@ class SdTableMobileCardsComponent {
|
|
|
1245
1441
|
this.#commandRevision++;
|
|
1246
1442
|
}
|
|
1247
1443
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTableMobileCardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1248
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTableMobileCardsComponent, isStandalone: true, selector: "sd-table-mobile-cards", inputs: { table: { classPropertyName: "table", publicName: "table", isSignal: true, isRequired: true, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, dataRows: { classPropertyName: "dataRows", publicName: "dataRows", isSignal: true, isRequired: false, transformFunction: null }, aggregateTemplate: { classPropertyName: "aggregateTemplate", publicName: "aggregateTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupTemplate: { classPropertyName: "groupTemplate", publicName: "groupTemplate", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n <sd-icon\n [name]=\"_meta.tree?.isExpanding ? 'hourglass_empty' : _meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n <sd-icon\n [name]=\"\n _meta.expand?.isExpanding ? 'hourglass_empty' : _meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\n \"></sd-icon>\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px}.sd-mobile-card{position:relative;border:1px solid var(--sd-border);border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1444
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTableMobileCardsComponent, isStandalone: true, selector: "sd-table-mobile-cards", inputs: { table: { classPropertyName: "table", publicName: "table", isSignal: true, isRequired: true, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, dataRows: { classPropertyName: "dataRows", publicName: "dataRows", isSignal: true, isRequired: false, transformFunction: null }, aggregateTemplate: { classPropertyName: "aggregateTemplate", publicName: "aggregateTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupTemplate: { classPropertyName: "groupTemplate", publicName: "groupTemplate", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n@let _skeletonCards = skeletonCards();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n [class.sd-mobile-list--dim]=\"dimmed()\"\n [attr.role]=\"_skeletonCards.length ? null : 'list'\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n <!-- why: khung x\u01B0\u01A1ng ch\u1EC9 c\u00F3 khi ch\u01B0a c\u00F3 th\u1EBB n\u00E0o, n\u1EB1m trong c\u00F9ng danh s\u00E1ch \u0111\u1EC3 gi\u1EEF gap/\u0111\u1EC7m; trang tr\u00ED n\u00EAn aria-hidden\n (v\u00F9ng .sd-table-live c\u1EE7a b\u1EA3ng b\u00E1o \"\u0111ang t\u1EA3i\"). -->\n @for (index of _skeletonCards; track index) {\n <div class=\"sd-mobile-skeleton-card\" aria-hidden=\"true\">\n <div class=\"sd-mobile-skeleton-body\">\n <span class=\"sd-mobile-skeleton-bar\"></span>\n <span class=\"sd-mobile-skeleton-bar\"></span>\n <span class=\"sd-mobile-skeleton-bar\"></span>\n </div>\n </div>\n }\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-busy]=\"_meta.tree?.isExpanding ? 'true' : null\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n @if (_meta.tree?.isExpanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n }\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-busy]=\"_meta.expand?.isExpanding ? 'true' : null\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n @if (_meta.expand?.isExpanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"></sd-icon>\n }\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px;transition:opacity var(--sd-duration-fast, .12s)}@media(prefers-reduced-motion:reduce){.sd-mobile-list{transition:none}}.sd-mobile-list--dim{opacity:var(--sd-table-loading-dim, .55)}.sd-mobile-list--dim,.sd-mobile-list--dim *{pointer-events:none!important}.sd-mobile-card,.sd-mobile-skeleton-card{position:relative;border:1px solid var(--sd-border);border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}@keyframes sd-table-spin{to{transform:rotate(360deg)}}.sd-table-spinner{display:inline-block;flex:0 0 auto;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;border:2px solid var(--sd-table-progress-track);border-top-color:var(--sd-table-spinner);border-radius:50%;animation:sd-table-spin .8s linear infinite}@media(prefers-reduced-motion:reduce){.sd-table-spinner{animation:none}}@media(forced-colors:active){.sd-table-spinner{forced-color-adjust:none;border-color:GrayText;border-top-color:Highlight}}@keyframes sd-table-skeleton-sweep{to{background-position:480px 0}}.sd-mobile-skeleton-body{display:flex;flex-direction:column;gap:8px;padding:4px 0}.sd-mobile-skeleton-bar{display:block;height:12px;border-radius:var(--sd-radius-4, 4px);background:linear-gradient(90deg,var(--sd-table-skeleton-bg) 0,var(--sd-table-skeleton-highlight) 40%,var(--sd-table-skeleton-bg) 80%) 0 0/480px 100%;animation:sd-table-skeleton-sweep 1.4s linear infinite}@media(prefers-reduced-motion:reduce){.sd-mobile-skeleton-bar{animation:none}}@media(forced-colors:active){.sd-mobile-skeleton-bar{forced-color-adjust:none;background:GrayText}}.sd-mobile-skeleton-bar:nth-child(1){width:60%;height:14px}.sd-mobile-skeleton-bar:nth-child(2){width:85%}.sd-mobile-skeleton-bar:nth-child(3){width:40%}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1249
1445
|
}
|
|
1250
1446
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTableMobileCardsComponent, decorators: [{
|
|
1251
1447
|
type: Component,
|
|
@@ -1259,15 +1455,141 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
1259
1455
|
SdIcon,
|
|
1260
1456
|
SdTranslatePipe,
|
|
1261
1457
|
SdTableMobileActionsComponent,
|
|
1262
|
-
], template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n <sd-icon\n [name]=\"_meta.tree?.isExpanding ? 'hourglass_empty' : _meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n <sd-icon\n [name]=\"\n _meta.expand?.isExpanding ? 'hourglass_empty' : _meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\n \"></sd-icon>\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px}.sd-mobile-card{position:relative;border:1px solid var(--sd-border);border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"] }]
|
|
1458
|
+
], template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n@let _skeletonCards = skeletonCards();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n [class.sd-mobile-list--dim]=\"dimmed()\"\n [attr.role]=\"_skeletonCards.length ? null : 'list'\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n <!-- why: khung x\u01B0\u01A1ng ch\u1EC9 c\u00F3 khi ch\u01B0a c\u00F3 th\u1EBB n\u00E0o, n\u1EB1m trong c\u00F9ng danh s\u00E1ch \u0111\u1EC3 gi\u1EEF gap/\u0111\u1EC7m; trang tr\u00ED n\u00EAn aria-hidden\n (v\u00F9ng .sd-table-live c\u1EE7a b\u1EA3ng b\u00E1o \"\u0111ang t\u1EA3i\"). -->\n @for (index of _skeletonCards; track index) {\n <div class=\"sd-mobile-skeleton-card\" aria-hidden=\"true\">\n <div class=\"sd-mobile-skeleton-body\">\n <span class=\"sd-mobile-skeleton-bar\"></span>\n <span class=\"sd-mobile-skeleton-bar\"></span>\n <span class=\"sd-mobile-skeleton-bar\"></span>\n </div>\n </div>\n }\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-busy]=\"_meta.tree?.isExpanding ? 'true' : null\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n @if (_meta.tree?.isExpanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n }\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-busy]=\"_meta.expand?.isExpanding ? 'true' : null\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n @if (_meta.expand?.isExpanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"></sd-icon>\n }\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px;transition:opacity var(--sd-duration-fast, .12s)}@media(prefers-reduced-motion:reduce){.sd-mobile-list{transition:none}}.sd-mobile-list--dim{opacity:var(--sd-table-loading-dim, .55)}.sd-mobile-list--dim,.sd-mobile-list--dim *{pointer-events:none!important}.sd-mobile-card,.sd-mobile-skeleton-card{position:relative;border:1px solid var(--sd-border);border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}@keyframes sd-table-spin{to{transform:rotate(360deg)}}.sd-table-spinner{display:inline-block;flex:0 0 auto;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;border:2px solid var(--sd-table-progress-track);border-top-color:var(--sd-table-spinner);border-radius:50%;animation:sd-table-spin .8s linear infinite}@media(prefers-reduced-motion:reduce){.sd-table-spinner{animation:none}}@media(forced-colors:active){.sd-table-spinner{forced-color-adjust:none;border-color:GrayText;border-top-color:Highlight}}@keyframes sd-table-skeleton-sweep{to{background-position:480px 0}}.sd-mobile-skeleton-body{display:flex;flex-direction:column;gap:8px;padding:4px 0}.sd-mobile-skeleton-bar{display:block;height:12px;border-radius:var(--sd-radius-4, 4px);background:linear-gradient(90deg,var(--sd-table-skeleton-bg) 0,var(--sd-table-skeleton-highlight) 40%,var(--sd-table-skeleton-bg) 80%) 0 0/480px 100%;animation:sd-table-skeleton-sweep 1.4s linear infinite}@media(prefers-reduced-motion:reduce){.sd-mobile-skeleton-bar{animation:none}}@media(forced-colors:active){.sd-mobile-skeleton-bar{forced-color-adjust:none;background:GrayText}}.sd-mobile-skeleton-bar:nth-child(1){width:60%;height:14px}.sd-mobile-skeleton-bar:nth-child(2){width:85%}.sd-mobile-skeleton-bar:nth-child(3){width:40%}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"] }]
|
|
1263
1459
|
}], ctorParameters: () => [] });
|
|
1264
1460
|
|
|
1461
|
+
let nextId = 0;
|
|
1462
|
+
/**
|
|
1463
|
+
* @internal Paginator of `<sd-table>` for `paginate.total: 'unknown'`.
|
|
1464
|
+
*
|
|
1465
|
+
* why: `mat-paginator` derives Next/Last and its range from `length`; driving it without a total
|
|
1466
|
+
* would need a fake length. This view keeps the same markup classes, tokens and `MatPaginatorIntl`
|
|
1467
|
+
* labels as `mat-paginator`, so the table footer, theming and i18n stay identical, but it renders
|
|
1468
|
+
* only facts: the rows actually shown, Previous/Next from `hasMore`, and no total or last page.
|
|
1469
|
+
*/
|
|
1470
|
+
class SdTableUnknownTotalPaginator {
|
|
1471
|
+
state = input.required();
|
|
1472
|
+
pageSizeOptions = input([]);
|
|
1473
|
+
hidePageSize = input(false, { transform: booleanAttribute });
|
|
1474
|
+
/** First page needs no total, so it follows `showFirstLastButtons`; a last-page button is never rendered. */
|
|
1475
|
+
showFirstButton = input(false, { transform: booleanAttribute });
|
|
1476
|
+
autoId = input();
|
|
1477
|
+
page = output();
|
|
1478
|
+
intl = inject(MatPaginatorIntl);
|
|
1479
|
+
pageSizeLabelId = `sd-table-unknown-total-page-size-${nextId++}`;
|
|
1480
|
+
displayedPageSizeOptions = computed(() => {
|
|
1481
|
+
const options = new Set((this.pageSizeOptions() ?? []).filter(size => size > 0));
|
|
1482
|
+
options.add(this.state().pageSize);
|
|
1483
|
+
return [...options].sort((a, b) => a - b);
|
|
1484
|
+
});
|
|
1485
|
+
// Same format as the known-total label (`SdTablePaginatorIntl.getRangeLabel`) minus the `/total` part.
|
|
1486
|
+
rangeLabel = computed(() => {
|
|
1487
|
+
const range = this.state().range;
|
|
1488
|
+
return range ? `${range.from}-${range.to}` : '';
|
|
1489
|
+
});
|
|
1490
|
+
previousDisabled = computed(() => !this.state().hasPrevious);
|
|
1491
|
+
nextDisabled = computed(() => !this.state().hasNext);
|
|
1492
|
+
first() {
|
|
1493
|
+
if (this.previousDisabled())
|
|
1494
|
+
return;
|
|
1495
|
+
this.page.emit({ pageIndex: 0, pageSize: this.state().pageSize });
|
|
1496
|
+
}
|
|
1497
|
+
previous() {
|
|
1498
|
+
if (this.previousDisabled())
|
|
1499
|
+
return;
|
|
1500
|
+
this.page.emit({ pageIndex: this.state().pageIndex - 1, pageSize: this.state().pageSize });
|
|
1501
|
+
}
|
|
1502
|
+
next() {
|
|
1503
|
+
if (this.nextDisabled())
|
|
1504
|
+
return;
|
|
1505
|
+
this.page.emit({ pageIndex: this.state().pageIndex + 1, pageSize: this.state().pageSize });
|
|
1506
|
+
}
|
|
1507
|
+
changePageSize(pageSize) {
|
|
1508
|
+
if (this.state().busy || pageSize === this.state().pageSize)
|
|
1509
|
+
return;
|
|
1510
|
+
// why: offsets of the old page size do not map onto the new one without a total; restart at the first page.
|
|
1511
|
+
this.page.emit({ pageIndex: 0, pageSize });
|
|
1512
|
+
}
|
|
1513
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTableUnknownTotalPaginator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1514
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTableUnknownTotalPaginator, isStandalone: true, selector: "sd-table-unknown-total-paginator", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, hidePageSize: { classPropertyName: "hidePageSize", publicName: "hidePageSize", isSignal: true, isRequired: false, transformFunction: null }, showFirstButton: { classPropertyName: "showFirstButton", publicName: "showFirstButton", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "page" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-busy": "state().busy ? \"true\" : null", "attr.data-autoid": "autoId() ? autoId() + \"-paginator\" : null" }, classAttribute: "mat-mdc-paginator sd-table-unknown-total-paginator" }, ngImport: i0, template: "@let _state = state();\n@let _autoId = autoId();\n<div class=\"mat-mdc-paginator-outer-container\">\n <div class=\"mat-mdc-paginator-container\">\n @if (!hidePageSize()) {\n <div class=\"mat-mdc-paginator-page-size\">\n <div class=\"mat-mdc-paginator-page-size-label\" [attr.id]=\"pageSizeLabelId\">\n {{ intl.itemsPerPageLabel }}\n </div>\n @if (displayedPageSizeOptions().length > 1) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" class=\"mat-mdc-paginator-page-size-select\">\n <mat-select\n [value]=\"_state.pageSize\"\n [disabled]=\"_state.busy\"\n [aria-labelledby]=\"pageSizeLabelId\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-page-size' : null\"\n (selectionChange)=\"changePageSize($event.value)\"\n [panelClass]=\"['sd-select-panel', 'sd-table-page-size-panel']\"\n hideSingleSelectionIndicator>\n @for (pageSizeOption of displayedPageSizeOptions(); track pageSizeOption) {\n <mat-option [value]=\"pageSizeOption\">{{ pageSizeOption }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n } @else {\n <div class=\"mat-mdc-paginator-page-size-value\">{{ _state.pageSize }}</div>\n }\n </div>\n }\n\n <div class=\"mat-mdc-paginator-range-actions\">\n <div class=\"mat-mdc-paginator-range-label\" aria-live=\"polite\">{{ rangeLabel() }}</div>\n\n <!-- Same contract as mat-paginator: `disabledInteractive` keeps focus on a button that becomes\n disabled while its page loads, and tabindex -1 keeps disabled buttons out of the tab order. -->\n @if (showFirstButton()) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-first\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-first' : null\"\n [attr.aria-label]=\"intl.firstPageLabel\"\n [matTooltip]=\"intl.firstPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"first()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\" />\n </svg>\n </button>\n }\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-previous\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-previous' : null\"\n [attr.aria-label]=\"intl.previousPageLabel\"\n [matTooltip]=\"intl.previousPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"previous()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\" />\n </svg>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-next\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-next' : null\"\n [attr.aria-label]=\"intl.nextPageLabel\"\n [matTooltip]=\"intl.nextPageLabel\"\n [matTooltipDisabled]=\"nextDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"nextDisabled()\"\n [tabindex]=\"nextDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"next()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n </svg>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height: var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding: var(--mat-paginator-form-field-container-vertical-padding, 8px)}:host ::ng-deep .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}:host-context([dir=rtl]) .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}:host-context([dir=rtl]) .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors:active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1515
|
+
}
|
|
1516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTableUnknownTotalPaginator, decorators: [{
|
|
1517
|
+
type: Component,
|
|
1518
|
+
args: [{ selector: 'sd-table-unknown-total-paginator', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, MatFormFieldModule, MatSelectModule, MatTooltipModule], host: {
|
|
1519
|
+
class: 'mat-mdc-paginator sd-table-unknown-total-paginator',
|
|
1520
|
+
role: 'group',
|
|
1521
|
+
'[attr.aria-busy]': 'state().busy ? "true" : null',
|
|
1522
|
+
'[attr.data-autoid]': 'autoId() ? autoId() + "-paginator" : null',
|
|
1523
|
+
}, template: "@let _state = state();\n@let _autoId = autoId();\n<div class=\"mat-mdc-paginator-outer-container\">\n <div class=\"mat-mdc-paginator-container\">\n @if (!hidePageSize()) {\n <div class=\"mat-mdc-paginator-page-size\">\n <div class=\"mat-mdc-paginator-page-size-label\" [attr.id]=\"pageSizeLabelId\">\n {{ intl.itemsPerPageLabel }}\n </div>\n @if (displayedPageSizeOptions().length > 1) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" class=\"mat-mdc-paginator-page-size-select\">\n <mat-select\n [value]=\"_state.pageSize\"\n [disabled]=\"_state.busy\"\n [aria-labelledby]=\"pageSizeLabelId\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-page-size' : null\"\n (selectionChange)=\"changePageSize($event.value)\"\n [panelClass]=\"['sd-select-panel', 'sd-table-page-size-panel']\"\n hideSingleSelectionIndicator>\n @for (pageSizeOption of displayedPageSizeOptions(); track pageSizeOption) {\n <mat-option [value]=\"pageSizeOption\">{{ pageSizeOption }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n } @else {\n <div class=\"mat-mdc-paginator-page-size-value\">{{ _state.pageSize }}</div>\n }\n </div>\n }\n\n <div class=\"mat-mdc-paginator-range-actions\">\n <div class=\"mat-mdc-paginator-range-label\" aria-live=\"polite\">{{ rangeLabel() }}</div>\n\n <!-- Same contract as mat-paginator: `disabledInteractive` keeps focus on a button that becomes\n disabled while its page loads, and tabindex -1 keeps disabled buttons out of the tab order. -->\n @if (showFirstButton()) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-first\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-first' : null\"\n [attr.aria-label]=\"intl.firstPageLabel\"\n [matTooltip]=\"intl.firstPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"first()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\" />\n </svg>\n </button>\n }\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-previous\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-previous' : null\"\n [attr.aria-label]=\"intl.previousPageLabel\"\n [matTooltip]=\"intl.previousPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"previous()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\" />\n </svg>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-next\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-next' : null\"\n [attr.aria-label]=\"intl.nextPageLabel\"\n [matTooltip]=\"intl.nextPageLabel\"\n [matTooltipDisabled]=\"nextDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"nextDisabled()\"\n [tabindex]=\"nextDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"next()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n </svg>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height: var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding: var(--mat-paginator-form-field-container-vertical-padding, 8px)}:host ::ng-deep .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}:host-context([dir=rtl]) .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}:host-context([dir=rtl]) .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors:active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}\n"] }]
|
|
1524
|
+
}] });
|
|
1525
|
+
|
|
1526
|
+
/** `paginate.total: 'unknown'` only applies to server tables; local tables always know their total. */
|
|
1527
|
+
function isUnknownTotal(option) {
|
|
1528
|
+
return option?.type === 'server' && option.paginate?.total === 'unknown';
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* Validate and normalise one unknown-total server page.
|
|
1532
|
+
*
|
|
1533
|
+
* why: the paginator must never claim more than the loader proved. A missing `hasMore` is a read
|
|
1534
|
+
* error instead of a guess; rows beyond `pageSize` (a lookahead row) are dropped so that the next
|
|
1535
|
+
* offset (`pageNumber * pageSize`) never repeats them; an empty page ends paging so that Next
|
|
1536
|
+
* cannot loop over empty pages after the source shrank.
|
|
1537
|
+
*/
|
|
1538
|
+
function readUnknownTotalPage(result, pageSize) {
|
|
1539
|
+
const page = result;
|
|
1540
|
+
if (!page || !Array.isArray(page.items) || typeof page.hasMore !== 'boolean') {
|
|
1541
|
+
throw new Error(`sd-table: paginate.total 'unknown' requires items() to resolve { items: T[]; hasMore: boolean }.`);
|
|
1542
|
+
}
|
|
1543
|
+
const items = page.items;
|
|
1544
|
+
const lookahead = pageSize > 0 && items.length > pageSize;
|
|
1545
|
+
return {
|
|
1546
|
+
items: lookahead ? items.slice(0, pageSize) : items,
|
|
1547
|
+
hasMore: items.length > 0 && (page.hasMore || lookahead),
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
/** Same page and page size; `count`/`hasMore` are ignored. */
|
|
1551
|
+
function samePagePosition(a, b) {
|
|
1552
|
+
return !!a && !!b && a.pageIndex === b.pageIndex && a.pageSize === b.pageSize;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
/** Kiểu cột mà column-filter render control mặc định (nhận chip operator — thiết kế đợt 2 · G). */
|
|
1556
|
+
const CONTROL_FILTER_TYPES = new Set([
|
|
1557
|
+
'string',
|
|
1558
|
+
'number',
|
|
1559
|
+
'boolean',
|
|
1560
|
+
'values',
|
|
1561
|
+
'lazy-values',
|
|
1562
|
+
'date',
|
|
1563
|
+
'datetime',
|
|
1564
|
+
'time',
|
|
1565
|
+
]);
|
|
1566
|
+
/**
|
|
1567
|
+
* Cột lọc bằng control mặc định: không có template `filterDef`, không phải `split-number` / `split-date` (hai ô).
|
|
1568
|
+
* Chỉ ở đây operator nằm trong control và control khoá ô khi chọn `NULL` / `NOT_NULL`.
|
|
1569
|
+
*/
|
|
1570
|
+
const isDefaultControlFilter = (column) => {
|
|
1571
|
+
const filter = column.filter;
|
|
1572
|
+
return CONTROL_FILTER_TYPES.has(column.type) && !filter?.filterDef && filter?.type !== 'split-number' && filter?.type !== 'split-date';
|
|
1573
|
+
};
|
|
1574
|
+
/**
|
|
1575
|
+
* `NULL` / `NOT_NULL` trên control mặc định: ô bị khoá và để trống, nên filter có hiệu lực mà không cần giá trị.
|
|
1576
|
+
* Template custom và filter split giữ cách cũ (chỉ lọc khi có giá trị).
|
|
1577
|
+
*/
|
|
1578
|
+
const isNoDataColumnOperator = (column, operator) => (operator === 'NULL' || operator === 'NOT_NULL') && isDefaultControlFilter(column);
|
|
1579
|
+
|
|
1580
|
+
/**
|
|
1581
|
+
* Machine-zone date math, exactly the payload sent before time zones: the local bounds of
|
|
1582
|
+
* `SdDateTimeService`, and a datetime still read by `new Date(value)`.
|
|
1583
|
+
*/
|
|
1584
|
+
const LOCAL_FILTER_DATES = { ..._SD_LOCAL_DATE_TIME, parse: value => new Date(value) };
|
|
1585
|
+
const hasFilterValue = (value) => value !== undefined && value !== null && value !== '';
|
|
1265
1586
|
// why: `columns` nhận `SdTableColumnAnyRow[]` (= `SdTableColumn<never>[]`). Hàm chỉ đọc
|
|
1266
1587
|
// `field` / `type` / `filter.operator.default` — không bao giờ chạm dữ liệu hàng — nên không cần generic
|
|
1267
1588
|
// theo `T`; `never` ở vị trí contravariant khiến mọi `SdTableColumn<T>` vẫn truyền vào được sau khi
|
|
1268
1589
|
// default generic siết từ `any` sang `unknown`.
|
|
1269
1590
|
const SdConvertToPagingReq = (filterRequest, args) => {
|
|
1270
1591
|
const { externalFilters, columns, fieldMapping } = args;
|
|
1592
|
+
const dates = args.dateTime && args.dateTime.timeZone !== 'local' ? args.dateTime : LOCAL_FILTER_DATES;
|
|
1271
1593
|
const req = {
|
|
1272
1594
|
filters: [],
|
|
1273
1595
|
orders: args?.orders || [],
|
|
@@ -1311,14 +1633,14 @@ const SdConvertToPagingReq = (filterRequest, args) => {
|
|
|
1311
1633
|
filters.push({
|
|
1312
1634
|
field,
|
|
1313
1635
|
operator: 'GREATER_OR_EQUAL',
|
|
1314
|
-
data:
|
|
1636
|
+
data: dates.begin(value?.from).toISOString(),
|
|
1315
1637
|
});
|
|
1316
1638
|
}
|
|
1317
1639
|
if (value?.to) {
|
|
1318
1640
|
filters.push({
|
|
1319
1641
|
field,
|
|
1320
1642
|
operator: 'LESS_THAN',
|
|
1321
|
-
data:
|
|
1643
|
+
data: dates.beginOfNextDay(value?.to).toISOString(),
|
|
1322
1644
|
});
|
|
1323
1645
|
}
|
|
1324
1646
|
}
|
|
@@ -1329,14 +1651,14 @@ const SdConvertToPagingReq = (filterRequest, args) => {
|
|
|
1329
1651
|
filters.push({
|
|
1330
1652
|
field,
|
|
1331
1653
|
operator: 'GREATER_OR_EQUAL',
|
|
1332
|
-
data:
|
|
1654
|
+
data: dates.begin(value?.from).toISOString(),
|
|
1333
1655
|
});
|
|
1334
1656
|
}
|
|
1335
1657
|
if (value?.to) {
|
|
1336
1658
|
filters.push({
|
|
1337
1659
|
field,
|
|
1338
1660
|
operator: 'LESS_THAN',
|
|
1339
|
-
data:
|
|
1661
|
+
data: dates.beginOfNextDay(value?.to).toISOString(),
|
|
1340
1662
|
});
|
|
1341
1663
|
}
|
|
1342
1664
|
}
|
|
@@ -1346,14 +1668,14 @@ const SdConvertToPagingReq = (filterRequest, args) => {
|
|
|
1346
1668
|
filters.push({
|
|
1347
1669
|
field,
|
|
1348
1670
|
operator: 'GREATER_OR_EQUAL',
|
|
1349
|
-
data:
|
|
1671
|
+
data: dates.begin(value).toISOString(),
|
|
1350
1672
|
});
|
|
1351
1673
|
}
|
|
1352
1674
|
if (externalFilter.defaultOperator === 'LESS_OR_EQUAL') {
|
|
1353
1675
|
filters.push({
|
|
1354
1676
|
field,
|
|
1355
1677
|
operator: 'LESS_THAN',
|
|
1356
|
-
data:
|
|
1678
|
+
data: dates.beginOfNextDay(value).toISOString(),
|
|
1357
1679
|
});
|
|
1358
1680
|
}
|
|
1359
1681
|
}
|
|
@@ -1362,14 +1684,14 @@ const SdConvertToPagingReq = (filterRequest, args) => {
|
|
|
1362
1684
|
filters.push({
|
|
1363
1685
|
field,
|
|
1364
1686
|
operator: 'GREATER_OR_EQUAL',
|
|
1365
|
-
data:
|
|
1687
|
+
data: dates.parse(value).toISOString(),
|
|
1366
1688
|
});
|
|
1367
1689
|
}
|
|
1368
1690
|
if (externalFilter.defaultOperator === 'LESS_OR_EQUAL') {
|
|
1369
1691
|
filters.push({
|
|
1370
1692
|
field,
|
|
1371
1693
|
operator: 'LESS_OR_EQUAL',
|
|
1372
|
-
data:
|
|
1694
|
+
data: dates.parse(value).toISOString(),
|
|
1373
1695
|
});
|
|
1374
1696
|
}
|
|
1375
1697
|
}
|
|
@@ -1390,14 +1712,14 @@ const SdConvertToPagingReq = (filterRequest, args) => {
|
|
|
1390
1712
|
filters.push({
|
|
1391
1713
|
field,
|
|
1392
1714
|
operator: 'GREATER_OR_EQUAL',
|
|
1393
|
-
data:
|
|
1715
|
+
data: dates.begin(value?.from).toISOString(),
|
|
1394
1716
|
});
|
|
1395
1717
|
}
|
|
1396
1718
|
if (value?.to) {
|
|
1397
1719
|
filters.push({
|
|
1398
1720
|
field,
|
|
1399
1721
|
operator: 'LESS_THAN',
|
|
1400
|
-
data:
|
|
1722
|
+
data: dates.beginOfNextDay(value?.to).toISOString(),
|
|
1401
1723
|
});
|
|
1402
1724
|
}
|
|
1403
1725
|
}
|
|
@@ -1416,6 +1738,11 @@ const SdConvertToPagingReq = (filterRequest, args) => {
|
|
|
1416
1738
|
const value = rawColumnFilter?.[column.field];
|
|
1417
1739
|
const field = fieldMapping?.[column.field] || column.field;
|
|
1418
1740
|
const operator = columnOperator?.[column.field] || column.filter?.operator?.default;
|
|
1741
|
+
// why: NULL / NOT_NULL trên control mặc định — ô bị khoá và để trống — là filter không cần giá trị.
|
|
1742
|
+
if (isNoDataColumnOperator(column, operator)) {
|
|
1743
|
+
filters.push({ field, operator });
|
|
1744
|
+
continue;
|
|
1745
|
+
}
|
|
1419
1746
|
// Nếu có giá trị thì mới xử lý filter
|
|
1420
1747
|
if (value !== undefined && value !== null && value !== '') {
|
|
1421
1748
|
if (column.type === 'string') {
|
|
@@ -1439,8 +1766,8 @@ const SdConvertToPagingReq = (filterRequest, args) => {
|
|
|
1439
1766
|
field,
|
|
1440
1767
|
operator: 'BETWEEN',
|
|
1441
1768
|
data: {
|
|
1442
|
-
from:
|
|
1443
|
-
to:
|
|
1769
|
+
from: dates.begin(value?.from).toISOString(),
|
|
1770
|
+
to: dates.end(value?.to).toISOString(),
|
|
1444
1771
|
},
|
|
1445
1772
|
});
|
|
1446
1773
|
}
|
|
@@ -1448,14 +1775,14 @@ const SdConvertToPagingReq = (filterRequest, args) => {
|
|
|
1448
1775
|
filters.push({
|
|
1449
1776
|
field,
|
|
1450
1777
|
operator: 'GREATER_OR_EQUAL',
|
|
1451
|
-
data:
|
|
1778
|
+
data: dates.begin(value?.from).toISOString(),
|
|
1452
1779
|
});
|
|
1453
1780
|
}
|
|
1454
1781
|
else if (value?.to) {
|
|
1455
1782
|
filters.push({
|
|
1456
1783
|
field,
|
|
1457
1784
|
operator: 'LESS_THAN',
|
|
1458
|
-
data:
|
|
1785
|
+
data: dates.beginOfNextDay(value?.to).toISOString(),
|
|
1459
1786
|
});
|
|
1460
1787
|
}
|
|
1461
1788
|
}
|
|
@@ -1465,13 +1792,39 @@ const SdConvertToPagingReq = (filterRequest, args) => {
|
|
|
1465
1792
|
field,
|
|
1466
1793
|
operator: 'BETWEEN',
|
|
1467
1794
|
data: {
|
|
1468
|
-
from:
|
|
1469
|
-
to:
|
|
1795
|
+
from: dates.begin(value).toISOString(),
|
|
1796
|
+
to: dates.end(value).toISOString(),
|
|
1470
1797
|
},
|
|
1471
1798
|
});
|
|
1472
1799
|
}
|
|
1473
1800
|
}
|
|
1474
1801
|
}
|
|
1802
|
+
else if (column.type === 'number' && typeof value === 'object' && !Array.isArray(value) && ('from' in value || 'to' in value)) {
|
|
1803
|
+
// why: the split-number filter emits an inclusive `{ from, to }`; a missing end leaves that side open, and 0 is a bound.
|
|
1804
|
+
const hasFrom = hasFilterValue(value.from);
|
|
1805
|
+
const hasTo = hasFilterValue(value.to);
|
|
1806
|
+
if (hasFrom && hasTo) {
|
|
1807
|
+
filters.push({
|
|
1808
|
+
field,
|
|
1809
|
+
operator: 'BETWEEN',
|
|
1810
|
+
data: { from: value.from, to: value.to },
|
|
1811
|
+
});
|
|
1812
|
+
}
|
|
1813
|
+
else if (hasFrom) {
|
|
1814
|
+
filters.push({
|
|
1815
|
+
field,
|
|
1816
|
+
operator: 'GREATER_OR_EQUAL',
|
|
1817
|
+
data: value.from,
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
else if (hasTo) {
|
|
1821
|
+
filters.push({
|
|
1822
|
+
field,
|
|
1823
|
+
operator: 'LESS_OR_EQUAL',
|
|
1824
|
+
data: value.to,
|
|
1825
|
+
});
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1475
1828
|
else {
|
|
1476
1829
|
if (Array.isArray(value)) {
|
|
1477
1830
|
if (value.length) {
|
|
@@ -1636,7 +1989,8 @@ function aggregateDefinition(column) {
|
|
|
1636
1989
|
throw new Error('[sd-table] aggregate requires calculate or templateRef.');
|
|
1637
1990
|
return aggregate;
|
|
1638
1991
|
}
|
|
1639
|
-
|
|
1992
|
+
/** `dateTime` reads zone-less dates in `ISdCoreConfiguration.timeZone`; omitted or `'local'` keeps the machine zone. */
|
|
1993
|
+
function calculateAggregate(items, context, definition, dateTime) {
|
|
1640
1994
|
const calculate = definition.calculate;
|
|
1641
1995
|
if (typeof calculate === 'function') {
|
|
1642
1996
|
const result = calculate(items, context);
|
|
@@ -1655,11 +2009,13 @@ function calculateAggregate(items, context, definition) {
|
|
|
1655
2009
|
return values.filter(hasAggregateValue).length;
|
|
1656
2010
|
if (context.column.type === 'date' || context.column.type === 'datetime') {
|
|
1657
2011
|
// Same accepted shapes/timezone semantics as local sorting: Date, native-parsable string, epoch milliseconds.
|
|
2012
|
+
const zone = dateTime && dateTime.timeZone !== 'local' ? dateTime : undefined;
|
|
2013
|
+
const parse = (value) => (zone ? (zone.parse(value)?.getTime() ?? NaN) : new Date(value).getTime());
|
|
1658
2014
|
const times = values
|
|
1659
2015
|
.map(value => value instanceof Date
|
|
1660
2016
|
? value.getTime()
|
|
1661
2017
|
: (typeof value === 'string' && value.trim() !== '') || typeof value === 'number'
|
|
1662
|
-
?
|
|
2018
|
+
? parse(value)
|
|
1663
2019
|
: NaN)
|
|
1664
2020
|
.filter(Number.isFinite);
|
|
1665
2021
|
if (!times.length)
|
|
@@ -1746,7 +2102,7 @@ function buildAggregateSnapshot(args) {
|
|
|
1746
2102
|
};
|
|
1747
2103
|
try {
|
|
1748
2104
|
const definition = aggregateDefinition(column);
|
|
1749
|
-
const value = calculateAggregate(items, cellContext, definition);
|
|
2105
|
+
const value = calculateAggregate(items, cellContext, definition, args.dateTime);
|
|
1750
2106
|
const resolved = { ...cellContext, value };
|
|
1751
2107
|
const operation = typeof definition.calculate === 'string' ? definition.calculate : undefined;
|
|
1752
2108
|
cells.set(column.field, { context: resolved, templateRef: definition.templateRef, text: args.format(value, column, operation) });
|
|
@@ -1887,6 +2243,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
1887
2243
|
args: [{ selector: 'column-title', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgTemplateOutlet], template: "@let _column = column();\n@let _templateRef = templateRef();\n\n@if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef\"></ng-container>\n} @else {\n {{ _column.title }}\n}\n" }]
|
|
1888
2244
|
}] });
|
|
1889
2245
|
|
|
2246
|
+
const NO_OPERATORS = [];
|
|
1890
2247
|
class ColumnFilterComponent {
|
|
1891
2248
|
#lastOnChangeValueHash;
|
|
1892
2249
|
// ==========================================
|
|
@@ -1930,16 +2287,41 @@ class ColumnFilterComponent {
|
|
|
1930
2287
|
return col?.field;
|
|
1931
2288
|
return typeof title === 'string' ? title : title.title || col?.field;
|
|
1932
2289
|
});
|
|
1933
|
-
// Danh sách operator hiển thị
|
|
2290
|
+
// Danh sách operator hiển thị theo đúng thứ tự `filter.operator.list` của cột (handoff sd-operator B3); mục không có
|
|
2291
|
+
// trong OPERATORS bị bỏ.
|
|
1934
2292
|
operators = computed(() => {
|
|
1935
2293
|
const col = this.column();
|
|
1936
2294
|
if (!col?.filter?.disabled && col?.filter?.operator?.enable) {
|
|
1937
|
-
|
|
2295
|
+
const out = [];
|
|
2296
|
+
for (const value of col.filter.operator.list ?? []) {
|
|
2297
|
+
const entry = OPERATORS.find(e => e.value === value);
|
|
2298
|
+
if (entry)
|
|
2299
|
+
out.push(entry);
|
|
2300
|
+
}
|
|
2301
|
+
return out;
|
|
1938
2302
|
}
|
|
1939
2303
|
return [];
|
|
1940
2304
|
});
|
|
1941
2305
|
// Chỉ các Operator value cho phép — truyền vào <sd-operator [operators]>.
|
|
1942
2306
|
operatorValues = computed(() => this.operators().map(o => o.value));
|
|
2307
|
+
// Operator nằm trong control mặc định dưới dạng chip tiền tố (thiết kế đợt 2 · G). Template custom (filterDef)
|
|
2308
|
+
// và filter split (split-number / split-date, hai control) giữ sd-operator rời vì không chèn chip vào được.
|
|
2309
|
+
// why: danh sách đúng một operator cũng giữ sd-operator rời — control sẽ tự đặt operator đó, tức phát
|
|
2310
|
+
// operatorChange lúc khởi tạo, mà hợp đồng của column-filter giữ nguyên thời điểm emit.
|
|
2311
|
+
operatorInControl = computed(() => {
|
|
2312
|
+
const col = this.column();
|
|
2313
|
+
return !!col && this.operatorValues().length > 1 && isDefaultControlFilter(col);
|
|
2314
|
+
});
|
|
2315
|
+
/**
|
|
2316
|
+
* Cột đang có giá trị filter: sd-operator rời đổi sang tông primary. why: method chứ không computed — `columnFilter`
|
|
2317
|
+
* là object cha sửa tại chỗ, computed không thấy thay đổi.
|
|
2318
|
+
*/
|
|
2319
|
+
hasFilterValue() {
|
|
2320
|
+
const field = this.column()?.field;
|
|
2321
|
+
return !!field && _sdOperatorHasValue(this.columnFilter()?.[field]);
|
|
2322
|
+
}
|
|
2323
|
+
// Operator truyền xuống control mặc định; mảng rỗng cố định khi operator nằm ngoài để input không đổi mỗi lượt CD.
|
|
2324
|
+
controlOperators = computed(() => (this.operatorInControl() ? this.operatorValues() : NO_OPERATORS));
|
|
1943
2325
|
// Items cho sd-select khi column type = values / lazy-values
|
|
1944
2326
|
items = computed(() => {
|
|
1945
2327
|
const col = this.column();
|
|
@@ -2002,11 +2384,11 @@ class ColumnFilterComponent {
|
|
|
2002
2384
|
};
|
|
2003
2385
|
#filterValueHash = (value) => Utilities.hash({ value });
|
|
2004
2386
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ColumnFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2005
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ColumnFilterComponent, isStandalone: true, selector: "column-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, columnFilter: { classPropertyName: "columnFilter", publicName: "columnFilter", isSignal: true, isRequired: false, transformFunction: null }, cacheValues: { classPropertyName: "cacheValues", publicName: "cacheValues", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, operator: { classPropertyName: "operator", publicName: "operator", isSignal: true, isRequired: false, transformFunction: null }, isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { operator: "operatorChange", filterChange: "filterChange", filterCommit: "filterCommit" }, ngImport: i0, template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator filter -->\n @if (_operators.length) {\n <sd-operator class=\"mr-4\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:var(--sd-table-bg, #ffffff)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId"], outputs: ["modelChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "description", "tooltip", "icon", "size"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2387
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ColumnFilterComponent, isStandalone: true, selector: "column-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, columnFilter: { classPropertyName: "columnFilter", publicName: "columnFilter", isSignal: true, isRequired: false, transformFunction: null }, cacheValues: { classPropertyName: "cacheValues", publicName: "cacheValues", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, operator: { classPropertyName: "operator", publicName: "operator", isSignal: true, isRequired: false, transformFunction: null }, isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { operator: "operatorChange", filterChange: "filterChange", filterCommit: "filterCommit" }, ngImport: i0, template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _controlOperators = controlOperators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator: chip trong control m\u1EB7c \u0111\u1ECBnh (thi\u1EBFt k\u1EBF \u0111\u1EE3t 2 \u00B7 G). Template custom (filterDef) v\u00E0 filter split\n (hai control) kh\u00F4ng ch\u00E8n chip \u0111\u01B0\u1EE3c n\u00EAn gi\u1EEF sd-operator r\u1EDDi nh\u01B0 c\u0169. -->\n @if (_operators.length && !operatorInControl()) {\n <!-- Chip 24px nh\u01B0 chip trong control; tint primary khi c\u1ED9t \u0111ang c\u00F3 gi\u00E1 tr\u1ECB. Ch\u01B0a c\u00F3 operator: ph\u1EC5u x\u00E1m, kh\u00F4ng g\u00E1n\n m\u1EB7c \u0111\u1ECBnh (handoff sd-operator B5, ph\u01B0\u01A1ng \u00E1n b). -->\n <sd-operator class=\"mr-4\" size=\"sm\" [active]=\"hasFilterValue()\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column{--sd-control-label-bg: var(--sd-table-bg, #ffffff)}:host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:var(--sd-table-bg, #ffffff)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId", "size", "readonly", "active", "showCode"], outputs: ["modelChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["operatorChange", "sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "label", "description", "tooltip", "icon", "size", "pulse"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2006
2388
|
}
|
|
2007
2389
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ColumnFilterComponent, decorators: [{
|
|
2008
2390
|
type: Component,
|
|
2009
|
-
args: [{ selector: 'column-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdOperator, SdInput, SdInputNumber, SdSelect, SdDate, SdDateRange, SdBadge], template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator filter -->\n @if (_operators.length) {\n <sd-operator class=\"mr-4\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:var(--sd-table-bg, #ffffff)}\n"] }]
|
|
2391
|
+
args: [{ selector: 'column-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdOperator, SdInput, SdInputNumber, SdSelect, SdDate, SdDateRange, SdBadge], template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _controlOperators = controlOperators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator: chip trong control m\u1EB7c \u0111\u1ECBnh (thi\u1EBFt k\u1EBF \u0111\u1EE3t 2 \u00B7 G). Template custom (filterDef) v\u00E0 filter split\n (hai control) kh\u00F4ng ch\u00E8n chip \u0111\u01B0\u1EE3c n\u00EAn gi\u1EEF sd-operator r\u1EDDi nh\u01B0 c\u0169. -->\n @if (_operators.length && !operatorInControl()) {\n <!-- Chip 24px nh\u01B0 chip trong control; tint primary khi c\u1ED9t \u0111ang c\u00F3 gi\u00E1 tr\u1ECB. Ch\u01B0a c\u00F3 operator: ph\u1EC5u x\u00E1m, kh\u00F4ng g\u00E1n\n m\u1EB7c \u0111\u1ECBnh (handoff sd-operator B5, ph\u01B0\u01A1ng \u00E1n b). -->\n <sd-operator class=\"mr-4\" size=\"sm\" [active]=\"hasFilterValue()\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column{--sd-control-label-bg: var(--sd-table-bg, #ffffff)}:host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:var(--sd-table-bg, #ffffff)}\n"] }]
|
|
2010
2392
|
}], ctorParameters: () => [] });
|
|
2011
2393
|
|
|
2012
2394
|
class ExternalFilterComponent {
|
|
@@ -2017,6 +2399,8 @@ class ExternalFilterComponent {
|
|
|
2017
2399
|
filter = input(undefined);
|
|
2018
2400
|
externalFilters = input([]);
|
|
2019
2401
|
filterRegister = input(undefined);
|
|
2402
|
+
/** Mặc định thu gọn khi option không đặt `externalFilterCollapsed` (bảng chính của sd-page-list lúc màn thấp). */
|
|
2403
|
+
collapsedByDefault = input(false);
|
|
2020
2404
|
// ==========================================
|
|
2021
2405
|
// 2. INJECT
|
|
2022
2406
|
// ==========================================
|
|
@@ -2027,6 +2411,8 @@ class ExternalFilterComponent {
|
|
|
2027
2411
|
externalFilter = signal({});
|
|
2028
2412
|
inlineExternal = signal({});
|
|
2029
2413
|
filtered = signal(false);
|
|
2414
|
+
/** Trạng thái thu gọn của sd-section; người dùng mở/thu thì giữ đến khi mặc định đổi. */
|
|
2415
|
+
collapsed = signal(false);
|
|
2030
2416
|
isMobileOrTablet = BrowserUtilities.isMobile();
|
|
2031
2417
|
// FormGroup là instance, parent đọc qua viewChild — giữ readonly field.
|
|
2032
2418
|
form = new FormGroup({});
|
|
@@ -2042,7 +2428,16 @@ class ExternalFilterComponent {
|
|
|
2042
2428
|
col = computed(() => (this.filter()?.externalFilterPerRow === 4 ? 3 : 2));
|
|
2043
2429
|
// Normalize externalFilters về mảng (input có thể null/undefined).
|
|
2044
2430
|
filterItems = computed(() => this.externalFilters() || []);
|
|
2431
|
+
#initialCollapsed = computed(() => {
|
|
2432
|
+
const filter = this.filter();
|
|
2433
|
+
if (filter?.collapsible === false)
|
|
2434
|
+
return false;
|
|
2435
|
+
return filter?.externalFilterCollapsed ?? this.collapsedByDefault();
|
|
2436
|
+
});
|
|
2045
2437
|
constructor() {
|
|
2438
|
+
// why: mặc định đổi (ví dụ màn chuyển giữa thấp và cao) thì áp lại; giữa hai lần đổi, lựa chọn của người dùng
|
|
2439
|
+
// được giữ.
|
|
2440
|
+
effect(() => this.collapsed.set(this.#initialCollapsed()));
|
|
2046
2441
|
// Subscribe filterRegister observers — re-subscribe khi input đổi, cleanup khi đổi/destroy.
|
|
2047
2442
|
// QUAN TRỌNG: phải wrap untracked(). Observer có startWith() → emit ĐỒNG BỘ ngay khi
|
|
2048
2443
|
// subscribe, callback đọc this.externalFilter() (qua #filtered) sẽ bị effect track →
|
|
@@ -2134,7 +2529,7 @@ class ExternalFilterComponent {
|
|
|
2134
2529
|
});
|
|
2135
2530
|
};
|
|
2136
2531
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ExternalFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2137
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ExternalFilterComponent, isStandalone: true, selector: "external-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, externalFilters: { classPropertyName: "externalFilters", publicName: "externalFilters", isSignal: true, isRequired: false, transformFunction: null }, filterRegister: { classPropertyName: "filterRegister", publicName: "filterRegister", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let _filter = filter();\n@let _autoId = autoId();\n@let _filterItems = filterItems();\n@let _externalFilter = externalFilter();\n@let _inlineExternal = inlineExternal();\n@let _filtered = filtered();\n@let _col = col();\n\n@if (!_filter?.disabled) {\n @if (!isMobileOrTablet && _filterItems.length) {\n <sd-section\n [hideHeader]=\"_filter?.hideExternalFilterToolbar\"\n icon=\"filter_alt\"\n iconColor=\"secondary\"\n [title]=\"'core.component.table.filter' | sdTranslate\"\n [collapsible]=\"_filter?.collapsible ?? true\">\n <div class=\"d-flex gap-8 mr-4\" sdHeaderRight>\n <sd-button\n [autoId]=\"_autoId + 'clear'\"\n [disabled]=\"!_filtered\"\n type=\"text\"\n prefixIcon=\"cleaning_services\"\n [tooltip]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"$event.stopPropagation(); clearFilter($event)\"></sd-button>\n <sd-button\n [autoId]=\"_autoId + 'setting'\"\n type=\"text\"\n prefixIcon=\"settings\"\n [tooltip]=\"'core.component.table.customize' | sdTranslate\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"></sd-button>\n <mat-menu #menu=\"matMenu\" class=\"sd-custom-panel-filter-configuration\" [attr.data-autoid]=\"_autoId + 'setting-menu'\">\n @for (externalFilter of _filterItems; track externalFilter.field) {\n <button\n [attr.data-autoid]=\"_autoId + 'setting-' + externalFilter.field\"\n mat-menu-item\n (click)=\"onCheckboxChange($event, externalFilter)\"\n [disabled]=\"externalFilter.required\">\n <sd-checkbox\n [autoId]=\"_autoId + 'setting-' + externalFilter.field + '-checkbox'\"\n [label]=\"externalFilter.title\"\n [model]=\"_inlineExternal[externalFilter.field]\"\n [disabled]=\"externalFilter.required\" />\n </button>\n }\n </mat-menu>\n </div>\n <div class=\"sd-external-filter-body\">\n <div class=\"row mx-0\" style=\"row-gap: 16px\">\n @for (item of _filterItems; track item.field) {\n @if (_inlineExternal[item.field]) {\n <div class=\"col-md-3 col-sm-6 px-8\" [class.col-lg-2]=\"_col === 2\" [class.col-lg-3]=\"_col === 3\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'AUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'MULTIPLEAUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'lazy-values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { form: form, externalFilter: _externalFilter, autoId: _autoId + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n }\n </div>\n @if (_filter?.manualFilter) {\n <div class=\"d-flex justify-content-end mt-16 px-8\">\n <sd-button\n [autoId]=\"_autoId + 'submit'\"\n [disabled]=\"form.invalid\"\n type=\"fill\"\n color=\"primary\"\n [title]=\"'core.component.table.search' | sdTranslate\"\n prefixIcon=\"filter_alt\"\n (click)=\"onSubmit()\">\n </sd-button>\n </div>\n }\n </div>\n </sd-section>\n }\n}\n", styles: [":host{display:block;padding-left:0;padding-right:0}.sd-external-filter-body{padding:16px 8px}::ng-deep .sd-custom-panel-filter-configuration{width:240px;max-height:550px;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "iconShape", "collapsed", "collapsible", "hideHeader"], outputs: ["collapsedChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "component", type: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2532
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ExternalFilterComponent, isStandalone: true, selector: "external-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, externalFilters: { classPropertyName: "externalFilters", publicName: "externalFilters", isSignal: true, isRequired: false, transformFunction: null }, filterRegister: { classPropertyName: "filterRegister", publicName: "filterRegister", isSignal: true, isRequired: false, transformFunction: null }, collapsedByDefault: { classPropertyName: "collapsedByDefault", publicName: "collapsedByDefault", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let _filter = filter();\n@let _autoId = autoId();\n@let _filterItems = filterItems();\n@let _externalFilter = externalFilter();\n@let _inlineExternal = inlineExternal();\n@let _filtered = filtered();\n@let _col = col();\n\n@if (!_filter?.disabled) {\n @if (!isMobileOrTablet && _filterItems.length) {\n <sd-section\n [hideHeader]=\"_filter?.hideExternalFilterToolbar\"\n icon=\"filter_alt\"\n iconColor=\"secondary\"\n [title]=\"'core.component.table.filter' | sdTranslate\"\n [collapsible]=\"_filter?.collapsible ?? true\"\n [(collapsed)]=\"collapsed\">\n <div class=\"d-flex gap-8 mr-4\" sdHeaderRight>\n <sd-button\n [autoId]=\"_autoId + 'clear'\"\n [disabled]=\"!_filtered\"\n type=\"text\"\n prefixIcon=\"cleaning_services\"\n [tooltip]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"$event.stopPropagation(); clearFilter($event)\"></sd-button>\n <sd-button\n [autoId]=\"_autoId + 'setting'\"\n type=\"text\"\n prefixIcon=\"settings\"\n [tooltip]=\"'core.component.table.customize' | sdTranslate\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"></sd-button>\n <mat-menu #menu=\"matMenu\" class=\"sd-custom-panel-filter-configuration\" [attr.data-autoid]=\"_autoId + 'setting-menu'\">\n @for (externalFilter of _filterItems; track externalFilter.field) {\n <button\n [attr.data-autoid]=\"_autoId + 'setting-' + externalFilter.field\"\n mat-menu-item\n (click)=\"onCheckboxChange($event, externalFilter)\"\n [disabled]=\"externalFilter.required\">\n <sd-checkbox\n [autoId]=\"_autoId + 'setting-' + externalFilter.field + '-checkbox'\"\n [label]=\"externalFilter.title\"\n [model]=\"_inlineExternal[externalFilter.field]\"\n [disabled]=\"externalFilter.required\" />\n </button>\n }\n </mat-menu>\n </div>\n <div class=\"sd-external-filter-body\">\n <div class=\"row mx-0\" style=\"row-gap: 16px\">\n @for (item of _filterItems; track item.field) {\n @if (_inlineExternal[item.field]) {\n <div class=\"col-md-3 col-sm-6 px-8\" [class.col-lg-2]=\"_col === 2\" [class.col-lg-3]=\"_col === 3\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'AUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'MULTIPLEAUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'lazy-values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { form: form, externalFilter: _externalFilter, autoId: _autoId + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n }\n </div>\n @if (_filter?.manualFilter) {\n <div class=\"d-flex justify-content-end mt-16 px-8\">\n <sd-button\n [autoId]=\"_autoId + 'submit'\"\n [disabled]=\"form.invalid\"\n type=\"fill\"\n color=\"primary\"\n [title]=\"'core.component.table.search' | sdTranslate\"\n prefixIcon=\"filter_alt\"\n (click)=\"onSubmit()\">\n </sd-button>\n </div>\n }\n </div>\n </sd-section>\n }\n}\n", styles: [":host{display:block;padding-left:0;padding-right:0}.sd-external-filter-body{padding:16px 8px}::ng-deep .sd-custom-panel-filter-configuration{width:240px;max-height:550px;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "iconShape", "collapsed", "collapsible", "hideHeader"], outputs: ["collapsedChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["operatorChange", "sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "component", type: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2138
2533
|
}
|
|
2139
2534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ExternalFilterComponent, decorators: [{
|
|
2140
2535
|
type: Component,
|
|
@@ -2153,7 +2548,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
2153
2548
|
FilterValuesPipe,
|
|
2154
2549
|
SdCheckbox,
|
|
2155
2550
|
SdTranslatePipe,
|
|
2156
|
-
], template: "@let _filter = filter();\n@let _autoId = autoId();\n@let _filterItems = filterItems();\n@let _externalFilter = externalFilter();\n@let _inlineExternal = inlineExternal();\n@let _filtered = filtered();\n@let _col = col();\n\n@if (!_filter?.disabled) {\n @if (!isMobileOrTablet && _filterItems.length) {\n <sd-section\n [hideHeader]=\"_filter?.hideExternalFilterToolbar\"\n icon=\"filter_alt\"\n iconColor=\"secondary\"\n [title]=\"'core.component.table.filter' | sdTranslate\"\n [collapsible]=\"_filter?.collapsible ?? true\">\n <div class=\"d-flex gap-8 mr-4\" sdHeaderRight>\n <sd-button\n [autoId]=\"_autoId + 'clear'\"\n [disabled]=\"!_filtered\"\n type=\"text\"\n prefixIcon=\"cleaning_services\"\n [tooltip]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"$event.stopPropagation(); clearFilter($event)\"></sd-button>\n <sd-button\n [autoId]=\"_autoId + 'setting'\"\n type=\"text\"\n prefixIcon=\"settings\"\n [tooltip]=\"'core.component.table.customize' | sdTranslate\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"></sd-button>\n <mat-menu #menu=\"matMenu\" class=\"sd-custom-panel-filter-configuration\" [attr.data-autoid]=\"_autoId + 'setting-menu'\">\n @for (externalFilter of _filterItems; track externalFilter.field) {\n <button\n [attr.data-autoid]=\"_autoId + 'setting-' + externalFilter.field\"\n mat-menu-item\n (click)=\"onCheckboxChange($event, externalFilter)\"\n [disabled]=\"externalFilter.required\">\n <sd-checkbox\n [autoId]=\"_autoId + 'setting-' + externalFilter.field + '-checkbox'\"\n [label]=\"externalFilter.title\"\n [model]=\"_inlineExternal[externalFilter.field]\"\n [disabled]=\"externalFilter.required\" />\n </button>\n }\n </mat-menu>\n </div>\n <div class=\"sd-external-filter-body\">\n <div class=\"row mx-0\" style=\"row-gap: 16px\">\n @for (item of _filterItems; track item.field) {\n @if (_inlineExternal[item.field]) {\n <div class=\"col-md-3 col-sm-6 px-8\" [class.col-lg-2]=\"_col === 2\" [class.col-lg-3]=\"_col === 3\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'AUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'MULTIPLEAUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'lazy-values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { form: form, externalFilter: _externalFilter, autoId: _autoId + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n }\n </div>\n @if (_filter?.manualFilter) {\n <div class=\"d-flex justify-content-end mt-16 px-8\">\n <sd-button\n [autoId]=\"_autoId + 'submit'\"\n [disabled]=\"form.invalid\"\n type=\"fill\"\n color=\"primary\"\n [title]=\"'core.component.table.search' | sdTranslate\"\n prefixIcon=\"filter_alt\"\n (click)=\"onSubmit()\">\n </sd-button>\n </div>\n }\n </div>\n </sd-section>\n }\n}\n", styles: [":host{display:block;padding-left:0;padding-right:0}.sd-external-filter-body{padding:16px 8px}::ng-deep .sd-custom-panel-filter-configuration{width:240px;max-height:550px;overflow-y:auto}\n"] }]
|
|
2551
|
+
], template: "@let _filter = filter();\n@let _autoId = autoId();\n@let _filterItems = filterItems();\n@let _externalFilter = externalFilter();\n@let _inlineExternal = inlineExternal();\n@let _filtered = filtered();\n@let _col = col();\n\n@if (!_filter?.disabled) {\n @if (!isMobileOrTablet && _filterItems.length) {\n <sd-section\n [hideHeader]=\"_filter?.hideExternalFilterToolbar\"\n icon=\"filter_alt\"\n iconColor=\"secondary\"\n [title]=\"'core.component.table.filter' | sdTranslate\"\n [collapsible]=\"_filter?.collapsible ?? true\"\n [(collapsed)]=\"collapsed\">\n <div class=\"d-flex gap-8 mr-4\" sdHeaderRight>\n <sd-button\n [autoId]=\"_autoId + 'clear'\"\n [disabled]=\"!_filtered\"\n type=\"text\"\n prefixIcon=\"cleaning_services\"\n [tooltip]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"$event.stopPropagation(); clearFilter($event)\"></sd-button>\n <sd-button\n [autoId]=\"_autoId + 'setting'\"\n type=\"text\"\n prefixIcon=\"settings\"\n [tooltip]=\"'core.component.table.customize' | sdTranslate\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"></sd-button>\n <mat-menu #menu=\"matMenu\" class=\"sd-custom-panel-filter-configuration\" [attr.data-autoid]=\"_autoId + 'setting-menu'\">\n @for (externalFilter of _filterItems; track externalFilter.field) {\n <button\n [attr.data-autoid]=\"_autoId + 'setting-' + externalFilter.field\"\n mat-menu-item\n (click)=\"onCheckboxChange($event, externalFilter)\"\n [disabled]=\"externalFilter.required\">\n <sd-checkbox\n [autoId]=\"_autoId + 'setting-' + externalFilter.field + '-checkbox'\"\n [label]=\"externalFilter.title\"\n [model]=\"_inlineExternal[externalFilter.field]\"\n [disabled]=\"externalFilter.required\" />\n </button>\n }\n </mat-menu>\n </div>\n <div class=\"sd-external-filter-body\">\n <div class=\"row mx-0\" style=\"row-gap: 16px\">\n @for (item of _filterItems; track item.field) {\n @if (_inlineExternal[item.field]) {\n <div class=\"col-md-3 col-sm-6 px-8\" [class.col-lg-2]=\"_col === 2\" [class.col-lg-3]=\"_col === 3\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'AUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'MULTIPLEAUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'lazy-values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { form: form, externalFilter: _externalFilter, autoId: _autoId + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n }\n </div>\n @if (_filter?.manualFilter) {\n <div class=\"d-flex justify-content-end mt-16 px-8\">\n <sd-button\n [autoId]=\"_autoId + 'submit'\"\n [disabled]=\"form.invalid\"\n type=\"fill\"\n color=\"primary\"\n [title]=\"'core.component.table.search' | sdTranslate\"\n prefixIcon=\"filter_alt\"\n (click)=\"onSubmit()\">\n </sd-button>\n </div>\n }\n </div>\n </sd-section>\n }\n}\n", styles: [":host{display:block;padding-left:0;padding-right:0}.sd-external-filter-body{padding:16px 8px}::ng-deep .sd-custom-panel-filter-configuration{width:240px;max-height:550px;overflow-y:auto}\n"] }]
|
|
2157
2552
|
}], ctorParameters: () => [] });
|
|
2158
2553
|
|
|
2159
2554
|
/**
|
|
@@ -2229,7 +2624,7 @@ class MobileFilterComponent {
|
|
|
2229
2624
|
this.drawer().close();
|
|
2230
2625
|
};
|
|
2231
2626
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: MobileFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2232
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: MobileFilterComponent, isStandalone: true, selector: "mobile-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, externalFilters: { classPropertyName: "externalFilters", publicName: "externalFilters", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, filterDefs: { classPropertyName: "filterDefs", publicName: "filterDefs", isSignal: true, isRequired: false, transformFunction: null }, filterRegister: { classPropertyName: "filterRegister", publicName: "filterRegister", isSignal: true, isRequired: false, transformFunction: null }, cacheValues: { classPropertyName: "cacheValues", publicName: "cacheValues", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "drawer", first: true, predicate: SdSideDrawer, descendants: true, isSignal: true }], ngImport: i0, template: "@let _autoId = autoId();\n@let _externalFilterItems = externalFilterItems();\n@let _columnItems = columnItems();\n@let _filterDefItems = filterDefItems();\n@let _workingColumnFilter = workingColumnFilter();\n@let _workingColumnOperator = workingColumnOperator();\n@let _workingExternalFilter = workingExternalFilter();\n@let _cacheValues = cacheValues();\n\n<sd-side-drawer\n #drawer\n [title]=\"'core.component.table.filter' | sdTranslate\"\n width=\"90vw\">\n <div class=\"mobile-filter-body\">\n <!-- ============================ -->\n <!-- 1. External filters (inline) -->\n <!-- ============================ -->\n @if (_externalFilterItems.length) {\n <section class=\"mobile-filter-section\">\n @for (item of _externalFilterItems; track item.field) {\n <div class=\"mobile-filter-row\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'lazy-values') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [multiple]=\"item.option.selection === 'MULTIPLE'\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { externalFilter: _workingExternalFilter, autoId: _autoId + 'ext-' + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n </section>\n }\n\n <!-- ============================ -->\n <!-- 2. Custom filterDef templates -->\n <!-- ============================ -->\n @if (_filterDefItems.length) {\n <section class=\"mobile-filter-section\">\n @for (def of _filterDefItems; track def.sdTableFilterDef()) {\n <div class=\"mobile-filter-row\" [attr.data-autoid]=\"_autoId + 'def-' + def.sdTableFilterDef()\">\n <ng-container\n *ngTemplateOutlet=\"def.templateRef!; context: { externalFilter: _workingExternalFilter }\">\n </ng-container>\n </div>\n }\n </section>\n }\n\n <!-- ============================ -->\n <!-- 3. Column filters -->\n <!-- ============================ -->\n @if (_columnItems.length) {\n <section class=\"mobile-filter-section\">\n @for (column of _columnItems; track column.field) {\n <div class=\"mobile-filter-row\" [attr.data-autoid]=\"_autoId + 'col-' + column.field\">\n <column-filter\n [autoId]=\"_autoId + 'col'\"\n [column]=\"column\"\n [columnFilter]=\"_workingColumnFilter\"\n [operator]=\"$any(_workingColumnOperator[column.field])\"\n (operatorChange)=\"_workingColumnOperator[column.field] = $event!\"\n [cacheValues]=\"_cacheValues\"\n isMobile>\n </column-filter>\n </div>\n }\n </section>\n }\n </div>\n\n <ng-container sdFooterRight>\n <div class=\"mobile-filter-footer\">\n <sd-button\n [autoId]=\"_autoId + 'cancel'\"\n class=\"mobile-filter-action\"\n (click)=\"onCancel()\"\n [title]=\"'core.confirm.no' | sdTranslate\"\n type=\"text\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId + 'apply'\"\n class=\"mobile-filter-action\"\n (click)=\"onApply()\"\n [title]=\"'core.confirm.yes' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </div>\n </ng-container>\n</sd-side-drawer>\n", styles: [".mobile-filter-body{display:flex;flex-direction:column;gap:16px;padding:8px 0}.mobile-filter-section{display:flex;flex-direction:column;gap:12px}.mobile-filter-row{display:flex;flex-direction:column}.mobile-filter-footer{display:flex;gap:8px;width:100%}.mobile-filter-action{flex:1 1 50%}.mobile-filter-action ::ng-deep button{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "component", type: SdSideDrawer, selector: "sd-side-drawer", inputs: ["title", "width", "hideClose", "disableBackdropClose", "beforeClose", "container", "drawerClass", "autoId"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["autoId", "column", "columnFilter", "cacheValues", "value", "operator", "isMobile"], outputs: ["operatorChange", "filterChange", "filterCommit"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2627
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: MobileFilterComponent, isStandalone: true, selector: "mobile-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, externalFilters: { classPropertyName: "externalFilters", publicName: "externalFilters", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, filterDefs: { classPropertyName: "filterDefs", publicName: "filterDefs", isSignal: true, isRequired: false, transformFunction: null }, filterRegister: { classPropertyName: "filterRegister", publicName: "filterRegister", isSignal: true, isRequired: false, transformFunction: null }, cacheValues: { classPropertyName: "cacheValues", publicName: "cacheValues", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "drawer", first: true, predicate: SdSideDrawer, descendants: true, isSignal: true }], ngImport: i0, template: "@let _autoId = autoId();\n@let _externalFilterItems = externalFilterItems();\n@let _columnItems = columnItems();\n@let _filterDefItems = filterDefItems();\n@let _workingColumnFilter = workingColumnFilter();\n@let _workingColumnOperator = workingColumnOperator();\n@let _workingExternalFilter = workingExternalFilter();\n@let _cacheValues = cacheValues();\n\n<sd-side-drawer\n #drawer\n [title]=\"'core.component.table.filter' | sdTranslate\"\n width=\"90vw\">\n <div class=\"mobile-filter-body\">\n <!-- ============================ -->\n <!-- 1. External filters (inline) -->\n <!-- ============================ -->\n @if (_externalFilterItems.length) {\n <section class=\"mobile-filter-section\">\n @for (item of _externalFilterItems; track item.field) {\n <div class=\"mobile-filter-row\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'lazy-values') {\n <sd-select\n [autoId]=\"_autoId + 'ext-' + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_workingExternalFilter[item.field]\"\n appearance=\"outline\"\n [multiple]=\"item.option.selection === 'MULTIPLE'\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { externalFilter: _workingExternalFilter, autoId: _autoId + 'ext-' + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n </section>\n }\n\n <!-- ============================ -->\n <!-- 2. Custom filterDef templates -->\n <!-- ============================ -->\n @if (_filterDefItems.length) {\n <section class=\"mobile-filter-section\">\n @for (def of _filterDefItems; track def.sdTableFilterDef()) {\n <div class=\"mobile-filter-row\" [attr.data-autoid]=\"_autoId + 'def-' + def.sdTableFilterDef()\">\n <ng-container\n *ngTemplateOutlet=\"def.templateRef!; context: { externalFilter: _workingExternalFilter }\">\n </ng-container>\n </div>\n }\n </section>\n }\n\n <!-- ============================ -->\n <!-- 3. Column filters -->\n <!-- ============================ -->\n @if (_columnItems.length) {\n <section class=\"mobile-filter-section\">\n @for (column of _columnItems; track column.field) {\n <div class=\"mobile-filter-row\" [attr.data-autoid]=\"_autoId + 'col-' + column.field\">\n <column-filter\n [autoId]=\"_autoId + 'col'\"\n [column]=\"column\"\n [columnFilter]=\"_workingColumnFilter\"\n [operator]=\"$any(_workingColumnOperator[column.field])\"\n (operatorChange)=\"_workingColumnOperator[column.field] = $event!\"\n [cacheValues]=\"_cacheValues\"\n isMobile>\n </column-filter>\n </div>\n }\n </section>\n }\n </div>\n\n <ng-container sdFooterRight>\n <div class=\"mobile-filter-footer\">\n <sd-button\n [autoId]=\"_autoId + 'cancel'\"\n class=\"mobile-filter-action\"\n (click)=\"onCancel()\"\n [title]=\"'core.confirm.no' | sdTranslate\"\n type=\"text\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId + 'apply'\"\n class=\"mobile-filter-action\"\n (click)=\"onApply()\"\n [title]=\"'core.confirm.yes' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </div>\n </ng-container>\n</sd-side-drawer>\n", styles: [".mobile-filter-body{display:flex;flex-direction:column;gap:16px;padding:8px 0}.mobile-filter-section{display:flex;flex-direction:column;gap:12px}.mobile-filter-row{display:flex;flex-direction:column}.mobile-filter-footer{display:flex;gap:8px;width:100%}.mobile-filter-action{flex:1 1 50%}.mobile-filter-action ::ng-deep button{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "component", type: SdSideDrawer, selector: "sd-side-drawer", inputs: ["title", "width", "hideClose", "disableBackdropClose", "beforeClose", "container", "drawerClass", "autoId"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["autoId", "column", "columnFilter", "cacheValues", "value", "operator", "isMobile"], outputs: ["operatorChange", "filterChange", "filterCommit"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["operatorChange", "sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange"] }, { kind: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2233
2628
|
}
|
|
2234
2629
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: MobileFilterComponent, decorators: [{
|
|
2235
2630
|
type: Component,
|
|
@@ -2299,7 +2694,7 @@ class SelectorActionComponent {
|
|
|
2299
2694
|
}
|
|
2300
2695
|
};
|
|
2301
2696
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SelectorActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2302
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SelectorActionComponent, isStandalone: true, selector: "selector-action", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, tableOption: { classPropertyName: "tableOption", publicName: "tableOption", isSignal: true, isRequired: false, transformFunction: null }, selectedTableItems: { classPropertyName: "selectedTableItems", publicName: "selectedTableItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clear: "clear" }, ngImport: i0, template: "@let _autoId = autoId();\n@let _moreLabel = moreLabel();\n@let _direct = directActions();\n@let _overflow = overflowActions();\n@if (opened()) {\n <sd-quick-action opened contained>\n <div class=\"sd-selection-message\" sdMessage role=\"status\">\n <span class=\"sd-selection-icon\" aria-hidden=\"true\"><sd-icon name=\"check_circle_outline\" /></span>\n <span>{{ message() }}</span>\n </div>\n <div class=\"sd-selection-actions\" sdAction>\n @for (entry of _direct; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon\"\n [color]=\"action.color\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\"\n (click)=\"onClickAction(action)\" />\n } @else {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon || 'more_horiz'\"\n [color]=\"action.color || 'secondary'\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\">\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n </sd-button>\n }\n }\n @if (_overflow.length) {\n <sd-button\n class=\"sd-selection-more\"\n size=\"sm\"\n suffixIcon=\"more_horiz\"\n [title]=\"_moreLabel\"\n color=\"secondary\"\n type=\"light\"\n [autoId]=\"_autoId ? _autoId + '-more-actions' : null\">\n @for (entry of _overflow; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n [tooltip]=\"action.tooltip\"\n (click)=\"onClickAction(action)\"\n >{{ action.title }}</sd-button-item\n >\n } @else {\n <sd-button-item-divider [title]=\"action.title\" />\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n }\n }\n </sd-button>\n }\n <button\n type=\"button\"\n class=\"sd-selection-clear\"\n [attr.aria-label]=\"clearLabel()\"\n [attr.data-autoid]=\"_autoId ? 'components-button-' + _autoId + '-clear-selection' : null\"\n (click)=\"onClear()\">\n <sd-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n </div>\n </sd-quick-action>\n}\n", styles: [":host{display:block;flex-shrink:0;min-width:0;padding-inline:8px;box-sizing:border-box}.sd-selection-message{display:flex;align-items:center;gap:8px;min-width:0;font-size:var(--sd-font-size-13, 13px);line-height:var(--sd-line-height-20, 20px)}.sd-selection-message>span:last-child{overflow-wrap:anywhere}.sd-selection-icon{display:flex;align-items:center;justify-content:center;flex:0 0 28px;height:28px;border-radius:var(--sd-radius-8, 8px);background:var(--sd-success-light, #e8f5e9);color:var(--sd-success-dark, #2e7d32)}.sd-selection-icon sd-icon,.sd-selection-icon mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px)}.sd-selection-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.sd-selection-clear{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;height:32px;border:0;border-radius:var(--sd-radius-8, 8px);color:var(--sd-text-secondary, #62676d);background:transparent;cursor:pointer}.sd-selection-clear:hover{background:var(--sd-surface-variant, #eef0f3)}.sd-selection-clear:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-selection-clear sd-icon,.sd-selection-clear mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px)}.sd-selection-menu-heading{padding:6px 12px 4px;color:var(--sd-text-secondary, #62676d);font-size:var(--sd-font-size-12, 12px);font-weight:var(--sd-font-weight-semibold, 600)}:host ::ng-deep sd-quick-action .c-quick-action.contained{flex-wrap:nowrap;gap:16px;padding:10px 12px;margin:8px 0;border:1px solid var(--sd-border, #dfe2e7);border-radius:var(--sd-radius-10, 10px);box-shadow:none}:host ::ng-deep sd-quick-action .c-quick-action.contained .c-quick-action-action{flex:0 0 auto!important}@media(max-width:600px){:host ::ng-deep sd-quick-action .c-quick-action.contained{flex-wrap:wrap;gap:8px}:host ::ng-deep sd-quick-action .c-quick-action.contained .c-quick-action-action{flex:1 1 100%!important}.sd-selection-actions{width:100%;gap:6px}.sd-selection-message{padding-right:36px}.sd-selection-actions sd-button{flex:1 1 auto}:host ::ng-deep .sd-selection-actions sd-button button{width:100%;min-height:40px}.sd-selection-clear{position:absolute;top:4px;right:8px;width:40px;flex-basis:40px;height:40px}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "component", type: SdButtonItemDivider, selector: "sd-button-item-divider", inputs: ["title"] }, { kind: "component", type: SdQuickAction, selector: "sd-quick-action", inputs: ["opened", "contained"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2697
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SelectorActionComponent, isStandalone: true, selector: "selector-action", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, tableOption: { classPropertyName: "tableOption", publicName: "tableOption", isSignal: true, isRequired: false, transformFunction: null }, selectedTableItems: { classPropertyName: "selectedTableItems", publicName: "selectedTableItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clear: "clear" }, ngImport: i0, template: "@let _autoId = autoId();\n@let _moreLabel = moreLabel();\n@let _direct = directActions();\n@let _overflow = overflowActions();\n@if (opened()) {\n <sd-quick-action opened contained>\n <div class=\"sd-selection-message\" sdMessage role=\"status\">\n <span class=\"sd-selection-icon\" aria-hidden=\"true\"><sd-icon name=\"check_circle_outline\" /></span>\n <span>{{ message() }}</span>\n </div>\n <div class=\"sd-selection-actions\" sdAction>\n @for (entry of _direct; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon\"\n [color]=\"action.color\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\"\n (click)=\"onClickAction(action)\" />\n } @else {\n <sd-button\n class=\"sd-selection-direct\"\n size=\"sm\"\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [tooltip]=\"action.tooltip\"\n [prefixIcon]=\"action.icon || 'more_horiz'\"\n [color]=\"action.color || 'secondary'\"\n [type]=\"action.type || 'light'\"\n [fontSet]=\"action.fontSet\"\n [title]=\"action.title\">\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n </sd-button>\n }\n }\n @if (_overflow.length) {\n <sd-button\n class=\"sd-selection-more\"\n size=\"sm\"\n suffixIcon=\"more_horiz\"\n [title]=\"_moreLabel\"\n color=\"secondary\"\n type=\"light\"\n [autoId]=\"_autoId ? _autoId + '-more-actions' : null\">\n @for (entry of _overflow; track entry.index) {\n @let action = entry.action;\n @if (action.variant === 'normal') {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index : null\"\n [prefixIcon]=\"action.icon\"\n [fontSet]=\"action.fontSet\"\n [color]=\"action.color\"\n [tooltip]=\"action.tooltip\"\n (click)=\"onClickAction(action)\"\n >{{ action.title }}</sd-button-item\n >\n } @else {\n <sd-button-item-divider [title]=\"action.title\" />\n @for (child of action.children; track $index) {\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-action-' + entry.index + '-' + $index : null\"\n [prefixIcon]=\"child.icon\"\n [fontSet]=\"child.fontSet\"\n [color]=\"child.color\"\n [tooltip]=\"child.tooltip\"\n (click)=\"onClickAction(child)\"\n >{{ child.title }}</sd-button-item\n >\n }\n }\n }\n </sd-button>\n }\n <button\n type=\"button\"\n class=\"sd-selection-clear\"\n [attr.aria-label]=\"clearLabel()\"\n [attr.data-autoid]=\"_autoId ? 'components-button-' + _autoId + '-clear-selection' : null\"\n (click)=\"onClear()\">\n <sd-icon name=\"close\" aria-hidden=\"true\" />\n </button>\n </div>\n </sd-quick-action>\n}\n", styles: [":host{display:block;flex-shrink:0;min-width:0;padding-inline:8px;box-sizing:border-box}.sd-selection-message{display:flex;align-items:center;gap:8px;min-width:0;font-size:var(--sd-font-size-13, 13px);line-height:var(--sd-line-height-20, 20px)}.sd-selection-message>span:last-child{overflow-wrap:anywhere}.sd-selection-icon{display:flex;align-items:center;justify-content:center;flex:0 0 28px;height:28px;border-radius:var(--sd-radius-8, 8px);background:var(--sd-success-light, #e8f5e9);color:var(--sd-success-dark, #2e7d32)}.sd-selection-icon sd-icon,.sd-selection-icon mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px)}.sd-selection-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.sd-selection-clear{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;height:32px;border:0;border-radius:var(--sd-radius-8, 8px);color:var(--sd-text-secondary, #62676d);background:transparent;cursor:pointer}.sd-selection-clear:hover{background:var(--sd-surface-variant, #eef0f3)}.sd-selection-clear:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-selection-clear sd-icon,.sd-selection-clear mat-icon{width:18px;height:18px;font-size:var(--sd-font-size-18, 18px)}.sd-selection-menu-heading{padding:6px 12px 4px;color:var(--sd-text-secondary, #62676d);font-size:var(--sd-font-size-12, 12px);font-weight:var(--sd-font-weight-semibold, 600)}:host ::ng-deep sd-quick-action .c-quick-action.contained{flex-wrap:nowrap;gap:16px;padding:10px 12px;margin:8px 0;border:1px solid var(--sd-border, #dfe2e7);border-radius:var(--sd-radius-10, 10px);box-shadow:none}:host ::ng-deep sd-quick-action .c-quick-action.contained .c-quick-action-action{flex:0 0 auto!important}@media(max-width:600px){:host ::ng-deep sd-quick-action .c-quick-action.contained{flex-wrap:wrap;gap:8px}:host ::ng-deep sd-quick-action .c-quick-action.contained .c-quick-action-action{flex:1 1 100%!important}.sd-selection-actions{width:100%;gap:6px}.sd-selection-message{padding-right:36px}.sd-selection-actions sd-button{flex:1 1 auto}:host ::ng-deep .sd-selection-actions sd-button button{width:100%;min-height:40px}.sd-selection-clear{position:absolute;top:4px;right:8px;width:40px;flex-basis:40px;height:40px}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "component", type: SdButtonItemDivider, selector: "sd-button-item-divider", inputs: ["title"] }, { kind: "component", type: SdQuickAction, selector: "sd-quick-action", inputs: ["opened", "contained"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2303
2698
|
}
|
|
2304
2699
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SelectorActionComponent, decorators: [{
|
|
2305
2700
|
type: Component,
|
|
@@ -2314,6 +2709,8 @@ const DEFAULT_TABLE_CONFIG = {
|
|
|
2314
2709
|
};
|
|
2315
2710
|
const SD_TABLE_CONFIGURATION = new InjectionToken('sd-table.configuration');
|
|
2316
2711
|
|
|
2712
|
+
const SD_TABLE_LAYOUT = new InjectionToken('SD_TABLE_LAYOUT');
|
|
2713
|
+
|
|
2317
2714
|
// Aggregate templates contain Angular view references; they must never enter the storage-key hash.
|
|
2318
2715
|
function storageColumns(columns) {
|
|
2319
2716
|
return columns.map(({ aggregate: _aggregate, ...column }) => column.type === 'children' ? { ...column, children: storageColumns(column.children) } : column);
|
|
@@ -2633,7 +3030,7 @@ class ConfigComponent {
|
|
|
2633
3030
|
this.dragDisabled = true;
|
|
2634
3031
|
}
|
|
2635
3032
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2636
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ConfigComponent, isStandalone: true, selector: "config", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, tableOption: { classPropertyName: "tableOption", publicName: "tableOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changes: "changes" }, providers: [ConfigService], viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true, isSignal: true }, { propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }], ngImport: i0, template: "@let _configuration = configuration();\n@let _autoId = autoId();\n@let _columns = ['invisible', 'title', 'width', 'fixed', 'truncate'];\n\n<sd-modal width=\"sm\" [title]=\"'core.component.table.setup' | sdTranslate\" #modal>\n @if (_configuration) {\n <div class=\"c-container sd-table-config\">\n <!-- why: drag handle l\u00E0 affordance duy nh\u1EA5t cho vi\u1EC7c \u0111\u1ED5i th\u1EE9 t\u1EF1 c\u1ED9t, v\u00E0 n\u00F3 kh\u00F4ng t\u1EF1 n\u00F3i ra\n \u0111i\u1EC1u \u0111\u00F3 \u2014 m\u1ED9t d\u00F2ng hint tr\u00E1nh vi\u1EC7c ng\u01B0\u1EDDi d\u00F9ng kh\u00F4ng bao gi\u1EDD ph\u00E1t hi\u1EC7n t\u00EDnh n\u0103ng.\n K\u00FD hi\u1EC7u \u283F n\u1EB1m S\u1EB4N trong chu\u1ED7i i18n (\u0111\u00FAng v\u1ECB tr\u00ED trong c\u00E2u), n\u00EAn kh\u00F4ng k\u00E8m icon ri\u00EAng. -->\n <p class=\"c-hint\">{{ 'core.component.table.config.drag-hint' | sdTranslate }}</p>\n\n <div class=\"c-table\">\n <table\n mat-table\n [dataSource]=\"_configuration.columns!\"\n cdkDropList\n [cdkDropListData]=\"_configuration.columns\"\n (cdkDropListDropped)=\"dropTable($event)\">\n <ng-container matColumnDef=\"invisible\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.form-builder.display' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <div class=\"c-display-cell\">\n <button\n type=\"button\"\n class=\"c-handle\"\n [title]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n [attr.aria-label]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n (mousedown)=\"handleMouseDown()\"\n (mouseup)=\"handleMouseUp()\">\n <sd-icon name=\"drag_indicator\" aria-hidden=\"true\"></sd-icon>\n </button>\n <!-- why: \u00F4 \"Hi\u1EC3n th\u1ECB\" KH\u00D4NG bao gi\u1EDD b\u1ECB kho\u00E1 \u2014 n\u00F3 l\u00E0 \u0111\u01B0\u1EDDng duy nh\u1EA5t \u0111\u1EC3 b\u1EADt l\u1EA1i m\u1ED9t\n c\u1ED9t \u0111\u00E3 t\u1EAFt. -->\n <sd-checkbox [model]=\"!item.invisible\" (modelChange)=\"item.invisible = !item.invisible\" />\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.table.column-header' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.title\"\n [(model)]=\"item.title\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"width\">\n <th mat-header-cell class=\"c-th c-col-width\" *matHeaderCellDef>\n {{ 'core.component.table.width' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-width\" *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.width\"\n [(model)]=\"item.width\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"fixed\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.fixed' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.fixed\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"truncate\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.char-limit' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.truncate\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"_columns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: _columns\"\n [class.c-row-hidden]=\"isRowDisabled(row)\"\n cdkDrag\n [cdkDragData]=\"row\"\n cdkDragLockAxis=\"y\"\n [cdkDragDisabled]=\"dragDisabled\">\n </tr>\n </table>\n </div>\n </div>\n }\n <ng-container sdFooterRight>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-skip' : null\"\n (click)=\"close()\"\n [title]=\"'core.component.table.skip' | sdTranslate\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-reset' : null\"\n (click)=\"onReset()\"\n [title]=\"'core.component.form-builder.default' | sdTranslate\"\n color=\"primary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-apply' : null\"\n (click)=\"onSave()\"\n [title]=\"'core.component.table.apply' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </ng-container>\n</sd-modal>\n", styles: [".c-container{position:relative;min-height:200px}.c-hint{margin:0 0 12px;color:var(--sd-text-secondary, #6b7280);font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px)}.c-table{position:relative;overflow:auto;max-height:60vh;border:1px solid var(--sd-border, rgba(0, 0, 0, .08));border-radius:var(--sd-radius-8, 8px)}.c-table table{--mat-table-header-container-height: 40px;--mat-table-row-item-container-height: 48px;width:100%;background:transparent}.c-table .c-th{font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-13, 13px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #6b7280);background:var(--sd-surface, #f7f8fa);white-space:nowrap}.c-table .mat-mdc-header-cell,.c-table .mat-mdc-cell{padding:4px 12px;vertical-align:middle;border-bottom-color:var(--sd-border, rgba(0, 0, 0, .08))}.c-table .mat-mdc-header-cell:first-of-type,.c-table .mat-mdc-cell:first-of-type{padding-left:12px}.c-table .mat-mdc-row:last-of-type .mat-mdc-cell{border-bottom:none}.c-table .mat-mdc-row:hover .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .02))}.c-table .c-col-width{width:104px}.c-table .c-col-toggle{width:88px;text-align:center}sd-checkbox{display:inline-flex;align-items:center;vertical-align:middle}sd-checkbox ::ng-deep .mat-mdc-checkbox{display:flex}sd-checkbox ::ng-deep .mat-internal-form-field{margin:0}sd-checkbox ::ng-deep .mat-mdc-checkbox .mdc-label{padding:0}.c-display-cell{display:flex;align-items:center;gap:8px}.c-handle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:none;color:var(--sd-text-disabled, #b6bcc6);cursor:grab;transition:color .15s ease}.c-handle:hover,.c-handle:focus-visible{color:var(--sd-text-secondary, #6b7280);outline:none}.c-handle:active{cursor:grabbing}.c-row-hidden .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .015))}.c-row-hidden sd-input,.c-row-hidden .c-col-toggle sd-checkbox{opacity:.55}.cdk-drag-preview{display:table;border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface, #fff);outline:1px solid var(--sd-primary, #2a66f4);box-shadow:0 12px 28px #00000029,0 2px 8px #00000014;opacity:.98}.cdk-drag-preview .mat-mdc-cell{border-bottom:none;padding:4px 12px;vertical-align:middle}.cdk-drag-preview .c-handle{color:var(--sd-primary, #2a66f4);cursor:grabbing}.cdk-drag-placeholder .mat-mdc-cell{background:var(--sd-primary-light, rgba(42, 102, 244, .06));border-bottom:none;box-shadow:inset 0 1px 0 var(--sd-primary, #2a66f4),inset 0 -1px 0 var(--sd-primary, #2a66f4)}.cdk-drag-placeholder .mat-mdc-cell>*{visibility:hidden}.cdk-drag-animating,.c-table.cdk-drop-list-dragging .mat-mdc-row:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(0,0,.2,1)}.c-table.cdk-drop-list-dragging .mat-mdc-row:hover .mat-mdc-cell{background:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: CdkTableModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
|
|
3033
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ConfigComponent, isStandalone: true, selector: "config", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, tableOption: { classPropertyName: "tableOption", publicName: "tableOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changes: "changes" }, providers: [ConfigService], viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true, isSignal: true }, { propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }], ngImport: i0, template: "@let _configuration = configuration();\n@let _autoId = autoId();\n@let _columns = ['invisible', 'title', 'width', 'fixed', 'truncate'];\n\n<sd-modal width=\"sm\" [title]=\"'core.component.table.setup' | sdTranslate\" #modal>\n @if (_configuration) {\n <div class=\"c-container sd-table-config\">\n <!-- why: drag handle l\u00E0 affordance duy nh\u1EA5t cho vi\u1EC7c \u0111\u1ED5i th\u1EE9 t\u1EF1 c\u1ED9t, v\u00E0 n\u00F3 kh\u00F4ng t\u1EF1 n\u00F3i ra\n \u0111i\u1EC1u \u0111\u00F3 \u2014 m\u1ED9t d\u00F2ng hint tr\u00E1nh vi\u1EC7c ng\u01B0\u1EDDi d\u00F9ng kh\u00F4ng bao gi\u1EDD ph\u00E1t hi\u1EC7n t\u00EDnh n\u0103ng.\n K\u00FD hi\u1EC7u \u283F n\u1EB1m S\u1EB4N trong chu\u1ED7i i18n (\u0111\u00FAng v\u1ECB tr\u00ED trong c\u00E2u), n\u00EAn kh\u00F4ng k\u00E8m icon ri\u00EAng. -->\n <p class=\"c-hint\">{{ 'core.component.table.config.drag-hint' | sdTranslate }}</p>\n\n <div class=\"c-table\">\n <table\n mat-table\n [dataSource]=\"_configuration.columns!\"\n cdkDropList\n [cdkDropListData]=\"_configuration.columns\"\n (cdkDropListDropped)=\"dropTable($event)\">\n <ng-container matColumnDef=\"invisible\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.form-builder.display' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <div class=\"c-display-cell\">\n <button\n type=\"button\"\n class=\"c-handle\"\n [title]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n [attr.aria-label]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n (mousedown)=\"handleMouseDown()\"\n (mouseup)=\"handleMouseUp()\">\n <sd-icon name=\"drag_indicator\" aria-hidden=\"true\"></sd-icon>\n </button>\n <!-- why: \u00F4 \"Hi\u1EC3n th\u1ECB\" KH\u00D4NG bao gi\u1EDD b\u1ECB kho\u00E1 \u2014 n\u00F3 l\u00E0 \u0111\u01B0\u1EDDng duy nh\u1EA5t \u0111\u1EC3 b\u1EADt l\u1EA1i m\u1ED9t\n c\u1ED9t \u0111\u00E3 t\u1EAFt. -->\n <sd-checkbox [model]=\"!item.invisible\" (modelChange)=\"item.invisible = !item.invisible\" />\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.table.column-header' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.title\"\n [(model)]=\"item.title\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"width\">\n <th mat-header-cell class=\"c-th c-col-width\" *matHeaderCellDef>\n {{ 'core.component.table.width' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-width\" *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.width\"\n [(model)]=\"item.width\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"fixed\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.fixed' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.fixed\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"truncate\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.char-limit' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.truncate\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"_columns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: _columns\"\n [class.c-row-hidden]=\"isRowDisabled(row)\"\n cdkDrag\n [cdkDragData]=\"row\"\n cdkDragLockAxis=\"y\"\n [cdkDragDisabled]=\"dragDisabled\">\n </tr>\n </table>\n </div>\n </div>\n }\n <ng-container sdFooterRight>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-skip' : null\"\n (click)=\"close()\"\n [title]=\"'core.component.table.skip' | sdTranslate\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-reset' : null\"\n (click)=\"onReset()\"\n [title]=\"'core.component.form-builder.default' | sdTranslate\"\n color=\"primary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-apply' : null\"\n (click)=\"onSave()\"\n [title]=\"'core.component.table.apply' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </ng-container>\n</sd-modal>\n", styles: [".c-container{position:relative;min-height:200px}.c-hint{margin:0 0 12px;color:var(--sd-text-secondary, #6b7280);font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px)}.c-table{position:relative;overflow:auto;max-height:60vh;border:1px solid var(--sd-border, rgba(0, 0, 0, .08));border-radius:var(--sd-radius-8, 8px)}.c-table table{--mat-table-header-container-height: 40px;--mat-table-row-item-container-height: 48px;width:100%;background:transparent}.c-table .c-th{font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-13, 13px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #6b7280);background:var(--sd-surface, #f7f8fa);white-space:nowrap}.c-table .mat-mdc-header-cell,.c-table .mat-mdc-cell{padding:4px 12px;vertical-align:middle;border-bottom-color:var(--sd-border, rgba(0, 0, 0, .08))}.c-table .mat-mdc-header-cell:first-of-type,.c-table .mat-mdc-cell:first-of-type{padding-left:12px}.c-table .mat-mdc-row:last-of-type .mat-mdc-cell{border-bottom:none}.c-table .mat-mdc-row:hover .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .02))}.c-table .c-col-width{width:104px}.c-table .c-col-toggle{width:88px;text-align:center}sd-checkbox{display:inline-flex;align-items:center;vertical-align:middle}sd-checkbox ::ng-deep .mat-mdc-checkbox{display:flex}sd-checkbox ::ng-deep .mat-internal-form-field{margin:0}sd-checkbox ::ng-deep .mat-mdc-checkbox .mdc-label{padding:0}.c-display-cell{display:flex;align-items:center;gap:8px}.c-handle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:none;color:var(--sd-text-disabled, #b6bcc6);cursor:grab;transition:color .15s ease}.c-handle:hover,.c-handle:focus-visible{color:var(--sd-text-secondary, #6b7280);outline:none}.c-handle:active{cursor:grabbing}.c-row-hidden .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .015))}.c-row-hidden sd-input,.c-row-hidden .c-col-toggle sd-checkbox{opacity:.55}.cdk-drag-preview{display:table;border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface, #fff);outline:1px solid var(--sd-primary, #2a66f4);box-shadow:0 12px 28px #00000029,0 2px 8px #00000014;opacity:.98}.cdk-drag-preview .mat-mdc-cell{border-bottom:none;padding:4px 12px;vertical-align:middle}.cdk-drag-preview .c-handle{color:var(--sd-primary, #2a66f4);cursor:grabbing}.cdk-drag-placeholder .mat-mdc-cell{background:var(--sd-primary-light, rgba(42, 102, 244, .06));border-bottom:none;box-shadow:inset 0 1px 0 var(--sd-primary, #2a66f4),inset 0 -1px 0 var(--sd-primary, #2a66f4)}.cdk-drag-placeholder .mat-mdc-cell>*{visibility:hidden}.cdk-drag-animating,.c-table.cdk-drop-list-dragging .mat-mdc-row:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(0,0,.2,1)}.c-table.cdk-drop-list-dragging .mat-mdc-row:hover .mat-mdc-cell{background:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: CdkTableModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
|
|
2637
3034
|
}
|
|
2638
3035
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ConfigComponent, decorators: [{
|
|
2639
3036
|
type: Component,
|
|
@@ -2715,11 +3112,11 @@ class ViewComponent {
|
|
|
2715
3112
|
this.item().meta.display[this.column().field]?.click?.();
|
|
2716
3113
|
};
|
|
2717
3114
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2718
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ViewComponent, isStandalone: true, selector: "view", inputs: { autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: true, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <sd-badge\n
|
|
3115
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ViewComponent, isStandalone: true, selector: "view", inputs: { autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: true, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <!-- why: ch\u1EC9 bind (click) khi c\u1ED9t c\u00F3 `click` \u2014 badge th\u00E0nh role=\"button\" + tabindex=0 ngay khi output c\u00F3\n ng\u01B0\u1EDDi l\u1EAFng nghe, n\u00EAn bind v\u00F4 \u0111i\u1EC1u ki\u1EC7n bi\u1EBFn m\u1ECDi badge trong b\u1EA3ng th\u00E0nh n\u00FAt. Tooltip \u0111i qua input\n `tooltip` c\u1EE7a badge: [sdTooltip] tr\u00EAn host th\u00EAm tooltip th\u1EE9 hai khi ch\u1EEF c\u1EE7a badge b\u1ECB c\u1EAFt.\n Tooltip c\u1EE7a c\u1ED9t \u0111\u1EE9ng tr\u01B0\u1EDBc tooltip do useBadge tr\u1EA3 v\u1EC1. -->\n @let _badgeTooltip = view.tooltip || view.badge.tooltip;\n @if (view.click) {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [label]=\"view.badge.label\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"_badgeTooltip\"\n (click)=\"view.click()\">\n </sd-badge>\n } @else {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [label]=\"view.badge.label\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"_badgeTooltip\">\n </sd-badge>\n }\n }\n } @else {\n @if (view.click) {\n <div\n #contentContainer\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_truncateEnable\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n <a [attr.data-autoId]=\"_autoId\" href=\"javascript:;\" (click)=\"view.click()\">\n {{ view.data }}\n </a>\n </div>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_isCollapsed\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n {{ view.data }}\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div [attr.data-autoId]=\"_autoId\" class=\"text-break\" [style]=\"view.cellStyle\" [sdTooltip]=\"view.tooltip || ''\">\n {{ view.data }}\n </div>\n }\n <!-- End -->\n }\n }\n }\n}\n", styles: [".c-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:var(--sd-font-size-12, 12px);cursor:pointer;outline:none}.c-collapse:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host [role=button]:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "label", "description", "tooltip", "icon", "size", "pulse"], outputs: ["click"] }, { kind: "pipe", type: SdSafeHtmlPipe, name: "sdSafeHtml" }, { kind: "directive", type: SdTooltipDirective, selector: "[sdTooltip]", inputs: ["sdTooltip", "sdTooltipPosition", "sdTooltipDelay", "sdTooltipColor"] }, { kind: "pipe", type: ToStringPipe, name: "asString" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2719
3116
|
}
|
|
2720
3117
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ViewComponent, decorators: [{
|
|
2721
3118
|
type: Component,
|
|
2722
|
-
args: [{ selector: 'view', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdBadge, SdSafeHtmlPipe, SdTooltipDirective, ToStringPipe, SdTranslatePipe], template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <sd-badge\n
|
|
3119
|
+
args: [{ selector: 'view', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdBadge, SdSafeHtmlPipe, SdTooltipDirective, ToStringPipe, SdTranslatePipe], template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <!-- why: ch\u1EC9 bind (click) khi c\u1ED9t c\u00F3 `click` \u2014 badge th\u00E0nh role=\"button\" + tabindex=0 ngay khi output c\u00F3\n ng\u01B0\u1EDDi l\u1EAFng nghe, n\u00EAn bind v\u00F4 \u0111i\u1EC1u ki\u1EC7n bi\u1EBFn m\u1ECDi badge trong b\u1EA3ng th\u00E0nh n\u00FAt. Tooltip \u0111i qua input\n `tooltip` c\u1EE7a badge: [sdTooltip] tr\u00EAn host th\u00EAm tooltip th\u1EE9 hai khi ch\u1EEF c\u1EE7a badge b\u1ECB c\u1EAFt.\n Tooltip c\u1EE7a c\u1ED9t \u0111\u1EE9ng tr\u01B0\u1EDBc tooltip do useBadge tr\u1EA3 v\u1EC1. -->\n @let _badgeTooltip = view.tooltip || view.badge.tooltip;\n @if (view.click) {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [label]=\"view.badge.label\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"_badgeTooltip\"\n (click)=\"view.click()\">\n </sd-badge>\n } @else {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [label]=\"view.badge.label\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"_badgeTooltip\">\n </sd-badge>\n }\n }\n } @else {\n @if (view.click) {\n <div\n #contentContainer\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_truncateEnable\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n <a [attr.data-autoId]=\"_autoId\" href=\"javascript:;\" (click)=\"view.click()\">\n {{ view.data }}\n </a>\n </div>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_isCollapsed\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n {{ view.data }}\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div [attr.data-autoId]=\"_autoId\" class=\"text-break\" [style]=\"view.cellStyle\" [sdTooltip]=\"view.tooltip || ''\">\n {{ view.data }}\n </div>\n }\n <!-- End -->\n }\n }\n }\n}\n", styles: [".c-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:var(--sd-font-size-12, 12px);cursor:pointer;outline:none}.c-collapse:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host [role=button]:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}\n"] }]
|
|
2723
3120
|
}], ctorParameters: () => [] });
|
|
2724
3121
|
|
|
2725
3122
|
class DesktopCellComponent {
|
|
@@ -2805,7 +3202,7 @@ class DesktopCommand {
|
|
|
2805
3202
|
});
|
|
2806
3203
|
_commands = computed(() => this.commands() || []);
|
|
2807
3204
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DesktopCommand, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2808
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: DesktopCommand, isStandalone: true, selector: "desktop-command", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, itemIndex: { classPropertyName: "itemIndex", publicName: "itemIndex", isSignal: true, isRequired: true, transformFunction: null }, commands: { classPropertyName: "commands", publicName: "commands", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-autoid": "autoId()" } }, ngImport: i0, template: "@let _autoId = autoId();\n@let _item = item();\n@let filteredCommands = _item | filter: _commands() | async;\n\n@if (filteredCommands?.length) {\n @for (command of filteredCommands; track command.key) {\n @let _meta = _item | command: command;\n @if (command.type === 'normal') {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u0111\u00E2y l\u00E0 <button> TH\u1EACT, v\u1EABn nh\u1EADn tab focus nh\u01B0ng screen reader\n kh\u00F4ng \u0111\u1ECDc \u0111\u01B0\u1EE3c g\u00EC (n\u00FAt ch\u1EC9 c\u00F3 icon, kh\u00F4ng c\u00F3 text). Thay b\u1EB1ng aria-label l\u1EA5y t\u1EEB ch\u00EDnh\n ti\u00EAu \u0111\u1EC1 command \u0111ang hi\u1EC3n th\u1ECB \u1EDF tooltip. -->\n <button\n type=\"button\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n (click)=\"command.click(_item.data)\"\n [matTooltip]=\"_meta.title\"\n [attr.aria-label]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n mat-icon-button>\n <sd-icon class=\"c-icon\" [color]=\"command.color || 'secondary'\" [fontSet]=\"command.fontSet\" [name]=\"_meta.icon\"></sd-icon>\n </button>\n } @else {\n <sd-button\n class=\"sd-command-trigger\"\n type=\"text\"\n size=\"sm\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n [tooltip]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n [prefixIcon]=\"_meta.icon || 'more_vert'\"\n [fontSet]=\"command.fontSet\">\n @for (childCommand of command.children; track childCommand.key) {\n @let _childMeta = _item | command: childCommand;\n <sd-button-item\n [autoId]=\"_autoId + '-' + command.key + '-' + childCommand.key\"\n [disabled]=\"_childMeta.disabled\"\n [color]=\"childCommand.color\"\n [prefixIcon]=\"_childMeta.htmlTemplate ? null : _childMeta.icon\"\n [fontSet]=\"childCommand.fontSet\"\n (click)=\"childCommand.click(item().data)\">\n @if (_childMeta.htmlTemplate) {\n <span [innerHTML]=\"_childMeta.htmlTemplate\"></span>\n } @else {\n {{ _childMeta.title }}\n }\n </sd-button-item>\n }\n </sd-button>\n }\n }\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}:host{display:flex;align-items:center}button[mat-icon-button]{width:24px;height:24px;line-height:var(--sd-line-height-24, 24px);padding:0}:host ::ng-deep button[mat-icon-button] .mat-mdc-button-touch-target{width:100%;height:100%}sd-icon.c-icon{color:var(--sd-text-secondary)!important;width:16px;height:16px;font-size:var(--sd-font-size-16, 16px);line-height:var(--sd-line-height-16, 16px)}button[mat-icon-button]:disabled sd-icon.c-icon{color:inherit!important}:host ::ng-deep .sd-command-trigger button.c-button{height:24px;width:24px;padding:0!important;max-width:24px}:host ::ng-deep .sd-command-trigger button.c-button .c-button-content-wrapper{gap:0}:host ::ng-deep .sd-command-trigger button.c-button .mat-mdc-button-touch-target{width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "pipe", type: CommandPipe, name: "command" }, { kind: "pipe", type: CommandFilterPipe, name: "filter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3205
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: DesktopCommand, isStandalone: true, selector: "desktop-command", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, itemIndex: { classPropertyName: "itemIndex", publicName: "itemIndex", isSignal: true, isRequired: true, transformFunction: null }, commands: { classPropertyName: "commands", publicName: "commands", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-autoid": "autoId()" } }, ngImport: i0, template: "@let _autoId = autoId();\n@let _item = item();\n@let filteredCommands = _item | filter: _commands() | async;\n\n@if (filteredCommands?.length) {\n @for (command of filteredCommands; track command.key) {\n @let _meta = _item | command: command;\n @if (command.type === 'normal') {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u0111\u00E2y l\u00E0 <button> TH\u1EACT, v\u1EABn nh\u1EADn tab focus nh\u01B0ng screen reader\n kh\u00F4ng \u0111\u1ECDc \u0111\u01B0\u1EE3c g\u00EC (n\u00FAt ch\u1EC9 c\u00F3 icon, kh\u00F4ng c\u00F3 text). Thay b\u1EB1ng aria-label l\u1EA5y t\u1EEB ch\u00EDnh\n ti\u00EAu \u0111\u1EC1 command \u0111ang hi\u1EC3n th\u1ECB \u1EDF tooltip. -->\n <button\n type=\"button\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n (click)=\"command.click(_item.data)\"\n [matTooltip]=\"_meta.title\"\n [attr.aria-label]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n mat-icon-button>\n <sd-icon class=\"c-icon\" [color]=\"command.color || 'secondary'\" [fontSet]=\"command.fontSet\" [name]=\"_meta.icon\"></sd-icon>\n </button>\n } @else {\n <sd-button\n class=\"sd-command-trigger\"\n type=\"text\"\n size=\"sm\"\n [attr.data-autoid]=\"_autoId + '-' + command.key\"\n [tooltip]=\"_meta.title\"\n [disabled]=\"_meta.disabled\"\n [prefixIcon]=\"_meta.icon || 'more_vert'\"\n [fontSet]=\"command.fontSet\">\n @for (childCommand of command.children; track childCommand.key) {\n @let _childMeta = _item | command: childCommand;\n <sd-button-item\n [autoId]=\"_autoId + '-' + command.key + '-' + childCommand.key\"\n [disabled]=\"_childMeta.disabled\"\n [color]=\"childCommand.color\"\n [prefixIcon]=\"_childMeta.htmlTemplate ? null : _childMeta.icon\"\n [fontSet]=\"childCommand.fontSet\"\n (click)=\"childCommand.click(item().data)\">\n @if (_childMeta.htmlTemplate) {\n <span [innerHTML]=\"_childMeta.htmlTemplate\"></span>\n } @else {\n {{ _childMeta.title }}\n }\n </sd-button-item>\n }\n </sd-button>\n }\n }\n}\n", styles: [".text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}:host{display:flex;align-items:center}button[mat-icon-button]{width:24px;height:24px;line-height:var(--sd-line-height-24, 24px);padding:0}:host ::ng-deep button[mat-icon-button] .mat-mdc-button-touch-target{width:100%;height:100%}sd-icon.c-icon{color:var(--sd-text-secondary)!important;width:16px;height:16px;font-size:var(--sd-font-size-16, 16px);line-height:var(--sd-line-height-16, 16px)}button[mat-icon-button]:disabled sd-icon.c-icon{color:inherit!important}:host ::ng-deep .sd-command-trigger button.c-button{height:24px;width:24px;padding:0!important;max-width:24px}:host ::ng-deep .sd-command-trigger button.c-button .c-button-content-wrapper{gap:0}:host ::ng-deep .sd-command-trigger button.c-button .mat-mdc-button-touch-target{width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "pipe", type: CommandPipe, name: "command" }, { kind: "pipe", type: CommandFilterPipe, name: "filter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2809
3206
|
}
|
|
2810
3207
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DesktopCommand, decorators: [{
|
|
2811
3208
|
type: Component,
|
|
@@ -3090,7 +3487,7 @@ class SdPopupExport {
|
|
|
3090
3487
|
return '';
|
|
3091
3488
|
};
|
|
3092
3489
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdPopupExport, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3093
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.21", type: SdPopupExport, isStandalone: true, selector: "sd-popup-export", inputs: { _tableOption: { classPropertyName: "_tableOption", publicName: "tableOption", isSignal: false, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { export: "export" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true }, { propertyName: "listGroups", first: true, predicate: ["listGroups"], descendants: true }], ngImport: i0, template: "<sd-modal width=\"907px\" [title]=\"'Exported template'\" #modal>\n <div class=\"row\">\n <div *ngIf=\"!files?.length\" class=\"col-12\">\n <div class=\"c-empty\">\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" />\n <div class=\"T14R\">{{ 'There are no exported templates' }}</div>\n </div>\n </div>\n <ng-container *ngIf=\"files?.length\">\n <div class=\"col-12\">\n <div class=\"c-table\" style=\"max-height: 50vh\">\n <table mat-table [dataSource]=\"files\">\n <ng-container matColumnDef=\"stt\">\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\n {{ idx + 1 }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"fileName\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>\n {{ 'File name' }}\n </th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n {{ item.fileName }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\"></th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n <div class=\"d-flex\">\n <button mat-icon-button aria-label=\"delete\" (click)=\"removeFile(item)\">\n <sd-icon name=\"delete\"></sd-icon>\n </button>\n <button mat-icon-button aria-label=\"download\" (click)=\"onExport(item)\">\n <sd-icon name=\"download\"></sd-icon>\n </button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'fileName', 'action']; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: ['stt', 'fileName', 'action']\"></tr>\n </table>\n </div>\n </div>\n <div *ngIf=\"files.length < 5\" class=\"col-12 mt-10\">\n <sd-button class=\"mr-4\" [title]=\"'New template'\" (click)=\"enableCreating = true\" color=\"info\" [disabled]=\"enableCreating\">\n </sd-button>\n <sd-button *ngIf=\"exportOption?.enableUpload\" [title]=\"'Upload template'\" (click)=\"uploadTemplate()\" type=\"outline\">\n </sd-button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"enableCreating || !files?.length\">\n <div class=\"col-12 mt-20\">\n <div class=\"T14R\">{{ 'Select columns for creating template' }}:</div>\n </div>\n <div class=\"col-12\">\n <mat-chip-listbox selectable=\"true\" multiple=\"true\">\n <ng-container *ngFor=\"let column of columns\">\n <mat-chip-option [selected]=\"selected[column.field]\" (click)=\"selected[column.field] = !selected[column.field]\">\n {{ column.title }}\n </mat-chip-option>\n </ng-container>\n </mat-chip-listbox>\n </div>\n <div class=\"col-12 row\">\n <div class=\"col-10\">\n <sd-input [form]=\"form\" [label]=\"'Template name'\" [(model)]=\"templateName\" [validator]=\"templateNameValidator\"></sd-input>\n </div>\n <div class=\"col-2 mt-8\">\n <sd-button width=\"100%\" [title]=\"'Save'\" color=\"info\" (click)=\"createTemplate()\"> </sd-button>\n </div>\n </div>\n </ng-container>\n </div>\n</sd-modal>\n", styles: [".c-radio-group{display:flex;flex-direction:column;margin:15px 0}.c-radio-button{margin:5px}.c-empty{display:flex;flex-direction:column;justify-content:center;align-items:center;position:static;height:116px;background:var(--sd-table-export-panel-bg, #f6f6f6);border-radius:var(--sd-radius-4, 4px)}.c-table{position:relative;overflow:auto}.c-table table{width:100%}.c-table .c-th{font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-export-text, #000000)}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i3$
|
|
3490
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.21", type: SdPopupExport, isStandalone: true, selector: "sd-popup-export", inputs: { _tableOption: { classPropertyName: "_tableOption", publicName: "tableOption", isSignal: false, isRequired: false, transformFunction: null }, configuration: { classPropertyName: "configuration", publicName: "configuration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { export: "export" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], descendants: true }, { propertyName: "listGroups", first: true, predicate: ["listGroups"], descendants: true }], ngImport: i0, template: "<sd-modal width=\"907px\" [title]=\"'Exported template'\" #modal>\n <div class=\"row\">\n <div *ngIf=\"!files?.length\" class=\"col-12\">\n <div class=\"c-empty\">\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" />\n <div class=\"T14R\">{{ 'There are no exported templates' }}</div>\n </div>\n </div>\n <ng-container *ngIf=\"files?.length\">\n <div class=\"col-12\">\n <div class=\"c-table\" style=\"max-height: 50vh\">\n <table mat-table [dataSource]=\"files\">\n <ng-container matColumnDef=\"stt\">\n <th mat-header-cell class=\"c-th text-center px-5\" *matHeaderCellDef style=\"width: 50px\">#</th>\n <td class=\"text-center px-5\" mat-cell *matCellDef=\"let item; let idx = index\">\n {{ idx + 1 }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"fileName\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef>\n {{ 'File name' }}\n </th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n {{ item.fileName }}\n </td>\n </ng-container>\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell class=\"c-th px-5\" *matHeaderCellDef style=\"width: 80px\"></th>\n <td class=\"px-5\" mat-cell *matCellDef=\"let item\">\n <div class=\"d-flex\">\n <button mat-icon-button aria-label=\"delete\" (click)=\"removeFile(item)\">\n <sd-icon name=\"delete\"></sd-icon>\n </button>\n <button mat-icon-button aria-label=\"download\" (click)=\"onExport(item)\">\n <sd-icon name=\"download\"></sd-icon>\n </button>\n </div>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"['stt', 'fileName', 'action']; sticky: true\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: ['stt', 'fileName', 'action']\"></tr>\n </table>\n </div>\n </div>\n <div *ngIf=\"files.length < 5\" class=\"col-12 mt-10\">\n <sd-button class=\"mr-4\" [title]=\"'New template'\" (click)=\"enableCreating = true\" color=\"info\" [disabled]=\"enableCreating\">\n </sd-button>\n <sd-button *ngIf=\"exportOption?.enableUpload\" [title]=\"'Upload template'\" (click)=\"uploadTemplate()\" type=\"outline\">\n </sd-button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"enableCreating || !files?.length\">\n <div class=\"col-12 mt-20\">\n <div class=\"T14R\">{{ 'Select columns for creating template' }}:</div>\n </div>\n <div class=\"col-12\">\n <mat-chip-listbox selectable=\"true\" multiple=\"true\">\n <ng-container *ngFor=\"let column of columns\">\n <mat-chip-option [selected]=\"selected[column.field]\" (click)=\"selected[column.field] = !selected[column.field]\">\n {{ column.title }}\n </mat-chip-option>\n </ng-container>\n </mat-chip-listbox>\n </div>\n <div class=\"col-12 row\">\n <div class=\"col-10\">\n <sd-input [form]=\"form\" [label]=\"'Template name'\" [(model)]=\"templateName\" [validator]=\"templateNameValidator\"></sd-input>\n </div>\n <div class=\"col-2 mt-8\">\n <sd-button width=\"100%\" [title]=\"'Save'\" color=\"info\" (click)=\"createTemplate()\"> </sd-button>\n </div>\n </div>\n </ng-container>\n </div>\n</sd-modal>\n", styles: [".c-radio-group{display:flex;flex-direction:column;margin:15px 0}.c-radio-button{margin:5px}.c-empty{display:flex;flex-direction:column;justify-content:center;align-items:center;position:static;height:116px;background:var(--sd-table-export-panel-bg, #f6f6f6);border-radius:var(--sd-radius-4, 4px)}.c-table{position:relative;overflow:auto}.c-table table{width:100%}.c-table .c-th{font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-export-text, #000000)}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i3$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i3$2.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3094
3491
|
}
|
|
3095
3492
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdPopupExport, decorators: [{
|
|
3096
3493
|
type: Component,
|
|
@@ -3538,10 +3935,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
3538
3935
|
args: [{ name: 'sdGroup' }]
|
|
3539
3936
|
}] });
|
|
3540
3937
|
|
|
3938
|
+
/**
|
|
3939
|
+
* Row cap of an export without a known total and without `export.max`: one Excel sheet holds 1,048,576
|
|
3940
|
+
* rows including the header. It also bounds a source that ignores paging and never reports its end.
|
|
3941
|
+
*/
|
|
3942
|
+
const UNKNOWN_TOTAL_EXPORT_CAP = 1_048_575;
|
|
3541
3943
|
class TableExportService {
|
|
3542
3944
|
#excelService = inject(SdExcelService);
|
|
3543
3945
|
#i18n = inject(I18nService);
|
|
3544
3946
|
#injector = inject(Injector);
|
|
3947
|
+
// Cells export as the wall clock of ISdCoreConfiguration.timeZone, the same text the table shows.
|
|
3948
|
+
#dateTime = inject(SdDateTimeService);
|
|
3545
3949
|
// ==========================================
|
|
3546
3950
|
// SIGNAL STATE (Component sẽ bind trực tiếp vào đây)
|
|
3547
3951
|
// ==========================================
|
|
@@ -3593,10 +3997,11 @@ class TableExportService {
|
|
|
3593
3997
|
if (option.export?.type === 'custom')
|
|
3594
3998
|
return;
|
|
3595
3999
|
const { isCSV } = args;
|
|
3596
|
-
const
|
|
4000
|
+
const totalKnown = total !== undefined;
|
|
4001
|
+
const limit = this.#exportLimit(option) ?? (totalKnown ? undefined : UNKNOWN_TOTAL_EXPORT_CAP);
|
|
3597
4002
|
// why: `export.max` trước đây khai báo nhưng không ai đọc — export 100.000 dòng vẫn chạy dù đặt
|
|
3598
4003
|
// `max: 5000`. Chặn ngay khi tổng của bảng (server, hoặc số dòng local sau lọc) đã vượt.
|
|
3599
|
-
if (limit !== undefined && total > limit) {
|
|
4004
|
+
if (limit !== undefined && totalKnown && total > limit) {
|
|
3600
4005
|
this.#warnExportLimit(limit, total);
|
|
3601
4006
|
return;
|
|
3602
4007
|
}
|
|
@@ -3606,7 +4011,10 @@ class TableExportService {
|
|
|
3606
4011
|
const batch = option.export?.batch || 1;
|
|
3607
4012
|
let pageNumber = 0;
|
|
3608
4013
|
let exportItems = [];
|
|
3609
|
-
let currentTotal = total; // Biến cục bộ để track total trả về từ fetchChunk
|
|
4014
|
+
let currentTotal = total ?? 0; // Biến cục bộ để track total trả về từ fetchChunk
|
|
4015
|
+
// Unknown total: the source ended (hasMore false, an empty chunk, or a chunk that is not exactly
|
|
4016
|
+
// one page: shorter means the last page, longer means the source ignores paging and sent everything).
|
|
4017
|
+
let reachedEnd = false;
|
|
3610
4018
|
this.exporting.set(true);
|
|
3611
4019
|
const items = [];
|
|
3612
4020
|
let promises = [];
|
|
@@ -3617,12 +4025,21 @@ class TableExportService {
|
|
|
3617
4025
|
promises = [];
|
|
3618
4026
|
exportItems = [];
|
|
3619
4027
|
for (const result of results) {
|
|
4028
|
+
// why: chunks of one batch run in parallel; after the last page they can only be empty or a
|
|
4029
|
+
// newer snapshot of the source, never rows that belong to this export.
|
|
4030
|
+
if (reachedEnd)
|
|
4031
|
+
break;
|
|
3620
4032
|
if (result && 'items' in result) {
|
|
3621
4033
|
exportItems = [...exportItems, ...result.items];
|
|
3622
|
-
|
|
4034
|
+
if (totalKnown)
|
|
4035
|
+
currentTotal = result.total;
|
|
4036
|
+
else
|
|
4037
|
+
reachedEnd = !result.items.length || ('hasMore' in result ? !result.hasMore : result.items.length !== pageSize);
|
|
3623
4038
|
}
|
|
3624
4039
|
else if (Array.isArray(result)) {
|
|
3625
4040
|
exportItems = [...exportItems, ...result];
|
|
4041
|
+
if (!totalKnown)
|
|
4042
|
+
reachedEnd = result.length !== pageSize;
|
|
3626
4043
|
}
|
|
3627
4044
|
}
|
|
3628
4045
|
fetchedCount += exportItems.length;
|
|
@@ -3636,10 +4053,13 @@ class TableExportService {
|
|
|
3636
4053
|
const mappedResults = option.export.mapping(exportItems);
|
|
3637
4054
|
exportItems = mappedResults instanceof Promise ? await mappedResults : mappedResults;
|
|
3638
4055
|
}
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
4056
|
+
// Without a total there is no honest percentage; the button keeps its loading state instead.
|
|
4057
|
+
if (totalKnown) {
|
|
4058
|
+
const totalPage = Math.max(1, currentTotal / pageSize);
|
|
4059
|
+
const percent = Math.round(((pageNumber - 1) * 100.0) / totalPage);
|
|
4060
|
+
// Đảm bảo percent không vượt quá 100
|
|
4061
|
+
this.setExportProgress(percent);
|
|
4062
|
+
}
|
|
3643
4063
|
const allColumns = this.#allColumns(option);
|
|
3644
4064
|
const allExportedColumns = this.#allExportedColumns(option);
|
|
3645
4065
|
for (const item of exportItems) {
|
|
@@ -3686,13 +4106,13 @@ class TableExportService {
|
|
|
3686
4106
|
}
|
|
3687
4107
|
}
|
|
3688
4108
|
else if (column.type === 'date') {
|
|
3689
|
-
obj[fieldStr] =
|
|
4109
|
+
obj[fieldStr] = this.#dateTime.toFormat(itemValue, 'yyyy/MM/dd');
|
|
3690
4110
|
}
|
|
3691
4111
|
else if (column.type === 'datetime') {
|
|
3692
|
-
obj[fieldStr] =
|
|
4112
|
+
obj[fieldStr] = this.#dateTime.toFormat(itemValue, 'yyyy/MM/dd HH:mm:ss');
|
|
3693
4113
|
}
|
|
3694
4114
|
else if (column.type === 'time') {
|
|
3695
|
-
obj[fieldStr] =
|
|
4115
|
+
obj[fieldStr] = this.#dateTime.toFormat(itemValue, 'HH:mm:ss');
|
|
3696
4116
|
}
|
|
3697
4117
|
else if (column.type === 'values' || column.type === 'lazy-values') {
|
|
3698
4118
|
const vals = (Array.isArray(itemValue) ? itemValue : [itemValue]).filter(e => !!e?.toString());
|
|
@@ -3709,7 +4129,7 @@ class TableExportService {
|
|
|
3709
4129
|
}
|
|
3710
4130
|
};
|
|
3711
4131
|
// Vòng lặp lấy dữ liệu
|
|
3712
|
-
while (pageNumber * pageSize < currentTotal) {
|
|
4132
|
+
while (totalKnown ? pageNumber * pageSize < currentTotal : !reachedEnd) {
|
|
3713
4133
|
promises.push(fetchChunk(pageNumber, pageSize));
|
|
3714
4134
|
pageNumber++;
|
|
3715
4135
|
if (promises.length < batch)
|
|
@@ -4104,6 +4524,8 @@ class TableFormatService {
|
|
|
4104
4524
|
type: badge.type ?? 'round',
|
|
4105
4525
|
color: badge.color,
|
|
4106
4526
|
icon: badge.icon,
|
|
4527
|
+
label: badge.label,
|
|
4528
|
+
tooltip: badge.tooltip,
|
|
4107
4529
|
},
|
|
4108
4530
|
title: badge.title,
|
|
4109
4531
|
};
|
|
@@ -4142,7 +4564,7 @@ const buildColumnWidthMap = (column) => {
|
|
|
4142
4564
|
return result;
|
|
4143
4565
|
};
|
|
4144
4566
|
|
|
4145
|
-
const sortValue = (value, type) => {
|
|
4567
|
+
const sortValue = (value, type, dateTime) => {
|
|
4146
4568
|
if (value === null || value === undefined || value === '')
|
|
4147
4569
|
return null;
|
|
4148
4570
|
if (type === 'number') {
|
|
@@ -4150,15 +4572,21 @@ const sortValue = (value, type) => {
|
|
|
4150
4572
|
return Number.isNaN(number) ? null : number;
|
|
4151
4573
|
}
|
|
4152
4574
|
if (type === 'date' || type === 'datetime' || type === 'time') {
|
|
4153
|
-
|
|
4575
|
+
// why: a time of day has no zone, so only date/datetime values are read in the configured zone.
|
|
4576
|
+
const zone = type !== 'time' && dateTime && dateTime.timeZone !== 'local' ? dateTime : undefined;
|
|
4577
|
+
const parse = (input) => (zone ? (zone.parse(input)?.getTime() ?? NaN) : new Date(input).getTime());
|
|
4578
|
+
const time = value instanceof Date ? value.getTime() : typeof value === 'string' || typeof value === 'number' ? parse(value) : NaN;
|
|
4154
4579
|
return Number.isNaN(time) ? null : time;
|
|
4155
4580
|
}
|
|
4156
4581
|
return String(value);
|
|
4157
4582
|
};
|
|
4158
|
-
/**
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4583
|
+
/**
|
|
4584
|
+
* Internal local-sort comparison; intentionally not exported from the table entry point.
|
|
4585
|
+
* `dateTime` reads zone-less dates in `ISdCoreConfiguration.timeZone`; omitted or `'local'` keeps the machine zone.
|
|
4586
|
+
*/
|
|
4587
|
+
const compareLocalValues = (a, b, type, direction, dateTime) => {
|
|
4588
|
+
const first = sortValue(a, type, dateTime);
|
|
4589
|
+
const second = sortValue(b, type, dateTime);
|
|
4162
4590
|
// why: xếp rỗng trước khi xét chiều để DESC vẫn giữ rỗng ở cuối và không đảo các dòng bằng nhau.
|
|
4163
4591
|
if (first === null)
|
|
4164
4592
|
return second === null ? 0 : 1;
|
|
@@ -4170,26 +4598,110 @@ const compareLocalValues = (a, b, type, direction) => {
|
|
|
4170
4598
|
|
|
4171
4599
|
const isTableItem = (item) => !!item && typeof item === 'object' && 'data' in item && 'meta' in item;
|
|
4172
4600
|
const resolveItemData = (item) => (isTableItem(item) ? item.data : item);
|
|
4173
|
-
const
|
|
4601
|
+
const hasValue = (value) => value !== undefined && value !== null && value !== '';
|
|
4602
|
+
const hasActiveColumnFilter = (rawColumnFilter = {}, columns = [], columnOperator = {}) => columns.some(col => {
|
|
4603
|
+
// why: NULL / NOT_NULL lọc mà không cần giá trị (ô bị khoá, để trống).
|
|
4604
|
+
if (isNoDataColumnOperator(col, resolveOperator(col, columnOperator)))
|
|
4605
|
+
return true;
|
|
4174
4606
|
const v = rawColumnFilter[col.field];
|
|
4175
4607
|
if (Array.isArray(v))
|
|
4176
4608
|
return v.length > 0;
|
|
4609
|
+
// why: biên 0 của split-number là giá trị, không phải đầu trống.
|
|
4177
4610
|
if (v && typeof v === 'object')
|
|
4178
|
-
return
|
|
4179
|
-
return v
|
|
4611
|
+
return hasValue(v.from) || hasValue(v.to);
|
|
4612
|
+
return hasValue(v);
|
|
4180
4613
|
});
|
|
4181
|
-
|
|
4614
|
+
// why: cùng fallback với SdConvertToPagingReq để bảng local lọc giống bảng server.
|
|
4615
|
+
const resolveOperator = (column, columnOperator) => columnOperator[column.field] || column.filter?.operator?.default;
|
|
4616
|
+
// Hai vế đã trim + lowercase; không có operator thì giữ CONTAIN như trước.
|
|
4617
|
+
const matchesText = (value, operator, operand) => {
|
|
4618
|
+
switch (operator) {
|
|
4619
|
+
case 'EQUAL':
|
|
4620
|
+
return value === operand;
|
|
4621
|
+
case 'NOT_EQUAL':
|
|
4622
|
+
return value !== operand;
|
|
4623
|
+
case 'NOT_CONTAIN':
|
|
4624
|
+
return !value.includes(operand);
|
|
4625
|
+
case 'START_WITH':
|
|
4626
|
+
return value.startsWith(operand);
|
|
4627
|
+
case 'NOT_START_WITH':
|
|
4628
|
+
return !value.startsWith(operand);
|
|
4629
|
+
case 'END_WITH':
|
|
4630
|
+
return value.endsWith(operand);
|
|
4631
|
+
case 'NOT_END_WITH':
|
|
4632
|
+
return !value.endsWith(operand);
|
|
4633
|
+
default:
|
|
4634
|
+
return value.includes(operand);
|
|
4635
|
+
}
|
|
4636
|
+
};
|
|
4637
|
+
const NUMBER_PREFIX_OPERATORS = {
|
|
4638
|
+
'>=': 'GREATER_OR_EQUAL',
|
|
4639
|
+
'<=': 'LESS_OR_EQUAL',
|
|
4640
|
+
'>': 'GREATER_THAN',
|
|
4641
|
+
'<': 'LESS_THAN',
|
|
4642
|
+
};
|
|
4643
|
+
const compareNumber = (value, operator, operand) => {
|
|
4644
|
+
switch (operator) {
|
|
4645
|
+
case 'NOT_EQUAL':
|
|
4646
|
+
return value !== operand;
|
|
4647
|
+
case 'GREATER_THAN':
|
|
4648
|
+
return value > operand;
|
|
4649
|
+
case 'GREATER_OR_EQUAL':
|
|
4650
|
+
return value >= operand;
|
|
4651
|
+
case 'LESS_THAN':
|
|
4652
|
+
return value < operand;
|
|
4653
|
+
case 'LESS_OR_EQUAL':
|
|
4654
|
+
return value <= operand;
|
|
4655
|
+
default:
|
|
4656
|
+
return value === operand;
|
|
4657
|
+
}
|
|
4658
|
+
};
|
|
4659
|
+
const toFiniteNumber = (value) => NumberUtilities.parseFiniteNumber(value, { trim: true });
|
|
4660
|
+
const matchesNumberFilter = (rawValue, filter, operator) => {
|
|
4661
|
+
// why: filter split-number phát ra `{ from, to }`; thiếu đầu nào thì đầu đó mở.
|
|
4662
|
+
if (filter && typeof filter === 'object' && !Array.isArray(filter)) {
|
|
4663
|
+
const from = toFiniteNumber(filter.from);
|
|
4664
|
+
const to = toFiniteNumber(filter.to);
|
|
4665
|
+
if (from === null && to === null)
|
|
4666
|
+
return true;
|
|
4667
|
+
const value = toFiniteNumber(rawValue);
|
|
4668
|
+
return value !== null && (from === null || value >= from) && (to === null || value <= to);
|
|
4669
|
+
}
|
|
4670
|
+
// why: prefix gõ tay như `>=5` là ý định tường minh nên thắng operator trên dropdown.
|
|
4671
|
+
const prefixed = typeof filter === 'string' ? /^\s*(>=|<=|>|<)(.*)$/.exec(filter) : null;
|
|
4672
|
+
const operand = toFiniteNumber(prefixed ? prefixed[2] : filter);
|
|
4673
|
+
if (operand === null)
|
|
4674
|
+
return true;
|
|
4675
|
+
const value = toFiniteNumber(rawValue);
|
|
4676
|
+
return value !== null && compareNumber(value, prefixed ? NUMBER_PREFIX_OPERATORS[prefixed[1]] : operator, operand);
|
|
4677
|
+
};
|
|
4678
|
+
const matchesColumnFilter = (data, columns = [], rawColumnFilter = {}, columnOperator = {}, dateTime) => {
|
|
4679
|
+
const zoned = dateTime && dateTime.timeZone !== 'local' ? dateTime : undefined;
|
|
4182
4680
|
for (const column of columns) {
|
|
4183
4681
|
const { field, type } = column;
|
|
4184
|
-
const filterValue = (rawColumnFilter[field] || '').toString().trim().toLowerCase();
|
|
4185
4682
|
const rawColVal = resolveFieldValue(data, field);
|
|
4683
|
+
const operator = resolveOperator(column, columnOperator);
|
|
4684
|
+
// why: cùng nghĩa với Operator của @sdcorejs/utils — NULL là null / undefined, NOT_NULL là có giá trị khác null.
|
|
4685
|
+
if (isNoDataColumnOperator(column, operator)) {
|
|
4686
|
+
if ((rawColVal === null || rawColVal === undefined) !== (operator === 'NULL'))
|
|
4687
|
+
return false;
|
|
4688
|
+
continue;
|
|
4689
|
+
}
|
|
4690
|
+
// why: cột number đi riêng vì bước chuẩn hoá text bên dưới coi giá trị 0 (filter hoặc dòng) là rỗng.
|
|
4691
|
+
if (type === 'number') {
|
|
4692
|
+
if (!matchesNumberFilter(rawColVal, rawColumnFilter[field], resolveOperator(column, columnOperator))) {
|
|
4693
|
+
return false;
|
|
4694
|
+
}
|
|
4695
|
+
continue;
|
|
4696
|
+
}
|
|
4697
|
+
const filterValue = (rawColumnFilter[field] || '').toString().trim().toLowerCase();
|
|
4186
4698
|
const columnValue = (rawColVal || '').toString().trim().toLowerCase();
|
|
4187
4699
|
if (filterValue) {
|
|
4188
4700
|
if (!columnValue && type !== 'datetime' && type !== 'date' && type !== 'time') {
|
|
4189
4701
|
return false;
|
|
4190
4702
|
}
|
|
4191
4703
|
if (type === 'string') {
|
|
4192
|
-
if (columnValue
|
|
4704
|
+
if (!matchesText(columnValue, resolveOperator(column, columnOperator), filterValue)) {
|
|
4193
4705
|
return false;
|
|
4194
4706
|
}
|
|
4195
4707
|
}
|
|
@@ -4211,30 +4723,6 @@ const matchesColumnFilter = (data, columns = [], rawColumnFilter = {}) => {
|
|
|
4211
4723
|
return false;
|
|
4212
4724
|
}
|
|
4213
4725
|
}
|
|
4214
|
-
else if (type === 'number') {
|
|
4215
|
-
const fValue = +filterValue.replace('>=', '').replace('<=', '').replace('>', '').replace('<', '');
|
|
4216
|
-
const cValue = +columnValue;
|
|
4217
|
-
if (fValue || fValue === 0) {
|
|
4218
|
-
if (!cValue && cValue !== 0) {
|
|
4219
|
-
return false;
|
|
4220
|
-
}
|
|
4221
|
-
if (filterValue.indexOf('>=') > -1 && cValue < fValue) {
|
|
4222
|
-
return false;
|
|
4223
|
-
}
|
|
4224
|
-
else if (filterValue.indexOf('<=') > -1 && cValue > fValue) {
|
|
4225
|
-
return false;
|
|
4226
|
-
}
|
|
4227
|
-
else if (filterValue.indexOf('<') > -1 && cValue >= fValue) {
|
|
4228
|
-
return false;
|
|
4229
|
-
}
|
|
4230
|
-
else if (filterValue.indexOf('>') > -1 && cValue <= fValue) {
|
|
4231
|
-
return false;
|
|
4232
|
-
}
|
|
4233
|
-
else if (cValue !== fValue) {
|
|
4234
|
-
return false;
|
|
4235
|
-
}
|
|
4236
|
-
}
|
|
4237
|
-
}
|
|
4238
4726
|
else if (type === 'boolean') {
|
|
4239
4727
|
if ((filterValue === '1' || filterValue === 'true') && columnValue !== '1' && columnValue !== 'true') {
|
|
4240
4728
|
return false;
|
|
@@ -4246,13 +4734,15 @@ const matchesColumnFilter = (data, columns = [], rawColumnFilter = {}) => {
|
|
|
4246
4734
|
else if (type === 'datetime' || type === 'date' || type === 'time') {
|
|
4247
4735
|
const from = rawColumnFilter[field]?.from ?? rawColumnFilter[field];
|
|
4248
4736
|
const to = rawColumnFilter[field]?.to ?? rawColumnFilter[field];
|
|
4249
|
-
|
|
4250
|
-
const
|
|
4737
|
+
// why: a time of day has no zone, so only date/datetime rows are read in the configured zone.
|
|
4738
|
+
const zone = type === 'time' ? undefined : zoned;
|
|
4739
|
+
const fromDate = (zone ?? _SD_LOCAL_DATE_TIME).begin(from);
|
|
4740
|
+
const toDate = (zone ?? _SD_LOCAL_DATE_TIME).end(to);
|
|
4251
4741
|
if (fromDate || toDate) {
|
|
4252
4742
|
if (!columnValue) {
|
|
4253
4743
|
return false;
|
|
4254
4744
|
}
|
|
4255
|
-
const columnTime = new Date(columnValue).getTime();
|
|
4745
|
+
const columnTime = zone ? (zone.parse(rawColVal)?.getTime() ?? NaN) : new Date(columnValue).getTime();
|
|
4256
4746
|
const fromDateTime = fromDate?.getTime() || null;
|
|
4257
4747
|
const toDateTime = toDate?.getTime() || null;
|
|
4258
4748
|
if (fromDateTime && fromDateTime > columnTime) {
|
|
@@ -4271,11 +4761,13 @@ const filterLocalItems = (localItems, option, filterInfo) => {
|
|
|
4271
4761
|
const { columns } = option;
|
|
4272
4762
|
const { rawColumnFilter, orderBy, orderDirection, pageSize, pageNumber } = filterInfo;
|
|
4273
4763
|
const quickSearch = option.filter?.disabled ? undefined : option.filter?.quickSearch;
|
|
4274
|
-
const matchesData = (data) => matchesColumnFilter(data, columns, rawColumnFilter
|
|
4764
|
+
const matchesData = (data) => matchesColumnFilter(data, columns, rawColumnFilter, filterInfo.columnOperator, option.dateTime) &&
|
|
4765
|
+
matchesQuickSearch(data, quickSearch, filterInfo.quickSearch);
|
|
4275
4766
|
const treeOpt = option.tree;
|
|
4276
4767
|
const treeSearch = option.type === 'local' &&
|
|
4277
4768
|
treeOpt?.loadType === 'static' &&
|
|
4278
|
-
(hasActiveColumnFilter(rawColumnFilter, columns
|
|
4769
|
+
(hasActiveColumnFilter(rawColumnFilter, columns, filterInfo.columnOperator) ||
|
|
4770
|
+
quickSearchConditions(quickSearch, filterInfo.quickSearch).length > 0);
|
|
4279
4771
|
const treeSearchPredicate = treeSearch ? matchesData : undefined;
|
|
4280
4772
|
const items = treeSearch
|
|
4281
4773
|
? localItems.filter(item => subtreeMatches(resolveItemData(item), matchesData, treeOpt))
|
|
@@ -4287,7 +4779,7 @@ const filterLocalItems = (localItems, option, filterInfo) => {
|
|
|
4287
4779
|
items.sort((tableItemCurrent, tableItemNext) => {
|
|
4288
4780
|
const dataVal = resolveFieldValue(resolveItemData(tableItemCurrent), field);
|
|
4289
4781
|
const nextVal = resolveFieldValue(resolveItemData(tableItemNext), field);
|
|
4290
|
-
return compareLocalValues(dataVal, nextVal, type, orderDirection);
|
|
4782
|
+
return compareLocalValues(dataVal, nextVal, type, orderDirection, option.dateTime);
|
|
4291
4783
|
});
|
|
4292
4784
|
}
|
|
4293
4785
|
}
|
|
@@ -4931,9 +5423,125 @@ class SdTable {
|
|
|
4931
5423
|
configuration = signal(undefined);
|
|
4932
5424
|
items = signal([]);
|
|
4933
5425
|
selectedTableItems = signal([]);
|
|
5426
|
+
/** Record count of a known-total table; stays `undefined` with `paginate.total: 'unknown'`. */
|
|
4934
5427
|
total = signal(undefined);
|
|
4935
5428
|
loading = signal(false);
|
|
4936
5429
|
loadError = signal(false);
|
|
5430
|
+
/** `paginate.total: 'unknown'` on a server table. */
|
|
5431
|
+
unknownTotal = computed(() => isUnknownTotal(this.tableOption()));
|
|
5432
|
+
// why: unknown-total paging separates the page a read asks for from the page whose rows are on
|
|
5433
|
+
// screen. Requests use the target; range, row numbers and Next only use the shown page, which a
|
|
5434
|
+
// successful render alone may write, so a failed or stale read can never relabel the rows.
|
|
5435
|
+
#pageTarget = signal(undefined);
|
|
5436
|
+
#shownPage = signal(undefined);
|
|
5437
|
+
/** A read is waiting in the schedule (debounce) and has not started loading yet. */
|
|
5438
|
+
#readScheduled = signal(false);
|
|
5439
|
+
/** `option.loading`, then `SD_TABLE_CONFIGURATION.loading`, then the defaults, field by field. */
|
|
5440
|
+
loadingSettings = computed(() => resolveTableLoading(this.tableOption()?.loading, this.tableConfiguration?.loading));
|
|
5441
|
+
#refresh = new TableRefreshTimer((callback, ms) => {
|
|
5442
|
+
// why: a waiting timer outside the zone keeps it stable (whenStable, hydration); the callback runs inside it,
|
|
5443
|
+
// so its signal write also renders in zone apps that ignore changes outside the zone.
|
|
5444
|
+
const id = this.#zone.runOutsideAngular(() => setTimeout(() => this.#zone.run(callback), ms));
|
|
5445
|
+
return () => clearTimeout(id);
|
|
5446
|
+
});
|
|
5447
|
+
/** The skeleton showed for a read that a scheduled read now replaces (sort, page, filter during the read). */
|
|
5448
|
+
#skeletonHeld = signal(false);
|
|
5449
|
+
/**
|
|
5450
|
+
* Nothing to show yet but something is on its way: the configuration (column lookups) is not ready, the first
|
|
5451
|
+
* read of the option waits in the schedule, or a read replaces one that showed the skeleton. Without it the
|
|
5452
|
+
* empty-state block shows during that debounce.
|
|
5453
|
+
*/
|
|
5454
|
+
#readPending = computed(() => this.readState().status !== 'error' &&
|
|
5455
|
+
(!this.configuration() ||
|
|
5456
|
+
(this.#readScheduled() && ((this.total() === undefined && this.#shownPage() === undefined) || this.#skeletonHeld()))));
|
|
5457
|
+
/**
|
|
5458
|
+
* What the loading layer draws (host `data-loading-view`). Derived only; `loading()`, `data-loading` and
|
|
5459
|
+
* `aria-busy` keep following every read at once.
|
|
5460
|
+
*/
|
|
5461
|
+
loadingView = computed(() => tableLoadingView({
|
|
5462
|
+
skeleton: this.loadingSettings().skeleton,
|
|
5463
|
+
loading: this.loading(),
|
|
5464
|
+
pending: this.#readPending(),
|
|
5465
|
+
scheduled: this.#readScheduled(),
|
|
5466
|
+
rows: this.items().length > 0,
|
|
5467
|
+
refresh: this.#refresh.shown(),
|
|
5468
|
+
}));
|
|
5469
|
+
#liveMessage = signal('');
|
|
5470
|
+
/** Text of the `.sd-table-live` status region: "loading" once the loading layer shows, then the result. */
|
|
5471
|
+
liveMessage = this.#liveMessage.asReadonly();
|
|
5472
|
+
#liveLoading = false;
|
|
5473
|
+
/**
|
|
5474
|
+
* i18n key of the empty block on screen, for the status region: the title of the default block, also under a
|
|
5475
|
+
* custom `sdDataStateTemplate`; `undefined` while rows, a read, the loading layer or an error region show.
|
|
5476
|
+
*/
|
|
5477
|
+
#emptyKey = computed(() => {
|
|
5478
|
+
const status = this.readState().status;
|
|
5479
|
+
const noRows = status !== 'error' && !this.loading() && !this.total() && !this.items().length && this.loadingView() === 'none';
|
|
5480
|
+
if (!noRows || (this.loadError() && !(status === 'empty' && this.dataStateTemplate())))
|
|
5481
|
+
return undefined;
|
|
5482
|
+
if (this.isFiltered())
|
|
5483
|
+
return 'core.component.table.no-results';
|
|
5484
|
+
return this.requireFiltered() ? 'core.component.table.choose-filter-hint' : 'core.component.table.no-data';
|
|
5485
|
+
});
|
|
5486
|
+
/** Rows that fill a table with a fixed height, measured when the skeleton shows. */
|
|
5487
|
+
#skeletonFill = signal(undefined);
|
|
5488
|
+
/** Skeleton rows of the desktop table (`matNoDataRow`) while `loadingView()` is `skeleton`; empty otherwise. */
|
|
5489
|
+
skeleton = computed(() => {
|
|
5490
|
+
const config = this.configuration();
|
|
5491
|
+
if (!config || this.loadingView() !== 'skeleton')
|
|
5492
|
+
return [];
|
|
5493
|
+
const columns = new Map([...config.firstColumns, ...config.secondColumns].map(column => [column.field, column]));
|
|
5494
|
+
const cellDef = this.cellDef();
|
|
5495
|
+
const pageSize = this.tableOption()?.paginate?.pageSize;
|
|
5496
|
+
const rows = this.loadingSettings().skeletonRows ??
|
|
5497
|
+
this.#skeletonFill() ??
|
|
5498
|
+
Math.min(TABLE_SKELETON_ROWS, pageSize && pageSize > 0 ? pageSize : TABLE_SKELETON_ROWS);
|
|
5499
|
+
return buildTableSkeleton(config.displayedColumns.map(field => {
|
|
5500
|
+
const column = columns.get(field);
|
|
5501
|
+
return {
|
|
5502
|
+
field,
|
|
5503
|
+
type: column?.type,
|
|
5504
|
+
align: column?.align,
|
|
5505
|
+
badge: !!column && 'useBadge' in column && !!column.useBadge,
|
|
5506
|
+
template: !!column?.cell?.templateRef || !!cellDef[field],
|
|
5507
|
+
};
|
|
5508
|
+
}), rows);
|
|
5509
|
+
});
|
|
5510
|
+
/** What the table shows before its configuration is ready: 5 rows × 4 bars, without a header. */
|
|
5511
|
+
genericSkeleton = TABLE_GENERIC_SKELETON;
|
|
5512
|
+
unknownTotalPager = computed(() => {
|
|
5513
|
+
if (!this.unknownTotal())
|
|
5514
|
+
return undefined;
|
|
5515
|
+
const target = this.#unknownTarget();
|
|
5516
|
+
const shown = this.#shownPage();
|
|
5517
|
+
const busy = this.loading() || this.#readScheduled();
|
|
5518
|
+
const settled = this.readState().status !== 'error' && samePagePosition(shown, target);
|
|
5519
|
+
const offset = shown ? shown.pageIndex * shown.pageSize : 0;
|
|
5520
|
+
return {
|
|
5521
|
+
pageIndex: target.pageIndex,
|
|
5522
|
+
pageSize: target.pageSize,
|
|
5523
|
+
// why: rows stay on screen while the next page loads and are removed when it fails, so the
|
|
5524
|
+
// range follows the rendered rows of the shown page, never the target.
|
|
5525
|
+
range: shown?.count && this.items().length ? { from: offset + 1, to: offset + shown.count } : undefined,
|
|
5526
|
+
hasPrevious: !busy && target.pageIndex > 0,
|
|
5527
|
+
hasNext: !busy && settled && !!shown?.hasMore,
|
|
5528
|
+
busy,
|
|
5529
|
+
};
|
|
5530
|
+
});
|
|
5531
|
+
/** Hidden until a page has loaded, and while the first page is the only page (same rule as `total <= pageSize`). */
|
|
5532
|
+
unknownTotalPagerVisible = computed(() => !!this.#shownPage() && this.knownRowCount() === undefined);
|
|
5533
|
+
/**
|
|
5534
|
+
* Size of the whole result when it is known: the total, or an unknown-total result whose first page is
|
|
5535
|
+
* the only page. Drives `filter.hideInlineFilter: 'auto'`.
|
|
5536
|
+
*/
|
|
5537
|
+
knownRowCount = computed(() => {
|
|
5538
|
+
if (!this.unknownTotal())
|
|
5539
|
+
return this.total();
|
|
5540
|
+
const shown = this.#shownPage();
|
|
5541
|
+
return shown && shown.pageIndex === 0 && !shown.hasMore && this.#unknownTarget().pageIndex === 0 ? shown.count : undefined;
|
|
5542
|
+
});
|
|
5543
|
+
/** Rows of a single-page unknown-total result, for the "Đang hiển thị" summary. */
|
|
5544
|
+
unknownTotalSingleCount = computed(() => this.unknownTotal() && !this.unknownTotalPagerVisible() && this.items().length ? (this.#shownPage()?.count ?? 0) : 0);
|
|
4937
5545
|
aggregateSnapshot = signal({ groups: new Map(), branches: new Map() });
|
|
4938
5546
|
aggregateRenderHost = { rows: new WeakMap(), indices: new WeakMap() };
|
|
4939
5547
|
#aggregateFilteredItems = [];
|
|
@@ -5094,6 +5702,8 @@ class SdTable {
|
|
|
5094
5702
|
#treeSearchActive = false;
|
|
5095
5703
|
// 1. Private Services
|
|
5096
5704
|
#ref = inject(ChangeDetectorRef);
|
|
5705
|
+
#zone = inject(NgZone);
|
|
5706
|
+
#injector = inject(Injector);
|
|
5097
5707
|
#configService = inject(ConfigService);
|
|
5098
5708
|
#gridFilterService = inject(SdTableFilterService);
|
|
5099
5709
|
#notifyService = inject(SdNotifyService);
|
|
@@ -5103,6 +5713,7 @@ class SdTable {
|
|
|
5103
5713
|
#aggregateNumber = inject(SdFormatNumberPipe);
|
|
5104
5714
|
#aggregateDate = inject(SdFormatDatePipe);
|
|
5105
5715
|
#aggregateDatetime = inject(SdFormatDatetimePipe);
|
|
5716
|
+
#dateTime = inject(SdDateTimeService);
|
|
5106
5717
|
#refreshAggregate() {
|
|
5107
5718
|
const configuredOption = this.tableOption();
|
|
5108
5719
|
if (!configuredOption || !this.#aggregateReady)
|
|
@@ -5124,6 +5735,7 @@ class SdTable {
|
|
|
5124
5735
|
predicate: this.#treeSearchPredicate,
|
|
5125
5736
|
format: (value, column, operation) => this.#formatAggregate(value, column, operation),
|
|
5126
5737
|
diagnose: error => console.error(error),
|
|
5738
|
+
dateTime: this.#dateTime,
|
|
5127
5739
|
}));
|
|
5128
5740
|
this.#ref.markForCheck();
|
|
5129
5741
|
}
|
|
@@ -5145,7 +5757,107 @@ class SdTable {
|
|
|
5145
5757
|
exportTitle = this.#tableExportService.exportTitle;
|
|
5146
5758
|
// 2. Public & Optional Token
|
|
5147
5759
|
tableConfiguration = inject(SD_TABLE_CONFIGURATION, { optional: true });
|
|
5760
|
+
#host = inject(ElementRef).nativeElement;
|
|
5761
|
+
#layout = inject(SD_TABLE_LAYOUT, { optional: true });
|
|
5762
|
+
/** Bảng chính của khung trang (sd-page-list): lấp phần chiều cao còn lại, giữ tối thiểu header + 5 dòng. */
|
|
5763
|
+
fill = computed(() => {
|
|
5764
|
+
const target = this.#layout?.fillTarget();
|
|
5765
|
+
return !!target && (target === this.#host || target.contains(this.#host));
|
|
5766
|
+
});
|
|
5767
|
+
/** External filter của bảng chính thu gọn khi khung trang đang ở chế độ màn thấp. */
|
|
5768
|
+
externalFilterCollapsedByDefault = computed(() => this.fill() && !!this.#layout?.externalFilterCollapsed());
|
|
5148
5769
|
constructor() {
|
|
5770
|
+
// why: ở chế độ fill bảng co theo chỗ còn lại nhưng vùng dữ liệu giữ tối thiểu header + 5 dòng. Header cao khác
|
|
5771
|
+
// nhau (hàng filter dưới cột, header nhóm) và phần cố định của bảng (external filter, quick search, thanh chọn,
|
|
5772
|
+
// footer) đổi theo cấu hình, nên đo lại mỗi khi DOM của bảng đổi. min-height: auto không dùng được: nó lấy chiều
|
|
5773
|
+
// cao của toàn bộ dòng đang có chứ không phải 5 dòng.
|
|
5774
|
+
effect(onCleanup => {
|
|
5775
|
+
if (!this.fill())
|
|
5776
|
+
return;
|
|
5777
|
+
const host = this.#host;
|
|
5778
|
+
const sync = () => {
|
|
5779
|
+
const data = host.querySelector('.c-container > .c-table');
|
|
5780
|
+
const head = data?.querySelector('thead')?.offsetHeight ?? 0;
|
|
5781
|
+
const row = parseFloat(getComputedStyle(host).getPropertyValue('--mat-table-row-item-container-height')) || 36;
|
|
5782
|
+
const dataMin = head + 5 * row;
|
|
5783
|
+
const fixed = data ? host.offsetHeight - data.offsetHeight : 0;
|
|
5784
|
+
host.style.setProperty('--sd-table-fill-head', `${head}px`);
|
|
5785
|
+
host.style.setProperty('--sd-table-fill-min', `${fixed + dataMin}px`);
|
|
5786
|
+
};
|
|
5787
|
+
const observer = new MutationObserver(sync);
|
|
5788
|
+
observer.observe(host, { childList: true, subtree: true });
|
|
5789
|
+
// why: chiều cao phần cố định còn đổi mà không đổi DOM (class fill vừa gắn, chữ xuống dòng khi hẹp).
|
|
5790
|
+
const resize = typeof ResizeObserver === 'function' ? new ResizeObserver(sync) : null;
|
|
5791
|
+
resize?.observe(host);
|
|
5792
|
+
sync();
|
|
5793
|
+
onCleanup(() => {
|
|
5794
|
+
observer.disconnect();
|
|
5795
|
+
resize?.disconnect();
|
|
5796
|
+
host.style.removeProperty('--sd-table-fill-head');
|
|
5797
|
+
host.style.removeProperty('--sd-table-fill-min');
|
|
5798
|
+
});
|
|
5799
|
+
});
|
|
5800
|
+
// why: the loading layer follows `loading()` and the read schedule; the progress bar timer and the status
|
|
5801
|
+
// region only change on those transitions, so rows, settings and errors are read untracked.
|
|
5802
|
+
effect(() => {
|
|
5803
|
+
const loading = this.loading();
|
|
5804
|
+
const scheduled = this.#readScheduled();
|
|
5805
|
+
const view = this.loadingView();
|
|
5806
|
+
untracked(() => {
|
|
5807
|
+
const rows = this.items().length > 0;
|
|
5808
|
+
this.#refresh.update({ loading, scheduled, skeleton: view === 'skeleton', rows }, this.loadingSettings());
|
|
5809
|
+
if (view === 'skeleton' && loading)
|
|
5810
|
+
this.#skeletonHeld.set(true);
|
|
5811
|
+
else if (!scheduled || rows)
|
|
5812
|
+
this.#skeletonHeld.set(false);
|
|
5813
|
+
// why: "loading" is announced only once a read really runs, so a skeleton that resolves at once (column
|
|
5814
|
+
// lookups, synchronous local data) says nothing; it stays active through the debounce of a replacing read.
|
|
5815
|
+
const active = view !== 'none' && (loading || (this.#liveLoading && scheduled));
|
|
5816
|
+
// A new read clears an earlier "loaded N", so the virtual cursor never reads a count that is out of date.
|
|
5817
|
+
if (loading && !active && this.#liveMessage())
|
|
5818
|
+
this.#liveMessage.set('');
|
|
5819
|
+
this.#announceLoading(active);
|
|
5820
|
+
// why: measured before the skeleton renders, under the header that is already on screen, so the row
|
|
5821
|
+
// count is right in the first frame instead of jumping from 5.
|
|
5822
|
+
if (view === 'skeleton')
|
|
5823
|
+
this.#skeletonFill.set(this.#measureSkeletonFill());
|
|
5824
|
+
});
|
|
5825
|
+
});
|
|
5826
|
+
// why: the empty block has no live role (content inserted together with its region is not read reliably), so
|
|
5827
|
+
// the status region says it, also after a read too fast to show the loading layer. Defined after the loading
|
|
5828
|
+
// effect, which clears the region when a read starts, so the same text is read again for the next empty result.
|
|
5829
|
+
effect(() => {
|
|
5830
|
+
const key = this.#emptyKey();
|
|
5831
|
+
if (key)
|
|
5832
|
+
untracked(() => this.#liveMessage.set(this.#i18n.t(key)));
|
|
5833
|
+
});
|
|
5834
|
+
// why: the progress bar sits in .c-container (so it does not scroll sideways with the table) right under the
|
|
5835
|
+
// last header row; that row's bottom depends on grouped headers, the filter row and wrapping titles. Only
|
|
5836
|
+
// measured while the bar shows.
|
|
5837
|
+
effect(onCleanup => {
|
|
5838
|
+
if (this.loadingView() !== 'refresh' || this.mobileCards())
|
|
5839
|
+
return;
|
|
5840
|
+
const host = this.#host;
|
|
5841
|
+
let resize = null;
|
|
5842
|
+
const measure = () => {
|
|
5843
|
+
const data = host.querySelector('.c-container > .c-table');
|
|
5844
|
+
const head = data?.querySelector(':scope > table > thead');
|
|
5845
|
+
if (!data || !head)
|
|
5846
|
+
return false;
|
|
5847
|
+
const sync = () => host.style.setProperty('--sd-table-head-h', `${data.offsetTop + head.offsetHeight}px`);
|
|
5848
|
+
resize = typeof ResizeObserver === 'function' ? new ResizeObserver(sync) : null;
|
|
5849
|
+
resize?.observe(head);
|
|
5850
|
+
sync();
|
|
5851
|
+
return true;
|
|
5852
|
+
};
|
|
5853
|
+
// why: right after a mobile → desktop switch the table is not in the DOM yet when this runs.
|
|
5854
|
+
const later = measure() ? undefined : afterNextRender(() => void measure(), { injector: this.#injector });
|
|
5855
|
+
onCleanup(() => {
|
|
5856
|
+
later?.destroy();
|
|
5857
|
+
resize?.disconnect();
|
|
5858
|
+
host.style.removeProperty('--sd-table-head-h');
|
|
5859
|
+
});
|
|
5860
|
+
});
|
|
5149
5861
|
effect(() => {
|
|
5150
5862
|
const option = this.option();
|
|
5151
5863
|
if (option) {
|
|
@@ -5210,6 +5922,8 @@ class SdTable {
|
|
|
5210
5922
|
const subscription = sort.sortChange.subscribe(state => {
|
|
5211
5923
|
this.sortState.set(state);
|
|
5212
5924
|
this.#ref.markForCheck();
|
|
5925
|
+
// why: without a total, page N of the old order says nothing about the new order.
|
|
5926
|
+
this.#resetUnknownTotalPage();
|
|
5213
5927
|
this.#requestReload(false);
|
|
5214
5928
|
});
|
|
5215
5929
|
onCleanup(() => subscription.unsubscribe());
|
|
@@ -5251,6 +5965,8 @@ class SdTable {
|
|
|
5251
5965
|
if (data !== this.#pendingReload || data.revision !== this.#optionRevision || !this.#configurationReady)
|
|
5252
5966
|
return undefined;
|
|
5253
5967
|
this.#pendingReload = undefined;
|
|
5968
|
+
// #load raises `loading` synchronously, so the pager stays busy without a gap.
|
|
5969
|
+
this.#readScheduled.set(false);
|
|
5254
5970
|
const filterInfo = this.getFilterRequest();
|
|
5255
5971
|
const result = await this.#load(filterInfo, !this.#loadCompleted || data.force);
|
|
5256
5972
|
if (data.revision !== this.#optionRevision || !result)
|
|
@@ -5269,12 +5985,56 @@ class SdTable {
|
|
|
5269
5985
|
}
|
|
5270
5986
|
ngOnDestroy() {
|
|
5271
5987
|
this.#destroyed = true;
|
|
5988
|
+
this.#refresh.destroy();
|
|
5272
5989
|
this.#cancelReload();
|
|
5273
5990
|
this.#retryConfiguration = undefined;
|
|
5274
5991
|
this.#read.invalidate();
|
|
5275
5992
|
this.#failedRead = undefined;
|
|
5276
5993
|
this.#subscription.unsubscribe();
|
|
5277
5994
|
}
|
|
5995
|
+
/**
|
|
5996
|
+
* "Loading" when the loading layer shows; once the read ends, the row count, or the text of the empty block.
|
|
5997
|
+
* The default error region announces itself (`role="alert"`), so the region is cleared; a custom
|
|
5998
|
+
* `sdDataStateTemplate` may have no role, so the region reads the error. Reads faster than `showDelay` announce
|
|
5999
|
+
* only an empty result (see the empty effect).
|
|
6000
|
+
*/
|
|
6001
|
+
#announceLoading(active) {
|
|
6002
|
+
if (active === this.#liveLoading)
|
|
6003
|
+
return;
|
|
6004
|
+
this.#liveLoading = active;
|
|
6005
|
+
if (active) {
|
|
6006
|
+
this.#liveMessage.set(this.#i18n.t('core.component.table.loading'));
|
|
6007
|
+
return;
|
|
6008
|
+
}
|
|
6009
|
+
// Rows on screen: a tree also shows the children of its expanded rows.
|
|
6010
|
+
const count = this.tableOption()?.tree ? countVisibleTreeRows(this.items()) : this.items().length;
|
|
6011
|
+
const failed = this.readState().status === 'error' || this.loadError();
|
|
6012
|
+
if (count)
|
|
6013
|
+
this.#liveMessage.set(this.#i18n.t(count === 1 ? 'core.component.table.loaded-one' : 'core.component.table.loaded', { count }));
|
|
6014
|
+
else if (failed && !!this.dataStateTemplate() && !this.hideReadError())
|
|
6015
|
+
this.#liveMessage.set(this.#i18n.t('core.component.table.error-occurred'));
|
|
6016
|
+
else {
|
|
6017
|
+
const empty = this.#emptyKey();
|
|
6018
|
+
this.#liveMessage.set(empty ? this.#i18n.t(empty) : '');
|
|
6019
|
+
}
|
|
6020
|
+
}
|
|
6021
|
+
/** Skeleton rows that fill a table with a fixed height (fill mode, `style.maxHeight`); `undefined` otherwise. */
|
|
6022
|
+
#measureSkeletonFill() {
|
|
6023
|
+
const option = this.tableOption();
|
|
6024
|
+
const fill = this.fill();
|
|
6025
|
+
if ((!fill && !option?.style?.maxHeight) || this.mobileCards())
|
|
6026
|
+
return undefined;
|
|
6027
|
+
const data = this.#host.querySelector('.c-container > .c-table');
|
|
6028
|
+
if (!data)
|
|
6029
|
+
return undefined;
|
|
6030
|
+
// A percentage max-height resolves to a percentage, not pixels: fall back to the default count.
|
|
6031
|
+
const box = fill ? data.clientHeight : pixelLength(getComputedStyle(data).maxHeight);
|
|
6032
|
+
if (box === undefined)
|
|
6033
|
+
return undefined;
|
|
6034
|
+
const head = data.querySelector(':scope > table > thead')?.offsetHeight ?? 0;
|
|
6035
|
+
const row = parseFloat(getComputedStyle(this.#host).getPropertyValue('--mat-table-row-item-container-height')) || 36;
|
|
6036
|
+
return skeletonFillRows(box - head, row, option?.paginate?.pageSize);
|
|
6037
|
+
}
|
|
5278
6038
|
// --- GIỮ NGUYÊN TẤT CẢ CÁC HÀM FILTER VÀ EXPORT CŨ CỦA BẠN ---
|
|
5279
6039
|
#filterExportInfo = (pageNumber, pageSize) => {
|
|
5280
6040
|
const { columnOperator, columnFilter, externalFilter, quickSearch } = this.filterRegister.value.get();
|
|
@@ -5292,6 +6052,7 @@ class SdTable {
|
|
|
5292
6052
|
};
|
|
5293
6053
|
#cancelReload = () => {
|
|
5294
6054
|
this.#pendingReload = undefined;
|
|
6055
|
+
this.#readScheduled.set(false);
|
|
5295
6056
|
this.#reload.next(undefined);
|
|
5296
6057
|
};
|
|
5297
6058
|
#requestReload = (force, delay = 200, source = 'read') => {
|
|
@@ -5305,8 +6066,51 @@ class SdTable {
|
|
|
5305
6066
|
this.#failedRead = undefined;
|
|
5306
6067
|
this.loading.set(false);
|
|
5307
6068
|
this.#pendingReload = { force: force || !!this.#pendingReload?.force, revision: this.#optionRevision, delay, source };
|
|
6069
|
+
this.#readScheduled.set(true);
|
|
5308
6070
|
this.#reload.next(this.#pendingReload);
|
|
5309
6071
|
};
|
|
6072
|
+
/** Unknown-total mode: the page a read asks for; the first page until the user pages. */
|
|
6073
|
+
#unknownTarget = () => this.#pageTarget() ?? { pageIndex: 0, pageSize: this.tableOption()?.paginate?.pageSize || 50 };
|
|
6074
|
+
/** Filter, quick search and sort changes restart unknown-total paging at the first page, keeping the page size. */
|
|
6075
|
+
#resetUnknownTotalPage = () => {
|
|
6076
|
+
if (!this.unknownTotal())
|
|
6077
|
+
return;
|
|
6078
|
+
this.#pageTarget.set({ pageIndex: 0, pageSize: this.#unknownTarget().pageSize });
|
|
6079
|
+
};
|
|
6080
|
+
#warnedMissingTotal = false;
|
|
6081
|
+
/** Known-total tables keep `total || 0`; a `{ items, hasMore }` result there is a missing `paginate.total: 'unknown'`. */
|
|
6082
|
+
#warnMissingTotal = (response) => {
|
|
6083
|
+
const result = response;
|
|
6084
|
+
if (this.#warnedMissingTotal || !result || typeof result.total === 'number' || typeof result.hasMore !== 'boolean')
|
|
6085
|
+
return;
|
|
6086
|
+
this.#warnedMissingTotal = true;
|
|
6087
|
+
console.warn(`sd-table: items() resolved { items, hasMore } without a total; declare paginate: { total: 'unknown' } to page without a total.`);
|
|
6088
|
+
};
|
|
6089
|
+
/** A requested page will not be read after all: point the target back at the shown page. */
|
|
6090
|
+
#settleUnknownTotalTarget = () => {
|
|
6091
|
+
const shown = this.#shownPage();
|
|
6092
|
+
if (!this.unknownTotal() || !shown)
|
|
6093
|
+
return;
|
|
6094
|
+
this.#pageTarget.set({ pageIndex: shown.pageIndex, pageSize: shown.pageSize });
|
|
6095
|
+
};
|
|
6096
|
+
/** Previous/Next/First and page-size changes of the unknown-total paginator. */
|
|
6097
|
+
onUnknownTotalPage = (event) => {
|
|
6098
|
+
const pager = this.unknownTotalPager();
|
|
6099
|
+
if (!pager || pager.busy)
|
|
6100
|
+
return;
|
|
6101
|
+
const sizeChanged = event.pageSize !== pager.pageSize;
|
|
6102
|
+
if (!sizeChanged) {
|
|
6103
|
+
if (event.pageIndex === pager.pageIndex || event.pageIndex < 0)
|
|
6104
|
+
return;
|
|
6105
|
+
if (event.pageIndex > pager.pageIndex && (!pager.hasNext || event.pageIndex !== pager.pageIndex + 1))
|
|
6106
|
+
return;
|
|
6107
|
+
if (event.pageIndex < pager.pageIndex && !pager.hasPrevious)
|
|
6108
|
+
return;
|
|
6109
|
+
}
|
|
6110
|
+
this.#pageTarget.set(sizeChanged ? { pageIndex: 0, pageSize: event.pageSize } : { pageIndex: event.pageIndex, pageSize: pager.pageSize });
|
|
6111
|
+
this.pageRevision.update(n => n + 1);
|
|
6112
|
+
this.#requestReload(false);
|
|
6113
|
+
};
|
|
5310
6114
|
#resetStateForNewOption = () => {
|
|
5311
6115
|
this.#clearAggregate();
|
|
5312
6116
|
this.#aggregateLoadedChildren.clear();
|
|
@@ -5332,6 +6136,8 @@ class SdTable {
|
|
|
5332
6136
|
this.items.set([]);
|
|
5333
6137
|
this.selectedTableItems.set([]);
|
|
5334
6138
|
this.total.set(undefined);
|
|
6139
|
+
this.#pageTarget.set(undefined);
|
|
6140
|
+
this.#shownPage.set(undefined);
|
|
5335
6141
|
this.loading.set(false);
|
|
5336
6142
|
this.isSelectAll.set(false);
|
|
5337
6143
|
this.isSelectIndeterminate.set(false);
|
|
@@ -5363,6 +6169,7 @@ class SdTable {
|
|
|
5363
6169
|
};
|
|
5364
6170
|
#initConfiguration = (option) => {
|
|
5365
6171
|
option.paginate = {
|
|
6172
|
+
total: option?.paginate?.total,
|
|
5366
6173
|
hidden: option?.paginate?.hidden,
|
|
5367
6174
|
pageSize: option?.paginate?.pageSize ?? this.tableConfiguration?.paginate?.pageSize ?? DEFAULT_TABLE_CONFIG.paginate?.pageSize,
|
|
5368
6175
|
pages: option?.paginate?.pages ?? this.tableConfiguration?.paginate?.pages ?? DEFAULT_TABLE_CONFIG.paginate?.pages,
|
|
@@ -5460,12 +6267,17 @@ class SdTable {
|
|
|
5460
6267
|
return;
|
|
5461
6268
|
}
|
|
5462
6269
|
if (value.notReload) {
|
|
5463
|
-
if (this.#pendingReload?.source === 'filter' && !this.#pendingReload.force)
|
|
6270
|
+
if (this.#pendingReload?.source === 'filter' && !this.#pendingReload.force) {
|
|
5464
6271
|
this.#cancelReload();
|
|
6272
|
+
// why: the cancelled filter read had moved the target to the first page; without a read the
|
|
6273
|
+
// paginator must point at the rows still on screen again, not stay locked between two pages.
|
|
6274
|
+
this.#settleUnknownTotalTarget();
|
|
6275
|
+
}
|
|
5465
6276
|
return;
|
|
5466
6277
|
}
|
|
5467
6278
|
if (this.paginator())
|
|
5468
6279
|
this.paginator().pageIndex = 0;
|
|
6280
|
+
this.#resetUnknownTotalPage();
|
|
5469
6281
|
// Giữ thời gian chờ tương tác cũ: filter 500ms + reload 200ms, trên cùng một lịch có thể hủy.
|
|
5470
6282
|
this.#requestReload(false, 700, 'filter');
|
|
5471
6283
|
});
|
|
@@ -5486,7 +6298,7 @@ class SdTable {
|
|
|
5486
6298
|
Object.assign(cur, next);
|
|
5487
6299
|
};
|
|
5488
6300
|
#filterLocal = (localItems, filterInfo) => {
|
|
5489
|
-
const result = filterLocalItems(localItems, this.tableOption(), filterInfo);
|
|
6301
|
+
const result = filterLocalItems(localItems, { ...this.tableOption(), dateTime: this.#dateTime }, filterInfo);
|
|
5490
6302
|
this.#treeSearchPredicate = result.treeSearchPredicate;
|
|
5491
6303
|
return {
|
|
5492
6304
|
items: result.items,
|
|
@@ -5496,6 +6308,7 @@ class SdTable {
|
|
|
5496
6308
|
};
|
|
5497
6309
|
getFilterRequest = () => {
|
|
5498
6310
|
const { columnOperator, columnFilter, externalFilter, quickSearch } = this.filterRegister.value.get();
|
|
6311
|
+
const target = this.unknownTotal() ? this.#unknownTarget() : undefined;
|
|
5499
6312
|
return {
|
|
5500
6313
|
columnOperator: columnOperator || {},
|
|
5501
6314
|
rawColumnFilter: columnFilter || {},
|
|
@@ -5503,8 +6316,8 @@ class SdTable {
|
|
|
5503
6316
|
...(this.quickSearchOption() ? { quickSearch: quickSearch || { term: '', filters: {} } } : {}),
|
|
5504
6317
|
orderBy: this.sort()?.active || '',
|
|
5505
6318
|
orderDirection: this.sort()?.direction === 'asc' ? 'ASC' : this.sort()?.direction === 'desc' ? 'DESC' : undefined,
|
|
5506
|
-
pageNumber: this.paginator()?.pageIndex || 0,
|
|
5507
|
-
pageSize: this.paginator()?.pageSize || this.tableOption()?.paginate?.pageSize || 50,
|
|
6319
|
+
pageNumber: target ? target.pageIndex : this.paginator()?.pageIndex || 0,
|
|
6320
|
+
pageSize: target ? target.pageSize : this.paginator()?.pageSize || this.tableOption()?.paginate?.pageSize || 50,
|
|
5508
6321
|
visibledColumns: ArrayUtilities.union('field', this.configuration()?.firstColumns || [], this.configuration()?.secondColumns || []),
|
|
5509
6322
|
};
|
|
5510
6323
|
};
|
|
@@ -5600,6 +6413,7 @@ class SdTable {
|
|
|
5600
6413
|
items: [],
|
|
5601
6414
|
total: 0,
|
|
5602
6415
|
aggregateComplete: false,
|
|
6416
|
+
page: { pageIndex: filterReq.pageNumber, pageSize: filterReq.pageSize },
|
|
5603
6417
|
};
|
|
5604
6418
|
}
|
|
5605
6419
|
const snapshot = cloneReadRequest(filterReq);
|
|
@@ -5607,6 +6421,7 @@ class SdTable {
|
|
|
5607
6421
|
columns: opt.columns,
|
|
5608
6422
|
externalFilters: opt.filter?.externalFilters,
|
|
5609
6423
|
quickSearch: this.quickSearchOption(),
|
|
6424
|
+
dateTime: this.#dateTime,
|
|
5610
6425
|
});
|
|
5611
6426
|
const optionRevision = this.#optionRevision;
|
|
5612
6427
|
const sourceOption = this.option();
|
|
@@ -5655,20 +6470,27 @@ class SdTable {
|
|
|
5655
6470
|
this.loading.set(true);
|
|
5656
6471
|
try {
|
|
5657
6472
|
// why: mỗi lần gọi nhận bản sao riêng; loader không được sửa snapshot dành cho retry.
|
|
5658
|
-
const
|
|
6473
|
+
const response = await request.option.items(cloneReadRequest(request.filter), cloneReadRequest(request.paging));
|
|
5659
6474
|
if (!this.#read.isCurrent(revision))
|
|
5660
6475
|
return undefined;
|
|
6476
|
+
const page = { pageIndex: request.filter.pageNumber, pageSize: request.filter.pageSize };
|
|
6477
|
+
// why: unknown-total loaders must prove the next page; a malformed result fails this read (with retry).
|
|
6478
|
+
const unknown = isUnknownTotal(request.option) ? readUnknownTotalPage(response, page.pageSize) : undefined;
|
|
6479
|
+
const rows = unknown ? unknown.items : response?.items;
|
|
5661
6480
|
// why: formatter có await và ghi cache; chỉ commit bản riêng khi request còn hiện hành.
|
|
5662
6481
|
const values = cloneReadRequest(this.cacheValues);
|
|
5663
6482
|
const objectValues = cloneReadRequest(this.#cacheObjValues);
|
|
5664
|
-
const formatted = await this.#tableFormatService.format(
|
|
5665
|
-
if (!this.#read.succeed(revision,
|
|
6483
|
+
const formatted = await this.#tableFormatService.format(rows, request.option.columns, values, objectValues, request.option.rowKey);
|
|
6484
|
+
if (!this.#read.succeed(revision, rows?.length || 0))
|
|
5666
6485
|
return undefined;
|
|
5667
6486
|
if (!this.#read.isCurrent(revision))
|
|
5668
6487
|
return undefined;
|
|
5669
6488
|
this.cacheValues = values;
|
|
5670
6489
|
this.#cacheObjValues = objectValues;
|
|
5671
|
-
|
|
6490
|
+
if (!unknown)
|
|
6491
|
+
this.#warnMissingTotal(response);
|
|
6492
|
+
const total = unknown ? 0 : response?.total || 0;
|
|
6493
|
+
return { items: formatted, total, hasMore: unknown?.hasMore, page, readRevision: revision };
|
|
5672
6494
|
}
|
|
5673
6495
|
catch (error) {
|
|
5674
6496
|
if (this.#read.isCurrent(revision)) {
|
|
@@ -5683,6 +6505,14 @@ class SdTable {
|
|
|
5683
6505
|
this.loading.set(false);
|
|
5684
6506
|
this.#ref.markForCheck();
|
|
5685
6507
|
}
|
|
6508
|
+
else if (this.#read.isLatest(revision) && !this.#destroyed) {
|
|
6509
|
+
// why: a filter commit without reload (`notReload`) moves the read context, so this response is
|
|
6510
|
+
// dropped although no newer read will follow; release loading instead of locking the table.
|
|
6511
|
+
this.#read.invalidate();
|
|
6512
|
+
this.loading.set(false);
|
|
6513
|
+
this.#settleUnknownTotalTarget();
|
|
6514
|
+
this.#ref.markForCheck();
|
|
6515
|
+
}
|
|
5686
6516
|
}
|
|
5687
6517
|
};
|
|
5688
6518
|
// why: end user thấy dòng dữ liệu là hiểu "không lỗi"; lần đọc hiện hành lỗi phải gỡ dòng/total của
|
|
@@ -5737,7 +6567,15 @@ class SdTable {
|
|
|
5737
6567
|
}
|
|
5738
6568
|
}
|
|
5739
6569
|
this.items.set(args?.items || []);
|
|
5740
|
-
this.
|
|
6570
|
+
if (this.unknownTotal()) {
|
|
6571
|
+
// why: rows and their page label change in the same synchronous step; nothing else writes the shown page.
|
|
6572
|
+
this.total.set(undefined);
|
|
6573
|
+
const items = this.items();
|
|
6574
|
+
this.#shownPage.set({ ...(args.page ?? this.#unknownTarget()), count: items.length, hasMore: !!args.hasMore && items.length > 0 });
|
|
6575
|
+
}
|
|
6576
|
+
else {
|
|
6577
|
+
this.total.set(args?.total || 0);
|
|
6578
|
+
}
|
|
5741
6579
|
if (treeOpt) {
|
|
5742
6580
|
initTreeMeta(this.items(), treeOpt, {
|
|
5743
6581
|
expandState: this.#treeExpandState,
|
|
@@ -5839,9 +6677,11 @@ class SdTable {
|
|
|
5839
6677
|
columns: opt.columns,
|
|
5840
6678
|
externalFilters: opt.filter?.externalFilters,
|
|
5841
6679
|
quickSearch: this.quickSearchOption(),
|
|
6680
|
+
dateTime: this.#dateTime,
|
|
5842
6681
|
});
|
|
5843
|
-
const result = opt.items(filterReq, pagingReq);
|
|
5844
|
-
|
|
6682
|
+
const result = await opt.items(filterReq, pagingReq);
|
|
6683
|
+
// why: a lookahead row past the chunk would be exported twice once the next chunk starts at its offset.
|
|
6684
|
+
return isUnknownTotal(opt) ? readUnknownTotalPage(result, pageSize) : result;
|
|
5845
6685
|
}
|
|
5846
6686
|
else {
|
|
5847
6687
|
let exportedItems = [];
|
|
@@ -5869,12 +6709,22 @@ class SdTable {
|
|
|
5869
6709
|
return {
|
|
5870
6710
|
option: this.tableOption(),
|
|
5871
6711
|
configuration: this.configuration(),
|
|
5872
|
-
total: this.total() || 0,
|
|
6712
|
+
total: this.unknownTotal() ? undefined : this.total() || 0,
|
|
5873
6713
|
cacheObjValues: this.#cacheObjValues,
|
|
5874
6714
|
getFilterInfo: () => this.getFilterRequest(),
|
|
5875
6715
|
fetchChunk: (pageNumber, pageSize) => this.#exportedItems(pageNumber, pageSize),
|
|
5876
6716
|
};
|
|
5877
6717
|
};
|
|
6718
|
+
/**
|
|
6719
|
+
* Reads the first page again with the current filters and sort. For a condition the table does not own (status
|
|
6720
|
+
* tabs, score cards above the table): changing it must restart paging, as a filter of the table does.
|
|
6721
|
+
*/
|
|
6722
|
+
reloadFirstPage = async () => {
|
|
6723
|
+
if (this.paginator())
|
|
6724
|
+
this.paginator().pageIndex = 0;
|
|
6725
|
+
this.#resetUnknownTotalPage();
|
|
6726
|
+
await this.reload(true, true);
|
|
6727
|
+
};
|
|
5878
6728
|
exportExcel = (columns) => {
|
|
5879
6729
|
this.#tableExportService.exportExcel(this.#createExportContext(), columns);
|
|
5880
6730
|
};
|
|
@@ -6002,12 +6852,29 @@ class SdTable {
|
|
|
6002
6852
|
// Blur input filter: chỉ commit giá trị vào filterRegister, KHÔNG trigger reload.
|
|
6003
6853
|
// Reload chỉ chạy khi user enter hoặc bấm nút tải lại.
|
|
6004
6854
|
onFilterCommit = () => {
|
|
6005
|
-
this.filterRegister
|
|
6006
|
-
|
|
6855
|
+
if (!this.filterRegister)
|
|
6856
|
+
return;
|
|
6857
|
+
const columnOperator = this.columnOperator || {};
|
|
6858
|
+
// why: Tab ngay sau Enter không có gì mới để commit; set notReload lúc đó sẽ hủy lần đọc user vừa yêu cầu.
|
|
6859
|
+
if (this.#isColumnFilterCommitted(columnOperator, this.columnFilter))
|
|
6860
|
+
return;
|
|
6861
|
+
this.filterRegister.value.set({
|
|
6862
|
+
columnOperator,
|
|
6007
6863
|
columnFilter: this.columnFilter,
|
|
6008
6864
|
notReload: true,
|
|
6009
6865
|
});
|
|
6010
6866
|
};
|
|
6867
|
+
#isColumnFilterCommitted = (columnOperator, columnFilter) => {
|
|
6868
|
+
const committed = this.filterRegister.value.get();
|
|
6869
|
+
try {
|
|
6870
|
+
return (Utilities.canonicalStringify({ columnOperator: committed.columnOperator || {}, columnFilter: committed.columnFilter || {} }) ===
|
|
6871
|
+
Utilities.canonicalStringify({ columnOperator, columnFilter: columnFilter || {} }));
|
|
6872
|
+
}
|
|
6873
|
+
catch {
|
|
6874
|
+
// Giá trị không serialize được: commit như cũ.
|
|
6875
|
+
return false;
|
|
6876
|
+
}
|
|
6877
|
+
};
|
|
6011
6878
|
onExpand = async (row) => {
|
|
6012
6879
|
const option = this.tableOption()?.expand;
|
|
6013
6880
|
const meta = row.meta.expand;
|
|
@@ -6316,6 +7183,14 @@ class SdTable {
|
|
|
6316
7183
|
if (operator == null)
|
|
6317
7184
|
return;
|
|
6318
7185
|
this.tableOption()?.filter?.operatorChange?.(column, operator);
|
|
7186
|
+
// why: operator mới đổi nghĩa của giá trị đang có nên lọc lại ngay; ô trống thì chỉ lưu operator. NULL / NOT_NULL
|
|
7187
|
+
// lọc không cần giá trị, và rời khỏi NULL / NOT_NULL (operator đã commit trước đó) thì filter đó mất — cả hai lọc lại.
|
|
7188
|
+
const committed = this.filterRegister?.value.get().columnOperator?.[column.field] ?? column.filter?.operator?.default;
|
|
7189
|
+
const leftNoData = committed !== operator && isNoDataColumnOperator(column, committed);
|
|
7190
|
+
if (leftNoData || hasActiveColumnFilter(this.columnFilter, [column], { [column.field]: operator }))
|
|
7191
|
+
this.onFilterChange();
|
|
7192
|
+
else
|
|
7193
|
+
this.onFilterCommit();
|
|
6319
7194
|
};
|
|
6320
7195
|
trackBy = (index, item) => {
|
|
6321
7196
|
return item.meta.id;
|
|
@@ -6324,6 +7199,11 @@ class SdTable {
|
|
|
6324
7199
|
// Template chỉ cần đọc pageOffset() rồi cộng `i + 1` (rẻ hơn gọi function).
|
|
6325
7200
|
pageOffset = computed(() => {
|
|
6326
7201
|
this.pageRevision();
|
|
7202
|
+
if (this.unknownTotal()) {
|
|
7203
|
+
// why: row numbers belong to the rows on screen, not to a page that is still loading or failed.
|
|
7204
|
+
const shown = this.#shownPage();
|
|
7205
|
+
return shown ? shown.pageIndex * shown.pageSize : 0;
|
|
7206
|
+
}
|
|
6327
7207
|
const p = this.paginator();
|
|
6328
7208
|
return (p?.pageIndex ?? 0) * (p?.pageSize ?? 0);
|
|
6329
7209
|
});
|
|
@@ -6362,7 +7242,7 @@ class SdTable {
|
|
|
6362
7242
|
this.#refreshAggregate();
|
|
6363
7243
|
}
|
|
6364
7244
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6365
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTable, isStandalone: true, selector: "sd-table", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, hideReadError: { classPropertyName: "hideReadError", publicName: "hideReadError", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdReadStateChange: "sdReadStateChange" }, host: { attributes: { "tabindex": "0" }, properties: { "attr.data-autoid": "autoId()", "attr.data-loading": "loading() ? \"true\" : \"false\"" } }, providers: [
|
|
7245
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTable, isStandalone: true, selector: "sd-table", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, hideReadError: { classPropertyName: "hideReadError", publicName: "hideReadError", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdReadStateChange: "sdReadStateChange" }, host: { attributes: { "tabindex": "0" }, properties: { "attr.data-autoid": "autoId()", "attr.data-loading": "loading() ? \"true\" : \"false\"", "attr.data-loading-view": "loadingView()", "class.sd-table--fill": "fill()" } }, providers: [
|
|
6366
7246
|
DatePipe,
|
|
6367
7247
|
DecimalPipe,
|
|
6368
7248
|
CdkColumnDef,
|
|
@@ -6374,7 +7254,7 @@ class SdTable {
|
|
|
6374
7254
|
provide: MatPaginatorIntl,
|
|
6375
7255
|
useClass: SdTablePaginatorIntl,
|
|
6376
7256
|
},
|
|
6377
|
-
], queries: [{ propertyName: "dataStateTemplate", first: true, predicate: SdDataStateTemplateDirective, descendants: true, isSignal: true }, { propertyName: "sdSubInformation", first: true, predicate: SdTableExpandDefDirective, descendants: true, isSignal: true }, { propertyName: "sdGroupDef", first: true, predicate: SdTableGroupDefDirective, descendants: true, isSignal: true }, { propertyName: "sdCellDefs", predicate: SdTableCellDefDirective, isSignal: true }, { propertyName: "sdCommandHeaderDef", first: true, predicate: SdTableCommandHeaderDefDirective, descendants: true, isSignal: true }, { propertyName: "sdQuickSearchRightDef", first: true, predicate: SdTableQuickSearchRightDefDirective, descendants: true, isSignal: true }, { propertyName: "sdFooterDefs", predicate: SdMaterialFooterDefDirective, isSignal: true }, { propertyName: "sdFilterDefs", predicate: SdTableFilterDefDirective, isSignal: true }, { propertyName: "sdTitleDefs", predicate: SdTableTitleDefDirective, isSignal: true }, { propertyName: "sdRowMobileDef", first: true, predicate: SdTableRowMobileDefDirective, isSignal: true }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }, { propertyName: "configComponent", first: true, predicate: ConfigComponent, descendants: true, isSignal: true }, { propertyName: "sdPopupExport", first: true, predicate: SdPopupExport, descendants: true, isSignal: true }, { propertyName: "scroll", first: true, predicate: SdScrollDirective, descendants: true, isSignal: true }, { propertyName: "quickAction", first: true, predicate: SdQuickAction, descendants: true, isSignal: true }, { propertyName: "externalFilter", first: true, predicate: ExternalFilterComponent, descendants: true, isSignal: true }, { propertyName: "mobileFilter", first: true, predicate: MobileFilterComponent, descendants: true, isSignal: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "quickSearchControl", first: true, predicate: TableQuickSearchComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _showInlineFilter =\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && _total! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n@if (_configuration) {\n @if (!_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @if (_tree.isExpanding) {\n <span class=\"lds-ring sd-tree-spinner\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </span>\n } @else {\n @let _aid = _autoId;\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n <div class=\"sd-table-surface\" [class.sd-table-surface--quick-search]=\"!!_quickSearch\">\n @if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: b\u1EA3ng t\u1EA3i d\u1EEF li\u1EC7u B\u1EA4T \u0110\u1ED2NG B\u1ED8 nh\u01B0ng tr\u01B0\u1EDBc \u0111\u00E2y ch\u1EC9 c\u00F3 spinner thu\u1EA7n h\u00ECnh \u1EA3nh \u2014 screen\n reader kh\u00F4ng \u0111\u01B0\u1EE3c b\u00E1o g\u00EC c\u1EA3. role=\"status\" + aria-live=\"polite\" \u0111\u1ECDc tr\u1EA1ng th\u00E1i ngay khi\n spinner xu\u1EA5t hi\u1EC7n; aria-busy tr\u00EAn v\u00F9ng b\u1EA3ng cho bi\u1EBFt n\u1ED9i dung \u0111ang \u0111\u01B0\u1EE3c thay th\u1EBF. -->\n @if (_loading) {\n <div class=\"c-loading\" role=\"status\" aria-live=\"polite\" [attr.aria-label]=\"'core.component.table.loading' | sdTranslate\">\n <mat-spinner></mat-spinner>\n </div>\n }\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!element.meta.expand?.isExpanding && !_tableOption.expand?.always) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n @if (element.meta.expand?.isExpanding) {\n <div class=\"lds-ring\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div>\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div>\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n </table>\n }\n @let _readError = _readState.status === 'error';\n <!-- why: d\u00F2ng c\u0169 b\u1ECB g\u1EE1 khi l\u1EA7n \u0111\u1ECDc hi\u1EC7n h\u00E0nh l\u1ED7i, n\u00EAn v\u00F9ng l\u1ED7i/empty ch\u1EC9 hi\u1EC7n khi b\u1EA3ng kh\u00F4ng c\u00F2n d\u00F2ng n\u00E0o\n \u2014 end user kh\u00F4ng bao gi\u1EDD th\u1EA5y d\u1EEF li\u1EC7u v\u00E0 l\u1ED7i c\u00F9ng l\u00FAc (NSP-4877). -->\n @let _noRows = !_readError && !_loading && !_total && !_items.length;\n @if ((_readError && !_hideReadError) || (_noRows && _readState.status === 'empty' && !!_dataStateTemplate)) {\n <sd-data-state [state]=\"_readError ? 'error' : 'empty'\" [retryable]=\"_readError\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <div class=\"c-no-data-row\" role=\"alert\">\n <p>{{ 'core.component.table.error-occurred' | sdTranslate }}</p>\n <sd-button [title]=\"'core.component.table.reload' | sdTranslate\" (click)=\"reload()\"></sd-button>\n </div>\n } @else if (_noRows && !loadError()) {\n <!-- why: empty m\u1EB7c \u0111\u1ECBnh gi\u1EEF 3 tr\u1EA1ng th\u00E1i (filter kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 / ch\u01B0a ch\u1ECDn filter b\u1EAFt bu\u1ED9c / ch\u01B0a c\u00F3 d\u1EEF li\u1EC7u)\n c\u00F9ng \u1EA3nh c\u1EA5u h\u00ECnh qua SD_TABLE_CONFIGURATION.images, cho c\u1EA3 b\u1EA3ng server (NSP-5551). -->\n <div class=\"c-no-data-row\" role=\"status\" aria-live=\"polite\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%}:host:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:var(--sd-radius-6, 6px)}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,var(--sd-table-group-header-mix, #f2f3f4));box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:var(--sd-font-weight-semibold, 600)}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:var(--sd-table-row-activated-bg, #e5ecff)}:host .c-container .c-table table tr.c-row.selected{background-color:var(--sd-table-row-selected-bg, #eef2ff)}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:var(--sd-table-header-bg, #f2f3f4);border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:var(--sd-table-row-divider, #f2f2f2)!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-header-text, #212121)}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:#00000014}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-loading{position:absolute;inset:0 0 56px;background:#00000026;z-index:2;display:flex;align-items:center;justify-content:center}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--sd-table-bg, #ffffff)}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:var(--sd-table-bg, #ffffff);border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:var(--sd-table-bg, #ffffff);box-shadow:0 2px 4px #2f313629}:host .lds-ring{display:inline-block;position:relative;width:40px;height:40px}:host .lds-ring div{box-sizing:border-box;display:block;position:absolute;width:32px;height:32px;margin:4px;border:4px solid var(--sd-table-spinner, #cceeff);border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--sd-table-spinner, #cceeff) transparent transparent transparent}:host .lds-ring div:nth-child(1){animation-delay:-.45s}:host .lds-ring div:nth-child(2){animation-delay:-.3s}:host .lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:#00000061;display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .c-container:not(.sd-table-mobile)>.c-loading{border-radius:6px 6px 0 0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:var(--sd-table-bg, #ffffff)}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:var(--sd-table-select-arrow, #a6a6a6)}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{background-repeat:no-repeat;background-position:center right 0;background-size:16px 16px;padding-right:24px}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--outlined .mat-mdc-form-field-infix,:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:2px;padding-bottom:2px;min-height:32px}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select mat-select{margin-top:2px!important}:host ::ng-deep .cdk-drag-preview{box-shadow:0 4px 12px #00000026;background:#fff;display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid rgba(0,0,0,.12)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:var(--sd-table-group-row-bg, #f5f7fc);border-top:1px solid var(--sd-table-group-row-border, #e6e9f2);border-bottom:1px solid var(--sd-table-group-row-border, #e6e9f2)}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;height:18px;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:#0f172a14}:host ::ng-deep .sd-tree-spinner{transform:scale(.45)}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:var(--sd-table-tree-level-0-bg, #fbfcfe)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:var(--sd-font-weight-medium, 500)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:var(--sd-table-tree-level-1-bg, #ffffff)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:var(--sd-table-tree-level-2-bg, #fafbfd)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:var(--sd-table-tree-level-3-bg, #f6f8fb)}:host ::ng-deep .sd-stt-root{font-weight:var(--sd-font-weight-bold, 700);color:var(--sd-table-tree-root-text, #1f2330)}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table,:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-loading{border-top-left-radius:0;border-top-right-radius:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:var(--sd-font-weight-medium, 500)}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdDataState, selector: "sd-data-state", inputs: ["state", "title", "message", "icon", "fontSet", "iconShape", "retryable", "retryLabel", "actionLabel", "compact", "fullPage"], outputs: ["sdRetry", "sdAction"] }, { kind: "directive", type: SdDataStateTemplateDirective, selector: "ng-template[sdDataStateTemplate]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i4$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i6.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "component", type: DesktopCommand, selector: "desktop-command", inputs: ["autoId", "item", "itemIndex", "commands"] }, { kind: "component", type: DesktopCellComponent, selector: "desktop-cell", inputs: ["column", "item", "cellDef"] }, { kind: "component", type: ColumnTitleComponent, selector: "column-title", inputs: ["column", "titleDef"] }, { kind: "component", type: ExternalFilterComponent, selector: "external-filter", inputs: ["autoId", "filter", "externalFilters", "filterRegister"] }, { kind: "component", type: TableQuickSearchComponent, selector: "sd-table-quick-search", inputs: ["option", "value", "autoId", "rightTemplate"], outputs: ["valueChange"] }, { kind: "component", type: ConfigComponent, selector: "config", inputs: ["autoId", "tableOption"], outputs: ["changes"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["autoId", "column", "columnFilter", "cacheValues", "value", "operator", "isMobile"], outputs: ["operatorChange", "filterChange", "filterCommit"] }, { kind: "component", type: MobileFilterComponent, selector: "mobile-filter", inputs: ["autoId", "filter", "externalFilters", "columns", "filterDefs", "filterRegister", "cacheValues"] }, { kind: "pipe", type: SdGroupPipe, name: "sdGroup" }, { kind: "pipe", type: SdTreePipe, name: "sdTree" }, { kind: "pipe", type: SdAggregateRowsPipe, name: "sdAggregateRows" }, { kind: "directive", type: SdAggregateLayoutDirective, selector: "table[sdAggregateLayout]" }, { kind: "directive", type: SdTableFooterRowDefDirective, selector: "[sdTableFooterRowDef]", inputs: ["sdTableFooterRowDef", "sdTableFooterRowDefSticky"] }, { kind: "directive", type: SdScrollDirective, selector: "[sdScroll]" }, { kind: "directive", type: SdHoverCopyDirective, selector: "[sdHoverCopy]", inputs: ["sdHoverCopy", "sdHoverCopyDisabled"] }, { kind: "component", type: SelectorActionComponent, selector: "selector-action", inputs: ["autoId", "tableOption", "selectedTableItems"], outputs: ["clear"] }, { kind: "directive", type: StickyShadowDirective, selector: "[stickyShadow]" }, { kind: "directive", type: SdColumnResizeDirective, selector: "[sdColumnResize]", inputs: ["sdColumnResize", "minWidth", "maxWidth"], outputs: ["resizeEnd"] }, { kind: "directive", type: SdTableSortHeaderDirective, selector: "[sdTableSortHeader]", inputs: ["sdTableSortHeader"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "component", type: SdTableMobileCardsComponent, selector: "sd-table-mobile-cards", inputs: ["table", "rows", "dataRows", "aggregateTemplate", "groupTemplate"] }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }], animations: [
|
|
7257
|
+
], queries: [{ propertyName: "dataStateTemplate", first: true, predicate: SdDataStateTemplateDirective, descendants: true, isSignal: true }, { propertyName: "sdSubInformation", first: true, predicate: SdTableExpandDefDirective, descendants: true, isSignal: true }, { propertyName: "sdGroupDef", first: true, predicate: SdTableGroupDefDirective, descendants: true, isSignal: true }, { propertyName: "sdCellDefs", predicate: SdTableCellDefDirective, isSignal: true }, { propertyName: "sdCommandHeaderDef", first: true, predicate: SdTableCommandHeaderDefDirective, descendants: true, isSignal: true }, { propertyName: "sdQuickSearchRightDef", first: true, predicate: SdTableQuickSearchRightDefDirective, descendants: true, isSignal: true }, { propertyName: "sdFooterDefs", predicate: SdMaterialFooterDefDirective, isSignal: true }, { propertyName: "sdFilterDefs", predicate: SdTableFilterDefDirective, isSignal: true }, { propertyName: "sdTitleDefs", predicate: SdTableTitleDefDirective, isSignal: true }, { propertyName: "sdRowMobileDef", first: true, predicate: SdTableRowMobileDefDirective, isSignal: true }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }, { propertyName: "configComponent", first: true, predicate: ConfigComponent, descendants: true, isSignal: true }, { propertyName: "sdPopupExport", first: true, predicate: SdPopupExport, descendants: true, isSignal: true }, { propertyName: "scroll", first: true, predicate: SdScrollDirective, descendants: true, isSignal: true }, { propertyName: "quickAction", first: true, predicate: SdQuickAction, descendants: true, isSignal: true }, { propertyName: "externalFilter", first: true, predicate: ExternalFilterComponent, descendants: true, isSignal: true }, { propertyName: "mobileFilter", first: true, predicate: MobileFilterComponent, descendants: true, isSignal: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "quickSearchControl", first: true, predicate: TableQuickSearchComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _loadingView = loadingView();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _showInlineFilter =\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && knownRowCount()! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n<!-- why: v\u00F9ng status lu\u00F4n c\u00F3 trong DOM, k\u1EC3 c\u1EA3 tr\u01B0\u1EDBc khi c\u00F3 configuration. V\u00F9ng ch\u1EC9 render trong l\u00FAc t\u1EA3i b\u1ECB g\u1EE1\n tr\u01B0\u1EDBc khi screen reader k\u1ECBp \u0111\u1ECDc v\u00E0 kh\u00F4ng b\u00E1o \u0111\u01B0\u1EE3c \"\u0111\u00E3 t\u1EA3i xong\". -->\n<span class=\"sd-table-live\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveMessage() }}</span>\n@if (_configuration) {\n @if (!_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [collapsedByDefault]=\"externalFilterCollapsedByDefault()\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @let _aid = _autoId;\n @let _expanding = !!_tree.isExpanding;\n <!-- why: n\u00FAt lu\u00F4n n\u1EB1m trong DOM, ch\u1EC9 \u0111\u1ED5i icon th\u00E0nh spinner khi \u0111ang t\u1EA3i con; g\u1EE1 n\u00FAt l\u00E0m focus b\u00E0n ph\u00EDm r\u01A1i\n v\u1EC1 body. Click trong l\u00FAc t\u1EA3i b\u1ECB onTreeToggle b\u1ECF qua. -->\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n [attr.aria-label]=\"'core.component.table.tree-toggle' | sdTranslate\"\n [attr.aria-expanded]=\"!!_tree.isExpanded\"\n [attr.aria-busy]=\"_expanding ? 'true' : null\"\n [attr.aria-disabled]=\"_expanding ? 'true' : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n @if (_expanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n }\n </button>\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n <div class=\"sd-table-surface\" [class.sd-table-surface--quick-search]=\"!!_quickSearch\">\n @if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: l\u1EDBp loading kh\u00F4ng ph\u1EE7 l\u00EAn b\u1EA3ng: header, filter, sort v\u00E0 thanh cu\u1ED9n lu\u00F4n d\u00F9ng \u0111\u01B0\u1EE3c. Ch\u01B0a c\u00F3 d\u00F2ng th\u00EC\n khung x\u01B0\u01A1ng (matNoDataRow); \u0111\u00E3 c\u00F3 d\u00F2ng th\u00EC gi\u1EEF d\u00F2ng c\u0169, qu\u00E1 showDelay m\u1EDBi l\u00E0m m\u1EDD d\u00F2ng v\u00E0 hi\u1EC7n thanh ti\u1EBFn\n tr\u00ECnh. aria-busy v\u1EABn theo loading() th\u1EADt; v\u00F9ng .sd-table-live b\u00E1o \"\u0111ang t\u1EA3i\"/\"\u0111\u00E3 t\u1EA3i xong\". -->\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [class.c-table--dim]=\"_loadingView === 'refresh' && loadingSettings().dim\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n @if (_loadingView === 'refresh') {\n <!-- Mobile: kh\u00F4ng c\u00F3 header b\u1EA3ng; thanh n\u1EB1m \u1EDF m\u00E9p tr\u00EAn danh s\u00E1ch th\u1EBB, d\u01B0\u1EDBi command header. Anchor cao 0\n n\u00EAn thanh hi\u1EC7n/\u1EA9n kh\u00F4ng \u0111\u1EA9y th\u1EBB. -->\n <div class=\"sd-table-progress-anchor\">\n <div class=\"sd-table-progress\" aria-hidden=\"true\"></div>\n </div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!_tableOption.expand?.always) {\n @let _expanding = !!element.meta.expand?.isExpanding;\n <!-- why: n\u00FAt 35px gi\u1EEF nguy\u00EAn khi \u0111ang t\u1EA3i ([loading] thay prefix icon b\u1EB1ng spinner) \u0111\u1EC3 focus b\u00E0n ph\u00EDm\n kh\u00F4ng m\u1EA5t; onExpand b\u1ECF qua click trong l\u00FAc t\u1EA3i. color primary ch\u1EC9 \u0111\u1EC3 spinner theo m\u00E0u nh\u1EA5n. -->\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [color]=\"_expanding ? 'primary' : null\"\n [loading]=\"_expanding\"\n [attr.aria-busy]=\"_expanding ? 'true' : null\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div>\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div>\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n <!-- why: khung x\u01B0\u01A1ng l\u00E0 d\u00F2ng th\u1EADt trong tbody (matNoDataRow ch\u1EC9 hi\u1EC7n khi kh\u00F4ng c\u00F3 d\u00F2ng d\u1EEF li\u1EC7u) n\u00EAn \u00F4 th\u1EB3ng\n c\u1ED9t v\u1EDBi header, k\u1EC3 c\u1EA3 header nh\u00F3m, m\u00E0 kh\u00F4ng ph\u1EA3i \u0111o; footer v\u1EABn n\u1EB1m d\u01B0\u1EDBi; dataSource kh\u00F4ng \u0111\u1ED5i. -->\n <ng-template matNoDataRow>\n @for (cells of skeleton(); track $index) {\n <tr class=\"sd-table-skeleton-row\" aria-hidden=\"true\">\n @for (cell of cells; track cell.field) {\n <td class=\"sd-table-skeleton-cell\" [class.d-none]=\"cell.hidden\">\n @if (cell.shape !== 'none') {\n <span\n class=\"sd-table-skeleton-bar\"\n [attr.data-shape]=\"cell.shape\"\n [attr.data-align]=\"cell.align\"\n [style.width]=\"cell.width\"\n [style.max-width]=\"cell.maxWidth\"></span>\n }\n </td>\n }\n </tr>\n }\n </ng-template>\n </table>\n }\n @let _readError = _readState.status === 'error';\n <!-- why: d\u00F2ng c\u0169 b\u1ECB g\u1EE1 khi l\u1EA7n \u0111\u1ECDc hi\u1EC7n h\u00E0nh l\u1ED7i, n\u00EAn v\u00F9ng l\u1ED7i/empty ch\u1EC9 hi\u1EC7n khi b\u1EA3ng kh\u00F4ng c\u00F2n d\u00F2ng n\u00E0o\n \u2014 end user kh\u00F4ng bao gi\u1EDD th\u1EA5y d\u1EEF li\u1EC7u v\u00E0 l\u1ED7i c\u00F9ng l\u00FAc (NSP-4877). -->\n @let _noRows = !_readError && !_loading && !_total && !_items.length && _loadingView === 'none';\n @if ((_readError && !_hideReadError) || (_noRows && _readState.status === 'empty' && !!_dataStateTemplate)) {\n <sd-data-state [state]=\"_readError ? 'error' : 'empty'\" [retryable]=\"_readError\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <!-- why: b\u1EA3ng local l\u1ED7i d\u00F9ng c\u00F9ng giao di\u1EC7n l\u1ED7i v\u1EDBi b\u1EA3ng server (sd-data-state, role=\"alert\") v\u00E0 c\u00F9ng\n sdDataStateTemplate; th\u1EED l\u1EA1i = reload() v\u00EC local kh\u00F4ng c\u00F3 snapshot \u0111\u1ECDc \u0111\u1EC3 retryRead(). -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"reload()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (_noRows && !loadError()) {\n <!-- why: empty m\u1EB7c \u0111\u1ECBnh gi\u1EEF 3 tr\u1EA1ng th\u00E1i (filter kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 / ch\u01B0a ch\u1ECDn filter b\u1EAFt bu\u1ED9c / ch\u01B0a c\u00F3 d\u1EEF li\u1EC7u)\n c\u00F9ng \u1EA3nh c\u1EA5u h\u00ECnh qua SD_TABLE_CONFIGURATION.images, cho c\u1EA3 b\u1EA3ng server (NSP-5551). Kh\u00F4ng c\u00F3 role live:\n v\u00F9ng .sd-table-live (lu\u00F4n c\u00F3 trong DOM) \u0111\u1ECDc ti\u00EAu \u0111\u1EC1 c\u1EE7a kh\u1ED1i n\u00E0y. -->\n <div class=\"c-no-data-row\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (_loadingView === 'refresh' && !_mobileCards) {\n <!-- N\u1EB1m trong .c-container, kh\u00F4ng trong .c-table, \u0111\u1EC3 kh\u00F4ng cu\u1ED9n ngang theo b\u1EA3ng; top = --sd-table-head-h (\u0111o). -->\n <div class=\"sd-table-progress\" aria-hidden=\"true\"></div>\n }\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let _unknownTotalPager = unknownTotalPager();\n @if (_unknownTotalPager) {\n <!-- paginate.total 'unknown': no total exists, so mat-paginator (which derives Next/Last and the\n range from `length`) is replaced by a pager that renders only the rows actually shown. -->\n @if (!_tableOption.paginate?.hidden && unknownTotalPagerVisible()) {\n <sd-table-unknown-total-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [state]=\"_unknownTotalPager\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages\"\n [hidePageSize]=\"_isMobile || !!_tableOption.paginate?.hidePageSize\"\n [showFirstButton]=\"!_isMobile && !!_tableOption.paginate?.showFirstLastButtons\"\n [autoId]=\"_autoId\"\n (page)=\"onUnknownTotalPage($event)\"></sd-table-unknown-total-paginator>\n } @else if (!_isMobile && !_tableOption.paginate?.hidden && unknownTotalSingleCount()) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ unknownTotalSingleCount() }}</span>\n </div>\n }\n } @else {\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"\n [selectConfig]=\"{ panelClass: ['sd-select-panel', 'sd-table-page-size-panel'] }\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n} @else if (_loadingView === 'skeleton') {\n <!-- why: lookup c\u1ED9t (values/lazy-values) c\u00F3 th\u1EC3 ch\u1EADm; ch\u01B0a c\u00F3 configuration n\u00EAn ch\u01B0a bi\u1EBFt c\u1ED9t, v\u1EBD khung x\u01B0\u01A1ng chung\n thay v\u00EC \u0111\u1EC3 tr\u1ED1ng. Hydrate kh\u00F4ng c\u00F3 lookup xong trong microtask n\u00EAn kh\u1ED1i n\u00E0y kh\u00F4ng k\u1ECBp hi\u1EC7n. -->\n <div class=\"sd-table-skeleton-block\" aria-hidden=\"true\">\n @for (cells of genericSkeleton; track $index) {\n <div class=\"sd-table-skeleton-block-row\">\n @for (cell of cells; track cell.field) {\n <span class=\"sd-table-skeleton-cell\">\n <span class=\"sd-table-skeleton-bar\" [style.width]=\"cell.width\" [style.max-width]=\"cell.maxWidth\"></span>\n </span>\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%;--mat-table-row-item-container-height: 36px}:host:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host .sd-table-live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:var(--sd-radius-6, 6px)}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1;isolation:isolate}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,var(--sd-table-group-header-mix, #f2f3f4));box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:var(--sd-font-weight-semibold, 600)}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:var(--sd-table-row-activated-bg, #e5ecff)}:host .c-container .c-table table tr.c-row.selected{background-color:var(--sd-table-row-selected-bg, #eef2ff)}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:var(--sd-table-header-bg, #f2f3f4);border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:var(--sd-table-row-divider, #f2f2f2)!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-header-text, #212121)}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--sd-table-bg, #ffffff)}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:var(--sd-table-bg, #ffffff);border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:var(--sd-table-bg, #ffffff);box-shadow:var(--sd-shadow-sm)}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:var(--sd-text-muted);display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:var(--sd-table-bg, #ffffff)}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:var(--sd-table-select-arrow, #a6a6a6)}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{position:relative;padding-right:24px}:host ::ng-deep th[aria-sort] .sd-table-sort-header:after{content:\"\";position:absolute;top:50%;right:0;width:16px;height:16px;transform:translateY(-50%);background-color:var(--sd-text-secondary);mask-repeat:no-repeat;mask-position:center;mask-size:16px 16px;pointer-events:none}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after,:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{background-color:var(--sd-text)}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size{align-items:center}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select{--mat-select-trigger-text-size: var(--sd-font-size-14, 14px);--mat-paginator-select-trigger-text-size: var(--sd-font-size-14, 14px)}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-infix{display:flex;align-items:center;height:32px;min-height:32px;padding-top:0;padding-bottom:0}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select.mat-mdc-form-field .mat-mdc-form-field-infix mat-select.mat-mdc-select{margin-top:0}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-text-field-wrapper{padding-right:8px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow-wrapper{width:20px;justify-content:center}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow{width:16px;height:16px;color:var(--sd-text-secondary);background-color:currentColor;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E\") center/16px 16px no-repeat}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow svg{display:none}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-flex:hover .mat-mdc-select-arrow{color:var(--sd-text)}::ng-deep .mat-mdc-select-panel.sd-select-panel.sd-table-page-size-panel .mat-mdc-option{min-height:36px;padding:7px 12px}:host ::ng-deep .cdk-drag-preview{box-shadow:var(--sd-shadow-md);background:var(--sd-table-bg);display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid var(--sd-table-row-divider)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:var(--sd-table-group-row-bg, #f5f7fc);border-top:1px solid var(--sd-table-group-row-border, #e6e9f2);border-bottom:1px solid var(--sd-table-group-row-border, #e6e9f2)}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;height:18px;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host ::ng-deep .sd-tree-toggle-btn[aria-busy=true]{cursor:progress}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:var(--sd-table-tree-level-0-bg, #fbfcfe)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:var(--sd-font-weight-medium, 500)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:var(--sd-table-tree-level-1-bg, #ffffff)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:var(--sd-table-tree-level-2-bg, #fafbfd)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:var(--sd-table-tree-level-3-bg, #f6f8fb)}:host ::ng-deep .sd-stt-root{font-weight:var(--sd-font-weight-bold, 700);color:var(--sd-table-tree-root-text, #1f2330)}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table{border-top-left-radius:0;border-top-right-radius:0}@keyframes sd-table-skeleton-sweep{to{background-position:480px 0}}@keyframes sd-table-progress-run{0%{transform:translate(-100%)}to{transform:translate(285.7142857143%)}}@keyframes sd-table-spin{to{transform:rotate(360deg)}}:host tr.sd-table-skeleton-row{height:var(--mat-table-row-item-container-height, 36px)}:host .sd-table-skeleton-cell{padding:0 8px;border-bottom:1px solid var(--sd-table-row-divider);vertical-align:middle}:host .sd-table-skeleton-bar{display:block;height:12px;border-radius:var(--sd-radius-4, 4px);background:linear-gradient(90deg,var(--sd-table-skeleton-bg) 0,var(--sd-table-skeleton-highlight) 40%,var(--sd-table-skeleton-bg) 80%) 0 0/480px 100%;animation:sd-table-skeleton-sweep 1.4s linear infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-skeleton-bar{animation:none}}@media(forced-colors:active){:host .sd-table-skeleton-bar{forced-color-adjust:none;background:GrayText}}:host .sd-table-skeleton-bar[data-align=end]{margin-inline-start:auto}:host .sd-table-skeleton-bar[data-align=center]{margin-inline:auto}:host .sd-table-skeleton-bar[data-shape=pill]{height:20px;border-radius:999px}:host .sd-table-skeleton-bar[data-shape=box]{width:14px;height:14px;border-radius:3px}:host .sd-table-skeleton-block{overflow:hidden;border-radius:var(--sd-radius-6, 6px);background:var(--sd-surface)}:host .sd-table-skeleton-block-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;height:var(--mat-table-row-item-container-height, 36px);border-bottom:1px solid var(--sd-table-row-divider)}:host .sd-table-skeleton-block-row>.sd-table-skeleton-cell{border-bottom:0}:host .c-table>table>::ng-deep tbody{transition:opacity var(--sd-duration-fast, .12s)}@media(prefers-reduced-motion:reduce){:host .c-table>table>::ng-deep tbody{transition:none}}:host .c-table.c-table--dim{cursor:progress}:host .c-table.c-table--dim>table>::ng-deep thead,:host .c-table.c-table--dim>table>::ng-deep tfoot{cursor:auto}:host .c-table.c-table--dim>table>::ng-deep tbody{opacity:var(--sd-table-loading-dim, .55)}:host .c-table.c-table--dim>table>::ng-deep tbody,:host .c-table.c-table--dim>table>::ng-deep tbody *{pointer-events:none!important}:host .sd-table-progress{position:absolute;top:var(--sd-table-head-h, 0px);right:0;left:0;z-index:20;height:2px;overflow:hidden;pointer-events:none;background:var(--sd-table-progress-track)}:host .sd-table-progress:before{content:\"\";position:absolute;inset:0 auto 0 0;width:35%;background:var(--sd-table-spinner);animation:sd-table-progress-run 1.1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-progress:before{width:100%;opacity:.6;animation:none}}@media(forced-colors:active){:host .sd-table-progress{forced-color-adjust:none;box-sizing:content-box;border:1px solid CanvasText;background:Canvas}:host .sd-table-progress:before{background:Highlight}}:host .sd-table-spinner{display:inline-block;flex:0 0 auto;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;border:2px solid var(--sd-table-progress-track);border-top-color:var(--sd-table-spinner);border-radius:50%;animation:sd-table-spin .8s linear infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-spinner{animation:none}}@media(forced-colors:active){:host .sd-table-spinner{forced-color-adjust:none;border-color:GrayText;border-top-color:Highlight}}:host .sd-table-progress-anchor{position:sticky;top:0;z-index:20;height:0}:host .sd-table-progress-anchor>.sd-table-progress{top:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:var(--sd-font-weight-medium, 500)}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}:host(.sd-table--fill){flex:1 1 0;height:auto;min-height:var(--sd-table-fill-min, 0px);overflow:visible}:host(.sd-table--fill) .c-container{min-height:0}:host(.sd-table--fill) .c-container>.c-table{min-height:calc(var(--sd-table-fill-head, 40px) + 5 * var(--mat-table-row-item-container-height, 36px))}:host(.sd-table--fill) .c-container>.c-paginator{flex:none;min-height:48px}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdDataState, selector: "sd-data-state", inputs: ["state", "title", "message", "icon", "fontSet", "iconShape", "retryable", "retryLabel", "actionLabel", "compact", "fullPage"], outputs: ["sdRetry", "sdAction"] }, { kind: "directive", type: SdDataStateTemplateDirective, selector: "ng-template[sdDataStateTemplate]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3$3.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i4$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i4$1.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "component", type: DesktopCommand, selector: "desktop-command", inputs: ["autoId", "item", "itemIndex", "commands"] }, { kind: "component", type: DesktopCellComponent, selector: "desktop-cell", inputs: ["column", "item", "cellDef"] }, { kind: "component", type: ColumnTitleComponent, selector: "column-title", inputs: ["column", "titleDef"] }, { kind: "component", type: ExternalFilterComponent, selector: "external-filter", inputs: ["autoId", "filter", "externalFilters", "filterRegister", "collapsedByDefault"] }, { kind: "component", type: TableQuickSearchComponent, selector: "sd-table-quick-search", inputs: ["option", "value", "autoId", "rightTemplate"], outputs: ["valueChange"] }, { kind: "component", type: ConfigComponent, selector: "config", inputs: ["autoId", "tableOption"], outputs: ["changes"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["autoId", "column", "columnFilter", "cacheValues", "value", "operator", "isMobile"], outputs: ["operatorChange", "filterChange", "filterCommit"] }, { kind: "component", type: MobileFilterComponent, selector: "mobile-filter", inputs: ["autoId", "filter", "externalFilters", "columns", "filterDefs", "filterRegister", "cacheValues"] }, { kind: "pipe", type: SdGroupPipe, name: "sdGroup" }, { kind: "pipe", type: SdTreePipe, name: "sdTree" }, { kind: "pipe", type: SdAggregateRowsPipe, name: "sdAggregateRows" }, { kind: "directive", type: SdAggregateLayoutDirective, selector: "table[sdAggregateLayout]" }, { kind: "directive", type: SdTableFooterRowDefDirective, selector: "[sdTableFooterRowDef]", inputs: ["sdTableFooterRowDef", "sdTableFooterRowDefSticky"] }, { kind: "directive", type: SdScrollDirective, selector: "[sdScroll]" }, { kind: "directive", type: SdHoverCopyDirective, selector: "[sdHoverCopy]", inputs: ["sdHoverCopy", "sdHoverCopyDisabled"] }, { kind: "component", type: SelectorActionComponent, selector: "selector-action", inputs: ["autoId", "tableOption", "selectedTableItems"], outputs: ["clear"] }, { kind: "directive", type: StickyShadowDirective, selector: "[stickyShadow]" }, { kind: "directive", type: SdColumnResizeDirective, selector: "[sdColumnResize]", inputs: ["sdColumnResize", "minWidth", "maxWidth"], outputs: ["resizeEnd"] }, { kind: "directive", type: SdTableSortHeaderDirective, selector: "[sdTableSortHeader]", inputs: ["sdTableSortHeader"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "component", type: SdTableMobileCardsComponent, selector: "sd-table-mobile-cards", inputs: ["table", "rows", "dataRows", "aggregateTemplate", "groupTemplate"] }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }, { kind: "component", type: SdTableUnknownTotalPaginator, selector: "sd-table-unknown-total-paginator", inputs: ["state", "pageSizeOptions", "hidePageSize", "showFirstButton", "autoId"], outputs: ["page"] }], animations: [
|
|
6378
7258
|
trigger('detailExpand', [
|
|
6379
7259
|
state('collapsed', style({ height: '0', minHeight: '0', visibility: 'hidden' })),
|
|
6380
7260
|
state('expanded', style({ height: '*', visibility: 'visible' })),
|
|
@@ -6394,6 +7274,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
6394
7274
|
'[attr.data-autoid]': 'autoId()',
|
|
6395
7275
|
tabindex: '0',
|
|
6396
7276
|
'[attr.data-loading]': 'loading() ? "true" : "false"',
|
|
7277
|
+
'[attr.data-loading-view]': 'loadingView()',
|
|
7278
|
+
'[class.sd-table--fill]': 'fill()',
|
|
6397
7279
|
}, providers: [
|
|
6398
7280
|
DatePipe,
|
|
6399
7281
|
DecimalPipe,
|
|
@@ -6415,7 +7297,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
6415
7297
|
MatPaginatorModule,
|
|
6416
7298
|
MatTableModule,
|
|
6417
7299
|
MatSortModule,
|
|
6418
|
-
MatProgressSpinnerModule,
|
|
6419
7300
|
MatButtonModule,
|
|
6420
7301
|
MatCheckboxModule,
|
|
6421
7302
|
MatRadioModule,
|
|
@@ -6445,12 +7326,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
6445
7326
|
SdTranslatePipe,
|
|
6446
7327
|
SdTableMobileCardsComponent,
|
|
6447
7328
|
SdTableMobileActionsComponent,
|
|
6448
|
-
], template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _showInlineFilter =\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && _total! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n@if (_configuration) {\n @if (!_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @if (_tree.isExpanding) {\n <span class=\"lds-ring sd-tree-spinner\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </span>\n } @else {\n @let _aid = _autoId;\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n <div class=\"sd-table-surface\" [class.sd-table-surface--quick-search]=\"!!_quickSearch\">\n @if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: b\u1EA3ng t\u1EA3i d\u1EEF li\u1EC7u B\u1EA4T \u0110\u1ED2NG B\u1ED8 nh\u01B0ng tr\u01B0\u1EDBc \u0111\u00E2y ch\u1EC9 c\u00F3 spinner thu\u1EA7n h\u00ECnh \u1EA3nh \u2014 screen\n reader kh\u00F4ng \u0111\u01B0\u1EE3c b\u00E1o g\u00EC c\u1EA3. role=\"status\" + aria-live=\"polite\" \u0111\u1ECDc tr\u1EA1ng th\u00E1i ngay khi\n spinner xu\u1EA5t hi\u1EC7n; aria-busy tr\u00EAn v\u00F9ng b\u1EA3ng cho bi\u1EBFt n\u1ED9i dung \u0111ang \u0111\u01B0\u1EE3c thay th\u1EBF. -->\n @if (_loading) {\n <div class=\"c-loading\" role=\"status\" aria-live=\"polite\" [attr.aria-label]=\"'core.component.table.loading' | sdTranslate\">\n <mat-spinner></mat-spinner>\n </div>\n }\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!element.meta.expand?.isExpanding && !_tableOption.expand?.always) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n @if (element.meta.expand?.isExpanding) {\n <div class=\"lds-ring\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div>\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div>\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n </table>\n }\n @let _readError = _readState.status === 'error';\n <!-- why: d\u00F2ng c\u0169 b\u1ECB g\u1EE1 khi l\u1EA7n \u0111\u1ECDc hi\u1EC7n h\u00E0nh l\u1ED7i, n\u00EAn v\u00F9ng l\u1ED7i/empty ch\u1EC9 hi\u1EC7n khi b\u1EA3ng kh\u00F4ng c\u00F2n d\u00F2ng n\u00E0o\n \u2014 end user kh\u00F4ng bao gi\u1EDD th\u1EA5y d\u1EEF li\u1EC7u v\u00E0 l\u1ED7i c\u00F9ng l\u00FAc (NSP-4877). -->\n @let _noRows = !_readError && !_loading && !_total && !_items.length;\n @if ((_readError && !_hideReadError) || (_noRows && _readState.status === 'empty' && !!_dataStateTemplate)) {\n <sd-data-state [state]=\"_readError ? 'error' : 'empty'\" [retryable]=\"_readError\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <div class=\"c-no-data-row\" role=\"alert\">\n <p>{{ 'core.component.table.error-occurred' | sdTranslate }}</p>\n <sd-button [title]=\"'core.component.table.reload' | sdTranslate\" (click)=\"reload()\"></sd-button>\n </div>\n } @else if (_noRows && !loadError()) {\n <!-- why: empty m\u1EB7c \u0111\u1ECBnh gi\u1EEF 3 tr\u1EA1ng th\u00E1i (filter kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 / ch\u01B0a ch\u1ECDn filter b\u1EAFt bu\u1ED9c / ch\u01B0a c\u00F3 d\u1EEF li\u1EC7u)\n c\u00F9ng \u1EA3nh c\u1EA5u h\u00ECnh qua SD_TABLE_CONFIGURATION.images, cho c\u1EA3 b\u1EA3ng server (NSP-5551). -->\n <div class=\"c-no-data-row\" role=\"status\" aria-live=\"polite\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%}:host:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:var(--sd-radius-6, 6px)}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,var(--sd-table-group-header-mix, #f2f3f4));box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:var(--sd-font-weight-semibold, 600)}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:var(--sd-table-row-activated-bg, #e5ecff)}:host .c-container .c-table table tr.c-row.selected{background-color:var(--sd-table-row-selected-bg, #eef2ff)}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:var(--sd-table-header-bg, #f2f3f4);border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:var(--sd-table-row-divider, #f2f2f2)!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-header-text, #212121)}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:#00000014}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-loading{position:absolute;inset:0 0 56px;background:#00000026;z-index:2;display:flex;align-items:center;justify-content:center}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--sd-table-bg, #ffffff)}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:var(--sd-table-bg, #ffffff);border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:var(--sd-table-bg, #ffffff);box-shadow:0 2px 4px #2f313629}:host .lds-ring{display:inline-block;position:relative;width:40px;height:40px}:host .lds-ring div{box-sizing:border-box;display:block;position:absolute;width:32px;height:32px;margin:4px;border:4px solid var(--sd-table-spinner, #cceeff);border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--sd-table-spinner, #cceeff) transparent transparent transparent}:host .lds-ring div:nth-child(1){animation-delay:-.45s}:host .lds-ring div:nth-child(2){animation-delay:-.3s}:host .lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:#00000061;display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .c-container:not(.sd-table-mobile)>.c-loading{border-radius:6px 6px 0 0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:var(--sd-table-bg, #ffffff)}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:var(--sd-table-select-arrow, #a6a6a6)}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{background-repeat:no-repeat;background-position:center right 0;background-size:16px 16px;padding-right:24px}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--outlined .mat-mdc-form-field-infix,:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:2px;padding-bottom:2px;min-height:32px}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select mat-select{margin-top:2px!important}:host ::ng-deep .cdk-drag-preview{box-shadow:0 4px 12px #00000026;background:#fff;display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid rgba(0,0,0,.12)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:var(--sd-table-group-row-bg, #f5f7fc);border-top:1px solid var(--sd-table-group-row-border, #e6e9f2);border-bottom:1px solid var(--sd-table-group-row-border, #e6e9f2)}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;height:18px;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:#0f172a14}:host ::ng-deep .sd-tree-spinner{transform:scale(.45)}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:var(--sd-table-tree-level-0-bg, #fbfcfe)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:var(--sd-font-weight-medium, 500)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:var(--sd-table-tree-level-1-bg, #ffffff)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:var(--sd-table-tree-level-2-bg, #fafbfd)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:var(--sd-table-tree-level-3-bg, #f6f8fb)}:host ::ng-deep .sd-stt-root{font-weight:var(--sd-font-weight-bold, 700);color:var(--sd-table-tree-root-text, #1f2330)}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table,:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-loading{border-top-left-radius:0;border-top-right-radius:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:var(--sd-font-weight-medium, 500)}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"] }]
|
|
7329
|
+
SdTableUnknownTotalPaginator,
|
|
7330
|
+
], template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _loadingView = loadingView();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _showInlineFilter =\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && knownRowCount()! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n<!-- why: v\u00F9ng status lu\u00F4n c\u00F3 trong DOM, k\u1EC3 c\u1EA3 tr\u01B0\u1EDBc khi c\u00F3 configuration. V\u00F9ng ch\u1EC9 render trong l\u00FAc t\u1EA3i b\u1ECB g\u1EE1\n tr\u01B0\u1EDBc khi screen reader k\u1ECBp \u0111\u1ECDc v\u00E0 kh\u00F4ng b\u00E1o \u0111\u01B0\u1EE3c \"\u0111\u00E3 t\u1EA3i xong\". -->\n<span class=\"sd-table-live\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveMessage() }}</span>\n@if (_configuration) {\n @if (!_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [collapsedByDefault]=\"externalFilterCollapsedByDefault()\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @let _aid = _autoId;\n @let _expanding = !!_tree.isExpanding;\n <!-- why: n\u00FAt lu\u00F4n n\u1EB1m trong DOM, ch\u1EC9 \u0111\u1ED5i icon th\u00E0nh spinner khi \u0111ang t\u1EA3i con; g\u1EE1 n\u00FAt l\u00E0m focus b\u00E0n ph\u00EDm r\u01A1i\n v\u1EC1 body. Click trong l\u00FAc t\u1EA3i b\u1ECB onTreeToggle b\u1ECF qua. -->\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n [attr.aria-label]=\"'core.component.table.tree-toggle' | sdTranslate\"\n [attr.aria-expanded]=\"!!_tree.isExpanded\"\n [attr.aria-busy]=\"_expanding ? 'true' : null\"\n [attr.aria-disabled]=\"_expanding ? 'true' : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n @if (_expanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n }\n </button>\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n <div class=\"sd-table-surface\" [class.sd-table-surface--quick-search]=\"!!_quickSearch\">\n @if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: l\u1EDBp loading kh\u00F4ng ph\u1EE7 l\u00EAn b\u1EA3ng: header, filter, sort v\u00E0 thanh cu\u1ED9n lu\u00F4n d\u00F9ng \u0111\u01B0\u1EE3c. Ch\u01B0a c\u00F3 d\u00F2ng th\u00EC\n khung x\u01B0\u01A1ng (matNoDataRow); \u0111\u00E3 c\u00F3 d\u00F2ng th\u00EC gi\u1EEF d\u00F2ng c\u0169, qu\u00E1 showDelay m\u1EDBi l\u00E0m m\u1EDD d\u00F2ng v\u00E0 hi\u1EC7n thanh ti\u1EBFn\n tr\u00ECnh. aria-busy v\u1EABn theo loading() th\u1EADt; v\u00F9ng .sd-table-live b\u00E1o \"\u0111ang t\u1EA3i\"/\"\u0111\u00E3 t\u1EA3i xong\". -->\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [class.c-table--dim]=\"_loadingView === 'refresh' && loadingSettings().dim\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n @if (_loadingView === 'refresh') {\n <!-- Mobile: kh\u00F4ng c\u00F3 header b\u1EA3ng; thanh n\u1EB1m \u1EDF m\u00E9p tr\u00EAn danh s\u00E1ch th\u1EBB, d\u01B0\u1EDBi command header. Anchor cao 0\n n\u00EAn thanh hi\u1EC7n/\u1EA9n kh\u00F4ng \u0111\u1EA9y th\u1EBB. -->\n <div class=\"sd-table-progress-anchor\">\n <div class=\"sd-table-progress\" aria-hidden=\"true\"></div>\n </div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!_tableOption.expand?.always) {\n @let _expanding = !!element.meta.expand?.isExpanding;\n <!-- why: n\u00FAt 35px gi\u1EEF nguy\u00EAn khi \u0111ang t\u1EA3i ([loading] thay prefix icon b\u1EB1ng spinner) \u0111\u1EC3 focus b\u00E0n ph\u00EDm\n kh\u00F4ng m\u1EA5t; onExpand b\u1ECF qua click trong l\u00FAc t\u1EA3i. color primary ch\u1EC9 \u0111\u1EC3 spinner theo m\u00E0u nh\u1EA5n. -->\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [color]=\"_expanding ? 'primary' : null\"\n [loading]=\"_expanding\"\n [attr.aria-busy]=\"_expanding ? 'true' : null\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div>\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div>\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n <!-- why: khung x\u01B0\u01A1ng l\u00E0 d\u00F2ng th\u1EADt trong tbody (matNoDataRow ch\u1EC9 hi\u1EC7n khi kh\u00F4ng c\u00F3 d\u00F2ng d\u1EEF li\u1EC7u) n\u00EAn \u00F4 th\u1EB3ng\n c\u1ED9t v\u1EDBi header, k\u1EC3 c\u1EA3 header nh\u00F3m, m\u00E0 kh\u00F4ng ph\u1EA3i \u0111o; footer v\u1EABn n\u1EB1m d\u01B0\u1EDBi; dataSource kh\u00F4ng \u0111\u1ED5i. -->\n <ng-template matNoDataRow>\n @for (cells of skeleton(); track $index) {\n <tr class=\"sd-table-skeleton-row\" aria-hidden=\"true\">\n @for (cell of cells; track cell.field) {\n <td class=\"sd-table-skeleton-cell\" [class.d-none]=\"cell.hidden\">\n @if (cell.shape !== 'none') {\n <span\n class=\"sd-table-skeleton-bar\"\n [attr.data-shape]=\"cell.shape\"\n [attr.data-align]=\"cell.align\"\n [style.width]=\"cell.width\"\n [style.max-width]=\"cell.maxWidth\"></span>\n }\n </td>\n }\n </tr>\n }\n </ng-template>\n </table>\n }\n @let _readError = _readState.status === 'error';\n <!-- why: d\u00F2ng c\u0169 b\u1ECB g\u1EE1 khi l\u1EA7n \u0111\u1ECDc hi\u1EC7n h\u00E0nh l\u1ED7i, n\u00EAn v\u00F9ng l\u1ED7i/empty ch\u1EC9 hi\u1EC7n khi b\u1EA3ng kh\u00F4ng c\u00F2n d\u00F2ng n\u00E0o\n \u2014 end user kh\u00F4ng bao gi\u1EDD th\u1EA5y d\u1EEF li\u1EC7u v\u00E0 l\u1ED7i c\u00F9ng l\u00FAc (NSP-4877). -->\n @let _noRows = !_readError && !_loading && !_total && !_items.length && _loadingView === 'none';\n @if ((_readError && !_hideReadError) || (_noRows && _readState.status === 'empty' && !!_dataStateTemplate)) {\n <sd-data-state [state]=\"_readError ? 'error' : 'empty'\" [retryable]=\"_readError\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <!-- why: b\u1EA3ng local l\u1ED7i d\u00F9ng c\u00F9ng giao di\u1EC7n l\u1ED7i v\u1EDBi b\u1EA3ng server (sd-data-state, role=\"alert\") v\u00E0 c\u00F9ng\n sdDataStateTemplate; th\u1EED l\u1EA1i = reload() v\u00EC local kh\u00F4ng c\u00F3 snapshot \u0111\u1ECDc \u0111\u1EC3 retryRead(). -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"reload()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (_noRows && !loadError()) {\n <!-- why: empty m\u1EB7c \u0111\u1ECBnh gi\u1EEF 3 tr\u1EA1ng th\u00E1i (filter kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 / ch\u01B0a ch\u1ECDn filter b\u1EAFt bu\u1ED9c / ch\u01B0a c\u00F3 d\u1EEF li\u1EC7u)\n c\u00F9ng \u1EA3nh c\u1EA5u h\u00ECnh qua SD_TABLE_CONFIGURATION.images, cho c\u1EA3 b\u1EA3ng server (NSP-5551). Kh\u00F4ng c\u00F3 role live:\n v\u00F9ng .sd-table-live (lu\u00F4n c\u00F3 trong DOM) \u0111\u1ECDc ti\u00EAu \u0111\u1EC1 c\u1EE7a kh\u1ED1i n\u00E0y. -->\n <div class=\"c-no-data-row\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (_loadingView === 'refresh' && !_mobileCards) {\n <!-- N\u1EB1m trong .c-container, kh\u00F4ng trong .c-table, \u0111\u1EC3 kh\u00F4ng cu\u1ED9n ngang theo b\u1EA3ng; top = --sd-table-head-h (\u0111o). -->\n <div class=\"sd-table-progress\" aria-hidden=\"true\"></div>\n }\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let _unknownTotalPager = unknownTotalPager();\n @if (_unknownTotalPager) {\n <!-- paginate.total 'unknown': no total exists, so mat-paginator (which derives Next/Last and the\n range from `length`) is replaced by a pager that renders only the rows actually shown. -->\n @if (!_tableOption.paginate?.hidden && unknownTotalPagerVisible()) {\n <sd-table-unknown-total-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [state]=\"_unknownTotalPager\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages\"\n [hidePageSize]=\"_isMobile || !!_tableOption.paginate?.hidePageSize\"\n [showFirstButton]=\"!_isMobile && !!_tableOption.paginate?.showFirstLastButtons\"\n [autoId]=\"_autoId\"\n (page)=\"onUnknownTotalPage($event)\"></sd-table-unknown-total-paginator>\n } @else if (!_isMobile && !_tableOption.paginate?.hidden && unknownTotalSingleCount()) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ unknownTotalSingleCount() }}</span>\n </div>\n }\n } @else {\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"\n [selectConfig]=\"{ panelClass: ['sd-select-panel', 'sd-table-page-size-panel'] }\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n} @else if (_loadingView === 'skeleton') {\n <!-- why: lookup c\u1ED9t (values/lazy-values) c\u00F3 th\u1EC3 ch\u1EADm; ch\u01B0a c\u00F3 configuration n\u00EAn ch\u01B0a bi\u1EBFt c\u1ED9t, v\u1EBD khung x\u01B0\u01A1ng chung\n thay v\u00EC \u0111\u1EC3 tr\u1ED1ng. Hydrate kh\u00F4ng c\u00F3 lookup xong trong microtask n\u00EAn kh\u1ED1i n\u00E0y kh\u00F4ng k\u1ECBp hi\u1EC7n. -->\n <div class=\"sd-table-skeleton-block\" aria-hidden=\"true\">\n @for (cells of genericSkeleton; track $index) {\n <div class=\"sd-table-skeleton-block-row\">\n @for (cell of cells; track cell.field) {\n <span class=\"sd-table-skeleton-cell\">\n <span class=\"sd-table-skeleton-bar\" [style.width]=\"cell.width\" [style.max-width]=\"cell.maxWidth\"></span>\n </span>\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%;--mat-table-row-item-container-height: 36px}:host:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host .sd-table-live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:var(--sd-radius-6, 6px)}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1;isolation:isolate}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,var(--sd-table-group-header-mix, #f2f3f4));box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:var(--sd-font-weight-semibold, 600)}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:var(--sd-table-row-activated-bg, #e5ecff)}:host .c-container .c-table table tr.c-row.selected{background-color:var(--sd-table-row-selected-bg, #eef2ff)}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:var(--sd-table-header-bg, #f2f3f4);border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:var(--sd-table-row-divider, #f2f2f2)!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-header-text, #212121)}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--sd-table-bg, #ffffff)}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:var(--sd-table-bg, #ffffff);border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:var(--sd-table-bg, #ffffff);box-shadow:var(--sd-shadow-sm)}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:var(--sd-text-muted);display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:var(--sd-table-bg, #ffffff)}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:var(--sd-table-select-arrow, #a6a6a6)}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{position:relative;padding-right:24px}:host ::ng-deep th[aria-sort] .sd-table-sort-header:after{content:\"\";position:absolute;top:50%;right:0;width:16px;height:16px;transform:translateY(-50%);background-color:var(--sd-text-secondary);mask-repeat:no-repeat;mask-position:center;mask-size:16px 16px;pointer-events:none}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after,:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{background-color:var(--sd-text)}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size{align-items:center}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select{--mat-select-trigger-text-size: var(--sd-font-size-14, 14px);--mat-paginator-select-trigger-text-size: var(--sd-font-size-14, 14px)}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-infix{display:flex;align-items:center;height:32px;min-height:32px;padding-top:0;padding-bottom:0}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select.mat-mdc-form-field .mat-mdc-form-field-infix mat-select.mat-mdc-select{margin-top:0}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-text-field-wrapper{padding-right:8px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow-wrapper{width:20px;justify-content:center}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow{width:16px;height:16px;color:var(--sd-text-secondary);background-color:currentColor;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E\") center/16px 16px no-repeat}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow svg{display:none}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-flex:hover .mat-mdc-select-arrow{color:var(--sd-text)}::ng-deep .mat-mdc-select-panel.sd-select-panel.sd-table-page-size-panel .mat-mdc-option{min-height:36px;padding:7px 12px}:host ::ng-deep .cdk-drag-preview{box-shadow:var(--sd-shadow-md);background:var(--sd-table-bg);display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid var(--sd-table-row-divider)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:var(--sd-table-group-row-bg, #f5f7fc);border-top:1px solid var(--sd-table-group-row-border, #e6e9f2);border-bottom:1px solid var(--sd-table-group-row-border, #e6e9f2)}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;height:18px;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host ::ng-deep .sd-tree-toggle-btn[aria-busy=true]{cursor:progress}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:var(--sd-table-tree-level-0-bg, #fbfcfe)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:var(--sd-font-weight-medium, 500)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:var(--sd-table-tree-level-1-bg, #ffffff)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:var(--sd-table-tree-level-2-bg, #fafbfd)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:var(--sd-table-tree-level-3-bg, #f6f8fb)}:host ::ng-deep .sd-stt-root{font-weight:var(--sd-font-weight-bold, 700);color:var(--sd-table-tree-root-text, #1f2330)}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table{border-top-left-radius:0;border-top-right-radius:0}@keyframes sd-table-skeleton-sweep{to{background-position:480px 0}}@keyframes sd-table-progress-run{0%{transform:translate(-100%)}to{transform:translate(285.7142857143%)}}@keyframes sd-table-spin{to{transform:rotate(360deg)}}:host tr.sd-table-skeleton-row{height:var(--mat-table-row-item-container-height, 36px)}:host .sd-table-skeleton-cell{padding:0 8px;border-bottom:1px solid var(--sd-table-row-divider);vertical-align:middle}:host .sd-table-skeleton-bar{display:block;height:12px;border-radius:var(--sd-radius-4, 4px);background:linear-gradient(90deg,var(--sd-table-skeleton-bg) 0,var(--sd-table-skeleton-highlight) 40%,var(--sd-table-skeleton-bg) 80%) 0 0/480px 100%;animation:sd-table-skeleton-sweep 1.4s linear infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-skeleton-bar{animation:none}}@media(forced-colors:active){:host .sd-table-skeleton-bar{forced-color-adjust:none;background:GrayText}}:host .sd-table-skeleton-bar[data-align=end]{margin-inline-start:auto}:host .sd-table-skeleton-bar[data-align=center]{margin-inline:auto}:host .sd-table-skeleton-bar[data-shape=pill]{height:20px;border-radius:999px}:host .sd-table-skeleton-bar[data-shape=box]{width:14px;height:14px;border-radius:3px}:host .sd-table-skeleton-block{overflow:hidden;border-radius:var(--sd-radius-6, 6px);background:var(--sd-surface)}:host .sd-table-skeleton-block-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;height:var(--mat-table-row-item-container-height, 36px);border-bottom:1px solid var(--sd-table-row-divider)}:host .sd-table-skeleton-block-row>.sd-table-skeleton-cell{border-bottom:0}:host .c-table>table>::ng-deep tbody{transition:opacity var(--sd-duration-fast, .12s)}@media(prefers-reduced-motion:reduce){:host .c-table>table>::ng-deep tbody{transition:none}}:host .c-table.c-table--dim{cursor:progress}:host .c-table.c-table--dim>table>::ng-deep thead,:host .c-table.c-table--dim>table>::ng-deep tfoot{cursor:auto}:host .c-table.c-table--dim>table>::ng-deep tbody{opacity:var(--sd-table-loading-dim, .55)}:host .c-table.c-table--dim>table>::ng-deep tbody,:host .c-table.c-table--dim>table>::ng-deep tbody *{pointer-events:none!important}:host .sd-table-progress{position:absolute;top:var(--sd-table-head-h, 0px);right:0;left:0;z-index:20;height:2px;overflow:hidden;pointer-events:none;background:var(--sd-table-progress-track)}:host .sd-table-progress:before{content:\"\";position:absolute;inset:0 auto 0 0;width:35%;background:var(--sd-table-spinner);animation:sd-table-progress-run 1.1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-progress:before{width:100%;opacity:.6;animation:none}}@media(forced-colors:active){:host .sd-table-progress{forced-color-adjust:none;box-sizing:content-box;border:1px solid CanvasText;background:Canvas}:host .sd-table-progress:before{background:Highlight}}:host .sd-table-spinner{display:inline-block;flex:0 0 auto;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;border:2px solid var(--sd-table-progress-track);border-top-color:var(--sd-table-spinner);border-radius:50%;animation:sd-table-spin .8s linear infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-spinner{animation:none}}@media(forced-colors:active){:host .sd-table-spinner{forced-color-adjust:none;border-color:GrayText;border-top-color:Highlight}}:host .sd-table-progress-anchor{position:sticky;top:0;z-index:20;height:0}:host .sd-table-progress-anchor>.sd-table-progress{top:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:var(--sd-font-weight-medium, 500)}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}:host(.sd-table--fill){flex:1 1 0;height:auto;min-height:var(--sd-table-fill-min, 0px);overflow:visible}:host(.sd-table--fill) .c-container{min-height:0}:host(.sd-table--fill) .c-container>.c-table{min-height:calc(var(--sd-table-fill-head, 40px) + 5 * var(--mat-table-row-item-container-height, 36px))}:host(.sd-table--fill) .c-container>.c-paginator{flex:none;min-height:48px}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"] }]
|
|
6449
7331
|
}], ctorParameters: () => [] });
|
|
6450
7332
|
|
|
6451
7333
|
/**
|
|
6452
7334
|
* Generated bundle index. Do not edit.
|
|
6453
7335
|
*/
|
|
6454
7336
|
|
|
6455
|
-
export { SD_TABLE_CONFIGURATION, SdConvertToPagingReq, SdMaterialFooterDefDirective, SdTable, SdTableCellDefDirective, SdTableCommandHeaderDefDirective, SdTableExpandDefDirective, SdTableFilterDefDirective, SdTableGroupDefDirective, SdTablePaginatorIntl, SdTableQuickSearchRightDefDirective, SdTableRowMobileDefDirective, SdTableTitleDefDirective };
|
|
7337
|
+
export { SD_TABLE_CONFIGURATION, SD_TABLE_LAYOUT, SdConvertToPagingReq, SdMaterialFooterDefDirective, SdTable, SdTableCellDefDirective, SdTableCommandHeaderDefDirective, SdTableExpandDefDirective, SdTableFilterDefDirective, SdTableGroupDefDirective, SdTablePaginatorIntl, SdTableQuickSearchRightDefDirective, SdTableRowMobileDefDirective, SdTableTitleDefDirective };
|
|
6456
7338
|
//# sourceMappingURL=sdcorejs-angular-components-table.mjs.map
|