@shival99/z-ui 1.9.16 → 1.9.18
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/fesm2022/shival99-z-ui-components-z-accordion.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +21 -16
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs +9 -9
- package/fesm2022/shival99-z-ui-components-z-button.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +42 -42
- package/fesm2022/shival99-z-ui-components-z-card.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-chat.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-code.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +15 -15
- package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-empty.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-filter.mjs +27 -27
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +12 -12
- package/fesm2022/shival99-z-ui-components-z-icon.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-input.mjs +4 -4
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-kanban.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-loading.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-menu.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-modal.mjs +15 -15
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-popover.mjs +9 -9
- package/fesm2022/shival99-z-ui-components-z-radio.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-select.mjs +20 -20
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-steps.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-switch.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-table.mjs +72 -72
- package/fesm2022/shival99-z-ui-components-z-tabs.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-tags.mjs +12 -12
- package/fesm2022/shival99-z-ui-components-z-timeline.mjs +3 -3
- package/fesm2022/shival99-z-ui-components-z-toast.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +6 -6
- package/fesm2022/shival99-z-ui-components-z-upload.mjs +3 -3
- package/fesm2022/shival99-z-ui-pipes.mjs +18 -18
- package/fesm2022/shival99-z-ui-services.mjs +24 -24
- package/package.json +2 -1
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +2 -1
- package/types/shival99-z-ui-providers.d.ts +2 -2
|
@@ -132,10 +132,10 @@ class ZPaginationComponent {
|
|
|
132
132
|
pageSize: this.zPageSize(),
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
136
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZPaginationComponent, isStandalone: true, selector: "z-pagination", inputs: { zPageIndex: { classPropertyName: "zPageIndex", publicName: "zPageIndex", isSignal: true, isRequired: false, transformFunction: null }, zPageSize: { classPropertyName: "zPageSize", publicName: "zPageSize", isSignal: true, isRequired: false, transformFunction: null }, zTotal: { classPropertyName: "zTotal", publicName: "zTotal", isSignal: true, isRequired: true, transformFunction: null }, zPageSizeOptions: { classPropertyName: "zPageSizeOptions", publicName: "zPageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, zShowSizeChanger: { classPropertyName: "zShowSizeChanger", publicName: "zShowSizeChanger", isSignal: true, isRequired: false, transformFunction: null }, zShowQuickJumper: { classPropertyName: "zShowQuickJumper", publicName: "zShowQuickJumper", isSignal: true, isRequired: false, transformFunction: null }, zShowTotal: { classPropertyName: "zShowTotal", publicName: "zShowTotal", isSignal: true, isRequired: false, transformFunction: null }, zSimple: { classPropertyName: "zSimple", publicName: "zSimple", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null }, zTotalLabel: { classPropertyName: "zTotalLabel", publicName: "zTotalLabel", isSignal: true, isRequired: false, transformFunction: null }, zPerPageLabel: { classPropertyName: "zPerPageLabel", publicName: "zPerPageLabel", isSignal: true, isRequired: false, transformFunction: null }, zGoToLabel: { classPropertyName: "zGoToLabel", publicName: "zGoToLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnPageChange: "zOnPageChange", zPageIndex: "zPageIndexChange", zPageSize: "zPageSizeChange" }, host: { classAttribute: "z-pagination flex items-center gap-2" }, ngImport: i0, template: "@if (zShowTotal()) {\n <span class=\"text-muted-foreground text-sm whitespace-nowrap\">{{ totalLabelText() }}</span>\n}\n\n@if (!zSimple()) {\n <!-- Page Size Selector -->\n @if (zShowSizeChanger()) {\n <z-select\n class=\"w-fit\"\n zSize=\"sm\"\n [zOptions]=\"pageSizeOptions()\"\n [ngModel]=\"zPageSize()\"\n (ngModelChange)=\"onPageSizeChange($event)\"\n [zDisabled]=\"zDisabled()\"\n [zShowSearch]=\"false\" />\n }\n\n <z-button-group class=\"z-pagination-pages\">\n <!-- Prev Button -->\n <z-button zType=\"outline\" zSize=\"sm\" [zDisabled]=\"!canGoPrev() || zDisabled()\" (click)=\"goToPrev()\">\n <z-icon zType=\"lucideChevronLeft\" zSize=\"16\" />\n </z-button>\n\n <!-- Page Numbers -->\n @for (page of visiblePages(); track $index) {\n @if (page === 'ellipsis') {\n <span\n class=\"z-pagination-ellipsis text-muted-foreground border-input flex h-8 w-8 items-center justify-center border-y border-r bg-transparent text-sm\">\n ...\n </span>\n } @else {\n <z-button\n zType=\"outline\"\n [zWave]=\"false\"\n zSize=\"sm\"\n [class]=\"\n page === zPageIndex() ? 'relative min-w-8 overflow-hidden !bg-transparent hover:!bg-transparent' : 'min-w-8'\n \"\n [zDisabled]=\"zDisabled()\"\n (click)=\"goToPage(page)\">\n @if (page === zPageIndex()) {\n <span class=\"bg-primary pointer-events-none absolute inset-[1px] rounded-[1px]\"></span>\n }\n <span [class]=\"page === zPageIndex() ? 'text-primary-foreground relative z-[1]' : ''\">{{ page }}</span>\n </z-button>\n }\n }\n\n <!-- Next Button -->\n <z-button zType=\"outline\" zSize=\"sm\" [zDisabled]=\"!canGoNext() || zDisabled()\" (click)=\"goToNext()\">\n <z-icon zType=\"lucideChevronRight\" zSize=\"16\" />\n </z-button>\n </z-button-group>\n\n <!-- Quick Jumper -->\n @if (zShowQuickJumper()) {\n <div class=\"flex items-center gap-2 text-sm\">\n <span class=\"text-muted-foreground whitespace-nowrap\">{{ goToLabelText() }}</span>\n <z-input\n zType=\"number\"\n zSize=\"sm\"\n class=\"w-14\"\n [ngModel]=\"zPageIndex()\"\n [zMin]=\"1\"\n [zMax]=\"totalPages()\"\n [zDisabled]=\"zDisabled()\"\n (keydown.enter)=\"onQuickJump($event)\"\n (blur)=\"onQuickJump($event)\" />\n </div>\n }\n} @else {\n <!-- Simple Mode -->\n <z-button-group>\n <z-button zType=\"outline\" zSize=\"sm\" [zDisabled]=\"!canGoPrev() || zDisabled()\" (click)=\"goToPrev()\">\n <z-icon zType=\"lucideChevronLeft\" zSize=\"16\" />\n <span class=\"ml-1\">{{ 'i18n_z_ui_pagination_previous' | translate }}</span>\n </z-button>\n\n <span class=\"text-muted-foreground border-input flex h-8 items-center border-y bg-transparent px-3 text-sm\">\n {{ zPageIndex() }} / {{ totalPages() }}\n </span>\n\n <z-button zType=\"outline\" zSize=\"sm\" [zDisabled]=\"!canGoNext() || zDisabled()\" (click)=\"goToNext()\">\n <span class=\"mr-1\">{{ 'i18n_z_ui_pagination_next' | translate }}</span>\n <z-icon zType=\"lucideChevronRight\" zSize=\"16\" />\n </z-button>\n </z-button-group>\n}\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: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "component", type: ZButtonGroupComponent, selector: "z-button-group", inputs: ["zClass", "zOrientation", "zActive"], outputs: ["zActiveChange"], exportAs: ["zButtonGroup"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZInputComponent, selector: "z-input", inputs: ["class", "zType", "zSize", "zAlign", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zPrefix", "zSuffix", "zMin", "zMax", "zStep", "zShowArrows", "zMask", "zDecimalPlaces", "zAllowNegative", "zThousandSeparator", "zDecimalMarker", "zValidators", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zShowPasswordToggle", "zSearch", "zDebounce", "zAutofocus", "zAutoComplete", "zAllowClear", "zAutoSizeContent", "zRows", "zResize", "zMaxLength", "zAutoSuggest", "zColorConfig"], outputs: ["zOnSearch", "zOnChange", "zOnBlur", "zOnFocus", "zOnKeydown", "zOnEnter", "zOnColorCollapse", "zControl", "zEvent"], exportAs: ["zInput"] }, { kind: "component", type: ZSelectComponent, selector: "z-select", inputs: ["class", "zMode", "zSize", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zLoading", "zPrefix", "zAllowClear", "zWrap", "zShowSearch", "zPlaceholderSearch", "zDebounce", "zNotFoundText", "zEmptyText", "zEmptyIcon", "zMaxTagCount", "zDropdownMaxHeight", "zOptionHeight", "zVirtualScroll", "zShowAction", "zOptions", "zTranslateLabels", "zKey", "zSearchServer", "zLoadingMore", "zEnableLoadMore", "zScrollDistance", "zMaxVisible", "zScrollClose", "zPosition", "zSelectedTemplate", "zOptionTemplate", "zActionTemplate", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zValidators"], outputs: ["zOnSearch", "zOnLoadMore", "zOnBlur", "zOnFocus", "zControl", "zEvent"], exportAs: ["zSelect"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
137
137
|
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZPaginationComponent, decorators: [{
|
|
139
139
|
type: Component,
|
|
140
140
|
args: [{ selector: 'z-pagination', imports: [
|
|
141
141
|
FormsModule,
|
|
@@ -139,8 +139,8 @@ class ZPopoverContentComponent {
|
|
|
139
139
|
this.showArrow.set(config.showArrow);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
143
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZPopoverContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
143
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZPopoverContentComponent, isStandalone: true, selector: "z-popover-content", host: { properties: { "class": "classes()", "attr.data-state": "state()", "attr.data-position": "position()" } }, ngImport: i0, template: `
|
|
144
144
|
<!-- Arrow layer - rotated square, partial border -->
|
|
145
145
|
@if (showArrow()) {
|
|
146
146
|
<div [class]="arrowClasses()" [style]="arrowStyle()"></div>
|
|
@@ -155,7 +155,7 @@ class ZPopoverContentComponent {
|
|
|
155
155
|
</div>
|
|
156
156
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
157
157
|
}
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZPopoverContentComponent, decorators: [{
|
|
159
159
|
type: Component,
|
|
160
160
|
args: [{
|
|
161
161
|
selector: 'z-popover-content',
|
|
@@ -614,14 +614,14 @@ class ZPopoverComponent {
|
|
|
614
614
|
this._listenerCleanups.forEach(cleanup => cleanup());
|
|
615
615
|
this._listenerCleanups = [];
|
|
616
616
|
}
|
|
617
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
618
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.
|
|
617
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
618
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.9", type: ZPopoverComponent, isStandalone: true, selector: "z-popover", inputs: { zContent: { classPropertyName: "zContent", publicName: "zContent", isSignal: true, isRequired: false, transformFunction: null }, zPosition: { classPropertyName: "zPosition", publicName: "zPosition", isSignal: true, isRequired: false, transformFunction: null }, zTrigger: { classPropertyName: "zTrigger", publicName: "zTrigger", isSignal: true, isRequired: false, transformFunction: null }, zClass: { classPropertyName: "zClass", publicName: "zClass", isSignal: true, isRequired: false, transformFunction: null }, zShowDelay: { classPropertyName: "zShowDelay", publicName: "zShowDelay", isSignal: true, isRequired: false, transformFunction: null }, zHideDelay: { classPropertyName: "zHideDelay", publicName: "zHideDelay", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null }, zOffset: { classPropertyName: "zOffset", publicName: "zOffset", isSignal: true, isRequired: false, transformFunction: null }, zManualClose: { classPropertyName: "zManualClose", publicName: "zManualClose", isSignal: true, isRequired: false, transformFunction: null }, zScrollClose: { classPropertyName: "zScrollClose", publicName: "zScrollClose", isSignal: true, isRequired: false, transformFunction: null }, zShowArrow: { classPropertyName: "zShowArrow", publicName: "zShowArrow", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zShow: "zShow", zHide: "zHide", zControl: "zControl" }, host: { classAttribute: "inline-block" }, viewQueries: [{ propertyName: "_trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
619
619
|
<span #trigger class="z-popover-trigger inline-block">
|
|
620
620
|
<ng-content />
|
|
621
621
|
</span>
|
|
622
622
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
623
623
|
}
|
|
624
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZPopoverComponent, decorators: [{
|
|
625
625
|
type: Component,
|
|
626
626
|
args: [{
|
|
627
627
|
selector: 'z-popover',
|
|
@@ -968,10 +968,10 @@ class ZPopoverDirective {
|
|
|
968
968
|
this._listenerCleanups.forEach(cleanup => cleanup());
|
|
969
969
|
this._listenerCleanups = [];
|
|
970
970
|
}
|
|
971
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
972
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
971
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
972
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.9", type: ZPopoverDirective, isStandalone: true, selector: "[z-popover]", inputs: { zContent: { classPropertyName: "zContent", publicName: "zPopoverContent", isSignal: true, isRequired: false, transformFunction: null }, zPosition: { classPropertyName: "zPosition", publicName: "zPosition", isSignal: true, isRequired: false, transformFunction: null }, zTrigger: { classPropertyName: "zTrigger", publicName: "zTrigger", isSignal: true, isRequired: false, transformFunction: null }, zClass: { classPropertyName: "zClass", publicName: "zClass", isSignal: true, isRequired: false, transformFunction: null }, zShowDelay: { classPropertyName: "zShowDelay", publicName: "zShowDelay", isSignal: true, isRequired: false, transformFunction: null }, zHideDelay: { classPropertyName: "zHideDelay", publicName: "zHideDelay", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null }, zOffset: { classPropertyName: "zOffset", publicName: "zOffset", isSignal: true, isRequired: false, transformFunction: null }, zPopoverWidth: { classPropertyName: "zPopoverWidth", publicName: "zPopoverWidth", isSignal: true, isRequired: false, transformFunction: null }, zManualClose: { classPropertyName: "zManualClose", publicName: "zManualClose", isSignal: true, isRequired: false, transformFunction: null }, zScrollClose: { classPropertyName: "zScrollClose", publicName: "zScrollClose", isSignal: true, isRequired: false, transformFunction: null }, zShowArrow: { classPropertyName: "zShowArrow", publicName: "zShowArrow", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zShow: "zShow", zHide: "zHide", zHideStart: "zHideStart", zControl: "zControl", zPositionChange: "zPositionChange" }, exportAs: ["zPopover"], ngImport: i0 });
|
|
973
973
|
}
|
|
974
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZPopoverDirective, decorators: [{
|
|
975
975
|
type: Directive,
|
|
976
976
|
args: [{
|
|
977
977
|
selector: '[z-popover]',
|
|
@@ -137,8 +137,8 @@ class ZRadioComponent {
|
|
|
137
137
|
getOptionState(option) {
|
|
138
138
|
return this.isOptionChecked(option) ? 'checked' : 'unchecked';
|
|
139
139
|
}
|
|
140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
141
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZRadioComponent, isStandalone: true, selector: "z-radio", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zLabel: { classPropertyName: "zLabel", publicName: "zLabel", isSignal: true, isRequired: false, transformFunction: null }, zText: { classPropertyName: "zText", publicName: "zText", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null }, zValue: { classPropertyName: "zValue", publicName: "zValue", isSignal: true, isRequired: false, transformFunction: null }, zOptions: { classPropertyName: "zOptions", publicName: "zOptions", isSignal: true, isRequired: false, transformFunction: null }, zOrientation: { classPropertyName: "zOrientation", publicName: "zOrientation", isSignal: true, isRequired: false, transformFunction: null }, zSelectedValue: { classPropertyName: "zSelectedValue", publicName: "zSelectedValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zChange: "zChange", zOnBlur: "zOnBlur", zOnFocus: "zOnFocus", zEvent: "zEvent", zSelectedValue: "zSelectedValueChange" }, host: { properties: { "class": "hostClasses()" } }, providers: [
|
|
142
142
|
{
|
|
143
143
|
provide: NG_VALUE_ACCESSOR,
|
|
144
144
|
useExisting: forwardRef(() => ZRadioComponent),
|
|
@@ -146,7 +146,7 @@ class ZRadioComponent {
|
|
|
146
146
|
},
|
|
147
147
|
], ngImport: i0, template: "<!-- Group Mode -->\n@if (zType() === 'group') {\n <!-- Label above group -->\n @if (zLabel()) {\n <label class=\"text-xs leading-none font-medium\">{{ zLabel() }}</label>\n }\n\n <div [class]=\"groupClasses()\">\n @for (option of zOptions(); track option.value) {\n <label\n class=\"inline-flex cursor-pointer items-center gap-2\"\n [class.opacity-40]=\"option.disabled || isDisabled()\"\n [class.dark:opacity-50]=\"option.disabled || isDisabled()\"\n [class.cursor-not-allowed]=\"option.disabled || isDisabled()\">\n <button\n type=\"button\"\n role=\"radio\"\n [class]=\"radioClasses()\"\n [attr.aria-checked]=\"isOptionChecked(option)\"\n [attr.data-state]=\"getOptionState(option)\"\n [disabled]=\"isDisabled() || option.disabled\"\n (click)=\"onOptionClick(option)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\">\n @if (isOptionChecked(option)) {\n <span [class]=\"indicatorClasses()\"></span>\n }\n </button>\n <span [class]=\"labelClasses()\" [class.text-muted-foreground]=\"option.disabled\">{{ option.label }}</span>\n </label>\n }\n </div>\n}\n\n<!-- Default Mode (single radio) -->\n@if (zType() === 'default') {\n <!-- Label above -->\n @if (zLabel()) {\n <label class=\"text-xs leading-none font-medium\">{{ zLabel() }}</label>\n }\n\n <div class=\"inline-flex items-center gap-2\">\n <button\n type=\"button\"\n role=\"radio\"\n [class]=\"radioClasses()\"\n [attr.aria-checked]=\"isChecked()\"\n [attr.data-state]=\"getRadioState()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onRadioClick()\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\">\n @if (isChecked()) {\n <span [class]=\"indicatorClasses()\"></span>\n }\n </button>\n @if (zText()) {\n <label [class]=\"labelClasses()\" (click)=\"onRadioClick()\">{{ zText() }}</label>\n }\n </div>\n}\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
148
148
|
}
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZRadioComponent, decorators: [{
|
|
150
150
|
type: Component,
|
|
151
151
|
args: [{ selector: 'z-radio', imports: [], standalone: true, providers: [
|
|
152
152
|
{
|
|
@@ -19,10 +19,10 @@ import { cva } from 'class-variance-authority';
|
|
|
19
19
|
|
|
20
20
|
class ZSelectOptionDirective {
|
|
21
21
|
templateRef = inject((TemplateRef));
|
|
22
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
23
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSelectOptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
23
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: ZSelectOptionDirective, isStandalone: true, selector: "[z-select-option], [zSelectOption]", ngImport: i0 });
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSelectOptionDirective, decorators: [{
|
|
26
26
|
type: Directive,
|
|
27
27
|
args: [{
|
|
28
28
|
selector: '[z-select-option], [zSelectOption]',
|
|
@@ -32,10 +32,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
32
32
|
|
|
33
33
|
class ZSelectSelectedDirective {
|
|
34
34
|
templateRef = inject((TemplateRef));
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
36
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.
|
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSelectSelectedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
36
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: ZSelectSelectedDirective, isStandalone: true, selector: "[z-select-selected], [zSelectSelected]", ngImport: i0 });
|
|
37
37
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSelectSelectedDirective, decorators: [{
|
|
39
39
|
type: Directive,
|
|
40
40
|
args: [{
|
|
41
41
|
selector: '[z-select-selected], [zSelectSelected]',
|
|
@@ -51,10 +51,10 @@ class ZIsSelectedPipe {
|
|
|
51
51
|
}
|
|
52
52
|
return value === option.value;
|
|
53
53
|
}
|
|
54
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
55
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZIsSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
55
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.9", ngImport: i0, type: ZIsSelectedPipe, isStandalone: true, name: "zIsSelected" });
|
|
56
56
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZIsSelectedPipe, decorators: [{
|
|
58
58
|
type: Pipe,
|
|
59
59
|
args: [{
|
|
60
60
|
name: 'zIsSelected',
|
|
@@ -125,10 +125,10 @@ class ZOptionClassesPipe {
|
|
|
125
125
|
disabled: isDisabled ?? false,
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
129
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.
|
|
128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZOptionClassesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
129
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.9", ngImport: i0, type: ZOptionClassesPipe, isStandalone: true, name: "zOptionClasses" });
|
|
130
130
|
}
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZOptionClassesPipe, decorators: [{
|
|
132
132
|
type: Pipe,
|
|
133
133
|
args: [{
|
|
134
134
|
name: 'zOptionClasses',
|
|
@@ -228,10 +228,10 @@ class ZTagClassesPipe {
|
|
|
228
228
|
}
|
|
229
229
|
return zMergeClasses(baseClasses, 'bg-muted text-foreground border-border');
|
|
230
230
|
}
|
|
231
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
232
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.
|
|
231
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZTagClassesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
232
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.0.9", ngImport: i0, type: ZTagClassesPipe, isStandalone: true, name: "zTagClasses" });
|
|
233
233
|
}
|
|
234
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZTagClassesPipe, decorators: [{
|
|
235
235
|
type: Pipe,
|
|
236
236
|
args: [{
|
|
237
237
|
name: 'zTagClasses',
|
|
@@ -1103,16 +1103,16 @@ class ZSelectComponent {
|
|
|
1103
1103
|
this._asyncValidationSubject.next(value);
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1107
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1106
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1107
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZSelectComponent, isStandalone: true, selector: "z-select", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zMode: { classPropertyName: "zMode", publicName: "zMode", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zLabel: { classPropertyName: "zLabel", publicName: "zLabel", isSignal: true, isRequired: false, transformFunction: null }, zLabelClass: { classPropertyName: "zLabelClass", publicName: "zLabelClass", isSignal: true, isRequired: false, transformFunction: null }, zPlaceholder: { classPropertyName: "zPlaceholder", publicName: "zPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, zRequired: { classPropertyName: "zRequired", publicName: "zRequired", isSignal: true, isRequired: false, transformFunction: null }, zDisabled: { classPropertyName: "zDisabled", publicName: "zDisabled", isSignal: true, isRequired: false, transformFunction: null }, zReadonly: { classPropertyName: "zReadonly", publicName: "zReadonly", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zPrefix: { classPropertyName: "zPrefix", publicName: "zPrefix", isSignal: true, isRequired: false, transformFunction: null }, zAllowClear: { classPropertyName: "zAllowClear", publicName: "zAllowClear", isSignal: true, isRequired: false, transformFunction: null }, zWrap: { classPropertyName: "zWrap", publicName: "zWrap", isSignal: true, isRequired: false, transformFunction: null }, zShowSearch: { classPropertyName: "zShowSearch", publicName: "zShowSearch", isSignal: true, isRequired: false, transformFunction: null }, zPlaceholderSearch: { classPropertyName: "zPlaceholderSearch", publicName: "zPlaceholderSearch", isSignal: true, isRequired: false, transformFunction: null }, zDebounce: { classPropertyName: "zDebounce", publicName: "zDebounce", isSignal: true, isRequired: false, transformFunction: null }, zNotFoundText: { classPropertyName: "zNotFoundText", publicName: "zNotFoundText", isSignal: true, isRequired: false, transformFunction: null }, zEmptyText: { classPropertyName: "zEmptyText", publicName: "zEmptyText", isSignal: true, isRequired: false, transformFunction: null }, zEmptyIcon: { classPropertyName: "zEmptyIcon", publicName: "zEmptyIcon", isSignal: true, isRequired: false, transformFunction: null }, zMaxTagCount: { classPropertyName: "zMaxTagCount", publicName: "zMaxTagCount", isSignal: true, isRequired: false, transformFunction: null }, zDropdownMaxHeight: { classPropertyName: "zDropdownMaxHeight", publicName: "zDropdownMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, zOptionHeight: { classPropertyName: "zOptionHeight", publicName: "zOptionHeight", isSignal: true, isRequired: false, transformFunction: null }, zVirtualScroll: { classPropertyName: "zVirtualScroll", publicName: "zVirtualScroll", isSignal: true, isRequired: false, transformFunction: null }, zShowAction: { classPropertyName: "zShowAction", publicName: "zShowAction", isSignal: true, isRequired: false, transformFunction: null }, zOptions: { classPropertyName: "zOptions", publicName: "zOptions", isSignal: true, isRequired: false, transformFunction: null }, zTranslateLabels: { classPropertyName: "zTranslateLabels", publicName: "zTranslateLabels", isSignal: true, isRequired: false, transformFunction: null }, zKey: { classPropertyName: "zKey", publicName: "zKey", isSignal: true, isRequired: false, transformFunction: null }, zSearchServer: { classPropertyName: "zSearchServer", publicName: "zSearchServer", isSignal: true, isRequired: false, transformFunction: null }, zLoadingMore: { classPropertyName: "zLoadingMore", publicName: "zLoadingMore", isSignal: true, isRequired: false, transformFunction: null }, zEnableLoadMore: { classPropertyName: "zEnableLoadMore", publicName: "zEnableLoadMore", isSignal: true, isRequired: false, transformFunction: null }, zScrollDistance: { classPropertyName: "zScrollDistance", publicName: "zScrollDistance", isSignal: true, isRequired: false, transformFunction: null }, zMaxVisible: { classPropertyName: "zMaxVisible", publicName: "zMaxVisible", isSignal: true, isRequired: false, transformFunction: null }, zScrollClose: { classPropertyName: "zScrollClose", publicName: "zScrollClose", isSignal: true, isRequired: false, transformFunction: null }, zPosition: { classPropertyName: "zPosition", publicName: "zPosition", isSignal: true, isRequired: false, transformFunction: null }, zSelectedTemplate: { classPropertyName: "zSelectedTemplate", publicName: "zSelectedTemplate", isSignal: true, isRequired: false, transformFunction: null }, zOptionTemplate: { classPropertyName: "zOptionTemplate", publicName: "zOptionTemplate", isSignal: true, isRequired: false, transformFunction: null }, zActionTemplate: { classPropertyName: "zActionTemplate", publicName: "zActionTemplate", isSignal: true, isRequired: false, transformFunction: null }, zAsyncValidators: { classPropertyName: "zAsyncValidators", publicName: "zAsyncValidators", isSignal: true, isRequired: false, transformFunction: null }, zAsyncDebounce: { classPropertyName: "zAsyncDebounce", publicName: "zAsyncDebounce", isSignal: true, isRequired: false, transformFunction: null }, zAsyncValidateOn: { classPropertyName: "zAsyncValidateOn", publicName: "zAsyncValidateOn", isSignal: true, isRequired: false, transformFunction: null }, zValidators: { classPropertyName: "zValidators", publicName: "zValidators", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnSearch: "zOnSearch", zOnLoadMore: "zOnLoadMore", zOnBlur: "zOnBlur", zOnFocus: "zOnFocus", zControl: "zControl", zEvent: "zEvent" }, providers: [
|
|
1108
1108
|
{
|
|
1109
1109
|
provide: NG_VALUE_ACCESSOR,
|
|
1110
1110
|
useExisting: forwardRef(() => ZSelectComponent),
|
|
1111
1111
|
multi: true,
|
|
1112
1112
|
},
|
|
1113
|
-
], queries: [{ propertyName: "customSelectedDirective", first: true, predicate: (ZSelectSelectedDirective), descendants: true, isSignal: true }, { propertyName: "customOptionDirective", first: true, predicate: (ZSelectOptionDirective), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["triggerEl"], descendants: true, isSignal: true }, { propertyName: "searchInputRef", first: true, predicate: ["dropdownSearchInput"], descendants: true, isSignal: true }, { propertyName: "dropdownTpl", first: true, predicate: ["dropdownTpl"], descendants: true, isSignal: true }, { propertyName: "optionsContainerRef", first: true, predicate: ["optionsContainer"], descendants: true, isSignal: true }, { propertyName: "virtualScrollRef", first: true, predicate: ["virtualScrollElement"], descendants: true, isSignal: true }, { propertyName: "loadMoreSentinelRef", first: true, predicate: ["loadMoreSentinel"], descendants: true, isSignal: true }], exportAs: ["zSelect"], ngImport: i0, template: "<div class=\"z-select-wrapper relative flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [for]=\"selectId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n <div class=\"relative\">\n <div\n #triggerEl\n [id]=\"selectId\"\n z-popover\n [zPopoverContent]=\"dropdownTpl\"\n [zOffset]=\"6\"\n [zDisabled]=\"isInteractionDisabled()\"\n [zScrollClose]=\"zScrollClose()\"\n zTrigger=\"click\"\n [zPosition]=\"zPosition()\"\n zClass=\"border-0 shadow-none p-0\"\n (zControl)=\"onPopoverControl($event)\"\n (zShow)=\"onPopoverShow()\"\n (zHideStart)=\"onPopoverHideStart()\"\n (zHide)=\"onPopoverHideEnd()\"\n class=\"z-select-trigger cursor-pointer\"\n [class]=\"selectClasses()\"\n [class.z-select-open]=\"uiState().isOpen\"\n (mousedown)=\"onTriggerMousedown()\"\n (keydown)=\"onTriggerKeydown($event)\"\n tabindex=\"0\"\n role=\"combobox\"\n [attr.aria-expanded]=\"uiState().isOpen\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"dropdownId\">\n @if (zPrefix()) {\n <z-icon [zType]=\"zPrefix() || 'lucideChevronDown'\" zSize=\"18\" class=\"text-muted-foreground shrink-0\" />\n }\n\n <div\n class=\"z-select-tags-wrapper flex min-w-0 flex-1 items-center gap-1\"\n [class.flex-wrap]=\"zWrap()\"\n [class.overflow-hidden]=\"!zWrap()\">\n @if (isMultipleMode()) {\n @if (selectedOptions().length === 0) {\n <span class=\"text-muted-foreground truncate whitespace-nowrap\">\n {{ effectivePlaceholder() }}\n </span>\n } @else {\n @for (opt of displayedTags(); track opt.value) {\n <span\n #tagEl\n [class]=\"opt | zTagClasses: zSize() : isTagsMode()\"\n class=\"z-select-tag\"\n [class.min-w-0]=\"!zWrap()\"\n [class.shrink]=\"!zWrap()\">\n @if (effectiveSelectedTemplate()) {\n <ng-container *ngTemplateOutlet=\"effectiveSelectedTemplate()!; context: { $implicit: opt }\" />\n } @else {\n <span\n class=\"truncate\"\n [class.max-w-25]=\"zWrap()\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"6\"\n [zTriggerElement]=\"tagEl\">\n {{ opt.label }}\n </span>\n }\n @if (zAllowClear() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"-mr-0.5 flex size-3.5 shrink-0 items-center justify-center rounded-sm transition-colors hover:bg-black/10\"\n (click)=\"removeOption($event, opt)\"\n tabindex=\"-1\">\n <z-icon zType=\"lucideX\" zSize=\"10\" />\n </button>\n }\n </span>\n }\n @if (remainingCount() > 0) {\n <span\n class=\"z-select-remaining text-muted-foreground bg-muted rounded-sm px-1.5 py-0.5 text-xs font-medium\">\n +{{ remainingCount() }}\n </span>\n }\n }\n } @else {\n @if (selectedOption()) {\n @if (effectiveSelectedTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"effectiveSelectedTemplate()!; context: { $implicit: selectedOption() }\" />\n } @else {\n <span\n class=\"truncate\"\n z-tooltip\n [zContent]=\"selectedOption()!.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"10\">\n {{ selectedOption()!.label }}\n </span>\n }\n } @else {\n <span class=\"text-muted-foreground truncate whitespace-nowrap\">\n {{ effectivePlaceholder() }}\n </span>\n }\n }\n </div>\n\n @if (zLoading() || zLoadingMore()) {\n <z-icon zType=\"lucideLoaderCircle\" zSize=\"18\" class=\"text-muted-foreground shrink-0 animate-spin\" />\n }\n\n @if (!zLoading() && zAllowClear() && hasValue() && !isDisabled() && !isReadonly()) {\n <button\n type=\"button\"\n class=\"text-muted-foreground hover:text-foreground flex shrink-0 items-center justify-center transition-colors\"\n (click)=\"clearAll($event)\"\n tabindex=\"-1\">\n <z-icon zType=\"lucideX\" zSize=\"18\" />\n </button>\n }\n\n @if (uiState().isValidating) {\n <z-icon zType=\"lucideLoader2\" zSize=\"18\" class=\"text-muted-foreground shrink-0 animate-spin\" />\n }\n\n <z-icon\n zType=\"lucideChevronDown\"\n zSize=\"18\"\n class=\"text-muted-foreground shrink-0 transition-transform duration-200\"\n [class.rotate-180]=\"uiState().isOpen\" />\n </div>\n\n @if (hasError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n </div>\n\n <ng-template #dropdownTpl let-close=\"close\">\n <div\n [id]=\"dropdownId\"\n class=\"z-select-dropdown bg-popover border-border rounded-sm border shadow-lg\"\n [style.width.px]=\"dropdownWidth()\"\n [style.min-width.px]=\"dropdownWidth()\">\n @if (zShowSearch()) {\n <div class=\"border-border flex items-center border-b px-3\">\n <z-icon zType=\"lucideSearch\" zSize=\"18\" class=\"text-muted-foreground/50 mr-2 shrink-0\" />\n <input\n #dropdownSearchInput\n type=\"text\"\n class=\"placeholder:text-muted-foreground text-foreground flex h-10 w-full bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50\"\n [placeholder]=\"effectivePlaceholderSearch()\"\n [ngModel]=\"searchText()\"\n (ngModelChange)=\"onSearchChange($event)\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\" />\n </div>\n }\n\n @if (zLoading()) {\n <div class=\"flex items-center justify-center\" [style.height.px]=\"optionsMaxHeight()\">\n <z-loading [zLoading]=\"true\" zSize=\"default\" />\n </div>\n } @else {\n @if (filteredOptions().length > 0) {\n @if (shouldUseVirtualScroll()) {\n <div\n #virtualScrollElement\n class=\"z-select-options z-select-virtual-scroll overflow-x-hidden overflow-y-auto overscroll-y-contain p-1\"\n [style.height.px]=\"optionsMaxHeight()\">\n <div class=\"z-select-virtual-inner relative\" [style.height.px]=\"virtualizer.getTotalSize()\">\n @for (virtualItem of virtualizer.getVirtualItems(); track virtualItem.index) {\n @let opt = filteredOptions()[virtualItem.index];\n <div\n #optionEl\n class=\"z-select-option absolute right-0 left-0 min-w-0\"\n [ngClass]=\"opt | zIsSelected: currentValue() : isMultipleMode() | zOptionClasses: opt.disabled\"\n [style.height.px]=\"zOptionHeight()\"\n [style.transform]=\"'translateY(' + virtualItem.start + 'px)'\"\n (click)=\"selectOption(opt, close)\">\n @if (effectiveOptionTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n effectiveOptionTemplate()!;\n context: { $implicit: opt, selected: opt | zIsSelected: currentValue() : isMultipleMode() }\n \" />\n } @else {\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n [zTriggerElement]=\"optionEl\"\n [innerHTML]=\"opt.label | zHighlight: searchText() | zSafeHtml\"></span>\n }\n @if (opt | zIsSelected: currentValue() : isMultipleMode()) {\n <z-icon zType=\"lucideCheck\" zSize=\"16\" [zStrokeWidth]=\"4\" class=\"text-primary ml-auto shrink-0\" />\n }\n </div>\n }\n </div>\n @if (zLoadingMore()) {\n <div\n class=\"bg-popover/80 absolute right-0 bottom-0 left-0 flex items-center justify-center py-2\"\n [style.transform]=\"'translateY(' + virtualizer.getTotalSize() + 'px)'\">\n <z-loading zSize=\"xs\" [zLoading]=\"true\" />\n </div>\n }\n </div>\n } @else {\n <div\n #optionsContainer\n class=\"z-select-options flex flex-col gap-0.75 overflow-x-hidden overflow-y-auto overscroll-y-contain p-1\"\n [style.maxHeight.px]=\"optionsMaxHeight()\">\n @for (opt of filteredOptions(); track opt.value) {\n <div\n #optionEl2\n class=\"z-select-option relative min-w-0\"\n [ngClass]=\"opt | zIsSelected: currentValue() : isMultipleMode() | zOptionClasses: opt.disabled\"\n [style.minHeight.px]=\"zOptionHeight()\"\n (click)=\"selectOption(opt, close)\">\n @if (effectiveOptionTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n effectiveOptionTemplate()!;\n context: { $implicit: opt, selected: opt | zIsSelected: currentValue() : isMultipleMode() }\n \" />\n } @else {\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zArrow]=\"false\"\n [zOffset]=\"5\"\n [zHideDelay]=\"0\"\n [zTriggerElement]=\"optionEl2\"\n [innerHTML]=\"opt.label | zHighlight: searchText() | zSafeHtml\"></span>\n }\n @if (opt | zIsSelected: currentValue() : isMultipleMode()) {\n <z-icon zType=\"lucideCheck\" zSize=\"18\" [zStrokeWidth]=\"4\" class=\"text-primary ml-auto shrink-0\" />\n }\n </div>\n }\n @if (zEnableLoadMore()) {\n <div #loadMoreSentinel class=\"h-px w-full shrink-0\"></div>\n }\n </div>\n }\n } @else {\n <div class=\"flex items-center justify-center p-1\" [style.height.px]=\"optionsMaxHeight()\">\n @if (isEmptyData()) {\n <z-empty [zIcon]=\"zEmptyIcon()\" zSize=\"sm\" [zMessage]=\"effectiveEmptyText()\" />\n } @else {\n <z-empty zIcon=\"lucideSearchX\" zSize=\"sm\" [zMessage]=\"effectiveNotFoundText()\" />\n }\n </div>\n }\n\n @if (zLoadingMore()) {\n <div class=\"z-select-loading-more border-border/50 flex items-center justify-center border-t py-1.5\">\n <z-loading zSize=\"xs\" [zLoading]=\"true\" />\n </div>\n }\n }\n\n @if (zShowAction() && (zActionTemplate() || isMultipleMode())) {\n <div class=\"border-border flex items-center gap-2 border-t px-2 py-1.5\">\n @if (zActionTemplate()) {\n <ng-container *ngTemplateOutlet=\"zActionTemplate()!\" />\n } @else {\n <z-button\n zSize=\"xs\"\n [zType]=\"isAllSelected() ? 'ghost-error' : 'ghost-info'\"\n class=\"min-w-0 flex-1\"\n (click)=\"toggleSelectAllAction()\"\n [zWave]=\"false\">\n <z-icon [zType]=\"isAllSelected() ? 'lucideX' : 'lucideCheckCheck'\" zSize=\"18\" class=\"shrink-0\" />\n <span class=\"truncate\">{{ isAllSelected() ? effectiveClearAllText() : effectiveSelectAllText() }}</span>\n </z-button>\n }\n </div>\n }\n </div>\n </ng-template>\n</div>\n", styles: [".z-select-trigger{-webkit-user-select:none;user-select:none}.z-select-trigger:focus{outline:none}.z-select-trigger *{cursor:inherit}.z-select-tag{-webkit-user-select:none;user-select:none;animation:z-select-tag-enter .2s cubic-bezier(.4,0,.2,1)}@keyframes z-select-tag-enter{0%{opacity:0;transform:scale(.8) translateY(.25rem)}to{opacity:1;transform:scale(1) translateY(0)}}.z-select-remaining{animation:z-select-remaining-enter .25s cubic-bezier(.4,0,.2,1)}@keyframes z-select-remaining-enter{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.z-select-dropdown input{text-overflow:ellipsis;overflow:hidden}.z-select-options{overflow-x:hidden!important}.z-select-virtual-scroll .z-select-virtual-inner{width:100%}.z-select-loading-more{animation:z-select-loading-enter .2s ease-out}@keyframes z-select-loading-enter{0%{opacity:0;transform:translateY(-.25rem)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: 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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: ZPopoverDirective, selector: "[z-popover]", inputs: ["zPopoverContent", "zPosition", "zTrigger", "zClass", "zShowDelay", "zHideDelay", "zDisabled", "zOffset", "zPopoverWidth", "zManualClose", "zScrollClose", "zShowArrow"], outputs: ["zShow", "zHide", "zHideStart", "zControl", "zPositionChange"], exportAs: ["zPopover"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "component", type: ZEmptyComponent, selector: "z-empty", inputs: ["class", "zType", "zIcon", "zIconSize", "zSize", "zMessage", "zDescription"] }, { kind: "directive", type: ZTooltipDirective, selector: "[z-tooltip], [zTooltip]", inputs: ["zContent", "zPosition", "zTrigger", "zTooltipType", "zTooltipSize", "zClass", "zShowDelay", "zHideDelay", "zArrow", "zDisabled", "zOffset", "zAutoDetect", "zTriggerElement", "zAlwaysShow", "zMaxWidth"], outputs: ["zShow", "zHide"], exportAs: ["zTooltip"] }, { kind: "component", type: ZLoadingComponent, selector: "z-loading", inputs: ["class", "zSpinner", "zSize", "zColor", "zText", "zOverlay", "zOverlayType", "zFullscreen", "zLoading"] }, { kind: "pipe", type: ZIsSelectedPipe, name: "zIsSelected" }, { kind: "pipe", type: ZOptionClassesPipe, name: "zOptionClasses" }, { kind: "pipe", type: ZTagClassesPipe, name: "zTagClasses" }, { kind: "pipe", type: ZHighlightPipe, name: "zHighlight" }, { kind: "pipe", type: ZSafeHtmlPipe, name: "zSafeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1113
|
+
], queries: [{ propertyName: "customSelectedDirective", first: true, predicate: (ZSelectSelectedDirective), descendants: true, isSignal: true }, { propertyName: "customOptionDirective", first: true, predicate: (ZSelectOptionDirective), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "triggerRef", first: true, predicate: ["triggerEl"], descendants: true, isSignal: true }, { propertyName: "searchInputRef", first: true, predicate: ["dropdownSearchInput"], descendants: true, isSignal: true }, { propertyName: "dropdownTpl", first: true, predicate: ["dropdownTpl"], descendants: true, isSignal: true }, { propertyName: "optionsContainerRef", first: true, predicate: ["optionsContainer"], descendants: true, isSignal: true }, { propertyName: "virtualScrollRef", first: true, predicate: ["virtualScrollElement"], descendants: true, isSignal: true }, { propertyName: "loadMoreSentinelRef", first: true, predicate: ["loadMoreSentinel"], descendants: true, isSignal: true }], exportAs: ["zSelect"], ngImport: i0, template: "<div class=\"z-select-wrapper relative flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [for]=\"selectId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n <div class=\"relative\">\n <div\n #triggerEl\n [id]=\"selectId\"\n z-popover\n [zPopoverContent]=\"dropdownTpl\"\n [zOffset]=\"6\"\n [zDisabled]=\"isInteractionDisabled()\"\n [zScrollClose]=\"zScrollClose()\"\n zTrigger=\"click\"\n [zPosition]=\"zPosition()\"\n zClass=\"border-0 shadow-none p-0\"\n (zControl)=\"onPopoverControl($event)\"\n (zShow)=\"onPopoverShow()\"\n (zHideStart)=\"onPopoverHideStart()\"\n (zHide)=\"onPopoverHideEnd()\"\n class=\"z-select-trigger cursor-pointer\"\n [class]=\"selectClasses()\"\n [class.z-select-open]=\"uiState().isOpen\"\n (mousedown)=\"onTriggerMousedown()\"\n (keydown)=\"onTriggerKeydown($event)\"\n tabindex=\"0\"\n role=\"combobox\"\n [attr.aria-expanded]=\"uiState().isOpen\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"dropdownId\">\n @if (zPrefix()) {\n <z-icon [zType]=\"zPrefix() || 'lucideChevronDown'\" zSize=\"18\" class=\"text-muted-foreground shrink-0\" />\n }\n\n <div\n class=\"z-select-tags-wrapper flex min-w-0 flex-1 items-center gap-1\"\n [class.flex-wrap]=\"zWrap()\"\n [class.overflow-hidden]=\"!zWrap()\">\n @if (isMultipleMode()) {\n @if (selectedOptions().length === 0) {\n <span class=\"text-muted-foreground truncate whitespace-nowrap\">\n {{ effectivePlaceholder() }}\n </span>\n } @else {\n @for (opt of displayedTags(); track opt.value) {\n <span\n #tagEl\n [class]=\"opt | zTagClasses: zSize() : isTagsMode()\"\n class=\"z-select-tag\"\n [class.min-w-0]=\"!zWrap()\"\n [class.shrink]=\"!zWrap()\">\n @if (effectiveSelectedTemplate()) {\n <ng-container *ngTemplateOutlet=\"effectiveSelectedTemplate()!; context: { $implicit: opt }\" />\n } @else {\n <span\n class=\"truncate\"\n [class.max-w-25]=\"zWrap()\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"6\"\n [zTriggerElement]=\"tagEl\">\n {{ opt.label }}\n </span>\n }\n @if (zAllowClear() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"-mr-0.5 flex size-3.5 shrink-0 items-center justify-center rounded-sm transition-colors hover:bg-black/10\"\n (click)=\"removeOption($event, opt)\"\n tabindex=\"-1\">\n <z-icon zType=\"lucideX\" zSize=\"10\" />\n </button>\n }\n </span>\n }\n @if (remainingCount() > 0) {\n <span\n class=\"z-select-remaining text-muted-foreground bg-muted rounded-sm px-1.5 py-0.5 text-xs font-medium\">\n +{{ remainingCount() }}\n </span>\n }\n }\n } @else {\n @if (selectedOption()) {\n @if (effectiveSelectedTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"effectiveSelectedTemplate()!; context: { $implicit: selectedOption() }\" />\n } @else {\n <span\n class=\"truncate\"\n z-tooltip\n [zContent]=\"selectedOption()!.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"10\">\n {{ selectedOption()!.label }}\n </span>\n }\n } @else {\n <span class=\"text-muted-foreground truncate whitespace-nowrap\">\n {{ effectivePlaceholder() }}\n </span>\n }\n }\n </div>\n\n @if (zLoading() || zLoadingMore()) {\n <z-icon zType=\"lucideLoaderCircle\" zSize=\"18\" class=\"text-muted-foreground shrink-0 animate-spin\" />\n }\n\n @if (!zLoading() && zAllowClear() && hasValue() && !isDisabled() && !isReadonly()) {\n <button\n type=\"button\"\n class=\"text-muted-foreground hover:text-foreground flex shrink-0 items-center justify-center transition-colors\"\n (click)=\"clearAll($event)\"\n tabindex=\"-1\">\n <z-icon zType=\"lucideX\" zSize=\"18\" />\n </button>\n }\n\n @if (uiState().isValidating) {\n <z-icon zType=\"lucideLoader2\" zSize=\"18\" class=\"text-muted-foreground shrink-0 animate-spin\" />\n }\n\n <z-icon\n zType=\"lucideChevronDown\"\n zSize=\"18\"\n class=\"text-muted-foreground shrink-0 transition-transform duration-200\"\n [class.rotate-180]=\"uiState().isOpen\" />\n </div>\n\n @if (hasError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 pt-2 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n </div>\n\n <ng-template #dropdownTpl let-close=\"close\">\n <div\n [id]=\"dropdownId\"\n class=\"z-select-dropdown bg-popover border-border rounded-sm border shadow-lg\"\n [style.width.px]=\"dropdownWidth()\"\n [style.min-width.px]=\"dropdownWidth()\">\n @if (zShowSearch()) {\n <div class=\"border-border flex items-center border-b px-3\">\n <z-icon zType=\"lucideSearch\" zSize=\"18\" class=\"text-muted-foreground/50 mr-2 shrink-0\" />\n <input\n #dropdownSearchInput\n type=\"text\"\n class=\"placeholder:text-muted-foreground text-foreground flex h-10 w-full bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50\"\n [placeholder]=\"effectivePlaceholderSearch()\"\n [ngModel]=\"searchText()\"\n (ngModelChange)=\"onSearchChange($event)\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\" />\n </div>\n }\n\n @if (zLoading()) {\n <div class=\"flex items-center justify-center\" [style.height.px]=\"optionsMaxHeight()\">\n <z-loading [zLoading]=\"true\" zSize=\"default\" />\n </div>\n } @else {\n @if (filteredOptions().length > 0) {\n @if (shouldUseVirtualScroll()) {\n <div\n #virtualScrollElement\n class=\"z-select-options z-select-virtual-scroll overflow-x-hidden overflow-y-auto overscroll-y-contain p-1\"\n [style.height.px]=\"optionsMaxHeight()\">\n <div class=\"z-select-virtual-inner relative\" [style.height.px]=\"virtualizer.getTotalSize()\">\n @for (virtualItem of virtualizer.getVirtualItems(); track virtualItem.index) {\n @let opt = filteredOptions()[virtualItem.index];\n <div\n #optionEl\n class=\"z-select-option absolute right-0 left-0 min-w-0\"\n [ngClass]=\"opt | zIsSelected: currentValue() : isMultipleMode() | zOptionClasses: opt.disabled\"\n [style.height.px]=\"zOptionHeight()\"\n [style.transform]=\"'translateY(' + virtualItem.start + 'px)'\"\n (click)=\"selectOption(opt, close)\">\n @if (effectiveOptionTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n effectiveOptionTemplate()!;\n context: { $implicit: opt, selected: opt | zIsSelected: currentValue() : isMultipleMode() }\n \" />\n } @else {\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n [zTriggerElement]=\"optionEl\"\n [innerHTML]=\"opt.label | zHighlight: searchText() | zSafeHtml\"></span>\n }\n @if (opt | zIsSelected: currentValue() : isMultipleMode()) {\n <z-icon zType=\"lucideCheck\" zSize=\"16\" [zStrokeWidth]=\"4\" class=\"text-primary ml-auto shrink-0\" />\n }\n </div>\n }\n </div>\n @if (zLoadingMore()) {\n <div\n class=\"bg-popover/80 absolute right-0 bottom-0 left-0 flex items-center justify-center py-2\"\n [style.transform]=\"'translateY(' + virtualizer.getTotalSize() + 'px)'\">\n <z-loading zSize=\"xs\" [zLoading]=\"true\" />\n </div>\n }\n </div>\n } @else {\n <div\n #optionsContainer\n class=\"z-select-options flex flex-col gap-0.75 overflow-x-hidden overflow-y-auto overscroll-y-contain p-1\"\n [style.maxHeight.px]=\"optionsMaxHeight()\">\n @for (opt of filteredOptions(); track opt.value) {\n <div\n #optionEl2\n class=\"z-select-option relative min-w-0\"\n [ngClass]=\"opt | zIsSelected: currentValue() : isMultipleMode() | zOptionClasses: opt.disabled\"\n [style.minHeight.px]=\"zOptionHeight()\"\n (click)=\"selectOption(opt, close)\">\n @if (effectiveOptionTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n effectiveOptionTemplate()!;\n context: { $implicit: opt, selected: opt | zIsSelected: currentValue() : isMultipleMode() }\n \" />\n } @else {\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zArrow]=\"false\"\n [zOffset]=\"5\"\n [zHideDelay]=\"0\"\n [zTriggerElement]=\"optionEl2\"\n [innerHTML]=\"opt.label | zHighlight: searchText() | zSafeHtml\"></span>\n }\n @if (opt | zIsSelected: currentValue() : isMultipleMode()) {\n <z-icon zType=\"lucideCheck\" zSize=\"18\" [zStrokeWidth]=\"4\" class=\"text-primary ml-auto shrink-0\" />\n }\n </div>\n }\n @if (zEnableLoadMore()) {\n <div #loadMoreSentinel class=\"h-px w-full shrink-0\"></div>\n }\n </div>\n }\n } @else {\n <div class=\"flex items-center justify-center p-1\" [style.height.px]=\"optionsMaxHeight()\">\n @if (isEmptyData()) {\n <z-empty [zIcon]=\"zEmptyIcon()\" zSize=\"sm\" [zMessage]=\"effectiveEmptyText()\" />\n } @else {\n <z-empty zIcon=\"lucideSearchX\" zSize=\"sm\" [zMessage]=\"effectiveNotFoundText()\" />\n }\n </div>\n }\n\n @if (zLoadingMore()) {\n <div class=\"z-select-loading-more border-border/50 flex items-center justify-center border-t py-1.5\">\n <z-loading zSize=\"xs\" [zLoading]=\"true\" />\n </div>\n }\n }\n\n @if (zShowAction() && (zActionTemplate() || isMultipleMode())) {\n <div class=\"border-border flex items-center gap-2 border-t px-2 py-1.5\">\n @if (zActionTemplate()) {\n <ng-container *ngTemplateOutlet=\"zActionTemplate()!\" />\n } @else {\n <z-button\n zSize=\"xs\"\n [zType]=\"isAllSelected() ? 'ghost-error' : 'ghost-info'\"\n class=\"min-w-0 flex-1\"\n (click)=\"toggleSelectAllAction()\"\n [zWave]=\"false\">\n <z-icon [zType]=\"isAllSelected() ? 'lucideX' : 'lucideCheckCheck'\" zSize=\"18\" class=\"shrink-0\" />\n <span class=\"truncate\">{{ isAllSelected() ? effectiveClearAllText() : effectiveSelectAllText() }}</span>\n </z-button>\n }\n </div>\n }\n </div>\n </ng-template>\n</div>\n", styles: [".z-select-trigger{-webkit-user-select:none;user-select:none}.z-select-trigger:focus{outline:none}.z-select-trigger *{cursor:inherit}.z-select-tag{-webkit-user-select:none;user-select:none;animation:z-select-tag-enter .2s cubic-bezier(.4,0,.2,1)}@keyframes z-select-tag-enter{0%{opacity:0;transform:scale(.8) translateY(.25rem)}to{opacity:1;transform:scale(1) translateY(0)}}.z-select-remaining{animation:z-select-remaining-enter .25s cubic-bezier(.4,0,.2,1)}@keyframes z-select-remaining-enter{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.z-select-dropdown input{text-overflow:ellipsis;overflow:hidden}.z-select-options{overflow-x:hidden!important}.z-select-virtual-scroll .z-select-virtual-inner{width:100%}.z-select-loading-more{animation:z-select-loading-enter .2s ease-out}@keyframes z-select-loading-enter{0%{opacity:0;transform:translateY(-.25rem)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: 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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: ZPopoverDirective, selector: "[z-popover]", inputs: ["zPopoverContent", "zPosition", "zTrigger", "zClass", "zShowDelay", "zHideDelay", "zDisabled", "zOffset", "zPopoverWidth", "zManualClose", "zScrollClose", "zShowArrow"], outputs: ["zShow", "zHide", "zHideStart", "zControl", "zPositionChange"], exportAs: ["zPopover"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "component", type: ZEmptyComponent, selector: "z-empty", inputs: ["class", "zType", "zIcon", "zIconSize", "zSize", "zMessage", "zDescription"] }, { kind: "directive", type: ZTooltipDirective, selector: "[z-tooltip], [zTooltip]", inputs: ["zContent", "zPosition", "zTrigger", "zTooltipType", "zTooltipSize", "zClass", "zShowDelay", "zHideDelay", "zArrow", "zDisabled", "zOffset", "zAutoDetect", "zTriggerElement", "zAlwaysShow", "zMaxWidth"], outputs: ["zShow", "zHide"], exportAs: ["zTooltip"] }, { kind: "component", type: ZLoadingComponent, selector: "z-loading", inputs: ["class", "zSpinner", "zSize", "zColor", "zText", "zOverlay", "zOverlayType", "zFullscreen", "zLoading"] }, { kind: "pipe", type: ZIsSelectedPipe, name: "zIsSelected" }, { kind: "pipe", type: ZOptionClassesPipe, name: "zOptionClasses" }, { kind: "pipe", type: ZTagClassesPipe, name: "zTagClasses" }, { kind: "pipe", type: ZHighlightPipe, name: "zHighlight" }, { kind: "pipe", type: ZSafeHtmlPipe, name: "zSafeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1114
1114
|
}
|
|
1115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZSelectComponent, decorators: [{
|
|
1116
1116
|
type: Component,
|
|
1117
1117
|
args: [{ selector: 'z-select', imports: [
|
|
1118
1118
|
FormsModule,
|
|
@@ -1135,7 +1135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1135
1135
|
useExisting: forwardRef(() => ZSelectComponent),
|
|
1136
1136
|
multi: true,
|
|
1137
1137
|
},
|
|
1138
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'zSelect', template: "<div class=\"z-select-wrapper relative flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [for]=\"selectId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n <div class=\"relative\">\n <div\n #triggerEl\n [id]=\"selectId\"\n z-popover\n [zPopoverContent]=\"dropdownTpl\"\n [zOffset]=\"6\"\n [zDisabled]=\"isInteractionDisabled()\"\n [zScrollClose]=\"zScrollClose()\"\n zTrigger=\"click\"\n [zPosition]=\"zPosition()\"\n zClass=\"border-0 shadow-none p-0\"\n (zControl)=\"onPopoverControl($event)\"\n (zShow)=\"onPopoverShow()\"\n (zHideStart)=\"onPopoverHideStart()\"\n (zHide)=\"onPopoverHideEnd()\"\n class=\"z-select-trigger cursor-pointer\"\n [class]=\"selectClasses()\"\n [class.z-select-open]=\"uiState().isOpen\"\n (mousedown)=\"onTriggerMousedown()\"\n (keydown)=\"onTriggerKeydown($event)\"\n tabindex=\"0\"\n role=\"combobox\"\n [attr.aria-expanded]=\"uiState().isOpen\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"dropdownId\">\n @if (zPrefix()) {\n <z-icon [zType]=\"zPrefix() || 'lucideChevronDown'\" zSize=\"18\" class=\"text-muted-foreground shrink-0\" />\n }\n\n <div\n class=\"z-select-tags-wrapper flex min-w-0 flex-1 items-center gap-1\"\n [class.flex-wrap]=\"zWrap()\"\n [class.overflow-hidden]=\"!zWrap()\">\n @if (isMultipleMode()) {\n @if (selectedOptions().length === 0) {\n <span class=\"text-muted-foreground truncate whitespace-nowrap\">\n {{ effectivePlaceholder() }}\n </span>\n } @else {\n @for (opt of displayedTags(); track opt.value) {\n <span\n #tagEl\n [class]=\"opt | zTagClasses: zSize() : isTagsMode()\"\n class=\"z-select-tag\"\n [class.min-w-0]=\"!zWrap()\"\n [class.shrink]=\"!zWrap()\">\n @if (effectiveSelectedTemplate()) {\n <ng-container *ngTemplateOutlet=\"effectiveSelectedTemplate()!; context: { $implicit: opt }\" />\n } @else {\n <span\n class=\"truncate\"\n [class.max-w-25]=\"zWrap()\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"6\"\n [zTriggerElement]=\"tagEl\">\n {{ opt.label }}\n </span>\n }\n @if (zAllowClear() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"-mr-0.5 flex size-3.5 shrink-0 items-center justify-center rounded-sm transition-colors hover:bg-black/10\"\n (click)=\"removeOption($event, opt)\"\n tabindex=\"-1\">\n <z-icon zType=\"lucideX\" zSize=\"10\" />\n </button>\n }\n </span>\n }\n @if (remainingCount() > 0) {\n <span\n class=\"z-select-remaining text-muted-foreground bg-muted rounded-sm px-1.5 py-0.5 text-xs font-medium\">\n +{{ remainingCount() }}\n </span>\n }\n }\n } @else {\n @if (selectedOption()) {\n @if (effectiveSelectedTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"effectiveSelectedTemplate()!; context: { $implicit: selectedOption() }\" />\n } @else {\n <span\n class=\"truncate\"\n z-tooltip\n [zContent]=\"selectedOption()!.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"10\">\n {{ selectedOption()!.label }}\n </span>\n }\n } @else {\n <span class=\"text-muted-foreground truncate whitespace-nowrap\">\n {{ effectivePlaceholder() }}\n </span>\n }\n }\n </div>\n\n @if (zLoading() || zLoadingMore()) {\n <z-icon zType=\"lucideLoaderCircle\" zSize=\"18\" class=\"text-muted-foreground shrink-0 animate-spin\" />\n }\n\n @if (!zLoading() && zAllowClear() && hasValue() && !isDisabled() && !isReadonly()) {\n <button\n type=\"button\"\n class=\"text-muted-foreground hover:text-foreground flex shrink-0 items-center justify-center transition-colors\"\n (click)=\"clearAll($event)\"\n tabindex=\"-1\">\n <z-icon zType=\"lucideX\" zSize=\"18\" />\n </button>\n }\n\n @if (uiState().isValidating) {\n <z-icon zType=\"lucideLoader2\" zSize=\"18\" class=\"text-muted-foreground shrink-0 animate-spin\" />\n }\n\n <z-icon\n zType=\"lucideChevronDown\"\n zSize=\"18\"\n class=\"text-muted-foreground shrink-0 transition-transform duration-200\"\n [class.rotate-180]=\"uiState().isOpen\" />\n </div>\n\n @if (hasError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n </div>\n\n <ng-template #dropdownTpl let-close=\"close\">\n <div\n [id]=\"dropdownId\"\n class=\"z-select-dropdown bg-popover border-border rounded-sm border shadow-lg\"\n [style.width.px]=\"dropdownWidth()\"\n [style.min-width.px]=\"dropdownWidth()\">\n @if (zShowSearch()) {\n <div class=\"border-border flex items-center border-b px-3\">\n <z-icon zType=\"lucideSearch\" zSize=\"18\" class=\"text-muted-foreground/50 mr-2 shrink-0\" />\n <input\n #dropdownSearchInput\n type=\"text\"\n class=\"placeholder:text-muted-foreground text-foreground flex h-10 w-full bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50\"\n [placeholder]=\"effectivePlaceholderSearch()\"\n [ngModel]=\"searchText()\"\n (ngModelChange)=\"onSearchChange($event)\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\" />\n </div>\n }\n\n @if (zLoading()) {\n <div class=\"flex items-center justify-center\" [style.height.px]=\"optionsMaxHeight()\">\n <z-loading [zLoading]=\"true\" zSize=\"default\" />\n </div>\n } @else {\n @if (filteredOptions().length > 0) {\n @if (shouldUseVirtualScroll()) {\n <div\n #virtualScrollElement\n class=\"z-select-options z-select-virtual-scroll overflow-x-hidden overflow-y-auto overscroll-y-contain p-1\"\n [style.height.px]=\"optionsMaxHeight()\">\n <div class=\"z-select-virtual-inner relative\" [style.height.px]=\"virtualizer.getTotalSize()\">\n @for (virtualItem of virtualizer.getVirtualItems(); track virtualItem.index) {\n @let opt = filteredOptions()[virtualItem.index];\n <div\n #optionEl\n class=\"z-select-option absolute right-0 left-0 min-w-0\"\n [ngClass]=\"opt | zIsSelected: currentValue() : isMultipleMode() | zOptionClasses: opt.disabled\"\n [style.height.px]=\"zOptionHeight()\"\n [style.transform]=\"'translateY(' + virtualItem.start + 'px)'\"\n (click)=\"selectOption(opt, close)\">\n @if (effectiveOptionTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n effectiveOptionTemplate()!;\n context: { $implicit: opt, selected: opt | zIsSelected: currentValue() : isMultipleMode() }\n \" />\n } @else {\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n [zTriggerElement]=\"optionEl\"\n [innerHTML]=\"opt.label | zHighlight: searchText() | zSafeHtml\"></span>\n }\n @if (opt | zIsSelected: currentValue() : isMultipleMode()) {\n <z-icon zType=\"lucideCheck\" zSize=\"16\" [zStrokeWidth]=\"4\" class=\"text-primary ml-auto shrink-0\" />\n }\n </div>\n }\n </div>\n @if (zLoadingMore()) {\n <div\n class=\"bg-popover/80 absolute right-0 bottom-0 left-0 flex items-center justify-center py-2\"\n [style.transform]=\"'translateY(' + virtualizer.getTotalSize() + 'px)'\">\n <z-loading zSize=\"xs\" [zLoading]=\"true\" />\n </div>\n }\n </div>\n } @else {\n <div\n #optionsContainer\n class=\"z-select-options flex flex-col gap-0.75 overflow-x-hidden overflow-y-auto overscroll-y-contain p-1\"\n [style.maxHeight.px]=\"optionsMaxHeight()\">\n @for (opt of filteredOptions(); track opt.value) {\n <div\n #optionEl2\n class=\"z-select-option relative min-w-0\"\n [ngClass]=\"opt | zIsSelected: currentValue() : isMultipleMode() | zOptionClasses: opt.disabled\"\n [style.minHeight.px]=\"zOptionHeight()\"\n (click)=\"selectOption(opt, close)\">\n @if (effectiveOptionTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n effectiveOptionTemplate()!;\n context: { $implicit: opt, selected: opt | zIsSelected: currentValue() : isMultipleMode() }\n \" />\n } @else {\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zArrow]=\"false\"\n [zOffset]=\"5\"\n [zHideDelay]=\"0\"\n [zTriggerElement]=\"optionEl2\"\n [innerHTML]=\"opt.label | zHighlight: searchText() | zSafeHtml\"></span>\n }\n @if (opt | zIsSelected: currentValue() : isMultipleMode()) {\n <z-icon zType=\"lucideCheck\" zSize=\"18\" [zStrokeWidth]=\"4\" class=\"text-primary ml-auto shrink-0\" />\n }\n </div>\n }\n @if (zEnableLoadMore()) {\n <div #loadMoreSentinel class=\"h-px w-full shrink-0\"></div>\n }\n </div>\n }\n } @else {\n <div class=\"flex items-center justify-center p-1\" [style.height.px]=\"optionsMaxHeight()\">\n @if (isEmptyData()) {\n <z-empty [zIcon]=\"zEmptyIcon()\" zSize=\"sm\" [zMessage]=\"effectiveEmptyText()\" />\n } @else {\n <z-empty zIcon=\"lucideSearchX\" zSize=\"sm\" [zMessage]=\"effectiveNotFoundText()\" />\n }\n </div>\n }\n\n @if (zLoadingMore()) {\n <div class=\"z-select-loading-more border-border/50 flex items-center justify-center border-t py-1.5\">\n <z-loading zSize=\"xs\" [zLoading]=\"true\" />\n </div>\n }\n }\n\n @if (zShowAction() && (zActionTemplate() || isMultipleMode())) {\n <div class=\"border-border flex items-center gap-2 border-t px-2 py-1.5\">\n @if (zActionTemplate()) {\n <ng-container *ngTemplateOutlet=\"zActionTemplate()!\" />\n } @else {\n <z-button\n zSize=\"xs\"\n [zType]=\"isAllSelected() ? 'ghost-error' : 'ghost-info'\"\n class=\"min-w-0 flex-1\"\n (click)=\"toggleSelectAllAction()\"\n [zWave]=\"false\">\n <z-icon [zType]=\"isAllSelected() ? 'lucideX' : 'lucideCheckCheck'\" zSize=\"18\" class=\"shrink-0\" />\n <span class=\"truncate\">{{ isAllSelected() ? effectiveClearAllText() : effectiveSelectAllText() }}</span>\n </z-button>\n }\n </div>\n }\n </div>\n </ng-template>\n</div>\n", styles: [".z-select-trigger{-webkit-user-select:none;user-select:none}.z-select-trigger:focus{outline:none}.z-select-trigger *{cursor:inherit}.z-select-tag{-webkit-user-select:none;user-select:none;animation:z-select-tag-enter .2s cubic-bezier(.4,0,.2,1)}@keyframes z-select-tag-enter{0%{opacity:0;transform:scale(.8) translateY(.25rem)}to{opacity:1;transform:scale(1) translateY(0)}}.z-select-remaining{animation:z-select-remaining-enter .25s cubic-bezier(.4,0,.2,1)}@keyframes z-select-remaining-enter{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.z-select-dropdown input{text-overflow:ellipsis;overflow:hidden}.z-select-options{overflow-x:hidden!important}.z-select-virtual-scroll .z-select-virtual-inner{width:100%}.z-select-loading-more{animation:z-select-loading-enter .2s ease-out}@keyframes z-select-loading-enter{0%{opacity:0;transform:translateY(-.25rem)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
1138
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'zSelect', template: "<div class=\"z-select-wrapper relative flex w-full flex-col gap-2\">\n @if (zLabel()) {\n <label [for]=\"selectId\" class=\"text-xs leading-none font-medium\" [class]=\"zLabelClass()\">\n {{ zLabel() }}\n @if (zRequired()) {\n <span class=\"text-destructive! ml-0.5\">*</span>\n }\n </label>\n }\n\n <div class=\"relative\">\n <div\n #triggerEl\n [id]=\"selectId\"\n z-popover\n [zPopoverContent]=\"dropdownTpl\"\n [zOffset]=\"6\"\n [zDisabled]=\"isInteractionDisabled()\"\n [zScrollClose]=\"zScrollClose()\"\n zTrigger=\"click\"\n [zPosition]=\"zPosition()\"\n zClass=\"border-0 shadow-none p-0\"\n (zControl)=\"onPopoverControl($event)\"\n (zShow)=\"onPopoverShow()\"\n (zHideStart)=\"onPopoverHideStart()\"\n (zHide)=\"onPopoverHideEnd()\"\n class=\"z-select-trigger cursor-pointer\"\n [class]=\"selectClasses()\"\n [class.z-select-open]=\"uiState().isOpen\"\n (mousedown)=\"onTriggerMousedown()\"\n (keydown)=\"onTriggerKeydown($event)\"\n tabindex=\"0\"\n role=\"combobox\"\n [attr.aria-expanded]=\"uiState().isOpen\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"dropdownId\">\n @if (zPrefix()) {\n <z-icon [zType]=\"zPrefix() || 'lucideChevronDown'\" zSize=\"18\" class=\"text-muted-foreground shrink-0\" />\n }\n\n <div\n class=\"z-select-tags-wrapper flex min-w-0 flex-1 items-center gap-1\"\n [class.flex-wrap]=\"zWrap()\"\n [class.overflow-hidden]=\"!zWrap()\">\n @if (isMultipleMode()) {\n @if (selectedOptions().length === 0) {\n <span class=\"text-muted-foreground truncate whitespace-nowrap\">\n {{ effectivePlaceholder() }}\n </span>\n } @else {\n @for (opt of displayedTags(); track opt.value) {\n <span\n #tagEl\n [class]=\"opt | zTagClasses: zSize() : isTagsMode()\"\n class=\"z-select-tag\"\n [class.min-w-0]=\"!zWrap()\"\n [class.shrink]=\"!zWrap()\">\n @if (effectiveSelectedTemplate()) {\n <ng-container *ngTemplateOutlet=\"effectiveSelectedTemplate()!; context: { $implicit: opt }\" />\n } @else {\n <span\n class=\"truncate\"\n [class.max-w-25]=\"zWrap()\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"6\"\n [zTriggerElement]=\"tagEl\">\n {{ opt.label }}\n </span>\n }\n @if (zAllowClear() && !isDisabled()) {\n <button\n type=\"button\"\n class=\"-mr-0.5 flex size-3.5 shrink-0 items-center justify-center rounded-sm transition-colors hover:bg-black/10\"\n (click)=\"removeOption($event, opt)\"\n tabindex=\"-1\">\n <z-icon zType=\"lucideX\" zSize=\"10\" />\n </button>\n }\n </span>\n }\n @if (remainingCount() > 0) {\n <span\n class=\"z-select-remaining text-muted-foreground bg-muted rounded-sm px-1.5 py-0.5 text-xs font-medium\">\n +{{ remainingCount() }}\n </span>\n }\n }\n } @else {\n @if (selectedOption()) {\n @if (effectiveSelectedTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"effectiveSelectedTemplate()!; context: { $implicit: selectedOption() }\" />\n } @else {\n <span\n class=\"truncate\"\n z-tooltip\n [zContent]=\"selectedOption()!.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"10\">\n {{ selectedOption()!.label }}\n </span>\n }\n } @else {\n <span class=\"text-muted-foreground truncate whitespace-nowrap\">\n {{ effectivePlaceholder() }}\n </span>\n }\n }\n </div>\n\n @if (zLoading() || zLoadingMore()) {\n <z-icon zType=\"lucideLoaderCircle\" zSize=\"18\" class=\"text-muted-foreground shrink-0 animate-spin\" />\n }\n\n @if (!zLoading() && zAllowClear() && hasValue() && !isDisabled() && !isReadonly()) {\n <button\n type=\"button\"\n class=\"text-muted-foreground hover:text-foreground flex shrink-0 items-center justify-center transition-colors\"\n (click)=\"clearAll($event)\"\n tabindex=\"-1\">\n <z-icon zType=\"lucideX\" zSize=\"18\" />\n </button>\n }\n\n @if (uiState().isValidating) {\n <z-icon zType=\"lucideLoader2\" zSize=\"18\" class=\"text-muted-foreground shrink-0 animate-spin\" />\n }\n\n <z-icon\n zType=\"lucideChevronDown\"\n zSize=\"18\"\n class=\"text-muted-foreground shrink-0 transition-transform duration-200\"\n [class.rotate-180]=\"uiState().isOpen\" />\n </div>\n\n @if (hasError()) {\n <p class=\"text-destructive animate-in fade-in slide-in-from-top-1 m-0 pt-2 text-xs duration-200\">\n {{ errorMessage() }}\n </p>\n }\n </div>\n\n <ng-template #dropdownTpl let-close=\"close\">\n <div\n [id]=\"dropdownId\"\n class=\"z-select-dropdown bg-popover border-border rounded-sm border shadow-lg\"\n [style.width.px]=\"dropdownWidth()\"\n [style.min-width.px]=\"dropdownWidth()\">\n @if (zShowSearch()) {\n <div class=\"border-border flex items-center border-b px-3\">\n <z-icon zType=\"lucideSearch\" zSize=\"18\" class=\"text-muted-foreground/50 mr-2 shrink-0\" />\n <input\n #dropdownSearchInput\n type=\"text\"\n class=\"placeholder:text-muted-foreground text-foreground flex h-10 w-full bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50\"\n [placeholder]=\"effectivePlaceholderSearch()\"\n [ngModel]=\"searchText()\"\n (ngModelChange)=\"onSearchChange($event)\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n spellcheck=\"false\" />\n </div>\n }\n\n @if (zLoading()) {\n <div class=\"flex items-center justify-center\" [style.height.px]=\"optionsMaxHeight()\">\n <z-loading [zLoading]=\"true\" zSize=\"default\" />\n </div>\n } @else {\n @if (filteredOptions().length > 0) {\n @if (shouldUseVirtualScroll()) {\n <div\n #virtualScrollElement\n class=\"z-select-options z-select-virtual-scroll overflow-x-hidden overflow-y-auto overscroll-y-contain p-1\"\n [style.height.px]=\"optionsMaxHeight()\">\n <div class=\"z-select-virtual-inner relative\" [style.height.px]=\"virtualizer.getTotalSize()\">\n @for (virtualItem of virtualizer.getVirtualItems(); track virtualItem.index) {\n @let opt = filteredOptions()[virtualItem.index];\n <div\n #optionEl\n class=\"z-select-option absolute right-0 left-0 min-w-0\"\n [ngClass]=\"opt | zIsSelected: currentValue() : isMultipleMode() | zOptionClasses: opt.disabled\"\n [style.height.px]=\"zOptionHeight()\"\n [style.transform]=\"'translateY(' + virtualItem.start + 'px)'\"\n (click)=\"selectOption(opt, close)\">\n @if (effectiveOptionTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n effectiveOptionTemplate()!;\n context: { $implicit: opt, selected: opt | zIsSelected: currentValue() : isMultipleMode() }\n \" />\n } @else {\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zHideDelay]=\"0\"\n [zOffset]=\"5\"\n [zArrow]=\"false\"\n [zTriggerElement]=\"optionEl\"\n [innerHTML]=\"opt.label | zHighlight: searchText() | zSafeHtml\"></span>\n }\n @if (opt | zIsSelected: currentValue() : isMultipleMode()) {\n <z-icon zType=\"lucideCheck\" zSize=\"16\" [zStrokeWidth]=\"4\" class=\"text-primary ml-auto shrink-0\" />\n }\n </div>\n }\n </div>\n @if (zLoadingMore()) {\n <div\n class=\"bg-popover/80 absolute right-0 bottom-0 left-0 flex items-center justify-center py-2\"\n [style.transform]=\"'translateY(' + virtualizer.getTotalSize() + 'px)'\">\n <z-loading zSize=\"xs\" [zLoading]=\"true\" />\n </div>\n }\n </div>\n } @else {\n <div\n #optionsContainer\n class=\"z-select-options flex flex-col gap-0.75 overflow-x-hidden overflow-y-auto overscroll-y-contain p-1\"\n [style.maxHeight.px]=\"optionsMaxHeight()\">\n @for (opt of filteredOptions(); track opt.value) {\n <div\n #optionEl2\n class=\"z-select-option relative min-w-0\"\n [ngClass]=\"opt | zIsSelected: currentValue() : isMultipleMode() | zOptionClasses: opt.disabled\"\n [style.minHeight.px]=\"zOptionHeight()\"\n (click)=\"selectOption(opt, close)\">\n @if (effectiveOptionTemplate()) {\n <ng-container\n *ngTemplateOutlet=\"\n effectiveOptionTemplate()!;\n context: { $implicit: opt, selected: opt | zIsSelected: currentValue() : isMultipleMode() }\n \" />\n } @else {\n <span\n class=\"min-w-0 flex-1 truncate\"\n z-tooltip\n [zContent]=\"opt.label\"\n zPosition=\"top\"\n [zArrow]=\"false\"\n [zOffset]=\"5\"\n [zHideDelay]=\"0\"\n [zTriggerElement]=\"optionEl2\"\n [innerHTML]=\"opt.label | zHighlight: searchText() | zSafeHtml\"></span>\n }\n @if (opt | zIsSelected: currentValue() : isMultipleMode()) {\n <z-icon zType=\"lucideCheck\" zSize=\"18\" [zStrokeWidth]=\"4\" class=\"text-primary ml-auto shrink-0\" />\n }\n </div>\n }\n @if (zEnableLoadMore()) {\n <div #loadMoreSentinel class=\"h-px w-full shrink-0\"></div>\n }\n </div>\n }\n } @else {\n <div class=\"flex items-center justify-center p-1\" [style.height.px]=\"optionsMaxHeight()\">\n @if (isEmptyData()) {\n <z-empty [zIcon]=\"zEmptyIcon()\" zSize=\"sm\" [zMessage]=\"effectiveEmptyText()\" />\n } @else {\n <z-empty zIcon=\"lucideSearchX\" zSize=\"sm\" [zMessage]=\"effectiveNotFoundText()\" />\n }\n </div>\n }\n\n @if (zLoadingMore()) {\n <div class=\"z-select-loading-more border-border/50 flex items-center justify-center border-t py-1.5\">\n <z-loading zSize=\"xs\" [zLoading]=\"true\" />\n </div>\n }\n }\n\n @if (zShowAction() && (zActionTemplate() || isMultipleMode())) {\n <div class=\"border-border flex items-center gap-2 border-t px-2 py-1.5\">\n @if (zActionTemplate()) {\n <ng-container *ngTemplateOutlet=\"zActionTemplate()!\" />\n } @else {\n <z-button\n zSize=\"xs\"\n [zType]=\"isAllSelected() ? 'ghost-error' : 'ghost-info'\"\n class=\"min-w-0 flex-1\"\n (click)=\"toggleSelectAllAction()\"\n [zWave]=\"false\">\n <z-icon [zType]=\"isAllSelected() ? 'lucideX' : 'lucideCheckCheck'\" zSize=\"18\" class=\"shrink-0\" />\n <span class=\"truncate\">{{ isAllSelected() ? effectiveClearAllText() : effectiveSelectAllText() }}</span>\n </z-button>\n }\n </div>\n }\n </div>\n </ng-template>\n</div>\n", styles: [".z-select-trigger{-webkit-user-select:none;user-select:none}.z-select-trigger:focus{outline:none}.z-select-trigger *{cursor:inherit}.z-select-tag{-webkit-user-select:none;user-select:none;animation:z-select-tag-enter .2s cubic-bezier(.4,0,.2,1)}@keyframes z-select-tag-enter{0%{opacity:0;transform:scale(.8) translateY(.25rem)}to{opacity:1;transform:scale(1) translateY(0)}}.z-select-remaining{animation:z-select-remaining-enter .25s cubic-bezier(.4,0,.2,1)}@keyframes z-select-remaining-enter{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.z-select-dropdown input{text-overflow:ellipsis;overflow:hidden}.z-select-options{overflow-x:hidden!important}.z-select-virtual-scroll .z-select-virtual-inner{width:100%}.z-select-loading-more{animation:z-select-loading-enter .2s ease-out}@keyframes z-select-loading-enter{0%{opacity:0;transform:translateY(-.25rem)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
1139
1139
|
}], ctorParameters: () => [], propDecorators: { triggerRef: [{ type: i0.ViewChild, args: ['triggerEl', { isSignal: true }] }], searchInputRef: [{ type: i0.ViewChild, args: ['dropdownSearchInput', { isSignal: true }] }], dropdownTpl: [{ type: i0.ViewChild, args: ['dropdownTpl', { isSignal: true }] }], optionsContainerRef: [{ type: i0.ViewChild, args: ['optionsContainer', { isSignal: true }] }], virtualScrollRef: [{ type: i0.ViewChild, args: ['virtualScrollElement', { isSignal: true }] }], loadMoreSentinelRef: [{ type: i0.ViewChild, args: ['loadMoreSentinel', { isSignal: true }] }], customSelectedDirective: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ZSelectSelectedDirective), { isSignal: true }] }], customOptionDirective: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ZSelectOptionDirective), { isSignal: true }] }], zOnSearch: [{ type: i0.Output, args: ["zOnSearch"] }], zOnLoadMore: [{ type: i0.Output, args: ["zOnLoadMore"] }], zOnBlur: [{ type: i0.Output, args: ["zOnBlur"] }], zOnFocus: [{ type: i0.Output, args: ["zOnFocus"] }], zControl: [{ type: i0.Output, args: ["zControl"] }], zEvent: [{ type: i0.Output, args: ["zEvent"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMode", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLabel", required: false }] }], zLabelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLabelClass", required: false }] }], zPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPlaceholder", required: false }] }], zRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "zRequired", required: false }] }], zDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDisabled", required: false }] }], zReadonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "zReadonly", required: false }] }], zLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLoading", required: false }] }], zPrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPrefix", required: false }] }], zAllowClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAllowClear", required: false }] }], zWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "zWrap", required: false }] }], zShowSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowSearch", required: false }] }], zPlaceholderSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPlaceholderSearch", required: false }] }], zDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDebounce", required: false }] }], zNotFoundText: [{ type: i0.Input, args: [{ isSignal: true, alias: "zNotFoundText", required: false }] }], zEmptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEmptyText", required: false }] }], zEmptyIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEmptyIcon", required: false }] }], zMaxTagCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMaxTagCount", required: false }] }], zDropdownMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDropdownMaxHeight", required: false }] }], zOptionHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOptionHeight", required: false }] }], zVirtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "zVirtualScroll", required: false }] }], zShowAction: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShowAction", required: false }] }], zOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOptions", required: false }] }], zTranslateLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTranslateLabels", required: false }] }], zKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "zKey", required: false }] }], zSearchServer: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSearchServer", required: false }] }], zLoadingMore: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLoadingMore", required: false }] }], zEnableLoadMore: [{ type: i0.Input, args: [{ isSignal: true, alias: "zEnableLoadMore", required: false }] }], zScrollDistance: [{ type: i0.Input, args: [{ isSignal: true, alias: "zScrollDistance", required: false }] }], zMaxVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMaxVisible", required: false }] }], zScrollClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "zScrollClose", required: false }] }], zPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPosition", required: false }] }], zSelectedTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSelectedTemplate", required: false }] }], zOptionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOptionTemplate", required: false }] }], zActionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "zActionTemplate", required: false }] }], zAsyncValidators: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAsyncValidators", required: false }] }], zAsyncDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAsyncDebounce", required: false }] }], zAsyncValidateOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAsyncValidateOn", required: false }] }], zValidators: [{ type: i0.Input, args: [{ isSignal: true, alias: "zValidators", required: false }] }] } });
|
|
1140
1140
|
|
|
1141
1141
|
/**
|