@sdcorejs/angular 21.2.6 → 21.2.7

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.
@@ -69,11 +69,11 @@ class DialogConfirmComponent {
69
69
  }
70
70
  };
71
71
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DialogConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
72
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", 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:8px;color:var(--sd-primary-dark);background:var(--sd-primary-light)}.sd-dialog-confirm__icon[data-tone=success]{color:var(--sd-success-dark);background:var(--sd-success-light)}.sd-dialog-confirm__icon[data-tone=info]{color:var(--sd-info-dark);background:var(--sd-info-light)}.sd-dialog-confirm__icon[data-tone=warning]{color:var(--sd-warning-dark);background:var(--sd-warning-light)}.sd-dialog-confirm__icon[data-tone=error]{color:var(--sd-error-dark);background:var(--sd-error-light)}.sd-dialog-confirm__icon 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__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 });
72
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", 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: "21.2.17", 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:8px;color:var(--sd-primary-dark);background:var(--sd-primary-light)}.sd-dialog-confirm__icon[data-tone=success]{color:var(--sd-success-dark);background:var(--sd-success-light)}.sd-dialog-confirm__icon[data-tone=info]{color:var(--sd-info-dark);background:var(--sd-info-light)}.sd-dialog-confirm__icon[data-tone=warning]{color:var(--sd-warning-dark);background:var(--sd-warning-light)}.sd-dialog-confirm__icon[data-tone=error]{color:var(--sd-error-dark);background:var(--sd-error-light)}.sd-dialog-confirm__icon 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__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"] }]
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 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,GA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A,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,YAA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,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;;;;"}
@@ -106,7 +106,7 @@ class ToastComponent {
106
106
  this.closeTimer = null;
107
107
  }
108
108
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
109
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", 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()\">&times;</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:6px;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 });
109
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", 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()\">&times;</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: "21.2.17", ngImport: i0, type: ToastComponent, decorators: [{
112
112
  type: Component,
@@ -116,7 +116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", 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()\">&times;</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:6px;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"] }]
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()\">&times;</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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdcorejs/angular",
3
- "version": "21.2.6",
3
+ "version": "21.2.7",
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",
@@ -7,6 +7,7 @@ import { SdUnwrapSignal } from '@sdcorejs/angular/utilities/models';
7
7
  import { Observable } from 'rxjs';
8
8
  import { SdIconSet } from '@sdcorejs/angular/modules/icon';
9
9
  import { SdButton, SdButtonColor } from '@sdcorejs/angular/components/button';
10
+ import * as _sdcorejs_angular_components_table from '@sdcorejs/angular/components/table';
10
11
  import { MatPaginator, MatPaginatorIntl } from '@angular/material/paginator';
11
12
  import { MatSort, SortDirection } from '@angular/material/sort';
12
13
  import { MatTable } from '@angular/material/table';
@@ -166,6 +167,34 @@ declare class SdTableCellDefDirective<T = any> {
166
167
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SdTableCellDefDirective<any>, "[sdTableCellDef]", never, { "sdTableCellDef": { "alias": "sdTableCellDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
167
168
  }
168
169
 
170
+ type SdTableQuickSearchFilterValue = string | number | boolean | (string | number)[] | null | undefined;
171
+ type QuickSearchDropdown<F> = F extends {
172
+ type: 'values' | 'lazy-values';
173
+ } ? Omit<F, 'default' | 'hidden' | 'defaultShowing' | 'onChange'> & {
174
+ /** Signal defaults follow shared state and take precedence over the table's cached value. */
175
+ default?: SdTableQuickSearchFilterValue | Signal<SdTableQuickSearchFilterValue>;
176
+ /** Hides only the control; its value and required constraint remain active. */
177
+ hidden?: boolean | Signal<boolean>;
178
+ disabled?: boolean | Signal<boolean>;
179
+ /** User changes only; initialization and signal synchronization do not emit this callback. */
180
+ onChange?: (value: SdTableQuickSearchFilterValue) => void;
181
+ } : never;
182
+ type SdTableQuickSearchFilter<TData = unknown> = QuickSearchDropdown<SdTableExternalFilter<TData>>;
183
+ interface SdTableOptionQuickSearch {
184
+ /** CONTAIN matches, combined with equalFields using OR. Paths need not appear in columns. */
185
+ containFields?: string[];
186
+ /** Exact EQUAL matches, combined with containFields using OR. */
187
+ equalFields?: string[];
188
+ placeholder?: string;
189
+ /** Dropdowns before the keyword input, applied immediately and combined with AND. */
190
+ filters?: SdTableQuickSearchFilter[];
191
+ }
192
+ /** Applied values only. The unsubmitted keyword remains local to the input. */
193
+ interface SdTableQuickSearchValue {
194
+ term: string;
195
+ filters: Record<string, SdTableQuickSearchFilterValue>;
196
+ }
197
+
169
198
  interface SdTableQuickFilter {
170
199
  code: string;
171
200
  columnFilter: Record<string, any>;
@@ -175,6 +204,7 @@ interface TableFilterConfiguration {
175
204
  inlineExternal: Record<string, boolean>;
176
205
  }
177
206
  interface TableFilterValue {
207
+ quickSearch?: SdTableQuickSearchValue;
178
208
  columnOperator?: Record<string, Operator>;
179
209
  columnFilter?: Record<string, any>;
180
210
  externalFilter?: Record<string, any>;
@@ -182,6 +212,8 @@ interface TableFilterValue {
182
212
  filtered?: boolean;
183
213
  }
184
214
  interface SdTableFilterRequest<T = unknown> {
215
+ /** Applied quick-search keyword and dropdown values; omitted when quick search is disabled. */
216
+ quickSearch?: SdTableQuickSearchValue;
185
217
  columnOperator: Record<NestedKeyOf<T>, Operator>;
186
218
  rawColumnFilter: Record<NestedKeyOf<T>, any>;
187
219
  rawExternalFilter: Record<string, any>;
@@ -193,6 +225,8 @@ interface SdTableFilterRequest<T = unknown> {
193
225
  visibledColumns?: SdTableColumn[];
194
226
  }
195
227
  interface SdTableOptionFilter<T = unknown> {
228
+ /** Optional compact search row above the table. */
229
+ quickSearch?: SdTableOptionQuickSearch;
196
230
  /** Key định danh nếu muốn lưu cache */
197
231
  key?: string;
198
232
  /** Có bật cache giá trị filter hay không */
@@ -219,6 +253,7 @@ interface SdTableOptionFilter<T = unknown> {
219
253
  declare const SdConvertToPagingReq: (filterRequest: SdTableFilterRequest, args: {
220
254
  columns?: SdTableColumnAnyRow[];
221
255
  externalFilters?: SdTableExternalFilter[];
256
+ quickSearch?: SdTableOptionQuickSearch;
222
257
  fieldMapping?: Record<string, string>;
223
258
  orders?: Order[];
224
259
  }) => PagingReq;
@@ -996,6 +1031,8 @@ interface SdTableServerOption<T = any> extends SdTableBaseOption<T> {
996
1031
  onFilter?: (filterRequest: SdTableFilterRequest<T>, args: {
997
1032
  /** Cho biết toàn bộ external filter hiện tại có hợp lệ để trigger filter hay không. */
998
1033
  externalFilterValid: boolean;
1034
+ /** Whether all required quick-search dropdowns have values, including hidden controls. */
1035
+ quickSearchValid?: boolean;
999
1036
  }) => void;
1000
1037
  }
1001
1038
 
@@ -1040,6 +1077,13 @@ declare class SdTableCommandHeaderDefDirective {
1040
1077
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SdTableCommandHeaderDefDirective, "[sdTableCommandHeaderDef]", never, {}, {}, never, never, true, never>;
1041
1078
  }
1042
1079
 
1080
+ /** Consumer-owned UI at the right of the optional quick-search row. */
1081
+ declare class SdTableQuickSearchRightDefDirective {
1082
+ readonly templateRef: TemplateRef<unknown>;
1083
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdTableQuickSearchRightDefDirective, never>;
1084
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SdTableQuickSearchRightDefDirective, "[sdTableQuickSearchRightDef]", never, {}, {}, never, never, true, never>;
1085
+ }
1086
+
1043
1087
  interface Context$3<T = any> {
1044
1088
  item: SdTableItem<T>;
1045
1089
  }
@@ -1313,6 +1357,7 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1313
1357
  sdCellDefs: _angular_core.Signal<readonly SdTableCellDefDirective<any>[]>;
1314
1358
  /** Nội dung tuỳ chọn cho ô header của cột command (mặc định ô này để trống). */
1315
1359
  sdCommandHeaderDef: _angular_core.Signal<SdTableCommandHeaderDefDirective | undefined>;
1360
+ readonly sdQuickSearchRightDef: _angular_core.Signal<SdTableQuickSearchRightDefDirective | undefined>;
1316
1361
  sdFooterDefs: _angular_core.Signal<readonly SdMaterialFooterDefDirective<any>[]>;
1317
1362
  sdFilterDefs: _angular_core.Signal<readonly SdTableFilterDefDirective[]>;
1318
1363
  sdTitleDefs: _angular_core.Signal<readonly SdTableTitleDefDirective<any>[]>;
@@ -1368,6 +1413,10 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1368
1413
  isFiltered: _angular_core.WritableSignal<boolean>;
1369
1414
  requireFiltered: _angular_core.WritableSignal<boolean>;
1370
1415
  filterRegister: TableFilterRegister;
1416
+ readonly quickSearchOption: _angular_core.Signal<_sdcorejs_angular_components_table.SdTableOptionQuickSearch | undefined>;
1417
+ readonly quickSearchValue: _angular_core.WritableSignal<SdTableQuickSearchValue>;
1418
+ private readonly quickSearchControl;
1419
+ readonly quickSearchValid: _angular_core.Signal<boolean>;
1371
1420
  key: string;
1372
1421
  columnOperator: Record<string, Operator>;
1373
1422
  columnFilter?: NonNullable<TableFilterValue['columnFilter']>;
@@ -1389,6 +1438,7 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1389
1438
  exportCustom: () => void;
1390
1439
  onTreeToggle: (row: SdTableItem<T>) => Promise<void>;
1391
1440
  onFilterChange: () => void;
1441
+ onQuickSearchChange: (value: SdTableQuickSearchValue) => void;
1392
1442
  onFilterCommit: () => void;
1393
1443
  onExpand: (row: SdTableItem<T>) => Promise<void>;
1394
1444
  onSelect: (rowData: SdTableItem<T>) => void;
@@ -1441,7 +1491,7 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1441
1491
  groupContext: (header: SdTableItem<T>) => SdTableGroupDefContext<T>;
1442
1492
  rowStyle: (row: SdTableItem<T>, index?: number) => Record<string, string> | null;
1443
1493
  clearFilter: () => void;
1444
- setFilter: (args?: Pick<TableFilterValue, "columnFilter" | "externalFilter">) => void;
1494
+ setFilter: (args?: Pick<TableFilterValue, "columnFilter" | "externalFilter" | "quickSearch">) => void;
1445
1495
  get dataItems(): T[];
1446
1496
  get selectedItems(): T[];
1447
1497
  detectChanges: () => void;
@@ -1454,8 +1504,8 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1454
1504
  reorderSortPredicate: (index: number, drag: CdkDrag<SdTableItem<T>>, drop: CdkDropList<SdTableItem<T>[]>) => boolean;
1455
1505
  onReorderDrop(event: CdkDragDrop<SdTableItem<T>[]>): void;
1456
1506
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdTable<any>, never>;
1457
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdTable<any>, "sd-table", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "option": { "alias": "option"; "required": true; "isSignal": true; }; "hideReadError": { "alias": "hideReadError"; "required": false; "isSignal": true; }; }, { "sdReadStateChange": "sdReadStateChange"; }, ["dataStateTemplate", "sdSubInformation", "sdGroupDef", "sdCellDefs", "sdCommandHeaderDef", "sdFooterDefs", "sdFilterDefs", "sdTitleDefs", "sdRowMobileDef"], ["[sdTableTop]"], true, never>;
1507
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdTable<any>, "sd-table", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "option": { "alias": "option"; "required": true; "isSignal": true; }; "hideReadError": { "alias": "hideReadError"; "required": false; "isSignal": true; }; }, { "sdReadStateChange": "sdReadStateChange"; }, ["dataStateTemplate", "sdSubInformation", "sdGroupDef", "sdCellDefs", "sdCommandHeaderDef", "sdQuickSearchRightDef", "sdFooterDefs", "sdFilterDefs", "sdTitleDefs", "sdRowMobileDef"], ["[sdTableTop]"], true, never>;
1458
1508
  }
1459
1509
 
1460
- export { SD_TABLE_CONFIGURATION, SdConvertToPagingReq, SdMaterialFooterDefDirective, SdTable, SdTableCellDefDirective, SdTableCommandHeaderDefDirective, SdTableExpandDefDirective, SdTableFilterDefDirective, SdTableGroupDefDirective, SdTablePaginatorIntl, SdTableRowMobileDefDirective, SdTableTitleDefDirective };
1461
- export type { ISdTableConfiguration, SdTableColumn, SdTableColumnAnyRow, SdTableColumnChildren, SdTableColumnLazyValues, SdTableColumnNormal, SdTableColumnTransformFunc, SdTableColumnValues, SdTableCommand, SdTableCommandChildren, SdTableCommandNormal, SdTableCommandOption, SdTableDisplay, SdTableExternalFilter, SdTableFilterRequest, SdTableGroupDefContext, SdTableItem, SdTableMeta, SdTableOption, SdTableOptionFilter, SdTableOptionTree, SdTableQuickFilter, SdTableRowMobileDefContext, TableFilterConfiguration, TableFilterRegister, TableFilterValue, TableOptionTreeLazy, TableOptionTreeStatic };
1510
+ export { SD_TABLE_CONFIGURATION, SdConvertToPagingReq, SdMaterialFooterDefDirective, SdTable, SdTableCellDefDirective, SdTableCommandHeaderDefDirective, SdTableExpandDefDirective, SdTableFilterDefDirective, SdTableGroupDefDirective, SdTablePaginatorIntl, SdTableQuickSearchRightDefDirective, SdTableRowMobileDefDirective, SdTableTitleDefDirective };
1511
+ export type { ISdTableConfiguration, SdTableColumn, SdTableColumnAnyRow, SdTableColumnChildren, SdTableColumnLazyValues, SdTableColumnNormal, SdTableColumnTransformFunc, SdTableColumnValues, SdTableCommand, SdTableCommandChildren, SdTableCommandNormal, SdTableCommandOption, SdTableDisplay, SdTableExternalFilter, SdTableFilterRequest, SdTableGroupDefContext, SdTableItem, SdTableMeta, SdTableOption, SdTableOptionFilter, SdTableOptionQuickSearch, SdTableOptionTree, SdTableQuickFilter, SdTableQuickSearchFilter, SdTableQuickSearchFilterValue, SdTableQuickSearchValue, SdTableRowMobileDefContext, TableFilterConfiguration, TableFilterRegister, TableFilterValue, TableOptionTreeLazy, TableOptionTreeStatic };
@@ -5,6 +5,10 @@ import { Signal, PipeTransform } from '@angular/core';
5
5
  declare const I18N_STORAGE_KEY = "sd-core.language";
6
6
 
7
7
  declare const EN_MESSAGES: {
8
+ readonly 'core.component.table.quick-search.placeholder': "Search…";
9
+ readonly 'core.component.table.quick-search.enter': "Press Enter to search.";
10
+ readonly 'core.component.table.quick-search.required': "Select the required filters before searching.";
11
+ readonly 'core.component.table.quick-search.clear': "Clear search term";
8
12
  readonly 'core.component.table.mobile.tools': "Tools";
9
13
  readonly 'core.component.table.mobile.tools-title': "Table tools";
10
14
  readonly 'core.component.table.mobile.row-commands': "Row actions: {row}";
@@ -539,6 +543,7 @@ declare const EN_MESSAGES: {
539
543
  readonly 'core.module.layout.user.setting': "Settings";
540
544
  readonly 'core.module.layout.user.notification': "Notifications";
541
545
  readonly 'core.module.layout.sidebar.search': "Search";
546
+ readonly 'core.module.layout.sidebar.clear-search': "Clear search";
542
547
  readonly 'core.module.layout.sidebar.toggle': "Toggle sidebar";
543
548
  readonly 'core.module.layout.sidebar.menu-groups': "Menu groups";
544
549
  readonly 'core.module.layout.sidebar.close-menu': "Close menu";