@shival99/z-ui 1.0.32 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +21 -9
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-toast.mjs +64 -3
- package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
- package/package.json +1 -1
- package/types/shival99-z-ui-components-z-input.d.ts +2 -2
- package/types/shival99-z-ui-components-z-select.d.ts +4 -2
- package/types/shival99-z-ui-components-z-toast.d.ts +9 -2
|
@@ -131,7 +131,7 @@ class ZPaginationComponent {
|
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
134
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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: { zPageIndex: "zPageIndexChange", zPageSize: "zPageSizeChange", zOnPageChange: "zOnPageChange" }, host: { classAttribute: "z-pagination flex items-center gap-2" }, providers: [TranslatePipe], 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 <div class=\"flex items-center gap-1\">\n <!-- Prev Button -->\n <z-button zType=\"ghost\" 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 class=\"text-muted-foreground flex h-8 w-8 items-center justify-center text-sm\">...</span>\n } @else {\n <z-button\n [zType]=\"page === zPageIndex() ? 'default' : 'outline'\"\n [zWave]=\"false\"\n zSize=\"sm\"\n class=\"min-w-8\"\n [zDisabled]=\"zDisabled()\"\n (click)=\"goToPage(page)\">\n {{ page }}\n </z-button>\n }\n }\n\n <!-- Next Button -->\n <z-button zType=\"ghost\" zSize=\"sm\" [zDisabled]=\"!canGoNext() || zDisabled()\" (click)=\"goToNext()\">\n <z-icon zType=\"lucideChevronRight\" zSize=\"16\" />\n </z-button>\n </div>\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 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 px-2 text-sm\">{{ zPageIndex() }} / {{ totalPages() }}</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}\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: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZInputComponent, selector: "z-input", inputs: ["class", "zType", "zSize", "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"], outputs: ["zOnSearch", "zOnChange", "zControl"], 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", "zKey", "zSearchServer", "zLoadingMore", "zEnableLoadMore", "zScrollDistance", "zSelectedTemplate", "zOptionTemplate", "zActionTemplate", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zValidators"], outputs: ["zOnSearch", "zOnLoadMore", "zControl"], exportAs: ["zSelect"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
134
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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: { zPageIndex: "zPageIndexChange", zPageSize: "zPageSizeChange", zOnPageChange: "zOnPageChange" }, host: { classAttribute: "z-pagination flex items-center gap-2" }, providers: [TranslatePipe], 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 <div class=\"flex items-center gap-1\">\n <!-- Prev Button -->\n <z-button zType=\"ghost\" 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 class=\"text-muted-foreground flex h-8 w-8 items-center justify-center text-sm\">...</span>\n } @else {\n <z-button\n [zType]=\"page === zPageIndex() ? 'default' : 'outline'\"\n [zWave]=\"false\"\n zSize=\"sm\"\n class=\"min-w-8\"\n [zDisabled]=\"zDisabled()\"\n (click)=\"goToPage(page)\">\n {{ page }}\n </z-button>\n }\n }\n\n <!-- Next Button -->\n <z-button zType=\"ghost\" zSize=\"sm\" [zDisabled]=\"!canGoNext() || zDisabled()\" (click)=\"goToNext()\">\n <z-icon zType=\"lucideChevronRight\" zSize=\"16\" />\n </z-button>\n </div>\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 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 px-2 text-sm\">{{ zPageIndex() }} / {{ totalPages() }}</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}\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: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZInputComponent, selector: "z-input", inputs: ["class", "zType", "zSize", "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"], outputs: ["zOnSearch", "zOnChange", "zControl"], 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", "zSelectedTemplate", "zOptionTemplate", "zActionTemplate", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zValidators"], outputs: ["zOnSearch", "zOnLoadMore", "zControl"], exportAs: ["zSelect"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
135
135
|
}
|
|
136
136
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZPaginationComponent, decorators: [{
|
|
137
137
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shival99-z-ui-components-z-pagination.mjs","sources":["../../../../libs/core-ui/components/z-pagination/z-pagination.component.ts","../../../../libs/core-ui/components/z-pagination/z-pagination.component.html","../../../../libs/core-ui/components/z-pagination/shival99-z-ui-components-z-pagination.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input, model, output } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { ZButtonComponent } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { ZInputComponent } from '@shival99/z-ui/components/z-input';\nimport { ZSelectComponent } from '@shival99/z-ui/components/z-select';\nimport { startWith } from 'rxjs';\nimport type { ZPageChangeEvent, ZPaginationSize } from './z-pagination.types';\n\n@Component({\n selector: 'z-pagination',\n imports: [FormsModule, ZButtonComponent, ZIconComponent, ZInputComponent, ZSelectComponent, TranslatePipe],\n standalone: true,\n templateUrl: './z-pagination.component.html',\n providers: [TranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'z-pagination flex items-center gap-2',\n },\n})\nexport class ZPaginationComponent {\n public readonly zPageIndex = model<number>(1);\n public readonly zPageSize = model<number>(10);\n public readonly zTotal = input.required<number>();\n public readonly zPageSizeOptions = input<number[]>([10, 20, 50, 100]);\n public readonly zShowSizeChanger = input<boolean>(true);\n public readonly zShowQuickJumper = input<boolean>(false);\n public readonly zShowTotal = input<boolean>(true);\n public readonly zSimple = input<boolean>(false);\n public readonly zSize = input<ZPaginationSize>('default');\n public readonly zDisabled = input<boolean>(false);\n\n public readonly zTotalLabel = input<string | null>(null);\n public readonly zPerPageLabel = input<string | null>(null);\n public readonly zGoToLabel = input<string | null>(null);\n\n public readonly zOnPageChange = output<ZPageChangeEvent>();\n\n private readonly _translate = inject(TranslateService);\n private readonly _currentLang = toSignal(\n this._translate.onLangChange.pipe(startWith({ lang: this._translate.getCurrentLang() }))\n );\n\n protected readonly totalLabelText = computed(() => {\n this._currentLang();\n const label = this.zTotalLabel() ?? this._translate.instant('i18n_z_ui_pagination_total_label');\n return label.replace('{total}', String(this.zTotal()));\n });\n\n protected readonly perPageLabelText = computed(() => {\n this._currentLang();\n return this.zPerPageLabel() ?? this._translate.instant('i18n_z_ui_pagination_per_page');\n });\n\n protected readonly goToLabelText = computed(() => {\n this._currentLang();\n return this.zGoToLabel() ?? this._translate.instant('i18n_z_ui_pagination_go_to');\n });\n\n protected readonly totalPages = computed(() => {\n const total = this.zTotal();\n const pageSize = this.zPageSize();\n return Math.max(1, Math.ceil(total / pageSize));\n });\n\n protected readonly pageSizeOptions = computed(() =>\n this.zPageSizeOptions().map(size => ({\n label: `${size} ${this.perPageLabelText()}`,\n value: size,\n }))\n );\n\n protected readonly visiblePages = computed(() => {\n const current = this.zPageIndex();\n const total = this.totalPages();\n const pages: (number | 'ellipsis')[] = [];\n const maxVisible = 5;\n\n if (total <= maxVisible) {\n for (let i = 1; i <= total; i++) {\n pages.push(i);\n }\n return pages;\n }\n\n pages.push(1);\n\n let startPage = Math.max(2, current - 1);\n let endPage = Math.min(total - 1, current + 1);\n\n if (current <= 3) {\n endPage = Math.min(total - 1, 3);\n } else if (current >= total - 2) {\n startPage = Math.max(2, total - 2);\n }\n\n if (startPage > 2) {\n pages.push('ellipsis');\n }\n\n for (let i = startPage; i <= endPage; i++) {\n pages.push(i);\n }\n\n if (endPage < total - 1) {\n pages.push('ellipsis');\n }\n\n pages.push(total);\n\n return pages;\n });\n\n protected readonly canGoPrev = computed(() => this.zPageIndex() > 1);\n protected readonly canGoNext = computed(() => this.zPageIndex() < this.totalPages());\n\n protected goToPage(page: number): void {\n if (page < 1 || page > this.totalPages()) {\n return;\n }\n if (page === this.zPageIndex()) {\n return;\n }\n\n this.zPageIndex.set(page);\n this._emitChange();\n }\n\n protected goToPrev(): void {\n if (!this.canGoPrev()) {\n return;\n }\n this.goToPage(this.zPageIndex() - 1);\n }\n\n protected goToNext(): void {\n if (!this.canGoNext()) {\n return;\n }\n this.goToPage(this.zPageIndex() + 1);\n }\n\n protected onPageSizeChange(size: unknown): void {\n const sizeValue =\n typeof size === 'object' && size !== null && 'value' in size\n ? (size as { value: number }).value\n : (size as number);\n\n const currentFirst = (this.zPageIndex() - 1) * this.zPageSize();\n const newPageIndex = Math.floor(currentFirst / sizeValue) + 1;\n\n this.zPageSize.set(sizeValue);\n this.zPageIndex.set(newPageIndex);\n this._emitChange();\n }\n\n protected onQuickJump(event: Event): void {\n const input = event.target as HTMLInputElement;\n const page = parseInt(input.value, 10);\n\n if (isNaN(page) || page < 1 || page > this.totalPages()) {\n input.value = String(this.zPageIndex());\n return;\n }\n\n this.goToPage(page);\n }\n\n private _emitChange(): void {\n this.zOnPageChange.emit({\n pageIndex: this.zPageIndex(),\n pageSize: this.zPageSize(),\n });\n }\n}\n","@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 <div class=\"flex items-center gap-1\">\n <!-- Prev Button -->\n <z-button zType=\"ghost\" 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 class=\"text-muted-foreground flex h-8 w-8 items-center justify-center text-sm\">...</span>\n } @else {\n <z-button\n [zType]=\"page === zPageIndex() ? 'default' : 'outline'\"\n [zWave]=\"false\"\n zSize=\"sm\"\n class=\"min-w-8\"\n [zDisabled]=\"zDisabled()\"\n (click)=\"goToPage(page)\">\n {{ page }}\n </z-button>\n }\n }\n\n <!-- Next Button -->\n <z-button zType=\"ghost\" zSize=\"sm\" [zDisabled]=\"!canGoNext() || zDisabled()\" (click)=\"goToNext()\">\n <z-icon zType=\"lucideChevronRight\" zSize=\"16\" />\n </z-button>\n </div>\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 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 px-2 text-sm\">{{ zPageIndex() }} / {{ totalPages() }}</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}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAsBa,oBAAoB,CAAA;AACf,IAAA,UAAU,GAAG,KAAK,CAAS,CAAC,sDAAC;AAC7B,IAAA,SAAS,GAAG,KAAK,CAAS,EAAE,qDAAC;AAC7B,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAU;AACjC,IAAA,gBAAgB,GAAG,KAAK,CAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,4DAAC;AACrD,IAAA,gBAAgB,GAAG,KAAK,CAAU,IAAI,4DAAC;AACvC,IAAA,gBAAgB,GAAG,KAAK,CAAU,KAAK,4DAAC;AACxC,IAAA,UAAU,GAAG,KAAK,CAAU,IAAI,sDAAC;AACjC,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC;AAC/B,IAAA,KAAK,GAAG,KAAK,CAAkB,SAAS,iDAAC;AACzC,IAAA,SAAS,GAAG,KAAK,CAAU,KAAK,qDAAC;AAEjC,IAAA,WAAW,GAAG,KAAK,CAAgB,IAAI,uDAAC;AACxC,IAAA,aAAa,GAAG,KAAK,CAAgB,IAAI,yDAAC;AAC1C,IAAA,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AAA,EAAA,kBAAA,EAAA,qBAAA,EAAA,SAAA,EAAA,WAAA,EAAA,YAAA,EAAA,eAAA,EAAA,aAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,SAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,OAAA,EAAA,CAAA,WAAA,EAAA,WAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,orBAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAS9F,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,SAAS;+BACE,cAAc,EAAA,OAAA,EACf,CAAC,WAAW,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,CAAC,EAAA,UAAA,EAC9F,IAAI,EAAA,SAAA,EAEL,CAAC,aAAa,CAAC,EAAA,eAAA,EACT,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,sCAAsC;AAC9C,qBAAA,EAAA,QAAA,EAAA,yoFAAA,EAAA;;;AEpBH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shival99-z-ui-components-z-pagination.mjs","sources":["../../../../libs/core-ui/components/z-pagination/z-pagination.component.ts","../../../../libs/core-ui/components/z-pagination/z-pagination.component.html","../../../../libs/core-ui/components/z-pagination/shival99-z-ui-components-z-pagination.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, input, model, output } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { ZButtonComponent } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { ZInputComponent } from '@shival99/z-ui/components/z-input';\nimport { ZSelectComponent } from '@shival99/z-ui/components/z-select';\nimport { startWith } from 'rxjs';\nimport type { ZPageChangeEvent, ZPaginationSize } from './z-pagination.types';\n\n@Component({\n selector: 'z-pagination',\n imports: [FormsModule, ZButtonComponent, ZIconComponent, ZInputComponent, ZSelectComponent, TranslatePipe],\n standalone: true,\n templateUrl: './z-pagination.component.html',\n providers: [TranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'z-pagination flex items-center gap-2',\n },\n})\nexport class ZPaginationComponent {\n public readonly zPageIndex = model<number>(1);\n public readonly zPageSize = model<number>(10);\n public readonly zTotal = input.required<number>();\n public readonly zPageSizeOptions = input<number[]>([10, 20, 50, 100]);\n public readonly zShowSizeChanger = input<boolean>(true);\n public readonly zShowQuickJumper = input<boolean>(false);\n public readonly zShowTotal = input<boolean>(true);\n public readonly zSimple = input<boolean>(false);\n public readonly zSize = input<ZPaginationSize>('default');\n public readonly zDisabled = input<boolean>(false);\n\n public readonly zTotalLabel = input<string | null>(null);\n public readonly zPerPageLabel = input<string | null>(null);\n public readonly zGoToLabel = input<string | null>(null);\n\n public readonly zOnPageChange = output<ZPageChangeEvent>();\n\n private readonly _translate = inject(TranslateService);\n private readonly _currentLang = toSignal(\n this._translate.onLangChange.pipe(startWith({ lang: this._translate.getCurrentLang() }))\n );\n\n protected readonly totalLabelText = computed(() => {\n this._currentLang();\n const label = this.zTotalLabel() ?? this._translate.instant('i18n_z_ui_pagination_total_label');\n return label.replace('{total}', String(this.zTotal()));\n });\n\n protected readonly perPageLabelText = computed(() => {\n this._currentLang();\n return this.zPerPageLabel() ?? this._translate.instant('i18n_z_ui_pagination_per_page');\n });\n\n protected readonly goToLabelText = computed(() => {\n this._currentLang();\n return this.zGoToLabel() ?? this._translate.instant('i18n_z_ui_pagination_go_to');\n });\n\n protected readonly totalPages = computed(() => {\n const total = this.zTotal();\n const pageSize = this.zPageSize();\n return Math.max(1, Math.ceil(total / pageSize));\n });\n\n protected readonly pageSizeOptions = computed(() =>\n this.zPageSizeOptions().map(size => ({\n label: `${size} ${this.perPageLabelText()}`,\n value: size,\n }))\n );\n\n protected readonly visiblePages = computed(() => {\n const current = this.zPageIndex();\n const total = this.totalPages();\n const pages: (number | 'ellipsis')[] = [];\n const maxVisible = 5;\n\n if (total <= maxVisible) {\n for (let i = 1; i <= total; i++) {\n pages.push(i);\n }\n return pages;\n }\n\n pages.push(1);\n\n let startPage = Math.max(2, current - 1);\n let endPage = Math.min(total - 1, current + 1);\n\n if (current <= 3) {\n endPage = Math.min(total - 1, 3);\n } else if (current >= total - 2) {\n startPage = Math.max(2, total - 2);\n }\n\n if (startPage > 2) {\n pages.push('ellipsis');\n }\n\n for (let i = startPage; i <= endPage; i++) {\n pages.push(i);\n }\n\n if (endPage < total - 1) {\n pages.push('ellipsis');\n }\n\n pages.push(total);\n\n return pages;\n });\n\n protected readonly canGoPrev = computed(() => this.zPageIndex() > 1);\n protected readonly canGoNext = computed(() => this.zPageIndex() < this.totalPages());\n\n protected goToPage(page: number): void {\n if (page < 1 || page > this.totalPages()) {\n return;\n }\n if (page === this.zPageIndex()) {\n return;\n }\n\n this.zPageIndex.set(page);\n this._emitChange();\n }\n\n protected goToPrev(): void {\n if (!this.canGoPrev()) {\n return;\n }\n this.goToPage(this.zPageIndex() - 1);\n }\n\n protected goToNext(): void {\n if (!this.canGoNext()) {\n return;\n }\n this.goToPage(this.zPageIndex() + 1);\n }\n\n protected onPageSizeChange(size: unknown): void {\n const sizeValue =\n typeof size === 'object' && size !== null && 'value' in size\n ? (size as { value: number }).value\n : (size as number);\n\n const currentFirst = (this.zPageIndex() - 1) * this.zPageSize();\n const newPageIndex = Math.floor(currentFirst / sizeValue) + 1;\n\n this.zPageSize.set(sizeValue);\n this.zPageIndex.set(newPageIndex);\n this._emitChange();\n }\n\n protected onQuickJump(event: Event): void {\n const input = event.target as HTMLInputElement;\n const page = parseInt(input.value, 10);\n\n if (isNaN(page) || page < 1 || page > this.totalPages()) {\n input.value = String(this.zPageIndex());\n return;\n }\n\n this.goToPage(page);\n }\n\n private _emitChange(): void {\n this.zOnPageChange.emit({\n pageIndex: this.zPageIndex(),\n pageSize: this.zPageSize(),\n });\n }\n}\n","@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 <div class=\"flex items-center gap-1\">\n <!-- Prev Button -->\n <z-button zType=\"ghost\" 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 class=\"text-muted-foreground flex h-8 w-8 items-center justify-center text-sm\">...</span>\n } @else {\n <z-button\n [zType]=\"page === zPageIndex() ? 'default' : 'outline'\"\n [zWave]=\"false\"\n zSize=\"sm\"\n class=\"min-w-8\"\n [zDisabled]=\"zDisabled()\"\n (click)=\"goToPage(page)\">\n {{ page }}\n </z-button>\n }\n }\n\n <!-- Next Button -->\n <z-button zType=\"ghost\" zSize=\"sm\" [zDisabled]=\"!canGoNext() || zDisabled()\" (click)=\"goToNext()\">\n <z-icon zType=\"lucideChevronRight\" zSize=\"16\" />\n </z-button>\n </div>\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 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 px-2 text-sm\">{{ zPageIndex() }} / {{ totalPages() }}</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}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAsBa,oBAAoB,CAAA;AACf,IAAA,UAAU,GAAG,KAAK,CAAS,CAAC,sDAAC;AAC7B,IAAA,SAAS,GAAG,KAAK,CAAS,EAAE,qDAAC;AAC7B,IAAA,MAAM,GAAG,KAAK,CAAC,QAAQ,iDAAU;AACjC,IAAA,gBAAgB,GAAG,KAAK,CAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,4DAAC;AACrD,IAAA,gBAAgB,GAAG,KAAK,CAAU,IAAI,4DAAC;AACvC,IAAA,gBAAgB,GAAG,KAAK,CAAU,KAAK,4DAAC;AACxC,IAAA,UAAU,GAAG,KAAK,CAAU,IAAI,sDAAC;AACjC,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC;AAC/B,IAAA,KAAK,GAAG,KAAK,CAAkB,SAAS,iDAAC;AACzC,IAAA,SAAS,GAAG,KAAK,CAAU,KAAK,qDAA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,OAAA,EAAA,aAAA,EAAA,OAAA,EAAA,gBAAA,EAAA,gBAAA,EAAA,oBAAA,EAAA,gBAAA,EAAA,aAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,qBAAA,EAAA,SAAA,EAAA,WAAA,EAAA,YAAA,EAAA,eAAA,EAAA,aAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,SAAA,EAAA,YAAA,EAAA,cAAA,CAAA,EAAA,OAAA,EAAA,CAAA,WAAA,EAAA,WAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,wsBAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAS9F,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,SAAS;+BACE,cAAc,EAAA,OAAA,EACf,CAAC,WAAW,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,CAAC,EAAA,UAAA,EAC9F,IAAI,EAAA,SAAA,EAEL,CAAC,aAAa,CAAC,EAAA,eAAA,EACT,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,KAAK,EAAE,sCAAsC;AAC9C,qBAAA,EAAA,QAAA,EAAA,yoFAAA,EAAA;;;AEpBH;;AAEG;;;;"}
|
|
@@ -265,6 +265,7 @@ class ZSelectComponent {
|
|
|
265
265
|
zVirtualScroll = input(false, { ...(ngDevMode ? { debugName: "zVirtualScroll" } : {}), transform: zTransform });
|
|
266
266
|
zShowAction = input(false, { ...(ngDevMode ? { debugName: "zShowAction" } : {}), transform: zTransform });
|
|
267
267
|
zOptions = input([], ...(ngDevMode ? [{ debugName: "zOptions" }] : []));
|
|
268
|
+
zTranslateLabels = input(true, { ...(ngDevMode ? { debugName: "zTranslateLabels" } : {}), transform: zTransform });
|
|
268
269
|
zKey = input('', ...(ngDevMode ? [{ debugName: "zKey" }] : []));
|
|
269
270
|
zSearchServer = input(false, { ...(ngDevMode ? { debugName: "zSearchServer" } : {}), transform: zTransform });
|
|
270
271
|
zLoadingMore = input(false, { ...(ngDevMode ? { debugName: "zLoadingMore" } : {}), transform: zTransform });
|
|
@@ -355,6 +356,17 @@ class ZSelectComponent {
|
|
|
355
356
|
this._zTranslate.currentLang();
|
|
356
357
|
return this._zTranslate.instant('i18n_z_ui_select_required');
|
|
357
358
|
}, ...(ngDevMode ? [{ debugName: "effectiveRequiredErrorText" }] : []));
|
|
359
|
+
translatedOptions = computed(() => {
|
|
360
|
+
this._zTranslate.currentLang();
|
|
361
|
+
const options = this.zOptions();
|
|
362
|
+
if (!this.zTranslateLabels()) {
|
|
363
|
+
return options;
|
|
364
|
+
}
|
|
365
|
+
return options.map(opt => ({
|
|
366
|
+
...opt,
|
|
367
|
+
label: this._zTranslate.instant(opt.label),
|
|
368
|
+
}));
|
|
369
|
+
}, ...(ngDevMode ? [{ debugName: "translatedOptions" }] : []));
|
|
358
370
|
isMultipleMode = computed(() => {
|
|
359
371
|
const mode = this.zMode();
|
|
360
372
|
return mode === 'multiple' || mode === 'tags';
|
|
@@ -391,7 +403,7 @@ class ZSelectComponent {
|
|
|
391
403
|
if (value === null || value === undefined) {
|
|
392
404
|
return null;
|
|
393
405
|
}
|
|
394
|
-
const options = this.zSearchServer() ? this._allKnownOptions() : this.
|
|
406
|
+
const options = this.zSearchServer() ? this._allKnownOptions() : this.translatedOptions();
|
|
395
407
|
return options.find(opt => opt.value === value) ?? null;
|
|
396
408
|
}, ...(ngDevMode ? [{ debugName: "selectedOption" }] : []));
|
|
397
409
|
selectedOptions = computed(() => {
|
|
@@ -402,7 +414,7 @@ class ZSelectComponent {
|
|
|
402
414
|
if (!Array.isArray(value)) {
|
|
403
415
|
return [];
|
|
404
416
|
}
|
|
405
|
-
const options = this.zSearchServer() ? this._allKnownOptions() : this.
|
|
417
|
+
const options = this.zSearchServer() ? this._allKnownOptions() : this.translatedOptions();
|
|
406
418
|
return value
|
|
407
419
|
.map(v => options.find(opt => opt.value === v))
|
|
408
420
|
.filter((opt) => opt !== undefined);
|
|
@@ -426,22 +438,22 @@ class ZSelectComponent {
|
|
|
426
438
|
}, ...(ngDevMode ? [{ debugName: "hasValue" }] : []));
|
|
427
439
|
filteredOptions = computed(() => {
|
|
428
440
|
if (this.zSearchServer()) {
|
|
429
|
-
return this.
|
|
441
|
+
return this.translatedOptions();
|
|
430
442
|
}
|
|
431
|
-
return filterOptions(this.
|
|
443
|
+
return filterOptions(this.translatedOptions(), this.searchText());
|
|
432
444
|
}, ...(ngDevMode ? [{ debugName: "filteredOptions" }] : []));
|
|
433
445
|
isEmptyData = computed(() => {
|
|
434
446
|
if (this.zSearchServer() && this.searchText().trim()) {
|
|
435
447
|
return false;
|
|
436
448
|
}
|
|
437
|
-
return this.
|
|
449
|
+
return this.translatedOptions().length === 0;
|
|
438
450
|
}, ...(ngDevMode ? [{ debugName: "isEmptyData" }] : []));
|
|
439
451
|
isNoSearchResults = computed(() => {
|
|
440
452
|
if (this.zSearchServer() && this.searchText().trim()) {
|
|
441
|
-
return this.
|
|
453
|
+
return this.translatedOptions().length === 0;
|
|
442
454
|
}
|
|
443
455
|
const noFiltered = this.filteredOptions().length === 0;
|
|
444
|
-
const hasOptions = this.
|
|
456
|
+
const hasOptions = this.translatedOptions().length > 0;
|
|
445
457
|
const hasSearch = this.searchText().trim() !== '';
|
|
446
458
|
return noFiltered && hasOptions && hasSearch;
|
|
447
459
|
}, ...(ngDevMode ? [{ debugName: "isNoSearchResults" }] : []));
|
|
@@ -1036,7 +1048,7 @@ class ZSelectComponent {
|
|
|
1036
1048
|
}
|
|
1037
1049
|
}
|
|
1038
1050
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1039
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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 }, 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 }, 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", zControl: "zControl" }, providers: [
|
|
1051
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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 }, 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", zControl: "zControl" }, providers: [
|
|
1040
1052
|
{
|
|
1041
1053
|
provide: NG_VALUE_ACCESSOR,
|
|
1042
1054
|
useExisting: forwardRef(() => ZSelectComponent),
|
|
@@ -1067,7 +1079,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1067
1079
|
multi: true,
|
|
1068
1080
|
},
|
|
1069
1081
|
], 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\n #triggerEl\n [id]=\"selectId\"\n z-popover\n [zPopoverContent]=\"dropdownTpl\"\n [zOffset]=\"6\"\n [zDisabled]=\"isInteractionDisabled()\"\n zTrigger=\"click\"\n zPosition=\"bottom\"\n zClass=\"border-0 shadow-none bg-transparent 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]=\"isOpen()\"\n (mousedown)=\"onTriggerMousedown()\"\n (keydown)=\"onTriggerKeydown($event)\"\n tabindex=\"0\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-controls]=\"dropdownId\">\n @if (zPrefix()) {\n <z-icon [zType]=\"zPrefix() || 'lucideChevronDown'\" zSize=\"16\" 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\">\n {{ effectivePlaceholder() }}\n </span>\n } @else {\n @for (opt of displayedTags(); track opt.value) {\n <span #tagEl [class]=\"opt | zTagClasses: zSize() : isTagsMode()\" class=\"z-select-tag\">\n @if (effectiveSelectedTemplate()) {\n <ng-container *ngTemplateOutlet=\"effectiveSelectedTemplate()!; context: { $implicit: opt }\" />\n } @else {\n <span\n class=\"max-w-25 truncate\"\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 items-center justify-center rounded-[3px] 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 class=\"z-select-remaining text-muted-foreground bg-muted rounded 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 *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\">\n {{ effectivePlaceholder() }}\n </span>\n }\n }\n </div>\n\n @if (zLoading() || zLoadingMore()) {\n <z-icon zType=\"lucideLoaderCircle\" zSize=\"14\" 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=\"14\" />\n </button>\n }\n\n @if (isValidating()) {\n <z-icon zType=\"lucideLoader2\" zSize=\"14\" class=\"text-muted-foreground shrink-0 animate-spin\" />\n }\n\n <z-icon\n zType=\"lucideChevronDown\"\n zSize=\"16\"\n class=\"text-muted-foreground shrink-0 transition-transform duration-200\"\n [class.rotate-180]=\"isOpen()\" />\n </div>\n\n @if (showError()) {\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-[6px] border shadow-lg\"\n [style.width.px]=\"dropdownWidth()\">\n @if (zShowSearch()) {\n <div class=\"border-border flex items-center border-b px-3\">\n <z-icon zType=\"lucideSearch\" zSize=\"16\" 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 flex-col items-center justify-center py-8\">\n <z-loading [zLoading]=\"true\" zSize=\"default\" />\n </div>\n } @else {\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=\"14\" 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=\"14\" class=\"text-primary ml-auto shrink-0\" />\n }\n </div>\n }\n <div #loadMoreSentinel class=\"h-px w-full shrink-0\"></div>\n </div>\n }\n\n @if (filteredOptions().length === 0) {\n <div class=\"flex flex-col items-center justify-center py-8\">\n @if (isEmptyData()) {\n <z-icon [zType]=\"zEmptyIcon()\" zSize=\"40\" class=\"text-muted-foreground/50 mb-2\" />\n <span class=\"text-muted-foreground text-sm\">\n {{ effectiveEmptyText() }}\n </span>\n } @else {\n <z-icon zType=\"lucideSearch\" zSize=\"40\" class=\"text-muted-foreground/50 mb-2\" />\n <span class=\"text-muted-foreground text-sm\">\n {{ effectiveNotFoundText() }}\n </span>\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() && 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 zSize=\"xs\" zType=\"ghost-info\" class=\"flex-1\" (click)=\"selectAll()\" [zWave]=\"false\">\n <z-icon zType=\"lucideCheckCheck\" zSize=\"14\" />\n {{ effectiveSelectAllText() }}\n </z-button>\n <z-button zSize=\"xs\" zType=\"ghost-error\" class=\"flex-1\" (click)=\"removeAll()\" [zWave]=\"false\">\n <z-icon zType=\"lucideX\" zSize=\"14\" />\n {{ effectiveClearAllText() }}\n </z-button>\n }\n </div>\n }\n </div>\n</ng-template>\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);transition:transform .15s ease}.z-select-tag:hover{transform:translateY(-1px)}.z-select-tag:active{transform:scale(.95)}@keyframes z-select-tag-enter{0%{opacity:0;transform:scale(.8) translateY(4px)}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{animation:z-select-dropdown-enter .15s ease-out;contain:layout style;will-change:transform,opacity}@keyframes z-select-dropdown-enter{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.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(-4px)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
1070
|
-
}], ctorParameters: () => [], propDecorators: { 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 }] }], 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 }] }], 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 }] }], 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"] }], zControl: [{ type: i0.Output, args: ["zControl"] }], 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 }] }], 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 }] }] } });
|
|
1082
|
+
}], ctorParameters: () => [], propDecorators: { 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 }] }], 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 }] }], 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"] }], zControl: [{ type: i0.Output, args: ["zControl"] }], 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 }] }], 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 }] }] } });
|
|
1071
1083
|
|
|
1072
1084
|
/**
|
|
1073
1085
|
* Generated bundle index. Do not edit.
|