@sdcorejs/angular 22.3.4 → 22.3.5
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/fesm2022/sdcorejs-angular-components-form-generic.mjs +5 -5
- 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-modal.mjs +46 -10
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +172 -152
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +5657 -3783
- package/fesm2022/sdcorejs-angular-components-table.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 +190 -0
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +10 -6
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-excel.mjs +34 -0
- package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
- package/package.json +1 -1
- package/types/sdcorejs-angular-components-modal.d.ts +6 -1
- package/types/sdcorejs-angular-components-query-bar.d.ts +28 -2
- package/types/sdcorejs-angular-components-table.d.ts +282 -24
- package/types/sdcorejs-angular-i18n.d.ts +38 -0
- package/types/sdcorejs-angular-services-excel.d.ts +59 -0
|
@@ -38,6 +38,11 @@ class SdModal {
|
|
|
38
38
|
disableBackdropClose = input(true, { ...(ngDevMode ? { debugName: "disableBackdropClose" } : /* istanbul ignore next */ {}), transform: booleanAttribute }); // default to true to keep backward compatibility
|
|
39
39
|
beforeClose = input(undefined, /* @ts-ignore */
|
|
40
40
|
...(ngDevMode ? [{ debugName: "beforeClose" }] : /* istanbul ignore next */ []));
|
|
41
|
+
/**
|
|
42
|
+
* Close when the browser history changes (Back, a route change). `false` lets the content handle Back itself, e.g.
|
|
43
|
+
* a sheet with pages. Same name as `MatDialogConfig.closeOnNavigation`.
|
|
44
|
+
*/
|
|
45
|
+
closeOnNavigation = input(true, { ...(ngDevMode ? { debugName: "closeOnNavigation" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
41
46
|
sdClosed = output();
|
|
42
47
|
sdCloseError = output();
|
|
43
48
|
isOpened = signal(false, /* @ts-ignore */
|
|
@@ -54,16 +59,45 @@ class SdModal {
|
|
|
54
59
|
#destroyRef = inject(DestroyRef);
|
|
55
60
|
constructor() {
|
|
56
61
|
this.#isMobile = BrowserUtilities.isMobile();
|
|
57
|
-
// BottomSheetConfig has no ariaLabelledBy; bind its real container to the live heading.
|
|
58
|
-
|
|
62
|
+
// BottomSheetConfig has no ariaLabelledBy; bind its real container to the live heading. A custom `sdHeaderLeft`
|
|
63
|
+
// may swap its heading (a sheet with pages), so the binding follows changes of the header.
|
|
64
|
+
effect(onCleanup => {
|
|
59
65
|
const title = this.title();
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
const root = this.modal()?.nativeElement;
|
|
67
|
+
const container = root?.closest('[role="dialog"]');
|
|
68
|
+
if (!root || !container)
|
|
69
|
+
return;
|
|
70
|
+
const bind = () => {
|
|
71
|
+
const label = title ? this.#labelOf(root) : undefined;
|
|
72
|
+
if (label)
|
|
73
|
+
container.setAttribute('aria-labelledby', label);
|
|
74
|
+
else
|
|
75
|
+
container.removeAttribute('aria-labelledby');
|
|
76
|
+
};
|
|
77
|
+
bind();
|
|
78
|
+
const left = root.querySelector('.sd-modal-header-left');
|
|
79
|
+
if (!left || typeof MutationObserver === 'undefined')
|
|
80
|
+
return;
|
|
81
|
+
const observer = new MutationObserver(bind);
|
|
82
|
+
observer.observe(left, { childList: true, subtree: true });
|
|
83
|
+
onCleanup(() => observer.disconnect());
|
|
65
84
|
});
|
|
66
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Id of the element that names the modal: the default title, or the first heading of a custom `sdHeaderLeft`. Only
|
|
88
|
+
* without a heading does the whole left cell (with its buttons) name it.
|
|
89
|
+
*/
|
|
90
|
+
#labelOf(root) {
|
|
91
|
+
const left = root.querySelector('.sd-modal-header-left');
|
|
92
|
+
if (!left)
|
|
93
|
+
return undefined;
|
|
94
|
+
const heading = left.querySelector(`#${this.titleId}, h1, h2, h3, h4, h5, h6, [role="heading"]`) ?? left;
|
|
95
|
+
if (heading !== left && left.id === this.titleId)
|
|
96
|
+
left.removeAttribute('id');
|
|
97
|
+
if (!heading.id)
|
|
98
|
+
heading.id = this.titleId;
|
|
99
|
+
return heading.id;
|
|
100
|
+
}
|
|
67
101
|
// why: PHẢI là ngOnDestroy, KHÔNG phải #destroyRef.onDestroy. Angular chạy executeOnDestroys
|
|
68
102
|
// (ngOnDestroy) TRƯỚC processCleanups (mọi callback DestroyRef.onDestroy). `sdClosed = output()`
|
|
69
103
|
// tự đăng ký một DestroyRef.onDestroy trong constructor của OutputEmitterRef ngay lúc khởi tạo
|
|
@@ -119,6 +153,7 @@ class SdModal {
|
|
|
119
153
|
panelClass: this.#resolvePanelClass('sd-modal-bottom-sheet-panel'),
|
|
120
154
|
ariaLabel: this.title() || undefined,
|
|
121
155
|
disableClose: this.disableBackdropClose() || !!this.beforeClose(),
|
|
156
|
+
closeOnNavigation: this.closeOnNavigation(),
|
|
122
157
|
});
|
|
123
158
|
this.#bindGuardedDismiss(this.#bottomSheetRef);
|
|
124
159
|
this.#bottomSheetRef.afterDismissed().pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(this.#markClosed);
|
|
@@ -130,6 +165,7 @@ class SdModal {
|
|
|
130
165
|
panelClass: this.#resolvePanelClass('sd-modal-panel'),
|
|
131
166
|
ariaLabelledBy: this.title() ? this.titleId : undefined,
|
|
132
167
|
disableClose: this.disableBackdropClose() || !!this.beforeClose(),
|
|
168
|
+
closeOnNavigation: this.closeOnNavigation(),
|
|
133
169
|
});
|
|
134
170
|
this.#bindGuardedDismiss(this.#dialogRef);
|
|
135
171
|
this.#dialogRef.afterClosed().pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(this.#markClosed);
|
|
@@ -209,12 +245,12 @@ class SdModal {
|
|
|
209
245
|
return classes;
|
|
210
246
|
}
|
|
211
247
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
212
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SdModal, isStandalone: true, selector: "sd-modal", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, modalClass: { classPropertyName: "modalClass", publicName: "modalClass", isSignal: true, isRequired: false, transformFunction: null }, lazyLoadContent: { classPropertyName: "lazyLoadContent", publicName: "lazyLoadContent", isSignal: true, isRequired: false, transformFunction: null }, hideClose: { classPropertyName: "hideClose", publicName: "hideClose", isSignal: true, isRequired: false, transformFunction: null }, disableBackdropClose: { classPropertyName: "disableBackdropClose", publicName: "disableBackdropClose", isSignal: true, isRequired: false, transformFunction: null }, beforeClose: { classPropertyName: "beforeClose", publicName: "beforeClose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdClosed: "sdClosed", sdCloseError: "sdCloseError" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }, { propertyName: "modal", first: true, predicate: ["modal"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef>\n @let _title = title();\n <div #modal class=\"sd-modal-root\" [attr.data-autoId]=\"autoId()\" [attr.data-opened]=\"dataOpened()\">\n @if (!lazyLoadContent() || alreadyOpened()) {\n @if (_title) {\n <div class=\"sd-modal-header\">\n <div class=\"sd-modal-header-left\"
|
|
248
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SdModal, isStandalone: true, selector: "sd-modal", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, modalClass: { classPropertyName: "modalClass", publicName: "modalClass", isSignal: true, isRequired: false, transformFunction: null }, lazyLoadContent: { classPropertyName: "lazyLoadContent", publicName: "lazyLoadContent", isSignal: true, isRequired: false, transformFunction: null }, hideClose: { classPropertyName: "hideClose", publicName: "hideClose", isSignal: true, isRequired: false, transformFunction: null }, disableBackdropClose: { classPropertyName: "disableBackdropClose", publicName: "disableBackdropClose", isSignal: true, isRequired: false, transformFunction: null }, beforeClose: { classPropertyName: "beforeClose", publicName: "beforeClose", isSignal: true, isRequired: false, transformFunction: null }, closeOnNavigation: { classPropertyName: "closeOnNavigation", publicName: "closeOnNavigation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdClosed: "sdClosed", sdCloseError: "sdCloseError" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }, { propertyName: "modal", first: true, predicate: ["modal"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef>\n @let _title = title();\n <div #modal class=\"sd-modal-root\" [attr.data-autoId]=\"autoId()\" [attr.data-opened]=\"dataOpened()\">\n @if (!lazyLoadContent() || alreadyOpened()) {\n @if (_title) {\n <div class=\"sd-modal-header\">\n <div class=\"sd-modal-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n <div class=\"sd-modal-title T18M\" [id]=\"titleId\">{{ _title }}</div>\n </ng-content>\n </div>\n <div class=\"sd-modal-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (!hideClose()) {\n <button\n type=\"button\"\n class=\"sd-modal-close-btn\"\n aria-label=\"Close\"\n (click)=\"close()\"\n [attr.data-autoId]=\"closeButtonAutoId()\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n <div class=\"sd-modal-body\">\n <ng-content></ng-content>\n </div>\n <div class=\"sd-modal-footer\" #footer>\n <div class=\"sd-modal-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-modal-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n }\n </div>\n</ng-template>\n", styles: [".sd-modal-root button:focus{outline:none!important}.sd-modal-root button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary))!important;outline-offset:2px}.sd-modal-panel,.sd-modal-bottom-sheet-panel{--sd-modal-radius: var(--sd-overlay-radius, 8px);--sd-modal-bottom-sheet-radius: var(--sd-overlay-bottom-sheet-radius, 12px);--sd-modal-surface: var(--sd-overlay-surface, var(--sd-surface, #fff));--sd-modal-border: var(--sd-border, #dde0e5);--sd-modal-shadow: 0 6px 18px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .12)}.sd-modal-panel .mat-mdc-dialog-container{--mdc-dialog-container-shape: var(--sd-modal-radius);--mat-dialog-container-shape: var(--sd-modal-radius)}.sd-modal-panel .mat-mdc-dialog-surface,.sd-modal-panel .mdc-dialog__surface,.sd-modal-panel .mat-dialog-container{padding:0!important;border-radius:var(--sd-modal-radius)!important;background:var(--sd-modal-surface);max-height:calc(100dvh - 32px);overflow:hidden;box-shadow:var(--sd-modal-shadow)}.sd-modal-panel .mat-dialog-container .mat-dialog-content,.sd-modal-panel .mat-dialog-container .mat-mdc-dialog-content,.sd-modal-panel .mat-mdc-dialog-container .mat-dialog-content,.sd-modal-panel .mat-mdc-dialog-container .mat-mdc-dialog-content{max-height:80vh}.sd-modal-panel .mat-dialog-container .mat-dialog-actions,.sd-modal-panel .mat-dialog-container .mat-mdc-dialog-actions,.sd-modal-panel .mat-mdc-dialog-container .mat-dialog-actions,.sd-modal-panel .mat-mdc-dialog-container .mat-mdc-dialog-actions{min-height:auto;margin-bottom:0;padding:0}.sd-modal-root{display:flex;width:100%;max-height:inherit;flex-direction:column;background:var(--sd-modal-surface, var(--sd-surface, #fff));border-radius:inherit;overflow:hidden}.sd-modal-header{min-height:56px;display:flex;align-items:center;gap:16px}.sd-modal-header-left{display:flex;align-items:center;flex:1 1 auto;min-width:0}.sd-modal-header-right{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:0 0 auto}.sd-modal-title{min-width:0}.sd-modal-body{flex:1 1 auto;min-height:0;width:100%;max-height:80vh;overflow:auto;padding:0}.sd-modal-close-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:32px;height:32px;margin-left:8px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--sd-text-secondary);line-height:0;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color 80ms ease,color 80ms ease}.sd-modal-close-btn:hover{background:var(--sd-surface-muted);color:var(--sd-text)}.sd-modal-close-btn:active{background:var(--sd-border)}.sd-modal-close-btn:focus{outline:none!important}.sd-modal-close-btn:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary))!important;outline-offset:2px}.sd-modal-close-btn sd-icon{display:block;width:20px;height:20px;font-size:var(--sd-font-size-20, 20px);line-height:var(--sd-line-height-20, 20px)}.cdk-overlay-pane.sd-modal-bottom-sheet-panel{width:100%}.sd-modal-bottom-sheet-panel.mat-bottom-sheet-container,.sd-modal-bottom-sheet-panel.mat-mdc-bottom-sheet-container,.sd-modal-bottom-sheet-panel .mat-bottom-sheet-container,.sd-modal-bottom-sheet-panel .mat-mdc-bottom-sheet-container{padding:0;width:100%;min-width:0;max-width:100%;box-sizing:border-box;outline:0;max-height:min(80vh,100dvh - 16px);overflow:hidden;border-radius:var(--sd-modal-bottom-sheet-radius) var(--sd-modal-bottom-sheet-radius) 0 0!important;background:var(--sd-modal-surface);box-shadow:var(--sd-modal-shadow);display:flex;flex-direction:column}.sd-modal-footer{min-height:56px;border-top:1px solid var(--sd-modal-border);display:flex;align-items:center;justify-content:space-between;gap:16px}.sd-modal-footer-left,.sd-modal-footer-right{display:flex;align-items:center;gap:8px;min-width:0}.sd-modal-footer-left{flex:1 1 auto}.sd-modal-footer-right{flex:0 0 auto;margin-left:auto;justify-content:flex-end}.sd-modal-footer-left:empty,.sd-modal-footer-right:empty{display:none}.sd-modal-footer:has(.sd-modal-footer-left:empty):has(.sd-modal-footer-right:empty){display:none}.sd-modal-header,.sd-modal-footer{flex-shrink:0;padding:12px 16px;background:var(--sd-modal-surface, var(--sd-overlay-surface, var(--sd-surface, #fff)))}.sd-modal-title{font-size:var(--sd-font-size-18, 18px);line-height:25px;font-weight:var(--sd-font-weight-semibold, 600);overflow-wrap:anywhere}.sd-modal-body{padding:12px 16px;box-sizing:border-box}@media(max-width:600px){.sd-modal-header{gap:8px}.sd-modal-footer{padding:12px 16px max(12px,env(safe-area-inset-bottom));flex-wrap:wrap;gap:8px}.sd-modal-footer-left,.sd-modal-footer-right{flex-wrap:wrap}.sd-modal-footer button,.sd-modal-close-btn{min-height:44px}.sd-modal-close-btn{width:44px}}@media(prefers-reduced-motion:reduce){.sd-modal-panel .mat-mdc-dialog-container,.sd-modal-panel .mat-mdc-dialog-surface,.sd-modal-bottom-sheet-panel{transition:none!important;animation:none!important}}\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: MatBottomSheetModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatDividerModule }, { kind: "ngmodule", type: MatButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
213
249
|
}
|
|
214
250
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdModal, decorators: [{
|
|
215
251
|
type: Component,
|
|
216
|
-
args: [{ selector: 'sd-modal', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SdIcon, CommonModule, MatBottomSheetModule, MatDialogModule, MatDividerModule, MatButtonModule], template: "<ng-template #templateRef>\n @let _title = title();\n <div #modal class=\"sd-modal-root\" [attr.data-autoId]=\"autoId()\" [attr.data-opened]=\"dataOpened()\">\n @if (!lazyLoadContent() || alreadyOpened()) {\n @if (_title) {\n <div class=\"sd-modal-header\">\n <div class=\"sd-modal-header-left\"
|
|
217
|
-
}], ctorParameters: () => [], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], modal: [{ type: i0.ViewChild, args: ['modal', { isSignal: true }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], modalClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalClass", required: false }] }], lazyLoadContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyLoadContent", required: false }] }], hideClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideClose", required: false }] }], disableBackdropClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBackdropClose", required: false }] }], beforeClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "beforeClose", required: false }] }], sdClosed: [{ type: i0.Output, args: ["sdClosed"] }], sdCloseError: [{ type: i0.Output, args: ["sdCloseError"] }] } });
|
|
252
|
+
args: [{ selector: 'sd-modal', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SdIcon, CommonModule, MatBottomSheetModule, MatDialogModule, MatDividerModule, MatButtonModule], template: "<ng-template #templateRef>\n @let _title = title();\n <div #modal class=\"sd-modal-root\" [attr.data-autoId]=\"autoId()\" [attr.data-opened]=\"dataOpened()\">\n @if (!lazyLoadContent() || alreadyOpened()) {\n @if (_title) {\n <div class=\"sd-modal-header\">\n <div class=\"sd-modal-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n <div class=\"sd-modal-title T18M\" [id]=\"titleId\">{{ _title }}</div>\n </ng-content>\n </div>\n <div class=\"sd-modal-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (!hideClose()) {\n <button\n type=\"button\"\n class=\"sd-modal-close-btn\"\n aria-label=\"Close\"\n (click)=\"close()\"\n [attr.data-autoId]=\"closeButtonAutoId()\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n <div class=\"sd-modal-body\">\n <ng-content></ng-content>\n </div>\n <div class=\"sd-modal-footer\" #footer>\n <div class=\"sd-modal-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-modal-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n }\n </div>\n</ng-template>\n", styles: [".sd-modal-root button:focus{outline:none!important}.sd-modal-root button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary))!important;outline-offset:2px}.sd-modal-panel,.sd-modal-bottom-sheet-panel{--sd-modal-radius: var(--sd-overlay-radius, 8px);--sd-modal-bottom-sheet-radius: var(--sd-overlay-bottom-sheet-radius, 12px);--sd-modal-surface: var(--sd-overlay-surface, var(--sd-surface, #fff));--sd-modal-border: var(--sd-border, #dde0e5);--sd-modal-shadow: 0 6px 18px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .12)}.sd-modal-panel .mat-mdc-dialog-container{--mdc-dialog-container-shape: var(--sd-modal-radius);--mat-dialog-container-shape: var(--sd-modal-radius)}.sd-modal-panel .mat-mdc-dialog-surface,.sd-modal-panel .mdc-dialog__surface,.sd-modal-panel .mat-dialog-container{padding:0!important;border-radius:var(--sd-modal-radius)!important;background:var(--sd-modal-surface);max-height:calc(100dvh - 32px);overflow:hidden;box-shadow:var(--sd-modal-shadow)}.sd-modal-panel .mat-dialog-container .mat-dialog-content,.sd-modal-panel .mat-dialog-container .mat-mdc-dialog-content,.sd-modal-panel .mat-mdc-dialog-container .mat-dialog-content,.sd-modal-panel .mat-mdc-dialog-container .mat-mdc-dialog-content{max-height:80vh}.sd-modal-panel .mat-dialog-container .mat-dialog-actions,.sd-modal-panel .mat-dialog-container .mat-mdc-dialog-actions,.sd-modal-panel .mat-mdc-dialog-container .mat-dialog-actions,.sd-modal-panel .mat-mdc-dialog-container .mat-mdc-dialog-actions{min-height:auto;margin-bottom:0;padding:0}.sd-modal-root{display:flex;width:100%;max-height:inherit;flex-direction:column;background:var(--sd-modal-surface, var(--sd-surface, #fff));border-radius:inherit;overflow:hidden}.sd-modal-header{min-height:56px;display:flex;align-items:center;gap:16px}.sd-modal-header-left{display:flex;align-items:center;flex:1 1 auto;min-width:0}.sd-modal-header-right{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:0 0 auto}.sd-modal-title{min-width:0}.sd-modal-body{flex:1 1 auto;min-height:0;width:100%;max-height:80vh;overflow:auto;padding:0}.sd-modal-close-btn{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;width:32px;height:32px;margin-left:8px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--sd-text-secondary);line-height:0;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color 80ms ease,color 80ms ease}.sd-modal-close-btn:hover{background:var(--sd-surface-muted);color:var(--sd-text)}.sd-modal-close-btn:active{background:var(--sd-border)}.sd-modal-close-btn:focus{outline:none!important}.sd-modal-close-btn:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary))!important;outline-offset:2px}.sd-modal-close-btn sd-icon{display:block;width:20px;height:20px;font-size:var(--sd-font-size-20, 20px);line-height:var(--sd-line-height-20, 20px)}.cdk-overlay-pane.sd-modal-bottom-sheet-panel{width:100%}.sd-modal-bottom-sheet-panel.mat-bottom-sheet-container,.sd-modal-bottom-sheet-panel.mat-mdc-bottom-sheet-container,.sd-modal-bottom-sheet-panel .mat-bottom-sheet-container,.sd-modal-bottom-sheet-panel .mat-mdc-bottom-sheet-container{padding:0;width:100%;min-width:0;max-width:100%;box-sizing:border-box;outline:0;max-height:min(80vh,100dvh - 16px);overflow:hidden;border-radius:var(--sd-modal-bottom-sheet-radius) var(--sd-modal-bottom-sheet-radius) 0 0!important;background:var(--sd-modal-surface);box-shadow:var(--sd-modal-shadow);display:flex;flex-direction:column}.sd-modal-footer{min-height:56px;border-top:1px solid var(--sd-modal-border);display:flex;align-items:center;justify-content:space-between;gap:16px}.sd-modal-footer-left,.sd-modal-footer-right{display:flex;align-items:center;gap:8px;min-width:0}.sd-modal-footer-left{flex:1 1 auto}.sd-modal-footer-right{flex:0 0 auto;margin-left:auto;justify-content:flex-end}.sd-modal-footer-left:empty,.sd-modal-footer-right:empty{display:none}.sd-modal-footer:has(.sd-modal-footer-left:empty):has(.sd-modal-footer-right:empty){display:none}.sd-modal-header,.sd-modal-footer{flex-shrink:0;padding:12px 16px;background:var(--sd-modal-surface, var(--sd-overlay-surface, var(--sd-surface, #fff)))}.sd-modal-title{font-size:var(--sd-font-size-18, 18px);line-height:25px;font-weight:var(--sd-font-weight-semibold, 600);overflow-wrap:anywhere}.sd-modal-body{padding:12px 16px;box-sizing:border-box}@media(max-width:600px){.sd-modal-header{gap:8px}.sd-modal-footer{padding:12px 16px max(12px,env(safe-area-inset-bottom));flex-wrap:wrap;gap:8px}.sd-modal-footer-left,.sd-modal-footer-right{flex-wrap:wrap}.sd-modal-footer button,.sd-modal-close-btn{min-height:44px}.sd-modal-close-btn{width:44px}}@media(prefers-reduced-motion:reduce){.sd-modal-panel .mat-mdc-dialog-container,.sd-modal-panel .mat-mdc-dialog-surface,.sd-modal-bottom-sheet-panel{transition:none!important;animation:none!important}}\n"] }]
|
|
253
|
+
}], ctorParameters: () => [], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }], modal: [{ type: i0.ViewChild, args: ['modal', { isSignal: true }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], modalClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalClass", required: false }] }], lazyLoadContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyLoadContent", required: false }] }], hideClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideClose", required: false }] }], disableBackdropClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableBackdropClose", required: false }] }], beforeClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "beforeClose", required: false }] }], closeOnNavigation: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnNavigation", required: false }] }], sdClosed: [{ type: i0.Output, args: ["sdClosed"] }], sdCloseError: [{ type: i0.Output, args: ["sdCloseError"] }] } });
|
|
218
254
|
|
|
219
255
|
/**
|
|
220
256
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdcorejs-angular-components-modal.mjs","sources":["../../../projects/sdcorejs-angular/components/modal/src/modal.component.ts","../../../projects/sdcorejs-angular/components/modal/src/modal.component.html","../../../projects/sdcorejs-angular/components/modal/sdcorejs-angular-components-modal.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n OnDestroy,\n TemplateRef,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n ViewEncapsulation,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatBottomSheet, MatBottomSheetModule, MatBottomSheetRef } from '@angular/material/bottom-sheet';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { BrowserUtilities } from '@sdcorejs/utils/fns';\nimport { Color, Size } from '@sdcorejs/utils/models';\nimport { SdIcon } from '@sdcorejs/angular/modules/icon';\nimport { Observable } from 'rxjs';\n\nlet nextModalTitleId = 0;\n\nexport type SdModalBeforeClose = () => boolean | Promise<boolean>;\n\ninterface SdModalDismissRef {\n backdropClick?: () => Observable<MouseEvent>;\n keydownEvents?: () => Observable<KeyboardEvent>;\n}\n\n@Component({\n selector: 'sd-modal',\n templateUrl: './modal.component.html',\n styleUrl: './modal.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [SdIcon, CommonModule, MatBottomSheetModule, MatDialogModule, MatDividerModule, MatButtonModule],\n})\nexport class SdModal implements OnDestroy {\n static index = signal(0);\n protected readonly titleId = `sd-modal-title-${nextModalTitleId++}`;\n\n templateRef = viewChild.required<TemplateRef<any>>('templateRef');\n modal = viewChild<ElementRef>('modal');\n\n // autoId prefix `modal-`. Lưu ý: footer/body buttons render qua <ng-content> nên consumer phải\n // tự đặt [attr.data-autoId] cho các nút đó. Component chỉ tự bind autoId cho NÚT ĐÓNG (X icon).\n readonly autoIdInput = input<string | undefined | null>(undefined, { alias: 'autoId' });\n readonly autoId = computed(() => (this.autoIdInput() ? `components-modal-${this.autoIdInput()}` : undefined));\n readonly closeButtonAutoId = computed(() => (this.autoId() ? `${this.autoId()}-close` : undefined));\n readonly dataOpened = computed(() => (this.isOpened() ? 'true' : 'false'));\n\n title = input<string, string | null | undefined>('', { transform: v => v ?? '' });\n color = input<Color, Color | null | undefined>('primary', { transform: v => v ?? 'primary' });\n width = input<Size | string, Size | string | null | undefined>('md', { transform: v => v ?? 'md' });\n height = input<string, string | null | undefined>('auto', { transform: v => v ?? 'auto' });\n view = input<'dialog' | 'bottom-sheet' | undefined, 'dialog' | 'bottom-sheet' | null | undefined>(undefined, {\n transform: v => v ?? undefined,\n });\n modalClass = input<string | string[] | Record<string, boolean>, string | string[] | Record<string, boolean> | null | undefined>('', {\n transform: v => v ?? '',\n });\n lazyLoadContent = input(true, { transform: booleanAttribute });\n hideClose = input<boolean, boolean | ''>(false, { transform: booleanAttribute });\n disableBackdropClose = input<boolean, boolean | ''>(true, { transform: booleanAttribute }); // default to true to keep backward compatibility\n beforeClose = input<SdModalBeforeClose | undefined>(undefined);\n\n sdClosed = output<void>();\n sdCloseError = output<unknown>();\n\n isOpened = signal(false);\n alreadyOpened = signal(false);\n\n #isMobile = false;\n #resolvedWidth = 'md';\n #bottomSheetRef!: MatBottomSheetRef<any>;\n #dialogRef!: MatDialogRef<any>;\n #closeRequest?: Promise<boolean>;\n\n #dialog = inject(MatDialog);\n #bottomSheet = inject(MatBottomSheet);\n #destroyRef = inject(DestroyRef);\n\n constructor() {\n this.#isMobile = BrowserUtilities.isMobile();\n // BottomSheetConfig has no ariaLabelledBy; bind its real container to the live heading.\n effect(() => {\n const title = this.title();\n const container = (this.modal()?.nativeElement as HTMLElement | undefined)?.closest('[role=\"dialog\"]');\n if (title) container?.setAttribute('aria-labelledby', this.titleId);\n else container?.removeAttribute('aria-labelledby');\n });\n }\n\n // why: PHẢI là ngOnDestroy, KHÔNG phải #destroyRef.onDestroy. Angular chạy executeOnDestroys\n // (ngOnDestroy) TRƯỚC processCleanups (mọi callback DestroyRef.onDestroy). `sdClosed = output()`\n // tự đăng ký một DestroyRef.onDestroy trong constructor của OutputEmitterRef ngay lúc khởi tạo\n // field — tức TRƯỚC hook nào đăng ký trong constructor của component. Đăng ký ở constructor thì\n // tới lượt mình chạy, emitter đã `destroyed = true` và `emit()` chỉ log cảnh báo rồi thoát.\n ngOnDestroy(): void {\n // why: overlay của MatDialog/MatBottomSheet sống trong CDK overlay container ở <body>,\n // KHÔNG nằm trong view của <sd-modal>. Host bị destroy (điều hướng route, @if tắt nhánh…)\n // mà không close ref thì overlay + backdrop ở lại mồ côi, che và chặn click cả trang.\n // Dùng forceClose (không qua beforeClose) vì đã destroy thì không thể huỷ việc đóng.\n //\n // Emit TRƯỚC khi forceClose: afterClosed()/afterDismissed() bắn BẤT ĐỒNG BỘ, mà subscription\n // của chúng dùng takeUntilDestroyed(#destroyRef) nên đã bị gỡ trước khi tới lượt. Không emit\n // ở đây thì destroy một modal đang mở sẽ đóng overlay mà KHÔNG bao giờ báo (sdClosed).\n this.#markClosed();\n this.forceClose();\n }\n\n // why: idempotent — chốt trên isOpened(). Đường destroy emit trước, nếu sau đó\n // afterClosed()/afterDismissed() vẫn kịp bắn thì lần thứ hai là no-op, không double-emit.\n #markClosed = (): void => {\n if (!this.isOpened()) return;\n this.isOpened.set(false);\n this.#closeRequest = undefined;\n this.sdClosed.emit();\n };\n\n #resolveWidth(): string {\n const w = this.width() || '80vw';\n if (this.#isMobile) return w;\n switch (w) {\n case 'lg':\n return '80vw';\n case 'md':\n return '60vw';\n case 'sm':\n return '40vw';\n case 'sx':\n return '20vw';\n default:\n return w;\n }\n }\n\n open = (): void => {\n if (this.isOpened()) {\n return;\n }\n this.alreadyOpened.set(true);\n this.isOpened.set(true);\n this.#resolvedWidth = this.#resolveWidth();\n\n if ((!this.view() && this.#isMobile) || this.view() === 'bottom-sheet') {\n this.#bottomSheetRef = this.#bottomSheet.open(this.templateRef(), {\n panelClass: this.#resolvePanelClass('sd-modal-bottom-sheet-panel'),\n ariaLabel: this.title() || undefined,\n disableClose: this.disableBackdropClose() || !!this.beforeClose(),\n });\n this.#bindGuardedDismiss(this.#bottomSheetRef);\n this.#bottomSheetRef.afterDismissed().pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(this.#markClosed);\n } else {\n this.#dialogRef = this.#dialog.open(this.templateRef(), {\n width: this.#resolvedWidth,\n maxWidth: 'calc(100vw - 32px)',\n panelClass: this.#resolvePanelClass('sd-modal-panel'),\n ariaLabelledBy: this.title() ? this.titleId : undefined,\n disableClose: this.disableBackdropClose() || !!this.beforeClose(),\n });\n this.#bindGuardedDismiss(this.#dialogRef);\n this.#dialogRef.afterClosed().pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(this.#markClosed);\n }\n };\n\n close = (): void => {\n if (this.beforeClose()) {\n void this.requestClose();\n return;\n }\n this.forceClose();\n };\n\n requestClose = (): Promise<boolean> => {\n const guard = this.beforeClose();\n if (!guard) {\n this.forceClose();\n return Promise.resolve(true);\n }\n if (this.#closeRequest) return this.#closeRequest;\n\n const request = Promise.resolve()\n .then(() => guard())\n .then(canClose => {\n if (!canClose) return false;\n this.forceClose();\n return true;\n })\n .catch((error: unknown) => {\n this.sdCloseError.emit(error);\n return false;\n });\n\n this.#closeRequest = request;\n void request.finally(() => {\n if (this.#closeRequest === request) this.#closeRequest = undefined;\n });\n return request;\n };\n\n forceClose = (): void => {\n this.#bottomSheetRef?.dismiss();\n this.#dialogRef?.close();\n };\n\n #bindGuardedDismiss(ref: MatDialogRef<any> | MatBottomSheetRef<any>): void {\n if (!this.beforeClose() || this.disableBackdropClose()) return;\n\n const dismissRef = ref as SdModalDismissRef;\n dismissRef\n .backdropClick?.()\n .pipe(takeUntilDestroyed(this.#destroyRef))\n .subscribe(() => this.close());\n dismissRef\n .keydownEvents?.()\n .pipe(takeUntilDestroyed(this.#destroyRef))\n .subscribe((event: KeyboardEvent) => {\n if (event.key === 'Escape') this.close();\n });\n }\n\n #resolvePanelClass(baseClass: string): string[] {\n const customClass = this.modalClass();\n const classes = [baseClass];\n\n if (typeof customClass === 'string') {\n classes.push(...customClass.split(/\\s+/).filter(Boolean));\n return classes;\n }\n\n if (Array.isArray(customClass)) {\n classes.push(...customClass.filter(Boolean));\n return classes;\n }\n\n if (customClass && typeof customClass === 'object') {\n Object.entries(customClass).forEach(([className, enabled]) => {\n if (enabled) classes.push(className);\n });\n }\n\n return classes;\n }\n}\n","<ng-template #templateRef>\n @let _title = title();\n <div #modal class=\"sd-modal-root\" [attr.data-autoId]=\"autoId()\" [attr.data-opened]=\"dataOpened()\">\n @if (!lazyLoadContent() || alreadyOpened()) {\n @if (_title) {\n <div class=\"sd-modal-header\">\n <div class=\"sd-modal-header-left\" [id]=\"titleId\">\n <ng-content select=\"[sdHeaderLeft]\">\n <div class=\"sd-modal-title T18M\">{{ _title }}</div>\n </ng-content>\n </div>\n <div class=\"sd-modal-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (!hideClose()) {\n <button\n type=\"button\"\n class=\"sd-modal-close-btn\"\n aria-label=\"Close\"\n (click)=\"close()\"\n [attr.data-autoId]=\"closeButtonAutoId()\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n <div class=\"sd-modal-body\">\n <ng-content></ng-content>\n </div>\n <div class=\"sd-modal-footer\" #footer>\n <div class=\"sd-modal-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-modal-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AA4BA,IAAI,gBAAgB,GAAG,CAAC;MAkBX,OAAO,CAAA;AAClB,IAAA,OAAO,KAAK,GAAG,MAAM,CAAC,CAAC;8EAAC;AACL,IAAA,OAAO,GAAG,CAAA,eAAA,EAAkB,gBAAgB,EAAE,EAAE;AAEnE,IAAA,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAmB,aAAa;oFAAC;IACjE,KAAK,GAAG,SAAS,CAAa,OAAO;8EAAC;;;IAI7B,WAAW,GAAG,KAAK,CAA4B,SAAS,mFAAI,KAAK,EAAE,QAAQ,EAAA,CAAG;IAC9E,MAAM,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,WAAW,EAAE,GAAG,CAAA,iBAAA,EAAoB,IAAI,CAAC,WAAW,EAAE,EAAE,GAAG,SAAS,CAAC;+EAAC;IACpG,iBAAiB,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,CAAA,EAAG,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;0FAAC;AAC1F,IAAA,UAAU,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,GAAG,OAAO,CAAC;mFAAC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AAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnDvC;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-components-modal.mjs","sources":["../../../projects/sdcorejs-angular/components/modal/src/modal.component.ts","../../../projects/sdcorejs-angular/components/modal/src/modal.component.html","../../../projects/sdcorejs-angular/components/modal/sdcorejs-angular-components-modal.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n OnDestroy,\n TemplateRef,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n ViewEncapsulation,\n viewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatBottomSheet, MatBottomSheetModule, MatBottomSheetRef } from '@angular/material/bottom-sheet';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialog, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { BrowserUtilities } from '@sdcorejs/utils/fns';\nimport { Color, Size } from '@sdcorejs/utils/models';\nimport { SdIcon } from '@sdcorejs/angular/modules/icon';\nimport { Observable } from 'rxjs';\n\nlet nextModalTitleId = 0;\n\nexport type SdModalBeforeClose = () => boolean | Promise<boolean>;\n\ninterface SdModalDismissRef {\n backdropClick?: () => Observable<MouseEvent>;\n keydownEvents?: () => Observable<KeyboardEvent>;\n}\n\n@Component({\n selector: 'sd-modal',\n templateUrl: './modal.component.html',\n styleUrl: './modal.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [SdIcon, CommonModule, MatBottomSheetModule, MatDialogModule, MatDividerModule, MatButtonModule],\n})\nexport class SdModal implements OnDestroy {\n static index = signal(0);\n protected readonly titleId = `sd-modal-title-${nextModalTitleId++}`;\n\n templateRef = viewChild.required<TemplateRef<any>>('templateRef');\n modal = viewChild<ElementRef>('modal');\n\n // autoId prefix `modal-`. Lưu ý: footer/body buttons render qua <ng-content> nên consumer phải\n // tự đặt [attr.data-autoId] cho các nút đó. Component chỉ tự bind autoId cho NÚT ĐÓNG (X icon).\n readonly autoIdInput = input<string | undefined | null>(undefined, { alias: 'autoId' });\n readonly autoId = computed(() => (this.autoIdInput() ? `components-modal-${this.autoIdInput()}` : undefined));\n readonly closeButtonAutoId = computed(() => (this.autoId() ? `${this.autoId()}-close` : undefined));\n readonly dataOpened = computed(() => (this.isOpened() ? 'true' : 'false'));\n\n title = input<string, string | null | undefined>('', { transform: v => v ?? '' });\n color = input<Color, Color | null | undefined>('primary', { transform: v => v ?? 'primary' });\n width = input<Size | string, Size | string | null | undefined>('md', { transform: v => v ?? 'md' });\n height = input<string, string | null | undefined>('auto', { transform: v => v ?? 'auto' });\n view = input<'dialog' | 'bottom-sheet' | undefined, 'dialog' | 'bottom-sheet' | null | undefined>(undefined, {\n transform: v => v ?? undefined,\n });\n modalClass = input<string | string[] | Record<string, boolean>, string | string[] | Record<string, boolean> | null | undefined>('', {\n transform: v => v ?? '',\n });\n lazyLoadContent = input(true, { transform: booleanAttribute });\n hideClose = input<boolean, boolean | ''>(false, { transform: booleanAttribute });\n disableBackdropClose = input<boolean, boolean | ''>(true, { transform: booleanAttribute }); // default to true to keep backward compatibility\n beforeClose = input<SdModalBeforeClose | undefined>(undefined);\n /**\n * Close when the browser history changes (Back, a route change). `false` lets the content handle Back itself, e.g.\n * a sheet with pages. Same name as `MatDialogConfig.closeOnNavigation`.\n */\n closeOnNavigation = input<boolean, boolean | ''>(true, { transform: booleanAttribute });\n\n sdClosed = output<void>();\n sdCloseError = output<unknown>();\n\n isOpened = signal(false);\n alreadyOpened = signal(false);\n\n #isMobile = false;\n #resolvedWidth = 'md';\n #bottomSheetRef!: MatBottomSheetRef<any>;\n #dialogRef!: MatDialogRef<any>;\n #closeRequest?: Promise<boolean>;\n\n #dialog = inject(MatDialog);\n #bottomSheet = inject(MatBottomSheet);\n #destroyRef = inject(DestroyRef);\n\n constructor() {\n this.#isMobile = BrowserUtilities.isMobile();\n // BottomSheetConfig has no ariaLabelledBy; bind its real container to the live heading. A custom `sdHeaderLeft`\n // may swap its heading (a sheet with pages), so the binding follows changes of the header.\n effect(onCleanup => {\n const title = this.title();\n const root = this.modal()?.nativeElement as HTMLElement | undefined;\n const container = root?.closest('[role=\"dialog\"]');\n if (!root || !container) return;\n const bind = (): void => {\n const label = title ? this.#labelOf(root) : undefined;\n if (label) container.setAttribute('aria-labelledby', label);\n else container.removeAttribute('aria-labelledby');\n };\n bind();\n const left = root.querySelector('.sd-modal-header-left');\n if (!left || typeof MutationObserver === 'undefined') return;\n const observer = new MutationObserver(bind);\n observer.observe(left, { childList: true, subtree: true });\n onCleanup(() => observer.disconnect());\n });\n }\n\n /**\n * Id of the element that names the modal: the default title, or the first heading of a custom `sdHeaderLeft`. Only\n * without a heading does the whole left cell (with its buttons) name it.\n */\n #labelOf(root: HTMLElement): string | undefined {\n const left = root.querySelector<HTMLElement>('.sd-modal-header-left');\n if (!left) return undefined;\n const heading = left.querySelector<HTMLElement>(`#${this.titleId}, h1, h2, h3, h4, h5, h6, [role=\"heading\"]`) ?? left;\n if (heading !== left && left.id === this.titleId) left.removeAttribute('id');\n if (!heading.id) heading.id = this.titleId;\n return heading.id;\n }\n\n // why: PHẢI là ngOnDestroy, KHÔNG phải #destroyRef.onDestroy. Angular chạy executeOnDestroys\n // (ngOnDestroy) TRƯỚC processCleanups (mọi callback DestroyRef.onDestroy). `sdClosed = output()`\n // tự đăng ký một DestroyRef.onDestroy trong constructor của OutputEmitterRef ngay lúc khởi tạo\n // field — tức TRƯỚC hook nào đăng ký trong constructor của component. Đăng ký ở constructor thì\n // tới lượt mình chạy, emitter đã `destroyed = true` và `emit()` chỉ log cảnh báo rồi thoát.\n ngOnDestroy(): void {\n // why: overlay của MatDialog/MatBottomSheet sống trong CDK overlay container ở <body>,\n // KHÔNG nằm trong view của <sd-modal>. Host bị destroy (điều hướng route, @if tắt nhánh…)\n // mà không close ref thì overlay + backdrop ở lại mồ côi, che và chặn click cả trang.\n // Dùng forceClose (không qua beforeClose) vì đã destroy thì không thể huỷ việc đóng.\n //\n // Emit TRƯỚC khi forceClose: afterClosed()/afterDismissed() bắn BẤT ĐỒNG BỘ, mà subscription\n // của chúng dùng takeUntilDestroyed(#destroyRef) nên đã bị gỡ trước khi tới lượt. Không emit\n // ở đây thì destroy một modal đang mở sẽ đóng overlay mà KHÔNG bao giờ báo (sdClosed).\n this.#markClosed();\n this.forceClose();\n }\n\n // why: idempotent — chốt trên isOpened(). Đường destroy emit trước, nếu sau đó\n // afterClosed()/afterDismissed() vẫn kịp bắn thì lần thứ hai là no-op, không double-emit.\n #markClosed = (): void => {\n if (!this.isOpened()) return;\n this.isOpened.set(false);\n this.#closeRequest = undefined;\n this.sdClosed.emit();\n };\n\n #resolveWidth(): string {\n const w = this.width() || '80vw';\n if (this.#isMobile) return w;\n switch (w) {\n case 'lg':\n return '80vw';\n case 'md':\n return '60vw';\n case 'sm':\n return '40vw';\n case 'sx':\n return '20vw';\n default:\n return w;\n }\n }\n\n open = (): void => {\n if (this.isOpened()) {\n return;\n }\n this.alreadyOpened.set(true);\n this.isOpened.set(true);\n this.#resolvedWidth = this.#resolveWidth();\n\n if ((!this.view() && this.#isMobile) || this.view() === 'bottom-sheet') {\n this.#bottomSheetRef = this.#bottomSheet.open(this.templateRef(), {\n panelClass: this.#resolvePanelClass('sd-modal-bottom-sheet-panel'),\n ariaLabel: this.title() || undefined,\n disableClose: this.disableBackdropClose() || !!this.beforeClose(),\n closeOnNavigation: this.closeOnNavigation(),\n });\n this.#bindGuardedDismiss(this.#bottomSheetRef);\n this.#bottomSheetRef.afterDismissed().pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(this.#markClosed);\n } else {\n this.#dialogRef = this.#dialog.open(this.templateRef(), {\n width: this.#resolvedWidth,\n maxWidth: 'calc(100vw - 32px)',\n panelClass: this.#resolvePanelClass('sd-modal-panel'),\n ariaLabelledBy: this.title() ? this.titleId : undefined,\n disableClose: this.disableBackdropClose() || !!this.beforeClose(),\n closeOnNavigation: this.closeOnNavigation(),\n });\n this.#bindGuardedDismiss(this.#dialogRef);\n this.#dialogRef.afterClosed().pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(this.#markClosed);\n }\n };\n\n close = (): void => {\n if (this.beforeClose()) {\n void this.requestClose();\n return;\n }\n this.forceClose();\n };\n\n requestClose = (): Promise<boolean> => {\n const guard = this.beforeClose();\n if (!guard) {\n this.forceClose();\n return Promise.resolve(true);\n }\n if (this.#closeRequest) return this.#closeRequest;\n\n const request = Promise.resolve()\n .then(() => guard())\n .then(canClose => {\n if (!canClose) return false;\n this.forceClose();\n return true;\n })\n .catch((error: unknown) => {\n this.sdCloseError.emit(error);\n return false;\n });\n\n this.#closeRequest = request;\n void request.finally(() => {\n if (this.#closeRequest === request) this.#closeRequest = undefined;\n });\n return request;\n };\n\n forceClose = (): void => {\n this.#bottomSheetRef?.dismiss();\n this.#dialogRef?.close();\n };\n\n #bindGuardedDismiss(ref: MatDialogRef<any> | MatBottomSheetRef<any>): void {\n if (!this.beforeClose() || this.disableBackdropClose()) return;\n\n const dismissRef = ref as SdModalDismissRef;\n dismissRef\n .backdropClick?.()\n .pipe(takeUntilDestroyed(this.#destroyRef))\n .subscribe(() => this.close());\n dismissRef\n .keydownEvents?.()\n .pipe(takeUntilDestroyed(this.#destroyRef))\n .subscribe((event: KeyboardEvent) => {\n if (event.key === 'Escape') this.close();\n });\n }\n\n #resolvePanelClass(baseClass: string): string[] {\n const customClass = this.modalClass();\n const classes = [baseClass];\n\n if (typeof customClass === 'string') {\n classes.push(...customClass.split(/\\s+/).filter(Boolean));\n return classes;\n }\n\n if (Array.isArray(customClass)) {\n classes.push(...customClass.filter(Boolean));\n return classes;\n }\n\n if (customClass && typeof customClass === 'object') {\n Object.entries(customClass).forEach(([className, enabled]) => {\n if (enabled) classes.push(className);\n });\n }\n\n return classes;\n }\n}\n","<ng-template #templateRef>\n @let _title = title();\n <div #modal class=\"sd-modal-root\" [attr.data-autoId]=\"autoId()\" [attr.data-opened]=\"dataOpened()\">\n @if (!lazyLoadContent() || alreadyOpened()) {\n @if (_title) {\n <div class=\"sd-modal-header\">\n <div class=\"sd-modal-header-left\">\n <ng-content select=\"[sdHeaderLeft]\">\n <div class=\"sd-modal-title T18M\" [id]=\"titleId\">{{ _title }}</div>\n </ng-content>\n </div>\n <div class=\"sd-modal-header-right\">\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\n @if (!hideClose()) {\n <button\n type=\"button\"\n class=\"sd-modal-close-btn\"\n aria-label=\"Close\"\n (click)=\"close()\"\n [attr.data-autoId]=\"closeButtonAutoId()\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n }\n </div>\n </div>\n }\n <div class=\"sd-modal-body\">\n <ng-content></ng-content>\n </div>\n <div class=\"sd-modal-footer\" #footer>\n <div class=\"sd-modal-footer-left\"><ng-content select=\"[sdFooterLeft]\"></ng-content></div>\n <div class=\"sd-modal-footer-right\"><ng-content select=\"[sdFooterRight]\"></ng-content></div>\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AA4BA,IAAI,gBAAgB,GAAG,CAAC;MAkBX,OAAO,CAAA;AAClB,IAAA,OAAO,KAAK,GAAG,MAAM,CAAC,CAAC;8EAAC;AACL,IAAA,OAAO,GAAG,CAAA,eAAA,EAAkB,gBAAgB,EAAE,EAAE;AAEnE,IAAA,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAmB,aAAa;oFAAC;IACjE,KAAK,GAAG,SAAS,CAAa,OAAO;8EAAC;;;IAI7B,WAAW,GAAG,KAAK,CAA4B,SAAS,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