@sdcorejs/angular 20.3.4 → 20.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/STYLE-GUIDE.md +78 -1
- package/assets/THEME.md +45 -3
- package/assets/scss/core/_popover-panel.scss +90 -0
- package/assets/scss/core/form.scss +5 -2
- package/assets/scss/core/utilities/_grid.scss +15 -0
- package/assets/scss/core/utilities/_sizing.scss +4 -0
- package/assets/scss/themes/_component-tokens.scss +9 -4
- package/assets/scss/themes/_semantic.scss +6 -5
- package/components/anchor/index.d.ts +6 -1
- package/components/button/index.d.ts +7 -1
- package/components/calendar/index.d.ts +1092 -0
- package/components/card/index.d.ts +247 -9
- package/components/index.d.ts +3 -1
- package/components/kanban/index.d.ts +191 -74
- package/components/modal/index.d.ts +15 -1
- package/components/query-bar/index.d.ts +204 -38
- package/components/quick-action/index.d.ts +65 -1
- package/components/scheduler/index.d.ts +544 -0
- package/components/tab/index.d.ts +6 -1
- package/components/table/index.d.ts +338 -31
- package/components/timeline/index.d.ts +216 -0
- package/components/tree/index.d.ts +119 -6
- package/directives/index.d.ts +4 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +62 -3
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +14 -6
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-calendar.mjs +2481 -0
- package/fesm2022/sdcorejs-angular-components-calendar.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-card.mjs +486 -23
- package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-editor-engine.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +4 -18
- package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +7 -7
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-kanban.mjs +833 -154
- package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +69 -14
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +1477 -365
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs +68 -2
- package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-scheduler.mjs +1934 -0
- package/fesm2022/sdcorejs-angular-components-scheduler.mjs.map +1 -0
- 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-tab-router.mjs +126 -26
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +31 -2
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +5967 -3690
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-timeline.mjs +473 -0
- package/fesm2022/sdcorejs-angular-components-timeline.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-components-tree.mjs +597 -36
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +2 -4
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components.mjs +3 -1
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +109 -22
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +140 -42
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +70 -21
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-directives.mjs +4 -3
- package/fesm2022/sdcorejs-angular-forms-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +23 -4
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +812 -52
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-D_1BxDC9.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-w7iVesRB.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-D_1BxDC9.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-w7iVesRB.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-CgH8Qi25.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-DwGr3EVD.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-CgH8Qi25.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-DwGr3EVD.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-CyCGqW9W.mjs → sdcorejs-angular-modules-generic-generic-list.page-QqBNS185.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-CyCGqW9W.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-QqBNS185.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DTmU8Te4.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-_WrprZ_o.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DTmU8Te4.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-_WrprZ_o.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-generic.mjs +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +17 -8
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-okZVmcd5.mjs → sdcorejs-angular-modules-pattern-base-api.service-B2HMyv8F.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-okZVmcd5.mjs.map → sdcorejs-angular-modules-pattern-base-api.service-B2HMyv8F.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-LPUj7MqG.mjs → sdcorejs-angular-modules-pattern-create.component-CNtkbnRK.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-LPUj7MqG.mjs.map → sdcorejs-angular-modules-pattern-create.component-CNtkbnRK.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-2-dyjvCH.mjs → sdcorejs-angular-modules-pattern-create.component-DlNyY3e7.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-2-dyjvCH.mjs.map → sdcorejs-angular-modules-pattern-create.component-DlNyY3e7.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-BCoG3bVV.mjs → sdcorejs-angular-modules-pattern-create.component-DxV_0Ckg.mjs} +11 -7
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DxV_0Ckg.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-Caua6Xto.mjs → sdcorejs-angular-modules-pattern-customer.service-DS0cFc3u.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-Caua6Xto.mjs.map → sdcorejs-angular-modules-pattern-customer.service-DS0cFc3u.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-_c_4slgf.mjs → sdcorejs-angular-modules-pattern-detail.component-B_1ppVNA.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-_c_4slgf.mjs.map → sdcorejs-angular-modules-pattern-detail.component-B_1ppVNA.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-B2Y0PbbC.mjs → sdcorejs-angular-modules-pattern-detail.component-CFvwPHFx.mjs} +58 -55
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CFvwPHFx.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-C_HziBQN.mjs → sdcorejs-angular-modules-pattern-flow.component-Ba4xO_tF.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-C_HziBQN.mjs.map → sdcorejs-angular-modules-pattern-flow.component-Ba4xO_tF.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-B2dNqckm.mjs → sdcorejs-angular-modules-pattern-index.component-DvwY0K3t.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-B2dNqckm.mjs.map → sdcorejs-angular-modules-pattern-index.component-DvwY0K3t.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-Dq8Q8Vfm.mjs → sdcorejs-angular-modules-pattern-lines-table-form.component-BSAQaAgH.mjs} +5 -5
- package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-Dq8Q8Vfm.mjs.map → sdcorejs-angular-modules-pattern-lines-table-form.component-BSAQaAgH.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BIv2k6NI.mjs +506 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BIv2k6NI.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-CeX57FPi.mjs → sdcorejs-angular-modules-pattern-list.component-BYyL5Q5n.mjs} +30 -39
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BYyL5Q5n.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CZRTnqNx.mjs +501 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CZRTnqNx.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-DS8A17mM.mjs → sdcorejs-angular-modules-pattern-list.component-DF7CvaVG.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-DS8A17mM.mjs.map → sdcorejs-angular-modules-pattern-list.component-DF7CvaVG.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-Bs9hhMr7.mjs → sdcorejs-angular-modules-pattern-list.component-nMyLso8Z.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-Bs9hhMr7.mjs.map → sdcorejs-angular-modules-pattern-list.component-nMyLso8Z.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-Dfil91qL.mjs → sdcorejs-angular-modules-pattern-mock-backend.factory-CS7VK5Ol.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-Dfil91qL.mjs.map → sdcorejs-angular-modules-pattern-mock-backend.factory-CS7VK5Ol.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs → sdcorejs-angular-modules-pattern-pattern-source-viewer-DuhyXsGn.mjs} +4 -22
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-DuhyXsGn.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs → sdcorejs-angular-modules-pattern-pattern-source.generated-bfpj85ke.mjs} +26 -27
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-bfpj85ke.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-PaIGZ1ve.mjs → sdcorejs-angular-modules-pattern-product.service-KKWwzMEG.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-PaIGZ1ve.mjs.map → sdcorejs-angular-modules-pattern-product.service-KKWwzMEG.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-profile.component-B8j8cieu.mjs → sdcorejs-angular-modules-pattern-profile.component-XDuLwzEl.mjs} +25 -15
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-XDuLwzEl.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-0Vh73aXL.mjs → sdcorejs-angular-modules-pattern-routes--ScZNg7A.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-0Vh73aXL.mjs.map → sdcorejs-angular-modules-pattern-routes--ScZNg7A.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-Cw9uJySU.mjs → sdcorejs-angular-modules-pattern-routes-Bka6PaRB.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-Cw9uJySU.mjs.map → sdcorejs-angular-modules-pattern-routes-Bka6PaRB.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-nrxSHE-O.mjs → sdcorejs-angular-modules-pattern-routes-CCwFQAdd.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-nrxSHE-O.mjs.map → sdcorejs-angular-modules-pattern-routes-CCwFQAdd.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CFT9DyKj.mjs → sdcorejs-angular-modules-pattern-routes-CKryLRCh.mjs} +8 -8
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CFT9DyKj.mjs.map → sdcorejs-angular-modules-pattern-routes-CKryLRCh.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CFLETqYK.mjs → sdcorejs-angular-modules-pattern-routes-Dr72yGSt.mjs} +5 -5
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CFLETqYK.mjs.map → sdcorejs-angular-modules-pattern-routes-Dr72yGSt.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BoB2usST.mjs → sdcorejs-angular-modules-pattern-routes-P9WvwSEW.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BoB2usST.mjs.map → sdcorejs-angular-modules-pattern-routes-P9WvwSEW.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-_EDJ1-63.mjs +65 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-_EDJ1-63.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-n4kpjO0y.mjs +56 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-n4kpjO0y.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-CJ6hUHjk.mjs → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-DHhmKKVI.mjs} +12 -12
- package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-CJ6hUHjk.mjs.map → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-DHhmKKVI.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-C_AFK_9X.mjs → sdcorejs-angular-modules-pattern-shell.component-DxNC-ixx.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-C_AFK_9X.mjs.map → sdcorejs-angular-modules-pattern-shell.component-DxNC-ixx.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-TWYHj6in.mjs +480 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-TWYHj6in.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-B7H9pp-R.mjs → sdcorejs-angular-modules-pattern-update.component-BcBxBqWB.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-B7H9pp-R.mjs.map → sdcorejs-angular-modules-pattern-update.component-BcBxBqWB.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-Dhfba-qx.mjs → sdcorejs-angular-modules-pattern-update.component-BntTyV55.mjs} +9 -6
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-BntTyV55.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-hRTu79uE.mjs → sdcorejs-angular-modules-pattern-update.component-CJjZWZuz.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-hRTu79uE.mjs.map → sdcorejs-angular-modules-pattern-update.component-CJjZWZuz.mjs.map} +1 -1
- package/fesm2022/sdcorejs-angular-modules-pattern.mjs +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +171 -158
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-excel.mjs +34 -0
- package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-query-params.mjs +226 -0
- package/fesm2022/sdcorejs-angular-services-query-params.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs +24 -1
- package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
- package/forms/date/index.d.ts +2 -0
- package/forms/directives/index.d.ts +1 -1
- package/i18n/index.d.ts +159 -9
- package/modules/layout/index.d.ts +2 -1
- package/modules/pattern/README.md +5 -4
- package/modules/pattern/docs/detail.md +18 -9
- package/modules/pattern/docs/drawer.md +185 -83
- package/modules/pattern/docs/header-actions.md +1 -1
- package/modules/pattern/docs/list.md +3 -3
- package/modules/pattern/docs/states.md +1 -1
- package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +12 -16
- package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +58 -29
- package/modules/pattern/features/category/pages/list/list.component.html +11 -3
- package/modules/pattern/features/category/pages/list/list.component.ts +36 -10
- package/modules/pattern/features/category/routes.ts +5 -22
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +7 -11
- package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +70 -27
- package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +9 -53
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +53 -19
- package/modules/pattern/features/customer/entity.resolver.ts +1 -1
- package/modules/pattern/features/customer/pages/list/list.component.html +18 -3
- package/modules/pattern/features/customer/pages/list/list.component.ts +43 -16
- package/modules/pattern/features/customer/pages/profile/profile.component.ts +17 -8
- package/modules/pattern/features/customer/routes.ts +6 -27
- package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +37 -56
- package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +14 -76
- package/modules/pattern/features/order/pages/create/create.component.ts +7 -3
- package/modules/pattern/features/order/pages/detail/detail.component.ts +1 -1
- package/modules/pattern/features/order/pages/update/update.component.ts +5 -2
- package/package.json +17 -5
- package/services/confirm/index.d.ts +22 -81
- package/services/excel/index.d.ts +59 -0
- package/services/query-params/index.d.ts +67 -0
- package/utilities/extensions/index.d.ts +10 -1
- package/components/history/index.d.ts +0 -23
- package/fesm2022/sdcorejs-angular-components-history.mjs +0 -54
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CB4F9cBe.mjs +0 -144
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CB4F9cBe.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CowdEzyv.mjs +0 -145
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CowdEzyv.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-BCoG3bVV.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +0 -18
- package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bu6E63bN.mjs +0 -148
- package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bu6E63bN.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-B2Y0PbbC.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BRsdOwWy.mjs +0 -87
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BRsdOwWy.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DalxHa8D.mjs +0 -232
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DalxHa8D.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-kdEZ9s7K.mjs +0 -70
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-kdEZ9s7K.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B3-th1z4.mjs +0 -164
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B3-th1z4.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CRttQEXa.mjs +0 -118
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CRttQEXa.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CeX57FPi.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-B8j8cieu.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-CZusLcS3.mjs +0 -74
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-CZusLcS3.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-Cq4BqjE9.mjs +0 -99
- package/fesm2022/sdcorejs-angular-modules-pattern-routes-Cq4BqjE9.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-C74EEboR.mjs +0 -143
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-C74EEboR.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-Dj9lvkCP.mjs +0 -132
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-Dj9lvkCP.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Dhfba-qx.mjs.map +0 -1
- package/modules/pattern/features/category/entity.resolver.ts +0 -27
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
2
|
import { inject, ChangeDetectionStrategy, Component, Injectable } from '@angular/core';
|
|
4
|
-
import {
|
|
5
|
-
import * as
|
|
3
|
+
import { MatBottomSheetRef, MAT_BOTTOM_SHEET_DATA, MatBottomSheet } from '@angular/material/bottom-sheet';
|
|
4
|
+
import * as i2 from '@angular/material/dialog';
|
|
6
5
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
6
|
+
import * as i1 from '@angular/common';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import { FormsModule } from '@angular/forms';
|
|
7
9
|
import { SdButton } from '@sdcorejs/angular/components/button';
|
|
8
10
|
import { SdDate } from '@sdcorejs/angular/forms/date';
|
|
9
11
|
import { SdDatetime } from '@sdcorejs/angular/forms/datetime';
|
|
10
12
|
import { SdRadio } from '@sdcorejs/angular/forms/radio';
|
|
11
13
|
import { SdSelect } from '@sdcorejs/angular/forms/select';
|
|
12
14
|
import { SdTextarea } from '@sdcorejs/angular/forms/textarea';
|
|
13
|
-
import { Utilities } from '@sdcorejs/utils/fns';
|
|
15
|
+
import { Utilities, BrowserUtilities } from '@sdcorejs/utils/fns';
|
|
14
16
|
import { SD_ICON_CONFIGURATION, SdIcon } from '@sdcorejs/angular/modules/icon';
|
|
15
17
|
import { I18nService } from '@sdcorejs/angular/i18n';
|
|
16
18
|
|
|
@@ -18,8 +20,15 @@ class DialogConfirmComponent {
|
|
|
18
20
|
value;
|
|
19
21
|
required = false;
|
|
20
22
|
id = `I${Utilities.generateUuid()}`;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
// why: cùng một component chạy trong MatDialog hoặc MatBottomSheet nên cả hai ref đều là tùy chọn. SdConfirmService
|
|
24
|
+
// quyết định kiểu hiển thị; component chỉ dùng ref đang có.
|
|
25
|
+
dialogRef = inject((MatDialogRef), { optional: true });
|
|
26
|
+
#bottomSheetRef = inject((MatBottomSheetRef), { optional: true });
|
|
27
|
+
/** `true` when opened in a bottom sheet; selects the stacked mobile action layout. */
|
|
28
|
+
isBottomSheet = !!this.#bottomSheetRef;
|
|
29
|
+
data = (this.isBottomSheet
|
|
30
|
+
? inject(MAT_BOTTOM_SHEET_DATA, { optional: true })
|
|
31
|
+
: inject(MAT_DIALOG_DATA, { optional: true })) ?? {};
|
|
23
32
|
iconTone = this.data.yesButtonColor || 'primary';
|
|
24
33
|
iconShape = this.data.iconShape ?? inject(SD_ICON_CONFIGURATION).defaultShape;
|
|
25
34
|
resolvedIcon = this.data.icon?.trim() ||
|
|
@@ -57,28 +66,50 @@ class DialogConfirmComponent {
|
|
|
57
66
|
this.required = this.data?.select?.required || false;
|
|
58
67
|
}
|
|
59
68
|
}
|
|
69
|
+
/** Accept stays disabled while a required field is empty (a whitespace-only input counts as empty). */
|
|
70
|
+
get acceptDisabled() {
|
|
71
|
+
const value = this.value;
|
|
72
|
+
return (this.required &&
|
|
73
|
+
(value === undefined ||
|
|
74
|
+
value === null ||
|
|
75
|
+
value === '' ||
|
|
76
|
+
(!!this.data.input && !value.trim()) ||
|
|
77
|
+
(value.length !== undefined && value.length === 0)));
|
|
78
|
+
}
|
|
79
|
+
#close(result) {
|
|
80
|
+
if (this.#bottomSheetRef) {
|
|
81
|
+
this.#bottomSheetRef.dismiss(result);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.dialogRef?.close(result);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
60
87
|
onCancel = () => {
|
|
61
|
-
this
|
|
88
|
+
this.#close({ action: 'CANCEL', value: null });
|
|
62
89
|
};
|
|
63
90
|
onAccept = () => {
|
|
64
91
|
// Always return an object with action and value for consistency
|
|
65
92
|
if (this.data?.radio || this.data?.input || this.data?.date || this.data?.datetime || this.data?.select) {
|
|
66
|
-
this
|
|
93
|
+
this.#close({ action: 'ACCEPT', value: this.value });
|
|
67
94
|
}
|
|
68
95
|
else {
|
|
69
|
-
this
|
|
96
|
+
this.#close({ action: 'ACCEPT', value: null });
|
|
70
97
|
}
|
|
71
98
|
};
|
|
72
99
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DialogConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
73
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DialogConfirmComponent, isStandalone: true, selector: "sd-dialog-confirm", ngImport: i0, template: "<div mat-dialog-content class=\"sd-dialog-confirm__content\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <div class=\"sd-dialog-confirm__header\">\n <span class=\"sd-dialog-confirm__icon\" aria-hidden=\"true\" [attr.data-icon]=\"resolvedIcon\" [attr.data-tone]=\"iconTone\" [attr.data-icon-shape]=\"iconShape\">\n <sd-icon [name]=\"resolvedIcon\" size=\"22px\"></sd-icon>\n </span>\n <div class=\"sd-dialog-confirm__copy\">\n <h2 mat-dialog-title class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n @if (data.message) {\n <div class=\"sd-dialog-confirm__message\" [innerHtml]=\"data.message\"></div>\n }\n </div>\n </div>\n @if (hasFields) {\n <div class=\"sd-dialog-confirm__fields\">\n @if (data.input) {\n <sd-textarea\n [label]=\"data.input.label\"\n [placeholder]=\"data.input.placeholder\"\n [(model)]=\"value\"\n [rows]=\"3\"\n [required]=\"data.input.required\"\n [maxlength]=\"data.input.maxlength!\" />\n }\n @if (data.select) {\n <sd-select\n [placeholder]=\"data.select.placeholder\"\n [items]=\"data.select.items\"\n [valueField]=\"data.select.valueField\"\n [displayField]=\"data.select.displayField\"\n [multiple]=\"data.select.multiple\"\n [(model)]=\"value\"\n [required]=\"data.select.required\">\n </sd-select>\n }\n @if (data.date) {\n <sd-date\n [placeholder]=\"data.date.placeholder\"\n [(model)]=\"value\"\n type=\"date\"\n [min]=\"data.date.min!\"\n [max]=\"data.date.max!\"\n [required]=\"data.date.required\">\n </sd-date>\n }\n @if (data.datetime) {\n <sd-datetime\n [placeholder]=\"data.datetime.placeholder\"\n [(model)]=\"value\"\n [min]=\"data.datetime.min!\"\n [max]=\"data.datetime.max!\"\n [showSeconds]=\"data.datetime.showSeconds\"\n [required]=\"data.datetime.required\">\n </sd-datetime>\n }\n @if (data.radio) {\n <sd-radio\n [items]=\"data.radio.items\"\n [valueField]=\"data.radio.valueField\"\n [displayField]=\"data.radio.displayField\"\n [display]=\"data.radio.display || 'column'\"\n [(model)]=\"value\"\n [required]=\"data.radio.required\">\n </sd-radio>\n }\n </div>\n }\n</div>\n<div mat-dialog-actions align=\"end\" class=\"sd-dialog-confirm__actions\">\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n size=\"sm\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n size=\"sm\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"\n required &&\n (value === undefined ||\n value === null ||\n value === '' ||\n (data.input && !value.trim()) ||\n (value.length !== undefined && value.length === 0))\n \"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;min-height:0;max-height:calc(100dvh - 32px);padding:20px;overflow:hidden}.sd-dialog-confirm__content{min-height:0;max-height:none;margin:0;padding:0;color:var(--sd-text)}.sd-dialog-confirm__header{display:flex;align-items:flex-start;gap:12px}.sd-dialog-confirm__icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:var(--sd-icon-shape-radius, var(--sd-radius-8, 8px));color:var(--sd-primary-dark);background:var(--sd-primary-light)}.sd-dialog-confirm__icon[data-tone=success]{color:var(--sd-success-dark);background:var(--sd-success-light)}.sd-dialog-confirm__icon[data-tone=info]{color:var(--sd-info-dark);background:var(--sd-info-light)}.sd-dialog-confirm__icon[data-tone=warning]{color:var(--sd-warning-dark);background:var(--sd-warning-light)}.sd-dialog-confirm__icon[data-tone=error]{color:var(--sd-error-dark);background:var(--sd-error-light)}.sd-dialog-confirm__icon[data-icon-shape=circle]{border-radius:50%}.sd-dialog-confirm__icon[data-icon-shape=none]{background:transparent}.sd-dialog-confirm__icon sd-icon{width:22px;height:22px;font-size:var(--sd-font-size-22, 22px);line-height:var(--sd-line-height-22, 22px)}.sd-dialog-confirm__copy{min-width:0}.sd-dialog-confirm__title{margin:0 0 6px;padding:0;font:inherit;font-size:var(--sd-font-size-18, 18px);font-weight:var(--sd-font-weight-semibold, 600);line-height:25px;letter-spacing:normal;color:var(--sd-text);overflow-wrap:anywhere}.sd-dialog-confirm__title:before{display:none}.sd-dialog-confirm__message{font-size:var(--sd-font-size-14, 14px);line-height:21px;letter-spacing:normal;color:var(--sd-text-secondary);overflow-wrap:anywhere}.sd-dialog-confirm__fields{margin-top:20px}.sd-dialog-confirm__fields sd-radio{height:auto}.sd-dialog-confirm__fields ::ng-deep .mdc-radio{display:inline-flex;align-items:center;justify-content:center}.sd-dialog-confirm__fields ::ng-deep .mat-mdc-radio-button{display:inline-flex;align-items:center;min-height:48px}.sd-dialog-confirm__fields ::ng-deep .c-radio-group-row{flex-wrap:wrap;row-gap:4px}.sd-dialog-confirm__actions{flex-shrink:0;gap:8px;min-height:0;margin:24px 0 0;padding:0}::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{border-radius:var(--sd-radius-8, 8px);box-shadow:0 16px 48px #00000029,0 2px 8px #0000000f}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:last-child{margin-bottom:0}@media(prefers-reduced-motion:reduce){::ng-deep .sd-confirm-panel .mat-mdc-dialog-container,::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{transition:none!important}}@media(max-width:600px){::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button{flex:1}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button button{width:100%;min-height:44px}}@media(max-width:600px){:host{padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { 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: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdRadio, selector: "sd-radio", inputs: ["autoId", "name", "form", "label", "placeholder", "display", "items", "valueField", "displayField", "required", "inlineError", "disabled", "viewed", "color", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["operatorChange", "sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdTextarea, selector: "sd-textarea", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "rows", "hideInlineError", "required", "disabled", "viewed", "autoHeight", "maxlength", "minlength", "pattern", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "model"], outputs: ["modelChange", "sdChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
100
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DialogConfirmComponent, isStandalone: true, selector: "sd-dialog-confirm", host: { properties: { "class.sd-dialog-confirm--sheet": "isBottomSheet" } }, ngImport: i0, template: "<ng-template #body>\n <div class=\"sd-dialog-confirm__header\">\n <span class=\"sd-dialog-confirm__icon\" aria-hidden=\"true\" [attr.data-icon]=\"resolvedIcon\" [attr.data-tone]=\"iconTone\" [attr.data-icon-shape]=\"iconShape\">\n <sd-icon [name]=\"resolvedIcon\" size=\"22px\"></sd-icon>\n </span>\n <div class=\"sd-dialog-confirm__copy\">\n @if (isBottomSheet) {\n <h2 class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n } @else {\n <h2 mat-dialog-title class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n }\n @if (data.message) {\n <div class=\"sd-dialog-confirm__message\" [innerHtml]=\"data.message\"></div>\n }\n </div>\n </div>\n @if (hasFields) {\n <div class=\"sd-dialog-confirm__fields\">\n @if (data.input) {\n <sd-textarea\n [label]=\"data.input.label\"\n [placeholder]=\"data.input.placeholder\"\n [(model)]=\"value\"\n [rows]=\"3\"\n [required]=\"data.input.required\"\n [maxlength]=\"data.input.maxlength!\" />\n }\n @if (data.select) {\n <sd-select\n [placeholder]=\"data.select.placeholder\"\n [items]=\"data.select.items\"\n [valueField]=\"data.select.valueField\"\n [displayField]=\"data.select.displayField\"\n [multiple]=\"data.select.multiple\"\n [(model)]=\"value\"\n [required]=\"data.select.required\">\n </sd-select>\n }\n @if (data.date) {\n <sd-date\n [placeholder]=\"data.date.placeholder\"\n [(model)]=\"value\"\n type=\"date\"\n [min]=\"data.date.min!\"\n [max]=\"data.date.max!\"\n [required]=\"data.date.required\">\n </sd-date>\n }\n @if (data.datetime) {\n <sd-datetime\n [placeholder]=\"data.datetime.placeholder\"\n [(model)]=\"value\"\n [min]=\"data.datetime.min!\"\n [max]=\"data.datetime.max!\"\n [showSeconds]=\"data.datetime.showSeconds\"\n [required]=\"data.datetime.required\">\n </sd-datetime>\n }\n @if (data.radio) {\n <sd-radio\n [items]=\"data.radio.items\"\n [valueField]=\"data.radio.valueField\"\n [displayField]=\"data.radio.displayField\"\n [display]=\"data.radio.display || 'column'\"\n [(model)]=\"value\"\n [required]=\"data.radio.required\">\n </sd-radio>\n }\n </div>\n }\n</ng-template>\n\n@if (isBottomSheet) {\n <!-- why: bottom sheet kh\u00F4ng c\u00F3 MatDialogRef n\u00EAn kh\u00F4ng d\u00F9ng directive mat-dialog-*; n\u00FAt ch\u00EDnh \u0111\u1EE9ng tr\u00EAn, full-width, cao 48px. -->\n <div class=\"sd-dialog-confirm__content sd-dialog-confirm__content--sheet\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <ng-container [ngTemplateOutlet]=\"body\" />\n </div>\n <div class=\"sd-dialog-confirm__actions sd-dialog-confirm__actions--sheet\">\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n block\n size=\"lg\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"acceptDisabled\"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n block\n size=\"lg\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n </div>\n} @else {\n <div mat-dialog-content class=\"sd-dialog-confirm__content\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <ng-container [ngTemplateOutlet]=\"body\" />\n </div>\n <div mat-dialog-actions align=\"end\" class=\"sd-dialog-confirm__actions\">\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n size=\"sm\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n size=\"sm\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"acceptDisabled\"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;min-height:0;max-height:calc(100dvh - 32px);padding:20px;overflow:hidden}.sd-dialog-confirm__content{min-height:0;max-height:none;margin:0;padding:0;color:var(--sd-text)}.sd-dialog-confirm__header{display:flex;align-items:flex-start;gap:12px}.sd-dialog-confirm__icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:var(--sd-icon-shape-radius, var(--sd-radius-8, 8px));color:var(--sd-primary-dark);background:var(--sd-primary-light)}.sd-dialog-confirm__icon[data-tone=success]{color:var(--sd-success-dark);background:var(--sd-success-light)}.sd-dialog-confirm__icon[data-tone=info]{color:var(--sd-info-dark);background:var(--sd-info-light)}.sd-dialog-confirm__icon[data-tone=warning]{color:var(--sd-warning-dark);background:var(--sd-warning-light)}.sd-dialog-confirm__icon[data-tone=error]{color:var(--sd-error-dark);background:var(--sd-error-light)}.sd-dialog-confirm__icon[data-icon-shape=circle]{border-radius:50%}.sd-dialog-confirm__icon[data-icon-shape=none]{background:transparent}.sd-dialog-confirm__icon sd-icon{width:22px;height:22px;font-size:var(--sd-font-size-22, 22px);line-height:var(--sd-line-height-22, 22px)}.sd-dialog-confirm__copy{min-width:0}.sd-dialog-confirm__title{margin:0 0 6px;padding:0;font:inherit;font-size:var(--sd-font-size-18, 18px);font-weight:var(--sd-font-weight-semibold, 600);line-height:25px;letter-spacing:normal;color:var(--sd-text);overflow-wrap:anywhere}.sd-dialog-confirm__title:before{display:none}.sd-dialog-confirm__message{font-size:var(--sd-font-size-14, 14px);line-height:21px;letter-spacing:normal;color:var(--sd-text-secondary);overflow-wrap:anywhere}.sd-dialog-confirm__fields{margin-top:20px}.sd-dialog-confirm__fields sd-radio{height:auto}.sd-dialog-confirm__fields ::ng-deep .mdc-radio{display:inline-flex;align-items:center;justify-content:center}.sd-dialog-confirm__fields ::ng-deep .mat-mdc-radio-button{display:inline-flex;align-items:center;min-height:48px}.sd-dialog-confirm__fields ::ng-deep .c-radio-group-row{flex-wrap:wrap;row-gap:4px}.sd-dialog-confirm__actions{flex-shrink:0;gap:8px;min-height:0;margin:24px 0 0;padding:0}::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{border-radius:var(--sd-radius-8, 8px);box-shadow:0 16px 48px #00000029,0 2px 8px #0000000f}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:last-child{margin-bottom:0}@media(prefers-reduced-motion:reduce){::ng-deep .sd-confirm-panel .mat-mdc-dialog-container,::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{transition:none!important}}@media(max-width:600px){::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button{flex:1}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button button{width:100%;min-height:44px}}@media(max-width:600px){:host{padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}}::ng-deep .sd-confirm-bottom-sheet.mat-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet.mat-mdc-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet .mat-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet .mat-mdc-bottom-sheet-container{display:flex;flex-direction:column;box-sizing:border-box;max-height:min(80vh,100vh - 16px);max-height:min(80vh,100dvh - 16px);padding:0 max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));overflow:hidden}:host(.sd-dialog-confirm--sheet){max-height:inherit;padding:20px 0 max(16px,env(safe-area-inset-bottom,0px))}.sd-dialog-confirm__content--sheet{flex:1 1 auto;overflow-y:auto}.sd-dialog-confirm__actions--sheet{display:flex;flex-direction:column;margin-top:16px}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__message>:last-child{margin-bottom:0}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { 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: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdRadio, selector: "sd-radio", inputs: ["autoId", "name", "form", "label", "placeholder", "display", "items", "valueField", "displayField", "required", "inlineError", "disabled", "viewed", "color", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["operatorChange", "sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdTextarea, selector: "sd-textarea", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "rows", "hideInlineError", "required", "disabled", "viewed", "autoHeight", "maxlength", "minlength", "pattern", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "model"], outputs: ["modelChange", "sdChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
74
101
|
}
|
|
75
102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DialogConfirmComponent, decorators: [{
|
|
76
103
|
type: Component,
|
|
77
|
-
args: [{ selector: 'sd-dialog-confirm', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdIcon, CommonModule, FormsModule, MatDialogModule, SdButton, SdDate, SdDatetime, SdRadio, SdSelect, SdTextarea],
|
|
104
|
+
args: [{ selector: 'sd-dialog-confirm', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdIcon, CommonModule, FormsModule, MatDialogModule, SdButton, SdDate, SdDatetime, SdRadio, SdSelect, SdTextarea], host: { '[class.sd-dialog-confirm--sheet]': 'isBottomSheet' }, template: "<ng-template #body>\n <div class=\"sd-dialog-confirm__header\">\n <span class=\"sd-dialog-confirm__icon\" aria-hidden=\"true\" [attr.data-icon]=\"resolvedIcon\" [attr.data-tone]=\"iconTone\" [attr.data-icon-shape]=\"iconShape\">\n <sd-icon [name]=\"resolvedIcon\" size=\"22px\"></sd-icon>\n </span>\n <div class=\"sd-dialog-confirm__copy\">\n @if (isBottomSheet) {\n <h2 class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n } @else {\n <h2 mat-dialog-title class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n }\n @if (data.message) {\n <div class=\"sd-dialog-confirm__message\" [innerHtml]=\"data.message\"></div>\n }\n </div>\n </div>\n @if (hasFields) {\n <div class=\"sd-dialog-confirm__fields\">\n @if (data.input) {\n <sd-textarea\n [label]=\"data.input.label\"\n [placeholder]=\"data.input.placeholder\"\n [(model)]=\"value\"\n [rows]=\"3\"\n [required]=\"data.input.required\"\n [maxlength]=\"data.input.maxlength!\" />\n }\n @if (data.select) {\n <sd-select\n [placeholder]=\"data.select.placeholder\"\n [items]=\"data.select.items\"\n [valueField]=\"data.select.valueField\"\n [displayField]=\"data.select.displayField\"\n [multiple]=\"data.select.multiple\"\n [(model)]=\"value\"\n [required]=\"data.select.required\">\n </sd-select>\n }\n @if (data.date) {\n <sd-date\n [placeholder]=\"data.date.placeholder\"\n [(model)]=\"value\"\n type=\"date\"\n [min]=\"data.date.min!\"\n [max]=\"data.date.max!\"\n [required]=\"data.date.required\">\n </sd-date>\n }\n @if (data.datetime) {\n <sd-datetime\n [placeholder]=\"data.datetime.placeholder\"\n [(model)]=\"value\"\n [min]=\"data.datetime.min!\"\n [max]=\"data.datetime.max!\"\n [showSeconds]=\"data.datetime.showSeconds\"\n [required]=\"data.datetime.required\">\n </sd-datetime>\n }\n @if (data.radio) {\n <sd-radio\n [items]=\"data.radio.items\"\n [valueField]=\"data.radio.valueField\"\n [displayField]=\"data.radio.displayField\"\n [display]=\"data.radio.display || 'column'\"\n [(model)]=\"value\"\n [required]=\"data.radio.required\">\n </sd-radio>\n }\n </div>\n }\n</ng-template>\n\n@if (isBottomSheet) {\n <!-- why: bottom sheet kh\u00F4ng c\u00F3 MatDialogRef n\u00EAn kh\u00F4ng d\u00F9ng directive mat-dialog-*; n\u00FAt ch\u00EDnh \u0111\u1EE9ng tr\u00EAn, full-width, cao 48px. -->\n <div class=\"sd-dialog-confirm__content sd-dialog-confirm__content--sheet\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <ng-container [ngTemplateOutlet]=\"body\" />\n </div>\n <div class=\"sd-dialog-confirm__actions sd-dialog-confirm__actions--sheet\">\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n block\n size=\"lg\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"acceptDisabled\"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n block\n size=\"lg\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n </div>\n} @else {\n <div mat-dialog-content class=\"sd-dialog-confirm__content\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <ng-container [ngTemplateOutlet]=\"body\" />\n </div>\n <div mat-dialog-actions align=\"end\" class=\"sd-dialog-confirm__actions\">\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n size=\"sm\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n size=\"sm\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"acceptDisabled\"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;min-height:0;max-height:calc(100dvh - 32px);padding:20px;overflow:hidden}.sd-dialog-confirm__content{min-height:0;max-height:none;margin:0;padding:0;color:var(--sd-text)}.sd-dialog-confirm__header{display:flex;align-items:flex-start;gap:12px}.sd-dialog-confirm__icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:var(--sd-icon-shape-radius, var(--sd-radius-8, 8px));color:var(--sd-primary-dark);background:var(--sd-primary-light)}.sd-dialog-confirm__icon[data-tone=success]{color:var(--sd-success-dark);background:var(--sd-success-light)}.sd-dialog-confirm__icon[data-tone=info]{color:var(--sd-info-dark);background:var(--sd-info-light)}.sd-dialog-confirm__icon[data-tone=warning]{color:var(--sd-warning-dark);background:var(--sd-warning-light)}.sd-dialog-confirm__icon[data-tone=error]{color:var(--sd-error-dark);background:var(--sd-error-light)}.sd-dialog-confirm__icon[data-icon-shape=circle]{border-radius:50%}.sd-dialog-confirm__icon[data-icon-shape=none]{background:transparent}.sd-dialog-confirm__icon sd-icon{width:22px;height:22px;font-size:var(--sd-font-size-22, 22px);line-height:var(--sd-line-height-22, 22px)}.sd-dialog-confirm__copy{min-width:0}.sd-dialog-confirm__title{margin:0 0 6px;padding:0;font:inherit;font-size:var(--sd-font-size-18, 18px);font-weight:var(--sd-font-weight-semibold, 600);line-height:25px;letter-spacing:normal;color:var(--sd-text);overflow-wrap:anywhere}.sd-dialog-confirm__title:before{display:none}.sd-dialog-confirm__message{font-size:var(--sd-font-size-14, 14px);line-height:21px;letter-spacing:normal;color:var(--sd-text-secondary);overflow-wrap:anywhere}.sd-dialog-confirm__fields{margin-top:20px}.sd-dialog-confirm__fields sd-radio{height:auto}.sd-dialog-confirm__fields ::ng-deep .mdc-radio{display:inline-flex;align-items:center;justify-content:center}.sd-dialog-confirm__fields ::ng-deep .mat-mdc-radio-button{display:inline-flex;align-items:center;min-height:48px}.sd-dialog-confirm__fields ::ng-deep .c-radio-group-row{flex-wrap:wrap;row-gap:4px}.sd-dialog-confirm__actions{flex-shrink:0;gap:8px;min-height:0;margin:24px 0 0;padding:0}::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{border-radius:var(--sd-radius-8, 8px);box-shadow:0 16px 48px #00000029,0 2px 8px #0000000f}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:last-child{margin-bottom:0}@media(prefers-reduced-motion:reduce){::ng-deep .sd-confirm-panel .mat-mdc-dialog-container,::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{transition:none!important}}@media(max-width:600px){::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button{flex:1}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button button{width:100%;min-height:44px}}@media(max-width:600px){:host{padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}}::ng-deep .sd-confirm-bottom-sheet.mat-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet.mat-mdc-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet .mat-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet .mat-mdc-bottom-sheet-container{display:flex;flex-direction:column;box-sizing:border-box;max-height:min(80vh,100vh - 16px);max-height:min(80vh,100dvh - 16px);padding:0 max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));overflow:hidden}:host(.sd-dialog-confirm--sheet){max-height:inherit;padding:20px 0 max(16px,env(safe-area-inset-bottom,0px))}.sd-dialog-confirm__content--sheet{flex:1 1 auto;overflow-y:auto}.sd-dialog-confirm__actions--sheet{display:flex;flex-direction:column;margin-top:16px}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__message>:last-child{margin-bottom:0}\n"] }]
|
|
78
105
|
}], ctorParameters: () => [] });
|
|
79
106
|
|
|
107
|
+
const BOTTOM_SHEET_PANEL_CLASS = 'sd-confirm-bottom-sheet';
|
|
80
108
|
class SdConfirmService {
|
|
81
109
|
dialog = inject(MatDialog);
|
|
110
|
+
#bottomSheet = inject(MatBottomSheet);
|
|
111
|
+
// why: đọc một lần, cùng nguồn nhận diện mobile với sd-modal để hai nơi chọn kiểu hiển thị giống nhau.
|
|
112
|
+
#isMobile = BrowserUtilities.isMobile();
|
|
82
113
|
#i18n = inject(I18nService);
|
|
83
114
|
constructor() { }
|
|
84
115
|
/**
|
|
@@ -99,170 +130,151 @@ class SdConfirmService {
|
|
|
99
130
|
reject(result?.action ?? 'CANCEL');
|
|
100
131
|
});
|
|
101
132
|
});
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
133
|
+
/**
|
|
134
|
+
* Đường mở duy nhất của cả 6 API: chọn dialog hay bottom sheet, tính quyền đóng bằng nền/Esc rồi trả về stream đóng
|
|
135
|
+
* để `#settleOnClose` biến thành Promise.
|
|
136
|
+
*
|
|
137
|
+
* why: mỗi API trước đây tự gọi `dialog.open` với cùng một khối cấu hình. Gom lại để kiểu hiển thị và quy tắc cờ
|
|
138
|
+
* (`enableBackdropClose` thắng `disableBackdropClose`) không thể lệch nhau giữa các API.
|
|
139
|
+
*/
|
|
140
|
+
#open(option, width, autoFocus, data) {
|
|
141
|
+
const closeAllowed = option?.enableBackdropClose ?? option?.disableBackdropClose === false;
|
|
142
|
+
const disableClose = !closeAllowed;
|
|
143
|
+
const view = option?.view ?? (this.#isMobile ? 'bottom-sheet' : 'dialog');
|
|
144
|
+
if (view === 'bottom-sheet') {
|
|
145
|
+
return this.#bottomSheet
|
|
146
|
+
.open(DialogConfirmComponent, {
|
|
147
|
+
panelClass: BOTTOM_SHEET_PANEL_CLASS,
|
|
148
|
+
// why: tiêu đề cho phép HTML (innerHtml) nhưng tên cho trình đọc màn hình phải là text thuần.
|
|
149
|
+
ariaLabel: (data.title ?? '').replace(/<[^>]*>/g, '').trim(),
|
|
150
|
+
autoFocus,
|
|
151
|
+
disableClose,
|
|
152
|
+
data,
|
|
153
|
+
})
|
|
154
|
+
.afterDismissed();
|
|
155
|
+
}
|
|
156
|
+
return this.dialog
|
|
157
|
+
.open(DialogConfirmComponent, {
|
|
158
|
+
width,
|
|
105
159
|
panelClass: 'sd-confirm-panel',
|
|
106
160
|
maxWidth: 'calc(100vw - 32px)',
|
|
107
161
|
maxHeight: 'calc(100dvh - 32px)',
|
|
108
|
-
autoFocus
|
|
109
|
-
disableClose
|
|
110
|
-
data
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
162
|
+
autoFocus,
|
|
163
|
+
disableClose,
|
|
164
|
+
data,
|
|
165
|
+
})
|
|
166
|
+
.afterClosed();
|
|
167
|
+
}
|
|
168
|
+
confirm = (message, option = {}) => {
|
|
169
|
+
return this.#settleOnClose(this.#open(option, option?.width || '440px', '[data-confirm-cancel] button', {
|
|
170
|
+
icon: option?.icon,
|
|
171
|
+
iconShape: option?.iconShape,
|
|
172
|
+
title: option?.title || this.#i18n.t('core.confirm.title'),
|
|
173
|
+
message,
|
|
174
|
+
yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes'),
|
|
175
|
+
noTitle: option?.noTitle || this.#i18n.t('core.confirm.no'),
|
|
176
|
+
noButtonColor: option?.noButtonColor || 'secondary',
|
|
177
|
+
yesButtonColor: option?.yesButtonColor || 'primary',
|
|
178
|
+
}));
|
|
122
179
|
};
|
|
123
180
|
withInput = (message, option) => {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
yesButtonColor: option?.yesButtonColor || 'primary',
|
|
140
|
-
input: {
|
|
141
|
-
label: option?.label,
|
|
142
|
-
placeholder: option?.placeholder,
|
|
143
|
-
maxlength: option?.maxlength || 255,
|
|
144
|
-
required: option?.required,
|
|
145
|
-
defaultValue: option?.defaultValue || '',
|
|
146
|
-
},
|
|
181
|
+
return this.#settleOnClose(this.#open(option, '440px', 'textarea', {
|
|
182
|
+
icon: option?.icon,
|
|
183
|
+
iconShape: option?.iconShape,
|
|
184
|
+
title: option?.title || this.#i18n.t('core.confirm.title'),
|
|
185
|
+
message,
|
|
186
|
+
yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
|
|
187
|
+
noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
|
|
188
|
+
noButtonColor: option?.noButtonColor || 'secondary',
|
|
189
|
+
yesButtonColor: option?.yesButtonColor || 'primary',
|
|
190
|
+
input: {
|
|
191
|
+
label: option?.label,
|
|
192
|
+
placeholder: option?.placeholder,
|
|
193
|
+
maxlength: option?.maxlength || 255,
|
|
194
|
+
required: option?.required,
|
|
195
|
+
defaultValue: option?.defaultValue || '',
|
|
147
196
|
},
|
|
148
|
-
});
|
|
149
|
-
return this.#settleOnClose(dialogRef.afterClosed());
|
|
197
|
+
}));
|
|
150
198
|
};
|
|
151
199
|
withRadio = (message, option) => {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
radio: {
|
|
169
|
-
items: option?.items || [],
|
|
170
|
-
valueField: option?.valueField || 'value',
|
|
171
|
-
displayField: option?.displayField || 'label',
|
|
172
|
-
display: option?.display || 'row',
|
|
173
|
-
required: option?.required,
|
|
174
|
-
defaultValue: option?.defaultValue,
|
|
175
|
-
},
|
|
200
|
+
return this.#settleOnClose(this.#open(option, '440px', 'first-tabbable', {
|
|
201
|
+
icon: option?.icon,
|
|
202
|
+
iconShape: option?.iconShape,
|
|
203
|
+
title: option?.title || this.#i18n.t('core.confirm.title'),
|
|
204
|
+
message,
|
|
205
|
+
yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
|
|
206
|
+
noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
|
|
207
|
+
noButtonColor: option?.noButtonColor || 'secondary',
|
|
208
|
+
yesButtonColor: option?.yesButtonColor || 'primary',
|
|
209
|
+
radio: {
|
|
210
|
+
items: option?.items || [],
|
|
211
|
+
valueField: option?.valueField || 'value',
|
|
212
|
+
displayField: option?.displayField || 'label',
|
|
213
|
+
display: option?.display || 'row',
|
|
214
|
+
required: option?.required,
|
|
215
|
+
defaultValue: option?.defaultValue,
|
|
176
216
|
},
|
|
177
|
-
});
|
|
178
|
-
return this.#settleOnClose(dialogRef.afterClosed());
|
|
217
|
+
}));
|
|
179
218
|
};
|
|
180
219
|
withSelect = (message, option) => {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
items: option?.items || [],
|
|
199
|
-
valueField: option?.valueField || 'value',
|
|
200
|
-
displayField: option?.displayField || 'label',
|
|
201
|
-
placeholder: option?.placeholder,
|
|
202
|
-
multiple: option?.multiple,
|
|
203
|
-
required: option?.required,
|
|
204
|
-
defaultValue: option?.defaultValue,
|
|
205
|
-
},
|
|
220
|
+
return this.#settleOnClose(this.#open(option, '440px', 'first-tabbable', {
|
|
221
|
+
icon: option?.icon,
|
|
222
|
+
iconShape: option?.iconShape,
|
|
223
|
+
title: option?.title || this.#i18n.t('core.confirm.title'),
|
|
224
|
+
message,
|
|
225
|
+
yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
|
|
226
|
+
noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
|
|
227
|
+
noButtonColor: option?.noButtonColor || 'secondary',
|
|
228
|
+
yesButtonColor: option?.yesButtonColor || 'primary',
|
|
229
|
+
select: {
|
|
230
|
+
items: option?.items || [],
|
|
231
|
+
valueField: option?.valueField || 'value',
|
|
232
|
+
displayField: option?.displayField || 'label',
|
|
233
|
+
placeholder: option?.placeholder,
|
|
234
|
+
multiple: option?.multiple,
|
|
235
|
+
required: option?.required,
|
|
236
|
+
defaultValue: option?.defaultValue,
|
|
206
237
|
},
|
|
207
|
-
});
|
|
208
|
-
return this.#settleOnClose(dialogRef.afterClosed());
|
|
238
|
+
}));
|
|
209
239
|
};
|
|
210
240
|
withDate = (message, option) => {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
yesButtonColor: option?.yesButtonColor || 'primary',
|
|
227
|
-
date: {
|
|
228
|
-
placeholder: option?.placeholder,
|
|
229
|
-
required: option?.required,
|
|
230
|
-
defaultValue: option?.defaultValue || '',
|
|
231
|
-
min: option?.min,
|
|
232
|
-
max: option?.max,
|
|
233
|
-
},
|
|
241
|
+
return this.#settleOnClose(this.#open(option, '440px', 'first-tabbable', {
|
|
242
|
+
icon: option?.icon,
|
|
243
|
+
iconShape: option?.iconShape,
|
|
244
|
+
title: option?.title || this.#i18n.t('core.confirm.title'),
|
|
245
|
+
message,
|
|
246
|
+
yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
|
|
247
|
+
noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
|
|
248
|
+
noButtonColor: option?.noButtonColor || 'secondary',
|
|
249
|
+
yesButtonColor: option?.yesButtonColor || 'primary',
|
|
250
|
+
date: {
|
|
251
|
+
placeholder: option?.placeholder,
|
|
252
|
+
required: option?.required,
|
|
253
|
+
defaultValue: option?.defaultValue || '',
|
|
254
|
+
min: option?.min,
|
|
255
|
+
max: option?.max,
|
|
234
256
|
},
|
|
235
|
-
});
|
|
236
|
-
return this.#settleOnClose(dialogRef.afterClosed());
|
|
257
|
+
}));
|
|
237
258
|
};
|
|
238
259
|
withDatetime = (message, option) => {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
datetime: {
|
|
256
|
-
placeholder: option?.placeholder,
|
|
257
|
-
required: option?.required,
|
|
258
|
-
defaultValue: option?.defaultValue || '',
|
|
259
|
-
min: option?.min,
|
|
260
|
-
max: option?.max,
|
|
261
|
-
showSeconds: option?.showSeconds,
|
|
262
|
-
},
|
|
260
|
+
return this.#settleOnClose(this.#open(option, '440px', 'first-tabbable', {
|
|
261
|
+
icon: option?.icon,
|
|
262
|
+
iconShape: option?.iconShape,
|
|
263
|
+
title: option?.title || this.#i18n.t('core.confirm.title'),
|
|
264
|
+
message,
|
|
265
|
+
yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
|
|
266
|
+
noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
|
|
267
|
+
noButtonColor: option?.noButtonColor || 'secondary',
|
|
268
|
+
yesButtonColor: option?.yesButtonColor || 'primary',
|
|
269
|
+
datetime: {
|
|
270
|
+
placeholder: option?.placeholder,
|
|
271
|
+
required: option?.required,
|
|
272
|
+
defaultValue: option?.defaultValue || '',
|
|
273
|
+
min: option?.min,
|
|
274
|
+
max: option?.max,
|
|
275
|
+
showSeconds: option?.showSeconds,
|
|
263
276
|
},
|
|
264
|
-
});
|
|
265
|
-
return this.#settleOnClose(dialogRef.afterClosed());
|
|
277
|
+
}));
|
|
266
278
|
};
|
|
267
279
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdConfirmService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
268
280
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdConfirmService, providedIn: 'root' });
|
|
@@ -277,10 +289,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
277
289
|
/*
|
|
278
290
|
* Public API Surface of superdev-angular-core
|
|
279
291
|
*/
|
|
292
|
+
// why: DialogConfirmComponent và DialogData là chi tiết nội bộ của SdConfirmService; consumer chỉ dùng service.
|
|
280
293
|
|
|
281
294
|
/**
|
|
282
295
|
* Generated bundle index. Do not edit.
|
|
283
296
|
*/
|
|
284
297
|
|
|
285
|
-
export {
|
|
298
|
+
export { SdConfirmService };
|
|
286
299
|
//# sourceMappingURL=sdcorejs-angular-services-confirm.mjs.map
|