@sdcorejs/angular 22.3.2 → 22.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/THEME.md +58 -6
- package/assets/scss/core/form.scss +291 -3
- package/assets/scss/themes/_component-tokens.scss +35 -6
- package/fesm2022/sdcorejs-angular-components-badge.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +3 -3
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +15 -3
- 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 +398 -78
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +460 -16
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +932 -174
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +7 -2
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +5 -2
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +437 -122
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +4 -0
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +4 -0
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +4 -0
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +18 -2
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +4 -0
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +26 -20
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +14 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +210 -0
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-BrJfOTWy.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-SJIWI1dX.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-BrJfOTWy.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-SJIWI1dX.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-DQYXx2nr.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-BPhMLVbv.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-DQYXx2nr.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-BPhMLVbv.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-Cjg3Dfq1.mjs → sdcorejs-angular-modules-generic-generic-list.page-aGhowe9Y.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-Cjg3Dfq1.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-aGhowe9Y.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DpXg2yI7.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-N8_oGpqD.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DpXg2yI7.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-N8_oGpqD.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-generic.mjs +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +289 -11
- 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-Cfmr0L_5.mjs +51 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-Cfmr0L_5.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-C7-itJqB.mjs +134 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-C7-itJqB.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CxgmaNod.mjs +132 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CxgmaNod.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-C2GdGhkJ.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-C2GdGhkJ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CzJh4LMR.mjs +119 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CzJh4LMR.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DIivNX4o.mjs +469 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DIivNX4o.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-B0nhFd_M.mjs +67 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-B0nhFd_M.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-D1dqsKX0.mjs +152 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-D1dqsKX0.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-Dkmm0a2Y.mjs +479 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-Dkmm0a2Y.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-WK0AcxNJ.mjs +175 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-WK0AcxNJ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-yJ5fPyYU.mjs +92 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-yJ5fPyYU.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-BvhEMUgY.mjs +533 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-BvhEMUgY.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-Ydotvlyc.mjs +64 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-Ydotvlyc.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs +92 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs +242 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-cxNRkeRU.mjs +179 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-cxNRkeRU.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs +72 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-D1zWXyN6.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-D1zWXyN6.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-BK__9Mzb.mjs +541 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-BK__9Mzb.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-1Xn1WaAP.mjs +647 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-1Xn1WaAP.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B6Ndq542.mjs +120 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B6Ndq542.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Bv_l7vnz.mjs +73 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Bv_l7vnz.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CaXgC8wK.mjs +172 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CaXgC8wK.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-ChwTb4BU.mjs +118 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-ChwTb4BU.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-DKK3NmbN.mjs +1069 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-DKK3NmbN.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-GSlXwL2Z.mjs +49 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.service-GSlXwL2Z.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-DPBwMafn.mjs +301 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-DPBwMafn.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-1kifjm82.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-1kifjm82.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-B6z9lJYB.mjs +45 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-B6z9lJYB.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-D1fsRfRB.mjs +66 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-D1fsRfRB.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DdCFCwxY.mjs +50 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DdCFCwxY.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DeThmv4f.mjs +74 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DeThmv4f.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-bQpdxKlY.mjs +166 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-bQpdxKlY.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-h66efEeH.mjs +74 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-h66efEeH.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-t3O2L2J5.mjs +43 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-t3O2L2J5.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-B6w4N6wo.mjs +413 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-B6w4N6wo.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BIYHlzVQ.mjs +325 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BIYHlzVQ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DKgmhJT2.mjs +146 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DKgmhJT2.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-nnldn2cz.mjs +135 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-nnldn2cz.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-C0Bewuwz.mjs +129 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-C0Bewuwz.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Qlh3Lm2p.mjs +360 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Qlh3Lm2p.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-p9R5-eou.mjs +101 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-p9R5-eou.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-services-unsaved-changes.mjs +104 -4
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.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 +5 -1
- package/types/sdcorejs-angular-components-badge.d.ts +19 -1
- 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 +47 -5
- package/types/sdcorejs-angular-components-table.d.ts +127 -13
- package/types/sdcorejs-angular-components-upload-file.d.ts +181 -21
- package/types/sdcorejs-angular-forms-chip.d.ts +136 -26
- package/types/sdcorejs-angular-i18n.d.ts +42 -0
- package/types/sdcorejs-angular-modules-layout.d.ts +89 -6
- package/types/sdcorejs-angular-modules-pattern.d.ts +50 -0
- package/types/sdcorejs-angular-services-unsaved-changes.d.ts +11 -0
|
@@ -1,28 +1,17 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { FormGroup, FormControl
|
|
4
|
-
import {
|
|
5
|
-
import { MatChipInputEvent } from '@angular/material/chips';
|
|
2
|
+
import { ElementRef, TemplateRef } from '@angular/core';
|
|
3
|
+
import { FormGroup, FormControl } from '@angular/forms';
|
|
4
|
+
import { MatChipGrid, MatChipInputEvent } from '@angular/material/chips';
|
|
6
5
|
import { ErrorStateMatcher } from '@angular/material/core';
|
|
7
6
|
import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
|
|
8
7
|
import { SdViewDefDirective, SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
|
|
9
8
|
import { SdLabelPlacement, SdViewed, SdViewedInput, SdFormControl } from '@sdcorejs/angular/forms/models';
|
|
10
9
|
import { Size } from '@sdcorejs/utils/models';
|
|
11
10
|
|
|
12
|
-
declare class
|
|
13
|
-
constructor();
|
|
14
|
-
transform(item: any, removable: boolean | ((item: any) => boolean)): boolean;
|
|
15
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdRemovableChipPipe, never>;
|
|
16
|
-
static ɵpipe: _angular_core.ɵɵPipeDeclaration<SdRemovableChipPipe, "sdRemovableChip", true>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
declare class SdChipErrorStateMatcher implements ErrorStateMatcher {
|
|
20
|
-
private formControl;
|
|
21
|
-
constructor(formControl: FormControl);
|
|
22
|
-
isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean;
|
|
23
|
-
}
|
|
24
|
-
declare class SdChip implements AfterViewInit, OnDestroy {
|
|
11
|
+
declare class SdChip {
|
|
25
12
|
#private;
|
|
13
|
+
/** why: id ổn định của lỗi (`<mat-error>` hoặc chữ ẩn của `hideInlineError`) để ô nhập trỏ `aria-describedby` sang (A8). */
|
|
14
|
+
readonly errorId: string;
|
|
26
15
|
autoIdInput: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
|
|
27
16
|
autoId: _angular_core.Signal<string | undefined>;
|
|
28
17
|
readonly dataDisabled: _angular_core.Signal<"true" | "false">;
|
|
@@ -52,9 +41,31 @@ declare class SdChip implements AfterViewInit, OnDestroy {
|
|
|
52
41
|
removable: _angular_core.InputSignalWithTransform<boolean | ((item: any) => boolean), boolean | ((item: any) => boolean) | null | undefined>;
|
|
53
42
|
hideInlineError: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
54
43
|
required: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
44
|
+
/** Fewest chips; > 0 adds `Validators.minLength`. Replaces `min`. */
|
|
45
|
+
minCount: _angular_core.InputSignalWithTransform<number | undefined, number | null | undefined>;
|
|
46
|
+
/** Most chips; > 0 adds `Validators.maxLength` (for a model set from outside) and stops adding once reached. Replaces `max`. */
|
|
47
|
+
maxCount: _angular_core.InputSignalWithTransform<number | undefined, number | null | undefined>;
|
|
48
|
+
/** @deprecated Use `minCount`; `minCount` wins when both are set. */
|
|
55
49
|
min: _angular_core.InputSignalWithTransform<number, number | null | undefined>;
|
|
50
|
+
/** @deprecated Use `maxCount`; `maxCount` wins when both are set. */
|
|
56
51
|
max: _angular_core.InputSignalWithTransform<number, number | null | undefined>;
|
|
52
|
+
/** `false` keeps the field read-only for typing: the input stays (mat-chip-grid needs it) but is read-only and out of the Tab order. */
|
|
57
53
|
addable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
54
|
+
/** Leaving the field turns the typed text into a chip. `false` drops the text instead, as before. */
|
|
55
|
+
addOnBlur: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
56
|
+
/** Keys that commit the typed text (`KeyboardEvent.key`). A paste also splits on these characters, new lines and tabs. */
|
|
57
|
+
separators: _angular_core.InputSignalWithTransform<readonly string[], readonly string[] | null | undefined>;
|
|
58
|
+
/** Normalises typed or pasted text before it is compared and stored; `null` or `''` drops it. Default: trim. */
|
|
59
|
+
chipTransform: _angular_core.InputSignalWithTransform<(raw: string) => string | number | null, ((raw: string) => string | number | null) | null | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* Checks a normalised value: an i18n key (or the message itself) when it is refused, else `null`. A refused value does
|
|
62
|
+
* not become a chip; its text stays in the input and the message shows under the field.
|
|
63
|
+
*/
|
|
64
|
+
chipValidator: _angular_core.InputSignal<((value: string | number) => string | null) | null | undefined>;
|
|
65
|
+
/** Shows a button that removes every chip `removable` allows. Off by default, like `clearable` of `<sd-date>`. */
|
|
66
|
+
clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
67
|
+
/** Chips shown while the field is not focused; the rest fold into “+N”. `null` shows them all. `2` suits `<sd-table>` cells. */
|
|
68
|
+
maxVisible: _angular_core.InputSignal<number | null | undefined>;
|
|
58
69
|
disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
59
70
|
/** Display mode: `false` edit · `true` static view · `'inline'` interactive (disabled `'inline'` → static). */
|
|
60
71
|
viewed: _angular_core.InputSignalWithTransform<SdViewed, SdViewedInput>;
|
|
@@ -64,31 +75,130 @@ declare class SdChip implements AfterViewInit, OnDestroy {
|
|
|
64
75
|
model: _angular_core.ModelSignal<(string | number)[] | undefined>;
|
|
65
76
|
sdChange: _angular_core.OutputEmitterRef<any[]>;
|
|
66
77
|
input: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
78
|
+
readonly chipGrid: _angular_core.Signal<MatChipGrid | undefined>;
|
|
79
|
+
private readonly chipTextElements;
|
|
67
80
|
sdViewDef: _angular_core.Signal<SdViewDefDirective<any, any> | undefined>;
|
|
68
81
|
sdLabelDef: _angular_core.Signal<SdLabelDefDirective | undefined>;
|
|
69
82
|
sdLabelTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
70
83
|
sdValueTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
71
|
-
|
|
72
|
-
readonly
|
|
73
|
-
|
|
84
|
+
/** The field is being edited: the `sdViewDef` face gives way to the field. A signal, so OnPush redraws without `detectChanges()` (D1). */
|
|
85
|
+
readonly isFocused: _angular_core.WritableSignal<boolean>;
|
|
86
|
+
/**
|
|
87
|
+
* Control of `mat-chip-grid` only. why: the grid is a ControlValueAccessor that writes the text of the rendered chips
|
|
88
|
+
* into its control on blur, after a timeout (numbers became strings, a form reset was undone). It still needs an
|
|
89
|
+
* ngControl to work out its error state on every check, so it gets this one; nothing reads its value.
|
|
90
|
+
*/
|
|
91
|
+
readonly gridControl: FormControl<unknown>;
|
|
92
|
+
/** `minCount`, else the deprecated `min`. */
|
|
93
|
+
readonly effectiveMinCount: _angular_core.Signal<number>;
|
|
94
|
+
/** `maxCount`, else the deprecated `max`. */
|
|
95
|
+
readonly effectiveMaxCount: _angular_core.Signal<number>;
|
|
96
|
+
/** why: phím tách do `separators` + onInputKeydown xử lý, nên Material không nhận phím nào. */
|
|
97
|
+
readonly noSeparatorKeys: number[];
|
|
98
|
+
/**
|
|
99
|
+
* Items rendered as chips: every value except `null`, `undefined` and `''`, so `0` shows (A2). Display only: the
|
|
100
|
+
* model is never rewritten. why: exact duplicates are dropped too, because the chips are tracked by value.
|
|
101
|
+
*/
|
|
102
|
+
readonly chips: _angular_core.Signal<(string | number)[]>;
|
|
103
|
+
/** Message of a typed or pasted value that `chipValidator` refused; it shows under the field until the text changes (B4). */
|
|
104
|
+
readonly inputError: _angular_core.WritableSignal<string | null>;
|
|
105
|
+
/** Last polite announcement; a new id re-renders the text so a repeated message is read again. */
|
|
106
|
+
readonly liveMessage: _angular_core.WritableSignal<{
|
|
107
|
+
id: number;
|
|
108
|
+
text: string;
|
|
109
|
+
} | null>;
|
|
110
|
+
/** Chip that the typed value duplicates, highlighted for 1.4s (B3). */
|
|
111
|
+
readonly duplicateChip: _angular_core.WritableSignal<string | number | null>;
|
|
112
|
+
/** Text of the chips that the 240px limit cuts; only they get a tooltip (B7). */
|
|
113
|
+
readonly truncatedChips: _angular_core.WritableSignal<ReadonlySet<string>>;
|
|
114
|
+
/** `maxCount` reached: typing and pasting add nothing more (B3). */
|
|
115
|
+
readonly full: _angular_core.Signal<boolean>;
|
|
116
|
+
/** Chips on screen: all while the field has focus, else at most `maxVisible` (B7). */
|
|
117
|
+
readonly visibleChips: _angular_core.Signal<(string | number)[]>;
|
|
118
|
+
/** Chips folded into “+N”. */
|
|
119
|
+
readonly hiddenCount: _angular_core.Signal<number>;
|
|
120
|
+
/** At least one chip may be removed, so the clear button has something to do (B6). */
|
|
121
|
+
readonly hasRemovable: _angular_core.Signal<boolean>;
|
|
122
|
+
/**
|
|
123
|
+
* Placeholder: “Đã đủ …” once full, else the input, else “Nhập rồi nhấn Enter” — never the label (B5). None when not
|
|
124
|
+
* addable, or while chips are folded into “+N”: nobody types then, and the input only fills the rest of the line (C1).
|
|
125
|
+
*/
|
|
126
|
+
readonly effectivePlaceholder: _angular_core.Signal<string | null>;
|
|
127
|
+
readonly clearLabel: _angular_core.Signal<string>;
|
|
128
|
+
/** Tooltip of the lock on a chip that `removable` keeps (C3). */
|
|
129
|
+
readonly lockedLabel: _angular_core.Signal<string>;
|
|
130
|
+
/** Sizes of the chip ✕ / lock and of the clear-button icon for the current `size` (C1). */
|
|
131
|
+
readonly iconSizes: _angular_core.Signal<{
|
|
132
|
+
readonly chip: "12px";
|
|
133
|
+
readonly clear: "16px";
|
|
134
|
+
} | {
|
|
135
|
+
readonly chip: "14px";
|
|
136
|
+
readonly clear: "18px";
|
|
137
|
+
} | {
|
|
138
|
+
readonly chip: "16px";
|
|
139
|
+
readonly clear: "20px";
|
|
140
|
+
}>;
|
|
141
|
+
readonly moreLabel: _angular_core.Signal<string>;
|
|
74
142
|
constructor();
|
|
75
143
|
get formControl(): SdFormControl;
|
|
76
144
|
get inputControl(): FormControl<any>;
|
|
77
145
|
readonly errorMessage: _angular_core.Signal<string | undefined>;
|
|
78
|
-
get matcher():
|
|
79
|
-
|
|
80
|
-
|
|
146
|
+
get matcher(): ErrorStateMatcher;
|
|
147
|
+
/**
|
|
148
|
+
* The one place that decides whether the error shows (A5): the `ErrorStateMatcher` of the chip grid and the input,
|
|
149
|
+
* `<mat-error>`, the `hideInlineError` icon and `aria-invalid` all read it. Invalid and touched, or the parent form
|
|
150
|
+
* was submitted; a field that is only dirty shows nothing.
|
|
151
|
+
*/
|
|
152
|
+
isErrorShown(): boolean;
|
|
153
|
+
/** Text under the field: the `chipValidator` message of the typed value first, else the form error. */
|
|
154
|
+
readonly errorText: _angular_core.Signal<string | undefined>;
|
|
155
|
+
/** Whether `item` may be removed, per `removable`; applied on every removal path (A1). */
|
|
156
|
+
isRemovable(item: string | number): boolean;
|
|
157
|
+
/** Accessible name of the ✕ button of a chip (A6). */
|
|
158
|
+
removeLabel(item: string | number): string;
|
|
159
|
+
/** Accessible name of a chip that `removable` keeps: its text plus “, Không xoá được” (C3). A removable chip keeps its text. */
|
|
160
|
+
chipLabel(item: string | number): string | null;
|
|
161
|
+
/** Text of a chip, also its key for `truncatedChips`. */
|
|
162
|
+
chipText(item: string | number): string;
|
|
163
|
+
/** A separator key (`separators`) commits the typed text; the key itself is not typed (B2 / separators). */
|
|
164
|
+
onInputKeydown(event: KeyboardEvent): void;
|
|
165
|
+
/** The refused-value message goes as soon as the text changes (B4). */
|
|
166
|
+
onInputText(): void;
|
|
167
|
+
/**
|
|
168
|
+
* A paste that holds a separator, a new line or a tab becomes several chips in one change (B2). Duplicates are
|
|
169
|
+
* skipped, refused values and values past `maxCount` stay in the input, and the result is announced. A paste with
|
|
170
|
+
* no separator is left to the browser.
|
|
171
|
+
*/
|
|
172
|
+
onPaste(event: ClipboardEvent): void;
|
|
173
|
+
/** Backspace / Delete on a chip that `removable` keeps says why nothing happened (A1, B3). */
|
|
174
|
+
onChipKeydown(event: KeyboardEvent, item: string | number): void;
|
|
175
|
+
/** “+N” moves focus to the input, where every chip shows (B7). */
|
|
176
|
+
onMoreClick(event: Event): void;
|
|
177
|
+
/** Focus entering the input or a chip unfolds “+N”; focus on the “+N” button itself does not (B7). */
|
|
178
|
+
onFocusIn(event: FocusEvent): void;
|
|
179
|
+
/**
|
|
180
|
+
* Marks the field touched once focus leaves it; moving between the input and the chips does not count.
|
|
181
|
+
* why: `mat-chip-grid` is no longer bound to the control. As a ControlValueAccessor it wrote the text of the rendered
|
|
182
|
+
* chips back into the control on blur (numbers became strings, a form reset was undone), so the component marks
|
|
183
|
+
* touched itself, like the grid did.
|
|
184
|
+
*/
|
|
185
|
+
onFocusOut(event: FocusEvent): void;
|
|
81
186
|
onAdd: (event: MatChipInputEvent) => void;
|
|
82
187
|
onClickChip: (event: Event, item: any) => void;
|
|
83
188
|
onRemove: (item: any) => void;
|
|
84
|
-
onSelect: (event: MatAutocompleteSelectedEvent) => void;
|
|
85
189
|
onFocus: () => void;
|
|
86
190
|
onBlur: () => void;
|
|
87
191
|
onClick: () => void;
|
|
192
|
+
/**
|
|
193
|
+
* why: khi `sdViewDef` đang hiển thị thì bên trong không còn phần tử nào focus được, nên phần tử view là lối vào
|
|
194
|
+
* duy nhất để chuyển sang chế độ sửa. Bàn phím phải mở được y hệt chuột → Enter/Space chạy chung handler;
|
|
195
|
+
* preventDefault chặn Space cuộn trang (A7).
|
|
196
|
+
*/
|
|
197
|
+
onViewKeydown: (event: Event) => void;
|
|
88
198
|
focus: () => void;
|
|
89
199
|
onClear: ($event?: any) => void;
|
|
90
200
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdChip, never>;
|
|
91
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdChip, "sd-chip", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "addable": { "alias": "addable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "sdChange": "sdChange"; }, ["sdViewDef", "sdLabelDef", "sdLabelTemplate", "sdValueTemplate"], never, true, never>;
|
|
201
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdChip, "sd-chip", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "minCount": { "alias": "minCount"; "required": false; "isSignal": true; }; "maxCount": { "alias": "maxCount"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "addable": { "alias": "addable"; "required": false; "isSignal": true; }; "addOnBlur": { "alias": "addOnBlur"; "required": false; "isSignal": true; }; "separators": { "alias": "separators"; "required": false; "isSignal": true; }; "chipTransform": { "alias": "chipTransform"; "required": false; "isSignal": true; }; "chipValidator": { "alias": "chipValidator"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "maxVisible": { "alias": "maxVisible"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "sdChange": "sdChange"; }, ["sdViewDef", "sdLabelDef", "sdLabelTemplate", "sdValueTemplate"], never, true, never>;
|
|
92
202
|
}
|
|
93
203
|
|
|
94
|
-
export { SdChip
|
|
204
|
+
export { SdChip };
|
|
@@ -38,6 +38,7 @@ declare const EN_MESSAGES: {
|
|
|
38
38
|
readonly 'core.component.table.mobile.reorder': "Drag to reorder row";
|
|
39
39
|
readonly 'core.component.table.mobile.details': "Details";
|
|
40
40
|
readonly 'core.component.table.mobile.summary': "Summary";
|
|
41
|
+
readonly 'core.common.back': "Back";
|
|
41
42
|
readonly 'core.common.cancel': "Cancel";
|
|
42
43
|
readonly 'core.common.close': "Close";
|
|
43
44
|
readonly 'core.common.reload': "Reload page";
|
|
@@ -142,6 +143,15 @@ declare const EN_MESSAGES: {
|
|
|
142
143
|
readonly 'core.form.chip.required': "Please enter information";
|
|
143
144
|
readonly 'core.form.chip.minlength': "Please enter at least {min} values";
|
|
144
145
|
readonly 'core.form.chip.maxlength': "Please enter at most {max} values";
|
|
146
|
+
readonly 'core.form.chip.remove': "Remove {value}";
|
|
147
|
+
readonly 'core.form.chip.placeholder': "Type, then press Enter";
|
|
148
|
+
readonly 'core.form.chip.locked': "Cannot be removed";
|
|
149
|
+
readonly 'core.form.chip.duplicate': "“{value}” is already added";
|
|
150
|
+
readonly 'core.form.chip.full': "All {max} values are added";
|
|
151
|
+
readonly 'core.form.chip.added': "Added {count}";
|
|
152
|
+
readonly 'core.form.chip.skipped': "skipped {count} duplicates";
|
|
153
|
+
readonly 'core.form.chip.more': "Show {count} more";
|
|
154
|
+
readonly 'core.form.chip.clear': "Remove all";
|
|
145
155
|
readonly 'core.form.chip-calendar.required': "Please enter information";
|
|
146
156
|
readonly 'core.form.chip-calendar.minlength': "Please enter at least {min} values";
|
|
147
157
|
readonly 'core.form.chip-calendar.maxlength': "Please enter at most {max} values";
|
|
@@ -500,6 +510,8 @@ declare const EN_MESSAGES: {
|
|
|
500
510
|
readonly 'core.component.table.selector-action.default-msg': "items selected";
|
|
501
511
|
readonly 'core.component.tab-router.too-many-tabs': "You have opened too many tabs.";
|
|
502
512
|
readonly 'core.component.tab-router.close-tab': "Close tab";
|
|
513
|
+
readonly 'core.component.tab-router.close-others': "Close other tabs";
|
|
514
|
+
readonly 'core.component.tab-router.unsaved': "Unsaved changes";
|
|
503
515
|
readonly 'core.component.tab-router.open-tabs': "{count} open tabs";
|
|
504
516
|
readonly 'core.component.tab-router.tab-list': "Tab list";
|
|
505
517
|
readonly 'core.component.upload-file.upload': "Upload file";
|
|
@@ -548,6 +560,12 @@ declare const EN_MESSAGES: {
|
|
|
548
560
|
readonly 'core.module.layout.forbidden.title': "Access denied";
|
|
549
561
|
readonly 'core.module.layout.forbidden.message': "You don't have permission to access this page. Please contact your administrator or go back to the home page";
|
|
550
562
|
readonly 'core.module.layout.forbidden.back-home': "Back to home";
|
|
563
|
+
readonly 'core.module.layout.page.actions': "Page actions";
|
|
564
|
+
readonly 'core.module.layout.page.toc': "Contents";
|
|
565
|
+
readonly 'core.module.layout.page.leave.title': "Leave this page without saving?";
|
|
566
|
+
readonly 'core.module.layout.page.leave.message': "Unsaved changes will be lost.";
|
|
567
|
+
readonly 'core.module.layout.page.leave.stay': "Stay";
|
|
568
|
+
readonly 'core.module.layout.page.leave.leave': "Leave";
|
|
551
569
|
readonly 'core.module.layout.not-found.title': "404 - Page not found";
|
|
552
570
|
readonly 'core.module.layout.not-found.message': "The page you're looking for doesn't exist or has been removed. Please check the URL or go back to the home page to continue.";
|
|
553
571
|
readonly 'core.module.layout.not-found.back': "Go back";
|
|
@@ -876,11 +894,35 @@ declare const EN_MESSAGES: {
|
|
|
876
894
|
readonly 'core.form.select.search': "Search";
|
|
877
895
|
readonly 'core.form.search-field.clear': "Clear search";
|
|
878
896
|
readonly 'core.component.table.loading': "Loading table data";
|
|
897
|
+
readonly 'core.component.table.loaded': "Loaded {count} rows";
|
|
898
|
+
readonly 'core.component.table.loaded-one': "Loaded 1 row";
|
|
899
|
+
readonly 'core.component.table.tree-toggle': "Toggle child rows";
|
|
879
900
|
readonly 'core.component.upload-file.loading': "Uploading file";
|
|
880
901
|
readonly 'core.component.import-excel.loading': "Loading data";
|
|
881
902
|
readonly 'core.component.upload-file.remove': "Remove file";
|
|
882
903
|
readonly 'core.component.upload-file.zoom': "Zoom image";
|
|
883
904
|
readonly 'core.component.upload-file.view-all': "View all images";
|
|
905
|
+
readonly 'core.component.upload-file.viewer.download': "Download";
|
|
906
|
+
readonly 'core.component.upload-file.viewer.open-new-tab': "Open in new tab";
|
|
907
|
+
readonly 'core.component.upload-file.viewer.zoom-in': "Zoom in";
|
|
908
|
+
readonly 'core.component.upload-file.viewer.zoom-out': "Zoom out";
|
|
909
|
+
readonly 'core.component.upload-file.viewer.fit': "Fit to window";
|
|
910
|
+
readonly 'core.component.upload-file.viewer.rotate': "Rotate";
|
|
911
|
+
readonly 'core.component.upload-file.viewer.prev': "Previous file";
|
|
912
|
+
readonly 'core.component.upload-file.viewer.next': "Next file";
|
|
913
|
+
readonly 'core.component.upload-file.viewer.load-error': "Could not load the file";
|
|
914
|
+
readonly 'core.component.upload-file.viewer.load-error-hint': "Try again or download it to open in another app.";
|
|
915
|
+
readonly 'core.component.upload-file.viewer.no-preview': "No preview available";
|
|
916
|
+
readonly 'core.component.upload-file.viewer.loading': "Loading…";
|
|
917
|
+
readonly 'core.component.upload-file.viewer.position': "File {index} of {total}";
|
|
918
|
+
readonly 'core.component.upload-file.retry': "Retry";
|
|
919
|
+
readonly 'core.component.upload-file.add-image': "Add image";
|
|
920
|
+
readonly 'core.component.upload-file.upload-tile': "Upload";
|
|
921
|
+
readonly 'core.component.upload-file.drop-hint': "Drag files here or";
|
|
922
|
+
readonly 'core.component.upload-file.choose-file': "choose a file";
|
|
923
|
+
readonly 'core.component.upload-file.drop-to-upload': "Drop to upload";
|
|
924
|
+
readonly 'core.component.upload-file.remove-named': "Remove {name}";
|
|
925
|
+
readonly 'core.component.upload-file.no-files': "No files";
|
|
884
926
|
readonly 'core.component.form-builder.canvas': "Form design canvas";
|
|
885
927
|
readonly 'core.component.form-builder.toolbar': "Form builder toolbar";
|
|
886
928
|
readonly 'core.component.form-builder.mode': "Mode";
|
|
@@ -2,12 +2,15 @@ import * as _angular_core from '@angular/core';
|
|
|
2
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
7
|
import { MaybeAsync } from '@sdcorejs/utils/models';
|
|
8
8
|
import { Observable } from 'rxjs';
|
|
9
9
|
import { SdViewport } from '@sdcorejs/angular/services/viewport';
|
|
10
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';
|
|
11
14
|
import { FlexibleConnectedPositionStrategyOrigin, ConnectedPosition } from '@angular/cdk/overlay';
|
|
12
15
|
|
|
13
16
|
declare class HomeRoutingModule {
|
|
@@ -535,14 +538,94 @@ declare class SdLayoutContextService {
|
|
|
535
538
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SdLayoutContextService>;
|
|
536
539
|
}
|
|
537
540
|
|
|
538
|
-
|
|
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;
|
|
539
553
|
private el;
|
|
540
554
|
title: _angular_core.InputSignal<string>;
|
|
541
555
|
description: _angular_core.InputSignal<string>;
|
|
542
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;
|
|
543
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;
|
|
544
580
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdPageComponent, never>;
|
|
545
|
-
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>;
|
|
546
629
|
}
|
|
547
630
|
|
|
548
631
|
declare class SdLayoutComponent {
|
|
@@ -1006,7 +1089,7 @@ declare class SdLayoutContextSwitcher {
|
|
|
1006
1089
|
/** Context configuration of the sidebar; nothing renders without items. */
|
|
1007
1090
|
configuration: _angular_core.InputSignal<SdLayoutContextConfiguration | null | undefined>;
|
|
1008
1091
|
/** Header trigger, collapsed-rail avatar, or mobile row that opens a bottom sheet. */
|
|
1009
|
-
appearance: _angular_core.InputSignal<"
|
|
1092
|
+
appearance: _angular_core.InputSignal<"header" | "sheet" | "rail">;
|
|
1010
1093
|
/** Side the desktop popover opens on; defaults to `below` for the header and `right` for the rail. The sheet ignores it. */
|
|
1011
1094
|
placement: _angular_core.InputSignal<"below" | "right" | undefined>;
|
|
1012
1095
|
/**
|
|
@@ -1115,5 +1198,5 @@ declare class SdLayoutModule {
|
|
|
1115
1198
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<SdLayoutModule>;
|
|
1116
1199
|
}
|
|
1117
1200
|
|
|
1118
|
-
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, SdLayoutComponent, SdLayoutContextService, SdLayoutContextSwitcher, SdLayoutMenuTreeComponent, SdLayoutModule, SdLayoutNavigationStateService, SdLayoutResponsiveService, SdLayoutService, SdLayoutStorageService, SdLayoutUserMenuComponent, SdPageComponent, SdSidebarMobileOverlay, SdSidebarMobileV1, SdSidebarMobileV2, SdSidebarMobileV3, SdSidebarMobileV4, SdSidebarV2, SdSidebarV3, SdSidebarV4, collectMatchedMenuPaths, containsMenuPath, createSdLayoutContextBrowserRuntime, flattenMenuLeaves, getMenuStableKey, groupMenusBySection, isMenuPathMatch, normalizeLayoutMobileBreakpoint, normalizeMenuPath, normalizeSidebarConfiguration, resolveActiveMenuPath, resolveMenuKeys, resolveMenuTrailing, resolveSidebarV2Interaction, resolveSidebarV3Recent, resolveTabName, searchAvailableMenuLeaves, searchMenuLeaves, selectPrimaryMenuGroups };
|
|
1119
|
-
export type { ISdLayoutConfiguration, ISdSidebarConfiguration, Menus, ResolvedSidebarRecentConfiguration, SdLayoutAccountAction, SdLayoutChildrenMenu, SdLayoutContext, SdLayoutContextConfiguration, SdLayoutContextRuntime, SdLayoutMenu, SdLayoutMenuBadge, SdLayoutMenuSectionGroup, SdLayoutMenuStatus, SdLayoutMenuTrailing, SdLayoutNotificationConfiguration, SdLayoutRootMenu, SdLayoutStorageNamespace, SdLayoutUserInfo, SdLayoutUserRole, SdLayoutVersionState, SdLayoutViewport, SidebarConfigurationBase, SidebarConfigurationV1, SidebarConfigurationV2, SidebarConfigurationV3, SidebarConfigurationV4 };
|
|
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 };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Routes } from '@angular/router';
|
|
2
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Routes of `/pattern`. Mount them with `provideSdPatterns()` in the providers of the same route:
|
|
6
|
+
* the guard below is the route-level `SdPermissionGuard` of the sample roles, not the host's.
|
|
7
|
+
*/
|
|
8
|
+
declare const SD_PATTERN_ROUTES: Routes;
|
|
9
|
+
|
|
10
|
+
/** What the host configures when it mounts the pattern routes with `provideSdPatterns()`. */
|
|
11
|
+
interface SdPatternConfiguration {
|
|
12
|
+
/**
|
|
13
|
+
* Answer `apiBaseUrl` requests from the built-in mock API (seeded data, latency, simulated errors).
|
|
14
|
+
* `false`: the feature services call a real API at `apiBaseUrl`. Default `true`.
|
|
15
|
+
*/
|
|
16
|
+
readonly mockApi?: boolean;
|
|
17
|
+
/** Base URL of the pattern API, root-relative or absolute HTTP(S), no query or hash. Default `'/pattern-api'`. */
|
|
18
|
+
readonly apiBaseUrl?: string;
|
|
19
|
+
/** Latency of every mock response in milliseconds; the toolbar can change it. Default `400`. */
|
|
20
|
+
readonly latencyMs?: number;
|
|
21
|
+
/** Where the mock API keeps created, updated and deleted records. Default `'session'` (sessionStorage). */
|
|
22
|
+
readonly storage?: 'session' | 'none';
|
|
23
|
+
/**
|
|
24
|
+
* Host URL to open when a role has no permission for a pattern route (Core `onForbiden`).
|
|
25
|
+
* Unset: the navigation is only blocked. Errors while loading a record (404, timeout) reach the host's
|
|
26
|
+
* navigation error handler instead, like any other route.
|
|
27
|
+
*/
|
|
28
|
+
readonly forbiddenUrl?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Registers what the pattern routes need, in the environment injector of the route that mounts them:
|
|
33
|
+
*
|
|
34
|
+
* ```ts
|
|
35
|
+
* {
|
|
36
|
+
* path: 'pattern',
|
|
37
|
+
* loadChildren: () => import('@sdcorejs/angular/modules/pattern').then(m => m.SD_PATTERN_ROUTES),
|
|
38
|
+
* providers: [provideSdPatterns({ mockApi: true })],
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* - The mock API interceptor runs on a child `HttpClient` of that route (`withRequestsMadeViaParent`), so other
|
|
43
|
+
* requests of the host are untouched and requests under `/pattern` still go through the host's interceptors.
|
|
44
|
+
* - `SdPermissionService`, `SdPermissionGuard` and `SD_PERMISSION_CONFIGURATION` are provided again there with the
|
|
45
|
+
* sample roles, so the host's own permissions are neither read nor changed.
|
|
46
|
+
*/
|
|
47
|
+
declare function provideSdPatterns(configuration?: SdPatternConfiguration): EnvironmentProviders;
|
|
48
|
+
|
|
49
|
+
export { SD_PATTERN_ROUTES, provideSdPatterns };
|
|
50
|
+
export type { SdPatternConfiguration };
|
|
@@ -42,6 +42,8 @@ interface SdUnsavedChangesRegistration {
|
|
|
42
42
|
interface SdUnsavedChangesConfirmOptions {
|
|
43
43
|
readonly scope?: unknown;
|
|
44
44
|
readonly reason?: SdUnsavedChangesReason;
|
|
45
|
+
/** Asks with this adapter for this call only, instead of `SD_UNSAVED_CHANGES_CONFIRMATION_ADAPTER`. */
|
|
46
|
+
readonly adapter?: SdUnsavedChangesConfirmationAdapter;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
interface SdUnsavedChangesWindow {
|
|
@@ -74,6 +76,15 @@ interface SdUnsavedChangesFormOptions<TValue> {
|
|
|
74
76
|
readonly save?: (value: TValue) => SdUnsavedChangesMaybeAsync<void | boolean>;
|
|
75
77
|
readonly reset?: (form: FormGroup) => SdUnsavedChangesMaybeAsync<void | boolean>;
|
|
76
78
|
readonly discard?: (form: FormGroup) => SdUnsavedChangesMaybeAsync<void | boolean>;
|
|
79
|
+
/**
|
|
80
|
+
* `'control'` (default): the form's own `dirty` flag. `'value'`: dirty only while the value differs from the
|
|
81
|
+
* saved one, so a value typed back to what it was is no change, whether or not the field marks its control dirty.
|
|
82
|
+
* In `'value'` mode each control's saved value is the one it holds once it has joined the form (an `<sd-*>`
|
|
83
|
+
* field registers and writes its model after this call), and it is taken again when the form or the control is
|
|
84
|
+
* marked pristine, on `save()`, `reset()`, `discard()` and on `markPristine()` of the registration. A page that
|
|
85
|
+
* loads another record into the same form calls `markPristine()` once the record is in.
|
|
86
|
+
*/
|
|
87
|
+
readonly dirty?: 'control' | 'value';
|
|
77
88
|
}
|
|
78
89
|
declare function registerSdUnsavedChangesForm<TValue extends Record<string, unknown>>(service: SdUnsavedChangesService, form: FormGroup, options: SdUnsavedChangesFormOptions<TValue>): SdUnsavedChangesRegistration;
|
|
79
90
|
declare function createSdUnsavedChangesCloseGuard(service: SdUnsavedChangesService, options?: Omit<SdUnsavedChangesConfirmOptions, 'reason'>): () => Promise<boolean>;
|