@shival99/z-ui 1.6.9 → 1.7.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/assets/css/animations.css +6 -0
- package/assets/css/base.css +0 -6
- package/assets/css/themes/gray.css +8 -0
- package/assets/css/themes/green.css +8 -0
- package/assets/css/themes/hospital.css +8 -0
- package/assets/css/themes/neutral.css +8 -0
- package/assets/css/themes/orange.css +8 -0
- package/assets/css/themes/slate.css +8 -0
- package/assets/css/themes/stone.css +8 -0
- package/assets/css/themes/violet.css +8 -0
- package/assets/css/themes/zinc.css +8 -0
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +22 -20
- package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs +191 -0
- package/fesm2022/shival99-z-ui-components-z-button-group.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-button.mjs +6 -1
- package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs +60 -52
- package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +13 -5
- package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs +7 -4
- package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-editor.mjs +28 -25
- package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-filter.mjs +1 -1
- package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs +1573 -0
- package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -0
- package/fesm2022/shival99-z-ui-components-z-icon.mjs +3 -1
- package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-input.mjs +114 -109
- package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-modal.mjs +10 -9
- package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
- 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-radio.mjs +13 -5
- package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-select.mjs +37 -29
- package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-switch.mjs +13 -5
- package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-table.mjs +1268 -1254
- package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-components-z-upload.mjs +21 -19
- package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-i18n.mjs +22 -0
- package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-pipes.mjs +32 -1
- package/fesm2022/shival99-z-ui-pipes.mjs.map +1 -1
- package/fesm2022/shival99-z-ui-utils.mjs +9 -1
- package/fesm2022/shival99-z-ui-utils.mjs.map +1 -1
- package/package.json +9 -1
- package/types/shival99-z-ui-components-z-autocomplete.d.ts +12 -10
- package/types/shival99-z-ui-components-z-breadcrumb.d.ts +2 -2
- package/types/shival99-z-ui-components-z-button-group.d.ts +56 -0
- package/types/shival99-z-ui-components-z-button.d.ts +1 -1
- package/types/shival99-z-ui-components-z-calendar.d.ts +9 -8
- package/types/shival99-z-ui-components-z-checkbox.d.ts +5 -1
- package/types/shival99-z-ui-components-z-dropdown-menu.d.ts +1 -1
- package/types/shival99-z-ui-components-z-editor.d.ts +8 -6
- package/types/shival99-z-ui-components-z-empty.d.ts +2 -2
- package/types/shival99-z-ui-components-z-filter.d.ts +1 -1
- package/types/shival99-z-ui-components-z-gallery.d.ts +192 -0
- package/types/shival99-z-ui-components-z-icon.d.ts +3 -1
- package/types/shival99-z-ui-components-z-input.d.ts +40 -27
- package/types/shival99-z-ui-components-z-radio.d.ts +5 -1
- package/types/shival99-z-ui-components-z-select.d.ts +8 -7
- package/types/shival99-z-ui-components-z-switch.d.ts +5 -1
- package/types/shival99-z-ui-components-z-table.d.ts +25 -22
- package/types/shival99-z-ui-components-z-upload.d.ts +7 -3
- package/types/shival99-z-ui-pipes.d.ts +21 -2
- package/types/shival99-z-ui-utils.d.ts +39 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shival99-z-ui-components-z-editor.mjs","sources":["../../../../libs/core-ui/components/z-editor/z-editor.variants.ts","../../../../libs/core-ui/components/z-editor/z-editor.component.ts","../../../../libs/core-ui/components/z-editor/shival99-z-ui-components-z-editor.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zEditorVariants = cva(\n [\n 'z-editor block w-full rounded-[6px] border border-input bg-white shadow-xs',\n 'transition-[border-color,box-shadow,background-color,color,opacity] duration-200',\n 'dark:bg-input/30 dark:border-input',\n 'outline-none',\n ],\n {\n variants: {\n zSize: {\n sm: '[&_.ql-editor]:min-h-24 [&_.ql-editor]:text-sm',\n default: '[&_.ql-editor]:min-h-40 [&_.ql-editor]:text-sm',\n lg: '[&_.ql-editor]:min-h-60 [&_.ql-editor]:text-base',\n },\n zStatus: {\n default: 'focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]',\n error:\n 'border-destructive! ring-destructive/20 ring-[3px] focus-within:border-destructive! focus-within:ring-destructive/30',\n disabled: 'opacity-50 cursor-not-allowed bg-muted! text-muted-foreground',\n readonly: 'bg-muted/50! text-muted-foreground cursor-default',\n },\n },\n defaultVariants: {\n zSize: 'default',\n zStatus: 'default',\n },\n }\n);\n\nexport type ZEditorVariants = VariantProps<typeof zEditorVariants>;\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n forwardRef,\n inject,\n Injector,\n input,\n type OnInit,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n type AbstractControl,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NgControl,\n NgModel,\n PristineChangeEvent,\n ReactiveFormsModule,\n TouchedChangeEvent,\n} from '@angular/forms';\nimport { FormsModule } from '@angular/forms';\nimport { ZTranslateService } from '@shival99/z-ui/services';\nimport { zUuid, zMergeClasses, zTransform } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { ContentChange, QuillEditorComponent, QuillModule, type QuillModules } from 'ngx-quill';\nimport Quill from 'quill';\nimport QuillResizeImage from 'quill-resize-image';\nimport { filter, merge } from 'rxjs';\nimport type { ZEditorControl, ZEditorSize, ZEditorValidator } from './z-editor.types';\nimport { zEditorVariants } from './z-editor.variants';\n\nQuill.register('modules/resize', QuillResizeImage);\nconst DEFAULT_TOOLBAR = [\n ['bold', 'italic', 'underline', 'strike'],\n ['blockquote', 'code-block'],\n [{ header: 1 }, { header: 2 }],\n [{ list: 'ordered' }, { list: 'bullet' }],\n [{ indent: '-1' }, { indent: '+1' }],\n [{ align: [] }],\n [{ color: [] }, { background: [] }],\n ['link', 'image'],\n ['clean'],\n];\n\n@Component({\n selector: 'z-editor',\n imports: [QuillModule, ReactiveFormsModule, FormsModule],\n standalone: true,\n template: `\n <div [class]=\"wrapperClasses()\" [class.z-editor-disabled]=\"isDisabled()\" [class.z-editor-readonly]=\"zReadonly()\">\n @if (zLabel()) {\n <label [for]=\"editorId\" 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 <quill-editor\n [id]=\"editorId\"\n [class]=\"editorClasses()\"\n [modules]=\"effectiveModules()\"\n [placeholder]=\"effectivePlaceholder()\"\n [readOnly]=\"isDisabled() || zReadonly()\"\n [formats]=\"zFormats()\"\n [bounds]=\"zBounds()\"\n [theme]=\"zTheme()\"\n [ngModel]=\"internalValue()\"\n (onContentChanged)=\"onContentChange($event)\"\n (onFocus)=\"onFocus()\"\n (onBlur)=\"onBlur()\"\n />\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 styleUrl: './z-editor.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ZEditorComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'zEditor',\n})\nexport class ZEditorComponent implements OnInit, ControlValueAccessor {\n private readonly _injector = inject(Injector);\n private readonly _destroyRef = inject(DestroyRef);\n private readonly _zTranslate = inject(ZTranslateService);\n\n public readonly zOnChange = output<string>();\n public readonly zOnFocus = output<void>();\n public readonly zOnBlur = output<void>();\n public readonly zControl = output<ZEditorControl>();\n\n public readonly class = input<ClassValue>('');\n public readonly zSize = input<ZEditorSize>('default');\n public readonly zLabel = input<string>('');\n public readonly zLabelClass = input<string>('');\n public readonly zPlaceholder = input<string>('');\n public readonly zRequired = input(false, { transform: zTransform });\n public readonly zDisabled = input(false, { transform: zTransform });\n public readonly zReadonly = input(false, { transform: zTransform });\n public readonly zModules = input<QuillModules | null>(null);\n public readonly zFormats = input<string[] | null>(null);\n public readonly zBounds = input<string | HTMLElement>('document.body');\n public readonly zTheme = input<'snow' | 'bubble'>('snow');\n public readonly zValidators = input<ZEditorValidator[]>([]);\n\n protected readonly editorId = zUuid('z-editor');\n\n private readonly _value = signal<string>('');\n private readonly _touched = signal(false);\n private readonly _disabled = signal(false);\n private readonly _dirty = signal(false);\n private readonly _formControl = signal<AbstractControl | null>(null);\n private readonly _formStateVersion = signal(0);\n private readonly _isNgModel = signal(false);\n private _onChange: (value: string) => void = () => void 0;\n private _onTouched: () => void = () => void 0;\n private _ngControl: NgControl | null = null;\n private _editorInstance: QuillEditorComponent | null = null;\n\n protected readonly isDisabled = computed(() => this._disabled() || this.zDisabled());\n protected readonly internalValue = computed(() => this._value());\n protected readonly effectivePlaceholder = computed(() => {\n this._zTranslate.currentLang();\n return this.zPlaceholder() || this._zTranslate.instant('i18n_z_ui_editor_placeholder');\n });\n\n protected readonly effectiveModules = computed<QuillModules>(() => {\n const customModules = this.zModules();\n if (customModules) {\n return customModules;\n }\n\n return {\n toolbar: DEFAULT_TOOLBAR,\n resize: {\n locale: {},\n },\n history: {\n delay: 1000,\n maxStack: 50,\n userOnly: true,\n },\n };\n });\n\n private readonly _shouldShowValidation = computed(() => {\n const control = this._formControl();\n this._formStateVersion();\n\n if (this._isNgModel()) {\n return this._dirty() || this._touched();\n }\n\n if (control) {\n return control.dirty;\n }\n\n return this._dirty() || this._touched();\n });\n\n private _getValidationErrors(): string[] {\n const errors: string[] = [];\n const value = this._value();\n const validators = this.zValidators();\n\n if (!this._shouldShowValidation()) {\n return errors;\n }\n\n // Check zRequired independently (works with ngModel without formControlName)\n const isRequired = this.zRequired() || this._formControl()?.errors?.['required'];\n if (isRequired && (!value || value.trim() === '' || value === '<p><br></p>')) {\n this._zTranslate.currentLang();\n errors.push(this._zTranslate.instant('i18n_z_ui_editor_required'));\n }\n\n for (const validator of validators) {\n // Skip required check here since we already checked above\n if (validator.error === 'required') {\n continue;\n }\n\n if (validator.minLength && value.length < validator.minLength) {\n errors.push(validator.message);\n continue;\n }\n\n if (validator.maxLength && value.length > validator.maxLength) {\n errors.push(validator.message);\n continue;\n }\n\n if (validator.pattern && !validator.pattern.test(value)) {\n errors.push(validator.message);\n }\n }\n\n return errors;\n }\n\n protected readonly hasError = computed(() => {\n const customErrors = this._getValidationErrors();\n if (customErrors.length > 0) {\n return true;\n }\n\n const control = this._formControl();\n this._formStateVersion();\n\n if (!control) {\n return false;\n }\n\n return control.invalid && this._shouldShowValidation();\n });\n\n protected readonly showError = computed(() => this.hasError());\n\n protected readonly errorMessage = computed(() => {\n const customErrors = this._getValidationErrors();\n if (customErrors.length > 0) {\n return customErrors[0];\n }\n\n const control = this._formControl();\n const errors = control?.errors;\n\n if (!errors) {\n return '';\n }\n\n this._zTranslate.currentLang();\n if (errors['required']) {\n return this._zTranslate.instant('i18n_z_ui_editor_required');\n }\n\n if (errors['minlength']) {\n return this._zTranslate.instant('i18n_z_ui_editor_min_length', {\n min: errors['minlength'].requiredLength,\n });\n }\n\n if (errors['maxlength']) {\n return this._zTranslate.instant('i18n_z_ui_editor_max_length', {\n max: errors['maxlength'].requiredLength,\n });\n }\n\n return this._zTranslate.instant('i18n_z_ui_editor_invalid');\n });\n\n protected readonly currentStatus = computed(() => {\n if (this.isDisabled()) {\n return 'disabled';\n }\n\n if (this.zReadonly()) {\n return 'readonly';\n }\n\n if (this.hasError()) {\n return 'error';\n }\n\n return 'default';\n });\n\n protected readonly wrapperClasses = computed(() => 'z-editor-wrapper flex w-full flex-col gap-2');\n\n protected readonly labelClasses = computed(() =>\n zMergeClasses('mb-1.5 block text-sm font-medium text-foreground', this.zLabelClass())\n );\n\n protected readonly editorClasses = computed(() =>\n zMergeClasses(\n zEditorVariants({\n zSize: this.zSize(),\n zStatus: this.currentStatus(),\n }),\n this.class()\n )\n );\n\n ngOnInit(): void {\n queueMicrotask(() => {\n try {\n this._ngControl = this._injector.get(NgControl, null);\n this._isNgModel.set(this._ngControl instanceof NgModel);\n\n if (this._ngControl?.control) {\n const { control } = this._ngControl;\n this._formControl.set(control);\n merge(\n control.statusChanges,\n control.valueChanges,\n control.events.pipe(\n filter(event => event instanceof PristineChangeEvent || event instanceof TouchedChangeEvent)\n )\n )\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe(() => {\n this._formStateVersion.update(v => v + 1);\n });\n }\n } catch {\n this._ngControl = null;\n }\n });\n\n setTimeout(() => this._emitControl());\n }\n\n public writeValue(value: string): void {\n this._value.set(value || '');\n }\n\n public registerOnChange(fn: (value: string) => void): void {\n this._onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n\n protected onContentChange(event: ContentChange): void {\n const html = event.html || '';\n this._value.set(html);\n this._dirty.set(true);\n this._onChange(html);\n this.zOnChange.emit(html);\n }\n\n protected onFocus(): void {\n this.zOnFocus.emit();\n }\n\n protected onBlur(): void {\n if (this._dirty()) {\n this._touched.set(true);\n }\n\n this._onTouched();\n this.zOnBlur.emit();\n }\n\n public focus(): void {\n this._editorInstance?.quillEditor?.focus();\n }\n\n public blur(): void {\n this._editorInstance?.quillEditor?.blur();\n }\n\n public clear(): void {\n this._value.set('');\n this._onChange('');\n }\n\n public setContent(content: string): void {\n this._value.set(content);\n this._onChange(content);\n }\n\n public getContent(): string {\n return this._value();\n }\n\n public getText(): string {\n return this._editorInstance?.quillEditor?.getText() || '';\n }\n\n public getLength(): number {\n return this._editorInstance?.quillEditor?.getLength() || 0;\n }\n\n public markAsTouched(): void {\n this._touched.set(true);\n this._onTouched();\n }\n\n public markAsDirty(): void {\n this._dirty.set(true);\n }\n\n public markAsPristine(): void {\n this._dirty.set(false);\n }\n\n public markAsUntouched(): void {\n this._touched.set(false);\n }\n\n public setValue(content: string): void {\n this.setContent(content);\n }\n\n public validate(): boolean {\n this._touched.set(true);\n this._dirty.set(true);\n this._onTouched();\n\n if (this._ngControl?.control) {\n this._ngControl.control.markAsDirty();\n this._ngControl.control.markAsTouched();\n }\n\n return this._ngControl?.control?.valid ?? true;\n }\n\n public reset(): void {\n this._value.set('');\n this._touched.set(false);\n this._dirty.set(false);\n this._onChange('');\n\n if (this._ngControl?.control) {\n this._ngControl.control.markAsPristine();\n this._ngControl.control.markAsUntouched();\n }\n }\n\n private _emitControl(): void {\n this.zControl.emit({\n focus: () => this.focus(),\n blur: () => this.blur(),\n clear: () => this.clear(),\n setContent: (content: string) => this.setContent(content),\n getContent: () => this.getContent(),\n getText: () => this.getText(),\n getLength: () => this.getLength(),\n validate: () => this.validate(),\n reset: () => this.reset(),\n markAsTouched: () => this.markAsTouched(),\n markAsUntouched: () => this.markAsUntouched(),\n markAsDirty: () => this.markAsDirty(),\n markAsPristine: () => this.markAsPristine(),\n setValue: (content: string) => this.setValue(content),\n hasError: this.hasError,\n value: this.internalValue,\n errorMessage: this.errorMessage,\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAEO,MAAM,eAAe,GAAG,GAAG,CAChC;IACE,4EAA4E;IAC5E,kFAAkF;IAClF,oCAAoC;IACpC,cAAc;CACf,EACD;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,EAAE,EAAE,gDAAgD;AACpD,YAAA,OAAO,EAAE,gDAAgD;AACzD,YAAA,EAAE,EAAE,kDAAkD;AACvD,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,4EAA4E;AACrF,YAAA,KAAK,EACH,sHAAsH;AACxH,YAAA,QAAQ,EAAE,+DAA+D;AACzE,YAAA,QAAQ,EAAE,mDAAmD;AAC9D,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;;ACQH,KAAK,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;AAClD,MAAM,eAAe,GAAG;AACtB,IAAA,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAC;IACzC,CAAC,YAAY,EAAE,YAAY,CAAC;IAC5B,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAA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AA,UAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FA+C5C,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAjD5B,SAAS;+BACE,UAAU,EAAA,OAAA,EACX,CAAC,WAAW,EAAE,mBAAmB,EAAE,WAAW,CAAC,EAAA,UAAA,EAC5C,IAAI,EAAA,QAAA,EACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCT,EAAA,SAAA,EAEU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,sBAAsB,CAAC;AAC/C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,YAC3B,SAAS,EAAA,MAAA,EAAA,CAAA,gk8BAAA,CAAA,EAAA;;;AChGrB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shival99-z-ui-components-z-editor.mjs","sources":["../../../../libs/core-ui/components/z-editor/z-editor.variants.ts","../../../../libs/core-ui/components/z-editor/z-editor.component.ts","../../../../libs/core-ui/components/z-editor/shival99-z-ui-components-z-editor.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const zEditorVariants = cva(\n [\n 'z-editor block w-full rounded-[6px] border border-input bg-white shadow-xs',\n 'transition-[border-color,box-shadow,background-color,color,opacity] duration-200',\n 'dark:bg-input/30 dark:border-input',\n 'outline-none',\n ],\n {\n variants: {\n zSize: {\n sm: '[&_.ql-editor]:min-h-24 [&_.ql-editor]:text-sm',\n default: '[&_.ql-editor]:min-h-40 [&_.ql-editor]:text-sm',\n lg: '[&_.ql-editor]:min-h-60 [&_.ql-editor]:text-base',\n },\n zStatus: {\n default: 'focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]',\n error:\n 'border-destructive! ring-destructive/20 ring-[3px] focus-within:border-destructive! focus-within:ring-destructive/30',\n disabled: 'opacity-50 cursor-not-allowed bg-muted! text-muted-foreground',\n readonly: 'bg-muted/50! text-muted-foreground cursor-default',\n },\n },\n defaultVariants: {\n zSize: 'default',\n zStatus: 'default',\n },\n }\n);\n\nexport type ZEditorVariants = VariantProps<typeof zEditorVariants>;\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n forwardRef,\n inject,\n Injector,\n input,\n type OnInit,\n output,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n type AbstractControl,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NgControl,\n NgModel,\n PristineChangeEvent,\n ReactiveFormsModule,\n TouchedChangeEvent,\n} from '@angular/forms';\nimport { FormsModule } from '@angular/forms';\nimport { ZTranslateService } from '@shival99/z-ui/services';\nimport { zUuid, zMergeClasses, zTransform, zCreateEvent, type ZEvent } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { ContentChange, QuillEditorComponent, QuillModule, type QuillModules } from 'ngx-quill';\nimport Quill from 'quill';\nimport QuillResizeImage from 'quill-resize-image';\nimport { filter, merge } from 'rxjs';\nimport type { ZEditorControl, ZEditorSize, ZEditorValidator } from './z-editor.types';\nimport { zEditorVariants } from './z-editor.variants';\n\nQuill.register('modules/resize', QuillResizeImage);\nconst DEFAULT_TOOLBAR = [\n ['bold', 'italic', 'underline', 'strike'],\n ['blockquote', 'code-block'],\n [{ header: 1 }, { header: 2 }],\n [{ list: 'ordered' }, { list: 'bullet' }],\n [{ indent: '-1' }, { indent: '+1' }],\n [{ align: [] }],\n [{ color: [] }, { background: [] }],\n ['link', 'image'],\n ['clean'],\n];\n\n@Component({\n selector: 'z-editor',\n imports: [QuillModule, ReactiveFormsModule, FormsModule],\n standalone: true,\n template: `\n <div [class]=\"wrapperClasses()\" [class.z-editor-disabled]=\"isDisabled()\" [class.z-editor-readonly]=\"zReadonly()\">\n @if (zLabel()) {\n <label [for]=\"editorId\" 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 <quill-editor\n [id]=\"editorId\"\n [class]=\"editorClasses()\"\n [modules]=\"effectiveModules()\"\n [placeholder]=\"effectivePlaceholder()\"\n [readOnly]=\"isDisabled() || zReadonly()\"\n [formats]=\"zFormats()\"\n [bounds]=\"zBounds()\"\n [theme]=\"zTheme()\"\n [ngModel]=\"_value()\"\n (onContentChanged)=\"onContentChange($event)\"\n (onFocus)=\"onFocus()\"\n (onBlur)=\"onBlur()\"\n />\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 styleUrl: './z-editor.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ZEditorComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n exportAs: 'zEditor',\n})\nexport class ZEditorComponent implements OnInit, ControlValueAccessor {\n private readonly _injector = inject(Injector);\n private readonly _destroyRef = inject(DestroyRef);\n private readonly _zTranslate = inject(ZTranslateService);\n\n public readonly zOnChange = output<string>();\n public readonly zOnFocus = output<void>();\n public readonly zOnBlur = output<void>();\n public readonly zControl = output<ZEditorControl>();\n public readonly zEvent = output<ZEvent>();\n\n public readonly class = input<ClassValue>('');\n public readonly zSize = input<ZEditorSize>('default');\n public readonly zLabel = input<string>('');\n public readonly zLabelClass = input<string>('');\n public readonly zPlaceholder = input<string>('');\n public readonly zRequired = input(false, { transform: zTransform });\n public readonly zDisabled = input(false, { transform: zTransform });\n public readonly zReadonly = input(false, { transform: zTransform });\n public readonly zModules = input<QuillModules | null>(null);\n public readonly zFormats = input<string[] | null>(null);\n public readonly zBounds = input<string | HTMLElement>('document.body');\n public readonly zTheme = input<'snow' | 'bubble'>('snow');\n public readonly zValidators = input<ZEditorValidator[]>([]);\n\n protected readonly editorId = zUuid('z-editor');\n\n protected readonly _value = signal<string>('');\n private readonly _disabled = signal(false);\n private readonly _formControl = signal<AbstractControl | null>(null);\n private readonly _formStateVersion = signal(0);\n private readonly _isNgModel = signal(false);\n\n protected readonly uiState = signal({\n touched: false,\n dirty: false,\n });\n\n private _onChange: (value: string) => void = () => void 0;\n private _onTouched: () => void = () => void 0;\n private _ngControl: NgControl | null = null;\n private _editorInstance: QuillEditorComponent | null = null;\n\n protected readonly isDisabled = computed(() => this._disabled() || this.zDisabled());\n protected readonly effectivePlaceholder = computed(() => {\n this._zTranslate.currentLang();\n return this.zPlaceholder() || this._zTranslate.instant('i18n_z_ui_editor_placeholder');\n });\n\n protected readonly effectiveModules = computed<QuillModules>(() => {\n const customModules = this.zModules();\n if (customModules) {\n return customModules;\n }\n\n return {\n toolbar: DEFAULT_TOOLBAR,\n resize: {\n locale: {},\n },\n history: {\n delay: 1000,\n maxStack: 50,\n userOnly: true,\n },\n };\n });\n\n private readonly _shouldShowValidation = computed(() => {\n const control = this._formControl();\n this._formStateVersion();\n\n if (this._isNgModel()) {\n return this.uiState().dirty || this.uiState().touched;\n }\n\n if (control) {\n return control.dirty;\n }\n\n return this.uiState().dirty || this.uiState().touched;\n });\n\n private _getValidationErrors(): string[] {\n const errors: string[] = [];\n const value = this._value();\n const validators = this.zValidators();\n\n if (!this._shouldShowValidation()) {\n return errors;\n }\n\n // Check zRequired independently (works with ngModel without formControlName)\n const isRequired = this.zRequired() || this._formControl()?.errors?.['required'];\n if (isRequired && (!value || value.trim() === '' || value === '<p><br></p>')) {\n this._zTranslate.currentLang();\n errors.push(this._zTranslate.instant('i18n_z_ui_editor_required'));\n }\n\n for (const validator of validators) {\n // Skip required check here since we already checked above\n if (validator.error === 'required') {\n continue;\n }\n\n if (validator.minLength && value.length < validator.minLength) {\n errors.push(validator.message);\n continue;\n }\n\n if (validator.maxLength && value.length > validator.maxLength) {\n errors.push(validator.message);\n continue;\n }\n\n if (validator.pattern && !validator.pattern.test(value)) {\n errors.push(validator.message);\n }\n }\n\n return errors;\n }\n\n protected readonly hasError = computed(() => {\n const customErrors = this._getValidationErrors();\n if (customErrors.length > 0) {\n return true;\n }\n\n const control = this._formControl();\n this._formStateVersion();\n\n if (!control) {\n return false;\n }\n\n return control.invalid && this._shouldShowValidation();\n });\n\n protected readonly errorMessage = computed(() => {\n const customErrors = this._getValidationErrors();\n if (customErrors.length > 0) {\n return customErrors[0];\n }\n\n const control = this._formControl();\n const errors = control?.errors;\n\n if (!errors) {\n return '';\n }\n\n this._zTranslate.currentLang();\n if (errors['required']) {\n return this._zTranslate.instant('i18n_z_ui_editor_required');\n }\n\n if (errors['minlength']) {\n return this._zTranslate.instant('i18n_z_ui_editor_min_length', {\n min: errors['minlength'].requiredLength,\n });\n }\n\n if (errors['maxlength']) {\n return this._zTranslate.instant('i18n_z_ui_editor_max_length', {\n max: errors['maxlength'].requiredLength,\n });\n }\n\n return this._zTranslate.instant('i18n_z_ui_editor_invalid');\n });\n\n protected readonly currentStatus = computed(() => {\n if (this.isDisabled()) {\n return 'disabled';\n }\n\n if (this.zReadonly()) {\n return 'readonly';\n }\n\n if (this.hasError()) {\n return 'error';\n }\n\n return 'default';\n });\n\n protected readonly wrapperClasses = computed(() => 'z-editor-wrapper flex w-full flex-col gap-2');\n\n protected readonly labelClasses = computed(() =>\n zMergeClasses('mb-1.5 block text-sm font-medium text-foreground', this.zLabelClass())\n );\n\n protected readonly editorClasses = computed(() =>\n zMergeClasses(\n zEditorVariants({\n zSize: this.zSize(),\n zStatus: this.currentStatus(),\n }),\n this.class()\n )\n );\n\n ngOnInit(): void {\n queueMicrotask(() => {\n try {\n this._ngControl = this._injector.get(NgControl, null);\n this._isNgModel.set(this._ngControl instanceof NgModel);\n\n if (this._ngControl?.control) {\n const { control } = this._ngControl;\n this._formControl.set(control);\n merge(\n control.statusChanges,\n control.valueChanges,\n control.events.pipe(\n filter(event => event instanceof PristineChangeEvent || event instanceof TouchedChangeEvent)\n )\n )\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe(() => {\n this._formStateVersion.update(v => v + 1);\n });\n }\n } catch {\n this._ngControl = null;\n }\n });\n\n setTimeout(() => this._emitControl());\n }\n\n public writeValue(value: string): void {\n this._value.set(value || '');\n }\n\n public registerOnChange(fn: (value: string) => void): void {\n this._onChange = fn;\n }\n\n public registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n public setDisabledState(isDisabled: boolean): void {\n this._disabled.set(isDisabled);\n }\n\n protected onContentChange(event: ContentChange): void {\n const html = event.html || '';\n this._value.set(html);\n this.uiState.update(s => ({ ...s, dirty: true }));\n this._onChange(html);\n this.zOnChange.emit(html);\n }\n\n protected onFocus(): void {\n this.zOnFocus.emit();\n const focusEvent = new FocusEvent('focus');\n this.zEvent.emit(zCreateEvent('focus', focusEvent));\n }\n\n protected onBlur(): void {\n if (this.uiState().dirty) {\n this.uiState.update(s => ({ ...s, touched: true }));\n }\n\n this._onTouched();\n this.zOnBlur.emit();\n const blurEvent = new FocusEvent('blur');\n this.zEvent.emit(zCreateEvent('blur', blurEvent));\n }\n\n public focus(): void {\n this._editorInstance?.quillEditor?.focus();\n }\n\n public blur(): void {\n this._editorInstance?.quillEditor?.blur();\n }\n\n public clear(): void {\n this._value.set('');\n this._onChange('');\n }\n\n public setContent(content: string): void {\n this._value.set(content);\n this._onChange(content);\n }\n\n public getContent(): string {\n return this._value();\n }\n\n public getText(): string {\n return this._editorInstance?.quillEditor?.getText() || '';\n }\n\n public getLength(): number {\n return this._editorInstance?.quillEditor?.getLength() || 0;\n }\n\n public markAsTouched(): void {\n this.uiState.update(s => ({ ...s, touched: true }));\n this._onTouched();\n }\n\n public markAsDirty(): void {\n this.uiState.update(s => ({ ...s, dirty: true }));\n }\n\n public markAsPristine(): void {\n this.uiState.update(s => ({ ...s, dirty: false }));\n }\n\n public markAsUntouched(): void {\n this.uiState.update(s => ({ ...s, touched: false }));\n }\n\n public setValue(content: string): void {\n this.setContent(content);\n }\n\n public validate(): boolean {\n this.uiState.update(s => ({ ...s, touched: true, dirty: true }));\n this._onTouched();\n\n if (this._ngControl?.control) {\n this._ngControl.control.markAsDirty();\n this._ngControl.control.markAsTouched();\n }\n\n return this._ngControl?.control?.valid ?? true;\n }\n\n public reset(): void {\n this._value.set('');\n this.uiState.update(s => ({ ...s, touched: false, dirty: false }));\n this._onChange('');\n\n if (this._ngControl?.control) {\n this._ngControl.control.markAsPristine();\n this._ngControl.control.markAsUntouched();\n }\n }\n\n private _emitControl(): void {\n this.zControl.emit({\n focus: () => this.focus(),\n blur: () => this.blur(),\n clear: () => this.clear(),\n setContent: (content: string) => this.setContent(content),\n getContent: () => this.getContent(),\n getText: () => this.getText(),\n getLength: () => this.getLength(),\n validate: () => this.validate(),\n reset: () => this.reset(),\n markAsTouched: () => this.markAsTouched(),\n markAsUntouched: () => this.markAsUntouched(),\n markAsDirty: () => this.markAsDirty(),\n markAsPristine: () => this.markAsPristine(),\n setValue: (content: string) => this.setValue(content),\n hasError: this.hasError,\n value: this._value.asReadonly(),\n errorMessage: this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AM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,YAC3B,SAAS,EAAA,MAAA,EAAA,CAAA,gk8BAAA,CAAA,EAAA;;;AChGrB;;AAEG;;;;"}
|
|
@@ -770,7 +770,7 @@ class ZFilterComponent {
|
|
|
770
770
|
return field.key || `field-${index}`;
|
|
771
771
|
}
|
|
772
772
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
773
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZFilterComponent, isStandalone: true, selector: "z-filter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zFilters: { classPropertyName: "zFilters", publicName: "zFilters", isSignal: true, isRequired: true, transformFunction: null }, zFields: { classPropertyName: "zFields", publicName: "zFields", isSignal: true, isRequired: true, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zI18n: { classPropertyName: "zI18n", publicName: "zI18n", isSignal: true, isRequired: false, transformFunction: null }, zShowAddButton: { classPropertyName: "zShowAddButton", publicName: "zShowAddButton", isSignal: true, isRequired: false, transformFunction: null }, zAllowMultiple: { classPropertyName: "zAllowMultiple", publicName: "zAllowMultiple", isSignal: true, isRequired: false, transformFunction: null }, zAddButtonIcon: { classPropertyName: "zAddButtonIcon", publicName: "zAddButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, zAddButtonText: { classPropertyName: "zAddButtonText", publicName: "zAddButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zFiltersChange: "zFiltersChange", zFilterAdd: "zFilterAdd", zFilterRemove: "zFilterRemove", zFilterUpdate: "zFilterUpdate" }, host: { attributes: { "data-slot": "z-filter" }, properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "addButtonTemplate", first: true, predicate: ["addButton"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "addFilterSearchInput", first: true, predicate: ["addFilterSearchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Add Filter Button -->\n@if (zShowAddButton() && selectableFields().length > 0) {\n @if (addButtonTemplate()) {\n <ng-container [ngTemplateOutlet]=\"addButtonTemplate()!\" />\n } @else {\n <button\n z-button\n zType=\"outline\"\n [zSize]=\"buttonSize()\"\n z-popover\n [zPopoverContent]=\"addFilterPopover\"\n zTrigger=\"click\"\n zPosition=\"bottom-left\"\n [zOffset]=\"6\"\n (zShow)=\"addFilterOpen.set(true); focusSearchInput()\"\n (zHide)=\"addFilterOpen.set(false); searchQuery.set('')\">\n <z-icon [zType]=\"zAddButtonIcon()\" zSize=\"14\" />\n {{ zAddButtonText() || i18n().addFilter }}\n </button>\n }\n}\n\n<ng-template #addFilterPopover let-close=\"close\">\n <div class=\"w-[200px]\">\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 #addFilterSearchInput\n type=\"text\"\n [placeholder]=\"i18n().searchFields\"\n [value]=\"searchQuery()\"\n (input)=\"onSearchInput($event)\"\n class=\"placeholder:text-muted-foreground text-foreground flex h-10 w-full bg-transparent py-3 text-sm outline-none\" />\n </div>\n <div class=\"flex max-h-[300px] flex-col gap-0.5 overflow-y-auto p-1\">\n @for (group of groupedFields(); track group.group; let groupIndex = $index) {\n @if (group.group) {\n <div\n class=\"text-muted-foreground px-2 py-1.5 text-xs font-medium\"\n [class.border-border]=\"groupIndex > 0\"\n [class.mt-2]=\"groupIndex > 0\"\n [class.border-t]=\"groupIndex > 0\"\n [class.ml-1]=\"groupIndex > 0\">\n {{ group.group }}\n </div>\n }\n @for (field of group.fields; track trackByFieldKey($index, field)) {\n <button\n type=\"button\"\n class=\"hover:bg-accent flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors\"\n (click)=\"onFieldSelect(field); close()\">\n @if (field.icon) {\n <z-icon [zType]=\"field.icon\" zSize=\"14\" class=\"text-muted-foreground\" />\n }\n <span>{{ field.label }}</span>\n </button>\n }\n } @empty {\n <div class=\"text-muted-foreground py-6 text-center text-sm\">\n {{ i18n().noFieldsFound }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Filter Items -->\n@for (filter of zFilters(); track trackByFilterId($index, filter)) {\n @if (filter | zFilterField: $any(zFields()); as field) {\n <div [class]=\"getItemClasses()\" data-slot=\"filter-item\">\n <!-- Field Label -->\n <div [class]=\"getLabelClasses()\">\n @if (field.icon) {\n <z-icon [zType]=\"field.icon\" zSize=\"14\" />\n }\n {{ field.label }}\n </div>\n\n <!-- Operator Dropdown -->\n <button\n type=\"button\"\n z-popover\n [zPopoverContent]=\"operatorDropdown\"\n zTrigger=\"click\"\n zPosition=\"bottom-left\"\n [zOffset]=\"4\"\n (zShow)=\"operatorPopoverOpen.set(filter.id)\"\n (zHide)=\"operatorPopoverOpen.set(null)\"\n class=\"text-muted-foreground hover:text-foreground hover:bg-muted flex cursor-pointer items-center px-2.5 text-sm transition-colors\"\n [class.text-foreground]=\"operatorPopoverOpen() === filter.id\"\n [class.bg-muted]=\"operatorPopoverOpen() === filter.id\">\n {{ filter | zFilterOperatorLabel: $any(zFields()) : i18n() }}\n <z-icon zType=\"lucideChevronDown\" zSize=\"12\" class=\"ml-1\" />\n </button>\n\n <ng-template #operatorDropdown let-close=\"close\">\n <div class=\"flex w-fit min-w-32 flex-col gap-0.5 p-1\">\n @for (op of filter | zFilterOperators: $any(zFields()) : i18n(); track op.value) {\n <button\n type=\"button\"\n class=\"hover:bg-accent flex w-full cursor-pointer items-center justify-between gap-4 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none\"\n (click)=\"updateFilterOperator(filter, op.value); close()\">\n <span>{{ op.label }}</span>\n @if (op.value === filter.operator) {\n <z-icon zType=\"lucideCheck\" zSize=\"14\" class=\"text-primary\" />\n }\n </button>\n }\n </div>\n </ng-template>\n\n <!-- Value Selector -->\n @if (!(filter | zFilterIsValueHidden)) {\n <!-- Boolean Field -->\n @if (field.type === 'boolean') {\n <div class=\"flex items-center gap-2 px-2.5\">\n <z-switch [zChecked]=\"filter.values[0] === true\" (zChange)=\"onBooleanChange(filter, $event)\" zSize=\"sm\" />\n @if (field.onLabel && field.offLabel) {\n <span class=\"text-muted-foreground text-xs\">\n {{ filter.values[0] === true ? field.onLabel : field.offLabel }}\n </span>\n }\n </div>\n }\n\n <!-- Text/Email/URL/Tel Input -->\n @else if (field.type === 'text' || field.type === 'email' || field.type === 'url' || field.type === 'tel') {\n <div [class]=\"getInputClasses()\" class=\"w-36\">\n @if (field.prefix) {\n <span class=\"text-muted-foreground mr-1\">{{ field.prefix }}</span>\n }\n <input\n type=\"{{\n field.type === 'email' ? 'email' : field.type === 'url' ? 'url' : field.type === 'tel' ? 'tel' : 'text'\n }}\"\n [value]=\"filter.values[0] || ''\"\n [placeholder]=\"field.placeholder || i18n().placeholders.enterField\"\n [pattern]=\"field | zFilterInputPattern\"\n class=\"w-full bg-transparent outline-none\"\n (blur)=\"onInputChange(filter, $event)\" />\n @if (field.suffix) {\n <span class=\"text-muted-foreground ml-1\">{{ field.suffix }}</span>\n }\n </div>\n }\n\n <!-- Number Input -->\n @else if (field.type === 'number') {\n @if (filter | zFilterIsBetweenOperator) {\n <div class=\"flex items-center\">\n <div [class]=\"getInputClasses()\" class=\"w-20\">\n @if (field.prefix) {\n <span class=\"text-muted-foreground mr-1\">{{ field.prefix }}</span>\n }\n <input\n type=\"number\"\n [value]=\"filter.values[0] || ''\"\n [placeholder]=\"i18n().min\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n [step]=\"field.step\"\n class=\"w-full bg-transparent outline-none\"\n (blur)=\"onInputChange(filter, $event, 0)\" />\n </div>\n <div [class]=\"getBetweenClasses()\">{{ i18n().to }}</div>\n <div [class]=\"getInputClasses()\" class=\"w-20\">\n <input\n type=\"number\"\n [value]=\"filter.values[1] || ''\"\n [placeholder]=\"i18n().max\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n [step]=\"field.step\"\n class=\"w-full bg-transparent outline-none\"\n (blur)=\"onInputChange(filter, $event, 1)\" />\n @if (field.suffix) {\n <span class=\"text-muted-foreground ml-1\">{{ field.suffix }}</span>\n }\n </div>\n </div>\n } @else {\n <div [class]=\"getInputClasses()\" class=\"w-24\">\n @if (field.prefix) {\n <span class=\"text-muted-foreground mr-1\">{{ field.prefix }}</span>\n }\n <input\n type=\"number\"\n [value]=\"filter.values[0] || ''\"\n [placeholder]=\"field.placeholder || i18n().placeholders.enterField\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n [step]=\"field.step\"\n class=\"w-full bg-transparent outline-none\"\n (blur)=\"onInputChange(filter, $event)\" />\n @if (field.suffix) {\n <span class=\"text-muted-foreground ml-1\">{{ field.suffix }}</span>\n }\n </div>\n }\n }\n\n <!-- Date Input -->\n @else if (field.type === 'date') {\n <div [class]=\"getInputClasses()\" class=\"w-36\">\n <input\n type=\"date\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event)\" />\n </div>\n }\n\n <!-- Date Range Input -->\n @else if (field.type === 'daterange') {\n <div class=\"flex items-center\">\n <div [class]=\"getInputClasses()\" class=\"w-32\">\n <input\n type=\"date\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 0)\" />\n </div>\n <div [class]=\"getBetweenClasses()\">{{ i18n().to }}</div>\n <div [class]=\"getInputClasses()\" class=\"w-32\">\n <input\n type=\"date\"\n [value]=\"filter.values[1] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 1)\" />\n </div>\n </div>\n }\n\n <!-- Time Input -->\n @else if (field.type === 'time') {\n @if (filter | zFilterIsBetweenOperator) {\n <div class=\"flex items-center\">\n <div [class]=\"getInputClasses()\" class=\"w-28\">\n <input\n type=\"time\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 0)\" />\n </div>\n <div [class]=\"getBetweenClasses()\">{{ i18n().to }}</div>\n <div [class]=\"getInputClasses()\" class=\"w-28\">\n <input\n type=\"time\"\n [value]=\"filter.values[1] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 1)\" />\n </div>\n </div>\n } @else {\n <div [class]=\"getInputClasses()\" class=\"w-28\">\n <input\n type=\"time\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event)\" />\n </div>\n }\n }\n\n <!-- DateTime Input -->\n @else if (field.type === 'datetime') {\n @if (filter | zFilterIsBetweenOperator) {\n <div class=\"flex items-center\">\n <div [class]=\"getInputClasses()\" class=\"w-44\">\n <input\n type=\"datetime-local\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 0)\" />\n </div>\n <div [class]=\"getBetweenClasses()\">{{ i18n().to }}</div>\n <div [class]=\"getInputClasses()\" class=\"w-44\">\n <input\n type=\"datetime-local\"\n [value]=\"filter.values[1] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 1)\" />\n </div>\n </div>\n } @else {\n <div [class]=\"getInputClasses()\" class=\"w-44\">\n <input\n type=\"datetime-local\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event)\" />\n </div>\n }\n }\n\n <!-- Select/Multiselect -->\n @else if (field.type === 'select' || field.type === 'multiselect' || field.options) {\n <button\n type=\"button\"\n z-popover\n [zPopoverContent]=\"selectPopover\"\n zTrigger=\"click\"\n zPosition=\"bottom-left\"\n [zOffset]=\"4\"\n (zShow)=\"valuePopoverOpen.set(filter.id); focusSelectSearch(filter.id)\"\n (zHide)=\"valuePopoverOpen.set(null)\"\n class=\"hover:bg-muted flex cursor-pointer items-center gap-1.5 px-2.5 text-sm transition-colors\"\n [class.bg-muted]=\"valuePopoverOpen() === filter.id\">\n @if (filter | zFilterSelectedOptions: $any(zFields()); as selectedOpts) {\n @if (selectedOpts.length > 0) {\n <div class=\"flex items-center -space-x-1.5\">\n @for (opt of selectedOpts.slice(0, 3); track $any(opt).value) {\n @if (opt.icon) {\n <z-icon [zType]=\"opt.icon\" zSize=\"14\" />\n }\n }\n </div>\n @if (selectedOpts.length === 1) {\n {{ selectedOpts[0].label }}\n } @else {\n {{ selectedOpts.length }} {{ i18n().selectedCount }}\n }\n } @else {\n <span class=\"text-muted-foreground\">{{ i18n().select }}</span>\n }\n }\n <z-icon zType=\"lucideChevronDown\" zSize=\"12\" class=\"text-muted-foreground ml-1\" />\n </button>\n\n <ng-template #selectPopover let-close=\"close\">\n <div class=\"w-[200px]\">\n @if (field.searchable !== false) {\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 [id]=\"'select-search-' + filter.id\"\n type=\"text\"\n [placeholder]=\"i18n().placeholders.searchField\"\n class=\"placeholder:text-muted-foreground text-foreground flex h-9 w-full bg-transparent py-2 text-sm outline-none\" />\n </div>\n }\n <div class=\"flex max-h-[200px] flex-col gap-0.5 overflow-y-auto p-1\">\n <!-- Selected Options -->\n @for (opt of filter | zFilterSelectedOptions: $any(zFields()); track $any(opt).value) {\n <button\n type=\"button\"\n class=\"hover:bg-accent flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors\"\n (click)=\"onSelectValueChange(filter, $any(opt)); field.type !== 'multiselect' && close()\">\n @if (opt.icon) {\n <z-icon [zType]=\"opt.icon\" zSize=\"14\" />\n }\n <span class=\"truncate\">{{ opt.label }}</span>\n <z-icon zType=\"lucideCheck\" zSize=\"14\" class=\"text-primary ml-auto\" />\n </button>\n }\n\n <!-- Separator -->\n @if (\n (filter | zFilterSelectedOptions: $any(zFields())).length > 0 &&\n (filter | zFilterUnselectedOptions: $any(zFields())).length > 0\n ) {\n <div class=\"bg-border my-1 ml-1 h-px\"></div>\n }\n\n <!-- Unselected Options -->\n @for (opt of filter | zFilterUnselectedOptions: $any(zFields()); track $any(opt).value) {\n <button\n type=\"button\"\n class=\"hover:bg-accent flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors\"\n (click)=\"onSelectValueChange(filter, $any(opt)); field.type !== 'multiselect' && close()\">\n @if (opt.icon) {\n <z-icon [zType]=\"opt.icon\" zSize=\"14\" />\n }\n <span class=\"truncate\">{{ opt.label }}</span>\n </button>\n }\n\n @if (\n (filter | zFilterSelectedOptions: $any(zFields())).length === 0 &&\n (filter | zFilterUnselectedOptions: $any(zFields())).length === 0\n ) {\n <div class=\"text-muted-foreground py-6 text-center text-sm\">\n {{ i18n().noResultsFound }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n }\n }\n\n <!-- Remove Button -->\n <button type=\"button\" [class]=\"getRemoveButtonClasses()\" data-slot=\"filter-remove\" (click)=\"removeFilter(filter)\">\n <z-icon zType=\"lucideX\" zSize=\"14\" />\n </button>\n </div>\n }\n}\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ZSwitchComponent, selector: "z-switch", inputs: ["class", "zSize", "zLabel", "zText", "zDisabled", "zLoading", "zTextPosition", "zChecked"], outputs: ["zChange", "zCheckedChange"] }, { 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: "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: "pipe", type: ZFilterFieldPipe, name: "zFilterField" }, { kind: "pipe", type: ZFilterOperatorLabelPipe, name: "zFilterOperatorLabel" }, { kind: "pipe", type: ZFilterOperatorsPipe, name: "zFilterOperators" }, { kind: "pipe", type: ZFilterSelectedOptionsPipe, name: "zFilterSelectedOptions" }, { kind: "pipe", type: ZFilterUnselectedOptionsPipe, name: "zFilterUnselectedOptions" }, { kind: "pipe", type: ZFilterInputPatternPipe, name: "zFilterInputPattern" }, { kind: "pipe", type: ZFilterIsValueHiddenPipe, name: "zFilterIsValueHidden" }, { kind: "pipe", type: ZFilterIsBetweenOperatorPipe, name: "zFilterIsBetweenOperator" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
773
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZFilterComponent, isStandalone: true, selector: "z-filter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zFilters: { classPropertyName: "zFilters", publicName: "zFilters", isSignal: true, isRequired: true, transformFunction: null }, zFields: { classPropertyName: "zFields", publicName: "zFields", isSignal: true, isRequired: true, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zI18n: { classPropertyName: "zI18n", publicName: "zI18n", isSignal: true, isRequired: false, transformFunction: null }, zShowAddButton: { classPropertyName: "zShowAddButton", publicName: "zShowAddButton", isSignal: true, isRequired: false, transformFunction: null }, zAllowMultiple: { classPropertyName: "zAllowMultiple", publicName: "zAllowMultiple", isSignal: true, isRequired: false, transformFunction: null }, zAddButtonIcon: { classPropertyName: "zAddButtonIcon", publicName: "zAddButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, zAddButtonText: { classPropertyName: "zAddButtonText", publicName: "zAddButtonText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zFiltersChange: "zFiltersChange", zFilterAdd: "zFilterAdd", zFilterRemove: "zFilterRemove", zFilterUpdate: "zFilterUpdate" }, host: { attributes: { "data-slot": "z-filter" }, properties: { "class": "hostClasses()" } }, queries: [{ propertyName: "addButtonTemplate", first: true, predicate: ["addButton"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "addFilterSearchInput", first: true, predicate: ["addFilterSearchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Add Filter Button -->\n@if (zShowAddButton() && selectableFields().length > 0) {\n @if (addButtonTemplate()) {\n <ng-container [ngTemplateOutlet]=\"addButtonTemplate()!\" />\n } @else {\n <button\n z-button\n zType=\"outline\"\n [zSize]=\"buttonSize()\"\n z-popover\n [zPopoverContent]=\"addFilterPopover\"\n zTrigger=\"click\"\n zPosition=\"bottom-left\"\n [zOffset]=\"6\"\n (zShow)=\"addFilterOpen.set(true); focusSearchInput()\"\n (zHide)=\"addFilterOpen.set(false); searchQuery.set('')\">\n <z-icon [zType]=\"zAddButtonIcon()\" zSize=\"14\" />\n {{ zAddButtonText() || i18n().addFilter }}\n </button>\n }\n}\n\n<ng-template #addFilterPopover let-close=\"close\">\n <div class=\"w-[200px]\">\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 #addFilterSearchInput\n type=\"text\"\n [placeholder]=\"i18n().searchFields\"\n [value]=\"searchQuery()\"\n (input)=\"onSearchInput($event)\"\n class=\"placeholder:text-muted-foreground text-foreground flex h-10 w-full bg-transparent py-3 text-sm outline-none\" />\n </div>\n <div class=\"flex max-h-[300px] flex-col gap-0.5 overflow-y-auto p-1\">\n @for (group of groupedFields(); track group.group; let groupIndex = $index) {\n @if (group.group) {\n <div\n class=\"text-muted-foreground px-2 py-1.5 text-xs font-medium\"\n [class.border-border]=\"groupIndex > 0\"\n [class.mt-2]=\"groupIndex > 0\"\n [class.border-t]=\"groupIndex > 0\"\n [class.ml-1]=\"groupIndex > 0\">\n {{ group.group }}\n </div>\n }\n @for (field of group.fields; track trackByFieldKey($index, field)) {\n <button\n type=\"button\"\n class=\"hover:bg-accent flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors\"\n (click)=\"onFieldSelect(field); close()\">\n @if (field.icon) {\n <z-icon [zType]=\"field.icon\" zSize=\"14\" class=\"text-muted-foreground\" />\n }\n <span>{{ field.label }}</span>\n </button>\n }\n } @empty {\n <div class=\"text-muted-foreground py-6 text-center text-sm\">\n {{ i18n().noFieldsFound }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Filter Items -->\n@for (filter of zFilters(); track trackByFilterId($index, filter)) {\n @if (filter | zFilterField: $any(zFields()); as field) {\n <div [class]=\"getItemClasses()\" data-slot=\"filter-item\">\n <!-- Field Label -->\n <div [class]=\"getLabelClasses()\">\n @if (field.icon) {\n <z-icon [zType]=\"field.icon\" zSize=\"14\" />\n }\n {{ field.label }}\n </div>\n\n <!-- Operator Dropdown -->\n <button\n type=\"button\"\n z-popover\n [zPopoverContent]=\"operatorDropdown\"\n zTrigger=\"click\"\n zPosition=\"bottom-left\"\n [zOffset]=\"4\"\n (zShow)=\"operatorPopoverOpen.set(filter.id)\"\n (zHide)=\"operatorPopoverOpen.set(null)\"\n class=\"text-muted-foreground hover:text-foreground hover:bg-muted flex cursor-pointer items-center px-2.5 text-sm transition-colors\"\n [class.text-foreground]=\"operatorPopoverOpen() === filter.id\"\n [class.bg-muted]=\"operatorPopoverOpen() === filter.id\">\n {{ filter | zFilterOperatorLabel: $any(zFields()) : i18n() }}\n <z-icon zType=\"lucideChevronDown\" zSize=\"12\" class=\"ml-1\" />\n </button>\n\n <ng-template #operatorDropdown let-close=\"close\">\n <div class=\"flex w-fit min-w-32 flex-col gap-0.5 p-1\">\n @for (op of filter | zFilterOperators: $any(zFields()) : i18n(); track op.value) {\n <button\n type=\"button\"\n class=\"hover:bg-accent flex w-full cursor-pointer items-center justify-between gap-4 rounded-sm px-2 py-1.5 text-sm transition-colors outline-none\"\n (click)=\"updateFilterOperator(filter, op.value); close()\">\n <span>{{ op.label }}</span>\n @if (op.value === filter.operator) {\n <z-icon zType=\"lucideCheck\" zSize=\"14\" class=\"text-primary\" />\n }\n </button>\n }\n </div>\n </ng-template>\n\n <!-- Value Selector -->\n @if (!(filter | zFilterIsValueHidden)) {\n <!-- Boolean Field -->\n @if (field.type === 'boolean') {\n <div class=\"flex items-center gap-2 px-2.5\">\n <z-switch [zChecked]=\"filter.values[0] === true\" (zChange)=\"onBooleanChange(filter, $event)\" zSize=\"sm\" />\n @if (field.onLabel && field.offLabel) {\n <span class=\"text-muted-foreground text-xs\">\n {{ filter.values[0] === true ? field.onLabel : field.offLabel }}\n </span>\n }\n </div>\n }\n\n <!-- Text/Email/URL/Tel Input -->\n @else if (field.type === 'text' || field.type === 'email' || field.type === 'url' || field.type === 'tel') {\n <div [class]=\"getInputClasses()\" class=\"w-36\">\n @if (field.prefix) {\n <span class=\"text-muted-foreground mr-1\">{{ field.prefix }}</span>\n }\n <input\n type=\"{{\n field.type === 'email' ? 'email' : field.type === 'url' ? 'url' : field.type === 'tel' ? 'tel' : 'text'\n }}\"\n [value]=\"filter.values[0] || ''\"\n [placeholder]=\"field.placeholder || i18n().placeholders.enterField\"\n [pattern]=\"field | zFilterInputPattern\"\n class=\"w-full bg-transparent outline-none\"\n (blur)=\"onInputChange(filter, $event)\" />\n @if (field.suffix) {\n <span class=\"text-muted-foreground ml-1\">{{ field.suffix }}</span>\n }\n </div>\n }\n\n <!-- Number Input -->\n @else if (field.type === 'number') {\n @if (filter | zFilterIsBetweenOperator) {\n <div class=\"flex items-center\">\n <div [class]=\"getInputClasses()\" class=\"w-20\">\n @if (field.prefix) {\n <span class=\"text-muted-foreground mr-1\">{{ field.prefix }}</span>\n }\n <input\n type=\"number\"\n [value]=\"filter.values[0] || ''\"\n [placeholder]=\"i18n().min\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n [step]=\"field.step\"\n class=\"w-full bg-transparent outline-none\"\n (blur)=\"onInputChange(filter, $event, 0)\" />\n </div>\n <div [class]=\"getBetweenClasses()\">{{ i18n().to }}</div>\n <div [class]=\"getInputClasses()\" class=\"w-20\">\n <input\n type=\"number\"\n [value]=\"filter.values[1] || ''\"\n [placeholder]=\"i18n().max\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n [step]=\"field.step\"\n class=\"w-full bg-transparent outline-none\"\n (blur)=\"onInputChange(filter, $event, 1)\" />\n @if (field.suffix) {\n <span class=\"text-muted-foreground ml-1\">{{ field.suffix }}</span>\n }\n </div>\n </div>\n } @else {\n <div [class]=\"getInputClasses()\" class=\"w-24\">\n @if (field.prefix) {\n <span class=\"text-muted-foreground mr-1\">{{ field.prefix }}</span>\n }\n <input\n type=\"number\"\n [value]=\"filter.values[0] || ''\"\n [placeholder]=\"field.placeholder || i18n().placeholders.enterField\"\n [min]=\"field.min\"\n [max]=\"field.max\"\n [step]=\"field.step\"\n class=\"w-full bg-transparent outline-none\"\n (blur)=\"onInputChange(filter, $event)\" />\n @if (field.suffix) {\n <span class=\"text-muted-foreground ml-1\">{{ field.suffix }}</span>\n }\n </div>\n }\n }\n\n <!-- Date Input -->\n @else if (field.type === 'date') {\n <div [class]=\"getInputClasses()\" class=\"w-36\">\n <input\n type=\"date\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event)\" />\n </div>\n }\n\n <!-- Date Range Input -->\n @else if (field.type === 'daterange') {\n <div class=\"flex items-center\">\n <div [class]=\"getInputClasses()\" class=\"w-32\">\n <input\n type=\"date\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 0)\" />\n </div>\n <div [class]=\"getBetweenClasses()\">{{ i18n().to }}</div>\n <div [class]=\"getInputClasses()\" class=\"w-32\">\n <input\n type=\"date\"\n [value]=\"filter.values[1] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 1)\" />\n </div>\n </div>\n }\n\n <!-- Time Input -->\n @else if (field.type === 'time') {\n @if (filter | zFilterIsBetweenOperator) {\n <div class=\"flex items-center\">\n <div [class]=\"getInputClasses()\" class=\"w-28\">\n <input\n type=\"time\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 0)\" />\n </div>\n <div [class]=\"getBetweenClasses()\">{{ i18n().to }}</div>\n <div [class]=\"getInputClasses()\" class=\"w-28\">\n <input\n type=\"time\"\n [value]=\"filter.values[1] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 1)\" />\n </div>\n </div>\n } @else {\n <div [class]=\"getInputClasses()\" class=\"w-28\">\n <input\n type=\"time\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event)\" />\n </div>\n }\n }\n\n <!-- DateTime Input -->\n @else if (field.type === 'datetime') {\n @if (filter | zFilterIsBetweenOperator) {\n <div class=\"flex items-center\">\n <div [class]=\"getInputClasses()\" class=\"w-44\">\n <input\n type=\"datetime-local\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 0)\" />\n </div>\n <div [class]=\"getBetweenClasses()\">{{ i18n().to }}</div>\n <div [class]=\"getInputClasses()\" class=\"w-44\">\n <input\n type=\"datetime-local\"\n [value]=\"filter.values[1] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event, 1)\" />\n </div>\n </div>\n } @else {\n <div [class]=\"getInputClasses()\" class=\"w-44\">\n <input\n type=\"datetime-local\"\n [value]=\"filter.values[0] || ''\"\n class=\"w-full bg-transparent outline-none\"\n (change)=\"onInputChange(filter, $event)\" />\n </div>\n }\n }\n\n <!-- Select/Multiselect -->\n @else if (field.type === 'select' || field.type === 'multiselect' || field.options) {\n <button\n type=\"button\"\n z-popover\n [zPopoverContent]=\"selectPopover\"\n zTrigger=\"click\"\n zPosition=\"bottom-left\"\n [zOffset]=\"4\"\n (zShow)=\"valuePopoverOpen.set(filter.id); focusSelectSearch(filter.id)\"\n (zHide)=\"valuePopoverOpen.set(null)\"\n class=\"hover:bg-muted flex cursor-pointer items-center gap-1.5 px-2.5 text-sm transition-colors\"\n [class.bg-muted]=\"valuePopoverOpen() === filter.id\">\n @if (filter | zFilterSelectedOptions: $any(zFields()); as selectedOpts) {\n @if (selectedOpts.length > 0) {\n <div class=\"flex items-center -space-x-1.5\">\n @for (opt of selectedOpts.slice(0, 3); track $any(opt).value) {\n @if (opt.icon) {\n <z-icon [zType]=\"opt.icon\" zSize=\"14\" />\n }\n }\n </div>\n @if (selectedOpts.length === 1) {\n {{ selectedOpts[0].label }}\n } @else {\n {{ selectedOpts.length }} {{ i18n().selectedCount }}\n }\n } @else {\n <span class=\"text-muted-foreground\">{{ i18n().select }}</span>\n }\n }\n <z-icon zType=\"lucideChevronDown\" zSize=\"12\" class=\"text-muted-foreground ml-1\" />\n </button>\n\n <ng-template #selectPopover let-close=\"close\">\n <div class=\"w-[200px]\">\n @if (field.searchable !== false) {\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 [id]=\"'select-search-' + filter.id\"\n type=\"text\"\n [placeholder]=\"i18n().placeholders.searchField\"\n class=\"placeholder:text-muted-foreground text-foreground flex h-9 w-full bg-transparent py-2 text-sm outline-none\" />\n </div>\n }\n <div class=\"flex max-h-[200px] flex-col gap-0.5 overflow-y-auto p-1\">\n <!-- Selected Options -->\n @for (opt of filter | zFilterSelectedOptions: $any(zFields()); track $any(opt).value) {\n <button\n type=\"button\"\n class=\"hover:bg-accent flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors\"\n (click)=\"onSelectValueChange(filter, $any(opt)); field.type !== 'multiselect' && close()\">\n @if (opt.icon) {\n <z-icon [zType]=\"opt.icon\" zSize=\"14\" />\n }\n <span class=\"truncate\">{{ opt.label }}</span>\n <z-icon zType=\"lucideCheck\" zSize=\"14\" class=\"text-primary ml-auto\" />\n </button>\n }\n\n <!-- Separator -->\n @if (\n (filter | zFilterSelectedOptions: $any(zFields())).length > 0 &&\n (filter | zFilterUnselectedOptions: $any(zFields())).length > 0\n ) {\n <div class=\"bg-border my-1 ml-1 h-px\"></div>\n }\n\n <!-- Unselected Options -->\n @for (opt of filter | zFilterUnselectedOptions: $any(zFields()); track $any(opt).value) {\n <button\n type=\"button\"\n class=\"hover:bg-accent flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm transition-colors\"\n (click)=\"onSelectValueChange(filter, $any(opt)); field.type !== 'multiselect' && close()\">\n @if (opt.icon) {\n <z-icon [zType]=\"opt.icon\" zSize=\"14\" />\n }\n <span class=\"truncate\">{{ opt.label }}</span>\n </button>\n }\n\n @if (\n (filter | zFilterSelectedOptions: $any(zFields())).length === 0 &&\n (filter | zFilterUnselectedOptions: $any(zFields())).length === 0\n ) {\n <div class=\"text-muted-foreground py-6 text-center text-sm\">\n {{ i18n().noResultsFound }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n }\n }\n\n <!-- Remove Button -->\n <button type=\"button\" [class]=\"getRemoveButtonClasses()\" data-slot=\"filter-remove\" (click)=\"removeFilter(filter)\">\n <z-icon zType=\"lucideX\" zSize=\"14\" />\n </button>\n </div>\n }\n}\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ZSwitchComponent, selector: "z-switch", inputs: ["class", "zSize", "zLabel", "zText", "zDisabled", "zLoading", "zTextPosition", "zChecked"], outputs: ["zChange", "zEvent", "zCheckedChange"] }, { 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: "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: "pipe", type: ZFilterFieldPipe, name: "zFilterField" }, { kind: "pipe", type: ZFilterOperatorLabelPipe, name: "zFilterOperatorLabel" }, { kind: "pipe", type: ZFilterOperatorsPipe, name: "zFilterOperators" }, { kind: "pipe", type: ZFilterSelectedOptionsPipe, name: "zFilterSelectedOptions" }, { kind: "pipe", type: ZFilterUnselectedOptionsPipe, name: "zFilterUnselectedOptions" }, { kind: "pipe", type: ZFilterInputPatternPipe, name: "zFilterInputPattern" }, { kind: "pipe", type: ZFilterIsValueHiddenPipe, name: "zFilterIsValueHidden" }, { kind: "pipe", type: ZFilterIsBetweenOperatorPipe, name: "zFilterIsBetweenOperator" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
774
774
|
}
|
|
775
775
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZFilterComponent, decorators: [{
|
|
776
776
|
type: Component,
|