@sdcorejs/angular 20.0.10 → 20.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -23
- package/assets/STYLE-GUIDE.md +58 -72
- package/assets/scss/core/_inline-edit.scss +1 -1
- package/assets/scss/core/color.scss +56 -45
- package/assets/scss/core/form.scss +21 -9
- package/assets/scss/core/utilities/_base.scss +3 -3
- package/assets/scss/core/utilities/_border.scss +1 -1
- package/assets/scss/themes/default.scss +46 -32
- package/assets/scss/themes/material-theme.scss +8 -87
- package/components/badge/index.d.ts +5 -16
- package/components/button/index.d.ts +7 -5
- package/components/inform/index.d.ts +2 -8
- package/components/modal/index.d.ts +1 -1
- package/components/query-builder/index.d.ts +6 -6
- package/components/section/index.d.ts +1 -5
- package/components/side-drawer/index.d.ts +1 -1
- package/components/table/index.d.ts +9 -10
- package/components/tree/index.d.ts +3 -2
- package/fesm2022/sdcorejs-angular-components-anchor.mjs +5 -6
- package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs +10 -11
- package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-badge.mjs +15 -13
- package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-button.mjs +10 -11
- package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs +4 -5
- package/fesm2022/sdcorejs-angular-components-code-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-document-builder.mjs +3 -3
- package/fesm2022/sdcorejs-angular-components-document-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-editor.mjs +4 -5
- package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +21 -24
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-history.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +5 -7
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-inform.mjs +5 -15
- package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +5 -6
- package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +25 -7
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs +4 -5
- package/fesm2022/sdcorejs-angular-components-org-chart.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-preview.mjs +7 -8
- package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +24 -28
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +3 -4
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-section.mjs +8 -13
- package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +3 -4
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-splitter.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-stepper.mjs +3 -4
- package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs +5 -6
- package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +3 -4
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +23 -27
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tree.mjs +6 -8
- package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs +8 -9
- package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-view.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-view.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +5 -7
- package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +7 -9
- package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-chip.mjs +5 -7
- package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs +7 -9
- package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-date.mjs +7 -9
- package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs +466 -344
- package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs +4 -5
- package/fesm2022/sdcorejs-angular-forms-inline-text.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs +5 -7
- package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-input.mjs +5 -7
- package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-label.mjs +4 -5
- package/fesm2022/sdcorejs-angular-forms-label.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-radio.mjs +2 -4
- package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +6 -8
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +2 -2
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs +5 -7
- package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-icon.mjs +523 -0
- package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +29 -29
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules.mjs +1 -0
- package/fesm2022/sdcorejs-angular-modules.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-confirm.mjs +85 -5
- package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-excel.mjs +22 -14
- package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs +1 -1
- package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-utilities-models.mjs +3 -2
- package/fesm2022/sdcorejs-angular-utilities-models.mjs.map +1 -1
- package/forms/datetime/index.d.ts +4 -4
- package/modules/icon/index.d.ts +191 -0
- package/modules/index.d.ts +1 -0
- package/package.json +6 -1
- package/services/confirm/index.d.ts +49 -1
- package/utilities/models/index.d.ts +6 -4
|
@@ -7,7 +7,6 @@ import * as i2 from '@angular/forms';
|
|
|
7
7
|
import { NgForm, FormGroup, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
import * as i3 from '@angular/material/form-field';
|
|
9
9
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
10
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
11
10
|
import * as i4 from '@angular/material/radio';
|
|
12
11
|
import { MatRadioModule } from '@angular/material/radio';
|
|
13
12
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
@@ -180,7 +179,7 @@ class SdRadio {
|
|
|
180
179
|
this.formControl.updateValueAndValidity({ emitEvent: true });
|
|
181
180
|
};
|
|
182
181
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdRadio, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
183
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdRadio, isStandalone: true, selector: "sd-radio", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: true, transformFunction: null }, displayField: { classPropertyName: "displayField", publicName: "displayField", isSignal: true, isRequired: true, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, inlineError: { classPropertyName: "inlineError", publicName: "inlineError", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, viewed: { classPropertyName: "viewed", publicName: "viewed", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, hyperlink: { classPropertyName: "hyperlink", publicName: "hyperlink", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { model: "modelChange", sdChange: "sdChange", sdSelection: "sdSelection" }, host: { properties: { "class.sd-c-primary": "color() === 'primary'", "class.sd-c-secondary": "color() === 'secondary'", "class.sd-c-info": "color() === 'info'", "class.sd-c-success": "color() === 'success'", "class.sd-c-warning": "color() === 'warning'", "class.sd-c-error": "color() === 'error'" } }, queries: [{ propertyName: "sdSuffixDef", first: true, predicate: SdSuffixDefDirective, descendants: true, isSignal: true }, { propertyName: "sdLabelDef", first: true, predicate: SdLabelDefDirective, descendants: true, isSignal: true }, { propertyName: "sdViewDef", first: true, predicate: SdViewDefDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@let _sdLabelDef = sdLabelDef();\n@let _label = label();\n@let _display = display();\n@let _valueField = valueField();\n@let _hyperlink = hyperlink();\n\n@if (isViewed()) {\n @if (_sdLabelDef?.templateRef) {\n <ng-container *ngTemplateOutlet=\"_sdLabelDef!.templateRef\"> </ng-container>\n } @else if (_label) {\n <div class=\"T14R text-
|
|
182
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdRadio, isStandalone: true, selector: "sd-radio", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: true, transformFunction: null }, displayField: { classPropertyName: "displayField", publicName: "displayField", isSignal: true, isRequired: true, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, inlineError: { classPropertyName: "inlineError", publicName: "inlineError", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, viewed: { classPropertyName: "viewed", publicName: "viewed", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, hyperlink: { classPropertyName: "hyperlink", publicName: "hyperlink", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { model: "modelChange", sdChange: "sdChange", sdSelection: "sdSelection" }, host: { properties: { "class.sd-c-primary": "color() === 'primary'", "class.sd-c-secondary": "color() === 'secondary'", "class.sd-c-info": "color() === 'info'", "class.sd-c-success": "color() === 'success'", "class.sd-c-warning": "color() === 'warning'", "class.sd-c-error": "color() === 'error'" } }, queries: [{ propertyName: "sdSuffixDef", first: true, predicate: SdSuffixDefDirective, descendants: true, isSignal: true }, { propertyName: "sdLabelDef", first: true, predicate: SdLabelDefDirective, descendants: true, isSignal: true }, { propertyName: "sdViewDef", first: true, predicate: SdViewDefDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@let _sdLabelDef = sdLabelDef();\n@let _label = label();\n@let _display = display();\n@let _valueField = valueField();\n@let _hyperlink = hyperlink();\n\n@if (isViewed()) {\n @if (_sdLabelDef?.templateRef) {\n <ng-container *ngTemplateOutlet=\"_sdLabelDef!.templateRef\"> </ng-container>\n } @else if (_label) {\n <div class=\"T14R text-secondary\">{{ _label }}</div>\n }\n @if (_hyperlink) {\n <!-- N\u1EBFu c\u00F3 hyperlink th\u00EC d\u00F9ng th\u1EBB a -->\n <a [sdHref]=\"_hyperlink!\">{{ viewedText() }}</a>\n } @else {\n <!-- Ngo\u00E0i ra d\u00F9ng th\u1EBB m\u1EB7c \u0111\u1ECBnh -->\n <div class=\"T14M\">{{ viewedText() | sdEmpty }}</div>\n }\n} @else {\n <section [ngClass]=\"{ 'c-section': _display === 'row' }\">\n @if (_sdLabelDef?.templateRef) {\n <ng-container *ngTemplateOutlet=\"_sdLabelDef!.templateRef\"> </ng-container>\n } @else if (_label) {\n <sd-label [label]=\"_label!\" [required]=\"required()\"></sd-label>\n }\n <mat-radio-group\n [class.c-radio-group-column]=\"_display === 'column'\"\n [class.c-radio-group-row]=\"_display === 'row'\"\n [formControl]=\"formControl\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-required]=\"dataRequired()\">\n @for (item of normalizedItems(); track item[valueField()]) {\n <mat-radio-button [class.m-0]=\"_display === 'column'\" [class.mr-16]=\"_display === 'row'\" [value]=\"item[_valueField]\">\n {{ item[displayField()] }}\n </mat-radio-button>\n }\n </mat-radio-group>\n\n @if (formControl.errors?.['required'] && formControl.touched) {\n <mat-error>\n {{ 'core.form.radio.required' | translate }}\n </mat-error>\n } @else if (formControl.errors?.['inlineError'] && formControl.touched) {\n <mat-error>\n {{ inlineError() }}\n </mat-error>\n }\n </section>\n}\n", styles: [":host{height:100%;display:flex;flex-direction:column}:host ::ng-deep label.mdc-label{margin-bottom:0}:host{--sd-c: var(--sd-primary)}:host(.sd-c-secondary){--sd-c: var(--sd-secondary)}:host(.sd-c-info){--sd-c: var(--sd-info)}:host(.sd-c-success){--sd-c: var(--sd-success)}:host(.sd-c-warning){--sd-c: var(--sd-warning)}:host(.sd-c-error){--sd-c: var(--sd-error)}:host ::ng-deep .mat-mdc-radio-button,:host ::ng-deep .mat-mdc-radio-group,:host ::ng-deep .mdc-radio{--mdc-radio-selected-icon-color: var(--sd-c) !important;--mdc-radio-selected-focus-icon-color: var(--sd-c) !important;--mdc-radio-selected-hover-icon-color: var(--sd-c) !important;--mdc-radio-selected-pressed-icon-color: var(--sd-c) !important;--mdc-radio-selected-focus-state-layer-color: var(--sd-c) !important;--mdc-radio-selected-hover-state-layer-color: var(--sd-c) !important;--mat-radio-selected-icon-color: var(--sd-c) !important;--mat-radio-selected-focus-icon-color: var(--sd-c) !important;--mat-radio-selected-hover-icon-color: var(--sd-c) !important;--mat-radio-selected-pressed-icon-color: var(--sd-c) !important;--mat-radio-checked-ripple-color: var(--sd-c) !important;--mat-radio-checked-state-layer-color: var(--sd-c) !important}.c-section{align-content:center;align-items:center}.c-radio-group-column{flex:1;display:flex;flex-direction:column;align-items:flex-start}.c-radio-group-row{flex:1;display:flex;flex-direction:row;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i4.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText"] }, { kind: "directive", type: SdHrefDirective, selector: "a[sdHref]", inputs: ["sdHref"] }, { kind: "pipe", type: SdEmptyPipe, name: "sdEmpty" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
184
183
|
}
|
|
185
184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdRadio, decorators: [{
|
|
186
185
|
type: Component,
|
|
@@ -198,13 +197,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
198
197
|
ReactiveFormsModule,
|
|
199
198
|
MatTooltipModule,
|
|
200
199
|
MatFormFieldModule,
|
|
201
|
-
MatIconModule,
|
|
202
200
|
MatRadioModule,
|
|
203
201
|
SdLabel,
|
|
204
202
|
SdEmptyPipe,
|
|
205
203
|
SdHrefDirective,
|
|
206
204
|
TranslatePipe,
|
|
207
|
-
], template: "@let _sdLabelDef = sdLabelDef();\n@let _label = label();\n@let _display = display();\n@let _valueField = valueField();\n@let _hyperlink = hyperlink();\n\n@if (isViewed()) {\n @if (_sdLabelDef?.templateRef) {\n <ng-container *ngTemplateOutlet=\"_sdLabelDef!.templateRef\"> </ng-container>\n } @else if (_label) {\n <div class=\"T14R text-
|
|
205
|
+
], template: "@let _sdLabelDef = sdLabelDef();\n@let _label = label();\n@let _display = display();\n@let _valueField = valueField();\n@let _hyperlink = hyperlink();\n\n@if (isViewed()) {\n @if (_sdLabelDef?.templateRef) {\n <ng-container *ngTemplateOutlet=\"_sdLabelDef!.templateRef\"> </ng-container>\n } @else if (_label) {\n <div class=\"T14R text-secondary\">{{ _label }}</div>\n }\n @if (_hyperlink) {\n <!-- N\u1EBFu c\u00F3 hyperlink th\u00EC d\u00F9ng th\u1EBB a -->\n <a [sdHref]=\"_hyperlink!\">{{ viewedText() }}</a>\n } @else {\n <!-- Ngo\u00E0i ra d\u00F9ng th\u1EBB m\u1EB7c \u0111\u1ECBnh -->\n <div class=\"T14M\">{{ viewedText() | sdEmpty }}</div>\n }\n} @else {\n <section [ngClass]=\"{ 'c-section': _display === 'row' }\">\n @if (_sdLabelDef?.templateRef) {\n <ng-container *ngTemplateOutlet=\"_sdLabelDef!.templateRef\"> </ng-container>\n } @else if (_label) {\n <sd-label [label]=\"_label!\" [required]=\"required()\"></sd-label>\n }\n <mat-radio-group\n [class.c-radio-group-column]=\"_display === 'column'\"\n [class.c-radio-group-row]=\"_display === 'row'\"\n [formControl]=\"formControl\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-required]=\"dataRequired()\">\n @for (item of normalizedItems(); track item[valueField()]) {\n <mat-radio-button [class.m-0]=\"_display === 'column'\" [class.mr-16]=\"_display === 'row'\" [value]=\"item[_valueField]\">\n {{ item[displayField()] }}\n </mat-radio-button>\n }\n </mat-radio-group>\n\n @if (formControl.errors?.['required'] && formControl.touched) {\n <mat-error>\n {{ 'core.form.radio.required' | translate }}\n </mat-error>\n } @else if (formControl.errors?.['inlineError'] && formControl.touched) {\n <mat-error>\n {{ inlineError() }}\n </mat-error>\n }\n </section>\n}\n", styles: [":host{height:100%;display:flex;flex-direction:column}:host ::ng-deep label.mdc-label{margin-bottom:0}:host{--sd-c: var(--sd-primary)}:host(.sd-c-secondary){--sd-c: var(--sd-secondary)}:host(.sd-c-info){--sd-c: var(--sd-info)}:host(.sd-c-success){--sd-c: var(--sd-success)}:host(.sd-c-warning){--sd-c: var(--sd-warning)}:host(.sd-c-error){--sd-c: var(--sd-error)}:host ::ng-deep .mat-mdc-radio-button,:host ::ng-deep .mat-mdc-radio-group,:host ::ng-deep .mdc-radio{--mdc-radio-selected-icon-color: var(--sd-c) !important;--mdc-radio-selected-focus-icon-color: var(--sd-c) !important;--mdc-radio-selected-hover-icon-color: var(--sd-c) !important;--mdc-radio-selected-pressed-icon-color: var(--sd-c) !important;--mdc-radio-selected-focus-state-layer-color: var(--sd-c) !important;--mdc-radio-selected-hover-state-layer-color: var(--sd-c) !important;--mat-radio-selected-icon-color: var(--sd-c) !important;--mat-radio-selected-focus-icon-color: var(--sd-c) !important;--mat-radio-selected-hover-icon-color: var(--sd-c) !important;--mat-radio-selected-pressed-icon-color: var(--sd-c) !important;--mat-radio-checked-ripple-color: var(--sd-c) !important;--mat-radio-checked-state-layer-color: var(--sd-c) !important}.c-section{align-content:center;align-items:center}.c-radio-group-column{flex:1;display:flex;flex-direction:column;align-items:flex-start}.c-radio-group-row{flex:1;display:flex;flex-direction:row;align-items:center}\n"] }]
|
|
208
206
|
}], ctorParameters: () => [], propDecorators: { autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: true }] }], displayField: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayField", required: true }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], inlineError: [{ type: i0.Input, args: [{ isSignal: true, alias: "inlineError", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], viewed: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewed", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], hyperlink: [{ type: i0.Input, args: [{ isSignal: true, alias: "hyperlink", required: false }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }], sdSuffixDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdSuffixDefDirective), { isSignal: true }] }], sdLabelDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdLabelDefDirective), { isSignal: true }] }], sdViewDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdViewDefDirective), { isSignal: true }] }], sdChange: [{ type: i0.Output, args: ["sdChange"] }], sdSelection: [{ type: i0.Output, args: ["sdSelection"] }] } });
|
|
209
207
|
|
|
210
208
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdcorejs-angular-forms-radio.mjs","sources":["../../../projects/sdcorejs-angular/forms/radio/src/radio.component.ts","../../../projects/sdcorejs-angular/forms/radio/src/radio.component.html","../../../projects/sdcorejs-angular/forms/radio/sdcorejs-angular-forms-radio.ts"],"sourcesContent":["import { Utilities } from '@sdcorejs/utils/fns';\n\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n input,\n model,\n OnDestroy,\n OnInit,\n output,\n} from '@angular/core';\nimport { FormGroup, NgForm, ReactiveFormsModule, ValidatorFn, Validators } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { Subscription } from 'rxjs';\n\nimport { SdLabelDefDirective, SdSuffixDefDirective, SdViewDefDirective } from '@sdcorejs/angular/forms/directives';\n\nimport {\n SdFormControl,\n SdInlineErrorValidator,\n sdFormControlState,\n SdViewed,\n SdViewedInput,\n sdViewedInline,\n sdViewedTransform,\n} from '@sdcorejs/angular/forms/models';\nimport { sdIsEmpty, sdSerializeDataValue } from '@sdcorejs/angular/utilities/data-state';\nimport { Color } from '@sdcorejs/utils/models';\nimport { TranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdEmptyPipe } from '@sdcorejs/angular/pipes';\nimport { SdLabel } from '@sdcorejs/angular/forms/label';\nimport { SdHrefDirective } from '@sdcorejs/angular/directives';\n\n@Component({\n selector: 'sd-radio',\n templateUrl: './radio.component.html',\n styleUrl: './radio.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n // why: host class .sd-c-<x> + default sd-c-primary cho fallback. Thay data-sd-color\n // để tránh edge case host-attr-binding không reactive trong vài cảnh build pipeline.\n '[class.sd-c-primary]': \"color() === 'primary'\",\n '[class.sd-c-secondary]': \"color() === 'secondary'\",\n '[class.sd-c-info]': \"color() === 'info'\",\n '[class.sd-c-success]': \"color() === 'success'\",\n '[class.sd-c-warning]': \"color() === 'warning'\",\n '[class.sd-c-error]': \"color() === 'error'\",\n },\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatTooltipModule,\n MatFormFieldModule,\n MatIconModule,\n MatRadioModule,\n SdLabel,\n SdEmptyPipe,\n SdHrefDirective,\n TranslatePipe,\n ],\n})\nexport class SdRadio implements OnInit, AfterViewInit, OnDestroy {\n readonly #ref = inject(ChangeDetectorRef);\n\n id = `I${Utilities.generateUuid()}`;\n #name = Utilities.generateUuid();\n formControl = new SdFormControl();\n #subscription = new Subscription();\n\n // Inputs — accept null|undefined at boundary, transform to canonical\n readonly autoIdInput = input<string | undefined, string | null | undefined>(undefined, {\n alias: 'autoId',\n transform: (v): string | undefined => v ?? undefined,\n });\n readonly name = input<string | undefined, string | null | undefined>(undefined, {\n transform: (v): string | undefined => v ?? undefined,\n });\n // why: parent may bind NgForm (template-driven), FormGroup (reactive), or a wrapper with `.form`.\n // Transform once at the input boundary so the rest of the component only deals with FormGroup.\n readonly form = input<FormGroup | undefined, any>(undefined, {\n transform: (val: any): FormGroup | undefined => {\n if (!val) return undefined;\n if (val instanceof NgForm) return val.form;\n if (val instanceof FormGroup) return val;\n if (val?.form instanceof FormGroup) return val.form;\n return undefined;\n },\n });\n readonly label = input<string | undefined, string | null | undefined>(undefined, {\n transform: (v): string | undefined => v ?? undefined,\n });\n readonly placeholder = input<string | undefined, string | null | undefined>(undefined, {\n transform: (v): string | undefined => v ?? undefined,\n });\n readonly display = input<'row' | 'column', 'row' | 'column' | null | undefined>('row', {\n transform: (v): 'row' | 'column' => v || 'row',\n });\n readonly items = input<any[], any[] | null | undefined>([], {\n transform: (v): any[] => (Array.isArray(v) ? v : []),\n });\n readonly valueField = input.required<string>();\n readonly displayField = input.required<string>();\n readonly required = input(false, { transform: booleanAttribute });\n readonly inlineError = input<string | undefined, string | null | undefined>(undefined, {\n transform: (v): string | undefined => v ?? undefined,\n });\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Display mode: `false` edit · `true` static view · `'inline'` interactive (disabled `'inline'` → static). */\n readonly viewed = input<SdViewed, SdViewedInput>(false, { transform: sdViewedTransform });\n\n // why: tri-state viewed — `'inline'` keeps the radio group interactive; disabled `'inline'` → static.\n readonly #viewedState = sdViewedInline(this.viewed, undefined, this.disabled);\n /** `true` when the static read-only view should render. */\n readonly isViewed = this.#viewedState.isViewed;\n // why: legacy callers pass `null` → fallback to 'primary'. Color enum mở rộng hơn ThemePalette,\n // áp dụng qua host attr [data-sd-color] + SCSS override MDC token vars (mat [color] không nhận 'success'/'info'/...).\n readonly color = input<Color, Color | null | undefined>('primary', {\n transform: (v): Color => v || 'primary',\n });\n readonly hyperlink = input<string | undefined, string | null | undefined>(undefined, {\n transform: (v): string | undefined => v ?? undefined,\n });\n\n // Two-way model\n readonly model = model<number | string | boolean | undefined | null>(undefined);\n\n // Content children\n readonly sdSuffixDef = contentChild(SdSuffixDefDirective);\n readonly sdLabelDef = contentChild(SdLabelDefDirective);\n readonly sdViewDef = contentChild(SdViewDefDirective);\n\n // Outputs (modelChange auto-generated by model() signal)\n readonly sdChange = output<unknown>();\n readonly sdSelection = output<{ value: any | any[]; item?: any }>();\n\n // Computed (template bindings)\n readonly autoId = computed(() => (this.autoIdInput() ? `forms-radio-${this.autoIdInput()}` : undefined));\n // Kept for back-compat with templates that read `normalizedItems()` — alias of items()\n readonly normalizedItems = computed(() => this.items());\n readonly #state = sdFormControlState(computed(() => this.formControl));\n readonly dataDisabled = computed(() => (this.#state().disabled ? 'true' : 'false'));\n readonly dataEmpty = computed(() => (sdIsEmpty(this.#state().value) ? 'true' : 'false'));\n readonly dataValue = computed(() => sdSerializeDataValue(this.#state().value));\n readonly dataRequired = computed(() => (this.required() ? 'true' : 'false'));\n\n readonly viewedText = computed(() => {\n const items = this.items();\n const vField = this.valueField();\n const dField = this.displayField();\n // why: tìm item match value rồi trả về string ở `displayField`, không trả nguyên object (sẽ in [object Object]).\n const match = items.find(e => this.formControl?.value?.toString() === e?.[vField]?.toString());\n return match?.[dField] ?? '';\n });\n\n constructor() {\n effect(() => {\n const val = this.name();\n if (val) this.#name = val;\n });\n\n effect(() => {\n const value = this.model();\n if (value !== this.formControl.value) {\n this.formControl.setValue(value, { emitEvent: false });\n }\n });\n\n effect(() => {\n if (this.disabled()) this.formControl.disable();\n else this.formControl.enable();\n });\n\n effect(() => {\n this.required();\n this.inlineError();\n this.#updateValidator();\n });\n }\n\n ngOnInit() {\n this.#subscription.add(\n this.formControl.sdChanges.subscribe(() => {\n this.#ref.markForCheck();\n })\n );\n }\n\n ngAfterViewInit() {\n this.#subscription.add(\n this.formControl.valueChanges.subscribe(value => {\n const vField = this.valueField();\n this.model.set(value);\n this.sdChange.emit(value);\n this.sdSelection.emit({\n value,\n item: this.items().find(e => value?.toString() === e?.[vField]?.toString()),\n });\n })\n );\n this.form()?.addControl(this.#name, this.formControl);\n }\n\n ngOnDestroy() {\n this.#subscription.unsubscribe();\n this.form()?.removeControl(this.#name);\n }\n\n #updateValidator = () => {\n this.formControl.clearValidators();\n const validators: ValidatorFn[] = [];\n if (this.required()) {\n validators.push(Validators.required);\n }\n if (this.inlineError()) {\n validators.push(SdInlineErrorValidator);\n }\n this.formControl.setValidators(validators);\n this.formControl.updateValueAndValidity();\n };\n\n reValidate = () => {\n this.formControl.updateValueAndValidity({ emitEvent: true });\n };\n}\n","@let _sdLabelDef = sdLabelDef();\n@let _label = label();\n@let _display = display();\n@let _valueField = valueField();\n@let _hyperlink = hyperlink();\n\n@if (isViewed()) {\n @if (_sdLabelDef?.templateRef) {\n <ng-container *ngTemplateOutlet=\"_sdLabelDef!.templateRef\"> </ng-container>\n } @else if (_label) {\n <div class=\"T14R text-black400\">{{ _label }}</div>\n }\n @if (_hyperlink) {\n <!-- Nếu có hyperlink thì dùng thẻ a -->\n <a [sdHref]=\"_hyperlink!\">{{ viewedText() }}</a>\n } @else {\n <!-- Ngoài ra dùng thẻ mặc định -->\n <div class=\"T14M\">{{ viewedText() | sdEmpty }}</div>\n }\n} @else {\n <section [ngClass]=\"{ 'c-section': _display === 'row' }\">\n @if (_sdLabelDef?.templateRef) {\n <ng-container *ngTemplateOutlet=\"_sdLabelDef!.templateRef\"> </ng-container>\n } @else if (_label) {\n <sd-label [label]=\"_label!\" [required]=\"required()\"></sd-label>\n }\n <mat-radio-group\n [class.c-radio-group-column]=\"_display === 'column'\"\n [class.c-radio-group-row]=\"_display === 'row'\"\n [formControl]=\"formControl\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-required]=\"dataRequired()\">\n @for (item of normalizedItems(); track item[valueField()]) {\n <mat-radio-button [class.m-0]=\"_display === 'column'\" [class.mr-16]=\"_display === 'row'\" [value]=\"item[_valueField]\">\n {{ item[displayField()] }}\n </mat-radio-button>\n }\n </mat-radio-group>\n\n @if (formControl.errors?.['required'] && formControl.touched) {\n <mat-error>\n {{ 'core.form.radio.required' | translate }}\n </mat-error>\n } @else if (formControl.errors?.['inlineError'] && formControl.touched) {\n <mat-error>\n {{ inlineError() }}\n </mat-error>\n }\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAyEa,OAAO,CAAA;AACT,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAEzC,IAAA,EAAE,GAAG,CAAA,CAAA,EAAI,SAAS,CAAC,YAAY,EAAE,EAAE;AACnC,IAAA,KAAK,GAAG,SAAS,CAAC,YAAY,EAAE;AAChC,IAAA,WAAW,GAAG,IAAI,aAAa,EAAE;AACjC,IAAA,aAAa,GAAG,IAAI,YAAY,EAAE;;AAGzB,IAAA,WAAW,GAAG,KAAK,CAAgD,SAAS,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,aAAA,EACnF,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,CAAC,CAAC,KAAyB,CAAC,IAAI,SAAS,EAAA,CAAA,GAAA,CAFiC;AACrF,YAAA,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,CAAC,CAAC,KAAyB,CAAC,IAAI,SAAS;AACrD,SAAA,CAAA,CAAA,CAAC;AACO,IAAA,IAAI,GAAG,KAAK,CAAgD,SAAS,wCAC5E,SAAS,EAAE,CAAC,CAAC,KAAyB,CAAC,IAAI,SAAS,EAAA,CAAA,GAAA,CAD0B;YAC9E,SAAS,EAAE,CAAC,CAAC,KAAyB,CAAC,IAAI,SAAS;AACrD,SAAA,C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wBACnB,gBAAgB;wBAChB,kBAAkB;wBAClB,aAAa;wBACb,cAAc;wBACd,OAAO;wBACP,WAAW;wBACX,eAAe;wBACf,aAAa;AACd,qBAAA,EAAA,QAAA,EAAA,g+DAAA,EAAA,MAAA,EAAA,CAAA,o5CAAA,CAAA,EAAA;ipDAoEmC,oBAAoB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACrB,mBAAmB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACpB,kBAAkB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7ItD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sdcorejs-angular-forms-radio.mjs","sources":["../../../projects/sdcorejs-angular/forms/radio/src/radio.component.ts","../../../projects/sdcorejs-angular/forms/radio/src/radio.component.html","../../../projects/sdcorejs-angular/forms/radio/sdcorejs-angular-forms-radio.ts"],"sourcesContent":["import { Utilities } from '@sdcorejs/utils/fns';\n\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n input,\n model,\n OnDestroy,\n OnInit,\n output,\n} from '@angular/core';\nimport { FormGroup, NgForm, ReactiveFormsModule, ValidatorFn, Validators } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { Subscription } from 'rxjs';\n\nimport { SdLabelDefDirective, SdSuffixDefDirective, SdViewDefDirective } from '@sdcorejs/angular/forms/directives';\n\nimport {\n SdFormControl,\n SdInlineErrorValidator,\n sdFormControlState,\n SdViewed,\n SdViewedInput,\n sdViewedInline,\n sdViewedTransform,\n} from '@sdcorejs/angular/forms/models';\nimport { sdIsEmpty, sdSerializeDataValue } from '@sdcorejs/angular/utilities/data-state';\nimport { Color } from '@sdcorejs/utils/models';\nimport { TranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdEmptyPipe } from '@sdcorejs/angular/pipes';\nimport { SdLabel } from '@sdcorejs/angular/forms/label';\nimport { SdHrefDirective } from '@sdcorejs/angular/directives';\n\n@Component({\n selector: 'sd-radio',\n templateUrl: './radio.component.html',\n styleUrl: './radio.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n // why: host class .sd-c-<x> + default sd-c-primary cho fallback. Thay data-sd-color\n // để tránh edge case host-attr-binding không reactive trong vài cảnh build pipeline.\n '[class.sd-c-primary]': \"color() === 'primary'\",\n '[class.sd-c-secondary]': \"color() === 'secondary'\",\n '[class.sd-c-info]': \"color() === 'info'\",\n '[class.sd-c-success]': \"color() === 'success'\",\n '[class.sd-c-warning]': \"color() === 'warning'\",\n '[class.sd-c-error]': \"color() === 'error'\",\n },\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MatTooltipModule,\n MatFormFieldModule,\n MatRadioModule,\n SdLabel,\n SdEmptyPipe,\n SdHrefDirective,\n TranslatePipe,\n ],\n})\nexport class SdRadio implements OnInit, AfterViewInit, OnDestroy {\n readonly #ref = inject(ChangeDetectorRef);\n\n id = `I${Utilities.generateUuid()}`;\n #name = Utilities.generateUuid();\n formControl = new SdFormControl();\n #subscription = new Subscription();\n\n // Inputs — accept null|undefined at boundary, transform to canonical\n readonly autoIdInput = input<string | undefined, string | null | undefined>(undefined, {\n alias: 'autoId',\n transform: (v): string | undefined => v ?? undefined,\n });\n readonly name = input<string | undefined, string | null | undefined>(undefined, {\n transform: (v): string | undefined => v ?? undefined,\n });\n // why: parent may bind NgForm (template-driven), FormGroup (reactive), or a wrapper with `.form`.\n // Transform once at the input boundary so the rest of the component only deals with FormGroup.\n readonly form = input<FormGroup | undefined, any>(undefined, {\n transform: (val: any): FormGroup | undefined => {\n if (!val) return undefined;\n if (val instanceof NgForm) return val.form;\n if (val instanceof FormGroup) return val;\n if (val?.form instanceof FormGroup) return val.form;\n return undefined;\n },\n });\n readonly label = input<string | undefined, string | null | undefined>(undefined, {\n transform: (v): string | undefined => v ?? undefined,\n });\n readonly placeholder = input<string | undefined, string | null | undefined>(undefined, {\n transform: (v): string | undefined => v ?? undefined,\n });\n readonly display = input<'row' | 'column', 'row' | 'column' | null | undefined>('row', {\n transform: (v): 'row' | 'column' => v || 'row',\n });\n readonly items = input<any[], any[] | null | undefined>([], {\n transform: (v): any[] => (Array.isArray(v) ? v : []),\n });\n readonly valueField = input.required<string>();\n readonly displayField = input.required<string>();\n readonly required = input(false, { transform: booleanAttribute });\n readonly inlineError = input<string | undefined, string | null | undefined>(undefined, {\n transform: (v): string | undefined => v ?? undefined,\n });\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Display mode: `false` edit · `true` static view · `'inline'` interactive (disabled `'inline'` → static). */\n readonly viewed = input<SdViewed, SdViewedInput>(false, { transform: sdViewedTransform });\n\n // why: tri-state viewed — `'inline'` keeps the radio group interactive; disabled `'inline'` → static.\n readonly #viewedState = sdViewedInline(this.viewed, undefined, this.disabled);\n /** `true` when the static read-only view should render. */\n readonly isViewed = this.#viewedState.isViewed;\n // why: legacy callers pass `null` → fallback to 'primary'. Color enum mở rộng hơn ThemePalette,\n // áp dụng qua host attr [data-sd-color] + SCSS override MDC token vars (mat [color] không nhận 'success'/'info'/...).\n readonly color = input<Color, Color | null | undefined>('primary', {\n transform: (v): Color => v || 'primary',\n });\n readonly hyperlink = input<string | undefined, string | null | undefined>(undefined, {\n transform: (v): string | undefined => v ?? undefined,\n });\n\n // Two-way model\n readonly model = model<number | string | boolean | undefined | null>(undefined);\n\n // Content children\n readonly sdSuffixDef = contentChild(SdSuffixDefDirective);\n readonly sdLabelDef = contentChild(SdLabelDefDirective);\n readonly sdViewDef = contentChild(SdViewDefDirective);\n\n // Outputs (modelChange auto-generated by model() signal)\n readonly sdChange = output<unknown>();\n readonly sdSelection = output<{ value: any | any[]; item?: any }>();\n\n // Computed (template bindings)\n readonly autoId = computed(() => (this.autoIdInput() ? `forms-radio-${this.autoIdInput()}` : undefined));\n // Kept for back-compat with templates that read `normalizedItems()` — alias of items()\n readonly normalizedItems = computed(() => this.items());\n readonly #state = sdFormControlState(computed(() => this.formControl));\n readonly dataDisabled = computed(() => (this.#state().disabled ? 'true' : 'false'));\n readonly dataEmpty = computed(() => (sdIsEmpty(this.#state().value) ? 'true' : 'false'));\n readonly dataValue = computed(() => sdSerializeDataValue(this.#state().value));\n readonly dataRequired = computed(() => (this.required() ? 'true' : 'false'));\n\n readonly viewedText = computed(() => {\n const items = this.items();\n const vField = this.valueField();\n const dField = this.displayField();\n // why: tìm item match value rồi trả về string ở `displayField`, không trả nguyên object (sẽ in [object Object]).\n const match = items.find(e => this.formControl?.value?.toString() === e?.[vField]?.toString());\n return match?.[dField] ?? '';\n });\n\n constructor() {\n effect(() => {\n const val = this.name();\n if (val) this.#name = val;\n });\n\n effect(() => {\n const value = this.model();\n if (value !== this.formControl.value) {\n this.formControl.setValue(value, { emitEvent: false });\n }\n });\n\n effect(() => {\n if (this.disabled()) this.formControl.disable();\n else this.formControl.enable();\n });\n\n effect(() => {\n this.required();\n this.inlineError();\n this.#updateValidator();\n });\n }\n\n ngOnInit() {\n this.#subscription.add(\n this.formControl.sdChanges.subscribe(() => {\n this.#ref.markForCheck();\n })\n );\n }\n\n ngAfterViewInit() {\n this.#subscription.add(\n this.formControl.valueChanges.subscribe(value => {\n const vField = this.valueField();\n this.model.set(value);\n this.sdChange.emit(value);\n this.sdSelection.emit({\n value,\n item: this.items().find(e => value?.toString() === e?.[vField]?.toString()),\n });\n })\n );\n this.form()?.addControl(this.#name, this.formControl);\n }\n\n ngOnDestroy() {\n this.#subscription.unsubscribe();\n this.form()?.removeControl(this.#name);\n }\n\n #updateValidator = () => {\n this.formControl.clearValidators();\n const validators: ValidatorFn[] = [];\n if (this.required()) {\n validators.push(Validators.required);\n }\n if (this.inlineError()) {\n validators.push(SdInlineErrorValidator);\n }\n this.formControl.setValidators(validators);\n this.formControl.updateValueAndValidity();\n };\n\n reValidate = () => {\n this.formControl.updateValueAndValidity({ emitEvent: true });\n };\n}\n","@let _sdLabelDef = sdLabelDef();\n@let _label = label();\n@let _display = display();\n@let _valueField = valueField();\n@let _hyperlink = hyperlink();\n\n@if (isViewed()) {\n @if (_sdLabelDef?.templateRef) {\n <ng-container *ngTemplateOutlet=\"_sdLabelDef!.templateRef\"> </ng-container>\n } @else if (_label) {\n <div class=\"T14R text-secondary\">{{ _label }}</div>\n }\n @if (_hyperlink) {\n <!-- Nếu có hyperlink thì dùng thẻ a -->\n <a [sdHref]=\"_hyperlink!\">{{ viewedText() }}</a>\n } @else {\n <!-- Ngoài ra dùng thẻ mặc định -->\n <div class=\"T14M\">{{ viewedText() | sdEmpty }}</div>\n }\n} @else {\n <section [ngClass]=\"{ 'c-section': _display === 'row' }\">\n @if (_sdLabelDef?.templateRef) {\n <ng-container *ngTemplateOutlet=\"_sdLabelDef!.templateRef\"> </ng-container>\n } @else if (_label) {\n <sd-label [label]=\"_label!\" [required]=\"required()\"></sd-label>\n }\n <mat-radio-group\n [class.c-radio-group-column]=\"_display === 'column'\"\n [class.c-radio-group-row]=\"_display === 'row'\"\n [formControl]=\"formControl\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-required]=\"dataRequired()\">\n @for (item of normalizedItems(); track item[valueField()]) {\n <mat-radio-button [class.m-0]=\"_display === 'column'\" [class.mr-16]=\"_display === 'row'\" [value]=\"item[_valueField]\">\n {{ item[displayField()] }}\n </mat-radio-button>\n }\n </mat-radio-group>\n\n @if (formControl.errors?.['required'] && formControl.touched) {\n <mat-error>\n {{ 'core.form.radio.required' | translate }}\n </mat-error>\n } @else if (formControl.errors?.['inlineError'] && formControl.touched) {\n <mat-error>\n {{ inlineError() }}\n </mat-error>\n }\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;MAuEa,OAAO,CAAA;AACT,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAEzC,IAAA,EAAE,GAAG,CAAA,CAAA,EAAI,SAAS,CAAC,YAAY,EAAE,EAAE;AACnC,IAAA,KAAK,GAAG,SAAS,CAAC,YAAY,EAAE;AAChC,IAAA,WAAW,GAAG,IAAI,aAAa,EAAE;AACjC,IAAA,aAAa,GAAG,IAAI,YAAY,EAAE;;AAGzB,IAAA,WAAW,GAAG,KAAK,CAAgD,SAAS,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,aAAA,EACnF,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,CAAC,CAAC,KAAyB,CAAC,IAAI,SAAS,EAAA,CAAA,GAAA,CAFiC;AACrF,YAAA,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,CAAC,CAAC,KAAyB,CAAC,IAAI,SAAS;AACrD,SAAA,CAAA,CAAA,CAAC;AACO,IAAA,IAAI,GAAG,KAAK,CAAgD,SAAS,wCAC5E,SAAS,EAAE,CAAC,CAAC,KAAyB,CAAC,IAAI,S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CAAA,EAAA,CAAA,UAAA,CAAA,MACrB,mBAAmB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACpB,kBAAkB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3ItD;;AAEG;;;;"}
|
|
@@ -7,13 +7,11 @@ import * as i2 from '@angular/forms';
|
|
|
7
7
|
import { NgForm, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
9
9
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
10
|
-
import * as i5 from '@angular/material/icon';
|
|
11
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
12
10
|
import * as i3 from '@angular/material/input';
|
|
13
11
|
import { MatInput, MatInputModule } from '@angular/material/input';
|
|
14
|
-
import * as
|
|
12
|
+
import * as i6 from '@angular/material/progress-spinner';
|
|
15
13
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
16
|
-
import * as
|
|
14
|
+
import * as i5 from '@angular/material/select';
|
|
17
15
|
import { MatSelectModule } from '@angular/material/select';
|
|
18
16
|
import * as i4 from '@angular/material/tooltip';
|
|
19
17
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
@@ -26,6 +24,7 @@ import { sdIsEmpty, sdSerializeDataValue } from '@sdcorejs/angular/utilities/dat
|
|
|
26
24
|
import { Utilities, StringUtilities, ArrayUtilities } from '@sdcorejs/angular/utilities/extensions';
|
|
27
25
|
import { timer, combineLatest } from 'rxjs';
|
|
28
26
|
import { tap, map, startWith, debounce, switchMap } from 'rxjs/operators';
|
|
27
|
+
import { SdIcon } from '@sdcorejs/angular/modules/icon';
|
|
29
28
|
|
|
30
29
|
class SdSelectFooterActionDirective {
|
|
31
30
|
templateRef = inject((TemplateRef));
|
|
@@ -691,25 +690,24 @@ class SdSelect {
|
|
|
691
690
|
}
|
|
692
691
|
};
|
|
693
692
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
694
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdSelect, isStandalone: true, selector: "sd-select", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: true, transformFunction: null }, displayField: { classPropertyName: "displayField", publicName: "displayField", isSignal: true, isRequired: true, transformFunction: null }, disabledField: { classPropertyName: "disabledField", publicName: "disabledField", isSignal: true, isRequired: false, transformFunction: null }, cacheChecksum: { classPropertyName: "cacheChecksum", publicName: "cacheChecksum", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, hyperlink: { classPropertyName: "hyperlink", publicName: "hyperlink", isSignal: true, isRequired: false, transformFunction: null }, minWidthPanel: { classPropertyName: "minWidthPanel", publicName: "minWidthPanel", isSignal: true, isRequired: false, transformFunction: null }, hideInlineError: { classPropertyName: "hideInlineError", publicName: "hideInlineError", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, viewed: { classPropertyName: "viewed", publicName: "viewed", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, validator: { classPropertyName: "validator", publicName: "validator", isSignal: true, isRequired: false, transformFunction: null }, inlineError: { classPropertyName: "inlineError", publicName: "inlineError", isSignal: true, isRequired: false, transformFunction: null }, appearanceInput: { classPropertyName: "appearanceInput", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, valueModel: { classPropertyName: "valueModel", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueModel: "modelChange", sdChange: "sdChange", sdSelection: "sdSelection" }, host: { properties: { "class.sd-bare": "isInline()", "class.sd-viewed": "isViewed() || isInline()", "class.sd-has-label": "!!label()" } }, queries: [{ propertyName: "sdLabelTemplate", first: true, predicate: ["sdLabel"], descendants: true, isSignal: true }, { propertyName: "sdValueTemplate", first: true, predicate: ["sdValue"], descendants: true, isSignal: true }, { propertyName: "sdSelectedTemplate", first: true, predicate: ["sdSelected"], descendants: true, isSignal: true }, { propertyName: "itemDef", first: true, predicate: SdItemDefDefDirective, descendants: true, isSignal: true }, { propertyName: "sdViewDef", first: true, predicate: SdViewDefDirective, descendants: true, isSignal: true }, { propertyName: "footerActions", predicate: SdSelectFooterActionDirective, isSignal: true }], viewQueries: [{ propertyName: "matInputRef", first: true, predicate: MatInput, descendants: true, isSignal: true }, { propertyName: "selectRef", first: true, predicate: ["select"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _label = label();\n@let _appearance = appearance();\n@let _hideInlineError = hideInlineError();\n@let _errorMessage = errorMessage();\n@let _helperText = helperText();\n@let _multiple = multiple();\n@let _required = required();\n@let _normalizedValue = $any(normalizedValue());\n@let _focused = $any(focused());\n@let _isInline = isInline();\n@let _bare = _isInline;\n@let _hasValue = _multiple ? !!_normalizedValue?.length : _normalizedValue !== undefined && _normalizedValue !== null;\n@let _display = display();\n@let _size = size();\n@let _floatLabel = floatLabel();\n@let _valueField = valueField();\n@let _displayField = displayField();\n\n@if (isViewed()) {\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"sdLabelTemplate()\"\n [value]=\"_normalizedValue\"\n [display]=\"_display\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"viewTemplate()\"\n [selectedItems]=\"selectedItems()\">\n </sd-view>\n} @else {\n @if (_isInline) {\n <!-- why: inline \u2014 sd-view text l\u00E0 \"m\u1EB7t\" + trigger; editor v\u1EABn render b\u00EAn d\u01B0\u1EDBi (chrome \u1EA9n qua\n .sd-inline-editor) \u0111\u1EC3 m\u1EDF panel. Text gi\u1EEF nguy\u00EAn, ch\u1EC9 \u0111\u1ED5i khi commit gi\u00E1 tr\u1ECB m\u1EDBi. -->\n <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"sdLabelTemplate()\"\n [value]=\"_normalizedValue\"\n [display]=\"_display\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"viewTemplate()\"\n [selectedItems]=\"selectedItems()\">\n </sd-view>\n\n <!-- why: clear-\u00D7 ch\u1EC9 hi\u1EC7n khi hover (CSS), \u0111\u1EB7t CU\u1ED0I face + clear($event) stopPropagation \u2192\n xo\u00E1 gi\u00E1 tr\u1ECB m\u00E0 KH\u00D4NG m\u1EDF panel; tr\u00E1nh bug c\u0169 (\u00D7 s\u00E1t trigger b\u1ECB b\u1EA5m nh\u1EA7m l\u00FAc \u0111\u00F3ng panel). -->\n @if (clearable() && _hasValue && !_required && !formControl.disabled) {\n <button type=\"button\" class=\"sd-inline-clear\" (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </span>\n }\n\n @if (!_appearance) {\n <ng-content select=\"[sdLabel]\">\n @if (_label) {\n <sd-label [label]=\"_label\" [required]=\"_required\"></sd-label>\n }\n </ng-content>\n }\n\n <div\n class=\"d-flex align-items-center\"\n [class.sd-inline-editor]=\"_isInline\"\n [class.c-focused]=\"_focused\"\n [class.c-disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n (mouseenter)=\"updatePanelWidth()\"\n (focusin)=\"updatePanelWidth()\"\n aria-hidden=\"true\">\n @if (_multiple) {\n <mat-form-field\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [appearance]=\"_appearance!\"\n [floatLabel]=\"_floatLabel\">\n @if (_appearance && _label) {\n <mat-label style=\"display: inline-block\">\n <div style=\"display: flex; align-items: center; gap: 4px\">\n <span>{{ _label }}</span>\n @if (_helperText) {\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\n }\n </div>\n </mat-label>\n }\n\n <mat-select\n #select\n multiple\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder() || _label || ''\"\n (selectionChange)=\"onSelectionChange($event)\"\n disableOptionCentering=\"true\"\n [panelWidth]=\"calculatedPanelWidth()\"\n [panelClass]=\"['sd-select-panel', 'sd-multiple']\"\n [class.sd-selected]=\"!_required && _normalizedValue?.length\"\n [required]=\"_required\"\n (openedChange)=\"onOpenedChange($event)\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-invalid]=\"dataInvalid()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-loading]=\"dataLoading()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n matTooltipClass=\"sd-multiline-tooltip\"\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\n [matTooltip]=\"tooltip() || ''\">\n <mat-select-trigger>\n @if (sdSelectedTemplate(); as _selTpl) {\n <ng-container\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems(), item: selectedItems(), items: selectedItems(), display: _display, multiple: true }\">\n </ng-container>\n } @else {\n <div class=\"sd-trigger-text\" [matTooltip]=\"_display || ''\" matTooltipPosition=\"above\">\n {{ _display }}\n </div>\n }\n </mat-select-trigger>\n\n @if (filtered()) {\n <div class=\"c-filter-input-container\">\n <div class=\"filter-input-wrapper\">\n <mat-icon>search</mat-icon>\n <input\n [formControl]=\"inputControl\"\n aria-hidden=\"true\"\n matInput\n autocomplete=\"off\"\n class=\"c-search-input\"\n (keydown)=\"$event.stopPropagation()\" />\n </div>\n </div>\n }\n\n @let _filteredItems = filteredItems();\n @if (_filteredItems) {\n @if (!_filteredItems.length && !loading()) {\n <mat-option class=\"sd-empty\" disabled>\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\n </mat-option>\n } @else {\n @let iDefTpl = itemDef()?.templateRef;\n @if (_valueField && _displayField) {\n @for (item of _filteredItems; track itemValue(item)) {\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ itemDisplay(item) }}\n }\n </div>\n </mat-option>\n }\n } @else if (!_valueField && !_displayField) {\n @for (item of _filteredItems; track item) {\n <mat-option [value]=\"item\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ item }}\n }\n </div>\n </mat-option>\n }\n }\n }\n }\n\n @if (loading()) {\n <mat-option disabled class=\"sd-loading-option\">\n <mat-spinner diameter=\"24\"></mat-spinner>\n </mat-option>\n }\n\n @let _visibleFooterActions = visibleFooterActions();\n @if (_visibleFooterActions.length) {\n <div class=\"sd-select-footer-actions\">\n @for (action of _visibleFooterActions; track action) {\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\n }\n </div>\n }\n </mat-select>\n\n @if (_hideInlineError && _errorMessage && formControl.touched) {\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\n }\n\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\n <mat-error>{{ _errorMessage }}</mat-error>\n }\n\n @if (_normalizedValue?.length && !_required && !formControl.disabled && !_bare) {\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <mat-icon>close</mat-icon>\n </button>\n } @else {\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\n }\n </mat-form-field>\n } @else {\n <mat-form-field\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [appearance]=\"_appearance!\"\n [floatLabel]=\"_floatLabel\">\n @if (_appearance && _label) {\n <mat-label style=\"display: inline-block\">\n <div style=\"display: flex; align-items: center; gap: 4px\">\n <span>{{ _label }}</span>\n @if (_helperText) {\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\n }\n </div>\n </mat-label>\n }\n\n <mat-select\n #select\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder() || _label || ''\"\n (selectionChange)=\"onSelectionChange($event)\"\n disableOptionCentering=\"true\"\n [panelWidth]=\"calculatedPanelWidth()\"\n [panelClass]=\"'sd-select-panel'\"\n [class.sd-selected]=\"!_required && _normalizedValue !== undefined && _normalizedValue !== null\"\n [required]=\"_required\"\n (openedChange)=\"onOpenedChange($event)\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-invalid]=\"dataInvalid()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-loading]=\"dataLoading()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n matTooltipClass=\"sd-multiline-tooltip\"\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\n [matTooltip]=\"tooltip() || ''\">\n <mat-select-trigger>\n @if (sdSelectedTemplate(); as _selTpl) {\n <ng-container\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems()[0], item: selectedItems()[0], items: selectedItems(), display: _display, multiple: false }\">\n </ng-container>\n } @else {\n {{ _display }}\n }\n </mat-select-trigger>\n\n @if (filtered()) {\n <div class=\"c-filter-input-container\">\n <div class=\"filter-input-wrapper\">\n <mat-icon>search</mat-icon>\n <input\n [formControl]=\"inputControl\"\n aria-hidden=\"true\"\n matInput\n autocomplete=\"off\"\n class=\"c-search-input\"\n (keydown)=\"$event.stopPropagation()\" />\n </div>\n </div>\n }\n\n @let _filteredItems = filteredItems();\n @if (_filteredItems) {\n @if (!_filteredItems.length && !loading()) {\n <mat-option class=\"sd-empty\" disabled>\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\n </mat-option>\n } @else {\n @let iDefTpl = itemDef()?.templateRef;\n\n @if (_valueField && _displayField) {\n @for (item of _filteredItems; track itemValue(item)) {\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ itemDisplay(item) }}\n }\n </div>\n </mat-option>\n }\n } @else if (!_valueField && !_displayField) {\n @for (item of _filteredItems; track item) {\n <mat-option [value]=\"item\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ item }}\n }\n </div>\n </mat-option>\n }\n }\n }\n }\n\n @if (loading()) {\n <mat-option disabled class=\"sd-loading-option\">\n <mat-spinner diameter=\"24\"></mat-spinner>\n </mat-option>\n }\n\n @let _visibleFooterActions = visibleFooterActions();\n @if (_visibleFooterActions.length) {\n <div class=\"sd-select-footer-actions\">\n @for (action of _visibleFooterActions; track action) {\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\n }\n </div>\n }\n </mat-select>\n\n @if (_hideInlineError && _errorMessage && formControl.touched) {\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\n }\n\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\n <mat-error>{{ _errorMessage }}</mat-error>\n }\n\n @if (_normalizedValue !== undefined && _normalizedValue !== null && !_required && !formControl.disabled && !_bare) {\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <mat-icon>close</mat-icon>\n </button>\n } @else {\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\n }\n </mat-form-field>\n }\n </div>\n}\n", styles: ["@charset \"UTF-8\";.text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{display:block;max-width:100%}:host(.sd-has-label){padding-top:4px}:host(.sd-viewed){padding-top:0}::ng-deep .sd-loading-option{min-height:50px!important}::ng-deep .sd-loading-option .mat-pseudo-checkbox{display:none!important}::ng-deep .sd-loading-option .mdc-list-item__primary-text{width:100%;display:flex;justify-content:center;align-items:center}.sd-trigger-text{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .mat-mdc-select-value{max-width:100%;overflow:hidden;width:0;min-width:100%}:host ::ng-deep .sd-selected .mat-mdc-select-arrow{display:none}:host ::ng-deep .mat-mdc-select-arrow{display:none!important}:host ::ng-deep .custom-arrow{pointer-events:none;position:absolute;right:1rem;top:50%;transform:translateY(-50%);display:flex;align-items:center}:host ::ng-deep .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-mdc-text-field-wrapper{background:var(--sd-black100)}:host ::ng-deep .mat-mdc-form-field mat-select.mat-mdc-select-disabled .mat-mdc-select-value{color:var(--sd-black400)!important}:host ::ng-deep .mat-mdc-form-field .mat-mdc-placeholder-required{color:var(--sd-error)}::ng-deep .sd-select-panel .mat-mdc-option.sd-empty .mat-pseudo-checkbox{display:none}::ng-deep .sd-select-panel .mat-mdc-option{min-height:36px!important;padding:8px 12px!important}::ng-deep .sd-select-panel .c-filter-input-container{position:sticky;top:0;background-color:#fff;box-shadow:0 1px #f2f2f2;padding:8px;margin-bottom:8px;z-index:1000}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper{display:flex;align-items:center;padding:4px 8px;border:1px solid var(--sd-black200);border-radius:4px;background-color:#fff}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper .mat-icon{color:#dadada}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper .c-search-input{background-color:#fff;border:none;outline:none;flex:1;padding:4px}::ng-deep .sd-select-panel .sd-select-footer-actions{position:sticky;bottom:0;z-index:1000;display:flex;flex-direction:column;gap:4px;border-top:1px solid #f2f2f2;background-color:#fff}::ng-deep .sd-multiline-tooltip{white-space:pre-line}::ng-deep .mat-mdc-select-panel.sd-select-panel{padding:0}::ng-deep .mat-mdc-select-panel.sd-select-panel .mat-mdc-option.mdc-list-item--disabled.sd-empty .mdc-list-item__primary-text{opacity:.8;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px}::ng-deep .sd-select-panel .mat-pseudo-checkbox-minimal{transform:scale(.7);transform-origin:center right}::ng-deep .sd-select-panel.sd-multiple .mat-pseudo-checkbox{transform:scale(.75);margin-right:8px!important}::ng-deep .sd-select-panel.sd-multiple .mdc-list-item__primary-text{font-size:14px;white-space:normal}::ng-deep .mat-mdc-select-panel.sd-select-panel{max-width:90vw!important}::ng-deep .mat-mdc-select-panel.sd-select-panel .mat-mdc-option .mdc-list-item__primary-text{white-space:normal;word-break:break-word;line-height:1.4}:host(.sd-bare){display:inline-flex;align-items:center}:host(.sd-bare){position:relative}.sd-inline-view{cursor:pointer;display:inline-flex;align-items:center;width:100%;padding:1px 6px;border-radius:4px;background-color:#0000000a;transition:background-color .15s ease}.sd-inline-view:hover{background-color:#00000014}.sd-inline-view .sd-inline-clear{display:none;align-items:center;margin-left:4px;padding:0;border:0;background:transparent;cursor:pointer;line-height:0;color:var(--sd-text-secondary, #6b7280);transition:color .15s ease}.sd-inline-view .sd-inline-clear mat-icon{font-size:16px;width:16px;height:16px}.sd-inline-view .sd-inline-clear:hover{color:var(--sd-error, #b32626)}.sd-inline-view:hover .sd-inline-clear{display:inline-flex}.sd-inline-editor{position:absolute;inset:0;opacity:0;pointer-events:none}.sd-inline-editor ::ng-deep *{pointer-events:none!important}:host(.sd-bare) ::ng-deep .mat-mdc-form-field{width:auto}:host(.sd-bare) ::ng-deep .mat-mdc-text-field-wrapper{padding:0;background:transparent}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-flex{padding:0;align-items:center}:host(.sd-bare) ::ng-deep .mdc-notched-outline{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}:host(.sd-bare) ::ng-deep .mat-mdc-select-arrow-wrapper{display:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i6.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText"] }, { kind: "component", type: SdView, selector: "sd-view", inputs: ["label", "value", "display", "hyperlink", "labelTemplate", "valueTemplate", "selectedItems"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
693
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdSelect, isStandalone: true, selector: "sd-select", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, helperText: { classPropertyName: "helperText", publicName: "helperText", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: true, transformFunction: null }, displayField: { classPropertyName: "displayField", publicName: "displayField", isSignal: true, isRequired: true, transformFunction: null }, disabledField: { classPropertyName: "disabledField", publicName: "disabledField", isSignal: true, isRequired: false, transformFunction: null }, cacheChecksum: { classPropertyName: "cacheChecksum", publicName: "cacheChecksum", isSignal: true, isRequired: false, transformFunction: null }, limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: false, transformFunction: null }, hyperlink: { classPropertyName: "hyperlink", publicName: "hyperlink", isSignal: true, isRequired: false, transformFunction: null }, minWidthPanel: { classPropertyName: "minWidthPanel", publicName: "minWidthPanel", isSignal: true, isRequired: false, transformFunction: null }, hideInlineError: { classPropertyName: "hideInlineError", publicName: "hideInlineError", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, viewed: { classPropertyName: "viewed", publicName: "viewed", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, validator: { classPropertyName: "validator", publicName: "validator", isSignal: true, isRequired: false, transformFunction: null }, inlineError: { classPropertyName: "inlineError", publicName: "inlineError", isSignal: true, isRequired: false, transformFunction: null }, appearanceInput: { classPropertyName: "appearanceInput", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, valueModel: { classPropertyName: "valueModel", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueModel: "modelChange", sdChange: "sdChange", sdSelection: "sdSelection" }, host: { properties: { "class.sd-bare": "isInline()", "class.sd-viewed": "isViewed() || isInline()", "class.sd-has-label": "!!label()" } }, queries: [{ propertyName: "sdLabelTemplate", first: true, predicate: ["sdLabel"], descendants: true, isSignal: true }, { propertyName: "sdValueTemplate", first: true, predicate: ["sdValue"], descendants: true, isSignal: true }, { propertyName: "sdSelectedTemplate", first: true, predicate: ["sdSelected"], descendants: true, isSignal: true }, { propertyName: "itemDef", first: true, predicate: SdItemDefDefDirective, descendants: true, isSignal: true }, { propertyName: "sdViewDef", first: true, predicate: SdViewDefDirective, descendants: true, isSignal: true }, { propertyName: "footerActions", predicate: SdSelectFooterActionDirective, isSignal: true }], viewQueries: [{ propertyName: "matInputRef", first: true, predicate: MatInput, descendants: true, isSignal: true }, { propertyName: "selectRef", first: true, predicate: ["select"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _label = label();\n@let _appearance = appearance();\n@let _hideInlineError = hideInlineError();\n@let _errorMessage = errorMessage();\n@let _helperText = helperText();\n@let _multiple = multiple();\n@let _required = required();\n@let _normalizedValue = $any(normalizedValue());\n@let _focused = $any(focused());\n@let _isInline = isInline();\n@let _bare = _isInline;\n@let _hasValue = _multiple ? !!_normalizedValue?.length : _normalizedValue !== undefined && _normalizedValue !== null;\n@let _display = display();\n@let _size = size();\n@let _floatLabel = floatLabel();\n@let _valueField = valueField();\n@let _displayField = displayField();\n\n@if (isViewed()) {\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"sdLabelTemplate()\"\n [value]=\"_normalizedValue\"\n [display]=\"_display\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"viewTemplate()\"\n [selectedItems]=\"selectedItems()\">\n </sd-view>\n} @else {\n @if (_isInline) {\n <!-- why: inline \u2014 sd-view text l\u00E0 \"m\u1EB7t\" + trigger; editor v\u1EABn render b\u00EAn d\u01B0\u1EDBi (chrome \u1EA9n qua\n .sd-inline-editor) \u0111\u1EC3 m\u1EDF panel. Text gi\u1EEF nguy\u00EAn, ch\u1EC9 \u0111\u1ED5i khi commit gi\u00E1 tr\u1ECB m\u1EDBi. -->\n <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"sdLabelTemplate()\"\n [value]=\"_normalizedValue\"\n [display]=\"_display\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"viewTemplate()\"\n [selectedItems]=\"selectedItems()\">\n </sd-view>\n\n <!-- why: clear-\u00D7 ch\u1EC9 hi\u1EC7n khi hover (CSS), \u0111\u1EB7t CU\u1ED0I face + clear($event) stopPropagation \u2192\n xo\u00E1 gi\u00E1 tr\u1ECB m\u00E0 KH\u00D4NG m\u1EDF panel; tr\u00E1nh bug c\u0169 (\u00D7 s\u00E1t trigger b\u1ECB b\u1EA5m nh\u1EA7m l\u00FAc \u0111\u00F3ng panel). -->\n @if (clearable() && _hasValue && !_required && !formControl.disabled) {\n <button type=\"button\" class=\"sd-inline-clear\" (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n }\n </span>\n }\n\n @if (!_appearance) {\n <ng-content select=\"[sdLabel]\">\n @if (_label) {\n <sd-label [label]=\"_label\" [required]=\"_required\"></sd-label>\n }\n </ng-content>\n }\n\n <div\n class=\"d-flex align-items-center\"\n [class.sd-inline-editor]=\"_isInline\"\n [class.c-focused]=\"_focused\"\n [class.c-disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n (mouseenter)=\"updatePanelWidth()\"\n (focusin)=\"updatePanelWidth()\"\n aria-hidden=\"true\">\n @if (_multiple) {\n <mat-form-field\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [appearance]=\"_appearance!\"\n [floatLabel]=\"_floatLabel\">\n @if (_appearance && _label) {\n <mat-label class=\"sd-form-field-label\">\n <span>{{ _label }}</span>\n @if (_helperText) {\n <sd-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\" name=\"info\"></sd-icon>\n }\n </mat-label>\n }\n\n <mat-select\n #select\n multiple\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder() || _label || ''\"\n (selectionChange)=\"onSelectionChange($event)\"\n disableOptionCentering=\"true\"\n [panelWidth]=\"calculatedPanelWidth()\"\n [panelClass]=\"['sd-select-panel', 'sd-multiple']\"\n [class.sd-selected]=\"!_required && _normalizedValue?.length\"\n [required]=\"_required\"\n (openedChange)=\"onOpenedChange($event)\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-invalid]=\"dataInvalid()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-loading]=\"dataLoading()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n matTooltipClass=\"sd-multiline-tooltip\"\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\n [matTooltip]=\"tooltip() || ''\">\n <mat-select-trigger>\n @if (sdSelectedTemplate(); as _selTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n _selTpl;\n context: { $implicit: selectedItems(), item: selectedItems(), items: selectedItems(), display: _display, multiple: true }\n \">\n </ng-container>\n } @else {\n <div class=\"sd-trigger-text\" [matTooltip]=\"_display || ''\" matTooltipPosition=\"above\">\n {{ _display }}\n </div>\n }\n </mat-select-trigger>\n\n @if (filtered()) {\n <div class=\"c-filter-input-container\">\n <div class=\"filter-input-wrapper\">\n <sd-icon name=\"search\"></sd-icon>\n <input\n [formControl]=\"inputControl\"\n aria-hidden=\"true\"\n matInput\n autocomplete=\"off\"\n class=\"c-search-input\"\n (keydown)=\"$event.stopPropagation()\" />\n </div>\n </div>\n }\n\n @let _filteredItems = filteredItems();\n @if (_filteredItems) {\n @if (!_filteredItems.length && !loading()) {\n <mat-option class=\"sd-empty\" disabled>\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\n </mat-option>\n } @else {\n @let iDefTpl = itemDef()?.templateRef;\n @if (_valueField && _displayField) {\n @for (item of _filteredItems; track itemValue(item)) {\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ itemDisplay(item) }}\n }\n </div>\n </mat-option>\n }\n } @else if (!_valueField && !_displayField) {\n @for (item of _filteredItems; track item) {\n <mat-option [value]=\"item\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ item }}\n }\n </div>\n </mat-option>\n }\n }\n }\n }\n\n @if (loading()) {\n <mat-option disabled class=\"sd-loading-option\">\n <mat-spinner diameter=\"24\"></mat-spinner>\n </mat-option>\n }\n\n @let _visibleFooterActions = visibleFooterActions();\n @if (_visibleFooterActions.length) {\n <div class=\"sd-select-footer-actions\">\n @for (action of _visibleFooterActions; track action) {\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\n }\n </div>\n }\n </mat-select>\n\n @if (_hideInlineError && _errorMessage && formControl.touched) {\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\n }\n\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\n <mat-error>{{ _errorMessage }}</mat-error>\n }\n\n @if (_normalizedValue?.length && !_required && !formControl.disabled && !_bare) {\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n } @else {\n <sd-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix name=\"keyboard_arrow_down\"></sd-icon>\n }\n </mat-form-field>\n } @else {\n <mat-form-field\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [appearance]=\"_appearance!\"\n [floatLabel]=\"_floatLabel\">\n @if (_appearance && _label) {\n <mat-label class=\"sd-form-field-label\">\n <span>{{ _label }}</span>\n @if (_helperText) {\n <sd-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\" name=\"info\"></sd-icon>\n }\n </mat-label>\n }\n\n <mat-select\n #select\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder() || _label || ''\"\n (selectionChange)=\"onSelectionChange($event)\"\n disableOptionCentering=\"true\"\n [panelWidth]=\"calculatedPanelWidth()\"\n [panelClass]=\"'sd-select-panel'\"\n [class.sd-selected]=\"!_required && _normalizedValue !== undefined && _normalizedValue !== null\"\n [required]=\"_required\"\n (openedChange)=\"onOpenedChange($event)\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-invalid]=\"dataInvalid()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-loading]=\"dataLoading()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n matTooltipClass=\"sd-multiline-tooltip\"\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\n [matTooltip]=\"tooltip() || ''\">\n <mat-select-trigger>\n @if (sdSelectedTemplate(); as _selTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n _selTpl;\n context: {\n $implicit: selectedItems()[0],\n item: selectedItems()[0],\n items: selectedItems(),\n display: _display,\n multiple: false,\n }\n \">\n </ng-container>\n } @else {\n {{ _display }}\n }\n </mat-select-trigger>\n\n @if (filtered()) {\n <div class=\"c-filter-input-container\">\n <div class=\"filter-input-wrapper\">\n <sd-icon name=\"search\"></sd-icon>\n <input\n [formControl]=\"inputControl\"\n aria-hidden=\"true\"\n matInput\n autocomplete=\"off\"\n class=\"c-search-input\"\n (keydown)=\"$event.stopPropagation()\" />\n </div>\n </div>\n }\n\n @let _filteredItems = filteredItems();\n @if (_filteredItems) {\n @if (!_filteredItems.length && !loading()) {\n <mat-option class=\"sd-empty\" disabled>\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\n </mat-option>\n } @else {\n @let iDefTpl = itemDef()?.templateRef;\n\n @if (_valueField && _displayField) {\n @for (item of _filteredItems; track itemValue(item)) {\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ itemDisplay(item) }}\n }\n </div>\n </mat-option>\n }\n } @else if (!_valueField && !_displayField) {\n @for (item of _filteredItems; track item) {\n <mat-option [value]=\"item\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ item }}\n }\n </div>\n </mat-option>\n }\n }\n }\n }\n\n @if (loading()) {\n <mat-option disabled class=\"sd-loading-option\">\n <mat-spinner diameter=\"24\"></mat-spinner>\n </mat-option>\n }\n\n @let _visibleFooterActions = visibleFooterActions();\n @if (_visibleFooterActions.length) {\n <div class=\"sd-select-footer-actions\">\n @for (action of _visibleFooterActions; track action) {\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\n }\n </div>\n }\n </mat-select>\n\n @if (_hideInlineError && _errorMessage && formControl.touched) {\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\n }\n\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\n <mat-error>{{ _errorMessage }}</mat-error>\n }\n\n @if (_normalizedValue !== undefined && _normalizedValue !== null && !_required && !formControl.disabled && !_bare) {\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n } @else {\n <sd-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix name=\"keyboard_arrow_down\"></sd-icon>\n }\n </mat-form-field>\n }\n </div>\n}\n", styles: ["@charset \"UTF-8\";.text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}:host{display:block;max-width:100%}:host(.sd-has-label){padding-top:4px}:host(.sd-viewed){padding-top:0}::ng-deep .sd-loading-option{min-height:50px!important}::ng-deep .sd-loading-option .mat-pseudo-checkbox{display:none!important}::ng-deep .sd-loading-option .mdc-list-item__primary-text{width:100%;display:flex;justify-content:center;align-items:center}.sd-trigger-text{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .mat-mdc-select-value{max-width:100%;overflow:hidden;width:0;min-width:100%}:host ::ng-deep .sd-selected .mat-mdc-select-arrow{display:none}:host ::ng-deep .mat-mdc-select-arrow{display:none!important}:host ::ng-deep .custom-arrow{pointer-events:none;position:absolute;right:1rem;top:50%;transform:translateY(-50%);display:flex;align-items:center}:host ::ng-deep .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-mdc-text-field-wrapper{background:var(--sd-disabled-bg)}:host ::ng-deep .mat-mdc-form-field mat-select.mat-mdc-select-disabled .mat-mdc-select-value{color:var(--sd-disabled-text)!important}:host ::ng-deep .mat-mdc-form-field .mat-mdc-placeholder-required{color:var(--sd-error)}::ng-deep .sd-select-panel .mat-mdc-option.sd-empty .mat-pseudo-checkbox{display:none}::ng-deep .sd-select-panel .mat-mdc-option{min-height:36px!important;padding:8px 12px!important}::ng-deep .sd-select-panel .c-filter-input-container{position:sticky;top:0;background-color:#fff;box-shadow:0 1px #f2f2f2;padding:8px;margin-bottom:8px;z-index:1000}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper{display:flex;align-items:center;padding:4px 8px;border:1px solid var(--sd-border);border-radius:4px;background-color:#fff}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper sd-icon{color:#dadada}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper .c-search-input{background-color:#fff;border:none;outline:none;flex:1;padding:4px}::ng-deep .sd-select-panel .sd-select-footer-actions{position:sticky;bottom:0;z-index:1000;display:flex;flex-direction:column;gap:4px;border-top:1px solid #f2f2f2;background-color:#fff}::ng-deep .sd-multiline-tooltip{white-space:pre-line}::ng-deep .mat-mdc-select-panel.sd-select-panel{padding:0}::ng-deep .mat-mdc-select-panel.sd-select-panel .mat-mdc-option.mdc-list-item--disabled.sd-empty .mdc-list-item__primary-text{opacity:.8;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px}::ng-deep .sd-select-panel .mat-pseudo-checkbox-minimal{transform:scale(.7);transform-origin:center right}::ng-deep .sd-select-panel.sd-multiple .mat-pseudo-checkbox{transform:scale(.75);margin-right:8px!important}::ng-deep .sd-select-panel.sd-multiple .mdc-list-item__primary-text{font-size:14px;white-space:normal}::ng-deep .mat-mdc-select-panel.sd-select-panel{max-width:90vw!important}::ng-deep .mat-mdc-select-panel.sd-select-panel .mat-mdc-option .mdc-list-item__primary-text{white-space:normal;word-break:break-word;line-height:1.4}:host(.sd-bare){display:inline-flex;align-items:center}:host(.sd-bare){position:relative}.sd-inline-view{cursor:pointer;display:inline-flex;align-items:center;width:100%;padding:1px 6px;border-radius:4px;background-color:#0000000a;transition:background-color .15s ease}.sd-inline-view:hover{background-color:#00000014}.sd-inline-view .sd-inline-clear{display:none;align-items:center;margin-left:4px;padding:0;border:0;background:transparent;cursor:pointer;line-height:0;color:var(--sd-text-secondary, #6b7280);transition:color .15s ease}.sd-inline-view .sd-inline-clear sd-icon{font-size:16px;width:16px;height:16px}.sd-inline-view .sd-inline-clear:hover{color:var(--sd-error, #b32626)}.sd-inline-view:hover .sd-inline-clear{display:inline-flex}.sd-inline-editor{position:absolute;inset:0;opacity:0;pointer-events:none}.sd-inline-editor ::ng-deep *{pointer-events:none!important}:host(.sd-bare) ::ng-deep .mat-mdc-form-field{width:auto}:host(.sd-bare) ::ng-deep .mat-mdc-text-field-wrapper{padding:0;background:transparent}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-flex{padding:0;align-items:center}:host(.sd-bare) ::ng-deep .mdc-notched-outline{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}:host(.sd-bare) ::ng-deep .mat-mdc-select-arrow-wrapper{display:none}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i5.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i6.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText"] }, { kind: "component", type: SdView, selector: "sd-view", inputs: ["label", "value", "display", "hyperlink", "labelTemplate", "valueTemplate", "selectedItems"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
695
694
|
}
|
|
696
695
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdSelect, decorators: [{
|
|
697
696
|
type: Component,
|
|
698
|
-
args: [{ selector: 'sd-select', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, host: { '[class.sd-bare]': 'isInline()', '[class.sd-viewed]': 'isViewed() || isInline()', '[class.sd-has-label]': '!!label()' }, imports: [
|
|
697
|
+
args: [{ selector: 'sd-select', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, host: { '[class.sd-bare]': 'isInline()', '[class.sd-viewed]': 'isViewed() || isInline()', '[class.sd-has-label]': '!!label()' }, imports: [SdIcon,
|
|
699
698
|
CommonModule,
|
|
700
699
|
FormsModule,
|
|
701
700
|
ReactiveFormsModule,
|
|
702
701
|
MatInputModule,
|
|
703
702
|
MatTooltipModule,
|
|
704
703
|
MatFormFieldModule,
|
|
705
|
-
MatIconModule,
|
|
706
704
|
MatSelectModule,
|
|
707
705
|
MatCheckboxModule,
|
|
708
706
|
MatProgressSpinnerModule,
|
|
709
707
|
SdLabel,
|
|
710
708
|
SdView,
|
|
711
709
|
SdSelectFooterActionDirective,
|
|
712
|
-
], template: "@let _label = label();\n@let _appearance = appearance();\n@let _hideInlineError = hideInlineError();\n@let _errorMessage = errorMessage();\n@let _helperText = helperText();\n@let _multiple = multiple();\n@let _required = required();\n@let _normalizedValue = $any(normalizedValue());\n@let _focused = $any(focused());\n@let _isInline = isInline();\n@let _bare = _isInline;\n@let _hasValue = _multiple ? !!_normalizedValue?.length : _normalizedValue !== undefined && _normalizedValue !== null;\n@let _display = display();\n@let _size = size();\n@let _floatLabel = floatLabel();\n@let _valueField = valueField();\n@let _displayField = displayField();\n\n@if (isViewed()) {\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"sdLabelTemplate()\"\n [value]=\"_normalizedValue\"\n [display]=\"_display\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"viewTemplate()\"\n [selectedItems]=\"selectedItems()\">\n </sd-view>\n} @else {\n @if (_isInline) {\n <!-- why: inline \u2014 sd-view text l\u00E0 \"m\u1EB7t\" + trigger; editor v\u1EABn render b\u00EAn d\u01B0\u1EDBi (chrome \u1EA9n qua\n .sd-inline-editor) \u0111\u1EC3 m\u1EDF panel. Text gi\u1EEF nguy\u00EAn, ch\u1EC9 \u0111\u1ED5i khi commit gi\u00E1 tr\u1ECB m\u1EDBi. -->\n <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"sdLabelTemplate()\"\n [value]=\"_normalizedValue\"\n [display]=\"_display\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"viewTemplate()\"\n [selectedItems]=\"selectedItems()\">\n </sd-view>\n\n <!-- why: clear-\u00D7 ch\u1EC9 hi\u1EC7n khi hover (CSS), \u0111\u1EB7t CU\u1ED0I face + clear($event) stopPropagation \u2192\n xo\u00E1 gi\u00E1 tr\u1ECB m\u00E0 KH\u00D4NG m\u1EDF panel; tr\u00E1nh bug c\u0169 (\u00D7 s\u00E1t trigger b\u1ECB b\u1EA5m nh\u1EA7m l\u00FAc \u0111\u00F3ng panel). -->\n @if (clearable() && _hasValue && !_required && !formControl.disabled) {\n <button type=\"button\" class=\"sd-inline-clear\" (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </span>\n }\n\n @if (!_appearance) {\n <ng-content select=\"[sdLabel]\">\n @if (_label) {\n <sd-label [label]=\"_label\" [required]=\"_required\"></sd-label>\n }\n </ng-content>\n }\n\n <div\n class=\"d-flex align-items-center\"\n [class.sd-inline-editor]=\"_isInline\"\n [class.c-focused]=\"_focused\"\n [class.c-disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n (mouseenter)=\"updatePanelWidth()\"\n (focusin)=\"updatePanelWidth()\"\n aria-hidden=\"true\">\n @if (_multiple) {\n <mat-form-field\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [appearance]=\"_appearance!\"\n [floatLabel]=\"_floatLabel\">\n @if (_appearance && _label) {\n <mat-label style=\"display: inline-block\">\n <div style=\"display: flex; align-items: center; gap: 4px\">\n <span>{{ _label }}</span>\n @if (_helperText) {\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\n }\n </div>\n </mat-label>\n }\n\n <mat-select\n #select\n multiple\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder() || _label || ''\"\n (selectionChange)=\"onSelectionChange($event)\"\n disableOptionCentering=\"true\"\n [panelWidth]=\"calculatedPanelWidth()\"\n [panelClass]=\"['sd-select-panel', 'sd-multiple']\"\n [class.sd-selected]=\"!_required && _normalizedValue?.length\"\n [required]=\"_required\"\n (openedChange)=\"onOpenedChange($event)\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-invalid]=\"dataInvalid()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-loading]=\"dataLoading()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n matTooltipClass=\"sd-multiline-tooltip\"\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\n [matTooltip]=\"tooltip() || ''\">\n <mat-select-trigger>\n @if (sdSelectedTemplate(); as _selTpl) {\n <ng-container\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems(), item: selectedItems(), items: selectedItems(), display: _display, multiple: true }\">\n </ng-container>\n } @else {\n <div class=\"sd-trigger-text\" [matTooltip]=\"_display || ''\" matTooltipPosition=\"above\">\n {{ _display }}\n </div>\n }\n </mat-select-trigger>\n\n @if (filtered()) {\n <div class=\"c-filter-input-container\">\n <div class=\"filter-input-wrapper\">\n <mat-icon>search</mat-icon>\n <input\n [formControl]=\"inputControl\"\n aria-hidden=\"true\"\n matInput\n autocomplete=\"off\"\n class=\"c-search-input\"\n (keydown)=\"$event.stopPropagation()\" />\n </div>\n </div>\n }\n\n @let _filteredItems = filteredItems();\n @if (_filteredItems) {\n @if (!_filteredItems.length && !loading()) {\n <mat-option class=\"sd-empty\" disabled>\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\n </mat-option>\n } @else {\n @let iDefTpl = itemDef()?.templateRef;\n @if (_valueField && _displayField) {\n @for (item of _filteredItems; track itemValue(item)) {\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ itemDisplay(item) }}\n }\n </div>\n </mat-option>\n }\n } @else if (!_valueField && !_displayField) {\n @for (item of _filteredItems; track item) {\n <mat-option [value]=\"item\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ item }}\n }\n </div>\n </mat-option>\n }\n }\n }\n }\n\n @if (loading()) {\n <mat-option disabled class=\"sd-loading-option\">\n <mat-spinner diameter=\"24\"></mat-spinner>\n </mat-option>\n }\n\n @let _visibleFooterActions = visibleFooterActions();\n @if (_visibleFooterActions.length) {\n <div class=\"sd-select-footer-actions\">\n @for (action of _visibleFooterActions; track action) {\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\n }\n </div>\n }\n </mat-select>\n\n @if (_hideInlineError && _errorMessage && formControl.touched) {\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\n }\n\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\n <mat-error>{{ _errorMessage }}</mat-error>\n }\n\n @if (_normalizedValue?.length && !_required && !formControl.disabled && !_bare) {\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <mat-icon>close</mat-icon>\n </button>\n } @else {\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\n }\n </mat-form-field>\n } @else {\n <mat-form-field\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [appearance]=\"_appearance!\"\n [floatLabel]=\"_floatLabel\">\n @if (_appearance && _label) {\n <mat-label style=\"display: inline-block\">\n <div style=\"display: flex; align-items: center; gap: 4px\">\n <span>{{ _label }}</span>\n @if (_helperText) {\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\n }\n </div>\n </mat-label>\n }\n\n <mat-select\n #select\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder() || _label || ''\"\n (selectionChange)=\"onSelectionChange($event)\"\n disableOptionCentering=\"true\"\n [panelWidth]=\"calculatedPanelWidth()\"\n [panelClass]=\"'sd-select-panel'\"\n [class.sd-selected]=\"!_required && _normalizedValue !== undefined && _normalizedValue !== null\"\n [required]=\"_required\"\n (openedChange)=\"onOpenedChange($event)\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-invalid]=\"dataInvalid()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-loading]=\"dataLoading()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n matTooltipClass=\"sd-multiline-tooltip\"\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\n [matTooltip]=\"tooltip() || ''\">\n <mat-select-trigger>\n @if (sdSelectedTemplate(); as _selTpl) {\n <ng-container\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems()[0], item: selectedItems()[0], items: selectedItems(), display: _display, multiple: false }\">\n </ng-container>\n } @else {\n {{ _display }}\n }\n </mat-select-trigger>\n\n @if (filtered()) {\n <div class=\"c-filter-input-container\">\n <div class=\"filter-input-wrapper\">\n <mat-icon>search</mat-icon>\n <input\n [formControl]=\"inputControl\"\n aria-hidden=\"true\"\n matInput\n autocomplete=\"off\"\n class=\"c-search-input\"\n (keydown)=\"$event.stopPropagation()\" />\n </div>\n </div>\n }\n\n @let _filteredItems = filteredItems();\n @if (_filteredItems) {\n @if (!_filteredItems.length && !loading()) {\n <mat-option class=\"sd-empty\" disabled>\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\n </mat-option>\n } @else {\n @let iDefTpl = itemDef()?.templateRef;\n\n @if (_valueField && _displayField) {\n @for (item of _filteredItems; track itemValue(item)) {\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ itemDisplay(item) }}\n }\n </div>\n </mat-option>\n }\n } @else if (!_valueField && !_displayField) {\n @for (item of _filteredItems; track item) {\n <mat-option [value]=\"item\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ item }}\n }\n </div>\n </mat-option>\n }\n }\n }\n }\n\n @if (loading()) {\n <mat-option disabled class=\"sd-loading-option\">\n <mat-spinner diameter=\"24\"></mat-spinner>\n </mat-option>\n }\n\n @let _visibleFooterActions = visibleFooterActions();\n @if (_visibleFooterActions.length) {\n <div class=\"sd-select-footer-actions\">\n @for (action of _visibleFooterActions; track action) {\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\n }\n </div>\n }\n </mat-select>\n\n @if (_hideInlineError && _errorMessage && formControl.touched) {\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\n }\n\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\n <mat-error>{{ _errorMessage }}</mat-error>\n }\n\n @if (_normalizedValue !== undefined && _normalizedValue !== null && !_required && !formControl.disabled && !_bare) {\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <mat-icon>close</mat-icon>\n </button>\n } @else {\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\n }\n </mat-form-field>\n }\n </div>\n}\n", styles: ["@charset \"UTF-8\";.text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{display:block;max-width:100%}:host(.sd-has-label){padding-top:4px}:host(.sd-viewed){padding-top:0}::ng-deep .sd-loading-option{min-height:50px!important}::ng-deep .sd-loading-option .mat-pseudo-checkbox{display:none!important}::ng-deep .sd-loading-option .mdc-list-item__primary-text{width:100%;display:flex;justify-content:center;align-items:center}.sd-trigger-text{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .mat-mdc-select-value{max-width:100%;overflow:hidden;width:0;min-width:100%}:host ::ng-deep .sd-selected .mat-mdc-select-arrow{display:none}:host ::ng-deep .mat-mdc-select-arrow{display:none!important}:host ::ng-deep .custom-arrow{pointer-events:none;position:absolute;right:1rem;top:50%;transform:translateY(-50%);display:flex;align-items:center}:host ::ng-deep .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-mdc-text-field-wrapper{background:var(--sd-black100)}:host ::ng-deep .mat-mdc-form-field mat-select.mat-mdc-select-disabled .mat-mdc-select-value{color:var(--sd-black400)!important}:host ::ng-deep .mat-mdc-form-field .mat-mdc-placeholder-required{color:var(--sd-error)}::ng-deep .sd-select-panel .mat-mdc-option.sd-empty .mat-pseudo-checkbox{display:none}::ng-deep .sd-select-panel .mat-mdc-option{min-height:36px!important;padding:8px 12px!important}::ng-deep .sd-select-panel .c-filter-input-container{position:sticky;top:0;background-color:#fff;box-shadow:0 1px #f2f2f2;padding:8px;margin-bottom:8px;z-index:1000}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper{display:flex;align-items:center;padding:4px 8px;border:1px solid var(--sd-black200);border-radius:4px;background-color:#fff}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper .mat-icon{color:#dadada}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper .c-search-input{background-color:#fff;border:none;outline:none;flex:1;padding:4px}::ng-deep .sd-select-panel .sd-select-footer-actions{position:sticky;bottom:0;z-index:1000;display:flex;flex-direction:column;gap:4px;border-top:1px solid #f2f2f2;background-color:#fff}::ng-deep .sd-multiline-tooltip{white-space:pre-line}::ng-deep .mat-mdc-select-panel.sd-select-panel{padding:0}::ng-deep .mat-mdc-select-panel.sd-select-panel .mat-mdc-option.mdc-list-item--disabled.sd-empty .mdc-list-item__primary-text{opacity:.8;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px}::ng-deep .sd-select-panel .mat-pseudo-checkbox-minimal{transform:scale(.7);transform-origin:center right}::ng-deep .sd-select-panel.sd-multiple .mat-pseudo-checkbox{transform:scale(.75);margin-right:8px!important}::ng-deep .sd-select-panel.sd-multiple .mdc-list-item__primary-text{font-size:14px;white-space:normal}::ng-deep .mat-mdc-select-panel.sd-select-panel{max-width:90vw!important}::ng-deep .mat-mdc-select-panel.sd-select-panel .mat-mdc-option .mdc-list-item__primary-text{white-space:normal;word-break:break-word;line-height:1.4}:host(.sd-bare){display:inline-flex;align-items:center}:host(.sd-bare){position:relative}.sd-inline-view{cursor:pointer;display:inline-flex;align-items:center;width:100%;padding:1px 6px;border-radius:4px;background-color:#0000000a;transition:background-color .15s ease}.sd-inline-view:hover{background-color:#00000014}.sd-inline-view .sd-inline-clear{display:none;align-items:center;margin-left:4px;padding:0;border:0;background:transparent;cursor:pointer;line-height:0;color:var(--sd-text-secondary, #6b7280);transition:color .15s ease}.sd-inline-view .sd-inline-clear mat-icon{font-size:16px;width:16px;height:16px}.sd-inline-view .sd-inline-clear:hover{color:var(--sd-error, #b32626)}.sd-inline-view:hover .sd-inline-clear{display:inline-flex}.sd-inline-editor{position:absolute;inset:0;opacity:0;pointer-events:none}.sd-inline-editor ::ng-deep *{pointer-events:none!important}:host(.sd-bare) ::ng-deep .mat-mdc-form-field{width:auto}:host(.sd-bare) ::ng-deep .mat-mdc-text-field-wrapper{padding:0;background:transparent}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-flex{padding:0;align-items:center}:host(.sd-bare) ::ng-deep .mdc-notched-outline{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}:host(.sd-bare) ::ng-deep .mat-mdc-select-arrow-wrapper{display:none}\n"] }]
|
|
710
|
+
], template: "@let _label = label();\n@let _appearance = appearance();\n@let _hideInlineError = hideInlineError();\n@let _errorMessage = errorMessage();\n@let _helperText = helperText();\n@let _multiple = multiple();\n@let _required = required();\n@let _normalizedValue = $any(normalizedValue());\n@let _focused = $any(focused());\n@let _isInline = isInline();\n@let _bare = _isInline;\n@let _hasValue = _multiple ? !!_normalizedValue?.length : _normalizedValue !== undefined && _normalizedValue !== null;\n@let _display = display();\n@let _size = size();\n@let _floatLabel = floatLabel();\n@let _valueField = valueField();\n@let _displayField = displayField();\n\n@if (isViewed()) {\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"sdLabelTemplate()\"\n [value]=\"_normalizedValue\"\n [display]=\"_display\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"viewTemplate()\"\n [selectedItems]=\"selectedItems()\">\n </sd-view>\n} @else {\n @if (_isInline) {\n <!-- why: inline \u2014 sd-view text l\u00E0 \"m\u1EB7t\" + trigger; editor v\u1EABn render b\u00EAn d\u01B0\u1EDBi (chrome \u1EA9n qua\n .sd-inline-editor) \u0111\u1EC3 m\u1EDF panel. Text gi\u1EEF nguy\u00EAn, ch\u1EC9 \u0111\u1ED5i khi commit gi\u00E1 tr\u1ECB m\u1EDBi. -->\n <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\n <sd-view\n [label]=\"_label\"\n [labelTemplate]=\"sdLabelTemplate()\"\n [value]=\"_normalizedValue\"\n [display]=\"_display\"\n [hyperlink]=\"hyperlink()\"\n [valueTemplate]=\"viewTemplate()\"\n [selectedItems]=\"selectedItems()\">\n </sd-view>\n\n <!-- why: clear-\u00D7 ch\u1EC9 hi\u1EC7n khi hover (CSS), \u0111\u1EB7t CU\u1ED0I face + clear($event) stopPropagation \u2192\n xo\u00E1 gi\u00E1 tr\u1ECB m\u00E0 KH\u00D4NG m\u1EDF panel; tr\u00E1nh bug c\u0169 (\u00D7 s\u00E1t trigger b\u1ECB b\u1EA5m nh\u1EA7m l\u00FAc \u0111\u00F3ng panel). -->\n @if (clearable() && _hasValue && !_required && !formControl.disabled) {\n <button type=\"button\" class=\"sd-inline-clear\" (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n }\n </span>\n }\n\n @if (!_appearance) {\n <ng-content select=\"[sdLabel]\">\n @if (_label) {\n <sd-label [label]=\"_label\" [required]=\"_required\"></sd-label>\n }\n </ng-content>\n }\n\n <div\n class=\"d-flex align-items-center\"\n [class.sd-inline-editor]=\"_isInline\"\n [class.c-focused]=\"_focused\"\n [class.c-disabled]=\"formControl.disabled\"\n (click)=\"onClick()\"\n (mouseenter)=\"updatePanelWidth()\"\n (focusin)=\"updatePanelWidth()\"\n aria-hidden=\"true\">\n @if (_multiple) {\n <mat-form-field\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [appearance]=\"_appearance!\"\n [floatLabel]=\"_floatLabel\">\n @if (_appearance && _label) {\n <mat-label class=\"sd-form-field-label\">\n <span>{{ _label }}</span>\n @if (_helperText) {\n <sd-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\" name=\"info\"></sd-icon>\n }\n </mat-label>\n }\n\n <mat-select\n #select\n multiple\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder() || _label || ''\"\n (selectionChange)=\"onSelectionChange($event)\"\n disableOptionCentering=\"true\"\n [panelWidth]=\"calculatedPanelWidth()\"\n [panelClass]=\"['sd-select-panel', 'sd-multiple']\"\n [class.sd-selected]=\"!_required && _normalizedValue?.length\"\n [required]=\"_required\"\n (openedChange)=\"onOpenedChange($event)\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-invalid]=\"dataInvalid()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-loading]=\"dataLoading()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n matTooltipClass=\"sd-multiline-tooltip\"\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\n [matTooltip]=\"tooltip() || ''\">\n <mat-select-trigger>\n @if (sdSelectedTemplate(); as _selTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n _selTpl;\n context: { $implicit: selectedItems(), item: selectedItems(), items: selectedItems(), display: _display, multiple: true }\n \">\n </ng-container>\n } @else {\n <div class=\"sd-trigger-text\" [matTooltip]=\"_display || ''\" matTooltipPosition=\"above\">\n {{ _display }}\n </div>\n }\n </mat-select-trigger>\n\n @if (filtered()) {\n <div class=\"c-filter-input-container\">\n <div class=\"filter-input-wrapper\">\n <sd-icon name=\"search\"></sd-icon>\n <input\n [formControl]=\"inputControl\"\n aria-hidden=\"true\"\n matInput\n autocomplete=\"off\"\n class=\"c-search-input\"\n (keydown)=\"$event.stopPropagation()\" />\n </div>\n </div>\n }\n\n @let _filteredItems = filteredItems();\n @if (_filteredItems) {\n @if (!_filteredItems.length && !loading()) {\n <mat-option class=\"sd-empty\" disabled>\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\n </mat-option>\n } @else {\n @let iDefTpl = itemDef()?.templateRef;\n @if (_valueField && _displayField) {\n @for (item of _filteredItems; track itemValue(item)) {\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ itemDisplay(item) }}\n }\n </div>\n </mat-option>\n }\n } @else if (!_valueField && !_displayField) {\n @for (item of _filteredItems; track item) {\n <mat-option [value]=\"item\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ item }}\n }\n </div>\n </mat-option>\n }\n }\n }\n }\n\n @if (loading()) {\n <mat-option disabled class=\"sd-loading-option\">\n <mat-spinner diameter=\"24\"></mat-spinner>\n </mat-option>\n }\n\n @let _visibleFooterActions = visibleFooterActions();\n @if (_visibleFooterActions.length) {\n <div class=\"sd-select-footer-actions\">\n @for (action of _visibleFooterActions; track action) {\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\n }\n </div>\n }\n </mat-select>\n\n @if (_hideInlineError && _errorMessage && formControl.touched) {\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\n }\n\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\n <mat-error>{{ _errorMessage }}</mat-error>\n }\n\n @if (_normalizedValue?.length && !_required && !formControl.disabled && !_bare) {\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n } @else {\n <sd-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix name=\"keyboard_arrow_down\"></sd-icon>\n }\n </mat-form-field>\n } @else {\n <mat-form-field\n [class.sd-md]=\"_size === 'md'\"\n [class.sd-sm]=\"_size === 'sm'\"\n [class.hide-inline-error]=\"_hideInlineError\"\n [appearance]=\"_appearance!\"\n [floatLabel]=\"_floatLabel\">\n @if (_appearance && _label) {\n <mat-label class=\"sd-form-field-label\">\n <span>{{ _label }}</span>\n @if (_helperText) {\n <sd-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\" name=\"info\"></sd-icon>\n }\n </mat-label>\n }\n\n <mat-select\n #select\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder() || _label || ''\"\n (selectionChange)=\"onSelectionChange($event)\"\n disableOptionCentering=\"true\"\n [panelWidth]=\"calculatedPanelWidth()\"\n [panelClass]=\"'sd-select-panel'\"\n [class.sd-selected]=\"!_required && _normalizedValue !== undefined && _normalizedValue !== null\"\n [required]=\"_required\"\n (openedChange)=\"onOpenedChange($event)\"\n [attr.data-autoId]=\"autoId()\"\n [attr.data-disabled]=\"dataDisabled()\"\n [attr.data-invalid]=\"dataInvalid()\"\n [attr.data-empty]=\"dataEmpty()\"\n [attr.data-value]=\"dataValue()\"\n [attr.data-loading]=\"dataLoading()\"\n [attr.data-required]=\"dataRequired()\"\n [attr.data-error-message]=\"dataErrorMessage()\"\n matTooltipClass=\"sd-multiline-tooltip\"\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\n [matTooltip]=\"tooltip() || ''\">\n <mat-select-trigger>\n @if (sdSelectedTemplate(); as _selTpl) {\n <ng-container\n *ngTemplateOutlet=\"\n _selTpl;\n context: {\n $implicit: selectedItems()[0],\n item: selectedItems()[0],\n items: selectedItems(),\n display: _display,\n multiple: false,\n }\n \">\n </ng-container>\n } @else {\n {{ _display }}\n }\n </mat-select-trigger>\n\n @if (filtered()) {\n <div class=\"c-filter-input-container\">\n <div class=\"filter-input-wrapper\">\n <sd-icon name=\"search\"></sd-icon>\n <input\n [formControl]=\"inputControl\"\n aria-hidden=\"true\"\n matInput\n autocomplete=\"off\"\n class=\"c-search-input\"\n (keydown)=\"$event.stopPropagation()\" />\n </div>\n </div>\n }\n\n @let _filteredItems = filteredItems();\n @if (_filteredItems) {\n @if (!_filteredItems.length && !loading()) {\n <mat-option class=\"sd-empty\" disabled>\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\n </mat-option>\n } @else {\n @let iDefTpl = itemDef()?.templateRef;\n\n @if (_valueField && _displayField) {\n @for (item of _filteredItems; track itemValue(item)) {\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ itemDisplay(item) }}\n }\n </div>\n </mat-option>\n }\n } @else if (!_valueField && !_displayField) {\n @for (item of _filteredItems; track item) {\n <mat-option [value]=\"item\">\n <div>\n @if (iDefTpl) {\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\n } @else {\n {{ item }}\n }\n </div>\n </mat-option>\n }\n }\n }\n }\n\n @if (loading()) {\n <mat-option disabled class=\"sd-loading-option\">\n <mat-spinner diameter=\"24\"></mat-spinner>\n </mat-option>\n }\n\n @let _visibleFooterActions = visibleFooterActions();\n @if (_visibleFooterActions.length) {\n <div class=\"sd-select-footer-actions\">\n @for (action of _visibleFooterActions; track action) {\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\n }\n </div>\n }\n </mat-select>\n\n @if (_hideInlineError && _errorMessage && formControl.touched) {\n <sd-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\" name=\"error\"></sd-icon>\n }\n\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\n <mat-error>{{ _errorMessage }}</mat-error>\n }\n\n @if (_normalizedValue !== undefined && _normalizedValue !== null && !_required && !formControl.disabled && !_bare) {\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n } @else {\n <sd-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix name=\"keyboard_arrow_down\"></sd-icon>\n }\n </mat-form-field>\n }\n </div>\n}\n", styles: ["@charset \"UTF-8\";.text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-primary-contrast{color:var(--sd-primary-contrast)!important}.bg-primary-contrast{background:var(--sd-primary-contrast)!important}.border-primary-contrast{border-color:var(--sd-primary-contrast)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-secondary-contrast{color:var(--sd-secondary-contrast)!important}.bg-secondary-contrast{background:var(--sd-secondary-contrast)!important}.border-secondary-contrast{border-color:var(--sd-secondary-contrast)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-info-contrast{color:var(--sd-info-contrast)!important}.bg-info-contrast{background:var(--sd-info-contrast)!important}.border-info-contrast{border-color:var(--sd-info-contrast)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-success-contrast{color:var(--sd-success-contrast)!important}.bg-success-contrast{background:var(--sd-success-contrast)!important}.border-success-contrast{border-color:var(--sd-success-contrast)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-warning-contrast{color:var(--sd-warning-contrast)!important}.bg-warning-contrast{background:var(--sd-warning-contrast)!important}.border-warning-contrast{border-color:var(--sd-warning-contrast)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-error-contrast{color:var(--sd-error-contrast)!important}.bg-error-contrast{background:var(--sd-error-contrast)!important}.border-error-contrast{border-color:var(--sd-error-contrast)!important}.text-surface{color:var(--sd-surface)!important}.bg-surface{background:var(--sd-surface)!important}.border-surface{border-color:var(--sd-surface)!important}.text-surface-muted{color:var(--sd-surface-muted)!important}.bg-surface-muted{background:var(--sd-surface-muted)!important}.border-surface-muted{border-color:var(--sd-surface-muted)!important}.text-text{color:var(--sd-text)!important}.bg-text{background:var(--sd-text)!important}.border-text{border-color:var(--sd-text)!important}.text-text-secondary{color:var(--sd-text-secondary)!important}.bg-text-secondary{background:var(--sd-text-secondary)!important}.border-text-secondary{border-color:var(--sd-text-secondary)!important}.text-text-muted{color:var(--sd-text-muted)!important}.bg-text-muted{background:var(--sd-text-muted)!important}.border-text-muted{border-color:var(--sd-text-muted)!important}.text-border{color:var(--sd-border)!important}.bg-border{background:var(--sd-border)!important}.border-border{border-color:var(--sd-border)!important}.text-border-strong{color:var(--sd-border-strong)!important}.bg-border-strong{background:var(--sd-border-strong)!important}.border-border-strong{border-color:var(--sd-border-strong)!important}.text-disabled-bg{color:var(--sd-disabled-bg)!important}.bg-disabled-bg{background:var(--sd-disabled-bg)!important}.border-disabled-bg{border-color:var(--sd-disabled-bg)!important}.text-disabled-text{color:var(--sd-disabled-text)!important}.bg-disabled-text{background:var(--sd-disabled-text)!important}.border-disabled-text{border-color:var(--sd-disabled-text)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}.text-secondary{color:var(--sd-text-secondary)!important}.text-muted{color:var(--sd-text-muted)!important}.text-body{color:var(--sd-text)!important}.bg-muted{background:var(--sd-surface-muted)!important}:host{display:block;max-width:100%}:host(.sd-has-label){padding-top:4px}:host(.sd-viewed){padding-top:0}::ng-deep .sd-loading-option{min-height:50px!important}::ng-deep .sd-loading-option .mat-pseudo-checkbox{display:none!important}::ng-deep .sd-loading-option .mdc-list-item__primary-text{width:100%;display:flex;justify-content:center;align-items:center}.sd-trigger-text{display:block;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .mat-mdc-select-value{max-width:100%;overflow:hidden;width:0;min-width:100%}:host ::ng-deep .sd-selected .mat-mdc-select-arrow{display:none}:host ::ng-deep .mat-mdc-select-arrow{display:none!important}:host ::ng-deep .custom-arrow{pointer-events:none;position:absolute;right:1rem;top:50%;transform:translateY(-50%);display:flex;align-items:center}:host ::ng-deep .mat-mdc-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-mdc-text-field-wrapper{background:var(--sd-disabled-bg)}:host ::ng-deep .mat-mdc-form-field mat-select.mat-mdc-select-disabled .mat-mdc-select-value{color:var(--sd-disabled-text)!important}:host ::ng-deep .mat-mdc-form-field .mat-mdc-placeholder-required{color:var(--sd-error)}::ng-deep .sd-select-panel .mat-mdc-option.sd-empty .mat-pseudo-checkbox{display:none}::ng-deep .sd-select-panel .mat-mdc-option{min-height:36px!important;padding:8px 12px!important}::ng-deep .sd-select-panel .c-filter-input-container{position:sticky;top:0;background-color:#fff;box-shadow:0 1px #f2f2f2;padding:8px;margin-bottom:8px;z-index:1000}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper{display:flex;align-items:center;padding:4px 8px;border:1px solid var(--sd-border);border-radius:4px;background-color:#fff}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper sd-icon{color:#dadada}::ng-deep .sd-select-panel .c-filter-input-container .filter-input-wrapper .c-search-input{background-color:#fff;border:none;outline:none;flex:1;padding:4px}::ng-deep .sd-select-panel .sd-select-footer-actions{position:sticky;bottom:0;z-index:1000;display:flex;flex-direction:column;gap:4px;border-top:1px solid #f2f2f2;background-color:#fff}::ng-deep .sd-multiline-tooltip{white-space:pre-line}::ng-deep .mat-mdc-select-panel.sd-select-panel{padding:0}::ng-deep .mat-mdc-select-panel.sd-select-panel .mat-mdc-option.mdc-list-item--disabled.sd-empty .mdc-list-item__primary-text{opacity:.8;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px}::ng-deep .sd-select-panel .mat-pseudo-checkbox-minimal{transform:scale(.7);transform-origin:center right}::ng-deep .sd-select-panel.sd-multiple .mat-pseudo-checkbox{transform:scale(.75);margin-right:8px!important}::ng-deep .sd-select-panel.sd-multiple .mdc-list-item__primary-text{font-size:14px;white-space:normal}::ng-deep .mat-mdc-select-panel.sd-select-panel{max-width:90vw!important}::ng-deep .mat-mdc-select-panel.sd-select-panel .mat-mdc-option .mdc-list-item__primary-text{white-space:normal;word-break:break-word;line-height:1.4}:host(.sd-bare){display:inline-flex;align-items:center}:host(.sd-bare){position:relative}.sd-inline-view{cursor:pointer;display:inline-flex;align-items:center;width:100%;padding:1px 6px;border-radius:4px;background-color:#0000000a;transition:background-color .15s ease}.sd-inline-view:hover{background-color:#00000014}.sd-inline-view .sd-inline-clear{display:none;align-items:center;margin-left:4px;padding:0;border:0;background:transparent;cursor:pointer;line-height:0;color:var(--sd-text-secondary, #6b7280);transition:color .15s ease}.sd-inline-view .sd-inline-clear sd-icon{font-size:16px;width:16px;height:16px}.sd-inline-view .sd-inline-clear:hover{color:var(--sd-error, #b32626)}.sd-inline-view:hover .sd-inline-clear{display:inline-flex}.sd-inline-editor{position:absolute;inset:0;opacity:0;pointer-events:none}.sd-inline-editor ::ng-deep *{pointer-events:none!important}:host(.sd-bare) ::ng-deep .mat-mdc-form-field{width:auto}:host(.sd-bare) ::ng-deep .mat-mdc-text-field-wrapper{padding:0;background:transparent}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-flex{padding:0;align-items:center}:host(.sd-bare) ::ng-deep .mdc-notched-outline{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host(.sd-bare) ::ng-deep .mat-mdc-form-field-infix{padding:0;min-height:0;width:auto;border:0;display:inline-flex;align-items:center}:host(.sd-bare) ::ng-deep .mat-mdc-select-arrow-wrapper{display:none}\n"] }]
|
|
713
711
|
}], ctorParameters: () => [], propDecorators: { matInputRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatInput), { isSignal: true }] }], selectRef: [{ type: i0.ViewChild, args: ['select', { isSignal: true }] }], sdLabelTemplate: [{ type: i0.ContentChild, args: ['sdLabel', { isSignal: true }] }], sdValueTemplate: [{ type: i0.ContentChild, args: ['sdValue', { isSignal: true }] }], sdSelectedTemplate: [{ type: i0.ContentChild, args: ['sdSelected', { isSignal: true }] }], itemDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdItemDefDefDirective), { isSignal: true }] }], sdViewDef: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdViewDefDirective), { isSignal: true }] }], footerActions: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SdSelectFooterActionDirective), { isSignal: true }] }], autoIdInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], helperText: [{ type: i0.Input, args: [{ isSignal: true, alias: "helperText", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: true }] }], displayField: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayField", required: true }] }], disabledField: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledField", required: false }] }], cacheChecksum: [{ type: i0.Input, args: [{ isSignal: true, alias: "cacheChecksum", required: false }] }], limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: false }] }], hyperlink: [{ type: i0.Input, args: [{ isSignal: true, alias: "hyperlink", required: false }] }], minWidthPanel: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidthPanel", required: false }] }], hideInlineError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideInlineError", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], viewed: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewed", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], validator: [{ type: i0.Input, args: [{ isSignal: true, alias: "validator", required: false }] }], inlineError: [{ type: i0.Input, args: [{ isSignal: true, alias: "inlineError", required: false }] }], appearanceInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], valueModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }], sdChange: [{ type: i0.Output, args: ["sdChange"] }], sdSelection: [{ type: i0.Output, args: ["sdSelection"] }] } });
|
|
714
712
|
|
|
715
713
|
/**
|