@lucca-front/ng 19.1.0 → 19.1.2
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/lucca-front-ng-dialog.mjs +2 -2
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +7 -2
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +2 -2
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popup-employee.mjs +2 -2
- package/fesm2022/lucca-front-ng-popup-employee.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-tooltip.mjs +67 -34
- package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
- package/package.json +15 -15
- package/tooltip/trigger/tooltip-trigger.directive.d.ts +1 -0
|
@@ -156,13 +156,13 @@ class DialogHeaderComponent {
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DialogHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
159
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: DialogHeaderComponent, isStandalone: true, selector: "lu-dialog-header", host: { classAttribute: "dialog-inside-header" }, ngImport: i0, template: "<button class=\"dialog-inside-header-button button\" type=\"button\"
|
|
159
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: DialogHeaderComponent, isStandalone: true, selector: "lu-dialog-header", host: { classAttribute: "dialog-inside-header" }, ngImport: i0, template: "<button class=\"dialog-inside-header-button button\" type=\"button\" (click)=\"close()\" *ngIf=\"dismissible\">\n\t<lu-icon icon=\"signClose\" [alt]=\"intl.close\"></lu-icon>\n</button>\n\n<div class=\"dialog-inside-header-container\">\n\t<ng-content></ng-content>\n</div>\n", styles: ["h1,h2,h3,h4,h5,h6{margin-top:0;color:var(--palettes-neutral-900);margin-bottom:var(--pr-t-spacings-200);text-rendering:geometricPrecision;text-wrap:pretty;font-weight:var(--components-title-weight, 600);font-size:var(--sizes-fontSize);line-height:var(--sizes-lineHeight);padding-top:var(--sizes-verticalPadding);padding-bottom:var(--sizes-verticalPadding)}h1{--sizes-verticalPadding: var(--sizes-XXL-verticalPadding);--sizes-fontSize: var(--sizes-XXL-fontSize);--sizes-lineHeight: var(--sizes-XXL-lineHeight);--components-title-weight: 900}h1.mod-XXXL{--sizes-verticalPadding: var(--sizes-XXXL-verticalPadding);--sizes-fontSize: var(--sizes-XXXL-fontSize);--sizes-lineHeight: var(--sizes-XXXL-lineHeight);--components-title-weight: 900}h2{--sizes-verticalPadding: var(--sizes-XL-verticalPadding);--sizes-fontSize: var(--sizes-XL-fontSize);--sizes-lineHeight: var(--sizes-XL-lineHeight);--components-title-weight: 700}h3{--sizes-verticalPadding: var(--sizes-L-verticalPadding);--sizes-fontSize: var(--sizes-L-fontSize);--sizes-lineHeight: var(--sizes-L-lineHeight);--components-title-weight: 700}h4{--sizes-verticalPadding: var(--sizes-M-verticalPadding);--sizes-fontSize: var(--sizes-M-fontSize);--sizes-lineHeight: var(--sizes-M-lineHeight);--components-title-weight: 600}h5{--sizes-verticalPadding: var(--sizes-S-verticalPadding);--sizes-fontSize: var(--sizes-S-fontSize);--sizes-lineHeight: var(--sizes-S-lineHeight);--components-title-weight: 600}h6{--sizes-verticalPadding: var(--sizes-XS-verticalPadding);--sizes-fontSize: var(--sizes-XS-fontSize);--sizes-lineHeight: var(--sizes-XS-lineHeight);--components-title-weight: 600}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "lu-icon", inputs: ["icon", "alt", "size", "color"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
160
160
|
}
|
|
161
161
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DialogHeaderComponent, decorators: [{
|
|
162
162
|
type: Component,
|
|
163
163
|
args: [{ selector: 'lu-dialog-header', standalone: true, imports: [IconComponent, ButtonComponent, NgIf], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
164
164
|
class: 'dialog-inside-header',
|
|
165
|
-
}, template: "<button class=\"dialog-inside-header-button button\" type=\"button\"
|
|
165
|
+
}, template: "<button class=\"dialog-inside-header-button button\" type=\"button\" (click)=\"close()\" *ngIf=\"dismissible\">\n\t<lu-icon icon=\"signClose\" [alt]=\"intl.close\"></lu-icon>\n</button>\n\n<div class=\"dialog-inside-header-container\">\n\t<ng-content></ng-content>\n</div>\n", styles: ["h1,h2,h3,h4,h5,h6{margin-top:0;color:var(--palettes-neutral-900);margin-bottom:var(--pr-t-spacings-200);text-rendering:geometricPrecision;text-wrap:pretty;font-weight:var(--components-title-weight, 600);font-size:var(--sizes-fontSize);line-height:var(--sizes-lineHeight);padding-top:var(--sizes-verticalPadding);padding-bottom:var(--sizes-verticalPadding)}h1{--sizes-verticalPadding: var(--sizes-XXL-verticalPadding);--sizes-fontSize: var(--sizes-XXL-fontSize);--sizes-lineHeight: var(--sizes-XXL-lineHeight);--components-title-weight: 900}h1.mod-XXXL{--sizes-verticalPadding: var(--sizes-XXXL-verticalPadding);--sizes-fontSize: var(--sizes-XXXL-fontSize);--sizes-lineHeight: var(--sizes-XXXL-lineHeight);--components-title-weight: 900}h2{--sizes-verticalPadding: var(--sizes-XL-verticalPadding);--sizes-fontSize: var(--sizes-XL-fontSize);--sizes-lineHeight: var(--sizes-XL-lineHeight);--components-title-weight: 700}h3{--sizes-verticalPadding: var(--sizes-L-verticalPadding);--sizes-fontSize: var(--sizes-L-fontSize);--sizes-lineHeight: var(--sizes-L-lineHeight);--components-title-weight: 700}h4{--sizes-verticalPadding: var(--sizes-M-verticalPadding);--sizes-fontSize: var(--sizes-M-fontSize);--sizes-lineHeight: var(--sizes-M-lineHeight);--components-title-weight: 600}h5{--sizes-verticalPadding: var(--sizes-S-verticalPadding);--sizes-fontSize: var(--sizes-S-fontSize);--sizes-lineHeight: var(--sizes-S-lineHeight);--components-title-weight: 600}h6{--sizes-verticalPadding: var(--sizes-XS-verticalPadding);--sizes-fontSize: var(--sizes-XS-fontSize);--sizes-lineHeight: var(--sizes-XS-lineHeight);--components-title-weight: 600}\n"] }]
|
|
166
166
|
}] });
|
|
167
167
|
|
|
168
168
|
class LuDialogService {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-dialog.mjs","sources":["../../../packages/ng/dialog/dialog-content/dialog-content.component.ts","../../../packages/ng/dialog/dialog-footer/dialog-footer.component.ts","../../../packages/ng/dialog/model/dialog-ref.ts","../../../packages/ng/dialog/model/dialog-config.ts","../../../packages/ng/dialog/model/injectors.ts","../../../packages/ng/dialog/dialog-header/translations.ts","../../../packages/ng/dialog/dialog-header/dialog-header.translate.ts","../../../packages/ng/dialog/dialog-header/dialog-header.component.ts","../../../packages/ng/dialog/dialog-header/dialog-header.component.html","../../../packages/ng/dialog/dialog.service.ts","../../../packages/ng/dialog/dialog.providers.ts","../../../packages/ng/dialog/dialog/dialog.component.ts","../../../packages/ng/dialog/directives/dialog-close.directive.ts","../../../packages/ng/dialog/directives/dialog-dismiss.directive.ts","../../../packages/ng/dialog/directives/dialog-open.directive.ts","../../../packages/ng/dialog/dialog-routing/dialog-routing.utils.ts","../../../packages/ng/dialog/dialog-routing/dialog-routing.component.ts","../../../packages/ng/dialog/lucca-front-ng-dialog.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\tselector: 'lu-dialog-content',\n\tstandalone: true,\n\ttemplate: '<ng-content></ng-content>',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'dialog-inside-content',\n\t},\n})\nexport class DialogContentComponent {}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\tselector: 'lu-dialog-footer',\n\tstandalone: true,\n\ttemplate: '<ng-content></ng-content>',\n\tstyleUrl: './dialog-footer.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'dialog-inside-footer footer',\n\t},\n})\nexport class DialogFooterComponent {}\n","import { isObservable, Observable, of, take } from 'rxjs';\nimport { DialogRef } from '@angular/cdk/dialog';\nimport { LuDialogConfig, LuDialogResult } from './dialog-config';\nimport { filter, map } from 'rxjs/operators';\n\nexport const DISMISSED_VALUE = {} as const;\n\nfunction isDismissed(v: unknown): v is typeof DISMISSED_VALUE {\n\treturn v === DISMISSED_VALUE;\n}\n\nexport class LuDialogRef<C = unknown> {\n\t/**\n\t * Instance of the component that's inside the dialog\n\t */\n\tget instance(): C {\n\t\treturn this.cdkRef.componentInstance;\n\t}\n\n\t/**\n\t * Emits when the dialog is closed\n\t *\n\t * Emits either the output of result$ or undefined depending on how it has been closed\n\t */\n\tclosed$: Observable<LuDialogResult<C> | undefined> = this.cdkRef.closed.pipe(map((res): LuDialogResult<C> | undefined => (isDismissed(res) ? undefined : res)));\n\n\t/**\n\t * Emits void when the dialog is dismissed\n\t */\n\tdismissed$: Observable<void> = this.cdkRef.closed.pipe(\n\t\tfilter((res) => res === DISMISSED_VALUE),\n\t\tmap((): void => undefined),\n\t);\n\n\t/**\n\t * Emits the result if it has a value that's not DISMISSED_VALUE\n\t */\n\tresult$: Observable<LuDialogResult<C>> = this.cdkRef.closed.pipe(filter((res): res is LuDialogResult<C> => !isDismissed(res)));\n\n\tconstructor(\n\t\tpublic readonly cdkRef: DialogRef<LuDialogResult<C> | typeof DISMISSED_VALUE, C>,\n\t\tpublic readonly config: LuDialogConfig<C>,\n\t) {}\n\n\tdismiss(): void {\n\t\t// If we can't dismiss this dialog box, just ignore the dismiss call.\n\t\tif (this.config.alert) {\n\t\t\treturn;\n\t\t}\n\t\tconst canClose = this.config.canClose?.(this.instance) ?? true;\n\t\tconst canClose$ = isObservable(canClose) ? canClose : of(canClose);\n\t\tcanClose$.pipe(take(1)).subscribe((close) => {\n\t\t\tif (close) {\n\t\t\t\tthis.cdkRef.close(DISMISSED_VALUE);\n\t\t\t}\n\t\t});\n\t}\n\n\tclose(res: LuDialogResult<C>): void {\n\t\tthis.cdkRef.close(res);\n\t}\n}\n\nexport type LuDialogSelfRef<R> = { dismiss(): void; close(res: R): void };\n","import { AutoFocusTarget, DialogConfig } from '@angular/cdk/dialog';\nimport { ComponentType } from '@angular/cdk/overlay';\nimport { TemplateRef } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nconst ɵdialogData = Symbol.for('luDialogData');\nconst ɵdialogResult = Symbol.for('luDialogResult');\n\nexport type ɵDialogDataFlag = { [ɵdialogData]: unknown };\nexport type ɵDialogResultFlag<R> = { [ɵdialogResult]: R };\n\nexport type LuDialogData<T> = {\n\t[K in keyof T]: T[K] extends ɵDialogDataFlag ? Omit<T[K], typeof ɵdialogData> : never;\n}[keyof T];\n\ntype DialogRefProps<C> = { [K in keyof C]: C[K] extends ɵDialogResultFlag<unknown> ? K : never }[keyof C] & keyof C;\nexport type LuDialogResult<C> = DialogRefProps<C> extends never ? void : C[DialogRefProps<C>] extends ɵDialogResultFlag<infer T> ? T : void;\n\ninterface BaseLuDialogConfig<C> {\n\t/**\n\t * The component or template to put inside the dialog container\n\t */\n\tcontent: ComponentType<C> | TemplateRef<C>;\n\n\t/**\n\t * Data to pass to the component, will be required if the component used `injectDialogData` in a field, specifying the data that's needed.\n\t */\n\tdata: LuDialogData<C>;\n\n\t/**\n\t * Should we put a backdrop? Defaults to true\n\t */\n\tmodal?: boolean;\n\n\t/**\n\t * Is this dialog a blocking popup that cannot be dismissed ?\n\t *\n\t * Defaults to false, setting this to true will also remove the close button in the header\n\t * if you're using `lu-dialog-header`.\n\t */\n\talert?: boolean;\n\n\t/**\n\t * Can be used if you don't have a header or aren't using the default one, to set an aria-label\n\t * instead of aria-labelledby on the dialog container\n\t */\n\tariaLabel?: string;\n\n\t/**\n\t * Autofocus target\n\t *\n\t * Defaults to the close button from the header, first-input is added by us to focus the first available input\n\t * or the first input that is contained inside a node that has the `.luDialog-autofocus` class\n\t */\n\tautoFocus?: AutoFocusTarget | 'first-input' | string;\n\n\t/**\n\t * This provides a way to override any of the configuration parameters expected by cdk's `Dialog.open` method.\n\t *\n\t * WARNING: this will take full authority and override with your values no matter what's computed by LuDialogService,\n\t * use with caution.\n\t */\n\tcdkConfigOverride?: DialogConfig<C>;\n\n\t/**\n\t * A hook function to determine if the current dialog can be closed or not, if provided.\n\t *\n\t * @param comp the instance of the component that's inside the dialog box.\n\t */\n\tcanClose?: (comp: C) => boolean | Observable<boolean>;\n\n\t/**\n\t * Determine if the current dialog can be close by a click on backdrop or escape key\n\t */\n\tcanCloseWithBackdrop?: boolean;\n\n\t/**\n\t * The size of the panel used for the dialog\n\t */\n\tsize?: 'XS' | 'S' | 'M' | 'L' | 'XL' | 'fitContent' | `maxContent` | 'fullScreen';\n\n\t/**\n\t * Should it be a modal (default), a drawer? a drawer from bottom?\n\t */\n\tmode?: 'default' | 'drawer' | 'drawer-from-bottom';\n\n\t/**\n\t * Classes to add to the panel\n\t */\n\tpanelClasses?: string[];\n}\n\nexport type LuDialogConfig<T> = LuDialogData<T> extends never ? Omit<BaseLuDialogConfig<T>, 'data'> : BaseLuDialogConfig<T>;\n","import { LuDialogRef, LuDialogSelfRef } from './dialog-ref';\nimport { ɵDialogDataFlag, ɵDialogResultFlag } from './dialog-config';\nimport { inject } from '@angular/core';\nimport { DIALOG_DATA } from '@angular/cdk/dialog';\n\nexport function injectDialogData<TData>(): TData & ɵDialogDataFlag {\n\treturn inject<TData & ɵDialogDataFlag>(DIALOG_DATA);\n}\n\nexport function injectDialogRef<R = void>(): LuDialogSelfRef<R> & ɵDialogResultFlag<R> {\n\treturn inject<LuDialogSelfRef<R>>(LuDialogRef) as LuDialogSelfRef<R> & ɵDialogResultFlag<R>;\n}\n","export const Translations = {\n\ten: {\n\t\tclose: 'Close',\n\t},\n\tde: {\n\t\tclose: 'Schließen',\n\t},\n\tfr: {\n\t\tclose: 'Fermer',\n\t},\n\tit: {\n\t\tclose: 'Chiudere',\n\t},\n\tnl: {\n\t\tclose: 'Sluiten',\n\t},\n\t'nl-BE': {\n\t\tclose: 'Sluiten',\n\t},\n\tes: {\n\t\tclose: 'Cerrar',\n\t},\n\tpt: {\n\t\tclose: 'Fechar',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_DIALOG_HEADER_TRANSLATIONS = new InjectionToken('LuDialogHeaderTranslations', {\n\tfactory: () => luDialogHeaderTranslations,\n});\n\nexport interface LuDialogHeaderTranslations {\n\tclose: string;\n}\n\nexport const luDialogHeaderTranslations: LuTranslation<LuDialogHeaderTranslations> = Translations;\n","import { CdkDialogContainer } from '@angular/cdk/dialog';\nimport { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ElementRef, inject, OnInit, Renderer2, ViewEncapsulation } from '@angular/core';\nimport { ButtonComponent } from '@lucca-front/ng/button';\nimport { getIntl } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { LuDialogRef } from '../model';\nimport { LU_DIALOG_HEADER_TRANSLATIONS } from './dialog-header.translate';\n\nlet nextId = 0;\n\n@Component({\n\tselector: 'lu-dialog-header',\n\tstandalone: true,\n\timports: [IconComponent, ButtonComponent, NgIf],\n\ttemplateUrl: './dialog-header.component.html',\n\tstyleUrl: './dialog-header.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'dialog-inside-header',\n\t},\n})\nexport class DialogHeaderComponent implements OnInit {\n\t#ref = inject(LuDialogRef);\n\n\tintl = getIntl(LU_DIALOG_HEADER_TRANSLATIONS);\n\n\tdismissible = !this.#ref.config.alert;\n\n\t#elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\t#renderer = inject(Renderer2);\n\n\tclose(): void {\n\t\tthis.#ref.dismiss();\n\t}\n\n\tngOnInit(): void {\n\t\t// Using setTimeout here to make sure this will be handled in the next Cd cycle, not the current one.\n\t\tsetTimeout(() => {\n\t\t\tconst header = this.#elementRef.nativeElement.querySelector('h1');\n\t\t\tconst id = header?.id || `lu-dialog-header-${nextId++}`;\n\t\t\tif (header) {\n\t\t\t\tthis.#renderer.setAttribute(header, 'id', id);\n\t\t\t\tthis.#renderer.addClass(header, 'dialog-inside-header-container-title');\n\t\t\t}\n\t\t\t(this.#ref.cdkRef.containerInstance as CdkDialogContainer)?._addAriaLabelledBy(id);\n\t\t});\n\t}\n}\n","<button class=\"dialog-inside-header-button button\" type=\"button\" luButton (click)=\"close()\" *ngIf=\"dismissible\">\n\t<lu-icon icon=\"signClose\"></lu-icon>\n\t<span class=\"u-mask\">{{ intl.close }}</span>\n</button>\n\n<div class=\"dialog-inside-header-container\">\n\t<ng-content></ng-content>\n</div>\n","import { Dialog, DialogRef } from '@angular/cdk/dialog';\nimport { inject, Injectable, Injector, Renderer2 } from '@angular/core';\nimport { isObservable, merge, of, take } from 'rxjs';\nimport { filter, switchMap, takeUntil } from 'rxjs/operators';\nimport { LuDialogConfig, LuDialogRef, LuDialogResult } from './model';\nimport { DISMISSED_VALUE } from './model/dialog-ref';\n\n@Injectable()\nexport class LuDialogService {\n\t#cdkDialog = inject(Dialog);\n\n\t#injector = inject(Injector);\n\n\topen<C>(config: LuDialogConfig<C>): LuDialogRef<C> {\n\t\tlet luDialogRef: LuDialogRef<C>;\n\t\tlet modeClasses: string[] = [];\n\t\tswitch (config.mode) {\n\t\t\tcase 'drawer':\n\t\t\t\tmodeClasses = ['mod-drawer'];\n\t\t\t\tbreak;\n\t\t\tcase 'drawer-from-bottom':\n\t\t\t\tmodeClasses = ['mod-drawer', 'mod-fromBottom'];\n\t\t\t\tbreak;\n\t\t}\n\t\tconst cdkRef = this.#cdkDialog.open(config.content, {\n\t\t\tariaModal: config.modal ?? true,\n\t\t\thasBackdrop: config.modal ?? true,\n\t\t\tdata: 'data' in config ? config.data : null,\n\t\t\tdisableClose: true,\n\t\t\tcloseOnDestroy: true,\n\t\t\trole: config.alert ? 'alertdialog' : 'dialog',\n\t\t\trestoreFocus: true,\n\t\t\tbackdropClass: 'dialog_backdrop',\n\t\t\tpanelClass: ['dialog', `mod-${config.size || 'M'}`, ...modeClasses, ...(config.panelClasses || [])],\n\t\t\tariaLabel: config.ariaLabel,\n\t\t\t// If focus is first-input, focus dialog and let the component do the rest\n\t\t\t// Else, just set it to config value or default to first-tabbable\n\t\t\tautoFocus: config.autoFocus === 'first-input' ? 'dialog' : (config.autoFocus ?? 'first-tabbable'),\n\t\t\ttemplateContext: () => ({ dialogRef: luDialogRef }),\n\t\t\tinjector: this.#injector,\n\t\t\tproviders: (ref: DialogRef<LuDialogResult<C>, C>) => {\n\t\t\t\tluDialogRef = new LuDialogRef(ref, config);\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\tprovide: LuDialogRef,\n\t\t\t\t\t\tuseValue: luDialogRef,\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t},\n\t\t\t...(config.cdkConfigOverride || {}),\n\t\t});\n\n\t\tif (cdkRef.componentRef) {\n\t\t\tconst renderer = cdkRef.componentRef.injector.get(Renderer2);\n\t\t\trenderer.setStyle(cdkRef.componentRef.location.nativeElement, 'display', 'contents');\n\t\t}\n\n\t\tif (!config.alert) {\n\t\t\t// Setup close listeners on backdrop click and escape key by ourselves so we can hook the `canClose` method to it.\n\t\t\tmerge(cdkRef.backdropClick, cdkRef.keydownEvents.pipe(filter((e) => e.key === 'Escape' && !e.defaultPrevented)))\n\t\t\t\t.pipe(\n\t\t\t\t\tfilter(() => config.canCloseWithBackdrop ?? true),\n\t\t\t\t\tswitchMap(() => {\n\t\t\t\t\t\tconst canClose = config.canClose?.(cdkRef.componentInstance) ?? true;\n\t\t\t\t\t\tconst canClose$ = isObservable(canClose) ? canClose : of(canClose);\n\t\t\t\t\t\treturn canClose$.pipe(take(1));\n\t\t\t\t\t}),\n\t\t\t\t\ttakeUntil(luDialogRef.closed$),\n\t\t\t\t)\n\t\t\t\t.subscribe((canClose) => {\n\t\t\t\t\tif (canClose) {\n\t\t\t\t\t\tcdkRef.close(DISMISSED_VALUE);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}\n\t\treturn luDialogRef;\n\t}\n}\n","import { EnvironmentProviders, importProvidersFrom, makeEnvironmentProviders, Provider } from '@angular/core';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { LuDialogService } from './dialog.service';\n\nexport function configureLuDialog(): EnvironmentProviders {\n\treturn makeEnvironmentProviders([importProvidersFrom(DialogModule)]);\n}\n\nexport function provideLuDialog(): Provider {\n\treturn LuDialogService;\n}\n","import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, inject, ViewEncapsulation } from '@angular/core';\nimport { LuDialogRef } from '../model';\n\n@Component({\n\tselector: 'lu-dialog',\n\tstandalone: true,\n\ttemplate: '<ng-content></ng-content>',\n\tstyleUrl: './dialog.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'dialog-inside',\n\t},\n})\nexport class DialogComponent implements AfterViewInit {\n\tpublic readonly dialogRef = inject<LuDialogRef>(LuDialogRef);\n\n\t#htmlElement = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n\tclose(): void {\n\t\tthis.dialogRef.close();\n\t}\n\n\tdismiss(): void {\n\t\tthis.dialogRef.dismiss();\n\t}\n\n\tngAfterViewInit(): void {\n\t\tif (this.dialogRef.config.autoFocus === 'first-input' && !this.dialogRef.config.cdkConfigOverride?.autoFocus) {\n\t\t\tconst focusable: HTMLElement =\n\t\t\t\tthis.#htmlElement.querySelector('.luDialog-autofocus .luNativeInput') || this.#htmlElement.querySelector('.luDialog-autofocus') || this.#htmlElement.querySelector('.luNativeInput');\n\t\t\tfocusable?.focus();\n\t\t}\n\t}\n}\n","import { Directive, HostListener, inject } from '@angular/core';\nimport { LuDialogRef } from '../model';\n\n@Directive({\n\tselector: '[luDialogClose]',\n\tstandalone: true,\n})\nexport class DialogCloseDirective {\n\t#ref = inject<LuDialogRef>(LuDialogRef);\n\n\t@HostListener('click')\n\tclose(): void {\n\t\tthis.#ref.close();\n\t}\n}\n","import { Directive, HostListener, inject } from '@angular/core';\nimport { LuDialogRef } from '../model';\n\n@Directive({\n\tselector: '[luDialogDismiss]',\n\tstandalone: true,\n})\nexport class DialogDismissDirective {\n\t#ref = inject<LuDialogRef>(LuDialogRef);\n\n\t@HostListener('click')\n\tclose(): void {\n\t\tthis.#ref.dismiss();\n\t}\n}\n","import { Directive, HostListener, inject, Input, TemplateRef } from '@angular/core';\nimport { LuDialogService } from '../dialog.service';\nimport { LuDialogConfig } from '../model';\nimport { provideLuDialog } from '../dialog.providers';\n\n@Directive({\n\tselector: '[luDialogOpen]',\n\tstandalone: true,\n\tproviders: [provideLuDialog()],\n})\nexport class DialogOpenDirective {\n\t#dialogService = inject(LuDialogService);\n\n\t@Input({\n\t\trequired: true,\n\t\talias: 'luDialogOpen',\n\t})\n\tdialog: TemplateRef<void>;\n\n\t@Input()\n\tluDialogConfig: LuDialogConfig<unknown>;\n\n\t@HostListener('click')\n\tclick(): void {\n\t\tthis.#dialogService.open({\n\t\t\t...this.luDialogConfig,\n\t\t\tcontent: this.dialog,\n\t\t});\n\t}\n}\n","import { ComponentType } from '@angular/cdk/portal';\nimport { InjectionToken } from '@angular/core';\nimport { Route } from '@angular/router';\nimport { Observable, firstValueFrom, isObservable } from 'rxjs';\nimport { LuDialogConfig, LuDialogData } from '../model';\nimport { DialogRoutingComponent } from './dialog-routing.component';\nimport { DialogRouteConfig } from './dialog-routing.models';\n\nexport type Deferrable<T> = Promise<T> | Observable<T> | T;\n\nexport async function deferrableToPromise<T>(deferrable: Promise<T> | Observable<T> | T): Promise<T> {\n\treturn isObservable(deferrable) ? firstValueFrom(deferrable) : deferrable;\n}\n\nexport const DIALOG_ROUTE_CONFIG = new InjectionToken<DialogRouteConfig<unknown>>('DIALOG_ROUTE_CONFIG');\n\nexport function createDialogRoute<C>(config: DialogRouteConfig<C>): Route {\n\treturn {\n\t\t...config,\n\t\tcomponent: DialogRoutingComponent,\n\t\tproviders: [{ provide: DIALOG_ROUTE_CONFIG, useValue: config }, ...[config.providers ?? []]],\n\t};\n}\n\nexport type DialogFactoryResultOptions<C> = { path: string; dialogRouteConfig?: Partial<Omit<DialogRouteConfig<C>, 'path'>> } & (LuDialogData<C> extends never\n\t? { dataFactory?: never }\n\t: {\n\t\t\tdataFactory: () => Deferrable<LuDialogData<C>>;\n\t\t});\n\nexport type DialogFactoryResult<C> = (options: DialogFactoryResultOptions<C>) => Route;\n\nexport type DialogFactoryConfig<C> = Partial<{\n\tdialogConfig: Omit<LuDialogConfig<C>, 'data' | 'content'>;\n\tdialogRouteConfig: Partial<DialogRouteConfig<C>>;\n}>;\n\nexport function dialogRouteFactory<C>(component: ComponentType<C>, config?: DialogFactoryConfig<C>): DialogFactoryResult<C> {\n\treturn ({ path, dataFactory, dialogRouteConfig }) =>\n\t\tcreateDialogRoute({\n\t\t\tpath,\n\t\t\tdialogConfigFactory: async () => ({\n\t\t\t\t...config?.dialogConfig,\n\t\t\t\tcontent: component,\n\t\t\t\tdata: dataFactory ? await deferrableToPromise(dataFactory()) : undefined,\n\t\t\t}),\n\t\t\t...mergeRouteConfig(config?.dialogRouteConfig, dialogRouteConfig),\n\t\t});\n}\n\nfunction mergeRouteConfig(config1: Partial<Route>, config2: Partial<Route>): Partial<Route> {\n\tif (!config1) {\n\t\treturn config2;\n\t}\n\n\tif (!config2) {\n\t\treturn config1;\n\t}\n\n\tconst result: Partial<Route> = { ...config1, ...config2 };\n\n\t// If both configs have the same key, we merge the arrays\n\tconst mergedArrays = (['providers', 'canActivate', 'children', 'canDeactivate', 'canLoad', 'canActivateChild'] as const satisfies Array<keyof Route>).filter(\n\t\t(key) => key in config1 && key in config2,\n\t);\n\n\tfor (const key of mergedArrays) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\tresult[key] = [...(config1[key] ?? []), ...(config2[key] ?? [])];\n\t}\n\n\t// If both configs have the same data key, we merge the objects\n\tif (config1.data && config2.data) {\n\t\tresult.data = { ...config1.data, ...config2.data };\n\t}\n\n\treturn result;\n}\n","import { DIALOG_DATA } from '@angular/cdk/dialog';\nimport { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, DestroyRef, inject, Injector, OnInit, runInInjectionContext, TemplateRef, viewChild } from '@angular/core';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { from } from 'rxjs';\nimport { provideLuDialog } from '../dialog.providers';\nimport { LuDialogService } from '../dialog.service';\nimport { LuDialogRef } from '../model';\nimport { DialogRouteConfig } from './dialog-routing.models';\nimport { deferrableToPromise, DIALOG_ROUTE_CONFIG } from './dialog-routing.utils';\n\nexport const defaultOnClosedFn = <C>(router = inject(Router), route = inject(ActivatedRoute), config = inject<DialogRouteConfig<C>>(DIALOG_ROUTE_CONFIG)): void =>\n\tvoid router.navigate(\n\t\t[\n\t\t\tconfig.path\n\t\t\t\t.split('/')\n\t\t\t\t.map(() => '..')\n\t\t\t\t.join('/'),\n\t\t],\n\t\t{\n\t\t\trelativeTo: route,\n\t\t\tqueryParamsHandling: 'preserve',\n\t\t},\n\t);\n\n@Component({\n\tselector: 'lu-dialog-routing',\n\ttemplate: `\n\t\t<ng-template>\n\t\t\t@if (dialogComponentContent(); as componentType) {\n\t\t\t\t<ng-container [ngComponentOutlet]=\"componentType\" [ngComponentOutletInjector]=\"customInjector\" />\n\t\t\t}\n\t\t\t@if (dialogTemplateContent(); as templateRef) {\n\t\t\t\t<ng-container [ngTemplateOutlet]=\"templateRef\" [ngTemplateOutletInjector]=\"customInjector\" />\n\t\t\t}\n\t\t</ng-template>\n\t`,\n\tstandalone: true,\n\timports: [NgComponentOutlet, NgTemplateOutlet],\n\tstyles: [\n\t\t`\n\t\t\t:host {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t`,\n\t],\n\tproviders: [provideLuDialog()],\n})\nexport class DialogRoutingComponent<C> implements OnInit {\n\treadonly #destroyRef = inject(DestroyRef);\n\treadonly #dialog = inject(LuDialogService);\n\treadonly injector = inject(Injector);\n\treadonly #config = inject<DialogRouteConfig<C>>(DIALOG_ROUTE_CONFIG);\n\treadonly #dialogConfig = deferrableToPromise(this.#config.dialogConfigFactory());\n\n\treadonly dialogConfig = toSignal(from(this.#dialogConfig), {\n\t\tinitialValue: null,\n\t});\n\treadonly dialogTemplateContent = computed(() => {\n\t\tconst config = this.dialogConfig();\n\t\treturn config && config.content instanceof TemplateRef ? config.content : null;\n\t});\n\treadonly dialogComponentContent = computed(() => {\n\t\tconst config = this.dialogConfig();\n\t\treturn config && !(config.content instanceof TemplateRef) ? config.content : null;\n\t});\n\n\tprotected readonly dialogTemplate = viewChild.required(TemplateRef);\n\n\treadonly customInjector = Injector.create({\n\t\tparent: this.injector,\n\t\tproviders: [\n\t\t\t{\n\t\t\t\tprovide: DIALOG_DATA,\n\t\t\t\tuseFactory: () => {\n\t\t\t\t\tconst config = this.dialogConfig();\n\t\t\t\t\treturn config && 'data' in config ? config.data : null;\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tprovide: LuDialogRef,\n\t\t\t\tuseFactory: () => this.#ref,\n\t\t\t},\n\t\t],\n\t});\n\n\t#ref?: LuDialogRef<C>;\n\n\tngOnInit(): void {\n\t\tvoid this.#openDialog();\n\t}\n\n\tasync #openDialog(): Promise<void> {\n\t\tconst dialogConfig = await this.#dialogConfig;\n\t\tthis.#ref = this.#dialog.open<C>({\n\t\t\t...dialogConfig,\n\t\t\tcontent: this.dialogTemplate(),\n\t\t});\n\t\tthis.#ref.result$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((result) =>\n\t\t\trunInInjectionContext(this.injector, () => {\n\t\t\t\tif (this.#config.onClosed) {\n\t\t\t\t\tthis.#config.onClosed(result);\n\t\t\t\t} else {\n\t\t\t\t\tdefaultOnClosedFn();\n\t\t\t\t}\n\t\t\t}),\n\t\t);\n\n\t\tthis.#ref.dismissed$\n\t\t\t.pipe(takeUntilDestroyed(this.#destroyRef))\n\t\t\t.subscribe(() => runInInjectionContext(this.injector, () => (this.#config.onDismissed ? this.#config.onDismissed() : defaultOnClosedFn())));\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAYa,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,gIAPxB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAOzB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,2BAA2B;oBACrC,eAAe,EAAE,uBAAuB,CAAC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ialog-footer/dialog-footer.component.ts","../../../packages/ng/dialog/model/dialog-ref.ts","../../../packages/ng/dialog/model/dialog-config.ts","../../../packages/ng/dialog/model/injectors.ts","../../../packages/ng/dialog/dialog-header/translations.ts","../../../packages/ng/dialog/dialog-header/dialog-header.translate.ts","../../../packages/ng/dialog/dialog-header/dialog-header.component.ts","../../../packages/ng/dialog/dialog-header/dialog-header.component.html","../../../packages/ng/dialog/dialog.service.ts","../../../packages/ng/dialog/dialog.providers.ts","../../../packages/ng/dialog/dialog/dialog.component.ts","../../../packages/ng/dialog/directives/dialog-close.directive.ts","../../../packages/ng/dialog/directives/dialog-dismiss.directive.ts","../../../packages/ng/dialog/directives/dialog-open.directive.ts","../../../packages/ng/dialog/dialog-routing/dialog-routing.utils.ts","../../../packages/ng/dialog/dialog-routing/dialog-routing.component.ts","../../../packages/ng/dialog/lucca-front-ng-dialog.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\tselector: 'lu-dialog-content',\n\tstandalone: true,\n\ttemplate: '<ng-content></ng-content>',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'dialog-inside-content',\n\t},\n})\nexport class DialogContentComponent {}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\tselector: 'lu-dialog-footer',\n\tstandalone: true,\n\ttemplate: '<ng-content></ng-content>',\n\tstyleUrl: './dialog-footer.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'dialog-inside-footer footer',\n\t},\n})\nexport class DialogFooterComponent {}\n","import { isObservable, Observable, of, take } from 'rxjs';\nimport { DialogRef } from '@angular/cdk/dialog';\nimport { LuDialogConfig, LuDialogResult } from './dialog-config';\nimport { filter, map } from 'rxjs/operators';\n\nexport const DISMISSED_VALUE = {} as const;\n\nfunction isDismissed(v: unknown): v is typeof DISMISSED_VALUE {\n\treturn v === DISMISSED_VALUE;\n}\n\nexport class LuDialogRef<C = unknown> {\n\t/**\n\t * Instance of the component that's inside the dialog\n\t */\n\tget instance(): C {\n\t\treturn this.cdkRef.componentInstance;\n\t}\n\n\t/**\n\t * Emits when the dialog is closed\n\t *\n\t * Emits either the output of result$ or undefined depending on how it has been closed\n\t */\n\tclosed$: Observable<LuDialogResult<C> | undefined> = this.cdkRef.closed.pipe(map((res): LuDialogResult<C> | undefined => (isDismissed(res) ? undefined : res)));\n\n\t/**\n\t * Emits void when the dialog is dismissed\n\t */\n\tdismissed$: Observable<void> = this.cdkRef.closed.pipe(\n\t\tfilter((res) => res === DISMISSED_VALUE),\n\t\tmap((): void => undefined),\n\t);\n\n\t/**\n\t * Emits the result if it has a value that's not DISMISSED_VALUE\n\t */\n\tresult$: Observable<LuDialogResult<C>> = this.cdkRef.closed.pipe(filter((res): res is LuDialogResult<C> => !isDismissed(res)));\n\n\tconstructor(\n\t\tpublic readonly cdkRef: DialogRef<LuDialogResult<C> | typeof DISMISSED_VALUE, C>,\n\t\tpublic readonly config: LuDialogConfig<C>,\n\t) {}\n\n\tdismiss(): void {\n\t\t// If we can't dismiss this dialog box, just ignore the dismiss call.\n\t\tif (this.config.alert) {\n\t\t\treturn;\n\t\t}\n\t\tconst canClose = this.config.canClose?.(this.instance) ?? true;\n\t\tconst canClose$ = isObservable(canClose) ? canClose : of(canClose);\n\t\tcanClose$.pipe(take(1)).subscribe((close) => {\n\t\t\tif (close) {\n\t\t\t\tthis.cdkRef.close(DISMISSED_VALUE);\n\t\t\t}\n\t\t});\n\t}\n\n\tclose(res: LuDialogResult<C>): void {\n\t\tthis.cdkRef.close(res);\n\t}\n}\n\nexport type LuDialogSelfRef<R> = { dismiss(): void; close(res: R): void };\n","import { AutoFocusTarget, DialogConfig } from '@angular/cdk/dialog';\nimport { ComponentType } from '@angular/cdk/overlay';\nimport { TemplateRef } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nconst ɵdialogData = Symbol.for('luDialogData');\nconst ɵdialogResult = Symbol.for('luDialogResult');\n\nexport type ɵDialogDataFlag = { [ɵdialogData]: unknown };\nexport type ɵDialogResultFlag<R> = { [ɵdialogResult]: R };\n\nexport type LuDialogData<T> = {\n\t[K in keyof T]: T[K] extends ɵDialogDataFlag ? Omit<T[K], typeof ɵdialogData> : never;\n}[keyof T];\n\ntype DialogRefProps<C> = { [K in keyof C]: C[K] extends ɵDialogResultFlag<unknown> ? K : never }[keyof C] & keyof C;\nexport type LuDialogResult<C> = DialogRefProps<C> extends never ? void : C[DialogRefProps<C>] extends ɵDialogResultFlag<infer T> ? T : void;\n\ninterface BaseLuDialogConfig<C> {\n\t/**\n\t * The component or template to put inside the dialog container\n\t */\n\tcontent: ComponentType<C> | TemplateRef<C>;\n\n\t/**\n\t * Data to pass to the component, will be required if the component used `injectDialogData` in a field, specifying the data that's needed.\n\t */\n\tdata: LuDialogData<C>;\n\n\t/**\n\t * Should we put a backdrop? Defaults to true\n\t */\n\tmodal?: boolean;\n\n\t/**\n\t * Is this dialog a blocking popup that cannot be dismissed ?\n\t *\n\t * Defaults to false, setting this to true will also remove the close button in the header\n\t * if you're using `lu-dialog-header`.\n\t */\n\talert?: boolean;\n\n\t/**\n\t * Can be used if you don't have a header or aren't using the default one, to set an aria-label\n\t * instead of aria-labelledby on the dialog container\n\t */\n\tariaLabel?: string;\n\n\t/**\n\t * Autofocus target\n\t *\n\t * Defaults to the close button from the header, first-input is added by us to focus the first available input\n\t * or the first input that is contained inside a node that has the `.luDialog-autofocus` class\n\t */\n\tautoFocus?: AutoFocusTarget | 'first-input' | string;\n\n\t/**\n\t * This provides a way to override any of the configuration parameters expected by cdk's `Dialog.open` method.\n\t *\n\t * WARNING: this will take full authority and override with your values no matter what's computed by LuDialogService,\n\t * use with caution.\n\t */\n\tcdkConfigOverride?: DialogConfig<C>;\n\n\t/**\n\t * A hook function to determine if the current dialog can be closed or not, if provided.\n\t *\n\t * @param comp the instance of the component that's inside the dialog box.\n\t */\n\tcanClose?: (comp: C) => boolean | Observable<boolean>;\n\n\t/**\n\t * Determine if the current dialog can be close by a click on backdrop or escape key\n\t */\n\tcanCloseWithBackdrop?: boolean;\n\n\t/**\n\t * The size of the panel used for the dialog\n\t */\n\tsize?: 'XS' | 'S' | 'M' | 'L' | 'XL' | 'fitContent' | `maxContent` | 'fullScreen';\n\n\t/**\n\t * Should it be a modal (default), a drawer? a drawer from bottom?\n\t */\n\tmode?: 'default' | 'drawer' | 'drawer-from-bottom';\n\n\t/**\n\t * Classes to add to the panel\n\t */\n\tpanelClasses?: string[];\n}\n\nexport type LuDialogConfig<T> = LuDialogData<T> extends never ? Omit<BaseLuDialogConfig<T>, 'data'> : BaseLuDialogConfig<T>;\n","import { LuDialogRef, LuDialogSelfRef } from './dialog-ref';\nimport { ɵDialogDataFlag, ɵDialogResultFlag } from './dialog-config';\nimport { inject } from '@angular/core';\nimport { DIALOG_DATA } from '@angular/cdk/dialog';\n\nexport function injectDialogData<TData>(): TData & ɵDialogDataFlag {\n\treturn inject<TData & ɵDialogDataFlag>(DIALOG_DATA);\n}\n\nexport function injectDialogRef<R = void>(): LuDialogSelfRef<R> & ɵDialogResultFlag<R> {\n\treturn inject<LuDialogSelfRef<R>>(LuDialogRef) as LuDialogSelfRef<R> & ɵDialogResultFlag<R>;\n}\n","export const Translations = {\n\ten: {\n\t\tclose: 'Close',\n\t},\n\tde: {\n\t\tclose: 'Schließen',\n\t},\n\tfr: {\n\t\tclose: 'Fermer',\n\t},\n\tit: {\n\t\tclose: 'Chiudere',\n\t},\n\tnl: {\n\t\tclose: 'Sluiten',\n\t},\n\t'nl-BE': {\n\t\tclose: 'Sluiten',\n\t},\n\tes: {\n\t\tclose: 'Cerrar',\n\t},\n\tpt: {\n\t\tclose: 'Fechar',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_DIALOG_HEADER_TRANSLATIONS = new InjectionToken('LuDialogHeaderTranslations', {\n\tfactory: () => luDialogHeaderTranslations,\n});\n\nexport interface LuDialogHeaderTranslations {\n\tclose: string;\n}\n\nexport const luDialogHeaderTranslations: LuTranslation<LuDialogHeaderTranslations> = Translations;\n","import { CdkDialogContainer } from '@angular/cdk/dialog';\nimport { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ElementRef, inject, OnInit, Renderer2, ViewEncapsulation } from '@angular/core';\nimport { ButtonComponent } from '@lucca-front/ng/button';\nimport { getIntl } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { LuDialogRef } from '../model';\nimport { LU_DIALOG_HEADER_TRANSLATIONS } from './dialog-header.translate';\n\nlet nextId = 0;\n\n@Component({\n\tselector: 'lu-dialog-header',\n\tstandalone: true,\n\timports: [IconComponent, ButtonComponent, NgIf],\n\ttemplateUrl: './dialog-header.component.html',\n\tstyleUrl: './dialog-header.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'dialog-inside-header',\n\t},\n})\nexport class DialogHeaderComponent implements OnInit {\n\t#ref = inject(LuDialogRef);\n\n\tintl = getIntl(LU_DIALOG_HEADER_TRANSLATIONS);\n\n\tdismissible = !this.#ref.config.alert;\n\n\t#elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\t#renderer = inject(Renderer2);\n\n\tclose(): void {\n\t\tthis.#ref.dismiss();\n\t}\n\n\tngOnInit(): void {\n\t\t// Using setTimeout here to make sure this will be handled in the next Cd cycle, not the current one.\n\t\tsetTimeout(() => {\n\t\t\tconst header = this.#elementRef.nativeElement.querySelector('h1');\n\t\t\tconst id = header?.id || `lu-dialog-header-${nextId++}`;\n\t\t\tif (header) {\n\t\t\t\tthis.#renderer.setAttribute(header, 'id', id);\n\t\t\t\tthis.#renderer.addClass(header, 'dialog-inside-header-container-title');\n\t\t\t}\n\t\t\t(this.#ref.cdkRef.containerInstance as CdkDialogContainer)?._addAriaLabelledBy(id);\n\t\t});\n\t}\n}\n","<button class=\"dialog-inside-header-button button\" type=\"button\" (click)=\"close()\" *ngIf=\"dismissible\">\n\t<lu-icon icon=\"signClose\" [alt]=\"intl.close\"></lu-icon>\n</button>\n\n<div class=\"dialog-inside-header-container\">\n\t<ng-content></ng-content>\n</div>\n","import { Dialog, DialogRef } from '@angular/cdk/dialog';\nimport { inject, Injectable, Injector, Renderer2 } from '@angular/core';\nimport { isObservable, merge, of, take } from 'rxjs';\nimport { filter, switchMap, takeUntil } from 'rxjs/operators';\nimport { LuDialogConfig, LuDialogRef, LuDialogResult } from './model';\nimport { DISMISSED_VALUE } from './model/dialog-ref';\n\n@Injectable()\nexport class LuDialogService {\n\t#cdkDialog = inject(Dialog);\n\n\t#injector = inject(Injector);\n\n\topen<C>(config: LuDialogConfig<C>): LuDialogRef<C> {\n\t\tlet luDialogRef: LuDialogRef<C>;\n\t\tlet modeClasses: string[] = [];\n\t\tswitch (config.mode) {\n\t\t\tcase 'drawer':\n\t\t\t\tmodeClasses = ['mod-drawer'];\n\t\t\t\tbreak;\n\t\t\tcase 'drawer-from-bottom':\n\t\t\t\tmodeClasses = ['mod-drawer', 'mod-fromBottom'];\n\t\t\t\tbreak;\n\t\t}\n\t\tconst cdkRef = this.#cdkDialog.open(config.content, {\n\t\t\tariaModal: config.modal ?? true,\n\t\t\thasBackdrop: config.modal ?? true,\n\t\t\tdata: 'data' in config ? config.data : null,\n\t\t\tdisableClose: true,\n\t\t\tcloseOnDestroy: true,\n\t\t\trole: config.alert ? 'alertdialog' : 'dialog',\n\t\t\trestoreFocus: true,\n\t\t\tbackdropClass: 'dialog_backdrop',\n\t\t\tpanelClass: ['dialog', `mod-${config.size || 'M'}`, ...modeClasses, ...(config.panelClasses || [])],\n\t\t\tariaLabel: config.ariaLabel,\n\t\t\t// If focus is first-input, focus dialog and let the component do the rest\n\t\t\t// Else, just set it to config value or default to first-tabbable\n\t\t\tautoFocus: config.autoFocus === 'first-input' ? 'dialog' : (config.autoFocus ?? 'first-tabbable'),\n\t\t\ttemplateContext: () => ({ dialogRef: luDialogRef }),\n\t\t\tinjector: this.#injector,\n\t\t\tproviders: (ref: DialogRef<LuDialogResult<C>, C>) => {\n\t\t\t\tluDialogRef = new LuDialogRef(ref, config);\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\tprovide: LuDialogRef,\n\t\t\t\t\t\tuseValue: luDialogRef,\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t},\n\t\t\t...(config.cdkConfigOverride || {}),\n\t\t});\n\n\t\tif (cdkRef.componentRef) {\n\t\t\tconst renderer = cdkRef.componentRef.injector.get(Renderer2);\n\t\t\trenderer.setStyle(cdkRef.componentRef.location.nativeElement, 'display', 'contents');\n\t\t}\n\n\t\tif (!config.alert) {\n\t\t\t// Setup close listeners on backdrop click and escape key by ourselves so we can hook the `canClose` method to it.\n\t\t\tmerge(cdkRef.backdropClick, cdkRef.keydownEvents.pipe(filter((e) => e.key === 'Escape' && !e.defaultPrevented)))\n\t\t\t\t.pipe(\n\t\t\t\t\tfilter(() => config.canCloseWithBackdrop ?? true),\n\t\t\t\t\tswitchMap(() => {\n\t\t\t\t\t\tconst canClose = config.canClose?.(cdkRef.componentInstance) ?? true;\n\t\t\t\t\t\tconst canClose$ = isObservable(canClose) ? canClose : of(canClose);\n\t\t\t\t\t\treturn canClose$.pipe(take(1));\n\t\t\t\t\t}),\n\t\t\t\t\ttakeUntil(luDialogRef.closed$),\n\t\t\t\t)\n\t\t\t\t.subscribe((canClose) => {\n\t\t\t\t\tif (canClose) {\n\t\t\t\t\t\tcdkRef.close(DISMISSED_VALUE);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}\n\t\treturn luDialogRef;\n\t}\n}\n","import { EnvironmentProviders, importProvidersFrom, makeEnvironmentProviders, Provider } from '@angular/core';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { LuDialogService } from './dialog.service';\n\nexport function configureLuDialog(): EnvironmentProviders {\n\treturn makeEnvironmentProviders([importProvidersFrom(DialogModule)]);\n}\n\nexport function provideLuDialog(): Provider {\n\treturn LuDialogService;\n}\n","import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, inject, ViewEncapsulation } from '@angular/core';\nimport { LuDialogRef } from '../model';\n\n@Component({\n\tselector: 'lu-dialog',\n\tstandalone: true,\n\ttemplate: '<ng-content></ng-content>',\n\tstyleUrl: './dialog.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n\thost: {\n\t\tclass: 'dialog-inside',\n\t},\n})\nexport class DialogComponent implements AfterViewInit {\n\tpublic readonly dialogRef = inject<LuDialogRef>(LuDialogRef);\n\n\t#htmlElement = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n\tclose(): void {\n\t\tthis.dialogRef.close();\n\t}\n\n\tdismiss(): void {\n\t\tthis.dialogRef.dismiss();\n\t}\n\n\tngAfterViewInit(): void {\n\t\tif (this.dialogRef.config.autoFocus === 'first-input' && !this.dialogRef.config.cdkConfigOverride?.autoFocus) {\n\t\t\tconst focusable: HTMLElement =\n\t\t\t\tthis.#htmlElement.querySelector('.luDialog-autofocus .luNativeInput') || this.#htmlElement.querySelector('.luDialog-autofocus') || this.#htmlElement.querySelector('.luNativeInput');\n\t\t\tfocusable?.focus();\n\t\t}\n\t}\n}\n","import { Directive, HostListener, inject } from '@angular/core';\nimport { LuDialogRef } from '../model';\n\n@Directive({\n\tselector: '[luDialogClose]',\n\tstandalone: true,\n})\nexport class DialogCloseDirective {\n\t#ref = inject<LuDialogRef>(LuDialogRef);\n\n\t@HostListener('click')\n\tclose(): void {\n\t\tthis.#ref.close();\n\t}\n}\n","import { Directive, HostListener, inject } from '@angular/core';\nimport { LuDialogRef } from '../model';\n\n@Directive({\n\tselector: '[luDialogDismiss]',\n\tstandalone: true,\n})\nexport class DialogDismissDirective {\n\t#ref = inject<LuDialogRef>(LuDialogRef);\n\n\t@HostListener('click')\n\tclose(): void {\n\t\tthis.#ref.dismiss();\n\t}\n}\n","import { Directive, HostListener, inject, Input, TemplateRef } from '@angular/core';\nimport { LuDialogService } from '../dialog.service';\nimport { LuDialogConfig } from '../model';\nimport { provideLuDialog } from '../dialog.providers';\n\n@Directive({\n\tselector: '[luDialogOpen]',\n\tstandalone: true,\n\tproviders: [provideLuDialog()],\n})\nexport class DialogOpenDirective {\n\t#dialogService = inject(LuDialogService);\n\n\t@Input({\n\t\trequired: true,\n\t\talias: 'luDialogOpen',\n\t})\n\tdialog: TemplateRef<void>;\n\n\t@Input()\n\tluDialogConfig: LuDialogConfig<unknown>;\n\n\t@HostListener('click')\n\tclick(): void {\n\t\tthis.#dialogService.open({\n\t\t\t...this.luDialogConfig,\n\t\t\tcontent: this.dialog,\n\t\t});\n\t}\n}\n","import { ComponentType } from '@angular/cdk/portal';\nimport { InjectionToken } from '@angular/core';\nimport { Route } from '@angular/router';\nimport { Observable, firstValueFrom, isObservable } from 'rxjs';\nimport { LuDialogConfig, LuDialogData } from '../model';\nimport { DialogRoutingComponent } from './dialog-routing.component';\nimport { DialogRouteConfig } from './dialog-routing.models';\n\nexport type Deferrable<T> = Promise<T> | Observable<T> | T;\n\nexport async function deferrableToPromise<T>(deferrable: Promise<T> | Observable<T> | T): Promise<T> {\n\treturn isObservable(deferrable) ? firstValueFrom(deferrable) : deferrable;\n}\n\nexport const DIALOG_ROUTE_CONFIG = new InjectionToken<DialogRouteConfig<unknown>>('DIALOG_ROUTE_CONFIG');\n\nexport function createDialogRoute<C>(config: DialogRouteConfig<C>): Route {\n\treturn {\n\t\t...config,\n\t\tcomponent: DialogRoutingComponent,\n\t\tproviders: [{ provide: DIALOG_ROUTE_CONFIG, useValue: config }, ...[config.providers ?? []]],\n\t};\n}\n\nexport type DialogFactoryResultOptions<C> = { path: string; dialogRouteConfig?: Partial<Omit<DialogRouteConfig<C>, 'path'>> } & (LuDialogData<C> extends never\n\t? { dataFactory?: never }\n\t: {\n\t\t\tdataFactory: () => Deferrable<LuDialogData<C>>;\n\t\t});\n\nexport type DialogFactoryResult<C> = (options: DialogFactoryResultOptions<C>) => Route;\n\nexport type DialogFactoryConfig<C> = Partial<{\n\tdialogConfig: Omit<LuDialogConfig<C>, 'data' | 'content'>;\n\tdialogRouteConfig: Partial<DialogRouteConfig<C>>;\n}>;\n\nexport function dialogRouteFactory<C>(component: ComponentType<C>, config?: DialogFactoryConfig<C>): DialogFactoryResult<C> {\n\treturn ({ path, dataFactory, dialogRouteConfig }) =>\n\t\tcreateDialogRoute({\n\t\t\tpath,\n\t\t\tdialogConfigFactory: async () => ({\n\t\t\t\t...config?.dialogConfig,\n\t\t\t\tcontent: component,\n\t\t\t\tdata: dataFactory ? await deferrableToPromise(dataFactory()) : undefined,\n\t\t\t}),\n\t\t\t...mergeRouteConfig(config?.dialogRouteConfig, dialogRouteConfig),\n\t\t});\n}\n\nfunction mergeRouteConfig(config1: Partial<Route>, config2: Partial<Route>): Partial<Route> {\n\tif (!config1) {\n\t\treturn config2;\n\t}\n\n\tif (!config2) {\n\t\treturn config1;\n\t}\n\n\tconst result: Partial<Route> = { ...config1, ...config2 };\n\n\t// If both configs have the same key, we merge the arrays\n\tconst mergedArrays = (['providers', 'canActivate', 'children', 'canDeactivate', 'canLoad', 'canActivateChild'] as const satisfies Array<keyof Route>).filter(\n\t\t(key) => key in config1 && key in config2,\n\t);\n\n\tfor (const key of mergedArrays) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n\t\tresult[key] = [...(config1[key] ?? []), ...(config2[key] ?? [])];\n\t}\n\n\t// If both configs have the same data key, we merge the objects\n\tif (config1.data && config2.data) {\n\t\tresult.data = { ...config1.data, ...config2.data };\n\t}\n\n\treturn result;\n}\n","import { DIALOG_DATA } from '@angular/cdk/dialog';\nimport { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, DestroyRef, inject, Injector, OnInit, runInInjectionContext, TemplateRef, viewChild } from '@angular/core';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { from } from 'rxjs';\nimport { provideLuDialog } from '../dialog.providers';\nimport { LuDialogService } from '../dialog.service';\nimport { LuDialogRef } from '../model';\nimport { DialogRouteConfig } from './dialog-routing.models';\nimport { deferrableToPromise, DIALOG_ROUTE_CONFIG } from './dialog-routing.utils';\n\nexport const defaultOnClosedFn = <C>(router = inject(Router), route = inject(ActivatedRoute), config = inject<DialogRouteConfig<C>>(DIALOG_ROUTE_CONFIG)): void =>\n\tvoid router.navigate(\n\t\t[\n\t\t\tconfig.path\n\t\t\t\t.split('/')\n\t\t\t\t.map(() => '..')\n\t\t\t\t.join('/'),\n\t\t],\n\t\t{\n\t\t\trelativeTo: route,\n\t\t\tqueryParamsHandling: 'preserve',\n\t\t},\n\t);\n\n@Component({\n\tselector: 'lu-dialog-routing',\n\ttemplate: `\n\t\t<ng-template>\n\t\t\t@if (dialogComponentContent(); as componentType) {\n\t\t\t\t<ng-container [ngComponentOutlet]=\"componentType\" [ngComponentOutletInjector]=\"customInjector\" />\n\t\t\t}\n\t\t\t@if (dialogTemplateContent(); as templateRef) {\n\t\t\t\t<ng-container [ngTemplateOutlet]=\"templateRef\" [ngTemplateOutletInjector]=\"customInjector\" />\n\t\t\t}\n\t\t</ng-template>\n\t`,\n\tstandalone: true,\n\timports: [NgComponentOutlet, NgTemplateOutlet],\n\tstyles: [\n\t\t`\n\t\t\t:host {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t`,\n\t],\n\tproviders: [provideLuDialog()],\n})\nexport class DialogRoutingComponent<C> implements OnInit {\n\treadonly #destroyRef = inject(DestroyRef);\n\treadonly #dialog = inject(LuDialogService);\n\treadonly injector = inject(Injector);\n\treadonly #config = inject<DialogRouteConfig<C>>(DIALOG_ROUTE_CONFIG);\n\treadonly #dialogConfig = deferrableToPromise(this.#config.dialogConfigFactory());\n\n\treadonly dialogConfig = toSignal(from(this.#dialogConfig), {\n\t\tinitialValue: null,\n\t});\n\treadonly dialogTemplateContent = computed(() => {\n\t\tconst config = this.dialogConfig();\n\t\treturn config && config.content instanceof TemplateRef ? config.content : null;\n\t});\n\treadonly dialogComponentContent = computed(() => {\n\t\tconst config = this.dialogConfig();\n\t\treturn config && !(config.content instanceof TemplateRef) ? config.content : null;\n\t});\n\n\tprotected readonly dialogTemplate = viewChild.required(TemplateRef);\n\n\treadonly customInjector = Injector.create({\n\t\tparent: this.injector,\n\t\tproviders: [\n\t\t\t{\n\t\t\t\tprovide: DIALOG_DATA,\n\t\t\t\tuseFactory: () => {\n\t\t\t\t\tconst config = this.dialogConfig();\n\t\t\t\t\treturn config && 'data' in config ? config.data : null;\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tprovide: LuDialogRef,\n\t\t\t\tuseFactory: () => this.#ref,\n\t\t\t},\n\t\t],\n\t});\n\n\t#ref?: LuDialogRef<C>;\n\n\tngOnInit(): void {\n\t\tvoid this.#openDialog();\n\t}\n\n\tasync #openDialog(): Promise<void> {\n\t\tconst dialogConfig = await this.#dialogConfig;\n\t\tthis.#ref = this.#dialog.open<C>({\n\t\t\t...dialogConfig,\n\t\t\tcontent: this.dialogTemplate(),\n\t\t});\n\t\tthis.#ref.result$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((result) =>\n\t\t\trunInInjectionContext(this.injector, () => {\n\t\t\t\tif (this.#config.onClosed) {\n\t\t\t\t\tthis.#config.onClosed(result);\n\t\t\t\t} else {\n\t\t\t\t\tdefaultOnClosedFn();\n\t\t\t\t}\n\t\t\t}),\n\t\t);\n\n\t\tthis.#ref.dismissed$\n\t\t\t.pipe(takeUntilDestroyed(this.#destroyRef))\n\t\t\t.subscribe(() => runInInjectionContext(this.injector, () => (this.#config.onDismissed ? this.#config.onDismissed() : defaultOnClosedFn())));\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './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CAAA,uBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,iBAAiB,oPAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAUjC,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAvBlC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EACnB,QAAA,EAAA;;;;;;;;;EAST,EACW,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,EAQnC,SAAA,EAAA,CAAC,eAAe,EAAE,CAAC,EAAA,MAAA,EAAA,CAAA,uBAAA,CAAA,EAAA;;;AC/C/B;;AAEG;;;;"}
|
|
@@ -9,7 +9,7 @@ import { InlineMessageComponent } from '@lucca-front/ng/inline-message';
|
|
|
9
9
|
import * as i1 from '@lucca-front/ng/tooltip';
|
|
10
10
|
import { LuTooltipModule } from '@lucca-front/ng/tooltip';
|
|
11
11
|
import { switchMap, merge, BehaviorSubject } from 'rxjs';
|
|
12
|
-
import { map } from 'rxjs/operators';
|
|
12
|
+
import { startWith, map } from 'rxjs/operators';
|
|
13
13
|
|
|
14
14
|
const FORM_FIELD_INSTANCE = new InjectionToken('FORM_FIELD_INSTANCE');
|
|
15
15
|
|
|
@@ -80,7 +80,12 @@ class FormFieldComponent {
|
|
|
80
80
|
this.ignoredControls = computed(() => new Set(this.formFieldChildren().flatMap((f) => f.ngControls())));
|
|
81
81
|
this.ownRequiredValidators = computed(() => this.requiredValidators().filter((c) => !this.ignoredRequiredValidators().has(c)));
|
|
82
82
|
this.ownControls = computed(() => this.ngControls().filter((c) => !this.ignoredControls().has(c)));
|
|
83
|
-
this.refreshedOwnControls = toSignal(toObservable(this.ownControls).pipe(switchMap((controls) =>
|
|
83
|
+
this.refreshedOwnControls = toSignal(toObservable(this.ownControls).pipe(switchMap((controls) => {
|
|
84
|
+
return merge(...controls.map((c) => c.control.events)).pipe(
|
|
85
|
+
// We need to use startWith here so the observable will also emit when new controls are added on the fly,
|
|
86
|
+
// before they even emit any control-related event
|
|
87
|
+
startWith(void 0), map(() => [...controls]));
|
|
88
|
+
})), {
|
|
84
89
|
initialValue: [],
|
|
85
90
|
});
|
|
86
91
|
this.isInputRequired = computed(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-form-field.mjs","sources":["../../../packages/ng/form-field/form-field.token.ts","../../../packages/ng/form-field/translations.ts","../../../packages/ng/form-field/form-field.translate.ts","../../../packages/ng/form-field/form-field.component.ts","../../../packages/ng/form-field/form-field.component.html","../../../packages/ng/form-field/input.directive.ts","../../../packages/ng/form-field/lucca-front-ng-form-field.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { FormFieldComponent } from './form-field.component';\n\nexport const FORM_FIELD_INSTANCE = new InjectionToken<FormFieldComponent>('FORM_FIELD_INSTANCE');\n","export const Translations = {\n\ten: {\n\t\tcounter: 'Your message is {{current}} characters long. A maximum of {{max}} characters is allowed.',\n\t},\n\tde: {\n\t\tcounter: 'Ihr Beitrag ist {{current}} Zeichen lang. Maximal sind {{max}} Zeichen erlaubt.',\n\t},\n\tfr: {\n\t\tcounter: 'Votre publication fait {{current}} caractères de long. {{max}} caractères maximum sont autorisés.',\n\t},\n\tit: {\n\t\tcounter: 'La tua pubblicazione è lunga {{current}} caratteri. È consentito un numero di massimo {{max}} caratteri.',\n\t},\n\tnl: {\n\t\tcounter: 'Uw publicatie is {{current}} tekens lang. {{max}} tekens maximaal toegestaan.',\n\t},\n\t'nl-BE': {\n\t\tcounter: 'Uw publicatie is {{current}} tekens lang. {{max}} tekens maximaal toegestaan.',\n\t},\n\tes: {\n\t\tcounter: 'Su publicación tiene {{current}} caracteres. Se permite un máximo de {{max}} caracteres.',\n\t},\n\tpt: {\n\t\tcounter: '{{current}} {{max}} A sua publicação tem um comprimento de caracteres, sendo permitido um máximo de caracteres.',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_FORM_FIELD_TRANSLATIONS = new InjectionToken('LuFormFieldTranslations', {\n\tfactory: () => luFormFieldTranslations,\n});\n\nexport interface LuFormFieldTranslations {\n\tcounter: string;\n}\n\nexport const luFormFieldTranslations: LuTranslation<LuFormFieldTranslations> = Translations;\n","import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, Component, computed, contentChildren, effect, forwardRef, inject, input, model, OnDestroy, Renderer2, signal, ViewEncapsulation } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { AbstractControl, NgControl, ReactiveFormsModule, RequiredValidator, Validators } from '@angular/forms';\nimport { SafeHtml } from '@angular/platform-browser';\nimport { getIntl, IntlParamsPipe, LuClass, PortalContent, PortalDirective, ɵeffectWithDeps } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { InlineMessageComponent, InlineMessageState } from '@lucca-front/ng/inline-message';\nimport { LuTooltipModule } from '@lucca-front/ng/tooltip';\nimport { BehaviorSubject, merge, switchMap } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { FormFieldSize } from './form-field-size';\nimport { FORM_FIELD_INSTANCE } from './form-field.token';\nimport { LU_FORM_FIELD_TRANSLATIONS } from './form-field.translate';\nimport { InputDirective } from './input.directive';\n\nlet nextId = 0;\n\n@Component({\n\tselector: 'lu-form-field',\n\tstandalone: true,\n\timports: [NgIf, NgTemplateOutlet, InlineMessageComponent, LuTooltipModule, ReactiveFormsModule, IconComponent, IntlParamsPipe, PortalDirective],\n\ttemplateUrl: './form-field.component.html',\n\tstyleUrls: ['./form-field.component.scss'],\n\tproviders: [\n\t\tLuClass,\n\t\t{\n\t\t\tprovide: FORM_FIELD_INSTANCE,\n\t\t\tuseExisting: forwardRef(() => FormFieldComponent),\n\t\t},\n\t],\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class FormFieldComponent implements OnDestroy {\n\tintl = getIntl(LU_FORM_FIELD_TRANSLATIONS);\n\n\t#luClass = inject(LuClass);\n\n\t#renderer = inject(Renderer2);\n\n\tformFieldChildren = contentChildren(FormFieldComponent, { descendants: true });\n\n\trequiredValidators = contentChildren(RequiredValidator, { descendants: true });\n\tngControls = contentChildren(NgControl, { descendants: true });\n\n\tignoredRequiredValidators = computed(() => new Set(this.formFieldChildren().flatMap((f: FormFieldComponent) => f.requiredValidators())));\n\tignoredControls = computed(() => new Set(this.formFieldChildren().flatMap((f: FormFieldComponent) => f.ngControls())));\n\n\townRequiredValidators = computed(() => this.requiredValidators().filter((c) => !this.ignoredRequiredValidators().has(c)));\n\townControls = computed(() => this.ngControls().filter((c) => !this.ignoredControls().has(c)));\n\n\trefreshedOwnControls = toSignal(toObservable(this.ownControls).pipe(switchMap((controls) => merge(...controls.map((c) => c.control.events)).pipe(map(() => [...controls])))), {\n\t\tinitialValue: [],\n\t});\n\n\tisInputRequired = computed(() => {\n\t\tconst hasRequiredFormControl = this.refreshedOwnControls().some((c) => c.control.hasValidator(Validators.required));\n\t\tconst hasRequiredNgModel = this.ownRequiredValidators().some((c) => booleanAttribute(c.required));\n\t\treturn hasRequiredNgModel || hasRequiredFormControl;\n\t});\n\n\tlabel = input.required<PortalContent>();\n\n\t/**\n\t * Hide field label, while keeping it in DOM for screen readers\n\t */\n\thiddenLabel = input(false, { transform: booleanAttribute });\n\n\trolePresentationLabel = model(false);\n\n\tinline = input(false, { transform: booleanAttribute });\n\n\tstatusControl = input<AbstractControl | null>(null);\n\n\ttooltip = input<string | SafeHtml | null>(null);\n\n\tinvalidStatus = computed(() => {\n\t\tconst isInvalidOverride = this.invalid() !== undefined && this.invalid() !== null;\n\t\tif (isInvalidOverride) {\n\t\t\treturn isInvalidOverride;\n\t\t}\n\t\tconst statusControlOverride = this.statusControl();\n\t\tif (statusControlOverride) {\n\t\t\treturn statusControlOverride.invalid && this.refreshedOwnControls().some((c) => c.touched);\n\t\t}\n\t\treturn this.refreshedOwnControls().some((c) => c.invalid && c.touched);\n\t});\n\n\tinvalid = input<boolean | null, boolean>(null, { transform: booleanAttribute });\n\n\tinlineMessage = input<PortalContent | null>(null);\n\n\t/**\n\t * Inline message for when the control is in error state\n\t */\n\terrorInlineMessage = input<PortalContent | null>(null);\n\n\t/**\n\t * State of the inline message, will be ignored if form state is invalid\n\t */\n\tinlineMessageState = input<InlineMessageState | null>(null);\n\n\tsize = input<FormFieldSize | null>(null);\n\n\tlayout = model<'default' | 'checkable' | 'fieldset'>('default');\n\n\thasArrow = false;\n\n\t#inputs: InputDirective[] = [];\n\n\t/**\n\t * Max amount of characters allowed, defaults to 0, which means hidden, no maximum\n\t */\n\tcounter = input<number>(0);\n\n\tget contentLength(): number {\n\t\treturn (this.#inputs[0]?.host?.nativeElement as HTMLInputElement)?.value.length || 0;\n\t}\n\n\tpublic addInput(input: InputDirective) {\n\t\tthis.#inputs.push(input);\n\t\t/* We have to put this in the next cycle to make sure it'll be applied properly\n\t\t * and that it won't trigger a change detection error\n\t\t */\n\t\tsetTimeout(() => {\n\t\t\tthis.prepareInput();\n\t\t});\n\t}\n\n\tpublic get inputs(): InputDirective[] {\n\t\treturn this.#inputs;\n\t}\n\n\tid = signal<string>('');\n\n\tready$ = new BehaviorSubject<boolean>(false);\n\n\tpublic get ready(): boolean {\n\t\treturn this.ready$.value;\n\t}\n\n\t#ariaLabelledBy: string[] = [];\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.isInputRequired, this.invalidStatus], () => {\n\t\t\tthis.updateAria();\n\t\t});\n\n\t\teffect(() => {\n\t\t\tthis.#luClass.setState({\n\t\t\t\t[`mod-${this.size()}`]: !!this.size(),\n\t\t\t\t'mod-checkable': this.layout() === 'checkable',\n\t\t\t\t'form-field': this.layout() !== 'fieldset',\n\t\t\t});\n\t\t});\n\t}\n\n\taddLabelledBy(id: string, prepend = false): void {\n\t\tif (prepend) {\n\t\t\tthis.#ariaLabelledBy = [id, ...this.#ariaLabelledBy];\n\t\t} else {\n\t\t\tthis.#ariaLabelledBy = [...this.#ariaLabelledBy, id];\n\t\t}\n\t\tthis.#inputs.forEach((input) => {\n\t\t\tif (!input.standalone) {\n\t\t\t\tthis.#renderer.setAttribute(input.host.nativeElement, 'aria-labelledby', this.#ariaLabelledBy.join(' '));\n\t\t\t}\n\t\t});\n\t}\n\n\tremoveLabelledBy(id: string): void {\n\t\tthis.#ariaLabelledBy = this.#ariaLabelledBy.filter((labelledBy) => labelledBy === id);\n\t}\n\n\tprepareInput(): void {\n\t\tif (this.#inputs.length === 0) {\n\t\t\tthrow new Error('Missing input for form field, make sure to set `luInput` to your input inside lu-form-field');\n\t\t}\n\t\tthis.inputs\n\t\t\t.filter((input) => !input.standalone)\n\t\t\t.forEach((input) => {\n\t\t\t\tconst inputId = `${input.host.nativeElement.tagName.toLowerCase()}-${++nextId}`;\n\t\t\t\tthis.#renderer.setAttribute(input.host.nativeElement, 'id', inputId);\n\t\t\t});\n\t\t// We're using the id from the first input available\n\t\tthis.id.set(this.#inputs[0].host.nativeElement.id);\n\t\tthis.updateAria();\n\t\tthis.ready$.next(true);\n\t}\n\n\tprivate updateAria(): void {\n\t\tthis.#inputs.forEach((input) => {\n\t\t\tthis.#renderer.setAttribute(input.host.nativeElement, 'aria-invalid', this.invalidStatus()?.toString());\n\t\t\tthis.#renderer.setAttribute(input.host.nativeElement, 'aria-required', this.isInputRequired()?.toString());\n\t\t\tif (!input.standalone) {\n\t\t\t\tthis.#renderer.setAttribute(input.host.nativeElement, 'aria-describedby', `${input.host.nativeElement.id}-message`);\n\t\t\t}\n\t\t});\n\t\tif (this.id() && !this.#ariaLabelledBy.includes(`${this.id()}-label`)) {\n\t\t\tthis.addLabelledBy(`${this.id()}-label`);\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.ready$.complete();\n\t}\n}\n","@if (layout() === 'fieldset') {\n<fieldset class=\"form-fieldset\" [class.mod-inline]=\"inline() || hasArrow\" [class.mod-S]=\"size() === 'S'\">\n\t<legend class=\"formLabel\" [class.u-mask]=\"hiddenLabel()\" attr.aria-hidden=\"{{hiddenLabel()}}\">\n\t\t<ng-container *luPortal=\"label()\"></ng-container\n\t\t><!--\n\t--><sup class=\"formLabel-required\" aria-hidden=\"true\" *ngIf=\"isInputRequired()\">*</sup>\n\t\t@if (tooltip()) {\n\t\t<lu-icon\n\t\t\tclass=\"formLabel-info\"\n\t\t\ticon=\"signHelp\"\n\t\t\t[alt]=\"'?'\"\n\t\t\t[luTooltip]=\"tooltip()\"\n\t\t\t[color]=\"invalidStatus() ? 'error' : 'inherit'\"\n\t\t></lu-icon>\n\t\t}\n\t</legend>\n\t<ng-container *ngTemplateOutlet=\"projectionTpl\"></ng-container>\n\t@if (inlineMessage() || (invalidStatus() ? errorInlineMessage() : false)) {\n\t<lu-inline-message\n\t\tid=\"{{id()}}-message\"\n\t\t[label]=\"(invalidStatus() && errorInlineMessage()) ? errorInlineMessage() : inlineMessage()\"\n\t\t[state]=\"invalidStatus() ? 'error' : inlineMessageState()\"\n\t></lu-inline-message>\n\t}\n</fieldset>\n} @else {\n<label\n\tclass=\"formLabel\"\n\t[class.is-error]=\"invalidStatus()\"\n\t[class.mod-counter]=\"counter() > 0\"\n\tid=\"{{id()}}-label\"\n\tfor=\"{{id()}}\"\n\t[class.u-mask]=\"hiddenLabel()\"\n\tattr.role=\"{{rolePresentationLabel() ? 'presentation' : null}}\"\n>\n\t<ng-container *luPortal=\"label()\"></ng-container\n\t><!--\n\t--><sup class=\"formLabel-required\" aria-hidden=\"true\" *ngIf=\"isInputRequired()\">*</sup>\n\t@if (tooltip()) {\n\t<lu-icon\n\t\tclass=\"formLabel-info\"\n\t\ticon=\"signHelp\"\n\t\t[alt]=\"'?'\"\n\t\t[luTooltip]=\"tooltip()\"\n\t\t[color]=\"invalidStatus() ? 'error' : 'inherit'\"\n\t></lu-icon>\n\t} @if (counter() > 0) {\n\t<span class=\"formLabel-counter\" [class.u-textError]=\"contentLength > counter()\" id=\"{{id()}}-counter\" aria-live=\"polite\">\n\t\t<span aria-hidden=\"true\">{{ contentLength }}/{{ counter() }}</span>\n\t\t<span class=\"u-mask\">{{ intl.counter | intlParams: { current: contentLength, max: counter() } }}</span>\n\t</span>\n\t}\n</label>\n<ng-container *ngTemplateOutlet=\"projectionTpl\"></ng-container>\n@if (inlineMessage() || (invalidStatus() ? errorInlineMessage() : false)) {\n<lu-inline-message\n\tid=\"{{id()}}-message\"\n\t[label]=\"(invalidStatus() && errorInlineMessage()) ? errorInlineMessage() : inlineMessage()\"\n\t[state]=\"invalidStatus() ? 'error' : inlineMessageState()\"\n></lu-inline-message>\n} }\n\n<ng-template #projectionTpl>\n\t<ng-content></ng-content>\n</ng-template>\n","import { booleanAttribute, Directive, ElementRef, inject, Input, OnInit } from '@angular/core';\nimport { FORM_FIELD_INSTANCE } from './form-field.token';\n\n@Directive({\n\tselector: '[luInput]',\n\tstandalone: true,\n\thost: {\n\t\t// Used to autofocus in dialog boxes, do not change except if you know what you're doing\n\t\tclass: 'luNativeInput',\n\t},\n})\nexport class InputDirective implements OnInit {\n\tpublic readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\tpublic readonly formFieldRef = inject(FORM_FIELD_INSTANCE, { optional: true });\n\n\t/**\n\t * Prevents message and label ids from being propagated, useful if the input holds its own message and label (like for radios)\n\t */\n\t@Input({ transform: booleanAttribute, alias: 'luInputStandalone' })\n\tstandalone = false;\n\n\tngOnInit(): void {\n\t\t// If the field is used as standalone, we won't have the ref provided so it'll crash\n\t\tif (this.formFieldRef) {\n\t\t\tthis.formFieldRef.addInput(this);\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;;;;;;;;;MAGa,mBAAmB,GAAG,IAAI,cAAc,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translations.ts","../../../packages/ng/form-field/form-field.translate.ts","../../../packages/ng/form-field/form-field.component.ts","../../../packages/ng/form-field/form-field.component.html","../../../packages/ng/form-field/input.directive.ts","../../../packages/ng/form-field/lucca-front-ng-form-field.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { FormFieldComponent } from './form-field.component';\n\nexport const FORM_FIELD_INSTANCE = new InjectionToken<FormFieldComponent>('FORM_FIELD_INSTANCE');\n","export const Translations = {\n\ten: {\n\t\tcounter: 'Your message is {{current}} characters long. A maximum of {{max}} characters is allowed.',\n\t},\n\tde: {\n\t\tcounter: 'Ihr Beitrag ist {{current}} Zeichen lang. Maximal sind {{max}} Zeichen erlaubt.',\n\t},\n\tfr: {\n\t\tcounter: 'Votre publication fait {{current}} caractères de long. {{max}} caractères maximum sont autorisés.',\n\t},\n\tit: {\n\t\tcounter: 'La tua pubblicazione è lunga {{current}} caratteri. È consentito un numero di massimo {{max}} caratteri.',\n\t},\n\tnl: {\n\t\tcounter: 'Uw publicatie is {{current}} tekens lang. {{max}} tekens maximaal toegestaan.',\n\t},\n\t'nl-BE': {\n\t\tcounter: 'Uw publicatie is {{current}} tekens lang. {{max}} tekens maximaal toegestaan.',\n\t},\n\tes: {\n\t\tcounter: 'Su publicación tiene {{current}} caracteres. Se permite un máximo de {{max}} caracteres.',\n\t},\n\tpt: {\n\t\tcounter: '{{current}} {{max}} A sua publicação tem um comprimento de caracteres, sendo permitido um máximo de caracteres.',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_FORM_FIELD_TRANSLATIONS = new InjectionToken('LuFormFieldTranslations', {\n\tfactory: () => luFormFieldTranslations,\n});\n\nexport interface LuFormFieldTranslations {\n\tcounter: string;\n}\n\nexport const luFormFieldTranslations: LuTranslation<LuFormFieldTranslations> = Translations;\n","import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, Component, computed, contentChildren, effect, forwardRef, inject, input, model, OnDestroy, Renderer2, signal, ViewEncapsulation } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { AbstractControl, NgControl, ReactiveFormsModule, RequiredValidator, Validators } from '@angular/forms';\nimport { SafeHtml } from '@angular/platform-browser';\nimport { getIntl, IntlParamsPipe, LuClass, PortalContent, PortalDirective, ɵeffectWithDeps } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { InlineMessageComponent, InlineMessageState } from '@lucca-front/ng/inline-message';\nimport { LuTooltipModule } from '@lucca-front/ng/tooltip';\nimport { BehaviorSubject, merge, switchMap } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\nimport { FormFieldSize } from './form-field-size';\nimport { FORM_FIELD_INSTANCE } from './form-field.token';\nimport { LU_FORM_FIELD_TRANSLATIONS } from './form-field.translate';\nimport { InputDirective } from './input.directive';\n\nlet nextId = 0;\n\n@Component({\n\tselector: 'lu-form-field',\n\tstandalone: true,\n\timports: [NgIf, NgTemplateOutlet, InlineMessageComponent, LuTooltipModule, ReactiveFormsModule, IconComponent, IntlParamsPipe, PortalDirective],\n\ttemplateUrl: './form-field.component.html',\n\tstyleUrls: ['./form-field.component.scss'],\n\tproviders: [\n\t\tLuClass,\n\t\t{\n\t\t\tprovide: FORM_FIELD_INSTANCE,\n\t\t\tuseExisting: forwardRef(() => FormFieldComponent),\n\t\t},\n\t],\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class FormFieldComponent implements OnDestroy {\n\tintl = getIntl(LU_FORM_FIELD_TRANSLATIONS);\n\n\t#luClass = inject(LuClass);\n\n\t#renderer = inject(Renderer2);\n\n\tformFieldChildren = contentChildren(FormFieldComponent, { descendants: true });\n\n\trequiredValidators = contentChildren(RequiredValidator, { descendants: true });\n\tngControls = contentChildren(NgControl, { descendants: true });\n\n\tignoredRequiredValidators = computed(() => new Set(this.formFieldChildren().flatMap((f: FormFieldComponent) => f.requiredValidators())));\n\tignoredControls = computed(() => new Set(this.formFieldChildren().flatMap((f: FormFieldComponent) => f.ngControls())));\n\n\townRequiredValidators = computed(() => this.requiredValidators().filter((c) => !this.ignoredRequiredValidators().has(c)));\n\townControls = computed(() => this.ngControls().filter((c) => !this.ignoredControls().has(c)));\n\n\trefreshedOwnControls = toSignal(\n\t\ttoObservable(this.ownControls).pipe(\n\t\t\tswitchMap((controls) => {\n\t\t\t\treturn merge(...controls.map((c) => c.control.events)).pipe(\n\t\t\t\t\t// We need to use startWith here so the observable will also emit when new controls are added on the fly,\n\t\t\t\t\t// before they even emit any control-related event\n\t\t\t\t\tstartWith(void 0),\n\t\t\t\t\tmap(() => [...controls]),\n\t\t\t\t);\n\t\t\t}),\n\t\t),\n\t\t{\n\t\t\tinitialValue: [],\n\t\t},\n\t);\n\n\tisInputRequired = computed(() => {\n\t\tconst hasRequiredFormControl = this.refreshedOwnControls().some((c) => c.control.hasValidator(Validators.required));\n\t\tconst hasRequiredNgModel = this.ownRequiredValidators().some((c) => booleanAttribute(c.required));\n\t\treturn hasRequiredNgModel || hasRequiredFormControl;\n\t});\n\n\tlabel = input.required<PortalContent>();\n\n\t/**\n\t * Hide field label, while keeping it in DOM for screen readers\n\t */\n\thiddenLabel = input(false, { transform: booleanAttribute });\n\n\trolePresentationLabel = model(false);\n\n\tinline = input(false, { transform: booleanAttribute });\n\n\tstatusControl = input<AbstractControl | null>(null);\n\n\ttooltip = input<string | SafeHtml | null>(null);\n\n\tinvalidStatus = computed(() => {\n\t\tconst isInvalidOverride = this.invalid() !== undefined && this.invalid() !== null;\n\t\tif (isInvalidOverride) {\n\t\t\treturn isInvalidOverride;\n\t\t}\n\t\tconst statusControlOverride = this.statusControl();\n\t\tif (statusControlOverride) {\n\t\t\treturn statusControlOverride.invalid && this.refreshedOwnControls().some((c) => c.touched);\n\t\t}\n\t\treturn this.refreshedOwnControls().some((c) => c.invalid && c.touched);\n\t});\n\n\tinvalid = input<boolean | null, boolean>(null, { transform: booleanAttribute });\n\n\tinlineMessage = input<PortalContent | null>(null);\n\n\t/**\n\t * Inline message for when the control is in error state\n\t */\n\terrorInlineMessage = input<PortalContent | null>(null);\n\n\t/**\n\t * State of the inline message, will be ignored if form state is invalid\n\t */\n\tinlineMessageState = input<InlineMessageState | null>(null);\n\n\tsize = input<FormFieldSize | null>(null);\n\n\tlayout = model<'default' | 'checkable' | 'fieldset'>('default');\n\n\thasArrow = false;\n\n\t#inputs: InputDirective[] = [];\n\n\t/**\n\t * Max amount of characters allowed, defaults to 0, which means hidden, no maximum\n\t */\n\tcounter = input<number>(0);\n\n\tget contentLength(): number {\n\t\treturn (this.#inputs[0]?.host?.nativeElement as HTMLInputElement)?.value.length || 0;\n\t}\n\n\tpublic addInput(input: InputDirective) {\n\t\tthis.#inputs.push(input);\n\t\t/* We have to put this in the next cycle to make sure it'll be applied properly\n\t\t * and that it won't trigger a change detection error\n\t\t */\n\t\tsetTimeout(() => {\n\t\t\tthis.prepareInput();\n\t\t});\n\t}\n\n\tpublic get inputs(): InputDirective[] {\n\t\treturn this.#inputs;\n\t}\n\n\tid = signal<string>('');\n\n\tready$ = new BehaviorSubject<boolean>(false);\n\n\tpublic get ready(): boolean {\n\t\treturn this.ready$.value;\n\t}\n\n\t#ariaLabelledBy: string[] = [];\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.isInputRequired, this.invalidStatus], () => {\n\t\t\tthis.updateAria();\n\t\t});\n\n\t\teffect(() => {\n\t\t\tthis.#luClass.setState({\n\t\t\t\t[`mod-${this.size()}`]: !!this.size(),\n\t\t\t\t'mod-checkable': this.layout() === 'checkable',\n\t\t\t\t'form-field': this.layout() !== 'fieldset',\n\t\t\t});\n\t\t});\n\t}\n\n\taddLabelledBy(id: string, prepend = false): void {\n\t\tif (prepend) {\n\t\t\tthis.#ariaLabelledBy = [id, ...this.#ariaLabelledBy];\n\t\t} else {\n\t\t\tthis.#ariaLabelledBy = [...this.#ariaLabelledBy, id];\n\t\t}\n\t\tthis.#inputs.forEach((input) => {\n\t\t\tif (!input.standalone) {\n\t\t\t\tthis.#renderer.setAttribute(input.host.nativeElement, 'aria-labelledby', this.#ariaLabelledBy.join(' '));\n\t\t\t}\n\t\t});\n\t}\n\n\tremoveLabelledBy(id: string): void {\n\t\tthis.#ariaLabelledBy = this.#ariaLabelledBy.filter((labelledBy) => labelledBy === id);\n\t}\n\n\tprepareInput(): void {\n\t\tif (this.#inputs.length === 0) {\n\t\t\tthrow new Error('Missing input for form field, make sure to set `luInput` to your input inside lu-form-field');\n\t\t}\n\t\tthis.inputs\n\t\t\t.filter((input) => !input.standalone)\n\t\t\t.forEach((input) => {\n\t\t\t\tconst inputId = `${input.host.nativeElement.tagName.toLowerCase()}-${++nextId}`;\n\t\t\t\tthis.#renderer.setAttribute(input.host.nativeElement, 'id', inputId);\n\t\t\t});\n\t\t// We're using the id from the first input available\n\t\tthis.id.set(this.#inputs[0].host.nativeElement.id);\n\t\tthis.updateAria();\n\t\tthis.ready$.next(true);\n\t}\n\n\tprivate updateAria(): void {\n\t\tthis.#inputs.forEach((input) => {\n\t\t\tthis.#renderer.setAttribute(input.host.nativeElement, 'aria-invalid', this.invalidStatus()?.toString());\n\t\t\tthis.#renderer.setAttribute(input.host.nativeElement, 'aria-required', this.isInputRequired()?.toString());\n\t\t\tif (!input.standalone) {\n\t\t\t\tthis.#renderer.setAttribute(input.host.nativeElement, 'aria-describedby', `${input.host.nativeElement.id}-message`);\n\t\t\t}\n\t\t});\n\t\tif (this.id() && !this.#ariaLabelledBy.includes(`${this.id()}-label`)) {\n\t\t\tthis.addLabelledBy(`${this.id()}-label`);\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.ready$.complete();\n\t}\n}\n","@if (layout() === 'fieldset') {\n<fieldset class=\"form-fieldset\" [class.mod-inline]=\"inline() || hasArrow\" [class.mod-S]=\"size() === 'S'\">\n\t<legend class=\"formLabel\" [class.u-mask]=\"hiddenLabel()\" attr.aria-hidden=\"{{hiddenLabel()}}\">\n\t\t<ng-container *luPortal=\"label()\"></ng-container\n\t\t><!--\n\t--><sup class=\"formLabel-required\" aria-hidden=\"true\" *ngIf=\"isInputRequired()\">*</sup>\n\t\t@if (tooltip()) {\n\t\t<lu-icon\n\t\t\tclass=\"formLabel-info\"\n\t\t\ticon=\"signHelp\"\n\t\t\t[alt]=\"'?'\"\n\t\t\t[luTooltip]=\"tooltip()\"\n\t\t\t[color]=\"invalidStatus() ? 'error' : 'inherit'\"\n\t\t></lu-icon>\n\t\t}\n\t</legend>\n\t<ng-container *ngTemplateOutlet=\"projectionTpl\"></ng-container>\n\t@if (inlineMessage() || (invalidStatus() ? errorInlineMessage() : false)) {\n\t<lu-inline-message\n\t\tid=\"{{id()}}-message\"\n\t\t[label]=\"(invalidStatus() && errorInlineMessage()) ? errorInlineMessage() : inlineMessage()\"\n\t\t[state]=\"invalidStatus() ? 'error' : inlineMessageState()\"\n\t></lu-inline-message>\n\t}\n</fieldset>\n} @else {\n<label\n\tclass=\"formLabel\"\n\t[class.is-error]=\"invalidStatus()\"\n\t[class.mod-counter]=\"counter() > 0\"\n\tid=\"{{id()}}-label\"\n\tfor=\"{{id()}}\"\n\t[class.u-mask]=\"hiddenLabel()\"\n\tattr.role=\"{{rolePresentationLabel() ? 'presentation' : null}}\"\n>\n\t<ng-container *luPortal=\"label()\"></ng-container\n\t><!--\n\t--><sup class=\"formLabel-required\" aria-hidden=\"true\" *ngIf=\"isInputRequired()\">*</sup>\n\t@if (tooltip()) {\n\t<lu-icon\n\t\tclass=\"formLabel-info\"\n\t\ticon=\"signHelp\"\n\t\t[alt]=\"'?'\"\n\t\t[luTooltip]=\"tooltip()\"\n\t\t[color]=\"invalidStatus() ? 'error' : 'inherit'\"\n\t></lu-icon>\n\t} @if (counter() > 0) {\n\t<span class=\"formLabel-counter\" [class.u-textError]=\"contentLength > counter()\" id=\"{{id()}}-counter\" aria-live=\"polite\">\n\t\t<span aria-hidden=\"true\">{{ contentLength }}/{{ counter() }}</span>\n\t\t<span class=\"u-mask\">{{ intl.counter | intlParams: { current: contentLength, max: counter() } }}</span>\n\t</span>\n\t}\n</label>\n<ng-container *ngTemplateOutlet=\"projectionTpl\"></ng-container>\n@if (inlineMessage() || (invalidStatus() ? errorInlineMessage() : false)) {\n<lu-inline-message\n\tid=\"{{id()}}-message\"\n\t[label]=\"(invalidStatus() && errorInlineMessage()) ? errorInlineMessage() : inlineMessage()\"\n\t[state]=\"invalidStatus() ? 'error' : inlineMessageState()\"\n></lu-inline-message>\n} }\n\n<ng-template #projectionTpl>\n\t<ng-content></ng-content>\n</ng-template>\n","import { booleanAttribute, Directive, ElementRef, inject, Input, OnInit } from '@angular/core';\nimport { FORM_FIELD_INSTANCE } from './form-field.token';\n\n@Directive({\n\tselector: '[luInput]',\n\tstandalone: true,\n\thost: {\n\t\t// Used to autofocus in dialog boxes, do not change except if you know what you're doing\n\t\tclass: 'luNativeInput',\n\t},\n})\nexport class InputDirective implements OnInit {\n\tpublic readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\tpublic readonly formFieldRef = inject(FORM_FIELD_INSTANCE, { optional: true });\n\n\t/**\n\t * Prevents message and label ids from being propagated, useful if the input holds its own message and label (like for radios)\n\t */\n\t@Input({ transform: booleanAttribute, alias: 'luInputStandalone' })\n\tstandalone = false;\n\n\tngOnInit(): void {\n\t\t// If the field is used as standalone, we won't have the ref provided so it'll crash\n\t\tif (this.formFieldRef) {\n\t\t\tthis.formFieldRef.addInput(this);\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;;;;;;;;;MAGa,mBAAmB,GAAG,IAAI,cAAc,CAAqB,qBAAqB;;ACHxF,MAAM,YAAY,GAAG;AAC3B,IAAA,EAAE,EAAE;AACH,QAAA,OAAO,EAAE,0FAA0F;AACnG,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,OAAO,EAAE,iFAAiF;AAC1F,KAAA;AACD,IAAA,EAA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AY,CAAA,YAAA,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE9E;;AAEG;QAEH,IAAU,CAAA,UAAA,GAAG,KAAK;AAQlB;IANA,QAAQ,GAAA;;AAEP,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACtB,YAAA,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;;;8GAdtB,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,uGAQN,gBAAgB,CAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,eAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FARxB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAR1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;;AAEL,wBAAA,KAAK,EAAE,eAAe;AACtB,qBAAA;AACD,iBAAA;8BAUA,UAAU,EAAA,CAAA;sBADT,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,mBAAmB,EAAE;;;ACnBnE;;AAEG;;;;"}
|
|
@@ -434,7 +434,7 @@ class MultilanguageInputComponent {
|
|
|
434
434
|
useExisting: forwardRef(() => MultilanguageInputComponent),
|
|
435
435
|
multi: true,
|
|
436
436
|
},
|
|
437
|
-
], ngImport: i0, template: "<div class=\"textField\">\n\t<div class=\"textField-input\">\n\t\t<input\n\t\t\tluInput\n\t\t\ttype=\"text\"\n\t\t\tclass=\"textField-input-value\"\n\t\t\t[placeholder]=\"placeholder()\"\n\t\t\t[(ngModel)]=\"invariant().value\"\n\t\t\t(ngModelChange)=\"valueChange()\"\n\t\t\t(blur)=\"onTouched?.()\"\n\t\t\t[disabled]=\"disabledInternal()\"\n\t\t\t#inputElement\n\t\t/>\n\t\t<div class=\"textField-input-affix\">\n\t\t\t<button\n\t\t\t\t[luPopover2]=\"popoverMultilanguage\"\n\t\t\t\tluPopoverNoCloseButton\n\t\t\t\t[customPositions]=\"popoverPositions\"\n\t\t\t\t[luTooltip]=\"intl.toggleMultilanguage\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"button mod-onlyIcon mod-text textField-input-affix-toggle\"\n\t\t\t>\n\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-signTranslation\"></span>\n\t\t\t</button>\n\t\t\t<ng-template #popoverMultilanguage>\n\t\t\t\t<div class=\"popover-contentOptional\" [style.width.px]=\"inputElement.clientWidth + 16\">\n\t\t\t\t\t<div class=\"u-displayFlex u-
|
|
437
|
+
], ngImport: i0, template: "<div class=\"textField\">\n\t<div class=\"textField-input\">\n\t\t<input\n\t\t\tluInput\n\t\t\ttype=\"text\"\n\t\t\tclass=\"textField-input-value\"\n\t\t\t[placeholder]=\"placeholder()\"\n\t\t\t[(ngModel)]=\"invariant().value\"\n\t\t\t(ngModelChange)=\"valueChange()\"\n\t\t\t(blur)=\"onTouched?.()\"\n\t\t\t[disabled]=\"disabledInternal()\"\n\t\t\t#inputElement\n\t\t/>\n\t\t<div class=\"textField-input-affix\">\n\t\t\t<button\n\t\t\t\t[luPopover2]=\"popoverMultilanguage\"\n\t\t\t\tluPopoverNoCloseButton\n\t\t\t\t[customPositions]=\"popoverPositions\"\n\t\t\t\t[luTooltip]=\"intl.toggleMultilanguage\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"button mod-onlyIcon mod-text textField-input-affix-toggle\"\n\t\t\t>\n\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-signTranslation\"></span>\n\t\t\t</button>\n\t\t\t<ng-template #popoverMultilanguage>\n\t\t\t\t<div class=\"popover-contentOptional\" [style.width.px]=\"inputElement.clientWidth + 16\">\n\t\t\t\t\t<div class=\"u-displayFlex pr-u-gap100 u-flexDirectionColumn\">\n\t\t\t\t\t\t@for (row of panelInputs(); track row.cultureCode) {\n\t\t\t\t\t\t<lu-form-field [label]=\"intl.translateTo | intlParams: {lang: getLocaleDisplayName(row.cultureCode)}\" hiddenLabel>\n\t\t\t\t\t\t\t<lu-text-input\n\t\t\t\t\t\t\t\t[suffix]=\"{content: row.cultureCode, ariaLabel: ''}\"\n\t\t\t\t\t\t\t\t[(ngModel)]=\"row.value\"\n\t\t\t\t\t\t\t\t(ngModelChange)=\"valueChange()\"\n\t\t\t\t\t\t\t\t[disabled]=\"disabledInternal()\"\n\t\t\t\t\t\t\t></lu-text-input>\n\t\t\t\t\t\t</lu-form-field>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ng-template>\n\t\t</div>\n\t</div>\n</div>\n", styles: [".popover-contentOptional{padding:var(--pr-t-spacings-100)!important;max-height:20rem;overflow:auto}.popover-contentOptional:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px;border-radius:var(--commons-borderRadius-L)}\n"], dependencies: [{ kind: "component", type: FormFieldComponent, selector: "lu-form-field", inputs: ["label", "hiddenLabel", "rolePresentationLabel", "inline", "statusControl", "tooltip", "invalid", "inlineMessage", "errorInlineMessage", "inlineMessageState", "size", "layout", "counter"], outputs: ["rolePresentationLabelChange", "layoutChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: PopoverDirective, selector: "[luPopover2]", inputs: ["luPopover2", "luPopoverPosition", "luPopoverDisabled", "luPopoverTrigger", "customPositions", "luPopoverNoCloseButton", "luPopoverAnchor", "luPopoverOpenDelay", "luPopoverCloseDelay"], outputs: ["luPopoverClosed"], exportAs: ["luPopover2"] }, { kind: "component", type: TextInputComponent, selector: "lu-text-input", inputs: ["placeholder", "autocomplete", "hasClearer", "hasSearchIcon", "valueAlignRight", "prefix", "suffix", "type", "searchIcon"], outputs: ["blur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: InputDirective, selector: "[luInput]", inputs: ["luInputStandalone"] }, { kind: "pipe", type: IntlParamsPipe, name: "intlParams" }, { kind: "directive", type: LuTooltipTriggerDirective, selector: "[luTooltip]", inputs: ["luTooltip", "luTooltipEnterDelay", "luTooltipLeaveDelay", "luTooltipDisabled", "luTooltipOnlyForDisplay", "luTooltipPosition", "luTooltipWhenEllipsis"], exportAs: ["luTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
438
438
|
}
|
|
439
439
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: MultilanguageInputComponent, decorators: [{
|
|
440
440
|
type: Component,
|
|
@@ -456,7 +456,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
456
456
|
useExisting: forwardRef(() => MultilanguageInputComponent),
|
|
457
457
|
multi: true,
|
|
458
458
|
},
|
|
459
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"textField\">\n\t<div class=\"textField-input\">\n\t\t<input\n\t\t\tluInput\n\t\t\ttype=\"text\"\n\t\t\tclass=\"textField-input-value\"\n\t\t\t[placeholder]=\"placeholder()\"\n\t\t\t[(ngModel)]=\"invariant().value\"\n\t\t\t(ngModelChange)=\"valueChange()\"\n\t\t\t(blur)=\"onTouched?.()\"\n\t\t\t[disabled]=\"disabledInternal()\"\n\t\t\t#inputElement\n\t\t/>\n\t\t<div class=\"textField-input-affix\">\n\t\t\t<button\n\t\t\t\t[luPopover2]=\"popoverMultilanguage\"\n\t\t\t\tluPopoverNoCloseButton\n\t\t\t\t[customPositions]=\"popoverPositions\"\n\t\t\t\t[luTooltip]=\"intl.toggleMultilanguage\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"button mod-onlyIcon mod-text textField-input-affix-toggle\"\n\t\t\t>\n\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-signTranslation\"></span>\n\t\t\t</button>\n\t\t\t<ng-template #popoverMultilanguage>\n\t\t\t\t<div class=\"popover-contentOptional\" [style.width.px]=\"inputElement.clientWidth + 16\">\n\t\t\t\t\t<div class=\"u-displayFlex u-
|
|
459
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"textField\">\n\t<div class=\"textField-input\">\n\t\t<input\n\t\t\tluInput\n\t\t\ttype=\"text\"\n\t\t\tclass=\"textField-input-value\"\n\t\t\t[placeholder]=\"placeholder()\"\n\t\t\t[(ngModel)]=\"invariant().value\"\n\t\t\t(ngModelChange)=\"valueChange()\"\n\t\t\t(blur)=\"onTouched?.()\"\n\t\t\t[disabled]=\"disabledInternal()\"\n\t\t\t#inputElement\n\t\t/>\n\t\t<div class=\"textField-input-affix\">\n\t\t\t<button\n\t\t\t\t[luPopover2]=\"popoverMultilanguage\"\n\t\t\t\tluPopoverNoCloseButton\n\t\t\t\t[customPositions]=\"popoverPositions\"\n\t\t\t\t[luTooltip]=\"intl.toggleMultilanguage\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"button mod-onlyIcon mod-text textField-input-affix-toggle\"\n\t\t\t>\n\t\t\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-signTranslation\"></span>\n\t\t\t</button>\n\t\t\t<ng-template #popoverMultilanguage>\n\t\t\t\t<div class=\"popover-contentOptional\" [style.width.px]=\"inputElement.clientWidth + 16\">\n\t\t\t\t\t<div class=\"u-displayFlex pr-u-gap100 u-flexDirectionColumn\">\n\t\t\t\t\t\t@for (row of panelInputs(); track row.cultureCode) {\n\t\t\t\t\t\t<lu-form-field [label]=\"intl.translateTo | intlParams: {lang: getLocaleDisplayName(row.cultureCode)}\" hiddenLabel>\n\t\t\t\t\t\t\t<lu-text-input\n\t\t\t\t\t\t\t\t[suffix]=\"{content: row.cultureCode, ariaLabel: ''}\"\n\t\t\t\t\t\t\t\t[(ngModel)]=\"row.value\"\n\t\t\t\t\t\t\t\t(ngModelChange)=\"valueChange()\"\n\t\t\t\t\t\t\t\t[disabled]=\"disabledInternal()\"\n\t\t\t\t\t\t\t></lu-text-input>\n\t\t\t\t\t\t</lu-form-field>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ng-template>\n\t\t</div>\n\t</div>\n</div>\n", styles: [".popover-contentOptional{padding:var(--pr-t-spacings-100)!important;max-height:20rem;overflow:auto}.popover-contentOptional:focus-visible{outline:2px solid var(--palettes-product-700);outline-offset:2px;border-radius:var(--commons-borderRadius-L)}\n"] }]
|
|
460
460
|
}] });
|
|
461
461
|
|
|
462
462
|
function areAllLanguagesFilled(model) {
|