@lucca-front/ng 9.0.1 → 9.0.4-select.1
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/api/lib/select/feeder/api-feeder.module.d.ts +1 -2
- package/api/lib/select/pager/api-pager.module.d.ts +1 -2
- package/api/lib/select/searcher/api-searcher.module.d.ts +4 -5
- package/department/lib/select/feeder/department-feeder.module.d.ts +1 -2
- package/esm2020/api/lib/select/feeder/api-feeder.module.mjs +3 -5
- package/esm2020/api/lib/select/pager/api-pager.module.mjs +3 -5
- package/esm2020/api/lib/select/searcher/api-searcher.module.mjs +6 -7
- package/esm2020/date/lib/calendar/calendar-input.component.mjs +4 -1
- package/esm2020/date/lib/calendar/calendar-input.module.mjs +4 -6
- package/esm2020/department/lib/select/feeder/department-feeder.module.mjs +3 -5
- package/esm2020/establishment/lib/select/legal-unit-selector/legal-unit-selector.module.mjs +3 -5
- package/esm2020/establishment/lib/select/searcher/establishment-searcher.module.mjs +6 -7
- package/esm2020/safe-content/lib/index.mjs +2 -3
- package/esm2020/safe-content/lib/safe-content.module.mjs +6 -6
- package/esm2020/safe-content/lib/safe-html.pipe.mjs +19 -0
- package/esm2020/select2/lib/index.mjs +5 -0
- package/esm2020/select2/lib/input/index.mjs +3 -0
- package/esm2020/select2/lib/input/select-input.component.mjs +343 -0
- package/esm2020/select2/lib/input/select-input.module.mjs +20 -0
- package/esm2020/select2/lib/option/displayer.directive.mjs +23 -0
- package/esm2020/select2/lib/option/index.mjs +5 -0
- package/esm2020/select2/lib/option/option.component.mjs +57 -0
- package/esm2020/select2/lib/option/option.directive.mjs +23 -0
- package/esm2020/select2/lib/option/option.module.mjs +20 -0
- package/esm2020/select2/lib/panel/index.mjs +3 -0
- package/esm2020/select2/lib/panel/panel.component.mjs +118 -0
- package/esm2020/select2/lib/panel/panel.module.mjs +21 -0
- package/esm2020/select2/lib/select.model.mjs +6 -0
- package/esm2020/select2/lib/select.module.mjs +18 -0
- package/esm2020/select2/lucca-front-ng-select2.mjs +5 -0
- package/esm2020/select2/public-api.mjs +5 -0
- package/esm2020/tooltip/lib/panel/tooltip-panel.component.mjs +3 -4
- package/esm2020/tooltip/lib/panel/tooltip-panel.module.mjs +5 -6
- package/esm2020/tooltip/lib/trigger/tooltip-trigger.directive.mjs +1 -1
- package/esm2020/user/lib/select/homonyms/user-homonyms.module.mjs +5 -6
- package/esm2020/user/lib/select/searcher/user-searcher.module.mjs +6 -7
- package/establishment/lib/select/legal-unit-selector/legal-unit-selector.module.d.ts +1 -2
- package/establishment/lib/select/searcher/establishment-searcher.module.d.ts +4 -5
- package/fesm2015/lucca-front-ng-api.mjs +7 -10
- package/fesm2015/lucca-front-ng-api.mjs.map +1 -1
- package/fesm2015/lucca-front-ng-date.mjs +3 -2
- package/fesm2015/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2015/lucca-front-ng-department.mjs +3 -5
- package/fesm2015/lucca-front-ng-department.mjs.map +1 -1
- package/fesm2015/lucca-front-ng-establishment.mjs +5 -7
- package/fesm2015/lucca-front-ng-establishment.mjs.map +1 -1
- package/fesm2015/lucca-front-ng-safe-content.mjs +13 -23
- package/fesm2015/lucca-front-ng-safe-content.mjs.map +1 -1
- package/fesm2015/lucca-front-ng-select2.mjs +628 -0
- package/fesm2015/lucca-front-ng-select2.mjs.map +1 -0
- package/fesm2015/lucca-front-ng-tooltip.mjs +5 -7
- package/fesm2015/lucca-front-ng-tooltip.mjs.map +1 -1
- package/fesm2015/lucca-front-ng-user.mjs +6 -7
- package/fesm2015/lucca-front-ng-user.mjs.map +1 -1
- package/fesm2020/lucca-front-ng-api.mjs +7 -10
- package/fesm2020/lucca-front-ng-api.mjs.map +1 -1
- package/fesm2020/lucca-front-ng-date.mjs +3 -2
- package/fesm2020/lucca-front-ng-date.mjs.map +1 -1
- package/fesm2020/lucca-front-ng-department.mjs +3 -5
- package/fesm2020/lucca-front-ng-department.mjs.map +1 -1
- package/fesm2020/lucca-front-ng-establishment.mjs +5 -7
- package/fesm2020/lucca-front-ng-establishment.mjs.map +1 -1
- package/fesm2020/lucca-front-ng-safe-content.mjs +13 -23
- package/fesm2020/lucca-front-ng-safe-content.mjs.map +1 -1
- package/fesm2020/lucca-front-ng-select2.mjs +617 -0
- package/fesm2020/lucca-front-ng-select2.mjs.map +1 -0
- package/fesm2020/lucca-front-ng-tooltip.mjs +5 -7
- package/fesm2020/lucca-front-ng-tooltip.mjs.map +1 -1
- package/fesm2020/lucca-front-ng-user.mjs +6 -7
- package/fesm2020/lucca-front-ng-user.mjs.map +1 -1
- package/package.json +13 -3
- package/safe-content/lib/index.d.ts +1 -2
- package/safe-content/lib/safe-content.module.d.ts +2 -2
- package/safe-content/lib/safe-html.pipe.d.ts +16 -0
- package/select2/README.md +3 -0
- package/select2/index.d.ts +5 -0
- package/select2/lib/index.d.ts +4 -0
- package/select2/lib/input/index.d.ts +2 -0
- package/select2/lib/input/select-input.component.d.ts +75 -0
- package/select2/lib/input/select-input.module.d.ts +10 -0
- package/select2/lib/option/displayer.directive.d.ts +13 -0
- package/select2/lib/option/index.d.ts +4 -0
- package/select2/lib/option/option.component.d.ts +21 -0
- package/select2/lib/option/option.directive.d.ts +13 -0
- package/select2/lib/option/option.module.d.ts +10 -0
- package/select2/lib/panel/index.d.ts +2 -0
- package/select2/lib/panel/panel.component.d.ts +40 -0
- package/select2/lib/panel/panel.module.d.ts +11 -0
- package/select2/lib/select.model.d.ts +15 -0
- package/select2/lib/select.module.d.ts +9 -0
- package/select2/public-api.d.ts +1 -0
- package/style/components/_input.scss +7 -7
- package/style/definitions/select/_select-input.scss +107 -105
- package/tooltip/lib/panel/tooltip-panel.component.d.ts +3 -2
- package/tooltip/lib/panel/tooltip-panel.module.d.ts +1 -2
- package/tooltip/lib/trigger/tooltip-trigger.directive.d.ts +3 -2
- package/user/lib/select/homonyms/user-homonyms.module.d.ts +2 -3
- package/user/lib/select/searcher/user-searcher.module.d.ts +4 -5
- package/esm2020/safe-content/lib/safe-content.model.mjs +0 -2
- package/esm2020/safe-content/lib/safe-content.pipe.mjs +0 -29
- package/safe-content/lib/safe-content.model.d.ts +0 -1
- package/safe-content/lib/safe-content.pipe.d.ts +0 -11
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
import * as i2$1 from '@angular/cdk/overlay';
|
|
2
|
+
import { OverlayContainer, Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
3
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
4
|
+
import * as i1 from '@angular/common';
|
|
5
|
+
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { Directive, Input, InjectionToken, Component, ChangeDetectionStrategy, Inject, HostBinding, NgModule, EventEmitter, ViewChild, ViewChildren, HostListener, Injectable, Injector, forwardRef, ElementRef, Output } from '@angular/core';
|
|
8
|
+
import * as i2 from '@angular/forms';
|
|
9
|
+
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
10
|
+
import { BehaviorSubject, take, observeOn, asyncScheduler, map, takeUntil, ReplaySubject, Subject } from 'rxjs';
|
|
11
|
+
import * as i3 from '@angular/cdk/a11y';
|
|
12
|
+
import { ActiveDescendantKeyManager, A11yModule } from '@angular/cdk/a11y';
|
|
13
|
+
import * as i1$1 from '@angular/cdk/platform';
|
|
14
|
+
|
|
15
|
+
class LuDisplayerDirective {
|
|
16
|
+
constructor(templateRef) {
|
|
17
|
+
this.templateRef = templateRef;
|
|
18
|
+
}
|
|
19
|
+
set select(select) {
|
|
20
|
+
select.valueTpl = this.templateRef;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
LuDisplayerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuDisplayerDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
+
LuDisplayerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: LuDisplayerDirective, selector: "[luDisplayer]", inputs: { select: ["luDisplayerSelect", "select"], value: ["luDisplayer", "value"] }, ngImport: i0 });
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuDisplayerDirective, decorators: [{
|
|
26
|
+
type: Directive,
|
|
27
|
+
args: [{ selector: '[luDisplayer]' }]
|
|
28
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { select: [{
|
|
29
|
+
type: Input,
|
|
30
|
+
args: ['luDisplayerSelect']
|
|
31
|
+
}], value: [{
|
|
32
|
+
type: Input,
|
|
33
|
+
args: ['luDisplayer']
|
|
34
|
+
}] } });
|
|
35
|
+
|
|
36
|
+
const SELECT_ID = new InjectionToken('LuSelectPanelData');
|
|
37
|
+
const SELECT_PANEL_DATA = new InjectionToken('LuSelectId');
|
|
38
|
+
const SELECT_LABEL = new InjectionToken('LuSelectLabel');
|
|
39
|
+
const SELECT_LABEL_ID = new InjectionToken('LuSelectLabelId');
|
|
40
|
+
|
|
41
|
+
class LuOptionComponent {
|
|
42
|
+
constructor(elementRef, selectId) {
|
|
43
|
+
this.elementRef = elementRef;
|
|
44
|
+
this.selectId = selectId;
|
|
45
|
+
this.hasOptionItemClass = true;
|
|
46
|
+
this.isSelected = false;
|
|
47
|
+
this.optionIndex = 0;
|
|
48
|
+
this.isHighlighted$ = new BehaviorSubject(false);
|
|
49
|
+
this.disabled = false;
|
|
50
|
+
this.role = 'option';
|
|
51
|
+
}
|
|
52
|
+
get id() {
|
|
53
|
+
return `lu-select-${this.selectId}-option-${this.optionIndex}`;
|
|
54
|
+
}
|
|
55
|
+
setActiveStyles() {
|
|
56
|
+
this.isHighlighted$.next(true);
|
|
57
|
+
this.elementRef.nativeElement.scrollIntoView({ block: 'center' });
|
|
58
|
+
}
|
|
59
|
+
setInactiveStyles() {
|
|
60
|
+
this.isHighlighted$.next(false);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
LuOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuOptionComponent, deps: [{ token: i0.ElementRef }, { token: SELECT_ID }], target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
+
LuOptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: LuOptionComponent, selector: "lu-select-option", inputs: { isSelected: "isSelected", option: "option", optionIndex: "optionIndex", disabled: "disabled" }, host: { properties: { "class.optionItem": "this.hasOptionItemClass", "attr.aria-selected": "this.isSelected", "attr.role": "this.role", "attr.id": "this.id" } }, ngImport: i0, template: "<div\r\n\tclass=\"optionItem-value\"\r\n\t[class.is-selected]=\"isSelected\"\r\n\t[class.is-highlighted]=\"isHighlighted$ | async\"\r\n\t[class.is-disabled]=\"disabled\"\r\n>\r\n\t<ng-content></ng-content>\r\n</div>\r\n", styles: [":host{display:block}.optionItem{position:relative}.optionItem-value{display:block;cursor:pointer;padding:.5rem;padding:var(--components-options-item-padding-vertical) var(--components-options-item-padding-horizontal);transition:background 50ms ease}.optionItem-value.is-selected{background:var(--palettes-primary-100);background:var(--commons-selected)}.optionItem-value:hover,.optionItem-value.is-highlighted,.optionItem-value.is-focus{background:var(--palettes-primary-50);background:var(--commons-highlight)}:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.lu-select-value) .optionItem-value.is-focus,:host-context(.lu-select-value) .optionItem-value.is-highlighted{background:inherit}:host-context(.mod-multiple) .optionItem-value{position:relative;padding-left:2rem;padding-left:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before{display:block;position:absolute;left:.5rem;left:var(--components-options-checkbox-left);top:50%;transform:translateY(-50%)}:host-context(.mod-multiple) .optionItem-value:before{border-radius:var(--commons-border-radius);border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--palettes-grey-color);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);content:\"\";display:block;height:1rem;height:var(--components-options-checkbox-size);transition:all .1s ease;width:1rem;width:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after{color:#fff;font-size:.8rem;content:\"\\e91a\";font-family:Lucca icons;display:inline-block;vertical-align:text-bottom;font-style:normal;line-height:1rem;line-height:var(--components-options-checkbox-size);padding-top:.05rem;position:absolute;text-align:center;transform:translateY(-50%) scale(0);transition:all .1s ease;width:1rem;width:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value.is-selected:before{background-color:#f60;background-color:var(--components-options-checkbox-color);box-shadow:inset 0 0 0 2px #f60;box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple) .optionItem-value.is-selected:after{transform:translateY(-50%) scale(1)}:host-context(.mod-multiple) .optionItem-value:hover:before{box-shadow:inset 0 0 0 2px #f60;box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple).establishmentOption .optionItem-value{position:relative;padding-left:2.5rem;padding-left:calc(2 * var(--components-options-item-padding-horizontal) + var(--components-options-checkbox-size) + var(--spacings-smaller))}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after{left:1rem;left:calc(2 * var(--components-options-item-padding-horizontal))}\n"], dependencies: [{ kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuOptionComponent, decorators: [{
|
|
66
|
+
type: Component,
|
|
67
|
+
args: [{ selector: 'lu-select-option', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n\tclass=\"optionItem-value\"\r\n\t[class.is-selected]=\"isSelected\"\r\n\t[class.is-highlighted]=\"isHighlighted$ | async\"\r\n\t[class.is-disabled]=\"disabled\"\r\n>\r\n\t<ng-content></ng-content>\r\n</div>\r\n", styles: [":host{display:block}.optionItem{position:relative}.optionItem-value{display:block;cursor:pointer;padding:.5rem;padding:var(--components-options-item-padding-vertical) var(--components-options-item-padding-horizontal);transition:background 50ms ease}.optionItem-value.is-selected{background:var(--palettes-primary-100);background:var(--commons-selected)}.optionItem-value:hover,.optionItem-value.is-highlighted,.optionItem-value.is-focus{background:var(--palettes-primary-50);background:var(--commons-highlight)}:host-context(.lu-select-value) .optionItem-value{padding:0;overflow:hidden;text-overflow:ellipsis}:host-context(.lu-select-value) .optionItem-value:hover,:host-context(.lu-select-value) .optionItem-value.is-focus,:host-context(.lu-select-value) .optionItem-value.is-highlighted{background:inherit}:host-context(.mod-multiple) .optionItem-value{position:relative;padding-left:2rem;padding-left:var(--components-options-item-multiple-padding)}:host-context(.mod-multiple) .optionItem-value:after,:host-context(.mod-multiple) .optionItem-value:before{display:block;position:absolute;left:.5rem;left:var(--components-options-checkbox-left);top:50%;transform:translateY(-50%)}:host-context(.mod-multiple) .optionItem-value:before{border-radius:var(--commons-border-radius);border-radius:var(--components-options-checkbox-border-radius);box-shadow:inset 0 0 0 2px var(--palettes-grey-color);box-shadow:inset 0 0 0 2px var(--components-options-checkbox-border-color);content:\"\";display:block;height:1rem;height:var(--components-options-checkbox-size);transition:all .1s ease;width:1rem;width:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value:after{color:#fff;font-size:.8rem;content:\"\\e91a\";font-family:Lucca icons;display:inline-block;vertical-align:text-bottom;font-style:normal;line-height:1rem;line-height:var(--components-options-checkbox-size);padding-top:.05rem;position:absolute;text-align:center;transform:translateY(-50%) scale(0);transition:all .1s ease;width:1rem;width:var(--components-options-checkbox-size)}:host-context(.mod-multiple) .optionItem-value.is-selected:before{background-color:#f60;background-color:var(--components-options-checkbox-color);box-shadow:inset 0 0 0 2px #f60;box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple) .optionItem-value.is-selected:after{transform:translateY(-50%) scale(1)}:host-context(.mod-multiple) .optionItem-value:hover:before{box-shadow:inset 0 0 0 2px #f60;box-shadow:inset 0 0 0 2px var(--components-options-checkbox-color)}:host-context(.mod-multiple).establishmentOption .optionItem-value{position:relative;padding-left:2.5rem;padding-left:calc(2 * var(--components-options-item-padding-horizontal) + var(--components-options-checkbox-size) + var(--spacings-smaller))}:host-context(.mod-multiple).establishmentOption .optionItem-value:before,:host-context(.mod-multiple).establishmentOption .optionItem-value:after{left:1rem;left:calc(2 * var(--components-options-item-padding-horizontal))}\n"] }]
|
|
68
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
|
|
69
|
+
type: Inject,
|
|
70
|
+
args: [SELECT_ID]
|
|
71
|
+
}] }]; }, propDecorators: { hasOptionItemClass: [{
|
|
72
|
+
type: HostBinding,
|
|
73
|
+
args: ['class.optionItem']
|
|
74
|
+
}], isSelected: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}, {
|
|
77
|
+
type: HostBinding,
|
|
78
|
+
args: ['attr.aria-selected']
|
|
79
|
+
}], option: [{
|
|
80
|
+
type: Input
|
|
81
|
+
}], optionIndex: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}], disabled: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}], role: [{
|
|
86
|
+
type: HostBinding,
|
|
87
|
+
args: ['attr.role']
|
|
88
|
+
}], id: [{
|
|
89
|
+
type: HostBinding,
|
|
90
|
+
args: ['attr.id']
|
|
91
|
+
}] } });
|
|
92
|
+
|
|
93
|
+
class LuOptionDirective {
|
|
94
|
+
constructor(templateRef) {
|
|
95
|
+
this.templateRef = templateRef;
|
|
96
|
+
}
|
|
97
|
+
set select(select) {
|
|
98
|
+
select.optionTpl = this.templateRef;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
LuOptionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuOptionDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
102
|
+
LuOptionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0", type: LuOptionDirective, selector: "[luOption]", inputs: { select: ["luOptionSelect", "select"], value: ["luOption", "value"] }, ngImport: i0 });
|
|
103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuOptionDirective, decorators: [{
|
|
104
|
+
type: Directive,
|
|
105
|
+
args: [{ selector: '[luOption]' }]
|
|
106
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { select: [{
|
|
107
|
+
type: Input,
|
|
108
|
+
args: ['luOptionSelect']
|
|
109
|
+
}], value: [{
|
|
110
|
+
type: Input,
|
|
111
|
+
args: ['luOption']
|
|
112
|
+
}] } });
|
|
113
|
+
|
|
114
|
+
class LuOption2Module {
|
|
115
|
+
}
|
|
116
|
+
LuOption2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuOption2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
117
|
+
LuOption2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: LuOption2Module, declarations: [LuOptionDirective, LuDisplayerDirective, LuOptionComponent], imports: [CommonModule], exports: [LuOptionDirective, LuDisplayerDirective, LuOptionComponent] });
|
|
118
|
+
LuOption2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuOption2Module, imports: [CommonModule] });
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuOption2Module, decorators: [{
|
|
120
|
+
type: NgModule,
|
|
121
|
+
args: [{
|
|
122
|
+
imports: [CommonModule],
|
|
123
|
+
declarations: [LuOptionDirective, LuDisplayerDirective, LuOptionComponent],
|
|
124
|
+
exports: [LuOptionDirective, LuDisplayerDirective, LuOptionComponent],
|
|
125
|
+
}]
|
|
126
|
+
}] });
|
|
127
|
+
|
|
128
|
+
class LuSelectPanelRef {
|
|
129
|
+
constructor() {
|
|
130
|
+
this.closed = new EventEmitter();
|
|
131
|
+
this.previousPage = new EventEmitter();
|
|
132
|
+
this.nextPage = new EventEmitter();
|
|
133
|
+
this.valueChanged = new EventEmitter();
|
|
134
|
+
this.clueChanged = new EventEmitter();
|
|
135
|
+
this.activeOptionIdChanged = new EventEmitter();
|
|
136
|
+
}
|
|
137
|
+
close() {
|
|
138
|
+
this.closed.next();
|
|
139
|
+
this.closed.complete();
|
|
140
|
+
this.nextPage.next();
|
|
141
|
+
this.nextPage.complete();
|
|
142
|
+
this.previousPage.next();
|
|
143
|
+
this.previousPage.complete();
|
|
144
|
+
this.valueChanged.complete();
|
|
145
|
+
this.clueChanged.emit(null);
|
|
146
|
+
this.clueChanged.complete();
|
|
147
|
+
this.activeOptionIdChanged.emit(undefined);
|
|
148
|
+
this.activeOptionIdChanged.complete();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
class LuSelectPanelComponent {
|
|
152
|
+
constructor(panelRef, selectId, data) {
|
|
153
|
+
this.panelRef = panelRef;
|
|
154
|
+
this.selectId = selectId;
|
|
155
|
+
this.data = data;
|
|
156
|
+
this.search = null;
|
|
157
|
+
this.options$ = data.options$;
|
|
158
|
+
this.optionComparer = data.optionComparer;
|
|
159
|
+
this.initialValue = data.initialValue;
|
|
160
|
+
this.optionTpl = data.optionTpl;
|
|
161
|
+
this.searchable = data.searchable;
|
|
162
|
+
}
|
|
163
|
+
set searchInput(input) {
|
|
164
|
+
if (!input) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
setTimeout(() => input.nativeElement.focus());
|
|
168
|
+
}
|
|
169
|
+
get selected() {
|
|
170
|
+
return this.keyManager?.activeItem?.option;
|
|
171
|
+
}
|
|
172
|
+
onScroll(evt) {
|
|
173
|
+
if (!(evt.target instanceof HTMLElement)) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (evt.target.scrollTop === 0) {
|
|
177
|
+
this.panelRef.previousPage.emit();
|
|
178
|
+
}
|
|
179
|
+
if (evt.target.scrollHeight === evt.target.scrollTop + evt.target.clientHeight) {
|
|
180
|
+
this.panelRef.nextPage.emit();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
ngAfterViewInit() {
|
|
184
|
+
if (!this.optionsQL) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
this.keyManager = new ActiveDescendantKeyManager(this.optionsQL).withHomeAndEnd();
|
|
188
|
+
if (this.initialValue) {
|
|
189
|
+
this.options$
|
|
190
|
+
?.pipe(take(1), observeOn(asyncScheduler), map((options) => options.findIndex((o) => this.optionComparer(o, this.initialValue))), takeUntil(this.panelRef.closed))
|
|
191
|
+
.subscribe((selectedIndex) => this.keyManager.setActiveItem(selectedIndex));
|
|
192
|
+
}
|
|
193
|
+
this.keyManager.change
|
|
194
|
+
.pipe(map(() => this.keyManager.activeItem?.id), takeUntil(this.panelRef.closed))
|
|
195
|
+
.subscribe((activeDescendant) => this.panelRef.activeOptionIdChanged.emit(activeDescendant));
|
|
196
|
+
}
|
|
197
|
+
onKeyDown($event) {
|
|
198
|
+
switch ($event.key) {
|
|
199
|
+
case 'Escape':
|
|
200
|
+
case 'Tab':
|
|
201
|
+
return this.panelRef.close();
|
|
202
|
+
case 'Enter':
|
|
203
|
+
return this.panelRef.emitValue(this.selected);
|
|
204
|
+
default:
|
|
205
|
+
this.keyManager?.onKeydown($event);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
updateClue(clue) {
|
|
209
|
+
this.search = clue;
|
|
210
|
+
this.panelRef.clueChanged.emit(clue);
|
|
211
|
+
setTimeout(() => this.keyManager.setFirstItemActive());
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
LuSelectPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectPanelComponent, deps: [{ token: LuSelectPanelRef }, { token: SELECT_ID }, { token: SELECT_PANEL_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
215
|
+
LuSelectPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: LuSelectPanelComponent, selector: "lu-select-panel", host: { listeners: { "keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "optionsQL", predicate: LuOptionComponent, descendants: true }], ngImport: i0, template: "<div\r\n\tclass=\"lu-picker-panel lu-option-picker-panel\"\r\n\trole=\"dialog\"\r\n\tcdkTrapFocus\r\n\t*ngIf=\"{ options: options$ | async } as ctx\"\r\n\t[cdkTrapFocusAutoCapture]=\"true\"\r\n>\r\n\t<div class=\"lu-picker-content\" tabindex=\"0\" (scroll)=\"onScroll($event)\">\r\n\t\t<ng-container *ngIf=\"searchable\">\r\n\t\t\t<div class=\"textfield mod-search\">\r\n\t\t\t\t<input #searchInput class=\"textfield-input\" [(ngModel)]=\"search\" (ngModelChange)=\"updateClue($event)\" />\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"optionPlaceholder\" *ngIf=\"search && !ctx.options?.length\">\r\n\t\t\t\t<p class=\"optionPlaceholder-content u-marginBottomReset\">Aucun r\u00E9sultat pour votre recherche</p>\r\n\t\t\t\t<button type=\"button\" class=\"link\" (click)=\"updateClue(null); searchInput.focus()\">Vider la recherche</button>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\r\n\t\t<lu-select-option\r\n\t\t\t*ngFor=\"let option of ctx.options; let index = index\"\r\n\t\t\t[option]=\"option\"\r\n\t\t\t[optionIndex]=\"index\"\r\n\t\t\t[isSelected]=\"option === selected\"\r\n\t\t\t[disabled]=\"false\"\r\n\t\t\t(click)=\"panelRef.emitValue(option)\"\r\n\t\t>\r\n\t\t\t<ng-container *ngTemplateOutlet=\"optionTpl; context: { $implicit: option }\"></ng-container>\r\n\t\t</lu-select-option>\r\n\t</div>\r\n</div>\r\n", styles: [".textfield.mod-search{width:100%}.textfield-input{border-radius:0;box-shadow:none;background:#FFFFFF;border-bottom:1px solid var(--palettes-grey-200);border-bottom:var(--commons-divider-width) solid var(--commons-divider-color)}.textfield-input:hover{background-color:#ebf0fa;background-color:var(--palettes-grey-50)}.textfield-input:focus{background-color:#fff;border-bottom-color:#ff7e29;border-bottom-color:var(--palettes-primary-600)}.checkbox.mod-formerEmployee{padding:.25rem .5rem;padding:var(--spacings-smallest) var(--components-options-item-padding-horizontal);border-bottom:1px solid var(--palettes-grey-200);border-bottom:var(--commons-divider-width) solid var(--commons-divider-color);background-color:#ebf0fa;background-color:var(--palettes-grey-50);font-style:italic}.optionPlaceholder{display:block;padding:.5rem;padding:var(--components-options-item-padding-vertical) var(--components-options-item-padding-horizontal);font-style:italic;color:#96a6c5;color:var(--colors-text-light-color)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: LuOptionComponent, selector: "lu-select-option", inputs: ["isSelected", "option", "optionIndex", "disabled"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectPanelComponent, decorators: [{
|
|
217
|
+
type: Component,
|
|
218
|
+
args: [{ selector: 'lu-select-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n\tclass=\"lu-picker-panel lu-option-picker-panel\"\r\n\trole=\"dialog\"\r\n\tcdkTrapFocus\r\n\t*ngIf=\"{ options: options$ | async } as ctx\"\r\n\t[cdkTrapFocusAutoCapture]=\"true\"\r\n>\r\n\t<div class=\"lu-picker-content\" tabindex=\"0\" (scroll)=\"onScroll($event)\">\r\n\t\t<ng-container *ngIf=\"searchable\">\r\n\t\t\t<div class=\"textfield mod-search\">\r\n\t\t\t\t<input #searchInput class=\"textfield-input\" [(ngModel)]=\"search\" (ngModelChange)=\"updateClue($event)\" />\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"optionPlaceholder\" *ngIf=\"search && !ctx.options?.length\">\r\n\t\t\t\t<p class=\"optionPlaceholder-content u-marginBottomReset\">Aucun r\u00E9sultat pour votre recherche</p>\r\n\t\t\t\t<button type=\"button\" class=\"link\" (click)=\"updateClue(null); searchInput.focus()\">Vider la recherche</button>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\r\n\t\t<lu-select-option\r\n\t\t\t*ngFor=\"let option of ctx.options; let index = index\"\r\n\t\t\t[option]=\"option\"\r\n\t\t\t[optionIndex]=\"index\"\r\n\t\t\t[isSelected]=\"option === selected\"\r\n\t\t\t[disabled]=\"false\"\r\n\t\t\t(click)=\"panelRef.emitValue(option)\"\r\n\t\t>\r\n\t\t\t<ng-container *ngTemplateOutlet=\"optionTpl; context: { $implicit: option }\"></ng-container>\r\n\t\t</lu-select-option>\r\n\t</div>\r\n</div>\r\n", styles: [".textfield.mod-search{width:100%}.textfield-input{border-radius:0;box-shadow:none;background:#FFFFFF;border-bottom:1px solid var(--palettes-grey-200);border-bottom:var(--commons-divider-width) solid var(--commons-divider-color)}.textfield-input:hover{background-color:#ebf0fa;background-color:var(--palettes-grey-50)}.textfield-input:focus{background-color:#fff;border-bottom-color:#ff7e29;border-bottom-color:var(--palettes-primary-600)}.checkbox.mod-formerEmployee{padding:.25rem .5rem;padding:var(--spacings-smallest) var(--components-options-item-padding-horizontal);border-bottom:1px solid var(--palettes-grey-200);border-bottom:var(--commons-divider-width) solid var(--commons-divider-color);background-color:#ebf0fa;background-color:var(--palettes-grey-50);font-style:italic}.optionPlaceholder{display:block;padding:.5rem;padding:var(--components-options-item-padding-vertical) var(--components-options-item-padding-horizontal);font-style:italic;color:#96a6c5;color:var(--colors-text-light-color)}\n"] }]
|
|
219
|
+
}], ctorParameters: function () { return [{ type: LuSelectPanelRef }, { type: undefined, decorators: [{
|
|
220
|
+
type: Inject,
|
|
221
|
+
args: [SELECT_ID]
|
|
222
|
+
}] }, { type: undefined, decorators: [{
|
|
223
|
+
type: Inject,
|
|
224
|
+
args: [SELECT_PANEL_DATA]
|
|
225
|
+
}] }]; }, propDecorators: { searchInput: [{
|
|
226
|
+
type: ViewChild,
|
|
227
|
+
args: ['searchInput']
|
|
228
|
+
}], optionsQL: [{
|
|
229
|
+
type: ViewChildren,
|
|
230
|
+
args: [LuOptionComponent]
|
|
231
|
+
}], onKeyDown: [{
|
|
232
|
+
type: HostListener,
|
|
233
|
+
args: ['keydown', ['$event']]
|
|
234
|
+
}] } });
|
|
235
|
+
|
|
236
|
+
class LuSelectPanelModule {
|
|
237
|
+
}
|
|
238
|
+
LuSelectPanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
239
|
+
LuSelectPanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: LuSelectPanelModule, declarations: [LuSelectPanelComponent], imports: [CommonModule, FormsModule, A11yModule, LuOption2Module], exports: [LuSelectPanelComponent] });
|
|
240
|
+
LuSelectPanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectPanelModule, imports: [CommonModule, FormsModule, A11yModule, LuOption2Module] });
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectPanelModule, decorators: [{
|
|
242
|
+
type: NgModule,
|
|
243
|
+
args: [{
|
|
244
|
+
imports: [CommonModule, FormsModule, A11yModule, LuOption2Module],
|
|
245
|
+
declarations: [LuSelectPanelComponent],
|
|
246
|
+
exports: [LuSelectPanelComponent],
|
|
247
|
+
}]
|
|
248
|
+
}] });
|
|
249
|
+
|
|
250
|
+
/* eslint-disable @angular-eslint/no-output-on-prefix */
|
|
251
|
+
let selectId = 0;
|
|
252
|
+
function selectIdFactory() {
|
|
253
|
+
return selectId++;
|
|
254
|
+
}
|
|
255
|
+
function selectLabelFactory(elementRef) {
|
|
256
|
+
function getLabel(node) {
|
|
257
|
+
if (node instanceof HTMLLabelElement) {
|
|
258
|
+
return node;
|
|
259
|
+
}
|
|
260
|
+
if (!node.parentElement) {
|
|
261
|
+
return undefined;
|
|
262
|
+
}
|
|
263
|
+
return getLabel(node.parentElement);
|
|
264
|
+
}
|
|
265
|
+
return getLabel(elementRef.nativeElement);
|
|
266
|
+
}
|
|
267
|
+
function selectLabelIdFactory(label, selectId) {
|
|
268
|
+
return label?.id || `lu-select-label-${selectId}`;
|
|
269
|
+
}
|
|
270
|
+
class LuSelectOverlayContainer extends OverlayContainer {
|
|
271
|
+
constructor(document, platform, selectLabelId, selectId) {
|
|
272
|
+
super(document, platform);
|
|
273
|
+
this.selectLabelId = selectLabelId;
|
|
274
|
+
this.selectId = selectId;
|
|
275
|
+
}
|
|
276
|
+
_createContainer() {
|
|
277
|
+
super._createContainer();
|
|
278
|
+
this._containerElement.setAttribute('aria-labelledby', this.selectLabelId);
|
|
279
|
+
this._containerElement.setAttribute('role', 'listbox');
|
|
280
|
+
this._containerElement.id = `lu-select-overlay-container-${this.selectId}`;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
LuSelectOverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectOverlayContainer, deps: [{ token: DOCUMENT }, { token: i1$1.Platform }, { token: SELECT_LABEL_ID }, { token: SELECT_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
284
|
+
LuSelectOverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectOverlayContainer });
|
|
285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectOverlayContainer, decorators: [{
|
|
286
|
+
type: Injectable
|
|
287
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
288
|
+
type: Inject,
|
|
289
|
+
args: [DOCUMENT]
|
|
290
|
+
}] }, { type: i1$1.Platform }, { type: undefined, decorators: [{
|
|
291
|
+
type: Inject,
|
|
292
|
+
args: [SELECT_LABEL_ID]
|
|
293
|
+
}] }, { type: undefined, decorators: [{
|
|
294
|
+
type: Inject,
|
|
295
|
+
args: [SELECT_ID]
|
|
296
|
+
}] }]; } });
|
|
297
|
+
class LuSelectOverlay extends Overlay {
|
|
298
|
+
}
|
|
299
|
+
LuSelectOverlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectOverlay, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
300
|
+
LuSelectOverlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectOverlay });
|
|
301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectOverlay, decorators: [{
|
|
302
|
+
type: Injectable
|
|
303
|
+
}] });
|
|
304
|
+
class SelectPanelRef extends LuSelectPanelRef {
|
|
305
|
+
constructor(overlayRef, parentInjector, panelData) {
|
|
306
|
+
super();
|
|
307
|
+
this.overlayRef = overlayRef;
|
|
308
|
+
const injector = Injector.create({
|
|
309
|
+
providers: [
|
|
310
|
+
{ provide: LuSelectPanelRef, useValue: this },
|
|
311
|
+
{ provide: SELECT_PANEL_DATA, useValue: panelData },
|
|
312
|
+
],
|
|
313
|
+
parent: parentInjector,
|
|
314
|
+
});
|
|
315
|
+
this.portalRef = new ComponentPortal(LuSelectPanelComponent, undefined, injector);
|
|
316
|
+
this.panelRef = overlayRef.attach(this.portalRef);
|
|
317
|
+
this.instance = this.panelRef.instance;
|
|
318
|
+
overlayRef
|
|
319
|
+
.backdropClick()
|
|
320
|
+
.pipe(takeUntil(this.closed))
|
|
321
|
+
.subscribe(() => this.close());
|
|
322
|
+
}
|
|
323
|
+
emitValue(value) {
|
|
324
|
+
this.valueChanged.emit(value);
|
|
325
|
+
this.close();
|
|
326
|
+
}
|
|
327
|
+
close() {
|
|
328
|
+
super.close();
|
|
329
|
+
this.panelRef.destroy();
|
|
330
|
+
this.overlayRef.detach();
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
class LuSelectInput2Component {
|
|
334
|
+
constructor(positionBuilder, scrollStrategies, elementRef, injector, overlay, changeDetectorRef, overlayContainer, label, labelId) {
|
|
335
|
+
this.positionBuilder = positionBuilder;
|
|
336
|
+
this.scrollStrategies = scrollStrategies;
|
|
337
|
+
this.elementRef = elementRef;
|
|
338
|
+
this.injector = injector;
|
|
339
|
+
this.overlay = overlay;
|
|
340
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
341
|
+
this.label = label;
|
|
342
|
+
this.labelId = labelId;
|
|
343
|
+
this.tabindex = 0;
|
|
344
|
+
this.placeholder = '';
|
|
345
|
+
this.multiple = false;
|
|
346
|
+
this.clearable = false;
|
|
347
|
+
this.disabled = false;
|
|
348
|
+
this.isPanelOpen = false;
|
|
349
|
+
this.role = 'combobox';
|
|
350
|
+
this.overlayConfig = {
|
|
351
|
+
hasBackdrop: true,
|
|
352
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
353
|
+
};
|
|
354
|
+
this.optionComparer = (option1, option2) => JSON.stringify(option1) === JSON.stringify(option2);
|
|
355
|
+
this.clueChange = new EventEmitter();
|
|
356
|
+
this.nextPage = new EventEmitter();
|
|
357
|
+
this.previousPage = new EventEmitter();
|
|
358
|
+
this.options$ = new ReplaySubject(1);
|
|
359
|
+
this.clue = null;
|
|
360
|
+
this.destroyed$ = new Subject();
|
|
361
|
+
this.overlayContainerRef = overlayContainer.getContainerElement();
|
|
362
|
+
}
|
|
363
|
+
get searchable() {
|
|
364
|
+
return this.clueChange.observed;
|
|
365
|
+
}
|
|
366
|
+
get isFilled() {
|
|
367
|
+
return this.value !== null && this.value !== undefined;
|
|
368
|
+
}
|
|
369
|
+
get ariaControls() {
|
|
370
|
+
return this.overlayContainerRef.id;
|
|
371
|
+
}
|
|
372
|
+
set options(options) {
|
|
373
|
+
this.options$.next(options);
|
|
374
|
+
}
|
|
375
|
+
onKeydown($event) {
|
|
376
|
+
if (!this.isPanelOpen) {
|
|
377
|
+
this.openPanel();
|
|
378
|
+
$event.stopPropagation();
|
|
379
|
+
$event.preventDefault();
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
registerOnChange(onChange) {
|
|
383
|
+
this.onChange = onChange;
|
|
384
|
+
}
|
|
385
|
+
registerOnTouched(onTouched) {
|
|
386
|
+
this.onTouched = onTouched;
|
|
387
|
+
}
|
|
388
|
+
setDisabledState(isDisabled) {
|
|
389
|
+
this.disabled = isDisabled;
|
|
390
|
+
}
|
|
391
|
+
ngOnDestroy() {
|
|
392
|
+
this.destroyed$.next();
|
|
393
|
+
this.destroyed$.complete();
|
|
394
|
+
}
|
|
395
|
+
ngOnInit() {
|
|
396
|
+
if (this.label) {
|
|
397
|
+
this.label.id = this.labelId;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
clearValue(event) {
|
|
401
|
+
event.stopPropagation();
|
|
402
|
+
this.onChange?.(null);
|
|
403
|
+
this.value = null;
|
|
404
|
+
}
|
|
405
|
+
openPanel() {
|
|
406
|
+
if (this.isPanelOpen || this.disabled) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
const overlayConfig = this.overlayConfig || {};
|
|
410
|
+
overlayConfig.positionStrategy = this.positionBuilder.flexibleConnectedTo(this.elementRef).withPositions([
|
|
411
|
+
{
|
|
412
|
+
originX: 'start',
|
|
413
|
+
originY: 'bottom',
|
|
414
|
+
overlayX: 'start',
|
|
415
|
+
overlayY: 'top',
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
originX: 'end',
|
|
419
|
+
originY: 'bottom',
|
|
420
|
+
overlayX: 'end',
|
|
421
|
+
overlayY: 'top',
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
originX: 'start',
|
|
425
|
+
originY: 'top',
|
|
426
|
+
overlayX: 'start',
|
|
427
|
+
overlayY: 'bottom',
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
originX: 'end',
|
|
431
|
+
originY: 'top',
|
|
432
|
+
overlayX: 'end',
|
|
433
|
+
overlayY: 'bottom',
|
|
434
|
+
},
|
|
435
|
+
]);
|
|
436
|
+
overlayConfig.scrollStrategy = this.scrollStrategies.reposition();
|
|
437
|
+
overlayConfig.minWidth = this.elementRef.nativeElement.clientWidth;
|
|
438
|
+
overlayConfig.maxHeight = '100vh';
|
|
439
|
+
overlayConfig.maxWidth = '100vw';
|
|
440
|
+
const overlayRef = this.overlay.create(overlayConfig);
|
|
441
|
+
this.isPanelOpen = true;
|
|
442
|
+
this.panelRef = new SelectPanelRef(overlayRef, this.injector, {
|
|
443
|
+
initialValue: this.value,
|
|
444
|
+
optionComparer: this.optionComparer,
|
|
445
|
+
options$: this.options$,
|
|
446
|
+
searchable: this.searchable,
|
|
447
|
+
optionTpl: this.optionTpl,
|
|
448
|
+
});
|
|
449
|
+
this.panelRef.valueChanged.subscribe((value) => {
|
|
450
|
+
this.onChange?.(value);
|
|
451
|
+
this.value = value;
|
|
452
|
+
});
|
|
453
|
+
this.panelRef.nextPage.subscribe(() => this.nextPage.emit());
|
|
454
|
+
this.panelRef.previousPage.subscribe(() => this.previousPage.emit());
|
|
455
|
+
this.panelRef.clueChanged.subscribe((clue) => {
|
|
456
|
+
this.clueChange.emit(clue);
|
|
457
|
+
this.clue = clue;
|
|
458
|
+
});
|
|
459
|
+
this.panelRef.activeOptionIdChanged.subscribe((optionId) => {
|
|
460
|
+
this.activeDescendant = optionId;
|
|
461
|
+
this.changeDetectorRef.markForCheck();
|
|
462
|
+
});
|
|
463
|
+
this.panelRef.closed.subscribe(() => this.closePanel());
|
|
464
|
+
}
|
|
465
|
+
closePanel() {
|
|
466
|
+
if (!this.isPanelOpen) {
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
this.isPanelOpen = false;
|
|
470
|
+
this.panelRef.close();
|
|
471
|
+
this.panelRef = undefined;
|
|
472
|
+
}
|
|
473
|
+
writeValue(value) {
|
|
474
|
+
this.value = value;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
LuSelectInput2Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectInput2Component, deps: [{ token: i2$1.OverlayPositionBuilder }, { token: i2$1.ScrollStrategyOptions }, { token: i0.ElementRef }, { token: i0.Injector }, { token: LuSelectOverlay }, { token: i0.ChangeDetectorRef }, { token: i2$1.OverlayContainer }, { token: SELECT_LABEL }, { token: SELECT_LABEL_ID }], target: i0.ɵɵFactoryTarget.Component });
|
|
478
|
+
LuSelectInput2Component.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.0", type: LuSelectInput2Component, selector: "lu-select2", inputs: { placeholder: "placeholder", multiple: "multiple", clearable: "clearable", disabled: "disabled", overlayConfig: "overlayConfig", options: "options", optionComparer: "optionComparer", optionTpl: "optionTpl", valueTpl: "valueTpl" }, outputs: { clueChange: "clueChange", nextPage: "nextPage", previousPage: "previousPage" }, host: { listeners: { "keydown.space": "onKeydown($event)", "keydown.enter": "onKeydown($event)", "click": "onKeydown($event)" }, properties: { "tabindex": "this.tabindex", "class.mod-multiple": "this.multiple", "class.is-clearable": "this.clearable", "class.is-disabled": "this.disabled", "class.is-filled": "this.isFilled", "class.is-focused": "this.isPanelOpen", "attr.aria-expanded": "this.isPanelOpen", "attr.role": "this.role", "attr.aria-activedescendant": "this.activeDescendant", "attr.aria-controls": "this.ariaControls" } }, providers: [
|
|
479
|
+
{
|
|
480
|
+
provide: NG_VALUE_ACCESSOR,
|
|
481
|
+
useExisting: forwardRef(() => LuSelectInput2Component),
|
|
482
|
+
multi: true,
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
provide: OverlayContainer,
|
|
486
|
+
useClass: LuSelectOverlayContainer,
|
|
487
|
+
},
|
|
488
|
+
LuSelectOverlay,
|
|
489
|
+
{ provide: SELECT_ID, useFactory: selectIdFactory },
|
|
490
|
+
{ provide: SELECT_LABEL, useFactory: selectLabelFactory, deps: [ElementRef] },
|
|
491
|
+
{ provide: SELECT_LABEL_ID, useFactory: selectLabelIdFactory, deps: [SELECT_LABEL, SELECT_ID] },
|
|
492
|
+
], ngImport: i0, template: "<div class=\"lu-select-placeholder\">{{ placeholder }}</div>\r\n<div class=\"lu-select-value\">\r\n\t<div class=\"lu-select-display-wrapper\">\r\n\t\t<ng-container *ngIf=\"isFilled\">\r\n\t\t\t<ng-container *ngTemplateOutlet=\"valueTpl || optionTpl; context: { $implicit: value }\"></ng-container>\r\n\t\t</ng-container>\r\n\t</div>\r\n</div>\r\n<div class=\"lu-select-suffix\">\r\n\t<a *ngIf=\"clearable && isFilled\" role=\"button\" class=\"actionIcon\" (click)=\"clearValue($event)\">\r\n\t\t<span aria-hidden=\"true\" class=\"lucca-icon\">thin_cross</span>\r\n\t\t<span class=\"u-mask\">Clear</span>\r\n\t</a>\r\n</div>\r\n", styles: [":host{cursor:pointer;outline:none;padding:0}:host:after{content:\"\\e97c\";font-family:Lucca icons;display:inline-block;vertical-align:text-bottom;font-style:normal;color:var(--components-select-default-palette-700);bottom:.5rem;bottom:var(--components-select-input-padding-vertical);font-size:1.2rem;line-height:1.4rem;pointer-events:none;position:absolute;right:.5rem;right:var(--components-select-input-padding-horizontal)}:host[disabled]{cursor:not-allowed;pointer-events:all}:host.is-disabled{cursor:not-allowed;pointer-events:all}.lu-select-display-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lu-select-value{line-height:1.5rem;line-height:var(--sizes-standard-line-height);min-height:calc(var(--spacings-small) + 1.5rem);min-height:calc(var(--components-select-framed-bottom-padding) + var(--sizes-standard-line-height));padding:.5rem 2.5rem .5rem .5rem;padding:var(--components-select-input-padding-vertical) 2.5rem var(--components-select-input-padding-vertical) var(--components-select-input-padding-horizontal);transition:all .25s ease;transition:all var(--commons-animations-durations-standard) ease;display:none}.lu-select-placeholder{color:var(--components-select-default-palette-400);line-height:1.5rem;line-height:var(--sizes-standard-line-height);min-height:calc(var(--spacings-small) + 1.5rem);min-height:calc(var(--components-select-framed-bottom-padding) + var(--sizes-standard-line-height));padding:.5rem 2.5rem .5rem .5rem;padding:var(--components-select-input-padding-vertical) 2.5rem var(--components-select-input-padding-vertical) var(--components-select-input-padding-horizontal);transition:all .25s ease;transition:all var(--commons-animations-durations-standard) ease;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lu-select-suffix{position:absolute;bottom:.5rem;right:1.6rem}::ng-deep .lu-select-value .label{padding:.25rem .25rem .5rem .5rem;padding:var(--spacings-smallest) var(--spacings-smaller);margin-left:0}::ng-deep .lu-select-value .chip{background:#FF6600;background:var(--components-select-chip-background);color:#fff;color:var(--components-select-chip-text);vertical-align:baseline;max-width:100%;height:1.5rem;height:var(--sizes-standard-line-height);line-height:1.5rem;line-height:var(--sizes-standard-line-height);padding:0 .5rem;padding:0 var(--spacings-smaller);margin:0 .25rem .25rem 0;text-overflow:ellipsis;overflow:hidden;vertical-align:top;white-space:nowrap}:host-context(.textfield.mod-small) .lu-select-value,:host-context(.textfield.mod-small) .lu-select-placeholder{font-size:.875rem;font-size:var(--sizes-small-font-size);line-height:1.25rem;line-height:var(--sizes-small-line-height);min-height:calc(var(--spacings-small) + 1.25rem);min-height:calc(var(--components-select-framed-bottom-padding) + var(--sizes-small-line-height))}:host-context(.textfield.mod-small):after{line-height:1.25rem;line-height:var(--sizes-small-line-height)}:host-context(.textfield.mod-small) ::ng-deep .lu-select-value .label{font-size:.875rem;font-size:var(--sizes-small-font-size);line-height:1.25rem;line-height:var(--sizes-small-line-height);font-weight:600;margin:0;padding:0;background:transparent}:host-context(.textfield.mod-small) ::ng-deep .lu-select-value .chip{height:1.25rem;height:var(--sizes-small-line-height);line-height:1.25rem;line-height:var(--sizes-small-line-height)}:host-context(.textfield.mod-framed).textfield-input,:host-context(.form.mod-framed).textfield-input{padding:var(--spacings-big) 0 0;padding:var(--components-select-framed-top-padding) 0 0}:host-context(.textfield.mod-framed).textfield-input:after,:host-context(.form.mod-framed).textfield-input:after{color:#96a6c5;color:var(--colors-text-light-color);bottom:var(--spacings-small);bottom:var(--components-select-framed-bottom-padding);right:.5rem;right:var(--spacings-smaller)}:host-context(.textfield.mod-framed).textfield-input .lu-select-value,:host-context(.textfield.mod-framed).textfield-input .lu-select-placeholder,:host-context(.form.mod-framed).textfield-input .lu-select-value,:host-context(.form.mod-framed).textfield-input .lu-select-placeholder{padding:0 calc(var(--spacings-small) * 3) var(--spacings-small) var(--spacings-small);padding:0 calc(var(--components-select-framed-side-padding) * 3) var(--components-select-framed-bottom-padding) var(--components-select-framed-side-padding)}:host-context(.textfield.mod-framed).textfield-input .lu-select-suffix,:host-context(.form.mod-framed).textfield-input .lu-select-suffix{bottom:var(--spacings-small);bottom:var(--components-select-framed-bottom-padding);right:1.7rem}:host-context(.textfield.mod-filter) .lu-select-value,:host-context(.textfield.mod-filter) .lu-select-placeholder{padding:0;height:auto;padding-top:1rem;color:#2a3551;color:var(--colors-text-default-color)}:host-context(.textfield.mod-filter) .lu-select-suffix{bottom:.4rem}:host-context(.textfield.mod-material):after{color:#96a6c5;color:var(--colors-text-light-color);bottom:.6rem;right:0}:host-context(.textfield.mod-material) .lu-select-value,:host-context(.textfield.mod-material) .lu-select-placeholder{padding-left:0;padding-right:.8rem}:host-context(.textfield.mod-material) .lu-select-suffix{right:1rem;right:calc(2 * var(--components-select-input-padding-horizontal))}:host-context(.textfield.mod-material).is-select .lu-select-placeholder{display:none}:host-context(.textfield.mod-material).mod-search:after{bottom:0}:host-context(.textfield.mod-material).mod-search .lu-select-suffix{right:1.375rem;right:calc(2.75 * var(--components-select-input-padding-horizontal))}:host-context(.textfield.mod-material .textfield-input.is-focused) .lu-select-placeholder{display:none}:host(.mod-multiple).mod-multipleView:not(.mod-singleLine) .lu-select-value{height:auto;align-items:center}:host(.mod-multiple).mod-multipleView:not(.mod-singleLine) .lu-select-display-wrapper{overflow:hidden;white-space:normal;margin-bottom:-.25rem}:host-context(.textfield-input.is-filled) .lu-select-placeholder{display:none}:host-context(.textfield-input.is-filled) .lu-select-value{display:flex}:host-context(.textfield-input.is-clearable) .lu-select-value{padding-right:2.5rem}:host-context(.textfield-input.is-error):after{color:#e51a3b;color:var(--palettes-error-color)}:host-context(.textfield-input.is-error) .lu-select-placeholder{color:#ffe0e6;color:var(--palettes-error-200)}:host-context(.textfield-input.is-disabled,.textfield-input[disabled]):after{color:#999;color:var(--commons-disabled-color)}:host-context(.textfield-input.is-disabled,.textfield-input[disabled]) .lu-select-placeholder{color:#bbb;color:var(--commons-disabled-placeholder)}:host-context(.palette-primary) .lu-select-placeholder{color:var(--palettes-primary-400)}:host-context(.palette-primary):after{color:var(--palettes-primary-700)}:host-context(.palette-secondary) .lu-select-placeholder{color:var(--palettes-secondary-400)}:host-context(.palette-secondary):after{color:var(--palettes-secondary-700)}:host-context(.palette-grey) .lu-select-placeholder{color:var(--palettes-grey-400)}:host-context(.palette-grey):after{color:var(--palettes-grey-700)}:host-context(.palette-success) .lu-select-placeholder{color:var(--palettes-success-400)}:host-context(.palette-success):after{color:var(--palettes-success-700)}:host-context(.palette-warning) .lu-select-placeholder{color:var(--palettes-warning-400)}:host-context(.palette-warning):after{color:var(--palettes-warning-700)}:host-context(.palette-error) .lu-select-placeholder{color:var(--palettes-error-400)}:host-context(.palette-error):after{color:var(--palettes-error-700)}:host{display:none;vertical-align:text-bottom}:host-context(.textfield-input.is-filled){display:inline-block}.actionIcon{color:var(--components-select-default-palette-700);height:1rem;padding:0;width:1rem}.actionIcon:hover{background-color:var(--components-select-default-palette-50);color:var(--components-select-default-palette-800)}.actionIcon:focus{background-color:var(--components-select-default-palette-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--components-select-default-palette-200)}.lucca-icon{display:block;font-size:1rem}:host-context(.textfield.mod-material) .actionIcon{color:#96a6c5;color:var(--colors-text-light-color)}:host-context(.textfield.mod-framed) .actionIcon{color:#96a6c5;color:var(--colors-text-light-color)}:host-context(.textfield-input.is-error) .actionIcon{color:#e51a3b;color:var(--palettes-error-color)}:host-context(.textfield-input.is-error) .actionIcon:hover{background-color:#fff5f7;background-color:var(--palettes-error-50);color:#af0e29;color:var(--palettes-error-800)}:host-context(.textfield-input.is-disabled,.textfield-input[disabled]){display:none}:host-context(.palette-primary) .actionIcon{color:var(--palettes-primary-700)}:host-context(.palette-primary) .actionIcon:hover{background-color:var(--palettes-primary-50);color:var(--palettes-primary-800)}:host-context(.palette-primary) .actionIcon:focus{background-color:var(--palettes-primary-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-primary-200)}:host-context(.palette-secondary) .actionIcon{color:var(--palettes-secondary-700)}:host-context(.palette-secondary) .actionIcon:hover{background-color:var(--palettes-secondary-50);color:var(--palettes-secondary-800)}:host-context(.palette-secondary) .actionIcon:focus{background-color:var(--palettes-secondary-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-secondary-200)}:host-context(.palette-grey) .actionIcon{color:var(--palettes-grey-700)}:host-context(.palette-grey) .actionIcon:hover{background-color:var(--palettes-grey-50);color:var(--palettes-grey-800)}:host-context(.palette-grey) .actionIcon:focus{background-color:var(--palettes-grey-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-grey-200)}:host-context(.palette-success) .actionIcon{color:var(--palettes-success-700)}:host-context(.palette-success) .actionIcon:hover{background-color:var(--palettes-success-50);color:var(--palettes-success-800)}:host-context(.palette-success) .actionIcon:focus{background-color:var(--palettes-success-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-success-200)}:host-context(.palette-warning) .actionIcon{color:var(--palettes-warning-700)}:host-context(.palette-warning) .actionIcon:hover{background-color:var(--palettes-warning-50);color:var(--palettes-warning-800)}:host-context(.palette-warning) .actionIcon:focus{background-color:var(--palettes-warning-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-warning-200)}:host-context(.palette-error) .actionIcon{color:var(--palettes-error-700)}:host-context(.palette-error) .actionIcon:hover{background-color:var(--palettes-error-50);color:var(--palettes-error-800)}:host-context(.palette-error) .actionIcon:focus{background-color:var(--palettes-error-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-error-200)}:host.is-disabled{display:inline-block!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
493
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectInput2Component, decorators: [{
|
|
494
|
+
type: Component,
|
|
495
|
+
args: [{ selector: 'lu-select2', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
496
|
+
{
|
|
497
|
+
provide: NG_VALUE_ACCESSOR,
|
|
498
|
+
useExisting: forwardRef(() => LuSelectInput2Component),
|
|
499
|
+
multi: true,
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
provide: OverlayContainer,
|
|
503
|
+
useClass: LuSelectOverlayContainer,
|
|
504
|
+
},
|
|
505
|
+
LuSelectOverlay,
|
|
506
|
+
{ provide: SELECT_ID, useFactory: selectIdFactory },
|
|
507
|
+
{ provide: SELECT_LABEL, useFactory: selectLabelFactory, deps: [ElementRef] },
|
|
508
|
+
{ provide: SELECT_LABEL_ID, useFactory: selectLabelIdFactory, deps: [SELECT_LABEL, SELECT_ID] },
|
|
509
|
+
], template: "<div class=\"lu-select-placeholder\">{{ placeholder }}</div>\r\n<div class=\"lu-select-value\">\r\n\t<div class=\"lu-select-display-wrapper\">\r\n\t\t<ng-container *ngIf=\"isFilled\">\r\n\t\t\t<ng-container *ngTemplateOutlet=\"valueTpl || optionTpl; context: { $implicit: value }\"></ng-container>\r\n\t\t</ng-container>\r\n\t</div>\r\n</div>\r\n<div class=\"lu-select-suffix\">\r\n\t<a *ngIf=\"clearable && isFilled\" role=\"button\" class=\"actionIcon\" (click)=\"clearValue($event)\">\r\n\t\t<span aria-hidden=\"true\" class=\"lucca-icon\">thin_cross</span>\r\n\t\t<span class=\"u-mask\">Clear</span>\r\n\t</a>\r\n</div>\r\n", styles: [":host{cursor:pointer;outline:none;padding:0}:host:after{content:\"\\e97c\";font-family:Lucca icons;display:inline-block;vertical-align:text-bottom;font-style:normal;color:var(--components-select-default-palette-700);bottom:.5rem;bottom:var(--components-select-input-padding-vertical);font-size:1.2rem;line-height:1.4rem;pointer-events:none;position:absolute;right:.5rem;right:var(--components-select-input-padding-horizontal)}:host[disabled]{cursor:not-allowed;pointer-events:all}:host.is-disabled{cursor:not-allowed;pointer-events:all}.lu-select-display-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lu-select-value{line-height:1.5rem;line-height:var(--sizes-standard-line-height);min-height:calc(var(--spacings-small) + 1.5rem);min-height:calc(var(--components-select-framed-bottom-padding) + var(--sizes-standard-line-height));padding:.5rem 2.5rem .5rem .5rem;padding:var(--components-select-input-padding-vertical) 2.5rem var(--components-select-input-padding-vertical) var(--components-select-input-padding-horizontal);transition:all .25s ease;transition:all var(--commons-animations-durations-standard) ease;display:none}.lu-select-placeholder{color:var(--components-select-default-palette-400);line-height:1.5rem;line-height:var(--sizes-standard-line-height);min-height:calc(var(--spacings-small) + 1.5rem);min-height:calc(var(--components-select-framed-bottom-padding) + var(--sizes-standard-line-height));padding:.5rem 2.5rem .5rem .5rem;padding:var(--components-select-input-padding-vertical) 2.5rem var(--components-select-input-padding-vertical) var(--components-select-input-padding-horizontal);transition:all .25s ease;transition:all var(--commons-animations-durations-standard) ease;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lu-select-suffix{position:absolute;bottom:.5rem;right:1.6rem}::ng-deep .lu-select-value .label{padding:.25rem .25rem .5rem .5rem;padding:var(--spacings-smallest) var(--spacings-smaller);margin-left:0}::ng-deep .lu-select-value .chip{background:#FF6600;background:var(--components-select-chip-background);color:#fff;color:var(--components-select-chip-text);vertical-align:baseline;max-width:100%;height:1.5rem;height:var(--sizes-standard-line-height);line-height:1.5rem;line-height:var(--sizes-standard-line-height);padding:0 .5rem;padding:0 var(--spacings-smaller);margin:0 .25rem .25rem 0;text-overflow:ellipsis;overflow:hidden;vertical-align:top;white-space:nowrap}:host-context(.textfield.mod-small) .lu-select-value,:host-context(.textfield.mod-small) .lu-select-placeholder{font-size:.875rem;font-size:var(--sizes-small-font-size);line-height:1.25rem;line-height:var(--sizes-small-line-height);min-height:calc(var(--spacings-small) + 1.25rem);min-height:calc(var(--components-select-framed-bottom-padding) + var(--sizes-small-line-height))}:host-context(.textfield.mod-small):after{line-height:1.25rem;line-height:var(--sizes-small-line-height)}:host-context(.textfield.mod-small) ::ng-deep .lu-select-value .label{font-size:.875rem;font-size:var(--sizes-small-font-size);line-height:1.25rem;line-height:var(--sizes-small-line-height);font-weight:600;margin:0;padding:0;background:transparent}:host-context(.textfield.mod-small) ::ng-deep .lu-select-value .chip{height:1.25rem;height:var(--sizes-small-line-height);line-height:1.25rem;line-height:var(--sizes-small-line-height)}:host-context(.textfield.mod-framed).textfield-input,:host-context(.form.mod-framed).textfield-input{padding:var(--spacings-big) 0 0;padding:var(--components-select-framed-top-padding) 0 0}:host-context(.textfield.mod-framed).textfield-input:after,:host-context(.form.mod-framed).textfield-input:after{color:#96a6c5;color:var(--colors-text-light-color);bottom:var(--spacings-small);bottom:var(--components-select-framed-bottom-padding);right:.5rem;right:var(--spacings-smaller)}:host-context(.textfield.mod-framed).textfield-input .lu-select-value,:host-context(.textfield.mod-framed).textfield-input .lu-select-placeholder,:host-context(.form.mod-framed).textfield-input .lu-select-value,:host-context(.form.mod-framed).textfield-input .lu-select-placeholder{padding:0 calc(var(--spacings-small) * 3) var(--spacings-small) var(--spacings-small);padding:0 calc(var(--components-select-framed-side-padding) * 3) var(--components-select-framed-bottom-padding) var(--components-select-framed-side-padding)}:host-context(.textfield.mod-framed).textfield-input .lu-select-suffix,:host-context(.form.mod-framed).textfield-input .lu-select-suffix{bottom:var(--spacings-small);bottom:var(--components-select-framed-bottom-padding);right:1.7rem}:host-context(.textfield.mod-filter) .lu-select-value,:host-context(.textfield.mod-filter) .lu-select-placeholder{padding:0;height:auto;padding-top:1rem;color:#2a3551;color:var(--colors-text-default-color)}:host-context(.textfield.mod-filter) .lu-select-suffix{bottom:.4rem}:host-context(.textfield.mod-material):after{color:#96a6c5;color:var(--colors-text-light-color);bottom:.6rem;right:0}:host-context(.textfield.mod-material) .lu-select-value,:host-context(.textfield.mod-material) .lu-select-placeholder{padding-left:0;padding-right:.8rem}:host-context(.textfield.mod-material) .lu-select-suffix{right:1rem;right:calc(2 * var(--components-select-input-padding-horizontal))}:host-context(.textfield.mod-material).is-select .lu-select-placeholder{display:none}:host-context(.textfield.mod-material).mod-search:after{bottom:0}:host-context(.textfield.mod-material).mod-search .lu-select-suffix{right:1.375rem;right:calc(2.75 * var(--components-select-input-padding-horizontal))}:host-context(.textfield.mod-material .textfield-input.is-focused) .lu-select-placeholder{display:none}:host(.mod-multiple).mod-multipleView:not(.mod-singleLine) .lu-select-value{height:auto;align-items:center}:host(.mod-multiple).mod-multipleView:not(.mod-singleLine) .lu-select-display-wrapper{overflow:hidden;white-space:normal;margin-bottom:-.25rem}:host-context(.textfield-input.is-filled) .lu-select-placeholder{display:none}:host-context(.textfield-input.is-filled) .lu-select-value{display:flex}:host-context(.textfield-input.is-clearable) .lu-select-value{padding-right:2.5rem}:host-context(.textfield-input.is-error):after{color:#e51a3b;color:var(--palettes-error-color)}:host-context(.textfield-input.is-error) .lu-select-placeholder{color:#ffe0e6;color:var(--palettes-error-200)}:host-context(.textfield-input.is-disabled,.textfield-input[disabled]):after{color:#999;color:var(--commons-disabled-color)}:host-context(.textfield-input.is-disabled,.textfield-input[disabled]) .lu-select-placeholder{color:#bbb;color:var(--commons-disabled-placeholder)}:host-context(.palette-primary) .lu-select-placeholder{color:var(--palettes-primary-400)}:host-context(.palette-primary):after{color:var(--palettes-primary-700)}:host-context(.palette-secondary) .lu-select-placeholder{color:var(--palettes-secondary-400)}:host-context(.palette-secondary):after{color:var(--palettes-secondary-700)}:host-context(.palette-grey) .lu-select-placeholder{color:var(--palettes-grey-400)}:host-context(.palette-grey):after{color:var(--palettes-grey-700)}:host-context(.palette-success) .lu-select-placeholder{color:var(--palettes-success-400)}:host-context(.palette-success):after{color:var(--palettes-success-700)}:host-context(.palette-warning) .lu-select-placeholder{color:var(--palettes-warning-400)}:host-context(.palette-warning):after{color:var(--palettes-warning-700)}:host-context(.palette-error) .lu-select-placeholder{color:var(--palettes-error-400)}:host-context(.palette-error):after{color:var(--palettes-error-700)}:host{display:none;vertical-align:text-bottom}:host-context(.textfield-input.is-filled){display:inline-block}.actionIcon{color:var(--components-select-default-palette-700);height:1rem;padding:0;width:1rem}.actionIcon:hover{background-color:var(--components-select-default-palette-50);color:var(--components-select-default-palette-800)}.actionIcon:focus{background-color:var(--components-select-default-palette-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--components-select-default-palette-200)}.lucca-icon{display:block;font-size:1rem}:host-context(.textfield.mod-material) .actionIcon{color:#96a6c5;color:var(--colors-text-light-color)}:host-context(.textfield.mod-framed) .actionIcon{color:#96a6c5;color:var(--colors-text-light-color)}:host-context(.textfield-input.is-error) .actionIcon{color:#e51a3b;color:var(--palettes-error-color)}:host-context(.textfield-input.is-error) .actionIcon:hover{background-color:#fff5f7;background-color:var(--palettes-error-50);color:#af0e29;color:var(--palettes-error-800)}:host-context(.textfield-input.is-disabled,.textfield-input[disabled]){display:none}:host-context(.palette-primary) .actionIcon{color:var(--palettes-primary-700)}:host-context(.palette-primary) .actionIcon:hover{background-color:var(--palettes-primary-50);color:var(--palettes-primary-800)}:host-context(.palette-primary) .actionIcon:focus{background-color:var(--palettes-primary-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-primary-200)}:host-context(.palette-secondary) .actionIcon{color:var(--palettes-secondary-700)}:host-context(.palette-secondary) .actionIcon:hover{background-color:var(--palettes-secondary-50);color:var(--palettes-secondary-800)}:host-context(.palette-secondary) .actionIcon:focus{background-color:var(--palettes-secondary-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-secondary-200)}:host-context(.palette-grey) .actionIcon{color:var(--palettes-grey-700)}:host-context(.palette-grey) .actionIcon:hover{background-color:var(--palettes-grey-50);color:var(--palettes-grey-800)}:host-context(.palette-grey) .actionIcon:focus{background-color:var(--palettes-grey-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-grey-200)}:host-context(.palette-success) .actionIcon{color:var(--palettes-success-700)}:host-context(.palette-success) .actionIcon:hover{background-color:var(--palettes-success-50);color:var(--palettes-success-800)}:host-context(.palette-success) .actionIcon:focus{background-color:var(--palettes-success-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-success-200)}:host-context(.palette-warning) .actionIcon{color:var(--palettes-warning-700)}:host-context(.palette-warning) .actionIcon:hover{background-color:var(--palettes-warning-50);color:var(--palettes-warning-800)}:host-context(.palette-warning) .actionIcon:focus{background-color:var(--palettes-warning-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-warning-200)}:host-context(.palette-error) .actionIcon{color:var(--palettes-error-700)}:host-context(.palette-error) .actionIcon:hover{background-color:var(--palettes-error-50);color:var(--palettes-error-800)}:host-context(.palette-error) .actionIcon:focus{background-color:var(--palettes-error-50);box-shadow:0 2px 8px #0000000a,0 1px 2px #0000000f,0 0 0 4px var(--palettes-error-200)}:host.is-disabled{display:inline-block!important}\n"] }]
|
|
510
|
+
}], ctorParameters: function () { return [{ type: i2$1.OverlayPositionBuilder }, { type: i2$1.ScrollStrategyOptions }, { type: i0.ElementRef }, { type: i0.Injector }, { type: LuSelectOverlay }, { type: i0.ChangeDetectorRef }, { type: i2$1.OverlayContainer }, { type: undefined, decorators: [{
|
|
511
|
+
type: Inject,
|
|
512
|
+
args: [SELECT_LABEL]
|
|
513
|
+
}] }, { type: undefined, decorators: [{
|
|
514
|
+
type: Inject,
|
|
515
|
+
args: [SELECT_LABEL_ID]
|
|
516
|
+
}] }]; }, propDecorators: { tabindex: [{
|
|
517
|
+
type: HostBinding,
|
|
518
|
+
args: ['tabindex']
|
|
519
|
+
}], placeholder: [{
|
|
520
|
+
type: Input
|
|
521
|
+
}], multiple: [{
|
|
522
|
+
type: Input
|
|
523
|
+
}, {
|
|
524
|
+
type: HostBinding,
|
|
525
|
+
args: ['class.mod-multiple']
|
|
526
|
+
}], clearable: [{
|
|
527
|
+
type: Input
|
|
528
|
+
}, {
|
|
529
|
+
type: HostBinding,
|
|
530
|
+
args: ['class.is-clearable']
|
|
531
|
+
}], disabled: [{
|
|
532
|
+
type: Input
|
|
533
|
+
}, {
|
|
534
|
+
type: HostBinding,
|
|
535
|
+
args: ['class.is-disabled']
|
|
536
|
+
}], isFilled: [{
|
|
537
|
+
type: HostBinding,
|
|
538
|
+
args: ['class.is-filled']
|
|
539
|
+
}], isPanelOpen: [{
|
|
540
|
+
type: HostBinding,
|
|
541
|
+
args: ['class.is-focused']
|
|
542
|
+
}, {
|
|
543
|
+
type: HostBinding,
|
|
544
|
+
args: ['attr.aria-expanded']
|
|
545
|
+
}], role: [{
|
|
546
|
+
type: HostBinding,
|
|
547
|
+
args: ['attr.role']
|
|
548
|
+
}], activeDescendant: [{
|
|
549
|
+
type: HostBinding,
|
|
550
|
+
args: ['attr.aria-activedescendant']
|
|
551
|
+
}], ariaControls: [{
|
|
552
|
+
type: HostBinding,
|
|
553
|
+
args: ['attr.aria-controls']
|
|
554
|
+
}], overlayConfig: [{
|
|
555
|
+
type: Input
|
|
556
|
+
}], options: [{
|
|
557
|
+
type: Input
|
|
558
|
+
}], optionComparer: [{
|
|
559
|
+
type: Input
|
|
560
|
+
}], optionTpl: [{
|
|
561
|
+
type: Input
|
|
562
|
+
}], valueTpl: [{
|
|
563
|
+
type: Input
|
|
564
|
+
}], clueChange: [{
|
|
565
|
+
type: Output
|
|
566
|
+
}], nextPage: [{
|
|
567
|
+
type: Output
|
|
568
|
+
}], previousPage: [{
|
|
569
|
+
type: Output
|
|
570
|
+
}], onKeydown: [{
|
|
571
|
+
type: HostListener,
|
|
572
|
+
args: ['keydown.space', ['$event']]
|
|
573
|
+
}, {
|
|
574
|
+
type: HostListener,
|
|
575
|
+
args: ['keydown.enter', ['$event']]
|
|
576
|
+
}, {
|
|
577
|
+
type: HostListener,
|
|
578
|
+
args: ['click', ['$event']]
|
|
579
|
+
}] } });
|
|
580
|
+
|
|
581
|
+
class LuSelectInput2Module {
|
|
582
|
+
}
|
|
583
|
+
LuSelectInput2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectInput2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
584
|
+
LuSelectInput2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: LuSelectInput2Module, declarations: [LuSelectInput2Component], imports: [CommonModule, LuSelectPanelModule, OverlayModule], exports: [LuSelectInput2Component] });
|
|
585
|
+
LuSelectInput2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectInput2Module, imports: [CommonModule, LuSelectPanelModule, OverlayModule] });
|
|
586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelectInput2Module, decorators: [{
|
|
587
|
+
type: NgModule,
|
|
588
|
+
args: [{
|
|
589
|
+
imports: [CommonModule, LuSelectPanelModule, OverlayModule],
|
|
590
|
+
declarations: [LuSelectInput2Component],
|
|
591
|
+
exports: [LuSelectInput2Component],
|
|
592
|
+
}]
|
|
593
|
+
}] });
|
|
594
|
+
|
|
595
|
+
class LuSelect2Module {
|
|
596
|
+
}
|
|
597
|
+
LuSelect2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelect2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
598
|
+
LuSelect2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.0", ngImport: i0, type: LuSelect2Module, imports: [LuSelectInput2Module, LuOption2Module, LuSelectPanelModule], exports: [LuSelectInput2Module, LuOption2Module, LuSelectPanelModule] });
|
|
599
|
+
LuSelect2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelect2Module, imports: [LuSelectInput2Module, LuOption2Module, LuSelectPanelModule, LuSelectInput2Module, LuOption2Module, LuSelectPanelModule] });
|
|
600
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0", ngImport: i0, type: LuSelect2Module, decorators: [{
|
|
601
|
+
type: NgModule,
|
|
602
|
+
args: [{
|
|
603
|
+
imports: [LuSelectInput2Module, LuOption2Module, LuSelectPanelModule],
|
|
604
|
+
exports: [LuSelectInput2Module, LuOption2Module, LuSelectPanelModule],
|
|
605
|
+
}]
|
|
606
|
+
}] });
|
|
607
|
+
|
|
608
|
+
/*
|
|
609
|
+
* Public API Surface of safe-content
|
|
610
|
+
*/
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Generated bundle index. Do not edit.
|
|
614
|
+
*/
|
|
615
|
+
|
|
616
|
+
export { LuDisplayerDirective, LuOption2Module, LuOptionComponent, LuOptionDirective, LuSelect2Module, LuSelectInput2Component, LuSelectInput2Module, LuSelectPanelComponent, LuSelectPanelModule, LuSelectPanelRef };
|
|
617
|
+
//# sourceMappingURL=lucca-front-ng-select2.mjs.map
|