@sd-angular/core 19.0.9 → 19.0.11
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 +21 -21
- package/assets/STYLE-GUIDE.md +19 -19
- package/assets/fonts/fonts.scss +115 -115
- package/assets/scss/core/scrollbar.scss +30 -30
- package/assets/scss/core/utilities/_grid.scss +25 -19
- package/components/form-generic/src/components/form-builder/components/attribute-table/attribute-table.component.d.ts +2 -4
- package/components/form-generic/src/components/form-builder/components/attribute-template/attribute-template.component.d.ts +2 -4
- package/components/form-generic/src/components/form-builder/components/configure-validation/configure-validation.component.d.ts +5 -6
- package/components/form-generic/src/components/form-builder/components/expression-builder/expression-builder.component.d.ts +1 -1
- package/components/form-generic/src/components/form-builder/components/table/control/table-control.component.d.ts +1 -1
- package/components/form-generic/src/components/form-render/form-render.component.d.ts +4 -6
- package/components/form-generic/src/components/sd-feel-expression/sd-feel-expression.component.d.ts +1 -1
- package/components/form-generic/src/services/form-generic.service.d.ts +1 -3
- package/components/modal/src/modal.component.d.ts +1 -1
- package/components/tab-router/src/models/tab-router.model.d.ts +2 -1
- package/components/tab-router/src/services/tab-router.service.d.ts +0 -1
- package/components/table/src/components/command/desktop-command.component.d.ts +7 -7
- package/components/table/src/components/command/pipes/command.pipe.d.ts +1 -12
- package/components/table/src/components/command/pipes/filter.pipe.d.ts +1 -8
- package/components/table/src/components/filter/column-filter/column-filter.component.d.ts +2 -1
- package/components/table/src/models/table-column.model.d.ts +3 -2
- package/components/table/src/pipes/selection-disabled.pipe.d.ts +1 -1
- package/components/table/src/services/config.service.d.ts +4 -5
- package/fesm2022/sd-angular-core-components-anchor.mjs +14 -14
- package/fesm2022/sd-angular-core-components-anchor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-autoid-inspector.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-avatar.mjs +2 -2
- package/fesm2022/sd-angular-core-components-avatar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-chart.mjs +40 -40
- package/fesm2022/sd-angular-core-components-chart.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-ckeditor-styles.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-code-editor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-document-builder.mjs +0 -1
- package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-editor.mjs +2 -2
- package/fesm2022/sd-angular-core-components-editor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-form-generic.mjs +39 -68
- package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-inform.mjs +2 -2
- package/fesm2022/sd-angular-core-components-inform.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-mini-editor.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-modal.mjs +2 -2
- package/fesm2022/sd-angular-core-components-modal.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-operator.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-org-chart.mjs +2 -2
- package/fesm2022/sd-angular-core-components-org-chart.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-preview.mjs +4 -4
- package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-query-bar.mjs +10 -10
- package/fesm2022/sd-angular-core-components-query-bar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-query-builder.mjs +2 -2
- package/fesm2022/sd-angular-core-components-query-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-quick-action.mjs +2 -2
- package/fesm2022/sd-angular-core-components-quick-action.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-section.mjs +2 -2
- package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-side-drawer.mjs +2 -2
- package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-splitter.mjs +6 -6
- package/fesm2022/sd-angular-core-components-splitter.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-stepper.mjs +2 -2
- package/fesm2022/sd-angular-core-components-stepper.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab-router.mjs +31 -26
- package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab.mjs +2 -2
- package/fesm2022/sd-angular-core-components-tab.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs +53 -64
- package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tree.mjs +2 -2
- package/fesm2022/sd-angular-core-components-tree.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-view.mjs.map +1 -1
- package/fesm2022/sd-angular-core-directives.mjs +0 -1
- package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date-range.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-datetime.mjs +4 -4
- package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-inline-text.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-color.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-number.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-label.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-label.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-models.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-select.mjs +47 -14
- package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
- package/fesm2022/sd-angular-core-i18n.mjs.map +1 -1
- package/fesm2022/sd-angular-core-interceptors.mjs +0 -2
- package/fesm2022/sd-angular-core-interceptors.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-auth.mjs +14 -38
- package/fesm2022/sd-angular-core-modules-auth.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-authom.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-keycloak.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-layout.mjs +7 -14
- package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
- package/fesm2022/sd-angular-core-modules-permission.mjs +5 -12
- package/fesm2022/sd-angular-core-modules-permission.mjs.map +1 -1
- package/fesm2022/sd-angular-core-pipes.mjs +4 -12
- package/fesm2022/sd-angular-core-pipes.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-api.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-confirm.mjs +16 -21
- package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-docx.mjs +1 -8
- package/fesm2022/sd-angular-core-services-docx.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-excel.mjs +26 -19
- package/fesm2022/sd-angular-core-services-excel.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-license.mjs +5 -12
- package/fesm2022/sd-angular-core-services-license.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-notify.mjs +70 -87
- package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-storage.mjs +4 -12
- package/fesm2022/sd-angular-core-services-storage.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-extensions.mjs +43 -1
- package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
- package/fesm2022/sd-angular-core-utilities-models.mjs.map +1 -1
- package/fesm2022/sd-angular-core.mjs.map +1 -1
- package/forms/select/src/select-footer-action.directive.d.ts +5 -1
- package/forms/select/src/select.component.d.ts +4 -0
- package/modules/auth/guards/auth.guard.d.ts +2 -4
- package/modules/auth/guards/portal.guard.d.ts +2 -4
- package/modules/auth/services/auth.service.d.ts +3 -4
- package/modules/keycloak/htmls/auth-keycloak-error.html +54 -54
- package/modules/keycloak/htmls/silent-renew.html +7 -7
- package/modules/layout/modules/home/guards/home-redirect.guard.d.ts +3 -5
- package/modules/permission/src/guards/permission.guard.d.ts +2 -5
- package/package.json +80 -80
- package/pipes/src/format-number.pipe.d.ts +1 -3
- package/sd-angular-core-19.0.11.tgz +0 -0
- package/services/confirm/src/lib/components/dialog-confirm/dialog-confirm.component.d.ts +3 -3
- package/services/excel/src/lib/excel.service.d.ts +0 -1
- package/services/excel/src/lib/spreadsheet-formula-injection.util.d.ts +5 -0
- package/services/license/src/license.service.d.ts +2 -3
- package/services/notify/src/components/toast/toast.component.d.ts +9 -13
- package/services/notify/src/notify.service.d.ts +4 -5
- package/services/storage/src/storage.service.d.ts +3 -4
- package/utilities/extensions/index.d.ts +1 -0
- package/utilities/extensions/src/object.extension.d.ts +8 -0
- package/sd-angular-core-19.0.9.tgz +0 -0
|
@@ -202,7 +202,12 @@ class SdSelect {
|
|
|
202
202
|
display = signal('');
|
|
203
203
|
calculatedPanelWidth = signal('auto');
|
|
204
204
|
searchText = signal('');
|
|
205
|
-
footerActionContext = computed(() => ({
|
|
205
|
+
footerActionContext = computed(() => ({
|
|
206
|
+
searchText: this.searchText(),
|
|
207
|
+
filteredItems: this.filteredItems(),
|
|
208
|
+
selectedItems: this.selectedItems(),
|
|
209
|
+
}));
|
|
210
|
+
#footerFnVisibility = signal(new WeakMap());
|
|
206
211
|
visibleFooterActions = computed(() => this.footerActions().filter(action => this.shouldRenderFooterAction(action)));
|
|
207
212
|
normalizedValue = computed(() => {
|
|
208
213
|
const val = this.valueModel();
|
|
@@ -243,10 +248,14 @@ class SdSelect {
|
|
|
243
248
|
};
|
|
244
249
|
shouldRenderFooterAction(action) {
|
|
245
250
|
const when = action.when();
|
|
251
|
+
if (typeof when === 'function') {
|
|
252
|
+
return this.#footerFnVisibility().get(action) ?? false;
|
|
253
|
+
}
|
|
246
254
|
if (when === 'always')
|
|
247
255
|
return true;
|
|
248
|
-
if (when === 'empty')
|
|
249
|
-
return this.searchText().length > 0 && this.filteredItems().length === 0;
|
|
256
|
+
if (when === 'empty') {
|
|
257
|
+
return this.searchText().trim().length > 0 && this.filteredItems().length === 0;
|
|
258
|
+
}
|
|
250
259
|
if (when === 'has-result')
|
|
251
260
|
return this.filteredItems().length > 0;
|
|
252
261
|
return false;
|
|
@@ -345,6 +354,28 @@ class SdSelect {
|
|
|
345
354
|
});
|
|
346
355
|
}
|
|
347
356
|
});
|
|
357
|
+
effect(() => {
|
|
358
|
+
const actions = this.footerActions();
|
|
359
|
+
const context = this.footerActionContext();
|
|
360
|
+
const fnActions = [];
|
|
361
|
+
for (const action of actions) {
|
|
362
|
+
const when = action.when();
|
|
363
|
+
if (typeof when === 'function')
|
|
364
|
+
fnActions.push({ action, fn: when });
|
|
365
|
+
}
|
|
366
|
+
if (!fnActions.length)
|
|
367
|
+
return;
|
|
368
|
+
// why: Promise.all chạy ngoài reactive context — không tạo circular dependency
|
|
369
|
+
Promise.all(fnActions.map(async ({ action, fn }) => ({
|
|
370
|
+
action,
|
|
371
|
+
result: await Promise.resolve(fn(context)),
|
|
372
|
+
}))).then(results => {
|
|
373
|
+
const map = new WeakMap();
|
|
374
|
+
results.forEach(({ action, result }) => map.set(action, result));
|
|
375
|
+
this.#footerFnVisibility.set(map);
|
|
376
|
+
this.#ref.markForCheck();
|
|
377
|
+
});
|
|
378
|
+
});
|
|
348
379
|
}
|
|
349
380
|
ngOnInit() {
|
|
350
381
|
this.formControl.valueChanges.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(val => {
|
|
@@ -551,7 +582,7 @@ class SdSelect {
|
|
|
551
582
|
this.#onChange(value || []);
|
|
552
583
|
}
|
|
553
584
|
else {
|
|
554
|
-
this.
|
|
585
|
+
this.clearSearch();
|
|
555
586
|
this.formControl.setValue(value, { emitEvent: false });
|
|
556
587
|
this.#onChange(value);
|
|
557
588
|
}
|
|
@@ -594,6 +625,14 @@ class SdSelect {
|
|
|
594
625
|
this.selectRef()?.open();
|
|
595
626
|
}, 100);
|
|
596
627
|
};
|
|
628
|
+
/** Clears the panel search/filter input and resets `searchText`. */
|
|
629
|
+
clearSearch = () => {
|
|
630
|
+
const input = this.matInputRef();
|
|
631
|
+
if (input) {
|
|
632
|
+
input.value = '';
|
|
633
|
+
}
|
|
634
|
+
this.inputControl.setValue('');
|
|
635
|
+
};
|
|
597
636
|
/** Open the select panel programmatically (anchors to the mat-select trigger). */
|
|
598
637
|
open = () => {
|
|
599
638
|
if (this.formControl.disabled)
|
|
@@ -611,15 +650,9 @@ class SdSelect {
|
|
|
611
650
|
onOpenedChange = (isOpened) => {
|
|
612
651
|
if (isOpened) {
|
|
613
652
|
this.focused.set(true);
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
if (input) {
|
|
617
|
-
input.value = '';
|
|
618
|
-
input.focus();
|
|
619
|
-
}
|
|
620
|
-
}, 100);
|
|
653
|
+
this.clearSearch();
|
|
654
|
+
setTimeout(() => this.matInputRef()?.focus(), 100);
|
|
621
655
|
this.#hashedValue = Utilities.hash({ value: this.formControl.value });
|
|
622
|
-
this.inputControl.setValue('');
|
|
623
656
|
}
|
|
624
657
|
else {
|
|
625
658
|
this.focused.set(false);
|
|
@@ -647,7 +680,7 @@ class SdSelect {
|
|
|
647
680
|
}
|
|
648
681
|
};
|
|
649
682
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
650
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", 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();\r\n@let _appearance = appearance();\r\n@let _hideInlineError = hideInlineError();\r\n@let _errorMessage = errorMessage();\r\n@let _helperText = helperText();\r\n@let _multiple = multiple();\r\n@let _required = required();\r\n@let _normalizedValue = $any(normalizedValue());\r\n@let _focused = $any(focused());\r\n@let _isInline = isInline();\r\n@let _bare = _isInline;\r\n@let _hasValue = _multiple ? !!_normalizedValue?.length : _normalizedValue !== undefined && _normalizedValue !== null;\r\n@let _display = display();\r\n@let _size = size();\r\n@let _floatLabel = floatLabel();\r\n@let _valueField = valueField();\r\n@let _displayField = displayField();\r\n\r\n@if (isViewed()) {\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"sdLabelTemplate()\"\r\n [value]=\"_normalizedValue\"\r\n [display]=\"_display\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"viewTemplate()\"\r\n [selectedItems]=\"selectedItems()\">\r\n </sd-view>\r\n} @else {\r\n @if (_isInline) {\r\n <!-- why: inline \u2014 sd-view text l\u00E0 \"m\u1EB7t\" + trigger; editor v\u1EABn render b\u00EAn d\u01B0\u1EDBi (chrome \u1EA9n qua\r\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. -->\r\n <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"sdLabelTemplate()\"\r\n [value]=\"_normalizedValue\"\r\n [display]=\"_display\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"viewTemplate()\"\r\n [selectedItems]=\"selectedItems()\">\r\n </sd-view>\r\n\r\n <!-- why: clear-\u00D7 ch\u1EC9 hi\u1EC7n khi hover (CSS), \u0111\u1EB7t CU\u1ED0I face + clear($event) stopPropagation \u2192\r\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). -->\r\n @if (clearable() && _hasValue && !_required && !formControl.disabled) {\r\n <button type=\"button\" class=\"sd-inline-clear\" (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </span>\r\n }\r\n\r\n @if (!_appearance) {\r\n <ng-content select=\"[sdLabel]\">\r\n @if (_label) {\r\n <sd-label [label]=\"_label\" [required]=\"_required\"></sd-label>\r\n }\r\n </ng-content>\r\n }\r\n\r\n <div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-inline-editor]=\"_isInline\"\r\n [class.c-focused]=\"_focused\"\r\n [class.c-disabled]=\"formControl.disabled\"\r\n (click)=\"onClick()\"\r\n (mouseenter)=\"updatePanelWidth()\"\r\n (focusin)=\"updatePanelWidth()\"\r\n aria-hidden=\"true\">\r\n @if (_multiple) {\r\n <mat-form-field\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [appearance]=\"_appearance!\"\r\n [floatLabel]=\"_floatLabel\">\r\n @if (_appearance && _label) {\r\n <mat-label style=\"display: inline-block\">\r\n <div style=\"display: flex; align-items: center; gap: 4px\">\r\n <span>{{ _label }}</span>\r\n @if (_helperText) {\r\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\r\n }\r\n </div>\r\n </mat-label>\r\n }\r\n\r\n <mat-select\r\n #select\r\n multiple\r\n [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder() || _label || ''\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n disableOptionCentering=\"true\"\r\n [panelWidth]=\"calculatedPanelWidth()\"\r\n [panelClass]=\"['sd-select-panel', 'sd-multiple']\"\r\n [class.sd-selected]=\"!_required && _normalizedValue?.length\"\r\n [required]=\"_required\"\r\n (openedChange)=\"onOpenedChange($event)\"\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-invalid]=\"dataInvalid()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-loading]=\"dataLoading()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n matTooltipClass=\"sd-multiline-tooltip\"\r\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\r\n [matTooltip]=\"tooltip() || ''\">\r\n <mat-select-trigger>\r\n @if (sdSelectedTemplate(); as _selTpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems(), item: selectedItems(), items: selectedItems(), display: _display, multiple: true }\">\r\n </ng-container>\r\n } @else {\r\n <div class=\"sd-trigger-text\" [matTooltip]=\"_display || ''\" matTooltipPosition=\"above\">\r\n {{ _display }}\r\n </div>\r\n }\r\n </mat-select-trigger>\r\n\r\n @if (filtered()) {\r\n <div class=\"c-filter-input-container\">\r\n <div class=\"filter-input-wrapper\">\r\n <mat-icon>search</mat-icon>\r\n <input\r\n [formControl]=\"inputControl\"\r\n aria-hidden=\"true\"\r\n matInput\r\n autocomplete=\"off\"\r\n class=\"c-search-input\"\r\n (keydown)=\"$event.stopPropagation()\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n @let _filteredItems = filteredItems();\r\n @if (_filteredItems) {\r\n @if (!_filteredItems.length && !loading()) {\r\n <mat-option class=\"sd-empty\" disabled>\r\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\r\n </mat-option>\r\n } @else {\r\n @let iDefTpl = itemDef()?.templateRef;\r\n @if (_valueField && _displayField) {\r\n @for (item of _filteredItems; track itemValue(item)) {\r\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ itemDisplay(item) }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n } @else if (!_valueField && !_displayField) {\r\n @for (item of _filteredItems; track item) {\r\n <mat-option [value]=\"item\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ item }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n }\r\n }\r\n }\r\n\r\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\r\n @if (_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\r\n }\r\n\r\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-error>{{ _errorMessage }}</mat-error>\r\n }\r\n\r\n @if (_normalizedValue?.length && !_required && !formControl.disabled && !_bare) {\r\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <mat-form-field\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [appearance]=\"_appearance!\"\r\n [floatLabel]=\"_floatLabel\">\r\n @if (_appearance && _label) {\r\n <mat-label style=\"display: inline-block\">\r\n <div style=\"display: flex; align-items: center; gap: 4px\">\r\n <span>{{ _label }}</span>\r\n @if (_helperText) {\r\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\r\n }\r\n </div>\r\n </mat-label>\r\n }\r\n\r\n <mat-select\r\n #select\r\n [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder() || _label || ''\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n disableOptionCentering=\"true\"\r\n [panelWidth]=\"calculatedPanelWidth()\"\r\n [panelClass]=\"'sd-select-panel'\"\r\n [class.sd-selected]=\"!_required && _normalizedValue !== undefined && _normalizedValue !== null\"\r\n [required]=\"_required\"\r\n (openedChange)=\"onOpenedChange($event)\"\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-invalid]=\"dataInvalid()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-loading]=\"dataLoading()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n matTooltipClass=\"sd-multiline-tooltip\"\r\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\r\n [matTooltip]=\"tooltip() || ''\">\r\n <mat-select-trigger>\r\n @if (sdSelectedTemplate(); as _selTpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems()[0], item: selectedItems()[0], items: selectedItems(), display: _display, multiple: false }\">\r\n </ng-container>\r\n } @else {\r\n {{ _display }}\r\n }\r\n </mat-select-trigger>\r\n\r\n @if (filtered()) {\r\n <div class=\"c-filter-input-container\">\r\n <div class=\"filter-input-wrapper\">\r\n <mat-icon>search</mat-icon>\r\n <input\r\n [formControl]=\"inputControl\"\r\n aria-hidden=\"true\"\r\n matInput\r\n autocomplete=\"off\"\r\n class=\"c-search-input\"\r\n (keydown)=\"$event.stopPropagation()\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n @let _filteredItems = filteredItems();\r\n @if (_filteredItems) {\r\n @if (!_filteredItems.length && !loading()) {\r\n <mat-option class=\"sd-empty\" disabled>\r\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\r\n </mat-option>\r\n } @else {\r\n @let iDefTpl = itemDef()?.templateRef;\r\n\r\n @if (_valueField && _displayField) {\r\n @for (item of _filteredItems; track itemValue(item)) {\r\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ itemDisplay(item) }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n } @else if (!_valueField && !_displayField) {\r\n @for (item of _filteredItems; track item) {\r\n <mat-option [value]=\"item\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ item }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n }\r\n }\r\n }\r\n\r\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\r\n @if (_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\r\n }\r\n\r\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-error>{{ _errorMessage }}</mat-error>\r\n }\r\n\r\n @if (_normalizedValue !== undefined && _normalizedValue !== null && !_required && !formControl.disabled && !_bare) {\r\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n}\r\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 });
|
|
683
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", 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();\r\n@let _appearance = appearance();\r\n@let _hideInlineError = hideInlineError();\r\n@let _errorMessage = errorMessage();\r\n@let _helperText = helperText();\r\n@let _multiple = multiple();\r\n@let _required = required();\r\n@let _normalizedValue = $any(normalizedValue());\r\n@let _focused = $any(focused());\r\n@let _isInline = isInline();\r\n@let _bare = _isInline;\r\n@let _hasValue = _multiple ? !!_normalizedValue?.length : _normalizedValue !== undefined && _normalizedValue !== null;\r\n@let _display = display();\r\n@let _size = size();\r\n@let _floatLabel = floatLabel();\r\n@let _valueField = valueField();\r\n@let _displayField = displayField();\r\n\r\n@if (isViewed()) {\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"sdLabelTemplate()\"\r\n [value]=\"_normalizedValue\"\r\n [display]=\"_display\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"viewTemplate()\"\r\n [selectedItems]=\"selectedItems()\">\r\n </sd-view>\r\n} @else {\r\n @if (_isInline) {\r\n <!-- why: inline \u2014 sd-view text l\u00E0 \"m\u1EB7t\" + trigger; editor v\u1EABn render b\u00EAn d\u01B0\u1EDBi (chrome \u1EA9n qua\r\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. -->\r\n <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"sdLabelTemplate()\"\r\n [value]=\"_normalizedValue\"\r\n [display]=\"_display\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"viewTemplate()\"\r\n [selectedItems]=\"selectedItems()\">\r\n </sd-view>\r\n\r\n <!-- why: clear-\u00D7 ch\u1EC9 hi\u1EC7n khi hover (CSS), \u0111\u1EB7t CU\u1ED0I face + clear($event) stopPropagation \u2192\r\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). -->\r\n @if (clearable() && _hasValue && !_required && !formControl.disabled) {\r\n <button type=\"button\" class=\"sd-inline-clear\" (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </span>\r\n }\r\n\r\n @if (!_appearance) {\r\n <ng-content select=\"[sdLabel]\">\r\n @if (_label) {\r\n <sd-label [label]=\"_label\" [required]=\"_required\"></sd-label>\r\n }\r\n </ng-content>\r\n }\r\n\r\n <div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-inline-editor]=\"_isInline\"\r\n [class.c-focused]=\"_focused\"\r\n [class.c-disabled]=\"formControl.disabled\"\r\n (click)=\"onClick()\"\r\n (mouseenter)=\"updatePanelWidth()\"\r\n (focusin)=\"updatePanelWidth()\"\r\n aria-hidden=\"true\">\r\n @if (_multiple) {\r\n <mat-form-field\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [appearance]=\"_appearance!\"\r\n [floatLabel]=\"_floatLabel\">\r\n @if (_appearance && _label) {\r\n <mat-label style=\"display: inline-block\">\r\n <div style=\"display: flex; align-items: center; gap: 4px\">\r\n <span>{{ _label }}</span>\r\n @if (_helperText) {\r\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\r\n }\r\n </div>\r\n </mat-label>\r\n }\r\n\r\n <mat-select\r\n #select\r\n multiple\r\n [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder() || _label || ''\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n disableOptionCentering=\"true\"\r\n [panelWidth]=\"calculatedPanelWidth()\"\r\n [panelClass]=\"['sd-select-panel', 'sd-multiple']\"\r\n [class.sd-selected]=\"!_required && _normalizedValue?.length\"\r\n [required]=\"_required\"\r\n (openedChange)=\"onOpenedChange($event)\"\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-invalid]=\"dataInvalid()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-loading]=\"dataLoading()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n matTooltipClass=\"sd-multiline-tooltip\"\r\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\r\n [matTooltip]=\"tooltip() || ''\">\r\n <mat-select-trigger>\r\n @if (sdSelectedTemplate(); as _selTpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems(), item: selectedItems(), items: selectedItems(), display: _display, multiple: true }\">\r\n </ng-container>\r\n } @else {\r\n <div class=\"sd-trigger-text\" [matTooltip]=\"_display || ''\" matTooltipPosition=\"above\">\r\n {{ _display }}\r\n </div>\r\n }\r\n </mat-select-trigger>\r\n\r\n @if (filtered()) {\r\n <div class=\"c-filter-input-container\">\r\n <div class=\"filter-input-wrapper\">\r\n <mat-icon>search</mat-icon>\r\n <input\r\n [formControl]=\"inputControl\"\r\n aria-hidden=\"true\"\r\n matInput\r\n autocomplete=\"off\"\r\n class=\"c-search-input\"\r\n (keydown)=\"$event.stopPropagation()\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n @let _filteredItems = filteredItems();\r\n @if (_filteredItems) {\r\n @if (!_filteredItems.length && !loading()) {\r\n <mat-option class=\"sd-empty\" disabled>\r\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\r\n </mat-option>\r\n } @else {\r\n @let iDefTpl = itemDef()?.templateRef;\r\n @if (_valueField && _displayField) {\r\n @for (item of _filteredItems; track itemValue(item)) {\r\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ itemDisplay(item) }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n } @else if (!_valueField && !_displayField) {\r\n @for (item of _filteredItems; track item) {\r\n <mat-option [value]=\"item\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ item }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n }\r\n }\r\n }\r\n\r\n @if (loading()) {\r\n <mat-option disabled class=\"sd-loading-option\">\r\n <mat-spinner diameter=\"24\"></mat-spinner>\r\n </mat-option>\r\n }\r\n\r\n @let _visibleFooterActions = visibleFooterActions();\r\n @if (_visibleFooterActions.length) {\r\n <div class=\"sd-select-footer-actions\">\r\n @for (action of _visibleFooterActions; track action) {\r\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\r\n }\r\n </div>\r\n }\r\n </mat-select>\r\n\r\n @if (_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\r\n }\r\n\r\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-error>{{ _errorMessage }}</mat-error>\r\n }\r\n\r\n @if (_normalizedValue?.length && !_required && !formControl.disabled && !_bare) {\r\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <mat-form-field\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [appearance]=\"_appearance!\"\r\n [floatLabel]=\"_floatLabel\">\r\n @if (_appearance && _label) {\r\n <mat-label style=\"display: inline-block\">\r\n <div style=\"display: flex; align-items: center; gap: 4px\">\r\n <span>{{ _label }}</span>\r\n @if (_helperText) {\r\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\r\n }\r\n </div>\r\n </mat-label>\r\n }\r\n\r\n <mat-select\r\n #select\r\n [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder() || _label || ''\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n disableOptionCentering=\"true\"\r\n [panelWidth]=\"calculatedPanelWidth()\"\r\n [panelClass]=\"'sd-select-panel'\"\r\n [class.sd-selected]=\"!_required && _normalizedValue !== undefined && _normalizedValue !== null\"\r\n [required]=\"_required\"\r\n (openedChange)=\"onOpenedChange($event)\"\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-invalid]=\"dataInvalid()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-loading]=\"dataLoading()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n matTooltipClass=\"sd-multiline-tooltip\"\r\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\r\n [matTooltip]=\"tooltip() || ''\">\r\n <mat-select-trigger>\r\n @if (sdSelectedTemplate(); as _selTpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems()[0], item: selectedItems()[0], items: selectedItems(), display: _display, multiple: false }\">\r\n </ng-container>\r\n } @else {\r\n {{ _display }}\r\n }\r\n </mat-select-trigger>\r\n\r\n @if (filtered()) {\r\n <div class=\"c-filter-input-container\">\r\n <div class=\"filter-input-wrapper\">\r\n <mat-icon>search</mat-icon>\r\n <input\r\n [formControl]=\"inputControl\"\r\n aria-hidden=\"true\"\r\n matInput\r\n autocomplete=\"off\"\r\n class=\"c-search-input\"\r\n (keydown)=\"$event.stopPropagation()\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n @let _filteredItems = filteredItems();\r\n @if (_filteredItems) {\r\n @if (!_filteredItems.length && !loading()) {\r\n <mat-option class=\"sd-empty\" disabled>\r\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\r\n </mat-option>\r\n } @else {\r\n @let iDefTpl = itemDef()?.templateRef;\r\n\r\n @if (_valueField && _displayField) {\r\n @for (item of _filteredItems; track itemValue(item)) {\r\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ itemDisplay(item) }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n } @else if (!_valueField && !_displayField) {\r\n @for (item of _filteredItems; track item) {\r\n <mat-option [value]=\"item\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ item }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n }\r\n }\r\n }\r\n\r\n @if (loading()) {\r\n <mat-option disabled class=\"sd-loading-option\">\r\n <mat-spinner diameter=\"24\"></mat-spinner>\r\n </mat-option>\r\n }\r\n\r\n @let _visibleFooterActions = visibleFooterActions();\r\n @if (_visibleFooterActions.length) {\r\n <div class=\"sd-select-footer-actions\">\r\n @for (action of _visibleFooterActions; track action) {\r\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\r\n }\r\n </div>\r\n }\r\n </mat-select>\r\n\r\n @if (_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\r\n }\r\n\r\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-error>{{ _errorMessage }}</mat-error>\r\n }\r\n\r\n @if (_normalizedValue !== undefined && _normalizedValue !== null && !_required && !formControl.disabled && !_bare) {\r\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n}\r\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 });
|
|
651
684
|
}
|
|
652
685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdSelect, decorators: [{
|
|
653
686
|
type: Component,
|
|
@@ -665,7 +698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
665
698
|
SdLabel,
|
|
666
699
|
SdView,
|
|
667
700
|
SdSelectFooterActionDirective,
|
|
668
|
-
], template: "@let _label = label();\r\n@let _appearance = appearance();\r\n@let _hideInlineError = hideInlineError();\r\n@let _errorMessage = errorMessage();\r\n@let _helperText = helperText();\r\n@let _multiple = multiple();\r\n@let _required = required();\r\n@let _normalizedValue = $any(normalizedValue());\r\n@let _focused = $any(focused());\r\n@let _isInline = isInline();\r\n@let _bare = _isInline;\r\n@let _hasValue = _multiple ? !!_normalizedValue?.length : _normalizedValue !== undefined && _normalizedValue !== null;\r\n@let _display = display();\r\n@let _size = size();\r\n@let _floatLabel = floatLabel();\r\n@let _valueField = valueField();\r\n@let _displayField = displayField();\r\n\r\n@if (isViewed()) {\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"sdLabelTemplate()\"\r\n [value]=\"_normalizedValue\"\r\n [display]=\"_display\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"viewTemplate()\"\r\n [selectedItems]=\"selectedItems()\">\r\n </sd-view>\r\n} @else {\r\n @if (_isInline) {\r\n <!-- why: inline \u2014 sd-view text l\u00E0 \"m\u1EB7t\" + trigger; editor v\u1EABn render b\u00EAn d\u01B0\u1EDBi (chrome \u1EA9n qua\r\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. -->\r\n <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"sdLabelTemplate()\"\r\n [value]=\"_normalizedValue\"\r\n [display]=\"_display\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"viewTemplate()\"\r\n [selectedItems]=\"selectedItems()\">\r\n </sd-view>\r\n\r\n <!-- why: clear-\u00D7 ch\u1EC9 hi\u1EC7n khi hover (CSS), \u0111\u1EB7t CU\u1ED0I face + clear($event) stopPropagation \u2192\r\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). -->\r\n @if (clearable() && _hasValue && !_required && !formControl.disabled) {\r\n <button type=\"button\" class=\"sd-inline-clear\" (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </span>\r\n }\r\n\r\n @if (!_appearance) {\r\n <ng-content select=\"[sdLabel]\">\r\n @if (_label) {\r\n <sd-label [label]=\"_label\" [required]=\"_required\"></sd-label>\r\n }\r\n </ng-content>\r\n }\r\n\r\n <div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-inline-editor]=\"_isInline\"\r\n [class.c-focused]=\"_focused\"\r\n [class.c-disabled]=\"formControl.disabled\"\r\n (click)=\"onClick()\"\r\n (mouseenter)=\"updatePanelWidth()\"\r\n (focusin)=\"updatePanelWidth()\"\r\n aria-hidden=\"true\">\r\n @if (_multiple) {\r\n <mat-form-field\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [appearance]=\"_appearance!\"\r\n [floatLabel]=\"_floatLabel\">\r\n @if (_appearance && _label) {\r\n <mat-label style=\"display: inline-block\">\r\n <div style=\"display: flex; align-items: center; gap: 4px\">\r\n <span>{{ _label }}</span>\r\n @if (_helperText) {\r\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\r\n }\r\n </div>\r\n </mat-label>\r\n }\r\n\r\n <mat-select\r\n #select\r\n multiple\r\n [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder() || _label || ''\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n disableOptionCentering=\"true\"\r\n [panelWidth]=\"calculatedPanelWidth()\"\r\n [panelClass]=\"['sd-select-panel', 'sd-multiple']\"\r\n [class.sd-selected]=\"!_required && _normalizedValue?.length\"\r\n [required]=\"_required\"\r\n (openedChange)=\"onOpenedChange($event)\"\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-invalid]=\"dataInvalid()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-loading]=\"dataLoading()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n matTooltipClass=\"sd-multiline-tooltip\"\r\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\r\n [matTooltip]=\"tooltip() || ''\">\r\n <mat-select-trigger>\r\n @if (sdSelectedTemplate(); as _selTpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems(), item: selectedItems(), items: selectedItems(), display: _display, multiple: true }\">\r\n </ng-container>\r\n } @else {\r\n <div class=\"sd-trigger-text\" [matTooltip]=\"_display || ''\" matTooltipPosition=\"above\">\r\n {{ _display }}\r\n </div>\r\n }\r\n </mat-select-trigger>\r\n\r\n @if (filtered()) {\r\n <div class=\"c-filter-input-container\">\r\n <div class=\"filter-input-wrapper\">\r\n <mat-icon>search</mat-icon>\r\n <input\r\n [formControl]=\"inputControl\"\r\n aria-hidden=\"true\"\r\n matInput\r\n autocomplete=\"off\"\r\n class=\"c-search-input\"\r\n (keydown)=\"$event.stopPropagation()\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n @let _filteredItems = filteredItems();\r\n @if (_filteredItems) {\r\n @if (!_filteredItems.length && !loading()) {\r\n <mat-option class=\"sd-empty\" disabled>\r\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\r\n </mat-option>\r\n } @else {\r\n @let iDefTpl = itemDef()?.templateRef;\r\n @if (_valueField && _displayField) {\r\n @for (item of _filteredItems; track itemValue(item)) {\r\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ itemDisplay(item) }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n } @else if (!_valueField && !_displayField) {\r\n @for (item of _filteredItems; track item) {\r\n <mat-option [value]=\"item\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ item }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n }\r\n }\r\n }\r\n\r\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\r\n @if (_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\r\n }\r\n\r\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-error>{{ _errorMessage }}</mat-error>\r\n }\r\n\r\n @if (_normalizedValue?.length && !_required && !formControl.disabled && !_bare) {\r\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <mat-form-field\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [appearance]=\"_appearance!\"\r\n [floatLabel]=\"_floatLabel\">\r\n @if (_appearance && _label) {\r\n <mat-label style=\"display: inline-block\">\r\n <div style=\"display: flex; align-items: center; gap: 4px\">\r\n <span>{{ _label }}</span>\r\n @if (_helperText) {\r\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\r\n }\r\n </div>\r\n </mat-label>\r\n }\r\n\r\n <mat-select\r\n #select\r\n [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder() || _label || ''\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n disableOptionCentering=\"true\"\r\n [panelWidth]=\"calculatedPanelWidth()\"\r\n [panelClass]=\"'sd-select-panel'\"\r\n [class.sd-selected]=\"!_required && _normalizedValue !== undefined && _normalizedValue !== null\"\r\n [required]=\"_required\"\r\n (openedChange)=\"onOpenedChange($event)\"\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-invalid]=\"dataInvalid()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-loading]=\"dataLoading()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n matTooltipClass=\"sd-multiline-tooltip\"\r\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\r\n [matTooltip]=\"tooltip() || ''\">\r\n <mat-select-trigger>\r\n @if (sdSelectedTemplate(); as _selTpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems()[0], item: selectedItems()[0], items: selectedItems(), display: _display, multiple: false }\">\r\n </ng-container>\r\n } @else {\r\n {{ _display }}\r\n }\r\n </mat-select-trigger>\r\n\r\n @if (filtered()) {\r\n <div class=\"c-filter-input-container\">\r\n <div class=\"filter-input-wrapper\">\r\n <mat-icon>search</mat-icon>\r\n <input\r\n [formControl]=\"inputControl\"\r\n aria-hidden=\"true\"\r\n matInput\r\n autocomplete=\"off\"\r\n class=\"c-search-input\"\r\n (keydown)=\"$event.stopPropagation()\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n @let _filteredItems = filteredItems();\r\n @if (_filteredItems) {\r\n @if (!_filteredItems.length && !loading()) {\r\n <mat-option class=\"sd-empty\" disabled>\r\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\r\n </mat-option>\r\n } @else {\r\n @let iDefTpl = itemDef()?.templateRef;\r\n\r\n @if (_valueField && _displayField) {\r\n @for (item of _filteredItems; track itemValue(item)) {\r\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ itemDisplay(item) }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n } @else if (!_valueField && !_displayField) {\r\n @for (item of _filteredItems; track item) {\r\n <mat-option [value]=\"item\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ item }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n }\r\n }\r\n }\r\n\r\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\r\n @if (_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\r\n }\r\n\r\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-error>{{ _errorMessage }}</mat-error>\r\n }\r\n\r\n @if (_normalizedValue !== undefined && _normalizedValue !== null && !_required && !formControl.disabled && !_bare) {\r\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n}\r\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"] }]
|
|
701
|
+
], template: "@let _label = label();\r\n@let _appearance = appearance();\r\n@let _hideInlineError = hideInlineError();\r\n@let _errorMessage = errorMessage();\r\n@let _helperText = helperText();\r\n@let _multiple = multiple();\r\n@let _required = required();\r\n@let _normalizedValue = $any(normalizedValue());\r\n@let _focused = $any(focused());\r\n@let _isInline = isInline();\r\n@let _bare = _isInline;\r\n@let _hasValue = _multiple ? !!_normalizedValue?.length : _normalizedValue !== undefined && _normalizedValue !== null;\r\n@let _display = display();\r\n@let _size = size();\r\n@let _floatLabel = floatLabel();\r\n@let _valueField = valueField();\r\n@let _displayField = displayField();\r\n\r\n@if (isViewed()) {\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"sdLabelTemplate()\"\r\n [value]=\"_normalizedValue\"\r\n [display]=\"_display\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"viewTemplate()\"\r\n [selectedItems]=\"selectedItems()\">\r\n </sd-view>\r\n} @else {\r\n @if (_isInline) {\r\n <!-- why: inline \u2014 sd-view text l\u00E0 \"m\u1EB7t\" + trigger; editor v\u1EABn render b\u00EAn d\u01B0\u1EDBi (chrome \u1EA9n qua\r\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. -->\r\n <span class=\"sd-inline-view\" role=\"button\" tabindex=\"0\" (click)=\"enterInlineEdit()\" (keydown.enter)=\"enterInlineEdit()\">\r\n <sd-view\r\n [label]=\"_label\"\r\n [labelTemplate]=\"sdLabelTemplate()\"\r\n [value]=\"_normalizedValue\"\r\n [display]=\"_display\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"viewTemplate()\"\r\n [selectedItems]=\"selectedItems()\">\r\n </sd-view>\r\n\r\n <!-- why: clear-\u00D7 ch\u1EC9 hi\u1EC7n khi hover (CSS), \u0111\u1EB7t CU\u1ED0I face + clear($event) stopPropagation \u2192\r\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). -->\r\n @if (clearable() && _hasValue && !_required && !formControl.disabled) {\r\n <button type=\"button\" class=\"sd-inline-clear\" (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n </span>\r\n }\r\n\r\n @if (!_appearance) {\r\n <ng-content select=\"[sdLabel]\">\r\n @if (_label) {\r\n <sd-label [label]=\"_label\" [required]=\"_required\"></sd-label>\r\n }\r\n </ng-content>\r\n }\r\n\r\n <div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-inline-editor]=\"_isInline\"\r\n [class.c-focused]=\"_focused\"\r\n [class.c-disabled]=\"formControl.disabled\"\r\n (click)=\"onClick()\"\r\n (mouseenter)=\"updatePanelWidth()\"\r\n (focusin)=\"updatePanelWidth()\"\r\n aria-hidden=\"true\">\r\n @if (_multiple) {\r\n <mat-form-field\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [appearance]=\"_appearance!\"\r\n [floatLabel]=\"_floatLabel\">\r\n @if (_appearance && _label) {\r\n <mat-label style=\"display: inline-block\">\r\n <div style=\"display: flex; align-items: center; gap: 4px\">\r\n <span>{{ _label }}</span>\r\n @if (_helperText) {\r\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\r\n }\r\n </div>\r\n </mat-label>\r\n }\r\n\r\n <mat-select\r\n #select\r\n multiple\r\n [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder() || _label || ''\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n disableOptionCentering=\"true\"\r\n [panelWidth]=\"calculatedPanelWidth()\"\r\n [panelClass]=\"['sd-select-panel', 'sd-multiple']\"\r\n [class.sd-selected]=\"!_required && _normalizedValue?.length\"\r\n [required]=\"_required\"\r\n (openedChange)=\"onOpenedChange($event)\"\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-invalid]=\"dataInvalid()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-loading]=\"dataLoading()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n matTooltipClass=\"sd-multiline-tooltip\"\r\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\r\n [matTooltip]=\"tooltip() || ''\">\r\n <mat-select-trigger>\r\n @if (sdSelectedTemplate(); as _selTpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems(), item: selectedItems(), items: selectedItems(), display: _display, multiple: true }\">\r\n </ng-container>\r\n } @else {\r\n <div class=\"sd-trigger-text\" [matTooltip]=\"_display || ''\" matTooltipPosition=\"above\">\r\n {{ _display }}\r\n </div>\r\n }\r\n </mat-select-trigger>\r\n\r\n @if (filtered()) {\r\n <div class=\"c-filter-input-container\">\r\n <div class=\"filter-input-wrapper\">\r\n <mat-icon>search</mat-icon>\r\n <input\r\n [formControl]=\"inputControl\"\r\n aria-hidden=\"true\"\r\n matInput\r\n autocomplete=\"off\"\r\n class=\"c-search-input\"\r\n (keydown)=\"$event.stopPropagation()\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n @let _filteredItems = filteredItems();\r\n @if (_filteredItems) {\r\n @if (!_filteredItems.length && !loading()) {\r\n <mat-option class=\"sd-empty\" disabled>\r\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\r\n </mat-option>\r\n } @else {\r\n @let iDefTpl = itemDef()?.templateRef;\r\n @if (_valueField && _displayField) {\r\n @for (item of _filteredItems; track itemValue(item)) {\r\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ itemDisplay(item) }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n } @else if (!_valueField && !_displayField) {\r\n @for (item of _filteredItems; track item) {\r\n <mat-option [value]=\"item\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ item }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n }\r\n }\r\n }\r\n\r\n @if (loading()) {\r\n <mat-option disabled class=\"sd-loading-option\">\r\n <mat-spinner diameter=\"24\"></mat-spinner>\r\n </mat-option>\r\n }\r\n\r\n @let _visibleFooterActions = visibleFooterActions();\r\n @if (_visibleFooterActions.length) {\r\n <div class=\"sd-select-footer-actions\">\r\n @for (action of _visibleFooterActions; track action) {\r\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\r\n }\r\n </div>\r\n }\r\n </mat-select>\r\n\r\n @if (_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\r\n }\r\n\r\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-error>{{ _errorMessage }}</mat-error>\r\n }\r\n\r\n @if (_normalizedValue?.length && !_required && !formControl.disabled && !_bare) {\r\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <mat-form-field\r\n [class.sd-md]=\"_size === 'md'\"\r\n [class.sd-sm]=\"_size === 'sm'\"\r\n [class.hide-inline-error]=\"_hideInlineError\"\r\n [appearance]=\"_appearance!\"\r\n [floatLabel]=\"_floatLabel\">\r\n @if (_appearance && _label) {\r\n <mat-label style=\"display: inline-block\">\r\n <div style=\"display: flex; align-items: center; gap: 4px\">\r\n <span>{{ _label }}</span>\r\n @if (_helperText) {\r\n <mat-icon [matTooltip]=\"_helperText\" matTooltipPosition=\"below\">info_outline</mat-icon>\r\n }\r\n </div>\r\n </mat-label>\r\n }\r\n\r\n <mat-select\r\n #select\r\n [formControl]=\"formControl\"\r\n [placeholder]=\"placeholder() || _label || ''\"\r\n (selectionChange)=\"onSelectionChange($event)\"\r\n disableOptionCentering=\"true\"\r\n [panelWidth]=\"calculatedPanelWidth()\"\r\n [panelClass]=\"'sd-select-panel'\"\r\n [class.sd-selected]=\"!_required && _normalizedValue !== undefined && _normalizedValue !== null\"\r\n [required]=\"_required\"\r\n (openedChange)=\"onOpenedChange($event)\"\r\n [attr.data-autoId]=\"autoId()\"\r\n [attr.data-disabled]=\"dataDisabled()\"\r\n [attr.data-invalid]=\"dataInvalid()\"\r\n [attr.data-empty]=\"dataEmpty()\"\r\n [attr.data-value]=\"dataValue()\"\r\n [attr.data-loading]=\"dataLoading()\"\r\n [attr.data-required]=\"dataRequired()\"\r\n [attr.data-error-message]=\"dataErrorMessage()\"\r\n matTooltipClass=\"sd-multiline-tooltip\"\r\n [matTooltipDisabled]=\"!formControl.disabled || !_normalizedValue?.length\"\r\n [matTooltip]=\"tooltip() || ''\">\r\n <mat-select-trigger>\r\n @if (sdSelectedTemplate(); as _selTpl) {\r\n <ng-container\r\n *ngTemplateOutlet=\"_selTpl; context: { $implicit: selectedItems()[0], item: selectedItems()[0], items: selectedItems(), display: _display, multiple: false }\">\r\n </ng-container>\r\n } @else {\r\n {{ _display }}\r\n }\r\n </mat-select-trigger>\r\n\r\n @if (filtered()) {\r\n <div class=\"c-filter-input-container\">\r\n <div class=\"filter-input-wrapper\">\r\n <mat-icon>search</mat-icon>\r\n <input\r\n [formControl]=\"inputControl\"\r\n aria-hidden=\"true\"\r\n matInput\r\n autocomplete=\"off\"\r\n class=\"c-search-input\"\r\n (keydown)=\"$event.stopPropagation()\" />\r\n </div>\r\n </div>\r\n }\r\n\r\n @let _filteredItems = filteredItems();\r\n @if (_filteredItems) {\r\n @if (!_filteredItems.length && !loading()) {\r\n <mat-option class=\"sd-empty\" disabled>\r\n <img class=\"sd-image-data-empty\" alt=\"empty-image\" style=\"width: 95px\" />\r\n </mat-option>\r\n } @else {\r\n @let iDefTpl = itemDef()?.templateRef;\r\n\r\n @if (_valueField && _displayField) {\r\n @for (item of _filteredItems; track itemValue(item)) {\r\n <mat-option [value]=\"itemValue(item)\" [disabled]=\"itemDisabled(item)\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ itemDisplay(item) }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n } @else if (!_valueField && !_displayField) {\r\n @for (item of _filteredItems; track item) {\r\n <mat-option [value]=\"item\">\r\n <div>\r\n @if (iDefTpl) {\r\n <ng-container *ngTemplateOutlet=\"iDefTpl ?? null; context: { item: item }\"> </ng-container>\r\n } @else {\r\n {{ item }}\r\n }\r\n </div>\r\n </mat-option>\r\n }\r\n }\r\n }\r\n }\r\n\r\n @if (loading()) {\r\n <mat-option disabled class=\"sd-loading-option\">\r\n <mat-spinner diameter=\"24\"></mat-spinner>\r\n </mat-option>\r\n }\r\n\r\n @let _visibleFooterActions = visibleFooterActions();\r\n @if (_visibleFooterActions.length) {\r\n <div class=\"sd-select-footer-actions\">\r\n @for (action of _visibleFooterActions; track action) {\r\n <ng-container *ngTemplateOutlet=\"action.templateRef; context: footerActionContext()\"> </ng-container>\r\n }\r\n </div>\r\n }\r\n </mat-select>\r\n\r\n @if (_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errorMessage\" matTooltipPosition=\"above\"> error </mat-icon>\r\n }\r\n\r\n @if (!_hideInlineError && _errorMessage && formControl.touched) {\r\n <mat-error>{{ _errorMessage }}</mat-error>\r\n }\r\n\r\n @if (_normalizedValue !== undefined && _normalizedValue !== null && !_required && !formControl.disabled && !_bare) {\r\n <button type=\"button\" class=\"sd-clear-btn\" matSuffix (click)=\"clear($event)\" title=\"X\u00F3a\" aria-label=\"X\u00F3a\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n } @else {\r\n <mat-icon class=\"cursor-pointer sd-suffix-icon\" matSuffix>keyboard_arrow_down</mat-icon>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n}\r\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"] }]
|
|
669
702
|
}], ctorParameters: () => [] });
|
|
670
703
|
|
|
671
704
|
/**
|