@aseansc/ui 5.7.1 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/fesm2022/aseansc-ui.mjs +190 -63
- package/fesm2022/aseansc-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/aseansc-ui.d.ts +62 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@ All notable changes to `@aseansc/ui` (trước đây `@asc/ui`) are documented h
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [5.8.0] — 2026-11-03
|
|
8
|
+
|
|
9
|
+
`asc-auto-complete` đồng bộ style với input/select và hỗ trợ dữ liệu lớn (lazy load).
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **`AscAutoComplete`**: `virtualScroll`, `virtualScrollItemSize` (mặc định 36), `lazy` + output `(lazyLoad)` → `AscAutoCompleteLazyLoadEvent { query, first, last }`, `loading` (dòng "Đang tải..." cuối danh sách), `emptyMessage`, `scrollHeight`.
|
|
14
|
+
- **`AscAutoComplete`**: `size` (xs..xl), `invalid`, `disabled`, `mode="view"`.
|
|
15
|
+
- Type **`AscAutoCompleteLazyLoadEvent`**.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **`AscAutoComplete`**: cùng thang cao / chữ / padding với `asc-input` (padding ngang 8px thay vì 12px); mũi tên dropdown nằm trong ô (bỏ nút xám ghép ngoài); khung multiple cao 40px, icon xóa chip 14px.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **`AscSelect`**: text dài cắt "..." thay vì đè lên icon xóa / mũi tên (single + multiselect comma).
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## [5.7.2] — 2026-10-30
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- **`AscSelect`**: icon search trong ô lọc của panel bị giãn to tràn panel → cố định 1rem.
|
|
32
|
+
- **`AscInput`**: icon search (`icon="search"`) cố định 1rem, tránh giãn theo khung.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
7
36
|
## [5.7.1] — 2026-10-30
|
|
8
37
|
|
|
9
38
|
Table và date field theo Figma "Dành cho FE".
|
package/fesm2022/aseansc-ui.mjs
CHANGED
|
@@ -1964,6 +1964,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
1964
1964
|
* e.fullName.toLowerCase().includes(query.toLowerCase())
|
|
1965
1965
|
* );
|
|
1966
1966
|
* }
|
|
1967
|
+
*
|
|
1968
|
+
* Dữ liệu lớn (vd. 100k bản ghi): tìm phía server (completeMethod → API ?q=&limit=),
|
|
1969
|
+
* huỷ request cũ bằng switchMap. Cần cuộn xem hết kết quả → bật [virtualScroll] +
|
|
1970
|
+
* [lazy], nghe (lazyLoad) và nối thêm trang kế tiếp khi `last` gần cuối danh sách:
|
|
1971
|
+
*
|
|
1972
|
+
* <asc-auto-complete
|
|
1973
|
+
* [suggestions]="items()" [virtualScroll]="true" [lazy]="true" [loading]="loading()"
|
|
1974
|
+
* (completeMethod)="search($event)" (lazyLoad)="loadMore($event)" />
|
|
1975
|
+
*
|
|
1976
|
+
* loadMore(e: AscAutoCompleteLazyLoadEvent) {
|
|
1977
|
+
* if (e.last >= this.items().length - 5 && this.hasMore && !this.loading()) this.fetchPage(e.query);
|
|
1978
|
+
* }
|
|
1967
1979
|
*/
|
|
1968
1980
|
class AscAutoCompleteComponent extends BaseControlAccessor {
|
|
1969
1981
|
constructor() {
|
|
@@ -2000,35 +2012,129 @@ class AscAutoCompleteComponent extends BaseControlAccessor {
|
|
|
2000
2012
|
/** Placeholder */
|
|
2001
2013
|
this.placeholder = input('', /* @ts-ignore */
|
|
2002
2014
|
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
2015
|
+
/** Kích thước — cùng thang với asc-input / asc-select. @default 'md' */
|
|
2016
|
+
this.size = input(undefined, /* @ts-ignore */
|
|
2017
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
2018
|
+
/** Ép trạng thái lỗi (ngoài trạng thái lỗi tự lấy từ FormControl) */
|
|
2019
|
+
this.invalid = input(false, /* @ts-ignore */
|
|
2020
|
+
...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
2021
|
+
/** Disable khi không dùng FormControl */
|
|
2022
|
+
this.disabled = input(false, /* @ts-ignore */
|
|
2023
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
2024
|
+
/** Text khi không có gợi ý — fallback i18n "Không có kết quả" */
|
|
2025
|
+
this.emptyMessage = input(undefined, /* @ts-ignore */
|
|
2026
|
+
...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
|
|
2027
|
+
/** Chiều cao tối đa của danh sách gợi ý. @default '200px' */
|
|
2028
|
+
this.scrollHeight = input('200px', /* @ts-ignore */
|
|
2029
|
+
...(ngDevMode ? [{ debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
|
|
2030
|
+
/** Cuộn ảo — chỉ render các dòng đang thấy, bắt buộc khi danh sách hàng nghìn dòng */
|
|
2031
|
+
this.virtualScroll = input(false, /* @ts-ignore */
|
|
2032
|
+
...(ngDevMode ? [{ debugName: "virtualScroll" }] : /* istanbul ignore next */ []));
|
|
2033
|
+
/** Chiều cao 1 dòng (px) cho cuộn ảo — phải khớp chiều cao thật của option. @default 36 */
|
|
2034
|
+
this.virtualScrollItemSize = input(36, /* @ts-ignore */
|
|
2035
|
+
...(ngDevMode ? [{ debugName: "virtualScrollItemSize" }] : /* istanbul ignore next */ []));
|
|
2036
|
+
/** Bật (lazyLoad) khi cuộn — dùng cùng virtualScroll để tải thêm trang */
|
|
2037
|
+
this.lazy = input(false, /* @ts-ignore */
|
|
2038
|
+
...(ngDevMode ? [{ debugName: "lazy" }] : /* istanbul ignore next */ []));
|
|
2039
|
+
/** Đang tải trang kế tiếp → hiện dòng "Đang tải..." cuối danh sách */
|
|
2040
|
+
this.loading = input(false, /* @ts-ignore */
|
|
2041
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
2003
2042
|
/** Emit text user đang gõ — consumer lọc và cập nhật [suggestions] */
|
|
2004
2043
|
this.completeMethod = output();
|
|
2005
|
-
|
|
2044
|
+
/** Cuộn danh sách (lazy) — consumer tải thêm khi `last` gần cuối [suggestions] */
|
|
2045
|
+
this.lazyLoad = output();
|
|
2046
|
+
this.localeService = inject(AscLocaleService);
|
|
2047
|
+
/** Từ khoá của lần tìm gần nhất — gắn vào payload (lazyLoad) */
|
|
2048
|
+
this.lastQuery = '';
|
|
2049
|
+
this.resolvedEmptyMessage = computed(() => this.emptyMessage() ?? this.msg.form.noResults, /* @ts-ignore */
|
|
2050
|
+
...(ngDevMode ? [{ debugName: "resolvedEmptyMessage" }] : /* istanbul ignore next */ []));
|
|
2051
|
+
this.resolvedSize = computed(() => this.size() ?? 'md', /* @ts-ignore */
|
|
2052
|
+
...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
|
|
2053
|
+
this.isInvalidState = computed(() => this.invalid() || this.isInvalid(), /* @ts-ignore */
|
|
2054
|
+
...(ngDevMode ? [{ debugName: "isInvalidState" }] : /* istanbul ignore next */ []));
|
|
2055
|
+
this.effectiveDisabled = computed(() => this.disabled() || this.isDisabled(), /* @ts-ignore */
|
|
2056
|
+
...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
|
|
2057
|
+
this.innerCls = computed(() => ascCls(this.isInvalidState() && 'ng-invalid ng-dirty'), /* @ts-ignore */
|
|
2058
|
+
...(ngDevMode ? [{ debugName: "innerCls" }] : /* istanbul ignore next */ []));
|
|
2059
|
+
/** mode="view": label của giá trị (multiple → nối bằng dấu phẩy) */
|
|
2060
|
+
this.viewText = computed(() => {
|
|
2061
|
+
const label = (item) => {
|
|
2062
|
+
if (item === null || item === undefined || item === '')
|
|
2063
|
+
return '';
|
|
2064
|
+
if (typeof item === 'string')
|
|
2065
|
+
return item;
|
|
2066
|
+
const key = this.optionLabel();
|
|
2067
|
+
return key ? String(item[key] ?? '') : String(item);
|
|
2068
|
+
};
|
|
2069
|
+
const v = this.value();
|
|
2070
|
+
const text = Array.isArray(v) ? v.map(label).filter(Boolean).join(', ') : label(v);
|
|
2071
|
+
return text || '—';
|
|
2072
|
+
}, /* @ts-ignore */
|
|
2073
|
+
...(ngDevMode ? [{ debugName: "viewText" }] : /* istanbul ignore next */ []));
|
|
2074
|
+
this._hostCls = computed(() => ascCls('asc-auto-complete', `asc-auto-complete--${this.resolvedSize()}`, this.isInvalidState() && 'asc-auto-complete--invalid', this.effectiveDisabled() && 'asc-auto-complete--disabled', this.mode() === 'view' && 'asc-auto-complete--view'), /* @ts-ignore */
|
|
2006
2075
|
...(ngDevMode ? [{ debugName: "_hostCls" }] : /* istanbul ignore next */ []));
|
|
2007
2076
|
}
|
|
2077
|
+
get msg() { return this.localeService.messages(); }
|
|
2078
|
+
handleComplete(query) {
|
|
2079
|
+
this.lastQuery = query;
|
|
2080
|
+
this.completeMethod.emit(query);
|
|
2081
|
+
}
|
|
2082
|
+
handleLazyLoad(event) {
|
|
2083
|
+
const first = typeof event.first === 'number' ? event.first : 0;
|
|
2084
|
+
const last = typeof event.last === 'number' ? event.last : 0;
|
|
2085
|
+
this.lazyLoad.emit({ query: this.lastQuery, first, last });
|
|
2086
|
+
}
|
|
2087
|
+
get controlSize() {
|
|
2088
|
+
return this.resolvedSize();
|
|
2089
|
+
}
|
|
2090
|
+
get controlDisabled() {
|
|
2091
|
+
return this.effectiveDisabled();
|
|
2092
|
+
}
|
|
2008
2093
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscAutoCompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2009
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
2094
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: AscAutoCompleteComponent, isStandalone: true, selector: "asc-auto-complete", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null }, dropdown: { classPropertyName: "dropdown", publicName: "dropdown", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completeMethod: "completeMethod", lazyLoad: "lazyLoad" }, host: { properties: { "id": "id()", "class": "_hostCls()" } }, providers: [
|
|
2010
2095
|
{ provide: ASC_BASE_CONTROL, useExisting: forwardRef(() => AscAutoCompleteComponent) },
|
|
2011
|
-
], usesInheritance: true, ngImport: i0, template: `
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2096
|
+
], usesInheritance: true, ngImport: i0, template: `
|
|
2097
|
+
@if (mode() === 'view') {
|
|
2098
|
+
<span class="asc-auto-complete-view">{{ viewText() }}</span>
|
|
2099
|
+
} @else {
|
|
2100
|
+
<p-autocomplete
|
|
2101
|
+
[ngModel]="value()"
|
|
2102
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2103
|
+
(ngModelChange)="setValue($event)"
|
|
2104
|
+
[suggestions]="suggestions()"
|
|
2105
|
+
[optionLabel]="optionLabel()"
|
|
2106
|
+
[optionValue]="optionValue()"
|
|
2107
|
+
[minQueryLength]="minLength()"
|
|
2108
|
+
[delay]="delay()"
|
|
2109
|
+
[multiple]="multiple()"
|
|
2110
|
+
[forceSelection]="forceSelection()"
|
|
2111
|
+
[dropdown]="dropdown()"
|
|
2112
|
+
[showClear]="showClear()"
|
|
2113
|
+
[placeholder]="placeholder()"
|
|
2114
|
+
[emptyMessage]="resolvedEmptyMessage()"
|
|
2115
|
+
[virtualScroll]="virtualScroll()"
|
|
2116
|
+
[virtualScrollItemSize]="virtualScrollItemSize()"
|
|
2117
|
+
[lazy]="lazy()"
|
|
2118
|
+
[scrollHeight]="scrollHeight()"
|
|
2119
|
+
[disabled]="effectiveDisabled()"
|
|
2120
|
+
[class]="innerCls()"
|
|
2121
|
+
[attr.aria-invalid]="isInvalidState() || undefined"
|
|
2122
|
+
appendTo="body"
|
|
2123
|
+
(completeMethod)="handleComplete($event.query)"
|
|
2124
|
+
(onLazyLoad)="handleLazyLoad($event)"
|
|
2125
|
+
(onBlur)="markTouched()"
|
|
2126
|
+
>
|
|
2127
|
+
@if (loading()) {
|
|
2128
|
+
<ng-template #footer>
|
|
2129
|
+
<div class="asc-auto-complete-loading-more">
|
|
2130
|
+
<i class="pi pi-spin pi-spinner" aria-hidden="true"></i>
|
|
2131
|
+
{{ msg.table.loading }}
|
|
2132
|
+
</div>
|
|
2133
|
+
</ng-template>
|
|
2134
|
+
}
|
|
2135
|
+
</p-autocomplete>
|
|
2136
|
+
}
|
|
2137
|
+
`, isInline: true, styles: [":host{display:block;width:100%;--p-icon-size: 20px;--asc-ac-pad-x: 8px;--asc-ac-height: var(--asc-h-md);--asc-ac-font-size: 14px;--asc-ac-line-height: 20px;--asc-ac-dropdown-width: 36px}:host(.asc-auto-complete--xs){--p-icon-size: 14px;--asc-ac-height: var(--asc-h-xs);--asc-ac-font-size: 12px;--asc-ac-line-height: 16px;--asc-ac-dropdown-width: 28px}:host(.asc-auto-complete--sm){--asc-ac-height: var(--asc-h-sm);--asc-ac-font-size: 12px;--asc-ac-line-height: 18px;--asc-ac-dropdown-width: 32px}:host(.asc-auto-complete--lg){--asc-ac-pad-x: 10px;--asc-ac-height: var(--asc-h-lg);--asc-ac-font-size: 16px;--asc-ac-line-height: 24px;--asc-ac-dropdown-width: 40px}:host(.asc-auto-complete--xl){--p-icon-size: 24px;--asc-ac-pad-x: 12px;--asc-ac-height: var(--asc-h-xl);--asc-ac-font-size: 18px;--asc-ac-line-height: 28px;--asc-ac-dropdown-width: 44px}:host ::ng-deep .p-autocomplete{position:relative;width:100%}:host ::ng-deep .p-autocomplete>.p-autocomplete-input,:host ::ng-deep .p-autocomplete>.p-autocomplete-input-multiple{width:100%;border-radius:12px;font-size:var(--asc-ac-font-size);font-weight:400;line-height:var(--asc-ac-line-height);transition:border-color var(--asc-transition-fast),box-shadow var(--asc-transition-fast)}:host ::ng-deep .p-autocomplete>input.p-autocomplete-input{height:var(--asc-ac-height);padding-inline-start:var(--asc-ac-pad-x);padding-inline-end:var(--asc-ac-pad-x)}:host ::ng-deep .p-autocomplete>.p-autocomplete-input-multiple{min-height:var(--asc-ac-height);padding-block:4px;padding-inline:var(--asc-ac-pad-x);gap:4px}:host ::ng-deep .p-autocomplete-chip{--p-icon-size: 14px}:host ::ng-deep .p-autocomplete-input-chip input{font-size:var(--asc-ac-font-size);line-height:var(--asc-ac-line-height)}:host ::ng-deep .p-autocomplete:has(.p-autocomplete-dropdown)>.p-autocomplete-input,:host ::ng-deep .p-autocomplete:has(.p-autocomplete-dropdown)>.p-autocomplete-input-multiple{border-radius:12px;padding-inline-end:var(--asc-ac-dropdown-width)}:host ::ng-deep .p-autocomplete-dropdown{position:absolute;top:0;bottom:0;inset-inline-end:0;width:var(--asc-ac-dropdown-width);border:0 none;border-radius:0 12px 12px 0;background:transparent;color:var(--p-form-field-icon-color);--p-icon-size: 13px}:host ::ng-deep .p-autocomplete-dropdown:not(:disabled):hover,:host ::ng-deep .p-autocomplete-dropdown:not(:disabled):active{background:transparent;color:var(--asc-icon-primary)}:host ::ng-deep .p-autocomplete-dropdown:disabled{color:var(--asc-icon-disabled)}:host ::ng-deep .p-autocomplete-clear-icon{box-sizing:border-box;width:var(--p-icon-size);height:var(--p-icon-size);padding:calc(var(--p-icon-size) / 4);margin-top:calc(var(--p-icon-size) / -2);inset-inline-end:12px;border-radius:50%;background:var(--asc-input-clear-bg, #DEDFE0);color:var(--asc-input-clear-color, #FFFFFF)}:host ::ng-deep .p-autocomplete-clear-icon:hover{background:var(--asc-input-clear-bg-hover, #C0C0C2)}:host ::ng-deep .p-autocomplete:has(.p-autocomplete-clear-icon)>input.p-autocomplete-input{padding-inline-end:calc(12px + var(--p-icon-size) + 8px)}:host ::ng-deep .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-clear-icon{inset-inline-end:var(--asc-ac-dropdown-width)}:host ::ng-deep .p-autocomplete:has(.p-autocomplete-dropdown):has(.p-autocomplete-clear-icon)>input.p-autocomplete-input{padding-inline-end:calc(var(--asc-ac-dropdown-width) + var(--p-icon-size) + 8px)}:host ::ng-deep .p-autocomplete-loader{inset-inline-end:12px}:host ::ng-deep .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader{inset-inline-end:var(--asc-ac-dropdown-width)}:host ::ng-deep .p-autocomplete>.p-autocomplete-input:disabled,:host ::ng-deep .p-autocomplete.p-disabled .p-autocomplete-input-multiple{border-color:var(--asc-formfield-disabled-border-color, #F2F3F5)}:host(.asc-auto-complete--invalid) ::ng-deep .p-autocomplete>.p-autocomplete-input,:host(.asc-auto-complete--invalid) ::ng-deep .p-autocomplete>.p-autocomplete-input-multiple{border-color:var(--asc-border-color-invalid)!important}:host(.asc-auto-complete--invalid) ::ng-deep .p-autocomplete>.p-autocomplete-input:focus,:host(.asc-auto-complete--invalid) ::ng-deep .p-autocomplete-input-multiple:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--asc-color-danger) 20%,transparent)}::ng-deep .asc-auto-complete-loading-more{display:flex;align-items:center;gap:8px;padding:8px 12px;font-size:14px;line-height:20px;color:var(--asc-text-secondary)}.asc-auto-complete-view{display:block;width:100%;min-height:20px;box-sizing:border-box;color:var(--asc-text-primary);word-break:break-word}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2032
2138
|
}
|
|
2033
2139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscAutoCompleteComponent, decorators: [{
|
|
2034
2140
|
type: Component,
|
|
@@ -2037,28 +2143,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
2037
2143
|
], host: {
|
|
2038
2144
|
'[id]': 'id()',
|
|
2039
2145
|
'[class]': '_hostCls()',
|
|
2040
|
-
}, template: `
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2146
|
+
}, template: `
|
|
2147
|
+
@if (mode() === 'view') {
|
|
2148
|
+
<span class="asc-auto-complete-view">{{ viewText() }}</span>
|
|
2149
|
+
} @else {
|
|
2150
|
+
<p-autocomplete
|
|
2151
|
+
[ngModel]="value()"
|
|
2152
|
+
[ngModelOptions]="{ standalone: true }"
|
|
2153
|
+
(ngModelChange)="setValue($event)"
|
|
2154
|
+
[suggestions]="suggestions()"
|
|
2155
|
+
[optionLabel]="optionLabel()"
|
|
2156
|
+
[optionValue]="optionValue()"
|
|
2157
|
+
[minQueryLength]="minLength()"
|
|
2158
|
+
[delay]="delay()"
|
|
2159
|
+
[multiple]="multiple()"
|
|
2160
|
+
[forceSelection]="forceSelection()"
|
|
2161
|
+
[dropdown]="dropdown()"
|
|
2162
|
+
[showClear]="showClear()"
|
|
2163
|
+
[placeholder]="placeholder()"
|
|
2164
|
+
[emptyMessage]="resolvedEmptyMessage()"
|
|
2165
|
+
[virtualScroll]="virtualScroll()"
|
|
2166
|
+
[virtualScrollItemSize]="virtualScrollItemSize()"
|
|
2167
|
+
[lazy]="lazy()"
|
|
2168
|
+
[scrollHeight]="scrollHeight()"
|
|
2169
|
+
[disabled]="effectiveDisabled()"
|
|
2170
|
+
[class]="innerCls()"
|
|
2171
|
+
[attr.aria-invalid]="isInvalidState() || undefined"
|
|
2172
|
+
appendTo="body"
|
|
2173
|
+
(completeMethod)="handleComplete($event.query)"
|
|
2174
|
+
(onLazyLoad)="handleLazyLoad($event)"
|
|
2175
|
+
(onBlur)="markTouched()"
|
|
2176
|
+
>
|
|
2177
|
+
@if (loading()) {
|
|
2178
|
+
<ng-template #footer>
|
|
2179
|
+
<div class="asc-auto-complete-loading-more">
|
|
2180
|
+
<i class="pi pi-spin pi-spinner" aria-hidden="true"></i>
|
|
2181
|
+
{{ msg.table.loading }}
|
|
2182
|
+
</div>
|
|
2183
|
+
</ng-template>
|
|
2184
|
+
}
|
|
2185
|
+
</p-autocomplete>
|
|
2186
|
+
}
|
|
2187
|
+
`, styles: [":host{display:block;width:100%;--p-icon-size: 20px;--asc-ac-pad-x: 8px;--asc-ac-height: var(--asc-h-md);--asc-ac-font-size: 14px;--asc-ac-line-height: 20px;--asc-ac-dropdown-width: 36px}:host(.asc-auto-complete--xs){--p-icon-size: 14px;--asc-ac-height: var(--asc-h-xs);--asc-ac-font-size: 12px;--asc-ac-line-height: 16px;--asc-ac-dropdown-width: 28px}:host(.asc-auto-complete--sm){--asc-ac-height: var(--asc-h-sm);--asc-ac-font-size: 12px;--asc-ac-line-height: 18px;--asc-ac-dropdown-width: 32px}:host(.asc-auto-complete--lg){--asc-ac-pad-x: 10px;--asc-ac-height: var(--asc-h-lg);--asc-ac-font-size: 16px;--asc-ac-line-height: 24px;--asc-ac-dropdown-width: 40px}:host(.asc-auto-complete--xl){--p-icon-size: 24px;--asc-ac-pad-x: 12px;--asc-ac-height: var(--asc-h-xl);--asc-ac-font-size: 18px;--asc-ac-line-height: 28px;--asc-ac-dropdown-width: 44px}:host ::ng-deep .p-autocomplete{position:relative;width:100%}:host ::ng-deep .p-autocomplete>.p-autocomplete-input,:host ::ng-deep .p-autocomplete>.p-autocomplete-input-multiple{width:100%;border-radius:12px;font-size:var(--asc-ac-font-size);font-weight:400;line-height:var(--asc-ac-line-height);transition:border-color var(--asc-transition-fast),box-shadow var(--asc-transition-fast)}:host ::ng-deep .p-autocomplete>input.p-autocomplete-input{height:var(--asc-ac-height);padding-inline-start:var(--asc-ac-pad-x);padding-inline-end:var(--asc-ac-pad-x)}:host ::ng-deep .p-autocomplete>.p-autocomplete-input-multiple{min-height:var(--asc-ac-height);padding-block:4px;padding-inline:var(--asc-ac-pad-x);gap:4px}:host ::ng-deep .p-autocomplete-chip{--p-icon-size: 14px}:host ::ng-deep .p-autocomplete-input-chip input{font-size:var(--asc-ac-font-size);line-height:var(--asc-ac-line-height)}:host ::ng-deep .p-autocomplete:has(.p-autocomplete-dropdown)>.p-autocomplete-input,:host ::ng-deep .p-autocomplete:has(.p-autocomplete-dropdown)>.p-autocomplete-input-multiple{border-radius:12px;padding-inline-end:var(--asc-ac-dropdown-width)}:host ::ng-deep .p-autocomplete-dropdown{position:absolute;top:0;bottom:0;inset-inline-end:0;width:var(--asc-ac-dropdown-width);border:0 none;border-radius:0 12px 12px 0;background:transparent;color:var(--p-form-field-icon-color);--p-icon-size: 13px}:host ::ng-deep .p-autocomplete-dropdown:not(:disabled):hover,:host ::ng-deep .p-autocomplete-dropdown:not(:disabled):active{background:transparent;color:var(--asc-icon-primary)}:host ::ng-deep .p-autocomplete-dropdown:disabled{color:var(--asc-icon-disabled)}:host ::ng-deep .p-autocomplete-clear-icon{box-sizing:border-box;width:var(--p-icon-size);height:var(--p-icon-size);padding:calc(var(--p-icon-size) / 4);margin-top:calc(var(--p-icon-size) / -2);inset-inline-end:12px;border-radius:50%;background:var(--asc-input-clear-bg, #DEDFE0);color:var(--asc-input-clear-color, #FFFFFF)}:host ::ng-deep .p-autocomplete-clear-icon:hover{background:var(--asc-input-clear-bg-hover, #C0C0C2)}:host ::ng-deep .p-autocomplete:has(.p-autocomplete-clear-icon)>input.p-autocomplete-input{padding-inline-end:calc(12px + var(--p-icon-size) + 8px)}:host ::ng-deep .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-clear-icon{inset-inline-end:var(--asc-ac-dropdown-width)}:host ::ng-deep .p-autocomplete:has(.p-autocomplete-dropdown):has(.p-autocomplete-clear-icon)>input.p-autocomplete-input{padding-inline-end:calc(var(--asc-ac-dropdown-width) + var(--p-icon-size) + 8px)}:host ::ng-deep .p-autocomplete-loader{inset-inline-end:12px}:host ::ng-deep .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader{inset-inline-end:var(--asc-ac-dropdown-width)}:host ::ng-deep .p-autocomplete>.p-autocomplete-input:disabled,:host ::ng-deep .p-autocomplete.p-disabled .p-autocomplete-input-multiple{border-color:var(--asc-formfield-disabled-border-color, #F2F3F5)}:host(.asc-auto-complete--invalid) ::ng-deep .p-autocomplete>.p-autocomplete-input,:host(.asc-auto-complete--invalid) ::ng-deep .p-autocomplete>.p-autocomplete-input-multiple{border-color:var(--asc-border-color-invalid)!important}:host(.asc-auto-complete--invalid) ::ng-deep .p-autocomplete>.p-autocomplete-input:focus,:host(.asc-auto-complete--invalid) ::ng-deep .p-autocomplete-input-multiple:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--asc-color-danger) 20%,transparent)}::ng-deep .asc-auto-complete-loading-more{display:flex;align-items:center;gap:8px;padding:8px 12px;font-size:14px;line-height:20px;color:var(--asc-text-secondary)}.asc-auto-complete-view{display:block;width:100%;min-height:20px;box-sizing:border-box;color:var(--asc-text-primary);word-break:break-word}\n"] }]
|
|
2188
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], forceSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceSelection", required: false }] }], dropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdown", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], completeMethod: [{ type: i0.Output, args: ["completeMethod"] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }] } });
|
|
2062
2189
|
|
|
2063
2190
|
/**
|
|
2064
2191
|
* AscInputMaskComponent — input định dạng sẵn (số điện thoại, ngày, CCCD...).
|
|
@@ -2977,7 +3104,7 @@ class AscInputComponent extends BaseControlAccessor {
|
|
|
2977
3104
|
<p-iconfield [iconPosition]="iconPos()">
|
|
2978
3105
|
@if (icon() && iconPos() === 'left') {
|
|
2979
3106
|
@if (isSearchIcon()) {
|
|
2980
|
-
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="
|
|
3107
|
+
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
|
|
2981
3108
|
} @else {
|
|
2982
3109
|
<p-inputicon [class]="icon()" aria-hidden="true" />
|
|
2983
3110
|
}
|
|
@@ -3015,7 +3142,7 @@ class AscInputComponent extends BaseControlAccessor {
|
|
|
3015
3142
|
}
|
|
3016
3143
|
@if (icon() && iconPos() === 'right') {
|
|
3017
3144
|
@if (isSearchIcon()) {
|
|
3018
|
-
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="
|
|
3145
|
+
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
|
|
3019
3146
|
} @else {
|
|
3020
3147
|
<p-inputicon [class]="icon()" aria-hidden="true" />
|
|
3021
3148
|
}
|
|
@@ -3039,7 +3166,7 @@ class AscInputComponent extends BaseControlAccessor {
|
|
|
3039
3166
|
<p-iconfield [iconPosition]="iconPos()">
|
|
3040
3167
|
@if (icon() && iconPos() === 'left') {
|
|
3041
3168
|
@if (isSearchIcon()) {
|
|
3042
|
-
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="
|
|
3169
|
+
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
|
|
3043
3170
|
} @else {
|
|
3044
3171
|
<p-inputicon [class]="icon()" aria-hidden="true" />
|
|
3045
3172
|
}
|
|
@@ -3078,7 +3205,7 @@ class AscInputComponent extends BaseControlAccessor {
|
|
|
3078
3205
|
}
|
|
3079
3206
|
@if (icon() && iconPos() === 'right') {
|
|
3080
3207
|
@if (isSearchIcon()) {
|
|
3081
|
-
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="
|
|
3208
|
+
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
|
|
3082
3209
|
} @else {
|
|
3083
3210
|
<p-inputicon [class]="icon()" aria-hidden="true" />
|
|
3084
3211
|
}
|
|
@@ -3113,7 +3240,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
3113
3240
|
<p-iconfield [iconPosition]="iconPos()">
|
|
3114
3241
|
@if (icon() && iconPos() === 'left') {
|
|
3115
3242
|
@if (isSearchIcon()) {
|
|
3116
|
-
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="
|
|
3243
|
+
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
|
|
3117
3244
|
} @else {
|
|
3118
3245
|
<p-inputicon [class]="icon()" aria-hidden="true" />
|
|
3119
3246
|
}
|
|
@@ -3151,7 +3278,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
3151
3278
|
}
|
|
3152
3279
|
@if (icon() && iconPos() === 'right') {
|
|
3153
3280
|
@if (isSearchIcon()) {
|
|
3154
|
-
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="
|
|
3281
|
+
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
|
|
3155
3282
|
} @else {
|
|
3156
3283
|
<p-inputicon [class]="icon()" aria-hidden="true" />
|
|
3157
3284
|
}
|
|
@@ -3175,7 +3302,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
3175
3302
|
<p-iconfield [iconPosition]="iconPos()">
|
|
3176
3303
|
@if (icon() && iconPos() === 'left') {
|
|
3177
3304
|
@if (isSearchIcon()) {
|
|
3178
|
-
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="
|
|
3305
|
+
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
|
|
3179
3306
|
} @else {
|
|
3180
3307
|
<p-inputicon [class]="icon()" aria-hidden="true" />
|
|
3181
3308
|
}
|
|
@@ -3214,7 +3341,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
3214
3341
|
}
|
|
3215
3342
|
@if (icon() && iconPos() === 'right') {
|
|
3216
3343
|
@if (isSearchIcon()) {
|
|
3217
|
-
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="
|
|
3344
|
+
<p-inputicon class="asc-input-search-icon" aria-hidden="true"><asc-svg-icon name="search" size="1rem" /></p-inputicon>
|
|
3218
3345
|
} @else {
|
|
3219
3346
|
<p-inputicon [class]="icon()" aria-hidden="true" />
|
|
3220
3347
|
}
|
|
@@ -3494,7 +3621,7 @@ class AscSelectComponent extends BaseControlAccessor {
|
|
|
3494
3621
|
(onFilter)="filterChange.emit($event)"
|
|
3495
3622
|
>
|
|
3496
3623
|
<ng-template #filtericon>
|
|
3497
|
-
<asc-svg-icon name="search" size="
|
|
3624
|
+
<asc-svg-icon name="search" size="1rem" class="asc-select-filter-icon" />
|
|
3498
3625
|
</ng-template>
|
|
3499
3626
|
</p-multiselect>
|
|
3500
3627
|
<label [for]="selectId()">{{ label() }}</label>
|
|
@@ -3536,7 +3663,7 @@ class AscSelectComponent extends BaseControlAccessor {
|
|
|
3536
3663
|
(onFilter)="filterChange.emit($event)"
|
|
3537
3664
|
>
|
|
3538
3665
|
<ng-template #filtericon>
|
|
3539
|
-
<asc-svg-icon name="search" size="
|
|
3666
|
+
<asc-svg-icon name="search" size="1rem" class="asc-select-filter-icon" />
|
|
3540
3667
|
</ng-template>
|
|
3541
3668
|
</p-multiselect>
|
|
3542
3669
|
}
|
|
@@ -3577,7 +3704,7 @@ class AscSelectComponent extends BaseControlAccessor {
|
|
|
3577
3704
|
(onFilter)="filterChange.emit($event)"
|
|
3578
3705
|
>
|
|
3579
3706
|
<ng-template #filtericon>
|
|
3580
|
-
<asc-svg-icon name="search" size="
|
|
3707
|
+
<asc-svg-icon name="search" size="1rem" class="asc-select-filter-icon" />
|
|
3581
3708
|
</ng-template>
|
|
3582
3709
|
</p-select>
|
|
3583
3710
|
<label [for]="selectId()">{{ label() }}</label>
|
|
@@ -3617,12 +3744,12 @@ class AscSelectComponent extends BaseControlAccessor {
|
|
|
3617
3744
|
(onFilter)="filterChange.emit($event)"
|
|
3618
3745
|
>
|
|
3619
3746
|
<ng-template #filtericon>
|
|
3620
|
-
<asc-svg-icon name="search" size="
|
|
3747
|
+
<asc-svg-icon name="search" size="1rem" class="asc-select-filter-icon" />
|
|
3621
3748
|
</ng-template>
|
|
3622
3749
|
</p-select>
|
|
3623
3750
|
}
|
|
3624
3751
|
}
|
|
3625
|
-
`, isInline: true, styles: [":host{display:block;width:100%}.asc-select-filter-icon{color:var(--asc-icon-secondary)}:host ::ng-deep p-select,:host ::ng-deep p-multiselect,:host ::ng-deep .p-select,:host ::ng-deep .p-multiselect{width:100%}.asc-select-view{display:block;width:100%;min-height:20px;box-sizing:border-box;color:var(--asc-text-primary);word-break:break-word}:host ::ng-deep .p-select,:host ::ng-deep .p-multiselect{transition:border-color var(--asc-transition-fast),box-shadow var(--asc-transition-fast)}:host ::ng-deep .p-multiselect-label-container{display:flex;align-items:center}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-xs);border-radius:12px}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-xs);border-radius:12px}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 8px;font-size:12px;font-weight:400;line-height:16px;display:
|
|
3752
|
+
`, isInline: true, styles: [":host{display:block;width:100%}.asc-select-filter-icon{color:var(--asc-icon-secondary)}:host ::ng-deep p-select,:host ::ng-deep p-multiselect,:host ::ng-deep .p-select,:host ::ng-deep .p-multiselect{width:100%}.asc-select-view{display:block;width:100%;min-height:20px;box-sizing:border-box;color:var(--asc-text-primary);word-break:break-word}:host ::ng-deep .p-select,:host ::ng-deep .p-multiselect{transition:border-color var(--asc-transition-fast),box-shadow var(--asc-transition-fast)}:host ::ng-deep .p-multiselect-label-container{display:flex;align-items:center}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-xs);border-radius:12px}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-xs);border-radius:12px}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 8px;font-size:12px;font-weight:400;line-height:16px;display:block;align-content:center}:host(.asc-select--sm:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-sm);border-radius:12px}:host(.asc-select--sm:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-sm);border-radius:12px}:host(.asc-select--sm:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--sm:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 8px;font-size:12px;font-weight:400;line-height:18px;display:block;align-content:center}:host(.asc-select--md:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-md);border-radius:12px}:host(.asc-select--md:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-md);border-radius:12px}:host(.asc-select--md:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--md:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 8px;font-size:14px;font-weight:400;line-height:20px;display:block;align-content:center}:host(.asc-select--lg:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-lg);border-radius:12px}:host(.asc-select--lg:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-lg);border-radius:12px}:host(.asc-select--lg:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--lg:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 10px;font-size:16px;font-weight:400;line-height:24px;display:block;align-content:center}:host(.asc-select--xl:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-xl);border-radius:12px}:host(.asc-select--xl:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-xl);border-radius:12px}:host(.asc-select--xl:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--xl:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 12px;font-size:18px;font-weight:400;line-height:28px;display:block;align-content:center}:host ::ng-deep .p-select-label,:host ::ng-deep .p-multiselect-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}:host ::ng-deep .p-multiselect-label{flex:1 1 auto}:host(.asc-select--multi) ::ng-deep .p-multiselect-display-chip .p-multiselect-label{display:flex;align-items:center}:host(.asc-select--xs) ::ng-deep .p-select-label,:host(.asc-select--xs) ::ng-deep .p-multiselect-label{line-height:16px}:host(.asc-select--sm) ::ng-deep .p-select-label,:host(.asc-select--sm) ::ng-deep .p-multiselect-label{line-height:18px}:host(.asc-select--md) ::ng-deep .p-select-label,:host(.asc-select--md) ::ng-deep .p-multiselect-label{line-height:20px}:host(.asc-select--lg) ::ng-deep .p-select-label,:host(.asc-select--lg) ::ng-deep .p-multiselect-label{line-height:24px}:host(.asc-select--xl) ::ng-deep .p-select-label,:host(.asc-select--xl) ::ng-deep .p-multiselect-label{line-height:28px}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-select-label{height:var(--asc-h-xs)}:host(.asc-select--sm:not(.asc-select--float-in)) ::ng-deep .p-select-label{height:var(--asc-h-sm)}:host(.asc-select--md:not(.asc-select--float-in)) ::ng-deep .p-select-label{height:var(--asc-h-md)}:host(.asc-select--lg:not(.asc-select--float-in)) ::ng-deep .p-select-label{height:var(--asc-h-lg)}:host(.asc-select--xl:not(.asc-select--float-in)) ::ng-deep .p-select-label{height:var(--asc-h-xl)}:host{--p-icon-size: 20px}:host(.asc-select--xs){--p-icon-size: 14px}:host(.asc-select--xl){--p-icon-size: 24px}:host ::ng-deep .p-select-overlay,:host ::ng-deep .p-multiselect-overlay{--p-icon-size: 1rem}:host ::ng-deep .p-select-dropdown,:host ::ng-deep .p-multiselect-dropdown{--p-icon-size: 13px}:host ::ng-deep .p-select-dropdown-icon,:host ::ng-deep .p-multiselect-dropdown-icon{font-size:13px}:host ::ng-deep .p-select-clear-icon,:host ::ng-deep .p-multiselect-clear-icon{box-sizing:border-box;padding:calc(var(--p-icon-size) / 4);border-radius:50%;background:var(--asc-input-clear-bg, #DEDFE0);color:var(--asc-input-clear-color, #FFFFFF);cursor:pointer}:host ::ng-deep .p-select-clear-icon:hover,:host ::ng-deep .p-multiselect-clear-icon:hover{background:var(--asc-input-clear-bg-hover, #C0C0C2)}:host(.asc-select--disabled) ::ng-deep .p-select,:host(.asc-select--disabled) ::ng-deep .p-multiselect{border-color:var(--asc-formfield-disabled-border-color, #F2F3F5)}:host(.asc-select--invalid) ::ng-deep .p-select,:host(.asc-select--invalid) ::ng-deep .p-multiselect{border-color:var(--asc-border-color-invalid)!important}:host(.asc-select--invalid) ::ng-deep .p-select:focus-within,:host(.asc-select--invalid) ::ng-deep .p-multiselect:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--asc-color-danger) 20%,transparent)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2$3.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i3$2.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: AscSvgIconComponent, selector: "asc-svg-icon", inputs: ["name", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3626
3753
|
}
|
|
3627
3754
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: AscSelectComponent, decorators: [{
|
|
3628
3755
|
type: Component,
|
|
@@ -3676,7 +3803,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
3676
3803
|
(onFilter)="filterChange.emit($event)"
|
|
3677
3804
|
>
|
|
3678
3805
|
<ng-template #filtericon>
|
|
3679
|
-
<asc-svg-icon name="search" size="
|
|
3806
|
+
<asc-svg-icon name="search" size="1rem" class="asc-select-filter-icon" />
|
|
3680
3807
|
</ng-template>
|
|
3681
3808
|
</p-multiselect>
|
|
3682
3809
|
<label [for]="selectId()">{{ label() }}</label>
|
|
@@ -3718,7 +3845,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
3718
3845
|
(onFilter)="filterChange.emit($event)"
|
|
3719
3846
|
>
|
|
3720
3847
|
<ng-template #filtericon>
|
|
3721
|
-
<asc-svg-icon name="search" size="
|
|
3848
|
+
<asc-svg-icon name="search" size="1rem" class="asc-select-filter-icon" />
|
|
3722
3849
|
</ng-template>
|
|
3723
3850
|
</p-multiselect>
|
|
3724
3851
|
}
|
|
@@ -3759,7 +3886,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
3759
3886
|
(onFilter)="filterChange.emit($event)"
|
|
3760
3887
|
>
|
|
3761
3888
|
<ng-template #filtericon>
|
|
3762
|
-
<asc-svg-icon name="search" size="
|
|
3889
|
+
<asc-svg-icon name="search" size="1rem" class="asc-select-filter-icon" />
|
|
3763
3890
|
</ng-template>
|
|
3764
3891
|
</p-select>
|
|
3765
3892
|
<label [for]="selectId()">{{ label() }}</label>
|
|
@@ -3799,12 +3926,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
|
|
|
3799
3926
|
(onFilter)="filterChange.emit($event)"
|
|
3800
3927
|
>
|
|
3801
3928
|
<ng-template #filtericon>
|
|
3802
|
-
<asc-svg-icon name="search" size="
|
|
3929
|
+
<asc-svg-icon name="search" size="1rem" class="asc-select-filter-icon" />
|
|
3803
3930
|
</ng-template>
|
|
3804
3931
|
</p-select>
|
|
3805
3932
|
}
|
|
3806
3933
|
}
|
|
3807
|
-
`, styles: [":host{display:block;width:100%}.asc-select-filter-icon{color:var(--asc-icon-secondary)}:host ::ng-deep p-select,:host ::ng-deep p-multiselect,:host ::ng-deep .p-select,:host ::ng-deep .p-multiselect{width:100%}.asc-select-view{display:block;width:100%;min-height:20px;box-sizing:border-box;color:var(--asc-text-primary);word-break:break-word}:host ::ng-deep .p-select,:host ::ng-deep .p-multiselect{transition:border-color var(--asc-transition-fast),box-shadow var(--asc-transition-fast)}:host ::ng-deep .p-multiselect-label-container{display:flex;align-items:center}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-xs);border-radius:12px}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-xs);border-radius:12px}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 8px;font-size:12px;font-weight:400;line-height:16px;display:
|
|
3934
|
+
`, styles: [":host{display:block;width:100%}.asc-select-filter-icon{color:var(--asc-icon-secondary)}:host ::ng-deep p-select,:host ::ng-deep p-multiselect,:host ::ng-deep .p-select,:host ::ng-deep .p-multiselect{width:100%}.asc-select-view{display:block;width:100%;min-height:20px;box-sizing:border-box;color:var(--asc-text-primary);word-break:break-word}:host ::ng-deep .p-select,:host ::ng-deep .p-multiselect{transition:border-color var(--asc-transition-fast),box-shadow var(--asc-transition-fast)}:host ::ng-deep .p-multiselect-label-container{display:flex;align-items:center}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-xs);border-radius:12px}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-xs);border-radius:12px}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 8px;font-size:12px;font-weight:400;line-height:16px;display:block;align-content:center}:host(.asc-select--sm:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-sm);border-radius:12px}:host(.asc-select--sm:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-sm);border-radius:12px}:host(.asc-select--sm:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--sm:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 8px;font-size:12px;font-weight:400;line-height:18px;display:block;align-content:center}:host(.asc-select--md:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-md);border-radius:12px}:host(.asc-select--md:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-md);border-radius:12px}:host(.asc-select--md:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--md:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 8px;font-size:14px;font-weight:400;line-height:20px;display:block;align-content:center}:host(.asc-select--lg:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-lg);border-radius:12px}:host(.asc-select--lg:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-lg);border-radius:12px}:host(.asc-select--lg:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--lg:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 10px;font-size:16px;font-weight:400;line-height:24px;display:block;align-content:center}:host(.asc-select--xl:not(.asc-select--float-in)) ::ng-deep .p-select{height:var(--asc-h-xl);border-radius:12px}:host(.asc-select--xl:not(.asc-select--float-in)) ::ng-deep .p-multiselect{min-height:var(--asc-h-xl);border-radius:12px}:host(.asc-select--xl:not(.asc-select--float-in)) ::ng-deep .p-select-label,:host(.asc-select--xl:not(.asc-select--float-in)) ::ng-deep .p-multiselect-label{padding:0 12px;font-size:18px;font-weight:400;line-height:28px;display:block;align-content:center}:host ::ng-deep .p-select-label,:host ::ng-deep .p-multiselect-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}:host ::ng-deep .p-multiselect-label{flex:1 1 auto}:host(.asc-select--multi) ::ng-deep .p-multiselect-display-chip .p-multiselect-label{display:flex;align-items:center}:host(.asc-select--xs) ::ng-deep .p-select-label,:host(.asc-select--xs) ::ng-deep .p-multiselect-label{line-height:16px}:host(.asc-select--sm) ::ng-deep .p-select-label,:host(.asc-select--sm) ::ng-deep .p-multiselect-label{line-height:18px}:host(.asc-select--md) ::ng-deep .p-select-label,:host(.asc-select--md) ::ng-deep .p-multiselect-label{line-height:20px}:host(.asc-select--lg) ::ng-deep .p-select-label,:host(.asc-select--lg) ::ng-deep .p-multiselect-label{line-height:24px}:host(.asc-select--xl) ::ng-deep .p-select-label,:host(.asc-select--xl) ::ng-deep .p-multiselect-label{line-height:28px}:host(.asc-select--xs:not(.asc-select--float-in)) ::ng-deep .p-select-label{height:var(--asc-h-xs)}:host(.asc-select--sm:not(.asc-select--float-in)) ::ng-deep .p-select-label{height:var(--asc-h-sm)}:host(.asc-select--md:not(.asc-select--float-in)) ::ng-deep .p-select-label{height:var(--asc-h-md)}:host(.asc-select--lg:not(.asc-select--float-in)) ::ng-deep .p-select-label{height:var(--asc-h-lg)}:host(.asc-select--xl:not(.asc-select--float-in)) ::ng-deep .p-select-label{height:var(--asc-h-xl)}:host{--p-icon-size: 20px}:host(.asc-select--xs){--p-icon-size: 14px}:host(.asc-select--xl){--p-icon-size: 24px}:host ::ng-deep .p-select-overlay,:host ::ng-deep .p-multiselect-overlay{--p-icon-size: 1rem}:host ::ng-deep .p-select-dropdown,:host ::ng-deep .p-multiselect-dropdown{--p-icon-size: 13px}:host ::ng-deep .p-select-dropdown-icon,:host ::ng-deep .p-multiselect-dropdown-icon{font-size:13px}:host ::ng-deep .p-select-clear-icon,:host ::ng-deep .p-multiselect-clear-icon{box-sizing:border-box;padding:calc(var(--p-icon-size) / 4);border-radius:50%;background:var(--asc-input-clear-bg, #DEDFE0);color:var(--asc-input-clear-color, #FFFFFF);cursor:pointer}:host ::ng-deep .p-select-clear-icon:hover,:host ::ng-deep .p-multiselect-clear-icon:hover{background:var(--asc-input-clear-bg-hover, #C0C0C2)}:host(.asc-select--disabled) ::ng-deep .p-select,:host(.asc-select--disabled) ::ng-deep .p-multiselect{border-color:var(--asc-formfield-disabled-border-color, #F2F3F5)}:host(.asc-select--invalid) ::ng-deep .p-select,:host(.asc-select--invalid) ::ng-deep .p-multiselect{border-color:var(--asc-border-color-invalid)!important}:host(.asc-select--invalid) ::ng-deep .p-select:focus-within,:host(.asc-select--invalid) ::ng-deep .p-multiselect:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--asc-color-danger) 20%,transparent)}\n"] }]
|
|
3808
3935
|
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], filterable: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterable", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], grouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "grouped", required: false }] }], display: [{ type: i0.Input, args: [{ isSignal: true, alias: "display", required: false }] }], maxSelectedLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelectedLabels", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], floatLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabel", required: false }] }], floatLabelVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "floatLabelVariant", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], focused: [{ type: i0.Output, args: ["focused"] }], blurred: [{ type: i0.Output, args: ["blurred"] }], panelShow: [{ type: i0.Output, args: ["panelShow"] }], panelHide: [{ type: i0.Output, args: ["panelHide"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }] } });
|
|
3809
3936
|
|
|
3810
3937
|
// ─────────────────────────────────────────────────────────────────────────────
|