@metadev/lux 0.32.0 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/metadev-lux.mjs +236 -214
- package/fesm2022/metadev-lux.mjs.map +1 -1
- package/package.json +7 -6
- package/{index.d.ts → types/metadev-lux.d.ts} +125 -169
package/fesm2022/metadev-lux.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, EventEmitter, forwardRef, Input, Output, ViewChild, Component, Injectable, HostBinding, ElementRef, HostListener, ApplicationRef, Injector, RendererFactory2, TemplateRef,
|
|
2
|
+
import { inject, ChangeDetectorRef, EventEmitter, forwardRef, Input, Output, ViewChild, Component, Injectable, HostBinding, ElementRef, HostListener, ApplicationRef, EnvironmentInjector, Injector, RendererFactory2, TemplateRef, createComponent, Directive, Renderer2, InjectionToken, PLATFORM_ID, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { debounceTime, first, map, filter, takeUntil, withLatestFrom, distinctUntilChanged, switchMap } from 'rxjs/operators';
|
|
6
6
|
import * as i1$2 from '@angular/common';
|
|
7
7
|
import { DOCUMENT, CommonModule, isPlatformBrowser } from '@angular/common';
|
|
8
|
-
import { of, Subject, from, BehaviorSubject, fromEvent } from 'rxjs';
|
|
8
|
+
import { of, Subject, from, shareReplay, BehaviorSubject, fromEvent } from 'rxjs';
|
|
9
9
|
import * as i1$1 from '@angular/router';
|
|
10
10
|
import { Router, ActivatedRoute, NavigationEnd, RouterModule } from '@angular/router';
|
|
11
11
|
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
|
@@ -48,7 +48,7 @@ const isValidColor = (value) => {
|
|
|
48
48
|
const isValidDate = (date) => exists(date) ? !isNaN(date.getTime()) : false;
|
|
49
49
|
const normalizeDate = (value) => {
|
|
50
50
|
if (typeof value === 'string' && value.length > 10) {
|
|
51
|
-
return value.
|
|
51
|
+
return value.substring(0, 10);
|
|
52
52
|
}
|
|
53
53
|
return value ? value.toString() : null;
|
|
54
54
|
};
|
|
@@ -115,8 +115,8 @@ const roundToMultipleOf = (x, modulo) => {
|
|
|
115
115
|
const approximation = Math.round(x / modulo) * modulo;
|
|
116
116
|
const approximationString = String(approximation);
|
|
117
117
|
// remove useless decimals
|
|
118
|
-
const uselessDecimalsInApproximation = numberOfDecimalDigits(approximationString) -
|
|
119
|
-
numberOfDecimalDigits(moduloString);
|
|
118
|
+
const uselessDecimalsInApproximation = (numberOfDecimalDigits(approximationString) ?? 1) -
|
|
119
|
+
(numberOfDecimalDigits(moduloString) ?? 0);
|
|
120
120
|
const resultString = approximationString.slice(0, approximationString.length - uselessDecimalsInApproximation);
|
|
121
121
|
return Number(resultString);
|
|
122
122
|
};
|
|
@@ -145,7 +145,7 @@ class AutocompleteComponent {
|
|
|
145
145
|
touched = false;
|
|
146
146
|
completionList = [];
|
|
147
147
|
showCompletion = false;
|
|
148
|
-
focusItem;
|
|
148
|
+
focusItem = null;
|
|
149
149
|
valueChange = new EventEmitter();
|
|
150
150
|
dataSourceChange = new EventEmitter();
|
|
151
151
|
inputId;
|
|
@@ -294,9 +294,7 @@ class AutocompleteComponent {
|
|
|
294
294
|
// For custom containers, calculate relative position
|
|
295
295
|
const containerRect = this.appendToContainer.getBoundingClientRect();
|
|
296
296
|
top =
|
|
297
|
-
inputRect.bottom -
|
|
298
|
-
containerRect.top +
|
|
299
|
-
this.appendToContainer.scrollTop;
|
|
297
|
+
inputRect.bottom - containerRect.top + this.appendToContainer.scrollTop;
|
|
300
298
|
left =
|
|
301
299
|
inputRect.left - containerRect.left + this.appendToContainer.scrollLeft;
|
|
302
300
|
}
|
|
@@ -452,7 +450,7 @@ class AutocompleteComponent {
|
|
|
452
450
|
if (this.appendTo) {
|
|
453
451
|
this.updateDropdownPosition();
|
|
454
452
|
}
|
|
455
|
-
this.showCompletionList(label);
|
|
453
|
+
this.showCompletionList(label ?? '');
|
|
456
454
|
}
|
|
457
455
|
else {
|
|
458
456
|
this.showCompletion = false;
|
|
@@ -464,7 +462,7 @@ class AutocompleteComponent {
|
|
|
464
462
|
this.cd.markForCheck();
|
|
465
463
|
}
|
|
466
464
|
get selectedOption() {
|
|
467
|
-
const index = this.completionList.findIndex((i) => i.key === this.focusItem
|
|
465
|
+
const index = this.completionList.findIndex((i) => i.key === this.focusItem?.key);
|
|
468
466
|
if (index === -1 || !this.focusItem) {
|
|
469
467
|
return null;
|
|
470
468
|
}
|
|
@@ -524,7 +522,8 @@ class AutocompleteComponent {
|
|
|
524
522
|
this.computeCompletionList(text).subscribe({
|
|
525
523
|
next: (cl) => {
|
|
526
524
|
this.completionList = cl;
|
|
527
|
-
|
|
525
|
+
const selected = selectElement(this.completionList, text);
|
|
526
|
+
this.focusItem = selected;
|
|
528
527
|
this.showCompletion = true;
|
|
529
528
|
this.spinnerVisibility(useSpinner, false);
|
|
530
529
|
},
|
|
@@ -565,8 +564,8 @@ class AutocompleteComponent {
|
|
|
565
564
|
return of([]);
|
|
566
565
|
}
|
|
567
566
|
}
|
|
568
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
569
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
567
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
568
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AutocompleteComponent, isStandalone: true, selector: "lux-autocomplete", inputs: { inputId: "inputId", disabled: "disabled", readonly: "readonly", label: "label", canAddNewValues: "canAddNewValues", keepOpenAfterDelete: "keepOpenAfterDelete", appendTo: "appendTo", value: "value", dataSource: "dataSource", required: "required", placeholder: "placeholder", resolveLabelsFunction: "resolveLabelsFunction", populateFunction: "populateFunction", instance: "instance" }, outputs: { valueChange: "valueChange", dataSourceChange: "dataSourceChange" }, providers: [
|
|
570
569
|
{
|
|
571
570
|
provide: NG_VALUE_ACCESSOR,
|
|
572
571
|
multi: true,
|
|
@@ -577,9 +576,9 @@ class AutocompleteComponent {
|
|
|
577
576
|
multi: true,
|
|
578
577
|
useExisting: forwardRef(() => AutocompleteComponent)
|
|
579
578
|
}
|
|
580
|
-
], viewQueries: [{ propertyName: "i0", first: true, predicate: ["i0"], descendants: true, static: true }, { propertyName: "completeDiv", first: true, predicate: ["completeDiv"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"lux-autocomplete\" (blur)=\"toggleCompletion(false, i0.value)\">\r\n <div class=\"lux-autocomplete-box\">\r\n <input\r\n #i0\r\n [id]=\"inputId\"\r\n [(ngModel)]=\"label\"\r\n [placeholder]=\"placeholder\"\r\n [attr.disabled]=\"disabled || null\"\r\n [attr.readonly]=\"readonly || null\"\r\n (keydown)=\"onKeydown($event, i0.value)\"\r\n (keypress)=\"onKeypress($event, i0.value)\"\r\n (keyup)=\"onKeyup($event, i0.value)\"\r\n (blur)=\"onLostFocus(i0.value)\"\r\n (focus)=\"toggleCompletion(true, i0.value)\"\r\n (click)=\"toggleCompletion(true, i0.value)\"\r\n (resized)=\"onInputResized()\"\r\n (window:resize)=\"onInputResized()\"\r\n role=\"combobox\"\r\n aria-autocomplete=\"list\"\r\n [attr.aria-expanded]=\"showCompletion\"\r\n aria-haspopup=\"true\"\r\n attr.aria-owns=\"{{ inputId + '_list' }}\"\r\n [attr.aria-activedescendant]=\"selectedOption\"\r\n />\r\n @if (canAddNewValues) {\r\n <div class=\"icon-suggestions\"></div>\r\n } @if (showSpinner) {\r\n <div class=\"icon-spinner\"></div>\r\n } @if (!disabled && i0.value && !showCompletion) {\r\n <button\r\n type=\"button\"\r\n class=\"icon-clear\"\r\n aria-label=\"Clear\"\r\n (click)=\"clear()\"\r\n ></button>\r\n } @else {\r\n <div\r\n class=\"icon-dropdown\"\r\n (click)=\"toggleCompletion(!showCompletion, i0.value)\"\r\n ></div>\r\n }\r\n </div>\r\n <div\r\n #completeDiv\r\n [class.showCompletion]=\"showCompletion\"\r\n [class.lux-completion-list-appended]=\"appendTo\"\r\n class=\"lux-completion-list\"\r\n id=\"{{ inputId + '_list' }}\"\r\n >\r\n <ul>\r\n @for (item of completionList; track item.key; let index = $index) {\r\n <li\r\n id=\"{{ inputId + '_' + index }}\"\r\n class=\"lux-completion-item\"\r\n [class.selected]=\"focusItem && item.key === focusItem.key\"\r\n (click)=\"complete(item)\"\r\n [attr.aria-label]=\"item.label\"\r\n >\r\n <span class=\"preserve-white-space\">{{ item.labelPrefix }}</span>\r\n <span class=\"preserve-white-space bold\">{{ item.labelMatch }}</span>\r\n <span class=\"preserve-white-space\">{{ item.labelPostfix }}</span>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n</div>\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}.lux-autocomplete .lux-autocomplete-box{display:grid;grid-template-columns:1fr max-content}.lux-autocomplete input{padding:var(--lux-autocomplete-input-padding, .1rem 1.5rem .1rem .5rem);text-overflow:ellipsis;grid-row:1;grid-column-start:1;grid-column-end:3}.lux-autocomplete .icon-suggestions{grid-row:1;grid-column:2;width:1.5rem;border:none;background-color:transparent;background:url(/assets/img/suggestions.svg) no-repeat center;background-size:.5rem .5rem;z-index:1;position:relative;left:-1rem}.lux-autocomplete .icon-clear{grid-row:1;grid-column:2;width:var(--lux-autocomplete-icon-width, 1.5rem);border:none;background-color:transparent;background:var(--lux-autocomplete-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-autocomplete-icon-bg-size, .5rem .5rem);z-index:1}.lux-autocomplete .icon-dropdown{grid-row:1;grid-column:2;width:var(--lux-autocomplete-icon-width, 1.5rem);height:var(--lux-autocomplete-icon-height, 1.3rem);border:none;background-color:transparent;background:var(--lux-autocomplete-icon-dropdown, url(/assets/img/drop-down-arrow.svg) no-repeat center);background-size:var(--lux-autocomplete-icon-bg-size, .5rem .5rem);z-index:1}.lux-autocomplete .icon-spinner{grid-row:1;grid-column:2;width:1.5rem;border:none;background-color:transparent;background:url(/assets/img/spinner.svg) no-repeat center;background-size:1.2rem 1.2rem;z-index:1}.lux-completion-list{visibility:collapse;position:absolute;border:1px solid #ccc;margin:0rem;padding:0rem;max-height:10rem;overflow:auto;z-index:2}.lux-completion-list ul{list-style:none;margin:0rem;padding:0rem}.lux-completion-list.lux-completion-list-appended{position:absolute}.showCompletion{visibility:visible}.lux-completion-item{background-color:#fff;color:#000;padding:.1rem .5rem;cursor:pointer}.selected{background-color:#2e2eac;color:#fff}.disabled{background-color:#f0f0f0;color:#444}.disabled .selected{background-color:#9898ec;color:#fff}.bold{font-weight:700}.preserve-white-space{white-space:pre}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
579
|
+
], viewQueries: [{ propertyName: "i0", first: true, predicate: ["i0"], descendants: true, static: true }, { propertyName: "completeDiv", first: true, predicate: ["completeDiv"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"lux-autocomplete\" (blur)=\"toggleCompletion(false, i0.value)\">\r\n <div class=\"lux-autocomplete-box\">\r\n <input\r\n #i0\r\n [id]=\"inputId\"\r\n [(ngModel)]=\"label\"\r\n [placeholder]=\"placeholder\"\r\n [attr.disabled]=\"disabled || null\"\r\n [attr.readonly]=\"readonly || null\"\r\n (keydown)=\"onKeydown($event, i0.value)\"\r\n (keypress)=\"onKeypress($event, i0.value)\"\r\n (keyup)=\"onKeyup($event, i0.value)\"\r\n (blur)=\"onLostFocus(i0.value)\"\r\n (focus)=\"toggleCompletion(true, i0.value)\"\r\n (click)=\"toggleCompletion(true, i0.value)\"\r\n (resized)=\"onInputResized()\"\r\n (window:resize)=\"onInputResized()\"\r\n role=\"combobox\"\r\n aria-autocomplete=\"list\"\r\n [attr.aria-expanded]=\"showCompletion\"\r\n aria-haspopup=\"true\"\r\n attr.aria-owns=\"{{ inputId + '_list' }}\"\r\n [attr.aria-activedescendant]=\"selectedOption\"\r\n />\r\n @if (canAddNewValues) {\r\n <div class=\"icon-suggestions\"></div>\r\n } @if (showSpinner) {\r\n <div class=\"icon-spinner\"></div>\r\n } @if (!disabled && i0.value && !showCompletion) {\r\n <button\r\n type=\"button\"\r\n class=\"icon-clear\"\r\n aria-label=\"Clear\"\r\n (click)=\"clear()\"\r\n ></button>\r\n } @else {\r\n <div\r\n class=\"icon-dropdown\"\r\n (click)=\"toggleCompletion(!showCompletion, i0.value)\"\r\n ></div>\r\n }\r\n </div>\r\n <div\r\n #completeDiv\r\n [class.showCompletion]=\"showCompletion\"\r\n [class.lux-completion-list-appended]=\"appendTo\"\r\n class=\"lux-completion-list\"\r\n id=\"{{ inputId + '_list' }}\"\r\n >\r\n <ul>\r\n @for (item of completionList; track item.key; let index = $index) {\r\n <li\r\n id=\"{{ inputId + '_' + index }}\"\r\n class=\"lux-completion-item\"\r\n [class.selected]=\"focusItem && item.key === focusItem.key\"\r\n (click)=\"complete(item)\"\r\n [attr.aria-label]=\"item.label\"\r\n >\r\n <span class=\"preserve-white-space\">{{ item.labelPrefix }}</span>\r\n <span class=\"preserve-white-space bold\">{{ item.labelMatch }}</span>\r\n <span class=\"preserve-white-space\">{{ item.labelPostfix }}</span>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n</div>\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}.lux-autocomplete .lux-autocomplete-box{display:grid;grid-template-columns:1fr max-content}.lux-autocomplete input{padding:var(--lux-autocomplete-input-padding, .1rem 1.5rem .1rem .5rem);text-overflow:ellipsis;grid-row:1;grid-column-start:1;grid-column-end:3}.lux-autocomplete .icon-suggestions{grid-row:1;grid-column:2;width:1.5rem;border:none;background-color:transparent;background:url(/assets/img/suggestions.svg) no-repeat center;background-size:.5rem .5rem;z-index:1;position:relative;left:-1rem}.lux-autocomplete .icon-clear{grid-row:1;grid-column:2;width:var(--lux-autocomplete-icon-width, 1.5rem);border:none;background-color:transparent;background:var(--lux-autocomplete-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-autocomplete-icon-bg-size, .5rem .5rem);z-index:1}.lux-autocomplete .icon-dropdown{grid-row:1;grid-column:2;width:var(--lux-autocomplete-icon-width, 1.5rem);height:var(--lux-autocomplete-icon-height, 1.3rem);border:none;background-color:transparent;background:var(--lux-autocomplete-icon-dropdown, url(/assets/img/drop-down-arrow.svg) no-repeat center);background-size:var(--lux-autocomplete-icon-bg-size, .5rem .5rem);z-index:1}.lux-autocomplete .icon-spinner{grid-row:1;grid-column:2;width:1.5rem;border:none;background-color:transparent;background:url(/assets/img/spinner.svg) no-repeat center;background-size:1.2rem 1.2rem;z-index:1}.lux-completion-list{visibility:collapse;position:absolute;border:1px solid #ccc;margin:0rem;padding:0rem;max-height:10rem;overflow:auto;z-index:2}.lux-completion-list ul{list-style:none;margin:0rem;padding:0rem}.lux-completion-list.lux-completion-list-appended{position:absolute}.showCompletion{visibility:visible}.lux-completion-item{background-color:#fff;color:#000;padding:.1rem .5rem;cursor:pointer}.selected{background-color:#2e2eac;color:#fff}.disabled{background-color:#f0f0f0;color:#444}.disabled .selected{background-color:#9898ec;color:#fff}.bold{font-weight:700}.preserve-white-space{white-space:pre}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
581
580
|
}
|
|
582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
583
582
|
type: Component,
|
|
584
583
|
args: [{ selector: 'lux-autocomplete', imports: [FormsModule], providers: [
|
|
585
584
|
{
|
|
@@ -871,10 +870,11 @@ class AutocompleteListComponent {
|
|
|
871
870
|
this.markAsTouched();
|
|
872
871
|
}
|
|
873
872
|
getDeleteMessage(label) {
|
|
874
|
-
|
|
873
|
+
const i18n = this.literals[this.lang];
|
|
874
|
+
return (this.deleteLabelTemplate ?? i18n.deleteLabelTemplate).replace('<<label>>', label);
|
|
875
875
|
}
|
|
876
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
877
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
876
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AutocompleteListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
877
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AutocompleteListComponent, isStandalone: true, selector: "lux-autocomplete-list", inputs: { value: "value", lang: "lang", inputId: "inputId", dataSource: "dataSource", placeholder: "placeholder", disabled: "disabled", deleteLabelTemplate: "deleteLabelTemplate", addMessage: "addMessage", required: "required", resolveLabelsFunction: "resolveLabelsFunction", populateFunction: "populateFunction", instance: "instance" }, outputs: { valueChange: "valueChange" }, providers: [
|
|
878
878
|
{
|
|
879
879
|
provide: NG_VALUE_ACCESSOR,
|
|
880
880
|
multi: true,
|
|
@@ -885,9 +885,9 @@ class AutocompleteListComponent {
|
|
|
885
885
|
multi: true,
|
|
886
886
|
useExisting: forwardRef(() => AutocompleteListComponent)
|
|
887
887
|
}
|
|
888
|
-
], viewQueries: [{ propertyName: "auto", first: true, predicate: ["auto"], descendants: true }], ngImport: i0, template: "<div [id]=\"inputId\">\r\n <ul>\r\n @for (label of labels; track label; let index = $index) {\r\n
|
|
888
|
+
], viewQueries: [{ propertyName: "auto", first: true, predicate: ["auto"], descendants: true }], ngImport: i0, template: "<div [id]=\"inputId\">\r\n <ul>\r\n @for (label of labels; track label; let index = $index) {\r\n <li>\r\n <span>{{ label }}</span>\r\n @if (!disabled) {\r\n <button\r\n class=\"remove-item\"\r\n (click)=\"removeAt(index)\"\r\n attr.aria-label=\"{{ getDeleteMessage(label) }}\"\r\n ></button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n @if (!disabled) {\r\n <div class=\"new-entry\">\r\n <lux-autocomplete\r\n #auto\r\n [dataSource]=\"internalDataSource\"\r\n [placeholder]=\"placeholder ?? literals[lang].placeholder\"\r\n [(value)]=\"newEntry\"\r\n (valueChange)=\"onValueChange()\"\r\n (keypress)=\"onNewEntryChange($event, auto)\"\r\n >\r\n </lux-autocomplete>\r\n @if (canAdd) {\r\n <button\r\n type=\"button\"\r\n class=\"add-item\"\r\n aria-label=\"addMessage ?? literals[lang].addMessage\"\r\n (click)=\"addNew(auto)\"\r\n ></button>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".new-entry{margin-left:1.5rem;display:grid;grid-template-columns:max-content max-content}.new-entry lux-autocomplete{grid-column:1;grid-row:1}.new-entry .add-item{grid-column:2;grid-row:1;border:none;background:var(--lux-autocomplete-list-add-icon, url(/assets/img/create.png) no-repeat .2rem .2rem);background-size:var(--lux-autocomplete-list-add-icon-size, 1.1rem);height:var(--lux-autocomplete-list-add-icon-height, 1.4rem);width:var(--lux-autocomplete-list-add-icon-width, 1.4rem)}.remove-item{margin-left:.5rem;border:none;background:var(--lux-autocomplete-list-remove-icon, url(/assets/img/delete.svg) no-repeat .2rem .1rem);height:var(--lux-autocomplete-list-remove-icon-height, 1.2rem);width:var(--lux-autocomplete-list-remove-icon-width, 1.3rem);position:relative;top:var(--lux-autocomplete-list-remove-icon-top, .2rem);background-size:var(--lux-autocomplete-list-remove-icon-size, 1rem 1rem)}\n"], dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "lux-autocomplete", inputs: ["inputId", "disabled", "readonly", "label", "canAddNewValues", "keepOpenAfterDelete", "appendTo", "value", "dataSource", "required", "placeholder", "resolveLabelsFunction", "populateFunction", "instance"], outputs: ["valueChange", "dataSourceChange"] }] });
|
|
889
889
|
}
|
|
890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AutocompleteListComponent, decorators: [{
|
|
891
891
|
type: Component,
|
|
892
892
|
args: [{ selector: 'lux-autocomplete-list', imports: [AutocompleteComponent], providers: [
|
|
893
893
|
{
|
|
@@ -900,7 +900,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
900
900
|
multi: true,
|
|
901
901
|
useExisting: forwardRef(() => AutocompleteListComponent)
|
|
902
902
|
}
|
|
903
|
-
], template: "<div [id]=\"inputId\">\r\n <ul>\r\n @for (label of labels; track label; let index = $index) {\r\n
|
|
903
|
+
], template: "<div [id]=\"inputId\">\r\n <ul>\r\n @for (label of labels; track label; let index = $index) {\r\n <li>\r\n <span>{{ label }}</span>\r\n @if (!disabled) {\r\n <button\r\n class=\"remove-item\"\r\n (click)=\"removeAt(index)\"\r\n attr.aria-label=\"{{ getDeleteMessage(label) }}\"\r\n ></button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n @if (!disabled) {\r\n <div class=\"new-entry\">\r\n <lux-autocomplete\r\n #auto\r\n [dataSource]=\"internalDataSource\"\r\n [placeholder]=\"placeholder ?? literals[lang].placeholder\"\r\n [(value)]=\"newEntry\"\r\n (valueChange)=\"onValueChange()\"\r\n (keypress)=\"onNewEntryChange($event, auto)\"\r\n >\r\n </lux-autocomplete>\r\n @if (canAdd) {\r\n <button\r\n type=\"button\"\r\n class=\"add-item\"\r\n aria-label=\"addMessage ?? literals[lang].addMessage\"\r\n (click)=\"addNew(auto)\"\r\n ></button>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: [".new-entry{margin-left:1.5rem;display:grid;grid-template-columns:max-content max-content}.new-entry lux-autocomplete{grid-column:1;grid-row:1}.new-entry .add-item{grid-column:2;grid-row:1;border:none;background:var(--lux-autocomplete-list-add-icon, url(/assets/img/create.png) no-repeat .2rem .2rem);background-size:var(--lux-autocomplete-list-add-icon-size, 1.1rem);height:var(--lux-autocomplete-list-add-icon-height, 1.4rem);width:var(--lux-autocomplete-list-add-icon-width, 1.4rem)}.remove-item{margin-left:.5rem;border:none;background:var(--lux-autocomplete-list-remove-icon, url(/assets/img/delete.svg) no-repeat .2rem .1rem);height:var(--lux-autocomplete-list-remove-icon-height, 1.2rem);width:var(--lux-autocomplete-list-remove-icon-width, 1.3rem);position:relative;top:var(--lux-autocomplete-list-remove-icon-top, .2rem);background-size:var(--lux-autocomplete-list-remove-icon-size, 1rem 1rem)}\n"] }]
|
|
904
904
|
}], propDecorators: { auto: [{
|
|
905
905
|
type: ViewChild,
|
|
906
906
|
args: ['auto']
|
|
@@ -935,7 +935,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
935
935
|
class LuxBreadcrumbComponent {
|
|
936
936
|
route = inject(Router);
|
|
937
937
|
activedRoute = inject(ActivatedRoute);
|
|
938
|
-
breadcrumbs;
|
|
938
|
+
breadcrumbs = [];
|
|
939
939
|
subs = [];
|
|
940
940
|
imagePath = '../assets/img/arrow-forward.svg';
|
|
941
941
|
ngOnInit() {
|
|
@@ -974,7 +974,7 @@ class LuxBreadcrumbComponent {
|
|
|
974
974
|
const id = activedRouteSnapshot.params.id;
|
|
975
975
|
return id
|
|
976
976
|
? `${activedRouteSnapshot.url[0]}/${id}`
|
|
977
|
-
: activedRouteSnapshot.routeConfig
|
|
977
|
+
: activedRouteSnapshot.routeConfig?.path || '';
|
|
978
978
|
}
|
|
979
979
|
getLabel(activedRouteSnapshot) {
|
|
980
980
|
const routeConfig = activedRouteSnapshot.routeConfig;
|
|
@@ -992,12 +992,12 @@ class LuxBreadcrumbComponent {
|
|
|
992
992
|
}
|
|
993
993
|
return activedRouteSnapshot.params.id || routeConfig.path;
|
|
994
994
|
}
|
|
995
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
996
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
995
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
996
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: LuxBreadcrumbComponent, isStandalone: true, selector: "lux-breadcrumb", ngImport: i0, template: "<ul class=\"lux-breadcrumb\">\r\n @for (breadcrumb of breadcrumbs; track breadcrumb.url; let isLast = $last; let\r\n isFirst = $first) {\r\n <li class=\"lux-breadcrumb-item\">\r\n <a [class.first]=\"isFirst\" routerLink=\"{{ breadcrumb.url }}\">{{\r\n breadcrumb.label\r\n }}</a>\r\n @if (!isLast) {\r\n <div class=\"lux-breadcrumb-separator\"></div>\r\n }\r\n </li>\r\n }\r\n</ul>\r\n", styles: [".lux-breadcrumb{padding:10px 12px;list-style:none;list-style-type:none}.lux-breadcrumb li{display:inline;font-size:.8em}.lux-breadcrumb li a.first{font-weight:700}.lux-breadcrumb li+li:before{padding:8px;color:#000}.lux-breadcrumb li a,ol.lux-breadcrumb li a:hover{text-decoration:underline}.lux-breadcrumb a{cursor:hand}.lux-breadcrumb-separator{color:red;position:relative;top:5px;height:16px;padding:0 8px;background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">%0A <path d=\"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z\"/>%0A</svg>%0A');background-repeat:no-repeat;display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
|
|
997
997
|
}
|
|
998
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxBreadcrumbComponent, decorators: [{
|
|
999
999
|
type: Component,
|
|
1000
|
-
args: [{ selector: 'lux-breadcrumb', imports: [
|
|
1000
|
+
args: [{ selector: 'lux-breadcrumb', imports: [RouterModule], template: "<ul class=\"lux-breadcrumb\">\r\n @for (breadcrumb of breadcrumbs; track breadcrumb.url; let isLast = $last; let\r\n isFirst = $first) {\r\n <li class=\"lux-breadcrumb-item\">\r\n <a [class.first]=\"isFirst\" routerLink=\"{{ breadcrumb.url }}\">{{\r\n breadcrumb.label\r\n }}</a>\r\n @if (!isLast) {\r\n <div class=\"lux-breadcrumb-separator\"></div>\r\n }\r\n </li>\r\n }\r\n</ul>\r\n", styles: [".lux-breadcrumb{padding:10px 12px;list-style:none;list-style-type:none}.lux-breadcrumb li{display:inline;font-size:.8em}.lux-breadcrumb li a.first{font-weight:700}.lux-breadcrumb li+li:before{padding:8px;color:#000}.lux-breadcrumb li a,ol.lux-breadcrumb li a:hover{text-decoration:underline}.lux-breadcrumb a{cursor:hand}.lux-breadcrumb-separator{color:red;position:relative;top:5px;height:16px;padding:0 8px;background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">%0A <path d=\"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z\"/>%0A</svg>%0A');background-repeat:no-repeat;display:inline-block}\n"] }]
|
|
1001
1001
|
}] });
|
|
1002
1002
|
|
|
1003
1003
|
const KEY_SPACE = ' ';
|
|
@@ -1019,7 +1019,7 @@ class CheckboxComponent {
|
|
|
1019
1019
|
get lang() {
|
|
1020
1020
|
return this._lang;
|
|
1021
1021
|
}
|
|
1022
|
-
internalValue;
|
|
1022
|
+
internalValue = false;
|
|
1023
1023
|
get value() {
|
|
1024
1024
|
return this.internalValue;
|
|
1025
1025
|
}
|
|
@@ -1034,12 +1034,13 @@ class CheckboxComponent {
|
|
|
1034
1034
|
if (!initialAndEmpty) {
|
|
1035
1035
|
this.valueChange.emit(v);
|
|
1036
1036
|
}
|
|
1037
|
+
this.cdr.markForCheck();
|
|
1037
1038
|
}
|
|
1038
1039
|
get tabindexValue() {
|
|
1039
|
-
return this.disabled ?
|
|
1040
|
+
return this.disabled ? undefined : '0';
|
|
1040
1041
|
}
|
|
1041
|
-
label =
|
|
1042
|
-
name =
|
|
1042
|
+
label = undefined;
|
|
1043
|
+
name = undefined;
|
|
1043
1044
|
_disabled = false;
|
|
1044
1045
|
get disabled() {
|
|
1045
1046
|
return this._disabled;
|
|
@@ -1050,6 +1051,7 @@ class CheckboxComponent {
|
|
|
1050
1051
|
}
|
|
1051
1052
|
this._disabled = v;
|
|
1052
1053
|
this.syncModel();
|
|
1054
|
+
this.cdr.markForCheck();
|
|
1053
1055
|
}
|
|
1054
1056
|
inputId;
|
|
1055
1057
|
literals = {
|
|
@@ -1064,7 +1066,7 @@ class CheckboxComponent {
|
|
|
1064
1066
|
};
|
|
1065
1067
|
touched = false;
|
|
1066
1068
|
valueChange = new EventEmitter();
|
|
1067
|
-
|
|
1069
|
+
cdr = inject(ChangeDetectorRef);
|
|
1068
1070
|
// ControlValueAccessor Interface
|
|
1069
1071
|
onChange = (value) => { };
|
|
1070
1072
|
onTouched = () => { };
|
|
@@ -1093,7 +1095,9 @@ class CheckboxComponent {
|
|
|
1093
1095
|
: `${this.name || 'checkbox'}$${CheckboxComponent.idCounter++}`;
|
|
1094
1096
|
}
|
|
1095
1097
|
ngAfterViewInit() {
|
|
1096
|
-
|
|
1098
|
+
setTimeout(() => {
|
|
1099
|
+
this.syncModel();
|
|
1100
|
+
});
|
|
1097
1101
|
}
|
|
1098
1102
|
clicked() {
|
|
1099
1103
|
if (!this.disabled) {
|
|
@@ -1113,8 +1117,8 @@ class CheckboxComponent {
|
|
|
1113
1117
|
this.ck.nativeElement.checked = this.internalValue;
|
|
1114
1118
|
}
|
|
1115
1119
|
}
|
|
1116
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1117
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1120
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1121
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: CheckboxComponent, isStandalone: true, selector: "lux-checkbox", inputs: { lang: "lang", value: "value", label: "label", name: "name", disabled: "disabled", inputId: "inputId" }, outputs: { valueChange: "valueChange" }, providers: [
|
|
1118
1122
|
{
|
|
1119
1123
|
provide: NG_VALUE_ACCESSOR,
|
|
1120
1124
|
multi: true,
|
|
@@ -1122,7 +1126,7 @@ class CheckboxComponent {
|
|
|
1122
1126
|
}
|
|
1123
1127
|
], viewQueries: [{ propertyName: "ck", first: true, predicate: ["ck"], descendants: true }], ngImport: i0, template: "<div class=\"switch\">\r\n <div>\r\n @if (label) {\r\n <label [for]=\"inputId\">{{ label }}</label>\r\n }\r\n </div>\r\n @if (!disabled) {\r\n <div class=\"switch-item\" (click)=\"clicked()\">\r\n <input #ck [name]=\"name\" type=\"checkbox\" [id]=\"inputId\" />\r\n <div\r\n class=\"slider round\"\r\n [class.on]=\"value\"\r\n [class.disabled]=\"disabled\"\r\n [tabindex]=\"tabindexValue\"\r\n (keyup)=\"onKey($event)\"\r\n ></div>\r\n </div>\r\n }\r\n <div>\r\n @if (value) {\r\n <span class=\"checkbox-label\">{{ literals[lang].yesLabel }}</span>\r\n } @if (!value) {\r\n <span class=\"checkbox-label\">{{ literals[lang].noLabel }}</span>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".switch{display:flex;flex-flow:row wrap;align-items:center}label{padding-right:1.1rem}.switch-item{padding-right:.5em}.slider.round{border-radius:.7rem;width:3.1rem;height:1.4rem}.slider.round:before{border-radius:50%}.switch input{opacity:0;width:0;height:0}.slider{cursor:pointer;position:relative;top:-.7rem;background-color:#ccc;transition:.4s}.slider.on{background-color:#2196f3}.slider:before{position:absolute;content:\"\";height:1rem;width:1rem;left:.2rem;bottom:.2rem;background-color:#fff;transition:.4s}.slider.on:before{transform:translate(26px)}input:focus+.slider{box-shadow:0 0 1px #2196f3}\n"] });
|
|
1124
1128
|
}
|
|
1125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
1126
1130
|
type: Component,
|
|
1127
1131
|
args: [{ selector: 'lux-checkbox', imports: [], providers: [
|
|
1128
1132
|
{
|
|
@@ -1131,7 +1135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
1131
1135
|
useExisting: forwardRef(() => CheckboxComponent)
|
|
1132
1136
|
}
|
|
1133
1137
|
], template: "<div class=\"switch\">\r\n <div>\r\n @if (label) {\r\n <label [for]=\"inputId\">{{ label }}</label>\r\n }\r\n </div>\r\n @if (!disabled) {\r\n <div class=\"switch-item\" (click)=\"clicked()\">\r\n <input #ck [name]=\"name\" type=\"checkbox\" [id]=\"inputId\" />\r\n <div\r\n class=\"slider round\"\r\n [class.on]=\"value\"\r\n [class.disabled]=\"disabled\"\r\n [tabindex]=\"tabindexValue\"\r\n (keyup)=\"onKey($event)\"\r\n ></div>\r\n </div>\r\n }\r\n <div>\r\n @if (value) {\r\n <span class=\"checkbox-label\">{{ literals[lang].yesLabel }}</span>\r\n } @if (!value) {\r\n <span class=\"checkbox-label\">{{ literals[lang].noLabel }}</span>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".switch{display:flex;flex-flow:row wrap;align-items:center}label{padding-right:1.1rem}.switch-item{padding-right:.5em}.slider.round{border-radius:.7rem;width:3.1rem;height:1.4rem}.slider.round:before{border-radius:50%}.switch input{opacity:0;width:0;height:0}.slider{cursor:pointer;position:relative;top:-.7rem;background-color:#ccc;transition:.4s}.slider.on{background-color:#2196f3}.slider:before{position:absolute;content:\"\";height:1rem;width:1rem;left:.2rem;bottom:.2rem;background-color:#fff;transition:.4s}.slider.on:before{transform:translate(26px)}input:focus+.slider{box-shadow:0 0 1px #2196f3}\n"] }]
|
|
1134
|
-
}],
|
|
1138
|
+
}], propDecorators: { ck: [{
|
|
1135
1139
|
type: ViewChild,
|
|
1136
1140
|
args: ['ck', { static: false }]
|
|
1137
1141
|
}], lang: [{
|
|
@@ -1157,9 +1161,9 @@ class DatetimeComponent {
|
|
|
1157
1161
|
touched = false;
|
|
1158
1162
|
dirty = false;
|
|
1159
1163
|
lastErrors = null;
|
|
1160
|
-
_disabled;
|
|
1161
|
-
_required;
|
|
1162
|
-
_value;
|
|
1164
|
+
_disabled = undefined;
|
|
1165
|
+
_required = undefined;
|
|
1166
|
+
_value = undefined;
|
|
1163
1167
|
dateValue = undefined;
|
|
1164
1168
|
timeValue = undefined;
|
|
1165
1169
|
userErrors = {
|
|
@@ -1191,24 +1195,24 @@ class DatetimeComponent {
|
|
|
1191
1195
|
this._disabled = v;
|
|
1192
1196
|
}
|
|
1193
1197
|
get disabled() {
|
|
1194
|
-
return this._disabled;
|
|
1198
|
+
return !!this._disabled;
|
|
1195
1199
|
}
|
|
1196
1200
|
set required(v) {
|
|
1197
1201
|
this._required = v;
|
|
1198
1202
|
}
|
|
1199
1203
|
get required() {
|
|
1200
|
-
return this._required;
|
|
1204
|
+
return !!this._required;
|
|
1201
1205
|
}
|
|
1202
1206
|
set value(v) {
|
|
1203
1207
|
if (v === this._value) {
|
|
1204
1208
|
return; // prevent events when there is no changes
|
|
1205
1209
|
}
|
|
1206
1210
|
const initialAndEmpty = isInitialAndEmpty(this._value, v);
|
|
1207
|
-
const datetime = new Date(v);
|
|
1211
|
+
const datetime = new Date(v ?? '');
|
|
1208
1212
|
if (!v) {
|
|
1209
|
-
this._value =
|
|
1210
|
-
this.setDateInControl(
|
|
1211
|
-
this.setTimeInControl(
|
|
1213
|
+
this._value = undefined;
|
|
1214
|
+
this.setDateInControl(undefined);
|
|
1215
|
+
this.setTimeInControl(undefined);
|
|
1212
1216
|
}
|
|
1213
1217
|
else if (!isValidDate(datetime)) {
|
|
1214
1218
|
this._value = v;
|
|
@@ -1274,9 +1278,9 @@ class DatetimeComponent {
|
|
|
1274
1278
|
}
|
|
1275
1279
|
}
|
|
1276
1280
|
clear() {
|
|
1277
|
-
this.setDateInControl(
|
|
1278
|
-
this.setTimeInControl(
|
|
1279
|
-
this.value =
|
|
1281
|
+
this.setDateInControl(undefined);
|
|
1282
|
+
this.setTimeInControl(undefined);
|
|
1283
|
+
this.value = undefined;
|
|
1280
1284
|
}
|
|
1281
1285
|
isClearable() {
|
|
1282
1286
|
return hasValue(this.value);
|
|
@@ -1352,7 +1356,7 @@ class DatetimeComponent {
|
|
|
1352
1356
|
return;
|
|
1353
1357
|
}
|
|
1354
1358
|
if (!newDate || !newTime) {
|
|
1355
|
-
this.value =
|
|
1359
|
+
this.value = undefined;
|
|
1356
1360
|
}
|
|
1357
1361
|
else {
|
|
1358
1362
|
const newValue = `${newDate}T${newTime}`;
|
|
@@ -1390,8 +1394,8 @@ class DatetimeComponent {
|
|
|
1390
1394
|
this.min = this.min || '1900-01-01';
|
|
1391
1395
|
this.max = this.max || '2100-01-01';
|
|
1392
1396
|
}
|
|
1393
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1394
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1397
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: DatetimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1398
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: DatetimeComponent, isStandalone: true, selector: "lux-datetime", inputs: { min: "min", max: "max", includeSeconds: "includeSeconds", localTime: "localTime", lang: "lang", inlineErrors: "inlineErrors", inputId: "inputId", ariaLabel: ["aria-label", "ariaLabel"], readonly: "readonly", disabled: "disabled", required: "required", value: "value" }, outputs: { valueChange: "valueChange", keyPress: "keyPress" }, providers: [
|
|
1395
1399
|
{
|
|
1396
1400
|
provide: NG_VALUE_ACCESSOR,
|
|
1397
1401
|
multi: true,
|
|
@@ -1402,9 +1406,9 @@ class DatetimeComponent {
|
|
|
1402
1406
|
multi: true,
|
|
1403
1407
|
useExisting: forwardRef(() => DatetimeComponent)
|
|
1404
1408
|
}
|
|
1405
|
-
], viewQueries: [{ propertyName: "dateInput", first: true, predicate: ["dateInput"], descendants: true, static: true }, { propertyName: "timeInput", first: true, predicate: ["timeInput"], descendants: true, static: true }], ngImport: i0, template: "<input\r\n #dateInput\r\n class=\"rounded-left prefix\"\r\n [ngClass]=\"className\"\r\n type=\"date\"\r\n [id]=\"inputId + '$date'\"\r\n [(ngModel)]=\"dateValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [placeholder]=\"\"\r\n (keyup)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (change)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n<input\r\n #timeInput\r\n [class]=\"\r\n (disabled || readonly || !isClearable()) && localTime ? 'rounded-right' : ''\r\n \"\r\n [ngClass]=\"className\"\r\n type=\"time\"\r\n [id]=\"inputId + '$time'\"\r\n [(ngModel)]=\"timeValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [placeholder]=\"\"\r\n [step]=\"includeSeconds ? 1 : 60\"\r\n (keyup)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (change)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n@if (!localTime) {\r\n<div\r\n [class]=\"\r\n disabled || readonly || !isClearable()\r\n ? 'rounded-right postfix symbol'\r\n : 'postfix symbol'\r\n \"\r\n [ngClass]=\"className\"\r\n>\r\n <span>{{ localTime ? '' : 'UTC' }}</span>\r\n</div>\r\n} @if (!disabled && !readonly && isClearable()) {\r\n<button\r\n #clearButton\r\n type=\"button\"\r\n class=\"rounded-right postfix bordered icon-clear\"\r\n [id]=\"inputId + '$clear'\"\r\n (click)=\"clear()\"\r\n aria-label=\"clear\"\r\n></button>\r\n} @if (inlineErrors && lastErrors && (dirty || touched)) {\r\n<div class=\"alert\">\r\n @if (lastErrors.required) {\r\n <div>{{ userErrors[lang].required }}</div>\r\n } @if (lastErrors.min) {\r\n <div>{{ userErrors[lang].min.replace('$min', lastErrors.min.min) }}</div>\r\n } @if (lastErrors.max) {\r\n <div>{{ userErrors[lang].max.replace('$max', lastErrors.max.max) }}</div>\r\n }\r\n</div>\r\n}\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}:host{display:flex;align-items:stretch}.readonly{border:none}.readonly:focus{border:none;outline:none}.disabled{background-color:var(--lux-disabled-color, #f1f1f1);border-color:var(--lux-disabled-border-color, #6d6d6d)}.icon-clear{grid-row:1;grid-column:2;width:var(--lux-autocomplete-icon-width, 1.5rem);background:var(--lux-autocomplete-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-autocomplete-icon-bg-size, .5rem .5rem);z-index:1}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1409
|
+
], viewQueries: [{ propertyName: "dateInput", first: true, predicate: ["dateInput"], descendants: true, static: true }, { propertyName: "timeInput", first: true, predicate: ["timeInput"], descendants: true, static: true }], ngImport: i0, template: "<input\r\n #dateInput\r\n class=\"rounded-left prefix\"\r\n [ngClass]=\"className\"\r\n type=\"date\"\r\n [id]=\"inputId + '$date'\"\r\n [(ngModel)]=\"dateValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [placeholder]=\"\"\r\n (keyup)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (change)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n<input\r\n #timeInput\r\n [class]=\"\r\n (disabled || readonly || !isClearable()) && localTime ? 'rounded-right' : ''\r\n \"\r\n [ngClass]=\"className\"\r\n type=\"time\"\r\n [id]=\"inputId + '$time'\"\r\n [(ngModel)]=\"timeValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [placeholder]=\"\"\r\n [step]=\"includeSeconds ? 1 : 60\"\r\n (keyup)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (change)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n@if (!localTime) {\r\n<div\r\n [class]=\"\r\n disabled || readonly || !isClearable()\r\n ? 'rounded-right postfix symbol'\r\n : 'postfix symbol'\r\n \"\r\n [ngClass]=\"className\"\r\n>\r\n <span>{{ localTime ? '' : 'UTC' }}</span>\r\n</div>\r\n} @if (!disabled && !readonly && isClearable()) {\r\n<button\r\n #clearButton\r\n type=\"button\"\r\n class=\"rounded-right postfix bordered icon-clear\"\r\n [id]=\"inputId + '$clear'\"\r\n (click)=\"clear()\"\r\n aria-label=\"clear\"\r\n></button>\r\n} @if (inlineErrors && lastErrors && (dirty || touched)) {\r\n<div class=\"alert\">\r\n @if (lastErrors.required) {\r\n <div>{{ userErrors[lang].required }}</div>\r\n } @if (lastErrors.min) {\r\n <div>{{ userErrors[lang].min.replace('$min', lastErrors.min.min) }}</div>\r\n } @if (lastErrors.max) {\r\n <div>{{ userErrors[lang].max.replace('$max', lastErrors.max.max) }}</div>\r\n }\r\n</div>\r\n}\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}:host{display:flex;align-items:stretch}.readonly{border:none}.readonly:focus{border:none;outline:none}.disabled{background-color:var(--lux-disabled-color, #f1f1f1);border-color:var(--lux-disabled-border-color, #6d6d6d)}.icon-clear{grid-row:1;grid-column:2;width:var(--lux-autocomplete-icon-width, 1.5rem);background:var(--lux-autocomplete-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-autocomplete-icon-bg-size, .5rem .5rem);z-index:1}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1406
1410
|
}
|
|
1407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: DatetimeComponent, decorators: [{
|
|
1408
1412
|
type: Component,
|
|
1409
1413
|
args: [{ selector: 'lux-datetime', imports: [FormsModule, CommonModule], providers: [
|
|
1410
1414
|
{
|
|
@@ -1561,7 +1565,7 @@ class FilterComponent {
|
|
|
1561
1565
|
freeSubscriptions() {
|
|
1562
1566
|
if (this.sub) {
|
|
1563
1567
|
this.sub.unsubscribe();
|
|
1564
|
-
this.sub =
|
|
1568
|
+
this.sub = undefined;
|
|
1565
1569
|
}
|
|
1566
1570
|
}
|
|
1567
1571
|
searchNow(value) {
|
|
@@ -1570,18 +1574,18 @@ class FilterComponent {
|
|
|
1570
1574
|
addEvent() {
|
|
1571
1575
|
this.subject.next(this.searchValue);
|
|
1572
1576
|
}
|
|
1573
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1574
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1577
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1578
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: FilterComponent, isStandalone: true, selector: "lux-filter", inputs: { disabled: "disabled", inputId: "inputId", placeholder: "placeholder", searchValue: "searchValue", searchOnType: "searchOnType", ariaLabel: ["aria-label", "ariaLabel"], debounce: "debounce" }, outputs: { searchValueChange: "searchValueChange" }, providers: [
|
|
1575
1579
|
{
|
|
1576
1580
|
provide: NG_VALUE_ACCESSOR,
|
|
1577
1581
|
multi: true,
|
|
1578
1582
|
useExisting: forwardRef(() => FilterComponent)
|
|
1579
1583
|
}
|
|
1580
|
-
], ngImport: i0, template: "<div class=\"filter\">\r\n <input\r\n #i0\r\n type=\"text\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [placeholder]=\"placeholder\"\r\n [id]=\"inputId\"\r\n [disabled]=\"disabled\"\r\n [value]=\"searchValue\"\r\n (valueChange)=\"onInputValueChange(i0.value)\"\r\n (keyup)=\"keyup($event, i0.value)\"\r\n />\r\n\r\n <button\r\n [class.hide]=\"!searchValue\"\r\n aria-label=\"Clear\"\r\n class=\"clear-indicator icon icon-clear\"\r\n type=\"button\"\r\n (click)=\"clear()\"\r\n ></button>\r\n @if (searchOnType) {\r\n <i class=\"search-indicator icon icon-search\"></i>\r\n } @if (!searchOnType) {\r\n <button\r\n class=\"btn-search\"\r\n type=\"button\"\r\n [disabled]=\"disabled\"\r\n (click)=\"search()\"\r\n >\r\n Search\r\n </button>\r\n }\r\n</div>\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}.filter{display:grid;grid-template-columns:auto 1.5rem 1.5rem .5rem auto}.filter input{grid-row:1;grid-column-start:1;grid-column-end:4}.filter .hide{visibility:collapse}.filter .clear-indicator{grid-row:1;grid-column:2;border:none}.filter .search-indicator{grid-row:1;grid-column:3}.filter .btn-search{grid-row:1;grid-column:5}.filter .icon-search{background:var(--lux-filter-icon-search, url(/assets/img/filter-search.png) no-repeat center);background-size:var(--lux-filter-icon-bg-size, 1rem);background-position:center;width:var(--lux-filter-icon-width, 1rem)}.filter .icon-clear{background:var(--lux-filter-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-filter-icon-bg-size, 1rem);background-position:center}\n"], dependencies: [{ kind: "ngmodule", type:
|
|
1584
|
+
], ngImport: i0, template: "<div class=\"filter\">\r\n <input\r\n #i0\r\n type=\"text\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [placeholder]=\"placeholder\"\r\n [id]=\"inputId\"\r\n [disabled]=\"disabled\"\r\n [value]=\"searchValue\"\r\n (valueChange)=\"onInputValueChange(i0.value)\"\r\n (keyup)=\"keyup($event, i0.value)\"\r\n />\r\n\r\n <button\r\n [class.hide]=\"!searchValue\"\r\n aria-label=\"Clear\"\r\n class=\"clear-indicator icon icon-clear\"\r\n type=\"button\"\r\n (click)=\"clear()\"\r\n ></button>\r\n @if (searchOnType) {\r\n <i class=\"search-indicator icon icon-search\"></i>\r\n } @if (!searchOnType) {\r\n <button\r\n class=\"btn-search\"\r\n type=\"button\"\r\n [disabled]=\"disabled\"\r\n (click)=\"search()\"\r\n >\r\n Search\r\n </button>\r\n }\r\n</div>\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}.filter{display:grid;grid-template-columns:auto 1.5rem 1.5rem .5rem auto}.filter input{grid-row:1;grid-column-start:1;grid-column-end:4}.filter .hide{visibility:collapse}.filter .clear-indicator{grid-row:1;grid-column:2;border:none}.filter .search-indicator{grid-row:1;grid-column:3}.filter .btn-search{grid-row:1;grid-column:5}.filter .icon-search{background:var(--lux-filter-icon-search, url(/assets/img/filter-search.png) no-repeat center);background-size:var(--lux-filter-icon-bg-size, 1rem);background-position:center;width:var(--lux-filter-icon-width, 1rem)}.filter .icon-clear{background:var(--lux-filter-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-filter-icon-bg-size, 1rem);background-position:center}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }] });
|
|
1581
1585
|
}
|
|
1582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: FilterComponent, decorators: [{
|
|
1583
1587
|
type: Component,
|
|
1584
|
-
args: [{ selector: 'lux-filter', imports: [
|
|
1588
|
+
args: [{ selector: 'lux-filter', imports: [FormsModule], providers: [
|
|
1585
1589
|
{
|
|
1586
1590
|
provide: NG_VALUE_ACCESSOR,
|
|
1587
1591
|
multi: true,
|
|
@@ -1607,27 +1611,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
1607
1611
|
type: Output
|
|
1608
1612
|
}] } });
|
|
1609
1613
|
|
|
1610
|
-
let
|
|
1614
|
+
let loading$ = null;
|
|
1611
1615
|
class OpenLayerLoaderService {
|
|
1612
1616
|
load() {
|
|
1613
1617
|
if (window.ol) {
|
|
1614
1618
|
return of(true);
|
|
1615
1619
|
}
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
openLayersIsInstalled = true; // only try to install it once
|
|
1620
|
+
if (!loading$) {
|
|
1621
|
+
const openLayerJsUrl = 'https://openlayers.org/en/v5.3.0/build/ol.js';
|
|
1622
|
+
const openLayerCssUrl = 'https://openlayers.org/en/v5.3.0/css/ol.css';
|
|
1620
1623
|
loadCss(openLayerCssUrl, () => { });
|
|
1621
|
-
|
|
1624
|
+
loading$ = from(new Promise((resolve, _) => {
|
|
1622
1625
|
loadScript(openLayerJsUrl, () => resolve(true));
|
|
1623
|
-
}));
|
|
1626
|
+
})).pipe(shareReplay(1));
|
|
1624
1627
|
}
|
|
1625
|
-
return
|
|
1628
|
+
return loading$;
|
|
1626
1629
|
}
|
|
1627
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1628
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1630
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: OpenLayerLoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1631
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: OpenLayerLoaderService, providedIn: 'root' });
|
|
1629
1632
|
}
|
|
1630
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1633
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: OpenLayerLoaderService, decorators: [{
|
|
1631
1634
|
type: Injectable,
|
|
1632
1635
|
args: [{ providedIn: 'root' }]
|
|
1633
1636
|
}] });
|
|
@@ -1674,7 +1677,7 @@ class MapComponent {
|
|
|
1674
1677
|
mapId;
|
|
1675
1678
|
_zoom;
|
|
1676
1679
|
set zoom(zoom) {
|
|
1677
|
-
if (!isNaN(zoom)) {
|
|
1680
|
+
if (zoom != null && !isNaN(zoom)) {
|
|
1678
1681
|
this._zoom = zoom;
|
|
1679
1682
|
if (this._map) {
|
|
1680
1683
|
this._map.getView().setZoom(zoom);
|
|
@@ -1726,7 +1729,7 @@ class MapComponent {
|
|
|
1726
1729
|
this.markerCoordinates = this.markerCoordinates;
|
|
1727
1730
|
}
|
|
1728
1731
|
get readonly() {
|
|
1729
|
-
return this._readonly;
|
|
1732
|
+
return !!this._readonly;
|
|
1730
1733
|
}
|
|
1731
1734
|
_marker;
|
|
1732
1735
|
_markerInteraction;
|
|
@@ -1764,7 +1767,7 @@ class MapComponent {
|
|
|
1764
1767
|
get markerPoint() {
|
|
1765
1768
|
return {
|
|
1766
1769
|
type: 'Point',
|
|
1767
|
-
coordinates: this.markerCoordinates
|
|
1770
|
+
coordinates: this.markerCoordinates ?? [0, 0]
|
|
1768
1771
|
};
|
|
1769
1772
|
}
|
|
1770
1773
|
valueChange = new EventEmitter();
|
|
@@ -1876,7 +1879,7 @@ class MapComponent {
|
|
|
1876
1879
|
ol.proj.transform(coordinates, 'EPSG:4326', 'EPSG:3857'))
|
|
1877
1880
|
});
|
|
1878
1881
|
this._markerSource.addFeature(this._marker);
|
|
1879
|
-
this._markerCoordinates = this.getMarkerCoordinates();
|
|
1882
|
+
this._markerCoordinates = this.getMarkerCoordinates() ?? undefined;
|
|
1880
1883
|
if (!this.readonly) {
|
|
1881
1884
|
const dragInteraction = new ol.interaction.Modify({
|
|
1882
1885
|
features: new ol.Collection([this._marker]),
|
|
@@ -1915,12 +1918,12 @@ class MapComponent {
|
|
|
1915
1918
|
this._map.updateSize();
|
|
1916
1919
|
}
|
|
1917
1920
|
}
|
|
1918
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1919
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1921
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1922
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: MapComponent, isStandalone: true, selector: "lux-map", inputs: { mapId: "mapId", zoom: "zoom", center: "center", readonly: "readonly", markerCoordinates: "markerCoordinates", markerPoint: "markerPoint" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div [id]=\"mapId\" class=\"map\" (resized)=\"onResize()\"></div>\n", styles: [".map{min-height:100px;height:100%;min-width:160px;width:100%}\n"] });
|
|
1920
1923
|
}
|
|
1921
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1924
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MapComponent, decorators: [{
|
|
1922
1925
|
type: Component,
|
|
1923
|
-
args: [{ selector: 'lux-map', imports: [
|
|
1926
|
+
args: [{ selector: 'lux-map', imports: [], template: "<div [id]=\"mapId\" class=\"map\" (resized)=\"onResize()\"></div>\n", styles: [".map{min-height:100px;height:100%;min-width:160px;width:100%}\n"] }]
|
|
1924
1927
|
}], ctorParameters: () => [], propDecorators: { mapId: [{
|
|
1925
1928
|
type: Input
|
|
1926
1929
|
}], zoom: [{
|
|
@@ -1941,13 +1944,13 @@ class LuxModalBackdropComponent {
|
|
|
1941
1944
|
backdropClass;
|
|
1942
1945
|
class = 'modal-backdrop fade show';
|
|
1943
1946
|
style = 'z-index: 1050';
|
|
1944
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1945
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1947
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxModalBackdropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1948
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: LuxModalBackdropComponent, isStandalone: true, selector: "lux-modal-backdrop", inputs: { backdropClass: "backdropClass" }, host: { properties: { "class": "this.class", "style": "this.style" } }, ngImport: i0, template: '', isInline: true });
|
|
1946
1949
|
}
|
|
1947
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxModalBackdropComponent, decorators: [{
|
|
1948
1951
|
type: Component,
|
|
1949
1952
|
args: [{
|
|
1950
|
-
imports: [
|
|
1953
|
+
imports: [],
|
|
1951
1954
|
selector: 'lux-modal-backdrop',
|
|
1952
1955
|
template: ''
|
|
1953
1956
|
}]
|
|
@@ -1963,10 +1966,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
1963
1966
|
|
|
1964
1967
|
class LuxModalConfig {
|
|
1965
1968
|
backdrop = true;
|
|
1966
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1967
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1969
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxModalConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1970
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxModalConfig, providedIn: 'root' });
|
|
1968
1971
|
}
|
|
1969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1972
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxModalConfig, decorators: [{
|
|
1970
1973
|
type: Injectable,
|
|
1971
1974
|
args: [{ providedIn: 'root' }]
|
|
1972
1975
|
}] });
|
|
@@ -1980,8 +1983,8 @@ class ModalRef {
|
|
|
1980
1983
|
_contentRef;
|
|
1981
1984
|
_backdropCmptRef;
|
|
1982
1985
|
_beforeDismiss;
|
|
1983
|
-
_resolve;
|
|
1984
|
-
_reject;
|
|
1986
|
+
_resolve = undefined;
|
|
1987
|
+
_reject = undefined;
|
|
1985
1988
|
/**
|
|
1986
1989
|
* The instance of a component used for the modal content.
|
|
1987
1990
|
*
|
|
@@ -2066,9 +2069,9 @@ class ModalRef {
|
|
|
2066
2069
|
if (this._contentRef && this._contentRef.viewRef) {
|
|
2067
2070
|
this._contentRef.viewRef.destroy();
|
|
2068
2071
|
}
|
|
2069
|
-
this._windowCmptRef =
|
|
2070
|
-
this._backdropCmptRef =
|
|
2071
|
-
this._contentRef =
|
|
2072
|
+
this._windowCmptRef = undefined;
|
|
2073
|
+
this._backdropCmptRef = undefined;
|
|
2074
|
+
this._contentRef = undefined;
|
|
2072
2075
|
}
|
|
2073
2076
|
}
|
|
2074
2077
|
|
|
@@ -2180,7 +2183,8 @@ class LuxModalWindowComponent {
|
|
|
2180
2183
|
get hostAriaDescribedBy() {
|
|
2181
2184
|
return this.ariaDescribedBy;
|
|
2182
2185
|
}
|
|
2183
|
-
backdropClick(
|
|
2186
|
+
backdropClick(event) {
|
|
2187
|
+
const btn = event.target;
|
|
2184
2188
|
if (this.backdrop === true && this._elRef.nativeElement === btn) {
|
|
2185
2189
|
this.dismiss(ModalDismissReasons.BackdropClick);
|
|
2186
2190
|
}
|
|
@@ -2207,7 +2211,9 @@ class LuxModalWindowComponent {
|
|
|
2207
2211
|
const body = this._document.body;
|
|
2208
2212
|
const elWithFocus = this._elWithFocus;
|
|
2209
2213
|
let elementToFocus;
|
|
2210
|
-
if (elWithFocus &&
|
|
2214
|
+
if (elWithFocus &&
|
|
2215
|
+
elWithFocus[FOCUS] &&
|
|
2216
|
+
body.contains(elWithFocus)) {
|
|
2211
2217
|
elementToFocus = elWithFocus;
|
|
2212
2218
|
}
|
|
2213
2219
|
else {
|
|
@@ -2216,18 +2222,18 @@ class LuxModalWindowComponent {
|
|
|
2216
2222
|
elementToFocus.focus();
|
|
2217
2223
|
this._elWithFocus = null;
|
|
2218
2224
|
}
|
|
2219
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2220
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2225
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxModalWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2226
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: LuxModalWindowComponent, isStandalone: true, selector: "lux-modal-window", inputs: { ariaDescribedBy: "ariaDescribedBy", ariaLabelledBy: "ariaLabelledBy", backdrop: "backdrop", keyboard: "keyboard", windowClass: "windowClass" }, outputs: { dismissEvent: "dismissEvent" }, host: { listeners: { "click": "backdropClick($event)", "keyup.esc": "escKey($event)" }, properties: { "class": "this.class", "attr.role": "this.role", "tabindex": "this.tabindex", "attr.aria-modal": "this.ariamodal", "attr.aria-labelledby": "this.hostAriaLabelledBy", "attr.aria-describedby": "this.hostAriaDescribedBy" } }, ngImport: i0, template: `
|
|
2221
2227
|
<div class="modal-dialog" role="document">
|
|
2222
2228
|
<div class="modal-content"><ng-content></ng-content></div>
|
|
2223
2229
|
</div>
|
|
2224
|
-
`, isInline: true
|
|
2230
|
+
`, isInline: true });
|
|
2225
2231
|
}
|
|
2226
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxModalWindowComponent, decorators: [{
|
|
2227
2233
|
type: Component,
|
|
2228
2234
|
args: [{
|
|
2229
2235
|
selector: 'lux-modal-window',
|
|
2230
|
-
imports: [
|
|
2236
|
+
imports: [],
|
|
2231
2237
|
template: `
|
|
2232
2238
|
<div class="modal-dialog" role="document">
|
|
2233
2239
|
<div class="modal-content"><ng-content></ng-content></div>
|
|
@@ -2266,7 +2272,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2266
2272
|
args: ['attr.aria-describedby']
|
|
2267
2273
|
}], backdropClick: [{
|
|
2268
2274
|
type: HostListener,
|
|
2269
|
-
args: ['click', ['$event
|
|
2275
|
+
args: ['click', ['$event']]
|
|
2270
2276
|
}], escKey: [{
|
|
2271
2277
|
type: HostListener,
|
|
2272
2278
|
args: ['keyup.esc', ['$event']]
|
|
@@ -2275,6 +2281,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2275
2281
|
class ModalStack {
|
|
2276
2282
|
_applicationRef = inject(ApplicationRef);
|
|
2277
2283
|
_document = inject(DOCUMENT);
|
|
2284
|
+
_environmentInjector = inject(EnvironmentInjector);
|
|
2278
2285
|
_injector = inject(Injector);
|
|
2279
2286
|
_rendererFactory = inject(RendererFactory2);
|
|
2280
2287
|
modalConfig = inject(LuxModalConfig);
|
|
@@ -2302,7 +2309,7 @@ class ModalStack {
|
|
|
2302
2309
|
}
|
|
2303
2310
|
});
|
|
2304
2311
|
}
|
|
2305
|
-
open(
|
|
2312
|
+
open(content, options) {
|
|
2306
2313
|
const config = Object.assign({}, this.modalConfig, options);
|
|
2307
2314
|
const containerEl = this._document.body;
|
|
2308
2315
|
const renderer = this._rendererFactory.createRenderer(null, null);
|
|
@@ -2313,9 +2320,9 @@ class ModalStack {
|
|
|
2313
2320
|
}
|
|
2314
2321
|
};
|
|
2315
2322
|
const activeModal = new ActiveModal();
|
|
2316
|
-
const contentRef = this.getContentRef(
|
|
2317
|
-
const backdropCmptRef = config.backdrop ? this._attachBackdrop(
|
|
2318
|
-
const windowCmptRef = this._attachWindowComponent(
|
|
2323
|
+
const contentRef = this.getContentRef(content, activeModal);
|
|
2324
|
+
const backdropCmptRef = config.backdrop ? this._attachBackdrop(containerEl) : null;
|
|
2325
|
+
const windowCmptRef = this._attachWindowComponent(containerEl, contentRef);
|
|
2319
2326
|
const modalRef = new ModalRef(windowCmptRef, contentRef, backdropCmptRef);
|
|
2320
2327
|
this._registerModalRef(modalRef);
|
|
2321
2328
|
this._registerWindowCmpt(windowCmptRef);
|
|
@@ -2362,10 +2369,11 @@ class ModalStack {
|
|
|
2362
2369
|
});
|
|
2363
2370
|
this._ariaHiddenValues.clear();
|
|
2364
2371
|
}
|
|
2365
|
-
getContentRef(
|
|
2372
|
+
getContentRef(content, activeModal) {
|
|
2366
2373
|
if (content instanceof TemplateRef) {
|
|
2367
2374
|
return this.createFromTemplateRef(content, activeModal);
|
|
2368
2375
|
}
|
|
2376
|
+
return undefined;
|
|
2369
2377
|
}
|
|
2370
2378
|
createFromTemplateRef(content, activeModal) {
|
|
2371
2379
|
const context = {
|
|
@@ -2381,16 +2389,21 @@ class ModalStack {
|
|
|
2381
2389
|
this._applicationRef.attachView(viewRef);
|
|
2382
2390
|
return new ContentRef([viewRef.rootNodes], viewRef);
|
|
2383
2391
|
}
|
|
2384
|
-
_attachBackdrop(
|
|
2385
|
-
const
|
|
2386
|
-
|
|
2392
|
+
_attachBackdrop(containerEl) {
|
|
2393
|
+
const backdropCmptRef = createComponent(LuxModalBackdropComponent, {
|
|
2394
|
+
environmentInjector: this._environmentInjector,
|
|
2395
|
+
elementInjector: this._injector
|
|
2396
|
+
});
|
|
2387
2397
|
this._applicationRef.attachView(backdropCmptRef.hostView);
|
|
2388
2398
|
containerEl.appendChild(backdropCmptRef.location.nativeElement);
|
|
2389
2399
|
return backdropCmptRef;
|
|
2390
2400
|
}
|
|
2391
|
-
_attachWindowComponent(
|
|
2392
|
-
const
|
|
2393
|
-
|
|
2401
|
+
_attachWindowComponent(containerEl, contentRef) {
|
|
2402
|
+
const windowCmptRef = createComponent(LuxModalWindowComponent, {
|
|
2403
|
+
environmentInjector: this._environmentInjector,
|
|
2404
|
+
elementInjector: this._injector,
|
|
2405
|
+
projectableNodes: contentRef.nodes
|
|
2406
|
+
});
|
|
2394
2407
|
this._applicationRef.attachView(windowCmptRef.hostView);
|
|
2395
2408
|
containerEl.appendChild(windowCmptRef.location.nativeElement);
|
|
2396
2409
|
return windowCmptRef;
|
|
@@ -2421,17 +2434,17 @@ class ModalStack {
|
|
|
2421
2434
|
if (parent && element !== this._document.body) {
|
|
2422
2435
|
Array.from(parent.children).forEach((sibling) => {
|
|
2423
2436
|
if (sibling !== element && sibling.nodeName !== 'SCRIPT') {
|
|
2424
|
-
this._ariaHiddenValues.set(sibling, sibling.getAttribute('aria-hidden'));
|
|
2437
|
+
this._ariaHiddenValues.set(sibling, sibling.getAttribute('aria-hidden') ?? '');
|
|
2425
2438
|
sibling.setAttribute('aria-hidden', 'true');
|
|
2426
2439
|
}
|
|
2427
2440
|
});
|
|
2428
2441
|
this._setAriaHidden(parent);
|
|
2429
2442
|
}
|
|
2430
2443
|
}
|
|
2431
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2432
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2444
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ModalStack, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2445
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ModalStack, providedIn: 'root' });
|
|
2433
2446
|
}
|
|
2434
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2447
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ModalStack, decorators: [{
|
|
2435
2448
|
type: Injectable,
|
|
2436
2449
|
args: [{ providedIn: 'root' }]
|
|
2437
2450
|
}], ctorParameters: () => [] });
|
|
@@ -2441,17 +2454,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2441
2454
|
*/
|
|
2442
2455
|
class ModalService {
|
|
2443
2456
|
modalStack = inject(ModalStack);
|
|
2444
|
-
moduleCFR = inject(ComponentFactoryResolver);
|
|
2445
2457
|
/**Open a modal component
|
|
2446
2458
|
* @param content TemplateRef
|
|
2447
2459
|
*/
|
|
2448
2460
|
open(content, options = {}) {
|
|
2449
|
-
return this.modalStack.open(
|
|
2461
|
+
return this.modalStack.open(content, options);
|
|
2450
2462
|
}
|
|
2451
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2452
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2464
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ModalService, providedIn: 'root' });
|
|
2453
2465
|
}
|
|
2454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ModalService, decorators: [{
|
|
2455
2467
|
type: Injectable,
|
|
2456
2468
|
args: [{ providedIn: 'root' }]
|
|
2457
2469
|
}] });
|
|
@@ -2494,9 +2506,7 @@ class GeolocationService {
|
|
|
2494
2506
|
return this.currentQuery$;
|
|
2495
2507
|
}
|
|
2496
2508
|
getLabels(instance, keys) {
|
|
2497
|
-
const searchResults = instance.lastQueriesWithResults
|
|
2498
|
-
.get(instance.getLatestQuery())
|
|
2499
|
-
.filter((searchResult) => samePosition(searchResult, keys));
|
|
2509
|
+
const searchResults = (instance.lastQueriesWithResults.get(instance.getLatestQuery() ?? '') ?? []).filter((searchResult) => samePosition(searchResult, keys));
|
|
2500
2510
|
return of(searchResults.map((searchResult) => {
|
|
2501
2511
|
const key = {
|
|
2502
2512
|
type: 'Point',
|
|
@@ -2544,10 +2554,10 @@ class GeolocationService {
|
|
|
2544
2554
|
? this.lastQueriesLru[this.lastQueriesLru.length - 1]
|
|
2545
2555
|
: null;
|
|
2546
2556
|
}
|
|
2547
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2548
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2557
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GeolocationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2558
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GeolocationService, providedIn: 'root' });
|
|
2549
2559
|
}
|
|
2550
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GeolocationService, decorators: [{
|
|
2551
2561
|
type: Injectable,
|
|
2552
2562
|
args: [{ providedIn: 'root' }]
|
|
2553
2563
|
}], ctorParameters: () => [] });
|
|
@@ -2582,8 +2592,8 @@ class GeolocationComponent {
|
|
|
2582
2592
|
touched = false;
|
|
2583
2593
|
dirty = false;
|
|
2584
2594
|
lastErrors = null;
|
|
2585
|
-
_disabled;
|
|
2586
|
-
_required;
|
|
2595
|
+
_disabled = false;
|
|
2596
|
+
_required = false;
|
|
2587
2597
|
_value;
|
|
2588
2598
|
latitudeValue = undefined;
|
|
2589
2599
|
longitudeValue = undefined;
|
|
@@ -2677,9 +2687,9 @@ class GeolocationComponent {
|
|
|
2677
2687
|
this.setLongitudeInControl(v.coordinates[0]);
|
|
2678
2688
|
}
|
|
2679
2689
|
else if (!v) {
|
|
2680
|
-
this._value =
|
|
2681
|
-
this.setLatitudeInControl(
|
|
2682
|
-
this.setLongitudeInControl(
|
|
2690
|
+
this._value = undefined;
|
|
2691
|
+
this.setLatitudeInControl(undefined);
|
|
2692
|
+
this.setLongitudeInControl(undefined);
|
|
2683
2693
|
}
|
|
2684
2694
|
else {
|
|
2685
2695
|
this._value = v;
|
|
@@ -2727,9 +2737,9 @@ class GeolocationComponent {
|
|
|
2727
2737
|
this.longitudeValue = longitude;
|
|
2728
2738
|
}
|
|
2729
2739
|
clear() {
|
|
2730
|
-
this.setLatitudeInControl(
|
|
2731
|
-
this.setLongitudeInControl(
|
|
2732
|
-
this.value =
|
|
2740
|
+
this.setLatitudeInControl(undefined);
|
|
2741
|
+
this.setLongitudeInControl(undefined);
|
|
2742
|
+
this.value = undefined;
|
|
2733
2743
|
}
|
|
2734
2744
|
isClearable() {
|
|
2735
2745
|
return (isValidNumber(this.latitudeValue) || isValidNumber(this.longitudeValue));
|
|
@@ -2776,7 +2786,8 @@ class GeolocationComponent {
|
|
|
2776
2786
|
reason: `Latitude is higher than maximum value: ${this.maxLatitude}.`
|
|
2777
2787
|
};
|
|
2778
2788
|
}
|
|
2779
|
-
if (exists(this.minLongitude) &&
|
|
2789
|
+
if (exists(this.minLongitude) &&
|
|
2790
|
+
this.longitudeValue < this.minLongitude) {
|
|
2780
2791
|
result = result || {};
|
|
2781
2792
|
result.minLongitude = {
|
|
2782
2793
|
value,
|
|
@@ -2784,7 +2795,8 @@ class GeolocationComponent {
|
|
|
2784
2795
|
reason: `Longitude is lower than minimum value: ${this.minLongitude}.`
|
|
2785
2796
|
};
|
|
2786
2797
|
}
|
|
2787
|
-
if (exists(this.maxLongitude) &&
|
|
2798
|
+
if (exists(this.maxLongitude) &&
|
|
2799
|
+
this.longitudeValue > this.maxLongitude) {
|
|
2788
2800
|
result = result || {};
|
|
2789
2801
|
result.maxLongitude = {
|
|
2790
2802
|
value,
|
|
@@ -2803,13 +2815,15 @@ class GeolocationComponent {
|
|
|
2803
2815
|
this.setPatterns();
|
|
2804
2816
|
}
|
|
2805
2817
|
roundToStepAndUpdateLatitudeAndLongitude(newLatitudeAndLongitude) {
|
|
2806
|
-
const newLatitude = roundToMultipleOf(newLatitudeAndLongitude[1], this.step
|
|
2807
|
-
|
|
2818
|
+
const newLatitude = roundToMultipleOf(newLatitudeAndLongitude[1], this.step ?? 1 // review value 1??
|
|
2819
|
+
);
|
|
2820
|
+
const newLongitude = roundToMultipleOf(newLatitudeAndLongitude[0], this.step ?? 1 // review value 1??
|
|
2821
|
+
);
|
|
2808
2822
|
if (this.disabled || this.readonly) {
|
|
2809
2823
|
return;
|
|
2810
2824
|
}
|
|
2811
2825
|
if (!exists(newLatitudeAndLongitude)) {
|
|
2812
|
-
this.value =
|
|
2826
|
+
this.value = undefined;
|
|
2813
2827
|
}
|
|
2814
2828
|
this.value = {
|
|
2815
2829
|
type: 'Point',
|
|
@@ -2824,16 +2838,16 @@ class GeolocationComponent {
|
|
|
2824
2838
|
return;
|
|
2825
2839
|
}
|
|
2826
2840
|
const newLatitudeValue = isValidNumber(newLatitude) ? +newLatitude : null;
|
|
2827
|
-
if (!(exists(this.value) && exists(this.value
|
|
2841
|
+
if (!(exists(this.value) && exists(this.value?.coordinates[0])) &&
|
|
2828
2842
|
!exists(newLatitudeValue)) {
|
|
2829
|
-
this.value =
|
|
2843
|
+
this.value = undefined;
|
|
2830
2844
|
}
|
|
2831
2845
|
else {
|
|
2832
2846
|
this.value = {
|
|
2833
2847
|
type: 'Point',
|
|
2834
2848
|
coordinates: [
|
|
2835
|
-
this.value ? this.value
|
|
2836
|
-
newLatitudeValue
|
|
2849
|
+
this.value ? this.value?.coordinates[0] : 0,
|
|
2850
|
+
newLatitudeValue ?? 0
|
|
2837
2851
|
]
|
|
2838
2852
|
};
|
|
2839
2853
|
}
|
|
@@ -2848,14 +2862,14 @@ class GeolocationComponent {
|
|
|
2848
2862
|
: null;
|
|
2849
2863
|
if (!exists(newLongitudeValue) &&
|
|
2850
2864
|
!(exists(this.value) && exists(this._value.coordinates[1]))) {
|
|
2851
|
-
this.value =
|
|
2865
|
+
this.value = undefined;
|
|
2852
2866
|
}
|
|
2853
2867
|
else {
|
|
2854
2868
|
this.value = {
|
|
2855
2869
|
type: 'Point',
|
|
2856
2870
|
coordinates: [
|
|
2857
|
-
newLongitudeValue,
|
|
2858
|
-
this.value ? this.value.coordinates[1] :
|
|
2871
|
+
newLongitudeValue ?? 0,
|
|
2872
|
+
this.value ? this.value.coordinates[1] : 0
|
|
2859
2873
|
]
|
|
2860
2874
|
};
|
|
2861
2875
|
}
|
|
@@ -2885,9 +2899,10 @@ class GeolocationComponent {
|
|
|
2885
2899
|
map.center = map.markerPoint;
|
|
2886
2900
|
}
|
|
2887
2901
|
get mapTitle() {
|
|
2902
|
+
const i18n = this.i18n[this.lang];
|
|
2888
2903
|
return this._disabled || !!this.readonly
|
|
2889
|
-
?
|
|
2890
|
-
:
|
|
2904
|
+
? i18n.location
|
|
2905
|
+
: i18n.selectLocation;
|
|
2891
2906
|
}
|
|
2892
2907
|
get self() {
|
|
2893
2908
|
return this;
|
|
@@ -2906,8 +2921,8 @@ class GeolocationComponent {
|
|
|
2906
2921
|
this.minLongitude = this.minLongitude || -180;
|
|
2907
2922
|
this.maxLongitude = this.maxLongitude || +180;
|
|
2908
2923
|
}
|
|
2909
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2910
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2924
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GeolocationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2925
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: GeolocationComponent, isStandalone: true, selector: "lux-geolocation", inputs: { minLatitude: "minLatitude", maxLatitude: "maxLatitude", minLongitude: "minLongitude", maxLongitude: "maxLongitude", step: "step", zoom: "zoom", lang: "lang", inlineErrors: "inlineErrors", inputId: "inputId", ariaLabel: ["aria-label", "ariaLabel"], readonly: "readonly", disabled: "disabled", required: "required", value: "value" }, outputs: { valueChange: "valueChange", keyPress: "keyPress" }, providers: [
|
|
2911
2926
|
{
|
|
2912
2927
|
provide: NG_VALUE_ACCESSOR,
|
|
2913
2928
|
multi: true,
|
|
@@ -2918,9 +2933,9 @@ class GeolocationComponent {
|
|
|
2918
2933
|
multi: true,
|
|
2919
2934
|
useExisting: forwardRef(() => GeolocationComponent)
|
|
2920
2935
|
}
|
|
2921
|
-
], viewQueries: [{ propertyName: "latitude", first: true, predicate: ["latitude"], descendants: true, static: true }, { propertyName: "longitude", first: true, predicate: ["longitude"], descendants: true, static: true }, { propertyName: "map", first: true, predicate: ["map"], descendants: true }], ngImport: i0, template: "<input\r\n #latitude\r\n class=\"rounded-left prefix\"\r\n [ngClass]=\"className\"\r\n type=\"number\"\r\n [id]=\"inputId + '$latitude'\"\r\n [(ngModel)]=\"latitudeValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [attr.min]=\"\r\n minLatitude !== undefined && minLatitude !== null\r\n ? minLatitude.toString()\r\n : undefined\r\n \"\r\n [attr.max]=\"\r\n maxLatitude !== undefined && maxLatitude !== null\r\n ? maxLatitude.toString()\r\n : undefined\r\n \"\r\n [attr.step]=\"\r\n step !== undefined && step !== null ? step.toString() : undefined\r\n \"\r\n [placeholder]=\"i18n[lang].lat\"\r\n (keyup)=\"onEventLatitude(latitude.value)\"\r\n (change)=\"onEventLatitude(latitude.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n<div\r\n class=\"infix symbol monospace clickable\"\r\n [ngClass]=\"className\"\r\n (click)=\"openModalMap(modalMap)\"\r\n>\r\n @if (isValidNumber(latitudeValue) && latitudeValue >= 0) {\r\n <span>{{ i18n[lang].cardinalPoints.north }}</span>\r\n } @if (isValidNumber(latitudeValue) && latitudeValue < 0) {\r\n <span>{{ i18n[lang].cardinalPoints.south }}</span>\r\n } @if (!isValidNumber(latitudeValue)) {\r\n <span>-</span>\r\n }\r\n</div>\r\n<input\r\n #longitude\r\n class=\"prefix\"\r\n [ngClass]=\"className\"\r\n type=\"number\"\r\n [id]=\"inputId + '$longitude'\"\r\n [(ngModel)]=\"longitudeValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [attr.min]=\"\r\n minLongitude !== undefined && minLongitude !== null\r\n ? minLongitude.toString()\r\n : undefined\r\n \"\r\n [attr.max]=\"\r\n maxLongitude !== undefined && maxLongitude !== null\r\n ? maxLongitude.toString()\r\n : undefined\r\n \"\r\n [attr.step]=\"\r\n step !== undefined && step !== null ? step.toString() : undefined\r\n \"\r\n [placeholder]=\"i18n[lang].lon\"\r\n (keyup)=\"onEventLongitude(longitude.value)\"\r\n (change)=\"onEventLongitude(longitude.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n<div\r\n class=\"infix symbol monospace clickable\"\r\n [ngClass]=\"className\"\r\n (click)=\"openModalMap(modalMap)\"\r\n>\r\n @if (isValidNumber(longitudeValue) && longitudeValue >= 0) {\r\n <span>{{ i18n[lang].cardinalPoints.east }}</span>\r\n } @if (isValidNumber(longitudeValue) && longitudeValue < 0) {\r\n <span>{{ i18n[lang].cardinalPoints.west }}</span>\r\n } @if (!isValidNumber(longitudeValue)) {\r\n <span>-</span>\r\n }\r\n</div>\r\n<div\r\n [class]=\"\r\n disabled || readonly || !isClearable()\r\n ? 'clickable rounded-right postfix symbol'\r\n : 'clickable postfix symbol'\r\n \"\r\n [ngClass]=\"className\"\r\n (click)=\"openModalMap(modalMap)\"\r\n>\r\n <span class=\"icon-globe\"></span>\r\n</div>\r\n@if (!disabled && !readonly && isClearable()) {\r\n<button\r\n #clearButton\r\n class=\"rounded-right postfix bordered icon icon-clear\"\r\n [id]=\"inputId + '$clear'\"\r\n type=\"button\"\r\n (click)=\"clear()\"\r\n aria-label=\"clear\"\r\n></button>\r\n} @if (inlineErrors && lastErrors && (dirty || touched)) {\r\n<div class=\"alert\">\r\n @if (lastErrors.required) {\r\n <div>\r\n {{ i18n[lang].userErrors.required }}\r\n </div>\r\n } @if (lastErrors.minLatitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.minLatitude.replace(\r\n '$minLatitude',\r\n lastErrors.minLatitude.min\r\n )\r\n }}\r\n </div>\r\n } @if (lastErrors.maxLatitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.maxLatitude.replace(\r\n '$maxLatitude',\r\n lastErrors.maxLatitude.max\r\n )\r\n }}\r\n </div>\r\n } @if (lastErrors.minLongitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.minLongitude.replace(\r\n '$minLongitude',\r\n lastErrors.minLongitude.min\r\n )\r\n }}\r\n </div>\r\n } @if (lastErrors.maxLongitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.maxLongitude.replace(\r\n '$maxLongitude',\r\n lastErrors.maxLongitude.max\r\n )\r\n }}\r\n </div>\r\n }\r\n</div>\r\n}\r\n\r\n<ng-template #modalMap let-modal>\r\n <div class=\"lux-modal-header\">\r\n <h4 class=\"modal-title default-font\" id=\"modal-basic-title\">\r\n {{ mapTitle }}\r\n </h4>\r\n <button\r\n type=\"button\"\r\n class=\"close\"\r\n aria-label=\"Close\"\r\n (click)=\"modal.dismiss('Cross click')\"\r\n >\r\n <span aria-hidden=\"true\">\u00D7</span>\r\n </button>\r\n </div>\r\n <div class=\"lux-modal-body content\">\r\n @if (!disabled && !readonly) {\r\n <lux-autocomplete\r\n #searchBar\r\n [attr.aria-label]=\"i18n[lang].typeToSearch\"\r\n [placeholder]=\"i18n[lang].typeToSearch\"\r\n [instance]=\"self\"\r\n [resolveLabelsFunction]=\"getLabels\"\r\n [populateFunction]=\"getData\"\r\n (valueChange)=\"onSearchLocationChanged(searchBar.value, map)\"\r\n ></lux-autocomplete>\r\n }\r\n <div class=\"map-container\">\r\n <lux-map\r\n #map\r\n [center]=\"value\"\r\n [markerPoint]=\"value\"\r\n [zoom]=\"zoom\"\r\n [readonly]=\"readonly === true || disabled === true ? true : false\"\r\n ></lux-map>\r\n </div>\r\n </div>\r\n <div class=\"lux-modal-footer\">\r\n @if (disabled || readonly) {\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-cancel\"\r\n (click)=\"modal.close('cancel')\"\r\n >\r\n {{ i18n[lang].closeAction }}\r\n </button>\r\n } @if (!disabled && !readonly) {\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-cancel\"\r\n (click)=\"modal.close('cancel')\"\r\n >\r\n {{ i18n[lang].cancelAction }}\r\n </button>\r\n } @if (!disabled && !readonly) {\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-select\"\r\n (click)=\"modal.close(map.markerPoint.coordinates)\"\r\n >\r\n {{ i18n[lang].selectAction }}\r\n </button>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}:host{display:flex;align-items:stretch}.btn-select{color:#fff;background-color:#4242d1;margin-left:2rem}.btn-cancel{color:#fff;background-color:#c22929}.readonly{border:none}.readonly:focus{border:none;outline:none}.disabled{background-color:var(--lux-disabled-color, #f1f1f1);border-color:var(--lux-disabled-border-color, #6d6d6d)}.icon,.icon-clear,.icon-globe{display:inline-block;background-size:1rem 1rem;background-position:center;background-repeat:no-repeat;min-width:1rem;min-height:1rem;width:var(--lux-autocomplete-icon-width, 1.5rem);z-index:1}.clickable{cursor:pointer}.icon-globe{background:var(--lux-autocomplete-icon-globe, url(/assets/img/globe.svg) no-repeat center);background-size:1rem;height:100%}.icon-clear{width:var(--lux-autocomplete-icon-width, 1.5rem);background:var(--lux-autocomplete-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-autocomplete-icon-bg-size, .5rem .5rem);z-index:1}.lux-modal-body{padding:0}.map-container{height:var(--lux-geolocation-map-height, 45vh);width:var(--lux-geolocation-map-width, 90vw);max-width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: AutocompleteComponent, selector: "lux-autocomplete", inputs: ["inputId", "disabled", "readonly", "label", "canAddNewValues", "keepOpenAfterDelete", "appendTo", "value", "dataSource", "required", "placeholder", "resolveLabelsFunction", "populateFunction", "instance"], outputs: ["valueChange", "dataSourceChange"] }, { kind: "component", type: MapComponent, selector: "lux-map", inputs: ["mapId", "zoom", "center", "readonly", "markerCoordinates", "markerPoint"], outputs: ["valueChange"] }] });
|
|
2936
|
+
], viewQueries: [{ propertyName: "latitude", first: true, predicate: ["latitude"], descendants: true, static: true }, { propertyName: "longitude", first: true, predicate: ["longitude"], descendants: true, static: true }, { propertyName: "map", first: true, predicate: ["map"], descendants: true }], ngImport: i0, template: "<input\r\n #latitude\r\n class=\"rounded-left prefix\"\r\n [ngClass]=\"className\"\r\n type=\"number\"\r\n [id]=\"inputId + '$latitude'\"\r\n [(ngModel)]=\"latitudeValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [attr.min]=\"\r\n minLatitude !== undefined && minLatitude !== null\r\n ? minLatitude.toString()\r\n : undefined\r\n \"\r\n [attr.max]=\"\r\n maxLatitude !== undefined && maxLatitude !== null\r\n ? maxLatitude.toString()\r\n : undefined\r\n \"\r\n [attr.step]=\"\r\n step !== undefined && step !== null ? step.toString() : undefined\r\n \"\r\n [placeholder]=\"i18n[lang].lat\"\r\n (keyup)=\"onEventLatitude(latitude.value)\"\r\n (change)=\"onEventLatitude(latitude.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n<div\r\n class=\"infix symbol monospace clickable\"\r\n [ngClass]=\"className\"\r\n (click)=\"openModalMap(modalMap)\"\r\n>\r\n @if (isValidNumber(latitudeValue) && latitudeValue! >= 0) {\r\n <span>{{ i18n[lang].cardinalPoints.north }}</span>\r\n }\r\n @if (isValidNumber(latitudeValue) && latitudeValue! < 0) {\r\n <span>{{ i18n[lang].cardinalPoints.south }}</span>\r\n }\r\n @if (!isValidNumber(latitudeValue)) {\r\n <span>-</span>\r\n }\r\n</div>\r\n<input\r\n #longitude\r\n class=\"prefix\"\r\n [ngClass]=\"className\"\r\n type=\"number\"\r\n [id]=\"inputId + '$longitude'\"\r\n [(ngModel)]=\"longitudeValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [attr.min]=\"\r\n minLongitude !== undefined && minLongitude !== null\r\n ? minLongitude.toString()\r\n : undefined\r\n \"\r\n [attr.max]=\"\r\n maxLongitude !== undefined && maxLongitude !== null\r\n ? maxLongitude.toString()\r\n : undefined\r\n \"\r\n [attr.step]=\"\r\n step !== undefined && step !== null ? step.toString() : undefined\r\n \"\r\n [placeholder]=\"i18n[lang].lon\"\r\n (keyup)=\"onEventLongitude(longitude.value)\"\r\n (change)=\"onEventLongitude(longitude.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n<div\r\n class=\"infix symbol monospace clickable\"\r\n [ngClass]=\"className\"\r\n (click)=\"openModalMap(modalMap)\"\r\n>\r\n @if (isValidNumber(longitudeValue) && longitudeValue! >= 0) {\r\n <span>{{ i18n[lang].cardinalPoints.east }}</span>\r\n }\r\n @if (isValidNumber(longitudeValue) && longitudeValue! < 0) {\r\n <span>{{ i18n[lang].cardinalPoints.west }}</span>\r\n }\r\n @if (!isValidNumber(longitudeValue)) {\r\n <span>-</span>\r\n }\r\n</div>\r\n<div\r\n [class]=\"\r\n disabled || readonly || !isClearable()\r\n ? 'clickable rounded-right postfix symbol'\r\n : 'clickable postfix symbol'\r\n \"\r\n [ngClass]=\"className\"\r\n (click)=\"openModalMap(modalMap)\"\r\n>\r\n <span class=\"icon-globe\"></span>\r\n</div>\r\n@if (!disabled && !readonly && isClearable()) {\r\n <button\r\n #clearButton\r\n class=\"rounded-right postfix bordered icon icon-clear\"\r\n [id]=\"inputId + '$clear'\"\r\n type=\"button\"\r\n (click)=\"clear()\"\r\n aria-label=\"clear\"\r\n ></button>\r\n}\r\n@if (inlineErrors && lastErrors && (dirty || touched)) {\r\n <div class=\"alert\">\r\n @if (lastErrors.required) {\r\n <div>\r\n {{ i18n[lang].userErrors.required }}\r\n </div>\r\n }\r\n @if (lastErrors.minLatitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.minLatitude.replace(\r\n '$minLatitude',\r\n lastErrors.minLatitude.min\r\n )\r\n }}\r\n </div>\r\n }\r\n @if (lastErrors.maxLatitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.maxLatitude.replace(\r\n '$maxLatitude',\r\n lastErrors.maxLatitude.max\r\n )\r\n }}\r\n </div>\r\n }\r\n @if (lastErrors.minLongitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.minLongitude.replace(\r\n '$minLongitude',\r\n lastErrors.minLongitude.min\r\n )\r\n }}\r\n </div>\r\n }\r\n @if (lastErrors.maxLongitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.maxLongitude.replace(\r\n '$maxLongitude',\r\n lastErrors.maxLongitude.max\r\n )\r\n }}\r\n </div>\r\n }\r\n </div>\r\n}\r\n\r\n<ng-template #modalMap let-modal>\r\n <div class=\"lux-modal-header\">\r\n <h4 class=\"modal-title default-font\" id=\"modal-basic-title\">\r\n {{ mapTitle }}\r\n </h4>\r\n <button\r\n type=\"button\"\r\n class=\"close\"\r\n aria-label=\"Close\"\r\n (click)=\"modal.dismiss('Cross click')\"\r\n >\r\n <span aria-hidden=\"true\">\u00D7</span>\r\n </button>\r\n </div>\r\n <div class=\"lux-modal-body content\">\r\n @if (!disabled && !readonly) {\r\n <lux-autocomplete\r\n #searchBar\r\n [attr.aria-label]=\"i18n[lang].typeToSearch\"\r\n [placeholder]=\"i18n[lang].typeToSearch\"\r\n [instance]=\"self\"\r\n [resolveLabelsFunction]=\"getLabels\"\r\n [populateFunction]=\"getData\"\r\n (valueChange)=\"onSearchLocationChanged(searchBar.value, map)\"\r\n ></lux-autocomplete>\r\n }\r\n <div class=\"map-container\">\r\n <lux-map\r\n #map\r\n [center]=\"value\"\r\n [markerPoint]=\"value\"\r\n [zoom]=\"zoom\"\r\n [readonly]=\"readonly === true || disabled === true ? true : false\"\r\n ></lux-map>\r\n </div>\r\n </div>\r\n <div class=\"lux-modal-footer\">\r\n @if (disabled || readonly) {\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-cancel\"\r\n (click)=\"modal.close('cancel')\"\r\n >\r\n {{ i18n[lang].closeAction }}\r\n </button>\r\n }\r\n @if (!disabled && !readonly) {\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-cancel\"\r\n (click)=\"modal.close('cancel')\"\r\n >\r\n {{ i18n[lang].cancelAction }}\r\n </button>\r\n }\r\n @if (!disabled && !readonly) {\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-select\"\r\n (click)=\"modal.close(map.markerPoint.coordinates)\"\r\n >\r\n {{ i18n[lang].selectAction }}\r\n </button>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}:host{display:flex;align-items:stretch}.btn-select{color:#fff;background-color:#4242d1;margin-left:2rem}.btn-cancel{color:#fff;background-color:#c22929}.readonly{border:none}.readonly:focus{border:none;outline:none}.disabled{background-color:var(--lux-disabled-color, #f1f1f1);border-color:var(--lux-disabled-border-color, #6d6d6d)}.icon,.icon-clear,.icon-globe{display:inline-block;background-size:1rem 1rem;background-position:center;background-repeat:no-repeat;min-width:1rem;min-height:1rem;width:var(--lux-autocomplete-icon-width, 1.5rem);z-index:1}.clickable{cursor:pointer}.icon-globe{background:var(--lux-autocomplete-icon-globe, url(/assets/img/globe.svg) no-repeat center);background-size:1rem;height:100%}.icon-clear{width:var(--lux-autocomplete-icon-width, 1.5rem);background:var(--lux-autocomplete-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-autocomplete-icon-bg-size, .5rem .5rem);z-index:1}.lux-modal-body{padding:0}.map-container{height:var(--lux-geolocation-map-height, 45vh);width:var(--lux-geolocation-map-width, 90vw);max-width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: AutocompleteComponent, selector: "lux-autocomplete", inputs: ["inputId", "disabled", "readonly", "label", "canAddNewValues", "keepOpenAfterDelete", "appendTo", "value", "dataSource", "required", "placeholder", "resolveLabelsFunction", "populateFunction", "instance"], outputs: ["valueChange", "dataSourceChange"] }, { kind: "component", type: MapComponent, selector: "lux-map", inputs: ["mapId", "zoom", "center", "readonly", "markerCoordinates", "markerPoint"], outputs: ["valueChange"] }] });
|
|
2922
2937
|
}
|
|
2923
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2938
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GeolocationComponent, decorators: [{
|
|
2924
2939
|
type: Component,
|
|
2925
2940
|
args: [{ selector: 'lux-geolocation', imports: [
|
|
2926
2941
|
CommonModule,
|
|
@@ -2939,7 +2954,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
2939
2954
|
multi: true,
|
|
2940
2955
|
useExisting: forwardRef(() => GeolocationComponent)
|
|
2941
2956
|
}
|
|
2942
|
-
], template: "<input\r\n #latitude\r\n class=\"rounded-left prefix\"\r\n [ngClass]=\"className\"\r\n type=\"number\"\r\n [id]=\"inputId + '$latitude'\"\r\n [(ngModel)]=\"latitudeValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [attr.min]=\"\r\n minLatitude !== undefined && minLatitude !== null\r\n ? minLatitude.toString()\r\n : undefined\r\n \"\r\n [attr.max]=\"\r\n maxLatitude !== undefined && maxLatitude !== null\r\n ? maxLatitude.toString()\r\n : undefined\r\n \"\r\n [attr.step]=\"\r\n step !== undefined && step !== null ? step.toString() : undefined\r\n \"\r\n [placeholder]=\"i18n[lang].lat\"\r\n (keyup)=\"onEventLatitude(latitude.value)\"\r\n (change)=\"onEventLatitude(latitude.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n<div\r\n class=\"infix symbol monospace clickable\"\r\n [ngClass]=\"className\"\r\n (click)=\"openModalMap(modalMap)\"\r\n>\r\n @if (isValidNumber(latitudeValue) && latitudeValue >= 0) {\r\n
|
|
2957
|
+
], template: "<input\r\n #latitude\r\n class=\"rounded-left prefix\"\r\n [ngClass]=\"className\"\r\n type=\"number\"\r\n [id]=\"inputId + '$latitude'\"\r\n [(ngModel)]=\"latitudeValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [attr.min]=\"\r\n minLatitude !== undefined && minLatitude !== null\r\n ? minLatitude.toString()\r\n : undefined\r\n \"\r\n [attr.max]=\"\r\n maxLatitude !== undefined && maxLatitude !== null\r\n ? maxLatitude.toString()\r\n : undefined\r\n \"\r\n [attr.step]=\"\r\n step !== undefined && step !== null ? step.toString() : undefined\r\n \"\r\n [placeholder]=\"i18n[lang].lat\"\r\n (keyup)=\"onEventLatitude(latitude.value)\"\r\n (change)=\"onEventLatitude(latitude.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n<div\r\n class=\"infix symbol monospace clickable\"\r\n [ngClass]=\"className\"\r\n (click)=\"openModalMap(modalMap)\"\r\n>\r\n @if (isValidNumber(latitudeValue) && latitudeValue! >= 0) {\r\n <span>{{ i18n[lang].cardinalPoints.north }}</span>\r\n }\r\n @if (isValidNumber(latitudeValue) && latitudeValue! < 0) {\r\n <span>{{ i18n[lang].cardinalPoints.south }}</span>\r\n }\r\n @if (!isValidNumber(latitudeValue)) {\r\n <span>-</span>\r\n }\r\n</div>\r\n<input\r\n #longitude\r\n class=\"prefix\"\r\n [ngClass]=\"className\"\r\n type=\"number\"\r\n [id]=\"inputId + '$longitude'\"\r\n [(ngModel)]=\"longitudeValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [attr.min]=\"\r\n minLongitude !== undefined && minLongitude !== null\r\n ? minLongitude.toString()\r\n : undefined\r\n \"\r\n [attr.max]=\"\r\n maxLongitude !== undefined && maxLongitude !== null\r\n ? maxLongitude.toString()\r\n : undefined\r\n \"\r\n [attr.step]=\"\r\n step !== undefined && step !== null ? step.toString() : undefined\r\n \"\r\n [placeholder]=\"i18n[lang].lon\"\r\n (keyup)=\"onEventLongitude(longitude.value)\"\r\n (change)=\"onEventLongitude(longitude.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n<div\r\n class=\"infix symbol monospace clickable\"\r\n [ngClass]=\"className\"\r\n (click)=\"openModalMap(modalMap)\"\r\n>\r\n @if (isValidNumber(longitudeValue) && longitudeValue! >= 0) {\r\n <span>{{ i18n[lang].cardinalPoints.east }}</span>\r\n }\r\n @if (isValidNumber(longitudeValue) && longitudeValue! < 0) {\r\n <span>{{ i18n[lang].cardinalPoints.west }}</span>\r\n }\r\n @if (!isValidNumber(longitudeValue)) {\r\n <span>-</span>\r\n }\r\n</div>\r\n<div\r\n [class]=\"\r\n disabled || readonly || !isClearable()\r\n ? 'clickable rounded-right postfix symbol'\r\n : 'clickable postfix symbol'\r\n \"\r\n [ngClass]=\"className\"\r\n (click)=\"openModalMap(modalMap)\"\r\n>\r\n <span class=\"icon-globe\"></span>\r\n</div>\r\n@if (!disabled && !readonly && isClearable()) {\r\n <button\r\n #clearButton\r\n class=\"rounded-right postfix bordered icon icon-clear\"\r\n [id]=\"inputId + '$clear'\"\r\n type=\"button\"\r\n (click)=\"clear()\"\r\n aria-label=\"clear\"\r\n ></button>\r\n}\r\n@if (inlineErrors && lastErrors && (dirty || touched)) {\r\n <div class=\"alert\">\r\n @if (lastErrors.required) {\r\n <div>\r\n {{ i18n[lang].userErrors.required }}\r\n </div>\r\n }\r\n @if (lastErrors.minLatitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.minLatitude.replace(\r\n '$minLatitude',\r\n lastErrors.minLatitude.min\r\n )\r\n }}\r\n </div>\r\n }\r\n @if (lastErrors.maxLatitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.maxLatitude.replace(\r\n '$maxLatitude',\r\n lastErrors.maxLatitude.max\r\n )\r\n }}\r\n </div>\r\n }\r\n @if (lastErrors.minLongitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.minLongitude.replace(\r\n '$minLongitude',\r\n lastErrors.minLongitude.min\r\n )\r\n }}\r\n </div>\r\n }\r\n @if (lastErrors.maxLongitude) {\r\n <div>\r\n {{\r\n i18n[lang].userErrors.maxLongitude.replace(\r\n '$maxLongitude',\r\n lastErrors.maxLongitude.max\r\n )\r\n }}\r\n </div>\r\n }\r\n </div>\r\n}\r\n\r\n<ng-template #modalMap let-modal>\r\n <div class=\"lux-modal-header\">\r\n <h4 class=\"modal-title default-font\" id=\"modal-basic-title\">\r\n {{ mapTitle }}\r\n </h4>\r\n <button\r\n type=\"button\"\r\n class=\"close\"\r\n aria-label=\"Close\"\r\n (click)=\"modal.dismiss('Cross click')\"\r\n >\r\n <span aria-hidden=\"true\">\u00D7</span>\r\n </button>\r\n </div>\r\n <div class=\"lux-modal-body content\">\r\n @if (!disabled && !readonly) {\r\n <lux-autocomplete\r\n #searchBar\r\n [attr.aria-label]=\"i18n[lang].typeToSearch\"\r\n [placeholder]=\"i18n[lang].typeToSearch\"\r\n [instance]=\"self\"\r\n [resolveLabelsFunction]=\"getLabels\"\r\n [populateFunction]=\"getData\"\r\n (valueChange)=\"onSearchLocationChanged(searchBar.value, map)\"\r\n ></lux-autocomplete>\r\n }\r\n <div class=\"map-container\">\r\n <lux-map\r\n #map\r\n [center]=\"value\"\r\n [markerPoint]=\"value\"\r\n [zoom]=\"zoom\"\r\n [readonly]=\"readonly === true || disabled === true ? true : false\"\r\n ></lux-map>\r\n </div>\r\n </div>\r\n <div class=\"lux-modal-footer\">\r\n @if (disabled || readonly) {\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-cancel\"\r\n (click)=\"modal.close('cancel')\"\r\n >\r\n {{ i18n[lang].closeAction }}\r\n </button>\r\n }\r\n @if (!disabled && !readonly) {\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-cancel\"\r\n (click)=\"modal.close('cancel')\"\r\n >\r\n {{ i18n[lang].cancelAction }}\r\n </button>\r\n }\r\n @if (!disabled && !readonly) {\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-select\"\r\n (click)=\"modal.close(map.markerPoint.coordinates)\"\r\n >\r\n {{ i18n[lang].selectAction }}\r\n </button>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}:host{display:flex;align-items:stretch}.btn-select{color:#fff;background-color:#4242d1;margin-left:2rem}.btn-cancel{color:#fff;background-color:#c22929}.readonly{border:none}.readonly:focus{border:none;outline:none}.disabled{background-color:var(--lux-disabled-color, #f1f1f1);border-color:var(--lux-disabled-border-color, #6d6d6d)}.icon,.icon-clear,.icon-globe{display:inline-block;background-size:1rem 1rem;background-position:center;background-repeat:no-repeat;min-width:1rem;min-height:1rem;width:var(--lux-autocomplete-icon-width, 1.5rem);z-index:1}.clickable{cursor:pointer}.icon-globe{background:var(--lux-autocomplete-icon-globe, url(/assets/img/globe.svg) no-repeat center);background-size:1rem;height:100%}.icon-clear{width:var(--lux-autocomplete-icon-width, 1.5rem);background:var(--lux-autocomplete-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-autocomplete-icon-bg-size, .5rem .5rem);z-index:1}.lux-modal-body{padding:0}.map-container{height:var(--lux-geolocation-map-height, 45vh);width:var(--lux-geolocation-map-width, 90vw);max-width:100%}\n"] }]
|
|
2943
2958
|
}], propDecorators: { latitude: [{
|
|
2944
2959
|
type: ViewChild,
|
|
2945
2960
|
args: ['latitude', { static: true }]
|
|
@@ -3024,7 +3039,7 @@ class RegexpService {
|
|
|
3024
3039
|
}
|
|
3025
3040
|
sliceRegexByOr(regularExpressionString) {
|
|
3026
3041
|
const result = [];
|
|
3027
|
-
let slicedRegex
|
|
3042
|
+
let slicedRegex;
|
|
3028
3043
|
let lastSliceIndex = 0;
|
|
3029
3044
|
let roundBracketCount = 0;
|
|
3030
3045
|
let squareBracketCount = 0;
|
|
@@ -3169,16 +3184,17 @@ class RegexpService {
|
|
|
3169
3184
|
// TODO: RETURN AN EMPTY STRING
|
|
3170
3185
|
return 'NO DEBERÍA SER POSIBLE';
|
|
3171
3186
|
}
|
|
3172
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3173
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3187
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: RegexpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3188
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: RegexpService, providedIn: 'root' });
|
|
3174
3189
|
}
|
|
3175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: RegexpService, decorators: [{
|
|
3176
3191
|
type: Injectable,
|
|
3177
3192
|
args: [{ providedIn: 'root' }]
|
|
3178
3193
|
}], ctorParameters: () => [] });
|
|
3179
3194
|
|
|
3180
3195
|
class InputComponent {
|
|
3181
3196
|
regexpService = inject(RegexpService);
|
|
3197
|
+
cdr = inject(ChangeDetectorRef);
|
|
3182
3198
|
static idCounter = 0;
|
|
3183
3199
|
input;
|
|
3184
3200
|
textarea;
|
|
@@ -3186,7 +3202,7 @@ class InputComponent {
|
|
|
3186
3202
|
touched = false;
|
|
3187
3203
|
dirty = false;
|
|
3188
3204
|
lastErrors = null;
|
|
3189
|
-
_disabled;
|
|
3205
|
+
_disabled = false;
|
|
3190
3206
|
_value = '';
|
|
3191
3207
|
_type;
|
|
3192
3208
|
_placeholder;
|
|
@@ -3232,6 +3248,7 @@ class InputComponent {
|
|
|
3232
3248
|
set disabled(v) {
|
|
3233
3249
|
v = typeof v === 'string' ? true : v;
|
|
3234
3250
|
this._disabled = v;
|
|
3251
|
+
this.cdr.markForCheck();
|
|
3235
3252
|
}
|
|
3236
3253
|
get disabled() {
|
|
3237
3254
|
return this._disabled;
|
|
@@ -3270,7 +3287,7 @@ class InputComponent {
|
|
|
3270
3287
|
this._required = v;
|
|
3271
3288
|
}
|
|
3272
3289
|
get required() {
|
|
3273
|
-
return this._required;
|
|
3290
|
+
return !!this._required;
|
|
3274
3291
|
}
|
|
3275
3292
|
set type(v) {
|
|
3276
3293
|
this._type = v.toLowerCase();
|
|
@@ -3557,8 +3574,8 @@ class InputComponent {
|
|
|
3557
3574
|
this.max = this.max || 1000.0;
|
|
3558
3575
|
this.placeholder = '0.00';
|
|
3559
3576
|
}
|
|
3560
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3561
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
3577
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3578
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: InputComponent, isStandalone: true, selector: "lux-input", inputs: { rows: "rows", cols: "cols", step: "step", min: "min", max: "max", lang: "lang", inlineErrors: "inlineErrors", inputId: "inputId", ariaLabel: ["aria-label", "ariaLabel"], readonly: "readonly", disabled: "disabled", pattern: "pattern", currency: "currency", placeholder: "placeholder", required: "required", type: "type", value: "value" }, outputs: { valueChange: "valueChange", keyPress: "keyPress" }, providers: [
|
|
3562
3579
|
{
|
|
3563
3580
|
provide: NG_VALUE_ACCESSOR,
|
|
3564
3581
|
multi: true,
|
|
@@ -3569,9 +3586,9 @@ class InputComponent {
|
|
|
3569
3586
|
multi: true,
|
|
3570
3587
|
useExisting: forwardRef(() => InputComponent)
|
|
3571
3588
|
}
|
|
3572
|
-
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "textarea", first: true, predicate: ["textarea"], descendants: true }, { propertyName: "colorpicker", first: true, predicate: ["colorpicker"], descendants: true }], ngImport: i0, template: "@if (currency && currency === 'USD') {\r\n<div class=\"prefix rounded-left symbol\" [ngClass]=\"className\">\r\n
|
|
3589
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "textarea", first: true, predicate: ["textarea"], descendants: true }, { propertyName: "colorpicker", first: true, predicate: ["colorpicker"], descendants: true }], ngImport: i0, template: "@if (currency && currency === 'USD') {\r\n <div class=\"prefix rounded-left symbol\" [ngClass]=\"className\">\r\n <span>$</span>\r\n </div>\r\n}\r\n@if (type !== 'textarea') {\r\n <input\r\n #input\r\n [class]=\"\r\n hasPrefix()\r\n ? hasPostfix()\r\n ? 'infix'\r\n : 'postfix rounded-right'\r\n : hasPostfix()\r\n ? 'prefix rounded-left'\r\n : 'rounded'\r\n \"\r\n [ngClass]=\"className\"\r\n placement=\"top\"\r\n [id]=\"inputId\"\r\n [type]=\"domain\"\r\n [attr.value]=\"value\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [disabled]=\"disabled === true\"\r\n [readonly]=\"readonly === true\"\r\n [attr.min]=\"min?.toString() || undefined\"\r\n [attr.max]=\"max?.toString() || undefined\"\r\n [attr.step]=\"step?.toString() || undefined\"\r\n [attr.pattern]=\"pattern || undefined\"\r\n [placeholder]=\"placeholder\"\r\n (keyup)=\"onKeyUp(input.value)\"\r\n (change)=\"onChangeValue(input.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n />\r\n}\r\n@if (type === 'textarea') {\r\n <textarea\r\n #textarea\r\n class=\"rounded\"\r\n [ngClass]=\"className\"\r\n placement=\"top\"\r\n [id]=\"inputId\"\r\n [attr.value]=\"value\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [disabled]=\"disabled === true\"\r\n [readonly]=\"readonly === true\"\r\n [attr.cols]=\"cols?.toString() || undefined\"\r\n [attr.rows]=\"rows?.toString() || undefined\"\r\n [placeholder]=\"placeholder\"\r\n (keyup)=\"onKeyUp(textarea.value)\"\r\n (change)=\"onChangeValue(textarea.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n ></textarea>\r\n}\r\n@if (currency && currency === 'EUR') {\r\n <div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>\u20AC</span>\r\n </div>\r\n}\r\n@if (isPercentage()) {\r\n <div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>%</span>\r\n </div>\r\n}\r\n@if (isPermillage()) {\r\n <div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>\u2030</span>\r\n </div>\r\n}\r\n@if (isUrl() && !!value) {\r\n <div class=\"postfix rounded-right symbol clickable\" [ngClass]=\"className\">\r\n <a href=\"{{ value }}\" target=\"_blank\">\r\n <span class=\"icon-external\"></span>\r\n </a>\r\n </div>\r\n}\r\n@if (isColor()) {\r\n <div\r\n class=\"postfix rounded-right bordered transparency\"\r\n [ngClass]=\"className\"\r\n >\r\n <div\r\n class=\"rounded-right full-space\"\r\n [ngStyle]=\"{ 'background-color': color }\"\r\n >\r\n <input\r\n #colorpicker\r\n class=\"minimal-space clickable invisible rounded-right full-space\"\r\n [id]=\"inputId + '$colorpicker'\"\r\n type=\"color\"\r\n [attr.value]=\"value\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n (change)=\"onColorPicked(colorpicker.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n />\r\n </div>\r\n </div>\r\n}\r\n@if (inlineErrors && lastErrors && (dirty || touched)) {\r\n <div class=\"alert\">\r\n @if (lastErrors.required) {\r\n <div>\r\n {{ userErrors[this.lang].required }}\r\n </div>\r\n }\r\n @if (lastErrors.email) {\r\n <div>{{ userErrors[this.lang].email }}</div>\r\n }\r\n @if (lastErrors.url) {\r\n <div>{{ userErrors[this.lang].url }}</div>\r\n }\r\n @if (lastErrors.min) {\r\n <div>\r\n {{ userErrors[this.lang].min.replace('$min', lastErrors.min.min) }}\r\n </div>\r\n }\r\n @if (lastErrors.max) {\r\n <div>\r\n {{ userErrors[this.lang].max.replace('$max', lastErrors.max.max) }}\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}:host{display:flex;align-items:stretch;min-height:1.5rem}input[type=color]{min-height:100%;height:0}.readonly{border:none}.readonly:focus{border:none;outline:none}.disabled{background-color:var(--lux-disabled-color, #f1f1f1);border-color:var(--lux-disabled-border-color, #6d6d6d)}.clickable{cursor:pointer}.full-space{width:100%;height:100%;margin:0;border:0;padding:0}.minimal-space,.icon,.icon-external{min-width:1rem;min-height:1rem}.icon,.icon-external{display:inline-block;background-size:1rem 1rem;background-position:center;background-repeat:no-repeat;width:var(--lux-autocomplete-icon-width, 1.5rem);z-index:1}.icon-external{background:var(--lux-input-icon-external, url(/assets/img/external.svg) no-repeat center);background-size:1rem;background-position-y:.1rem;height:100%}.invisible{opacity:0}.transparency{background-image:conic-gradient(#fff 0deg 90deg,#d3d3d3 90deg 180deg,#fff 180deg 270deg,#d3d3d3 270deg 360deg)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }] });
|
|
3573
3590
|
}
|
|
3574
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: InputComponent, decorators: [{
|
|
3575
3592
|
type: Component,
|
|
3576
3593
|
args: [{ selector: 'lux-input', imports: [CommonModule, FormsModule], providers: [
|
|
3577
3594
|
{
|
|
@@ -3584,7 +3601,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
3584
3601
|
multi: true,
|
|
3585
3602
|
useExisting: forwardRef(() => InputComponent)
|
|
3586
3603
|
}
|
|
3587
|
-
], template: "@if (currency && currency === 'USD') {\r\n<div class=\"prefix rounded-left symbol\" [ngClass]=\"className\">\r\n
|
|
3604
|
+
], template: "@if (currency && currency === 'USD') {\r\n <div class=\"prefix rounded-left symbol\" [ngClass]=\"className\">\r\n <span>$</span>\r\n </div>\r\n}\r\n@if (type !== 'textarea') {\r\n <input\r\n #input\r\n [class]=\"\r\n hasPrefix()\r\n ? hasPostfix()\r\n ? 'infix'\r\n : 'postfix rounded-right'\r\n : hasPostfix()\r\n ? 'prefix rounded-left'\r\n : 'rounded'\r\n \"\r\n [ngClass]=\"className\"\r\n placement=\"top\"\r\n [id]=\"inputId\"\r\n [type]=\"domain\"\r\n [attr.value]=\"value\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [disabled]=\"disabled === true\"\r\n [readonly]=\"readonly === true\"\r\n [attr.min]=\"min?.toString() || undefined\"\r\n [attr.max]=\"max?.toString() || undefined\"\r\n [attr.step]=\"step?.toString() || undefined\"\r\n [attr.pattern]=\"pattern || undefined\"\r\n [placeholder]=\"placeholder\"\r\n (keyup)=\"onKeyUp(input.value)\"\r\n (change)=\"onChangeValue(input.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n />\r\n}\r\n@if (type === 'textarea') {\r\n <textarea\r\n #textarea\r\n class=\"rounded\"\r\n [ngClass]=\"className\"\r\n placement=\"top\"\r\n [id]=\"inputId\"\r\n [attr.value]=\"value\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [disabled]=\"disabled === true\"\r\n [readonly]=\"readonly === true\"\r\n [attr.cols]=\"cols?.toString() || undefined\"\r\n [attr.rows]=\"rows?.toString() || undefined\"\r\n [placeholder]=\"placeholder\"\r\n (keyup)=\"onKeyUp(textarea.value)\"\r\n (change)=\"onChangeValue(textarea.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n ></textarea>\r\n}\r\n@if (currency && currency === 'EUR') {\r\n <div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>\u20AC</span>\r\n </div>\r\n}\r\n@if (isPercentage()) {\r\n <div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>%</span>\r\n </div>\r\n}\r\n@if (isPermillage()) {\r\n <div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>\u2030</span>\r\n </div>\r\n}\r\n@if (isUrl() && !!value) {\r\n <div class=\"postfix rounded-right symbol clickable\" [ngClass]=\"className\">\r\n <a href=\"{{ value }}\" target=\"_blank\">\r\n <span class=\"icon-external\"></span>\r\n </a>\r\n </div>\r\n}\r\n@if (isColor()) {\r\n <div\r\n class=\"postfix rounded-right bordered transparency\"\r\n [ngClass]=\"className\"\r\n >\r\n <div\r\n class=\"rounded-right full-space\"\r\n [ngStyle]=\"{ 'background-color': color }\"\r\n >\r\n <input\r\n #colorpicker\r\n class=\"minimal-space clickable invisible rounded-right full-space\"\r\n [id]=\"inputId + '$colorpicker'\"\r\n type=\"color\"\r\n [attr.value]=\"value\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n (change)=\"onColorPicked(colorpicker.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n />\r\n </div>\r\n </div>\r\n}\r\n@if (inlineErrors && lastErrors && (dirty || touched)) {\r\n <div class=\"alert\">\r\n @if (lastErrors.required) {\r\n <div>\r\n {{ userErrors[this.lang].required }}\r\n </div>\r\n }\r\n @if (lastErrors.email) {\r\n <div>{{ userErrors[this.lang].email }}</div>\r\n }\r\n @if (lastErrors.url) {\r\n <div>{{ userErrors[this.lang].url }}</div>\r\n }\r\n @if (lastErrors.min) {\r\n <div>\r\n {{ userErrors[this.lang].min.replace('$min', lastErrors.min.min) }}\r\n </div>\r\n }\r\n @if (lastErrors.max) {\r\n <div>\r\n {{ userErrors[this.lang].max.replace('$max', lastErrors.max.max) }}\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}:host{display:flex;align-items:stretch;min-height:1.5rem}input[type=color]{min-height:100%;height:0}.readonly{border:none}.readonly:focus{border:none;outline:none}.disabled{background-color:var(--lux-disabled-color, #f1f1f1);border-color:var(--lux-disabled-border-color, #6d6d6d)}.clickable{cursor:pointer}.full-space{width:100%;height:100%;margin:0;border:0;padding:0}.minimal-space,.icon,.icon-external{min-width:1rem;min-height:1rem}.icon,.icon-external{display:inline-block;background-size:1rem 1rem;background-position:center;background-repeat:no-repeat;width:var(--lux-autocomplete-icon-width, 1.5rem);z-index:1}.icon-external{background:var(--lux-input-icon-external, url(/assets/img/external.svg) no-repeat center);background-size:1rem;background-position-y:.1rem;height:100%}.invisible{opacity:0}.transparency{background-image:conic-gradient(#fff 0deg 90deg,#d3d3d3 90deg 180deg,#fff 180deg 270deg,#d3d3d3 270deg 360deg)}\n"] }]
|
|
3588
3605
|
}], propDecorators: { input: [{
|
|
3589
3606
|
type: ViewChild,
|
|
3590
3607
|
args: ['input', { static: false }]
|
|
@@ -3649,21 +3666,21 @@ var Placement;
|
|
|
3649
3666
|
class TooltipComponent {
|
|
3650
3667
|
context;
|
|
3651
3668
|
constructor() { }
|
|
3652
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3653
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
3669
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3670
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: TooltipComponent, isStandalone: true, selector: "lux-tooltip", inputs: { context: "context" }, ngImport: i0, template: `
|
|
3654
3671
|
<span class="lux-tooltip" style="transition: opacity 200ms">{{
|
|
3655
|
-
context
|
|
3672
|
+
context?.message
|
|
3656
3673
|
}}</span>
|
|
3657
|
-
`, isInline: true
|
|
3674
|
+
`, isInline: true });
|
|
3658
3675
|
}
|
|
3659
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
3660
3677
|
type: Component,
|
|
3661
3678
|
args: [{
|
|
3662
3679
|
selector: 'lux-tooltip',
|
|
3663
|
-
imports: [
|
|
3680
|
+
imports: [],
|
|
3664
3681
|
template: `
|
|
3665
3682
|
<span class="lux-tooltip" style="transition: opacity 200ms">{{
|
|
3666
|
-
context
|
|
3683
|
+
context?.message
|
|
3667
3684
|
}}</span>
|
|
3668
3685
|
`
|
|
3669
3686
|
}]
|
|
@@ -3682,7 +3699,7 @@ class TooltipContentRef {
|
|
|
3682
3699
|
|
|
3683
3700
|
class TooltipService {
|
|
3684
3701
|
_injector = inject(Injector);
|
|
3685
|
-
|
|
3702
|
+
_environmentInjector = inject(EnvironmentInjector);
|
|
3686
3703
|
_applicationRef = inject(ApplicationRef);
|
|
3687
3704
|
appendComponentToBody(content, elHost, placement) {
|
|
3688
3705
|
const tooltipContentRef = this.getTooltipContentRef(content);
|
|
@@ -3694,13 +3711,15 @@ class TooltipService {
|
|
|
3694
3711
|
tooltipContentRef.componentRef.changeDetectorRef.detectChanges();
|
|
3695
3712
|
}
|
|
3696
3713
|
domElem = this.setStyle(domElem, placement);
|
|
3697
|
-
|
|
3714
|
+
this.setPosition(domElem, elHost, placement);
|
|
3698
3715
|
return tooltipContentRef;
|
|
3699
3716
|
}
|
|
3700
3717
|
return null;
|
|
3701
3718
|
}
|
|
3702
3719
|
removeComponentFromBody(tooltipContentRef) {
|
|
3703
|
-
|
|
3720
|
+
if (tooltipContentRef.viewRef) {
|
|
3721
|
+
this._applicationRef.detachView(tooltipContentRef.viewRef);
|
|
3722
|
+
}
|
|
3704
3723
|
if (tooltipContentRef.componentRef) {
|
|
3705
3724
|
tooltipContentRef.componentRef.destroy();
|
|
3706
3725
|
}
|
|
@@ -3708,6 +3727,7 @@ class TooltipService {
|
|
|
3708
3727
|
getTooltipContentRef(content) {
|
|
3709
3728
|
if (!content) {
|
|
3710
3729
|
// nothing to show
|
|
3730
|
+
return null;
|
|
3711
3731
|
}
|
|
3712
3732
|
else if (content instanceof TemplateRef) {
|
|
3713
3733
|
return this.createFromTemplateRef(content);
|
|
@@ -3725,9 +3745,10 @@ class TooltipService {
|
|
|
3725
3745
|
return new TooltipContentRef(viewRef);
|
|
3726
3746
|
}
|
|
3727
3747
|
createFromComponent(component, context) {
|
|
3728
|
-
const componentRef =
|
|
3729
|
-
.
|
|
3730
|
-
|
|
3748
|
+
const componentRef = createComponent(component, {
|
|
3749
|
+
environmentInjector: this._environmentInjector,
|
|
3750
|
+
elementInjector: this._injector
|
|
3751
|
+
});
|
|
3731
3752
|
if (context) {
|
|
3732
3753
|
componentRef.instance.context = context;
|
|
3733
3754
|
}
|
|
@@ -3772,8 +3793,8 @@ class TooltipService {
|
|
|
3772
3793
|
document.documentElement.scrollTop ||
|
|
3773
3794
|
document.body.scrollTop ||
|
|
3774
3795
|
0;
|
|
3775
|
-
let top
|
|
3776
|
-
let left
|
|
3796
|
+
let top;
|
|
3797
|
+
let left;
|
|
3777
3798
|
const offset = 10;
|
|
3778
3799
|
switch (placement) {
|
|
3779
3800
|
case Placement.Bottom:
|
|
@@ -3800,10 +3821,10 @@ class TooltipService {
|
|
|
3800
3821
|
domElem.style.left = `${left}px`;
|
|
3801
3822
|
return domElem;
|
|
3802
3823
|
}
|
|
3803
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3804
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
3824
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TooltipService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3825
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TooltipService });
|
|
3805
3826
|
}
|
|
3806
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TooltipService, decorators: [{
|
|
3807
3828
|
type: Injectable
|
|
3808
3829
|
}] });
|
|
3809
3830
|
|
|
@@ -3847,10 +3868,16 @@ class LuxTooltipDirective {
|
|
|
3847
3868
|
remove(tooltipRef) {
|
|
3848
3869
|
this.tooltipService.removeComponentFromBody(tooltipRef);
|
|
3849
3870
|
}
|
|
3850
|
-
|
|
3851
|
-
|
|
3871
|
+
ngOnDestroy() {
|
|
3872
|
+
if (this.tooltipRef) {
|
|
3873
|
+
this.remove(this.tooltipRef);
|
|
3874
|
+
this.tooltipRef = null;
|
|
3875
|
+
}
|
|
3876
|
+
}
|
|
3877
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3878
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: LuxTooltipDirective, isStandalone: true, selector: "[luxTooltip]", inputs: { luxTooltip: "luxTooltip", content: "content", placement: "placement" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "onClick()" } }, providers: [TooltipService], ngImport: i0 });
|
|
3852
3879
|
}
|
|
3853
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3880
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxTooltipDirective, decorators: [{
|
|
3854
3881
|
type: Directive,
|
|
3855
3882
|
args: [{
|
|
3856
3883
|
selector: '[luxTooltip]',
|
|
@@ -3904,7 +3931,7 @@ class PaginationComponent {
|
|
|
3904
3931
|
pageSizeChange = new EventEmitter();
|
|
3905
3932
|
/** Current page, total items and items to show per page */
|
|
3906
3933
|
paginationInfoValue;
|
|
3907
|
-
_lang;
|
|
3934
|
+
_lang = 'en';
|
|
3908
3935
|
set lang(l) {
|
|
3909
3936
|
if (l === this._lang) {
|
|
3910
3937
|
return;
|
|
@@ -3997,12 +4024,12 @@ class PaginationComponent {
|
|
|
3997
4024
|
this.next = l.next;
|
|
3998
4025
|
this.last = l.last;
|
|
3999
4026
|
}
|
|
4000
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4001
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4027
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4028
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: PaginationComponent, isStandalone: true, selector: "lux-pagination", inputs: { lang: "lang", paginationInfo: "paginationInfo" }, outputs: { goToPage: "goToPage", pageSizeChange: "pageSizeChange" }, ngImport: i0, template: "@if (showPagination) {\r\n<div class=\"lux-pagination\">\r\n @if (!hidePrevious) {\r\n <a\r\n luxTooltip\r\n [content]=\"first\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onFirst()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !hidePrevious\r\n }\"\r\n class=\"button-pagination icon arrow-left-end\"\r\n ></a>\r\n <a\r\n luxTooltip\r\n [content]=\"previous\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onPrevious()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !hidePrevious\r\n }\"\r\n class=\"button-pagination icon arrow-left\"\r\n ></a>\r\n } @if (displayPreviousEllipsis) {\r\n <span class=\"ellipsis\">...</span>\r\n } @for (pageNum of pages; track pageNum) {\r\n <a\r\n placement=\"top\"\r\n delay=\"500\"\r\n [ngClass]=\"{\r\n disabled: pageNum === paginationInfo.page,\r\n enabled: pageNum !== paginationInfo.page\r\n }\"\r\n class=\"button-pagination\"\r\n (click)=\"onPage(pageNum)\"\r\n >{{ pageNum + 1 }}</a\r\n >\r\n } @if (displayNextEllipsis) {\r\n <span class=\"ellipsis\">...</span>\r\n } @if (!lastPage) {\r\n <a\r\n luxTooltip\r\n [content]=\"next\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onNext()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !lastPage\r\n }\"\r\n class=\"button-pagination icon arrow-right\"\r\n ></a>\r\n <a\r\n luxTooltip\r\n [content]=\"last\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onLast()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !lastPage\r\n }\"\r\n class=\"button-pagination icon arrow-right-end\"\r\n ></a>\r\n }\r\n</div>\r\n}\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}.lux-pagination{display:flex;flex-direction:row;margin:2% 0;width:100%;background:#fff;align-items:center}.disabled{cursor:not-allowed;border:var(--lux-pagination-disabled-border, 1px solid #325c81);border-radius:var(--lux-pagination-disabled-border-radius, 10%);padding:1%;margin:0 .7%;color:var(--lux-pagination-disabled-color, white);background-color:var(--lux-pagination-disabled-background-color, #325c81);text-decoration:none;pointer-events:none}.enabled{border:var(--lux-pagination-enabled-border, 1px solid rgb(207, 207, 207));border-radius:var(--lux-pagination-enabled-border-radius, 10%);padding:1%;margin:0 .7%;color:var(--lux-pagination-enabled-color, #325c81);width:min-content;cursor:pointer}.enabledFirstLast{border:1px solid rgb(207,207,207);border-radius:10%;padding:1%;color:#325c81;margin:0 .7%;width:min-content;cursor:pointer}.ellipsis{margin:0rem .5rem;padding:0rem;color:#325c81;width:min-content}.button-pagination{width:var(--lux-pagination-button-width, 1em);height:var(--lux-pagination-button-height, 1.2em);font-size:var(--lux-pagination-font-size, 80%);text-align:center}.icon{background-size:1.3em 1.4em;background-position:center;background-repeat:no-repeat}.arrow-right{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A </g>%0A</svg>%0A');background-position:.4em}.arrow-left{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A </g>%0A</svg>%0A');transform:rotate(180deg);background-position:.4em}.arrow-right-end{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A <polygon fill=\"%23325C81\" id=\"svg_3\" points=\"41.8,45.7 30.4,44.3 50.8,24 30.4,3.7 41.8,2.3 63.5,24 \"/>%0A </g>%0A</svg>%0A');background-position:.1em}.arrow-left-end{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A <polygon fill=\"%23325C81\" id=\"svg_3\" points=\"41.8,45.7 30.4,44.3 50.8,24 30.4,3.7 41.8,2.3 63.5,24 \"/>%0A </g>%0A</svg>%0A');background-position:.1em;transform:rotate(180deg)}@media only screen and (min-width:300px)and (max-width:500px){.arrow-right,.arrow-left{background-position:.2em}.arrow-right-end,.arrow-left-end{background-position:0em}}@media only screen and (min-width:500px)and (max-width:850px){.arrow-right,.arrow-left{background-position:.3em}.arrow-right-end,.arrow-left-end{background-position:0em}}@media only screen and (min-width:900px){.arrow-right,.arrow-left{background-position:.2em}.arrow-right-end,.arrow-left-end{background-position:0em}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: LuxTooltipDirective, selector: "[luxTooltip]", inputs: ["luxTooltip", "content", "placement"] }] });
|
|
4002
4029
|
}
|
|
4003
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4030
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
4004
4031
|
type: Component,
|
|
4005
|
-
args: [{ selector: 'lux-pagination', imports: [CommonModule, FormsModule, LuxTooltipDirective], template: "@if (showPagination) {\r\n<div class=\"lux-pagination\">\r\n @if (!hidePrevious) {\r\n <a\r\n luxTooltip\r\n [content]=\"first\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onFirst()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !hidePrevious\r\n }\"\r\n class=\"button-pagination icon arrow-left-end\"\r\n ></a>\r\n <a\r\n luxTooltip\r\n [content]=\"previous\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onPrevious()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !hidePrevious\r\n }\"\r\n class=\"button-pagination icon arrow-left\"\r\n ></a>\r\n } @if (displayPreviousEllipsis) {\r\n <span class=\"ellipsis\">...</span>\r\n } @for (pageNum of pages; track pageNum) {\r\n <a\r\n placement=\"top\"\r\n delay=\"500\"\r\n [ngClass]=\"{\r\n disabled: pageNum === paginationInfo.page,\r\n enabled: pageNum !== paginationInfo.page\r\n }\"\r\n class=\"button-pagination\"\r\n (click)=\"onPage(pageNum)\"\r\n >{{ pageNum + 1 }}</a\r\n >\r\n } @if (displayNextEllipsis) {\r\n <span class=\"ellipsis\">...</span>\r\n } @if (!lastPage) {\r\n <a\r\n luxTooltip\r\n [content]=\"next\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onNext()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !lastPage\r\n }\"\r\n class=\"button-pagination icon arrow-right\"\r\n ></a>\r\n <a\r\n luxTooltip\r\n [content]=\"last\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onLast()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !lastPage\r\n }\"\r\n class=\"button-pagination icon arrow-right-end\"\r\n ></a>\r\n }\r\n</div>\r\n}\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}.lux-pagination{display:flex;flex-direction:row;margin:2% 0;width:100%;background:#fff;align-items:center}.disabled{cursor:not-allowed;border:var(--lux-pagination-disabled-border, 1px solid #325c81);border-radius:var(--lux-pagination-disabled-border-radius, 10%);padding:1%;margin:0 .7%;color:var(--lux-pagination-disabled-color, white);background-color:var(--lux-pagination-disabled-background-color, #325c81);text-decoration:none;pointer-events:none}.enabled{border:var(--lux-pagination-enabled-border, 1px solid rgb(207, 207, 207));border-radius:var(--lux-pagination-enabled-border-radius, 10%);padding:1%;margin:0 .7%;color:var(--lux-pagination-enabled-color, #325c81);width:min-content;cursor:pointer}.enabledFirstLast{border:1px solid rgb(207,207,207);border-radius:10%;padding:1%;color:#325c81;margin:0 .7%;width:min-content;cursor:pointer}.ellipsis{margin:0rem .5rem;padding:0rem;color:#325c81;width:min-content}.button-pagination{width:var(--lux-pagination-button-width, 1em);height:var(--lux-pagination-button-height, 1.2em);font-size:var(--lux-pagination-font-size, 80%);text-align:center}.icon{background-size:1.3em 1.4em;background-position:center;background-repeat:no-repeat}.arrow-right{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A </g>%0A</svg>%0A');background-position:.4em}.arrow-left{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A </g>%0A</svg>%0A');transform:rotate(180deg);background-position:.4em}.arrow-right-end{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A <polygon fill=\"%23325C81\" id=\"svg_3\" points=\"41.8,45.7 30.4,44.3 50.8,24 30.4,3.7 41.8,2.3 63.5,24 \"/>%0A </g>%0A</svg>%0A');background-position:.1em}.arrow-left-end{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A <polygon fill=\"%23325C81\" id=\"svg_3\" points=\"41.8,45.7 30.4,44.3 50.8,24 30.4,3.7 41.8,2.3 63.5,24 \"/>%0A </g>%0A</svg>%0A');background-position:.1em;transform:rotate(180deg)}@media only screen and (min-width:
|
|
4032
|
+
args: [{ selector: 'lux-pagination', imports: [CommonModule, FormsModule, LuxTooltipDirective], template: "@if (showPagination) {\r\n<div class=\"lux-pagination\">\r\n @if (!hidePrevious) {\r\n <a\r\n luxTooltip\r\n [content]=\"first\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onFirst()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !hidePrevious\r\n }\"\r\n class=\"button-pagination icon arrow-left-end\"\r\n ></a>\r\n <a\r\n luxTooltip\r\n [content]=\"previous\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onPrevious()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !hidePrevious\r\n }\"\r\n class=\"button-pagination icon arrow-left\"\r\n ></a>\r\n } @if (displayPreviousEllipsis) {\r\n <span class=\"ellipsis\">...</span>\r\n } @for (pageNum of pages; track pageNum) {\r\n <a\r\n placement=\"top\"\r\n delay=\"500\"\r\n [ngClass]=\"{\r\n disabled: pageNum === paginationInfo.page,\r\n enabled: pageNum !== paginationInfo.page\r\n }\"\r\n class=\"button-pagination\"\r\n (click)=\"onPage(pageNum)\"\r\n >{{ pageNum + 1 }}</a\r\n >\r\n } @if (displayNextEllipsis) {\r\n <span class=\"ellipsis\">...</span>\r\n } @if (!lastPage) {\r\n <a\r\n luxTooltip\r\n [content]=\"next\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onNext()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !lastPage\r\n }\"\r\n class=\"button-pagination icon arrow-right\"\r\n ></a>\r\n <a\r\n luxTooltip\r\n [content]=\"last\"\r\n placement=\"top\"\r\n delay=\"500\"\r\n (click)=\"onLast()\"\r\n [ngClass]=\"{\r\n enabledFirstLast: !lastPage\r\n }\"\r\n class=\"button-pagination icon arrow-right-end\"\r\n ></a>\r\n }\r\n</div>\r\n}\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}.lux-pagination{display:flex;flex-direction:row;margin:2% 0;width:100%;background:#fff;align-items:center}.disabled{cursor:not-allowed;border:var(--lux-pagination-disabled-border, 1px solid #325c81);border-radius:var(--lux-pagination-disabled-border-radius, 10%);padding:1%;margin:0 .7%;color:var(--lux-pagination-disabled-color, white);background-color:var(--lux-pagination-disabled-background-color, #325c81);text-decoration:none;pointer-events:none}.enabled{border:var(--lux-pagination-enabled-border, 1px solid rgb(207, 207, 207));border-radius:var(--lux-pagination-enabled-border-radius, 10%);padding:1%;margin:0 .7%;color:var(--lux-pagination-enabled-color, #325c81);width:min-content;cursor:pointer}.enabledFirstLast{border:1px solid rgb(207,207,207);border-radius:10%;padding:1%;color:#325c81;margin:0 .7%;width:min-content;cursor:pointer}.ellipsis{margin:0rem .5rem;padding:0rem;color:#325c81;width:min-content}.button-pagination{width:var(--lux-pagination-button-width, 1em);height:var(--lux-pagination-button-height, 1.2em);font-size:var(--lux-pagination-font-size, 80%);text-align:center}.icon{background-size:1.3em 1.4em;background-position:center;background-repeat:no-repeat}.arrow-right{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A </g>%0A</svg>%0A');background-position:.4em}.arrow-left{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A </g>%0A</svg>%0A');transform:rotate(180deg);background-position:.4em}.arrow-right-end{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A <polygon fill=\"%23325C81\" id=\"svg_3\" points=\"41.8,45.7 30.4,44.3 50.8,24 30.4,3.7 41.8,2.3 63.5,24 \"/>%0A </g>%0A</svg>%0A');background-position:.1em}.arrow-left-end{background-image:url('data:image/svg+xml,<svg width=\"68\" height=\"48\" xmlns=\"http://www.w3.org/2000/svg\">%0A%0A <g>%0A <title>background</title>%0A <rect fill=\"none\" id=\"canvas_background\" height=\"402\" width=\"1082\" y=\"-1\" x=\"-1\"/>%0A </g>%0A <g>%0A <title>Layer 1</title>%0A <polygon fill=\"%23325C81\" id=\"svg_2\" points=\"21.8,45.7 10.4,44.3 30.8,24 10.4,3.7 21.8,2.3 43.5,24 \"/>%0A <polygon fill=\"%23325C81\" id=\"svg_3\" points=\"41.8,45.7 30.4,44.3 50.8,24 30.4,3.7 41.8,2.3 63.5,24 \"/>%0A </g>%0A</svg>%0A');background-position:.1em;transform:rotate(180deg)}@media only screen and (min-width:300px)and (max-width:500px){.arrow-right,.arrow-left{background-position:.2em}.arrow-right-end,.arrow-left-end{background-position:0em}}@media only screen and (min-width:500px)and (max-width:850px){.arrow-right,.arrow-left{background-position:.3em}.arrow-right-end,.arrow-left-end{background-position:0em}}@media only screen and (min-width:900px){.arrow-right,.arrow-left{background-position:.2em}.arrow-right-end,.arrow-left-end{background-position:0em}}\n"] }]
|
|
4006
4033
|
}], ctorParameters: () => [], propDecorators: { goToPage: [{
|
|
4007
4034
|
type: Output
|
|
4008
4035
|
}], pageSizeChange: [{
|
|
@@ -4091,8 +4118,8 @@ class RadiogroupComponent {
|
|
|
4091
4118
|
}
|
|
4092
4119
|
return item;
|
|
4093
4120
|
}
|
|
4094
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4095
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: RadiogroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4122
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: RadiogroupComponent, isStandalone: true, selector: "lux-radiogroup", inputs: { name: "name", disabled: "disabled", readonly: "readonly", required: "required", items: "items", value: "value" }, outputs: { itemsChange: "itemsChange", valueChange: "valueChange" }, providers: [
|
|
4096
4123
|
{
|
|
4097
4124
|
provide: NG_VALUE_ACCESSOR,
|
|
4098
4125
|
multi: true,
|
|
@@ -4103,11 +4130,11 @@ class RadiogroupComponent {
|
|
|
4103
4130
|
multi: true,
|
|
4104
4131
|
useExisting: forwardRef(() => RadiogroupComponent)
|
|
4105
4132
|
}
|
|
4106
|
-
], ngImport: i0, template: "<div class=\"radiogroup\" [class.disabled]=\"disabled || readonly\">\r\n @for (item of items; track item.value; let first = $first; let last = $last) {\r\n <div\r\n [class.radio-start]=\"first\"\r\n [class.radio-end]=\"last\"\r\n class=\"radio-item\"\r\n [class.selected]=\"item.value === value\"\r\n (click)=\"setValue($event, item)\"\r\n >\r\n <input\r\n [id]=\"item.name\"\r\n type=\"radio\"\r\n [name]=\"name\"\r\n [attr.disabled]=\"disabled || null\"\r\n [attr.readonly]=\"readonly || null\"\r\n [value]=\"item.value\"\r\n />\r\n <label [for]=\"item.name\" class=\"unselectable\">{{ item.label }}</label>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}.radiogroup{display:flex}.radio-item{border-radius:0;border:1px solid #ccc;padding:var(--lux-radiogroup-padding, 0rem .5rem)}.radio-item input{display:none}.radio-item label{color:var(--lux-radiogroup-color, initial);font-size:var(--lux-radiogroup-font-size, initial);margin-top:.3rem;margin-bottom:.3rem}.radio-item.selected{background-color:var(--lux-radiogroup-selected-background-color, rgb(46, 46, 172))}.radio-item.selected label{font-size:var(--lux-radiogroup-font-size, initial);color:var(--lux-radiogroup-selected-color, white)}.radio-start{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.radio-end{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.disabled .radio-item{background-color:#f0f0f0;color:#444}.disabled .selected{font-size:var(--lux-radiogroup-selected-disabled-font-size, initial);color:var(--lux-radiogroup-selected-disabled-color, white);background-color:var(--lux-radiogroup-selected-disabled-background-color, rgb(152, 152, 236))}.unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}\n"]
|
|
4133
|
+
], ngImport: i0, template: "<div class=\"radiogroup\" [class.disabled]=\"disabled || readonly\">\r\n @for (item of items; track item.value; let first = $first; let last = $last) {\r\n <div\r\n [class.radio-start]=\"first\"\r\n [class.radio-end]=\"last\"\r\n class=\"radio-item\"\r\n [class.selected]=\"item.value === value\"\r\n (click)=\"setValue($event, item)\"\r\n >\r\n <input\r\n [id]=\"item.name\"\r\n type=\"radio\"\r\n [name]=\"name\"\r\n [attr.disabled]=\"disabled || null\"\r\n [attr.readonly]=\"readonly || null\"\r\n [value]=\"item.value\"\r\n />\r\n <label [for]=\"item.name\" class=\"unselectable\">{{ item.label }}</label>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}.radiogroup{display:flex}.radio-item{border-radius:0;border:1px solid #ccc;padding:var(--lux-radiogroup-padding, 0rem .5rem)}.radio-item input{display:none}.radio-item label{color:var(--lux-radiogroup-color, initial);font-size:var(--lux-radiogroup-font-size, initial);margin-top:.3rem;margin-bottom:.3rem}.radio-item.selected{background-color:var(--lux-radiogroup-selected-background-color, rgb(46, 46, 172))}.radio-item.selected label{font-size:var(--lux-radiogroup-font-size, initial);color:var(--lux-radiogroup-selected-color, white)}.radio-start{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}.radio-end{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.disabled .radio-item{background-color:#f0f0f0;color:#444}.disabled .selected{font-size:var(--lux-radiogroup-selected-disabled-font-size, initial);color:var(--lux-radiogroup-selected-disabled-color, white);background-color:var(--lux-radiogroup-selected-disabled-background-color, rgb(152, 152, 236))}.unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}\n"] });
|
|
4107
4134
|
}
|
|
4108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: RadiogroupComponent, decorators: [{
|
|
4109
4136
|
type: Component,
|
|
4110
|
-
args: [{ selector: 'lux-radiogroup', imports: [
|
|
4137
|
+
args: [{ selector: 'lux-radiogroup', imports: [], providers: [
|
|
4111
4138
|
{
|
|
4112
4139
|
provide: NG_VALUE_ACCESSOR,
|
|
4113
4140
|
multi: true,
|
|
@@ -4232,8 +4259,8 @@ class SelectComponent {
|
|
|
4232
4259
|
this.error = this.validateItem(newValue);
|
|
4233
4260
|
this.isValidNewEntry = !this.error;
|
|
4234
4261
|
}
|
|
4235
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4236
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
4262
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4263
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SelectComponent, isStandalone: true, selector: "lux-select", inputs: { id: "id", disabled: "disabled", required: "required", multiple: "multiple", value: "value", placeholder: "placeholder", unique: "unique", validateItem: "validateItem" }, outputs: { valueChange: "valueChange" }, providers: [
|
|
4237
4264
|
{
|
|
4238
4265
|
provide: NG_VALUE_ACCESSOR,
|
|
4239
4266
|
multi: true,
|
|
@@ -4244,11 +4271,11 @@ class SelectComponent {
|
|
|
4244
4271
|
multi: true,
|
|
4245
4272
|
useExisting: forwardRef(() => SelectComponent)
|
|
4246
4273
|
}
|
|
4247
|
-
], ngImport: i0, template: "<div class=\"lux-select\">\r\n <ul class=\"list\">\r\n @for (item of value; track i; let i = $index) {\r\n <li>\r\n <span>{{ item }}</span>\r\n @if (!disabled) {\r\n <button\r\n class=\"remove\"\r\n type=\"button\"\r\n (click)=\"remove(i)\"\r\n [attr.aria-label]=\"'Remove ' + item\"\r\n >\r\n Remove\r\n </button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n @if (!disabled) {\r\n <div class=\"add-new-item\">\r\n <lux-input\r\n id=\"{{ id + 'addNew' }}\"\r\n type=\"string\"\r\n [placeholder]=\"placeholder\"\r\n [attr.aria-label]=\"placeholder\"\r\n [disabled]=\"disabled\"\r\n [(value)]=\"newEntry\"\r\n (keyPress)=\"onKeyPress($event)\"\r\n (valueChange)=\"onChangeNewEntry($event)\"\r\n >\r\n </lux-input>\r\n @if (canAdd) {\r\n <div>\r\n @if (isValidNewEntry) {\r\n <button type=\"button\" (click)=\"add(newEntry)\">Add</button>\r\n }\r\n </div>\r\n }\r\n <div class=\"error\">\r\n {{ error }}\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".lux-select{margin-bottom:.5em}.lux-select .list{margin:1em;padding-bottom:.2em;list-style-type:square}.lux-select .list span{margin-bottom:.3em}.remove{margin-left:2em;font-size:.65em;color:#b22222;background:transparent;border:2px solid #BBB}.add-new-item{display:inline-flex;margin-left:2.2em;height:1.6em}.error{margin:.5em 0;color:#b22222}\n"], dependencies: [{ kind: "
|
|
4274
|
+
], ngImport: i0, template: "<div class=\"lux-select\">\r\n <ul class=\"list\">\r\n @for (item of value; track i; let i = $index) {\r\n <li>\r\n <span>{{ item }}</span>\r\n @if (!disabled) {\r\n <button\r\n class=\"remove\"\r\n type=\"button\"\r\n (click)=\"remove(i)\"\r\n [attr.aria-label]=\"'Remove ' + item\"\r\n >\r\n Remove\r\n </button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n @if (!disabled) {\r\n <div class=\"add-new-item\">\r\n <lux-input\r\n id=\"{{ id + 'addNew' }}\"\r\n type=\"string\"\r\n [placeholder]=\"placeholder\"\r\n [attr.aria-label]=\"placeholder\"\r\n [disabled]=\"disabled\"\r\n [(value)]=\"newEntry\"\r\n (keyPress)=\"onKeyPress($event)\"\r\n (valueChange)=\"onChangeNewEntry($event)\"\r\n >\r\n </lux-input>\r\n @if (canAdd) {\r\n <div>\r\n @if (isValidNewEntry) {\r\n <button type=\"button\" (click)=\"add(newEntry)\">Add</button>\r\n }\r\n </div>\r\n }\r\n <div class=\"error\">\r\n {{ error }}\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".lux-select{margin-bottom:.5em}.lux-select .list{margin:1em;padding-bottom:.2em;list-style-type:square}.lux-select .list span{margin-bottom:.3em}.remove{margin-left:2em;font-size:.65em;color:#b22222;background:transparent;border:2px solid #BBB}.add-new-item{display:inline-flex;margin-left:2.2em;height:1.6em}.error{margin:.5em 0;color:#b22222}\n"], dependencies: [{ kind: "component", type: InputComponent, selector: "lux-input", inputs: ["rows", "cols", "step", "min", "max", "lang", "inlineErrors", "inputId", "aria-label", "readonly", "disabled", "pattern", "currency", "placeholder", "required", "type", "value"], outputs: ["valueChange", "keyPress"] }] });
|
|
4248
4275
|
}
|
|
4249
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SelectComponent, decorators: [{
|
|
4250
4277
|
type: Component,
|
|
4251
|
-
args: [{ selector: 'lux-select', imports: [
|
|
4278
|
+
args: [{ selector: 'lux-select', imports: [InputComponent], providers: [
|
|
4252
4279
|
{
|
|
4253
4280
|
provide: NG_VALUE_ACCESSOR,
|
|
4254
4281
|
multi: true,
|
|
@@ -4283,7 +4310,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
4283
4310
|
class VoiceRecognitionDirective {
|
|
4284
4311
|
el = inject(ElementRef);
|
|
4285
4312
|
renderer = inject(Renderer2);
|
|
4286
|
-
language;
|
|
4313
|
+
language = 'en-US';
|
|
4287
4314
|
// See API at: https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition
|
|
4288
4315
|
recognition;
|
|
4289
4316
|
isRecognizing = false;
|
|
@@ -4331,10 +4358,10 @@ class VoiceRecognitionDirective {
|
|
|
4331
4358
|
this.el.nativeElement.value = recognizedText;
|
|
4332
4359
|
this.renderer.removeClass(this.mic, 'lux-recording');
|
|
4333
4360
|
}
|
|
4334
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4335
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
4361
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: VoiceRecognitionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4362
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: VoiceRecognitionDirective, isStandalone: true, selector: "[luxVoiceRecognition]", inputs: { language: "language" }, ngImport: i0 });
|
|
4336
4363
|
}
|
|
4337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: VoiceRecognitionDirective, decorators: [{
|
|
4338
4365
|
type: Directive,
|
|
4339
4366
|
args: [{
|
|
4340
4367
|
selector: '[luxVoiceRecognition]'
|
|
@@ -4394,8 +4421,8 @@ const windowProvider = {
|
|
|
4394
4421
|
const WINDOW_PROVIDERS = [browserWindowProvider, windowProvider];
|
|
4395
4422
|
|
|
4396
4423
|
class LuxModule {
|
|
4397
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
4398
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
4424
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4425
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: LuxModule, imports: [FormsModule,
|
|
4399
4426
|
FilterComponent,
|
|
4400
4427
|
GeolocationComponent,
|
|
4401
4428
|
InputComponent,
|
|
@@ -4429,7 +4456,7 @@ class LuxModule {
|
|
|
4429
4456
|
PaginationComponent,
|
|
4430
4457
|
RadiogroupComponent,
|
|
4431
4458
|
VoiceRecognitionDirective] });
|
|
4432
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
4459
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxModule, providers: [ModalService, TooltipService, WINDOW_PROVIDERS], imports: [FormsModule,
|
|
4433
4460
|
FilterComponent,
|
|
4434
4461
|
GeolocationComponent,
|
|
4435
4462
|
InputComponent,
|
|
@@ -4437,19 +4464,14 @@ class LuxModule {
|
|
|
4437
4464
|
AutocompleteComponent,
|
|
4438
4465
|
DatetimeComponent,
|
|
4439
4466
|
LuxBreadcrumbComponent,
|
|
4440
|
-
LuxModalWindowComponent,
|
|
4441
|
-
LuxModalBackdropComponent,
|
|
4442
|
-
MapComponent,
|
|
4443
4467
|
PaginationComponent,
|
|
4444
|
-
RadiogroupComponent,
|
|
4445
4468
|
HttpClientModule,
|
|
4446
4469
|
ReactiveFormsModule,
|
|
4447
4470
|
RouterModule,
|
|
4448
4471
|
SelectComponent,
|
|
4449
|
-
CommonModule
|
|
4450
|
-
TooltipComponent] });
|
|
4472
|
+
CommonModule] });
|
|
4451
4473
|
}
|
|
4452
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
4474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuxModule, decorators: [{
|
|
4453
4475
|
type: NgModule,
|
|
4454
4476
|
args: [{
|
|
4455
4477
|
declarations: [],
|