@sdcorejs/angular 19.3.2 → 19.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/THEME.md +58 -6
- package/assets/scss/core/form.scss +291 -3
- package/assets/scss/themes/_component-tokens.scss +35 -6
- package/components/badge/index.d.ts +1 -0
- package/components/badge/src/badge.model.d.ts +19 -0
- package/components/section/index.d.ts +1 -0
- package/components/section/src/section-registry.d.ts +11 -0
- package/components/splitter/index.d.ts +1 -1
- package/components/tab-router/src/actions/tab-router.action.d.ts +1 -1
- package/components/tab-router/src/components/tab-router-item/tab-router-item.component.d.ts +4 -2
- package/components/tab-router/src/components/tab-router-nav/tab-router-nav.component.d.ts +31 -3
- package/components/tab-router/src/components/tab-router-outlet/tab-router-outlet.component.d.ts +6 -1
- package/components/tab-router/src/models/tab-router.model.d.ts +5 -0
- package/components/tab-router/src/pipes/tab-info.pipe.d.ts +7 -0
- package/components/tab-router/src/services/tab-router.service.d.ts +5 -0
- package/components/table/index.d.ts +2 -0
- package/components/table/src/components/filter/external-filter/external-filter.component.d.ts +5 -1
- package/components/table/src/components/mobile-cards/mobile-cards.component.d.ts +4 -0
- package/components/table/src/configurations/index.d.ts +1 -0
- package/components/table/src/configurations/table-layout.d.ts +16 -0
- package/components/table/src/configurations/table.configuration.d.ts +3 -1
- package/components/table/src/models/index.d.ts +1 -0
- package/components/table/src/models/table-column.model.d.ts +3 -10
- package/components/table/src/models/table-item.model.d.ts +4 -1
- package/components/table/src/models/table-option-loading.model.d.ts +42 -0
- package/components/table/src/models/table-option.model.d.ts +6 -0
- package/components/table/src/services/table-filter/table-filter.model.d.ts +5 -0
- package/components/table/src/services/table-loading/table-loading.util.d.ts +91 -0
- package/components/table/src/services/tree/tree.util.d.ts +2 -0
- package/components/table/src/table.component.d.ts +23 -0
- package/components/upload-file/src/components/file-type-icon/file-type-icon.component.d.ts +15 -0
- package/components/upload-file/src/components/preview/preview.component.d.ts +88 -10
- package/components/upload-file/src/configurations/upload-file.configuration.d.ts +1 -1
- package/components/upload-file/src/helpers/file-type.d.ts +25 -0
- package/components/upload-file/src/pipes/file-meta.pipe.d.ts +9 -0
- package/components/upload-file/src/pipes/file-reason.pipe.d.ts +11 -0
- package/components/upload-file/src/pipes/index.d.ts +2 -0
- package/components/upload-file/src/upload-file.component.d.ts +89 -8
- package/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 +390 -75
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +443 -15
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +886 -173
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-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 +421 -121
- 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 +17 -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-BFxO3eHX.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-Bk3PrEf3.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-BFxO3eHX.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-Bk3PrEf3.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-Csy2fShj.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-CwUegGgG.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-Csy2fShj.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-CwUegGgG.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-BIIxNR6k.mjs → sdcorejs-angular-modules-generic-generic-list.page-lF2trhfp.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-BIIxNR6k.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-lF2trhfp.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DjDsau9C.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DjDsau9C.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-generic.mjs +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +265 -10
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs +23 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs +16 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-CVEKaR8U.mjs +51 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-CVEKaR8U.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-BqHybMk0.mjs +130 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-BqHybMk0.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CND3d2zl.mjs +131 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CND3d2zl.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-BbDoQccI.mjs +99 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-BbDoQccI.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CB_wJIP8.mjs +460 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CB_wJIP8.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DlP4BrhU.mjs +118 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DlP4BrhU.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +18 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-VAMePx_q.mjs +66 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-VAMePx_q.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-BD79VR0c.mjs +148 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-BD79VR0c.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-B1rFhbOc.mjs +172 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-B1rFhbOc.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-BhCjw6ZL.mjs +467 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-BhCjw6ZL.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CnL2FzCx.mjs +90 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CnL2FzCx.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-BeH-NYvE.mjs +514 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-BeH-NYvE.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-DpnYSG2j.mjs +61 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-DpnYSG2j.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-1bi0JZdf.mjs +170 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-1bi0JZdf.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D6eKR2cq.mjs +87 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D6eKR2cq.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-FcJS3Nbd.mjs +232 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-FcJS3Nbd.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs +70 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-BAZLCVci.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-BAZLCVci.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-ikk0cK1M.mjs +522 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-ikk0cK1M.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Cex41xzy.mjs +164 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Cex41xzy.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-D643jEmo.mjs +629 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-D643jEmo.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DTWHhNNl.mjs +71 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DTWHhNNl.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-YJUJsrIZ.mjs +115 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-YJUJsrIZ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-qH-YO6wP.mjs +118 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-qH-YO6wP.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-S0Vuy6Oc.mjs +1069 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-S0Vuy6Oc.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs +186 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs +97 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs +12 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.service-Ba73HPGG.mjs +48 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-product.service-Ba73HPGG.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-CBlN7eEn.mjs +295 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-CBlN7eEn.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-BvzFafUW.mjs +74 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-BvzFafUW.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-C3uWi8JZ.mjs +165 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-C3uWi8JZ.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-C5ELCTEw.mjs +74 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-C5ELCTEw.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ClQwnO4h.mjs +50 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ClQwnO4h.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DTUxYZ6g.mjs +66 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DTUxYZ6g.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DpCuYBlL.mjs +99 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DpCuYBlL.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DwZWxmJf.mjs +45 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-DwZWxmJf.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ydOZduls.mjs +43 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-ydOZduls.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-D3B5I9hg.mjs +406 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-D3B5I9hg.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BW-i6BHg.mjs +317 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BW-i6BHg.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-By1mYFa_.mjs +132 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-By1mYFa_.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DwcyKb4j.mjs +143 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DwcyKb4j.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-BBR8360C.mjs +100 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-BBR8360C.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CAtqPgIH.mjs +357 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CAtqPgIH.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DjMChf6s.mjs +128 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DjMChf6s.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern.mjs +2 -0
- package/fesm2022/sdcorejs-angular-modules-pattern.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs +104 -4
- package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs.map +1 -1
- package/forms/chip/src/chip.component.d.ts +135 -19
- package/forms/chip/src/index.d.ts +0 -1
- package/i18n/src/en.d.ts +42 -0
- package/modules/layout/components/index.d.ts +2 -0
- package/modules/layout/components/page/page-form-leave.guard.d.ts +9 -0
- package/modules/layout/components/page/page.component.d.ts +38 -2
- package/modules/layout/components/page-list/page-list.component.d.ts +42 -0
- package/modules/layout/components/shared/context-switcher/context-switcher.component.d.ts +1 -1
- package/modules/pattern/README.md +76 -0
- package/modules/pattern/configurations/pattern.configuration.d.ts +30 -0
- package/modules/pattern/configurations/provide-sd-patterns.d.ts +19 -0
- package/modules/pattern/core/mock-api/mock-api.interceptor.d.ts +8 -0
- package/modules/pattern/core/mock-api/mock-api.model.d.ts +62 -0
- package/modules/pattern/core/mock-api/mock-api.state.d.ts +36 -0
- package/modules/pattern/core/mock-api/mock-backend.d.ts +18 -0
- package/modules/pattern/core/mock-api/mock-backend.factory.d.ts +3 -0
- package/modules/pattern/core/mock-api/prng.d.ts +4 -0
- package/modules/pattern/core/mock-api/resources/approval.resource.d.ts +14 -0
- package/modules/pattern/core/mock-api/resources/category.resource.d.ts +9 -0
- package/modules/pattern/core/mock-api/resources/customer.resource.d.ts +22 -0
- package/modules/pattern/core/mock-api/resources/index.d.ts +3 -0
- package/modules/pattern/core/mock-api/resources/names.d.ts +5 -0
- package/modules/pattern/core/mock-api/resources/order.resource.d.ts +44 -0
- package/modules/pattern/core/mock-api/resources/partner.resource.d.ts +16 -0
- package/modules/pattern/core/mock-api/resources/product.resource.d.ts +13 -0
- package/modules/pattern/core/mock-api/resources/settings.resource.d.ts +18 -0
- package/modules/pattern/core/pattern-shell/catalog/pattern-catalog.d.ts +22 -0
- package/modules/pattern/core/pattern-shell/index/index.component.d.ts +9 -0
- package/modules/pattern/core/pattern-shell/settings/pattern-settings.store.d.ts +57 -0
- package/modules/pattern/core/pattern-shell/settings/settings-button.component.d.ts +44 -0
- package/modules/pattern/core/pattern-shell/shell/pattern-source-viewer.d.ts +8 -0
- package/modules/pattern/core/pattern-shell/shell/shell.component.d.ts +13 -0
- package/modules/pattern/core/pattern-shell/source/pattern-source.generated.d.ts +1 -0
- package/modules/pattern/core/pattern-shell/source/source-drawer.component.d.ts +27 -0
- package/modules/pattern/core/pattern-shell/toolbar/toolbar.component.d.ts +24 -0
- package/modules/pattern/core/permission/pattern-permission.d.ts +15 -0
- package/modules/pattern/core/permission/pattern-role.store.d.ts +13 -0
- package/modules/pattern/core/session-state.d.ts +4 -0
- package/modules/pattern/docs/detail.md +237 -0
- package/modules/pattern/docs/drawer.md +484 -0
- package/modules/pattern/docs/flow.md +631 -0
- package/modules/pattern/docs/form.md +518 -0
- package/modules/pattern/docs/header-actions.md +342 -0
- package/modules/pattern/docs/list.md +247 -0
- package/modules/pattern/docs/relation.md +180 -0
- package/modules/pattern/docs/select.md +206 -0
- package/modules/pattern/docs/split.md +350 -0
- package/modules/pattern/docs/states.md +168 -0
- package/modules/pattern/features/approval/entity.resolver.d.ts +4 -0
- package/modules/pattern/features/approval/entity.resolver.ts +21 -0
- package/modules/pattern/features/approval/pages/detail/detail.component.d.ts +13 -0
- package/modules/pattern/features/approval/pages/detail/detail.component.ts +139 -0
- package/modules/pattern/features/approval/pages/list/approval-inbox.d.ts +7 -0
- package/modules/pattern/features/approval/pages/list/approval-inbox.ts +7 -0
- package/modules/pattern/features/approval/pages/list/list.component.d.ts +26 -0
- package/modules/pattern/features/approval/pages/list/list.component.html +20 -0
- package/modules/pattern/features/approval/pages/list/list.component.ts +149 -0
- package/modules/pattern/features/approval/routes.d.ts +3 -0
- package/modules/pattern/features/approval/routes.ts +30 -0
- package/modules/pattern/features/approval/services/approval.model.d.ts +37 -0
- package/modules/pattern/features/approval/services/approval.model.ts +38 -0
- package/modules/pattern/features/approval/services/approval.service.d.ts +12 -0
- package/modules/pattern/features/approval/services/approval.service.ts +23 -0
- package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.d.ts +23 -0
- package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +123 -0
- package/modules/pattern/features/category/components/general-information-form/general-information-form.component.d.ts +20 -0
- package/modules/pattern/features/category/components/general-information-form/general-information-form.component.ts +61 -0
- package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.d.ts +23 -0
- package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +134 -0
- package/modules/pattern/features/category/entity.resolver.d.ts +6 -0
- package/modules/pattern/features/category/entity.resolver.ts +27 -0
- package/modules/pattern/features/category/pages/list/list.component.d.ts +17 -0
- package/modules/pattern/features/category/pages/list/list.component.html +20 -0
- package/modules/pattern/features/category/pages/list/list.component.ts +105 -0
- package/modules/pattern/features/category/routes.d.ts +3 -0
- package/modules/pattern/features/category/routes.ts +42 -0
- package/modules/pattern/features/category/services/category.model.d.ts +34 -0
- package/modules/pattern/features/category/services/category.model.ts +39 -0
- package/modules/pattern/features/category/services/category.service.d.ts +17 -0
- package/modules/pattern/features/category/services/category.service.ts +36 -0
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.d.ts +24 -0
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +131 -0
- package/modules/pattern/features/customer/components/customer-select/customer-select.component.d.ts +20 -0
- package/modules/pattern/features/customer/components/customer-select/customer-select.component.ts +72 -0
- package/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.d.ts +20 -0
- package/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.ts +30 -0
- package/modules/pattern/features/customer/components/debts-view/debts-view.component.d.ts +11 -0
- package/modules/pattern/features/customer/components/debts-view/debts-view.component.ts +28 -0
- package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.d.ts +20 -0
- package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +106 -0
- package/modules/pattern/features/customer/components/documents-view/documents-view.component.d.ts +14 -0
- package/modules/pattern/features/customer/components/documents-view/documents-view.component.ts +50 -0
- package/modules/pattern/features/customer/components/general-information-form/general-information-form.component.d.ts +33 -0
- package/modules/pattern/features/customer/components/general-information-form/general-information-form.component.ts +140 -0
- package/modules/pattern/features/customer/components/general-information-view/general-information-view.component.d.ts +9 -0
- package/modules/pattern/features/customer/components/general-information-view/general-information-view.component.ts +39 -0
- package/modules/pattern/features/customer/components/orders-view/orders-view.component.d.ts +11 -0
- package/modules/pattern/features/customer/components/orders-view/orders-view.component.ts +35 -0
- package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.d.ts +22 -0
- package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +101 -0
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.d.ts +24 -0
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +127 -0
- package/modules/pattern/features/customer/entity.resolver.d.ts +4 -0
- package/modules/pattern/features/customer/entity.resolver.ts +21 -0
- package/modules/pattern/features/customer/pages/list/list.component.d.ts +19 -0
- package/modules/pattern/features/customer/pages/list/list.component.html +22 -0
- package/modules/pattern/features/customer/pages/list/list.component.ts +113 -0
- package/modules/pattern/features/customer/pages/profile/profile.component.d.ts +31 -0
- package/modules/pattern/features/customer/pages/profile/profile.component.ts +120 -0
- package/modules/pattern/features/customer/pipes/customer-detail.pipe.d.ts +14 -0
- package/modules/pattern/features/customer/pipes/customer-detail.pipe.ts +18 -0
- package/modules/pattern/features/customer/routes.d.ts +6 -0
- package/modules/pattern/features/customer/routes.ts +59 -0
- package/modules/pattern/features/customer/services/customer.model.d.ts +77 -0
- package/modules/pattern/features/customer/services/customer.model.ts +87 -0
- package/modules/pattern/features/customer/services/customer.service.d.ts +24 -0
- package/modules/pattern/features/customer/services/customer.service.ts +79 -0
- package/modules/pattern/features/import/components/mapping-form/mapping-form.component.d.ts +21 -0
- package/modules/pattern/features/import/components/mapping-form/mapping-form.component.ts +41 -0
- package/modules/pattern/features/import/components/preview-view/preview-view.component.d.ts +10 -0
- package/modules/pattern/features/import/components/preview-view/preview-view.component.ts +44 -0
- package/modules/pattern/features/import/pages/flow/flow.component.d.ts +43 -0
- package/modules/pattern/features/import/pages/flow/flow.component.ts +269 -0
- package/modules/pattern/features/import/routes.d.ts +2 -0
- package/modules/pattern/features/import/routes.ts +19 -0
- package/modules/pattern/features/import/services/import.model.d.ts +38 -0
- package/modules/pattern/features/import/services/import.model.ts +82 -0
- package/modules/pattern/features/import/services/import.service.d.ts +15 -0
- package/modules/pattern/features/import/services/import.service.ts +18 -0
- package/modules/pattern/features/order/components/approval-steps/approval-steps.component.d.ts +9 -0
- package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +74 -0
- package/modules/pattern/features/order/components/bulk-result/bulk-result.component.d.ts +22 -0
- package/modules/pattern/features/order/components/bulk-result/bulk-result.component.ts +46 -0
- package/modules/pattern/features/order/components/general-information-form/general-information-form.component.d.ts +30 -0
- package/modules/pattern/features/order/components/general-information-form/general-information-form.component.ts +96 -0
- package/modules/pattern/features/order/components/lines-form/lines-form.component.d.ts +33 -0
- package/modules/pattern/features/order/components/lines-form/lines-form.component.ts +205 -0
- package/modules/pattern/features/order/components/lines-view/lines-view.component.d.ts +12 -0
- package/modules/pattern/features/order/components/lines-view/lines-view.component.ts +42 -0
- package/modules/pattern/features/order/components/summary-cards/summary-cards.component.d.ts +25 -0
- package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +128 -0
- package/modules/pattern/features/order/entity.resolver.d.ts +9 -0
- package/modules/pattern/features/order/entity.resolver.ts +37 -0
- package/modules/pattern/features/order/pages/create/create.component.d.ts +16 -0
- package/modules/pattern/features/order/pages/create/create.component.ts +99 -0
- package/modules/pattern/features/order/pages/detail/detail.component.d.ts +26 -0
- package/modules/pattern/features/order/pages/detail/detail.component.ts +222 -0
- package/modules/pattern/features/order/pages/list/list.component.d.ts +29 -0
- package/modules/pattern/features/order/pages/list/list.component.html +38 -0
- package/modules/pattern/features/order/pages/list/list.component.ts +291 -0
- package/modules/pattern/features/order/pages/update/update.component.d.ts +20 -0
- package/modules/pattern/features/order/pages/update/update.component.ts +119 -0
- package/modules/pattern/features/order/routes.d.ts +7 -0
- package/modules/pattern/features/order/routes.ts +54 -0
- package/modules/pattern/features/order/services/order.model.d.ts +106 -0
- package/modules/pattern/features/order/services/order.model.ts +109 -0
- package/modules/pattern/features/order/services/order.service.d.ts +25 -0
- package/modules/pattern/features/order/services/order.service.ts +63 -0
- package/modules/pattern/features/partner/pages/create/create.component.d.ts +41 -0
- package/modules/pattern/features/partner/pages/create/create.component.ts +324 -0
- package/modules/pattern/features/partner/routes.d.ts +2 -0
- package/modules/pattern/features/partner/routes.ts +20 -0
- package/modules/pattern/features/partner/services/partner.model.d.ts +30 -0
- package/modules/pattern/features/partner/services/partner.model.ts +30 -0
- package/modules/pattern/features/partner/services/partner.service.d.ts +13 -0
- package/modules/pattern/features/partner/services/partner.service.ts +17 -0
- package/modules/pattern/features/product/components/general-information-form/general-information-form.component.d.ts +23 -0
- package/modules/pattern/features/product/components/general-information-form/general-information-form.component.ts +88 -0
- package/modules/pattern/features/product/components/product-select/product-select.component.d.ts +20 -0
- package/modules/pattern/features/product/components/product-select/product-select.component.ts +65 -0
- package/modules/pattern/features/product/components/product-status-select/product-status-select.component.d.ts +22 -0
- package/modules/pattern/features/product/components/product-status-select/product-status-select.component.ts +30 -0
- package/modules/pattern/features/product/entity.resolver.d.ts +4 -0
- package/modules/pattern/features/product/entity.resolver.ts +21 -0
- package/modules/pattern/features/product/pages/create/create.component.d.ts +15 -0
- package/modules/pattern/features/product/pages/create/create.component.ts +85 -0
- package/modules/pattern/features/product/pages/detail/detail.component.d.ts +10 -0
- package/modules/pattern/features/product/pages/detail/detail.component.ts +53 -0
- package/modules/pattern/features/product/pages/list/list.component.d.ts +15 -0
- package/modules/pattern/features/product/pages/list/list.component.html +30 -0
- package/modules/pattern/features/product/pages/list/list.component.ts +71 -0
- package/modules/pattern/features/product/pages/update/update.component.d.ts +16 -0
- package/modules/pattern/features/product/pages/update/update.component.ts +86 -0
- package/modules/pattern/features/product/pipes/product-detail.pipe.d.ts +14 -0
- package/modules/pattern/features/product/pipes/product-detail.pipe.ts +18 -0
- package/modules/pattern/features/product/routes.d.ts +3 -0
- package/modules/pattern/features/product/routes.ts +48 -0
- package/modules/pattern/features/product/services/product.model.d.ts +34 -0
- package/modules/pattern/features/product/services/product.model.ts +38 -0
- package/modules/pattern/features/product/services/product.service.d.ts +17 -0
- package/modules/pattern/features/product/services/product.service.ts +48 -0
- package/modules/pattern/features/settings/pages/update/update.component.d.ts +26 -0
- package/modules/pattern/features/settings/pages/update/update.component.ts +227 -0
- package/modules/pattern/features/settings/routes.d.ts +3 -0
- package/modules/pattern/features/settings/routes.ts +24 -0
- package/modules/pattern/features/settings/services/settings.model.d.ts +17 -0
- package/modules/pattern/features/settings/services/settings.model.ts +18 -0
- package/modules/pattern/features/settings/services/settings.service.d.ts +10 -0
- package/modules/pattern/features/settings/services/settings.service.ts +15 -0
- package/modules/pattern/features/settings/settings.resolver.d.ts +4 -0
- package/modules/pattern/features/settings/settings.resolver.ts +8 -0
- package/modules/pattern/index.d.ts +3 -0
- package/modules/pattern/routes.d.ts +6 -0
- package/modules/pattern/services/base-api.service.d.ts +16 -0
- package/modules/pattern/utils/api-error.d.ts +4 -0
- package/modules/pattern/utils/focus-first-invalid.d.ts +5 -0
- package/modules/pattern/utils/form-api-errors.d.ts +16 -0
- package/modules/pattern/utils/resource-url.d.ts +2 -0
- package/package.json +13 -9
- package/services/unsaved-changes/src/unsaved-changes.adapters.d.ts +9 -0
- package/services/unsaved-changes/src/unsaved-changes.model.d.ts +2 -0
- package/forms/chip/src/pipes/index.d.ts +0 -1
- package/forms/chip/src/pipes/removable-chip.pipe.d.ts +0 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { t as provideSdGeneric, u as provideSdGenericEntity, v as sdGenericRoutes, w as validateSdGenericSchema } from './sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-
|
|
1
|
+
export { t as provideSdGeneric, u as provideSdGenericEntity, v as sdGenericRoutes, w as validateSdGenericSchema } from './sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs';
|
|
2
2
|
//# sourceMappingURL=sdcorejs-angular-modules-generic.mjs.map
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, input, booleanAttribute, effect,
|
|
2
|
+
import { inject, ElementRef, NgZone, DestroyRef, Injector, input, booleanAttribute, computed, signal, viewChild, effect, afterNextRender, isDevMode, forwardRef, ChangeDetectionStrategy, Component, InjectionToken, Injectable, Pipe, ViewContainerRef, untracked, output, isSignal, model, ChangeDetectorRef, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1$3 from '@angular/router';
|
|
6
|
-
import { Router, NavigationEnd, RouterModule, NavigationSkipped, ActivatedRoute } from '@angular/router';
|
|
6
|
+
import { RouterLink, RouterOutlet, Router, NavigationEnd, RouterModule, NavigationSkipped, ActivatedRoute } from '@angular/router';
|
|
7
7
|
import { __decorate } from 'tslib';
|
|
8
8
|
import { SdAvatar, SdTabComponent, SdButton } from '@sdcorejs/angular/components';
|
|
9
|
-
import { I18nService, I18N_STORAGE_KEY, I18N_MESSAGES
|
|
9
|
+
import { SdTranslatePipe, I18nService, I18N_STORAGE_KEY, I18N_MESSAGES } from '@sdcorejs/angular/i18n';
|
|
10
|
+
import { SdBadge } from '@sdcorejs/angular/components/badge';
|
|
11
|
+
import { SD_SECTION_REGISTRY } from '@sdcorejs/angular/components/section';
|
|
12
|
+
import { SdIcon, SD_ICON_CONFIGURATION } from '@sdcorejs/angular/modules/icon';
|
|
13
|
+
import { SdConfirmService } from '@sdcorejs/angular/services/confirm';
|
|
14
|
+
import { SdUnsavedChangesService } from '@sdcorejs/angular/services/unsaved-changes';
|
|
15
|
+
import { SD_TABLE_LAYOUT } from '@sdcorejs/angular/components/table';
|
|
10
16
|
import { SdStorageService } from '@sdcorejs/angular/services';
|
|
11
17
|
import { StringUtilities, Utilities } from '@sdcorejs/utils/fns';
|
|
12
18
|
import { SD_VIEWPORT, SdViewportService } from '@sdcorejs/angular/services/viewport';
|
|
@@ -28,28 +34,277 @@ import * as i1$2 from '@angular/cdk/a11y';
|
|
|
28
34
|
import { CdkTrapFocus, A11yModule } from '@angular/cdk/a11y';
|
|
29
35
|
import { Overlay, CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
30
36
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
31
|
-
import { SD_ICON_CONFIGURATION, SdIcon } from '@sdcorejs/angular/modules/icon';
|
|
32
37
|
import { isObservable } from 'rxjs';
|
|
33
38
|
import { SdInput } from '@sdcorejs/angular/forms';
|
|
34
39
|
|
|
40
|
+
const SD_PAGE_MAX_BADGES = 2;
|
|
41
|
+
// why: một component cho cả ba selector, mặc định khác nhau theo tên thẻ host.
|
|
42
|
+
const SD_PAGE_DEFAULT_WIDTH = {
|
|
43
|
+
'sd-page': 'full',
|
|
44
|
+
'sd-page-detail': 'wide',
|
|
45
|
+
'sd-page-form': 'medium',
|
|
46
|
+
};
|
|
35
47
|
class SdPageComponent {
|
|
36
48
|
el = inject(ElementRef);
|
|
49
|
+
#zone = inject(NgZone);
|
|
50
|
+
#destroyRef = inject(DestroyRef);
|
|
51
|
+
#injector = inject(Injector);
|
|
52
|
+
#defaultWidth = SD_PAGE_DEFAULT_WIDTH[this.el.nativeElement.tagName.toLowerCase()] ?? 'full';
|
|
37
53
|
title = input('', { alias: 'title' });
|
|
38
54
|
description = input('', { alias: 'description' });
|
|
39
55
|
noHeader = input(false, { transform: booleanAttribute, alias: 'noHeader' });
|
|
56
|
+
/** Hiện nút ← trước title; title, description và badges vẫn lấy từ input. */
|
|
57
|
+
backLink = input();
|
|
58
|
+
/** 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. */
|
|
59
|
+
badges = input();
|
|
60
|
+
/** `null` / không truyền thì lấy mặc định theo selector: `sd-page` full · `sd-page-detail` wide · `sd-page-form` medium. */
|
|
61
|
+
width = input();
|
|
62
|
+
/** 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. */
|
|
63
|
+
aside = input();
|
|
64
|
+
/** 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. */
|
|
65
|
+
toc = input(false, { transform: booleanAttribute });
|
|
66
|
+
resolvedWidth = computed(() => this.width() ?? this.#defaultWidth);
|
|
67
|
+
visibleBadges = computed(() => (this.badges() ?? []).filter(badge => badge.title !== null && badge.title !== undefined && badge.title !== ''));
|
|
68
|
+
/** 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. */
|
|
69
|
+
hasLead = computed(() => !!this.backLink() || this.visibleBadges().length > 0);
|
|
70
|
+
// why: section tự đăng ký qua SD_SECTION_REGISTRY, kể cả section nằm trong component con của thân trang (form
|
|
71
|
+
// tách theo nhóm), điều mà contentChildren không thấy được.
|
|
72
|
+
#sections = signal([]);
|
|
73
|
+
// why: section lồng được chèn vào section cha khi view của section cha render, tức sau template của sd-page,
|
|
74
|
+
// nên danh sách tính lại sau mỗi lần render chứ không tính ngay trong computed.
|
|
75
|
+
tocItems = signal([]);
|
|
76
|
+
activeTocIndex = signal(0);
|
|
77
|
+
// why: fallback của slot headerLeft chỉ render khi không có headerLeft/sdHeaderLeft, nên vắng nó nghĩa là
|
|
78
|
+
// vùng trái đã bị thay và backLink không có chỗ hiện.
|
|
79
|
+
titleBlock = viewChild('titleBlock');
|
|
80
|
+
wrapper = viewChild.required('wrapper');
|
|
40
81
|
constructor() {
|
|
41
82
|
effect(() => {
|
|
42
83
|
if (this.title()) {
|
|
43
84
|
this.el.nativeElement.removeAttribute('title');
|
|
44
85
|
}
|
|
45
86
|
});
|
|
87
|
+
effect(() => {
|
|
88
|
+
const enabled = this.toc();
|
|
89
|
+
const entries = this.#sections().map(entry => ({ title: entry.section.title(), el: entry.el }));
|
|
90
|
+
afterNextRender(() => this.tocItems.set(enabled ? this.#collectToc(entries) : []), { injector: this.#injector });
|
|
91
|
+
});
|
|
92
|
+
afterNextRender(() => {
|
|
93
|
+
const wrapper = this.wrapper().nativeElement;
|
|
94
|
+
const onScroll = () => this.#syncActiveToc();
|
|
95
|
+
// why: scroll bắn liên tục; chỉ signal đổi mới cần render lại, không cần chạy change detection mỗi lần.
|
|
96
|
+
this.#zone.runOutsideAngular(() => wrapper.addEventListener('scroll', onScroll, { passive: true }));
|
|
97
|
+
this.#destroyRef.onDestroy(() => wrapper.removeEventListener('scroll', onScroll));
|
|
98
|
+
});
|
|
99
|
+
if (isDevMode()) {
|
|
100
|
+
effect(() => {
|
|
101
|
+
const badges = this.badges() ?? [];
|
|
102
|
+
const types = badges.map(badge => badge.type ?? 'round');
|
|
103
|
+
if (badges.length > SD_PAGE_MAX_BADGES || new Set(types).size !== types.length) {
|
|
104
|
+
console.warn(`[sd-page] badges nhận tối đa ${SD_PAGE_MAX_BADGES} badge và không trùng type (mặc định 'round'): badge đầu là trạng thái, badge sau là thuộc tính. Đang có: ${JSON.stringify(types)}.`);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
effect(() => {
|
|
108
|
+
const backLink = this.backLink();
|
|
109
|
+
const noHeader = this.noHeader();
|
|
110
|
+
// why: the effect of a routed page runs before its view exists, when titleBlock is still undefined; read it
|
|
111
|
+
// after render, or every page with a backLink warns once.
|
|
112
|
+
afterNextRender(() => {
|
|
113
|
+
if (backLink && !noHeader && !this.titleBlock()) {
|
|
114
|
+
console.warn('[sd-page] backLink bị bỏ qua vì headerLeft/sdHeaderLeft đã thay cả vùng trái của header.');
|
|
115
|
+
}
|
|
116
|
+
}, { injector: this.#injector });
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/** Cuộn tới section của mục lục thứ `index`. */
|
|
121
|
+
scrollToSection(index) {
|
|
122
|
+
const item = this.tocItems()[index];
|
|
123
|
+
if (!item)
|
|
124
|
+
return;
|
|
125
|
+
this.activeTocIndex.set(index);
|
|
126
|
+
const reduceMotion = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
127
|
+
item.el.scrollIntoView({ block: 'start', behavior: reduceMotion ? 'auto' : 'smooth' });
|
|
128
|
+
}
|
|
129
|
+
/** 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`). */
|
|
130
|
+
register(section, el) {
|
|
131
|
+
this.#sections.update(entries => [...entries, { section, el }]);
|
|
132
|
+
return () => this.#sections.update(entries => entries.filter(entry => entry.section !== section));
|
|
133
|
+
}
|
|
134
|
+
#collectToc(entries) {
|
|
135
|
+
const content = this.el.nativeElement.querySelector(':scope > .c-page-wrapper > .c-page-content');
|
|
136
|
+
return entries
|
|
137
|
+
.filter((entry) => !!entry.title && !!content?.contains(entry.el))
|
|
138
|
+
.sort((left, right) => (left.el.compareDocumentPosition(right.el) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1));
|
|
139
|
+
}
|
|
140
|
+
#syncActiveToc() {
|
|
141
|
+
const items = this.tocItems();
|
|
142
|
+
if (!items.length)
|
|
143
|
+
return;
|
|
144
|
+
const wrapper = this.wrapper().nativeElement;
|
|
145
|
+
// why: cuộn tới đáy thì section cuối có thể không bao giờ chạm mép trên; khi đó nó là section đang đọc.
|
|
146
|
+
if (wrapper.scrollTop + wrapper.clientHeight >= wrapper.scrollHeight - 1) {
|
|
147
|
+
this.activeTocIndex.set(items.length - 1);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const top = wrapper.getBoundingClientRect().top;
|
|
151
|
+
let active = 0;
|
|
152
|
+
items.forEach((item, index) => {
|
|
153
|
+
if (item.el.getBoundingClientRect().top - top <= 8)
|
|
154
|
+
active = index;
|
|
155
|
+
});
|
|
156
|
+
this.activeTocIndex.set(active);
|
|
46
157
|
}
|
|
47
158
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdPageComponent, isStandalone: true, selector: "sd-page", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, noHeader: { classPropertyName: "noHeader", publicName: "noHeader", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (!noHeader()) {\n <
|
|
159
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdPageComponent, isStandalone: true, selector: "sd-page, sd-page-detail, sd-page-form", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, noHeader: { classPropertyName: "noHeader", publicName: "noHeader", isSignal: true, isRequired: false, transformFunction: null }, backLink: { classPropertyName: "backLink", publicName: "backLink", isSignal: true, isRequired: false, transformFunction: null }, badges: { classPropertyName: "badges", publicName: "badges", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, aside: { classPropertyName: "aside", publicName: "aside", isSignal: true, isRequired: false, transformFunction: null }, toc: { classPropertyName: "toc", publicName: "toc", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sd-page--wide": "resolvedWidth() === 'wide'", "class.sd-page--medium": "resolvedWidth() === 'medium'", "class.sd-page--narrow": "resolvedWidth() === 'narrow'", "class.sd-page--aside-start": "aside() === 'start'" } }, providers: [{ provide: SD_SECTION_REGISTRY, useExisting: forwardRef(() => SdPageComponent) }], viewQueries: [{ propertyName: "titleBlock", first: true, predicate: ["titleBlock"], descendants: true, isSignal: true }, { propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _backLink = backLink();\n@let _badges = visibleBadges();\n@let _hasLead = hasLead();\n@if (!noHeader()) {\n <header class=\"c-page-header bg-white\">\n <div class=\"p-16 d-flex align-items-center w-full justify-content-between\">\n <div class=\"d-flex\" [class.c-page-lead]=\"_hasLead\">\n <ng-content select=\"[headerLeft],[sdHeaderLeft]\">\n @if (_backLink) {\n <a class=\"c-page-back\" [routerLink]=\"_backLink\" [attr.aria-label]=\"'core.common.back' | sdTranslate\">\n <sd-icon name=\"arrow_back\"></sd-icon>\n </a>\n }\n <div #titleBlock class=\"d-flex flex-column\" [class.c-page-title-block]=\"_hasLead\">\n @if (_badges.length) {\n <div class=\"c-page-title-row\">\n <h1 class=\"T20M c-page-title\">{{ title() }}</h1>\n @for (badge of _badges; track $index) {\n <sd-badge\n size=\"md\"\n [type]=\"badge.type ?? 'round'\"\n [color]=\"badge.color\"\n [icon]=\"badge.icon\"\n [title]=\"badge.title\"\n [label]=\"badge.label\"\n [tooltip]=\"badge.tooltip\"></sd-badge>\n }\n </div>\n } @else {\n <h1 class=\"T20M\" [class.c-page-title]=\"_hasLead\">{{ title() }}</h1>\n }\n @if (description()) {\n <div class=\"T14R text-secondary mt-4\">{{ description() }}</div>\n }\n </div>\n </ng-content>\n </div>\n <ng-content select=\"[headerRight],[sdHeaderRight]\"></ng-content>\n </div>\n <ng-content select=\"[sdSubheader]\"></ng-content>\n </header>\n}\n\n<!-- why: px-0 l\u00E0 utility !important; c\u1ED9t c\u00F3 gi\u1EDBi h\u1EA1n b\u1EC1 r\u1ED9ng c\u1EA7n padding ri\u00EAng n\u00EAn b\u1ECF n\u00F3 \u0111i. -->\n<div #wrapper class=\"c-page-wrapper\" [class.px-0]=\"resolvedWidth() === 'full'\">\n <div class=\"c-page-content\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"[sdAside]\"></ng-content>\n @let _tocItems = tocItems();\n @if (_tocItems.length) {\n @let _activeToc = activeTocIndex();\n <nav class=\"c-page-toc\" [attr.aria-label]=\"'core.module.layout.page.toc' | sdTranslate\">\n @for (item of _tocItems; track item.el; let index = $index) {\n <button\n type=\"button\"\n class=\"c-page-toc-item\"\n [class.active]=\"index === _activeToc\"\n [attr.aria-current]=\"index === _activeToc ? 'true' : null\"\n (click)=\"scrollToSection(index)\">\n {{ item.title }}\n </button>\n }\n </nav>\n }\n</div>\n\n<!-- why: footer ch\u1EC9 c\u00F3 hai slot chi\u1EBFu th\u1EB3ng v\u00E0o, kh\u00F4ng c\u00F3 wrapper, n\u00EAn CSS :empty \u1EA9n n\u00F3 khi m\u00E0n kh\u00F4ng d\u00F9ng footer. -->\n<footer class=\"c-page-footer\" role=\"group\" [attr.aria-label]=\"'core.module.layout.page.actions' | sdTranslate\">\n <ng-content select=\"[sdFooterLeft]\"></ng-content>\n <ng-content select=\"[sdFooterRight]\"></ng-content>\n</footer>\n", styles: [":host{height:100%;display:flex;flex-direction:column;background-color:var(--sd-page-bg, #f9f9f9)}:host(.sd-page--wide){--sd-page-column-max: 1200px}:host(.sd-page--medium){--sd-page-column-max: 960px}:host(.sd-page--narrow){--sd-page-column-max: 720px}.c-page-header{box-shadow:0 1px 2px 0 var(--sd-page-shadow, rgba(47, 49, 54, .1019607843));z-index:1;position:relative}.c-page-header h1{margin:0}.c-page-lead{align-items:center;gap:12px;min-width:0}.c-page-title-block{min-width:0}.c-page-title-row{display:flex;align-items:center;gap:8px;min-width:0}.c-page-title-row sd-badge{flex:none}.c-page-title{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.c-page-back{flex:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;color:var(--sd-page-back-fg, #44474e);text-decoration:none}.c-page-back:hover{background-color:var(--sd-page-back-hover-bg, #eceef2)}.c-page-back:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.c-page-header ::ng-deep>[sdSubheader]{display:block;border-top:1px solid var(--sd-page-divider, #eceef2)}:host(.sd-page--wide)>.c-page-wrapper,:host(.sd-page--medium)>.c-page-wrapper,:host(.sd-page--narrow)>.c-page-wrapper{padding:16px max(24px,(100% - var(--sd-page-column-max)) / 2 + 24px)}:host(.sd-page--wide)>.c-page-header ::ng-deep>[sdSubheader],:host(.sd-page--medium)>.c-page-header ::ng-deep>[sdSubheader],:host(.sd-page--narrow)>.c-page-header ::ng-deep>[sdSubheader]{padding-inline:max(24px,(100% - var(--sd-page-column-max)) / 2 + 24px)}:host(.sd-page--wide)>.c-page-footer,:host(.sd-page--medium)>.c-page-footer,:host(.sd-page--narrow)>.c-page-footer{padding-inline:max(24px,(100% - var(--sd-page-column-max)) / 2 + 24px)}.c-page-wrapper{flex:1;display:flex;flex-direction:row;width:100%;overflow-y:auto;max-height:100vh;box-sizing:border-box}.c-page-wrapper .c-page-content{flex:1;height:100%;width:100%}.c-page-wrapper .c-page-right{position:-webkit-sticky;position:sticky;top:0;height:100%;overflow-y:auto}:host ::ng-deep>.c-page-wrapper:has(>[sdAside]),:host ::ng-deep>.c-page-wrapper:has(>.c-page-toc){gap:16px}:host ::ng-deep>.c-page-wrapper:has(>[sdAside])>.c-page-content,:host ::ng-deep>.c-page-wrapper:has(>.c-page-toc)>.c-page-content{min-width:0}.c-page-wrapper ::ng-deep>[sdAside],.c-page-wrapper>.c-page-toc{flex:0 0 320px;width:320px;box-sizing:border-box;align-self:flex-start;position:sticky;top:0;max-height:100%;overflow-y:auto}@media(min-width:1200px){:host(.sd-page--aside-start) ::ng-deep>.c-page-wrapper>[sdAside],:host(.sd-page--aside-start)>.c-page-wrapper>.c-page-toc{order:-1}}.c-page-toc{display:flex;flex-direction:column}.c-page-toc-item{padding:8px 24px;border:0;border-left:2px solid var(--sd-secondary-light);background:transparent;color:var(--sd-text);font:inherit;text-align:left;cursor:pointer}.c-page-toc-item.active{border-left-color:var(--sd-primary);color:var(--sd-primary);font-weight:var(--sd-font-weight-bold, 700)}.c-page-toc-item:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}@media(max-width:1199.98px){.c-page-wrapper>.c-page-toc{display:none}:host ::ng-deep>.c-page-wrapper:has(>[sdAside]){flex-direction:column}:host ::ng-deep>.c-page-wrapper:has(>[sdAside])>.c-page-content{flex:none;height:auto}.c-page-wrapper ::ng-deep>[sdAside]{flex:none;width:auto;align-self:stretch;position:static;max-height:none;overflow-y:visible}}.c-page-footer{flex:none;display:flex;align-items:center;gap:8px;padding:12px 16px;border-top:1px solid var(--sd-page-divider, #eceef2);background-color:var(--sd-surface, #ffffff)}.c-page-footer:empty{display:none}.c-page-footer ::ng-deep>[sdFooterRight]{margin-left:auto}.c-page-footer ::ng-deep>[sdFooterRight]~[sdFooterRight]{margin-left:0}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "label", "description", "tooltip", "icon", "size", "pulse"], outputs: ["click"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
160
|
}
|
|
50
161
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdPageComponent, decorators: [{
|
|
51
162
|
type: Component,
|
|
52
|
-
args: [{ selector: 'sd-page
|
|
163
|
+
args: [{ selector: 'sd-page, sd-page-detail, sd-page-form', changeDetection: ChangeDetectionStrategy.OnPush, imports: [RouterLink, SdBadge, SdIcon, SdTranslatePipe], host: {
|
|
164
|
+
'[class.sd-page--wide]': "resolvedWidth() === 'wide'",
|
|
165
|
+
'[class.sd-page--medium]': "resolvedWidth() === 'medium'",
|
|
166
|
+
'[class.sd-page--narrow]': "resolvedWidth() === 'narrow'",
|
|
167
|
+
'[class.sd-page--aside-start]': "aside() === 'start'",
|
|
168
|
+
}, providers: [{ provide: SD_SECTION_REGISTRY, useExisting: forwardRef(() => SdPageComponent) }], template: "@let _backLink = backLink();\n@let _badges = visibleBadges();\n@let _hasLead = hasLead();\n@if (!noHeader()) {\n <header class=\"c-page-header bg-white\">\n <div class=\"p-16 d-flex align-items-center w-full justify-content-between\">\n <div class=\"d-flex\" [class.c-page-lead]=\"_hasLead\">\n <ng-content select=\"[headerLeft],[sdHeaderLeft]\">\n @if (_backLink) {\n <a class=\"c-page-back\" [routerLink]=\"_backLink\" [attr.aria-label]=\"'core.common.back' | sdTranslate\">\n <sd-icon name=\"arrow_back\"></sd-icon>\n </a>\n }\n <div #titleBlock class=\"d-flex flex-column\" [class.c-page-title-block]=\"_hasLead\">\n @if (_badges.length) {\n <div class=\"c-page-title-row\">\n <h1 class=\"T20M c-page-title\">{{ title() }}</h1>\n @for (badge of _badges; track $index) {\n <sd-badge\n size=\"md\"\n [type]=\"badge.type ?? 'round'\"\n [color]=\"badge.color\"\n [icon]=\"badge.icon\"\n [title]=\"badge.title\"\n [label]=\"badge.label\"\n [tooltip]=\"badge.tooltip\"></sd-badge>\n }\n </div>\n } @else {\n <h1 class=\"T20M\" [class.c-page-title]=\"_hasLead\">{{ title() }}</h1>\n }\n @if (description()) {\n <div class=\"T14R text-secondary mt-4\">{{ description() }}</div>\n }\n </div>\n </ng-content>\n </div>\n <ng-content select=\"[headerRight],[sdHeaderRight]\"></ng-content>\n </div>\n <ng-content select=\"[sdSubheader]\"></ng-content>\n </header>\n}\n\n<!-- why: px-0 l\u00E0 utility !important; c\u1ED9t c\u00F3 gi\u1EDBi h\u1EA1n b\u1EC1 r\u1ED9ng c\u1EA7n padding ri\u00EAng n\u00EAn b\u1ECF n\u00F3 \u0111i. -->\n<div #wrapper class=\"c-page-wrapper\" [class.px-0]=\"resolvedWidth() === 'full'\">\n <div class=\"c-page-content\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"[sdAside]\"></ng-content>\n @let _tocItems = tocItems();\n @if (_tocItems.length) {\n @let _activeToc = activeTocIndex();\n <nav class=\"c-page-toc\" [attr.aria-label]=\"'core.module.layout.page.toc' | sdTranslate\">\n @for (item of _tocItems; track item.el; let index = $index) {\n <button\n type=\"button\"\n class=\"c-page-toc-item\"\n [class.active]=\"index === _activeToc\"\n [attr.aria-current]=\"index === _activeToc ? 'true' : null\"\n (click)=\"scrollToSection(index)\">\n {{ item.title }}\n </button>\n }\n </nav>\n }\n</div>\n\n<!-- why: footer ch\u1EC9 c\u00F3 hai slot chi\u1EBFu th\u1EB3ng v\u00E0o, kh\u00F4ng c\u00F3 wrapper, n\u00EAn CSS :empty \u1EA9n n\u00F3 khi m\u00E0n kh\u00F4ng d\u00F9ng footer. -->\n<footer class=\"c-page-footer\" role=\"group\" [attr.aria-label]=\"'core.module.layout.page.actions' | sdTranslate\">\n <ng-content select=\"[sdFooterLeft]\"></ng-content>\n <ng-content select=\"[sdFooterRight]\"></ng-content>\n</footer>\n", styles: [":host{height:100%;display:flex;flex-direction:column;background-color:var(--sd-page-bg, #f9f9f9)}:host(.sd-page--wide){--sd-page-column-max: 1200px}:host(.sd-page--medium){--sd-page-column-max: 960px}:host(.sd-page--narrow){--sd-page-column-max: 720px}.c-page-header{box-shadow:0 1px 2px 0 var(--sd-page-shadow, rgba(47, 49, 54, .1019607843));z-index:1;position:relative}.c-page-header h1{margin:0}.c-page-lead{align-items:center;gap:12px;min-width:0}.c-page-title-block{min-width:0}.c-page-title-row{display:flex;align-items:center;gap:8px;min-width:0}.c-page-title-row sd-badge{flex:none}.c-page-title{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.c-page-back{flex:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;color:var(--sd-page-back-fg, #44474e);text-decoration:none}.c-page-back:hover{background-color:var(--sd-page-back-hover-bg, #eceef2)}.c-page-back:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.c-page-header ::ng-deep>[sdSubheader]{display:block;border-top:1px solid var(--sd-page-divider, #eceef2)}:host(.sd-page--wide)>.c-page-wrapper,:host(.sd-page--medium)>.c-page-wrapper,:host(.sd-page--narrow)>.c-page-wrapper{padding:16px max(24px,(100% - var(--sd-page-column-max)) / 2 + 24px)}:host(.sd-page--wide)>.c-page-header ::ng-deep>[sdSubheader],:host(.sd-page--medium)>.c-page-header ::ng-deep>[sdSubheader],:host(.sd-page--narrow)>.c-page-header ::ng-deep>[sdSubheader]{padding-inline:max(24px,(100% - var(--sd-page-column-max)) / 2 + 24px)}:host(.sd-page--wide)>.c-page-footer,:host(.sd-page--medium)>.c-page-footer,:host(.sd-page--narrow)>.c-page-footer{padding-inline:max(24px,(100% - var(--sd-page-column-max)) / 2 + 24px)}.c-page-wrapper{flex:1;display:flex;flex-direction:row;width:100%;overflow-y:auto;max-height:100vh;box-sizing:border-box}.c-page-wrapper .c-page-content{flex:1;height:100%;width:100%}.c-page-wrapper .c-page-right{position:-webkit-sticky;position:sticky;top:0;height:100%;overflow-y:auto}:host ::ng-deep>.c-page-wrapper:has(>[sdAside]),:host ::ng-deep>.c-page-wrapper:has(>.c-page-toc){gap:16px}:host ::ng-deep>.c-page-wrapper:has(>[sdAside])>.c-page-content,:host ::ng-deep>.c-page-wrapper:has(>.c-page-toc)>.c-page-content{min-width:0}.c-page-wrapper ::ng-deep>[sdAside],.c-page-wrapper>.c-page-toc{flex:0 0 320px;width:320px;box-sizing:border-box;align-self:flex-start;position:sticky;top:0;max-height:100%;overflow-y:auto}@media(min-width:1200px){:host(.sd-page--aside-start) ::ng-deep>.c-page-wrapper>[sdAside],:host(.sd-page--aside-start)>.c-page-wrapper>.c-page-toc{order:-1}}.c-page-toc{display:flex;flex-direction:column}.c-page-toc-item{padding:8px 24px;border:0;border-left:2px solid var(--sd-secondary-light);background:transparent;color:var(--sd-text);font:inherit;text-align:left;cursor:pointer}.c-page-toc-item.active{border-left-color:var(--sd-primary);color:var(--sd-primary);font-weight:var(--sd-font-weight-bold, 700)}.c-page-toc-item:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}@media(max-width:1199.98px){.c-page-wrapper>.c-page-toc{display:none}:host ::ng-deep>.c-page-wrapper:has(>[sdAside]){flex-direction:column}:host ::ng-deep>.c-page-wrapper:has(>[sdAside])>.c-page-content{flex:none;height:auto}.c-page-wrapper ::ng-deep>[sdAside]{flex:none;width:auto;align-self:stretch;position:static;max-height:none;overflow-y:visible}}.c-page-footer{flex:none;display:flex;align-items:center;gap:8px;padding:12px 16px;border-top:1px solid var(--sd-page-divider, #eceef2);background-color:var(--sd-surface, #ffffff)}.c-page-footer:empty{display:none}.c-page-footer ::ng-deep>[sdFooterRight]{margin-left:auto}.c-page-footer ::ng-deep>[sdFooterRight]~[sdFooterRight]{margin-left:0}\n"] }]
|
|
169
|
+
}], ctorParameters: () => [] });
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* 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ý
|
|
173
|
+
* bằng `registerSdUnsavedChangesForm(..., { dirty: 'value' })`) thì hỏi bằng dialog xác nhận của Core.
|
|
174
|
+
*
|
|
175
|
+
* 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
|
|
176
|
+
* này nên app đang dùng `sdUnsavedChangesGuard` không đổi hành vi.
|
|
177
|
+
*/
|
|
178
|
+
const sdPageFormLeaveGuard = () => {
|
|
179
|
+
const confirmService = inject(SdConfirmService);
|
|
180
|
+
const i18n = inject(I18nService);
|
|
181
|
+
const adapter = {
|
|
182
|
+
confirm: async (context) => {
|
|
183
|
+
const message = context.watchers.find(watcher => watcher.message)?.message ?? i18n.t('core.module.layout.page.leave.message');
|
|
184
|
+
try {
|
|
185
|
+
await confirmService.confirm(message, {
|
|
186
|
+
title: i18n.t('core.module.layout.page.leave.title'),
|
|
187
|
+
yesTitle: i18n.t('core.module.layout.page.leave.leave'),
|
|
188
|
+
noTitle: i18n.t('core.module.layout.page.leave.stay'),
|
|
189
|
+
yesButtonColor: 'warning',
|
|
190
|
+
});
|
|
191
|
+
return 'discard';
|
|
192
|
+
}
|
|
193
|
+
catch {
|
|
194
|
+
return 'cancel';
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
};
|
|
198
|
+
return inject(SdUnsavedChangesService).confirmLeave({ reason: 'navigation', adapter });
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
const SD_PAGE_LIST = new InjectionToken('SD_PAGE_LIST');
|
|
202
|
+
const SHORT_VIEWPORT = '(max-height: 719px)';
|
|
203
|
+
class SdPageList {
|
|
204
|
+
#host = inject(ElementRef).nativeElement;
|
|
205
|
+
#injector = inject(Injector);
|
|
206
|
+
#destroyRef = inject(DestroyRef);
|
|
207
|
+
title = input('');
|
|
208
|
+
description = input('');
|
|
209
|
+
backLink = input();
|
|
210
|
+
badges = input();
|
|
211
|
+
width = input();
|
|
212
|
+
/** Chi tiết là route con: `page` thay danh sách bằng trang con, `drawer` giữ danh sách và mở drawer. */
|
|
213
|
+
detail = input('page');
|
|
214
|
+
/** 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ỗ. */
|
|
215
|
+
autoCompact = input(true, { transform: booleanAttribute });
|
|
216
|
+
#shortViewport = signal(false);
|
|
217
|
+
compact = computed(() => this.autoCompact() && this.#shortViewport());
|
|
218
|
+
childActive = signal(false);
|
|
219
|
+
/** Bảng chính: `[sdPageListMain]`, hoặc `sd-table` con trực tiếp cuối cùng của thân trang. */
|
|
220
|
+
fillTarget = signal(null);
|
|
221
|
+
externalFilterCollapsed = this.compact;
|
|
222
|
+
hidesList = computed(() => this.childActive() && this.detail() === 'page');
|
|
223
|
+
#savedScroll = [];
|
|
224
|
+
#returnFocus = null;
|
|
225
|
+
constructor() {
|
|
226
|
+
const media = typeof matchMedia === 'function' ? matchMedia(SHORT_VIEWPORT) : null;
|
|
227
|
+
if (media) {
|
|
228
|
+
this.#shortViewport.set(media.matches);
|
|
229
|
+
const onChange = (event) => this.#shortViewport.set(event.matches);
|
|
230
|
+
media.addEventListener('change', onChange);
|
|
231
|
+
this.#destroyRef.onDestroy(() => media.removeEventListener('change', onChange));
|
|
232
|
+
}
|
|
233
|
+
afterNextRender(() => {
|
|
234
|
+
const content = this.#content();
|
|
235
|
+
if (!content)
|
|
236
|
+
return;
|
|
237
|
+
this.#syncMain(content);
|
|
238
|
+
// why: bảng có thể nằm trong @if của feature; nội dung đổi thì chọn lại bảng chính.
|
|
239
|
+
const observer = new MutationObserver(() => this.#syncMain(content));
|
|
240
|
+
observer.observe(content, { childList: true });
|
|
241
|
+
this.#destroyRef.onDestroy(() => observer.disconnect());
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
onActivate() {
|
|
245
|
+
const active = document.activeElement;
|
|
246
|
+
const list = this.#list();
|
|
247
|
+
// why: một route con thay route con khác (chi tiết → cập nhật) thì phần tử đang focus nằm trong route con cũ;
|
|
248
|
+
// giữ phần tử của danh sách đã mở route con đầu tiên, và vị trí cuộn ghi lúc danh sách còn hiện.
|
|
249
|
+
const opener = active instanceof HTMLElement && list?.contains(active) ? active : null;
|
|
250
|
+
this.#returnFocus = opener ?? this.#returnFocus;
|
|
251
|
+
// why: display:none làm mất vị trí cuộn; ghi lại trước khi ẩn danh sách để trả về khi quay lại.
|
|
252
|
+
const scroll = this.detail() === 'page' && list ? this.#captureScroll(list) : [];
|
|
253
|
+
this.#savedScroll = scroll.length ? scroll : this.#savedScroll;
|
|
254
|
+
this.childActive.set(true);
|
|
255
|
+
}
|
|
256
|
+
onDeactivate() {
|
|
257
|
+
this.childActive.set(false);
|
|
258
|
+
afterNextRender(() => {
|
|
259
|
+
// Route con khác đã mở ngay sau (đổi route con): danh sách vẫn ẩn, giữ focus và vị trí cuộn cho lúc quay về.
|
|
260
|
+
if (this.childActive())
|
|
261
|
+
return;
|
|
262
|
+
for (const saved of this.#savedScroll) {
|
|
263
|
+
saved.el.scrollTop = saved.top;
|
|
264
|
+
saved.el.scrollLeft = saved.left;
|
|
265
|
+
}
|
|
266
|
+
this.#savedScroll = [];
|
|
267
|
+
if (this.#returnFocus?.isConnected)
|
|
268
|
+
this.#returnFocus.focus();
|
|
269
|
+
this.#returnFocus = null;
|
|
270
|
+
}, { injector: this.#injector });
|
|
271
|
+
}
|
|
272
|
+
#list() {
|
|
273
|
+
return this.#host.querySelector(':scope > sd-page');
|
|
274
|
+
}
|
|
275
|
+
#content() {
|
|
276
|
+
return this.#host.querySelector(':scope > sd-page > .c-page-wrapper > .c-page-content');
|
|
277
|
+
}
|
|
278
|
+
#syncMain(content) {
|
|
279
|
+
const children = [...content.children];
|
|
280
|
+
const marked = children.filter(child => child.hasAttribute('sdPageListMain'));
|
|
281
|
+
if (isDevMode() && marked.length > 1) {
|
|
282
|
+
console.warn('[sd-page-list] Chỉ một phần tử được gắn sdPageListMain; dùng phần tử đầu tiên.');
|
|
283
|
+
}
|
|
284
|
+
const main = marked[0] ?? children.filter(child => child.tagName === 'SD-TABLE').at(-1) ?? null;
|
|
285
|
+
if (main !== this.fillTarget())
|
|
286
|
+
this.fillTarget.set(main);
|
|
287
|
+
}
|
|
288
|
+
#captureScroll(root) {
|
|
289
|
+
const saved = [];
|
|
290
|
+
for (const el of [root, ...root.querySelectorAll('*')]) {
|
|
291
|
+
if (el.scrollTop || el.scrollLeft)
|
|
292
|
+
saved.push({ el, top: el.scrollTop, left: el.scrollLeft });
|
|
293
|
+
}
|
|
294
|
+
return saved;
|
|
295
|
+
}
|
|
296
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdPageList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
297
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdPageList, isStandalone: true, selector: "sd-page-list", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, backLink: { classPropertyName: "backLink", publicName: "backLink", isSignal: true, isRequired: false, transformFunction: null }, badges: { classPropertyName: "badges", publicName: "badges", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, detail: { classPropertyName: "detail", publicName: "detail", isSignal: true, isRequired: false, transformFunction: null }, autoCompact: { classPropertyName: "autoCompact", publicName: "autoCompact", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sd-page-list--child-page": "hidesList()" } }, providers: [
|
|
298
|
+
{ provide: SD_PAGE_LIST, useExisting: forwardRef(() => SdPageList) },
|
|
299
|
+
{ provide: SD_TABLE_LAYOUT, useExisting: forwardRef(() => SdPageList) },
|
|
300
|
+
], ngImport: i0, template: "<sd-page\n [title]=\"title()\"\n [description]=\"description()\"\n [backLink]=\"backLink()\"\n [badges]=\"badges()\"\n [width]=\"width()\"\n [style.display]=\"hidesList() ? 'none' : null\">\n <!-- why: chuy\u1EC3n ti\u1EBFp slot c\u1EE7a sd-page. Kh\u00F4ng chuy\u1EC3n ti\u1EBFp headerLeft: ng-container r\u1ED7ng v\u1EABn chi\u1EBFm slot v\u00E0 l\u00E0m m\u1EA5t\n title m\u1EB7c \u0111\u1ECBnh c\u1EE7a sd-page. -->\n <ng-container ngProjectAs=\"[sdHeaderRight]\"><ng-content select=\"[headerRight],[sdHeaderRight]\"></ng-content></ng-container>\n <ng-container ngProjectAs=\"[sdSubheader]\"><ng-content select=\"[sdSubheader]\"></ng-content></ng-container>\n <ng-container ngProjectAs=\"[sdFooterLeft]\"><ng-content select=\"[sdFooterLeft]\"></ng-content></ng-container>\n <ng-container ngProjectAs=\"[sdFooterRight]\"><ng-content select=\"[sdFooterRight]\"></ng-content></ng-container>\n <ng-content></ng-content>\n</sd-page>\n@if (detail() !== 'none') {\n <router-outlet (activate)=\"onActivate()\" (deactivate)=\"onDeactivate()\"></router-outlet>\n}\n", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:0}:host>sd-page{flex:1 1 0;min-height:0;height:auto}:host ::ng-deep>sd-page>.c-page-wrapper{padding:16px!important}:host ::ng-deep>sd-page>.c-page-wrapper>.c-page-content{display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0}:host ::ng-deep>sd-page>.c-page-wrapper>.c-page-content>[sdPageListMain]{display:flex;flex-direction:column;flex:1 1 0;min-width:0}:host(.sd-page-list--child-page) ::ng-deep>router-outlet~*{display:flex;flex-direction:column;flex:1 1 0;min-height:0}\n"], dependencies: [{ kind: "component", type: SdPageComponent, selector: "sd-page, sd-page-detail, sd-page-form", inputs: ["title", "description", "noHeader", "backLink", "badges", "width", "aside", "toc"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
301
|
+
}
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdPageList, decorators: [{
|
|
303
|
+
type: Component,
|
|
304
|
+
args: [{ selector: 'sd-page-list', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdPageComponent, RouterOutlet], host: { '[class.sd-page-list--child-page]': 'hidesList()' }, providers: [
|
|
305
|
+
{ provide: SD_PAGE_LIST, useExisting: forwardRef(() => SdPageList) },
|
|
306
|
+
{ provide: SD_TABLE_LAYOUT, useExisting: forwardRef(() => SdPageList) },
|
|
307
|
+
], template: "<sd-page\n [title]=\"title()\"\n [description]=\"description()\"\n [backLink]=\"backLink()\"\n [badges]=\"badges()\"\n [width]=\"width()\"\n [style.display]=\"hidesList() ? 'none' : null\">\n <!-- why: chuy\u1EC3n ti\u1EBFp slot c\u1EE7a sd-page. Kh\u00F4ng chuy\u1EC3n ti\u1EBFp headerLeft: ng-container r\u1ED7ng v\u1EABn chi\u1EBFm slot v\u00E0 l\u00E0m m\u1EA5t\n title m\u1EB7c \u0111\u1ECBnh c\u1EE7a sd-page. -->\n <ng-container ngProjectAs=\"[sdHeaderRight]\"><ng-content select=\"[headerRight],[sdHeaderRight]\"></ng-content></ng-container>\n <ng-container ngProjectAs=\"[sdSubheader]\"><ng-content select=\"[sdSubheader]\"></ng-content></ng-container>\n <ng-container ngProjectAs=\"[sdFooterLeft]\"><ng-content select=\"[sdFooterLeft]\"></ng-content></ng-container>\n <ng-container ngProjectAs=\"[sdFooterRight]\"><ng-content select=\"[sdFooterRight]\"></ng-content></ng-container>\n <ng-content></ng-content>\n</sd-page>\n@if (detail() !== 'none') {\n <router-outlet (activate)=\"onActivate()\" (deactivate)=\"onDeactivate()\"></router-outlet>\n}\n", styles: [":host{display:flex;flex-direction:column;height:100%;min-height:0}:host>sd-page{flex:1 1 0;min-height:0;height:auto}:host ::ng-deep>sd-page>.c-page-wrapper{padding:16px!important}:host ::ng-deep>sd-page>.c-page-wrapper>.c-page-content{display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0}:host ::ng-deep>sd-page>.c-page-wrapper>.c-page-content>[sdPageListMain]{display:flex;flex-direction:column;flex:1 1 0;min-width:0}:host(.sd-page-list--child-page) ::ng-deep>router-outlet~*{display:flex;flex-direction:column;flex:1 1 0;min-height:0}\n"] }]
|
|
53
308
|
}], ctorParameters: () => [] });
|
|
54
309
|
|
|
55
310
|
function getMenuStableKey(menu, ancestors = []) {
|
|
@@ -4344,7 +4599,7 @@ let HomePageComponent = class HomePageComponent {
|
|
|
4344
4599
|
return `${formatted} (${this.#getTimezone()})`;
|
|
4345
4600
|
}
|
|
4346
4601
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: HomePageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4347
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: HomePageComponent, isStandalone: true, selector: "app-home-page", ngImport: i0, template: "@let _userInfo = userInfo();\n<sd-page>\n <div class=\"d-flex flex-column\" headerLeft>\n <div class=\"font-weight-medium fs-20\">\n {{ 'core.module.layout.greeting.hello' | sdTranslate: { name: _userInfo?.fullName ?? _userInfo?.email ?? _userInfo?.username ?? '' } }}\n </div>\n <span class=\"T12R text-secondary\">{{ todayInfo() }}</span>\n </div>\n\n <div class=\"wrapper\">\n <div class=\"bento\">\n <!-- Hero -->\n <div class=\"card hero-card\">\n <div class=\"hero-ring ring-3\"></div>\n <div class=\"hero-ring ring-2\"></div>\n <div class=\"hero-ring ring-1\"></div>\n <div class=\"hero-core\">\n <sd-icon class=\"hero-icon\" name=\"space_dashboard\"></sd-icon>\n </div>\n <div class=\"hero-decoration\">\n <span class=\"dot d1\"></span>\n <span class=\"dot d2\"></span>\n <span class=\"dot d3\"></span>\n </div>\n </div>\n\n <!-- Features -->\n @for (feature of features; track feature.key; let i = $index) {\n <div\n class=\"card feature-card\"\n [class.feature-wide]=\"feature.area === 'audit' || feature.area === 'integ'\"\n [style.gridArea]=\"feature.area\"\n [style.animation-delay.ms]=\"(i + 1) * 80\"\n >\n <div class=\"feature-accent\"></div>\n <div class=\"feature-content\">\n <div class=\"feature-icon-wrap\">\n <sd-icon class=\"feature-icon\" [name]=\"feature.icon\"></sd-icon>\n </div>\n <span class=\"feature-label\">{{ feature.key | sdTranslate }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n</sd-page>\n", styles: [":host{display:contents}.wrapper{display:flex;align-items:center;justify-content:center;padding:32px 24px;height:100%;width:100%;background:radial-gradient(circle at 15% 25%,color-mix(in srgb,var(--sd-primary, #005cbb) 14%,transparent),transparent 55%),radial-gradient(circle at 85% 75%,color-mix(in srgb,var(--sd-primary, #005cbb) 10%,transparent),transparent 55%),linear-gradient(135deg,var(--sd-home-page-gradient-start, #fafbfc) 0%,var(--sd-home-page-gradient-end, #f4f6fa) 100%);overflow:auto}.bento{display:grid;width:100%;max-width:1080px;gap:16px;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(3,minmax(140px,1fr));grid-template-areas:\"hero hero data report\" \"hero hero users flow\" \"audit audit integ integ\"}.card{position:relative;background:var(--sd-home-page-card-bg, #ffffff);border:1px solid rgba(0,0,0,.06);border-radius:20px;overflow:hidden;opacity:0;transform:translateY(8px);animation:card-in .5s ease-out forwards;transition:transform var(--sd-duration-slow, .3s) ease,box-shadow var(--sd-duration-slow, .3s) ease}.card:hover{transform:translateY(-4px);box-shadow:0 16px 40px color-mix(in srgb,var(--sd-primary, #005cbb) 18%,transparent),0 4px 12px #0000000f}.hero-card{grid-area:hero;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 30% 30%,color-mix(in srgb,var(--sd-primary, #005cbb) 18%,white),#fff 60%),var(--sd-home-page-card-bg, #ffffff);border:1px solid color-mix(in srgb,var(--sd-primary, #005cbb) 15%,transparent)}.hero-card .hero-ring{position:absolute;border-radius:50%;border:1px solid color-mix(in srgb,var(--sd-primary, #005cbb) 25%,transparent);animation:hero-pulse 3s ease-in-out infinite;pointer-events:none}.hero-card .hero-ring.ring-1{inset:calc(50% - 70px);animation-delay:0s}.hero-card .hero-ring.ring-2{inset:calc(50% - 105px);animation-delay:.6s}.hero-card .hero-ring.ring-3{inset:calc(50% - 140px);animation-delay:1.2s}.hero-card .hero-core{position:relative;z-index:1;width:140px;height:140px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle,color-mix(in srgb,var(--sd-primary, #005cbb) 22%,white),#fff);box-shadow:0 0 60px color-mix(in srgb,var(--sd-primary, #005cbb) 30%,transparent),0 10px 30px color-mix(in srgb,var(--sd-primary, #005cbb) 20%,transparent)}.hero-card .hero-icon{font-size:72px;width:72px;height:72px;color:var(--sd-primary, #005cbb)}.hero-card .hero-decoration{position:absolute;inset:0;pointer-events:none}.hero-card .hero-decoration .dot{position:absolute;width:8px;height:8px;border-radius:50%;background:color-mix(in srgb,var(--sd-primary, #005cbb) 50%,transparent);animation:dot-float 4s ease-in-out infinite}.hero-card .hero-decoration .d1{top:16%;left:12%;animation-delay:0s}.hero-card .hero-decoration .d2{bottom:20%;right:14%;animation-delay:1s}.hero-card .hero-decoration .d3{top:60%;left:80%;animation-delay:2s;width:5px;height:5px}.feature-card{display:flex;align-items:stretch;cursor:default}.feature-card .feature-accent{position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,color-mix(in srgb,var(--sd-primary, #005cbb) 60%,transparent),var(--sd-primary, #005cbb),color-mix(in srgb,var(--sd-primary, #005cbb) 60%,transparent))}.feature-card .feature-content{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px 16px 18px;gap:10px}.feature-card .feature-icon-wrap{width:56px;height:56px;border-radius:50%;background:color-mix(in srgb,var(--sd-primary, #005cbb) 12%,white);display:flex;align-items:center;justify-content:center}.feature-card .feature-icon{font-size:var(--sd-font-size-28, 28px);width:28px;height:28px;color:var(--sd-primary, #005cbb)}.feature-card .feature-label{font-size:var(--sd-font-size-14, 14px);font-weight:var(--sd-font-weight-medium, 500);text-align:center;color:#000000c7;line-height:var(--sd-line-height-20, 20px)}.feature-card.feature-wide .feature-content{flex-direction:row;justify-content:flex-start;padding:18px 24px;gap:18px}.feature-card.feature-wide .feature-icon-wrap{width:64px;height:64px}.feature-card.feature-wide .feature-icon{font-size:var(--sd-font-size-32, 32px);width:32px;height:32px}.feature-card.feature-wide .feature-label{text-align:left;font-size:var(--sd-font-size-16, 16px)}@keyframes card-in{to{opacity:1;transform:translateY(0)}}@keyframes hero-pulse{0%,to{transform:scale(1);opacity:.7}50%{transform:scale(1.06);opacity:.3}}@keyframes dot-float{0%,to{transform:translateY(0);opacity:.8}50%{transform:translateY(-8px);opacity:.4}}@media(max-width:1024px){.bento{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,minmax(120px,1fr));grid-template-areas:\"hero hero data\" \"hero hero report\" \"users flow audit\" \"integ integ integ\"}.hero-card .hero-core{width:120px;height:120px}.hero-card .hero-icon{font-size:60px;width:60px;height:60px}}@media(max-width:640px){.wrapper{padding:16px 12px}.bento{grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:\"hero\" \"data\" \"report\" \"users\" \"flow\" \"audit\" \"integ\";gap:12px}.hero-card{min-height:220px}.hero-card .hero-core{width:100px;height:100px}.hero-card .hero-icon{font-size:52px;width:52px;height:52px}}@media(prefers-reduced-motion:reduce){.card{animation:none;opacity:1;transform:none}.hero-card .hero-ring{animation:none;opacity:.4}.hero-card .hero-decoration .dot{animation:none}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdPageComponent, selector: "sd-page", inputs: ["title", "description", "noHeader"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
|
|
4602
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: HomePageComponent, isStandalone: true, selector: "app-home-page", ngImport: i0, template: "@let _userInfo = userInfo();\n<sd-page>\n <div class=\"d-flex flex-column\" headerLeft>\n <div class=\"font-weight-medium fs-20\">\n {{ 'core.module.layout.greeting.hello' | sdTranslate: { name: _userInfo?.fullName ?? _userInfo?.email ?? _userInfo?.username ?? '' } }}\n </div>\n <span class=\"T12R text-secondary\">{{ todayInfo() }}</span>\n </div>\n\n <div class=\"wrapper\">\n <div class=\"bento\">\n <!-- Hero -->\n <div class=\"card hero-card\">\n <div class=\"hero-ring ring-3\"></div>\n <div class=\"hero-ring ring-2\"></div>\n <div class=\"hero-ring ring-1\"></div>\n <div class=\"hero-core\">\n <sd-icon class=\"hero-icon\" name=\"space_dashboard\"></sd-icon>\n </div>\n <div class=\"hero-decoration\">\n <span class=\"dot d1\"></span>\n <span class=\"dot d2\"></span>\n <span class=\"dot d3\"></span>\n </div>\n </div>\n\n <!-- Features -->\n @for (feature of features; track feature.key; let i = $index) {\n <div\n class=\"card feature-card\"\n [class.feature-wide]=\"feature.area === 'audit' || feature.area === 'integ'\"\n [style.gridArea]=\"feature.area\"\n [style.animation-delay.ms]=\"(i + 1) * 80\"\n >\n <div class=\"feature-accent\"></div>\n <div class=\"feature-content\">\n <div class=\"feature-icon-wrap\">\n <sd-icon class=\"feature-icon\" [name]=\"feature.icon\"></sd-icon>\n </div>\n <span class=\"feature-label\">{{ feature.key | sdTranslate }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n</sd-page>\n", styles: [":host{display:contents}.wrapper{display:flex;align-items:center;justify-content:center;padding:32px 24px;height:100%;width:100%;background:radial-gradient(circle at 15% 25%,color-mix(in srgb,var(--sd-primary, #005cbb) 14%,transparent),transparent 55%),radial-gradient(circle at 85% 75%,color-mix(in srgb,var(--sd-primary, #005cbb) 10%,transparent),transparent 55%),linear-gradient(135deg,var(--sd-home-page-gradient-start, #fafbfc) 0%,var(--sd-home-page-gradient-end, #f4f6fa) 100%);overflow:auto}.bento{display:grid;width:100%;max-width:1080px;gap:16px;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(3,minmax(140px,1fr));grid-template-areas:\"hero hero data report\" \"hero hero users flow\" \"audit audit integ integ\"}.card{position:relative;background:var(--sd-home-page-card-bg, #ffffff);border:1px solid rgba(0,0,0,.06);border-radius:20px;overflow:hidden;opacity:0;transform:translateY(8px);animation:card-in .5s ease-out forwards;transition:transform var(--sd-duration-slow, .3s) ease,box-shadow var(--sd-duration-slow, .3s) ease}.card:hover{transform:translateY(-4px);box-shadow:0 16px 40px color-mix(in srgb,var(--sd-primary, #005cbb) 18%,transparent),0 4px 12px #0000000f}.hero-card{grid-area:hero;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 30% 30%,color-mix(in srgb,var(--sd-primary, #005cbb) 18%,white),#fff 60%),var(--sd-home-page-card-bg, #ffffff);border:1px solid color-mix(in srgb,var(--sd-primary, #005cbb) 15%,transparent)}.hero-card .hero-ring{position:absolute;border-radius:50%;border:1px solid color-mix(in srgb,var(--sd-primary, #005cbb) 25%,transparent);animation:hero-pulse 3s ease-in-out infinite;pointer-events:none}.hero-card .hero-ring.ring-1{inset:calc(50% - 70px);animation-delay:0s}.hero-card .hero-ring.ring-2{inset:calc(50% - 105px);animation-delay:.6s}.hero-card .hero-ring.ring-3{inset:calc(50% - 140px);animation-delay:1.2s}.hero-card .hero-core{position:relative;z-index:1;width:140px;height:140px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle,color-mix(in srgb,var(--sd-primary, #005cbb) 22%,white),#fff);box-shadow:0 0 60px color-mix(in srgb,var(--sd-primary, #005cbb) 30%,transparent),0 10px 30px color-mix(in srgb,var(--sd-primary, #005cbb) 20%,transparent)}.hero-card .hero-icon{font-size:72px;width:72px;height:72px;color:var(--sd-primary, #005cbb)}.hero-card .hero-decoration{position:absolute;inset:0;pointer-events:none}.hero-card .hero-decoration .dot{position:absolute;width:8px;height:8px;border-radius:50%;background:color-mix(in srgb,var(--sd-primary, #005cbb) 50%,transparent);animation:dot-float 4s ease-in-out infinite}.hero-card .hero-decoration .d1{top:16%;left:12%;animation-delay:0s}.hero-card .hero-decoration .d2{bottom:20%;right:14%;animation-delay:1s}.hero-card .hero-decoration .d3{top:60%;left:80%;animation-delay:2s;width:5px;height:5px}.feature-card{display:flex;align-items:stretch;cursor:default}.feature-card .feature-accent{position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,color-mix(in srgb,var(--sd-primary, #005cbb) 60%,transparent),var(--sd-primary, #005cbb),color-mix(in srgb,var(--sd-primary, #005cbb) 60%,transparent))}.feature-card .feature-content{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px 16px 18px;gap:10px}.feature-card .feature-icon-wrap{width:56px;height:56px;border-radius:50%;background:color-mix(in srgb,var(--sd-primary, #005cbb) 12%,white);display:flex;align-items:center;justify-content:center}.feature-card .feature-icon{font-size:var(--sd-font-size-28, 28px);width:28px;height:28px;color:var(--sd-primary, #005cbb)}.feature-card .feature-label{font-size:var(--sd-font-size-14, 14px);font-weight:var(--sd-font-weight-medium, 500);text-align:center;color:#000000c7;line-height:var(--sd-line-height-20, 20px)}.feature-card.feature-wide .feature-content{flex-direction:row;justify-content:flex-start;padding:18px 24px;gap:18px}.feature-card.feature-wide .feature-icon-wrap{width:64px;height:64px}.feature-card.feature-wide .feature-icon{font-size:var(--sd-font-size-32, 32px);width:32px;height:32px}.feature-card.feature-wide .feature-label{text-align:left;font-size:var(--sd-font-size-16, 16px)}@keyframes card-in{to{opacity:1;transform:translateY(0)}}@keyframes hero-pulse{0%,to{transform:scale(1);opacity:.7}50%{transform:scale(1.06);opacity:.3}}@keyframes dot-float{0%,to{transform:translateY(0);opacity:.8}50%{transform:translateY(-8px);opacity:.4}}@media(max-width:1024px){.bento{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,minmax(120px,1fr));grid-template-areas:\"hero hero data\" \"hero hero report\" \"users flow audit\" \"integ integ integ\"}.hero-card .hero-core{width:120px;height:120px}.hero-card .hero-icon{font-size:60px;width:60px;height:60px}}@media(max-width:640px){.wrapper{padding:16px 12px}.bento{grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:\"hero\" \"data\" \"report\" \"users\" \"flow\" \"audit\" \"integ\";gap:12px}.hero-card{min-height:220px}.hero-card .hero-core{width:100px;height:100px}.hero-card .hero-icon{font-size:52px;width:52px;height:52px}}@media(prefers-reduced-motion:reduce){.card{animation:none;opacity:1;transform:none}.hero-card .hero-ring{animation:none;opacity:.4}.hero-card .hero-decoration .dot{animation:none}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdPageComponent, selector: "sd-page, sd-page-detail, sd-page-form", inputs: ["title", "description", "noHeader", "backLink", "badges", "width", "aside", "toc"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
|
|
4348
4603
|
};
|
|
4349
4604
|
HomePageComponent = __decorate([
|
|
4350
4605
|
SdTabComponent({
|
|
@@ -4461,7 +4716,7 @@ let RootComponent$1 = class RootComponent {
|
|
|
4461
4716
|
void this.#router.navigateByUrl(this.#layoutService.homeUrl);
|
|
4462
4717
|
}
|
|
4463
4718
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: RootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4464
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: RootComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "@let _userInfo = userInfo();\n<sd-page>\n <div class=\"d-flex flex-column\" headerLeft>\n <div class=\"font-weight-medium fs-20\">{{ 'core.module.layout.greeting.hello' | sdTranslate: { name: _userInfo?.fullName ?? _userInfo?.email ?? _userInfo?.username ?? '' } }}</div>\n <span class=\"T12R text-secondary\">{{ todayInfo() }}</span>\n </div>\n\n <div class=\"h-full d-flex flex-column align-items-center\">\n <div class=\"h-full d-flex flex-column align-items-center justify-content-center text-center wrapper\">\n <img alt=\"not-found\" class=\"sd-image-not-found\" />\n <span class=\"T16M mt-24\">{{ 'core.module.layout.not-found.title' | sdTranslate }}</span>\n <span class=\"T16R text-secondary mt-4\">\n {{ 'core.module.layout.not-found.message' | sdTranslate }}\n </span>\n <sd-button class=\"mt-16\" type=\"fill\" color=\"primary\" (click)=\"reload()\" [title]=\"'core.module.layout.not-found.back' | sdTranslate\" prefixIcon=\"arrow_back\"> </sd-button>\n </div>\n </div>\n</sd-page>\n", styles: [".wrapper{width:300px}\n"], dependencies: [{ kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdPageComponent, selector: "sd-page", inputs: ["title", "description", "noHeader"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
|
|
4719
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: RootComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "@let _userInfo = userInfo();\n<sd-page>\n <div class=\"d-flex flex-column\" headerLeft>\n <div class=\"font-weight-medium fs-20\">{{ 'core.module.layout.greeting.hello' | sdTranslate: { name: _userInfo?.fullName ?? _userInfo?.email ?? _userInfo?.username ?? '' } }}</div>\n <span class=\"T12R text-secondary\">{{ todayInfo() }}</span>\n </div>\n\n <div class=\"h-full d-flex flex-column align-items-center\">\n <div class=\"h-full d-flex flex-column align-items-center justify-content-center text-center wrapper\">\n <img alt=\"not-found\" class=\"sd-image-not-found\" />\n <span class=\"T16M mt-24\">{{ 'core.module.layout.not-found.title' | sdTranslate }}</span>\n <span class=\"T16R text-secondary mt-4\">\n {{ 'core.module.layout.not-found.message' | sdTranslate }}\n </span>\n <sd-button class=\"mt-16\" type=\"fill\" color=\"primary\" (click)=\"reload()\" [title]=\"'core.module.layout.not-found.back' | sdTranslate\" prefixIcon=\"arrow_back\"> </sd-button>\n </div>\n </div>\n</sd-page>\n", styles: [".wrapper{width:300px}\n"], dependencies: [{ kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdPageComponent, selector: "sd-page, sd-page-detail, sd-page-form", inputs: ["title", "description", "noHeader", "backLink", "badges", "width", "aside", "toc"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
|
|
4465
4720
|
};
|
|
4466
4721
|
RootComponent$1 = __decorate([
|
|
4467
4722
|
SdTabComponent({
|
|
@@ -4537,7 +4792,7 @@ let RootComponent = class RootComponent {
|
|
|
4537
4792
|
void this.#router.navigateByUrl(this.#layoutService.homeUrl);
|
|
4538
4793
|
}
|
|
4539
4794
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: RootComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4540
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: RootComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "@let _userInfo = userInfo();\n<sd-page>\n <div class=\"d-flex flex-column\" headerLeft>\n <div class=\"font-weight-medium fs-20\">{{ 'core.module.layout.greeting.hello' | sdTranslate: { name: _userInfo?.fullName ?? _userInfo?.email ?? _userInfo?.username ?? '' } }}</div>\n <span class=\"T12R text-secondary\">{{ todayInfo() }}</span>\n </div>\n <div class=\"h-full d-flex flex-column align-items-center\">\n <div class=\"h-full d-flex flex-column align-items-center justify-content-center text-center wrapper\">\n <img alt=\"forbidden\" class=\"sd-image-forbidden\" />\n <span class=\"T16M mt-24\">{{ 'core.module.layout.forbidden.title' | sdTranslate }}</span>\n <span class=\"T14R text-secondary mt-4\"\n >{{ 'core.module.layout.forbidden.message' | sdTranslate }}</span\n >\n <sd-button class=\"mt-16\" type=\"fill\" color=\"primary\" (click)=\"reload()\" [title]=\"'core.module.layout.forbidden.back-home' | sdTranslate\"> </sd-button>\n </div>\n </div>\n</sd-page>\n", styles: [".wrapper{width:300px}\n"], dependencies: [{ kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdPageComponent, selector: "sd-page", inputs: ["title", "description", "noHeader"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
|
|
4795
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: RootComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "@let _userInfo = userInfo();\n<sd-page>\n <div class=\"d-flex flex-column\" headerLeft>\n <div class=\"font-weight-medium fs-20\">{{ 'core.module.layout.greeting.hello' | sdTranslate: { name: _userInfo?.fullName ?? _userInfo?.email ?? _userInfo?.username ?? '' } }}</div>\n <span class=\"T12R text-secondary\">{{ todayInfo() }}</span>\n </div>\n <div class=\"h-full d-flex flex-column align-items-center\">\n <div class=\"h-full d-flex flex-column align-items-center justify-content-center text-center wrapper\">\n <img alt=\"forbidden\" class=\"sd-image-forbidden\" />\n <span class=\"T16M mt-24\">{{ 'core.module.layout.forbidden.title' | sdTranslate }}</span>\n <span class=\"T14R text-secondary mt-4\"\n >{{ 'core.module.layout.forbidden.message' | sdTranslate }}</span\n >\n <sd-button class=\"mt-16\" type=\"fill\" color=\"primary\" (click)=\"reload()\" [title]=\"'core.module.layout.forbidden.back-home' | sdTranslate\"> </sd-button>\n </div>\n </div>\n</sd-page>\n", styles: [".wrapper{width:300px}\n"], dependencies: [{ kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdPageComponent, selector: "sd-page, sd-page-detail, sd-page-form", inputs: ["title", "description", "noHeader", "backLink", "badges", "width", "aside", "toc"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
|
|
4541
4796
|
};
|
|
4542
4797
|
RootComponent = __decorate([
|
|
4543
4798
|
SdTabComponent({
|
|
@@ -4619,5 +4874,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
4619
4874
|
* Generated bundle index. Do not edit.
|
|
4620
4875
|
*/
|
|
4621
4876
|
|
|
4622
|
-
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 };
|
|
4877
|
+
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 };
|
|
4623
4878
|
//# sourceMappingURL=sdcorejs-angular-modules-layout.mjs.map
|