@sdcorejs/angular 21.2.7 → 21.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,8 @@
39
39
 
40
40
  `sd-core.scss` là entry point duy nhất — auto-load reset, utilities, color theme, form overrides, scrollbar, Angular Material theme. Không cần import partial nào riêng lẻ.
41
41
 
42
+ Control `size="sm"` dùng khung 32px. Floating label ở trạng thái rỗng/chưa focus được căn giữa dòng đầu bằng style dùng chung, kể cả label có wrapper `sd-form-field-label`. Khi focus hoặc có giá trị, label vẫn nổi theo Angular Material; textarea nhiều dòng giữ label ở dòng đầu.
43
+
42
44
  > Convention chung: **mọi utility class đều có `!important`** để đảm bảo override được Angular Material (thường có specificity cao).
43
45
 
44
46
  ---
@@ -224,6 +224,12 @@
224
224
  --mat-form-field-container-height: 32px;
225
225
  --mat-form-field-container-vertical-padding: 3px;
226
226
 
227
+ // why: inline-flex + vertical-align: middle tạo khoảng baseline dưới label,
228
+ // khiến chữ thấp hơn tâm của field 32px. Flex block giữ nguyên transform float của Material.
229
+ .sd-form-field-label {
230
+ display: flex;
231
+ }
232
+
227
233
  &.mat-form-field-appearance-outline {
228
234
  .mat-mdc-form-field-infix {
229
235
  border-top-width: 6px;
@@ -54,11 +54,11 @@ class SdDataState {
54
54
  action: this.action,
55
55
  }), ...(ngDevMode ? [{ debugName: "templateContext" }] : /* istanbul ignore next */ []));
56
56
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdDataState, deps: [], target: i0.ɵɵFactoryTarget.Component });
57
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SdDataState, isStandalone: true, selector: "sd-data-state", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, retryable: { classPropertyName: "retryable", publicName: "retryable", isSignal: true, isRequired: false, transformFunction: null }, retryLabel: { classPropertyName: "retryLabel", publicName: "retryLabel", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, fullPage: { classPropertyName: "fullPage", publicName: "fullPage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdRetry: "sdRetry", sdAction: "sdAction" }, queries: [{ propertyName: "customTemplate", first: true, predicate: SdDataStateTemplateDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:contents}.sd-data-state{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0;min-height:240px;padding:32px;text-align:center;color:var(--sd-text)}.sd-data-state__symbol{display:grid;place-items:center;flex-shrink:0;width:56px;height:56px;margin-bottom:16px;border-radius:50%;background:var(--sd-surface-muted)}.sd-data-state__icon{width:32px;height:32px;font-size:32px;line-height:1;color:var(--sd-text-secondary)}.sd-data-state[data-state=error] .sd-data-state__symbol,.sd-data-state[data-state=forbidden] .sd-data-state__symbol{background:color-mix(in srgb,var(--sd-error-light) 40%,transparent)}.sd-data-state[data-state=error] .sd-data-state__icon,.sd-data-state[data-state=forbidden] .sd-data-state__icon{color:var(--sd-error)}.sd-data-state[data-state=loading] .sd-data-state__icon{color:var(--sd-primary);animation:sd-data-state-spin 1s linear infinite}.sd-data-state[data-state=loading] .sd-data-state__symbol{background:var(--sd-primary-light)}.sd-data-state[data-state=empty] .sd-data-state__symbol{background:var(--sd-warning-light)}.sd-data-state[data-state=empty] .sd-data-state__icon{color:var(--sd-warning-dark)}.sd-data-state__title{max-width:100%;font-size:16px;font-weight:600;line-height:24px;overflow-wrap:anywhere}.sd-data-state__message{max-width:440px;margin-top:4px;color:var(--sd-text-secondary);font-size:14px;line-height:22px;overflow-wrap:anywhere}.sd-data-state__message:empty,.sd-data-state__title:empty{display:none}.sd-data-state__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:100%;margin-top:16px}.sd-data-state__actions sd-button{min-width:0;max-width:100%}.sd-data-state--compact{display:grid;grid-template-columns:minmax(0,1fr);align-content:center;align-items:start;column-gap:12px;min-height:120px;padding:16px;text-align:start}.sd-data-state--compact.sd-data-state--with-icon{grid-template-columns:32px minmax(0,1fr)}.sd-data-state--compact .sd-data-state__symbol{grid-column:1;grid-row:1/span 2;width:32px;height:32px;margin:0}.sd-data-state--compact .sd-data-state__icon{width:22px;height:22px;font-size:22px}.sd-data-state--compact .sd-data-state__title,.sd-data-state--compact .sd-data-state__message,.sd-data-state--compact .sd-data-state__actions{grid-column:-2}.sd-data-state--compact .sd-data-state__title{font-size:14px;line-height:20px}.sd-data-state--compact .sd-data-state__message{margin-top:2px;font-size:13px;line-height:20px}.sd-data-state--compact .sd-data-state__actions{justify-content:flex-start;margin-top:10px}.sd-data-state--full-page{min-height:100dvh}@keyframes sd-data-state-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sd-data-state[data-state=loading] .sd-data-state__icon{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { 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: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
57
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SdDataState, isStandalone: true, selector: "sd-data-state", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, retryable: { classPropertyName: "retryable", publicName: "retryable", isSignal: true, isRequired: false, transformFunction: null }, retryLabel: { classPropertyName: "retryLabel", publicName: "retryLabel", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, fullPage: { classPropertyName: "fullPage", publicName: "fullPage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdRetry: "sdRetry", sdAction: "sdAction" }, queries: [{ propertyName: "customTemplate", first: true, predicate: SdDataStateTemplateDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:contents}.sd-data-state{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0;min-height:240px;padding:32px;text-align:center;color:var(--sd-text)}.sd-data-state__symbol{display:grid;place-items:center;flex-shrink:0;width:56px;height:56px;margin-bottom:16px;border-radius:50%;background:var(--sd-surface-muted)}.sd-data-state__icon{width:32px;height:32px;font-size:32px;line-height:1;color:var(--sd-text-secondary)}.sd-data-state[data-state=error] .sd-data-state__symbol,.sd-data-state[data-state=forbidden] .sd-data-state__symbol{background:color-mix(in srgb,var(--sd-error-light) 40%,transparent)}.sd-data-state[data-state=error] .sd-data-state__icon,.sd-data-state[data-state=forbidden] .sd-data-state__icon{color:var(--sd-error)}.sd-data-state[data-state=loading] .sd-data-state__icon{color:var(--sd-primary);animation:sd-data-state-spin 1s linear infinite}.sd-data-state[data-state=loading] .sd-data-state__symbol{background:var(--sd-primary-light)}.sd-data-state__title{max-width:100%;font-size:16px;font-weight:600;line-height:24px;overflow-wrap:anywhere}.sd-data-state__message{max-width:440px;margin-top:4px;color:var(--sd-text-secondary);font-size:14px;line-height:22px;overflow-wrap:anywhere}.sd-data-state__message:empty,.sd-data-state__title:empty{display:none}.sd-data-state__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:100%;margin-top:16px}.sd-data-state__actions sd-button{min-width:0;max-width:100%}.sd-data-state--compact{display:grid;grid-template-columns:minmax(0,1fr);align-content:center;align-items:start;column-gap:12px;min-height:120px;padding:16px;text-align:start}.sd-data-state--compact.sd-data-state--with-icon{grid-template-columns:32px minmax(0,1fr)}.sd-data-state--compact .sd-data-state__symbol{grid-column:1;grid-row:1/span 2;width:32px;height:32px;margin:0}.sd-data-state--compact .sd-data-state__icon{width:22px;height:22px;font-size:22px}.sd-data-state--compact .sd-data-state__title,.sd-data-state--compact .sd-data-state__message,.sd-data-state--compact .sd-data-state__actions{grid-column:-2}.sd-data-state--compact .sd-data-state__title{font-size:14px;line-height:20px}.sd-data-state--compact .sd-data-state__message{margin-top:2px;font-size:13px;line-height:20px}.sd-data-state--compact .sd-data-state__actions{justify-content:flex-start;margin-top:10px}.sd-data-state--full-page{min-height:100dvh}@keyframes sd-data-state-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sd-data-state[data-state=loading] .sd-data-state__icon{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { 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: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
58
58
  }
59
59
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdDataState, decorators: [{
60
60
  type: Component,
61
- args: [{ selector: 'sd-data-state', standalone: true, imports: [NgTemplateOutlet, SdTranslatePipe, SdIcon, SdButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:contents}.sd-data-state{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0;min-height:240px;padding:32px;text-align:center;color:var(--sd-text)}.sd-data-state__symbol{display:grid;place-items:center;flex-shrink:0;width:56px;height:56px;margin-bottom:16px;border-radius:50%;background:var(--sd-surface-muted)}.sd-data-state__icon{width:32px;height:32px;font-size:32px;line-height:1;color:var(--sd-text-secondary)}.sd-data-state[data-state=error] .sd-data-state__symbol,.sd-data-state[data-state=forbidden] .sd-data-state__symbol{background:color-mix(in srgb,var(--sd-error-light) 40%,transparent)}.sd-data-state[data-state=error] .sd-data-state__icon,.sd-data-state[data-state=forbidden] .sd-data-state__icon{color:var(--sd-error)}.sd-data-state[data-state=loading] .sd-data-state__icon{color:var(--sd-primary);animation:sd-data-state-spin 1s linear infinite}.sd-data-state[data-state=loading] .sd-data-state__symbol{background:var(--sd-primary-light)}.sd-data-state[data-state=empty] .sd-data-state__symbol{background:var(--sd-warning-light)}.sd-data-state[data-state=empty] .sd-data-state__icon{color:var(--sd-warning-dark)}.sd-data-state__title{max-width:100%;font-size:16px;font-weight:600;line-height:24px;overflow-wrap:anywhere}.sd-data-state__message{max-width:440px;margin-top:4px;color:var(--sd-text-secondary);font-size:14px;line-height:22px;overflow-wrap:anywhere}.sd-data-state__message:empty,.sd-data-state__title:empty{display:none}.sd-data-state__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:100%;margin-top:16px}.sd-data-state__actions sd-button{min-width:0;max-width:100%}.sd-data-state--compact{display:grid;grid-template-columns:minmax(0,1fr);align-content:center;align-items:start;column-gap:12px;min-height:120px;padding:16px;text-align:start}.sd-data-state--compact.sd-data-state--with-icon{grid-template-columns:32px minmax(0,1fr)}.sd-data-state--compact .sd-data-state__symbol{grid-column:1;grid-row:1/span 2;width:32px;height:32px;margin:0}.sd-data-state--compact .sd-data-state__icon{width:22px;height:22px;font-size:22px}.sd-data-state--compact .sd-data-state__title,.sd-data-state--compact .sd-data-state__message,.sd-data-state--compact .sd-data-state__actions{grid-column:-2}.sd-data-state--compact .sd-data-state__title{font-size:14px;line-height:20px}.sd-data-state--compact .sd-data-state__message{margin-top:2px;font-size:13px;line-height:20px}.sd-data-state--compact .sd-data-state__actions{justify-content:flex-start;margin-top:10px}.sd-data-state--full-page{min-height:100dvh}@keyframes sd-data-state-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sd-data-state[data-state=loading] .sd-data-state__icon{animation:none}}\n"] }]
61
+ args: [{ selector: 'sd-data-state', standalone: true, imports: [NgTemplateOutlet, SdTranslatePipe, SdIcon, SdButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:contents}.sd-data-state{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-width:0;min-height:240px;padding:32px;text-align:center;color:var(--sd-text)}.sd-data-state__symbol{display:grid;place-items:center;flex-shrink:0;width:56px;height:56px;margin-bottom:16px;border-radius:50%;background:var(--sd-surface-muted)}.sd-data-state__icon{width:32px;height:32px;font-size:32px;line-height:1;color:var(--sd-text-secondary)}.sd-data-state[data-state=error] .sd-data-state__symbol,.sd-data-state[data-state=forbidden] .sd-data-state__symbol{background:color-mix(in srgb,var(--sd-error-light) 40%,transparent)}.sd-data-state[data-state=error] .sd-data-state__icon,.sd-data-state[data-state=forbidden] .sd-data-state__icon{color:var(--sd-error)}.sd-data-state[data-state=loading] .sd-data-state__icon{color:var(--sd-primary);animation:sd-data-state-spin 1s linear infinite}.sd-data-state[data-state=loading] .sd-data-state__symbol{background:var(--sd-primary-light)}.sd-data-state__title{max-width:100%;font-size:16px;font-weight:600;line-height:24px;overflow-wrap:anywhere}.sd-data-state__message{max-width:440px;margin-top:4px;color:var(--sd-text-secondary);font-size:14px;line-height:22px;overflow-wrap:anywhere}.sd-data-state__message:empty,.sd-data-state__title:empty{display:none}.sd-data-state__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:100%;margin-top:16px}.sd-data-state__actions sd-button{min-width:0;max-width:100%}.sd-data-state--compact{display:grid;grid-template-columns:minmax(0,1fr);align-content:center;align-items:start;column-gap:12px;min-height:120px;padding:16px;text-align:start}.sd-data-state--compact.sd-data-state--with-icon{grid-template-columns:32px minmax(0,1fr)}.sd-data-state--compact .sd-data-state__symbol{grid-column:1;grid-row:1/span 2;width:32px;height:32px;margin:0}.sd-data-state--compact .sd-data-state__icon{width:22px;height:22px;font-size:22px}.sd-data-state--compact .sd-data-state__title,.sd-data-state--compact .sd-data-state__message,.sd-data-state--compact .sd-data-state__actions{grid-column:-2}.sd-data-state--compact .sd-data-state__title{font-size:14px;line-height:20px}.sd-data-state--compact .sd-data-state__message{margin-top:2px;font-size:13px;line-height:20px}.sd-data-state--compact .sd-data-state__actions{justify-content:flex-start;margin-top:10px}.sd-data-state--full-page{min-height:100dvh}@keyframes sd-data-state-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.sd-data-state[data-state=loading] .sd-data-state__icon{animation:none}}\n"] }]
62
62
  }], propDecorators: { state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], fontSet: [{ type: i0.Input, args: [{ isSignal: true, alias: "fontSet", required: false }] }], retryable: [{ type: i0.Input, args: [{ isSignal: true, alias: "retryable", required: false }] }], retryLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "retryLabel", required: false }] }], actionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionLabel", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], fullPage: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullPage", required: false }] }], sdRetry: [{ type: i0.Output, args: ["sdRetry"] }], sdAction: [{ type: i0.Output, args: ["sdAction"] }], customTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdDataStateTemplateDirective), { isSignal: true }] }] } });
63
63
 
64
64
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-components-data-state.mjs","sources":["../../../projects/sdcorejs-angular/components/data-state/src/data-state.component.ts","../../../projects/sdcorejs-angular/components/data-state/src/data-state.component.html","../../../projects/sdcorejs-angular/components/data-state/sdcorejs-angular-components-data-state.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdButton } from '@sdcorejs/angular/components/button';\nimport { SdIcon, SdIconSet } from '@sdcorejs/angular/modules/icon';\n\nexport type SdDataStateKind = 'loading' | 'empty' | 'error' | 'forbidden' | 'success';\n\nexport interface SdDataStateTemplateContext {\n readonly $implicit: SdDataStateKind;\n readonly state: SdDataStateKind;\n readonly retry: () => void;\n readonly action: () => void;\n}\n\n@Directive({\n selector: 'ng-template[sdDataStateTemplate]',\n standalone: true,\n})\nexport class SdDataStateTemplateDirective {\n readonly template = inject<TemplateRef<SdDataStateTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: SdDataStateTemplateDirective, _context: unknown): _context is SdDataStateTemplateContext {\n return true;\n }\n}\n\nconst DEFAULT_ICON: Readonly<Record<SdDataStateKind, string | null>> = {\n loading: 'autorenew',\n empty: 'inbox',\n error: 'error_outline',\n forbidden: 'lock',\n success: null,\n};\n\n@Component({\n selector: 'sd-data-state',\n standalone: true,\n imports: [NgTemplateOutlet, SdTranslatePipe, SdIcon, SdButton],\n templateUrl: './data-state.component.html',\n styleUrl: './data-state.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdDataState {\n readonly state = input<SdDataStateKind>('success');\n readonly title = input<string | null | undefined>();\n readonly message = input<string | null | undefined>();\n readonly icon = input<string | null | undefined>();\n readonly fontSet = input<SdIconSet | undefined>();\n readonly retryable = input(false, { transform: booleanAttribute });\n readonly retryLabel = input<string | null | undefined>();\n readonly actionLabel = input<string | null | undefined>();\n readonly compact = input(false, { transform: booleanAttribute });\n readonly fullPage = input(false, { transform: booleanAttribute });\n readonly sdRetry = output<void>();\n readonly sdAction = output<void>();\n\n protected readonly customTemplate = contentChild(SdDataStateTemplateDirective);\n protected readonly effectiveIcon = computed(() => this.icon() ?? DEFAULT_ICON[this.state()]);\n protected readonly titleKey = computed(() => `core.component.data-state.${this.state()}.title`);\n protected readonly messageKey = computed(() => `core.component.data-state.${this.state()}.message`);\n protected readonly role = computed<'alert' | 'status'>(() =>\n this.state() === 'error' || this.state() === 'forbidden' ? 'alert' : 'status'\n );\n\n protected readonly retry = (): void => this.sdRetry.emit();\n protected readonly action = (): void => this.sdAction.emit();\n protected readonly templateContext = computed<SdDataStateTemplateContext>(() => ({\n $implicit: this.state(),\n state: this.state(),\n retry: this.retry,\n action: this.action,\n }));\n}\n","@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */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}
1
+ {"version":3,"file":"sdcorejs-angular-components-data-state.mjs","sources":["../../../projects/sdcorejs-angular/components/data-state/src/data-state.component.ts","../../../projects/sdcorejs-angular/components/data-state/src/data-state.component.html","../../../projects/sdcorejs-angular/components/data-state/sdcorejs-angular-components-data-state.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n Directive,\n TemplateRef,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n output,\n} from '@angular/core';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdButton } from '@sdcorejs/angular/components/button';\nimport { SdIcon, SdIconSet } from '@sdcorejs/angular/modules/icon';\n\nexport type SdDataStateKind = 'loading' | 'empty' | 'error' | 'forbidden' | 'success';\n\nexport interface SdDataStateTemplateContext {\n readonly $implicit: SdDataStateKind;\n readonly state: SdDataStateKind;\n readonly retry: () => void;\n readonly action: () => void;\n}\n\n@Directive({\n selector: 'ng-template[sdDataStateTemplate]',\n standalone: true,\n})\nexport class SdDataStateTemplateDirective {\n readonly template = inject<TemplateRef<SdDataStateTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: SdDataStateTemplateDirective, _context: unknown): _context is SdDataStateTemplateContext {\n return true;\n }\n}\n\nconst DEFAULT_ICON: Readonly<Record<SdDataStateKind, string | null>> = {\n loading: 'autorenew',\n empty: 'inbox',\n error: 'error_outline',\n forbidden: 'lock',\n success: null,\n};\n\n@Component({\n selector: 'sd-data-state',\n standalone: true,\n imports: [NgTemplateOutlet, SdTranslatePipe, SdIcon, SdButton],\n templateUrl: './data-state.component.html',\n styleUrl: './data-state.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdDataState {\n readonly state = input<SdDataStateKind>('success');\n readonly title = input<string | null | undefined>();\n readonly message = input<string | null | undefined>();\n readonly icon = input<string | null | undefined>();\n readonly fontSet = input<SdIconSet | undefined>();\n readonly retryable = input(false, { transform: booleanAttribute });\n readonly retryLabel = input<string | null | undefined>();\n readonly actionLabel = input<string | null | undefined>();\n readonly compact = input(false, { transform: booleanAttribute });\n readonly fullPage = input(false, { transform: booleanAttribute });\n readonly sdRetry = output<void>();\n readonly sdAction = output<void>();\n\n protected readonly customTemplate = contentChild(SdDataStateTemplateDirective);\n protected readonly effectiveIcon = computed(() => this.icon() ?? DEFAULT_ICON[this.state()]);\n protected readonly titleKey = computed(() => `core.component.data-state.${this.state()}.title`);\n protected readonly messageKey = computed(() => `core.component.data-state.${this.state()}.message`);\n protected readonly role = computed<'alert' | 'status'>(() =>\n this.state() === 'error' || this.state() === 'forbidden' ? 'alert' : 'status'\n );\n\n protected readonly retry = (): void => this.sdRetry.emit();\n protected readonly action = (): void => this.sdAction.emit();\n protected readonly templateContext = computed<SdDataStateTemplateContext>(() => ({\n $implicit: this.state(),\n state: this.state(),\n retry: this.retry,\n action: this.action,\n }));\n}\n","@let _compact = compact();\n@let currentState = state();\n@let template = customTemplate();\n@let _role = role();\n@let _retryable = retryable();\n@let _actionLabel = actionLabel();\n@let currentIcon = effectiveIcon();\n\n@if (currentState === 'success') {\n @if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n } @else {\n <ng-content></ng-content>\n }\n} @else if (template) {\n <ng-container [ngTemplateOutlet]=\"template.template\" [ngTemplateOutletContext]=\"templateContext()\"></ng-container>\n} @else {\n <section\n class=\"sd-data-state\"\n [class.sd-data-state--compact]=\"_compact\"\n [class.sd-data-state--full-page]=\"fullPage()\"\n [class.sd-data-state--with-icon]=\"!!currentIcon\"\n [attr.data-state]=\"currentState\"\n [attr.role]=\"_role\"\n [attr.aria-busy]=\"currentState === 'loading' ? 'true' : null\"\n [attr.aria-live]=\"_role === 'alert' ? 'assertive' : 'polite'\">\n @if (currentIcon) {\n <span class=\"sd-data-state__symbol\" aria-hidden=\"true\">\n <sd-icon class=\"sd-data-state__icon\" [name]=\"currentIcon\" [fontSet]=\"fontSet()\" [size]=\"_compact ? '22px' : '32px'\"></sd-icon>\n </span>\n }\n\n <div class=\"sd-data-state__title\">{{ title() ?? (titleKey() | sdTranslate) }}</div>\n <div class=\"sd-data-state__message\">{{ message() ?? (messageKey() | sdTranslate) }}</div>\n\n @if (_retryable || _actionLabel) {\n <div class=\"sd-data-state__actions\">\n @if (_retryable) {\n <sd-button\n data-state-retry\n type=\"light\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n prefixIcon=\"refresh\"\n fontSet=\"material-icons-outlined\"\n [title]=\"retryLabel() || ('core.component.data-state.retry' | sdTranslate)\"\n (click)=\"retry()\"></sd-button>\n }\n @if (_actionLabel; as label) {\n <sd-button\n data-state-action\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n htmlType=\"button\"\n width=\"100%\"\n [title]=\"label\"\n (click)=\"action()\"></sd-button>\n }\n </div>\n }\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MA8Ba,4BAA4B,CAAA;AAC9B,IAAA,QAAQ,GAAG,MAAM,CAA0C,WAAW,CAAC;AAEhF,IAAA,OAAO,sBAAsB,CAAC,UAAwC,EAAE,QAAiB,EAAA;AACvF,QAAA,OAAO,IAAI;IACb;wGALW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAJxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kCAAkC;AAC5C,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;AASD,MAAM,YAAY,GAAqD;AACrE,IAAA,OAAO,EAAE,WAAW;AACpB,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AAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAjC,eAAe,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAKhC,WAAW,EAAA,UAAA,EAAA,CAAA;kBARvB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAAA,UAAA,EACb,IAAI,EAAA,OAAA,EACP,CAAC,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAA,eAAA,EAG7C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,s0EAAA,EAAA,MAAA,EAAA,CAAA,ulFAAA,CAAA,EAAA;6nCAgBE,4BAA4B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpE/E;;AAEG;;;;"}
@@ -2212,7 +2212,7 @@ class UploadComponent {
2212
2212
  return await this.sdUploadFile?.upload();
2213
2213
  };
2214
2214
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: UploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2215
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: UploadComponent, isStandalone: true, selector: "lib-upload", inputs: { setVariables: { classPropertyName: "setVariables", publicName: "setVariables", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, _entity: { classPropertyName: "_entity", publicName: "entity", isSignal: false, isRequired: true, transformFunction: null }, _component: { classPropertyName: "_component", publicName: "component", isSignal: false, isRequired: true, transformFunction: null }, _disabled: { classPropertyName: "_disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, _required: { classPropertyName: "_required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, _viewed: { classPropertyName: "_viewed", publicName: "viewed", isSignal: false, isRequired: false, transformFunction: null }, _validator: { classPropertyName: "_validator", publicName: "validator", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "sdUploadFile", first: true, predicate: SdUploadFile, descendants: true }], ngImport: i0, template: "@if (component && entity) {\n @if (viewed || component.properties?.viewed) {\n <div class=\"text-secondary\">{{ component.label || component.key }}</div>\n <sd-upload-file\n [type]=\"component.properties?.type\"\n [form]=\"form()\"\n [model]=\"entity[component.key!]\"\n align=\"left\"\n [args]=\"component.properties?.args\"\n disabled\n previewWidth=\"50px\"\n previewHeight=\"50px\"></sd-upload-file>\n } @else {\n <sd-upload-file\n [type]=\"component.properties?.type\"\n [form]=\"form()\"\n [label]=\"component.label || component.key\"\n [(model)]=\"entity[component.key!]\"\n [max]=\"component.properties?.max\"\n [maxSize]=\"component.properties?.maxSize\"\n [extensions]=\"component.properties?.extensions\"\n [args]=\"component.properties?.args\"\n align=\"left\"\n [required]=\"component.validate?.required || required\"\n [disabled]=\"disabled\"\n previewWidth=\"50px\"\n previewHeight=\"50px\"></sd-upload-file>\n }\n}\n", styles: [":host{display:contents;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SdUploadFile, selector: "sd-upload-file", inputs: ["autoId", "args", "label", "key", "description", "appearance", "previewWidth", "previewHeight", "align", "upload", "details", "download", "imageValidator", "maxSize", "maxWidth", "maxHeight", "scaleToPixel", "form", "name", "required", "type", "helperText", "max", "maxOfImage", "extensions", "disabled", "model"], outputs: ["loaded", "filesChanged", "modelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2215
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: UploadComponent, isStandalone: true, selector: "lib-upload", inputs: { setVariables: { classPropertyName: "setVariables", publicName: "setVariables", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, _entity: { classPropertyName: "_entity", publicName: "entity", isSignal: false, isRequired: true, transformFunction: null }, _component: { classPropertyName: "_component", publicName: "component", isSignal: false, isRequired: true, transformFunction: null }, _disabled: { classPropertyName: "_disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, _required: { classPropertyName: "_required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, _viewed: { classPropertyName: "_viewed", publicName: "viewed", isSignal: false, isRequired: false, transformFunction: null }, _validator: { classPropertyName: "_validator", publicName: "validator", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "sdUploadFile", first: true, predicate: SdUploadFile, descendants: true }], ngImport: i0, template: "@if (component && entity) {\n @if (viewed || component.properties?.viewed) {\n <div class=\"text-secondary\">{{ component.label || component.key }}</div>\n <sd-upload-file\n [type]=\"component.properties?.type\"\n [form]=\"form()\"\n [model]=\"entity[component.key!]\"\n align=\"left\"\n [args]=\"component.properties?.args\"\n disabled\n previewWidth=\"50px\"\n previewHeight=\"50px\"></sd-upload-file>\n } @else {\n <sd-upload-file\n [type]=\"component.properties?.type\"\n [form]=\"form()\"\n [label]=\"component.label || component.key\"\n [(model)]=\"entity[component.key!]\"\n [max]=\"component.properties?.max\"\n [maxSize]=\"component.properties?.maxSize\"\n [extensions]=\"component.properties?.extensions\"\n [args]=\"component.properties?.args\"\n align=\"left\"\n [required]=\"component.validate?.required || required\"\n [disabled]=\"disabled\"\n previewWidth=\"50px\"\n previewHeight=\"50px\"></sd-upload-file>\n }\n}\n", styles: [":host{display:contents;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SdUploadFile, selector: "sd-upload-file", inputs: ["autoId", "args", "label", "key", "description", "previewWidth", "previewHeight", "align", "upload", "details", "download", "imageValidator", "maxSize", "maxWidth", "maxHeight", "scaleToPixel", "form", "name", "required", "type", "helperText", "max", "maxOfImage", "extensions", "disabled", "model"], outputs: ["loaded", "filesChanged", "modelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2216
2216
  }
2217
2217
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: UploadComponent, decorators: [{
2218
2218
  type: Component,
@@ -2599,7 +2599,7 @@ class TableComponent {
2599
2599
  }
2600
2600
  };
2601
2601
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2602
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TableComponent, isStandalone: true, selector: "lib-table", inputs: { setVariables: { classPropertyName: "setVariables", publicName: "setVariables", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, _component: { classPropertyName: "_component", publicName: "component", isSignal: false, isRequired: true, transformFunction: null }, _required: { classPropertyName: "_required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, _viewed: { classPropertyName: "_viewed", publicName: "viewed", isSignal: false, isRequired: false, transformFunction: null }, _model: { classPropertyName: "_model", publicName: "model", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "table", first: true, predicate: SdTable, descendants: true }, { propertyName: "sideDrawer", first: true, predicate: SdSideDrawer, descendants: true }, { propertyName: "uploadFiles", predicate: SdUploadFile, descendants: true }], ngImport: i0, template: "@if(component && tableOption) {\n <div style=\"width: 100%\">\n <sd-table [option]=\"tableOption\">\n <!-- why: n\u00FAt th\u00EAm d\u00F2ng n\u1EB1m \u1EDF \u00F4 header c\u1EE7a c\u1ED9t command \u2014 \u00F4 \u0111\u00F3 v\u1ED1n \u0111\u1EC3 tr\u1ED1ng, v\u00E0 \u0111\u1EB7t \u1EDF \u0111\u00E2y th\u00EC\n h\u00E0nh \u0111\u1ED9ng \"th\u00EAm\" \u0111\u1EE9ng ngay tr\u00EAn c\u1EE5m s\u1EEDa/xo\u00E1 c\u1EE7a t\u1EEBng d\u00F2ng thay v\u00EC chi\u1EBFm th\u00EAm m\u1ED9t d\u1EA3i\n ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <!-- why: KH\u00D4NG b\u1ECDc ng-template trong @if \u2014 contentChild ch\u1EC9 qu\u00E9t n\u1ED9i dung chi\u1EBFu v\u00E0o t\u0129nh, c\u00F2n\n @if d\u1EF1ng m\u1ED9t embedded view n\u00EAn template s\u1EBD kh\u00F4ng bao gi\u1EDD \u0111\u01B0\u1EE3c nh\u00ECn th\u1EA5y v\u00E0 n\u00FAt bi\u1EBFn m\u1EA5t.\n Template lu\u00F4n t\u1ED3n t\u1EA1i; \u0111i\u1EC1u ki\u1EC7n n\u1EB1m B\u00CAN TRONG. -->\n <ng-template sdTableCommandHeaderDef>\n @if(!viewed && !component.properties?.viewed) {\n <sd-button\n prefixIcon=\"add\"\n type=\"text\"\n color=\"primary\"\n (click)=\"onDetail()\"\n [title]=\"''\"\n [tooltip]=\"component.properties?.titleButtonCreate || ('core.component.form-builder.add-new' | sdTranslate)\"></sd-button>\n }\n </ng-template>\n @for(key of imageKeys; track key) {\n <ng-template [sdTableCellDef]=\"key\" let-item=\"item\">\n <sd-upload-file\n type=\"image\"\n [model]=\"item[key]\"\n [args]=\"getArgs(key)\"\n (modelChange)=\"onFileUploadChange(item, key, $event)\"\n align=\"left\"\n disabled\n previewWidth=\"50px\"\n previewHeight=\"50px\"></sd-upload-file>\n </ng-template>\n }\n @for(key of fileKeys; track key) {\n <ng-template [sdTableCellDef]=\"key\" let-item=\"item\">\n <sd-upload-file\n [model]=\"item[key]\"\n [args]=\"getArgs(key)\"\n (modelChange)=\"onFileUploadChange(item, key, $event)\"\n align=\"left\"\n disabled\n previewWidth=\"50px\"\n previewHeight=\"50px\"></sd-upload-file>\n </ng-template>\n }\n </sd-table>\n @if(!viewed && !component.properties?.viewed) {\n <!-- why: `sdTitle` / `sdBody` KH\u00D4NG ph\u1EA3i slot c\u1EE7a sd-side-drawer (n\u00F3 ch\u1EC9 c\u00F3 sdHeaderLeft /\n sdHeaderRight / sdFooterLeft / sdFooterRight + ng-content m\u1EB7c \u0111\u1ECBnh), n\u00EAn hai kh\u1ED1i \u0111\u00F3\n tr\u01B0\u1EDBc \u0111\u00E2y r\u01A1i th\u1EB3ng v\u00E0o th\u00E2n drawer \u2014 \"T\u1EA1o m\u1EDBi/c\u1EADp nh\u1EADt\" hi\u1EC7n trong body c\u00F2n ti\u00EAu \u0111\u1EC1 k\u1EB9t\n \u1EDF \"Chi ti\u1EBFt\". D\u00F9ng [title] \u0111\u1ED9ng theo t\u00E1c v\u1EE5 v\u00E0 \u0111\u1EC3 n\u1ED9i dung \u1EDF content m\u1EB7c \u0111\u1ECBnh. -->\n <sd-side-drawer [title]=\"detailTitle\" width=\"500px\">\n <div class=\"c-table-create-update\">\n @if(!!component.columns?.length) {\n <div class=\"c-drawer-fields\">\n @for(column of component.columns;track column.key) {\n @let validate = formRenderColumn[column.key].validate;\n <div>\n @if(column.type === 'string') {\n <sd-input\n [form]=\"form()\"\n [label]=\"column.label\"\n [(model)]=\"row[column.key]\"\n [required]=\"validate?.required\"\n [pattern]=\"column.validate?.pattern\"\n [patternErrorMessage]=\"column.validate?.patternErrorMessage\"></sd-input>\n }@else if(column.type === 'number') {\n <sd-input-number\n [form]=\"form()\"\n [label]=\"column.label\"\n [(model)]=\"row[column.key]\"\n [required]=\"validate?.required\"\n [min]=\"column.validate?.min\"></sd-input-number>\n }@else if(column.type === 'radio') {\n <sd-radio\n [form]=\"form()\"\n [label]=\"column.label\"\n [name]=\"column.key\"\n [items]=\"column.values\"\n valueField=\"value\"\n displayField=\"display\"\n [required]=\"validate?.required\"></sd-radio>\n }@else if(column.type === 'values') {\n <sd-autocomplete\n [form]=\"form()\"\n [label]=\"column.label\"\n [(model)]=\"row[column.key]\"\n [items]=\"columnValues[column.key]\"\n valueField=\"value\"\n displayField=\"display\"\n [required]=\"validate?.required\"></sd-autocomplete>\n }@else if(column.type === 'date') {\n <sd-date\n [form]=\"form()\"\n [label]=\"column.label\"\n [(model)]=\"row[column.key]\"\n [required]=\"validate?.required\"></sd-date>\n }@else if(column.type === 'datetime') {\n <sd-datetime\n [form]=\"form()\"\n [label]=\"column.label\"\n [(model)]=\"row[column.key]\"\n [required]=\"validate?.required\"></sd-datetime>\n }@else if(column.type === 'image') {\n <sd-upload-file\n [label]=\"column.label\"\n type=\"image\"\n [(model)]=\"row[column.key]\"\n [args]=\"column.args\"\n previewWidth=\"50px\"\n previewHeight=\"50px\"\n align=\"left\"></sd-upload-file>\n }@else if (column.type === 'file') {\n <sd-upload-file\n [label]=\"column.label\"\n type=\"file\"\n [(model)]=\"row[column.key]\"\n [args]=\"column.args\"\n previewWidth=\"50px\"\n previewHeight=\"50px\"\n align=\"left\"></sd-upload-file>\n }\n </div>\n }\n </div>\n }\n \n </div>\n <!-- why: `.sd-side-drawer-footer` \u0111\u00E3 c\u00F3 padding 16px \u2014 m\u1ECDi consumer sdFooterRight kh\u00E1c trong\n lib \u0111\u1EC1u d\u1EF1a v\u00E0o \u0111\u00F3. `pr-16` \u1EDF \u0111\u00E2y c\u1ED9ng th\u00EAm 16px n\u1EEFa, \u0111\u1EA9y n\u00FAt L\u01B0u v\u00E0o trong; `text-right`\n th\u00EC v\u00F4 t\u00E1c d\u1EE5ng v\u00EC slot \u0111\u00E3 l\u00E0 flex justify-end. -->\n <div sdFooterRight>\n <sd-button [title]=\"'core.component.form-builder.save' | sdTranslate\" prefixIcon=\"save\" color=\"primary\" type=\"fill\" (click)=\"onAccept()\"></sd-button>\n </div>\n </sd-side-drawer>\n }\n </div>\n}\n\n", styles: [":host{display:contents}.c-table-create-update{padding:16px}.c-drawer-fields{display:flex;flex-direction:column;gap:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "mask", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber$1, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdAutocomplete, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "hideReadError", "addable", "required", "disabled", "viewed", "clearable", "validator", "inlineError", "appearance", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdUploadFile, selector: "sd-upload-file", inputs: ["autoId", "args", "label", "key", "description", "appearance", "previewWidth", "previewHeight", "align", "upload", "details", "download", "imageValidator", "maxSize", "maxWidth", "maxHeight", "scaleToPixel", "form", "name", "required", "type", "helperText", "max", "maxOfImage", "extensions", "disabled", "model"], outputs: ["loaded", "filesChanged", "modelChange"] }, { kind: "component", type: SdTable, selector: "sd-table", inputs: ["autoId", "option", "hideReadError"], outputs: ["sdReadStateChange"] }, { kind: "directive", type: SdTableCellDefDirective, selector: "[sdTableCellDef]", inputs: ["sdTableCellDef"] }, { kind: "directive", type: SdTableCommandHeaderDefDirective, selector: "[sdTableCommandHeaderDef]" }, { kind: "component", type: SdSideDrawer, selector: "sd-side-drawer", inputs: ["title", "width", "hideClose", "disableBackdropClose", "beforeClose", "drawerClass", "autoId"], outputs: ["sdClosed", "sdCloseError"] }, { 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: 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: 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: "pipe", type:
2602
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: TableComponent, isStandalone: true, selector: "lib-table", inputs: { setVariables: { classPropertyName: "setVariables", publicName: "setVariables", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, _component: { classPropertyName: "_component", publicName: "component", isSignal: false, isRequired: true, transformFunction: null }, _required: { classPropertyName: "_required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, _viewed: { classPropertyName: "_viewed", publicName: "viewed", isSignal: false, isRequired: false, transformFunction: null }, _model: { classPropertyName: "_model", publicName: "model", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { modelChange: "modelChange" }, viewQueries: [{ propertyName: "table", first: true, predicate: SdTable, descendants: true }, { propertyName: "sideDrawer", first: true, predicate: SdSideDrawer, descendants: true }, { propertyName: "uploadFiles", predicate: SdUploadFile, descendants: true }], ngImport: i0, template: "@if(component && tableOption) {\n <div style=\"width: 100%\">\n <sd-table [option]=\"tableOption\">\n <!-- why: n\u00FAt th\u00EAm d\u00F2ng n\u1EB1m \u1EDF \u00F4 header c\u1EE7a c\u1ED9t command \u2014 \u00F4 \u0111\u00F3 v\u1ED1n \u0111\u1EC3 tr\u1ED1ng, v\u00E0 \u0111\u1EB7t \u1EDF \u0111\u00E2y th\u00EC\n h\u00E0nh \u0111\u1ED9ng \"th\u00EAm\" \u0111\u1EE9ng ngay tr\u00EAn c\u1EE5m s\u1EEDa/xo\u00E1 c\u1EE7a t\u1EEBng d\u00F2ng thay v\u00EC chi\u1EBFm th\u00EAm m\u1ED9t d\u1EA3i\n ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <!-- why: KH\u00D4NG b\u1ECDc ng-template trong @if \u2014 contentChild ch\u1EC9 qu\u00E9t n\u1ED9i dung chi\u1EBFu v\u00E0o t\u0129nh, c\u00F2n\n @if d\u1EF1ng m\u1ED9t embedded view n\u00EAn template s\u1EBD kh\u00F4ng bao gi\u1EDD \u0111\u01B0\u1EE3c nh\u00ECn th\u1EA5y v\u00E0 n\u00FAt bi\u1EBFn m\u1EA5t.\n Template lu\u00F4n t\u1ED3n t\u1EA1i; \u0111i\u1EC1u ki\u1EC7n n\u1EB1m B\u00CAN TRONG. -->\n <ng-template sdTableCommandHeaderDef>\n @if(!viewed && !component.properties?.viewed) {\n <sd-button\n prefixIcon=\"add\"\n type=\"text\"\n color=\"primary\"\n (click)=\"onDetail()\"\n [title]=\"''\"\n [tooltip]=\"component.properties?.titleButtonCreate || ('core.component.form-builder.add-new' | sdTranslate)\"></sd-button>\n }\n </ng-template>\n @for(key of imageKeys; track key) {\n <ng-template [sdTableCellDef]=\"key\" let-item=\"item\">\n <sd-upload-file\n type=\"image\"\n [model]=\"item[key]\"\n [args]=\"getArgs(key)\"\n (modelChange)=\"onFileUploadChange(item, key, $event)\"\n align=\"left\"\n disabled\n previewWidth=\"50px\"\n previewHeight=\"50px\"></sd-upload-file>\n </ng-template>\n }\n @for(key of fileKeys; track key) {\n <ng-template [sdTableCellDef]=\"key\" let-item=\"item\">\n <sd-upload-file\n [model]=\"item[key]\"\n [args]=\"getArgs(key)\"\n (modelChange)=\"onFileUploadChange(item, key, $event)\"\n align=\"left\"\n disabled\n previewWidth=\"50px\"\n previewHeight=\"50px\"></sd-upload-file>\n </ng-template>\n }\n </sd-table>\n @if(!viewed && !component.properties?.viewed) {\n <!-- why: `sdTitle` / `sdBody` KH\u00D4NG ph\u1EA3i slot c\u1EE7a sd-side-drawer (n\u00F3 ch\u1EC9 c\u00F3 sdHeaderLeft /\n sdHeaderRight / sdFooterLeft / sdFooterRight + ng-content m\u1EB7c \u0111\u1ECBnh), n\u00EAn hai kh\u1ED1i \u0111\u00F3\n tr\u01B0\u1EDBc \u0111\u00E2y r\u01A1i th\u1EB3ng v\u00E0o th\u00E2n drawer \u2014 \"T\u1EA1o m\u1EDBi/c\u1EADp nh\u1EADt\" hi\u1EC7n trong body c\u00F2n ti\u00EAu \u0111\u1EC1 k\u1EB9t\n \u1EDF \"Chi ti\u1EBFt\". D\u00F9ng [title] \u0111\u1ED9ng theo t\u00E1c v\u1EE5 v\u00E0 \u0111\u1EC3 n\u1ED9i dung \u1EDF content m\u1EB7c \u0111\u1ECBnh. -->\n <sd-side-drawer [title]=\"detailTitle\" width=\"500px\">\n <div class=\"c-table-create-update\">\n @if(!!component.columns?.length) {\n <div class=\"c-drawer-fields\">\n @for(column of component.columns;track column.key) {\n @let validate = formRenderColumn[column.key].validate;\n <div>\n @if(column.type === 'string') {\n <sd-input\n [form]=\"form()\"\n [label]=\"column.label\"\n [(model)]=\"row[column.key]\"\n [required]=\"validate?.required\"\n [pattern]=\"column.validate?.pattern\"\n [patternErrorMessage]=\"column.validate?.patternErrorMessage\"></sd-input>\n }@else if(column.type === 'number') {\n <sd-input-number\n [form]=\"form()\"\n [label]=\"column.label\"\n [(model)]=\"row[column.key]\"\n [required]=\"validate?.required\"\n [min]=\"column.validate?.min\"></sd-input-number>\n }@else if(column.type === 'radio') {\n <sd-radio\n [form]=\"form()\"\n [label]=\"column.label\"\n [name]=\"column.key\"\n [items]=\"column.values\"\n valueField=\"value\"\n displayField=\"display\"\n [required]=\"validate?.required\"></sd-radio>\n }@else if(column.type === 'values') {\n <sd-autocomplete\n [form]=\"form()\"\n [label]=\"column.label\"\n [(model)]=\"row[column.key]\"\n [items]=\"columnValues[column.key]\"\n valueField=\"value\"\n displayField=\"display\"\n [required]=\"validate?.required\"></sd-autocomplete>\n }@else if(column.type === 'date') {\n <sd-date\n [form]=\"form()\"\n [label]=\"column.label\"\n [(model)]=\"row[column.key]\"\n [required]=\"validate?.required\"></sd-date>\n }@else if(column.type === 'datetime') {\n <sd-datetime\n [form]=\"form()\"\n [label]=\"column.label\"\n [(model)]=\"row[column.key]\"\n [required]=\"validate?.required\"></sd-datetime>\n }@else if(column.type === 'image') {\n <sd-upload-file\n [label]=\"column.label\"\n type=\"image\"\n [(model)]=\"row[column.key]\"\n [args]=\"column.args\"\n previewWidth=\"50px\"\n previewHeight=\"50px\"\n align=\"left\"></sd-upload-file>\n }@else if (column.type === 'file') {\n <sd-upload-file\n [label]=\"column.label\"\n type=\"file\"\n [(model)]=\"row[column.key]\"\n [args]=\"column.args\"\n previewWidth=\"50px\"\n previewHeight=\"50px\"\n align=\"left\"></sd-upload-file>\n }\n </div>\n }\n </div>\n }\n \n </div>\n <!-- why: `.sd-side-drawer-footer` \u0111\u00E3 c\u00F3 padding 16px \u2014 m\u1ECDi consumer sdFooterRight kh\u00E1c trong\n lib \u0111\u1EC1u d\u1EF1a v\u00E0o \u0111\u00F3. `pr-16` \u1EDF \u0111\u00E2y c\u1ED9ng th\u00EAm 16px n\u1EEFa, \u0111\u1EA9y n\u00FAt L\u01B0u v\u00E0o trong; `text-right`\n th\u00EC v\u00F4 t\u00E1c d\u1EE5ng v\u00EC slot \u0111\u00E3 l\u00E0 flex justify-end. -->\n <div sdFooterRight>\n <sd-button [title]=\"'core.component.form-builder.save' | sdTranslate\" prefixIcon=\"save\" color=\"primary\" type=\"fill\" (click)=\"onAccept()\"></sd-button>\n </div>\n </sd-side-drawer>\n }\n </div>\n}\n\n", styles: [":host{display:contents}.c-table-create-update{padding:16px}.c-drawer-fields{display:flex;flex-direction:column;gap:12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "size", "form", "label", "helperText", "placeholder", "type", "mask", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber$1, selector: "sd-input-number", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "model"], outputs: ["modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdAutocomplete, selector: "sd-autocomplete", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "limit", "cacheChecksum", "hyperlink", "items", "hideInlineError", "hideReadError", "addable", "required", "disabled", "viewed", "clearable", "validator", "inlineError", "appearance", "model"], outputs: ["sdReadStateChange", "modelChange", "sdChange", "sdSelection", "sdAdd"] }, { kind: "component", type: SdUploadFile, selector: "sd-upload-file", inputs: ["autoId", "args", "label", "key", "description", "previewWidth", "previewHeight", "align", "upload", "details", "download", "imageValidator", "maxSize", "maxWidth", "maxHeight", "scaleToPixel", "form", "name", "required", "type", "helperText", "max", "maxOfImage", "extensions", "disabled", "model"], outputs: ["loaded", "filesChanged", "modelChange"] }, { kind: "component", type: SdTable, selector: "sd-table", inputs: ["autoId", "option", "hideReadError"], outputs: ["sdReadStateChange"] }, { kind: "directive", type: SdTableCellDefDirective, selector: "[sdTableCellDef]", inputs: ["sdTableCellDef"] }, { kind: "directive", type: SdTableCommandHeaderDefDirective, selector: "[sdTableCommandHeaderDef]" }, { kind: "component", type: SdSideDrawer, selector: "sd-side-drawer", inputs: ["title", "width", "hideClose", "disableBackdropClose", "beforeClose", "drawerClass", "autoId"], outputs: ["sdClosed", "sdCloseError"] }, { 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: 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: 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: "pipe", type:
2603
2603
  // Pipe cho phần viewed
2604
2604
  SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2605
2605
  }