@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
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const PRODUCT_STATUS_OPTIONS = [
|
|
2
|
+
{ id: 'active', name: 'Đang hoạt động', color: 'success' },
|
|
3
|
+
{ id: 'inactive', name: 'Ngừng hoạt động', color: 'secondary' },
|
|
4
|
+
];
|
|
5
|
+
/** Badge trạng thái cạnh title của chi tiết. */
|
|
6
|
+
function productStatusBadge(status) {
|
|
7
|
+
const option = PRODUCT_STATUS_OPTIONS.find(item => item.id === status);
|
|
8
|
+
return { type: 'round', title: option?.name ?? status, color: option?.color };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { PRODUCT_STATUS_OPTIONS as P, productStatusBadge as p };
|
|
12
|
+
//# sourceMappingURL=sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/product/services/product.model.ts"],"sourcesContent":["import type { SdBadgeData } from '@sdcorejs/angular/components/badge';\nimport type { PagingReq, PagingRes } from '@sdcorejs/utils/models';\n\nexport type ProductStatus = 'active' | 'inactive';\n\nexport const PRODUCT_STATUS_OPTIONS = [\n { id: 'active', name: 'Đang hoạt động', color: 'success' },\n { id: 'inactive', name: 'Ngừng hoạt động', color: 'secondary' },\n] satisfies { id: ProductStatus; name: string; color: SdBadgeData['color'] }[];\n\nexport interface ProductDto {\n readonly id: string;\n readonly code: string;\n readonly name: string;\n readonly status: ProductStatus;\n /** Đơn vị tính. */\n readonly unit: string;\n /** Giá bán (₫). */\n readonly price: number;\n}\n\n/** PagingReq dùng pageNumber bắt đầu từ 0. */\nexport type ProductListReq = PagingReq<ProductDto>;\nexport type ProductListRes = PagingRes<ProductDto>;\n\nexport interface ProductSaveReq {\n readonly code: string;\n readonly name: string;\n readonly status: ProductStatus;\n readonly unit: string;\n readonly price: number;\n}\n\n/** Badge trạng thái cạnh title của chi tiết. */\nexport function productStatusBadge(status: ProductStatus): SdBadgeData {\n const option = PRODUCT_STATUS_OPTIONS.find(item => item.id === status);\n return { type: 'round', title: option?.name ?? status, color: option?.color };\n}\n"],"names":[],"mappings":"AAKO,MAAM,sBAAsB,GAAG;IACpC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE;IAC1D,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,WAAW,EAAE;;AA0BjE;AACM,SAAU,kBAAkB,CAAC,MAAqB,EAAA;AACtD,IAAA,MAAM,MAAM,GAAG,sBAAsB,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC;AACtE,IAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,IAAI,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;AAC/E;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, Injectable } from '@angular/core';
|
|
3
|
+
import { shareReplay, tap } from 'rxjs';
|
|
4
|
+
import { B as BaseApiService } from './sdcorejs-angular-modules-pattern-base-api.service-CVEKaR8U.mjs';
|
|
5
|
+
|
|
6
|
+
class ProductService extends BaseApiService {
|
|
7
|
+
/** Một request cho mỗi ID trong phạm vi service: pipe và select dùng chung kết quả. */
|
|
8
|
+
#details = new Map();
|
|
9
|
+
#changes = signal(0);
|
|
10
|
+
/** Tăng sau mỗi lần tạo hoặc cập nhật thành công: danh sách tải lại khi quay về. */
|
|
11
|
+
changes = this.#changes.asReadonly();
|
|
12
|
+
list(req) {
|
|
13
|
+
return this.http.get(this.apiUrl('products'), {
|
|
14
|
+
params: this.buildPagingReq(req),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
detail(id) {
|
|
18
|
+
return this.http.get(this.apiUrl('products', id));
|
|
19
|
+
}
|
|
20
|
+
/** `detail(id)` có cache, cho relation (`productDetail`) và giá trị đã chọn của `product-select`. */
|
|
21
|
+
cachedDetail(id) {
|
|
22
|
+
let detail = this.#details.get(id);
|
|
23
|
+
if (!detail) {
|
|
24
|
+
detail = this.detail(id).pipe(shareReplay({ bufferSize: 1, refCount: false }));
|
|
25
|
+
this.#details.set(id, detail);
|
|
26
|
+
// Lỗi tra cứu không được cache: lần gọi sau hỏi lại.
|
|
27
|
+
detail.subscribe({ error: () => this.#details.delete(id) });
|
|
28
|
+
}
|
|
29
|
+
return detail;
|
|
30
|
+
}
|
|
31
|
+
create(req) {
|
|
32
|
+
return this.http.post(this.apiUrl('products'), req).pipe(tap(() => this.#changes.update(count => count + 1)));
|
|
33
|
+
}
|
|
34
|
+
update(id, req) {
|
|
35
|
+
return this.http.put(this.apiUrl('products', id), req).pipe(tap(() => {
|
|
36
|
+
this.#details.delete(id);
|
|
37
|
+
this.#changes.update(count => count + 1);
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ProductService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
41
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ProductService });
|
|
42
|
+
}
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ProductService, decorators: [{
|
|
44
|
+
type: Injectable
|
|
45
|
+
}] });
|
|
46
|
+
|
|
47
|
+
export { ProductService as P };
|
|
48
|
+
//# sourceMappingURL=sdcorejs-angular-modules-pattern-product.service-Ba73HPGG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-modules-pattern-product.service-Ba73HPGG.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/product/services/product.service.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { shareReplay, tap, type Observable } from 'rxjs';\nimport { BaseApiService } from '../../../services/base-api.service';\nimport type { ProductDto, ProductListReq, ProductListRes, ProductSaveReq } from './product.model';\n\n@Injectable()\nexport class ProductService extends BaseApiService {\n /** Một request cho mỗi ID trong phạm vi service: pipe và select dùng chung kết quả. */\n readonly #details = new Map<string, Observable<ProductDto>>();\n readonly #changes = signal(0);\n /** Tăng sau mỗi lần tạo hoặc cập nhật thành công: danh sách tải lại khi quay về. */\n readonly changes = this.#changes.asReadonly();\n\n list(req: ProductListReq): Observable<ProductListRes> {\n return this.http.get<ProductListRes>(this.apiUrl('products'), {\n params: this.buildPagingReq(req),\n });\n }\n\n detail(id: string): Observable<ProductDto> {\n return this.http.get<ProductDto>(this.apiUrl('products', id));\n }\n\n /** `detail(id)` có cache, cho relation (`productDetail`) và giá trị đã chọn của `product-select`. */\n cachedDetail(id: string): Observable<ProductDto> {\n let detail = this.#details.get(id);\n if (!detail) {\n detail = this.detail(id).pipe(shareReplay({ bufferSize: 1, refCount: false }));\n this.#details.set(id, detail);\n // Lỗi tra cứu không được cache: lần gọi sau hỏi lại.\n detail.subscribe({ error: () => this.#details.delete(id) });\n }\n return detail;\n }\n\n create(req: ProductSaveReq): Observable<ProductDto> {\n return this.http.post<ProductDto>(this.apiUrl('products'), req).pipe(tap(() => this.#changes.update(count => count + 1)));\n }\n\n update(id: string, req: ProductSaveReq): Observable<ProductDto> {\n return this.http.put<ProductDto>(this.apiUrl('products', id), req).pipe(\n tap(() => {\n this.#details.delete(id);\n this.#changes.update(count => count + 1);\n })\n );\n }\n}\n"],"names":[],"mappings":";;;;;AAMM,MAAO,cAAe,SAAQ,cAAc,CAAA;;AAEvC,IAAA,QAAQ,GAAG,IAAI,GAAG,EAAkC;AACpD,IAAA,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC;;AAEpB,IAAA,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;AAE7C,IAAA,IAAI,CAAC,GAAmB,EAAA;AACtB,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAiB,IAAI,CAAC,MAAM,CAAC,UAAU,CAA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ACP,YAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;AACxB,YAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC,CAAC;QAC1C,CAAC,CAAC,CACH;IACH;wGAxCW,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;4GAAd,cAAc,EAAA,CAAA;;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B;;;;;"}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, input, ChangeDetectionStrategy, Component, signal, computed, linkedSignal, untracked } from '@angular/core';
|
|
3
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { RouterLink, Router, ActivatedRoute } from '@angular/router';
|
|
5
|
+
import { firstValueFrom, map } from 'rxjs';
|
|
6
|
+
import { SdButton } from '@sdcorejs/angular/components/button';
|
|
7
|
+
import { SdTabGroup, SdTab } from '@sdcorejs/angular/components/tab';
|
|
8
|
+
import { SdPageComponent } from '@sdcorejs/angular/modules/layout';
|
|
9
|
+
import { SdPermissionDirective } from '@sdcorejs/angular/modules/permission';
|
|
10
|
+
import { SdTable, SdTableCellDefDirective } from '@sdcorejs/angular/components/table';
|
|
11
|
+
import { C as CustomerService } from './sdcorejs-angular-modules-pattern-customer.service-VAMePx_q.mjs';
|
|
12
|
+
import { SdDataState } from '@sdcorejs/angular/components/data-state';
|
|
13
|
+
import { SdSection, SdSectionItem } from '@sdcorejs/angular/components/section';
|
|
14
|
+
import { SdFormatNumberPipe } from '@sdcorejs/angular/pipes';
|
|
15
|
+
import { G as GeneralInformationViewComponent } from './sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs';
|
|
16
|
+
import { c as customerStatusBadge, b as customerTypeName } from './sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs';
|
|
17
|
+
|
|
18
|
+
/** Tab Công nợ của hồ sơ 360°. */
|
|
19
|
+
class DebtsViewComponent {
|
|
20
|
+
#customerService = inject(CustomerService);
|
|
21
|
+
customerId = input.required();
|
|
22
|
+
option = {
|
|
23
|
+
type: 'server',
|
|
24
|
+
items: () => firstValueFrom(this.#customerService.debts(this.customerId())),
|
|
25
|
+
paginate: { pageSize: 10 },
|
|
26
|
+
columns: [
|
|
27
|
+
{ field: 'orderCode', title: 'Đơn hàng', type: 'string', width: '140px' },
|
|
28
|
+
{ field: 'dueDate', title: 'Hạn thanh toán', type: 'date', width: '160px' },
|
|
29
|
+
{ field: 'amount', title: 'Còn nợ (₫)', type: 'number', align: 'right' },
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DebtsViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.21", type: DebtsViewComponent, isStandalone: true, selector: "debts-view", inputs: { customerId: { classPropertyName: "customerId", publicName: "customerId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<sd-table autoId="customer-debts" [option]="option" />`, isInline: true, dependencies: [{ kind: "component", type: SdTable, selector: "sd-table", inputs: ["autoId", "option", "hideReadError"], outputs: ["sdReadStateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
34
|
+
}
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DebtsViewComponent, decorators: [{
|
|
36
|
+
type: Component,
|
|
37
|
+
args: [{
|
|
38
|
+
selector: 'debts-view',
|
|
39
|
+
standalone: true,
|
|
40
|
+
imports: [SdTable],
|
|
41
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
42
|
+
template: `<sd-table autoId="customer-debts" [option]="option" />`,
|
|
43
|
+
}]
|
|
44
|
+
}] });
|
|
45
|
+
|
|
46
|
+
/** Tab Tài liệu của hồ sơ 360°: danh sách ngắn, trạng thái riêng bằng `sd-data-state`. */
|
|
47
|
+
class DocumentsViewComponent {
|
|
48
|
+
#customerService = inject(CustomerService);
|
|
49
|
+
customerId = input.required();
|
|
50
|
+
state = signal('loading');
|
|
51
|
+
documents = signal([]);
|
|
52
|
+
ngOnInit() {
|
|
53
|
+
void this.load();
|
|
54
|
+
}
|
|
55
|
+
async load() {
|
|
56
|
+
this.state.set('loading');
|
|
57
|
+
try {
|
|
58
|
+
const res = await firstValueFrom(this.#customerService.documents(this.customerId()));
|
|
59
|
+
this.documents.set(res.items);
|
|
60
|
+
this.state.set(res.items.length ? 'success' : 'empty');
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
this.state.set('error');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DocumentsViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: DocumentsViewComponent, isStandalone: true, selector: "documents-view", inputs: { customerId: { classPropertyName: "customerId", publicName: "customerId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
68
|
+
<sd-data-state
|
|
69
|
+
[state]="state()"
|
|
70
|
+
retryable
|
|
71
|
+
title=""
|
|
72
|
+
[message]="state() === 'empty' ? 'Khách hàng chưa có tài liệu.' : undefined"
|
|
73
|
+
(sdRetry)="load()">
|
|
74
|
+
<sd-section title="Tài liệu">
|
|
75
|
+
@for (document of documents(); track document.id) {
|
|
76
|
+
<sd-section-item [label]="document.name">{{ document.size / 1024 | sdFormatNumber: 0 }} KB</sd-section-item>
|
|
77
|
+
}
|
|
78
|
+
</sd-section>
|
|
79
|
+
</sd-data-state>
|
|
80
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SdDataState, selector: "sd-data-state", inputs: ["state", "title", "message", "icon", "fontSet", "iconShape", "retryable", "retryLabel", "actionLabel", "compact", "fullPage"], outputs: ["sdRetry", "sdAction"] }, { kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "iconShape", "collapsed", "collapsible", "hideHeader"], outputs: ["collapsedChange"] }, { kind: "component", type: SdSectionItem, selector: "sd-section-item", inputs: ["label", "labelWidth"] }, { kind: "pipe", type: SdFormatNumberPipe, name: "sdFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
81
|
+
}
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DocumentsViewComponent, decorators: [{
|
|
83
|
+
type: Component,
|
|
84
|
+
args: [{
|
|
85
|
+
selector: 'documents-view',
|
|
86
|
+
standalone: true,
|
|
87
|
+
imports: [SdDataState, SdSection, SdSectionItem, SdFormatNumberPipe],
|
|
88
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
89
|
+
template: `
|
|
90
|
+
<sd-data-state
|
|
91
|
+
[state]="state()"
|
|
92
|
+
retryable
|
|
93
|
+
title=""
|
|
94
|
+
[message]="state() === 'empty' ? 'Khách hàng chưa có tài liệu.' : undefined"
|
|
95
|
+
(sdRetry)="load()">
|
|
96
|
+
<sd-section title="Tài liệu">
|
|
97
|
+
@for (document of documents(); track document.id) {
|
|
98
|
+
<sd-section-item [label]="document.name">{{ document.size / 1024 | sdFormatNumber: 0 }} KB</sd-section-item>
|
|
99
|
+
}
|
|
100
|
+
</sd-section>
|
|
101
|
+
</sd-data-state>
|
|
102
|
+
`,
|
|
103
|
+
}]
|
|
104
|
+
}] });
|
|
105
|
+
|
|
106
|
+
/** Tab Đơn hàng của hồ sơ 360°: tải khi tab được mở lần đầu; bảng tự có trạng thái đang tải, rỗng và lỗi. */
|
|
107
|
+
class OrdersViewComponent {
|
|
108
|
+
#customerService = inject(CustomerService);
|
|
109
|
+
customerId = input.required();
|
|
110
|
+
option = {
|
|
111
|
+
type: 'server',
|
|
112
|
+
items: () => firstValueFrom(this.#customerService.orders(this.customerId())),
|
|
113
|
+
paginate: { pageSize: 10 },
|
|
114
|
+
columns: [
|
|
115
|
+
{ field: 'code', title: 'Mã đơn', type: 'string', width: '140px' },
|
|
116
|
+
{ field: 'createdAt', title: 'Ngày tạo', type: 'date', width: '160px' },
|
|
117
|
+
{ field: 'total', title: 'Tổng tiền (₫)', type: 'number', align: 'right' },
|
|
118
|
+
],
|
|
119
|
+
};
|
|
120
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: OrdersViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
121
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.21", type: OrdersViewComponent, isStandalone: true, selector: "orders-view", inputs: { customerId: { classPropertyName: "customerId", publicName: "customerId", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
122
|
+
<sd-table autoId="customer-orders" [option]="option">
|
|
123
|
+
<ng-template sdTableCellDef="code" let-order="item">
|
|
124
|
+
<a [routerLink]="['../../../order', order.id, 'detail']">{{ order.code }}</a>
|
|
125
|
+
</ng-template>
|
|
126
|
+
</sd-table>
|
|
127
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: SdTable, selector: "sd-table", inputs: ["autoId", "option", "hideReadError"], outputs: ["sdReadStateChange"] }, { kind: "directive", type: SdTableCellDefDirective, selector: "[sdTableCellDef]", inputs: ["sdTableCellDef"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
128
|
+
}
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: OrdersViewComponent, decorators: [{
|
|
130
|
+
type: Component,
|
|
131
|
+
args: [{
|
|
132
|
+
selector: 'orders-view',
|
|
133
|
+
standalone: true,
|
|
134
|
+
imports: [RouterLink, SdTable, SdTableCellDefDirective],
|
|
135
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
136
|
+
template: `
|
|
137
|
+
<sd-table autoId="customer-orders" [option]="option">
|
|
138
|
+
<ng-template sdTableCellDef="code" let-order="item">
|
|
139
|
+
<a [routerLink]="['../../../order', order.id, 'detail']">{{ order.code }}</a>
|
|
140
|
+
</ng-template>
|
|
141
|
+
</sd-table>
|
|
142
|
+
`,
|
|
143
|
+
}]
|
|
144
|
+
}] });
|
|
145
|
+
|
|
146
|
+
const TABS = [
|
|
147
|
+
{ key: 'info', label: 'Thông tin' },
|
|
148
|
+
{ key: 'orders', label: 'Đơn hàng' },
|
|
149
|
+
{ key: 'debts', label: 'Công nợ' },
|
|
150
|
+
{ key: 'documents', label: 'Tài liệu' },
|
|
151
|
+
];
|
|
152
|
+
/**
|
|
153
|
+
* Hồ sơ 360° (`:id/360`): thông tin chung và các quan hệ của khách hàng theo tab. Tab ghi trên URL (`?tab=`);
|
|
154
|
+
* mở tab nào mới tải tab đó, mỗi tab tự có trạng thái đang tải, rỗng và lỗi.
|
|
155
|
+
*/
|
|
156
|
+
class ProfileComponent {
|
|
157
|
+
#router = inject(Router);
|
|
158
|
+
#route = inject(ActivatedRoute);
|
|
159
|
+
tabs = TABS;
|
|
160
|
+
entity = toSignal(this.#route.data.pipe(map(data => data['entity'])), { requireSync: true });
|
|
161
|
+
badges = computed(() => [customerStatusBadge(this.entity().status)]);
|
|
162
|
+
typeName = computed(() => customerTypeName(this.entity().type));
|
|
163
|
+
#tabParam = toSignal(this.#route.queryParamMap.pipe(map(params => params.get('tab'))), { requireSync: true });
|
|
164
|
+
tabIndex = computed(() => Math.max(0, TABS.findIndex(tab => tab.key === this.#tabParam())));
|
|
165
|
+
/** Tab đã mở ít nhất một lần: giữ lại khi chuyển tab, không tải lại. Đổi khách hàng thì bắt đầu lại. */
|
|
166
|
+
opened = linkedSignal({
|
|
167
|
+
source: this.entity,
|
|
168
|
+
// untracked: đổi tab không được đặt lại các tab đã mở; chỉ đổi khách hàng mới bắt đầu lại.
|
|
169
|
+
computation: () => new Set([TABS[untracked(this.tabIndex)].key]),
|
|
170
|
+
});
|
|
171
|
+
selectTab(index) {
|
|
172
|
+
const key = TABS[index]?.key ?? 'info';
|
|
173
|
+
this.opened.update(opened => new Set([...opened, key]));
|
|
174
|
+
void this.#router.navigate([], {
|
|
175
|
+
relativeTo: this.#route,
|
|
176
|
+
queryParams: { tab: key === 'info' ? null : key },
|
|
177
|
+
queryParamsHandling: 'merge',
|
|
178
|
+
replaceUrl: true,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
182
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ProfileComponent, isStandalone: true, selector: "profile", ngImport: i0, template: `
|
|
183
|
+
@let customer = entity();
|
|
184
|
+
<sd-page-detail
|
|
185
|
+
[title]="'Hồ sơ khách hàng #' + customer.code"
|
|
186
|
+
[description]="customer.name + ' · ' + typeName()"
|
|
187
|
+
[badges]="badges()"
|
|
188
|
+
[backLink]="['../..']">
|
|
189
|
+
<sd-button
|
|
190
|
+
headerRight
|
|
191
|
+
*sdPermission="'PATTERN_CUSTOMER_U_UPDATE'"
|
|
192
|
+
title="Cập nhật khách hàng"
|
|
193
|
+
prefixIcon="edit"
|
|
194
|
+
type="fill"
|
|
195
|
+
color="primary"
|
|
196
|
+
autoId="customer-profile-update"
|
|
197
|
+
[routerLink]="['../update']" />
|
|
198
|
+
<sd-tab-group sdSubheader [selectedIndex]="tabIndex()" (selectedIndexChange)="selectTab($event)">
|
|
199
|
+
@for (tab of tabs; track tab.key) {
|
|
200
|
+
<sd-tab [label]="tab.label" />
|
|
201
|
+
}
|
|
202
|
+
</sd-tab-group>
|
|
203
|
+
<div class="py-16">
|
|
204
|
+
@for (tab of tabs; track tab.key; let index = $index) {
|
|
205
|
+
@if (opened().has(tab.key)) {
|
|
206
|
+
<div [hidden]="tabIndex() !== index" [attr.data-customer-tab]="tab.key">
|
|
207
|
+
@switch (tab.key) {
|
|
208
|
+
@case ('info') {
|
|
209
|
+
<general-information-view [customer]="customer" />
|
|
210
|
+
}
|
|
211
|
+
@case ('orders') {
|
|
212
|
+
<orders-view [customerId]="customer.id" />
|
|
213
|
+
}
|
|
214
|
+
@case ('debts') {
|
|
215
|
+
<debts-view [customerId]="customer.id" />
|
|
216
|
+
}
|
|
217
|
+
@case ('documents') {
|
|
218
|
+
<documents-view [customerId]="customer.id" />
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
</div>
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
</div>
|
|
225
|
+
</sd-page-detail>
|
|
226
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: SdPageComponent, selector: "sd-page, sd-page-detail, sd-page-form", inputs: ["title", "description", "noHeader", "backLink", "badges", "width", "aside", "toc"] }, { 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: SdTabGroup, selector: "sd-tab-group", inputs: ["preserveContent", "selectedIndex", "variant", "color", "headerPosition", "headerClass", "headerStyle", "bodyClass", "bodyStyle", "alignTabs", "stretchTabs", "animationDuration", "disableRipple", "dynamicHeight", "autoId"], outputs: ["selectedIndexChange", "tabClosed"] }, { kind: "component", type: SdTab, selector: "sd-tab", inputs: ["label", "icon", "badge", "disabled", "closable", "beforeClose"], outputs: ["close", "closeError"] }, { kind: "directive", type: SdPermissionDirective, selector: "[sdPermission]", inputs: ["sdPermission", "sdPermissionKey"] }, { kind: "component", type: GeneralInformationViewComponent, selector: "general-information-view", inputs: ["customer"] }, { kind: "component", type: OrdersViewComponent, selector: "orders-view", inputs: ["customerId"] }, { kind: "component", type: DebtsViewComponent, selector: "debts-view", inputs: ["customerId"] }, { kind: "component", type: DocumentsViewComponent, selector: "documents-view", inputs: ["customerId"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
227
|
+
}
|
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ProfileComponent, decorators: [{
|
|
229
|
+
type: Component,
|
|
230
|
+
args: [{
|
|
231
|
+
selector: 'profile',
|
|
232
|
+
standalone: true,
|
|
233
|
+
imports: [
|
|
234
|
+
RouterLink,
|
|
235
|
+
SdPageComponent,
|
|
236
|
+
SdButton,
|
|
237
|
+
SdTabGroup,
|
|
238
|
+
SdTab,
|
|
239
|
+
SdPermissionDirective,
|
|
240
|
+
GeneralInformationViewComponent,
|
|
241
|
+
OrdersViewComponent,
|
|
242
|
+
DebtsViewComponent,
|
|
243
|
+
DocumentsViewComponent,
|
|
244
|
+
],
|
|
245
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
246
|
+
template: `
|
|
247
|
+
@let customer = entity();
|
|
248
|
+
<sd-page-detail
|
|
249
|
+
[title]="'Hồ sơ khách hàng #' + customer.code"
|
|
250
|
+
[description]="customer.name + ' · ' + typeName()"
|
|
251
|
+
[badges]="badges()"
|
|
252
|
+
[backLink]="['../..']">
|
|
253
|
+
<sd-button
|
|
254
|
+
headerRight
|
|
255
|
+
*sdPermission="'PATTERN_CUSTOMER_U_UPDATE'"
|
|
256
|
+
title="Cập nhật khách hàng"
|
|
257
|
+
prefixIcon="edit"
|
|
258
|
+
type="fill"
|
|
259
|
+
color="primary"
|
|
260
|
+
autoId="customer-profile-update"
|
|
261
|
+
[routerLink]="['../update']" />
|
|
262
|
+
<sd-tab-group sdSubheader [selectedIndex]="tabIndex()" (selectedIndexChange)="selectTab($event)">
|
|
263
|
+
@for (tab of tabs; track tab.key) {
|
|
264
|
+
<sd-tab [label]="tab.label" />
|
|
265
|
+
}
|
|
266
|
+
</sd-tab-group>
|
|
267
|
+
<div class="py-16">
|
|
268
|
+
@for (tab of tabs; track tab.key; let index = $index) {
|
|
269
|
+
@if (opened().has(tab.key)) {
|
|
270
|
+
<div [hidden]="tabIndex() !== index" [attr.data-customer-tab]="tab.key">
|
|
271
|
+
@switch (tab.key) {
|
|
272
|
+
@case ('info') {
|
|
273
|
+
<general-information-view [customer]="customer" />
|
|
274
|
+
}
|
|
275
|
+
@case ('orders') {
|
|
276
|
+
<orders-view [customerId]="customer.id" />
|
|
277
|
+
}
|
|
278
|
+
@case ('debts') {
|
|
279
|
+
<debts-view [customerId]="customer.id" />
|
|
280
|
+
}
|
|
281
|
+
@case ('documents') {
|
|
282
|
+
<documents-view [customerId]="customer.id" />
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
</div>
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
</div>
|
|
289
|
+
</sd-page-detail>
|
|
290
|
+
`,
|
|
291
|
+
}]
|
|
292
|
+
}] });
|
|
293
|
+
|
|
294
|
+
export { ProfileComponent };
|
|
295
|
+
//# sourceMappingURL=sdcorejs-angular-modules-pattern-profile.component-CBlN7eEn.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-modules-pattern-profile.component-CBlN7eEn.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/customer/components/debts-view/debts-view.component.ts","../../../projects/sdcorejs-angular/modules/pattern/features/customer/components/documents-view/documents-view.component.ts","../../../projects/sdcorejs-angular/modules/pattern/features/customer/components/orders-view/orders-view.component.ts","../../../projects/sdcorejs-angular/modules/pattern/features/customer/pages/profile/profile.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, input } from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { SdTable, type SdTableOption } from '@sdcorejs/angular/components/table';\nimport { CustomerService } from '../../services/customer.service';\nimport type { CustomerDebtDto } from '../../services/customer.model';\n\n/** Tab Công nợ của hồ sơ 360°. */\n@Component({\n selector: 'debts-view',\n standalone: true,\n imports: [SdTable],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<sd-table autoId=\"customer-debts\" [option]=\"option\" />`,\n})\nexport class DebtsViewComponent {\n readonly #customerService = inject(CustomerService);\n readonly customerId = input.required<string>();\n protected readonly option: SdTableOption<CustomerDebtDto> = {\n type: 'server',\n items: () => firstValueFrom(this.#customerService.debts(this.customerId())),\n paginate: { pageSize: 10 },\n columns: [\n { field: 'orderCode', title: 'Đơn hàng', type: 'string', width: '140px' },\n { field: 'dueDate', title: 'Hạn thanh toán', type: 'date', width: '160px' },\n { field: 'amount', title: 'Còn nợ (₫)', type: 'number', align: 'right' },\n ],\n };\n}\n","import { ChangeDetectionStrategy, Component, inject, input, OnInit, signal } from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport { SdDataState } from '@sdcorejs/angular/components/data-state';\nimport { SdSection, SdSectionItem } from '@sdcorejs/angular/components/section';\nimport { SdFormatNumberPipe } from '@sdcorejs/angular/pipes';\nimport { CustomerService } from '../../services/customer.service';\nimport type { CustomerDocumentDto } from '../../services/customer.model';\n\n/** Tab Tài liệu của hồ sơ 360°: danh sách ngắn, trạng thái riêng bằng `sd-data-state`. */\n@Component({\n selector: 'documents-view',\n standalone: true,\n imports: [SdDataState, SdSection, SdSectionItem, SdFormatNumberPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <sd-data-state\n [state]=\"state()\"\n retryable\n title=\"\"\n [message]=\"state() === 'empty' ? 'Khách hàng chưa có tài liệu.' : undefined\"\n (sdRetry)=\"load()\">\n <sd-section title=\"Tài liệu\">\n @for (document of documents(); track document.id) {\n <sd-section-item [label]=\"document.name\">{{ document.size / 1024 | sdFormatNumber: 0 }} KB</sd-section-item>\n }\n </sd-section>\n </sd-data-state>\n `,\n})\nexport class DocumentsViewComponent implements OnInit {\n readonly #customerService = inject(CustomerService);\n readonly customerId = input.required<string>();\n protected readonly state = signal<'loading' | 'empty' | 'error' | 'success'>('loading');\n protected readonly documents = signal<readonly CustomerDocumentDto[]>([]);\n\n ngOnInit(): void {\n void this.load();\n }\n\n protected async load(): Promise<void> {\n this.state.set('loading');\n try {\n const res = await firstValueFrom(this.#customerService.documents(this.customerId()));\n this.documents.set(res.items);\n this.state.set(res.items.length ? 'success' : 'empty');\n } catch {\n this.state.set('error');\n }\n }\n}\n","import { ChangeDetectionStrategy, Component, inject, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { firstValueFrom } from 'rxjs';\nimport { SdTable, SdTableCellDefDirective, type SdTableOption } from '@sdcorejs/angular/components/table';\nimport { CustomerService } from '../../services/customer.service';\nimport type { CustomerOrderDto } from '../../services/customer.model';\n\n/** Tab Đơn hàng của hồ sơ 360°: tải khi tab được mở lần đầu; bảng tự có trạng thái đang tải, rỗng và lỗi. */\n@Component({\n selector: 'orders-view',\n standalone: true,\n imports: [RouterLink, SdTable, SdTableCellDefDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <sd-table autoId=\"customer-orders\" [option]=\"option\">\n <ng-template sdTableCellDef=\"code\" let-order=\"item\">\n <a [routerLink]=\"['../../../order', order.id, 'detail']\">{{ order.code }}</a>\n </ng-template>\n </sd-table>\n `,\n})\nexport class OrdersViewComponent {\n readonly #customerService = inject(CustomerService);\n readonly customerId = input.required<string>();\n protected readonly option: SdTableOption<CustomerOrderDto> = {\n type: 'server',\n items: () => firstValueFrom(this.#customerService.orders(this.customerId())),\n paginate: { pageSize: 10 },\n columns: [\n { field: 'code', title: 'Mã đơn', type: 'string', width: '140px' },\n { field: 'createdAt', title: 'Ngày tạo', type: 'date', width: '160px' },\n { field: 'total', title: 'Tổng tiền (₫)', type: 'number', align: 'right' },\n ],\n };\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, linkedSignal, untracked } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { map } from 'rxjs';\nimport { SdButton } from '@sdcorejs/angular/components/button';\nimport { SdTab, SdTabGroup } from '@sdcorejs/angular/components/tab';\nimport { SdPageComponent } from '@sdcorejs/angular/modules/layout';\nimport { SdPermissionDirective } from '@sdcorejs/angular/modules/permission';\nimport { DebtsViewComponent } from '../../components/debts-view/debts-view.component';\nimport { DocumentsViewComponent } from '../../components/documents-view/documents-view.component';\nimport { GeneralInformationViewComponent } from '../../components/general-information-view/general-information-view.component';\nimport { OrdersViewComponent } from '../../components/orders-view/orders-view.component';\nimport { customerStatusBadge, customerTypeName, type CustomerDto } from '../../services/customer.model';\n\nconst TABS = [\n { key: 'info', label: 'Thông tin' },\n { key: 'orders', label: 'Đơn hàng' },\n { key: 'debts', label: 'Công nợ' },\n { key: 'documents', label: 'Tài liệu' },\n] as const;\ntype TabKey = (typeof TABS)[number]['key'];\n\n/**\n * Hồ sơ 360° (`:id/360`): thông tin chung và các quan hệ của khách hàng theo tab. Tab ghi trên URL (`?tab=`);\n * mở tab nào mới tải tab đó, mỗi tab tự có trạng thái đang tải, rỗng và lỗi.\n */\n@Component({\n selector: 'profile',\n standalone: true,\n imports: [\n RouterLink,\n SdPageComponent,\n SdButton,\n SdTabGroup,\n SdTab,\n SdPermissionDirective,\n GeneralInformationViewComponent,\n OrdersViewComponent,\n DebtsViewComponent,\n DocumentsViewComponent,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @let customer = entity();\n <sd-page-detail\n [title]=\"'Hồ sơ khách hàng #' + customer.code\"\n [description]=\"customer.name + ' · ' + typeName()\"\n [badges]=\"badges()\"\n [backLink]=\"['../..']\">\n <sd-button\n headerRight\n *sdPermission=\"'PATTERN_CUSTOMER_U_UPDATE'\"\n title=\"Cập nhật khách hàng\"\n prefixIcon=\"edit\"\n type=\"fill\"\n color=\"primary\"\n autoId=\"customer-profile-update\"\n [routerLink]=\"['../update']\" />\n <sd-tab-group sdSubheader [selectedIndex]=\"tabIndex()\" (selectedIndexChange)=\"selectTab($event)\">\n @for (tab of tabs; track tab.key) {\n <sd-tab [label]=\"tab.label\" />\n }\n </sd-tab-group>\n <div class=\"py-16\">\n @for (tab of tabs; track tab.key; let index = $index) {\n @if (opened().has(tab.key)) {\n <div [hidden]=\"tabIndex() !== index\" [attr.data-customer-tab]=\"tab.key\">\n @switch (tab.key) {\n @case ('info') {\n <general-information-view [customer]=\"customer\" />\n }\n @case ('orders') {\n <orders-view [customerId]=\"customer.id\" />\n }\n @case ('debts') {\n <debts-view [customerId]=\"customer.id\" />\n }\n @case ('documents') {\n <documents-view [customerId]=\"customer.id\" />\n }\n }\n </div>\n }\n }\n </div>\n </sd-page-detail>\n `,\n})\nexport class ProfileComponent {\n readonly #router = inject(Router);\n readonly #route = inject(ActivatedRoute);\n protected readonly tabs = TABS;\n protected readonly entity = toSignal(this.#route.data.pipe(map(data => data['entity'] as CustomerDto)), { requireSync: true });\n protected readonly badges = computed(() => [customerStatusBadge(this.entity().status)]);\n protected readonly typeName = computed(() => customerTypeName(this.entity().type));\n readonly #tabParam = toSignal(this.#route.queryParamMap.pipe(map(params => params.get('tab'))), { requireSync: true });\n protected readonly tabIndex = computed(() =>\n Math.max(\n 0,\n TABS.findIndex(tab => tab.key === this.#tabParam())\n )\n );\n /** Tab đã mở ít nhất một lần: giữ lại khi chuyển tab, không tải lại. Đổi khách hàng thì bắt đầu lại. */\n protected readonly opened = linkedSignal<CustomerDto, ReadonlySet<TabKey>>({\n source: this.entity,\n // untracked: đổi tab không được đặt lại các tab đã mở; chỉ đổi khách hàng mới bắt đầu lại.\n computation: () => new Set<TabKey>([TABS[untracked(this.tabIndex)].key]),\n });\n\n protected selectTab(index: number): void {\n const key = TABS[index]?.key ?? 'info';\n this.opened.update(opened => new Set([...opened, key]));\n void this.#router.navigate([], {\n relativeTo: this.#route,\n queryParams: { tab: key === 'info' ? null : key },\n queryParamsHandling: 'merge',\n replaceUrl: true,\n });\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAMA;MAQa,kBAAkB,CAAA;AACpB,IAAA,gBAAgB,GAAG,MAAM,CAAC,eAAe,CAAC;AAC1C,IAAA,UAAU,GAAG,KAAK,CAAC,QAAQ,EAAU;AAC3B,IAAA,MAAM,GAAmC;AAC1D,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,KAAK,EAAE,MAAM,cAAc,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;AAC3E,QAAA,QAAQ,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;AAC1B,QAAA,OAAO,EAAE;AACP,YAAA,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AACzE,YAAA,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;AAC3E,YAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AACzE,SAAA;KACF;wGAZU,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,E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mBAAmB;wBACnB,kBAAkB;wBAClB,sBAAsB;AACvB,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';
|
|
2
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Injectable, inject } from '@angular/core';
|
|
5
|
+
import { timeout, map } from 'rxjs';
|
|
6
|
+
import { B as BaseApiService } from './sdcorejs-angular-modules-pattern-base-api.service-CVEKaR8U.mjs';
|
|
7
|
+
|
|
8
|
+
class ApprovalService extends BaseApiService {
|
|
9
|
+
list(req) {
|
|
10
|
+
return this.http.get(this.apiUrl('approvals'), { params: this.buildPagingReq(req) });
|
|
11
|
+
}
|
|
12
|
+
detail(id) {
|
|
13
|
+
return this.http.get(this.apiUrl('approvals', id));
|
|
14
|
+
}
|
|
15
|
+
approve(req) {
|
|
16
|
+
return this.http.post(this.apiUrl('approvals', req.id, 'approve'), {});
|
|
17
|
+
}
|
|
18
|
+
reject(req) {
|
|
19
|
+
return this.http.post(this.apiUrl('approvals', req.id, 'reject'), { reason: req.reason });
|
|
20
|
+
}
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ApprovalService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
22
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ApprovalService });
|
|
23
|
+
}
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ApprovalService, decorators: [{
|
|
25
|
+
type: Injectable
|
|
26
|
+
}] });
|
|
27
|
+
|
|
28
|
+
/** Tải đề nghị bằng `detail(id)` trước khi mở panel chi tiết; lỗi đi tới navigation error handler của host. */
|
|
29
|
+
const entityResolver = route => {
|
|
30
|
+
const id = route.paramMap.get('id');
|
|
31
|
+
if (!id?.trim())
|
|
32
|
+
throw new HttpErrorResponse({ status: 404 });
|
|
33
|
+
return inject(ApprovalService)
|
|
34
|
+
.detail(id)
|
|
35
|
+
.pipe(timeout(10_000), map(entity => {
|
|
36
|
+
if (!entity || entity.id !== id)
|
|
37
|
+
throw new HttpErrorResponse({ status: 404 });
|
|
38
|
+
return entity;
|
|
39
|
+
}));
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** Chi tiết là route con `:id`, hiện trong panel phải của danh sách (pattern split). */
|
|
43
|
+
const routes = [
|
|
44
|
+
{
|
|
45
|
+
path: '',
|
|
46
|
+
providers: [ApprovalService],
|
|
47
|
+
canActivateChild: [SdPermissionGuard],
|
|
48
|
+
children: [
|
|
49
|
+
{
|
|
50
|
+
path: '',
|
|
51
|
+
title: 'Phê duyệt',
|
|
52
|
+
data: { permission: 'PATTERN_APPROVAL_R_LIST' },
|
|
53
|
+
loadComponent: () => import('./sdcorejs-angular-modules-pattern-list.component-YJUJsrIZ.mjs').then(module => module.ListComponent),
|
|
54
|
+
children: [
|
|
55
|
+
{
|
|
56
|
+
path: ':id',
|
|
57
|
+
data: { permission: 'PATTERN_APPROVAL_R_DETAIL' },
|
|
58
|
+
resolve: { entity: entityResolver },
|
|
59
|
+
runGuardsAndResolvers: 'paramsChange',
|
|
60
|
+
loadComponent: () => import('./sdcorejs-angular-modules-pattern-detail.component-B1rFhbOc.mjs').then(module => module.DetailComponent),
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
var routes$1 = /*#__PURE__*/Object.freeze({
|
|
69
|
+
__proto__: null,
|
|
70
|
+
routes: routes
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export { ApprovalService as A, routes$1 as r };
|
|
74
|
+
//# sourceMappingURL=sdcorejs-angular-modules-pattern-routes-BvzFafUW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-modules-pattern-routes-BvzFafUW.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/approval/services/approval.service.ts","../../../projects/sdcorejs-angular/modules/pattern/features/approval/entity.resolver.ts","../../../projects/sdcorejs-angular/modules/pattern/features/approval/routes.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport type { Observable } from 'rxjs';\nimport { BaseApiService } from '../../../services/base-api.service';\nimport type { ApprovalDecisionReq, ApprovalDto, ApprovalListReq, ApprovalListRes } from './approval.model';\n\n@Injectable()\nexport class ApprovalService extends BaseApiService {\n list(req: ApprovalListReq): Observable<ApprovalListRes> {\n return this.http.get<ApprovalListRes>(this.apiUrl('approvals'), { params: this.buildPagingReq(req) });\n }\n\n detail(id: string): Observable<ApprovalDto> {\n return this.http.get<ApprovalDto>(this.apiUrl('approvals', id));\n }\n\n approve(req: ApprovalDecisionReq): Observable<ApprovalDto> {\n return this.http.post<ApprovalDto>(this.apiUrl('approvals', req.id, 'approve'), {});\n }\n\n reject(req: ApprovalDecisionReq): Observable<ApprovalDto> {\n return this.http.post<ApprovalDto>(this.apiUrl('approvals', req.id, 'reject'), { reason: req.reason });\n }\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport type { ResolveFn } from '@angular/router';\nimport { map, timeout } from 'rxjs';\nimport { ApprovalService } from './services/approval.service';\nimport type { ApprovalDto } from './services/approval.model';\n\n/** Tải đề nghị bằng `detail(id)` trước khi mở panel chi tiết; lỗi đi tới navigation error handler của host. */\nexport const entityResolver: ResolveFn<ApprovalDto> = route => {\n const id = route.paramMap.get('id');\n if (!id?.trim()) throw new HttpErrorResponse({ status: 404 });\n return inject(ApprovalService)\n .detail(id)\n .pipe(\n timeout(10_000),\n map(entity => {\n if (!entity || entity.id !== id) throw new HttpErrorResponse({ status: 404 });\n return entity;\n })\n );\n};\n","import type { Routes } from '@angular/router';\nimport { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';\nimport { entityResolver } from './entity.resolver';\nimport { ApprovalService } from './services/approval.service';\n\n/** Chi tiết là route con `:id`, hiện trong panel phải của danh sách (pattern split). */\nexport const routes: Routes = [\n {\n path: '',\n providers: [ApprovalService],\n canActivateChild: [SdPermissionGuard],\n children: [\n {\n path: '',\n title: 'Phê duyệt',\n data: { permission: 'PATTERN_APPROVAL_R_LIST' },\n loadComponent: () => import('./pages/list/list.component').then(module => module.ListComponent),\n children: [\n {\n path: ':id',\n data: { permission: 'PATTERN_APPROVAL_R_DETAIL' },\n resolve: { entity: entityResolver },\n runGuardsAndResolvers: 'paramsChange',\n loadComponent: () => import('./pages/detail/detail.component').then(module => module.DetailComponent),\n },\n ],\n },\n ],\n },\n];\n"],"names":[],"mappings":";;;;;;;AAMM,MAAO,eAAgB,SAAQ,cAAc,CAAA;AACjD,IAAA,IAAI,CAAC,GAAoB,EAAA;QACvB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAkB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;IACvG;AAEA,IAAA,MAAM,CAAC,EAAU,EAAA;AACf,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAc,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACjE;AAEA,IAAA,OAAO,CAAC,GAAwB,EAAA;QAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAc,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC;IACrF;AAEA,IAAA,MAAM,CAAC,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