@koalarx/ui 20.2.7 → 20.2.9
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/koalarx-ui-core-base.mjs +15 -15
- package/fesm2022/koalarx-ui-core-base.mjs.map +1 -1
- package/fesm2022/koalarx-ui-core-components-dialog.mjs +3 -3
- package/fesm2022/koalarx-ui-core-components-kl-root.mjs +4 -4
- package/fesm2022/koalarx-ui-core-components-kl-root.mjs.map +1 -1
- package/fesm2022/koalarx-ui-core-components-loader-page.mjs +7 -7
- package/fesm2022/koalarx-ui-core-components-loader-page.mjs.map +1 -1
- package/fesm2022/koalarx-ui-core-components-loader.mjs +4 -4
- package/fesm2022/koalarx-ui-core-components-loader.mjs.map +1 -1
- package/fesm2022/koalarx-ui-core-components-side-window.mjs +3 -3
- package/fesm2022/koalarx-ui-core-components-snackbar.mjs +3 -3
- package/fesm2022/koalarx-ui-core-guards.mjs +3 -3
- package/fesm2022/koalarx-ui-core-translations.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-accordion.mjs +4 -4
- package/fesm2022/koalarx-ui-shared-components-accordion.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-alert.mjs +6 -6
- package/fesm2022/koalarx-ui-shared-components-alert.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-code-viewer.mjs +10 -10
- package/fesm2022/koalarx-ui-shared-components-code-viewer.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-collapse.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-confirm.mjs +6 -6
- package/fesm2022/koalarx-ui-shared-components-confirm.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-datatable.mjs +47 -47
- package/fesm2022/koalarx-ui-shared-components-datatable.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-dialog.mjs +10 -10
- package/fesm2022/koalarx-ui-shared-components-dialog.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-dropdown.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-dropdown.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-field-errors.mjs +4 -4
- package/fesm2022/koalarx-ui-shared-components-field-errors.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-horizontal-menu.mjs +7 -7
- package/fesm2022/koalarx-ui-shared-components-horizontal-menu.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-autocomplete.mjs +49 -49
- package/fesm2022/koalarx-ui-shared-components-input-field-autocomplete.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-field-group.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-fieldset.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-input-checkbox.mjs +6 -6
- package/fesm2022/koalarx-ui-shared-components-input-field-input-checkbox.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-cnpj.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-input-cpf.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-input-currency.mjs +4 -4
- package/fesm2022/koalarx-ui-shared-components-input-field-input-currency.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-date.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-input-field-input-date.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-datetime.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-input-field-input-datetime.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-email.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-input-month.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-input-field-input-month.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-password.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-input-field-input-password.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-radio.mjs +9 -9
- package/fesm2022/koalarx-ui-shared-components-input-field-input-radio.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-text.mjs +4 -4
- package/fesm2022/koalarx-ui-shared-components-input-field-input-text.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-time.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-input-field-input-time.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-input-url.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-components-input-field-select.mjs +4 -4
- package/fesm2022/koalarx-ui-shared-components-input-field-select.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-switcher.mjs +6 -6
- package/fesm2022/koalarx-ui-shared-components-input-field-switcher.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field-textarea.mjs +6 -6
- package/fesm2022/koalarx-ui-shared-components-input-field-textarea.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-input-field.mjs +15 -15
- package/fesm2022/koalarx-ui-shared-components-input-field.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-on-this-page.mjs +5 -5
- package/fesm2022/koalarx-ui-shared-components-on-this-page.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-side-window.mjs +9 -9
- package/fesm2022/koalarx-ui-shared-components-snackbar.mjs +15 -15
- package/fesm2022/koalarx-ui-shared-components-snackbar.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-stepper.mjs +13 -13
- package/fesm2022/koalarx-ui-shared-components-stepper.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-components-vertical-menu.mjs +7 -7
- package/fesm2022/koalarx-ui-shared-components-vertical-menu.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-directives.mjs +28 -28
- package/fesm2022/koalarx-ui-shared-directives.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-services.mjs +7 -7
- package/fesm2022/koalarx-ui-shared-services.mjs.map +1 -1
- package/fesm2022/koalarx-ui-shared-utils.mjs +3 -3
- package/fesm2022/koalarx-ui-shared-utils.mjs.map +1 -1
- package/fesm2022/koalarx-ui.mjs +6 -6
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-dialog.mjs","sources":["../../projects/koala-ui/shared/components/dialog/dialog-content.ts","../../projects/koala-ui/shared/components/dialog/dialog-content.html","../../projects/koala-ui/shared/components/dialog/dialog.ts","../../projects/koala-ui/shared/components/dialog/dialog-ref.ts","../../projects/koala-ui/shared/components/dialog/koalarx-ui-shared-components-dialog.ts"],"sourcesContent":["import { Component, effect, ElementRef, viewChild } from '@angular/core';\n\n@Component({\n selector: 'kl-dialog-content',\n templateUrl: './dialog-content.html',\n})\nexport class DialogContent {\n dialogElement = viewChild<ElementRef<HTMLDialogElement>>('dialog');\n\n constructor() {\n effect(() => {\n const dialog = this.dialogElement();\n\n if (dialog) {\n dialog.nativeElement.showModal();\n }\n });\n }\n}\n","<dialog #dialog class=\"modal\">\n <div class=\"modal-box bg-base-200 border-4 border-neutral-200 dark:border-neutral-900 rounded-lg shadow-sm\">\n <ng-content select=\"[header]\" />\n <ng-content select=\"[content]\" />\n\n <div class=\"modal-action\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n</dialog>\n","import {\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n Type,\n} from '@angular/core';\nimport { randomString } from '@koalarx/utils/KlString';\nimport { DIALOG_REF_TOKEN, DialogRef } from './dialog-ref';\n\nexport type DialogAfterCloseTrigger = string | Record<string, any>;\nexport type DialogAfterCloseTriggerFn = (\n trigger: DialogAfterCloseTrigger\n) => void;\nexport const DIALOG_CONFIG = new InjectionToken('DialogConfig');\nexport const DIALOG_DATA = new InjectionToken('DialogData');\nexport const DIALOG_APP_REF = new InjectionToken('DialogAppRef');\nexport const DIALOG_AFTER_CLOSE_TRIGGER =\n new InjectionToken<DialogAfterCloseTriggerFn>('DialogAfterCloseTrigger');\n\nexport interface DialogConfig {\n data?: any;\n afterClosed?: {\n trigger: DialogAfterCloseTrigger;\n callback: (trigger: any) => void;\n };\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Dialog {\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n\n private generateElementId() {\n let elementId: string;\n\n do {\n elementId = randomString(50, {\n numbers: false,\n lowercase: true,\n uppercase: true,\n specialCharacters: false,\n });\n } while (document.getElementById(elementId));\n\n return elementId;\n }\n\n open(component: Type<any>, config?: DialogConfig) {\n const main = document.querySelector<HTMLElement>(\n 'kl-dialog-container .dialog-container'\n );\n\n if (main) {\n const elementId = this.generateElementId();\n const container = main.appendChild(document.createElement('div'));\n\n container.id = elementId;\n\n const componentRef = createComponent(component, {\n environmentInjector: this.injector,\n hostElement: container,\n elementInjector: Injector.create({\n providers: [\n { provide: DIALOG_CONFIG, useValue: config },\n { provide: DIALOG_APP_REF, useValue: this.appRef },\n {\n provide: DIALOG_REF_TOKEN,\n useValue: () => componentRef,\n },\n { provide: DIALOG_DATA, useValue: config?.data },\n {\n provide: DIALOG_AFTER_CLOSE_TRIGGER,\n useValue: (trigger: DialogAfterCloseTrigger) => {\n if (\n config?.afterClosed &&\n (config.afterClosed.trigger === trigger ||\n typeof trigger === 'object')\n ) {\n config.afterClosed.callback(trigger);\n }\n },\n },\n {\n provide: DialogRef,\n deps: [\n DIALOG_CONFIG,\n DIALOG_APP_REF,\n DIALOG_REF_TOKEN,\n DIALOG_AFTER_CLOSE_TRIGGER,\n DIALOG_DATA,\n ],\n },\n ],\n }),\n });\n\n this.appRef.attachView(componentRef.hostView);\n\n componentRef.changeDetectorRef.detectChanges();\n }\n }\n}\n","import {\n ApplicationRef,\n ComponentRef,\n inject,\n Injectable,\n InjectionToken,\n Type,\n} from '@angular/core';\nimport {\n DIALOG_AFTER_CLOSE_TRIGGER,\n DIALOG_APP_REF,\n DialogAfterCloseTrigger,\n DialogAfterCloseTriggerFn,\n} from './dialog';\n\nexport const DIALOG_REF_TOKEN = new InjectionToken('DialogRefToken');\n\n@Injectable()\nexport class DialogRef {\n private readonly appRef = inject<ApplicationRef>(DIALOG_APP_REF);\n private readonly componentRef =\n inject<() => ComponentRef<Type<any>>>(DIALOG_REF_TOKEN);\n private readonly afterCloseTrigger = inject<DialogAfterCloseTriggerFn>(\n DIALOG_AFTER_CLOSE_TRIGGER\n );\n\n dismiss(afterCloseTrigger?: DialogAfterCloseTrigger) {\n this.componentRef().destroy();\n this.appRef.detachView(this.componentRef().hostView);\n\n if (afterCloseTrigger) {\n this.afterCloseTrigger(afterCloseTrigger);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,aAAa,CAAA;AACxB,IAAA,aAAa,GAAG,SAAS,CAAgC,QAAQ,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-dialog.mjs","sources":["../../projects/koala-ui/shared/components/dialog/dialog-content.ts","../../projects/koala-ui/shared/components/dialog/dialog-content.html","../../projects/koala-ui/shared/components/dialog/dialog.ts","../../projects/koala-ui/shared/components/dialog/dialog-ref.ts","../../projects/koala-ui/shared/components/dialog/koalarx-ui-shared-components-dialog.ts"],"sourcesContent":["import { Component, effect, ElementRef, viewChild } from '@angular/core';\n\n@Component({\n selector: 'kl-dialog-content',\n templateUrl: './dialog-content.html',\n})\nexport class DialogContent {\n dialogElement = viewChild<ElementRef<HTMLDialogElement>>('dialog');\n\n constructor() {\n effect(() => {\n const dialog = this.dialogElement();\n\n if (dialog) {\n dialog.nativeElement.showModal();\n }\n });\n }\n}\n","<dialog #dialog class=\"modal\">\n <div class=\"modal-box bg-base-200 border-4 border-neutral-200 dark:border-neutral-900 rounded-lg shadow-sm\">\n <ng-content select=\"[header]\" />\n <ng-content select=\"[content]\" />\n\n <div class=\"modal-action\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n</dialog>\n","import {\n ApplicationRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n Type,\n} from '@angular/core';\nimport { randomString } from '@koalarx/utils/KlString';\nimport { DIALOG_REF_TOKEN, DialogRef } from './dialog-ref';\n\nexport type DialogAfterCloseTrigger = string | Record<string, any>;\nexport type DialogAfterCloseTriggerFn = (\n trigger: DialogAfterCloseTrigger\n) => void;\nexport const DIALOG_CONFIG = new InjectionToken('DialogConfig');\nexport const DIALOG_DATA = new InjectionToken('DialogData');\nexport const DIALOG_APP_REF = new InjectionToken('DialogAppRef');\nexport const DIALOG_AFTER_CLOSE_TRIGGER =\n new InjectionToken<DialogAfterCloseTriggerFn>('DialogAfterCloseTrigger');\n\nexport interface DialogConfig {\n data?: any;\n afterClosed?: {\n trigger: DialogAfterCloseTrigger;\n callback: (trigger: any) => void;\n };\n}\n\n@Injectable({ providedIn: 'root' })\nexport class Dialog {\n private readonly appRef = inject(ApplicationRef);\n private readonly injector = inject(EnvironmentInjector);\n\n private generateElementId() {\n let elementId: string;\n\n do {\n elementId = randomString(50, {\n numbers: false,\n lowercase: true,\n uppercase: true,\n specialCharacters: false,\n });\n } while (document.getElementById(elementId));\n\n return elementId;\n }\n\n open(component: Type<any>, config?: DialogConfig) {\n const main = document.querySelector<HTMLElement>(\n 'kl-dialog-container .dialog-container'\n );\n\n if (main) {\n const elementId = this.generateElementId();\n const container = main.appendChild(document.createElement('div'));\n\n container.id = elementId;\n\n const componentRef = createComponent(component, {\n environmentInjector: this.injector,\n hostElement: container,\n elementInjector: Injector.create({\n providers: [\n { provide: DIALOG_CONFIG, useValue: config },\n { provide: DIALOG_APP_REF, useValue: this.appRef },\n {\n provide: DIALOG_REF_TOKEN,\n useValue: () => componentRef,\n },\n { provide: DIALOG_DATA, useValue: config?.data },\n {\n provide: DIALOG_AFTER_CLOSE_TRIGGER,\n useValue: (trigger: DialogAfterCloseTrigger) => {\n if (\n config?.afterClosed &&\n (config.afterClosed.trigger === trigger ||\n typeof trigger === 'object')\n ) {\n config.afterClosed.callback(trigger);\n }\n },\n },\n {\n provide: DialogRef,\n deps: [\n DIALOG_CONFIG,\n DIALOG_APP_REF,\n DIALOG_REF_TOKEN,\n DIALOG_AFTER_CLOSE_TRIGGER,\n DIALOG_DATA,\n ],\n },\n ],\n }),\n });\n\n this.appRef.attachView(componentRef.hostView);\n\n componentRef.changeDetectorRef.detectChanges();\n }\n }\n}\n","import {\n ApplicationRef,\n ComponentRef,\n inject,\n Injectable,\n InjectionToken,\n Type,\n} from '@angular/core';\nimport {\n DIALOG_AFTER_CLOSE_TRIGGER,\n DIALOG_APP_REF,\n DialogAfterCloseTrigger,\n DialogAfterCloseTriggerFn,\n} from './dialog';\n\nexport const DIALOG_REF_TOKEN = new InjectionToken('DialogRefToken');\n\n@Injectable()\nexport class DialogRef {\n private readonly appRef = inject<ApplicationRef>(DIALOG_APP_REF);\n private readonly componentRef =\n inject<() => ComponentRef<Type<any>>>(DIALOG_REF_TOKEN);\n private readonly afterCloseTrigger = inject<DialogAfterCloseTriggerFn>(\n DIALOG_AFTER_CLOSE_TRIGGER\n );\n\n dismiss(afterCloseTrigger?: DialogAfterCloseTrigger) {\n this.componentRef().destroy();\n this.appRef.detachView(this.componentRef().hostView);\n\n if (afterCloseTrigger) {\n this.afterCloseTrigger(afterCloseTrigger);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
|
@@ -3,8 +3,8 @@ import { viewChild, effect, Component } from '@angular/core';
|
|
|
3
3
|
import { randomString, KlString } from '@koalarx/utils/KlString';
|
|
4
4
|
|
|
5
5
|
class Dropdown {
|
|
6
|
-
dropdownTriggerElement = viewChild('dropdownTrigger');
|
|
7
|
-
dropdownContentElement = viewChild('dropdownContent');
|
|
6
|
+
dropdownTriggerElement = viewChild('dropdownTrigger', ...(ngDevMode ? [{ debugName: "dropdownTriggerElement" }] : []));
|
|
7
|
+
dropdownContentElement = viewChild('dropdownContent', ...(ngDevMode ? [{ debugName: "dropdownContentElement" }] : []));
|
|
8
8
|
id = randomString(10, { numbers: true, uppercase: false, lowercase: false });
|
|
9
9
|
anchorName = new KlString('--anchor-').concat(this.id);
|
|
10
10
|
constructor() {
|
|
@@ -35,10 +35,10 @@ class Dropdown {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
39
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Dropdown, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.6", type: Dropdown, isStandalone: true, selector: "kl-dropdown", viewQueries: [{ propertyName: "dropdownTriggerElement", first: true, predicate: ["dropdownTrigger"], descendants: true, isSignal: true }, { propertyName: "dropdownContentElement", first: true, predicate: ["dropdownContent"], descendants: true, isSignal: true }], ngImport: i0, template: "<button #dropdownTrigger\n tabindex=\"0\"\n role=\"button\"\n [attr.popovertarget]=\"id\"\n (click)=\"ajustPosition()\">\n <ng-content select=\"[trigger]\" />\n</button>\n\n<div #dropdownContent\n tabindex=\"0\"\n popover\n [id]=\"id\"\n class=\"dropdown bg-base-200 rounded-box mt-3 min-w-52 w-auto max-w-[30vw] max-h-[40vh] shadow-sm border-2 border-neutral-200 dark:border-neutral-800 rounded-md overflow-y-auto\">\n <ng-content select=\"[options]\" />\n</div>\n" });
|
|
40
40
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Dropdown, decorators: [{
|
|
42
42
|
type: Component,
|
|
43
43
|
args: [{ selector: 'kl-dropdown', template: "<button #dropdownTrigger\n tabindex=\"0\"\n role=\"button\"\n [attr.popovertarget]=\"id\"\n (click)=\"ajustPosition()\">\n <ng-content select=\"[trigger]\" />\n</button>\n\n<div #dropdownContent\n tabindex=\"0\"\n popover\n [id]=\"id\"\n class=\"dropdown bg-base-200 rounded-box mt-3 min-w-52 w-auto max-w-[30vw] max-h-[40vh] shadow-sm border-2 border-neutral-200 dark:border-neutral-800 rounded-md overflow-y-auto\">\n <ng-content select=\"[options]\" />\n</div>\n" }]
|
|
44
44
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-dropdown.mjs","sources":["../../projects/koala-ui/shared/components/dropdown/dropdown.ts","../../projects/koala-ui/shared/components/dropdown/dropdown.html","../../projects/koala-ui/shared/components/dropdown/koalarx-ui-shared-components-dropdown.ts"],"sourcesContent":["import { Component, effect, ElementRef, viewChild } from '@angular/core';\nimport { KlString, randomString } from '@koalarx/utils/KlString';\n\n@Component({\n selector: 'kl-dropdown',\n templateUrl: './dropdown.html',\n})\nexport class Dropdown {\n private readonly dropdownTriggerElement =\n viewChild<ElementRef<HTMLButtonElement>>('dropdownTrigger');\n private readonly dropdownContentElement =\n viewChild<ElementRef<HTMLDivElement>>('dropdownContent');\n\n id = randomString(10, { numbers: true, uppercase: false, lowercase: false });\n\n private readonly anchorName = new KlString('--anchor-').concat(this.id);\n\n constructor() {\n effect(() => {\n const triggerElement = this.dropdownTriggerElement()?.nativeElement;\n const contentElement = this.dropdownContentElement()?.nativeElement;\n\n if (triggerElement && contentElement) {\n triggerElement.style = `anchor-name: ${this.anchorName};`;\n contentElement.style = `position-anchor: ${this.anchorName};`;\n }\n });\n }\n\n ajustPosition() {\n const triggerElement = this.dropdownTriggerElement()?.nativeElement;\n const contentElement = this.dropdownContentElement()?.nativeElement;\n\n if (triggerElement && contentElement) {\n setTimeout(() => {\n const position = contentElement.getBoundingClientRect();\n const screenWidth = document.body.clientWidth;\n const screenHeight = document.body.clientHeight;\n\n if (position.right > screenWidth) {\n contentElement.classList.add('dropdown-left');\n contentElement.classList.add('dropdown-start');\n }\n\n if (position.bottom > screenHeight) {\n contentElement.classList.add('dropdown-top');\n }\n });\n }\n }\n}\n","<button #dropdownTrigger\n tabindex=\"0\"\n role=\"button\"\n [attr.popovertarget]=\"id\"\n (click)=\"ajustPosition()\">\n <ng-content select=\"[trigger]\" />\n</button>\n\n<div #dropdownContent\n tabindex=\"0\"\n popover\n [id]=\"id\"\n class=\"dropdown bg-base-200 rounded-box mt-3 min-w-52 w-auto max-w-[30vw] max-h-[40vh] shadow-sm border-2 border-neutral-200 dark:border-neutral-800 rounded-md overflow-y-auto\">\n <ng-content select=\"[options]\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAOa,QAAQ,CAAA;AACF,IAAA,sBAAsB,GACrC,SAAS,CAAgC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-dropdown.mjs","sources":["../../projects/koala-ui/shared/components/dropdown/dropdown.ts","../../projects/koala-ui/shared/components/dropdown/dropdown.html","../../projects/koala-ui/shared/components/dropdown/koalarx-ui-shared-components-dropdown.ts"],"sourcesContent":["import { Component, effect, ElementRef, viewChild } from '@angular/core';\nimport { KlString, randomString } from '@koalarx/utils/KlString';\n\n@Component({\n selector: 'kl-dropdown',\n templateUrl: './dropdown.html',\n})\nexport class Dropdown {\n private readonly dropdownTriggerElement =\n viewChild<ElementRef<HTMLButtonElement>>('dropdownTrigger');\n private readonly dropdownContentElement =\n viewChild<ElementRef<HTMLDivElement>>('dropdownContent');\n\n id = randomString(10, { numbers: true, uppercase: false, lowercase: false });\n\n private readonly anchorName = new KlString('--anchor-').concat(this.id);\n\n constructor() {\n effect(() => {\n const triggerElement = this.dropdownTriggerElement()?.nativeElement;\n const contentElement = this.dropdownContentElement()?.nativeElement;\n\n if (triggerElement && contentElement) {\n triggerElement.style = `anchor-name: ${this.anchorName};`;\n contentElement.style = `position-anchor: ${this.anchorName};`;\n }\n });\n }\n\n ajustPosition() {\n const triggerElement = this.dropdownTriggerElement()?.nativeElement;\n const contentElement = this.dropdownContentElement()?.nativeElement;\n\n if (triggerElement && contentElement) {\n setTimeout(() => {\n const position = contentElement.getBoundingClientRect();\n const screenWidth = document.body.clientWidth;\n const screenHeight = document.body.clientHeight;\n\n if (position.right > screenWidth) {\n contentElement.classList.add('dropdown-left');\n contentElement.classList.add('dropdown-start');\n }\n\n if (position.bottom > screenHeight) {\n contentElement.classList.add('dropdown-top');\n }\n });\n }\n }\n}\n","<button #dropdownTrigger\n tabindex=\"0\"\n role=\"button\"\n [attr.popovertarget]=\"id\"\n (click)=\"ajustPosition()\">\n <ng-content select=\"[trigger]\" />\n</button>\n\n<div #dropdownContent\n tabindex=\"0\"\n popover\n [id]=\"id\"\n class=\"dropdown bg-base-200 rounded-box mt-3 min-w-52 w-auto max-w-[30vw] max-h-[40vh] shadow-sm border-2 border-neutral-200 dark:border-neutral-800 rounded-md overflow-y-auto\">\n <ng-content select=\"[options]\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAOa,QAAQ,CAAA;AACF,IAAA,sBAAsB,GACrC,SAAS,CAAgC,iBAAiB,kEAAC;AAC5C,IAAA,sBAAsB,GACrC,SAAS,CAA6B,iBAAiB,kEAAC;AAE1D,IAAA,EAAE,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AAE3D,IAAA,UAAU,GAAG,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;AAEvE,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;YACV,MAAM,cAAc,GAAG,IAAI,CAAC,sBAAsB,EAAE,EAAE,aAAa;YACnE,MAAM,cAAc,GAAG,IAAI,CAAC,sBAAsB,EAAE,EAAE,aAAa;AAEnE,YAAA,IAAI,cAAc,IAAI,cAAc,EAAE;gBACpC,cAAc,CAAC,KAAK,GAAG,CAAA,aAAA,EAAgB,IAAI,CAAC,UAAU,GAAG;gBACzD,cAAc,CAAC,KAAK,GAAG,CAAA,iBAAA,EAAoB,IAAI,CAAC,UAAU,GAAG;;AAEjE,SAAC,CAAC;;IAGJ,aAAa,GAAA;QACX,MAAM,cAAc,GAAG,IAAI,CAAC,sBAAsB,EAAE,EAAE,aAAa;QACnE,MAAM,cAAc,GAAG,IAAI,CAAC,sBAAsB,EAAE,EAAE,aAAa;AAEnE,QAAA,IAAI,cAAc,IAAI,cAAc,EAAE;YACpC,UAAU,CAAC,MAAK;AACd,gBAAA,MAAM,QAAQ,GAAG,cAAc,CAAC,qBAAqB,EAAE;AACvD,gBAAA,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW;AAC7C,gBAAA,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY;AAE/C,gBAAA,IAAI,QAAQ,CAAC,KAAK,GAAG,WAAW,EAAE;AAChC,oBAAA,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC;AAC7C,oBAAA,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC;;AAGhD,gBAAA,IAAI,QAAQ,CAAC,MAAM,GAAG,YAAY,EAAE;AAClC,oBAAA,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC;;AAEhD,aAAC,CAAC;;;uGAxCK,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,8UCPrB,6dAeA,EAAA,CAAA;;2FDRa,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAJpB,SAAS;+BACE,aAAa,EAAA,QAAA,EAAA,6dAAA,EAAA;;;AEJzB;;AAEG;;;;"}
|
|
@@ -4,11 +4,11 @@ import { AppConfig } from '@koalarx/ui/core/config';
|
|
|
4
4
|
|
|
5
5
|
class FieldErrors {
|
|
6
6
|
translations = inject(AppConfig).translation.form;
|
|
7
|
-
field = input.required();
|
|
8
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
9
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
7
|
+
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: FieldErrors, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: FieldErrors, isStandalone: true, selector: "kl-field-errors", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (field().errors && field().touched) {\n <p class=\"validator-hint show mb-1.5\">\n <ng-content select=\"[errors]\" />\n\n @if (field().errors?.['required']) {\n {{translations.required}}<br/>\n }\n\n @if (field().errors?.['email']) {\n {{translations.invalidEmail}}<br/>\n }\n\n @if (field().errors?.['minlength']) {\n {{translations.invalidMinLength(field().errors?.['minlength'].requiredLength)}}<br/>\n }\n </p>\n}\n" });
|
|
10
10
|
}
|
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: FieldErrors, decorators: [{
|
|
12
12
|
type: Component,
|
|
13
13
|
args: [{ selector: 'kl-field-errors', template: "@if (field().errors && field().touched) {\n <p class=\"validator-hint show mb-1.5\">\n <ng-content select=\"[errors]\" />\n\n @if (field().errors?.['required']) {\n {{translations.required}}<br/>\n }\n\n @if (field().errors?.['email']) {\n {{translations.invalidEmail}}<br/>\n }\n\n @if (field().errors?.['minlength']) {\n {{translations.invalidMinLength(field().errors?.['minlength'].requiredLength)}}<br/>\n }\n </p>\n}\n" }]
|
|
14
14
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-field-errors.mjs","sources":["../../projects/koala-ui/shared/components/field-errors/field-errors.ts","../../projects/koala-ui/shared/components/field-errors/field-errors.html","../../projects/koala-ui/shared/components/field-errors/koalarx-ui-shared-components-field-errors.ts"],"sourcesContent":["import { Component, inject, input } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { AppConfig } from '@koalarx/ui/core/config';\n\n@Component({\n selector: 'kl-field-errors',\n templateUrl: './field-errors.html',\n})\nexport class FieldErrors {\n readonly translations = inject(AppConfig).translation.form;\n field = input.required<FormControl>();\n}\n","@if (field().errors && field().touched) {\n <p class=\"validator-hint show mb-1.5\">\n <ng-content select=\"[errors]\" />\n\n @if (field().errors?.['required']) {\n {{translations.required}}<br/>\n }\n\n @if (field().errors?.['email']) {\n {{translations.invalidEmail}}<br/>\n }\n\n @if (field().errors?.['minlength']) {\n {{translations.invalidMinLength(field().errors?.['minlength'].requiredLength)}}<br/>\n }\n </p>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAQa,WAAW,CAAA;IACb,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAC1D,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-field-errors.mjs","sources":["../../projects/koala-ui/shared/components/field-errors/field-errors.ts","../../projects/koala-ui/shared/components/field-errors/field-errors.html","../../projects/koala-ui/shared/components/field-errors/koalarx-ui-shared-components-field-errors.ts"],"sourcesContent":["import { Component, inject, input } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { AppConfig } from '@koalarx/ui/core/config';\n\n@Component({\n selector: 'kl-field-errors',\n templateUrl: './field-errors.html',\n})\nexport class FieldErrors {\n readonly translations = inject(AppConfig).translation.form;\n field = input.required<FormControl>();\n}\n","@if (field().errors && field().touched) {\n <p class=\"validator-hint show mb-1.5\">\n <ng-content select=\"[errors]\" />\n\n @if (field().errors?.['required']) {\n {{translations.required}}<br/>\n }\n\n @if (field().errors?.['email']) {\n {{translations.invalidEmail}}<br/>\n }\n\n @if (field().errors?.['minlength']) {\n {{translations.invalidMinLength(field().errors?.['minlength'].requiredLength)}}<br/>\n }\n </p>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAQa,WAAW,CAAA;IACb,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,IAAI;AAC1D,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAe;uGAF1B,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,WAAW,8MCRxB,+cAiBA,EAAA,CAAA;;2FDTa,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,SAAS;+BACE,iBAAiB,EAAA,QAAA,EAAA,+cAAA,EAAA;;;AEL7B;;AAEG;;;;"}
|
|
@@ -3,20 +3,20 @@ import { Component, input } from '@angular/core';
|
|
|
3
3
|
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
4
4
|
|
|
5
5
|
class HorizontalMenuContainer {
|
|
6
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: HorizontalMenuContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: HorizontalMenuContainer, isStandalone: true, selector: "kl-horizontal-menu-container", ngImport: i0, template: "<ul class=\"menu menu-vertical lg:menu-horizontal font-semibold text-gray-950 dark:text-gray-50 rounded-box\">\n <ng-content />\n</ul>\n" });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: HorizontalMenuContainer, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'kl-horizontal-menu-container', template: "<ul class=\"menu menu-vertical lg:menu-horizontal font-semibold text-gray-950 dark:text-gray-50 rounded-box\">\n <ng-content />\n</ul>\n" }]
|
|
12
12
|
}] });
|
|
13
13
|
|
|
14
14
|
class HorizontalMenuItem {
|
|
15
|
-
link = input.required();
|
|
16
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
17
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
15
|
+
link = input.required(...(ngDevMode ? [{ debugName: "link" }] : []));
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: HorizontalMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.6", type: HorizontalMenuItem, isStandalone: true, selector: "kl-horizontal-menu-item", inputs: { link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<li>\n <a class=\"opacity-70\"\n [routerLink]=\"link()\"\n routerLinkActive=\"opacity-100\">\n <ng-content />\n </a>\n</li>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: HorizontalMenuItem, decorators: [{
|
|
20
20
|
type: Component,
|
|
21
21
|
args: [{ selector: 'kl-horizontal-menu-item', imports: [RouterLink, RouterLinkActive], template: "<li>\n <a class=\"opacity-70\"\n [routerLink]=\"link()\"\n routerLinkActive=\"opacity-100\">\n <ng-content />\n </a>\n</li>\n" }]
|
|
22
22
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-shared-components-horizontal-menu.mjs","sources":["../../projects/koala-ui/shared/components/horizontal-menu/horizontal-menu-container.ts","../../projects/koala-ui/shared/components/horizontal-menu/horizontal-menu-container.html","../../projects/koala-ui/shared/components/horizontal-menu/horizontal-menu-item.ts","../../projects/koala-ui/shared/components/horizontal-menu/horizontal-menu-item.html","../../projects/koala-ui/shared/components/horizontal-menu/koalarx-ui-shared-components-horizontal-menu.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'kl-horizontal-menu-container',\n templateUrl: './horizontal-menu-container.html',\n})\nexport class HorizontalMenuContainer {}\n","<ul class=\"menu menu-vertical lg:menu-horizontal font-semibold text-gray-950 dark:text-gray-50 rounded-box\">\n <ng-content />\n</ul>\n","import { Component, input } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\n\n@Component({\n selector: 'kl-horizontal-menu-item',\n templateUrl: './horizontal-menu-item.html',\n imports: [RouterLink, RouterLinkActive],\n})\nexport class HorizontalMenuItem {\n link = input.required<string>();\n}\n","<li>\n <a class=\"opacity-70\"\n [routerLink]=\"link()\"\n routerLinkActive=\"opacity-100\">\n <ng-content />\n </a>\n</li>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,uBAAuB,CAAA;uGAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,wFCNpC,2IAGA,EAAA,CAAA;;2FDGa,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;+BACE,8BAA8B,EAAA,QAAA,EAAA,2IAAA,EAAA;;;MEK7B,kBAAkB,CAAA;AAC7B,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ
|
|
1
|
+
{"version":3,"file":"koalarx-ui-shared-components-horizontal-menu.mjs","sources":["../../projects/koala-ui/shared/components/horizontal-menu/horizontal-menu-container.ts","../../projects/koala-ui/shared/components/horizontal-menu/horizontal-menu-container.html","../../projects/koala-ui/shared/components/horizontal-menu/horizontal-menu-item.ts","../../projects/koala-ui/shared/components/horizontal-menu/horizontal-menu-item.html","../../projects/koala-ui/shared/components/horizontal-menu/koalarx-ui-shared-components-horizontal-menu.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'kl-horizontal-menu-container',\n templateUrl: './horizontal-menu-container.html',\n})\nexport class HorizontalMenuContainer {}\n","<ul class=\"menu menu-vertical lg:menu-horizontal font-semibold text-gray-950 dark:text-gray-50 rounded-box\">\n <ng-content />\n</ul>\n","import { Component, input } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\n\n@Component({\n selector: 'kl-horizontal-menu-item',\n templateUrl: './horizontal-menu-item.html',\n imports: [RouterLink, RouterLinkActive],\n})\nexport class HorizontalMenuItem {\n link = input.required<string>();\n}\n","<li>\n <a class=\"opacity-70\"\n [routerLink]=\"link()\"\n routerLinkActive=\"opacity-100\">\n <ng-content />\n </a>\n</li>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,uBAAuB,CAAA;uGAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,wFCNpC,2IAGA,EAAA,CAAA;;2FDGa,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;+BACE,8BAA8B,EAAA,QAAA,EAAA,2IAAA,EAAA;;;MEK7B,kBAAkB,CAAA;AAC7B,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAU;uGADpB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECR/B,0IAOA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDDY,UAAU,oOAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,uBAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAE3B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAAA,OAAA,EAE1B,CAAC,UAAU,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,0IAAA,EAAA;;;AENzC;;AAEG;;;;"}
|
|
@@ -24,10 +24,10 @@ class AutocompleteRef {
|
|
|
24
24
|
this.appRef.detachView(this.componentRef().hostView);
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
28
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
27
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
28
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteRef });
|
|
29
29
|
}
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteRef, decorators: [{
|
|
31
31
|
type: Injectable
|
|
32
32
|
}] });
|
|
33
33
|
|
|
@@ -35,19 +35,19 @@ class AutocompleteOptions {
|
|
|
35
35
|
autocompleteRef = inject(AutocompleteRef);
|
|
36
36
|
viewContainerRef = inject(ViewContainerRef);
|
|
37
37
|
firstLoad = true;
|
|
38
|
-
fieldId = input.required();
|
|
39
|
-
options = input.required();
|
|
40
|
-
control = input.required();
|
|
41
|
-
multiple = input.required();
|
|
42
|
-
autocompleteValue = input.required();
|
|
43
|
-
placeholderSearchField = input();
|
|
44
|
-
disableAutoTypeConversion = input(false, { transform: booleanAttribute });
|
|
38
|
+
fieldId = input.required(...(ngDevMode ? [{ debugName: "fieldId" }] : []));
|
|
39
|
+
options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
40
|
+
control = input.required(...(ngDevMode ? [{ debugName: "control" }] : []));
|
|
41
|
+
multiple = input.required(...(ngDevMode ? [{ debugName: "multiple" }] : []));
|
|
42
|
+
autocompleteValue = input.required(...(ngDevMode ? [{ debugName: "autocompleteValue" }] : []));
|
|
43
|
+
placeholderSearchField = input(...(ngDevMode ? [undefined, { debugName: "placeholderSearchField" }] : []));
|
|
44
|
+
disableAutoTypeConversion = input(false, ...(ngDevMode ? [{ debugName: "disableAutoTypeConversion", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
45
45
|
list = linkedSignal(() => {
|
|
46
46
|
const options = this.options()();
|
|
47
47
|
return new KlArray(options).split(100)[0];
|
|
48
48
|
});
|
|
49
|
-
optionFocused = signal(0);
|
|
50
|
-
searchInputRef = viewChild('searchInput');
|
|
49
|
+
optionFocused = signal(0, ...(ngDevMode ? [{ debugName: "optionFocused" }] : []));
|
|
50
|
+
searchInputRef = viewChild('searchInput', ...(ngDevMode ? [{ debugName: "searchInputRef" }] : []));
|
|
51
51
|
constructor() {
|
|
52
52
|
effect(() => {
|
|
53
53
|
const hasValue = !!this.autocompleteValue().currentValue();
|
|
@@ -197,10 +197,10 @@ class AutocompleteOptions {
|
|
|
197
197
|
this.control().setValue(value);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
201
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
200
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteOptions, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
201
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: AutocompleteOptions, isStandalone: true, selector: "kl-autocomplete-options", inputs: { fieldId: { classPropertyName: "fieldId", publicName: "fieldId", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: true, transformFunction: null }, autocompleteValue: { classPropertyName: "autocompleteValue", publicName: "autocompleteValue", isSignal: true, isRequired: true, transformFunction: null }, placeholderSearchField: { classPropertyName: "placeholderSearchField", publicName: "placeholderSearchField", isSignal: true, isRequired: false, transformFunction: null }, disableAutoTypeConversion: { classPropertyName: "disableAutoTypeConversion", publicName: "disableAutoTypeConversion", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "searchInputRef", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"bg-base-300 overflow-hidden shadow border border-neutral-200 dark:border-neutral-700 rounded-lg flex flex-col w-full\"\n [attr.aria-labelledby]=\"fieldId()\">\n\n <div class=\"kl-autocomplete-filter border-b border-neutral-200 dark:border-neutral-700\">\n <label class=\"flex items-center text-sm\">\n <i class=\"fa-solid fa-magnifying-glass opacity-60 absolute top-3 left-4\"></i>\n <input class=\"w-full p-2 pr-3 pl-10 outline-none placeholder:opacity-60\"\n #searchInput\n type=\"search\"\n [formControl]=\"autocompleteValue().filterControl\"\n placeholder=\"Type to Search...\"\n />\n </label>\n </div>\n\n <div class=\"kl-autocomplete-options-container flex flex-col overflow-auto p-1\">\n @for (item of list(); track $index) {\n @let optionLabelId = fieldId() + '-' + item.value;\n\n <label class=\"relative py-1 px-2 pr-8 rounded-md\"\n [attr.for]=\"optionLabelId\"\n [class.active]=\"$index === optionFocused()\"\n (mouseover)=\"optionFocused.set($index)\">\n\n <input\n [type]=\"multiple() ? 'checkbox' : 'radio'\"\n [id]=\"optionLabelId\"\n [name]=\"fieldId()\"\n [attr.value]=\"item.value\"\n [checked]=\"multiple()\n ? control().value?.includes(item.value)\n : item.value === control().value\"\n (change)=\"setValue($event)\"\n />\n {{item.label}}\n </label>\n }\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
202
202
|
}
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteOptions, decorators: [{
|
|
204
204
|
type: Component,
|
|
205
205
|
args: [{ selector: 'kl-autocomplete-options', imports: [ReactiveFormsModule], template: "<div class=\"bg-base-300 overflow-hidden shadow border border-neutral-200 dark:border-neutral-700 rounded-lg flex flex-col w-full\"\n [attr.aria-labelledby]=\"fieldId()\">\n\n <div class=\"kl-autocomplete-filter border-b border-neutral-200 dark:border-neutral-700\">\n <label class=\"flex items-center text-sm\">\n <i class=\"fa-solid fa-magnifying-glass opacity-60 absolute top-3 left-4\"></i>\n <input class=\"w-full p-2 pr-3 pl-10 outline-none placeholder:opacity-60\"\n #searchInput\n type=\"search\"\n [formControl]=\"autocompleteValue().filterControl\"\n placeholder=\"Type to Search...\"\n />\n </label>\n </div>\n\n <div class=\"kl-autocomplete-options-container flex flex-col overflow-auto p-1\">\n @for (item of list(); track $index) {\n @let optionLabelId = fieldId() + '-' + item.value;\n\n <label class=\"relative py-1 px-2 pr-8 rounded-md\"\n [attr.for]=\"optionLabelId\"\n [class.active]=\"$index === optionFocused()\"\n (mouseover)=\"optionFocused.set($index)\">\n\n <input\n [type]=\"multiple() ? 'checkbox' : 'radio'\"\n [id]=\"optionLabelId\"\n [name]=\"fieldId()\"\n [attr.value]=\"item.value\"\n [checked]=\"multiple()\n ? control().value?.includes(item.value)\n : item.value === control().value\"\n (change)=\"setValue($event)\"\n />\n {{item.label}}\n </label>\n }\n </div>\n</div>\n" }]
|
|
206
206
|
}], ctorParameters: () => [] });
|
|
@@ -324,10 +324,10 @@ class Autocomplete {
|
|
|
324
324
|
this.calculatePosition(container);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
328
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
327
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Autocomplete, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
328
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Autocomplete });
|
|
329
329
|
}
|
|
330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Autocomplete, decorators: [{
|
|
331
331
|
type: Injectable
|
|
332
332
|
}] });
|
|
333
333
|
|
|
@@ -344,43 +344,43 @@ class AutocompleteBuilder {
|
|
|
344
344
|
inMemoryWithLoading(config) {
|
|
345
345
|
return config;
|
|
346
346
|
}
|
|
347
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
348
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
348
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteBuilder, providedIn: 'root' });
|
|
349
349
|
}
|
|
350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteBuilder, decorators: [{
|
|
351
351
|
type: Injectable,
|
|
352
352
|
args: [{ providedIn: 'root' }]
|
|
353
353
|
}] });
|
|
354
354
|
|
|
355
355
|
class AutocompleteValue {
|
|
356
356
|
destroyRef = inject(DestroyRef);
|
|
357
|
-
_filter = signal('');
|
|
357
|
+
_filter = signal('', ...(ngDevMode ? [{ debugName: "_filter" }] : []));
|
|
358
358
|
_control;
|
|
359
|
-
_currentValue = signal(null);
|
|
359
|
+
_currentValue = signal(null, ...(ngDevMode ? [{ debugName: "_currentValue" }] : []));
|
|
360
360
|
_multiple = false;
|
|
361
361
|
_options;
|
|
362
|
-
_autofill = signal(null);
|
|
362
|
+
_autofill = signal(null, ...(ngDevMode ? [{ debugName: "_autofill" }] : []));
|
|
363
363
|
_isLoading;
|
|
364
|
-
_internalFilter = signal(null);
|
|
364
|
+
_internalFilter = signal(null, ...(ngDevMode ? [{ debugName: "_internalFilter" }] : []));
|
|
365
365
|
_isOnDemand;
|
|
366
366
|
_requestOptionsParams = signal({
|
|
367
367
|
filter: null,
|
|
368
368
|
autofill: null,
|
|
369
|
-
});
|
|
369
|
+
}, ...(ngDevMode ? [{ debugName: "_requestOptionsParams" }] : []));
|
|
370
370
|
_selectedOption = computed(() => {
|
|
371
371
|
const currentValue = this._currentValue();
|
|
372
372
|
if (Array.isArray(currentValue)) {
|
|
373
373
|
return null;
|
|
374
374
|
}
|
|
375
375
|
return currentValue;
|
|
376
|
-
});
|
|
376
|
+
}, ...(ngDevMode ? [{ debugName: "_selectedOption" }] : []));
|
|
377
377
|
_selectedOptions = computed(() => {
|
|
378
378
|
const currentValue = this._currentValue();
|
|
379
379
|
if (Array.isArray(currentValue)) {
|
|
380
380
|
return currentValue;
|
|
381
381
|
}
|
|
382
382
|
return [];
|
|
383
|
-
});
|
|
383
|
+
}, ...(ngDevMode ? [{ debugName: "_selectedOptions" }] : []));
|
|
384
384
|
_hasValue = computed(() => {
|
|
385
385
|
const currentValue = this._currentValue();
|
|
386
386
|
const value = Array.isArray(currentValue)
|
|
@@ -393,7 +393,7 @@ class AutocompleteValue {
|
|
|
393
393
|
return value >= 0;
|
|
394
394
|
}
|
|
395
395
|
return !!value;
|
|
396
|
-
});
|
|
396
|
+
}, ...(ngDevMode ? [{ debugName: "_hasValue" }] : []));
|
|
397
397
|
filterControl = new FormControl('');
|
|
398
398
|
get filter() {
|
|
399
399
|
return this._filter.asReadonly();
|
|
@@ -440,6 +440,10 @@ class AutocompleteValue {
|
|
|
440
440
|
options.value !== this._selectedOption()?.value);
|
|
441
441
|
}
|
|
442
442
|
async selectOption(value) {
|
|
443
|
+
if (isEmpty(value)) {
|
|
444
|
+
this._currentValue.set(null);
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
443
447
|
while (this._isLoading()) {
|
|
444
448
|
await delay(100);
|
|
445
449
|
}
|
|
@@ -515,11 +519,7 @@ class AutocompleteValue {
|
|
|
515
519
|
event.preventDefault();
|
|
516
520
|
this._control?.setValue(null);
|
|
517
521
|
this._currentValue.set(null);
|
|
518
|
-
this.
|
|
519
|
-
filter: null,
|
|
520
|
-
internalFilter: this._internalFilter(),
|
|
521
|
-
autofill: null,
|
|
522
|
-
}));
|
|
522
|
+
this.filterControl.setValue(null);
|
|
523
523
|
}
|
|
524
524
|
remove(event, value) {
|
|
525
525
|
event.preventDefault();
|
|
@@ -532,10 +532,10 @@ class AutocompleteValue {
|
|
|
532
532
|
const currentValue = this._control.value;
|
|
533
533
|
this._control?.setValue(currentValue.filter((v) => v !== value));
|
|
534
534
|
}
|
|
535
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
536
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
535
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteValue, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
536
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteValue });
|
|
537
537
|
}
|
|
538
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteValue, decorators: [{
|
|
539
539
|
type: Injectable
|
|
540
540
|
}] });
|
|
541
541
|
|
|
@@ -543,15 +543,15 @@ class AutocompleteField extends InputFieldBase {
|
|
|
543
543
|
injector = inject(Injector);
|
|
544
544
|
autocompleteValue = inject(AutocompleteValue);
|
|
545
545
|
autocomplete = inject(Autocomplete);
|
|
546
|
-
options = input.required();
|
|
547
|
-
multiple = input(false, { transform: booleanAttribute });
|
|
548
|
-
placeholderSearchField = input();
|
|
549
|
-
disableAutoTypeConversion = input(false, {
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
isLoading = signal(false);
|
|
553
|
-
optionList = signal([]);
|
|
554
|
-
optionsResource = signal(null);
|
|
546
|
+
options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
547
|
+
multiple = input(false, ...(ngDevMode ? [{ debugName: "multiple", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
548
|
+
placeholderSearchField = input(...(ngDevMode ? [undefined, { debugName: "placeholderSearchField" }] : []));
|
|
549
|
+
disableAutoTypeConversion = input(false, ...(ngDevMode ? [{ debugName: "disableAutoTypeConversion", transform: booleanAttribute }] : [{
|
|
550
|
+
transform: booleanAttribute,
|
|
551
|
+
}]));
|
|
552
|
+
isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
553
|
+
optionList = signal([], ...(ngDevMode ? [{ debugName: "optionList" }] : []));
|
|
554
|
+
optionsResource = signal(null, ...(ngDevMode ? [{ debugName: "optionsResource" }] : []));
|
|
555
555
|
isOnDemand = linkedSignal(() => this.optionsResource()?.onDemand !== undefined);
|
|
556
556
|
constructor() {
|
|
557
557
|
super();
|
|
@@ -625,10 +625,10 @@ class AutocompleteField extends InputFieldBase {
|
|
|
625
625
|
this.optionsResource.set(this.generateOptionsResource());
|
|
626
626
|
this.autocompleteValue.makeAutofill();
|
|
627
627
|
}
|
|
628
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
629
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
628
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
629
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: AutocompleteField, isStandalone: true, selector: "kl-autocomplete-field", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, placeholderSearchField: { classPropertyName: "placeholderSearchField", publicName: "placeholderSearchField", isSignal: true, isRequired: false, transformFunction: null }, disableAutoTypeConversion: { classPropertyName: "disableAutoTypeConversion", publicName: "disableAutoTypeConversion", isSignal: true, isRequired: false, transformFunction: null } }, providers: [Autocomplete, AutocompleteValue], usesInheritance: true, ngImport: i0, template: "<button class=\"relative select hover:cursor-default bg-base-100 w-full min-h-10 h-full flex items-center justify-between flex-nowrap\"\n [class.has-value]=\"autocompleteValue.hasValue()\"\n type=\"button\"\n tabindex=\"0\"\n [id]=\"fieldId\"\n [disabled]=\"isDisabled() || isLoading()\"\n (focus)=\"control().markAsTouched()\"\n (click)=\"open()\">\n\n @if (label(); as label) {\n <span class=\"autocomplete-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\">\n <span>{{label}} {{ isRequired() ? '*' : '' }}</span>\n </span>\n }\n\n <div class=\"flex flex-wrap gap-1 pt-3 pb-2 items-center w-full h-full selected-options\"\n [hookChange]=\"!isLoading() && (autocompleteValue.filter() || autocompleteValue.currentValue())\"\n [class.hidden]=\"!autocompleteValue.hasValue()\">\n @if (multiple()) {\n @for (item of autocompleteValue.selectedOptions(); track $index) {\n <span class=\"flex items-center badge badge-primary badge-sm rounded-sm\">\n <span>{{item.label}}</span>\n <i class=\"fa-solid fa-xmark text-neutral-400 hover:cursor-pointer\"\n (click)=\"autocompleteValue.remove($event, item.value)\">\n </i>\n </span>\n }\n } @else {\n {{autocompleteValue.selectedOption()?.label}}\n }\n </div>\n\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else if (autocompleteValue.hasValue()) {\n <i class=\"fa-solid fa-xmark text-neutral-500 hover:cursor-pointer pt-1 pr-2\"\n (click)=\"autocompleteValue.clear($event)\">\n </i>\n }\n</button>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n", dependencies: [{ kind: "component", type: Loader, selector: "kl-loader", inputs: ["size"] }, { kind: "component", type: FieldErrors, selector: "kl-field-errors", inputs: ["field"] }, { kind: "directive", type: HookChange, selector: "[hookChange]", inputs: ["hookChange"] }] });
|
|
630
630
|
}
|
|
631
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AutocompleteField, decorators: [{
|
|
632
632
|
type: Component,
|
|
633
633
|
args: [{ selector: 'kl-autocomplete-field', providers: [Autocomplete, AutocompleteValue], imports: [Loader, FieldErrors, HookChange], template: "<button class=\"relative select hover:cursor-default bg-base-100 w-full min-h-10 h-full flex items-center justify-between flex-nowrap\"\n [class.has-value]=\"autocompleteValue.hasValue()\"\n type=\"button\"\n tabindex=\"0\"\n [id]=\"fieldId\"\n [disabled]=\"isDisabled() || isLoading()\"\n (focus)=\"control().markAsTouched()\"\n (click)=\"open()\">\n\n @if (label(); as label) {\n <span class=\"autocomplete-label flex items-center gap-2 whitespace-nowrap text-neutral-900 dark:text-neutral-300\">\n <span>{{label}} {{ isRequired() ? '*' : '' }}</span>\n </span>\n }\n\n <div class=\"flex flex-wrap gap-1 pt-3 pb-2 items-center w-full h-full selected-options\"\n [hookChange]=\"!isLoading() && (autocompleteValue.filter() || autocompleteValue.currentValue())\"\n [class.hidden]=\"!autocompleteValue.hasValue()\">\n @if (multiple()) {\n @for (item of autocompleteValue.selectedOptions(); track $index) {\n <span class=\"flex items-center badge badge-primary badge-sm rounded-sm\">\n <span>{{item.label}}</span>\n <i class=\"fa-solid fa-xmark text-neutral-400 hover:cursor-pointer\"\n (click)=\"autocompleteValue.remove($event, item.value)\">\n </i>\n </span>\n }\n } @else {\n {{autocompleteValue.selectedOption()?.label}}\n }\n </div>\n\n @if (isLoading()) {\n <kl-loader size=\"small\" />\n } @else if (autocompleteValue.hasValue()) {\n <i class=\"fa-solid fa-xmark text-neutral-500 hover:cursor-pointer pt-1 pr-2\"\n (click)=\"autocompleteValue.clear($event)\">\n </i>\n }\n</button>\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n" }]
|
|
634
634
|
}], ctorParameters: () => [] });
|