@lucca-front/ng 17.2.0 → 17.2.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/button/button.component.d.ts +1 -2
- package/callout/callout-feedback-list/callout-feedback-list.component.d.ts +1 -2
- package/core/public-api.d.ts +1 -1
- package/core/tools/class.d.ts +11 -0
- package/core-select/api/api-v3.directive.d.ts +25 -0
- package/core-select/api/api-v4.directive.d.ts +22 -0
- package/core-select/api/api.directive.d.ts +31 -0
- package/core-select/api/index.d.ts +5 -0
- package/core-select/api/public-api.d.ts +3 -0
- package/core-select/input/select-input.component.d.ts +3 -3
- package/core-select/option/option.component.d.ts +1 -0
- package/esm2022/button/button.component.mjs +7 -8
- package/esm2022/callout/callout-feedback-list/callout-feedback-list.component.mjs +6 -7
- package/esm2022/core/public-api.mjs +2 -2
- package/esm2022/core/tools/class.mjs +75 -0
- package/esm2022/core-select/api/api-v3.directive.mjs +62 -0
- package/esm2022/core-select/api/api-v4.directive.mjs +56 -0
- package/esm2022/core-select/api/api.directive.mjs +46 -0
- package/esm2022/core-select/api/lucca-front-ng-core-select-api.mjs +5 -0
- package/esm2022/core-select/api/public-api.mjs +4 -0
- package/esm2022/core-select/input/select-input.component.mjs +13 -12
- package/esm2022/core-select/option/option.component.mjs +5 -4
- package/esm2022/empty-state/empty-state-page/empty-state-page.component.mjs +3 -3
- package/esm2022/empty-state/empty-state-section/empty-state-section.component.mjs +3 -3
- package/esm2022/establishment/select/establishment-select.token.mjs +4 -0
- package/esm2022/establishment/select/input/establishment-select-input.component.mjs +13 -16
- package/esm2022/establishment/select/legal-unit-selector/legal-unit-selector.directive.mjs +9 -10
- package/esm2022/establishment/select/searcher/establishment-searcher.component.mjs +9 -10
- package/esm2022/establishment/select/select-all/establishment-select-all.component.mjs +9 -10
- package/esm2022/form-field/form-field.component.mjs +11 -10
- package/esm2022/icon/icon.component.mjs +3 -3
- package/esm2022/inline-message/inline-message.component.mjs +7 -8
- package/esm2022/multi-select/displayer/default-displayer.component.mjs +4 -2
- package/esm2022/multi-select/input/panel-ref.factory.mjs +6 -6
- package/esm2022/multi-select/input/select-input.component.mjs +3 -10
- package/esm2022/multi-select/panel/panel.component.mjs +18 -18
- package/esm2022/multi-select/select.model.mjs +2 -2
- package/esm2022/numeric-badge/numeric-badge.component.mjs +7 -8
- package/esm2022/option/item/option-item.component.mjs +3 -3
- package/esm2022/option/item/tree-option-item.component.mjs +3 -3
- package/esm2022/simple-select/api/api-v3.directive.mjs +6 -62
- package/esm2022/simple-select/api/api-v4.directive.mjs +6 -56
- package/esm2022/simple-select/api/api.directive.mjs +6 -40
- package/esm2022/simple-select/input/panel-ref.factory.mjs +7 -7
- package/esm2022/simple-select/input/select-input.component.mjs +2 -9
- package/esm2022/simple-select/panel/option-selected.pipe.mjs +17 -0
- package/esm2022/simple-select/panel/panel.component.mjs +21 -20
- package/esm2022/simple-select/select.model.mjs +2 -2
- package/establishment/select/establishment-select.token.d.ts +4 -0
- package/establishment/select/input/establishment-select-input.component.d.ts +2 -2
- package/establishment/select/legal-unit-selector/legal-unit-selector.directive.d.ts +2 -2
- package/establishment/select/searcher/establishment-searcher.component.d.ts +2 -2
- package/establishment/select/select-all/establishment-select-all.component.d.ts +2 -2
- package/fesm2022/lucca-front-ng-button.mjs +6 -7
- package/fesm2022/lucca-front-ng-button.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +5 -6
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-api.mjs +162 -0
- package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-core-select.mjs +16 -14
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core.mjs +72 -22
- package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-empty-state.mjs +4 -4
- package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-establishment.mjs +32 -39
- package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +10 -9
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-icon.mjs +2 -2
- package/fesm2022/lucca-front-ng-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs +6 -7
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +26 -31
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-numeric-badge.mjs +6 -7
- package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +4 -4
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select-api.mjs +13 -146
- package/fesm2022/lucca-front-ng-simple-select-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +40 -32
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/form-field/form-field.component.d.ts +1 -2
- package/inline-message/inline-message.component.d.ts +1 -2
- package/multi-select/input/panel-ref.factory.d.ts +2 -2
- package/multi-select/panel/panel.component.d.ts +5 -5
- package/multi-select/select.model.d.ts +3 -12
- package/numeric-badge/numeric-badge.component.d.ts +1 -2
- package/package.json +26 -20
- package/simple-select/api/api-v3.directive.d.ts +5 -25
- package/simple-select/api/api-v4.directive.d.ts +5 -22
- package/simple-select/api/api.directive.d.ts +5 -32
- package/simple-select/input/panel-ref.factory.d.ts +2 -2
- package/simple-select/panel/option-selected.pipe.d.ts +7 -0
- package/simple-select/panel/panel.component.d.ts +5 -5
- package/simple-select/select.model.d.ts +3 -12
- package/src/definitions/option/_option-item.scss +1 -0
- package/core/tools/ng-clazz.directive.d.ts +0 -9
- package/esm2022/core/tools/ng-clazz.directive.mjs +0 -26
|
@@ -2,8 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, EventEmitter, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, HostBinding, Output, inject, ViewContainerRef, ElementRef, numberAttribute, ViewChild } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { NgIf, CommonModule } from '@angular/common';
|
|
5
|
-
import
|
|
6
|
-
import { getIntl, PortalDirective, NgClazz } from '@lucca-front/ng/core';
|
|
5
|
+
import { getIntl, PortalDirective, LuClass } from '@lucca-front/ng/core';
|
|
7
6
|
import { IconComponent } from '@lucca-front/ng/icon';
|
|
8
7
|
import { Overlay } from '@angular/cdk/overlay';
|
|
9
8
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
@@ -325,18 +324,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
|
|
|
325
324
|
}] });
|
|
326
325
|
|
|
327
326
|
class CalloutFeedbackListComponent {
|
|
328
|
-
#
|
|
327
|
+
#luClass = inject(LuClass);
|
|
329
328
|
ngOnChanges() {
|
|
330
|
-
this.#
|
|
329
|
+
this.#luClass.setState([`palette-${this.palette}`, `mod-${this.size}`]);
|
|
331
330
|
}
|
|
332
331
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: CalloutFeedbackListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
333
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: CalloutFeedbackListComponent, isStandalone: true, selector: "ul[lu-callout-feedback-list]", inputs: { palette: "palette", size: "size" }, host: { classAttribute: "calloutFeedbackList" },
|
|
332
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: CalloutFeedbackListComponent, isStandalone: true, selector: "ul[lu-callout-feedback-list]", inputs: { palette: "palette", size: "size" }, host: { classAttribute: "calloutFeedbackList" }, providers: [LuClass], usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".calloutFeedbackList{margin:0;padding:0;list-style-type:none;display:flex;flex-direction:column;gap:var(--spacings-S)}.calloutFeedbackList-item{display:flex;flex-direction:column;gap:var(--spacings-XS)}.calloutFeedbackList-item-actions{display:inline-flex;gap:var(--spacings-XS)}.calloutFeedbackList-item-actions .button{--components-button-font-size: var(--sizes-S-fontSize);--components-button-line-height: var(--sizes-S-lineHeight);--components-button-padding: .375rem .75rem;--components-button-gap: .375rem;--icon-size: 1.25rem;margin:0}.calloutFeedbackList-item-actions .button .numericBadge{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: 6px;--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.calloutFeedbackList.mod-S{font-size:var(--sizes-S-fontSize);line-height:var(--sizes-S-lineHeight)}.calloutFeedbackList.mod-S .button{--components-button-font-size: var(--sizes-XS-fontSize);--components-button-line-height: var(--sizes-XS-lineHeight);--components-button-padding: var(--spacings-XXS) var(--spacings-XS);--components-button-gap: var(--spacings-XXS);--icon-size: 1rem}.calloutFeedbackList.mod-S .button .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--commons-borderRadius-M);--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
334
333
|
}
|
|
335
334
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: CalloutFeedbackListComponent, decorators: [{
|
|
336
335
|
type: Component,
|
|
337
336
|
args: [{ selector: 'ul[lu-callout-feedback-list]', standalone: true, template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
338
337
|
class: 'calloutFeedbackList',
|
|
339
|
-
},
|
|
338
|
+
}, providers: [LuClass], encapsulation: ViewEncapsulation.None, styles: [".calloutFeedbackList{margin:0;padding:0;list-style-type:none;display:flex;flex-direction:column;gap:var(--spacings-S)}.calloutFeedbackList-item{display:flex;flex-direction:column;gap:var(--spacings-XS)}.calloutFeedbackList-item-actions{display:inline-flex;gap:var(--spacings-XS)}.calloutFeedbackList-item-actions .button{--components-button-font-size: var(--sizes-S-fontSize);--components-button-line-height: var(--sizes-S-lineHeight);--components-button-padding: .375rem .75rem;--components-button-gap: .375rem;--icon-size: 1.25rem;margin:0}.calloutFeedbackList-item-actions .button .numericBadge{--components-numericBadge-size: 1.25rem;--components-numericBadge-borderRadius: 6px;--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}.calloutFeedbackList.mod-S{font-size:var(--sizes-S-fontSize);line-height:var(--sizes-S-lineHeight)}.calloutFeedbackList.mod-S .button{--components-button-font-size: var(--sizes-XS-fontSize);--components-button-line-height: var(--sizes-XS-lineHeight);--components-button-padding: var(--spacings-XXS) var(--spacings-XS);--components-button-gap: var(--spacings-XXS);--icon-size: 1rem}.calloutFeedbackList.mod-S .button .numericBadge{--components-numericBadge-size: 1rem;--components-numericBadge-borderRadius: var(--commons-borderRadius-M);--components-numericBadge-fontSize: var(--sizes-XS-fontSize);--components-numericBadge-lineHeight: var(--sizes-XS-lineHeight)}\n"] }]
|
|
340
339
|
}], propDecorators: { palette: [{
|
|
341
340
|
type: Input
|
|
342
341
|
}], size: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lucca-front-ng-callout.mjs","sources":["../../../packages/ng/callout/callout.translate.ts","../../../packages/ng/callout/callout-state.ts","../../../packages/ng/callout/callout/callout.component.ts","../../../packages/ng/callout/callout/callout.component.html","../../../packages/ng/callout/callout-disclosure/callout-disclosure.component.ts","../../../packages/ng/callout/callout-disclosure/callout-disclosure.component.html","../../../packages/ng/callout/callout-popover/callout-popover.component.ts","../../../packages/ng/callout/callout-popover/callout-popover.component.html","../../../packages/ng/callout/callout-feedback-item/callout-feedback-item.component.ts","../../../packages/ng/callout/callout-feedback-item/callout-feedback-item.component.html","../../../packages/ng/callout/callout-feedback-list/callout-feedback-list.component.ts","../../../packages/ng/callout/lucca-front-ng-callout.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ILuTranslation } from '@lucca-front/ng/core';\n\nexport const LU_CALLOUT_TRANSLATIONS = new InjectionToken('LuCalloutTranslations', {\n\tfactory: () => luCalloutTranslations,\n});\n\nexport interface LuCalloutLabel {\n\tclose: string;\n}\n\nexport const luCalloutTranslations: ILuTranslation<LuCalloutLabel> = {\n\ten: {\n\t\tclose: 'Close',\n\t},\n\tfr: {\n\t\tclose: 'Fermer',\n\t},\n\tes: {\n\t\tclose: 'Cerrar',\n\t},\n};\n","import { Palette } from '@lucca-front/ng/core';\nimport { LuccaIcon } from '@lucca-front/icons';\n\nexport type CalloutState = 'success' | 'warning' | 'error';\n\nexport const CalloutStateMap: Record<CalloutState, { icon: LuccaIcon; palette: Palette }> = {\n\tsuccess: {\n\t\ticon: 'signSuccess',\n\t\tpalette: 'success',\n\t},\n\twarning: {\n\t\ticon: 'signWarning',\n\t\tpalette: 'warning',\n\t},\n\terror: {\n\t\ticon: 'signError',\n\t\tpalette: 'error',\n\t},\n};\n","import { booleanAttribute, ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { NgIf } from '@angular/common';\nimport { getIntl, Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { LU_CALLOUT_TRANSLATIONS } from '../callout.translate';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { CalloutState, CalloutStateMap } from '../callout-state';\n\n@Component({\n\tselector: 'lu-callout',\n\tstandalone: true,\n\timports: [NgIf, PortalDirective],\n\ttemplateUrl: './callout.component.html',\n\tstyleUrls: ['./callout.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutComponent {\n\t@Input()\n\t/**\n\t * The title of the callout\n\t */\n\theading: PortalContent;\n\n\t@Input()\n\t/**\n\t * Which palette should be used for the entire callout.\n\t * Defaults to none (inherits parent palette)\n\t */\n\tpalette: Palette = 'none';\n\n\t@Input()\n\t/**\n\t * Which size should the callout be? Defaults to medium\n\t */\n\tsize: 'M' | 'S';\n\n\t@Input({ transform: booleanAttribute })\n\t/**\n\t * Should we display the remove icon?\n\t */\n\tremovable = false;\n\n\t@Input()\n\t/**\n\t * Which icon should we display in the callout if any?\n\t * Defaults to no icon.\n\t */\n\ticon: LuccaIcon;\n\n\t@Input()\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\tset state(state: CalloutState) {\n\t\tconst { icon, palette } = CalloutStateMap[state];\n\t\tif (this.palette === 'none') {\n\t\t\tthis.palette = palette;\n\t\t}\n\t\tif (!this.icon) {\n\t\t\tthis.icon = icon;\n\t\t}\n\t}\n\n\t@Input({ transform: booleanAttribute })\n\t/**\n\t * Is the callout removed? Works with two way binding too.\n\t */\n\tremoved = false;\n\n\t@HostBinding('attr.hidden')\n\tget hiddenAttr(): 'hidden' | null {\n\t\treturn this.removed ? 'hidden' : null;\n\t}\n\n\t@Output()\n\tremovedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n\tpublic intl = getIntl(LU_CALLOUT_TRANSLATIONS);\n}\n","<div class=\"callout palette-{{palette}} mod-{{size}}\" *ngIf=\"!removed\">\n\t<div class=\"callout-icon\" *ngIf=\"icon\">\n\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-{{icon}}\"></span>\n\t</div>\n\t<div class=\"callout-content\">\n\t\t<strong class=\"callout-content-title\" *ngIf=\"heading\">\n\t\t\t<ng-container *luPortal=\"heading\"></ng-container>\n\t\t</strong>\n\t\t<div class=\"callout-content-description\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t</div>\n\t<button *ngIf=\"removable\" type=\"button\" class=\"callout-kill\" (click)=\"removed = true; removedChange.emit(true)\">\n\t\t<span class=\"u-mask\">{{ intl.close }}</span>\n\t</button>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation, booleanAttribute } from '@angular/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { CalloutState, CalloutStateMap } from '../callout-state';\n\n@Component({\n\tselector: 'lu-callout-disclosure',\n\tstandalone: true,\n\timports: [CommonModule, IconComponent, PortalDirective],\n\ttemplateUrl: './callout-disclosure.component.html',\n\tstyleUrls: ['./callout-disclosure.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutDisclosureComponent {\n\t@Input()\n\ticon: LuccaIcon;\n\n\t@Input({ required: true })\n\theading: PortalContent;\n\n\t@Input()\n\tpalette: Palette = 'none';\n\n\t@Input()\n\tsize: 'M' | 'S' = 'M';\n\n\t@Input()\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\tset state(state: CalloutState) {\n\t\tconst { icon, palette } = CalloutStateMap[state];\n\t\tif (this.palette === 'none') {\n\t\t\tthis.palette = palette;\n\t\t}\n\t\tif (!this.icon) {\n\t\t\tthis.icon = icon;\n\t\t}\n\t}\n\n\t@Input({ transform: booleanAttribute }) open = false;\n\n\t@Output() openChange = new EventEmitter<boolean>();\n\n\tpublic onToggle(event: Event) {\n\t\tif (event.target instanceof HTMLDetailsElement) {\n\t\t\tthis.openChange.emit(event.target.open);\n\t\t}\n\t}\n}\n","<details class=\"calloutDisclosure palette-{{palette}} mod-{{size}}\" [class.mod-iconless]=\"!icon\" [open]=\"open\" (toggle)=\"onToggle($event)\">\n\t<summary class=\"calloutDisclosure-summary\">\n\t\t<lu-icon class=\"calloutDisclosure-summary-icon\" *ngIf=\"icon\" [icon]=\"icon\"></lu-icon>\n\t\t<span class=\"calloutDisclosure-summary-title\">\n\t\t\t<ng-container *luPortal=\"heading\"></ng-container>\n\t\t</span>\n\t\t<lu-icon class=\"calloutDisclosure-summary-chevron\" icon=\"arrowChevronBottom\"></lu-icon>\n\t</summary>\n\t<div class=\"calloutDisclosure-details\">\n\t\t<ng-content></ng-content>\n\t</div>\n</details>\n","import { ChangeDetectionStrategy, Component, ElementRef, inject, Input, numberAttribute, OnDestroy, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { animate, state, style, transition, trigger } from '@angular/animations';\nimport { Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { ButtonComponent } from '@lucca-front/ng/button';\nimport { CalloutState, CalloutStateMap } from '../callout-state';\n\n@Component({\n\tselector: 'lu-callout-popover',\n\tstandalone: true,\n\timports: [CommonModule, IconComponent, ButtonComponent, PortalDirective],\n\tanimations: [\n\t\ttrigger('tooltip', [\n\t\t\tstate(\n\t\t\t\t'enter',\n\t\t\t\tstyle({\n\t\t\t\t\topacity: 1,\n\t\t\t\t\ttransform: `scale(1)`,\n\t\t\t\t}),\n\t\t\t),\n\t\t\ttransition('void => *', [\n\t\t\t\tstyle({\n\t\t\t\t\topacity: 0,\n\t\t\t\t\ttransform: `scale(0)`,\n\t\t\t\t}),\n\t\t\t\tanimate(`150ms cubic-bezier(0.25, 0.8, 0.25, 1)`),\n\t\t\t]),\n\t\t\ttransition('* => void', [animate('50ms 100ms linear', style({ opacity: 0 }))]),\n\t\t]),\n\t],\n\ttemplateUrl: './callout-popover.component.html',\n\tstyleUrls: ['./callout-popover.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutPopoverComponent implements OnDestroy {\n\t#overlay = inject(Overlay);\n\t#viewContainerRef = inject(ViewContainerRef);\n\t#elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\t@ViewChild('overlayOriginRef')\n\toverlayOrigin: ElementRef;\n\n\t@ViewChild('overlayContentRef')\n\toverlayContent: TemplateRef<unknown>;\n\n\t#overlayRef: OverlayRef;\n\n\t// Using unknown here because it's using Node types for whatever reason but it's a number\n\tprivate _hideDelayId: unknown | undefined;\n\n\t// Using unknown here because it's using Node types for whatever reason but it's a number\n\tprivate _showDelayId: unknown | undefined;\n\n\t/**\n\t * Debounce for the popover to open (mouse will have to be on the element fox openDelay milliseconds for popover to show)\n\t */\n\t@Input({ transform: numberAttribute })\n\treadonly openDelay = 50;\n\n\t/**\n\t * Debounce for the popover to close (mouse will have to be out of both popover and trigger for closeDelay milliseconds for it to close)\n\t */\n\t@Input({ transform: numberAttribute })\n\treadonly closeDelay = 500;\n\n\t/**\n\t * Label to put inside the button, often used to show just a number\n\t */\n\t@Input()\n\tbuttonLabel: string;\n\n\t/**\n\t * Palette for both the button and the popover content\n\t */\n\t@Input()\n\tpalette: Palette = 'none';\n\n\t/**\n\t * Size for both button and popover content\n\t */\n\t@Input()\n\tsize?: 'M' | 'S' | 'XS';\n\n\t/**\n\t * Icon shows in button and next to popover's title\n\t */\n\t@Input()\n\ticon: LuccaIcon;\n\n\t@Input()\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\tset state(state: CalloutState) {\n\t\tconst { icon, palette } = CalloutStateMap[state];\n\t\tif (this.palette === 'none') {\n\t\t\tthis.palette = palette;\n\t\t}\n\t\tif (!this.icon) {\n\t\t\tthis.icon = icon;\n\t\t}\n\t}\n\n\t/**\n\t * Heading for the details popover\n\t */\n\t@Input({ required: true })\n\theading: PortalContent;\n\n\tget contentSize(): 'S' | 'M' | undefined {\n\t\tif (this.size === 'XS') {\n\t\t\treturn 'S';\n\t\t}\n\t\treturn this.size;\n\t}\n\n\tpublic showContent() {\n\t\tclearTimeout(this._hideDelayId as number);\n\t\t// Don't open if we still have one opened\n\t\tif (this._showDelayId) {\n\t\t\treturn;\n\t\t}\n\t\tthis._showDelayId = setTimeout(() => {\n\t\t\tthis.createPanelContent();\n\t\t\tdelete this._hideDelayId;\n\t\t}, this.openDelay);\n\t}\n\n\tprivate createPanelContent() {\n\t\tconst positionStrategy = this.#overlay\n\t\t\t.position()\n\t\t\t.flexibleConnectedTo(this.overlayOrigin)\n\t\t\t.withPositions([\n\t\t\t\t{\n\t\t\t\t\toriginX: 'center',\n\t\t\t\t\toriginY: 'top',\n\t\t\t\t\toverlayX: 'center',\n\t\t\t\t\toverlayY: 'bottom',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toriginX: 'center',\n\t\t\t\t\toriginY: 'bottom',\n\t\t\t\t\toverlayX: 'center',\n\t\t\t\t\toverlayY: 'top',\n\t\t\t\t},\n\t\t\t]);\n\n\t\tthis.#overlayRef = this.#overlay.create({\n\t\t\tpositionStrategy,\n\t\t});\n\n\t\tconst portal = new TemplatePortal(this.overlayContent, this.#viewContainerRef);\n\n\t\tthis.#overlayRef.attach(portal);\n\t}\n\n\tpublic hideContent(event: MouseEvent | null) {\n\t\tclearTimeout(this._showDelayId as number);\n\t\tthis._hideDelayId = setTimeout(() => {\n\t\t\tconst newTarget = event?.relatedTarget as Node | null;\n\t\t\t// This is to prevent tooltip closing when user puts cursor on tooltip, thus leaving the origin trigger\n\t\t\tif (!newTarget || !(this.#overlayRef?.overlayElement?.contains(newTarget) || this.#elementRef?.nativeElement?.contains(newTarget))) {\n\t\t\t\t// Remove the tooltip if needed.\n\t\t\t\tif (this.#overlayRef) {\n\t\t\t\t\tthis.#overlayRef.dispose();\n\t\t\t\t\tdelete this._showDelayId;\n\t\t\t\t\tdelete this._hideDelayId;\n\t\t\t\t}\n\t\t\t}\n\t\t}, this.closeDelay);\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.hideContent(null);\n\t}\n}\n","<button\n\ttype=\"button\"\n\tclass=\"calloutPopover palette-{{palette}} mod-{{size}}\"\n\t#overlayOriginRef\n\t(mouseenter)=\"showContent()\"\n\t(focus)=\"showContent()\"\n\t(mouseleave)=\"hideContent($event)\"\n\t(blur)=\"hideContent(null)\"\n>\n\t<lu-icon class=\"calloutPopover-icon\" *ngIf=\"icon\" [icon]=\"icon\"></lu-icon>\n\t{{buttonLabel}}\n</button>\n<ng-template #overlayContentRef>\n\t<div\n\t\t[@tooltip]=\"'open'\"\n\t\tclass=\"lu-popover-content calloutPopover-overlay mod-{{contentSize}}\"\n\t\t(mouseenter)=\"showContent()\"\n\t\t(mouseleave)=\"hideContent($event)\"\n\t>\n\t\t<div class=\"calloutPopover-overlay-head\">\n\t\t\t<lu-icon class=\"calloutPopover-overlay-head-icon palette-{{palette}}\" *ngIf=\"icon\" [icon]=\"icon\"></lu-icon>\n\t\t\t<strong class=\"calloutPopover-overlay-head-title\">\n\t\t\t\t<ng-container *luPortal=\"heading\"></ng-container>\n\t\t\t</strong>\n\t\t</div>\n\t\t<div class=\"calloutPopover-overlay-content\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t</div>\n</ng-template>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'li[lu-callout-feedback-item]',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './callout-feedback-item.component.html',\n\tstyleUrls: ['./callout-feedback-item.component.scss'],\n\t// eslint-disable-next-line @angular-eslint/no-host-metadata-property\n\thost: {\n\t\tclass: 'calloutFeedbackList-item',\n\t},\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutFeedbackItemComponent {}\n","<span class=\"calloutFeedbackList-item-description\">\n\t<ng-content select=\"lu-feedback-item-description\"></ng-content>\n</span>\n<div class=\"calloutFeedbackList-item-actions\">\n\t<ng-content select=\"[lu-feedback-item-action]\"></ng-content>\n</div>\n","import { ChangeDetectionStrategy, Component, inject, Input, OnChanges, ViewEncapsulation } from '@angular/core';\nimport { NgClazz, Palette } from '@lucca-front/ng/core';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'ul[lu-callout-feedback-list]',\n\tstandalone: true,\n\ttemplate: '<ng-content></ng-content>',\n\tstyleUrls: ['./callout-feedback-list.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'calloutFeedbackList',\n\t},\n\thostDirectives: [NgClazz],\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutFeedbackListComponent implements OnChanges {\n\t#ngClass = inject(NgClazz);\n\n\t@Input()\n\tpalette: Palette;\n\n\t@Input()\n\tsize: 'M' | 'S';\n\n\tngOnChanges(): void {\n\t\tthis.#ngClass.ngClass = [`palette-${this.palette}`, `mod-${this.size}`];\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAGa,uBAAuB,GAAG,IAAI,cAAc,CAAC,uBAAuB,EAAE;AAClF,IAAA,OAAO,EAAE,MAAM,qBAAqB;AACpC,CAAA,EAAE;AAMU,MAAA,qBAAqB,GAAmC;AACpE,IAAA,EAAE,EAAE;AACH,QAAA,KAAK,EAAE,OAAO;AACd,KAAA;AACD,IAAA,EAAE,EAAE;AAC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BAEpB,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACL,wBAAA,KAAK,EAAE,qBAAqB;AAC5B,qBAAA,EAAA,cAAA,EACe,CAAC,OAAO,CAAC,EACV,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,m8CAAA,CAAA,EAAA,CAAA;8BAMrC,OAAO,EAAA,CAAA;sBADN,KAAK;gBAIN,IAAI,EAAA,CAAA;sBADH,KAAK;;;ACtBP;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-callout.mjs","sources":["../../../packages/ng/callout/callout.translate.ts","../../../packages/ng/callout/callout-state.ts","../../../packages/ng/callout/callout/callout.component.ts","../../../packages/ng/callout/callout/callout.component.html","../../../packages/ng/callout/callout-disclosure/callout-disclosure.component.ts","../../../packages/ng/callout/callout-disclosure/callout-disclosure.component.html","../../../packages/ng/callout/callout-popover/callout-popover.component.ts","../../../packages/ng/callout/callout-popover/callout-popover.component.html","../../../packages/ng/callout/callout-feedback-item/callout-feedback-item.component.ts","../../../packages/ng/callout/callout-feedback-item/callout-feedback-item.component.html","../../../packages/ng/callout/callout-feedback-list/callout-feedback-list.component.ts","../../../packages/ng/callout/lucca-front-ng-callout.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ILuTranslation } from '@lucca-front/ng/core';\n\nexport const LU_CALLOUT_TRANSLATIONS = new InjectionToken('LuCalloutTranslations', {\n\tfactory: () => luCalloutTranslations,\n});\n\nexport interface LuCalloutLabel {\n\tclose: string;\n}\n\nexport const luCalloutTranslations: ILuTranslation<LuCalloutLabel> = {\n\ten: {\n\t\tclose: 'Close',\n\t},\n\tfr: {\n\t\tclose: 'Fermer',\n\t},\n\tes: {\n\t\tclose: 'Cerrar',\n\t},\n};\n","import { Palette } from '@lucca-front/ng/core';\nimport { LuccaIcon } from '@lucca-front/icons';\n\nexport type CalloutState = 'success' | 'warning' | 'error';\n\nexport const CalloutStateMap: Record<CalloutState, { icon: LuccaIcon; palette: Palette }> = {\n\tsuccess: {\n\t\ticon: 'signSuccess',\n\t\tpalette: 'success',\n\t},\n\twarning: {\n\t\ticon: 'signWarning',\n\t\tpalette: 'warning',\n\t},\n\terror: {\n\t\ticon: 'signError',\n\t\tpalette: 'error',\n\t},\n};\n","import { booleanAttribute, ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { NgIf } from '@angular/common';\nimport { getIntl, Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { LU_CALLOUT_TRANSLATIONS } from '../callout.translate';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { CalloutState, CalloutStateMap } from '../callout-state';\n\n@Component({\n\tselector: 'lu-callout',\n\tstandalone: true,\n\timports: [NgIf, PortalDirective],\n\ttemplateUrl: './callout.component.html',\n\tstyleUrls: ['./callout.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutComponent {\n\t@Input()\n\t/**\n\t * The title of the callout\n\t */\n\theading: PortalContent;\n\n\t@Input()\n\t/**\n\t * Which palette should be used for the entire callout.\n\t * Defaults to none (inherits parent palette)\n\t */\n\tpalette: Palette = 'none';\n\n\t@Input()\n\t/**\n\t * Which size should the callout be? Defaults to medium\n\t */\n\tsize: 'M' | 'S';\n\n\t@Input({ transform: booleanAttribute })\n\t/**\n\t * Should we display the remove icon?\n\t */\n\tremovable = false;\n\n\t@Input()\n\t/**\n\t * Which icon should we display in the callout if any?\n\t * Defaults to no icon.\n\t */\n\ticon: LuccaIcon;\n\n\t@Input()\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\tset state(state: CalloutState) {\n\t\tconst { icon, palette } = CalloutStateMap[state];\n\t\tif (this.palette === 'none') {\n\t\t\tthis.palette = palette;\n\t\t}\n\t\tif (!this.icon) {\n\t\t\tthis.icon = icon;\n\t\t}\n\t}\n\n\t@Input({ transform: booleanAttribute })\n\t/**\n\t * Is the callout removed? Works with two way binding too.\n\t */\n\tremoved = false;\n\n\t@HostBinding('attr.hidden')\n\tget hiddenAttr(): 'hidden' | null {\n\t\treturn this.removed ? 'hidden' : null;\n\t}\n\n\t@Output()\n\tremovedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n\tpublic intl = getIntl(LU_CALLOUT_TRANSLATIONS);\n}\n","<div class=\"callout palette-{{palette}} mod-{{size}}\" *ngIf=\"!removed\">\n\t<div class=\"callout-icon\" *ngIf=\"icon\">\n\t\t<span aria-hidden=\"true\" class=\"lucca-icon icon-{{icon}}\"></span>\n\t</div>\n\t<div class=\"callout-content\">\n\t\t<strong class=\"callout-content-title\" *ngIf=\"heading\">\n\t\t\t<ng-container *luPortal=\"heading\"></ng-container>\n\t\t</strong>\n\t\t<div class=\"callout-content-description\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t</div>\n\t<button *ngIf=\"removable\" type=\"button\" class=\"callout-kill\" (click)=\"removed = true; removedChange.emit(true)\">\n\t\t<span class=\"u-mask\">{{ intl.close }}</span>\n\t</button>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation, booleanAttribute } from '@angular/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { CalloutState, CalloutStateMap } from '../callout-state';\n\n@Component({\n\tselector: 'lu-callout-disclosure',\n\tstandalone: true,\n\timports: [CommonModule, IconComponent, PortalDirective],\n\ttemplateUrl: './callout-disclosure.component.html',\n\tstyleUrls: ['./callout-disclosure.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutDisclosureComponent {\n\t@Input()\n\ticon: LuccaIcon;\n\n\t@Input({ required: true })\n\theading: PortalContent;\n\n\t@Input()\n\tpalette: Palette = 'none';\n\n\t@Input()\n\tsize: 'M' | 'S' = 'M';\n\n\t@Input()\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\tset state(state: CalloutState) {\n\t\tconst { icon, palette } = CalloutStateMap[state];\n\t\tif (this.palette === 'none') {\n\t\t\tthis.palette = palette;\n\t\t}\n\t\tif (!this.icon) {\n\t\t\tthis.icon = icon;\n\t\t}\n\t}\n\n\t@Input({ transform: booleanAttribute }) open = false;\n\n\t@Output() openChange = new EventEmitter<boolean>();\n\n\tpublic onToggle(event: Event) {\n\t\tif (event.target instanceof HTMLDetailsElement) {\n\t\t\tthis.openChange.emit(event.target.open);\n\t\t}\n\t}\n}\n","<details class=\"calloutDisclosure palette-{{palette}} mod-{{size}}\" [class.mod-iconless]=\"!icon\" [open]=\"open\" (toggle)=\"onToggle($event)\">\n\t<summary class=\"calloutDisclosure-summary\">\n\t\t<lu-icon class=\"calloutDisclosure-summary-icon\" *ngIf=\"icon\" [icon]=\"icon\"></lu-icon>\n\t\t<span class=\"calloutDisclosure-summary-title\">\n\t\t\t<ng-container *luPortal=\"heading\"></ng-container>\n\t\t</span>\n\t\t<lu-icon class=\"calloutDisclosure-summary-chevron\" icon=\"arrowChevronBottom\"></lu-icon>\n\t</summary>\n\t<div class=\"calloutDisclosure-details\">\n\t\t<ng-content></ng-content>\n\t</div>\n</details>\n","import { ChangeDetectionStrategy, Component, ElementRef, inject, Input, numberAttribute, OnDestroy, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { IconComponent } from '@lucca-front/ng/icon';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { animate, state, style, transition, trigger } from '@angular/animations';\nimport { Palette, PortalContent, PortalDirective } from '@lucca-front/ng/core';\nimport { LuccaIcon } from '@lucca-front/icons';\nimport { ButtonComponent } from '@lucca-front/ng/button';\nimport { CalloutState, CalloutStateMap } from '../callout-state';\n\n@Component({\n\tselector: 'lu-callout-popover',\n\tstandalone: true,\n\timports: [CommonModule, IconComponent, ButtonComponent, PortalDirective],\n\tanimations: [\n\t\ttrigger('tooltip', [\n\t\t\tstate(\n\t\t\t\t'enter',\n\t\t\t\tstyle({\n\t\t\t\t\topacity: 1,\n\t\t\t\t\ttransform: `scale(1)`,\n\t\t\t\t}),\n\t\t\t),\n\t\t\ttransition('void => *', [\n\t\t\t\tstyle({\n\t\t\t\t\topacity: 0,\n\t\t\t\t\ttransform: `scale(0)`,\n\t\t\t\t}),\n\t\t\t\tanimate(`150ms cubic-bezier(0.25, 0.8, 0.25, 1)`),\n\t\t\t]),\n\t\t\ttransition('* => void', [animate('50ms 100ms linear', style({ opacity: 0 }))]),\n\t\t]),\n\t],\n\ttemplateUrl: './callout-popover.component.html',\n\tstyleUrls: ['./callout-popover.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutPopoverComponent implements OnDestroy {\n\t#overlay = inject(Overlay);\n\t#viewContainerRef = inject(ViewContainerRef);\n\t#elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\t@ViewChild('overlayOriginRef')\n\toverlayOrigin: ElementRef;\n\n\t@ViewChild('overlayContentRef')\n\toverlayContent: TemplateRef<unknown>;\n\n\t#overlayRef: OverlayRef;\n\n\t// Using unknown here because it's using Node types for whatever reason but it's a number\n\tprivate _hideDelayId: unknown | undefined;\n\n\t// Using unknown here because it's using Node types for whatever reason but it's a number\n\tprivate _showDelayId: unknown | undefined;\n\n\t/**\n\t * Debounce for the popover to open (mouse will have to be on the element fox openDelay milliseconds for popover to show)\n\t */\n\t@Input({ transform: numberAttribute })\n\treadonly openDelay = 50;\n\n\t/**\n\t * Debounce for the popover to close (mouse will have to be out of both popover and trigger for closeDelay milliseconds for it to close)\n\t */\n\t@Input({ transform: numberAttribute })\n\treadonly closeDelay = 500;\n\n\t/**\n\t * Label to put inside the button, often used to show just a number\n\t */\n\t@Input()\n\tbuttonLabel: string;\n\n\t/**\n\t * Palette for both the button and the popover content\n\t */\n\t@Input()\n\tpalette: Palette = 'none';\n\n\t/**\n\t * Size for both button and popover content\n\t */\n\t@Input()\n\tsize?: 'M' | 'S' | 'XS';\n\n\t/**\n\t * Icon shows in button and next to popover's title\n\t */\n\t@Input()\n\ticon: LuccaIcon;\n\n\t@Input()\n\t/**\n\t * State is a shorthand to set the icon and the palette to the recommended values for the icon and palette based on\n\t * the provided state.\n\t *\n\t * If one of the icon or palette inputs are filled along with the state input, their values will have the priority over\n\t * state (so setting state to success and palette to warning will make the palette warning)\n\t */\n\tset state(state: CalloutState) {\n\t\tconst { icon, palette } = CalloutStateMap[state];\n\t\tif (this.palette === 'none') {\n\t\t\tthis.palette = palette;\n\t\t}\n\t\tif (!this.icon) {\n\t\t\tthis.icon = icon;\n\t\t}\n\t}\n\n\t/**\n\t * Heading for the details popover\n\t */\n\t@Input({ required: true })\n\theading: PortalContent;\n\n\tget contentSize(): 'S' | 'M' | undefined {\n\t\tif (this.size === 'XS') {\n\t\t\treturn 'S';\n\t\t}\n\t\treturn this.size;\n\t}\n\n\tpublic showContent() {\n\t\tclearTimeout(this._hideDelayId as number);\n\t\t// Don't open if we still have one opened\n\t\tif (this._showDelayId) {\n\t\t\treturn;\n\t\t}\n\t\tthis._showDelayId = setTimeout(() => {\n\t\t\tthis.createPanelContent();\n\t\t\tdelete this._hideDelayId;\n\t\t}, this.openDelay);\n\t}\n\n\tprivate createPanelContent() {\n\t\tconst positionStrategy = this.#overlay\n\t\t\t.position()\n\t\t\t.flexibleConnectedTo(this.overlayOrigin)\n\t\t\t.withPositions([\n\t\t\t\t{\n\t\t\t\t\toriginX: 'center',\n\t\t\t\t\toriginY: 'top',\n\t\t\t\t\toverlayX: 'center',\n\t\t\t\t\toverlayY: 'bottom',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\toriginX: 'center',\n\t\t\t\t\toriginY: 'bottom',\n\t\t\t\t\toverlayX: 'center',\n\t\t\t\t\toverlayY: 'top',\n\t\t\t\t},\n\t\t\t]);\n\n\t\tthis.#overlayRef = this.#overlay.create({\n\t\t\tpositionStrategy,\n\t\t});\n\n\t\tconst portal = new TemplatePortal(this.overlayContent, this.#viewContainerRef);\n\n\t\tthis.#overlayRef.attach(portal);\n\t}\n\n\tpublic hideContent(event: MouseEvent | null) {\n\t\tclearTimeout(this._showDelayId as number);\n\t\tthis._hideDelayId = setTimeout(() => {\n\t\t\tconst newTarget = event?.relatedTarget as Node | null;\n\t\t\t// This is to prevent tooltip closing when user puts cursor on tooltip, thus leaving the origin trigger\n\t\t\tif (!newTarget || !(this.#overlayRef?.overlayElement?.contains(newTarget) || this.#elementRef?.nativeElement?.contains(newTarget))) {\n\t\t\t\t// Remove the tooltip if needed.\n\t\t\t\tif (this.#overlayRef) {\n\t\t\t\t\tthis.#overlayRef.dispose();\n\t\t\t\t\tdelete this._showDelayId;\n\t\t\t\t\tdelete this._hideDelayId;\n\t\t\t\t}\n\t\t\t}\n\t\t}, this.closeDelay);\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.hideContent(null);\n\t}\n}\n","<button\n\ttype=\"button\"\n\tclass=\"calloutPopover palette-{{palette}} mod-{{size}}\"\n\t#overlayOriginRef\n\t(mouseenter)=\"showContent()\"\n\t(focus)=\"showContent()\"\n\t(mouseleave)=\"hideContent($event)\"\n\t(blur)=\"hideContent(null)\"\n>\n\t<lu-icon class=\"calloutPopover-icon\" *ngIf=\"icon\" [icon]=\"icon\"></lu-icon>\n\t{{buttonLabel}}\n</button>\n<ng-template #overlayContentRef>\n\t<div\n\t\t[@tooltip]=\"'open'\"\n\t\tclass=\"lu-popover-content calloutPopover-overlay mod-{{contentSize}}\"\n\t\t(mouseenter)=\"showContent()\"\n\t\t(mouseleave)=\"hideContent($event)\"\n\t>\n\t\t<div class=\"calloutPopover-overlay-head\">\n\t\t\t<lu-icon class=\"calloutPopover-overlay-head-icon palette-{{palette}}\" *ngIf=\"icon\" [icon]=\"icon\"></lu-icon>\n\t\t\t<strong class=\"calloutPopover-overlay-head-title\">\n\t\t\t\t<ng-container *luPortal=\"heading\"></ng-container>\n\t\t\t</strong>\n\t\t</div>\n\t\t<div class=\"calloutPopover-overlay-content\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t</div>\n</ng-template>\n","import { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'li[lu-callout-feedback-item]',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './callout-feedback-item.component.html',\n\tstyleUrls: ['./callout-feedback-item.component.scss'],\n\t// eslint-disable-next-line @angular-eslint/no-host-metadata-property\n\thost: {\n\t\tclass: 'calloutFeedbackList-item',\n\t},\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutFeedbackItemComponent {}\n","<span class=\"calloutFeedbackList-item-description\">\n\t<ng-content select=\"lu-feedback-item-description\"></ng-content>\n</span>\n<div class=\"calloutFeedbackList-item-actions\">\n\t<ng-content select=\"[lu-feedback-item-action]\"></ng-content>\n</div>\n","import { ChangeDetectionStrategy, Component, inject, Input, OnChanges, ViewEncapsulation } from '@angular/core';\nimport { LuClass, Palette } from '@lucca-front/ng/core';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'ul[lu-callout-feedback-list]',\n\tstandalone: true,\n\ttemplate: '<ng-content></ng-content>',\n\tstyleUrls: ['./callout-feedback-list.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'calloutFeedbackList',\n\t},\n\tproviders: [LuClass],\n\tencapsulation: ViewEncapsulation.None,\n})\nexport class CalloutFeedbackListComponent implements OnChanges {\n\t#luClass = inject(LuClass);\n\n\t@Input()\n\tpalette: Palette;\n\n\t@Input()\n\tsize: 'M' | 'S';\n\n\tngOnChanges(): void {\n\t\tthis.#luClass.setState([`palette-${this.palette}`, `mod-${this.size}`]);\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAGa,uBAAuB,GAAG,IAAI,cAAc,CAAC,uBAAuB,EAAE;AAClF,IAAA,OAAO,EAAE,MAAM,qBAAqB;AACpC,CAAA,EAAE;AAMU,MAAA,qBAAqB,GAAmC;AACpE,IAAA,EAAE,EAAE;AACH,QAAA,KAAK,EAAE,OAAO;AACd,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,KAAK,EAAE,QAAQ;AACf,KAAA;AACD,IAAA,EAAE,EAAE;AACH,QAAA,KAAK,EAAE,QAAQ;AACf,KAAA;;;ACfK,MAAM,eAAe,GAAgE;AAC3F,IAAA,OAAO,EAAE;AACR,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,OAAO,EAAE,SAAS;AAClB,KAAA;AACD,IAAA,OAAO,EAAE;AACR,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,OAAO,EAAE,SAAS;AAClB,KAAA;AACD,IAAA,KAAK,EAAE;AACN,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,OAAO,EAAE,OAAO;AAChB,KAAA;CACD;;MCFY,gBAAgB,CAAA;AAT7B,IAAA,WAAA,GAAA;QAqBC,IAAO,CAAA,OAAA,GAAY,MAAM,CAAC;QAY1B,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;QA+BlB,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AAQhB,QAAA,IAAA,CAAA,aAAa,GAA0B,IAAI,YAAY,EAAW,CAAC;AAE5D,QAAA,IAAA,CAAA,IAAI,GAAG,OA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EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,4BAA4B,EAH7B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,qBAAA,EAAA,EAAA,SAAA,EAAA,CAAC,OAAO,CAAC,+CANV,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,m8CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FASzB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAbxC,SAAS;+BAEC,8BAA8B,EAAA,UAAA,EAC5B,IAAI,EACN,QAAA,EAAA,2BAA2B,mBAEpB,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACL,wBAAA,KAAK,EAAE,qBAAqB;AAC5B,qBAAA,EAAA,SAAA,EACU,CAAC,OAAO,CAAC,EACL,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,m8CAAA,CAAA,EAAA,CAAA;8BAMrC,OAAO,EAAA,CAAA;sBADN,KAAK;gBAIN,IAAI,EAAA,CAAA;sBADH,KAAK;;;ACtBP;;AAEG;;;;"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, Directive, Input } from '@angular/core';
|
|
4
|
+
import { Subject, scan, startWith, debounceTime, takeUntil, distinctUntilChanged, map, merge, pairwise, tap, combineLatest, of, catchError, concatMap, takeWhile, switchMap, ReplaySubject, BehaviorSubject, take } from 'rxjs';
|
|
5
|
+
import { ALuSelectInputComponent } from '@lucca-front/ng/core-select';
|
|
6
|
+
|
|
7
|
+
const MAGIC_PAGE_SIZE = 20;
|
|
8
|
+
const MAGIC_DEBOUNCE_DURATION = 250;
|
|
9
|
+
class ALuCoreSelectApiDirective {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.destroy$ = new Subject();
|
|
12
|
+
this.pageSize = MAGIC_PAGE_SIZE;
|
|
13
|
+
this.debounceDuration = MAGIC_DEBOUNCE_DURATION;
|
|
14
|
+
this.select = inject(ALuSelectInputComponent);
|
|
15
|
+
this.page$ = this.select.nextPage.pipe(scan((page) => page + 1, 0), startWith(0));
|
|
16
|
+
this.clue$ = this.select.clueChange.pipe(debounceTime(this.debounceDuration), startWith(''));
|
|
17
|
+
}
|
|
18
|
+
ngOnInit() {
|
|
19
|
+
this.select.optionComparer = this.optionComparer;
|
|
20
|
+
this.buildOptions().pipe(takeUntil(this.destroy$)).subscribe(this.select.options$);
|
|
21
|
+
}
|
|
22
|
+
buildOptions() {
|
|
23
|
+
// Prevent a double call to getOptions when the clue is changed while the panel is closed
|
|
24
|
+
const clueIsPendingDebounce$ = merge(this.select.clueChange.pipe(map(() => true)), this.clue$.pipe(map(() => false))).pipe(distinctUntilChanged());
|
|
25
|
+
const isOpen$ = combineLatest([this.select.isPanelOpen$, clueIsPendingDebounce$]).pipe(debounceTime(0), startWith([false, false]), pairwise(), tap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => {
|
|
26
|
+
// Start the loader as soon as the panel is opened to avoid a short display of the "no result" message
|
|
27
|
+
if (!wasOpen && isOpen && clueIsPendingDebounce) {
|
|
28
|
+
this.select.loading = true;
|
|
29
|
+
}
|
|
30
|
+
}), map(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => (isOpen && !wasOpen ? !clueIsPendingDebounce : isOpen)), distinctUntilChanged());
|
|
31
|
+
return combineLatest([this.params$, isOpen$]).pipe(switchMap(([params, isOpened]) => isOpened
|
|
32
|
+
? this.page$.pipe(concatMap((page) => {
|
|
33
|
+
this.select.loading = true;
|
|
34
|
+
return this.getOptions(params, page).pipe(catchError(() => of([])), tap(() => (this.select.loading = false)));
|
|
35
|
+
}), takeWhile((items) => items.length === this.pageSize, true), scan((acc, items) => [...acc, ...items], []))
|
|
36
|
+
: of([])));
|
|
37
|
+
}
|
|
38
|
+
ngOnDestroy() {
|
|
39
|
+
this.destroy$.next();
|
|
40
|
+
this.destroy$.complete();
|
|
41
|
+
}
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: ALuCoreSelectApiDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
43
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: ALuCoreSelectApiDirective, ngImport: i0 }); }
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: ALuCoreSelectApiDirective, decorators: [{
|
|
46
|
+
type: Directive
|
|
47
|
+
}] });
|
|
48
|
+
|
|
49
|
+
class LuCoreSelectApiV3Directive extends ALuCoreSelectApiDirective {
|
|
50
|
+
constructor() {
|
|
51
|
+
super(...arguments);
|
|
52
|
+
this.url$ = new ReplaySubject(1);
|
|
53
|
+
this.fields$ = new BehaviorSubject('id,name');
|
|
54
|
+
this.orderBy$ = new BehaviorSubject('name,asc');
|
|
55
|
+
this.filters$ = new BehaviorSubject({});
|
|
56
|
+
this.httpClient = inject(HttpClient);
|
|
57
|
+
this.params$ = combineLatest([this.fields$, this.filters$, this.orderBy$, this.clue$]).pipe(map(([fields, filters, orderBy, clue]) => ({
|
|
58
|
+
...filters,
|
|
59
|
+
fields,
|
|
60
|
+
...(orderBy ? { orderBy } : {}),
|
|
61
|
+
...(clue ? { name: `like,${clue}` } : {}),
|
|
62
|
+
})));
|
|
63
|
+
this.optionComparer = (a, b) => a.id === b.id;
|
|
64
|
+
}
|
|
65
|
+
set apiV3(value) {
|
|
66
|
+
this.url$.next(value);
|
|
67
|
+
}
|
|
68
|
+
set fields(value) {
|
|
69
|
+
this.fields$.next(value);
|
|
70
|
+
}
|
|
71
|
+
set orderBy(value) {
|
|
72
|
+
this.orderBy$.next(value);
|
|
73
|
+
}
|
|
74
|
+
set filters(value) {
|
|
75
|
+
this.filters$.next(value);
|
|
76
|
+
}
|
|
77
|
+
getOptions(params, page) {
|
|
78
|
+
return this.url$.pipe(take(1), switchMap((url) => this.httpClient.get(url, {
|
|
79
|
+
params: {
|
|
80
|
+
...params,
|
|
81
|
+
paging: `${page * this.pageSize},${this.pageSize}`,
|
|
82
|
+
},
|
|
83
|
+
})), map((res) => res.data.items));
|
|
84
|
+
}
|
|
85
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LuCoreSelectApiV3Directive, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
86
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: LuCoreSelectApiV3Directive, isStandalone: true, selector: "lu-simple-select[apiV3],lu-multi-select[apiV3]", inputs: { apiV3: "apiV3", fields: "fields", orderBy: "orderBy", filters: "filters" }, usesInheritance: true, ngImport: i0 }); }
|
|
87
|
+
}
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LuCoreSelectApiV3Directive, decorators: [{
|
|
89
|
+
type: Directive,
|
|
90
|
+
args: [{
|
|
91
|
+
// The attribute is already prefixed with "lu-simple-select"
|
|
92
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
93
|
+
selector: 'lu-simple-select[apiV3],lu-multi-select[apiV3]',
|
|
94
|
+
standalone: true,
|
|
95
|
+
}]
|
|
96
|
+
}], propDecorators: { apiV3: [{
|
|
97
|
+
type: Input
|
|
98
|
+
}], fields: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], orderBy: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], filters: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}] } });
|
|
105
|
+
|
|
106
|
+
class LuCoreSelectApiV4Directive extends ALuCoreSelectApiDirective {
|
|
107
|
+
constructor() {
|
|
108
|
+
super(...arguments);
|
|
109
|
+
this.url$ = new ReplaySubject(1);
|
|
110
|
+
this.sort$ = new BehaviorSubject('+name');
|
|
111
|
+
this.filters$ = new BehaviorSubject({});
|
|
112
|
+
this.httpClient = inject(HttpClient);
|
|
113
|
+
this.params$ = combineLatest([this.filters$, this.sort$, this.clue$]).pipe(map(([filters, sort, clue]) => ({
|
|
114
|
+
...filters,
|
|
115
|
+
...(sort ? { sort } : {}),
|
|
116
|
+
...(clue ? { search: clue } : {}),
|
|
117
|
+
})));
|
|
118
|
+
this.optionComparer = (a, b) => a.id === b.id;
|
|
119
|
+
}
|
|
120
|
+
set apiV4(value) {
|
|
121
|
+
this.url$.next(value);
|
|
122
|
+
}
|
|
123
|
+
set sort(value) {
|
|
124
|
+
this.sort$.next(value);
|
|
125
|
+
}
|
|
126
|
+
set filters(value) {
|
|
127
|
+
this.filters$.next(value);
|
|
128
|
+
}
|
|
129
|
+
getOptions(params, page) {
|
|
130
|
+
return this.url$.pipe(take(1), switchMap((url) => this.httpClient.get(url, {
|
|
131
|
+
params: {
|
|
132
|
+
...params,
|
|
133
|
+
page: page + 1,
|
|
134
|
+
limit: this.pageSize,
|
|
135
|
+
},
|
|
136
|
+
})), map((res) => (Array.isArray(res) ? res : res?.items) ?? []));
|
|
137
|
+
}
|
|
138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LuCoreSelectApiV4Directive, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
139
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: LuCoreSelectApiV4Directive, isStandalone: true, selector: "lu-simple-select[apiV4],lu-multi-select[apiV4]", inputs: { apiV4: "apiV4", sort: "sort", filters: "filters" }, usesInheritance: true, ngImport: i0 }); }
|
|
140
|
+
}
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LuCoreSelectApiV4Directive, decorators: [{
|
|
142
|
+
type: Directive,
|
|
143
|
+
args: [{
|
|
144
|
+
// The attribute is already prefixed with "lu-simple-select"
|
|
145
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
146
|
+
selector: 'lu-simple-select[apiV4],lu-multi-select[apiV4]',
|
|
147
|
+
standalone: true,
|
|
148
|
+
}]
|
|
149
|
+
}], propDecorators: { apiV4: [{
|
|
150
|
+
type: Input
|
|
151
|
+
}], sort: [{
|
|
152
|
+
type: Input
|
|
153
|
+
}], filters: [{
|
|
154
|
+
type: Input
|
|
155
|
+
}] } });
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Generated bundle index. Do not edit.
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
export { ALuCoreSelectApiDirective, LuCoreSelectApiV3Directive, LuCoreSelectApiV4Directive };
|
|
162
|
+
//# sourceMappingURL=lucca-front-ng-core-select-api.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lucca-front-ng-core-select-api.mjs","sources":["../../../packages/ng/core-select/api/api.directive.ts","../../../packages/ng/core-select/api/api-v3.directive.ts","../../../packages/ng/core-select/api/api-v4.directive.ts","../../../packages/ng/core-select/api/lucca-front-ng-core-select-api.ts"],"sourcesContent":["import { Directive, inject, OnDestroy, OnInit } from '@angular/core';\nimport { ALuSelectInputComponent } from '@lucca-front/ng/core-select';\nimport { catchError, combineLatest, concatMap, debounceTime, distinctUntilChanged, map, merge, Observable, of, pairwise, scan, startWith, Subject, switchMap, takeUntil, takeWhile, tap } from 'rxjs';\n\nexport const MAGIC_PAGE_SIZE = 20;\nexport const MAGIC_DEBOUNCE_DURATION = 250;\n\n@Directive()\nexport abstract class ALuCoreSelectApiDirective<TOption, TParams = Record<string, string | number | boolean>> implements OnDestroy, OnInit {\n\tprotected destroy$ = new Subject<void>();\n\tprotected pageSize = MAGIC_PAGE_SIZE;\n\tprotected debounceDuration = MAGIC_DEBOUNCE_DURATION;\n\n\tprotected select = inject<ALuSelectInputComponent<TOption, unknown>>(ALuSelectInputComponent);\n\n\tprotected page$ = this.select.nextPage.pipe(\n\t\tscan((page) => page + 1, 0),\n\t\tstartWith(0),\n\t);\n\n\tprotected clue$ = this.select.clueChange.pipe(debounceTime(this.debounceDuration), startWith(''));\n\n\t/**\n\t * Create an object that will be used as params for the api call\n\t */\n\tprotected abstract params$: Observable<TParams>;\n\n\t/**\n\t * Compare two options to know if they are the same. For example, compare by id or by JSON\n\t */\n\tprotected abstract optionComparer: (a: TOption, b: TOption) => boolean;\n\n\t/**\n\t * Return the options for the given params and page\n\t */\n\tprotected abstract getOptions(params: TParams, page: number): Observable<TOption[]>;\n\n\tpublic ngOnInit(): void {\n\t\tthis.select.optionComparer = this.optionComparer;\n\t\tthis.buildOptions().pipe(takeUntil(this.destroy$)).subscribe(this.select.options$);\n\t}\n\n\tprotected buildOptions(): Observable<TOption[]> {\n\t\t// Prevent a double call to getOptions when the clue is changed while the panel is closed\n\t\tconst clueIsPendingDebounce$ = merge(this.select.clueChange.pipe(map(() => true)), this.clue$.pipe(map(() => false))).pipe(distinctUntilChanged());\n\t\tconst isOpen$ = combineLatest([this.select.isPanelOpen$, clueIsPendingDebounce$]).pipe(\n\t\t\tdebounceTime(0),\n\t\t\tstartWith([false, false]),\n\t\t\tpairwise(),\n\t\t\ttap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => {\n\t\t\t\t// Start the loader as soon as the panel is opened to avoid a short display of the \"no result\" message\n\t\t\t\tif (!wasOpen && isOpen && clueIsPendingDebounce) {\n\t\t\t\t\tthis.select.loading = true;\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmap(([[wasOpen], [isOpen, clueIsPendingDebounce]]) => (isOpen && !wasOpen ? !clueIsPendingDebounce : isOpen)),\n\t\t\tdistinctUntilChanged(),\n\t\t);\n\n\t\treturn combineLatest([this.params$, isOpen$]).pipe(\n\t\t\tswitchMap(([params, isOpened]) =>\n\t\t\t\tisOpened\n\t\t\t\t\t? this.page$.pipe(\n\t\t\t\t\t\t\tconcatMap((page) => {\n\t\t\t\t\t\t\t\tthis.select.loading = true;\n\t\t\t\t\t\t\t\treturn this.getOptions(params, page).pipe(\n\t\t\t\t\t\t\t\t\tcatchError(() => of([] as TOption[])),\n\t\t\t\t\t\t\t\t\ttap(() => (this.select.loading = false)),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\ttakeWhile((items) => items.length === this.pageSize, true),\n\t\t\t\t\t\t\tscan((acc, items) => [...acc, ...items], [] as TOption[]),\n\t\t\t\t\t )\n\t\t\t\t\t: of([] as TOption[]),\n\t\t\t),\n\t\t);\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\tthis.destroy$.next();\n\t\tthis.destroy$.complete();\n\t}\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Directive, inject, Input } from '@angular/core';\nimport { ILuApiCollectionResponse, ILuApiItem } from '@lucca-front/ng/api';\nimport { BehaviorSubject, combineLatest, map, Observable, ReplaySubject, switchMap, take } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV3],lu-multi-select[apiV3]',\n\tstandalone: true,\n})\nexport class LuCoreSelectApiV3Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> {\n\t@Input()\n\tpublic set apiV3(value: string) {\n\t\tthis.url$.next(value);\n\t}\n\n\t@Input()\n\tpublic set fields(value: string) {\n\t\tthis.fields$.next(value);\n\t}\n\n\t@Input()\n\tpublic set orderBy(value: string | null) {\n\t\tthis.orderBy$.next(value);\n\t}\n\n\t@Input()\n\tpublic set filters(value: Record<string, string | number | boolean>) {\n\t\tthis.filters$.next(value);\n\t}\n\n\tprotected url$ = new ReplaySubject<string>(1);\n\tprotected fields$ = new BehaviorSubject<string>('id,name');\n\tprotected orderBy$ = new BehaviorSubject<string | null>('name,asc');\n\tprotected filters$ = new BehaviorSubject<Record<string, string | number | boolean>>({});\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected override params$ = combineLatest([this.fields$, this.filters$, this.orderBy$, this.clue$]).pipe(\n\t\tmap(([fields, filters, orderBy, clue]) => ({\n\t\t\t...filters,\n\t\t\tfields,\n\t\t\t...(orderBy ? { orderBy } : {}),\n\t\t\t...(clue ? { name: `like,${clue}` } : {}),\n\t\t})),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.url$.pipe(\n\t\t\ttake(1),\n\t\t\tswitchMap((url) =>\n\t\t\t\tthis.httpClient.get<ILuApiCollectionResponse<T>>(url, {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\t...params,\n\t\t\t\t\t\tpaging: `${page * this.pageSize},${this.pageSize}`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tmap((res) => res.data.items),\n\t\t);\n\t}\n\n\tprotected override optionComparer = (a: T, b: T) => a.id === b.id;\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Directive, inject, Input } from '@angular/core';\nimport { ILuApiItem } from '@lucca-front/ng/api';\nimport { BehaviorSubject, combineLatest, map, Observable, ReplaySubject, switchMap, take } from 'rxjs';\nimport { ALuCoreSelectApiDirective } from './api.directive';\n\n@Directive({\n\t// The attribute is already prefixed with \"lu-simple-select\"\n\t// eslint-disable-next-line @angular-eslint/directive-selector\n\tselector: 'lu-simple-select[apiV4],lu-multi-select[apiV4]',\n\tstandalone: true,\n})\nexport class LuCoreSelectApiV4Directive<T extends ILuApiItem> extends ALuCoreSelectApiDirective<T> {\n\t@Input()\n\tpublic set apiV4(value: string) {\n\t\tthis.url$.next(value);\n\t}\n\n\t@Input()\n\tpublic set sort(value: string | null) {\n\t\tthis.sort$.next(value);\n\t}\n\n\t@Input()\n\tpublic set filters(value: Record<string, string | number | boolean>) {\n\t\tthis.filters$.next(value);\n\t}\n\n\tprotected url$ = new ReplaySubject<string>(1);\n\tprotected sort$ = new BehaviorSubject<string | null>('+name');\n\tprotected filters$ = new BehaviorSubject<Record<string, string | number | boolean>>({});\n\n\tprotected httpClient = inject(HttpClient);\n\n\tprotected override params$ = combineLatest([this.filters$, this.sort$, this.clue$]).pipe(\n\t\tmap(([filters, sort, clue]) => ({\n\t\t\t...filters,\n\t\t\t...(sort ? { sort } : {}),\n\t\t\t...(clue ? { search: clue } : {}),\n\t\t})),\n\t);\n\n\tprotected override getOptions(params: Record<string, string | number | boolean>, page: number): Observable<T[]> {\n\t\treturn this.url$.pipe(\n\t\t\ttake(1),\n\t\t\tswitchMap((url) =>\n\t\t\t\tthis.httpClient.get<T[] | { items: T[] }>(url, {\n\t\t\t\t\tparams: {\n\t\t\t\t\t\t...params,\n\t\t\t\t\t\tpage: page + 1,\n\t\t\t\t\t\tlimit: this.pageSize,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tmap((res) => (Array.isArray(res) ? res : res?.items) ?? []),\n\t\t);\n\t}\n\n\tprotected override optionComparer = (a: T, b: T) => a.id === b.id;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAIO,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,uBAAuB,GAAG,GAAG,CAAC;MAGrB,yBAAyB,CAAA;AAD/C,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,QAAQ,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A,SAAA,EAAA,CAAA,CAAA,EAAA;kGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gDAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,IAAA,EAAA,MAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBANtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;;;AAGV,oBAAA,QAAQ,EAAE,gDAAgD;AAC1D,oBAAA,UAAU,EAAE,IAAI;AAChB,iBAAA,CAAA;8BAGW,KAAK,EAAA,CAAA;sBADf,KAAK;gBAMK,IAAI,EAAA,CAAA;sBADd,KAAK;gBAMK,OAAO,EAAA,CAAA;sBADjB,KAAK;;;ACvBP;;AAEG;;;;"}
|
|
@@ -187,6 +187,7 @@ const SELECT_ID = new InjectionToken('LuSelectPanelData');
|
|
|
187
187
|
const SELECT_LABEL = new InjectionToken('LuSelectLabel');
|
|
188
188
|
const SELECT_LABEL_ID = new InjectionToken('LuSelectLabelId');
|
|
189
189
|
|
|
190
|
+
const MAGIC_OPTION_SCROLL_DELAY = 15;
|
|
190
191
|
class LuOptionComponent {
|
|
191
192
|
constructor() {
|
|
192
193
|
this.hasOptionItemClass = true;
|
|
@@ -221,7 +222,7 @@ class LuOptionComponent {
|
|
|
221
222
|
// a race condition somewhere that I can't find so this will just fix it for now.
|
|
222
223
|
setTimeout(() => {
|
|
223
224
|
this.elementRef.nativeElement.scrollIntoView(this.scrollIntoViewOptions);
|
|
224
|
-
},
|
|
225
|
+
}, MAGIC_OPTION_SCROLL_DELAY);
|
|
225
226
|
}
|
|
226
227
|
setInactiveStyles() {
|
|
227
228
|
this.isHighlighted$.next(false);
|
|
@@ -232,11 +233,11 @@ class LuOptionComponent {
|
|
|
232
233
|
}
|
|
233
234
|
}
|
|
234
235
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LuOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
235
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: LuOptionComponent, isStandalone: true, selector: "lu-select-option", inputs: { optionTpl: "optionTpl", isSelected: "isSelected", option: "option", optionIndex: "optionIndex", scrollIntoViewOptions: "scrollIntoViewOptions" }, host: { properties: { "class.optionItem": "this.hasOptionItemClass", "attr.aria-selected": "this.isSelected", "attr.role": "this.role", "attr.id": "this.id" } }, viewQueries: [{ propertyName: "optionContext", first: true, predicate: LuOptionOutletDirective, descendants: true, read: LU_OPTION_CONTEXT, static: true }], ngImport: i0, template: "<div\n\tclass=\"optionItem-value\"\n\t[class.is-selected]=\"isSelected\"\n\t[class.is-highlighted]=\"isHighlighted$ | async\"\n\t[class.is-disabled]=\"disabled\"\n\t(click)=\"selectOption($event)\"\n>\n\t<ng-container *luOptionOutlet=\"optionTpl; value: option\"></ng-container>\n</div>\n", styles: [":root{--components-options-item-padding-vertical: var(--spacings-XXS);--components-options-item-padding-horizontal: var(--spacings-XS);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-grey-800);--components-options-checkbox-left: .5rem;--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-primary-700);--components-options-checkbox-border-radius: 6px;--components-options-checkbox-border-color: var(--palettes-grey-700);--components-options-establishment-multiple-padding: 2rem}:host{display:block}.optionItem{position:relative}.optionItem-value{position:relative;border-radius:var(--commons-borderRadius-M);display:block;padding:var(--components-options-item-padding-vertical) var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer}.optionItem-value.is-selected{background-color:var(--palettes-primary-50)}.optionItem-value.is-selected:before{content:\"\";position:absolute;top:0;bottom:0;left:calc(var(--spacings-XXS) * -1);width:2px;background-color:var(--palettes-primary-700);border-top-right-radius:var(--commons-borderRadius-M);border-bottom-right-radius:var(--commons-borderRadius-M)}.optionItem-value.is-selected:hover{background-color:var(--palettes-primary-100)}.optionItem-value.is-selected:active{background-color:var(--palettes-primary-200)}.optionItem-value.is-selected.is-highlighted{background-color:var(--palettes-primary-100)}.optionItem-value.is-selected.is-highlighted:hover{background-color:var(--palettes-primary-200)}.optionItem-value:hover,.optionItem-value.is-highlighted,.optionItem-value.is-focus,.optionItem-value.is-highlighted:hover,.optionItem-value.is-focus:hover{background-color:var(--palettes-grey-50)}.optionItem-value.is-highlighted:active,.optionItem-value.is-focus:active,.optionItem-value:active{background-color:var(--palettes-grey-100)}:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.lu-select-value) .optionItem-value.is-focus,:host-context(.lu-select-value) .optionItem-value.is-highlighted{background-color:inherit}:host-context(.mod-multiple) .optionItem-value{position:relative;padding-left:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before{display:block;position:absolute;left:var(--components-options-checkbox-left);top:50%;transform:translateY(-50%)}:host-context(.mod-multiple) .optionItem-value:before{content:\"\";border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;height:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);width:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after{display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;color:transparent;font-size:var(--sizes-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:translateY(-50%) scale(0);transition:all .1s;width:var(--components-options-checkbox-size)}@supports (content: \"*\"/\"\"){:host-context(.mod-multiple) .optionItem-value:after{content:\"\\e97d\"/\"\"}}@supports not (content: \"*\"/\"\"){:host-context(.mod-multiple) .optionItem-value:after{content:\"\\e97d\"}}:host-context(.mod-multiple) .optionItem-value.is-selected:before{background-color:var(--components-options-checkbox-color);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple) .optionItem-value.is-selected:after{color:var(--colors-white-color);transform:translateY(-50%) scale(1)}:host-context(.mod-multiple) .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-grey-500)}:host-context(.mod-multiple) .optionItem-value:not(.is-disabled):hover:before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple).establishmentOption .optionItem-value{position:relative;padding-left:calc(var(--components-options-checkbox-size) + var(--spacings-XS) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after{left:var(--spacings-XS)}.is-disabled{color:var(--palettes-grey-500);-webkit-user-select:none;user-select:none;cursor:default}.is-disabled.is-selected{background-color:var(--palettes-grey-100)}.is-disabled:hover{background-color:inherit}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: LuOptionOutletDirective, selector: "[luOptionOutlet]", inputs: ["luOptionOutlet", "luOptionOutletValue", "luOptionShowNull"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
236
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: LuOptionComponent, isStandalone: true, selector: "lu-select-option", inputs: { optionTpl: "optionTpl", isSelected: "isSelected", option: "option", optionIndex: "optionIndex", scrollIntoViewOptions: "scrollIntoViewOptions" }, host: { properties: { "class.optionItem": "this.hasOptionItemClass", "attr.aria-selected": "this.isSelected", "attr.role": "this.role", "attr.id": "this.id" } }, viewQueries: [{ propertyName: "optionContext", first: true, predicate: LuOptionOutletDirective, descendants: true, read: LU_OPTION_CONTEXT, static: true }], ngImport: i0, template: "<div\n\tclass=\"optionItem-value\"\n\t[class.is-selected]=\"isSelected\"\n\t[class.is-highlighted]=\"isHighlighted$ | async\"\n\t[class.is-disabled]=\"disabled\"\n\t(click)=\"selectOption($event)\"\n>\n\t<ng-container *luOptionOutlet=\"optionTpl; value: option\"></ng-container>\n</div>\n", styles: [":root{--components-options-item-padding-vertical: var(--spacings-XXS);--components-options-item-padding-horizontal: var(--spacings-XS);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-grey-800);--components-options-checkbox-left: .5rem;--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-primary-700);--components-options-checkbox-border-radius: 6px;--components-options-checkbox-border-color: var(--palettes-grey-700);--components-options-establishment-multiple-padding: 2rem}:host{display:block;scroll-margin:var(--spacings-XXS)}.optionItem{position:relative}.optionItem-value{position:relative;border-radius:var(--commons-borderRadius-M);display:block;padding:var(--components-options-item-padding-vertical) var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer}.optionItem-value.is-selected{background-color:var(--palettes-primary-50)}.optionItem-value.is-selected:before{content:\"\";position:absolute;top:0;bottom:0;left:calc(var(--spacings-XXS) * -1);width:2px;background-color:var(--palettes-primary-700);border-top-right-radius:var(--commons-borderRadius-M);border-bottom-right-radius:var(--commons-borderRadius-M)}.optionItem-value.is-selected:hover{background-color:var(--palettes-primary-100)}.optionItem-value.is-selected:active{background-color:var(--palettes-primary-200)}.optionItem-value.is-selected.is-highlighted{background-color:var(--palettes-primary-100)}.optionItem-value.is-selected.is-highlighted:hover{background-color:var(--palettes-primary-200)}.optionItem-value:hover,.optionItem-value.is-highlighted,.optionItem-value.is-focus,.optionItem-value.is-highlighted:hover,.optionItem-value.is-focus:hover{background-color:var(--palettes-grey-50)}.optionItem-value.is-highlighted:active,.optionItem-value.is-focus:active,.optionItem-value:active{background-color:var(--palettes-grey-100)}:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.lu-select-value) .optionItem-value.is-focus,:host-context(.lu-select-value) .optionItem-value.is-highlighted{background-color:inherit}:host-context(.mod-multiple) .optionItem-value{position:relative;padding-left:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before{display:block;position:absolute;left:var(--components-options-checkbox-left);top:50%;transform:translateY(-50%)}:host-context(.mod-multiple) .optionItem-value:before{content:\"\";border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;height:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);width:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after{display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;color:transparent;font-size:var(--sizes-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:translateY(-50%) scale(0);transition:all .1s;width:var(--components-options-checkbox-size)}@supports (content: \"*\"/\"\"){:host-context(.mod-multiple) .optionItem-value:after{content:\"\\e97d\"/\"\"}}@supports not (content: \"*\"/\"\"){:host-context(.mod-multiple) .optionItem-value:after{content:\"\\e97d\"}}:host-context(.mod-multiple) .optionItem-value.is-selected:before{background-color:var(--components-options-checkbox-color);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple) .optionItem-value.is-selected:after{color:var(--colors-white-color);transform:translateY(-50%) scale(1)}:host-context(.mod-multiple) .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-grey-500)}:host-context(.mod-multiple) .optionItem-value:not(.is-disabled):hover:before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple).establishmentOption .optionItem-value{position:relative;padding-left:calc(var(--components-options-checkbox-size) + var(--spacings-XS) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after{left:var(--spacings-XS)}.is-disabled{color:var(--palettes-grey-500);-webkit-user-select:none;user-select:none;cursor:default}.is-disabled.is-selected{background-color:var(--palettes-grey-100)}.is-disabled:hover{background-color:inherit}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: LuOptionOutletDirective, selector: "[luOptionOutlet]", inputs: ["luOptionOutlet", "luOptionOutletValue", "luOptionShowNull"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
236
237
|
}
|
|
237
238
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LuOptionComponent, decorators: [{
|
|
238
239
|
type: Component,
|
|
239
|
-
args: [{ selector: 'lu-select-option', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [AsyncPipe, LuOptionOutletDirective], template: "<div\n\tclass=\"optionItem-value\"\n\t[class.is-selected]=\"isSelected\"\n\t[class.is-highlighted]=\"isHighlighted$ | async\"\n\t[class.is-disabled]=\"disabled\"\n\t(click)=\"selectOption($event)\"\n>\n\t<ng-container *luOptionOutlet=\"optionTpl; value: option\"></ng-container>\n</div>\n", styles: [":root{--components-options-item-padding-vertical: var(--spacings-XXS);--components-options-item-padding-horizontal: var(--spacings-XS);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-grey-800);--components-options-checkbox-left: .5rem;--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-primary-700);--components-options-checkbox-border-radius: 6px;--components-options-checkbox-border-color: var(--palettes-grey-700);--components-options-establishment-multiple-padding: 2rem}:host{display:block}.optionItem{position:relative}.optionItem-value{position:relative;border-radius:var(--commons-borderRadius-M);display:block;padding:var(--components-options-item-padding-vertical) var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer}.optionItem-value.is-selected{background-color:var(--palettes-primary-50)}.optionItem-value.is-selected:before{content:\"\";position:absolute;top:0;bottom:0;left:calc(var(--spacings-XXS) * -1);width:2px;background-color:var(--palettes-primary-700);border-top-right-radius:var(--commons-borderRadius-M);border-bottom-right-radius:var(--commons-borderRadius-M)}.optionItem-value.is-selected:hover{background-color:var(--palettes-primary-100)}.optionItem-value.is-selected:active{background-color:var(--palettes-primary-200)}.optionItem-value.is-selected.is-highlighted{background-color:var(--palettes-primary-100)}.optionItem-value.is-selected.is-highlighted:hover{background-color:var(--palettes-primary-200)}.optionItem-value:hover,.optionItem-value.is-highlighted,.optionItem-value.is-focus,.optionItem-value.is-highlighted:hover,.optionItem-value.is-focus:hover{background-color:var(--palettes-grey-50)}.optionItem-value.is-highlighted:active,.optionItem-value.is-focus:active,.optionItem-value:active{background-color:var(--palettes-grey-100)}:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.lu-select-value) .optionItem-value.is-focus,:host-context(.lu-select-value) .optionItem-value.is-highlighted{background-color:inherit}:host-context(.mod-multiple) .optionItem-value{position:relative;padding-left:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before{display:block;position:absolute;left:var(--components-options-checkbox-left);top:50%;transform:translateY(-50%)}:host-context(.mod-multiple) .optionItem-value:before{content:\"\";border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;height:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);width:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after{display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;color:transparent;font-size:var(--sizes-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:translateY(-50%) scale(0);transition:all .1s;width:var(--components-options-checkbox-size)}@supports (content: \"*\"/\"\"){:host-context(.mod-multiple) .optionItem-value:after{content:\"\\e97d\"/\"\"}}@supports not (content: \"*\"/\"\"){:host-context(.mod-multiple) .optionItem-value:after{content:\"\\e97d\"}}:host-context(.mod-multiple) .optionItem-value.is-selected:before{background-color:var(--components-options-checkbox-color);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple) .optionItem-value.is-selected:after{color:var(--colors-white-color);transform:translateY(-50%) scale(1)}:host-context(.mod-multiple) .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-grey-500)}:host-context(.mod-multiple) .optionItem-value:not(.is-disabled):hover:before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple).establishmentOption .optionItem-value{position:relative;padding-left:calc(var(--components-options-checkbox-size) + var(--spacings-XS) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after{left:var(--spacings-XS)}.is-disabled{color:var(--palettes-grey-500);-webkit-user-select:none;user-select:none;cursor:default}.is-disabled.is-selected{background-color:var(--palettes-grey-100)}.is-disabled:hover{background-color:inherit}\n"] }]
|
|
240
|
+
args: [{ selector: 'lu-select-option', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [AsyncPipe, LuOptionOutletDirective], template: "<div\n\tclass=\"optionItem-value\"\n\t[class.is-selected]=\"isSelected\"\n\t[class.is-highlighted]=\"isHighlighted$ | async\"\n\t[class.is-disabled]=\"disabled\"\n\t(click)=\"selectOption($event)\"\n>\n\t<ng-container *luOptionOutlet=\"optionTpl; value: option\"></ng-container>\n</div>\n", styles: [":root{--components-options-item-padding-vertical: var(--spacings-XXS);--components-options-item-padding-horizontal: var(--spacings-XS);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-grey-800);--components-options-checkbox-left: .5rem;--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-primary-700);--components-options-checkbox-border-radius: 6px;--components-options-checkbox-border-color: var(--palettes-grey-700);--components-options-establishment-multiple-padding: 2rem}:host{display:block;scroll-margin:var(--spacings-XXS)}.optionItem{position:relative}.optionItem-value{position:relative;border-radius:var(--commons-borderRadius-M);display:block;padding:var(--components-options-item-padding-vertical) var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer}.optionItem-value.is-selected{background-color:var(--palettes-primary-50)}.optionItem-value.is-selected:before{content:\"\";position:absolute;top:0;bottom:0;left:calc(var(--spacings-XXS) * -1);width:2px;background-color:var(--palettes-primary-700);border-top-right-radius:var(--commons-borderRadius-M);border-bottom-right-radius:var(--commons-borderRadius-M)}.optionItem-value.is-selected:hover{background-color:var(--palettes-primary-100)}.optionItem-value.is-selected:active{background-color:var(--palettes-primary-200)}.optionItem-value.is-selected.is-highlighted{background-color:var(--palettes-primary-100)}.optionItem-value.is-selected.is-highlighted:hover{background-color:var(--palettes-primary-200)}.optionItem-value:hover,.optionItem-value.is-highlighted,.optionItem-value.is-focus,.optionItem-value.is-highlighted:hover,.optionItem-value.is-focus:hover{background-color:var(--palettes-grey-50)}.optionItem-value.is-highlighted:active,.optionItem-value.is-focus:active,.optionItem-value:active{background-color:var(--palettes-grey-100)}:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.lu-select-value) .optionItem-value.is-focus,:host-context(.lu-select-value) .optionItem-value.is-highlighted{background-color:inherit}:host-context(.mod-multiple) .optionItem-value{position:relative;padding-left:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before{display:block;position:absolute;left:var(--components-options-checkbox-left);top:50%;transform:translateY(-50%)}:host-context(.mod-multiple) .optionItem-value:before{content:\"\";border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;height:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);width:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after{display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:Lucca icons;color:transparent;font-size:var(--sizes-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:translateY(-50%) scale(0);transition:all .1s;width:var(--components-options-checkbox-size)}@supports (content: \"*\"/\"\"){:host-context(.mod-multiple) .optionItem-value:after{content:\"\\e97d\"/\"\"}}@supports not (content: \"*\"/\"\"){:host-context(.mod-multiple) .optionItem-value:after{content:\"\\e97d\"}}:host-context(.mod-multiple) .optionItem-value.is-selected:before{background-color:var(--components-options-checkbox-color);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple) .optionItem-value.is-selected:after{color:var(--colors-white-color);transform:translateY(-50%) scale(1)}:host-context(.mod-multiple) .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-grey-500)}:host-context(.mod-multiple) .optionItem-value:not(.is-disabled):hover:before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple).establishmentOption .optionItem-value{position:relative;padding-left:calc(var(--components-options-checkbox-size) + var(--spacings-XS) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after{left:var(--spacings-XS)}.is-disabled{color:var(--palettes-grey-500);-webkit-user-select:none;user-select:none;cursor:default}.is-disabled.is-selected{background-color:var(--palettes-grey-100)}.is-disabled:hover{background-color:inherit}\n"] }]
|
|
240
241
|
}], propDecorators: { hasOptionItemClass: [{
|
|
241
242
|
type: HostBinding,
|
|
242
243
|
args: ['class.optionItem']
|
|
@@ -306,10 +307,10 @@ class ALuSelectInputComponent {
|
|
|
306
307
|
this.nextPage = new EventEmitter();
|
|
307
308
|
this.previousPage = new EventEmitter();
|
|
308
309
|
this.options$ = new ReplaySubject(1);
|
|
309
|
-
this.loading$ = new
|
|
310
|
+
this.loading$ = new BehaviorSubject(false);
|
|
310
311
|
this.clue = null;
|
|
311
312
|
// This is the clue stored after we selected an option to know if we should emit an empty clue on open or not
|
|
312
|
-
this.
|
|
313
|
+
this.lastEmittedClue = '';
|
|
313
314
|
this.destroyed$ = new Subject();
|
|
314
315
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
315
316
|
this.overlayContainerRef = inject(OverlayContainer).getContainerElement();
|
|
@@ -332,7 +333,9 @@ class ALuSelectInputComponent {
|
|
|
332
333
|
return this.overlayContainerRef.id;
|
|
333
334
|
}
|
|
334
335
|
set loading(value) {
|
|
335
|
-
this.loading
|
|
336
|
+
if (value !== this.loading) {
|
|
337
|
+
this.loading$.next(value);
|
|
338
|
+
}
|
|
336
339
|
}
|
|
337
340
|
set options(options) {
|
|
338
341
|
this.options$.next(options);
|
|
@@ -348,9 +351,12 @@ class ALuSelectInputComponent {
|
|
|
348
351
|
return this.value ? null : this.placeholder;
|
|
349
352
|
}
|
|
350
353
|
clueChanged(clue) {
|
|
351
|
-
this.clueChange.emit(clue);
|
|
352
354
|
if (!this.isPanelOpen) {
|
|
353
|
-
this.openPanel();
|
|
355
|
+
this.openPanel(clue);
|
|
356
|
+
}
|
|
357
|
+
else if (this.lastEmittedClue !== clue) {
|
|
358
|
+
this.clueChange.emit(clue);
|
|
359
|
+
this.lastEmittedClue = clue;
|
|
354
360
|
}
|
|
355
361
|
}
|
|
356
362
|
get panelRef() {
|
|
@@ -416,15 +422,12 @@ class ALuSelectInputComponent {
|
|
|
416
422
|
this.updateValue(null);
|
|
417
423
|
this.inputElementRef.nativeElement.focus();
|
|
418
424
|
}
|
|
419
|
-
openPanel() {
|
|
425
|
+
openPanel(clue = '') {
|
|
420
426
|
if (this.isPanelOpen || this.disabled) {
|
|
421
427
|
return;
|
|
422
428
|
}
|
|
423
429
|
this.isPanelOpen$.next(true);
|
|
424
|
-
|
|
425
|
-
this.clueChanged('');
|
|
426
|
-
this.previousClue = null;
|
|
427
|
-
}
|
|
430
|
+
this.clueChanged(clue);
|
|
428
431
|
this._panelRef = this.buildPanelRef();
|
|
429
432
|
this.bindInputToPanelRefEvents();
|
|
430
433
|
setTimeout(() => this.focusInput());
|
|
@@ -449,7 +452,6 @@ class ALuSelectInputComponent {
|
|
|
449
452
|
}
|
|
450
453
|
emptyClue() {
|
|
451
454
|
if (this.clue) {
|
|
452
|
-
this.previousClue = this.clue;
|
|
453
455
|
this.clue = null;
|
|
454
456
|
}
|
|
455
457
|
}
|