@sdcorejs/angular 19.2.6 → 19.2.8
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 +2 -0
- package/assets/scss/core/_read-state-panel.scss +57 -0
- package/assets/scss/core/form.scss +6 -0
- package/components/table/index.d.ts +1 -0
- package/components/table/src/components/filter/quick-search/quick-search.component.d.ts +26 -0
- package/components/table/src/directives/index.d.ts +1 -0
- package/components/table/src/directives/sd-table-quick-search-right-def.directive.d.ts +8 -0
- package/components/table/src/models/table-option.model.d.ts +2 -0
- package/components/table/src/services/table-filter/table-filter.model.d.ts +8 -1
- package/components/table/src/services/table-filter/table-filter.service.d.ts +2 -1
- package/components/table/src/services/table-filter/table-quick-search.model.d.ts +30 -0
- package/components/table/src/services/table-filter/table-quick-search.util.d.ts +8 -0
- package/components/table/src/services/table-local/table-local.util.d.ts +2 -1
- package/components/table/src/table.component.d.ts +10 -2
- package/components/upload-file/src/upload-file.component.d.ts +1 -2
- package/fesm2022/sdcorejs-angular-components-badge.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-data-state.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-section.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +550 -346
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +2 -3
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +25 -0
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +32 -24
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +2 -2
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs +9 -4
- package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-notify.mjs +2 -2
- package/i18n/src/en.d.ts +5 -0
- package/modules/layout/components/shared/menu-tree/menu-tree.component.d.ts +9 -1
- package/modules/layout/components/shared/search-field/search-field.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -69,11 +69,11 @@ class DialogConfirmComponent {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DialogConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", 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\">\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:24px;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:
|
|
72
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", 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\">\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:24px;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:50%;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 sd-icon{width:22px;height:22px;font-size:22px;line-height:22px}.sd-dialog-confirm__copy{min-width:0}.sd-dialog-confirm__title{margin:0 0 6px;padding:0;font:inherit;font-size:18px;font-weight: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: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:8px;box-shadow:0 16px 48px #00000029,0 2px 8px #0000000f}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions button:focus-visible{outline:2px solid 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:20px;padding-bottom:max(20px,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", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["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", "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", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "items", "model"], outputs: ["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", "pattern", "validator", "inlineError", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
73
73
|
}
|
|
74
74
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: DialogConfirmComponent, decorators: [{
|
|
75
75
|
type: Component,
|
|
76
|
-
args: [{ selector: 'sd-dialog-confirm', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdIcon, CommonModule, FormsModule, MatDialogModule, SdButton, SdDate, SdDatetime, SdRadio, SdSelect, SdTextarea], 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\">\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:24px;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:
|
|
76
|
+
args: [{ selector: 'sd-dialog-confirm', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdIcon, CommonModule, FormsModule, MatDialogModule, SdButton, SdDate, SdDatetime, SdRadio, SdSelect, SdTextarea], 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\">\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:24px;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:50%;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 sd-icon{width:22px;height:22px;font-size:22px;line-height:22px}.sd-dialog-confirm__copy{min-width:0}.sd-dialog-confirm__title{margin:0 0 6px;padding:0;font:inherit;font-size:18px;font-weight: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: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:8px;box-shadow:0 16px 48px #00000029,0 2px 8px #0000000f}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions button:focus-visible{outline:2px solid 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:20px;padding-bottom:max(20px,env(safe-area-inset-bottom))}}\n"] }]
|
|
77
77
|
}], ctorParameters: () => [] });
|
|
78
78
|
|
|
79
79
|
class SdConfirmService {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdcorejs-angular-services-confirm.mjs","sources":["../../../projects/sdcorejs-angular/services/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.ts","../../../projects/sdcorejs-angular/services/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.html","../../../projects/sdcorejs-angular/services/confirm/src/lib/confirm.service.ts","../../../projects/sdcorejs-angular/services/confirm/src/public-api.ts","../../../projects/sdcorejs-angular/services/confirm/sdcorejs-angular-services-confirm.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';\nimport { SdButton } from '@sdcorejs/angular/components/button';\nimport { SdDate } from '@sdcorejs/angular/forms/date';\nimport { SdDatetime } from '@sdcorejs/angular/forms/datetime';\nimport { SdRadio } from '@sdcorejs/angular/forms/radio';\nimport { SdSelect } from '@sdcorejs/angular/forms/select';\nimport { SdTextarea } from '@sdcorejs/angular/forms/textarea';\nimport { Color } from '@sdcorejs/utils/models';\nimport { Utilities } from '@sdcorejs/utils/fns';\nimport { SdIcon } from '@sdcorejs/angular/modules/icon';\n\nexport interface DialogData {\n icon?: string;\n title?: string;\n message?: string;\n yesTitle?: string;\n noTitle?: string;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n input?: {\n label?: string;\n placeholder?: string;\n minlength?: number;\n maxlength?: number;\n required?: boolean;\n defaultValue?: string;\n };\n date?: {\n required?: boolean;\n placeholder?: string;\n defaultValue?: string | Date;\n min?: string | Date;\n max?: string | Date;\n };\n datetime?: {\n required?: boolean;\n placeholder?: string;\n defaultValue?: string | Date;\n min?: string | Date;\n max?: string | Date;\n showSeconds?: boolean;\n };\n radio?: {\n required?: boolean;\n defaultValue?: string | number;\n items: any[];\n valueField: string;\n displayField: string;\n display?: 'row' | 'column';\n };\n select?: {\n required?: boolean;\n defaultValue?: string | number | (string | number)[];\n items: any[];\n valueField: string;\n displayField: string;\n placeholder?: string;\n multiple?: boolean;\n };\n}\n\n@Component({\n selector: 'sd-dialog-confirm',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: 'dialog-confirm.component.html',\n styleUrl: './dialog-confirm.component.scss',\n imports: [SdIcon, CommonModule, FormsModule, MatDialogModule, SdButton, SdDate, SdDatetime, SdRadio, SdSelect, SdTextarea],\n})\nexport class DialogConfirmComponent {\n value: any;\n required = false;\n id = `I${Utilities.generateUuid()}`;\n public readonly dialogRef = inject(MatDialogRef<DialogConfirmComponent>);\n public readonly data = inject<DialogData>(MAT_DIALOG_DATA);\n\n readonly iconTone = this.data.yesButtonColor || 'primary';\n readonly resolvedIcon =\n this.data.icon?.trim() ||\n (this.iconTone === 'error'\n ? 'delete'\n : this.iconTone === 'warning'\n ? 'warning_amber'\n : this.data.input\n ? 'edit_note'\n : this.data.date || this.data.datetime\n ? 'today'\n : this.data.radio || this.data.select\n ? 'list'\n : 'check_circle');\n readonly hasFields = !!(this.data.input || this.data.date || this.data.radio || this.data.datetime || this.data.select);\n\n constructor() {\n if (this.data?.input) {\n this.value = this.data?.input?.defaultValue ?? '';\n this.required = this.data?.input?.required || false;\n }\n if (this.data?.date) {\n this.value = this.data?.date?.defaultValue ?? '';\n this.required = this.data?.date?.required || false;\n }\n if (this.data?.datetime) {\n this.value = this.data?.datetime?.defaultValue ?? '';\n this.required = this.data?.datetime?.required || false;\n }\n if (this.data?.radio) {\n this.value = this.data?.radio?.defaultValue ?? '';\n this.required = this.data?.radio?.required || false;\n }\n if (this.data?.select) {\n this.value = this.data?.select?.defaultValue ?? (this.data?.select?.multiple ? [] : null);\n this.required = this.data?.select?.required || false;\n }\n }\n\n onCancel = () => {\n this.dialogRef.close({ action: 'CANCEL', value: null });\n };\n\n onAccept = () => {\n // Always return an object with action and value for consistency\n if (this.data?.radio || this.data?.input || this.data?.date || this.data?.datetime || this.data?.select) {\n this.dialogRef.close({ action: 'ACCEPT', value: this.value });\n } else {\n this.dialogRef.close({ action: 'ACCEPT', value: null });\n }\n };\n}\n","<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\">\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","import { inject, Injectable } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Observable } from 'rxjs';\nimport { DialogConfirmComponent } from './components/dialog-confirm/dialog-confirm.component';\nimport { Color } from '@sdcorejs/utils/models';\nimport { I18nService } from '@sdcorejs/angular/i18n';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SdConfirmService {\n private dialog = inject(MatDialog);\n\n readonly #i18n = inject(I18nService);\n\n /** Inserted by Angular inject() migration for backwards compatibility */\n constructor(...args: unknown[]);\n\n constructor() {}\n\n /**\n * Biến `afterClosed()` của dialog thành một Promise LUÔN settle.\n *\n * why: cả 6 API trước đây đều viết `if (result) { ...ACCEPT/CANCEL... }`, nên MỌI đường đóng\n * dialog không đi qua hai nút — phím ESC, click backdrop (khi `disableBackdropClose: false`),\n * hoặc `dialogRef.close()` gọi từ code — cho `result` là `undefined` và promise KHÔNG BAO GIỜ\n * settle. Closure của caller (cùng mọi thứ nó giữ) bị ghim lại đến hết phiên, và `await` đứng im\n * mãi mãi. Đóng-không-chọn về ngữ nghĩa chính là huỷ, nên nó reject `'CANCEL'` — đúng nhánh mà\n * consumer vốn đã bắt.\n */\n #settleOnClose = <TValue>(afterClosed: Observable<{ action?: 'ACCEPT' | 'CANCEL'; value?: TValue } | undefined>): Promise<TValue> =>\n new Promise<TValue>((resolve, reject) => {\n afterClosed.subscribe(result => {\n if (result?.action === 'ACCEPT') resolve(result.value as TValue);\n else reject(result?.action ?? 'CANCEL');\n });\n });\n\n confirm = (\n message: string,\n option: {\n title?: string;\n icon?: string;\n yesTitle?: string;\n noTitle?: string;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n width?: string;\n disableBackdropClose?: boolean;\n } = {}\n ) => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: option?.width || '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: '[data-confirm-cancel] button',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n\n withInput = (\n message?: string,\n option?: {\n title?: string;\n icon?: string;\n yesTitle?: string;\n noTitle?: string;\n required?: boolean;\n maxlength?: number;\n label?: string;\n placeholder?: string;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n defaultValue?: string;\n disableBackdropClose?: boolean;\n }\n ): Promise<string> => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: 'textarea',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n input: {\n label: option?.label,\n placeholder: option?.placeholder,\n maxlength: option?.maxlength || 255,\n required: option?.required,\n defaultValue: option?.defaultValue || '',\n },\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n\n withRadio = (\n message?: string,\n option?: {\n title?: string;\n icon?: string;\n yesTitle?: string;\n noTitle?: string;\n required?: boolean;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n defaultValue?: string | number;\n items: any[];\n valueField: string;\n displayField: string;\n display?: 'row' | 'column';\n disableBackdropClose?: boolean;\n }\n ): Promise<string> => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: 'first-tabbable',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n radio: {\n items: option?.items || [],\n valueField: option?.valueField || 'value',\n displayField: option?.displayField || 'label',\n display: option?.display || 'row',\n required: option?.required,\n defaultValue: option?.defaultValue,\n },\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n\n withSelect = (\n message?: string,\n option?: {\n title?: string;\n icon?: string;\n yesTitle?: string;\n noTitle?: string;\n required?: boolean;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n defaultValue?: string | number | (string | number)[];\n items: any[];\n valueField: string;\n displayField: string;\n placeholder?: string;\n multiple?: boolean;\n disableBackdropClose?: boolean;\n }\n ): Promise<string | number | (string | number)[]> => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: 'first-tabbable',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n select: {\n items: option?.items || [],\n valueField: option?.valueField || 'value',\n displayField: option?.displayField || 'label',\n placeholder: option?.placeholder,\n multiple: option?.multiple,\n required: option?.required,\n defaultValue: option?.defaultValue,\n },\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n\n withDate = (\n message?: string,\n option?: {\n title?: string;\n icon?: string;\n\n yesTitle?: string;\n noTitle?: string;\n required?: boolean;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n defaultValue?: string | Date;\n placeholder?: string;\n min?: string | Date;\n max?: string | Date;\n disableBackdropClose?: boolean;\n }\n ): Promise<string | Date> => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: 'first-tabbable',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n date: {\n placeholder: option?.placeholder,\n required: option?.required,\n defaultValue: option?.defaultValue || '',\n min: option?.min,\n max: option?.max,\n },\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n\n withDatetime = (\n message?: string,\n option?: {\n title?: string;\n icon?: string;\n\n yesTitle?: string;\n noTitle?: string;\n required?: boolean;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n defaultValue?: string | Date;\n placeholder?: string;\n min?: string | Date;\n max?: string | Date;\n showSeconds?: boolean;\n disableBackdropClose?: boolean;\n }\n ): Promise<string | Date> => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: 'first-tabbable',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n datetime: {\n placeholder: option?.placeholder,\n required: option?.required,\n defaultValue: option?.defaultValue || '',\n min: option?.min,\n max: option?.max,\n showSeconds: option?.showSeconds,\n },\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n}\n","/*\n * Public API Surface of superdev-angular-core\n */\n\nexport * from './lib/components/dialog-confirm/dialog-confirm.component';\nexport * from './lib/confirm.service';\n","/**\n * Generated bundle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A,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-services-confirm.mjs","sources":["../../../projects/sdcorejs-angular/services/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.ts","../../../projects/sdcorejs-angular/services/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.html","../../../projects/sdcorejs-angular/services/confirm/src/lib/confirm.service.ts","../../../projects/sdcorejs-angular/services/confirm/src/public-api.ts","../../../projects/sdcorejs-angular/services/confirm/sdcorejs-angular-services-confirm.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';\nimport { SdButton } from '@sdcorejs/angular/components/button';\nimport { SdDate } from '@sdcorejs/angular/forms/date';\nimport { SdDatetime } from '@sdcorejs/angular/forms/datetime';\nimport { SdRadio } from '@sdcorejs/angular/forms/radio';\nimport { SdSelect } from '@sdcorejs/angular/forms/select';\nimport { SdTextarea } from '@sdcorejs/angular/forms/textarea';\nimport { Color } from '@sdcorejs/utils/models';\nimport { Utilities } from '@sdcorejs/utils/fns';\nimport { SdIcon } from '@sdcorejs/angular/modules/icon';\n\nexport interface DialogData {\n icon?: string;\n title?: string;\n message?: string;\n yesTitle?: string;\n noTitle?: string;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n input?: {\n label?: string;\n placeholder?: string;\n minlength?: number;\n maxlength?: number;\n required?: boolean;\n defaultValue?: string;\n };\n date?: {\n required?: boolean;\n placeholder?: string;\n defaultValue?: string | Date;\n min?: string | Date;\n max?: string | Date;\n };\n datetime?: {\n required?: boolean;\n placeholder?: string;\n defaultValue?: string | Date;\n min?: string | Date;\n max?: string | Date;\n showSeconds?: boolean;\n };\n radio?: {\n required?: boolean;\n defaultValue?: string | number;\n items: any[];\n valueField: string;\n displayField: string;\n display?: 'row' | 'column';\n };\n select?: {\n required?: boolean;\n defaultValue?: string | number | (string | number)[];\n items: any[];\n valueField: string;\n displayField: string;\n placeholder?: string;\n multiple?: boolean;\n };\n}\n\n@Component({\n selector: 'sd-dialog-confirm',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: 'dialog-confirm.component.html',\n styleUrl: './dialog-confirm.component.scss',\n imports: [SdIcon, CommonModule, FormsModule, MatDialogModule, SdButton, SdDate, SdDatetime, SdRadio, SdSelect, SdTextarea],\n})\nexport class DialogConfirmComponent {\n value: any;\n required = false;\n id = `I${Utilities.generateUuid()}`;\n public readonly dialogRef = inject(MatDialogRef<DialogConfirmComponent>);\n public readonly data = inject<DialogData>(MAT_DIALOG_DATA);\n\n readonly iconTone = this.data.yesButtonColor || 'primary';\n readonly resolvedIcon =\n this.data.icon?.trim() ||\n (this.iconTone === 'error'\n ? 'delete'\n : this.iconTone === 'warning'\n ? 'warning_amber'\n : this.data.input\n ? 'edit_note'\n : this.data.date || this.data.datetime\n ? 'today'\n : this.data.radio || this.data.select\n ? 'list'\n : 'check_circle');\n readonly hasFields = !!(this.data.input || this.data.date || this.data.radio || this.data.datetime || this.data.select);\n\n constructor() {\n if (this.data?.input) {\n this.value = this.data?.input?.defaultValue ?? '';\n this.required = this.data?.input?.required || false;\n }\n if (this.data?.date) {\n this.value = this.data?.date?.defaultValue ?? '';\n this.required = this.data?.date?.required || false;\n }\n if (this.data?.datetime) {\n this.value = this.data?.datetime?.defaultValue ?? '';\n this.required = this.data?.datetime?.required || false;\n }\n if (this.data?.radio) {\n this.value = this.data?.radio?.defaultValue ?? '';\n this.required = this.data?.radio?.required || false;\n }\n if (this.data?.select) {\n this.value = this.data?.select?.defaultValue ?? (this.data?.select?.multiple ? [] : null);\n this.required = this.data?.select?.required || false;\n }\n }\n\n onCancel = () => {\n this.dialogRef.close({ action: 'CANCEL', value: null });\n };\n\n onAccept = () => {\n // Always return an object with action and value for consistency\n if (this.data?.radio || this.data?.input || this.data?.date || this.data?.datetime || this.data?.select) {\n this.dialogRef.close({ action: 'ACCEPT', value: this.value });\n } else {\n this.dialogRef.close({ action: 'ACCEPT', value: null });\n }\n };\n}\n","<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\">\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","import { inject, Injectable } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Observable } from 'rxjs';\nimport { DialogConfirmComponent } from './components/dialog-confirm/dialog-confirm.component';\nimport { Color } from '@sdcorejs/utils/models';\nimport { I18nService } from '@sdcorejs/angular/i18n';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SdConfirmService {\n private dialog = inject(MatDialog);\n\n readonly #i18n = inject(I18nService);\n\n /** Inserted by Angular inject() migration for backwards compatibility */\n constructor(...args: unknown[]);\n\n constructor() {}\n\n /**\n * Biến `afterClosed()` của dialog thành một Promise LUÔN settle.\n *\n * why: cả 6 API trước đây đều viết `if (result) { ...ACCEPT/CANCEL... }`, nên MỌI đường đóng\n * dialog không đi qua hai nút — phím ESC, click backdrop (khi `disableBackdropClose: false`),\n * hoặc `dialogRef.close()` gọi từ code — cho `result` là `undefined` và promise KHÔNG BAO GIỜ\n * settle. Closure của caller (cùng mọi thứ nó giữ) bị ghim lại đến hết phiên, và `await` đứng im\n * mãi mãi. Đóng-không-chọn về ngữ nghĩa chính là huỷ, nên nó reject `'CANCEL'` — đúng nhánh mà\n * consumer vốn đã bắt.\n */\n #settleOnClose = <TValue>(afterClosed: Observable<{ action?: 'ACCEPT' | 'CANCEL'; value?: TValue } | undefined>): Promise<TValue> =>\n new Promise<TValue>((resolve, reject) => {\n afterClosed.subscribe(result => {\n if (result?.action === 'ACCEPT') resolve(result.value as TValue);\n else reject(result?.action ?? 'CANCEL');\n });\n });\n\n confirm = (\n message: string,\n option: {\n title?: string;\n icon?: string;\n yesTitle?: string;\n noTitle?: string;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n width?: string;\n disableBackdropClose?: boolean;\n } = {}\n ) => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: option?.width || '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: '[data-confirm-cancel] button',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n\n withInput = (\n message?: string,\n option?: {\n title?: string;\n icon?: string;\n yesTitle?: string;\n noTitle?: string;\n required?: boolean;\n maxlength?: number;\n label?: string;\n placeholder?: string;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n defaultValue?: string;\n disableBackdropClose?: boolean;\n }\n ): Promise<string> => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: 'textarea',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n input: {\n label: option?.label,\n placeholder: option?.placeholder,\n maxlength: option?.maxlength || 255,\n required: option?.required,\n defaultValue: option?.defaultValue || '',\n },\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n\n withRadio = (\n message?: string,\n option?: {\n title?: string;\n icon?: string;\n yesTitle?: string;\n noTitle?: string;\n required?: boolean;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n defaultValue?: string | number;\n items: any[];\n valueField: string;\n displayField: string;\n display?: 'row' | 'column';\n disableBackdropClose?: boolean;\n }\n ): Promise<string> => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: 'first-tabbable',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n radio: {\n items: option?.items || [],\n valueField: option?.valueField || 'value',\n displayField: option?.displayField || 'label',\n display: option?.display || 'row',\n required: option?.required,\n defaultValue: option?.defaultValue,\n },\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n\n withSelect = (\n message?: string,\n option?: {\n title?: string;\n icon?: string;\n yesTitle?: string;\n noTitle?: string;\n required?: boolean;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n defaultValue?: string | number | (string | number)[];\n items: any[];\n valueField: string;\n displayField: string;\n placeholder?: string;\n multiple?: boolean;\n disableBackdropClose?: boolean;\n }\n ): Promise<string | number | (string | number)[]> => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: 'first-tabbable',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n select: {\n items: option?.items || [],\n valueField: option?.valueField || 'value',\n displayField: option?.displayField || 'label',\n placeholder: option?.placeholder,\n multiple: option?.multiple,\n required: option?.required,\n defaultValue: option?.defaultValue,\n },\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n\n withDate = (\n message?: string,\n option?: {\n title?: string;\n icon?: string;\n\n yesTitle?: string;\n noTitle?: string;\n required?: boolean;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n defaultValue?: string | Date;\n placeholder?: string;\n min?: string | Date;\n max?: string | Date;\n disableBackdropClose?: boolean;\n }\n ): Promise<string | Date> => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: 'first-tabbable',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n date: {\n placeholder: option?.placeholder,\n required: option?.required,\n defaultValue: option?.defaultValue || '',\n min: option?.min,\n max: option?.max,\n },\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n\n withDatetime = (\n message?: string,\n option?: {\n title?: string;\n icon?: string;\n\n yesTitle?: string;\n noTitle?: string;\n required?: boolean;\n yesButtonColor?: Color;\n noButtonColor?: Color;\n defaultValue?: string | Date;\n placeholder?: string;\n min?: string | Date;\n max?: string | Date;\n showSeconds?: boolean;\n disableBackdropClose?: boolean;\n }\n ): Promise<string | Date> => {\n const dialogRef = this.dialog.open(DialogConfirmComponent, {\n width: '440px',\n panelClass: 'sd-confirm-panel',\n maxWidth: 'calc(100vw - 32px)',\n maxHeight: 'calc(100dvh - 32px)',\n autoFocus: 'first-tabbable',\n disableClose: option?.disableBackdropClose ?? true,\n data: {\n icon: option?.icon,\n title: option?.title || this.#i18n.t('core.confirm.title'),\n message,\n yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),\n noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),\n noButtonColor: option?.noButtonColor || 'secondary',\n yesButtonColor: option?.yesButtonColor || 'primary',\n datetime: {\n placeholder: option?.placeholder,\n required: option?.required,\n defaultValue: option?.defaultValue || '',\n min: option?.min,\n max: option?.max,\n showSeconds: option?.showSeconds,\n },\n },\n });\n return this.#settleOnClose(dialogRef.afterClosed());\n };\n}\n","/*\n * Public API Surface of superdev-angular-core\n */\n\nexport * from './lib/components/dialog-confirm/dialog-confirm.component';\nexport * from './lib/confirm.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAuEa,sBAAsB,CAAA;AACjC,IAAA,KAAK;IACL,QAAQ,GAAG,KAAK;AAChB,IAAA,EAAE,GAAG,CAAA,CAAA,EAAI,SAAS,CAAC,YAAY,EAAE,EAAE;AACnB,IAAA,SAAS,GAAG,MAAM,EAAC,YAAoC,EAAC;AACxD,IAAA,IAAI,GAAG,MAAM,CAAa,eAAe,CAAC;IAEjD,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,SAAS;IAChD,YAAY,GACnB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE;AACtB,SAAC,IAAI,CAAC,QAAQ,KAAK;AACjB,cAAE;AACF,cAAE,IAAI,CAAC,QAAQ,KAAK;AAClB,kBAAE;AACF,kBAAE,IAAI,CAAC,IAAI,CAAC;AACV,sBAAE;sBACA,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC;AAC5B,0BAAE;0BACA,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC;AAC7B,8BAAE;8BACA,cAAc,CAAC;AACpB,IAAA,SAAS,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;AAEvH,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE;AACpB,YAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,YAAY,IAAI,EAAE;AACj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AAc,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;AACrD,IAAA,CAAC;wGAjSU,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -4,8 +4,12 @@ import { inject, DestroyRef, PLATFORM_ID, Injectable } from '@angular/core';
|
|
|
4
4
|
|
|
5
5
|
var _a;
|
|
6
6
|
const SD_LOADING_STYLE_ATTRIBUTE = 'data-sd-loading-styles';
|
|
7
|
+
const SD_LOADING_OVERLAY_ATTRIBUTE = 'data-sd-loading-overlay';
|
|
8
|
+
// why: SdButton cũng dùng .sd-loading; chỉ overlay do service tạo được nhận CSS phủ vùng.
|
|
9
|
+
const SD_LOADING_OVERLAY_SELECTOR = `.sd-loading[${SD_LOADING_OVERLAY_ATTRIBUTE}]`;
|
|
10
|
+
const SD_LOADING_SPINNER_SELECTOR = `${SD_LOADING_OVERLAY_SELECTOR} > .sd-loading-spinner`;
|
|
7
11
|
const SD_LOADING_STYLES = `
|
|
8
|
-
|
|
12
|
+
${SD_LOADING_OVERLAY_SELECTOR} {
|
|
9
13
|
position: absolute;
|
|
10
14
|
inset: 0;
|
|
11
15
|
width: 100%;
|
|
@@ -15,7 +19,7 @@ const SD_LOADING_STYLES = `
|
|
|
15
19
|
z-index: 99999;
|
|
16
20
|
}
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
${SD_LOADING_SPINNER_SELECTOR} {
|
|
19
23
|
position: absolute;
|
|
20
24
|
top: calc(50% - 2.5rem);
|
|
21
25
|
left: calc(50% - 2.5rem);
|
|
@@ -233,6 +237,7 @@ class SdLoadingService {
|
|
|
233
237
|
const container = this.#document.createElement('div');
|
|
234
238
|
const spinner = this.#document.createElement('div');
|
|
235
239
|
container.classList.add('sd-loading');
|
|
240
|
+
container.setAttribute(SD_LOADING_OVERLAY_ATTRIBUTE, '');
|
|
236
241
|
container.setAttribute('role', 'status');
|
|
237
242
|
container.setAttribute('aria-live', 'polite');
|
|
238
243
|
container.setAttribute('aria-label', 'Loading');
|
|
@@ -283,8 +288,8 @@ class SdLoadingService {
|
|
|
283
288
|
}
|
|
284
289
|
#ensureRequiredStyleText(record) {
|
|
285
290
|
const currentText = record.element.textContent ?? '';
|
|
286
|
-
const hasRequiredRules = currentText.includes(
|
|
287
|
-
currentText.includes(
|
|
291
|
+
const hasRequiredRules = currentText.includes(`${SD_LOADING_OVERLAY_SELECTOR} {`) &&
|
|
292
|
+
currentText.includes(`${SD_LOADING_SPINNER_SELECTOR} {`) &&
|
|
288
293
|
currentText.includes('@keyframes sd-loading-spin');
|
|
289
294
|
if (hasRequiredRules)
|
|
290
295
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdcorejs-angular-services-loading.mjs","sources":["../../../projects/sdcorejs-angular/services/loading/src/loading.service.ts","../../../projects/sdcorejs-angular/services/loading/sdcorejs-angular-services-loading.ts"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, Injectable, PLATFORM_ID, inject } from '@angular/core';\n\nexport interface SdLoadingRef {\n readonly closed: boolean;\n close(): void;\n}\n\ninterface SdLoadingDocumentRecord {\n readonly hostStates: WeakMap<Element, SdLoadingHostState>;\n readonly liveHosts: Set<Element>;\n style: SdLoadingStyleRecord | undefined;\n}\n\ninterface SdLoadingHostState {\n readonly overlay: HTMLElement;\n readonly previousAriaBusy: string | null;\n readonly contributions: SdLoadingContribution[];\n count: number;\n}\n\ninterface SdLoadingHandleState {\n readonly selector: string;\n readonly contributions: SdLoadingContribution[];\n closed: boolean;\n}\n\ninterface SdLoadingContribution {\n readonly host: Element;\n readonly owner: SdLoadingHandleState;\n readonly service: SdLoadingService;\n released: boolean;\n}\n\ninterface SdLoadingStyleRecord {\n readonly element: HTMLStyleElement;\n readonly libraryOwned: boolean;\n readonly owners: Set<SdLoadingService>;\n ownedText: Text | null;\n}\n\nconst SD_LOADING_STYLE_ATTRIBUTE = 'data-sd-loading-styles';\nconst SD_LOADING_STYLES = `\n.sd-loading {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n opacity: 0.6;\n background: #fff;\n z-index: 99999;\n}\n\n.sd-loading-spinner {\n position: absolute;\n top: calc(50% - 2.5rem);\n left: calc(50% - 2.5rem);\n width: 5rem;\n height: 5rem;\n border: 0.5rem solid var(--sd-primary);\n border-top-color: var(--sd-border);\n border-radius: 50%;\n animation: sd-loading-spin 1s linear infinite;\n}\n\n@keyframes sd-loading-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n`;\n\nconst CLOSED_LOADING_REF: SdLoadingRef = Object.freeze({\n closed: true,\n close(): void {\n // A closed ref deliberately has no work to release.\n },\n});\n\n/*\n * why: service này cố tình KHÔNG dùng Renderer2. Khi app bật animations, `RendererFactory2` trả về\n * `AnimationRendererFactory` và `Renderer2.removeChild()` chỉ đẩy element vào hàng đợi\n * `collectedLeaveElements` của animation engine — DOM chỉ thật sự bị gỡ ở lần flush kế tiếp (sau một\n * chu kỳ change detection). Overlay và `style[data-sd-loading-styles]` ở đây là DOM ngoài view, được\n * gỡ lúc destroy injector hoặc từ ngữ cảnh async ngoài Angular, tức không còn flush nào chạy sau đó →\n * node nằm lại trong document vĩnh viễn (overlay z-index 99999 khoá cả trang). Ghi DOM trực tiếp trên\n * `DOCUMENT` giữ append/remove đối xứng và đồng bộ; nhánh SSR đã được `isPlatformBrowser` chặn sẵn.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SdLoadingService {\n private static readonly documentRecords = new WeakMap<Document, SdLoadingDocumentRecord>();\n\n readonly #document: Document;\n readonly #isBrowser: boolean;\n readonly #destroyRef = inject(DestroyRef);\n readonly #handleQueue: SdLoadingHandleState[] = [];\n\n #styleRegistered = false;\n #destroyed = false;\n\n /** Inserted by Angular inject() migration for backwards compatibility. */\n constructor(...args: unknown[]);\n constructor() {\n this.#document = inject(DOCUMENT);\n this.#isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n this.#destroyRef.onDestroy(() => this.#destroy());\n }\n\n /** Starts loading for every current selector match and returns ownership of those exact hosts. */\n start = (selector = 'body'): SdLoadingRef => {\n if (this.#destroyed || !this.#isBrowser) return CLOSED_LOADING_REF;\n\n const hosts = Array.from(this.#document.querySelectorAll(selector));\n if (hosts.length === 0) return CLOSED_LOADING_REF;\n\n const documentRecord = this.#getOrCreateDocumentRecord();\n this.#ensureStyles(documentRecord);\n const state: SdLoadingHandleState = { selector, contributions: [], closed: false };\n for (const host of hosts) {\n const contribution: SdLoadingContribution = {\n host,\n owner: state,\n service: this,\n released: false,\n };\n state.contributions.push(contribution);\n this.#acquireHost(documentRecord, contribution);\n }\n this.#handleQueue.push(state);\n\n return {\n get closed(): boolean {\n return state.closed;\n },\n close: () => this.#closeHandle(state),\n };\n };\n\n /** Returns the first matched globally loading host, `false` for idle matches, or `null` when unavailable. */\n isLoading = (selector = 'body'): Element | false | null => {\n if (this.#destroyed || !this.#isBrowser) return null;\n\n const hosts = this.#document.querySelectorAll(selector);\n if (hosts.length === 0) return null;\n\n const documentRecord = SdLoadingService.documentRecords.get(this.#document);\n for (const host of Array.from(hosts)) {\n const state = documentRecord?.hostStates.get(host);\n if (state && state.count > 0 && state.overlay.parentNode === host) return host;\n }\n return false;\n };\n\n /** Releases the oldest exact-selector start, with a current-host fallback for legacy cross-selector calls. */\n stop = (selector = 'body'): void => {\n if (this.#destroyed || !this.#isBrowser) return;\n\n const exactHandle = this.#handleQueue.find(state => !state.closed && state.selector === selector);\n if (exactHandle) {\n this.#closeHandle(exactHandle);\n return;\n }\n\n const documentRecord = SdLoadingService.documentRecords.get(this.#document);\n if (!documentRecord) return;\n\n for (const host of Array.from(this.#document.querySelectorAll(selector))) {\n const contribution = documentRecord.hostStates\n .get(host)\n ?.contributions.find(candidate => !candidate.released && candidate.service === this);\n if (contribution) this.#releaseContribution(documentRecord, contribution);\n }\n };\n\n run<T>(task: () => T | PromiseLike<T>, selector?: string): Promise<T>;\n run<T>(task: PromiseLike<T>, selector?: string): Promise<T>;\n /** Runs a task inside a loading lifetime and always releases it without replacing the task result or error. */\n async run<T>(task: (() => T | PromiseLike<T>) | PromiseLike<T>, selector = 'body'): Promise<T> {\n const ref = this.start(selector);\n try {\n const result = typeof task === 'function' ? task() : task;\n return await result;\n } finally {\n ref.close();\n }\n }\n\n #getOrCreateDocumentRecord(): SdLoadingDocumentRecord {\n let record = SdLoadingService.documentRecords.get(this.#document);\n if (!record) {\n record = {\n hostStates: new WeakMap<Element, SdLoadingHostState>(),\n liveHosts: new Set<Element>(),\n style: undefined,\n };\n SdLoadingService.documentRecords.set(this.#document, record);\n }\n return record;\n }\n\n #acquireHost(documentRecord: SdLoadingDocumentRecord, contribution: SdLoadingContribution): void {\n const host = contribution.host;\n const existing = documentRecord.hostStates.get(host);\n if (existing) {\n this.#repairOverlay(host, existing);\n existing.count += 1;\n existing.contributions.push(contribution);\n return;\n }\n\n const state: SdLoadingHostState = {\n overlay: this.#createOverlay(),\n previousAriaBusy: host.getAttribute('aria-busy'),\n contributions: [contribution],\n count: 1,\n };\n host.setAttribute('aria-busy', 'true');\n host.appendChild(state.overlay);\n documentRecord.hostStates.set(host, state);\n documentRecord.liveHosts.add(host);\n }\n\n #repairOverlay(host: Element, state: SdLoadingHostState): void {\n // why: appendChild tự động rút overlay khỏi parent cũ, nên không cần removeChild riêng.\n if (state.overlay.parentNode !== host) host.appendChild(state.overlay);\n if (host.getAttribute('aria-busy') !== 'true') host.setAttribute('aria-busy', 'true');\n }\n\n #releaseContribution(documentRecord: SdLoadingDocumentRecord, contribution: SdLoadingContribution): void {\n if (contribution.released) return;\n contribution.released = true;\n\n const state = documentRecord.hostStates.get(contribution.host);\n if (state) {\n const contributionIndex = state.contributions.indexOf(contribution);\n if (contributionIndex >= 0) state.contributions.splice(contributionIndex, 1);\n state.count -= 1;\n\n if (state.count <= 0) this.#removeHost(documentRecord, contribution.host, state);\n }\n\n contribution.service.#closeOwnerWhenReleased(contribution.owner);\n }\n\n #removeHost(documentRecord: SdLoadingDocumentRecord, host: Element, state: SdLoadingHostState): void {\n state.overlay.remove();\n\n if (host.getAttribute('aria-busy') === 'true') {\n if (state.previousAriaBusy === null) host.removeAttribute('aria-busy');\n else host.setAttribute('aria-busy', state.previousAriaBusy);\n }\n\n documentRecord.hostStates.delete(host);\n documentRecord.liveHosts.delete(host);\n this.#deleteDocumentRecordWhenEmpty(documentRecord);\n }\n\n #closeHandle(state: SdLoadingHandleState): void {\n if (state.closed) return;\n\n state.closed = true;\n this.#dequeueHandle(state);\n const documentRecord = SdLoadingService.documentRecords.get(this.#document);\n if (documentRecord) {\n for (const contribution of [...state.contributions]) {\n this.#releaseContribution(documentRecord, contribution);\n }\n } else {\n for (const contribution of state.contributions) contribution.released = true;\n }\n state.contributions.length = 0;\n }\n\n #closeOwnerWhenReleased(state: SdLoadingHandleState): void {\n if (state.closed || state.contributions.some(contribution => !contribution.released)) return;\n\n state.closed = true;\n this.#dequeueHandle(state);\n state.contributions.length = 0;\n }\n\n #dequeueHandle(state: SdLoadingHandleState): void {\n const handleIndex = this.#handleQueue.indexOf(state);\n if (handleIndex >= 0) this.#handleQueue.splice(handleIndex, 1);\n }\n\n #createOverlay(): HTMLElement {\n const container = this.#document.createElement('div');\n const spinner = this.#document.createElement('div');\n\n container.classList.add('sd-loading');\n container.setAttribute('role', 'status');\n container.setAttribute('aria-live', 'polite');\n container.setAttribute('aria-label', 'Loading');\n\n spinner.classList.add('sd-loading-spinner');\n spinner.setAttribute('aria-hidden', 'true');\n container.appendChild(spinner);\n return container;\n }\n\n #ensureStyles(documentRecord: SdLoadingDocumentRecord): void {\n let record = documentRecord.style;\n if (record && !this.#isCurrentStyle(record.element)) {\n const owners = record.owners;\n this.#detachOwnedStyleContent(record);\n record = this.#createStyleRecord(owners);\n documentRecord.style = record;\n } else if (!record) {\n record = this.#createStyleRecord(new Set<SdLoadingService>());\n documentRecord.style = record;\n } else {\n this.#ensureRequiredStyleText(record);\n }\n\n record.owners.add(this);\n this.#styleRegistered = true;\n }\n\n #isCurrentStyle(element: HTMLStyleElement): boolean {\n return element.isConnected && element.parentNode === this.#document.head && element.hasAttribute(SD_LOADING_STYLE_ATTRIBUTE);\n }\n\n #createStyleRecord(owners: Set<SdLoadingService>): SdLoadingStyleRecord {\n const existing = this.#document.head.querySelector<HTMLStyleElement>(`style[${SD_LOADING_STYLE_ATTRIBUTE}]`);\n if (existing) {\n const record: SdLoadingStyleRecord = {\n element: existing,\n libraryOwned: false,\n owners,\n ownedText: null,\n };\n this.#ensureRequiredStyleText(record);\n return record;\n }\n\n const style = this.#document.createElement('style');\n const ownedText = this.#document.createTextNode(SD_LOADING_STYLES);\n style.setAttribute(SD_LOADING_STYLE_ATTRIBUTE, '');\n style.appendChild(ownedText);\n this.#document.head.appendChild(style);\n return { element: style, libraryOwned: true, owners, ownedText };\n }\n\n #ensureRequiredStyleText(record: SdLoadingStyleRecord): void {\n const currentText = record.element.textContent ?? '';\n const hasRequiredRules =\n currentText.includes('.sd-loading {') &&\n currentText.includes('.sd-loading-spinner') &&\n currentText.includes('@keyframes sd-loading-spin');\n if (hasRequiredRules) return;\n\n if (record.ownedText && record.ownedText.parentNode !== record.element) record.ownedText = null;\n if (!record.ownedText) {\n record.ownedText = this.#document.createTextNode(SD_LOADING_STYLES);\n record.element.appendChild(record.ownedText);\n }\n }\n\n #detachOwnedStyleContent(record: SdLoadingStyleRecord): void {\n if (record.libraryOwned) record.element.remove();\n else record.ownedText?.remove();\n record.ownedText = null;\n }\n\n #destroy(): void {\n if (this.#destroyed) return;\n this.#destroyed = true;\n\n if (this.#isBrowser) {\n for (const state of [...this.#handleQueue]) this.#closeHandle(state);\n this.#unregisterStyles();\n return;\n }\n\n for (const state of this.#handleQueue) {\n state.closed = true;\n state.contributions.length = 0;\n }\n this.#handleQueue.length = 0;\n }\n\n #unregisterStyles(): void {\n if (!this.#styleRegistered) return;\n this.#styleRegistered = false;\n\n const documentRecord = SdLoadingService.documentRecords.get(this.#document);\n const record = documentRecord?.style;\n if (!documentRecord || !record) return;\n\n record.owners.delete(this);\n if (record.owners.size === 0) {\n this.#detachOwnedStyleContent(record);\n documentRecord.style = undefined;\n }\n this.#deleteDocumentRecordWhenEmpty(documentRecord);\n }\n\n #deleteDocumentRecordWhenEmpty(documentRecord: SdLoadingDocumentRecord): void {\n if (documentRecord.liveHosts.size === 0 && !documentRecord.style) {\n SdLoadingService.documentRecords.delete(this.#document);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAyCA,MAAM,0BAA0B,GAAG,wBAAwB;AAC3D,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BzB;AAED,MAAM,kBAAkB,GAAiB,MAAM,CAAC,MAAM,CAAC;AACrD,IAAA,MAAM,EAAE,IAAI;IACZ,KAAK,GAAA;;IAEL,CAAC;AACF,CAAA,CAAC;AAEF;;;;;;;;AAQG;MAIU,gBAAgB,CAAA;AACnB,IAAA,OAAgB,eAAe,GAAG,IAAI,OAAO,EAAqC;AAEjF,IAAA,SAAS;AACT,IAAA,UAAU;AACV,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;IAChC,YAAY,GAA2B,EAAE;IAElD,gBAAgB,GAAG,KAAK;IACxB,UAAU,GAAG,KAAK;AAIlB,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAA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ACpC,QAAA,IAAI,CAAC,cAAc,IAAI,CAAC,MAAM;YAAE;AAEhC,QAAA,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QAC1B,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE;AAC5B,YAAA,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC;AACrC,YAAA,cAAc,CAAC,KAAK,GAAG,SAAS;QAClC;AACA,QAAA,IAAI,CAAC,8BAA8B,CAAC,cAAc,CAAC;IACrD;AAEA,IAAA,8BAA8B,CAAC,cAAuC,EAAA;AACpE,QAAA,IAAI,cAAc,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE;YAChE,EAAgB,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QACzD;IACF;wGAzTW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACzFD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-services-loading.mjs","sources":["../../../projects/sdcorejs-angular/services/loading/src/loading.service.ts","../../../projects/sdcorejs-angular/services/loading/sdcorejs-angular-services-loading.ts"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, Injectable, PLATFORM_ID, inject } from '@angular/core';\n\nexport interface SdLoadingRef {\n readonly closed: boolean;\n close(): void;\n}\n\ninterface SdLoadingDocumentRecord {\n readonly hostStates: WeakMap<Element, SdLoadingHostState>;\n readonly liveHosts: Set<Element>;\n style: SdLoadingStyleRecord | undefined;\n}\n\ninterface SdLoadingHostState {\n readonly overlay: HTMLElement;\n readonly previousAriaBusy: string | null;\n readonly contributions: SdLoadingContribution[];\n count: number;\n}\n\ninterface SdLoadingHandleState {\n readonly selector: string;\n readonly contributions: SdLoadingContribution[];\n closed: boolean;\n}\n\ninterface SdLoadingContribution {\n readonly host: Element;\n readonly owner: SdLoadingHandleState;\n readonly service: SdLoadingService;\n released: boolean;\n}\n\ninterface SdLoadingStyleRecord {\n readonly element: HTMLStyleElement;\n readonly libraryOwned: boolean;\n readonly owners: Set<SdLoadingService>;\n ownedText: Text | null;\n}\n\nconst SD_LOADING_STYLE_ATTRIBUTE = 'data-sd-loading-styles';\nconst SD_LOADING_OVERLAY_ATTRIBUTE = 'data-sd-loading-overlay';\n// why: SdButton cũng dùng .sd-loading; chỉ overlay do service tạo được nhận CSS phủ vùng.\nconst SD_LOADING_OVERLAY_SELECTOR = `.sd-loading[${SD_LOADING_OVERLAY_ATTRIBUTE}]`;\nconst SD_LOADING_SPINNER_SELECTOR = `${SD_LOADING_OVERLAY_SELECTOR} > .sd-loading-spinner`;\nconst SD_LOADING_STYLES = `\n${SD_LOADING_OVERLAY_SELECTOR} {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n opacity: 0.6;\n background: #fff;\n z-index: 99999;\n}\n\n${SD_LOADING_SPINNER_SELECTOR} {\n position: absolute;\n top: calc(50% - 2.5rem);\n left: calc(50% - 2.5rem);\n width: 5rem;\n height: 5rem;\n border: 0.5rem solid var(--sd-primary);\n border-top-color: var(--sd-border);\n border-radius: 50%;\n animation: sd-loading-spin 1s linear infinite;\n}\n\n@keyframes sd-loading-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n`;\n\nconst CLOSED_LOADING_REF: SdLoadingRef = Object.freeze({\n closed: true,\n close(): void {\n // A closed ref deliberately has no work to release.\n },\n});\n\n/*\n * why: service này cố tình KHÔNG dùng Renderer2. Khi app bật animations, `RendererFactory2` trả về\n * `AnimationRendererFactory` và `Renderer2.removeChild()` chỉ đẩy element vào hàng đợi\n * `collectedLeaveElements` của animation engine — DOM chỉ thật sự bị gỡ ở lần flush kế tiếp (sau một\n * chu kỳ change detection). Overlay và `style[data-sd-loading-styles]` ở đây là DOM ngoài view, được\n * gỡ lúc destroy injector hoặc từ ngữ cảnh async ngoài Angular, tức không còn flush nào chạy sau đó →\n * node nằm lại trong document vĩnh viễn (overlay z-index 99999 khoá cả trang). Ghi DOM trực tiếp trên\n * `DOCUMENT` giữ append/remove đối xứng và đồng bộ; nhánh SSR đã được `isPlatformBrowser` chặn sẵn.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class SdLoadingService {\n private static readonly documentRecords = new WeakMap<Document, SdLoadingDocumentRecord>();\n\n readonly #document: Document;\n readonly #isBrowser: boolean;\n readonly #destroyRef = inject(DestroyRef);\n readonly #handleQueue: SdLoadingHandleState[] = [];\n\n #styleRegistered = false;\n #destroyed = false;\n\n /** Inserted by Angular inject() migration for backwards compatibility. */\n constructor(...args: unknown[]);\n constructor() {\n this.#document = inject(DOCUMENT);\n this.#isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n this.#destroyRef.onDestroy(() => this.#destroy());\n }\n\n /** Starts loading for every current selector match and returns ownership of those exact hosts. */\n start = (selector = 'body'): SdLoadingRef => {\n if (this.#destroyed || !this.#isBrowser) return CLOSED_LOADING_REF;\n\n const hosts = Array.from(this.#document.querySelectorAll(selector));\n if (hosts.length === 0) return CLOSED_LOADING_REF;\n\n const documentRecord = this.#getOrCreateDocumentRecord();\n this.#ensureStyles(documentRecord);\n const state: SdLoadingHandleState = { selector, contributions: [], closed: false };\n for (const host of hosts) {\n const contribution: SdLoadingContribution = {\n host,\n owner: state,\n service: this,\n released: false,\n };\n state.contributions.push(contribution);\n this.#acquireHost(documentRecord, contribution);\n }\n this.#handleQueue.push(state);\n\n return {\n get closed(): boolean {\n return state.closed;\n },\n close: () => this.#closeHandle(state),\n };\n };\n\n /** Returns the first matched globally loading host, `false` for idle matches, or `null` when unavailable. */\n isLoading = (selector = 'body'): Element | false | null => {\n if (this.#destroyed || !this.#isBrowser) return null;\n\n const hosts = this.#document.querySelectorAll(selector);\n if (hosts.length === 0) return null;\n\n const documentRecord = SdLoadingService.documentRecords.get(this.#document);\n for (const host of Array.from(hosts)) {\n const state = documentRecord?.hostStates.get(host);\n if (state && state.count > 0 && state.overlay.parentNode === host) return host;\n }\n return false;\n };\n\n /** Releases the oldest exact-selector start, with a current-host fallback for legacy cross-selector calls. */\n stop = (selector = 'body'): void => {\n if (this.#destroyed || !this.#isBrowser) return;\n\n const exactHandle = this.#handleQueue.find(state => !state.closed && state.selector === selector);\n if (exactHandle) {\n this.#closeHandle(exactHandle);\n return;\n }\n\n const documentRecord = SdLoadingService.documentRecords.get(this.#document);\n if (!documentRecord) return;\n\n for (const host of Array.from(this.#document.querySelectorAll(selector))) {\n const contribution = documentRecord.hostStates\n .get(host)\n ?.contributions.find(candidate => !candidate.released && candidate.service === this);\n if (contribution) this.#releaseContribution(documentRecord, contribution);\n }\n };\n\n run<T>(task: () => T | PromiseLike<T>, selector?: string): Promise<T>;\n run<T>(task: PromiseLike<T>, selector?: string): Promise<T>;\n /** Runs a task inside a loading lifetime and always releases it without replacing the task result or error. */\n async run<T>(task: (() => T | PromiseLike<T>) | PromiseLike<T>, selector = 'body'): Promise<T> {\n const ref = this.start(selector);\n try {\n const result = typeof task === 'function' ? task() : task;\n return await result;\n } finally {\n ref.close();\n }\n }\n\n #getOrCreateDocumentRecord(): SdLoadingDocumentRecord {\n let record = SdLoadingService.documentRecords.get(this.#document);\n if (!record) {\n record = {\n hostStates: new WeakMap<Element, SdLoadingHostState>(),\n liveHosts: new Set<Element>(),\n style: undefined,\n };\n SdLoadingService.documentRecords.set(this.#document, record);\n }\n return record;\n }\n\n #acquireHost(documentRecord: SdLoadingDocumentRecord, contribution: SdLoadingContribution): void {\n const host = contribution.host;\n const existing = documentRecord.hostStates.get(host);\n if (existing) {\n this.#repairOverlay(host, existing);\n existing.count += 1;\n existing.contributions.push(contribution);\n return;\n }\n\n const state: SdLoadingHostState = {\n overlay: this.#createOverlay(),\n previousAriaBusy: host.getAttribute('aria-busy'),\n contributions: [contribution],\n count: 1,\n };\n host.setAttribute('aria-busy', 'true');\n host.appendChild(state.overlay);\n documentRecord.hostStates.set(host, state);\n documentRecord.liveHosts.add(host);\n }\n\n #repairOverlay(host: Element, state: SdLoadingHostState): void {\n // why: appendChild tự động rút overlay khỏi parent cũ, nên không cần removeChild riêng.\n if (state.overlay.parentNode !== host) host.appendChild(state.overlay);\n if (host.getAttribute('aria-busy') !== 'true') host.setAttribute('aria-busy', 'true');\n }\n\n #releaseContribution(documentRecord: SdLoadingDocumentRecord, contribution: SdLoadingContribution): void {\n if (contribution.released) return;\n contribution.released = true;\n\n const state = documentRecord.hostStates.get(contribution.host);\n if (state) {\n const contributionIndex = state.contributions.indexOf(contribution);\n if (contributionIndex >= 0) state.contributions.splice(contributionIndex, 1);\n state.count -= 1;\n\n if (state.count <= 0) this.#removeHost(documentRecord, contribution.host, state);\n }\n\n contribution.service.#closeOwnerWhenReleased(contribution.owner);\n }\n\n #removeHost(documentRecord: SdLoadingDocumentRecord, host: Element, state: SdLoadingHostState): void {\n state.overlay.remove();\n\n if (host.getAttribute('aria-busy') === 'true') {\n if (state.previousAriaBusy === null) host.removeAttribute('aria-busy');\n else host.setAttribute('aria-busy', state.previousAriaBusy);\n }\n\n documentRecord.hostStates.delete(host);\n documentRecord.liveHosts.delete(host);\n this.#deleteDocumentRecordWhenEmpty(documentRecord);\n }\n\n #closeHandle(state: SdLoadingHandleState): void {\n if (state.closed) return;\n\n state.closed = true;\n this.#dequeueHandle(state);\n const documentRecord = SdLoadingService.documentRecords.get(this.#document);\n if (documentRecord) {\n for (const contribution of [...state.contributions]) {\n this.#releaseContribution(documentRecord, contribution);\n }\n } else {\n for (const contribution of state.contributions) contribution.released = true;\n }\n state.contributions.length = 0;\n }\n\n #closeOwnerWhenReleased(state: SdLoadingHandleState): void {\n if (state.closed || state.contributions.some(contribution => !contribution.released)) return;\n\n state.closed = true;\n this.#dequeueHandle(state);\n state.contributions.length = 0;\n }\n\n #dequeueHandle(state: SdLoadingHandleState): void {\n const handleIndex = this.#handleQueue.indexOf(state);\n if (handleIndex >= 0) this.#handleQueue.splice(handleIndex, 1);\n }\n\n #createOverlay(): HTMLElement {\n const container = this.#document.createElement('div');\n const spinner = this.#document.createElement('div');\n\n container.classList.add('sd-loading');\n container.setAttribute(SD_LOADING_OVERLAY_ATTRIBUTE, '');\n container.setAttribute('role', 'status');\n container.setAttribute('aria-live', 'polite');\n container.setAttribute('aria-label', 'Loading');\n\n spinner.classList.add('sd-loading-spinner');\n spinner.setAttribute('aria-hidden', 'true');\n container.appendChild(spinner);\n return container;\n }\n\n #ensureStyles(documentRecord: SdLoadingDocumentRecord): void {\n let record = documentRecord.style;\n if (record && !this.#isCurrentStyle(record.element)) {\n const owners = record.owners;\n this.#detachOwnedStyleContent(record);\n record = this.#createStyleRecord(owners);\n documentRecord.style = record;\n } else if (!record) {\n record = this.#createStyleRecord(new Set<SdLoadingService>());\n documentRecord.style = record;\n } else {\n this.#ensureRequiredStyleText(record);\n }\n\n record.owners.add(this);\n this.#styleRegistered = true;\n }\n\n #isCurrentStyle(element: HTMLStyleElement): boolean {\n return element.isConnected && element.parentNode === this.#document.head && element.hasAttribute(SD_LOADING_STYLE_ATTRIBUTE);\n }\n\n #createStyleRecord(owners: Set<SdLoadingService>): SdLoadingStyleRecord {\n const existing = this.#document.head.querySelector<HTMLStyleElement>(`style[${SD_LOADING_STYLE_ATTRIBUTE}]`);\n if (existing) {\n const record: SdLoadingStyleRecord = {\n element: existing,\n libraryOwned: false,\n owners,\n ownedText: null,\n };\n this.#ensureRequiredStyleText(record);\n return record;\n }\n\n const style = this.#document.createElement('style');\n const ownedText = this.#document.createTextNode(SD_LOADING_STYLES);\n style.setAttribute(SD_LOADING_STYLE_ATTRIBUTE, '');\n style.appendChild(ownedText);\n this.#document.head.appendChild(style);\n return { element: style, libraryOwned: true, owners, ownedText };\n }\n\n #ensureRequiredStyleText(record: SdLoadingStyleRecord): void {\n const currentText = record.element.textContent ?? '';\n const hasRequiredRules =\n currentText.includes(`${SD_LOADING_OVERLAY_SELECTOR} {`) &&\n currentText.includes(`${SD_LOADING_SPINNER_SELECTOR} {`) &&\n currentText.includes('@keyframes sd-loading-spin');\n if (hasRequiredRules) return;\n\n if (record.ownedText && record.ownedText.parentNode !== record.element) record.ownedText = null;\n if (!record.ownedText) {\n record.ownedText = this.#document.createTextNode(SD_LOADING_STYLES);\n record.element.appendChild(record.ownedText);\n }\n }\n\n #detachOwnedStyleContent(record: SdLoadingStyleRecord): void {\n if (record.libraryOwned) record.element.remove();\n else record.ownedText?.remove();\n record.ownedText = null;\n }\n\n #destroy(): void {\n if (this.#destroyed) return;\n this.#destroyed = true;\n\n if (this.#isBrowser) {\n for (const state of [...this.#handleQueue]) this.#closeHandle(state);\n this.#unregisterStyles();\n return;\n }\n\n for (const state of this.#handleQueue) {\n state.closed = true;\n state.contributions.length = 0;\n }\n this.#handleQueue.length = 0;\n }\n\n #unregisterStyles(): void {\n if (!this.#styleRegistered) return;\n this.#styleRegistered = false;\n\n const documentRecord = SdLoadingService.documentRecords.get(this.#document);\n const record = documentRecord?.style;\n if (!documentRecord || !record) return;\n\n record.owners.delete(this);\n if (record.owners.size === 0) {\n this.#detachOwnedStyleContent(record);\n documentRecord.style = undefined;\n }\n this.#deleteDocumentRecordWhenEmpty(documentRecord);\n }\n\n #deleteDocumentRecordWhenEmpty(documentRecord: SdLoadingDocumentRecord): void {\n if (documentRecord.liveHosts.size === 0 && !documentRecord.style) {\n SdLoadingService.documentRecords.delete(this.#document);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */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AAA;AACpE,QAAA,IAAI,cAAc,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE;YAChE,EAAgB,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QACzD;IACF;wGA1TW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AC7FD;;AAEG;;;;"}
|
|
@@ -106,7 +106,7 @@ class ToastComponent {
|
|
|
106
106
|
this.closeTimer = null;
|
|
107
107
|
}
|
|
108
108
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ToastComponent, isStandalone: true, selector: "toast", inputs: { data: "data" }, host: { listeners: { "mouseenter": "pauseTimer()", "mouseleave": "resumeTimer()" }, properties: { "class": "hostClasses()", "attr.data-autoid": "autoId", "attr.data-type": "data.type", "attr.data-title": "data.title ?? null", "attr.data-message": "dataMessage" } }, ngImport: i0, template: "<div class=\"sd-toast__bar\" [class]=\"'bg-' + data.type\"></div>\n\n<div class=\"sd-toast__icon\" aria-hidden=\"true\">\n @switch (data.type) {\n @case ('success') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"m8 12 2.5 2.5L16 9\" />\n </svg>\n }\n @case ('info') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 11v5M12 8h.01\" />\n </svg>\n }\n @case ('warning') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M10.3 3.9a2 2 0 0 1 3.4 0l8 13.8a2 2 0 0 1-1.7 3H4a2 2 0 0 1-1.7-3zM12 9v4M12 17h.01\" />\n </svg>\n }\n @case ('error') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v6M12 17h.01\" />\n </svg>\n }\n }\n</div>\n\n<div class=\"sd-toast__content\">\n <div class=\"sd-toast__header\">\n <strong class=\"sd-toast__title\">{{ data.title || ('core.notify.type.' + data.type | sdTranslate) }}</strong>\n <button class=\"sd-toast__close\" (click)=\"close()\">×</button>\n </div>\n\n <div class=\"sd-toast__body\">\n @if (!isMultiMessage) {\n <!-- Text rendering is the default safe path; HTML is opt-in and sanitized. -->\n @if (data.html) {\n <div [innerHTML]=\"sanitizeHtml(singleMessage)\"></div>\n } @else {\n <div>{{ singleMessage }}</div>\n }\n } @else {\n <ul class=\"msg-list\">\n @for (msg of displayMessages; track msg) {\n @if (data.html) {\n <li [innerHTML]=\"sanitizeHtml('- ' + msg)\"></li>\n } @else {\n <li>{{ '- ' + msg }}</li>\n }\n }\n </ul>\n\n @if (hasMore) {\n <button type=\"button\" class=\"toggle-more btn-link\" [class]=\"'text-' + data.type\" (click)=\"toggleExpand()\">\n {{ isExpanded() ? ('core.notify.show-less' | sdTranslate) : ('core.notify.show-more' | sdTranslate: { count: restCount }) }}\n </button>\n }\n }\n </div>\n\n @if (data.actionLabel) {\n <div class=\"sd-toast__actions\">\n <button class=\"btn-action\" [class]=\"'bg-' + data.type + '-light text-' + data.type\" (click)=\"onActionClick()\">\n {{ data.actionLabel }}\n </button>\n </div>\n }\n</div>\n", styles: [":host{display:flex;width:350px;border-radius:8px;box-shadow:0 4px 12px #00000026;margin-bottom:12px;overflow:hidden;position:relative;font-family:Roboto,sans-serif;pointer-events:auto;animation:sd-toast-enter .3s ease-out}:host(.sd-toast--closing){pointer-events:none;animation:sd-toast-leave .2s ease-in forwards}@keyframes sd-toast-enter{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes sd-toast-leave{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}@media(prefers-reduced-motion:reduce){:host,:host(.sd-toast--closing){animation:none}}.sd-toast__bar{width:6px;flex-shrink:0}.sd-toast__icon{display:grid;place-items:center;width:32px;height:32px;margin:12px 0 0 12px;border-radius:
|
|
109
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ToastComponent, isStandalone: true, selector: "toast", inputs: { data: "data" }, host: { listeners: { "mouseenter": "pauseTimer()", "mouseleave": "resumeTimer()" }, properties: { "class": "hostClasses()", "attr.data-autoid": "autoId", "attr.data-type": "data.type", "attr.data-title": "data.title ?? null", "attr.data-message": "dataMessage" } }, ngImport: i0, template: "<div class=\"sd-toast__bar\" [class]=\"'bg-' + data.type\"></div>\n\n<div class=\"sd-toast__icon\" aria-hidden=\"true\">\n @switch (data.type) {\n @case ('success') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"m8 12 2.5 2.5L16 9\" />\n </svg>\n }\n @case ('info') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 11v5M12 8h.01\" />\n </svg>\n }\n @case ('warning') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M10.3 3.9a2 2 0 0 1 3.4 0l8 13.8a2 2 0 0 1-1.7 3H4a2 2 0 0 1-1.7-3zM12 9v4M12 17h.01\" />\n </svg>\n }\n @case ('error') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v6M12 17h.01\" />\n </svg>\n }\n }\n</div>\n\n<div class=\"sd-toast__content\">\n <div class=\"sd-toast__header\">\n <strong class=\"sd-toast__title\">{{ data.title || ('core.notify.type.' + data.type | sdTranslate) }}</strong>\n <button class=\"sd-toast__close\" (click)=\"close()\">×</button>\n </div>\n\n <div class=\"sd-toast__body\">\n @if (!isMultiMessage) {\n <!-- Text rendering is the default safe path; HTML is opt-in and sanitized. -->\n @if (data.html) {\n <div [innerHTML]=\"sanitizeHtml(singleMessage)\"></div>\n } @else {\n <div>{{ singleMessage }}</div>\n }\n } @else {\n <ul class=\"msg-list\">\n @for (msg of displayMessages; track msg) {\n @if (data.html) {\n <li [innerHTML]=\"sanitizeHtml('- ' + msg)\"></li>\n } @else {\n <li>{{ '- ' + msg }}</li>\n }\n }\n </ul>\n\n @if (hasMore) {\n <button type=\"button\" class=\"toggle-more btn-link\" [class]=\"'text-' + data.type\" (click)=\"toggleExpand()\">\n {{ isExpanded() ? ('core.notify.show-less' | sdTranslate) : ('core.notify.show-more' | sdTranslate: { count: restCount }) }}\n </button>\n }\n }\n </div>\n\n @if (data.actionLabel) {\n <div class=\"sd-toast__actions\">\n <button class=\"btn-action\" [class]=\"'bg-' + data.type + '-light text-' + data.type\" (click)=\"onActionClick()\">\n {{ data.actionLabel }}\n </button>\n </div>\n }\n</div>\n", styles: [":host{display:flex;width:350px;border-radius:8px;box-shadow:0 4px 12px #00000026;margin-bottom:12px;overflow:hidden;position:relative;font-family:Roboto,sans-serif;pointer-events:auto;animation:sd-toast-enter .3s ease-out}:host(.sd-toast--closing){pointer-events:none;animation:sd-toast-leave .2s ease-in forwards}@keyframes sd-toast-enter{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes sd-toast-leave{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}@media(prefers-reduced-motion:reduce){:host,:host(.sd-toast--closing){animation:none}}.sd-toast__bar{width:6px;flex-shrink:0}.sd-toast__icon{display:grid;place-items:center;width:32px;height:32px;margin:12px 0 0 12px;border-radius:50%;flex-shrink:0}.sd-toast__icon svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sd-toast__content{min-width:0;flex-grow:1;padding:12px;display:flex;flex-direction:column}.sd-toast__header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:4px}.sd-toast__title{font-size:16px;font-weight:600}.sd-toast__close{background:none;border:none;font-size:16px;cursor:pointer;line-height:1;padding:0;opacity:.5;transition:opacity .2s}.sd-toast__close:hover{opacity:1}.sd-toast__body{font-size:14px;line-height:1.4;word-break:break-word}.sd-toast__actions{display:flex;justify-content:flex-end;margin-top:8px}:host([data-type=success]) .sd-toast__icon{color:var(--sd-success-dark);background:var(--sd-success-light)}:host([data-type=info]) .sd-toast__icon{color:var(--sd-info-dark);background:var(--sd-info-light)}:host([data-type=warning]) .sd-toast__icon{color:var(--sd-warning-dark);background:var(--sd-warning-light)}:host([data-type=error]) .sd-toast__icon{color:var(--sd-error-dark);background:var(--sd-error-light)}.msg-list{padding-left:0;list-style:none;margin:0}.toggle-more{background:none;border:none;padding:0;font:inherit;cursor:pointer;font-size:13px;margin-top:4px;font-weight:500;text-align:left}.toggle-more:hover{text-decoration:underline}.toggle-more:focus-visible{outline:2px solid currentColor;outline-offset:2px}.btn-action{border:none;padding:6px 12px;border-radius:4px;font-weight:600;cursor:pointer;font-size:13px;transition:filter .2s}.btn-action:hover{filter:brightness(.95)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
110
110
|
}
|
|
111
111
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ToastComponent, decorators: [{
|
|
112
112
|
type: Component,
|
|
@@ -116,7 +116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
116
116
|
'[attr.data-type]': 'data.type',
|
|
117
117
|
'[attr.data-title]': 'data.title ?? null',
|
|
118
118
|
'[attr.data-message]': 'dataMessage',
|
|
119
|
-
}, template: "<div class=\"sd-toast__bar\" [class]=\"'bg-' + data.type\"></div>\n\n<div class=\"sd-toast__icon\" aria-hidden=\"true\">\n @switch (data.type) {\n @case ('success') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"m8 12 2.5 2.5L16 9\" />\n </svg>\n }\n @case ('info') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 11v5M12 8h.01\" />\n </svg>\n }\n @case ('warning') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M10.3 3.9a2 2 0 0 1 3.4 0l8 13.8a2 2 0 0 1-1.7 3H4a2 2 0 0 1-1.7-3zM12 9v4M12 17h.01\" />\n </svg>\n }\n @case ('error') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v6M12 17h.01\" />\n </svg>\n }\n }\n</div>\n\n<div class=\"sd-toast__content\">\n <div class=\"sd-toast__header\">\n <strong class=\"sd-toast__title\">{{ data.title || ('core.notify.type.' + data.type | sdTranslate) }}</strong>\n <button class=\"sd-toast__close\" (click)=\"close()\">×</button>\n </div>\n\n <div class=\"sd-toast__body\">\n @if (!isMultiMessage) {\n <!-- Text rendering is the default safe path; HTML is opt-in and sanitized. -->\n @if (data.html) {\n <div [innerHTML]=\"sanitizeHtml(singleMessage)\"></div>\n } @else {\n <div>{{ singleMessage }}</div>\n }\n } @else {\n <ul class=\"msg-list\">\n @for (msg of displayMessages; track msg) {\n @if (data.html) {\n <li [innerHTML]=\"sanitizeHtml('- ' + msg)\"></li>\n } @else {\n <li>{{ '- ' + msg }}</li>\n }\n }\n </ul>\n\n @if (hasMore) {\n <button type=\"button\" class=\"toggle-more btn-link\" [class]=\"'text-' + data.type\" (click)=\"toggleExpand()\">\n {{ isExpanded() ? ('core.notify.show-less' | sdTranslate) : ('core.notify.show-more' | sdTranslate: { count: restCount }) }}\n </button>\n }\n }\n </div>\n\n @if (data.actionLabel) {\n <div class=\"sd-toast__actions\">\n <button class=\"btn-action\" [class]=\"'bg-' + data.type + '-light text-' + data.type\" (click)=\"onActionClick()\">\n {{ data.actionLabel }}\n </button>\n </div>\n }\n</div>\n", styles: [":host{display:flex;width:350px;border-radius:8px;box-shadow:0 4px 12px #00000026;margin-bottom:12px;overflow:hidden;position:relative;font-family:Roboto,sans-serif;pointer-events:auto;animation:sd-toast-enter .3s ease-out}:host(.sd-toast--closing){pointer-events:none;animation:sd-toast-leave .2s ease-in forwards}@keyframes sd-toast-enter{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes sd-toast-leave{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}@media(prefers-reduced-motion:reduce){:host,:host(.sd-toast--closing){animation:none}}.sd-toast__bar{width:6px;flex-shrink:0}.sd-toast__icon{display:grid;place-items:center;width:32px;height:32px;margin:12px 0 0 12px;border-radius:
|
|
119
|
+
}, template: "<div class=\"sd-toast__bar\" [class]=\"'bg-' + data.type\"></div>\n\n<div class=\"sd-toast__icon\" aria-hidden=\"true\">\n @switch (data.type) {\n @case ('success') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"m8 12 2.5 2.5L16 9\" />\n </svg>\n }\n @case ('info') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 11v5M12 8h.01\" />\n </svg>\n }\n @case ('warning') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M10.3 3.9a2 2 0 0 1 3.4 0l8 13.8a2 2 0 0 1-1.7 3H4a2 2 0 0 1-1.7-3zM12 9v4M12 17h.01\" />\n </svg>\n }\n @case ('error') {\n <svg viewBox=\"0 0 24 24\" focusable=\"false\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v6M12 17h.01\" />\n </svg>\n }\n }\n</div>\n\n<div class=\"sd-toast__content\">\n <div class=\"sd-toast__header\">\n <strong class=\"sd-toast__title\">{{ data.title || ('core.notify.type.' + data.type | sdTranslate) }}</strong>\n <button class=\"sd-toast__close\" (click)=\"close()\">×</button>\n </div>\n\n <div class=\"sd-toast__body\">\n @if (!isMultiMessage) {\n <!-- Text rendering is the default safe path; HTML is opt-in and sanitized. -->\n @if (data.html) {\n <div [innerHTML]=\"sanitizeHtml(singleMessage)\"></div>\n } @else {\n <div>{{ singleMessage }}</div>\n }\n } @else {\n <ul class=\"msg-list\">\n @for (msg of displayMessages; track msg) {\n @if (data.html) {\n <li [innerHTML]=\"sanitizeHtml('- ' + msg)\"></li>\n } @else {\n <li>{{ '- ' + msg }}</li>\n }\n }\n </ul>\n\n @if (hasMore) {\n <button type=\"button\" class=\"toggle-more btn-link\" [class]=\"'text-' + data.type\" (click)=\"toggleExpand()\">\n {{ isExpanded() ? ('core.notify.show-less' | sdTranslate) : ('core.notify.show-more' | sdTranslate: { count: restCount }) }}\n </button>\n }\n }\n </div>\n\n @if (data.actionLabel) {\n <div class=\"sd-toast__actions\">\n <button class=\"btn-action\" [class]=\"'bg-' + data.type + '-light text-' + data.type\" (click)=\"onActionClick()\">\n {{ data.actionLabel }}\n </button>\n </div>\n }\n</div>\n", styles: [":host{display:flex;width:350px;border-radius:8px;box-shadow:0 4px 12px #00000026;margin-bottom:12px;overflow:hidden;position:relative;font-family:Roboto,sans-serif;pointer-events:auto;animation:sd-toast-enter .3s ease-out}:host(.sd-toast--closing){pointer-events:none;animation:sd-toast-leave .2s ease-in forwards}@keyframes sd-toast-enter{0%{transform:translate(100%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes sd-toast-leave{0%{transform:translate(0);opacity:1}to{transform:translate(100%);opacity:0}}@media(prefers-reduced-motion:reduce){:host,:host(.sd-toast--closing){animation:none}}.sd-toast__bar{width:6px;flex-shrink:0}.sd-toast__icon{display:grid;place-items:center;width:32px;height:32px;margin:12px 0 0 12px;border-radius:50%;flex-shrink:0}.sd-toast__icon svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sd-toast__content{min-width:0;flex-grow:1;padding:12px;display:flex;flex-direction:column}.sd-toast__header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:4px}.sd-toast__title{font-size:16px;font-weight:600}.sd-toast__close{background:none;border:none;font-size:16px;cursor:pointer;line-height:1;padding:0;opacity:.5;transition:opacity .2s}.sd-toast__close:hover{opacity:1}.sd-toast__body{font-size:14px;line-height:1.4;word-break:break-word}.sd-toast__actions{display:flex;justify-content:flex-end;margin-top:8px}:host([data-type=success]) .sd-toast__icon{color:var(--sd-success-dark);background:var(--sd-success-light)}:host([data-type=info]) .sd-toast__icon{color:var(--sd-info-dark);background:var(--sd-info-light)}:host([data-type=warning]) .sd-toast__icon{color:var(--sd-warning-dark);background:var(--sd-warning-light)}:host([data-type=error]) .sd-toast__icon{color:var(--sd-error-dark);background:var(--sd-error-light)}.msg-list{padding-left:0;list-style:none;margin:0}.toggle-more{background:none;border:none;padding:0;font:inherit;cursor:pointer;font-size:13px;margin-top:4px;font-weight:500;text-align:left}.toggle-more:hover{text-decoration:underline}.toggle-more:focus-visible{outline:2px solid currentColor;outline-offset:2px}.btn-action{border:none;padding:6px 12px;border-radius:4px;font-weight:600;cursor:pointer;font-size:13px;transition:filter .2s}.btn-action:hover{filter:brightness(.95)}\n"] }]
|
|
120
120
|
}], ctorParameters: () => [], propDecorators: { data: [{
|
|
121
121
|
type: Input,
|
|
122
122
|
args: [{ required: true }]
|
package/i18n/src/en.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const EN_MESSAGES: {
|
|
2
|
+
readonly 'core.component.table.quick-search.placeholder': "Search…";
|
|
3
|
+
readonly 'core.component.table.quick-search.enter': "Press Enter to search.";
|
|
4
|
+
readonly 'core.component.table.quick-search.required': "Select the required filters before searching.";
|
|
5
|
+
readonly 'core.component.table.quick-search.clear': "Clear search term";
|
|
2
6
|
readonly 'core.component.table.mobile.tools': "Tools";
|
|
3
7
|
readonly 'core.component.table.mobile.tools-title': "Table tools";
|
|
4
8
|
readonly 'core.component.table.mobile.row-commands': "Row actions: {row}";
|
|
@@ -533,6 +537,7 @@ export declare const EN_MESSAGES: {
|
|
|
533
537
|
readonly 'core.module.layout.user.setting': "Settings";
|
|
534
538
|
readonly 'core.module.layout.user.notification': "Notifications";
|
|
535
539
|
readonly 'core.module.layout.sidebar.search': "Search";
|
|
540
|
+
readonly 'core.module.layout.sidebar.clear-search': "Clear search";
|
|
536
541
|
readonly 'core.module.layout.sidebar.toggle': "Toggle sidebar";
|
|
537
542
|
readonly 'core.module.layout.sidebar.menu-groups': "Menu groups";
|
|
538
543
|
readonly 'core.module.layout.sidebar.close-menu': "Close menu";
|
|
@@ -6,6 +6,10 @@ interface SdLayoutMenuTreeNode {
|
|
|
6
6
|
title: string;
|
|
7
7
|
depth: number;
|
|
8
8
|
paddingLeft: number;
|
|
9
|
+
inset: number;
|
|
10
|
+
branchOffsets: number[];
|
|
11
|
+
showIcon: boolean;
|
|
12
|
+
isRoot: boolean;
|
|
9
13
|
isGroup: boolean;
|
|
10
14
|
isActive: boolean;
|
|
11
15
|
isPinned: boolean;
|
|
@@ -21,6 +25,10 @@ export declare class SdLayoutMenuTreeComponent {
|
|
|
21
25
|
pinnedKeys: import("@angular/core").InputSignal<string[]>;
|
|
22
26
|
showPin: import("@angular/core").InputSignal<boolean>;
|
|
23
27
|
pinVisibility: import("@angular/core").InputSignal<"hover" | "always">;
|
|
28
|
+
/** V3 hierarchy and flat shortcuts are opt-in; V2/mobile retain the default presentation. */
|
|
29
|
+
presentation: import("@angular/core").InputSignal<"default" | "hierarchy" | "shortcuts">;
|
|
30
|
+
structured: import("@angular/core").Signal<boolean>;
|
|
31
|
+
iconFontSet: import("@angular/core").Signal<"material-icons-outlined" | undefined>;
|
|
24
32
|
navigate: import("@angular/core").OutputEmitterRef<SdLayoutRootMenu>;
|
|
25
33
|
togglePinned: import("@angular/core").OutputEmitterRef<SdLayoutMenu>;
|
|
26
34
|
nodes: import("@angular/core").Signal<SdLayoutMenuTreeNode[]>;
|
|
@@ -30,6 +38,6 @@ export declare class SdLayoutMenuTreeComponent {
|
|
|
30
38
|
onPinHoverStart(key: string): void;
|
|
31
39
|
onPinHoverEnd(key: string): void;
|
|
32
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdLayoutMenuTreeComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdLayoutMenuTreeComponent, "sd-layout-menu-tree", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "activePath": { "alias": "activePath"; "required": false; "isSignal": true; }; "pinnedKeys": { "alias": "pinnedKeys"; "required": false; "isSignal": true; }; "showPin": { "alias": "showPin"; "required": false; "isSignal": true; }; "pinVisibility": { "alias": "pinVisibility"; "required": false; "isSignal": true; }; }, { "navigate": "navigate"; "togglePinned": "togglePinned"; }, never, never, true, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdLayoutMenuTreeComponent, "sd-layout-menu-tree", never, { "menus": { "alias": "menus"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "activePath": { "alias": "activePath"; "required": false; "isSignal": true; }; "pinnedKeys": { "alias": "pinnedKeys"; "required": false; "isSignal": true; }; "showPin": { "alias": "showPin"; "required": false; "isSignal": true; }; "pinVisibility": { "alias": "pinVisibility"; "required": false; "isSignal": true; }; "presentation": { "alias": "presentation"; "required": false; "isSignal": true; }; }, { "navigate": "navigate"; "togglePinned": "togglePinned"; }, never, never, true, never>;
|
|
34
42
|
}
|
|
35
43
|
export {};
|
|
@@ -3,7 +3,8 @@ export declare class SdLayoutSearchFieldComponent {
|
|
|
3
3
|
model: import("@angular/core").InputSignal<string>;
|
|
4
4
|
placeholder: import("@angular/core").InputSignal<string>;
|
|
5
5
|
autoId: import("@angular/core").InputSignal<string>;
|
|
6
|
+
appearance: import("@angular/core").InputSignal<"pill" | "compact">;
|
|
6
7
|
sdChange: import("@angular/core").OutputEmitterRef<string>;
|
|
7
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdLayoutSearchFieldComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdLayoutSearchFieldComponent, "sd-layout-search-field", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": true; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": true; "isSignal": true; }; }, { "sdChange": "sdChange"; }, never, never, true, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdLayoutSearchFieldComponent, "sd-layout-search-field", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": true; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": true; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; }, { "sdChange": "sdChange"; }, never, never, true, never>;
|
|
9
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdcorejs/angular",
|
|
3
|
-
"version": "19.2.
|
|
3
|
+
"version": "19.2.8",
|
|
4
4
|
"description": "Angular component library: data table, query bar/builder, 20+ signal-based form controls, layout, auth and workflow services. Standalone, OnPush, signals-first. Published in parallel lines for Angular 19, 20, 21 and 22.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|