@lucca-front/ng 22.1.0-rc.1 → 22.1.0-rc.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/README.md +1 -0
- package/fesm2022/lucca-front-ng-a11y.mjs +1 -0
- package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-activity-feed.mjs +15 -12
- package/fesm2022/lucca-front-ng-activity-feed.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-approbation-inbox.mjs +3 -3
- package/fesm2022/lucca-front-ng-approbation-inbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-box.mjs +1 -1
- package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs +1 -1
- package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-bubble-icon.mjs +2 -2
- package/fesm2022/lucca-front-ng-bubble-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-callout.mjs +3 -3
- package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-chip.mjs +14 -7
- package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-clear.mjs +1 -1
- package/fesm2022/lucca-front-ng-clear.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-api.mjs +42 -3
- package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs +32 -9
- package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +11 -0
- package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-legal-units.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select-user.mjs +32 -32
- package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-core-select.mjs +309 -39
- package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-data-table.mjs +22 -14
- package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date.mjs +2 -4
- package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-date2.mjs +210 -107
- package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dialog.mjs +9 -4
- package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-dropdown.mjs +3 -0
- package/fesm2022/lucca-front-ng-dropdown.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-fancy-box.mjs +47 -24
- package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-file-upload.mjs +6 -6
- package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-filter-pills-core.mjs +55 -0
- package/fesm2022/lucca-front-ng-filter-pills-core.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-filter-pills.mjs +119 -70
- package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-field.mjs +110 -28
- package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form-label.mjs +2 -2
- package/fesm2022/lucca-front-ng-form-label.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-form.mjs +42 -5
- package/fesm2022/lucca-front-ng-form.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +15 -13
- package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs +5 -2
- package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +61 -29
- package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-forms.mjs +23 -16
- package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-highlight-data.mjs +6 -7
- package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-impersonation.mjs +20 -5
- package/fesm2022/lucca-front-ng-impersonation.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-index-table.mjs +13 -8
- package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs +1 -1
- package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-link.mjs +9 -4
- package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-listbox.mjs +3 -2
- package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-markdown.mjs +51 -0
- package/fesm2022/lucca-front-ng-markdown.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-mobile-push.mjs +2 -2
- package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-modal.mjs +9 -4
- package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-multi-select.mjs +153 -48
- package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-option.mjs +6 -2
- package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs +1 -1
- package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-picker.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs +1 -1
- package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-popover2.mjs +21 -12
- package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-priority-levels.mjs +128 -0
- package/fesm2022/lucca-front-ng-priority-levels.mjs.map +1 -0
- package/fesm2022/lucca-front-ng-progress-stepper.mjs +2 -2
- package/fesm2022/lucca-front-ng-progress-stepper.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-read-more.mjs +3 -3
- package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-resource-card.mjs +2 -2
- package/fesm2022/lucca-front-ng-resource-card.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-safe-content.mjs +43 -3
- package/fesm2022/lucca-front-ng-safe-content.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-scroll-box.mjs +8 -4
- package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +9 -4
- package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-segmented-control.mjs +10 -5
- package/fesm2022/lucca-front-ng-segmented-control.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-select.mjs +1 -1
- package/fesm2022/lucca-front-ng-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-simple-select.mjs +71 -17
- package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs +1 -1
- package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-software-icon.mjs +1 -1
- package/fesm2022/lucca-front-ng-software-icon.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-status-badge.mjs +1 -1
- package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-time.mjs +1 -1
- package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
- package/fesm2022/lucca-front-ng-user-popover.mjs +3 -2
- package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
- package/package.json +17 -4
- package/schematics/collection.json +5 -0
- package/schematics/deprecated-resolver/index.js +1 -4
- package/schematics/file-upload/index.js +22 -0
- package/schematics/file-upload/migration.js +230 -0
- package/schematics/file-upload/migration.spec.js +56 -0
- package/schematics/file-upload/schema.json +23 -0
- package/schematics/lib/angular-component-ast.js +3 -1
- package/schematics/lib/deprecated-mapper.js +2 -10
- package/schematics/lib/html-ast.js +26 -0
- package/src/components/_listbox.scss +12 -6
- package/src/components/cdk/_overlay.scss +3 -1
- package/types/lucca-front-ng-activity-feed.d.ts +16 -10
- package/types/lucca-front-ng-approbation-inbox.d.ts +32 -25
- package/types/lucca-front-ng-box.d.ts +12 -6
- package/types/lucca-front-ng-breadcrumbs.d.ts +12 -7
- package/types/lucca-front-ng-chip.d.ts +16 -9
- package/types/lucca-front-ng-clear.d.ts +12 -8
- package/types/lucca-front-ng-core-select-api.d.ts +30 -1
- package/types/lucca-front-ng-core-select-establishment.d.ts +7 -0
- package/types/lucca-front-ng-core-select-job-qualification.d.ts +8 -0
- package/types/lucca-front-ng-core-select-user.d.ts +6 -0
- package/types/lucca-front-ng-core-select.d.ts +115 -7
- package/types/lucca-front-ng-data-table.d.ts +16 -10
- package/types/lucca-front-ng-date.d.ts +12 -10
- package/types/lucca-front-ng-date2.d.ts +46 -21
- package/types/lucca-front-ng-fancy-box.d.ts +29 -12
- package/types/lucca-front-ng-file-upload.d.ts +41 -36
- package/types/lucca-front-ng-filter-pills-core.d.ts +69 -0
- package/types/lucca-front-ng-filter-pills.d.ts +53 -69
- package/types/lucca-front-ng-form-field.d.ts +34 -5
- package/types/lucca-front-ng-form-label.d.ts +13 -8
- package/types/lucca-front-ng-form.d.ts +7 -1
- package/types/lucca-front-ng-forms-rich-text-input.d.ts +40 -35
- package/types/lucca-front-ng-forms.d.ts +36 -44
- package/types/lucca-front-ng-highlight-data.d.ts +1 -2
- package/types/lucca-front-ng-impersonation.d.ts +28 -10
- package/types/lucca-front-ng-index-table.d.ts +3 -1
- package/types/lucca-front-ng-link.d.ts +16 -7
- package/types/lucca-front-ng-markdown.d.ts +24 -0
- package/types/lucca-front-ng-mobile-push.d.ts +18 -12
- package/types/lucca-front-ng-multi-select.d.ts +10 -1
- package/types/lucca-front-ng-option.d.ts +8 -8
- package/types/lucca-front-ng-pagination.d.ts +15 -10
- package/types/lucca-front-ng-picker.d.ts +2 -2
- package/types/lucca-front-ng-plg-push.d.ts +12 -6
- package/types/lucca-front-ng-popover2.d.ts +7 -1
- package/types/lucca-front-ng-priority-levels.d.ts +44 -0
- package/types/lucca-front-ng-read-more.d.ts +13 -9
- package/types/lucca-front-ng-safe-content.d.ts +8 -2
- package/types/lucca-front-ng-segmented-control-tabs.d.ts +5 -1
- package/types/lucca-front-ng-segmented-control.d.ts +5 -1
- package/types/lucca-front-ng-select.d.ts +6 -6
- package/types/lucca-front-ng-simple-select.d.ts +5 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Directive, InjectionToken, inject, ChangeDetectionStrategy, Component, TemplateRef, Pipe, ViewContainerRef, Injector, afterNextRender, DestroyRef,
|
|
3
|
-
import { syncInputSignal, ɵeffectWithDeps as _effectWithDeps, isNotNil, luBooleanAttribute, intlInputOptions, luOptionalNumberAttribute, isNil, PortalDirective, luNumberAttribute } from '@lucca-front/ng/core';
|
|
2
|
+
import { input, Directive, InjectionToken, inject, ChangeDetectionStrategy, Component, TemplateRef, Pipe, ViewContainerRef, Injector, afterNextRender, DestroyRef, afterRenderEffect, untracked, computed, Injectable, ElementRef, signal, model, linkedSignal, output, contentChild, viewChild, ChangeDetectorRef, forwardRef, booleanAttribute, ViewEncapsulation, effect, EventEmitter, ApplicationRef, DOCUMENT, NgZone } from '@angular/core';
|
|
3
|
+
import { syncInputSignal, ɵeffectWithDeps as _effectWithDeps, isNotNil, luBooleanAttribute, intlInputOptions, luOptionalNumberAttribute, isNil, PortalDirective, luNullableNumberAttribute, injectMediaMinBreakpoint, luNumberAttribute } from '@lucca-front/ng/core';
|
|
4
4
|
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
5
5
|
import { toObservable, toSignal, takeUntilDestroyed, outputFromObservable } from '@angular/core/rxjs-interop';
|
|
6
|
-
import { FILTER_PILL_INPUT_COMPONENT, FILTER_PILL_HOST_COMPONENT } from '@lucca-front/ng/filter-pills';
|
|
7
|
-
import {
|
|
6
|
+
import { FILTER_PILL_INPUT_COMPONENT, FILTER_PILL_HOST_COMPONENT } from '@lucca-front/ng/filter-pills/core';
|
|
7
|
+
import { FORM_FIELD_INSTANCE } from '@lucca-front/ng/form-field';
|
|
8
|
+
import { BehaviorSubject, skip, take, map, startWith, switchMap, of, distinctUntilChanged, observeOn, asyncScheduler, filter, EMPTY, timer, defer, catchError, defaultIfEmpty, tap, expand, scan, takeWhile, finalize, ReplaySubject, Subject } from 'rxjs';
|
|
8
9
|
import { AsyncPipe, NgTemplateOutlet } from '@angular/common';
|
|
9
10
|
import { Treeitem, OptionComponent } from '@lucca-front/ng/listbox';
|
|
10
11
|
import { LuTooltipTriggerDirective } from '@lucca-front/ng/tooltip';
|
|
@@ -268,6 +269,53 @@ function getGroupTemplateLocation(hasGrouping, clue, options, searchable = true)
|
|
|
268
269
|
}));
|
|
269
270
|
return toSignal(location$, { initialValue: hasGrouping() ? 'group-header' : 'none' });
|
|
270
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* Requests the next page for as long as the panel's scroll viewport can't scroll.
|
|
274
|
+
*
|
|
275
|
+
* Pagination is driven by the scroll event: reaching the bottom of the viewport asks the consumer
|
|
276
|
+
* for the next page. A page that doesn't overflow the viewport therefore never asks for anything —
|
|
277
|
+
* there is nothing to scroll. The popover panel caps its content at 20rem, which a page of options
|
|
278
|
+
* always overflows, so this never came up; the bottom sheet is only as tall as its content instead,
|
|
279
|
+
* so a first page of a few options leaves it short of a scrollbar and pagination stops right there.
|
|
280
|
+
*
|
|
281
|
+
* So the viewport is measured again after every render and, while it still can't scroll, the next
|
|
282
|
+
* page is requested. The option count is what guards against an endless loop: a page that brought
|
|
283
|
+
* no new option — the data source is exhausted — is never requested twice. A new search landing on
|
|
284
|
+
* exactly the same count as the last requested page is the one case left unfilled, which the next
|
|
285
|
+
* scroll — or the next keystroke — resolves on its own.
|
|
286
|
+
*
|
|
287
|
+
* The request itself is deferred by a microtask: the panel's first render happens inside the sheet's
|
|
288
|
+
* own `ApplicationRef.tick()`, which `openPanel` runs *before* subscribing the select input to the
|
|
289
|
+
* panel ref, so a page requested straight from that render would be emitted into the void. A
|
|
290
|
+
* microtask lands once `openPanel` has returned, still well ahead of anything the user could do.
|
|
291
|
+
*
|
|
292
|
+
* Must be called from an injection context.
|
|
293
|
+
*/
|
|
294
|
+
function fillScrollViewport({ viewport, optionCount, loading, nextPage, }) {
|
|
295
|
+
let lastRequestedCount = null;
|
|
296
|
+
let destroyed = false;
|
|
297
|
+
inject(DestroyRef).onDestroy(() => (destroyed = true));
|
|
298
|
+
afterRenderEffect({
|
|
299
|
+
read: () => {
|
|
300
|
+
const element = viewport();
|
|
301
|
+
const count = optionCount();
|
|
302
|
+
if (!element || loading() || count === 0 || count === lastRequestedCount) {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
// `scrollHeight` and `clientHeight` are both rounded, so a sub-pixel difference between
|
|
306
|
+
// them isn't a scrollbar: the same 1px tolerance as the panels' scroll handler applies.
|
|
307
|
+
if (element.scrollHeight - element.clientHeight > 1) {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
lastRequestedCount = count;
|
|
311
|
+
queueMicrotask(() => {
|
|
312
|
+
if (!destroyed) {
|
|
313
|
+
untracked(nextPage);
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
},
|
|
317
|
+
});
|
|
318
|
+
}
|
|
271
319
|
|
|
272
320
|
class CoreSelectKeyManager {
|
|
273
321
|
#destroyRef = inject(DestroyRef);
|
|
@@ -571,12 +619,12 @@ class LuOptionComponent {
|
|
|
571
619
|
}
|
|
572
620
|
}
|
|
573
621
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: LuOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
574
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: LuOptionComponent, isStandalone: true, selector: "lu-select-option", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, optionTpl: { classPropertyName: "optionTpl", publicName: "optionTpl", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, grouping: { classPropertyName: "grouping", publicName: "grouping", isSignal: true, isRequired: false, transformFunction: null }, hasChildren: { classPropertyName: "hasChildren", publicName: "hasChildren", isSignal: true, isRequired: false, transformFunction: null }, groupIndex: { classPropertyName: "groupIndex", publicName: "groupIndex", isSignal: true, isRequired: false, transformFunction: null }, optionIndex: { classPropertyName: "optionIndex", publicName: "optionIndex", isSignal: true, isRequired: true, transformFunction: null }, scrollIntoViewOptions: { classPropertyName: "scrollIntoViewOptions", publicName: "scrollIntoViewOptions", isSignal: true, isRequired: false, transformFunction: null }, groupTemplateLocation: { classPropertyName: "groupTemplateLocation", publicName: "groupTemplateLocation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onlyParent: "onlyParent", onlyChildren: "onlyChildren" }, queries: [{ propertyName: "treeitemContent", first: true, predicate: Treeitem, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "optionContext", first: true, predicate: LU_OPTION_CONTEXT, descendants: true, isSignal: true }], ngImport: i0, template: "<lu-listbox-option\n\t[checked]=\"selectableItem.isSelected()\"\n\t[hovered]=\"selectableItem.isHighlighted()\"\n\t[disabled]=\"selectableItem.disabled\"\n\t(click)=\"selectOption($event)\"\n\t[elementId]=\"selectableItem.idAttribute()\"\n\t[treeitemLevel]=\"treeitemContent() ? level : null\"\n>\n\t<ng-container [ngTemplateOutlet]=\"optionContent\" />\n\t<!-- Re-projected into the option's own wrapper, so the tree rows are stacked by the listbox\n\titself: the level has to be passed along because a content query stops at this ng-content -->\n\t<ng-content select=\"[treeitem]\" ngProjectAs=\"[treeitem]\" />\n</lu-listbox-option>\n\n<ng-template #optionContent>\n\t<div>\n\t\t<ng-container *luOptionOutlet=\"optionTpl(); value: selectableItem.option()\" />\n\n\t\t@if (groupTemplateLocation() === \"option\") {\n\t\t\t@if (grouping(); as grouping) {\n\t\t\t\t<div class=\"listboxOption-content-group\">\n\t\t\t\t\t<ng-container *luPortal=\"grouping.content; context: { $implicit: selectableItem.option() | luOptionGroup: grouping.selector }\" />\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t</div>\n\n\t@if (hasChildren() && !selectableItem.disabled) {\n\t\t<div class=\"optionItem-icons\">\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon parentOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyParent.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyParent\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyParent }}</span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon childrenOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyChildren.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyChildren\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyChildren }}</span>\n\t\t\t</span>\n\t\t</div>\n\t}\n</ng-template>\n", styles: ["@charset \"UTF-8\";@layer base{:root{--components-options-item-padding-vertical: var(--pr-t-spacings-50);--components-options-item-padding-horizontal: var(--pr-t-spacings-100);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-neutral-800);--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));--components-options-checkbox-border-radius: var(--pr-t-border-radius-small);--components-options-checkbox-border-color: var(--palettes-neutral-700);--components-options-establishment-multiple-padding: 2rem}}@layer reset,base,components,mods,product,utils;@layer components{:host{--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));display:block;scroll-margin:var(--pr-t-spacings-50)}.listboxOption[role=group] :host{scroll-margin-block-start:var(--pr-t-spacings-400)}}@layer mods{:host.withAddOption{scroll-margin-block-end:var(--pr-t-spacings-600)}}@layer components{.optionItem{position:relative}}@layer components{.optionItem-value{position:relative;border-radius:var(--pr-t-border-radius-default);display:block;padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer;overflow-wrap:anywhere}.optionItem-value ::ng-deep .avatar{margin-inline-end:var(--pr-t-spacings-75)}}@layer mods{.optionItem-value.is-selected,:host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-50, var(--palettes-product-50))}.optionItem-value.is-selected:before,:host-context([aria-selected=true]) .optionItem-value:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:calc(var(--pr-t-spacings-50) * -1);inline-size:2px;background-color:var(--palettes-700, var(--palettes-product-700));border-start-end-radius:var(--pr-t-border-radius-default);border-end-end-radius:var(--pr-t-border-radius-default)}:host-context(.optionItem.is-highlighted) .optionItem-value.is-selected,:host-context(.optionItem.is-highlighted) :host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-100, var(--palettes-product-100))}.optionItem-value.is-selected:active,:host-context([aria-selected=true]) .optionItem-value:active{background-color:var(--palettes-200, var(--palettes-product-200))}:host-context(.optionItem.is-highlighted) .optionItem-value{background-color:var(--palettes-neutral-50)}.optionItem-value:active{background-color:var(--palettes-neutral-100)}}@layer components{:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}}@layer mods{:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.optionItem.is-highlighted) :host-context(.lu-select-value) .optionItem-value{background-color:inherit}}@layer mods{:host-context(.mod-multiple) .optionItem-value,.formerEmployeeDisplayer .optionItem-value,.archivedLegalUnitsDisplayer .optionItem-value{position:relative;padding-inline-start:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:before{display:block;position:absolute;inset-inline-start:var(--pr-t-spacings-100);inset-block-start:var(--pr-t-spacings-75)}:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:before{content:\"\";background-color:var(--palettes-neutral-0);border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;block-size:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:after{--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;color:transparent;font-size:var(--pr-t-font-body-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:scale(0);transition:all .1s;inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value.is-selected:before,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value: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,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value:after{color:var(--palettes-neutral-0);transform:scale(1)}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-color: var(--commons-disabled-background);background-color:transparent}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled:after,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled:after{color:var(--palettes-neutral-500)}:host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-neutral-500)}:host-context(.optionItem.is-highlighted) :host-context(.mod-multiple) .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .formerEmployeeDisplayer .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .archivedLegalUnitsDisplayer .optionItem-value:not(.is-disabled):before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}}@layer components{:host-context(.mod-multiple).establishmentOption .optionItem-value,.formerEmployeeDisplayer.establishmentOption .optionItem-value,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value{position:relative;padding-inline-start:calc(var(--components-options-checkbox-size) + var(--pr-t-spacings-100) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after,.formerEmployeeDisplayer.establishmentOption .optionItem-value:before,.formerEmployeeDisplayer.establishmentOption .optionItem-value:after,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:before,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:after{inset-inline-start:var(--pr-t-spacings-100)}}@layer components{.optionItem:not(:last-child){margin-block-end:var(--pr-t-spacings-50)}.optionItem:hover .optionItem-value{background:var(--palettes-neutral-50)}.optionItem:hover .optionItem-icons{opacity:1}.optionItem-value{padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal)}.optionItem-icons{position:absolute;inset-block-start:var(--pr-t-spacings-50);inset-inline-end:var(--pr-t-spacings-100);opacity:0;transition:all var(--commons-animations-durations-fast) ease}.optionItem-icon{cursor:pointer;opacity:.66;margin-inline-start:var(--pr-t-spacings-100);transition:all var(--commons-animations-durations-fast) ease}.optionItem-icon:hover{opacity:1}.optionItem-icon-shape{fill:var(--components-options-item-icon-color);inline-size:1.4rem;block-size:1.4rem}}\n"], dependencies: [{ kind: "directive", type: LuOptionOutletDirective, selector: "[luOptionOutlet]", inputs: ["luOptionOutlet", "luOptionOutletValue", "luOptionShowNull"] }, { kind: "directive", type: PortalDirective, selector: "[luPortal]", inputs: ["luPortal", "luPortalContext"] }, { kind: "directive", type: LuTooltipTriggerDirective, selector: "[luTooltip],[prTooltip]", inputs: ["luTooltip", "prTooltip", "luTooltipEnterDelay", "prTooltipEnterDelay", "luTooltipLeaveDelay", "prTooltipLeaveDelay", "luTooltipDisabled", "prTooltipDisabled", "luTooltipOnlyForDisplay", "prTooltipOnlyForDisplay", "luTooltipPosition", "prTooltipPosition", "luTooltipWhenEllipsis", "prTooltipWhenEllipsis", "luTooltipAnchor", "prTooltipAnchor", "id"], exportAs: ["luTooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OptionComponent, selector: "lu-listbox-option", inputs: ["elementId", "checked", "mixed", "disabled", "hovered", "add", "group", "groupId", "select", "selectAll", "treeitemLevel"] }, { kind: "pipe", type: LuOptionGroupPipe, name: "luOptionGroup" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
622
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: LuOptionComponent, isStandalone: true, selector: "lu-select-option", inputs: { intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null }, optionTpl: { classPropertyName: "optionTpl", publicName: "optionTpl", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, grouping: { classPropertyName: "grouping", publicName: "grouping", isSignal: true, isRequired: false, transformFunction: null }, hasChildren: { classPropertyName: "hasChildren", publicName: "hasChildren", isSignal: true, isRequired: false, transformFunction: null }, groupIndex: { classPropertyName: "groupIndex", publicName: "groupIndex", isSignal: true, isRequired: false, transformFunction: null }, optionIndex: { classPropertyName: "optionIndex", publicName: "optionIndex", isSignal: true, isRequired: true, transformFunction: null }, scrollIntoViewOptions: { classPropertyName: "scrollIntoViewOptions", publicName: "scrollIntoViewOptions", isSignal: true, isRequired: false, transformFunction: null }, groupTemplateLocation: { classPropertyName: "groupTemplateLocation", publicName: "groupTemplateLocation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onlyParent: "onlyParent", onlyChildren: "onlyChildren" }, queries: [{ propertyName: "treeitemContent", first: true, predicate: Treeitem, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "optionContext", first: true, predicate: LU_OPTION_CONTEXT, descendants: true, isSignal: true }], ngImport: i0, template: "<lu-listbox-option\n\t[checked]=\"selectableItem.isSelected()\"\n\t[hovered]=\"selectableItem.isHighlighted()\"\n\t[disabled]=\"selectableItem.disabled\"\n\t(click)=\"selectOption($event)\"\n\t[elementId]=\"selectableItem.idAttribute()\"\n\t[treeitemLevel]=\"treeitemContent() ? level : null\"\n>\n\t<ng-container [ngTemplateOutlet]=\"optionContent\" />\n\t<!-- Re-projected into the option's own wrapper, so the tree rows are stacked by the listbox\n\titself: the level has to be passed along because a content query stops at this ng-content -->\n\t<ng-content select=\"[treeitem]\" ngProjectAs=\"[treeitem]\" />\n</lu-listbox-option>\n\n<ng-template #optionContent>\n\t<div class=\"listboxOption-content-value\">\n\t\t<ng-container *luOptionOutlet=\"optionTpl(); value: selectableItem.option()\" />\n\n\t\t@if (groupTemplateLocation() === \"option\") {\n\t\t\t@if (grouping(); as grouping) {\n\t\t\t\t<div class=\"listboxOption-content-group\">\n\t\t\t\t\t<ng-container *luPortal=\"grouping.content; context: { $implicit: selectableItem.option() | luOptionGroup: grouping.selector }\" />\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t</div>\n\n\t@if (hasChildren() && !selectableItem.disabled) {\n\t\t<div class=\"optionItem-icons\">\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon parentOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyParent.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyParent\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyParent }}</span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon childrenOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyChildren.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyChildren\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyChildren }}</span>\n\t\t\t</span>\n\t\t</div>\n\t}\n</ng-template>\n", styles: ["@charset \"UTF-8\";@layer base{:root{--components-options-item-padding-vertical: var(--pr-t-spacings-50);--components-options-item-padding-horizontal: var(--pr-t-spacings-100);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-neutral-800);--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));--components-options-checkbox-border-radius: var(--pr-t-border-radius-small);--components-options-checkbox-border-color: var(--palettes-neutral-700);--components-options-establishment-multiple-padding: 2rem}}@layer reset,base,components,mods,product,utils;@layer components{:host{--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));display:block;scroll-margin:var(--pr-t-spacings-50)}.listboxOption[role=group] :host{scroll-margin-block-start:var(--pr-t-spacings-400)}}@layer mods{:host.withAddOption{scroll-margin-block-end:var(--pr-t-spacings-600)}}@layer components{.optionItem{position:relative}}@layer components{.optionItem-value{position:relative;border-radius:var(--pr-t-border-radius-default);display:block;padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer;overflow-wrap:anywhere}.optionItem-value ::ng-deep .avatar{margin-inline-end:var(--pr-t-spacings-75)}}@layer mods{.optionItem-value.is-selected,:host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-50, var(--palettes-product-50))}.optionItem-value.is-selected:before,:host-context([aria-selected=true]) .optionItem-value:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:calc(var(--pr-t-spacings-50) * -1);inline-size:2px;background-color:var(--palettes-700, var(--palettes-product-700));border-start-end-radius:var(--pr-t-border-radius-default);border-end-end-radius:var(--pr-t-border-radius-default)}:host-context(.optionItem.is-highlighted) .optionItem-value.is-selected,:host-context(.optionItem.is-highlighted) :host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-100, var(--palettes-product-100))}.optionItem-value.is-selected:active,:host-context([aria-selected=true]) .optionItem-value:active{background-color:var(--palettes-200, var(--palettes-product-200))}:host-context(.optionItem.is-highlighted) .optionItem-value{background-color:var(--palettes-neutral-50)}.optionItem-value:active{background-color:var(--palettes-neutral-100)}}@layer components{:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}}@layer mods{:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.optionItem.is-highlighted) :host-context(.lu-select-value) .optionItem-value{background-color:inherit}}@layer mods{:host-context(.mod-multiple) .optionItem-value,.formerEmployeeDisplayer .optionItem-value,.archivedLegalUnitsDisplayer .optionItem-value{position:relative;padding-inline-start:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:before{display:block;position:absolute;inset-inline-start:var(--pr-t-spacings-100);inset-block-start:var(--pr-t-spacings-75)}:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:before{content:\"\";background-color:var(--palettes-neutral-0);border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;block-size:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:after{--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;color:transparent;font-size:var(--pr-t-font-body-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:scale(0);transition:all .1s;inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value.is-selected:before,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value: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,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value:after{color:var(--palettes-neutral-0);transform:scale(1)}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-color: var(--commons-disabled-background);background-color:transparent}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled:after,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled:after{color:var(--palettes-neutral-500)}:host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-neutral-500)}:host-context(.optionItem.is-highlighted) :host-context(.mod-multiple) .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .formerEmployeeDisplayer .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .archivedLegalUnitsDisplayer .optionItem-value:not(.is-disabled):before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}}@layer components{:host-context(.mod-multiple).establishmentOption .optionItem-value,.formerEmployeeDisplayer.establishmentOption .optionItem-value,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value{position:relative;padding-inline-start:calc(var(--components-options-checkbox-size) + var(--pr-t-spacings-100) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after,.formerEmployeeDisplayer.establishmentOption .optionItem-value:before,.formerEmployeeDisplayer.establishmentOption .optionItem-value:after,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:before,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:after{inset-inline-start:var(--pr-t-spacings-100)}}@layer components{.optionItem:not(:last-child){margin-block-end:var(--pr-t-spacings-50)}.optionItem:hover .optionItem-value{background:var(--palettes-neutral-50)}.optionItem:hover .optionItem-icons{opacity:1}.optionItem-value{padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal)}.optionItem-icons{position:absolute;inset-block-start:var(--pr-t-spacings-50);inset-inline-end:var(--pr-t-spacings-100);opacity:0;transition:all var(--commons-animations-durations-fast) ease}.optionItem-icon{cursor:pointer;opacity:.66;margin-inline-start:var(--pr-t-spacings-100);transition:all var(--commons-animations-durations-fast) ease}.optionItem-icon:hover{opacity:1}.optionItem-icon-shape{fill:var(--components-options-item-icon-color);inline-size:1.4rem;block-size:1.4rem}}\n"], dependencies: [{ kind: "directive", type: LuOptionOutletDirective, selector: "[luOptionOutlet]", inputs: ["luOptionOutlet", "luOptionOutletValue", "luOptionShowNull"] }, { kind: "directive", type: PortalDirective, selector: "[luPortal]", inputs: ["luPortal", "luPortalContext"] }, { kind: "directive", type: LuTooltipTriggerDirective, selector: "[luTooltip],[prTooltip]", inputs: ["luTooltip", "prTooltip", "luTooltipEnterDelay", "prTooltipEnterDelay", "luTooltipLeaveDelay", "prTooltipLeaveDelay", "luTooltipDisabled", "prTooltipDisabled", "luTooltipOnlyForDisplay", "prTooltipOnlyForDisplay", "luTooltipPosition", "prTooltipPosition", "luTooltipWhenEllipsis", "prTooltipWhenEllipsis", "luTooltipAnchor", "prTooltipAnchor", "luTooltipTriggerAnchor", "prTooltipTriggerAnchor", "id"], exportAs: ["luTooltip"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OptionComponent, selector: "lu-listbox-option", inputs: ["elementId", "checked", "mixed", "disabled", "hovered", "add", "group", "groupId", "select", "selectAll", "treeitemLevel"] }, { kind: "pipe", type: LuOptionGroupPipe, name: "luOptionGroup" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
575
623
|
}
|
|
576
624
|
_a = LuOptionComponent;
|
|
577
625
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: LuOptionComponent, decorators: [{
|
|
578
626
|
type: Component,
|
|
579
|
-
args: [{ selector: 'lu-select-option', changeDetection: ChangeDetectionStrategy.OnPush, imports: [LuOptionOutletDirective, PortalDirective, LuOptionGroupPipe, LuTooltipTriggerDirective, NgTemplateOutlet, OptionComponent], template: "<lu-listbox-option\n\t[checked]=\"selectableItem.isSelected()\"\n\t[hovered]=\"selectableItem.isHighlighted()\"\n\t[disabled]=\"selectableItem.disabled\"\n\t(click)=\"selectOption($event)\"\n\t[elementId]=\"selectableItem.idAttribute()\"\n\t[treeitemLevel]=\"treeitemContent() ? level : null\"\n>\n\t<ng-container [ngTemplateOutlet]=\"optionContent\" />\n\t<!-- Re-projected into the option's own wrapper, so the tree rows are stacked by the listbox\n\titself: the level has to be passed along because a content query stops at this ng-content -->\n\t<ng-content select=\"[treeitem]\" ngProjectAs=\"[treeitem]\" />\n</lu-listbox-option>\n\n<ng-template #optionContent>\n\t<div>\n\t\t<ng-container *luOptionOutlet=\"optionTpl(); value: selectableItem.option()\" />\n\n\t\t@if (groupTemplateLocation() === \"option\") {\n\t\t\t@if (grouping(); as grouping) {\n\t\t\t\t<div class=\"listboxOption-content-group\">\n\t\t\t\t\t<ng-container *luPortal=\"grouping.content; context: { $implicit: selectableItem.option() | luOptionGroup: grouping.selector }\" />\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t</div>\n\n\t@if (hasChildren() && !selectableItem.disabled) {\n\t\t<div class=\"optionItem-icons\">\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon parentOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyParent.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyParent\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyParent }}</span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon childrenOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyChildren.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyChildren\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyChildren }}</span>\n\t\t\t</span>\n\t\t</div>\n\t}\n</ng-template>\n", styles: ["@charset \"UTF-8\";@layer base{:root{--components-options-item-padding-vertical: var(--pr-t-spacings-50);--components-options-item-padding-horizontal: var(--pr-t-spacings-100);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-neutral-800);--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));--components-options-checkbox-border-radius: var(--pr-t-border-radius-small);--components-options-checkbox-border-color: var(--palettes-neutral-700);--components-options-establishment-multiple-padding: 2rem}}@layer reset,base,components,mods,product,utils;@layer components{:host{--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));display:block;scroll-margin:var(--pr-t-spacings-50)}.listboxOption[role=group] :host{scroll-margin-block-start:var(--pr-t-spacings-400)}}@layer mods{:host.withAddOption{scroll-margin-block-end:var(--pr-t-spacings-600)}}@layer components{.optionItem{position:relative}}@layer components{.optionItem-value{position:relative;border-radius:var(--pr-t-border-radius-default);display:block;padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer;overflow-wrap:anywhere}.optionItem-value ::ng-deep .avatar{margin-inline-end:var(--pr-t-spacings-75)}}@layer mods{.optionItem-value.is-selected,:host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-50, var(--palettes-product-50))}.optionItem-value.is-selected:before,:host-context([aria-selected=true]) .optionItem-value:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:calc(var(--pr-t-spacings-50) * -1);inline-size:2px;background-color:var(--palettes-700, var(--palettes-product-700));border-start-end-radius:var(--pr-t-border-radius-default);border-end-end-radius:var(--pr-t-border-radius-default)}:host-context(.optionItem.is-highlighted) .optionItem-value.is-selected,:host-context(.optionItem.is-highlighted) :host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-100, var(--palettes-product-100))}.optionItem-value.is-selected:active,:host-context([aria-selected=true]) .optionItem-value:active{background-color:var(--palettes-200, var(--palettes-product-200))}:host-context(.optionItem.is-highlighted) .optionItem-value{background-color:var(--palettes-neutral-50)}.optionItem-value:active{background-color:var(--palettes-neutral-100)}}@layer components{:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}}@layer mods{:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.optionItem.is-highlighted) :host-context(.lu-select-value) .optionItem-value{background-color:inherit}}@layer mods{:host-context(.mod-multiple) .optionItem-value,.formerEmployeeDisplayer .optionItem-value,.archivedLegalUnitsDisplayer .optionItem-value{position:relative;padding-inline-start:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:before{display:block;position:absolute;inset-inline-start:var(--pr-t-spacings-100);inset-block-start:var(--pr-t-spacings-75)}:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:before{content:\"\";background-color:var(--palettes-neutral-0);border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;block-size:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:after{--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;color:transparent;font-size:var(--pr-t-font-body-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:scale(0);transition:all .1s;inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value.is-selected:before,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value: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,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value:after{color:var(--palettes-neutral-0);transform:scale(1)}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-color: var(--commons-disabled-background);background-color:transparent}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled:after,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled:after{color:var(--palettes-neutral-500)}:host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-neutral-500)}:host-context(.optionItem.is-highlighted) :host-context(.mod-multiple) .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .formerEmployeeDisplayer .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .archivedLegalUnitsDisplayer .optionItem-value:not(.is-disabled):before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}}@layer components{:host-context(.mod-multiple).establishmentOption .optionItem-value,.formerEmployeeDisplayer.establishmentOption .optionItem-value,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value{position:relative;padding-inline-start:calc(var(--components-options-checkbox-size) + var(--pr-t-spacings-100) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after,.formerEmployeeDisplayer.establishmentOption .optionItem-value:before,.formerEmployeeDisplayer.establishmentOption .optionItem-value:after,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:before,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:after{inset-inline-start:var(--pr-t-spacings-100)}}@layer components{.optionItem:not(:last-child){margin-block-end:var(--pr-t-spacings-50)}.optionItem:hover .optionItem-value{background:var(--palettes-neutral-50)}.optionItem:hover .optionItem-icons{opacity:1}.optionItem-value{padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal)}.optionItem-icons{position:absolute;inset-block-start:var(--pr-t-spacings-50);inset-inline-end:var(--pr-t-spacings-100);opacity:0;transition:all var(--commons-animations-durations-fast) ease}.optionItem-icon{cursor:pointer;opacity:.66;margin-inline-start:var(--pr-t-spacings-100);transition:all var(--commons-animations-durations-fast) ease}.optionItem-icon:hover{opacity:1}.optionItem-icon-shape{fill:var(--components-options-item-icon-color);inline-size:1.4rem;block-size:1.4rem}}\n"] }]
|
|
627
|
+
args: [{ selector: 'lu-select-option', changeDetection: ChangeDetectionStrategy.OnPush, imports: [LuOptionOutletDirective, PortalDirective, LuOptionGroupPipe, LuTooltipTriggerDirective, NgTemplateOutlet, OptionComponent], template: "<lu-listbox-option\n\t[checked]=\"selectableItem.isSelected()\"\n\t[hovered]=\"selectableItem.isHighlighted()\"\n\t[disabled]=\"selectableItem.disabled\"\n\t(click)=\"selectOption($event)\"\n\t[elementId]=\"selectableItem.idAttribute()\"\n\t[treeitemLevel]=\"treeitemContent() ? level : null\"\n>\n\t<ng-container [ngTemplateOutlet]=\"optionContent\" />\n\t<!-- Re-projected into the option's own wrapper, so the tree rows are stacked by the listbox\n\titself: the level has to be passed along because a content query stops at this ng-content -->\n\t<ng-content select=\"[treeitem]\" ngProjectAs=\"[treeitem]\" />\n</lu-listbox-option>\n\n<ng-template #optionContent>\n\t<div class=\"listboxOption-content-value\">\n\t\t<ng-container *luOptionOutlet=\"optionTpl(); value: selectableItem.option()\" />\n\n\t\t@if (groupTemplateLocation() === \"option\") {\n\t\t\t@if (grouping(); as grouping) {\n\t\t\t\t<div class=\"listboxOption-content-group\">\n\t\t\t\t\t<ng-container *luPortal=\"grouping.content; context: { $implicit: selectableItem.option() | luOptionGroup: grouping.selector }\" />\n\t\t\t\t</div>\n\t\t\t}\n\t\t}\n\t</div>\n\n\t@if (hasChildren() && !selectableItem.disabled) {\n\t\t<div class=\"optionItem-icons\">\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon parentOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyParent.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyParent\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyParent }}</span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tclass=\"optionItem-icon childrenOnly\"\n\t\t\t\t(click)=\"$event.stopPropagation(); onlyChildren.emit()\"\n\t\t\t\t[luTooltip]=\"intl().onlyChildren\"\n\t\t\t\tluTooltipOnlyForDisplay\n\t\t\t>\n\t\t\t\t<svg class=\"optionItem-icon-shape\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\" focusable=\"false\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18ZM8 13C8.55 13 9 12.55 9 12C9 11.45 8.55 11 8 11C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM8 18C8.55 18 9 17.55 9 17C9 16.45 8.55 16 8 16C7.45 16 7 16.45 7 17C7 17.55 7.45 18 8 18ZM12 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H12C11.45 11 11 11.45 11 12C11 12.55 11.45 13 12 13ZM12 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H12C11.45 16 11 16.45 11 17C11 17.55 11.45 18 12 18Z\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\topacity=\"0.2\"\n\t\t\t\t\t\td=\"M4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7ZM4 8C4.55 8 5 7.55 5 7C5 6.45 4.55 6 4 6C3.45 6 3 6.45 3 7C3 7.55 3.45 8 4 8ZM7 7C7 7.55 7.45 8 8 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H8C7.45 6 7 6.45 7 7Z\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().onlyChildren }}</span>\n\t\t\t</span>\n\t\t</div>\n\t}\n</ng-template>\n", styles: ["@charset \"UTF-8\";@layer base{:root{--components-options-item-padding-vertical: var(--pr-t-spacings-50);--components-options-item-padding-horizontal: var(--pr-t-spacings-100);--components-options-item-multiple-padding: 2.25rem;--components-options-item-icon-color: var(--palettes-neutral-800);--components-options-checkbox-size: 1.25rem;--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));--components-options-checkbox-border-radius: var(--pr-t-border-radius-small);--components-options-checkbox-border-color: var(--palettes-neutral-700);--components-options-establishment-multiple-padding: 2rem}}@layer reset,base,components,mods,product,utils;@layer components{:host{--components-options-checkbox-color: var(--palettes-700, var(--palettes-product-700));display:block;scroll-margin:var(--pr-t-spacings-50)}.listboxOption[role=group] :host{scroll-margin-block-start:var(--pr-t-spacings-400)}}@layer mods{:host.withAddOption{scroll-margin-block-end:var(--pr-t-spacings-600)}}@layer components{.optionItem{position:relative}}@layer components{.optionItem-value{position:relative;border-radius:var(--pr-t-border-radius-default);display:block;padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal);transition:background-color 50ms;cursor:pointer;overflow-wrap:anywhere}.optionItem-value ::ng-deep .avatar{margin-inline-end:var(--pr-t-spacings-75)}}@layer mods{.optionItem-value.is-selected,:host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-50, var(--palettes-product-50))}.optionItem-value.is-selected:before,:host-context([aria-selected=true]) .optionItem-value:before{content:\"\";position:absolute;inset-block:0;inset-inline-start:calc(var(--pr-t-spacings-50) * -1);inline-size:2px;background-color:var(--palettes-700, var(--palettes-product-700));border-start-end-radius:var(--pr-t-border-radius-default);border-end-end-radius:var(--pr-t-border-radius-default)}:host-context(.optionItem.is-highlighted) .optionItem-value.is-selected,:host-context(.optionItem.is-highlighted) :host-context([aria-selected=true]) .optionItem-value{background-color:var(--palettes-100, var(--palettes-product-100))}.optionItem-value.is-selected:active,:host-context([aria-selected=true]) .optionItem-value:active{background-color:var(--palettes-200, var(--palettes-product-200))}:host-context(.optionItem.is-highlighted) .optionItem-value{background-color:var(--palettes-neutral-50)}.optionItem-value:active{background-color:var(--palettes-neutral-100)}}@layer components{:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}}@layer mods{:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.optionItem.is-highlighted) :host-context(.lu-select-value) .optionItem-value{background-color:inherit}}@layer mods{:host-context(.mod-multiple) .optionItem-value,.formerEmployeeDisplayer .optionItem-value,.archivedLegalUnitsDisplayer .optionItem-value{position:relative;padding-inline-start:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:before{display:block;position:absolute;inset-inline-start:var(--pr-t-spacings-100);inset-block-start:var(--pr-t-spacings-75)}:host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value:before{content:\"\";background-color:var(--palettes-neutral-0);border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);display:block;block-size:var(--components-options-checkbox-size);transition-property:background-color,box-shadow;transition-duration:var(--commons-animations-durations-fast);inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value:after{--icon-content: \"\\e97d\";font-weight:var(--pr-t-font-fontWeight-regular);display:inline-block;vertical-align:text-bottom;font-style:normal;font-family:var(--icon-fontFamily);content:var(--icon-content)/\"\";-webkit-font-smoothing:antialiased;text-transform:none;color:transparent;font-size:var(--pr-t-font-body-S-lineHeight);line-height:var(--components-options-checkbox-size);position:absolute;text-align:center;transform:scale(0);transition:all .1s;inline-size:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value.is-selected:before,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:before,.formerEmployeeDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:before,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:before,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value: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,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value:after,.formerEmployeeDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value:after{color:var(--palettes-neutral-0);transform:scale(1)}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-color: var(--commons-disabled-background);background-color:transparent}:host-context(.mod-multiple) .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) :host-context(.mod-multiple) .optionItem-value.is-disabled:after,.formerEmployeeDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .formerEmployeeDisplayer .optionItem-value.is-disabled:after,.archivedLegalUnitsDisplayer .optionItem-value.is-selected.is-disabled:after,:host-context([aria-selected=true]) .archivedLegalUnitsDisplayer .optionItem-value.is-disabled:after{color:var(--palettes-neutral-500)}:host-context(.mod-multiple) .optionItem-value.is-disabled,.formerEmployeeDisplayer .optionItem-value.is-disabled,.archivedLegalUnitsDisplayer .optionItem-value.is-disabled{--components-options-checkbox-border-color: var(--palettes-neutral-500)}:host-context(.optionItem.is-highlighted) :host-context(.mod-multiple) .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .formerEmployeeDisplayer .optionItem-value:not(.is-disabled):before,:host-context(.optionItem.is-highlighted) .archivedLegalUnitsDisplayer .optionItem-value:not(.is-disabled):before{box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}}@layer components{:host-context(.mod-multiple).establishmentOption .optionItem-value,.formerEmployeeDisplayer.establishmentOption .optionItem-value,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value{position:relative;padding-inline-start:calc(var(--components-options-checkbox-size) + var(--pr-t-spacings-100) * 2)}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after,.formerEmployeeDisplayer.establishmentOption .optionItem-value:before,.formerEmployeeDisplayer.establishmentOption .optionItem-value:after,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:before,.archivedLegalUnitsDisplayer.establishmentOption .optionItem-value:after{inset-inline-start:var(--pr-t-spacings-100)}}@layer components{.optionItem:not(:last-child){margin-block-end:var(--pr-t-spacings-50)}.optionItem:hover .optionItem-value{background:var(--palettes-neutral-50)}.optionItem:hover .optionItem-icons{opacity:1}.optionItem-value{padding-block:var(--components-options-item-padding-vertical);padding-inline:var(--components-options-item-padding-horizontal)}.optionItem-icons{position:absolute;inset-block-start:var(--pr-t-spacings-50);inset-inline-end:var(--pr-t-spacings-100);opacity:0;transition:all var(--commons-animations-durations-fast) ease}.optionItem-icon{cursor:pointer;opacity:.66;margin-inline-start:var(--pr-t-spacings-100);transition:all var(--commons-animations-durations-fast) ease}.optionItem-icon:hover{opacity:1}.optionItem-icon-shape{fill:var(--components-options-item-icon-color);inline-size:1.4rem;block-size:1.4rem}}\n"] }]
|
|
580
628
|
}], ctorParameters: () => [], propDecorators: { intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }], optionTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTpl", required: false }] }], option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: false }] }], grouping: [{ type: i0.Input, args: [{ isSignal: true, alias: "grouping", required: false }] }], hasChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasChildren", required: false }] }], onlyParent: [{ type: i0.Output, args: ["onlyParent"] }], onlyChildren: [{ type: i0.Output, args: ["onlyChildren"] }], groupIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupIndex", required: false }] }], optionIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionIndex", required: true }] }], scrollIntoViewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollIntoViewOptions", required: false }] }], groupTemplateLocation: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupTemplateLocation", required: false }] }], treeitemContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => Treeitem), { isSignal: true }] }], optionContext: [{ type: i0.ViewChild, args: [i0.forwardRef(() => LU_OPTION_CONTEXT), { isSignal: true }] }] } });
|
|
581
629
|
|
|
582
630
|
class LuOptionDirective {
|
|
@@ -599,8 +647,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
599
647
|
}], ctorParameters: () => [{ type: i0.TemplateRef }], propDecorators: { select: [{ type: i0.Input, args: [{ isSignal: true, alias: "luOptionSelect", required: false }] }] } });
|
|
600
648
|
|
|
601
649
|
function buildOptionsFromDataSource(ds, deps) {
|
|
602
|
-
const {
|
|
603
|
-
|
|
650
|
+
const { clue$, isPanelOpen$ } = deps;
|
|
651
|
+
// Resets and reloads from page 0 with the current clue. `paramsChange` carries params changes only:
|
|
652
|
+
// clue changes are already handled by `clue$`, whose emissions must not load a second time
|
|
653
|
+
const paramsChange$ = ds.paramsChange ?? EMPTY;
|
|
604
654
|
const normalizedClue$ = clue$.pipe(map((clue) => clue ?? ''), distinctUntilChanged());
|
|
605
655
|
// If a debounce is specified:
|
|
606
656
|
// - empty clue ('') passes through immediately (initial state / clear)
|
|
@@ -610,30 +660,78 @@ function buildOptionsFromDataSource(ds, deps) {
|
|
|
610
660
|
if (!isOpen) {
|
|
611
661
|
return of([]);
|
|
612
662
|
}
|
|
613
|
-
return debouncedClue$.pipe(switchMap((clue) =>
|
|
663
|
+
return debouncedClue$.pipe(switchMap((clue) =>
|
|
664
|
+
// A params change restarts the very same load as a clue change would, minus the debounce:
|
|
665
|
+
// it comes from a deliberate action (a panel header toggle, a filter) and not from typing
|
|
666
|
+
paramsChange$.pipe(startWith(null), switchMap(() => {
|
|
614
667
|
ds.reset?.();
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}, {}),
|
|
622
|
-
// Stop calling pages when last two pages are empty
|
|
623
|
-
takeWhile((pages) => {
|
|
624
|
-
const indexes = Object.keys(pages)
|
|
625
|
-
.map((p) => parseInt(p))
|
|
626
|
-
.sort((a, b) => a - b);
|
|
627
|
-
const lastIndexes = indexes.slice(-2);
|
|
628
|
-
return lastIndexes.length < 2 || !lastIndexes.every((i) => pages[i]?.length === 0);
|
|
629
|
-
}), map((pages) => Object.values(pages).flat()), finalize(() => setLoading(false)));
|
|
630
|
-
}));
|
|
668
|
+
const options$ = ds.paginated === false ? wholeList(ds, clue) : accumulatedPages(ds, clue, deps);
|
|
669
|
+
return options$.pipe(
|
|
670
|
+
// Applied on the accumulated list so cross-page decorations (eg. homonyms) can be computed
|
|
671
|
+
// Falls back to the raw accumulated options so a failing decoration doesn't kill the whole stream
|
|
672
|
+
switchMap((options) => defer(() => ds.transformOptions?.(options) ?? of(options)).pipe(catchError(() => of(options)))));
|
|
673
|
+
}))));
|
|
631
674
|
}));
|
|
632
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* Data source owning the whole list (`[options]` + `(nextPage)`): every emission is the complete list,
|
|
678
|
+
* so there is nothing to accumulate, no page to guard against, and no loading state to infer — the
|
|
679
|
+
* consumer owns the fetching, hence the loading row too, through the `loading` input.
|
|
680
|
+
*/
|
|
681
|
+
function wholeList(ds, clue) {
|
|
682
|
+
const params = { clue, page: 0 };
|
|
683
|
+
return ds.getOptions(params).pipe(catchError(() => of([])));
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Paginated data source: one request per page, accumulated in order until two consecutive pages come
|
|
687
|
+
* back empty.
|
|
688
|
+
*
|
|
689
|
+
* `expand` asks for the next page from the result of the previous one, so `nextPage$` is only listened
|
|
690
|
+
* to between two pages: a page can't be asked for while one is in flight, and the extra scroll events
|
|
691
|
+
* Firefox emits at the bottom of the panel fall on no subscriber instead of queueing pages. Pages also
|
|
692
|
+
* only ever enter the accumulator once they answered, so the guard below can't take one that is still
|
|
693
|
+
* loading for an empty one.
|
|
694
|
+
*/
|
|
695
|
+
function accumulatedPages(ds, clue, { nextPage$, setLoading }) {
|
|
696
|
+
const loadPage = (page) => ds.getOptions({ clue, page }).pipe(catchError(() => of([])),
|
|
697
|
+
// A request completing without emitting still answers its page, rather than locking pagination
|
|
698
|
+
defaultIfEmpty([]),
|
|
699
|
+
// A long lived data source keeps refreshing its page: those later emissions update the
|
|
700
|
+
// accumulated list, but only the first one answers the page — it alone arms the request for
|
|
701
|
+
// the next page and clears the loading row, which a refresh must leave up while a page is in flight
|
|
702
|
+
map((items, index) => ({ page, items, isFirstAnswer: index === 0 })), tap({
|
|
703
|
+
subscribe: () => setLoading(true),
|
|
704
|
+
next: ({ isFirstAnswer }) => {
|
|
705
|
+
if (isFirstAnswer) {
|
|
706
|
+
setLoading(false);
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
}));
|
|
710
|
+
return loadPage(0).pipe(expand(({ page, isFirstAnswer }) => isFirstAnswer
|
|
711
|
+
? nextPage$.pipe(take(1), switchMap(() => loadPage(page + 1)))
|
|
712
|
+
: EMPTY), scan((acc, { page, items }) => {
|
|
713
|
+
acc[page] = items;
|
|
714
|
+
return acc;
|
|
715
|
+
}, {}),
|
|
716
|
+
// Stop calling pages when the last two pages came back empty
|
|
717
|
+
takeWhile((pages) => {
|
|
718
|
+
const lastPages = Object.values(pages).slice(-2);
|
|
719
|
+
return lastPages.length < 2 || !lastPages.every((items) => items.length === 0);
|
|
720
|
+
}), map((pages) => Object.values(pages).flat()), finalize(() => setLoading(false)));
|
|
721
|
+
}
|
|
633
722
|
|
|
634
723
|
const coreSelectDefaultOptionComparer = (option1, option2) => JSON.stringify(option1) === JSON.stringify(option2);
|
|
635
724
|
const coreSelectDefaultOptionKey = (option) => option;
|
|
636
725
|
class ALuSelectInputComponent {
|
|
726
|
+
// Signal-backed because a filter pill takes the select over *after* it has rendered, and
|
|
727
|
+
// `bottomSheetMode` — which gates the trigger element itself — is computed from it.
|
|
728
|
+
#filterPillMode;
|
|
729
|
+
get filterPillMode() {
|
|
730
|
+
return this.#filterPillMode();
|
|
731
|
+
}
|
|
732
|
+
set filterPillMode(filterPillMode) {
|
|
733
|
+
this.#filterPillMode.set(filterPillMode);
|
|
734
|
+
}
|
|
637
735
|
#defaultFilterPillClearable;
|
|
638
736
|
#defaultClearable;
|
|
639
737
|
get searchable() {
|
|
@@ -669,6 +767,9 @@ class ALuSelectInputComponent {
|
|
|
669
767
|
set grouping(grouping) {
|
|
670
768
|
this.groupingSignal.set(grouping);
|
|
671
769
|
}
|
|
770
|
+
// searchable is derived from clueChange$.observed, so internal consumers must use this stream instead:
|
|
771
|
+
// subscribing to clueChange$ would make every select look searchable.
|
|
772
|
+
#internalClueChange$;
|
|
672
773
|
get value() {
|
|
673
774
|
return this._value;
|
|
674
775
|
}
|
|
@@ -688,19 +789,14 @@ class ALuSelectInputComponent {
|
|
|
688
789
|
}
|
|
689
790
|
else if (this.lastEmittedClue !== clue) {
|
|
690
791
|
this.clueChange$.next(clue);
|
|
792
|
+
this.#internalClueChange$.next(clue);
|
|
691
793
|
this.lastEmittedClue = clue;
|
|
692
794
|
}
|
|
693
795
|
}
|
|
694
796
|
getDefaultDataSource() {
|
|
695
|
-
let emittedKeys = new Set();
|
|
696
797
|
return {
|
|
697
|
-
getOptions: (
|
|
698
|
-
|
|
699
|
-
return this.manualOptions$.pipe(tap((options) => (lastEmittedThisPage = options)), takeUntil(this.nextPage$), finalize(() => (emittedKeys = new Set(lastEmittedThisPage.map((p) => this.optionKey()(p))))), map((options) => options.filter((c) => !emittedKeys.has(this.optionKey()(c)))));
|
|
700
|
-
},
|
|
701
|
-
reset() {
|
|
702
|
-
emittedKeys.clear();
|
|
703
|
-
},
|
|
798
|
+
getOptions: () => this.manualOptions$,
|
|
799
|
+
paginated: false,
|
|
704
800
|
};
|
|
705
801
|
}
|
|
706
802
|
get panelRef() {
|
|
@@ -712,12 +808,24 @@ class ALuSelectInputComponent {
|
|
|
712
808
|
this.overlayContainerRef = inject(OverlayContainer).getContainerElement();
|
|
713
809
|
this.labelElement = inject(SELECT_LABEL);
|
|
714
810
|
this.labelId = inject(SELECT_LABEL_ID);
|
|
811
|
+
this.formField = inject(FORM_FIELD_INSTANCE, { optional: true });
|
|
715
812
|
this.filterPillHost = inject(FILTER_PILL_HOST_COMPONENT, { optional: true });
|
|
716
|
-
|
|
813
|
+
// Signal-backed because a filter pill takes the select over *after* it has rendered, and
|
|
814
|
+
// `bottomSheetMode` — which gates the trigger element itself — is computed from it.
|
|
815
|
+
this.#filterPillMode = signal(false, /* @ts-ignore */
|
|
816
|
+
...(ngDevMode ? [{ debugName: "#filterPillMode" }] : /* istanbul ignore next */ []));
|
|
717
817
|
this.ignorePresentation = input(false, { ...(ngDevMode ? { debugName: "ignorePresentation" } : /* istanbul ignore next */ {}), transform: luBooleanAttribute });
|
|
818
|
+
/**
|
|
819
|
+
* Width of the select itself, using the same scale as the form field width
|
|
820
|
+
*/
|
|
821
|
+
this.width = input(null, { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), transform: (luNullableNumberAttribute) });
|
|
822
|
+
this.widthClass = computed(() => (this.width() ? `mod-width${this.width()}` : null), /* @ts-ignore */
|
|
823
|
+
...(ngDevMode ? [{ debugName: "widthClass" }] : /* istanbul ignore next */ []));
|
|
718
824
|
this.panelClosed = output();
|
|
719
825
|
this.panelOpened = output();
|
|
720
826
|
this.highlightedOption = output();
|
|
827
|
+
// Below the `S` breakpoint the trigger is a `<button>` rather than the text input, so this is only
|
|
828
|
+
// ever focused, never read as an input.
|
|
721
829
|
this.inputElementRef = viewChild('inputElement', /* @ts-ignore */
|
|
722
830
|
...(ngDevMode ? [{ debugName: "inputElementRef" }] : /* istanbul ignore next */ []));
|
|
723
831
|
this.disabled$ = new BehaviorSubject(false);
|
|
@@ -740,6 +848,29 @@ class ALuSelectInputComponent {
|
|
|
740
848
|
this.isPanelOpen$ = new BehaviorSubject(false);
|
|
741
849
|
// TODO Might be temporary, check after merging signalize PR
|
|
742
850
|
this.panelOpenSignal = toSignal(this.isPanelOpen$);
|
|
851
|
+
this.belowSmallBreakpoint = injectMediaMinBreakpoint('S', true);
|
|
852
|
+
/**
|
|
853
|
+
* Below the `S` breakpoint (800px) the panel opens as a dialog in `sheet` mode that embeds its own
|
|
854
|
+
* search input, instead of a popover anchored to the field — mirroring how filter pills move the input
|
|
855
|
+
* inside their overlay. Filter pills already provide their own overlay, so they keep their behavior.
|
|
856
|
+
*/
|
|
857
|
+
this.bottomSheetMode = computed(() => (this.belowSmallBreakpoint() ?? false) && !this.filterPillMode, /* @ts-ignore */
|
|
858
|
+
...(ngDevMode ? [{ debugName: "bottomSheetMode" }] : /* istanbul ignore next */ []));
|
|
859
|
+
/**
|
|
860
|
+
* Whether the currently open panel is a sheet, snapshotted when it opens rather than tracking
|
|
861
|
+
* `bottomSheetMode()` live: the panel's own ref (`SelectPanelSheetRef` vs `SelectPanelRef`) is
|
|
862
|
+
* chosen once at open time too, so resizing across the breakpoint while the panel stays open must
|
|
863
|
+
* not flip which surface its template renders — that surface was never actually attached as a
|
|
864
|
+
* dialog, so switching to it crashes with a missing `LuDialogRef` provider.
|
|
865
|
+
*/
|
|
866
|
+
this.panelBottomSheetMode = signal(false, /* @ts-ignore */
|
|
867
|
+
...(ngDevMode ? [{ debugName: "panelBottomSheetMode" }] : /* istanbul ignore next */ []));
|
|
868
|
+
/** Field label echoed as the bottom sheet's title, snapshotted when the sheet opens. */
|
|
869
|
+
this.panelTitle = signal('', /* @ts-ignore */
|
|
870
|
+
...(ngDevMode ? [{ debugName: "panelTitle" }] : /* istanbul ignore next */ []));
|
|
871
|
+
/** Whether that field label carries the required marker, so the sheet's title can echo it too. */
|
|
872
|
+
this.panelTitleRequired = computed(() => this.formField?.isInputRequired() ?? false, /* @ts-ignore */
|
|
873
|
+
...(ngDevMode ? [{ debugName: "panelTitleRequired" }] : /* istanbul ignore next */ []));
|
|
743
874
|
this.activeDescendant$ = new BehaviorSubject('');
|
|
744
875
|
this.manualOptions$ = new ReplaySubject(1);
|
|
745
876
|
this.overlayConfig = input({ hasBackdrop: true, backdropClass: 'cdk-overlay-transparent-backdrop' }, /* @ts-ignore */
|
|
@@ -776,6 +907,9 @@ class ALuSelectInputComponent {
|
|
|
776
907
|
...(ngDevMode ? [{ debugName: "groupingSignal" }] : /* istanbul ignore next */ []));
|
|
777
908
|
this.clueChange$ = new Subject();
|
|
778
909
|
this.clueChange = outputFromObservable(this.clueChange$);
|
|
910
|
+
// searchable is derived from clueChange$.observed, so internal consumers must use this stream instead:
|
|
911
|
+
// subscribing to clueChange$ would make every select look searchable.
|
|
912
|
+
this.#internalClueChange$ = new Subject();
|
|
779
913
|
this.nextPage$ = new Subject();
|
|
780
914
|
this.nextPage = outputFromObservable(this.nextPage$);
|
|
781
915
|
this.addOption = output();
|
|
@@ -797,7 +931,7 @@ class ALuSelectInputComponent {
|
|
|
797
931
|
this.clue = null;
|
|
798
932
|
// This is the clue stored after we selected an option to know if we should emit an empty clue on open or not
|
|
799
933
|
this.lastEmittedClue = '';
|
|
800
|
-
this.clue$ = defer(() => this
|
|
934
|
+
this.clue$ = defer(() => this.#internalClueChange$.pipe(startWith(this.clue)));
|
|
801
935
|
this.shouldDisplayAddOption = toSignal(toObservable(this.addOptionStrategy).pipe(switchMap((strategy) => {
|
|
802
936
|
switch (strategy) {
|
|
803
937
|
case 'always':
|
|
@@ -812,6 +946,7 @@ class ALuSelectInputComponent {
|
|
|
812
946
|
})));
|
|
813
947
|
this.destroyed$ = new Subject();
|
|
814
948
|
this.injector = inject(Injector);
|
|
949
|
+
this.hostElementRef = inject(ElementRef);
|
|
815
950
|
// Re-entrancy guard: opening the panel (focus, clueChanged, overlay creation) can synchronously
|
|
816
951
|
// trigger openPanel again, which used to cause a double tap.
|
|
817
952
|
this.#isOpeningPanel = false;
|
|
@@ -823,6 +958,13 @@ class ALuSelectInputComponent {
|
|
|
823
958
|
this.manualOptions$.next(options);
|
|
824
959
|
}
|
|
825
960
|
});
|
|
961
|
+
// Rather than leaving an open panel stuck in a stale sheet/overlay style once `bottomSheetMode()`
|
|
962
|
+
// no longer matches it, close it outright — the next open picks the right style for the new breakpoint.
|
|
963
|
+
_effectWithDeps([this.bottomSheetMode], (bottomSheetMode) => {
|
|
964
|
+
if (this.isPanelOpen && bottomSheetMode !== this.panelBottomSheetMode()) {
|
|
965
|
+
this.closePanel();
|
|
966
|
+
}
|
|
967
|
+
});
|
|
826
968
|
// When options arrive asynchronously via a dataSource, dataSourceOptions changes but options doesn't.
|
|
827
969
|
// We need to reposition the panel after the DOM updates in both cases.
|
|
828
970
|
_effectWithDeps([this.dataSourceOptions], (_options, onCleanup) => {
|
|
@@ -852,6 +994,11 @@ class ALuSelectInputComponent {
|
|
|
852
994
|
this.panelRef?.close();
|
|
853
995
|
break;
|
|
854
996
|
case 'Tab':
|
|
997
|
+
// A bottom sheet is modal: its focus trap cycles Tab between the sheet's own controls, so
|
|
998
|
+
// tabbing must not close it the way leaving the field does on desktop.
|
|
999
|
+
if (this.bottomSheetMode()) {
|
|
1000
|
+
break;
|
|
1001
|
+
}
|
|
855
1002
|
// If we are in a filterpill, this will close it on tab press, but we want it to not lose any
|
|
856
1003
|
// displayed stuff and properly close on focus exit
|
|
857
1004
|
this.panelRef?.close();
|
|
@@ -934,7 +1081,17 @@ class ALuSelectInputComponent {
|
|
|
934
1081
|
}
|
|
935
1082
|
this.#isOpeningPanel = true;
|
|
936
1083
|
try {
|
|
937
|
-
this.
|
|
1084
|
+
const isSheet = this.bottomSheetMode();
|
|
1085
|
+
this.panelBottomSheetMode.set(isSheet);
|
|
1086
|
+
if (isSheet) {
|
|
1087
|
+
// The sheet shows the field label as its title and embeds its own search input (auto-focused by
|
|
1088
|
+
// `openSelectPanelSheet`); focusing the covered host input would pop the mobile keyboard on a
|
|
1089
|
+
// hidden field.
|
|
1090
|
+
this.panelTitle.set(this.resolvePanelTitle());
|
|
1091
|
+
}
|
|
1092
|
+
else {
|
|
1093
|
+
this.focusInput();
|
|
1094
|
+
}
|
|
938
1095
|
const isSearchable = this.searchable;
|
|
939
1096
|
this.isPanelOpen$.next(true);
|
|
940
1097
|
this.panelOpened.emit();
|
|
@@ -969,6 +1126,31 @@ class ALuSelectInputComponent {
|
|
|
969
1126
|
this.inputElementRef()?.nativeElement.focus();
|
|
970
1127
|
}
|
|
971
1128
|
}
|
|
1129
|
+
// The bottom sheet echoes the field label as its title. Standalone selects may be wrapped in a <label>,
|
|
1130
|
+
// but inside a form-field the label is a separate element referenced through the control's aria-labelledby.
|
|
1131
|
+
resolvePanelTitle() {
|
|
1132
|
+
if (this.labelElement) {
|
|
1133
|
+
return this.getLabelText(this.labelElement);
|
|
1134
|
+
}
|
|
1135
|
+
// The field points its own `aria-labelledby` at its value displayer, so only an actual `<label>`
|
|
1136
|
+
// counts here — otherwise a select without any label would echo its selected value as the title.
|
|
1137
|
+
// `aria-labelledby` can list several ids (label, hint, …), and some can be stale — e.g. leftover
|
|
1138
|
+
// from before the trigger was torn down and rebuilt as the breakpoint flipped between the button
|
|
1139
|
+
// and input variants — so every id is checked instead of trusting the first one to be the label.
|
|
1140
|
+
const host = this.hostElementRef.nativeElement;
|
|
1141
|
+
const labelledByIds = host.querySelector('[aria-labelledby]')?.getAttribute('aria-labelledby')?.split(' ') ?? [];
|
|
1142
|
+
const label = labelledByIds.map((id) => host.ownerDocument.getElementById(id)).find((element) => element?.tagName === 'LABEL');
|
|
1143
|
+
return label ? this.getLabelText(label) : '';
|
|
1144
|
+
}
|
|
1145
|
+
// Read the label text without its adornments (help tooltip, required marker, screen-reader-only copy)
|
|
1146
|
+
// nor, when the label wraps the select, the field's own rendered content — its selected value or the
|
|
1147
|
+
// placeholder standing in for it — so the title stays the plain field label.
|
|
1148
|
+
getLabelText(label) {
|
|
1149
|
+
const clone = label.cloneNode(true);
|
|
1150
|
+
const selectTag = this.hostElementRef.nativeElement.tagName.toLowerCase();
|
|
1151
|
+
clone.querySelectorAll(`${selectTag}, [role="button"], .pr-u-mask, .formLabel-required`).forEach((node) => node.remove());
|
|
1152
|
+
return (clone.textContent ?? '').trim();
|
|
1153
|
+
}
|
|
972
1154
|
emptyClue() {
|
|
973
1155
|
if (this.clue) {
|
|
974
1156
|
this.clue = null;
|
|
@@ -1028,7 +1210,7 @@ class ALuSelectInputComponent {
|
|
|
1028
1210
|
this.isPanelOpen$.next(false);
|
|
1029
1211
|
}
|
|
1030
1212
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ALuSelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1031
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.4", type: ALuSelectInputComponent, isStandalone: true, inputs: { ignorePresentation: { classPropertyName: "ignorePresentation", publicName: "ignorePresentation", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, clearableInput: { classPropertyName: "clearableInput", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, addOptionLabelInput: { classPropertyName: "addOptionLabelInput", publicName: "addOptionLabel", isSignal: true, isRequired: false, transformFunction: null }, addOptionStrategy: { classPropertyName: "addOptionStrategy", publicName: "addOptionStrategy", isSignal: true, isRequired: false, transformFunction: null }, overlayConfig: { classPropertyName: "overlayConfig", publicName: "overlayConfig", isSignal: true, isRequired: false, transformFunction: null }, loadingInput: { classPropertyName: "loadingInput", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, optionsInput: { classPropertyName: "optionsInput", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionComparerInput: { classPropertyName: "optionComparerInput", publicName: "optionComparer", isSignal: true, isRequired: false, transformFunction: null }, optionKeyInput: { classPropertyName: "optionKeyInput", publicName: "optionKey", isSignal: true, isRequired: false, transformFunction: null }, noClueIcon: { classPropertyName: "noClueIcon", publicName: "noClueIcon", isSignal: true, isRequired: false, transformFunction: null }, inputTabindex: { classPropertyName: "inputTabindex", publicName: "inputTabindex", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, colorPicker: { classPropertyName: "colorPicker", publicName: "colorPicker", isSignal: true, isRequired: false, transformFunction: null }, optionTpl: { classPropertyName: "optionTpl", publicName: "optionTpl", isSignal: true, isRequired: false, transformFunction: null }, valueTpl: { classPropertyName: "valueTpl", publicName: "valueTpl", isSignal: true, isRequired: false, transformFunction: null }, panelHeaderTpl: { classPropertyName: "panelHeaderTpl", publicName: "panelHeaderTpl", isSignal: true, isRequired: false, transformFunction: null }, panelFooterTpl: { classPropertyName: "panelFooterTpl", publicName: "panelFooterTpl", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { panelClosed: "panelClosed", panelOpened: "panelOpened", highlightedOption: "highlightedOption", optionTpl: "optionTplChange", valueTpl: "valueTplChange", panelHeaderTpl: "panelHeaderTplChange", panelFooterTpl: "panelFooterTplChange", clueChange: "clueChange", nextPage: "nextPage", addOption: "addOption", dataSource: "dataSourceChange" }, host: { listeners: { "click": "onClickOpenPanel($event)", "keydown": "onKeyDownNavigation($event)" }, properties: { "class.colorPicker": "colorPicker()", "class.mod-compact": "compact()", "class.is-clearable": "isClearable()", "class.is-selected": "isSelectedClass", "class.is-searchFilled": "isSearchFilledClass", "class.mod-noClueIcon": "isNoClueIconClass" } }, viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
1213
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.4", type: ALuSelectInputComponent, isStandalone: true, inputs: { ignorePresentation: { classPropertyName: "ignorePresentation", publicName: "ignorePresentation", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, clearableInput: { classPropertyName: "clearableInput", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, addOptionLabelInput: { classPropertyName: "addOptionLabelInput", publicName: "addOptionLabel", isSignal: true, isRequired: false, transformFunction: null }, addOptionStrategy: { classPropertyName: "addOptionStrategy", publicName: "addOptionStrategy", isSignal: true, isRequired: false, transformFunction: null }, overlayConfig: { classPropertyName: "overlayConfig", publicName: "overlayConfig", isSignal: true, isRequired: false, transformFunction: null }, loadingInput: { classPropertyName: "loadingInput", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, optionsInput: { classPropertyName: "optionsInput", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionComparerInput: { classPropertyName: "optionComparerInput", publicName: "optionComparer", isSignal: true, isRequired: false, transformFunction: null }, optionKeyInput: { classPropertyName: "optionKeyInput", publicName: "optionKey", isSignal: true, isRequired: false, transformFunction: null }, noClueIcon: { classPropertyName: "noClueIcon", publicName: "noClueIcon", isSignal: true, isRequired: false, transformFunction: null }, inputTabindex: { classPropertyName: "inputTabindex", publicName: "inputTabindex", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, colorPicker: { classPropertyName: "colorPicker", publicName: "colorPicker", isSignal: true, isRequired: false, transformFunction: null }, optionTpl: { classPropertyName: "optionTpl", publicName: "optionTpl", isSignal: true, isRequired: false, transformFunction: null }, valueTpl: { classPropertyName: "valueTpl", publicName: "valueTpl", isSignal: true, isRequired: false, transformFunction: null }, panelHeaderTpl: { classPropertyName: "panelHeaderTpl", publicName: "panelHeaderTpl", isSignal: true, isRequired: false, transformFunction: null }, panelFooterTpl: { classPropertyName: "panelFooterTpl", publicName: "panelFooterTpl", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { panelClosed: "panelClosed", panelOpened: "panelOpened", highlightedOption: "highlightedOption", optionTpl: "optionTplChange", valueTpl: "valueTplChange", panelHeaderTpl: "panelHeaderTplChange", panelFooterTpl: "panelFooterTplChange", clueChange: "clueChange", nextPage: "nextPage", addOption: "addOption", dataSource: "dataSourceChange" }, host: { listeners: { "click": "onClickOpenPanel($event)", "keydown": "onKeyDownNavigation($event)" }, properties: { "class.colorPicker": "colorPicker()", "class.mod-compact": "compact()", "class.is-clearable": "isClearable()", "class.is-selected": "isSelectedClass", "class.is-searchFilled": "isSearchFilledClass", "class.mod-noClueIcon": "isNoClueIconClass", "class": "widthClass()" } }, viewQueries: [{ propertyName: "inputElementRef", first: true, predicate: ["inputElement"], descendants: true, isSignal: true }], ngImport: i0 }); }
|
|
1032
1214
|
}
|
|
1033
1215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ALuSelectInputComponent, decorators: [{
|
|
1034
1216
|
type: Directive,
|
|
@@ -1040,11 +1222,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
1040
1222
|
'[class.is-selected]': 'isSelectedClass',
|
|
1041
1223
|
'[class.is-searchFilled]': 'isSearchFilledClass',
|
|
1042
1224
|
'[class.mod-noClueIcon]': 'isNoClueIconClass',
|
|
1225
|
+
'[class]': 'widthClass()',
|
|
1043
1226
|
'(click)': 'onClickOpenPanel($event)',
|
|
1044
1227
|
'(keydown)': 'onKeyDownNavigation($event)',
|
|
1045
1228
|
},
|
|
1046
1229
|
}]
|
|
1047
|
-
}], ctorParameters: () => [], propDecorators: { ignorePresentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignorePresentation", required: false }] }], panelClosed: [{ type: i0.Output, args: ["panelClosed"] }], panelOpened: [{ type: i0.Output, args: ["panelOpened"] }], highlightedOption: [{ type: i0.Output, args: ["highlightedOption"] }], inputElementRef: [{ type: i0.ViewChild, args: ['inputElement', { isSignal: true }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], clearableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], addOptionLabelInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOptionLabel", required: false }] }], addOptionStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOptionStrategy", required: false }] }], overlayConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayConfig", required: false }] }], loadingInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], optionsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionComparerInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionComparer", required: false }] }], optionKeyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionKey", required: false }] }], noClueIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "noClueIcon", required: false }] }], inputTabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputTabindex", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], colorPicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorPicker", required: false }] }], optionTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTpl", required: false }] }, { type: i0.Output, args: ["optionTplChange"] }], valueTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTpl", required: false }] }, { type: i0.Output, args: ["valueTplChange"] }], panelHeaderTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelHeaderTpl", required: false }] }, { type: i0.Output, args: ["panelHeaderTplChange"] }], panelFooterTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelFooterTpl", required: false }] }, { type: i0.Output, args: ["panelFooterTplChange"] }], clueChange: [{ type: i0.Output, args: ["clueChange"] }], nextPage: [{ type: i0.Output, args: ["nextPage"] }], addOption: [{ type: i0.Output, args: ["addOption"] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }, { type: i0.Output, args: ["dataSourceChange"] }] } });
|
|
1230
|
+
}], ctorParameters: () => [], propDecorators: { ignorePresentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignorePresentation", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], panelClosed: [{ type: i0.Output, args: ["panelClosed"] }], panelOpened: [{ type: i0.Output, args: ["panelOpened"] }], highlightedOption: [{ type: i0.Output, args: ["highlightedOption"] }], inputElementRef: [{ type: i0.ViewChild, args: ['inputElement', { isSignal: true }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], clearableInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], addOptionLabelInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOptionLabel", required: false }] }], addOptionStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOptionStrategy", required: false }] }], overlayConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayConfig", required: false }] }], loadingInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], optionsInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionComparerInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionComparer", required: false }] }], optionKeyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionKey", required: false }] }], noClueIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "noClueIcon", required: false }] }], inputTabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputTabindex", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], colorPicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorPicker", required: false }] }], optionTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTpl", required: false }] }, { type: i0.Output, args: ["optionTplChange"] }], valueTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueTpl", required: false }] }, { type: i0.Output, args: ["valueTplChange"] }], panelHeaderTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelHeaderTpl", required: false }] }, { type: i0.Output, args: ["panelHeaderTplChange"] }], panelFooterTpl: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelFooterTpl", required: false }] }, { type: i0.Output, args: ["panelFooterTplChange"] }], clueChange: [{ type: i0.Output, args: ["clueChange"] }], nextPage: [{ type: i0.Output, args: ["nextPage"] }], addOption: [{ type: i0.Output, args: ["addOption"] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }, { type: i0.Output, args: ["dataSourceChange"] }] } });
|
|
1048
1231
|
|
|
1049
1232
|
let selectId = 0;
|
|
1050
1233
|
function selectIdFactory() {
|
|
@@ -1210,6 +1393,93 @@ class LuSelectPanelRef {
|
|
|
1210
1393
|
}
|
|
1211
1394
|
}
|
|
1212
1395
|
|
|
1396
|
+
/**
|
|
1397
|
+
* Opens a select panel as a bottom sheet.
|
|
1398
|
+
*
|
|
1399
|
+
* Below the `S` breakpoint the panel stops being a popover anchored to the field and becomes a modal
|
|
1400
|
+
* surface pinned to the bottom of the viewport. That surface already exists as the dialog's `sheet`
|
|
1401
|
+
* mode — backdrop, blocked page scroll, focus trap, focus restoration and close button all come with
|
|
1402
|
+
* it — so the panel is opened as a dialog instead of as a bespoke overlay.
|
|
1403
|
+
*
|
|
1404
|
+
* The opening animation is disabled (`mod-select`, styled by the select packages themselves — see their
|
|
1405
|
+
* `sheet` mixin) and the search input is focused by hand instead of through CDK's `autoFocus`. iOS
|
|
1406
|
+
* Safari only raises the virtual keyboard for a `focus()` call made synchronously inside the tap that
|
|
1407
|
+
* triggered it; CDK's own autofocus defers the actual `focus()` through `afterNextRender`, which always
|
|
1408
|
+
* lands after that window has closed, so the keyboard silently never opens. Forcing a render with
|
|
1409
|
+
* `ApplicationRef.tick()` right here — still inside the same synchronous call stack as the tap — makes
|
|
1410
|
+
* the search input exist in the DOM in time to focus it for real, and skipping the animation keeps the
|
|
1411
|
+
* sheet from visibly jumping once the keyboard's own viewport resize kicks in immediately after.
|
|
1412
|
+
*
|
|
1413
|
+
* @param dialogService the dialog service provided alongside the select input
|
|
1414
|
+
* @param panel the panel component to render inside the sheet
|
|
1415
|
+
* @param injector the injector carrying the panel ref and the select input for the panel
|
|
1416
|
+
* @param ariaLabel names the sheet, so it stays named even before its header has rendered
|
|
1417
|
+
*/
|
|
1418
|
+
function openSelectPanelSheet(dialogService, panel, injector, ariaLabel) {
|
|
1419
|
+
const config = {
|
|
1420
|
+
content: panel,
|
|
1421
|
+
mode: 'sheet',
|
|
1422
|
+
size: 'maxContent',
|
|
1423
|
+
ariaLabel: ariaLabel || undefined,
|
|
1424
|
+
// `mod-select` lets the select packages scope their own dialog header tweaks (centered title,
|
|
1425
|
+
// close button pulled out of flow, no opening animation) without reaching into the generic
|
|
1426
|
+
// dialog styles.
|
|
1427
|
+
panelClasses: ['mod-select'],
|
|
1428
|
+
// The panel ref and the select input reach the panel through this injector: the dialog's own
|
|
1429
|
+
// `providers` hook is reserved by the service for `LuDialogRef`. `autoFocus: false` disables
|
|
1430
|
+
// CDK's own deferred autofocus — the search input is focused by hand right below instead.
|
|
1431
|
+
cdkConfigOverride: { injector, autoFocus: false },
|
|
1432
|
+
};
|
|
1433
|
+
const dialogRef = dialogService.open(config);
|
|
1434
|
+
injector.get(ApplicationRef).tick();
|
|
1435
|
+
const searchInput = dialogRef.cdkRef.overlayRef.overlayElement.querySelector('.textField-input-value');
|
|
1436
|
+
searchInput?.focus();
|
|
1437
|
+
trackVisibleViewport(dialogRef);
|
|
1438
|
+
return dialogRef;
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* Keeps `--components-dialog-visibleViewportBlockSize` and `--components-dialog-insetBlockEnd`
|
|
1442
|
+
* in sync with the visual viewport for as long as the sheet stays open.
|
|
1443
|
+
*
|
|
1444
|
+
* iOS doesn't shrink the layout viewport when the on-screen keyboard opens — only the visual one — so
|
|
1445
|
+
* a sheet pinned with a plain `bottom: 0` stays anchored to the bottom of the full, keyboard-unaware
|
|
1446
|
+
* layout viewport, which is now hidden behind the keyboard: most of the sheet renders underneath it,
|
|
1447
|
+
* clamped height or not. Nudging `bottom` up by the amount the keyboard currently obscures — on top of
|
|
1448
|
+
* clamping the max height — keeps the sheet entirely above the keyboard, using all the space that's
|
|
1449
|
+
* actually visible, instead of a second, outer page scroll on top of the listbox's own.
|
|
1450
|
+
*
|
|
1451
|
+
* Set on the sheet's own overlay element rather than `document.documentElement`: these custom properties
|
|
1452
|
+
* are also read by any other dialog in `mode: 'sheet'` (e.g. approbation-inbox's), and a document-wide
|
|
1453
|
+
* value would leak this select's keyboard tracking onto an unrelated sheet stacked underneath it.
|
|
1454
|
+
*/
|
|
1455
|
+
function trackVisibleViewport(dialogRef) {
|
|
1456
|
+
const viewport = window.visualViewport;
|
|
1457
|
+
if (!viewport) {
|
|
1458
|
+
return;
|
|
1459
|
+
}
|
|
1460
|
+
const style = dialogRef.cdkRef.overlayRef.overlayElement.style;
|
|
1461
|
+
const update = () => {
|
|
1462
|
+
style.setProperty('--components-dialog-visibleViewportBlockSize', `${viewport.height}px`);
|
|
1463
|
+
style.setProperty('--components-dialog-insetBlockEnd', `${window.innerHeight - viewport.height - viewport.offsetTop}px`);
|
|
1464
|
+
// The initially-selected option scrolls into view as soon as it's rendered (see
|
|
1465
|
+
// `scrollIntoViewOnceReady`), which — with the opening animation disabled — happens before the
|
|
1466
|
+
// keyboard has finished opening and before the resize above has clamped the sheet down to its
|
|
1467
|
+
// final size. That earlier scroll position is stale once the sheet's own geometry has changed
|
|
1468
|
+
// size underneath it, so it's redone here on every viewport update, landing correctly once the
|
|
1469
|
+
// keyboard settles.
|
|
1470
|
+
dialogRef.cdkRef.overlayRef.overlayElement.querySelector('.is-highlighted')?.scrollIntoView({ block: 'nearest' });
|
|
1471
|
+
};
|
|
1472
|
+
update();
|
|
1473
|
+
viewport.addEventListener('resize', update);
|
|
1474
|
+
viewport.addEventListener('scroll', update);
|
|
1475
|
+
dialogRef.closed$.pipe(take(1)).subscribe(() => {
|
|
1476
|
+
viewport.removeEventListener('resize', update);
|
|
1477
|
+
viewport.removeEventListener('scroll', update);
|
|
1478
|
+
style.removeProperty('--components-dialog-visibleViewportBlockSize');
|
|
1479
|
+
style.removeProperty('--components-dialog-insetBlockEnd');
|
|
1480
|
+
});
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1213
1483
|
/**
|
|
1214
1484
|
* Tracks whether the user is currently navigating with the pointer or with the keyboard.
|
|
1215
1485
|
*
|
|
@@ -1311,5 +1581,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
1311
1581
|
* Generated bundle index. Do not edit.
|
|
1312
1582
|
*/
|
|
1313
1583
|
|
|
1314
|
-
export { ALuSelectInputComponent, CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectKeyManager, LU_CORE_SELECT_TRANSLATIONS, LU_OPTION_CONTEXT, LuCoreSelectNoClueDirective, LuCoreSelectPanelHeaderDirective, LuCoreSelectTotalCountDirective, LuDisabledOptionDirective, LuDisplayerDirective, LuIsOptionSelectedPipe, LuOptionDirective, LuOptionGroupDirective, LuSelectPanelLayoutComponent, LuSelectPanelRef, LuSimpleSelectDefaultOptionComponent, SELECT_ID, SELECT_LABEL, SELECT_LABEL_ID, SELECT_PANEL_INSTANCE, TreeDisplayPipe, addAttributesOnCdkContainer, applySearchDelimiter, coreSelectDefaultOptionComparer, coreSelectDefaultOptionKey, luCoreSelectTranslations, provideLuSelectLabelsAndIds, provideOptionContext, CoreSelectPanelElement as ɵCoreSelectPanelElement, ɵIsSelectedStrategy, LuOptionComponent as ɵLuOptionComponent, LuOptionGroupPipe as ɵLuOptionGroupPipe, LuOptionOutletDirective as ɵLuOptionOutletDirective, generateGroups as ɵgenerateGroups, getGroupTemplateLocation as ɵgetGroupTemplateLocation, injectPointerNavigation as ɵinjectPointerNavigation, scrollIntoViewOnceReady as ɵscrollIntoViewOnceReady };
|
|
1584
|
+
export { ALuSelectInputComponent, CORE_SELECT_API_TOTAL_COUNT_PROVIDER, CoreSelectKeyManager, LU_CORE_SELECT_TRANSLATIONS, LU_OPTION_CONTEXT, LuCoreSelectNoClueDirective, LuCoreSelectPanelHeaderDirective, LuCoreSelectTotalCountDirective, LuDisabledOptionDirective, LuDisplayerDirective, LuIsOptionSelectedPipe, LuOptionDirective, LuOptionGroupDirective, LuSelectPanelLayoutComponent, LuSelectPanelRef, LuSimpleSelectDefaultOptionComponent, SELECT_ID, SELECT_LABEL, SELECT_LABEL_ID, SELECT_PANEL_INSTANCE, TreeDisplayPipe, addAttributesOnCdkContainer, applySearchDelimiter, coreSelectDefaultOptionComparer, coreSelectDefaultOptionKey, luCoreSelectTranslations, provideLuSelectLabelsAndIds, provideOptionContext, CoreSelectPanelElement as ɵCoreSelectPanelElement, ɵIsSelectedStrategy, LuOptionComponent as ɵLuOptionComponent, LuOptionGroupPipe as ɵLuOptionGroupPipe, LuOptionOutletDirective as ɵLuOptionOutletDirective, fillScrollViewport as ɵfillScrollViewport, generateGroups as ɵgenerateGroups, getGroupTemplateLocation as ɵgetGroupTemplateLocation, injectPointerNavigation as ɵinjectPointerNavigation, openSelectPanelSheet as ɵopenSelectPanelSheet, scrollIntoViewOnceReady as ɵscrollIntoViewOnceReady };
|
|
1315
1585
|
//# sourceMappingURL=lucca-front-ng-core-select.mjs.map
|