@sdcorejs/angular 21.3.1 → 21.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/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 +142 -11
- package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +542 -24
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +31 -3
- 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 +457 -756
- 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 +2118 -1159
- 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 +177 -283
- 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 +260 -43
- 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 +559 -94
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +1001 -119
- 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 +887 -174
- 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 +484 -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 +457 -125
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +414 -122
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +79 -13
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +75 -18
- 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 +56 -6
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +54 -7
- 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 +87 -33
- 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-BR6jxyYd.mjs +478 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-BR6jxyYd.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-BsEL-y-M.mjs +214 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-BsEL-y-M.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-qTFKh4UG.mjs +277 -0
- package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-qTFKh4UG.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-Cq0GFfo1.mjs +1556 -0
- package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-Cq0GFfo1.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 +2055 -37
- 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-p8-V_Ol9.mjs +51 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-p8-V_Ol9.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-DTcpSsbe.mjs +130 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-DTcpSsbe.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-T2ox0oMZ.mjs +131 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-T2ox0oMZ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DAjVXHXc.mjs +99 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DAjVXHXc.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DkHR_ix2.mjs +118 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DkHR_ix2.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DxWuy1ul.mjs +460 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DxWuy1ul.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-Cbs05A2j.mjs +66 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-Cbs05A2j.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bkk3_Lf0.mjs +148 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bkk3_Lf0.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-BIuEchUV.mjs +467 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-BIuEchUV.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CH21RSWx.mjs +172 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CH21RSWx.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CX4WWzER.mjs +90 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CX4WWzER.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-D1kpfcf_.mjs +514 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-D1kpfcf_.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-DYyFPZUU.mjs +61 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-DYyFPZUU.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-B9vCzIT6.mjs +232 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-B9vCzIT6.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BnROr-Wg.mjs +87 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BnROr-Wg.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-qs8Yoxn0.mjs +170 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-qs8Yoxn0.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-Cbwdhc0Z.mjs +70 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-Cbwdhc0Z.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-DYphTR6C.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-DYphTR6C.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-C692P-z0.mjs +522 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-C692P-z0.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-5sLtmhG1.mjs +71 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-5sLtmhG1.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BIFg9bUW.mjs +629 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BIFg9bUW.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CZ1NoLIo.mjs +115 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CZ1NoLIo.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CmZeYoF7.mjs +118 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CmZeYoF7.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Dy2Rkh8f.mjs +164 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Dy2Rkh8f.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-BdxQkZXW.mjs +1069 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-BdxQkZXW.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-BpSTfkeT.mjs +48 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.service-BpSTfkeT.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-D3QP1i9v.mjs +293 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-D3QP1i9v.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-BA64XAgv.mjs +74 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-BA64XAgv.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-CWTlhZzo.mjs +50 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-CWTlhZzo.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ClRXOw9g.mjs +165 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ClRXOw9g.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DYT6cDVo.mjs +45 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DYT6cDVo.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-Dww3V1b9.mjs +43 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-Dww3V1b9.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-HwJm344-.mjs +74 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-HwJm344-.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ZkBSRFv_.mjs +99 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ZkBSRFv_.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-px1VU73r.mjs +66 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-px1VU73r.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BSDQaT9e.mjs +406 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BSDQaT9e.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-2EN7PuIE.mjs +317 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-2EN7PuIE.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-Crg1J2V5.mjs +132 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-Crg1J2V5.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-LIBiOZLn.mjs +143 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-LIBiOZLn.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-4Mm8-ehz.mjs +128 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-4Mm8-ehz.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-ClEGOr5D.mjs +357 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-ClEGOr5D.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CoGA7wxY.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CoGA7wxY.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/modules/pattern/README.md +76 -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.ts +21 -0
- package/modules/pattern/features/approval/pages/detail/detail.component.ts +139 -0
- package/modules/pattern/features/approval/pages/list/approval-inbox.ts +7 -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.ts +30 -0
- package/modules/pattern/features/approval/services/approval.model.ts +38 -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.ts +123 -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.ts +134 -0
- package/modules/pattern/features/category/entity.resolver.ts +27 -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.ts +42 -0
- package/modules/pattern/features/category/services/category.model.ts +39 -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.ts +131 -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.ts +30 -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.ts +106 -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.ts +140 -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.ts +35 -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.ts +127 -0
- package/modules/pattern/features/customer/entity.resolver.ts +21 -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.ts +120 -0
- package/modules/pattern/features/customer/pipes/customer-detail.pipe.ts +18 -0
- package/modules/pattern/features/customer/routes.ts +59 -0
- package/modules/pattern/features/customer/services/customer.model.ts +87 -0
- package/modules/pattern/features/customer/services/customer.service.ts +79 -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.ts +44 -0
- package/modules/pattern/features/import/pages/flow/flow.component.ts +269 -0
- package/modules/pattern/features/import/routes.ts +19 -0
- package/modules/pattern/features/import/services/import.model.ts +82 -0
- package/modules/pattern/features/import/services/import.service.ts +18 -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.ts +46 -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.ts +205 -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.ts +128 -0
- package/modules/pattern/features/order/entity.resolver.ts +37 -0
- package/modules/pattern/features/order/pages/create/create.component.ts +99 -0
- package/modules/pattern/features/order/pages/detail/detail.component.ts +222 -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.ts +119 -0
- package/modules/pattern/features/order/routes.ts +54 -0
- package/modules/pattern/features/order/services/order.model.ts +109 -0
- package/modules/pattern/features/order/services/order.service.ts +63 -0
- package/modules/pattern/features/partner/pages/create/create.component.ts +324 -0
- package/modules/pattern/features/partner/routes.ts +20 -0
- package/modules/pattern/features/partner/services/partner.model.ts +30 -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.ts +88 -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.ts +30 -0
- package/modules/pattern/features/product/entity.resolver.ts +21 -0
- package/modules/pattern/features/product/pages/create/create.component.ts +85 -0
- package/modules/pattern/features/product/pages/detail/detail.component.ts +53 -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.ts +86 -0
- package/modules/pattern/features/product/pipes/product-detail.pipe.ts +18 -0
- package/modules/pattern/features/product/routes.ts +48 -0
- package/modules/pattern/features/product/services/product.model.ts +38 -0
- package/modules/pattern/features/product/services/product.service.ts +48 -0
- package/modules/pattern/features/settings/pages/update/update.component.ts +227 -0
- package/modules/pattern/features/settings/routes.ts +24 -0
- package/modules/pattern/features/settings/services/settings.model.ts +18 -0
- package/modules/pattern/features/settings/services/settings.service.ts +15 -0
- package/modules/pattern/features/settings/settings.resolver.ts +8 -0
- package/package.json +44 -7
- package/types/sdcorejs-angular-components-avatar.d.ts +67 -2
- package/types/sdcorejs-angular-components-badge.d.ts +206 -6
- package/types/sdcorejs-angular-components-button.d.ts +20 -1
- package/types/sdcorejs-angular-components-ckeditor-styles.d.ts +3 -18
- package/types/sdcorejs-angular-components-editor-engine.d.ts +246 -0
- package/types/sdcorejs-angular-components-editor.d.ts +20 -17
- package/types/sdcorejs-angular-components-file-explorer.d.ts +4 -2
- package/types/sdcorejs-angular-components-form-generic.d.ts +246 -35
- package/types/sdcorejs-angular-components-mini-editor.d.ts +33 -70
- package/types/sdcorejs-angular-components-modal-resizable.d.ts +1 -124
- package/types/sdcorejs-angular-components-operator.d.ts +137 -8
- package/types/sdcorejs-angular-components-section.d.ts +13 -1
- package/types/sdcorejs-angular-components-splitter.d.ts +1 -1
- package/types/sdcorejs-angular-components-tab-router.d.ts +74 -19
- package/types/sdcorejs-angular-components-table.d.ts +210 -18
- package/types/sdcorejs-angular-components-upload-file.d.ts +181 -21
- package/types/sdcorejs-angular-components-window.d.ts +81 -0
- package/types/sdcorejs-angular-components.d.ts +1 -0
- package/types/sdcorejs-angular-configurations.d.ts +8 -1
- package/types/sdcorejs-angular-forms-autocomplete.d.ts +5 -0
- package/types/sdcorejs-angular-forms-chip-calendar.d.ts +163 -18
- package/types/sdcorejs-angular-forms-chip.d.ts +136 -26
- package/types/sdcorejs-angular-forms-date-range.d.ts +24 -2
- package/types/sdcorejs-angular-forms-date.d.ts +23 -2
- package/types/sdcorejs-angular-forms-directives.d.ts +47 -2
- package/types/sdcorejs-angular-forms-input-number.d.ts +23 -2
- package/types/sdcorejs-angular-forms-input.d.ts +23 -2
- package/types/sdcorejs-angular-forms-models.d.ts +38 -3
- package/types/sdcorejs-angular-forms-select.d.ts +32 -2
- package/types/sdcorejs-angular-i18n.d.ts +344 -2
- package/types/sdcorejs-angular-modules-generic.d.ts +316 -0
- package/types/sdcorejs-angular-modules-icon.d.ts +37 -6
- package/types/sdcorejs-angular-modules-layout.d.ts +622 -89
- package/types/sdcorejs-angular-modules-pattern.d.ts +50 -0
- package/types/sdcorejs-angular-modules.d.ts +1 -0
- package/types/sdcorejs-angular-pipes.d.ts +2 -0
- package/types/sdcorejs-angular-services-date-time.d.ts +57 -0
- package/types/sdcorejs-angular-services-storage.d.ts +8 -1
- package/types/sdcorejs-angular-services-unsaved-changes.d.ts +11 -0
- package/types/sdcorejs-angular-services.d.ts +1 -0
- package/types/sdcorejs-angular-utilities-read-state.d.ts +2 -0
- package/types/sdcorejs-angular-utilities-theme.d.ts +1 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Signal, InjectionToken, PipeTransform } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import * as i1 from '@angular/router';
|
|
5
|
-
import { Params } from '@angular/router';
|
|
5
|
+
import { Params, CanDeactivateFn } from '@angular/router';
|
|
6
6
|
import { SdStorage } from '@sdcorejs/angular/services';
|
|
7
|
-
import { SdViewport } from '@sdcorejs/angular/services/viewport';
|
|
8
|
-
import * as _sdcorejs_angular_modules_layout from '@sdcorejs/angular/modules/layout';
|
|
9
7
|
import { MaybeAsync } from '@sdcorejs/utils/models';
|
|
10
8
|
import { Observable } from 'rxjs';
|
|
9
|
+
import { SdViewport } from '@sdcorejs/angular/services/viewport';
|
|
10
|
+
import * as _sdcorejs_angular_modules_layout from '@sdcorejs/angular/modules/layout';
|
|
11
|
+
import { SdBadgeData } from '@sdcorejs/angular/components/badge';
|
|
12
|
+
import { SdSectionRegistry, SdSection } from '@sdcorejs/angular/components/section';
|
|
13
|
+
import { SdTableLayout } from '@sdcorejs/angular/components/table';
|
|
14
|
+
import { FlexibleConnectedPositionStrategyOrigin, ConnectedPosition } from '@angular/cdk/overlay';
|
|
11
15
|
|
|
12
16
|
declare class HomeRoutingModule {
|
|
13
17
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HomeRoutingModule, never>;
|
|
@@ -35,6 +39,23 @@ declare class ForbiddenModule {
|
|
|
35
39
|
|
|
36
40
|
type SdLayoutMenu = SdLayoutRootMenu | SdLayoutChildrenMenu;
|
|
37
41
|
type Menus = SdLayoutMenu[];
|
|
42
|
+
/**
|
|
43
|
+
* Amount of work the user must handle from this menu, such as 3 pending approvals.
|
|
44
|
+
* `neutral` (default) renders a plain count; `warning` and `error` render an attention pill.
|
|
45
|
+
*/
|
|
46
|
+
interface SdLayoutMenuBadge {
|
|
47
|
+
value: number | string;
|
|
48
|
+
tone?: 'neutral' | 'warning' | 'error';
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Informational system or connection state, such as "1 running" or "Connected"; it asks for no action.
|
|
52
|
+
* `live` adds a ring around the status dot.
|
|
53
|
+
*/
|
|
54
|
+
interface SdLayoutMenuStatus {
|
|
55
|
+
label: string;
|
|
56
|
+
tone: 'success' | 'warning' | 'error';
|
|
57
|
+
live?: boolean;
|
|
58
|
+
}
|
|
38
59
|
interface SdLayoutRootMenu {
|
|
39
60
|
id?: string;
|
|
40
61
|
path: string;
|
|
@@ -46,6 +67,14 @@ interface SdLayoutRootMenu {
|
|
|
46
67
|
permission: string | string[] | boolean | (() => boolean);
|
|
47
68
|
level?: number;
|
|
48
69
|
tooltipTitle?: string;
|
|
70
|
+
/** Section heading this top-level menu is grouped under. Rendered by sidebar V4 only. */
|
|
71
|
+
section?: string;
|
|
72
|
+
/** Rendered by sidebar V4 only. */
|
|
73
|
+
badge?: SdLayoutMenuBadge;
|
|
74
|
+
/** Rendered by sidebar V4 only. */
|
|
75
|
+
status?: SdLayoutMenuStatus;
|
|
76
|
+
/** Sidebar V4 shows the item as aria-disabled, never navigates and leaves it out of search. */
|
|
77
|
+
comingSoon?: boolean;
|
|
49
78
|
}
|
|
50
79
|
interface SdLayoutChildrenMenu {
|
|
51
80
|
id?: string;
|
|
@@ -55,85 +84,14 @@ interface SdLayoutChildrenMenu {
|
|
|
55
84
|
children?: (SdLayoutRootMenu | SdLayoutChildrenMenu)[];
|
|
56
85
|
level?: number;
|
|
57
86
|
tooltipTitle?: string;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
* Namespace do consumer cung cấp cho toàn bộ state layout được persist (thường là id user hoặc tenant).
|
|
67
|
-
*
|
|
68
|
-
* why: các key dưới đây là UUID CỐ ĐỊNH, không gắn với ai cả. Trên máy dùng chung, user A đăng xuất
|
|
69
|
-
* rồi user B đăng nhập thì `pinnedMenuKeys` / `recentMenuKeys` / `lastActiveMenuGroupId` của A vẫn
|
|
70
|
-
* còn nguyên trong localStorage và B nhìn thấy đúng những module A đã ghim và vừa truy cập. Cấp
|
|
71
|
-
* namespace theo user/tenant sẽ tách hẳn không gian lưu trữ.
|
|
72
|
-
*
|
|
73
|
-
* ⚠️ `SdLayoutStorageService` là singleton `providedIn: 'root'`, thường được khởi tạo TRƯỚC khi biết
|
|
74
|
-
* người dùng là ai. Vì vậy hãy cấp một **hàm** — nó được gọi lại ở mỗi lần truy cập handle, nên khi
|
|
75
|
-
* danh tính đến (hoặc đổi) thì cả bảy handle tự dựng lại trên namespace mới:
|
|
76
|
-
*
|
|
77
|
-
* ```ts
|
|
78
|
-
* providers: [
|
|
79
|
-
* {
|
|
80
|
-
* provide: SD_LAYOUT_STORAGE_NAMESPACE,
|
|
81
|
-
* useFactory: () => {
|
|
82
|
-
* const auth = inject(SdAuthService);
|
|
83
|
-
* return () => auth.getAuthInfo?.()?.id;
|
|
84
|
-
* },
|
|
85
|
-
* },
|
|
86
|
-
* ];
|
|
87
|
-
* ```
|
|
88
|
-
*
|
|
89
|
-
* Đây là biện pháp bổ sung chứ không thay thế `SdLayoutStorageService.clear()` lúc signout.
|
|
90
|
-
*/
|
|
91
|
-
declare const SD_LAYOUT_STORAGE_NAMESPACE: InjectionToken<SdLayoutStorageNamespace>;
|
|
92
|
-
declare class SdLayoutStorageService {
|
|
93
|
-
#private;
|
|
94
|
-
get isShowSidebar(): SdStorage<boolean>;
|
|
95
|
-
get menuLockStatus(): SdStorage<boolean>;
|
|
96
|
-
get lastActiveMenuGroupId(): SdStorage<string>;
|
|
97
|
-
get pinnedMenuGroup(): SdStorage<SdLayoutChildrenMenu>;
|
|
98
|
-
get pinnedMenuKeys(): SdStorage<string[]>;
|
|
99
|
-
get recentMenuKeys(): SdStorage<string[]>;
|
|
100
|
-
get versionStates(): SdStorage<Record<string, SdLayoutVersionState>>;
|
|
101
|
-
/**
|
|
102
|
-
* Xoá toàn bộ state layout đã persist.
|
|
103
|
-
*
|
|
104
|
-
* **Consumer PHẢI gọi hàm này trong luồng signout, TRƯỚC khi danh tính bị xoá.** Nếu không,
|
|
105
|
-
* pinned/recent/last-active của user vừa đăng xuất sẽ còn lại trên trình duyệt và hiện ra cho người
|
|
106
|
-
* đăng nhập kế tiếp — rò rỉ tên module nội bộ mà người đó có thể không có quyền thấy.
|
|
107
|
-
*
|
|
108
|
-
* why: khi đã cấu hình `SD_LAYOUT_STORAGE_NAMESPACE` theo user, namespace được resolve NGAY LÚC GỌI.
|
|
109
|
-
* Gọi `clear()` sau khi auth info về `undefined` sẽ xoá nhầm partition không-namespace, còn dữ liệu
|
|
110
|
-
* của user vừa thoát thì vẫn nguyên.
|
|
111
|
-
*/
|
|
112
|
-
clear(): void;
|
|
113
|
-
readPinnedMenuKeys(menus: SdLayoutMenu[]): string[];
|
|
114
|
-
writePinnedMenuKeys(keys: string[]): void;
|
|
115
|
-
readRecentMenuKeys(menus: SdLayoutMenu[], maximum?: number): string[];
|
|
116
|
-
writeRecentMenuKeys(keys: string[]): void;
|
|
117
|
-
readVersionState(version: 1 | 2 | 3): SdLayoutVersionState;
|
|
118
|
-
patchVersionState(version: 1 | 2 | 3, patch: SdLayoutVersionState): SdLayoutVersionState;
|
|
119
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutStorageService, never>;
|
|
120
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutStorageService>;
|
|
121
|
-
}
|
|
122
|
-
interface SdLayoutVersionState {
|
|
123
|
-
activeGroupKey?: string;
|
|
124
|
-
locked?: boolean;
|
|
125
|
-
collapsed?: boolean;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
type SdLayoutViewport = SdViewport;
|
|
129
|
-
declare const SD_LAYOUT_VIEWPORT: _angular_core.InjectionToken<SdViewport | null>;
|
|
130
|
-
/** @deprecated Prefer `SdViewportService` from `@sdcorejs/angular/services/viewport`. */
|
|
131
|
-
declare class SdLayoutResponsiveService {
|
|
132
|
-
#private;
|
|
133
|
-
readonly viewportWidth: _angular_core.Signal<number>;
|
|
134
|
-
isMobile(breakpoint: number): boolean;
|
|
135
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutResponsiveService, never>;
|
|
136
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutResponsiveService>;
|
|
87
|
+
/** Section heading this top-level menu is grouped under. Rendered by sidebar V4 only. */
|
|
88
|
+
section?: string;
|
|
89
|
+
/** Rendered by sidebar V4 only. */
|
|
90
|
+
badge?: SdLayoutMenuBadge;
|
|
91
|
+
/** Rendered by sidebar V4 only. */
|
|
92
|
+
status?: SdLayoutMenuStatus;
|
|
93
|
+
/** Sidebar V4 shows the item as aria-disabled, never navigates and leaves it and its children out of search. */
|
|
94
|
+
comingSoon?: boolean;
|
|
137
95
|
}
|
|
138
96
|
|
|
139
97
|
/** Consumer-owned account action invoked without arguments by the shared user menu. */
|
|
@@ -206,6 +164,30 @@ interface SdLayoutUserInfo {
|
|
|
206
164
|
role?: SdLayoutUserRole;
|
|
207
165
|
}
|
|
208
166
|
declare const DEFAULT_LAYOUT_MOBILE_BREAKPOINT = 1024;
|
|
167
|
+
/** A context the signed-in user can switch between (for example a store or a legal entity). */
|
|
168
|
+
interface SdLayoutContext {
|
|
169
|
+
/** Stable identifier that Core persists and matches against the configured `items`. */
|
|
170
|
+
id: string;
|
|
171
|
+
/** Display name shown in the switcher. */
|
|
172
|
+
title: string;
|
|
173
|
+
/** Secondary line shown below the title. */
|
|
174
|
+
subtitle?: string;
|
|
175
|
+
/** Avatar image URL; the initial of `title` is shown when it is missing or fails to load. */
|
|
176
|
+
avatar?: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Context switcher configuration shared by sidebar versions 1–4.
|
|
180
|
+
* The consumer only assigns `items`; Core persists and restores the current context and reloads the page after a switch.
|
|
181
|
+
* Read the current context with `SdLayoutContextService.getCurrentContext()`.
|
|
182
|
+
*/
|
|
183
|
+
interface SdLayoutContextConfiguration {
|
|
184
|
+
/** Name of the context kind shown in the switcher. Defaults to the translated "Context" label. */
|
|
185
|
+
label?: string;
|
|
186
|
+
/** Contexts the user can switch between. An empty list hides the switcher. */
|
|
187
|
+
items: SdLayoutContext[];
|
|
188
|
+
/** Forces the search box on or off. By default it is shown when there are more than 7 items. */
|
|
189
|
+
searchable?: boolean;
|
|
190
|
+
}
|
|
209
191
|
interface SidebarConfigurationBase {
|
|
210
192
|
brandColor?: string;
|
|
211
193
|
brandLightColor?: string;
|
|
@@ -214,8 +196,14 @@ interface SidebarConfigurationBase {
|
|
|
214
196
|
pin?: {
|
|
215
197
|
enabled?: boolean;
|
|
216
198
|
};
|
|
199
|
+
/**
|
|
200
|
+
* Context switcher rendered in the sidebar header. The consumer only assigns `items`;
|
|
201
|
+
* Core persists and restores the current context and reloads the page on switch.
|
|
202
|
+
* Read it with `SdLayoutContextService.getCurrentContext()`.
|
|
203
|
+
*/
|
|
204
|
+
context?: SdLayoutContextConfiguration;
|
|
217
205
|
}
|
|
218
|
-
type ISdSidebarConfiguration = SidebarConfigurationV1 | SidebarConfigurationV2 | SidebarConfigurationV3;
|
|
206
|
+
type ISdSidebarConfiguration = SidebarConfigurationV1 | SidebarConfigurationV2 | SidebarConfigurationV3 | SidebarConfigurationV4;
|
|
219
207
|
interface SidebarConfigurationV1 extends SidebarConfigurationBase {
|
|
220
208
|
version: 1;
|
|
221
209
|
/**
|
|
@@ -262,6 +250,20 @@ interface SidebarConfigurationV3 extends SidebarConfigurationBase {
|
|
|
262
250
|
maxItems?: number;
|
|
263
251
|
};
|
|
264
252
|
}
|
|
253
|
+
/** Sidebar V4: V3 behaviour (collapse, pinned, recent) with token-driven colours; `brandColor`/`brandLightColor` are ignored. */
|
|
254
|
+
interface SidebarConfigurationV4 extends Omit<SidebarConfigurationV3, 'version'> {
|
|
255
|
+
version: 4;
|
|
256
|
+
/** Shape of the active/hover item highlight. @default 'pill' */
|
|
257
|
+
itemShape?: 'pill' | 'soft';
|
|
258
|
+
/** Row height: `compact` 36/32px, `comfortable` 40/34px. @default 'compact' */
|
|
259
|
+
density?: 'compact' | 'comfortable';
|
|
260
|
+
/** How a group opens while the rail is collapsed. @default 'flyout' */
|
|
261
|
+
collapsedGroup?: 'flyout' | 'expand';
|
|
262
|
+
/** Mobile shell options. `bottomBar` lists at most 4 menu ids shown in the bottom navigation bar. */
|
|
263
|
+
mobile?: {
|
|
264
|
+
bottomBar?: string[];
|
|
265
|
+
};
|
|
266
|
+
}
|
|
265
267
|
interface ResolvedSidebarRecentConfiguration {
|
|
266
268
|
enabled: boolean;
|
|
267
269
|
maxItems: number;
|
|
@@ -272,8 +274,106 @@ declare function resolveSidebarV3Recent(sidebar: SidebarConfigurationV3): Resolv
|
|
|
272
274
|
declare function normalizeSidebarConfiguration(_sidebar: SidebarConfigurationV1): SidebarConfigurationV1;
|
|
273
275
|
declare function normalizeSidebarConfiguration(_sidebar: SidebarConfigurationV2): SidebarConfigurationV2;
|
|
274
276
|
declare function normalizeSidebarConfiguration(_sidebar: SidebarConfigurationV3): SidebarConfigurationV3;
|
|
277
|
+
declare function normalizeSidebarConfiguration(_sidebar: SidebarConfigurationV4): SidebarConfigurationV4;
|
|
275
278
|
declare const SD_LAYOUT_CONFIGURATION: InjectionToken<ISdLayoutConfiguration>;
|
|
276
279
|
|
|
280
|
+
/**
|
|
281
|
+
* Namespace áp cho toàn bộ state layout được persist — hằng chuỗi, hoặc hàm resolve lại mỗi lần đọc
|
|
282
|
+
* (dùng cho danh tính chỉ biết được SAU khi đăng nhập, ví dụ id user hoặc tenant).
|
|
283
|
+
*/
|
|
284
|
+
type SdLayoutStorageNamespace = string | (() => string | null | undefined);
|
|
285
|
+
/**
|
|
286
|
+
* Namespace do consumer cung cấp cho toàn bộ state layout được persist (thường là id user hoặc tenant).
|
|
287
|
+
*
|
|
288
|
+
* why: các key dưới đây là UUID CỐ ĐỊNH, không gắn với ai cả. Trên máy dùng chung, user A đăng xuất
|
|
289
|
+
* rồi user B đăng nhập thì `pinnedMenuKeys` / `recentMenuKeys` / `lastActiveMenuGroupId` của A vẫn
|
|
290
|
+
* còn nguyên trong localStorage và B nhìn thấy đúng những module A đã ghim và vừa truy cập. Cấp
|
|
291
|
+
* namespace theo user/tenant sẽ tách hẳn không gian lưu trữ.
|
|
292
|
+
*
|
|
293
|
+
* ⚠️ `SdLayoutStorageService` là singleton `providedIn: 'root'`, thường được khởi tạo TRƯỚC khi biết
|
|
294
|
+
* người dùng là ai. Vì vậy hãy cấp một **hàm** — nó được gọi lại ở mỗi lần truy cập handle, nên khi
|
|
295
|
+
* danh tính đến (hoặc đổi) thì cả tám handle tự dựng lại trên namespace mới:
|
|
296
|
+
*
|
|
297
|
+
* ```ts
|
|
298
|
+
* providers: [
|
|
299
|
+
* {
|
|
300
|
+
* provide: SD_LAYOUT_STORAGE_NAMESPACE,
|
|
301
|
+
* useFactory: () => {
|
|
302
|
+
* const auth = inject(SdAuthService);
|
|
303
|
+
* return () => auth.getAuthInfo?.()?.id;
|
|
304
|
+
* },
|
|
305
|
+
* },
|
|
306
|
+
* ];
|
|
307
|
+
* ```
|
|
308
|
+
*
|
|
309
|
+
* Đây là biện pháp bổ sung chứ không thay thế `SdLayoutStorageService.clear()` lúc signout.
|
|
310
|
+
*/
|
|
311
|
+
declare const SD_LAYOUT_STORAGE_NAMESPACE: InjectionToken<SdLayoutStorageNamespace>;
|
|
312
|
+
declare class SdLayoutStorageService {
|
|
313
|
+
#private;
|
|
314
|
+
get isShowSidebar(): SdStorage<boolean>;
|
|
315
|
+
get menuLockStatus(): SdStorage<boolean>;
|
|
316
|
+
get lastActiveMenuGroupId(): SdStorage<string>;
|
|
317
|
+
get pinnedMenuGroup(): SdStorage<SdLayoutChildrenMenu>;
|
|
318
|
+
get pinnedMenuKeys(): SdStorage<string[]>;
|
|
319
|
+
get recentMenuKeys(): SdStorage<string[]>;
|
|
320
|
+
get versionStates(): SdStorage<Record<string, SdLayoutVersionState>>;
|
|
321
|
+
/** Snapshot context hiện tại (`{ id, title, subtitle?, avatar? }`), chỉ `SdLayoutContextService` đọc/ghi. */
|
|
322
|
+
get currentContext(): SdStorage<SdLayoutContext>;
|
|
323
|
+
/**
|
|
324
|
+
* Xoá toàn bộ state layout đã persist.
|
|
325
|
+
*
|
|
326
|
+
* **Consumer PHẢI gọi hàm này trong luồng signout, TRƯỚC khi danh tính bị xoá.** Nếu không,
|
|
327
|
+
* pinned/recent/last-active của user vừa đăng xuất sẽ còn lại trên trình duyệt và hiện ra cho người
|
|
328
|
+
* đăng nhập kế tiếp — rò rỉ tên module nội bộ mà người đó có thể không có quyền thấy.
|
|
329
|
+
*
|
|
330
|
+
* why: khi đã cấu hình `SD_LAYOUT_STORAGE_NAMESPACE` theo user, namespace được resolve NGAY LÚC GỌI.
|
|
331
|
+
* Gọi `clear()` sau khi auth info về `undefined` sẽ xoá nhầm partition không-namespace, còn dữ liệu
|
|
332
|
+
* của user vừa thoát thì vẫn nguyên.
|
|
333
|
+
*/
|
|
334
|
+
clear(): void;
|
|
335
|
+
/**
|
|
336
|
+
* Namespace mà các handle đang dùng tại lúc gọi (đã trim; rỗng/không cấu hình → `undefined`).
|
|
337
|
+
* So hai lần gọi để biết partition lưu trữ đã đổi (đăng nhập/đăng xuất trong SPA).
|
|
338
|
+
*/
|
|
339
|
+
resolvedNamespace(): string | undefined;
|
|
340
|
+
readPinnedMenuKeys(menus: SdLayoutMenu[]): string[];
|
|
341
|
+
writePinnedMenuKeys(keys: string[]): void;
|
|
342
|
+
readRecentMenuKeys(menus: SdLayoutMenu[], maximum?: number): string[];
|
|
343
|
+
writeRecentMenuKeys(keys: string[]): void;
|
|
344
|
+
readVersionState(version: 1 | 2 | 3): SdLayoutVersionState;
|
|
345
|
+
patchVersionState(version: 1 | 2 | 3, patch: SdLayoutVersionState): SdLayoutVersionState;
|
|
346
|
+
/** Đọc snapshot context từ bộ nhớ; trả bản sao, hoặc `null` khi chưa có hay sai dạng (thiếu/rỗng `id`, `title`). */
|
|
347
|
+
readCurrentContext(): SdLayoutContext | null;
|
|
348
|
+
/** Lưu snapshot context, chỉ giữ `id`, `title`, `subtitle`, `avatar`; bỏ field tuỳ chọn đang `undefined`. */
|
|
349
|
+
writeCurrentContext(context: SdLayoutContext): void;
|
|
350
|
+
/**
|
|
351
|
+
* Đọc lại snapshot context từ storage, bỏ qua entry trong bộ nhớ; kiểm dạng như `readCurrentContext()`.
|
|
352
|
+
*
|
|
353
|
+
* why: `set()` cập nhật bộ nhớ trước và không báo ghi lỗi, còn tab khác ghi thì entry trong bộ nhớ không
|
|
354
|
+
* đổi — chỉ `refresh()` mới cho biết giá trị thật sự đã lưu.
|
|
355
|
+
*/
|
|
356
|
+
refreshCurrentContext(): SdLayoutContext | null;
|
|
357
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutStorageService, never>;
|
|
358
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutStorageService>;
|
|
359
|
+
}
|
|
360
|
+
interface SdLayoutVersionState {
|
|
361
|
+
activeGroupKey?: string;
|
|
362
|
+
locked?: boolean;
|
|
363
|
+
collapsed?: boolean;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
type SdLayoutViewport = SdViewport;
|
|
367
|
+
declare const SD_LAYOUT_VIEWPORT: _angular_core.InjectionToken<SdViewport | null>;
|
|
368
|
+
/** @deprecated Prefer `SdViewportService` from `@sdcorejs/angular/services/viewport`. */
|
|
369
|
+
declare class SdLayoutResponsiveService {
|
|
370
|
+
#private;
|
|
371
|
+
readonly viewportWidth: _angular_core.Signal<number>;
|
|
372
|
+
isMobile(breakpoint: number): boolean;
|
|
373
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutResponsiveService, never>;
|
|
374
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutResponsiveService>;
|
|
375
|
+
}
|
|
376
|
+
|
|
277
377
|
declare class SdLayoutNavigationStateService {
|
|
278
378
|
#private;
|
|
279
379
|
readonly pinnedKeys: _angular_core.WritableSignal<string[]>;
|
|
@@ -289,11 +389,42 @@ declare class SdLayoutNavigationStateService {
|
|
|
289
389
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutNavigationStateService>;
|
|
290
390
|
}
|
|
291
391
|
|
|
392
|
+
/** Top-level menus sharing one `section`; `section: null` holds unsectioned menus rendered without a heading. */
|
|
393
|
+
interface SdLayoutMenuSectionGroup {
|
|
394
|
+
section: string | null;
|
|
395
|
+
menus: SdLayoutMenu[];
|
|
396
|
+
}
|
|
397
|
+
/** The single trailing element sidebar V4 renders after a menu title. */
|
|
398
|
+
type SdLayoutMenuTrailing = {
|
|
399
|
+
kind: 'soon';
|
|
400
|
+
} | {
|
|
401
|
+
kind: 'count';
|
|
402
|
+
value: number | string;
|
|
403
|
+
} | {
|
|
404
|
+
kind: 'badge';
|
|
405
|
+
value: number | string;
|
|
406
|
+
tone: 'warning' | 'error';
|
|
407
|
+
} | {
|
|
408
|
+
kind: 'status';
|
|
409
|
+
label: string;
|
|
410
|
+
tone: SdLayoutMenuStatus['tone'];
|
|
411
|
+
live: boolean;
|
|
412
|
+
};
|
|
292
413
|
declare function getMenuStableKey(menu: SdLayoutMenu | null | undefined, ancestors?: string[]): string;
|
|
293
414
|
declare function searchMenuLeaves(menus: SdLayoutMenu[], query: string): SdLayoutRootMenu[];
|
|
415
|
+
/** Matches like `searchMenuLeaves` but leaves out `comingSoon` leaves and every leaf under a `comingSoon` group (sidebar V4 search). */
|
|
416
|
+
declare function searchAvailableMenuLeaves(menus: SdLayoutMenu[], query: string): SdLayoutRootMenu[];
|
|
294
417
|
declare function selectPrimaryMenuGroups(menus: SdLayoutMenu[], requestedIds: string[] | undefined, maximum?: number): SdLayoutMenu[];
|
|
295
418
|
declare function resolveMenuKeys(menus: SdLayoutMenu[], keys: string[]): (SdLayoutRootMenu | SdLayoutChildrenMenu)[];
|
|
296
419
|
declare function flattenMenuLeaves(menus: SdLayoutMenu[]): SdLayoutRootMenu[];
|
|
420
|
+
/**
|
|
421
|
+
* Groups top-level menus by `section` in order of first appearance (sidebar V4).
|
|
422
|
+
* An unsectioned menu joins only the immediately preceding output group when that group is unsectioned (`section: null`);
|
|
423
|
+
* otherwise it starts a new unsectioned group.
|
|
424
|
+
*/
|
|
425
|
+
declare function groupMenusBySection(menus: SdLayoutMenu[]): SdLayoutMenuSectionGroup[];
|
|
426
|
+
/** The one trailing element sidebar V4 renders, in the order `comingSoon`, `badge`, `status`; empty values are skipped. */
|
|
427
|
+
declare function resolveMenuTrailing(menu: SdLayoutMenu | null | undefined): SdLayoutMenuTrailing | null;
|
|
297
428
|
|
|
298
429
|
/**
|
|
299
430
|
* Bật fallback demo của `SdLayoutService` khi KHÔNG provide `SD_LAYOUT_CONFIGURATION`.
|
|
@@ -324,14 +455,177 @@ declare class SdLayoutService {
|
|
|
324
455
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutService>;
|
|
325
456
|
}
|
|
326
457
|
|
|
327
|
-
|
|
458
|
+
/**
|
|
459
|
+
* Browser effects used by `SdLayoutContextService`. The default implementation wraps the document window;
|
|
460
|
+
* provide `SD_LAYOUT_CONTEXT_RUNTIME` with a fake in specs and demos so nothing reloads for real.
|
|
461
|
+
*/
|
|
462
|
+
interface SdLayoutContextRuntime {
|
|
463
|
+
/** Reloads the page. */
|
|
464
|
+
reload(): void;
|
|
465
|
+
/** Subscribes to cross-tab localStorage changes (window 'storage' events); returns an unsubscribe function. */
|
|
466
|
+
onStorage(listener: () => void): () => void;
|
|
467
|
+
/** Per-tab reconcile marker; `undefined` when session storage is unavailable. */
|
|
468
|
+
readMarker(): string | null | undefined;
|
|
469
|
+
/** Writes the marker (`null` clears it); returns false when it could not be persisted. */
|
|
470
|
+
writeMarker(value: string | null): boolean;
|
|
471
|
+
}
|
|
472
|
+
/** Session storage key of the per-tab reconcile marker (id of the last context reconcile reload target). */
|
|
473
|
+
declare const SD_LAYOUT_CONTEXT_MARKER_KEY = "sd.layout.context.reconcile-marker";
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Browser effects of the layout context feature: page reload, cross-tab `storage` events and the
|
|
477
|
+
* per-tab reconcile marker. Defaults to the document window; provide a fake `SdLayoutContextRuntime`
|
|
478
|
+
* in specs and demos so nothing reloads for real:
|
|
479
|
+
*
|
|
480
|
+
* ```ts
|
|
481
|
+
* providers: [{ provide: SD_LAYOUT_CONTEXT_RUNTIME, useValue: fakeRuntime }];
|
|
482
|
+
* ```
|
|
483
|
+
*/
|
|
484
|
+
declare const SD_LAYOUT_CONTEXT_RUNTIME: InjectionToken<SdLayoutContextRuntime>;
|
|
485
|
+
/** Creates the default runtime over `view`; without a window every operation is a no-op. */
|
|
486
|
+
declare function createSdLayoutContextBrowserRuntime(view: Window | null): SdLayoutContextRuntime;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Owns the current layout context (for example a store or a legal entity) and its persisted snapshot.
|
|
490
|
+
*
|
|
491
|
+
* The snapshot is captured once, when the service is first injected, so `SD_LAYOUT_STORAGE_NAMESPACE`
|
|
492
|
+
* must already resolve at that moment (see `sd-layout.md`). Switching reloads the page — there is no
|
|
493
|
+
* change event. Read the context during bootstrap:
|
|
494
|
+
*
|
|
495
|
+
* ```ts
|
|
496
|
+
* provideAppInitializer(() => {
|
|
497
|
+
* const context = inject(SdLayoutContextService).getCurrentContext();
|
|
498
|
+
* inject(ApiContextHeader).set(context?.id);
|
|
499
|
+
* });
|
|
500
|
+
* ```
|
|
501
|
+
*
|
|
502
|
+
* The service works without `SD_LAYOUT_CONFIGURATION`; the context switcher passes the configured items to
|
|
503
|
+
* `syncItems()`, which reconciles the snapshot. A reconcile reload happens at most once per target id
|
|
504
|
+
* while the per-tab marker holds that id.
|
|
505
|
+
*/
|
|
506
|
+
declare class SdLayoutContextService {
|
|
507
|
+
#private;
|
|
508
|
+
/** Context of this page load; title, subtitle and avatar may refresh from the configured items. */
|
|
509
|
+
readonly current: _angular_core.Signal<SdLayoutContext | null>;
|
|
510
|
+
/** Valid items last passed to `syncItems()` (entries without `id`/`title` and duplicate ids are dropped). */
|
|
511
|
+
readonly items: _angular_core.Signal<readonly SdLayoutContext[]>;
|
|
512
|
+
/** Id of the context being switched to, or `null`. */
|
|
513
|
+
readonly switchingId: _angular_core.Signal<string | null>;
|
|
514
|
+
/** `true` when the last switch could not be persisted (no reload happened). */
|
|
515
|
+
readonly switchFailed: _angular_core.Signal<boolean>;
|
|
516
|
+
/** `true` when another tab switched the stored context; this tab keeps its context until reloaded. */
|
|
517
|
+
readonly changedElsewhere: _angular_core.Signal<boolean>;
|
|
518
|
+
constructor();
|
|
519
|
+
/** Returns a copy of the current context, or `null` before any context was stored. */
|
|
520
|
+
getCurrentContext(): SdLayoutContext | null;
|
|
521
|
+
/**
|
|
522
|
+
* Switches to the item with `id`, then reloads the page once the snapshot is confirmed in storage.
|
|
523
|
+
* Ignored for the active id, before `syncItems()`, for ids that are not in `items` and once a reload
|
|
524
|
+
* was requested in this page load.
|
|
525
|
+
*/
|
|
526
|
+
setCurrentContext(id: string): void;
|
|
527
|
+
/**
|
|
528
|
+
* Reconciles the stored snapshot with the configured items: a valid id only refreshes its metadata;
|
|
529
|
+
* a missing or stale id falls back to `items[0]` and reloads, unless the per-tab marker already holds
|
|
530
|
+
* that target. Empty items store nothing. While the load-time context is still in `items`, a different
|
|
531
|
+
* stored id only raises `changedElsewhere` and a removed snapshot keeps the context in memory.
|
|
532
|
+
* Repeated calls with the same items neither write nor reload again.
|
|
533
|
+
*/
|
|
534
|
+
syncItems(items: readonly SdLayoutContext[] | null | undefined): void;
|
|
535
|
+
/** Reloads the page, for example from the "changed in another tab" notice. Does nothing once a reload was requested. */
|
|
536
|
+
reload(): void;
|
|
537
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutContextService, never>;
|
|
538
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutContextService>;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/** Bề rộng cột nội dung: `full` không giới hạn · `wide` 1200px · `medium` 960px · `narrow` 720px. */
|
|
542
|
+
type SdPageWidth = 'full' | 'wide' | 'medium' | 'narrow';
|
|
543
|
+
/** Đích của nút ←: URL hoặc router commands như `routerLink`. */
|
|
544
|
+
type SdPageBackLink = string | readonly unknown[];
|
|
545
|
+
/** Vị trí cột phụ `[sdAside]` khi đủ chỗ đặt cạnh nội dung. */
|
|
546
|
+
type SdPageAside = 'end' | 'start';
|
|
547
|
+
interface SdPageTocItem {
|
|
548
|
+
readonly title: string;
|
|
549
|
+
readonly el: HTMLElement;
|
|
550
|
+
}
|
|
551
|
+
declare class SdPageComponent implements SdSectionRegistry {
|
|
552
|
+
#private;
|
|
328
553
|
private el;
|
|
329
554
|
title: _angular_core.InputSignal<string>;
|
|
330
555
|
description: _angular_core.InputSignal<string>;
|
|
331
556
|
noHeader: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
557
|
+
/** Hiện nút ← trước title; title, description và badges vẫn lấy từ input. */
|
|
558
|
+
backLink: _angular_core.InputSignal<SdPageBackLink | null | undefined>;
|
|
559
|
+
/** Tối đa 2 badge cạnh title: trạng thái trước, thuộc tính sau. Badge không có `title` bị bỏ qua. */
|
|
560
|
+
badges: _angular_core.InputSignal<readonly SdBadgeData[] | null | undefined>;
|
|
561
|
+
/** `null` / không truyền thì lấy mặc định theo selector: `sd-page` full · `sd-page-detail` wide · `sd-page-form` medium. */
|
|
562
|
+
width: _angular_core.InputSignal<SdPageWidth | null | undefined>;
|
|
563
|
+
/** Cột phụ ở cuối (mặc định) hay ở đầu. Viewport < 1200px thì cột phụ luôn xuống dưới nội dung. */
|
|
564
|
+
aside: _angular_core.InputSignal<SdPageAside | null | undefined>;
|
|
565
|
+
/** Mục lục ở cột phụ, liệt kê các `sd-section` có `title` ở cấp ngoài cùng của thân trang. */
|
|
566
|
+
toc: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
567
|
+
readonly resolvedWidth: _angular_core.Signal<SdPageWidth>;
|
|
568
|
+
protected readonly visibleBadges: _angular_core.Signal<SdBadgeData[]>;
|
|
569
|
+
/** Header có nút ← hoặc badge: title một dòng, cắt bằng dấu "…". Màn cũ giữ title xuống dòng như trước. */
|
|
570
|
+
protected readonly hasLead: _angular_core.Signal<boolean>;
|
|
571
|
+
protected readonly tocItems: _angular_core.WritableSignal<readonly SdPageTocItem[]>;
|
|
572
|
+
protected readonly activeTocIndex: _angular_core.WritableSignal<number>;
|
|
573
|
+
private readonly titleBlock;
|
|
574
|
+
private readonly wrapper;
|
|
332
575
|
constructor();
|
|
576
|
+
/** Cuộn tới section của mục lục thứ `index`. */
|
|
577
|
+
protected scrollToSection(index: number): void;
|
|
578
|
+
/** Thêm một section ngoài cùng của thân trang vào mục lục (gọi bởi `sd-section`). */
|
|
579
|
+
register(section: SdSection, el: HTMLElement): () => void;
|
|
333
580
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdPageComponent, never>;
|
|
334
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdPageComponent, "sd-page", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "noHeader": { "alias": "noHeader"; "required": false; "isSignal": true; }; }, {}, never, ["[headerLeft]", "[headerRight]", "*"], true, never>;
|
|
581
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdPageComponent, "sd-page, sd-page-detail, sd-page-form", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "noHeader": { "alias": "noHeader"; "required": false; "isSignal": true; }; "backLink": { "alias": "backLink"; "required": false; "isSignal": true; }; "badges": { "alias": "badges"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "aside": { "alias": "aside"; "required": false; "isSignal": true; }; "toc": { "alias": "toc"; "required": false; "isSignal": true; }; }, {}, never, ["[headerLeft],[sdHeaderLeft]", "[headerRight],[sdHeaderRight]", "[sdSubheader]", "*", "[sdAside]", "[sdFooterLeft]", "[sdFooterRight]"], true, never>;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Guard rời trang của `sd-page-form`: còn thay đổi chưa lưu (watcher của `SdUnsavedChangesService`, thường đăng ký
|
|
586
|
+
* bằng `registerSdUnsavedChangesForm(..., { dirty: 'value' })`) thì hỏi bằng dialog xác nhận của Core.
|
|
587
|
+
*
|
|
588
|
+
* why: adapter của service là của cả app (mặc định `window.confirm`); guard này truyền adapter riêng cho lần hỏi
|
|
589
|
+
* này nên app đang dùng `sdUnsavedChangesGuard` không đổi hành vi.
|
|
590
|
+
*/
|
|
591
|
+
declare const sdPageFormLeaveGuard: CanDeactivateFn<unknown>;
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Cách mở chi tiết (route con của danh sách): thay danh sách bằng một trang, drawer đè lên danh sách, hoặc `'none'`:
|
|
595
|
+
* `sd-page-list` không đặt router-outlet, route con hiện trong outlet do màn tự đặt trong thân (chia đôi).
|
|
596
|
+
*/
|
|
597
|
+
type SdPageListDetail = 'page' | 'drawer' | 'none';
|
|
598
|
+
/** Trạng thái `sd-page-list` mà nội dung bên trong (score card, route con…) đọc qua `SD_PAGE_LIST`. */
|
|
599
|
+
interface SdPageListContext {
|
|
600
|
+
/** Màn thấp (viewport cao < 720px) và `autoCompact` bật: vùng phụ nên chuyển sang dạng gọn. */
|
|
601
|
+
readonly compact: Signal<boolean>;
|
|
602
|
+
/** Đang có route con (chi tiết, tạo, cập nhật). */
|
|
603
|
+
readonly childActive: Signal<boolean>;
|
|
604
|
+
readonly detail: Signal<SdPageListDetail>;
|
|
605
|
+
}
|
|
606
|
+
declare const SD_PAGE_LIST: InjectionToken<SdPageListContext>;
|
|
607
|
+
declare class SdPageList implements SdPageListContext, SdTableLayout {
|
|
608
|
+
#private;
|
|
609
|
+
title: _angular_core.InputSignal<string>;
|
|
610
|
+
description: _angular_core.InputSignal<string>;
|
|
611
|
+
backLink: _angular_core.InputSignal<SdPageBackLink | null | undefined>;
|
|
612
|
+
badges: _angular_core.InputSignal<readonly SdBadgeData[] | null | undefined>;
|
|
613
|
+
width: _angular_core.InputSignal<SdPageWidth | null | undefined>;
|
|
614
|
+
/** Chi tiết là route con: `page` thay danh sách bằng trang con, `drawer` giữ danh sách và mở drawer. */
|
|
615
|
+
detail: _angular_core.InputSignal<SdPageListDetail>;
|
|
616
|
+
/** Tự thu gọn vùng phụ khi viewport thấp. Tắt thì vùng phụ luôn đầy đủ và thân trang cuộn khi thiếu chỗ. */
|
|
617
|
+
autoCompact: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
618
|
+
readonly compact: Signal<boolean>;
|
|
619
|
+
readonly childActive: _angular_core.WritableSignal<boolean>;
|
|
620
|
+
/** Bảng chính: `[sdPageListMain]`, hoặc `sd-table` con trực tiếp cuối cùng của thân trang. */
|
|
621
|
+
readonly fillTarget: _angular_core.WritableSignal<Element | null>;
|
|
622
|
+
readonly externalFilterCollapsed: Signal<boolean>;
|
|
623
|
+
protected readonly hidesList: Signal<boolean>;
|
|
624
|
+
constructor();
|
|
625
|
+
protected onActivate(): void;
|
|
626
|
+
protected onDeactivate(): void;
|
|
627
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdPageList, never>;
|
|
628
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdPageList, "sd-page-list", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "backLink": { "alias": "backLink"; "required": false; "isSignal": true; }; "badges": { "alias": "badges"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "detail": { "alias": "detail"; "required": false; "isSignal": true; }; "autoCompact": { "alias": "autoCompact"; "required": false; "isSignal": true; }; }, {}, never, ["[headerRight],[sdHeaderRight]", "[sdSubheader]", "[sdFooterLeft]", "[sdFooterRight]", "*"], true, never>;
|
|
335
629
|
}
|
|
336
630
|
|
|
337
631
|
declare class SdLayoutComponent {
|
|
@@ -343,6 +637,7 @@ declare class SdLayoutComponent {
|
|
|
343
637
|
sidebarV1: _angular_core.Signal<SidebarConfigurationV1 | undefined>;
|
|
344
638
|
sidebarV2: _angular_core.Signal<SidebarConfigurationV2 | undefined>;
|
|
345
639
|
sidebarV3: _angular_core.Signal<SidebarConfigurationV3 | undefined>;
|
|
640
|
+
sidebarV4: _angular_core.Signal<SidebarConfigurationV4 | undefined>;
|
|
346
641
|
mobileBreakpoint: number;
|
|
347
642
|
isMobile: _angular_core.Signal<boolean>;
|
|
348
643
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutComponent, never>;
|
|
@@ -457,7 +752,7 @@ declare class SdLayoutUserMenuComponent {
|
|
|
457
752
|
setting: _angular_core.InputSignal<SdLayoutAccountAction | undefined>;
|
|
458
753
|
notification: _angular_core.InputSignal<SdLayoutNotificationConfiguration | undefined>;
|
|
459
754
|
compact: _angular_core.InputSignal<boolean>;
|
|
460
|
-
presentation: _angular_core.InputSignal<"
|
|
755
|
+
presentation: _angular_core.InputSignal<"mobile" | "disclosure" | "mobile-inline">;
|
|
461
756
|
opened: _angular_core.OutputEmitterRef<void>;
|
|
462
757
|
closed: _angular_core.OutputEmitterRef<void>;
|
|
463
758
|
isOpen: _angular_core.WritableSignal<boolean>;
|
|
@@ -550,6 +845,7 @@ declare class SdSidebarMobileV2 {
|
|
|
550
845
|
|
|
551
846
|
declare class SdSidebarV3 {
|
|
552
847
|
#private;
|
|
848
|
+
private readonly headerSwitcher;
|
|
553
849
|
menus: _angular_core.InputSignal<SdLayoutMenu[]>;
|
|
554
850
|
userInfo: _angular_core.InputSignal<SdLayoutUserInfo>;
|
|
555
851
|
sidebar: _angular_core.InputSignal<SidebarConfigurationV3>;
|
|
@@ -567,6 +863,8 @@ declare class SdSidebarV3 {
|
|
|
567
863
|
key: string;
|
|
568
864
|
title: string;
|
|
569
865
|
}[]>;
|
|
866
|
+
/** The header Context Switcher popover is open; the whole header then takes the hover background (README CS1). */
|
|
867
|
+
protected readonly contextOpen: _angular_core.Signal<boolean>;
|
|
570
868
|
constructor();
|
|
571
869
|
toggleCollapsed(): void;
|
|
572
870
|
activateCollapsedMenu(menu: SdLayoutMenu): void;
|
|
@@ -602,6 +900,241 @@ declare class SdSidebarMobileV3 {
|
|
|
602
900
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdSidebarMobileV3, "sd-sidebar-mobile-v3", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "userInfo": { "alias": "userInfo"; "required": true; "isSignal": true; }; "sidebar": { "alias": "sidebar"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
603
901
|
}
|
|
604
902
|
|
|
903
|
+
/** One row of the V4 search results, in the order `buildSidebarV4SearchResults` returns them. */
|
|
904
|
+
interface SdSidebarV4SearchResult {
|
|
905
|
+
/** `getMenuStableKey(menu)` of the leaf. */
|
|
906
|
+
key: string;
|
|
907
|
+
menu: SdLayoutRootMenu;
|
|
908
|
+
/** Ancestor titles joined with " / ", or the top-level `section` for a root leaf; empty when neither exists. */
|
|
909
|
+
path: string;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/** `SidebarConfigurationV4` as `normalizeSidebarConfiguration` returns it: every V4 default is filled (INV-012). */
|
|
913
|
+
type SdSidebarV4ResolvedConfiguration = SidebarConfigurationV4 & Required<Pick<SidebarConfigurationV4, 'defaultCollapsed' | 'itemShape' | 'density' | 'collapsedGroup'>> & {
|
|
914
|
+
recent: ResolvedSidebarRecentConfiguration;
|
|
915
|
+
};
|
|
916
|
+
/**
|
|
917
|
+
* Sidebar V4 desktop shell: a 280px drawer (72px rail when collapsed) with the brand header and Context Switcher,
|
|
918
|
+
* a pill search (`Ctrl+K` / `⌘K`), Pinned and Recent shortcuts, the V4 menu tree and the account footer.
|
|
919
|
+
* Routed content is projected into `<main>`.
|
|
920
|
+
*
|
|
921
|
+
* Routing, recent/pinned handling and the collapse preference behave like `sd-sidebar-v3`; the collapsed state is
|
|
922
|
+
* stored in the same version 3 entry (D-004). Options are read only after `normalizeSidebarConfiguration` (INV-012);
|
|
923
|
+
* `brandColor` / `brandLightColor` are ignored. Size tokens (`--sd-sidebar-v4-width`, `-rail-width`, `-item-height`,
|
|
924
|
+
* `-child-height`, `-item-radius`) are declared on the host and follow `density`, `itemShape` and the pointer type.
|
|
925
|
+
*/
|
|
926
|
+
declare class SdSidebarV4 {
|
|
927
|
+
#private;
|
|
928
|
+
private readonly searchInput;
|
|
929
|
+
private readonly list;
|
|
930
|
+
private readonly mainTree;
|
|
931
|
+
private readonly headerSwitcher;
|
|
932
|
+
menus: _angular_core.InputSignal<SdLayoutMenu[]>;
|
|
933
|
+
userInfo: _angular_core.InputSignal<SdLayoutUserInfo>;
|
|
934
|
+
sidebar: _angular_core.InputSignal<SidebarConfigurationV4>;
|
|
935
|
+
/** `sidebar()` with the V4 defaults filled by `normalizeSidebarConfiguration`, the only place they are resolved (INV-012). */
|
|
936
|
+
protected readonly configuration: _angular_core.Signal<SdSidebarV4ResolvedConfiguration>;
|
|
937
|
+
isCollapsed: _angular_core.WritableSignal<boolean>;
|
|
938
|
+
protected readonly collapsedGroupKeys: _angular_core.WritableSignal<string[]>;
|
|
939
|
+
searchText: _angular_core.WritableSignal<string>;
|
|
940
|
+
activePath: _angular_core.WritableSignal<string>;
|
|
941
|
+
/** Search results in the order the tree renders its options (accent-insensitive, without `comingSoon` items). */
|
|
942
|
+
protected readonly searchResults: _angular_core.Signal<SdSidebarV4SearchResult[]>;
|
|
943
|
+
/** Index of the keyboard-selected result: the first one when results appear, -1 when there is none. */
|
|
944
|
+
protected readonly focusedResultIndex: _angular_core.Signal<number>;
|
|
945
|
+
recentConfiguration: _angular_core.Signal<{
|
|
946
|
+
enabled?: boolean;
|
|
947
|
+
maxItems?: number;
|
|
948
|
+
} & ResolvedSidebarRecentConfiguration>;
|
|
949
|
+
pinnedKeys: _angular_core.WritableSignal<string[]>;
|
|
950
|
+
pinnedMenus: _angular_core.Signal<(_sdcorejs_angular_modules_layout.SdLayoutRootMenu | _sdcorejs_angular_modules_layout.SdLayoutChildrenMenu)[]>;
|
|
951
|
+
recentMenus: _angular_core.Signal<(_sdcorejs_angular_modules_layout.SdLayoutRootMenu | _sdcorejs_angular_modules_layout.SdLayoutChildrenMenu)[]>;
|
|
952
|
+
protected readonly hasQuery: _angular_core.Signal<boolean>;
|
|
953
|
+
protected readonly title: _angular_core.Signal<string>;
|
|
954
|
+
protected readonly logoInitial: _angular_core.Signal<string>;
|
|
955
|
+
/** The hierarchy starts with items that have no section heading. */
|
|
956
|
+
protected readonly leadsWithUnsectioned: _angular_core.Signal<boolean>;
|
|
957
|
+
protected readonly shortcutHint: string;
|
|
958
|
+
protected readonly shortcutKeys: string;
|
|
959
|
+
/** The header Context Switcher popover is open; the whole header then takes the hover background (README CS1). */
|
|
960
|
+
protected readonly contextOpen: _angular_core.Signal<boolean>;
|
|
961
|
+
constructor();
|
|
962
|
+
/** Collapses or expands the drawer and stores the choice in the version 3 entry, like V3 (D-004). */
|
|
963
|
+
toggleCollapsed(): void;
|
|
964
|
+
/** Expands a collapsed drawer, then moves focus to the menu search. */
|
|
965
|
+
focusSearch(): void;
|
|
966
|
+
/** Collapsed rail: a leaf navigates; a group expands the drawer and opens that group, like V3. */
|
|
967
|
+
activateCollapsedMenu(menu: SdLayoutMenu): void;
|
|
968
|
+
navigateMenu(menu: SdLayoutMenu): void;
|
|
969
|
+
onTogglePinned(menu: SdLayoutMenu): void;
|
|
970
|
+
protected onSearchInput(event: Event): void;
|
|
971
|
+
protected clearSearch(): void;
|
|
972
|
+
protected onSearchKeydown(event: KeyboardEvent): void;
|
|
973
|
+
protected onDocumentKeydown(event: KeyboardEvent): void;
|
|
974
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdSidebarV4, never>;
|
|
975
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdSidebarV4, "sd-sidebar-v4", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "userInfo": { "alias": "userInfo"; "required": true; "isSignal": true; }; "sidebar": { "alias": "sidebar"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/** `SidebarConfigurationV4` as `normalizeSidebarConfiguration` returns it: every V4 default is filled (INV-012). */
|
|
979
|
+
type SdSidebarMobileV4ResolvedConfiguration = SidebarConfigurationV4 & Required<Pick<SidebarConfigurationV4, 'itemShape' | 'density' | 'collapsedGroup'>> & {
|
|
980
|
+
recent: ResolvedSidebarRecentConfiguration;
|
|
981
|
+
};
|
|
982
|
+
/** One bottom-bar destination resolved from `mobile.bottomBar`. */
|
|
983
|
+
interface SdSidebarMobileV4Destination {
|
|
984
|
+
menu: SdLayoutMenu;
|
|
985
|
+
key: string;
|
|
986
|
+
label: string;
|
|
987
|
+
isGroup: boolean;
|
|
988
|
+
isActive: boolean;
|
|
989
|
+
disabled: boolean;
|
|
990
|
+
/** Keys of the group and its ancestor groups, opened when a group destination opens the drawer. */
|
|
991
|
+
expandKeys: string[];
|
|
992
|
+
badge: {
|
|
993
|
+
value: number | string;
|
|
994
|
+
tone: 'warning' | 'error';
|
|
995
|
+
} | null;
|
|
996
|
+
liveTone: 'success' | 'warning' | 'error' | null;
|
|
997
|
+
/** Live status label read out after the title; a badge is described through i18n in the template. */
|
|
998
|
+
liveLabel: string;
|
|
999
|
+
descriptionId: string;
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Sidebar V4 mobile shell (README M1–M3): a 56px app bar, a `min(88vw, 360px)` modal drawer that hosts the V4 menu tree in
|
|
1003
|
+
* `mobile` mode (44px rows, combobox search, Pinned/Recent, account footer, Context Switcher bottom sheet) and an opt-in
|
|
1004
|
+
* bottom bar built from `mobile.bottomBar` (at most 4 menu ids plus "More"). Routed content is projected into `<main>`.
|
|
1005
|
+
*
|
|
1006
|
+
* Navigation, pinned and recent behave like `sd-sidebar-v4`. Every way of closing the drawer (backdrop, Escape, menu
|
|
1007
|
+
* selection, including the page already open) clears the search and returns focus to the control that opened it (INV-011).
|
|
1008
|
+
* Options are read only after `normalizeSidebarConfiguration` (INV-012). Mobile has no rail, so the collapse preference is
|
|
1009
|
+
* never read or written. With `context` configured, `context.items` reach `SdLayoutContextService.syncItems()` on init,
|
|
1010
|
+
* before the drawer and its switcher first render; without it the context service is never created.
|
|
1011
|
+
*/
|
|
1012
|
+
declare class SdSidebarMobileV4 {
|
|
1013
|
+
#private;
|
|
1014
|
+
private readonly trigger;
|
|
1015
|
+
private readonly searchInput;
|
|
1016
|
+
private readonly list;
|
|
1017
|
+
private readonly mainTree;
|
|
1018
|
+
menus: _angular_core.InputSignal<SdLayoutMenu[]>;
|
|
1019
|
+
userInfo: _angular_core.InputSignal<SdLayoutUserInfo>;
|
|
1020
|
+
sidebar: _angular_core.InputSignal<SidebarConfigurationV4>;
|
|
1021
|
+
/** `sidebar()` with the V4 defaults filled by `normalizeSidebarConfiguration`, the only place they are resolved (INV-012). */
|
|
1022
|
+
protected readonly configuration: _angular_core.Signal<SdSidebarMobileV4ResolvedConfiguration>;
|
|
1023
|
+
isDrawerOpen: _angular_core.WritableSignal<boolean>;
|
|
1024
|
+
searchText: _angular_core.WritableSignal<string>;
|
|
1025
|
+
activePath: _angular_core.WritableSignal<string>;
|
|
1026
|
+
protected readonly collapsedGroupKeys: _angular_core.WritableSignal<string[]>;
|
|
1027
|
+
/** The drawer was opened from the app-bar search button: its search input takes the initial focus. */
|
|
1028
|
+
protected readonly focusSearchOnOpen: _angular_core.WritableSignal<boolean>;
|
|
1029
|
+
/** Search results in the order the tree renders its options (accent-insensitive, without `comingSoon` items). */
|
|
1030
|
+
protected readonly searchResults: _angular_core.Signal<SdSidebarV4SearchResult[]>;
|
|
1031
|
+
/** Index of the keyboard-selected result: the first one when results appear, -1 when there is none. */
|
|
1032
|
+
protected readonly focusedResultIndex: _angular_core.Signal<number>;
|
|
1033
|
+
recentConfiguration: _angular_core.Signal<{
|
|
1034
|
+
enabled?: boolean;
|
|
1035
|
+
maxItems?: number;
|
|
1036
|
+
} & ResolvedSidebarRecentConfiguration>;
|
|
1037
|
+
pinnedKeys: _angular_core.WritableSignal<string[]>;
|
|
1038
|
+
pinnedMenus: _angular_core.Signal<(_sdcorejs_angular_modules_layout.SdLayoutRootMenu | _sdcorejs_angular_modules_layout.SdLayoutChildrenMenu)[]>;
|
|
1039
|
+
recentMenus: _angular_core.Signal<(_sdcorejs_angular_modules_layout.SdLayoutRootMenu | _sdcorejs_angular_modules_layout.SdLayoutChildrenMenu)[]>;
|
|
1040
|
+
protected readonly titleId: string;
|
|
1041
|
+
protected readonly hasQuery: _angular_core.Signal<boolean>;
|
|
1042
|
+
protected readonly title: _angular_core.Signal<string>;
|
|
1043
|
+
protected readonly logoInitial: _angular_core.Signal<string>;
|
|
1044
|
+
/** The hierarchy starts with items that have no section heading. */
|
|
1045
|
+
protected readonly leadsWithUnsectioned: _angular_core.Signal<boolean>;
|
|
1046
|
+
protected readonly displayName: _angular_core.Signal<string>;
|
|
1047
|
+
/** First letters of the first and last word of the display name, as on the README M1 avatar. */
|
|
1048
|
+
protected readonly userInitials: _angular_core.Signal<string>;
|
|
1049
|
+
/** Menus of `mobile.bottomBar` that exist in `menus` (looked up by `id` at any depth), in configured order. */
|
|
1050
|
+
protected readonly destinations: _angular_core.Signal<SdSidebarMobileV4Destination[]>;
|
|
1051
|
+
constructor();
|
|
1052
|
+
/** Opens the drawer; focus returns to `trigger` (default: the focused element, else the app-bar menu button) on close. */
|
|
1053
|
+
openDrawer(trigger?: EventTarget | null): void;
|
|
1054
|
+
/** Opens the drawer with its search focused; focus returns to `trigger` on close. */
|
|
1055
|
+
openSearch(trigger?: EventTarget | null): void;
|
|
1056
|
+
closeFromBackdrop(): void;
|
|
1057
|
+
closeFromEscape(): void;
|
|
1058
|
+
closeFromNavigation(): void;
|
|
1059
|
+
onDrawerKeydown(event: KeyboardEvent): void;
|
|
1060
|
+
navigateMenu(menu: SdLayoutMenu): void;
|
|
1061
|
+
onTogglePinned(menu: SdLayoutMenu): void;
|
|
1062
|
+
protected activateDestination(destination: SdSidebarMobileV4Destination, trigger: HTMLElement): void;
|
|
1063
|
+
protected onSearchInput(event: Event): void;
|
|
1064
|
+
protected clearSearch(): void;
|
|
1065
|
+
protected onSearchKeydown(event: KeyboardEvent): void;
|
|
1066
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdSidebarMobileV4, never>;
|
|
1067
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdSidebarMobileV4, "sd-sidebar-mobile-v4", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "userInfo": { "alias": "userInfo"; "required": true; "isSignal": true; }; "sidebar": { "alias": "sidebar"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
/** One rendered row: the context plus the state the template needs. */
|
|
1071
|
+
interface SdLayoutContextSwitcherRow {
|
|
1072
|
+
item: SdLayoutContext;
|
|
1073
|
+
initial: string;
|
|
1074
|
+
active: boolean;
|
|
1075
|
+
busy: boolean;
|
|
1076
|
+
disabled: boolean;
|
|
1077
|
+
}
|
|
1078
|
+
/**
|
|
1079
|
+
* Context switcher shared by sidebar versions 1–4 and their mobile drawers.
|
|
1080
|
+
*
|
|
1081
|
+
* Forwards `configuration.items` to `SdLayoutContextService.syncItems()` and renders the service state:
|
|
1082
|
+
* the current context, the switching row and the "changed in another tab" notice. Selecting another
|
|
1083
|
+
* context calls `setCurrentContext()`, which reloads the page; there is no change event.
|
|
1084
|
+
*/
|
|
1085
|
+
declare class SdLayoutContextSwitcher {
|
|
1086
|
+
#private;
|
|
1087
|
+
private readonly trigger;
|
|
1088
|
+
private readonly sheetTemplate;
|
|
1089
|
+
/** Context configuration of the sidebar; nothing renders without items. */
|
|
1090
|
+
configuration: _angular_core.InputSignal<SdLayoutContextConfiguration | null | undefined>;
|
|
1091
|
+
/** Header trigger, collapsed-rail avatar, or mobile row that opens a bottom sheet. */
|
|
1092
|
+
appearance: _angular_core.InputSignal<"header" | "sheet" | "rail">;
|
|
1093
|
+
/** Side the desktop popover opens on; defaults to `below` for the header and `right` for the rail. The sheet ignores it. */
|
|
1094
|
+
placement: _angular_core.InputSignal<"below" | "right" | undefined>;
|
|
1095
|
+
/**
|
|
1096
|
+
* Element the desktop popover aligns to; defaults to the trigger. Pass the sidebar header for `below`
|
|
1097
|
+
* (the popover sits under it, 12px inside both edges) and the rail or aside for `right` (the popover opens
|
|
1098
|
+
* 8px from its right edge, top-aligned with the trigger).
|
|
1099
|
+
*/
|
|
1100
|
+
anchor: _angular_core.InputSignal<HTMLElement | null | undefined>;
|
|
1101
|
+
/** `true` while the popover or the bottom sheet is open. */
|
|
1102
|
+
readonly isOpen: _angular_core.Signal<boolean>;
|
|
1103
|
+
protected readonly query: _angular_core.WritableSignal<string>;
|
|
1104
|
+
protected readonly popoverWidth: _angular_core.WritableSignal<string | null>;
|
|
1105
|
+
protected readonly popoverOrigin: _angular_core.WritableSignal<FlexibleConnectedPositionStrategyOrigin | null>;
|
|
1106
|
+
protected readonly sheetTitleId: string;
|
|
1107
|
+
protected readonly openIcon: string;
|
|
1108
|
+
protected readonly switchFailed: _angular_core.Signal<boolean>;
|
|
1109
|
+
protected readonly changedElsewhere: _angular_core.Signal<boolean>;
|
|
1110
|
+
/** Normalized items of the service; empty while no configuration is bound (INV-013). */
|
|
1111
|
+
protected readonly items: _angular_core.Signal<readonly SdLayoutContext[]>;
|
|
1112
|
+
protected readonly customLabel: _angular_core.Signal<string | null>;
|
|
1113
|
+
protected readonly canOpen: _angular_core.Signal<boolean>;
|
|
1114
|
+
protected readonly searchable: _angular_core.Signal<boolean>;
|
|
1115
|
+
protected readonly activeId: _angular_core.Signal<string | null>;
|
|
1116
|
+
protected readonly activeItem: _angular_core.Signal<SdLayoutContext>;
|
|
1117
|
+
protected readonly activeInitial: _angular_core.Signal<string>;
|
|
1118
|
+
protected readonly positions: _angular_core.Signal<ConnectedPosition[]>;
|
|
1119
|
+
protected readonly rows: _angular_core.Signal<SdLayoutContextSwitcherRow[]>;
|
|
1120
|
+
protected readonly isSwitching: _angular_core.Signal<boolean>;
|
|
1121
|
+
constructor();
|
|
1122
|
+
/** Opens or closes the popover (header, rail) or the bottom sheet (sheet). */
|
|
1123
|
+
toggle(): void;
|
|
1124
|
+
/** Opens the popover or the bottom sheet; ignored with fewer than two contexts. */
|
|
1125
|
+
open(): void;
|
|
1126
|
+
/** Closes the popover or the bottom sheet; focus returns to the trigger unless `restoreFocus` is false. */
|
|
1127
|
+
close(restoreFocus?: boolean): void;
|
|
1128
|
+
protected select(row: SdLayoutContextSwitcherRow): void;
|
|
1129
|
+
protected reload(): void;
|
|
1130
|
+
protected onSearch(event: Event): void;
|
|
1131
|
+
protected onPanelKeydown(event: KeyboardEvent): void;
|
|
1132
|
+
protected showAvatarImage(item: SdLayoutContext | null): boolean;
|
|
1133
|
+
protected onAvatarError(url: string | undefined): void;
|
|
1134
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdLayoutContextSwitcher, never>;
|
|
1135
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdLayoutContextSwitcher, "sd-layout-context-switcher", never, { "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "anchor": { "alias": "anchor"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
605
1138
|
/** Thêm '/' ở cuối để so khớp theo segment: '/appointment' không khớp nhầm '/appointments'. */
|
|
606
1139
|
declare const normalizeMenuPath: (path: string) => string;
|
|
607
1140
|
/** Route hiện tại có nằm trong nhánh của `path` không (khớp chính xác hoặc khớp phần đầu). */
|
|
@@ -665,5 +1198,5 @@ declare class SdLayoutModule {
|
|
|
665
1198
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<SdLayoutModule>;
|
|
666
1199
|
}
|
|
667
1200
|
|
|
668
|
-
export { DEFAULT_LAYOUT_MOBILE_BREAKPOINT, ForbiddenModule, HighlightSearchPipe, HomeModule, MenuFocusPipe, MenuPipe, NotFoundModule, SD_LAYOUT_CONFIGURATION, SD_LAYOUT_DEMO_FALLBACK, SD_LAYOUT_STORAGE_NAMESPACE, SD_LAYOUT_VIEWPORT, SdLayoutComponent, SdLayoutMenuTreeComponent, SdLayoutModule, SdLayoutNavigationStateService, SdLayoutResponsiveService, SdLayoutService, SdLayoutStorageService, SdLayoutUserMenuComponent, SdPageComponent, SdSidebarMobileOverlay, SdSidebarMobileV1, SdSidebarMobileV2, SdSidebarMobileV3, SdSidebarV2, SdSidebarV3, collectMatchedMenuPaths, containsMenuPath, flattenMenuLeaves, getMenuStableKey, isMenuPathMatch, normalizeLayoutMobileBreakpoint, normalizeMenuPath, normalizeSidebarConfiguration, resolveActiveMenuPath, resolveMenuKeys, resolveSidebarV2Interaction, resolveSidebarV3Recent, resolveTabName, searchMenuLeaves, selectPrimaryMenuGroups };
|
|
669
|
-
export type { ISdLayoutConfiguration, ISdSidebarConfiguration, Menus, ResolvedSidebarRecentConfiguration, SdLayoutAccountAction, SdLayoutChildrenMenu, SdLayoutMenu, SdLayoutNotificationConfiguration, SdLayoutRootMenu, SdLayoutStorageNamespace, SdLayoutUserInfo, SdLayoutUserRole, SdLayoutVersionState, SdLayoutViewport, SidebarConfigurationBase, SidebarConfigurationV1, SidebarConfigurationV2, SidebarConfigurationV3 };
|
|
1201
|
+
export { DEFAULT_LAYOUT_MOBILE_BREAKPOINT, ForbiddenModule, HighlightSearchPipe, HomeModule, MenuFocusPipe, MenuPipe, NotFoundModule, SD_LAYOUT_CONFIGURATION, SD_LAYOUT_CONTEXT_MARKER_KEY, SD_LAYOUT_CONTEXT_RUNTIME, SD_LAYOUT_DEMO_FALLBACK, SD_LAYOUT_STORAGE_NAMESPACE, SD_LAYOUT_VIEWPORT, SD_PAGE_LIST, SdLayoutComponent, SdLayoutContextService, SdLayoutContextSwitcher, SdLayoutMenuTreeComponent, SdLayoutModule, SdLayoutNavigationStateService, SdLayoutResponsiveService, SdLayoutService, SdLayoutStorageService, SdLayoutUserMenuComponent, SdPageComponent, SdPageList, SdSidebarMobileOverlay, SdSidebarMobileV1, SdSidebarMobileV2, SdSidebarMobileV3, SdSidebarMobileV4, SdSidebarV2, SdSidebarV3, SdSidebarV4, collectMatchedMenuPaths, containsMenuPath, createSdLayoutContextBrowserRuntime, flattenMenuLeaves, getMenuStableKey, groupMenusBySection, isMenuPathMatch, normalizeLayoutMobileBreakpoint, normalizeMenuPath, normalizeSidebarConfiguration, resolveActiveMenuPath, resolveMenuKeys, resolveMenuTrailing, resolveSidebarV2Interaction, resolveSidebarV3Recent, resolveTabName, sdPageFormLeaveGuard, searchAvailableMenuLeaves, searchMenuLeaves, selectPrimaryMenuGroups };
|
|
1202
|
+
export type { ISdLayoutConfiguration, ISdSidebarConfiguration, Menus, ResolvedSidebarRecentConfiguration, SdLayoutAccountAction, SdLayoutChildrenMenu, SdLayoutContext, SdLayoutContextConfiguration, SdLayoutContextRuntime, SdLayoutMenu, SdLayoutMenuBadge, SdLayoutMenuSectionGroup, SdLayoutMenuStatus, SdLayoutMenuTrailing, SdLayoutNotificationConfiguration, SdLayoutRootMenu, SdLayoutStorageNamespace, SdLayoutUserInfo, SdLayoutUserRole, SdLayoutVersionState, SdLayoutViewport, SdPageAside, SdPageBackLink, SdPageListContext, SdPageListDetail, SdPageWidth, SidebarConfigurationBase, SidebarConfigurationV1, SidebarConfigurationV2, SidebarConfigurationV3, SidebarConfigurationV4 };
|