@metadev/lux 0.30.0 → 0.32.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.
Files changed (42) hide show
  1. package/fesm2022/metadev-lux.mjs +1107 -1066
  2. package/fesm2022/metadev-lux.mjs.map +1 -1
  3. package/index.d.ts +944 -3
  4. package/package.json +3 -3
  5. package/lib/autocomplete/autocomplete.component.d.ts +0 -81
  6. package/lib/autocomplete-list/autocomplete-list.component.d.ts +0 -65
  7. package/lib/breadcrumb/breadcrumb.component.d.ts +0 -22
  8. package/lib/checkbox/checkbox.component.d.ts +0 -47
  9. package/lib/datasource.d.ts +0 -13
  10. package/lib/datetime/datetime.component.d.ts +0 -69
  11. package/lib/filter/filter.component.d.ts +0 -51
  12. package/lib/geolocation/geolocation.component.d.ts +0 -123
  13. package/lib/geolocation/geolocation.service.d.ts +0 -32
  14. package/lib/geolocation/openlayer-loader.service.d.ts +0 -7
  15. package/lib/helperFns.d.ts +0 -15
  16. package/lib/input/input.component.d.ts +0 -108
  17. package/lib/input/regexp.service.d.ts +0 -15
  18. package/lib/lang.d.ts +0 -2
  19. package/lib/lux.module.d.ts +0 -27
  20. package/lib/map/geopoint.d.ts +0 -7
  21. package/lib/map/map.component.d.ts +0 -39
  22. package/lib/modal/modal-backdrop.d.ts +0 -8
  23. package/lib/modal/modal-config.d.ts +0 -14
  24. package/lib/modal/modal-dismiss-reasons.d.ts +0 -4
  25. package/lib/modal/modal-ref.d.ts +0 -41
  26. package/lib/modal/modal-stack.d.ts +0 -31
  27. package/lib/modal/modal-window.d.ts +0 -28
  28. package/lib/modal/modal.service.d.ts +0 -19
  29. package/lib/modal/util.d.ts +0 -40
  30. package/lib/pagination/pagination.component.d.ts +0 -52
  31. package/lib/pagination/pagination.d.ts +0 -10
  32. package/lib/radiogroup/radiogroup.component.d.ts +0 -37
  33. package/lib/select/select.component.d.ts +0 -38
  34. package/lib/tooltip/placement.d.ts +0 -7
  35. package/lib/tooltip/tooltip-context.d.ts +0 -3
  36. package/lib/tooltip/tooltip.component.d.ts +0 -11
  37. package/lib/tooltip/tooltip.directive.d.ts +0 -27
  38. package/lib/tooltip/tooltip.service.d.ts +0 -20
  39. package/lib/tooltip/tooltop-content.d.ts +0 -6
  40. package/lib/voice-recognition/voice-recognition.directive.d.ts +0 -16
  41. package/lib/window/window.service.d.ts +0 -11
  42. package/public-api.d.ts +0 -18
@@ -1,15 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, forwardRef, Input, Output, ViewChild, Component, HostBinding, Injectable, HostListener, Inject, TemplateRef, Directive, InjectionToken, PLATFORM_ID, NgModule } from '@angular/core';
2
+ import { inject, ChangeDetectorRef, EventEmitter, forwardRef, Input, Output, ViewChild, Component, Injectable, HostBinding, ElementRef, HostListener, ApplicationRef, Injector, RendererFactory2, TemplateRef, ComponentFactoryResolver, Directive, Renderer2, InjectionToken, PLATFORM_ID, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, ReactiveFormsModule } from '@angular/forms';
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
- import * as i1$1 from '@angular/common';
7
- import { DOCUMENT, isPlatformBrowser, CommonModule } from '@angular/common';
8
- import { of, Subject, fromEvent, from, BehaviorSubject } from 'rxjs';
9
- import * as i1$2 from '@angular/router';
10
- import { NavigationEnd, RouterModule } from '@angular/router';
11
- import * as i1$3 from '@angular/common/http';
12
- import { HttpClientModule } from '@angular/common/http';
6
+ import * as i1$2 from '@angular/common';
7
+ import { DOCUMENT, CommonModule, isPlatformBrowser } from '@angular/common';
8
+ import { of, Subject, from, BehaviorSubject, fromEvent } from 'rxjs';
9
+ import * as i1$1 from '@angular/router';
10
+ import { Router, ActivatedRoute, NavigationEnd, RouterModule } from '@angular/router';
11
+ import { HttpClient, HttpClientModule } from '@angular/common/http';
13
12
 
14
13
  /* eslint-disable no-useless-escape */
15
14
  // undefined and null functions
@@ -129,18 +128,11 @@ const isInitialAndEmpty = (previousValue, newValue) => {
129
128
  (isNewArray ? newValue.length !== 0 : Boolean(newValue)));
130
129
  };
131
130
 
132
- /** Language detector based on Navigator preferences */
133
- const languageDetector = () => {
134
- const lang = navigator.language.split('-')[0];
135
- if (lang === 'es' || lang === 'en') {
136
- return lang;
137
- }
138
- return 'en'; // default
139
- };
140
-
141
131
  const LOST_FOCUS_TIME_WINDOW_MS = 200; // ms
142
132
  class AutocompleteComponent {
143
- cd;
133
+ cd = inject(ChangeDetectorRef);
134
+ document = inject(DOCUMENT);
135
+ appendToContainer = null;
144
136
  static idCounter = 0;
145
137
  i0;
146
138
  completeDiv;
@@ -167,6 +159,8 @@ class AutocompleteComponent {
167
159
  * true: keep open (when the action most likely is to pick another one).
168
160
  */
169
161
  keepOpenAfterDelete = false;
162
+ /** Append dropdown to body or custom selector. Uses position absolute. */
163
+ appendTo;
170
164
  get value() {
171
165
  return this._value;
172
166
  }
@@ -196,9 +190,6 @@ class AutocompleteComponent {
196
190
  resolveLabelsFunction = undefined;
197
191
  populateFunction = undefined;
198
192
  instance;
199
- constructor(cd) {
200
- this.cd = cd;
201
- }
202
193
  // ControlValueAccessor Interface
203
194
  onChange = (value) => { };
204
195
  onTouched = () => { };
@@ -261,13 +252,69 @@ class AutocompleteComponent {
261
252
  }
262
253
  ngAfterViewInit() {
263
254
  this.setSameWidth();
255
+ this.handleAppendTo();
256
+ }
257
+ ngOnDestroy() {
258
+ this.removeDropdownFromContainer();
259
+ }
260
+ handleAppendTo() {
261
+ if (!this.appendTo) {
262
+ return;
263
+ }
264
+ const container = this.appendTo === 'body'
265
+ ? this.document.body
266
+ : this.document.querySelector(this.appendTo);
267
+ if (container) {
268
+ this.appendToContainer = container;
269
+ this.appendToContainer.appendChild(this.completeDiv.nativeElement);
270
+ }
271
+ }
272
+ removeDropdownFromContainer() {
273
+ if (this.appendToContainer && this.completeDiv) {
274
+ const dropdown = this.completeDiv.nativeElement;
275
+ if (dropdown.parentElement === this.appendToContainer) {
276
+ this.appendToContainer.removeChild(dropdown);
277
+ }
278
+ }
279
+ }
280
+ updateDropdownPosition() {
281
+ if (!this.appendTo || !this.appendToContainer) {
282
+ return;
283
+ }
284
+ const inputRect = this.i0.nativeElement.getBoundingClientRect();
285
+ const dropdown = this.completeDiv.nativeElement;
286
+ let top;
287
+ let left;
288
+ if (this.appendToContainer === this.document.body) {
289
+ // For body, use viewport coordinates + scroll
290
+ top = inputRect.bottom + window.scrollY;
291
+ left = inputRect.left + window.scrollX;
292
+ }
293
+ else {
294
+ // For custom containers, calculate relative position
295
+ const containerRect = this.appendToContainer.getBoundingClientRect();
296
+ top =
297
+ inputRect.bottom -
298
+ containerRect.top +
299
+ this.appendToContainer.scrollTop;
300
+ left =
301
+ inputRect.left - containerRect.left + this.appendToContainer.scrollLeft;
302
+ }
303
+ dropdown.style.top = `${top}px`;
304
+ dropdown.style.left = `${left}px`;
305
+ dropdown.style.width = `${inputRect.width}px`;
264
306
  }
265
307
  onInputResized() {
266
308
  this.setSameWidth();
267
309
  }
268
310
  setSameWidth() {
269
- const width = this.i0.nativeElement.getBoundingClientRect().width;
270
- this.completeDiv.nativeElement.style.width = `${width}px`;
311
+ if (this.appendTo) {
312
+ this.updateDropdownPosition();
313
+ }
314
+ else {
315
+ const width = this.i0.nativeElement.getBoundingClientRect().width;
316
+ this.completeDiv.nativeElement.style.width = `${width}px`;
317
+ }
271
318
  }
272
319
  onKeydown(event, label) {
273
320
  switch (event.key) {
@@ -402,6 +449,9 @@ class AutocompleteComponent {
402
449
  toggleCompletion(show, label) {
403
450
  if (show && !this.disabled) {
404
451
  this.i0.nativeElement.focus();
452
+ if (this.appendTo) {
453
+ this.updateDropdownPosition();
454
+ }
405
455
  this.showCompletionList(label);
406
456
  }
407
457
  else {
@@ -515,8 +565,8 @@ class AutocompleteComponent {
515
565
  return of([]);
516
566
  }
517
567
  }
518
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AutocompleteComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
519
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: AutocompleteComponent, isStandalone: false, selector: "lux-autocomplete", inputs: { inputId: "inputId", disabled: "disabled", readonly: "readonly", label: "label", canAddNewValues: "canAddNewValues", keepOpenAfterDelete: "keepOpenAfterDelete", value: "value", dataSource: "dataSource", required: "required", placeholder: "placeholder", resolveLabelsFunction: "resolveLabelsFunction", populateFunction: "populateFunction", instance: "instance" }, outputs: { valueChange: "valueChange", dataSourceChange: "dataSourceChange" }, providers: [
568
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
569
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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: [
520
570
  {
521
571
  provide: NG_VALUE_ACCESSOR,
522
572
  multi: true,
@@ -527,11 +577,11 @@ class AutocompleteComponent {
527
577
  multi: true,
528
578
  useExisting: forwardRef(() => AutocompleteComponent)
529
579
  }
530
- ], 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)\">\n <div class=\"lux-autocomplete-box\">\n <input\n #i0\n [id]=\"inputId\"\n [(ngModel)]=\"label\"\n [placeholder]=\"placeholder\"\n [attr.disabled]=\"disabled || null\"\n [attr.readonly]=\"readonly || null\"\n (keydown)=\"onKeydown($event, i0.value)\"\n (keypress)=\"onKeypress($event, i0.value)\"\n (keyup)=\"onKeyup($event, i0.value)\"\n (blur)=\"onLostFocus(i0.value)\"\n (focus)=\"toggleCompletion(true, i0.value)\"\n (click)=\"toggleCompletion(true, i0.value)\"\n (resized)=\"onInputResized()\"\n (window:resize)=\"onInputResized()\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"showCompletion\"\n aria-haspopup=\"true\"\n attr.aria-owns=\"{{ inputId + '_list' }}\"\n [attr.aria-activedescendant]=\"selectedOption\"\n />\n <div *ngIf=\"canAddNewValues\" class=\"icon-suggestions\"></div>\n <div *ngIf=\"showSpinner; else noLoading\" class=\"icon-spinner\"></div>\n <ng-template #noLoading>\n <button\n *ngIf=\"!disabled && i0.value && !showCompletion; else dropdown\"\n type=\"button\"\n class=\"icon-clear\"\n aria-label=\"Clear\"\n (click)=\"clear()\"\n ></button>\n <ng-template #dropdown>\n <div\n class=\"icon-dropdown\"\n (click)=\"toggleCompletion(!showCompletion, i0.value)\"\n ></div>\n </ng-template>\n </ng-template>\n </div>\n <div\n #completeDiv\n [class.showCompletion]=\"showCompletion\"\n class=\"lux-completion-list\"\n id=\"{{ inputId + '_list' }}\"\n >\n <ul>\n <li\n *ngFor=\"let item of completionList; let index = index\"\n id=\"{{ inputId + '_' + index }}\"\n class=\"lux-completion-item\"\n [class.selected]=\"focusItem && item.key === focusItem.key\"\n (click)=\"complete(item)\"\n [attr.aria-label]=\"item.label\"\n >\n <span class=\"preserve-white-space\">{{ item.labelPrefix }}</span>\n <span class=\"preserve-white-space bold\">{{ item.labelMatch }}</span>\n <span class=\"preserve-white-space\">{{ item.labelPostfix }}</span>\n </li>\n </ul>\n </div>\n</div>\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}.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: "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: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
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"] }] });
531
581
  }
532
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AutocompleteComponent, decorators: [{
582
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AutocompleteComponent, decorators: [{
533
583
  type: Component,
534
- args: [{ standalone: false, selector: 'lux-autocomplete', providers: [
584
+ args: [{ selector: 'lux-autocomplete', imports: [FormsModule], providers: [
535
585
  {
536
586
  provide: NG_VALUE_ACCESSOR,
537
587
  multi: true,
@@ -542,8 +592,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
542
592
  multi: true,
543
593
  useExisting: forwardRef(() => AutocompleteComponent)
544
594
  }
545
- ], template: "<div class=\"lux-autocomplete\" (blur)=\"toggleCompletion(false, i0.value)\">\n <div class=\"lux-autocomplete-box\">\n <input\n #i0\n [id]=\"inputId\"\n [(ngModel)]=\"label\"\n [placeholder]=\"placeholder\"\n [attr.disabled]=\"disabled || null\"\n [attr.readonly]=\"readonly || null\"\n (keydown)=\"onKeydown($event, i0.value)\"\n (keypress)=\"onKeypress($event, i0.value)\"\n (keyup)=\"onKeyup($event, i0.value)\"\n (blur)=\"onLostFocus(i0.value)\"\n (focus)=\"toggleCompletion(true, i0.value)\"\n (click)=\"toggleCompletion(true, i0.value)\"\n (resized)=\"onInputResized()\"\n (window:resize)=\"onInputResized()\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"showCompletion\"\n aria-haspopup=\"true\"\n attr.aria-owns=\"{{ inputId + '_list' }}\"\n [attr.aria-activedescendant]=\"selectedOption\"\n />\n <div *ngIf=\"canAddNewValues\" class=\"icon-suggestions\"></div>\n <div *ngIf=\"showSpinner; else noLoading\" class=\"icon-spinner\"></div>\n <ng-template #noLoading>\n <button\n *ngIf=\"!disabled && i0.value && !showCompletion; else dropdown\"\n type=\"button\"\n class=\"icon-clear\"\n aria-label=\"Clear\"\n (click)=\"clear()\"\n ></button>\n <ng-template #dropdown>\n <div\n class=\"icon-dropdown\"\n (click)=\"toggleCompletion(!showCompletion, i0.value)\"\n ></div>\n </ng-template>\n </ng-template>\n </div>\n <div\n #completeDiv\n [class.showCompletion]=\"showCompletion\"\n class=\"lux-completion-list\"\n id=\"{{ inputId + '_list' }}\"\n >\n <ul>\n <li\n *ngFor=\"let item of completionList; let index = index\"\n id=\"{{ inputId + '_' + index }}\"\n class=\"lux-completion-item\"\n [class.selected]=\"focusItem && item.key === focusItem.key\"\n (click)=\"complete(item)\"\n [attr.aria-label]=\"item.label\"\n >\n <span class=\"preserve-white-space\">{{ item.labelPrefix }}</span>\n <span class=\"preserve-white-space bold\">{{ item.labelMatch }}</span>\n <span class=\"preserve-white-space\">{{ item.labelPostfix }}</span>\n </li>\n </ul>\n </div>\n</div>\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}.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"] }]
546
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { i0: [{
595
+ ], 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"] }]
596
+ }], propDecorators: { i0: [{
547
597
  type: ViewChild,
548
598
  args: ['i0', { static: true }]
549
599
  }], completeDiv: [{
@@ -565,6 +615,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
565
615
  type: Input
566
616
  }], keepOpenAfterDelete: [{
567
617
  type: Input
618
+ }], appendTo: [{
619
+ type: Input
568
620
  }], value: [{
569
621
  type: Input
570
622
  }], dataSource: [{
@@ -620,6 +672,15 @@ const selectElement = (completionList, label) => {
620
672
  return found || completionList[0];
621
673
  };
622
674
 
675
+ /** Language detector based on Navigator preferences */
676
+ const languageDetector = () => {
677
+ const lang = navigator.language.split('-')[0];
678
+ if (lang === 'es' || lang === 'en') {
679
+ return lang;
680
+ }
681
+ return 'en'; // default
682
+ };
683
+
623
684
  class AutocompleteListComponent {
624
685
  static idCounter = 0;
625
686
  auto;
@@ -812,8 +873,8 @@ class AutocompleteListComponent {
812
873
  getDeleteMessage(label) {
813
874
  return (this.deleteLabelTemplate ?? this.literals[this.lang].deleteLabelTemplate).replace('<<label>>', label);
814
875
  }
815
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AutocompleteListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
816
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: AutocompleteListComponent, isStandalone: false, 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: [
876
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AutocompleteListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
877
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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: [
817
878
  {
818
879
  provide: NG_VALUE_ACCESSOR,
819
880
  multi: true,
@@ -824,11 +885,11 @@ class AutocompleteListComponent {
824
885
  multi: true,
825
886
  useExisting: forwardRef(() => AutocompleteListComponent)
826
887
  }
827
- ], viewQueries: [{ propertyName: "auto", first: true, predicate: ["auto"], descendants: true }], ngImport: i0, template: "<div [id]=\"inputId\">\n <ul>\n <li *ngFor=\"let label of labels; let index = index\">\n <span>{{ label }}</span>\n <button\n *ngIf=\"!disabled\"\n class=\"remove-item\"\n (click)=\"removeAt(index)\"\n attr.aria-label=\"{{ getDeleteMessage(label) }}\"\n ></button>\n </li>\n </ul>\n <div *ngIf=\"!disabled\" class=\"new-entry\">\n <lux-autocomplete\n #auto\n [dataSource]=\"internalDataSource\"\n [placeholder]=\"placeholder ?? literals[lang].placeholder\"\n [(value)]=\"newEntry\"\n (valueChange)=\"onValueChange()\"\n (keypress)=\"onNewEntryChange($event, auto)\"\n >\n </lux-autocomplete>\n <button\n *ngIf=\"canAdd\"\n type=\"button\"\n class=\"add-item\"\n aria-label=\"addMessage ?? literals[lang].addMessage\"\n (click)=\"addNew(auto)\"\n ></button>\n </div>\n</div>\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: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AutocompleteComponent, selector: "lux-autocomplete", inputs: ["inputId", "disabled", "readonly", "label", "canAddNewValues", "keepOpenAfterDelete", "value", "dataSource", "required", "placeholder", "resolveLabelsFunction", "populateFunction", "instance"], outputs: ["valueChange", "dataSourceChange"] }] });
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"] }] });
828
889
  }
829
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AutocompleteListComponent, decorators: [{
890
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AutocompleteListComponent, decorators: [{
830
891
  type: Component,
831
- args: [{ standalone: false, selector: 'lux-autocomplete-list', providers: [
892
+ args: [{ selector: 'lux-autocomplete-list', imports: [AutocompleteComponent], providers: [
832
893
  {
833
894
  provide: NG_VALUE_ACCESSOR,
834
895
  multi: true,
@@ -839,7 +900,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
839
900
  multi: true,
840
901
  useExisting: forwardRef(() => AutocompleteListComponent)
841
902
  }
842
- ], template: "<div [id]=\"inputId\">\n <ul>\n <li *ngFor=\"let label of labels; let index = index\">\n <span>{{ label }}</span>\n <button\n *ngIf=\"!disabled\"\n class=\"remove-item\"\n (click)=\"removeAt(index)\"\n attr.aria-label=\"{{ getDeleteMessage(label) }}\"\n ></button>\n </li>\n </ul>\n <div *ngIf=\"!disabled\" class=\"new-entry\">\n <lux-autocomplete\n #auto\n [dataSource]=\"internalDataSource\"\n [placeholder]=\"placeholder ?? literals[lang].placeholder\"\n [(value)]=\"newEntry\"\n (valueChange)=\"onValueChange()\"\n (keypress)=\"onNewEntryChange($event, auto)\"\n >\n </lux-autocomplete>\n <button\n *ngIf=\"canAdd\"\n type=\"button\"\n class=\"add-item\"\n aria-label=\"addMessage ?? literals[lang].addMessage\"\n (click)=\"addNew(auto)\"\n ></button>\n </div>\n</div>\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"] }]
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"] }]
843
904
  }], propDecorators: { auto: [{
844
905
  type: ViewChild,
845
906
  args: ['auto']
@@ -872,15 +933,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
872
933
  }] } });
873
934
 
874
935
  class LuxBreadcrumbComponent {
875
- route;
876
- activedRoute;
936
+ route = inject(Router);
937
+ activedRoute = inject(ActivatedRoute);
877
938
  breadcrumbs;
878
939
  subs = [];
879
940
  imagePath = '../assets/img/arrow-forward.svg';
880
- constructor(route, activedRoute) {
881
- this.route = route;
882
- this.activedRoute = activedRoute;
883
- }
884
941
  ngOnInit() {
885
942
  this.subs.push(this.route.events
886
943
  .pipe(filter((event) => event instanceof NavigationEnd))
@@ -935,13 +992,13 @@ class LuxBreadcrumbComponent {
935
992
  }
936
993
  return activedRouteSnapshot.params.id || routeConfig.path;
937
994
  }
938
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxBreadcrumbComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
939
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: LuxBreadcrumbComponent, isStandalone: false, selector: "lux-breadcrumb", ngImport: i0, template: "<ul class=\"lux-breadcrumb\">\n <li *ngFor=\"let breadcrumb of breadcrumbs; last as isLast; first as isFirst\"\n class=\"lux-breadcrumb-item\">\n <a [class.first]=\"isFirst\" routerLink=\"{{ breadcrumb.url }}\">{{ breadcrumb.label }}</a>\n <div *ngIf=\"!isLast\" class=\"lux-breadcrumb-separator\"></div>\n </li>\n</ul>\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: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
995
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
996
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
940
997
  }
941
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxBreadcrumbComponent, decorators: [{
998
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxBreadcrumbComponent, decorators: [{
942
999
  type: Component,
943
- args: [{ standalone: false, selector: 'lux-breadcrumb', template: "<ul class=\"lux-breadcrumb\">\n <li *ngFor=\"let breadcrumb of breadcrumbs; last as isLast; first as isFirst\"\n class=\"lux-breadcrumb-item\">\n <a [class.first]=\"isFirst\" routerLink=\"{{ breadcrumb.url }}\">{{ breadcrumb.label }}</a>\n <div *ngIf=\"!isLast\" class=\"lux-breadcrumb-separator\"></div>\n </li>\n</ul>\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"] }]
944
- }], ctorParameters: () => [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }] });
1000
+ args: [{ selector: 'lux-breadcrumb', imports: [CommonModule, 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
+ }] });
945
1002
 
946
1003
  const KEY_SPACE = ' ';
947
1004
  class CheckboxComponent {
@@ -1056,24 +1113,24 @@ class CheckboxComponent {
1056
1113
  this.ck.nativeElement.checked = this.internalValue;
1057
1114
  }
1058
1115
  }
1059
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1060
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: CheckboxComponent, isStandalone: false, selector: "lux-checkbox", inputs: { lang: "lang", value: "value", label: "label", name: "name", disabled: "disabled", inputId: "inputId" }, outputs: { valueChange: "valueChange" }, providers: [
1116
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1117
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: CheckboxComponent, isStandalone: true, selector: "lux-checkbox", inputs: { lang: "lang", value: "value", label: "label", name: "name", disabled: "disabled", inputId: "inputId" }, outputs: { valueChange: "valueChange" }, providers: [
1061
1118
  {
1062
1119
  provide: NG_VALUE_ACCESSOR,
1063
1120
  multi: true,
1064
1121
  useExisting: forwardRef(() => CheckboxComponent)
1065
1122
  }
1066
- ], viewQueries: [{ propertyName: "ck", first: true, predicate: ["ck"], descendants: true }], ngImport: i0, template: "<div class=\"switch\">\n <div>\n <label *ngIf=\"label\" [for]=\"inputId\">{{ label }}</label>\n </div>\n <div *ngIf=\"!disabled\" class=\"switch-item\" (click)=\"clicked()\">\n <input #ck [name]=\"name\" type=\"checkbox\" [id]=\"inputId\" />\n <div\n class=\"slider round\"\n [class.on]=\"value\"\n [class.disabled]=\"disabled\"\n [tabindex]=\"tabindexValue\"\n (keyup)=\"onKey($event)\"\n ></div>\n </div>\n <div>\n <span class=\"checkbox-label\" *ngIf=\"value\">{{\n literals[lang].yesLabel\n }}</span>\n <span class=\"checkbox-label\" *ngIf=\"!value\">{{\n literals[lang].noLabel\n }}</span>\n </div>\n</div>\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"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1123
+ ], 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"] });
1067
1124
  }
1068
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CheckboxComponent, decorators: [{
1125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: CheckboxComponent, decorators: [{
1069
1126
  type: Component,
1070
- args: [{ standalone: false, selector: 'lux-checkbox', providers: [
1127
+ args: [{ selector: 'lux-checkbox', imports: [], providers: [
1071
1128
  {
1072
1129
  provide: NG_VALUE_ACCESSOR,
1073
1130
  multi: true,
1074
1131
  useExisting: forwardRef(() => CheckboxComponent)
1075
1132
  }
1076
- ], template: "<div class=\"switch\">\n <div>\n <label *ngIf=\"label\" [for]=\"inputId\">{{ label }}</label>\n </div>\n <div *ngIf=\"!disabled\" class=\"switch-item\" (click)=\"clicked()\">\n <input #ck [name]=\"name\" type=\"checkbox\" [id]=\"inputId\" />\n <div\n class=\"slider round\"\n [class.on]=\"value\"\n [class.disabled]=\"disabled\"\n [tabindex]=\"tabindexValue\"\n (keyup)=\"onKey($event)\"\n ></div>\n </div>\n <div>\n <span class=\"checkbox-label\" *ngIf=\"value\">{{\n literals[lang].yesLabel\n }}</span>\n <span class=\"checkbox-label\" *ngIf=\"!value\">{{\n literals[lang].noLabel\n }}</span>\n </div>\n</div>\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"] }]
1133
+ ], 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"] }]
1077
1134
  }], ctorParameters: () => [], propDecorators: { ck: [{
1078
1135
  type: ViewChild,
1079
1136
  args: ['ck', { static: false }]
@@ -1333,8 +1390,8 @@ class DatetimeComponent {
1333
1390
  this.min = this.min || '1900-01-01';
1334
1391
  this.max = this.max || '2100-01-01';
1335
1392
  }
1336
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: DatetimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1337
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: DatetimeComponent, isStandalone: false, 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: [
1393
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: DatetimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1394
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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: [
1338
1395
  {
1339
1396
  provide: NG_VALUE_ACCESSOR,
1340
1397
  multi: true,
@@ -1345,11 +1402,11 @@ class DatetimeComponent {
1345
1402
  multi: true,
1346
1403
  useExisting: forwardRef(() => DatetimeComponent)
1347
1404
  }
1348
- ], 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\n #dateInput\n class=\"rounded-left prefix\"\n [ngClass]=\"className\"\n type=\"date\"\n [id]=\"inputId + '$date'\"\n [(ngModel)]=\"dateValue\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [placeholder]=\"\"\n (keyup)=\"onEventDatetime(dateInput.value, timeInput.value)\"\n (change)=\"onEventDatetime(dateInput.value, timeInput.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n/>\n<input\n #timeInput\n [class]=\"(disabled || readonly || !isClearable()) && localTime ? 'rounded-right' : ''\"\n [ngClass]=\"className\"\n type=\"time\"\n [id]=\"inputId + '$time'\"\n [(ngModel)]=\"timeValue\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [placeholder]=\"\"\n [step]=\"includeSeconds ? 1 : 60\"\n (keyup)=\"onEventDatetime(dateInput.value, timeInput.value)\"\n (change)=\"onEventDatetime(dateInput.value, timeInput.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n/>\n<ng-container\n *ngIf=\"!localTime\"\n>\n <div\n [class]=\"disabled || readonly || !isClearable() ? 'rounded-right postfix symbol' : 'postfix symbol'\"\n [ngClass]=\"className\"\n >\n <span>{{ localTime ? '' : 'UTC' }}</span>\n </div>\n</ng-container>\n<button\n #clearButton\n *ngIf=\"!disabled && !readonly && isClearable()\"\n type=\"button\"\n class=\"rounded-right postfix bordered icon-clear\"\n [id]=\"inputId + '$clear'\"\n (click)=\"clear()\"\n aria-label=\"clear\"\n></button>\n\n<div *ngIf=\"inlineErrors && lastErrors && (dirty || touched)\" class=\"alert\">\n <div *ngIf=\"lastErrors.required\">\n {{ userErrors[lang].required }}\n </div>\n <div *ngIf=\"lastErrors.min\">\n {{ userErrors[lang].min.replace('$min', lastErrors.min.min) }}\n </div>\n <div *ngIf=\"lastErrors.max\">\n {{ userErrors[lang].max.replace('$max', lastErrors.max.max) }}\n </div>\n</div>\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: "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: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
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"] }] });
1349
1406
  }
1350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: DatetimeComponent, decorators: [{
1407
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: DatetimeComponent, decorators: [{
1351
1408
  type: Component,
1352
- args: [{ standalone: false, selector: 'lux-datetime', providers: [
1409
+ args: [{ selector: 'lux-datetime', imports: [FormsModule, CommonModule], providers: [
1353
1410
  {
1354
1411
  provide: NG_VALUE_ACCESSOR,
1355
1412
  multi: true,
@@ -1360,7 +1417,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
1360
1417
  multi: true,
1361
1418
  useExisting: forwardRef(() => DatetimeComponent)
1362
1419
  }
1363
- ], template: "<input\n #dateInput\n class=\"rounded-left prefix\"\n [ngClass]=\"className\"\n type=\"date\"\n [id]=\"inputId + '$date'\"\n [(ngModel)]=\"dateValue\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [placeholder]=\"\"\n (keyup)=\"onEventDatetime(dateInput.value, timeInput.value)\"\n (change)=\"onEventDatetime(dateInput.value, timeInput.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n/>\n<input\n #timeInput\n [class]=\"(disabled || readonly || !isClearable()) && localTime ? 'rounded-right' : ''\"\n [ngClass]=\"className\"\n type=\"time\"\n [id]=\"inputId + '$time'\"\n [(ngModel)]=\"timeValue\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [placeholder]=\"\"\n [step]=\"includeSeconds ? 1 : 60\"\n (keyup)=\"onEventDatetime(dateInput.value, timeInput.value)\"\n (change)=\"onEventDatetime(dateInput.value, timeInput.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n/>\n<ng-container\n *ngIf=\"!localTime\"\n>\n <div\n [class]=\"disabled || readonly || !isClearable() ? 'rounded-right postfix symbol' : 'postfix symbol'\"\n [ngClass]=\"className\"\n >\n <span>{{ localTime ? '' : 'UTC' }}</span>\n </div>\n</ng-container>\n<button\n #clearButton\n *ngIf=\"!disabled && !readonly && isClearable()\"\n type=\"button\"\n class=\"rounded-right postfix bordered icon-clear\"\n [id]=\"inputId + '$clear'\"\n (click)=\"clear()\"\n aria-label=\"clear\"\n></button>\n\n<div *ngIf=\"inlineErrors && lastErrors && (dirty || touched)\" class=\"alert\">\n <div *ngIf=\"lastErrors.required\">\n {{ userErrors[lang].required }}\n </div>\n <div *ngIf=\"lastErrors.min\">\n {{ userErrors[lang].min.replace('$min', lastErrors.min.min) }}\n </div>\n <div *ngIf=\"lastErrors.max\">\n {{ userErrors[lang].max.replace('$max', lastErrors.max.max) }}\n </div>\n</div>\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"] }]
1420
+ ], 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"] }]
1364
1421
  }], ctorParameters: () => [], propDecorators: { dateInput: [{
1365
1422
  type: ViewChild,
1366
1423
  args: ['dateInput', { static: true }]
@@ -1513,24 +1570,24 @@ class FilterComponent {
1513
1570
  addEvent() {
1514
1571
  this.subject.next(this.searchValue);
1515
1572
  }
1516
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1517
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: FilterComponent, isStandalone: false, selector: "lux-filter", inputs: { disabled: "disabled", inputId: "inputId", placeholder: "placeholder", searchValue: "searchValue", searchOnType: "searchOnType", ariaLabel: ["aria-label", "ariaLabel"], debounce: "debounce" }, outputs: { searchValueChange: "searchValueChange" }, providers: [
1573
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1574
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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: [
1518
1575
  {
1519
1576
  provide: NG_VALUE_ACCESSOR,
1520
1577
  multi: true,
1521
1578
  useExisting: forwardRef(() => FilterComponent)
1522
1579
  }
1523
- ], ngImport: i0, template: "<div class=\"filter\">\n <input\n #i0\n type=\"text\"\n [attr.aria-label]=\"ariaLabel\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId\"\n [disabled]=\"disabled\"\n [value]=\"searchValue\"\n (valueChange)=\"onInputValueChange(i0.value)\"\n (keyup)=\"keyup($event, i0.value)\"\n />\n\n <button\n [class.hide]=\"!searchValue\"\n aria-label=\"Clear\"\n class=\"clear-indicator icon icon-clear\"\n type=\"button\"\n (click)=\"clear()\"\n ></button>\n <i *ngIf=\"1 || searchOnType\" class=\"search-indicator icon icon-search\"></i>\n <button\n class=\"btn-search\"\n *ngIf=\"!searchOnType\"\n type=\"button\"\n [disabled]=\"disabled\"\n (click)=\"search()\"\n >\n Search\n </button>\n</div>\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: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
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: CommonModule }, { kind: "ngmodule", type: FormsModule }] });
1524
1581
  }
1525
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FilterComponent, decorators: [{
1582
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: FilterComponent, decorators: [{
1526
1583
  type: Component,
1527
- args: [{ standalone: false, selector: 'lux-filter', providers: [
1584
+ args: [{ selector: 'lux-filter', imports: [CommonModule, FormsModule], providers: [
1528
1585
  {
1529
1586
  provide: NG_VALUE_ACCESSOR,
1530
1587
  multi: true,
1531
1588
  useExisting: forwardRef(() => FilterComponent)
1532
1589
  }
1533
- ], template: "<div class=\"filter\">\n <input\n #i0\n type=\"text\"\n [attr.aria-label]=\"ariaLabel\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId\"\n [disabled]=\"disabled\"\n [value]=\"searchValue\"\n (valueChange)=\"onInputValueChange(i0.value)\"\n (keyup)=\"keyup($event, i0.value)\"\n />\n\n <button\n [class.hide]=\"!searchValue\"\n aria-label=\"Clear\"\n class=\"clear-indicator icon icon-clear\"\n type=\"button\"\n (click)=\"clear()\"\n ></button>\n <i *ngIf=\"1 || searchOnType\" class=\"search-indicator icon icon-search\"></i>\n <button\n class=\"btn-search\"\n *ngIf=\"!searchOnType\"\n type=\"button\"\n [disabled]=\"disabled\"\n (click)=\"search()\"\n >\n Search\n </button>\n</div>\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"] }]
1590
+ ], 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"] }]
1534
1591
  }], ctorParameters: () => [], propDecorators: { disabled: [{
1535
1592
  type: Input
1536
1593
  }], inputId: [{
@@ -1550,993 +1607,974 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
1550
1607
  type: Output
1551
1608
  }] } });
1552
1609
 
1553
- class LuxModalBackdropComponent {
1554
- backdropClass;
1555
- class = 'modal-backdrop fade show';
1556
- style = 'z-index: 1050';
1557
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModalBackdropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1558
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: LuxModalBackdropComponent, isStandalone: false, selector: "lux-modal-backdrop", inputs: { backdropClass: "backdropClass" }, host: { properties: { "class": "this.class", "style": "this.style" } }, ngImport: i0, template: '', isInline: true });
1559
- }
1560
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModalBackdropComponent, decorators: [{
1561
- type: Component,
1562
- args: [{
1563
- standalone: false,
1564
- selector: 'lux-modal-backdrop',
1565
- template: ''
1566
- }]
1567
- }], propDecorators: { backdropClass: [{
1568
- type: Input
1569
- }], class: [{
1570
- type: HostBinding,
1571
- args: ['class']
1572
- }], style: [{
1573
- type: HostBinding,
1574
- args: ['style']
1575
- }] } });
1576
-
1577
- class LuxModalConfig {
1578
- backdrop = true;
1579
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModalConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1580
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModalConfig, providedIn: 'root' });
1610
+ let openLayersIsInstalled = false;
1611
+ class OpenLayerLoaderService {
1612
+ load() {
1613
+ if (window.ol) {
1614
+ return of(true);
1615
+ }
1616
+ const openLayerJsUrl = 'https://openlayers.org/en/v5.3.0/build/ol.js';
1617
+ const openLayerCssUrl = 'https://openlayers.org/en/v5.3.0/css/ol.css';
1618
+ if (!openLayersIsInstalled) {
1619
+ openLayersIsInstalled = true; // only try to install it once
1620
+ loadCss(openLayerCssUrl, () => { });
1621
+ return from(new Promise((resolve, _) => {
1622
+ loadScript(openLayerJsUrl, () => resolve(true));
1623
+ }));
1624
+ }
1625
+ return of(true);
1626
+ }
1627
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: OpenLayerLoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1628
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: OpenLayerLoaderService, providedIn: 'root' });
1581
1629
  }
1582
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModalConfig, decorators: [{
1630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: OpenLayerLoaderService, decorators: [{
1583
1631
  type: Injectable,
1584
1632
  args: [{ providedIn: 'root' }]
1585
1633
  }] });
1634
+ /** Dynamically load a script from url and return a callback */
1635
+ const loadScript = (url, callback) => {
1636
+ const script = document.createElement('script');
1637
+ script.type = 'text/javascript';
1638
+ if (script.readyState) {
1639
+ // for old IE
1640
+ script.onreadystatechange = () => {
1641
+ if (script.readyState === 'loaded' || script.readyState === 'complete') {
1642
+ script.onreadystatechange = null;
1643
+ callback();
1644
+ }
1645
+ };
1646
+ }
1647
+ else {
1648
+ // Others browsers
1649
+ script.onload = () => {
1650
+ callback();
1651
+ };
1652
+ }
1653
+ script.src = url;
1654
+ document.getElementsByTagName('head')[0].appendChild(script);
1655
+ };
1656
+ /** Dynamically load css from url and return a callback */
1657
+ const loadCss = (url, callback) => {
1658
+ const link = document.createElement('link');
1659
+ link.type = 'text/css';
1660
+ link.rel = 'stylesheet';
1661
+ link.type = 'text/javascript';
1662
+ link.href = url;
1663
+ link.onload = () => {
1664
+ callback();
1665
+ };
1666
+ document.getElementsByTagName('head')[0].appendChild(link);
1667
+ };
1586
1668
 
1587
- class ActiveModal {
1588
- close(result) { }
1589
- dismiss(reason) { }
1590
- }
1591
- class ModalRef {
1592
- _windowCmptRef;
1593
- _contentRef;
1594
- _backdropCmptRef;
1595
- _beforeDismiss;
1596
- _resolve;
1597
- _reject;
1598
- /**
1599
- * The instance of a component used for the modal content.
1600
- *
1601
- * When a `TemplateRef` is used as the content, will return `undefined`.
1602
- */
1603
- get componentInstance() {
1604
- if (this._contentRef.componentRef) {
1605
- return this._contentRef.componentRef.instance;
1669
+ /* eslint-disable no-self-assign */
1670
+ class MapComponent {
1671
+ static idCounter = 0;
1672
+ loaded$ = new BehaviorSubject(false);
1673
+ _map;
1674
+ mapId;
1675
+ _zoom;
1676
+ set zoom(zoom) {
1677
+ if (!isNaN(zoom)) {
1678
+ this._zoom = zoom;
1679
+ if (this._map) {
1680
+ this._map.getView().setZoom(zoom);
1681
+ }
1606
1682
  }
1607
1683
  }
1608
- /**
1609
- * The promise that is resolved when the modal is closed and rejected when the modal is dismissed.
1610
- */
1611
- result;
1612
- constructor(_windowCmptRef, _contentRef, _backdropCmptRef, _beforeDismiss) {
1613
- this._windowCmptRef = _windowCmptRef;
1614
- this._contentRef = _contentRef;
1615
- this._backdropCmptRef = _backdropCmptRef;
1616
- this._beforeDismiss = _beforeDismiss;
1617
- _windowCmptRef.instance.dismissEvent.subscribe((reason) => {
1618
- this.dismiss(reason);
1619
- });
1620
- this.result = new Promise((resolve, reject) => {
1621
- this._resolve = resolve;
1622
- this._reject = reject;
1623
- });
1624
- this.result.then(null, () => { });
1684
+ get zoom() {
1685
+ return this._zoom;
1625
1686
  }
1626
- /**
1627
- * Closes the modal with an optional `result` value.
1628
- *
1629
- * The `NgbMobalRef.result` promise will be resolved with the provided value.
1630
- */
1631
- close(result) {
1632
- if (this._windowCmptRef) {
1633
- if (this._resolve) {
1634
- this._resolve(result);
1687
+ _center;
1688
+ set center(center) {
1689
+ if (center && center.coordinates && center.coordinates.length === 2) {
1690
+ this._center = center;
1691
+ if (this._map) {
1692
+ this._map.getView().setCenter(ol.proj.fromLonLat(center.coordinates));
1635
1693
  }
1636
- this._removeModalElements();
1637
1694
  }
1638
1695
  }
1639
- _dismiss(reason) {
1640
- if (this._reject) {
1641
- this._reject(reason);
1642
- }
1643
- this._removeModalElements();
1696
+ get center() {
1697
+ return this._center;
1644
1698
  }
1645
- /**
1646
- * Dismisses the modal with an optional `reason` value.
1647
- *
1648
- * The `NgbModalRef.result` promise will be rejected with the provided value.
1649
- */
1650
- dismiss(reason) {
1651
- if (this._windowCmptRef) {
1652
- if (!this._beforeDismiss) {
1653
- this._dismiss(reason);
1699
+ _readonly;
1700
+ set readonly(readonly) {
1701
+ if (!readonly) {
1702
+ if (this._map) {
1703
+ this._map.on('click', (args) => {
1704
+ // args.coordinate is in EPSG:3857 (meters), we transform it into EPSG:4326 (degrees)
1705
+ const coordinates = ol.proj.toLonLat(args.coordinate);
1706
+ // alternatively: const lonLat = ol.proj.transform(args.coordinate,'EPSG:3857','EPSG:4326');
1707
+ this.addMarkerAtCoordinates(coordinates);
1708
+ });
1709
+ this._map.on('pointermove', (event) => {
1710
+ const pixel = this._map.getEventPixel(event.originalEvent);
1711
+ const hit = this._map.hasFeatureAtPixel(pixel);
1712
+ this._map.getViewport().style.cursor = hit ? 'move' : 'grab';
1713
+ });
1654
1714
  }
1655
- else {
1656
- const dismiss = this._beforeDismiss();
1657
- if (dismiss && dismiss.then) {
1658
- dismiss.then((result) => {
1659
- if (result !== false) {
1660
- this._dismiss(reason);
1661
- }
1662
- }, () => { });
1663
- }
1664
- else if (dismiss !== false) {
1665
- this._dismiss(reason);
1666
- }
1715
+ }
1716
+ else {
1717
+ if (this._map) {
1718
+ this._map.on('click', (args) => { });
1719
+ this._map.on('pointermove', (event) => { });
1720
+ this._map.getViewport().style.cursor = 'grab';
1667
1721
  }
1668
1722
  }
1723
+ this._readonly = readonly;
1724
+ // reset marker coordinates so marker interactions can be created or recreated accordingly
1725
+ // to the changes to readonly
1726
+ this.markerCoordinates = this.markerCoordinates;
1669
1727
  }
1670
- _removeModalElements() {
1671
- const windowNativeEl = this._windowCmptRef.location.nativeElement;
1672
- windowNativeEl.parentNode.removeChild(windowNativeEl);
1673
- this._windowCmptRef.destroy();
1674
- if (this._backdropCmptRef) {
1675
- const backdropNativeEl = this._backdropCmptRef.location.nativeElement;
1676
- backdropNativeEl.parentNode.removeChild(backdropNativeEl);
1677
- this._backdropCmptRef.destroy();
1678
- }
1679
- if (this._contentRef && this._contentRef.viewRef) {
1680
- this._contentRef.viewRef.destroy();
1681
- }
1682
- this._windowCmptRef = null;
1683
- this._backdropCmptRef = null;
1684
- this._contentRef = null;
1728
+ get readonly() {
1729
+ return this._readonly;
1685
1730
  }
1686
- }
1687
-
1688
- const FOCUS = 'focus';
1689
- var Key;
1690
- (function (Key) {
1691
- Key[Key["Tab"] = 9] = "Tab";
1692
- Key[Key["Enter"] = 13] = "Enter";
1693
- Key[Key["Escape"] = 27] = "Escape";
1694
- Key[Key["Space"] = 32] = "Space";
1695
- Key[Key["PageUp"] = 33] = "PageUp";
1696
- Key[Key["PageDown"] = 34] = "PageDown";
1697
- Key[Key["End"] = 35] = "End";
1698
- Key[Key["Home"] = 36] = "Home";
1699
- Key[Key["ArrowLeft"] = 37] = "ArrowLeft";
1700
- Key[Key["ArrowUp"] = 38] = "ArrowUp";
1701
- Key[Key["ArrowRight"] = 39] = "ArrowRight";
1702
- Key[Key["ArrowDown"] = 40] = "ArrowDown";
1703
- })(Key || (Key = {}));
1704
- const isDefined = (value) => value !== undefined && value !== null;
1705
- class ContentRef {
1706
- nodes;
1707
- viewRef;
1708
- componentRef;
1709
- constructor(nodes, viewRef, componentRef) {
1710
- this.nodes = nodes;
1711
- this.viewRef = viewRef;
1712
- this.componentRef = componentRef;
1713
- }
1714
- }
1715
- const FOCUSABLE_ELEMENTS_SELECTOR = [
1716
- 'a[href]',
1717
- 'button:not([disabled])',
1718
- 'input:not([disabled]):not([type="hidden"])',
1719
- 'select:not([disabled])',
1720
- 'textarea:not([disabled])',
1721
- '[contenteditable]',
1722
- '[tabindex]:not([tabindex="-1"])'
1723
- ].join(', ');
1724
- /**
1725
- * Returns first and last focusable elements inside of a given element based on specific CSS selector
1726
- */
1727
- const getFocusableBoundaryElements = (element) => {
1728
- const list = Array.from(element.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR)).filter((el) => el.tabIndex !== -1);
1729
- return [list[0], list[list.length - 1]];
1730
- };
1731
- /**
1732
- * Function that enforces browser focus to be trapped inside a DOM element.
1733
- *
1734
- * Works only for clicks inside the element and navigation with 'Tab', ignoring clicks outside of the element
1735
- *
1736
- * @param element The element around which focus will be trapped inside
1737
- * @param stopFocusTrap$ The observable stream. When completed the focus trap will clean up listeners
1738
- * and free internal resources
1739
- * @param refocusOnClick Put the focus back to the last focused element whenever a click occurs on element (default to
1740
- * false)
1741
- */
1742
- const focusTrap = (element, stopFocusTrap$, refocusOnClick = false) => {
1743
- // last focused element
1744
- const lastFocusedElement$ = fromEvent(element, 'focusin').pipe(takeUntil(stopFocusTrap$), map((e) => e.target));
1745
- // 'tab' / 'shift+tab' stream
1746
- fromEvent(element, 'keydown')
1747
- .pipe(takeUntil(stopFocusTrap$), filter((e) => e.which === Key.Tab), withLatestFrom(lastFocusedElement$))
1748
- .subscribe(([tabEvent, focusedElement]) => {
1749
- const [first, last] = getFocusableBoundaryElements(element);
1750
- if ((focusedElement === first || focusedElement === element) &&
1751
- tabEvent.shiftKey) {
1752
- last.focus();
1753
- tabEvent.preventDefault();
1731
+ _marker;
1732
+ _markerInteraction;
1733
+ _markerCoordinates;
1734
+ set markerCoordinates(markerCoordinates) {
1735
+ if (markerCoordinates && markerCoordinates.length === 2) {
1736
+ this._markerCoordinates = markerCoordinates;
1737
+ if (this._map) {
1738
+ this.addMarkerAtCoordinates(markerCoordinates);
1739
+ }
1754
1740
  }
1755
- if (focusedElement === last && !tabEvent.shiftKey) {
1756
- first.focus();
1757
- tabEvent.preventDefault();
1741
+ else {
1742
+ this._markerCoordinates = undefined;
1743
+ if (this._map) {
1744
+ this.removeMarker();
1745
+ }
1758
1746
  }
1759
- });
1760
- // inside click
1761
- if (refocusOnClick) {
1762
- fromEvent(element, 'click')
1763
- .pipe(takeUntil(stopFocusTrap$), withLatestFrom(lastFocusedElement$), map((arr) => arr[1]))
1764
- .subscribe((lastFocusedElement) => lastFocusedElement.focus());
1765
- }
1766
- };
1767
-
1768
- var ModalDismissReasons;
1769
- (function (ModalDismissReasons) {
1770
- ModalDismissReasons[ModalDismissReasons["BackdropClick"] = 0] = "BackdropClick";
1771
- ModalDismissReasons[ModalDismissReasons["Esc"] = 1] = "Esc";
1772
- })(ModalDismissReasons || (ModalDismissReasons = {}));
1773
-
1774
- class LuxModalWindowComponent {
1775
- _document;
1776
- _elRef;
1777
- _elWithFocus; // element that is focused prior to modal opening
1778
- ariaDescribedBy;
1779
- ariaLabelledBy;
1780
- backdrop = false;
1781
- keyboard = true;
1782
- windowClass;
1783
- dismissEvent = new EventEmitter();
1784
- get class() {
1785
- return `modal ${this.windowClass || ''}`;
1786
1747
  }
1787
- role = 'dialog';
1788
- tabindex = '-1';
1789
- ariamodal = true;
1790
- get hostAriaLabelledBy() {
1791
- return this.ariaLabelledBy;
1792
- }
1793
- get hostAriaDescribedBy() {
1794
- return this.ariaDescribedBy;
1748
+ get markerCoordinates() {
1749
+ return this._markerCoordinates;
1795
1750
  }
1796
- backdropClick(btn) {
1797
- if (this.backdrop === true && this._elRef.nativeElement === btn) {
1798
- this.dismiss(ModalDismissReasons.BackdropClick);
1751
+ set markerPoint(markerPoint) {
1752
+ if (!markerPoint ||
1753
+ !(markerPoint.coordinates && markerPoint.coordinates.length === 2)) {
1754
+ this.markerCoordinates = undefined;
1799
1755
  }
1800
- }
1801
- escKey(event) {
1802
- if (this.keyboard && !event.defaultPrevented) {
1803
- this.dismiss(ModalDismissReasons.Esc);
1756
+ else {
1757
+ this.markerCoordinates = [
1758
+ +markerPoint.coordinates[0],
1759
+ +markerPoint.coordinates[1]
1760
+ ];
1804
1761
  }
1762
+ this.valueChange.emit(markerPoint);
1805
1763
  }
1806
- constructor(_document, _elRef) {
1807
- this._document = _document;
1808
- this._elRef = _elRef;
1764
+ get markerPoint() {
1765
+ return {
1766
+ type: 'Point',
1767
+ coordinates: this.markerCoordinates
1768
+ };
1809
1769
  }
1810
- dismiss(reason) {
1811
- this.dismissEvent.emit(reason);
1770
+ valueChange = new EventEmitter();
1771
+ _markerSource;
1772
+ _markerStyle;
1773
+ constructor() {
1774
+ const olLoader = inject(OpenLayerLoaderService);
1775
+ olLoader.load().subscribe((_) => {
1776
+ // Initialize
1777
+ this._markerSource = new ol.source.Vector();
1778
+ this._markerStyle = new ol.style.Style({
1779
+ image: new ol.style.Icon({
1780
+ anchor: [0.5, 1],
1781
+ scale: 0.25,
1782
+ src: '/assets/img/marker.png'
1783
+ })
1784
+ });
1785
+ this.loaded$.next(true);
1786
+ });
1812
1787
  }
1813
1788
  ngOnInit() {
1814
- this._elWithFocus = this._document.activeElement;
1789
+ this.mapId = this.mapId ? this.mapId : 'map' + MapComponent.idCounter++;
1815
1790
  }
1816
1791
  ngAfterViewInit() {
1817
- if (!this._elRef.nativeElement.contains(document.activeElement)) {
1818
- const firstFocusable = getFocusableBoundaryElements(this._elRef.nativeElement)[0];
1819
- const elementToFocus = firstFocusable || this._elRef.nativeElement;
1820
- elementToFocus.focus();
1821
- }
1792
+ this.loaded$.subscribe((loaded) => {
1793
+ if (loaded) {
1794
+ this.initMap();
1795
+ }
1796
+ });
1822
1797
  }
1823
- ngOnDestroy() {
1824
- const body = this._document.body;
1825
- const elWithFocus = this._elWithFocus;
1826
- let elementToFocus;
1827
- if (elWithFocus && elWithFocus[FOCUS] && body.contains(elWithFocus)) {
1828
- elementToFocus = elWithFocus;
1798
+ initMap() {
1799
+ this._map = new ol.Map({
1800
+ target: this.mapId,
1801
+ controls: ol.control.defaults({ attribution: false }),
1802
+ layers: [
1803
+ new ol.layer.Tile({
1804
+ source: new ol.source.OSM()
1805
+ }),
1806
+ new ol.layer.Vector({
1807
+ source: this._markerSource,
1808
+ style: this._markerStyle
1809
+ })
1810
+ ],
1811
+ view: new ol.View({
1812
+ center: ol.proj.fromLonLat(this.center !== undefined ? this.center.coordinates : [0, 0]),
1813
+ zoom: this.zoom
1814
+ })
1815
+ });
1816
+ if (this.center === undefined || this.center === null) {
1817
+ // if the center is not set, we set its default value
1818
+ if ('geolocation' in navigator) {
1819
+ navigator.geolocation.getCurrentPosition((position) => {
1820
+ this.center = {
1821
+ type: 'Point',
1822
+ coordinates: [position.coords.longitude, position.coords.latitude]
1823
+ };
1824
+ }, (error) => {
1825
+ this.center = {
1826
+ type: 'Point',
1827
+ coordinates: [0, 0]
1828
+ };
1829
+ });
1830
+ }
1831
+ else {
1832
+ this.center = {
1833
+ type: 'Point',
1834
+ coordinates: [0, 0]
1835
+ };
1836
+ }
1829
1837
  }
1830
1838
  else {
1831
- elementToFocus = body;
1839
+ // the center needs the map to be properly set, so if it was set before the map was initialized,
1840
+ // we set the center again to perform necessary adjustements
1841
+ this.center = this.center;
1842
+ }
1843
+ if (this.zoom === undefined || this.zoom === null) {
1844
+ // if the zoom is not set, we set its default value
1845
+ this.zoom = 18;
1846
+ }
1847
+ else {
1848
+ // the zoom needs the map to be properly set, so if it was set before the map was initialized,
1849
+ // we set the zoom again to perform necessary adjustements
1850
+ this.zoom = this.zoom;
1851
+ }
1852
+ if (this.readonly === undefined || this.readonly === null) {
1853
+ // if readonly is not set, we set its default value
1854
+ this.readonly = false;
1855
+ }
1856
+ else {
1857
+ // readonly needs the map to be properly set, so if it was set before the map was initialized,
1858
+ // we set readonly again to perform necessary adjustements
1859
+ this.readonly = this.readonly;
1860
+ }
1861
+ if (this.markerCoordinates !== undefined &&
1862
+ this.markerCoordinates !== null) {
1863
+ // the marker coordinates need the map to be properly set, so if they were set before the map was initialized,
1864
+ // we set the marker coordinates again to perform necessary adjustements
1865
+ this.markerCoordinates = this.markerCoordinates;
1832
1866
  }
1833
- elementToFocus.focus();
1834
- this._elWithFocus = null;
1835
1867
  }
1836
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModalWindowComponent, deps: [{ token: DOCUMENT }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1837
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: LuxModalWindowComponent, isStandalone: false, selector: "lux-modal-window", inputs: { ariaDescribedBy: "ariaDescribedBy", ariaLabelledBy: "ariaLabelledBy", backdrop: "backdrop", keyboard: "keyboard", windowClass: "windowClass" }, outputs: { dismissEvent: "dismissEvent" }, host: { listeners: { "click": "backdropClick($event.target)", "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: `
1838
- <div class="modal-dialog" role="document">
1839
- <div class="modal-content"><ng-content></ng-content></div>
1840
- </div>
1841
- `, isInline: true });
1842
- }
1843
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModalWindowComponent, decorators: [{
1844
- type: Component,
1845
- args: [{
1846
- standalone: false,
1847
- selector: 'lux-modal-window',
1848
- template: `
1849
- <div class="modal-dialog" role="document">
1850
- <div class="modal-content"><ng-content></ng-content></div>
1851
- </div>
1852
- `
1853
- }]
1854
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1855
- type: Inject,
1856
- args: [DOCUMENT]
1857
- }] }, { type: i0.ElementRef }], propDecorators: { ariaDescribedBy: [{
1858
- type: Input
1859
- }], ariaLabelledBy: [{
1860
- type: Input
1861
- }], backdrop: [{
1862
- type: Input
1863
- }], keyboard: [{
1864
- type: Input
1865
- }], windowClass: [{
1866
- type: Input
1867
- }], dismissEvent: [{
1868
+ addMarkerAtCoordinates(coordinates) {
1869
+ if (coordinates && coordinates.length === 2) {
1870
+ if (this._marker !== undefined) {
1871
+ this.removeMarker();
1872
+ }
1873
+ this._marker = new ol.Feature({
1874
+ geometry: new ol.geom.Point(
1875
+ // [lon, lat] is in EPSG:4326 (degrees), we transform it into EPSG:3857 (meters)
1876
+ ol.proj.transform(coordinates, 'EPSG:4326', 'EPSG:3857'))
1877
+ });
1878
+ this._markerSource.addFeature(this._marker);
1879
+ this._markerCoordinates = this.getMarkerCoordinates();
1880
+ if (!this.readonly) {
1881
+ const dragInteraction = new ol.interaction.Modify({
1882
+ features: new ol.Collection([this._marker]),
1883
+ style: this._markerStyle,
1884
+ pixelTolerance: 50,
1885
+ hitDetection: true
1886
+ });
1887
+ this._markerInteraction = dragInteraction;
1888
+ this._map.addInteraction(dragInteraction);
1889
+ }
1890
+ this._marker.on('change', () => {
1891
+ this._markerCoordinates = this.getMarkerCoordinates();
1892
+ }, this._marker);
1893
+ }
1894
+ }
1895
+ removeMarker() {
1896
+ if (this._marker !== undefined) {
1897
+ this._markerSource.removeFeature(this._marker);
1898
+ this._marker = undefined;
1899
+ }
1900
+ if (this._markerInteraction !== undefined) {
1901
+ this._map.getInteractions().pop();
1902
+ this._markerInteraction = undefined;
1903
+ }
1904
+ }
1905
+ getMarkerCoordinates() {
1906
+ if (this._marker === undefined || this._marker == null) {
1907
+ return this._marker;
1908
+ }
1909
+ const coordinates = this._marker.getGeometry().getCoordinates();
1910
+ // coordinates is in EPSG:3857 (meters), we transform it into EPSG:4326 (degrees)
1911
+ return ol.proj.transform(coordinates, 'EPSG:3857', 'EPSG:4326');
1912
+ }
1913
+ onResize() {
1914
+ if (this._map) {
1915
+ this._map.updateSize();
1916
+ }
1917
+ }
1918
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1919
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
1920
+ }
1921
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MapComponent, decorators: [{
1922
+ type: Component,
1923
+ args: [{ selector: 'lux-map', imports: [CommonModule], template: "<div [id]=\"mapId\" class=\"map\" (resized)=\"onResize()\"></div>\n", styles: [".map{min-height:100px;height:100%;min-width:160px;width:100%}\n"] }]
1924
+ }], ctorParameters: () => [], propDecorators: { mapId: [{
1925
+ type: Input
1926
+ }], zoom: [{
1927
+ type: Input
1928
+ }], center: [{
1929
+ type: Input
1930
+ }], readonly: [{
1931
+ type: Input
1932
+ }], markerCoordinates: [{
1933
+ type: Input
1934
+ }], markerPoint: [{
1935
+ type: Input
1936
+ }], valueChange: [{
1868
1937
  type: Output
1938
+ }] } });
1939
+
1940
+ class LuxModalBackdropComponent {
1941
+ backdropClass;
1942
+ class = 'modal-backdrop fade show';
1943
+ style = 'z-index: 1050';
1944
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxModalBackdropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1945
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: LuxModalBackdropComponent, isStandalone: true, selector: "lux-modal-backdrop", inputs: { backdropClass: "backdropClass" }, host: { properties: { "class": "this.class", "style": "this.style" } }, ngImport: i0, template: '', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
1946
+ }
1947
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxModalBackdropComponent, decorators: [{
1948
+ type: Component,
1949
+ args: [{
1950
+ imports: [CommonModule],
1951
+ selector: 'lux-modal-backdrop',
1952
+ template: ''
1953
+ }]
1954
+ }], propDecorators: { backdropClass: [{
1955
+ type: Input
1869
1956
  }], class: [{
1870
1957
  type: HostBinding,
1871
1958
  args: ['class']
1872
- }], role: [{
1873
- type: HostBinding,
1874
- args: ['attr.role']
1875
- }], tabindex: [{
1876
- type: HostBinding,
1877
- args: ['tabindex']
1878
- }], ariamodal: [{
1879
- type: HostBinding,
1880
- args: ['attr.aria-modal']
1881
- }], hostAriaLabelledBy: [{
1882
- type: HostBinding,
1883
- args: ['attr.aria-labelledby']
1884
- }], hostAriaDescribedBy: [{
1959
+ }], style: [{
1885
1960
  type: HostBinding,
1886
- args: ['attr.aria-describedby']
1887
- }], backdropClick: [{
1888
- type: HostListener,
1889
- args: ['click', ['$event.target']]
1890
- }], escKey: [{
1891
- type: HostListener,
1892
- args: ['keyup.esc', ['$event']]
1961
+ args: ['style']
1893
1962
  }] } });
1894
1963
 
1895
- class ModalStack {
1896
- _applicationRef;
1897
- _document;
1898
- _injector;
1899
- _rendererFactory;
1900
- modalConfig;
1901
- _activeWindowCmptHasChanged = new Subject();
1902
- _modalRefs = [];
1903
- _windowCmpts = [];
1904
- _ariaHiddenValues = new Map();
1905
- _backdropAttributes = ['backdropClass'];
1906
- _windowAttributes = [
1907
- 'ariaLabelledBy',
1908
- 'backdrop',
1909
- 'centered',
1910
- 'keyboard',
1911
- 'scrollable',
1912
- 'size',
1913
- 'windowClass'
1914
- ];
1915
- constructor(_applicationRef, _document, _injector, _rendererFactory, modalConfig) {
1916
- this._applicationRef = _applicationRef;
1917
- this._document = _document;
1918
- this._injector = _injector;
1919
- this._rendererFactory = _rendererFactory;
1920
- this.modalConfig = modalConfig;
1921
- this._activeWindowCmptHasChanged.subscribe(() => {
1922
- if (this._windowCmpts.length) {
1923
- const activeWindowCmpt = this._windowCmpts[this._windowCmpts.length - 1];
1924
- focusTrap(activeWindowCmpt.location.nativeElement, this._activeWindowCmptHasChanged);
1925
- this._revertAriaHidden();
1926
- this._setAriaHidden(activeWindowCmpt.location.nativeElement);
1927
- }
1928
- });
1929
- }
1930
- open(moduleCFR, content, options) {
1931
- const config = Object.assign({}, this.modalConfig, options);
1932
- const containerEl = this._document.body;
1933
- const renderer = this._rendererFactory.createRenderer(null, null);
1934
- const removeBodyClass = () => {
1935
- if (!this._modalRefs.length) {
1936
- renderer.removeClass(this._document.body, 'modal-open');
1937
- this._revertAriaHidden();
1938
- }
1939
- };
1940
- const activeModal = new ActiveModal();
1941
- const contentRef = this.getContentRef(moduleCFR, content, activeModal);
1942
- const backdropCmptRef = config.backdrop ? this._attachBackdrop(moduleCFR, containerEl) : null;
1943
- const windowCmptRef = this._attachWindowComponent(moduleCFR, containerEl, contentRef);
1944
- const modalRef = new ModalRef(windowCmptRef, contentRef, backdropCmptRef);
1945
- this._registerModalRef(modalRef);
1946
- this._registerWindowCmpt(windowCmptRef);
1947
- modalRef.result.then(removeBodyClass, removeBodyClass);
1948
- activeModal.close = (result) => {
1949
- modalRef.close(result);
1950
- };
1951
- activeModal.dismiss = (reason) => {
1952
- modalRef.dismiss(reason);
1953
- };
1954
- this._applyWindowOptions(windowCmptRef.instance, config);
1955
- if (this._modalRefs.length === 1) {
1956
- renderer.addClass(this._document.body, 'modal-open');
1957
- }
1958
- if (backdropCmptRef && backdropCmptRef.instance) {
1959
- this._applyBackgroundOptions(backdropCmptRef.instance, config);
1960
- backdropCmptRef.changeDetectorRef.detectChanges();
1964
+ class LuxModalConfig {
1965
+ backdrop = true;
1966
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxModalConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1967
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxModalConfig, providedIn: 'root' });
1968
+ }
1969
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxModalConfig, decorators: [{
1970
+ type: Injectable,
1971
+ args: [{ providedIn: 'root' }]
1972
+ }] });
1973
+
1974
+ class ActiveModal {
1975
+ close(result) { }
1976
+ dismiss(reason) { }
1977
+ }
1978
+ class ModalRef {
1979
+ _windowCmptRef;
1980
+ _contentRef;
1981
+ _backdropCmptRef;
1982
+ _beforeDismiss;
1983
+ _resolve;
1984
+ _reject;
1985
+ /**
1986
+ * The instance of a component used for the modal content.
1987
+ *
1988
+ * When a `TemplateRef` is used as the content, will return `undefined`.
1989
+ */
1990
+ get componentInstance() {
1991
+ if (this._contentRef.componentRef) {
1992
+ return this._contentRef.componentRef.instance;
1961
1993
  }
1962
- windowCmptRef.changeDetectorRef.detectChanges();
1963
- return modalRef;
1964
1994
  }
1965
- _applyWindowOptions(windowInstance, config) {
1966
- this._windowAttributes.forEach((optionName) => {
1967
- if (isDefined(config[optionName])) {
1968
- windowInstance[optionName] = config[optionName];
1969
- }
1995
+ /**
1996
+ * The promise that is resolved when the modal is closed and rejected when the modal is dismissed.
1997
+ */
1998
+ result;
1999
+ constructor(_windowCmptRef, _contentRef, _backdropCmptRef, _beforeDismiss) {
2000
+ this._windowCmptRef = _windowCmptRef;
2001
+ this._contentRef = _contentRef;
2002
+ this._backdropCmptRef = _backdropCmptRef;
2003
+ this._beforeDismiss = _beforeDismiss;
2004
+ _windowCmptRef.instance.dismissEvent.subscribe((reason) => {
2005
+ this.dismiss(reason);
1970
2006
  });
1971
- }
1972
- _applyBackgroundOptions(backgroudInstance, config) {
1973
- this._backdropAttributes.forEach((optionName) => {
1974
- if (isDefined(config[optionName])) {
1975
- backgroudInstance[optionName] = config[optionName];
1976
- }
2007
+ this.result = new Promise((resolve, reject) => {
2008
+ this._resolve = resolve;
2009
+ this._reject = reject;
1977
2010
  });
2011
+ this.result.then(null, () => { });
1978
2012
  }
1979
- _revertAriaHidden() {
1980
- this._ariaHiddenValues.forEach((value, element) => {
1981
- if (value) {
1982
- element.setAttribute('aria-hidden', value);
1983
- }
1984
- else {
1985
- element.removeAttribute('aria-hidden');
2013
+ /**
2014
+ * Closes the modal with an optional `result` value.
2015
+ *
2016
+ * The `NgbMobalRef.result` promise will be resolved with the provided value.
2017
+ */
2018
+ close(result) {
2019
+ if (this._windowCmptRef) {
2020
+ if (this._resolve) {
2021
+ this._resolve(result);
1986
2022
  }
1987
- });
1988
- this._ariaHiddenValues.clear();
2023
+ this._removeModalElements();
2024
+ }
1989
2025
  }
1990
- getContentRef(moduleCFR, content, activeModal) {
1991
- if (content instanceof TemplateRef) {
1992
- return this.createFromTemplateRef(content, activeModal);
2026
+ _dismiss(reason) {
2027
+ if (this._reject) {
2028
+ this._reject(reason);
1993
2029
  }
2030
+ this._removeModalElements();
1994
2031
  }
1995
- createFromTemplateRef(content, activeModal) {
1996
- const context = {
1997
- $implicit: activeModal,
1998
- close(result) {
1999
- activeModal.close(result);
2000
- },
2001
- dismiss(reason) {
2002
- activeModal.dismiss(reason);
2032
+ /**
2033
+ * Dismisses the modal with an optional `reason` value.
2034
+ *
2035
+ * The `NgbModalRef.result` promise will be rejected with the provided value.
2036
+ */
2037
+ dismiss(reason) {
2038
+ if (this._windowCmptRef) {
2039
+ if (!this._beforeDismiss) {
2040
+ this._dismiss(reason);
2003
2041
  }
2004
- };
2005
- const viewRef = content.createEmbeddedView(context);
2006
- this._applicationRef.attachView(viewRef);
2007
- return new ContentRef([viewRef.rootNodes], viewRef);
2008
- }
2009
- _attachBackdrop(moduleCFR, containerEl) {
2010
- const backdropFactory = moduleCFR.resolveComponentFactory(LuxModalBackdropComponent);
2011
- const backdropCmptRef = backdropFactory.create(this._injector);
2012
- this._applicationRef.attachView(backdropCmptRef.hostView);
2013
- containerEl.appendChild(backdropCmptRef.location.nativeElement);
2014
- return backdropCmptRef;
2015
- }
2016
- _attachWindowComponent(moduleCFR, containerEl, contentRef) {
2017
- const windowFactory = moduleCFR.resolveComponentFactory(LuxModalWindowComponent);
2018
- const windowCmptRef = windowFactory.create(this._injector, contentRef.nodes);
2019
- this._applicationRef.attachView(windowCmptRef.hostView);
2020
- containerEl.appendChild(windowCmptRef.location.nativeElement);
2021
- return windowCmptRef;
2022
- }
2023
- _registerModalRef(modalRef) {
2024
- const unregisterModalRef = () => {
2025
- const index = this._modalRefs.indexOf(modalRef);
2026
- if (index > -1) {
2027
- this._modalRefs.splice(index, 1);
2028
- }
2029
- };
2030
- this._modalRefs.push(modalRef);
2031
- modalRef.result.then(unregisterModalRef, unregisterModalRef);
2032
- }
2033
- _registerWindowCmpt(windowCmpt) {
2034
- this._windowCmpts.push(windowCmpt);
2035
- this._activeWindowCmptHasChanged.next(null);
2036
- windowCmpt.onDestroy(() => {
2037
- const index = this._windowCmpts.indexOf(windowCmpt);
2038
- if (index > -1) {
2039
- this._windowCmpts.splice(index, 1);
2040
- this._activeWindowCmptHasChanged.next(null);
2042
+ else {
2043
+ const dismiss = this._beforeDismiss();
2044
+ if (dismiss && dismiss.then) {
2045
+ dismiss.then((result) => {
2046
+ if (result !== false) {
2047
+ this._dismiss(reason);
2048
+ }
2049
+ }, () => { });
2050
+ }
2051
+ else if (dismiss !== false) {
2052
+ this._dismiss(reason);
2053
+ }
2041
2054
  }
2042
- });
2055
+ }
2043
2056
  }
2044
- _setAriaHidden(element) {
2045
- const parent = element.parentElement;
2046
- if (parent && element !== this._document.body) {
2047
- Array.from(parent.children).forEach((sibling) => {
2048
- if (sibling !== element && sibling.nodeName !== 'SCRIPT') {
2049
- this._ariaHiddenValues.set(sibling, sibling.getAttribute('aria-hidden'));
2050
- sibling.setAttribute('aria-hidden', 'true');
2051
- }
2052
- });
2053
- this._setAriaHidden(parent);
2057
+ _removeModalElements() {
2058
+ const windowNativeEl = this._windowCmptRef.location.nativeElement;
2059
+ windowNativeEl.parentNode.removeChild(windowNativeEl);
2060
+ this._windowCmptRef.destroy();
2061
+ if (this._backdropCmptRef) {
2062
+ const backdropNativeEl = this._backdropCmptRef.location.nativeElement;
2063
+ backdropNativeEl.parentNode.removeChild(backdropNativeEl);
2064
+ this._backdropCmptRef.destroy();
2065
+ }
2066
+ if (this._contentRef && this._contentRef.viewRef) {
2067
+ this._contentRef.viewRef.destroy();
2054
2068
  }
2069
+ this._windowCmptRef = null;
2070
+ this._backdropCmptRef = null;
2071
+ this._contentRef = null;
2055
2072
  }
2056
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ModalStack, deps: [{ token: i0.ApplicationRef }, { token: DOCUMENT }, { token: i0.Injector }, { token: i0.RendererFactory2 }, { token: LuxModalConfig }], target: i0.ɵɵFactoryTarget.Injectable });
2057
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ModalStack, providedIn: 'root' });
2058
2073
  }
2059
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ModalStack, decorators: [{
2060
- type: Injectable,
2061
- args: [{ providedIn: 'root' }]
2062
- }], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: undefined, decorators: [{
2063
- type: Inject,
2064
- args: [DOCUMENT]
2065
- }] }, { type: i0.Injector }, { type: i0.RendererFactory2 }, { type: LuxModalConfig }] });
2066
2074
 
2075
+ var ModalDismissReasons;
2076
+ (function (ModalDismissReasons) {
2077
+ ModalDismissReasons[ModalDismissReasons["BackdropClick"] = 0] = "BackdropClick";
2078
+ ModalDismissReasons[ModalDismissReasons["Esc"] = 1] = "Esc";
2079
+ })(ModalDismissReasons || (ModalDismissReasons = {}));
2080
+
2081
+ const FOCUS = 'focus';
2082
+ var Key;
2083
+ (function (Key) {
2084
+ Key[Key["Tab"] = 9] = "Tab";
2085
+ Key[Key["Enter"] = 13] = "Enter";
2086
+ Key[Key["Escape"] = 27] = "Escape";
2087
+ Key[Key["Space"] = 32] = "Space";
2088
+ Key[Key["PageUp"] = 33] = "PageUp";
2089
+ Key[Key["PageDown"] = 34] = "PageDown";
2090
+ Key[Key["End"] = 35] = "End";
2091
+ Key[Key["Home"] = 36] = "Home";
2092
+ Key[Key["ArrowLeft"] = 37] = "ArrowLeft";
2093
+ Key[Key["ArrowUp"] = 38] = "ArrowUp";
2094
+ Key[Key["ArrowRight"] = 39] = "ArrowRight";
2095
+ Key[Key["ArrowDown"] = 40] = "ArrowDown";
2096
+ })(Key || (Key = {}));
2097
+ const isDefined = (value) => value !== undefined && value !== null;
2098
+ class ContentRef {
2099
+ nodes;
2100
+ viewRef;
2101
+ componentRef;
2102
+ constructor(nodes, viewRef, componentRef) {
2103
+ this.nodes = nodes;
2104
+ this.viewRef = viewRef;
2105
+ this.componentRef = componentRef;
2106
+ }
2107
+ }
2108
+ const FOCUSABLE_ELEMENTS_SELECTOR = [
2109
+ 'a[href]',
2110
+ 'button:not([disabled])',
2111
+ 'input:not([disabled]):not([type="hidden"])',
2112
+ 'select:not([disabled])',
2113
+ 'textarea:not([disabled])',
2114
+ '[contenteditable]',
2115
+ '[tabindex]:not([tabindex="-1"])'
2116
+ ].join(', ');
2067
2117
  /**
2068
- * A service that it allow open an close modal components
2118
+ * Returns first and last focusable elements inside of a given element based on specific CSS selector
2069
2119
  */
2070
- class ModalService {
2071
- modalStack;
2072
- moduleCFR;
2073
- constructor(modalStack, moduleCFR) {
2074
- this.modalStack = modalStack;
2075
- this.moduleCFR = moduleCFR;
2076
- }
2077
- /**Open a modal component
2078
- * @param content TemplateRef
2079
- */
2080
- open(content, options = {}) {
2081
- return this.modalStack.open(this.moduleCFR, content, options);
2120
+ const getFocusableBoundaryElements = (element) => {
2121
+ const list = Array.from(element.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR)).filter((el) => el.tabIndex !== -1);
2122
+ return [list[0], list[list.length - 1]];
2123
+ };
2124
+ /**
2125
+ * Function that enforces browser focus to be trapped inside a DOM element.
2126
+ *
2127
+ * Works only for clicks inside the element and navigation with 'Tab', ignoring clicks outside of the element
2128
+ *
2129
+ * @param element The element around which focus will be trapped inside
2130
+ * @param stopFocusTrap$ The observable stream. When completed the focus trap will clean up listeners
2131
+ * and free internal resources
2132
+ * @param refocusOnClick Put the focus back to the last focused element whenever a click occurs on element (default to
2133
+ * false)
2134
+ */
2135
+ const focusTrap = (element, stopFocusTrap$, refocusOnClick = false) => {
2136
+ // last focused element
2137
+ const lastFocusedElement$ = fromEvent(element, 'focusin').pipe(takeUntil(stopFocusTrap$), map((e) => e.target));
2138
+ // 'tab' / 'shift+tab' stream
2139
+ fromEvent(element, 'keydown')
2140
+ .pipe(takeUntil(stopFocusTrap$), filter((e) => e.which === Key.Tab), withLatestFrom(lastFocusedElement$))
2141
+ .subscribe(([tabEvent, focusedElement]) => {
2142
+ const [first, last] = getFocusableBoundaryElements(element);
2143
+ if ((focusedElement === first || focusedElement === element) &&
2144
+ tabEvent.shiftKey) {
2145
+ last.focus();
2146
+ tabEvent.preventDefault();
2147
+ }
2148
+ if (focusedElement === last && !tabEvent.shiftKey) {
2149
+ first.focus();
2150
+ tabEvent.preventDefault();
2151
+ }
2152
+ });
2153
+ // inside click
2154
+ if (refocusOnClick) {
2155
+ fromEvent(element, 'click')
2156
+ .pipe(takeUntil(stopFocusTrap$), withLatestFrom(lastFocusedElement$), map((arr) => arr[1]))
2157
+ .subscribe((lastFocusedElement) => lastFocusedElement.focus());
2082
2158
  }
2083
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ModalService, deps: [{ token: ModalStack }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
2084
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ModalService, providedIn: 'root' });
2085
- }
2086
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ModalService, decorators: [{
2087
- type: Injectable,
2088
- args: [{ providedIn: 'root' }]
2089
- }], ctorParameters: () => [{ type: ModalStack }, { type: i0.ComponentFactoryResolver }] });
2159
+ };
2090
2160
 
2091
- class GeolocationService {
2092
- http;
2093
- debouncePeriodMs = 300; // ms
2094
- cacheSize = 20;
2095
- lastQueriesWithResults = new Map();
2096
- lastQueriesLru = [];
2097
- currentSearch$;
2098
- currentQuery$;
2099
- constructor(http) {
2100
- this.http = http;
2101
- this.currentSearch$ = new Subject();
2102
- const typed$ = this.currentSearch$
2103
- .asObservable()
2104
- .pipe(distinctUntilChanged());
2105
- this.currentQuery$ = typed$.pipe(debounceTime(this.debouncePeriodMs), switchMap((currentQuery) => {
2106
- const data = this.getFromCache(currentQuery);
2107
- if (data !== undefined) {
2108
- return of(data);
2109
- }
2110
- // Nominatim search documentation:
2111
- // https://nominatim.org/release-docs/develop/api/Search/
2112
- const url = 'https://nominatim.openstreetmap.org/search?format=json&limit=20&q=' +
2113
- encodeURIComponent(currentQuery);
2114
- const headers = {
2115
- 'Content-Type': 'application/json'
2116
- };
2117
- this.addToCache(currentQuery, []);
2118
- return this.http.get(url, { headers }).pipe(map((response) => {
2119
- const searchResults = response;
2120
- const uniqueResults = distinct(searchResults);
2121
- return this.addToCache(currentQuery, uniqueResults);
2122
- }));
2123
- }));
2124
- }
2125
- searchGeolocation(query) {
2126
- this.currentSearch$.next(query);
2127
- return this.currentQuery$;
2161
+ class LuxModalWindowComponent {
2162
+ _document = inject(DOCUMENT);
2163
+ _elRef = inject(ElementRef);
2164
+ _elWithFocus; // element that is focused prior to modal opening
2165
+ ariaDescribedBy;
2166
+ ariaLabelledBy;
2167
+ backdrop = false;
2168
+ keyboard = true;
2169
+ windowClass;
2170
+ dismissEvent = new EventEmitter();
2171
+ get class() {
2172
+ return `modal ${this.windowClass || ''}`;
2128
2173
  }
2129
- getLabels(instance, keys) {
2130
- const searchResults = instance.lastQueriesWithResults
2131
- .get(instance.getLatestQuery())
2132
- .filter((searchResult) => samePosition(searchResult, keys));
2133
- return of(searchResults.map((searchResult) => {
2134
- const key = {
2135
- type: 'Point',
2136
- coordinates: [searchResult.lon, searchResult.lat]
2137
- };
2138
- return {
2139
- key,
2140
- label: searchResult.display_name
2141
- };
2142
- }));
2174
+ role = 'dialog';
2175
+ tabindex = '-1';
2176
+ ariamodal = true;
2177
+ get hostAriaLabelledBy() {
2178
+ return this.ariaLabelledBy;
2143
2179
  }
2144
- getData(instance, search) {
2145
- return instance.searchGeolocation(search).pipe(map((searchResults) => searchResults.map((searchResult) => {
2146
- const key = {
2147
- type: 'Point',
2148
- coordinates: [searchResult.lon, searchResult.lat]
2149
- };
2150
- const label = searchResult.display_name;
2151
- return { key, label };
2152
- })));
2180
+ get hostAriaDescribedBy() {
2181
+ return this.ariaDescribedBy;
2153
2182
  }
2154
- // Cache implemementation ---
2155
- getFromCache(query) {
2156
- if (this.lastQueriesWithResults.has(query)) {
2157
- return this.lastQueriesWithResults.get(query);
2183
+ backdropClick(btn) {
2184
+ if (this.backdrop === true && this._elRef.nativeElement === btn) {
2185
+ this.dismiss(ModalDismissReasons.BackdropClick);
2158
2186
  }
2159
- return undefined;
2160
2187
  }
2161
- addToCache(query, data) {
2162
- if (this.lastQueriesWithResults.keys.length >= this.cacheSize) {
2163
- const deletedQuery = this.lastQueriesLru[0];
2164
- this.revomeFromCache(deletedQuery);
2188
+ escKey(event) {
2189
+ if (this.keyboard && !event.defaultPrevented) {
2190
+ this.dismiss(ModalDismissReasons.Esc);
2165
2191
  }
2166
- this.lastQueriesWithResults.set(query, data);
2167
- this.lastQueriesLru.push(query);
2168
- return data;
2169
2192
  }
2170
- revomeFromCache(query) {
2171
- this.lastQueriesWithResults.delete(query);
2172
- const index = this.lastQueriesLru.findIndex((it) => it === query);
2173
- this.lastQueriesLru.splice(index, 1);
2193
+ dismiss(reason) {
2194
+ this.dismissEvent.emit(reason);
2174
2195
  }
2175
- getLatestQuery() {
2176
- return this.lastQueriesLru.length
2177
- ? this.lastQueriesLru[this.lastQueriesLru.length - 1]
2178
- : null;
2196
+ ngOnInit() {
2197
+ this._elWithFocus = this._document.activeElement;
2179
2198
  }
2180
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GeolocationService, deps: [{ token: i1$3.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
2181
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GeolocationService, providedIn: 'root' });
2182
- }
2183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GeolocationService, decorators: [{
2184
- type: Injectable,
2185
- args: [{ providedIn: 'root' }]
2186
- }], ctorParameters: () => [{ type: i1$3.HttpClient }] });
2187
- const samePosition = (searchResult, keys) => {
2188
- let found = false;
2189
- keys.forEach((item) => {
2190
- if (searchResult.lon === item.coordinates[0] &&
2191
- searchResult.lat === item.coordinates[1]) {
2192
- found = true;
2193
- }
2194
- });
2195
- return found;
2196
- };
2197
- const distinct = (data) => {
2198
- const unique = {};
2199
- return data.filter((r) => {
2200
- if (unique[r.display_name]) {
2201
- return false;
2199
+ ngAfterViewInit() {
2200
+ if (!this._elRef.nativeElement.contains(document.activeElement)) {
2201
+ const firstFocusable = getFocusableBoundaryElements(this._elRef.nativeElement)[0];
2202
+ const elementToFocus = firstFocusable || this._elRef.nativeElement;
2203
+ elementToFocus.focus();
2202
2204
  }
2203
- unique[r.display_name] = 1;
2204
- return true;
2205
- });
2206
- };
2207
-
2208
- let openLayersIsInstalled = false;
2209
- class OpenLayerLoaderService {
2210
- load() {
2211
- if (window.ol) {
2212
- return of(true);
2205
+ }
2206
+ ngOnDestroy() {
2207
+ const body = this._document.body;
2208
+ const elWithFocus = this._elWithFocus;
2209
+ let elementToFocus;
2210
+ if (elWithFocus && elWithFocus[FOCUS] && body.contains(elWithFocus)) {
2211
+ elementToFocus = elWithFocus;
2213
2212
  }
2214
- const openLayerJsUrl = 'https://openlayers.org/en/v5.3.0/build/ol.js';
2215
- const openLayerCssUrl = 'https://openlayers.org/en/v5.3.0/css/ol.css';
2216
- if (!openLayersIsInstalled) {
2217
- openLayersIsInstalled = true; // only try to install it once
2218
- loadCss(openLayerCssUrl, () => { });
2219
- return from(new Promise((resolve, _) => {
2220
- loadScript(openLayerJsUrl, () => resolve(true));
2221
- }));
2213
+ else {
2214
+ elementToFocus = body;
2222
2215
  }
2223
- return of(true);
2216
+ elementToFocus.focus();
2217
+ this._elWithFocus = null;
2224
2218
  }
2225
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenLayerLoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2226
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenLayerLoaderService, providedIn: 'root' });
2219
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxModalWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2220
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", 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.target)", "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
+ <div class="modal-dialog" role="document">
2222
+ <div class="modal-content"><ng-content></ng-content></div>
2223
+ </div>
2224
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
2227
2225
  }
2228
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenLayerLoaderService, decorators: [{
2229
- type: Injectable,
2230
- args: [{ providedIn: 'root' }]
2231
- }] });
2232
- /** Dynamically load a script from url and return a callback */
2233
- const loadScript = (url, callback) => {
2234
- const script = document.createElement('script');
2235
- script.type = 'text/javascript';
2236
- if (script.readyState) {
2237
- // for old IE
2238
- script.onreadystatechange = () => {
2239
- if (script.readyState === 'loaded' || script.readyState === 'complete') {
2240
- script.onreadystatechange = null;
2241
- callback();
2242
- }
2243
- };
2244
- }
2245
- else {
2246
- // Others browsers
2247
- script.onload = () => {
2248
- callback();
2249
- };
2250
- }
2251
- script.src = url;
2252
- document.getElementsByTagName('head')[0].appendChild(script);
2253
- };
2254
- /** Dynamically load css from url and return a callback */
2255
- const loadCss = (url, callback) => {
2256
- const link = document.createElement('link');
2257
- link.type = 'text/css';
2258
- link.rel = 'stylesheet';
2259
- link.type = 'text/javascript';
2260
- link.href = url;
2261
- link.onload = () => {
2262
- callback();
2263
- };
2264
- document.getElementsByTagName('head')[0].appendChild(link);
2265
- };
2226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxModalWindowComponent, decorators: [{
2227
+ type: Component,
2228
+ args: [{
2229
+ selector: 'lux-modal-window',
2230
+ imports: [CommonModule],
2231
+ template: `
2232
+ <div class="modal-dialog" role="document">
2233
+ <div class="modal-content"><ng-content></ng-content></div>
2234
+ </div>
2235
+ `
2236
+ }]
2237
+ }], propDecorators: { ariaDescribedBy: [{
2238
+ type: Input
2239
+ }], ariaLabelledBy: [{
2240
+ type: Input
2241
+ }], backdrop: [{
2242
+ type: Input
2243
+ }], keyboard: [{
2244
+ type: Input
2245
+ }], windowClass: [{
2246
+ type: Input
2247
+ }], dismissEvent: [{
2248
+ type: Output
2249
+ }], class: [{
2250
+ type: HostBinding,
2251
+ args: ['class']
2252
+ }], role: [{
2253
+ type: HostBinding,
2254
+ args: ['attr.role']
2255
+ }], tabindex: [{
2256
+ type: HostBinding,
2257
+ args: ['tabindex']
2258
+ }], ariamodal: [{
2259
+ type: HostBinding,
2260
+ args: ['attr.aria-modal']
2261
+ }], hostAriaLabelledBy: [{
2262
+ type: HostBinding,
2263
+ args: ['attr.aria-labelledby']
2264
+ }], hostAriaDescribedBy: [{
2265
+ type: HostBinding,
2266
+ args: ['attr.aria-describedby']
2267
+ }], backdropClick: [{
2268
+ type: HostListener,
2269
+ args: ['click', ['$event.target']]
2270
+ }], escKey: [{
2271
+ type: HostListener,
2272
+ args: ['keyup.esc', ['$event']]
2273
+ }] } });
2266
2274
 
2267
- /* eslint-disable no-self-assign */
2268
- class MapComponent {
2269
- static idCounter = 0;
2270
- loaded$ = new BehaviorSubject(false);
2271
- _map;
2272
- mapId;
2273
- _zoom;
2274
- set zoom(zoom) {
2275
- if (!isNaN(zoom)) {
2276
- this._zoom = zoom;
2277
- if (this._map) {
2278
- this._map.getView().setZoom(zoom);
2279
- }
2280
- }
2281
- }
2282
- get zoom() {
2283
- return this._zoom;
2284
- }
2285
- _center;
2286
- set center(center) {
2287
- if (center && center.coordinates && center.coordinates.length === 2) {
2288
- this._center = center;
2289
- if (this._map) {
2290
- this._map.getView().setCenter(ol.proj.fromLonLat(center.coordinates));
2275
+ class ModalStack {
2276
+ _applicationRef = inject(ApplicationRef);
2277
+ _document = inject(DOCUMENT);
2278
+ _injector = inject(Injector);
2279
+ _rendererFactory = inject(RendererFactory2);
2280
+ modalConfig = inject(LuxModalConfig);
2281
+ _activeWindowCmptHasChanged = new Subject();
2282
+ _modalRefs = [];
2283
+ _windowCmpts = [];
2284
+ _ariaHiddenValues = new Map();
2285
+ _backdropAttributes = ['backdropClass'];
2286
+ _windowAttributes = [
2287
+ 'ariaLabelledBy',
2288
+ 'backdrop',
2289
+ 'centered',
2290
+ 'keyboard',
2291
+ 'scrollable',
2292
+ 'size',
2293
+ 'windowClass'
2294
+ ];
2295
+ constructor() {
2296
+ this._activeWindowCmptHasChanged.subscribe(() => {
2297
+ if (this._windowCmpts.length) {
2298
+ const activeWindowCmpt = this._windowCmpts[this._windowCmpts.length - 1];
2299
+ focusTrap(activeWindowCmpt.location.nativeElement, this._activeWindowCmptHasChanged);
2300
+ this._revertAriaHidden();
2301
+ this._setAriaHidden(activeWindowCmpt.location.nativeElement);
2291
2302
  }
2292
- }
2293
- }
2294
- get center() {
2295
- return this._center;
2303
+ });
2296
2304
  }
2297
- _readonly;
2298
- set readonly(readonly) {
2299
- if (!readonly) {
2300
- if (this._map) {
2301
- this._map.on('click', (args) => {
2302
- // args.coordinate is in EPSG:3857 (meters), we transform it into EPSG:4326 (degrees)
2303
- const coordinates = ol.proj.toLonLat(args.coordinate);
2304
- // alternatively: const lonLat = ol.proj.transform(args.coordinate,'EPSG:3857','EPSG:4326');
2305
- this.addMarkerAtCoordinates(coordinates);
2306
- });
2307
- this._map.on('pointermove', (event) => {
2308
- const pixel = this._map.getEventPixel(event.originalEvent);
2309
- const hit = this._map.hasFeatureAtPixel(pixel);
2310
- this._map.getViewport().style.cursor = hit ? 'move' : 'grab';
2311
- });
2305
+ open(moduleCFR, content, options) {
2306
+ const config = Object.assign({}, this.modalConfig, options);
2307
+ const containerEl = this._document.body;
2308
+ const renderer = this._rendererFactory.createRenderer(null, null);
2309
+ const removeBodyClass = () => {
2310
+ if (!this._modalRefs.length) {
2311
+ renderer.removeClass(this._document.body, 'modal-open');
2312
+ this._revertAriaHidden();
2312
2313
  }
2314
+ };
2315
+ const activeModal = new ActiveModal();
2316
+ const contentRef = this.getContentRef(moduleCFR, content, activeModal);
2317
+ const backdropCmptRef = config.backdrop ? this._attachBackdrop(moduleCFR, containerEl) : null;
2318
+ const windowCmptRef = this._attachWindowComponent(moduleCFR, containerEl, contentRef);
2319
+ const modalRef = new ModalRef(windowCmptRef, contentRef, backdropCmptRef);
2320
+ this._registerModalRef(modalRef);
2321
+ this._registerWindowCmpt(windowCmptRef);
2322
+ modalRef.result.then(removeBodyClass, removeBodyClass);
2323
+ activeModal.close = (result) => {
2324
+ modalRef.close(result);
2325
+ };
2326
+ activeModal.dismiss = (reason) => {
2327
+ modalRef.dismiss(reason);
2328
+ };
2329
+ this._applyWindowOptions(windowCmptRef.instance, config);
2330
+ if (this._modalRefs.length === 1) {
2331
+ renderer.addClass(this._document.body, 'modal-open');
2313
2332
  }
2314
- else {
2315
- if (this._map) {
2316
- this._map.on('click', (args) => { });
2317
- this._map.on('pointermove', (event) => { });
2318
- this._map.getViewport().style.cursor = 'grab';
2319
- }
2333
+ if (backdropCmptRef && backdropCmptRef.instance) {
2334
+ this._applyBackgroundOptions(backdropCmptRef.instance, config);
2335
+ backdropCmptRef.changeDetectorRef.detectChanges();
2320
2336
  }
2321
- this._readonly = readonly;
2322
- // reset marker coordinates so marker interactions can be created or recreated accordingly
2323
- // to the changes to readonly
2324
- this.markerCoordinates = this.markerCoordinates;
2325
- }
2326
- get readonly() {
2327
- return this._readonly;
2337
+ windowCmptRef.changeDetectorRef.detectChanges();
2338
+ return modalRef;
2328
2339
  }
2329
- _marker;
2330
- _markerInteraction;
2331
- _markerCoordinates;
2332
- set markerCoordinates(markerCoordinates) {
2333
- if (markerCoordinates && markerCoordinates.length === 2) {
2334
- this._markerCoordinates = markerCoordinates;
2335
- if (this._map) {
2336
- this.addMarkerAtCoordinates(markerCoordinates);
2340
+ _applyWindowOptions(windowInstance, config) {
2341
+ this._windowAttributes.forEach((optionName) => {
2342
+ if (isDefined(config[optionName])) {
2343
+ windowInstance[optionName] = config[optionName];
2337
2344
  }
2338
- }
2339
- else {
2340
- this._markerCoordinates = undefined;
2341
- if (this._map) {
2342
- this.removeMarker();
2345
+ });
2346
+ }
2347
+ _applyBackgroundOptions(backgroudInstance, config) {
2348
+ this._backdropAttributes.forEach((optionName) => {
2349
+ if (isDefined(config[optionName])) {
2350
+ backgroudInstance[optionName] = config[optionName];
2343
2351
  }
2344
- }
2352
+ });
2345
2353
  }
2346
- get markerCoordinates() {
2347
- return this._markerCoordinates;
2354
+ _revertAriaHidden() {
2355
+ this._ariaHiddenValues.forEach((value, element) => {
2356
+ if (value) {
2357
+ element.setAttribute('aria-hidden', value);
2358
+ }
2359
+ else {
2360
+ element.removeAttribute('aria-hidden');
2361
+ }
2362
+ });
2363
+ this._ariaHiddenValues.clear();
2348
2364
  }
2349
- set markerPoint(markerPoint) {
2350
- if (!markerPoint ||
2351
- !(markerPoint.coordinates && markerPoint.coordinates.length === 2)) {
2352
- this.markerCoordinates = undefined;
2353
- }
2354
- else {
2355
- this.markerCoordinates = [
2356
- +markerPoint.coordinates[0],
2357
- +markerPoint.coordinates[1]
2358
- ];
2365
+ getContentRef(moduleCFR, content, activeModal) {
2366
+ if (content instanceof TemplateRef) {
2367
+ return this.createFromTemplateRef(content, activeModal);
2359
2368
  }
2360
- this.valueChange.emit(markerPoint);
2361
2369
  }
2362
- get markerPoint() {
2363
- return {
2364
- type: 'Point',
2365
- coordinates: this.markerCoordinates
2370
+ createFromTemplateRef(content, activeModal) {
2371
+ const context = {
2372
+ $implicit: activeModal,
2373
+ close(result) {
2374
+ activeModal.close(result);
2375
+ },
2376
+ dismiss(reason) {
2377
+ activeModal.dismiss(reason);
2378
+ }
2366
2379
  };
2380
+ const viewRef = content.createEmbeddedView(context);
2381
+ this._applicationRef.attachView(viewRef);
2382
+ return new ContentRef([viewRef.rootNodes], viewRef);
2367
2383
  }
2368
- valueChange = new EventEmitter();
2369
- _markerSource;
2370
- _markerStyle;
2371
- constructor(olLoader) {
2372
- olLoader.load().subscribe((_) => {
2373
- // Initialize
2374
- this._markerSource = new ol.source.Vector();
2375
- this._markerStyle = new ol.style.Style({
2376
- image: new ol.style.Icon({
2377
- anchor: [0.5, 1],
2378
- scale: 0.25,
2379
- src: '/assets/img/marker.png'
2380
- })
2381
- });
2382
- this.loaded$.next(true);
2383
- });
2384
- }
2385
- ngOnInit() {
2386
- this.mapId = this.mapId ? this.mapId : 'map' + MapComponent.idCounter++;
2384
+ _attachBackdrop(moduleCFR, containerEl) {
2385
+ const backdropFactory = moduleCFR.resolveComponentFactory(LuxModalBackdropComponent);
2386
+ const backdropCmptRef = backdropFactory.create(this._injector);
2387
+ this._applicationRef.attachView(backdropCmptRef.hostView);
2388
+ containerEl.appendChild(backdropCmptRef.location.nativeElement);
2389
+ return backdropCmptRef;
2387
2390
  }
2388
- ngAfterViewInit() {
2389
- this.loaded$.subscribe((loaded) => {
2390
- if (loaded) {
2391
- this.initMap();
2392
- }
2393
- });
2391
+ _attachWindowComponent(moduleCFR, containerEl, contentRef) {
2392
+ const windowFactory = moduleCFR.resolveComponentFactory(LuxModalWindowComponent);
2393
+ const windowCmptRef = windowFactory.create(this._injector, contentRef.nodes);
2394
+ this._applicationRef.attachView(windowCmptRef.hostView);
2395
+ containerEl.appendChild(windowCmptRef.location.nativeElement);
2396
+ return windowCmptRef;
2394
2397
  }
2395
- initMap() {
2396
- this._map = new ol.Map({
2397
- target: this.mapId,
2398
- controls: ol.control.defaults({ attribution: false }),
2399
- layers: [
2400
- new ol.layer.Tile({
2401
- source: new ol.source.OSM()
2402
- }),
2403
- new ol.layer.Vector({
2404
- source: this._markerSource,
2405
- style: this._markerStyle
2406
- })
2407
- ],
2408
- view: new ol.View({
2409
- center: ol.proj.fromLonLat(this.center !== undefined ? this.center.coordinates : [0, 0]),
2410
- zoom: this.zoom
2411
- })
2412
- });
2413
- if (this.center === undefined || this.center === null) {
2414
- // if the center is not set, we set its default value
2415
- if ('geolocation' in navigator) {
2416
- navigator.geolocation.getCurrentPosition((position) => {
2417
- this.center = {
2418
- type: 'Point',
2419
- coordinates: [position.coords.longitude, position.coords.latitude]
2420
- };
2421
- }, (error) => {
2422
- this.center = {
2423
- type: 'Point',
2424
- coordinates: [0, 0]
2425
- };
2426
- });
2427
- }
2428
- else {
2429
- this.center = {
2430
- type: 'Point',
2431
- coordinates: [0, 0]
2432
- };
2398
+ _registerModalRef(modalRef) {
2399
+ const unregisterModalRef = () => {
2400
+ const index = this._modalRefs.indexOf(modalRef);
2401
+ if (index > -1) {
2402
+ this._modalRefs.splice(index, 1);
2433
2403
  }
2434
- }
2435
- else {
2436
- // the center needs the map to be properly set, so if it was set before the map was initialized,
2437
- // we set the center again to perform necessary adjustements
2438
- this.center = this.center;
2439
- }
2440
- if (this.zoom === undefined || this.zoom === null) {
2441
- // if the zoom is not set, we set its default value
2442
- this.zoom = 18;
2443
- }
2444
- else {
2445
- // the zoom needs the map to be properly set, so if it was set before the map was initialized,
2446
- // we set the zoom again to perform necessary adjustements
2447
- this.zoom = this.zoom;
2448
- }
2449
- if (this.readonly === undefined || this.readonly === null) {
2450
- // if readonly is not set, we set its default value
2451
- this.readonly = false;
2452
- }
2453
- else {
2454
- // readonly needs the map to be properly set, so if it was set before the map was initialized,
2455
- // we set readonly again to perform necessary adjustements
2456
- this.readonly = this.readonly;
2457
- }
2458
- if (this.markerCoordinates !== undefined &&
2459
- this.markerCoordinates !== null) {
2460
- // the marker coordinates need the map to be properly set, so if they were set before the map was initialized,
2461
- // we set the marker coordinates again to perform necessary adjustements
2462
- this.markerCoordinates = this.markerCoordinates;
2463
- }
2404
+ };
2405
+ this._modalRefs.push(modalRef);
2406
+ modalRef.result.then(unregisterModalRef, unregisterModalRef);
2464
2407
  }
2465
- addMarkerAtCoordinates(coordinates) {
2466
- if (coordinates && coordinates.length === 2) {
2467
- if (this._marker !== undefined) {
2468
- this.removeMarker();
2408
+ _registerWindowCmpt(windowCmpt) {
2409
+ this._windowCmpts.push(windowCmpt);
2410
+ this._activeWindowCmptHasChanged.next(null);
2411
+ windowCmpt.onDestroy(() => {
2412
+ const index = this._windowCmpts.indexOf(windowCmpt);
2413
+ if (index > -1) {
2414
+ this._windowCmpts.splice(index, 1);
2415
+ this._activeWindowCmptHasChanged.next(null);
2469
2416
  }
2470
- this._marker = new ol.Feature({
2471
- geometry: new ol.geom.Point(
2472
- // [lon, lat] is in EPSG:4326 (degrees), we transform it into EPSG:3857 (meters)
2473
- ol.proj.transform(coordinates, 'EPSG:4326', 'EPSG:3857'))
2417
+ });
2418
+ }
2419
+ _setAriaHidden(element) {
2420
+ const parent = element.parentElement;
2421
+ if (parent && element !== this._document.body) {
2422
+ Array.from(parent.children).forEach((sibling) => {
2423
+ if (sibling !== element && sibling.nodeName !== 'SCRIPT') {
2424
+ this._ariaHiddenValues.set(sibling, sibling.getAttribute('aria-hidden'));
2425
+ sibling.setAttribute('aria-hidden', 'true');
2426
+ }
2474
2427
  });
2475
- this._markerSource.addFeature(this._marker);
2476
- this._markerCoordinates = this.getMarkerCoordinates();
2477
- if (!this.readonly) {
2478
- const dragInteraction = new ol.interaction.Modify({
2479
- features: new ol.Collection([this._marker]),
2480
- style: this._markerStyle,
2481
- pixelTolerance: 50,
2482
- hitDetection: true
2483
- });
2484
- this._markerInteraction = dragInteraction;
2485
- this._map.addInteraction(dragInteraction);
2486
- }
2487
- this._marker.on('change', () => {
2488
- this._markerCoordinates = this.getMarkerCoordinates();
2489
- }, this._marker);
2428
+ this._setAriaHidden(parent);
2490
2429
  }
2491
2430
  }
2492
- removeMarker() {
2493
- if (this._marker !== undefined) {
2494
- this._markerSource.removeFeature(this._marker);
2495
- this._marker = undefined;
2496
- }
2497
- if (this._markerInteraction !== undefined) {
2498
- this._map.getInteractions().pop();
2499
- this._markerInteraction = undefined;
2500
- }
2431
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ModalStack, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2432
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ModalStack, providedIn: 'root' });
2433
+ }
2434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ModalStack, decorators: [{
2435
+ type: Injectable,
2436
+ args: [{ providedIn: 'root' }]
2437
+ }], ctorParameters: () => [] });
2438
+
2439
+ /**
2440
+ * A service that it allow open an close modal components
2441
+ */
2442
+ class ModalService {
2443
+ modalStack = inject(ModalStack);
2444
+ moduleCFR = inject(ComponentFactoryResolver);
2445
+ /**Open a modal component
2446
+ * @param content TemplateRef
2447
+ */
2448
+ open(content, options = {}) {
2449
+ return this.modalStack.open(this.moduleCFR, content, options);
2501
2450
  }
2502
- getMarkerCoordinates() {
2503
- if (this._marker === undefined || this._marker == null) {
2504
- return this._marker;
2451
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2452
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ModalService, providedIn: 'root' });
2453
+ }
2454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: ModalService, decorators: [{
2455
+ type: Injectable,
2456
+ args: [{ providedIn: 'root' }]
2457
+ }] });
2458
+
2459
+ class GeolocationService {
2460
+ http = inject(HttpClient);
2461
+ debouncePeriodMs = 300; // ms
2462
+ cacheSize = 20;
2463
+ lastQueriesWithResults = new Map();
2464
+ lastQueriesLru = [];
2465
+ currentSearch$;
2466
+ currentQuery$;
2467
+ constructor() {
2468
+ this.currentSearch$ = new Subject();
2469
+ const typed$ = this.currentSearch$
2470
+ .asObservable()
2471
+ .pipe(distinctUntilChanged());
2472
+ this.currentQuery$ = typed$.pipe(debounceTime(this.debouncePeriodMs), switchMap((currentQuery) => {
2473
+ const data = this.getFromCache(currentQuery);
2474
+ if (data !== undefined) {
2475
+ return of(data);
2476
+ }
2477
+ // Nominatim search documentation:
2478
+ // https://nominatim.org/release-docs/develop/api/Search/
2479
+ const url = 'https://nominatim.openstreetmap.org/search?format=json&limit=20&q=' +
2480
+ encodeURIComponent(currentQuery);
2481
+ const headers = {
2482
+ 'Content-Type': 'application/json'
2483
+ };
2484
+ this.addToCache(currentQuery, []);
2485
+ return this.http.get(url, { headers }).pipe(map((response) => {
2486
+ const searchResults = response;
2487
+ const uniqueResults = distinct(searchResults);
2488
+ return this.addToCache(currentQuery, uniqueResults);
2489
+ }));
2490
+ }));
2491
+ }
2492
+ searchGeolocation(query) {
2493
+ this.currentSearch$.next(query);
2494
+ return this.currentQuery$;
2495
+ }
2496
+ getLabels(instance, keys) {
2497
+ const searchResults = instance.lastQueriesWithResults
2498
+ .get(instance.getLatestQuery())
2499
+ .filter((searchResult) => samePosition(searchResult, keys));
2500
+ return of(searchResults.map((searchResult) => {
2501
+ const key = {
2502
+ type: 'Point',
2503
+ coordinates: [searchResult.lon, searchResult.lat]
2504
+ };
2505
+ return {
2506
+ key,
2507
+ label: searchResult.display_name
2508
+ };
2509
+ }));
2510
+ }
2511
+ getData(instance, search) {
2512
+ return instance.searchGeolocation(search).pipe(map((searchResults) => searchResults.map((searchResult) => {
2513
+ const key = {
2514
+ type: 'Point',
2515
+ coordinates: [searchResult.lon, searchResult.lat]
2516
+ };
2517
+ const label = searchResult.display_name;
2518
+ return { key, label };
2519
+ })));
2520
+ }
2521
+ // Cache implemementation ---
2522
+ getFromCache(query) {
2523
+ if (this.lastQueriesWithResults.has(query)) {
2524
+ return this.lastQueriesWithResults.get(query);
2505
2525
  }
2506
- const coordinates = this._marker.getGeometry().getCoordinates();
2507
- // coordinates is in EPSG:3857 (meters), we transform it into EPSG:4326 (degrees)
2508
- return ol.proj.transform(coordinates, 'EPSG:3857', 'EPSG:4326');
2526
+ return undefined;
2509
2527
  }
2510
- onResize() {
2511
- if (this._map) {
2512
- this._map.updateSize();
2528
+ addToCache(query, data) {
2529
+ if (this.lastQueriesWithResults.keys.length >= this.cacheSize) {
2530
+ const deletedQuery = this.lastQueriesLru[0];
2531
+ this.revomeFromCache(deletedQuery);
2513
2532
  }
2533
+ this.lastQueriesWithResults.set(query, data);
2534
+ this.lastQueriesLru.push(query);
2535
+ return data;
2536
+ }
2537
+ revomeFromCache(query) {
2538
+ this.lastQueriesWithResults.delete(query);
2539
+ const index = this.lastQueriesLru.findIndex((it) => it === query);
2540
+ this.lastQueriesLru.splice(index, 1);
2514
2541
  }
2515
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MapComponent, deps: [{ token: OpenLayerLoaderService }], target: i0.ɵɵFactoryTarget.Component });
2516
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: MapComponent, isStandalone: false, 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"] });
2542
+ getLatestQuery() {
2543
+ return this.lastQueriesLru.length
2544
+ ? this.lastQueriesLru[this.lastQueriesLru.length - 1]
2545
+ : null;
2546
+ }
2547
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: GeolocationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2548
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: GeolocationService, providedIn: 'root' });
2517
2549
  }
2518
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: MapComponent, decorators: [{
2519
- type: Component,
2520
- args: [{ standalone: false, selector: 'lux-map', template: "<div [id]=\"mapId\" class=\"map\" (resized)=\"onResize()\"></div>\n", styles: [".map{min-height:100px;height:100%;min-width:160px;width:100%}\n"] }]
2521
- }], ctorParameters: () => [{ type: OpenLayerLoaderService }], propDecorators: { mapId: [{
2522
- type: Input
2523
- }], zoom: [{
2524
- type: Input
2525
- }], center: [{
2526
- type: Input
2527
- }], readonly: [{
2528
- type: Input
2529
- }], markerCoordinates: [{
2530
- type: Input
2531
- }], markerPoint: [{
2532
- type: Input
2533
- }], valueChange: [{
2534
- type: Output
2535
- }] } });
2550
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: GeolocationService, decorators: [{
2551
+ type: Injectable,
2552
+ args: [{ providedIn: 'root' }]
2553
+ }], ctorParameters: () => [] });
2554
+ const samePosition = (searchResult, keys) => {
2555
+ let found = false;
2556
+ keys.forEach((item) => {
2557
+ if (searchResult.lon === item.coordinates[0] &&
2558
+ searchResult.lat === item.coordinates[1]) {
2559
+ found = true;
2560
+ }
2561
+ });
2562
+ return found;
2563
+ };
2564
+ const distinct = (data) => {
2565
+ const unique = {};
2566
+ return data.filter((r) => {
2567
+ if (unique[r.display_name]) {
2568
+ return false;
2569
+ }
2570
+ unique[r.display_name] = 1;
2571
+ return true;
2572
+ });
2573
+ };
2536
2574
 
2537
2575
  class GeolocationComponent {
2538
- modalService;
2539
- locationService;
2576
+ modalService = inject(ModalService);
2577
+ locationService = inject(GeolocationService);
2540
2578
  static idCounter = 0;
2541
2579
  latitude;
2542
2580
  longitude;
@@ -2660,10 +2698,6 @@ class GeolocationComponent {
2660
2698
  keyPress = new EventEmitter();
2661
2699
  onChange = (value) => { };
2662
2700
  onTouched = () => { };
2663
- constructor(modalService, locationService) {
2664
- this.modalService = modalService;
2665
- this.locationService = locationService;
2666
- }
2667
2701
  // ControlValueAccessor Interface implementation
2668
2702
  writeValue(value) {
2669
2703
  this.value = value;
@@ -2872,8 +2906,8 @@ class GeolocationComponent {
2872
2906
  this.minLongitude = this.minLongitude || -180;
2873
2907
  this.maxLongitude = this.maxLongitude || +180;
2874
2908
  }
2875
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GeolocationComponent, deps: [{ token: ModalService }, { token: GeolocationService }], target: i0.ɵɵFactoryTarget.Component });
2876
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: GeolocationComponent, isStandalone: false, 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: [
2909
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: GeolocationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2910
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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: [
2877
2911
  {
2878
2912
  provide: NG_VALUE_ACCESSOR,
2879
2913
  multi: true,
@@ -2884,11 +2918,17 @@ class GeolocationComponent {
2884
2918
  multi: true,
2885
2919
  useExisting: forwardRef(() => GeolocationComponent)
2886
2920
  }
2887
- ], 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\n #latitude\n class=\"rounded-left prefix\"\n [ngClass]=\"className\"\n type=\"number\"\n [id]=\"inputId + '$latitude'\"\n [(ngModel)]=\"latitudeValue\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [attr.min]=\"\n minLatitude !== undefined && minLatitude !== null\n ? minLatitude.toString()\n : undefined\n \"\n [attr.max]=\"\n maxLatitude !== undefined && maxLatitude !== null\n ? maxLatitude.toString()\n : undefined\n \"\n [attr.step]=\"\n step !== undefined && step !== null ? step.toString() : undefined\n \"\n [placeholder]=\"i18n[lang].lat\"\n (keyup)=\"onEventLatitude(latitude.value)\"\n (change)=\"onEventLatitude(latitude.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n/>\n<div\n class=\"infix symbol monospace clickable\"\n [ngClass]=\"className\"\n (click)=\"openModalMap(modalMap)\">\n <span *ngIf=\"isValidNumber(latitudeValue) && latitudeValue >= 0\">{{\n i18n[lang].cardinalPoints.north\n }}</span>\n <span *ngIf=\"isValidNumber(latitudeValue) && latitudeValue < 0\">{{\n i18n[lang].cardinalPoints.south\n }}</span>\n <span *ngIf=\"!isValidNumber(latitudeValue)\">-</span>\n</div>\n<input\n #longitude\n class=\"prefix\"\n [ngClass]=\"className\"\n type=\"number\"\n [id]=\"inputId + '$longitude'\"\n [(ngModel)]=\"longitudeValue\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [attr.min]=\"\n minLongitude !== undefined && minLongitude !== null\n ? minLongitude.toString()\n : undefined\n \"\n [attr.max]=\"\n maxLongitude !== undefined && maxLongitude !== null\n ? maxLongitude.toString()\n : undefined\n \"\n [attr.step]=\"\n step !== undefined && step !== null ? step.toString() : undefined\n \"\n [placeholder]=\"i18n[lang].lon\"\n (keyup)=\"onEventLongitude(longitude.value)\"\n (change)=\"onEventLongitude(longitude.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n/>\n<div\n class=\"infix symbol monospace clickable\"\n [ngClass]=\"className\"\n (click)=\"openModalMap(modalMap)\"\n>\n <span *ngIf=\"isValidNumber(longitudeValue) && longitudeValue >= 0\">{{\n i18n[lang].cardinalPoints.east\n }}</span>\n <span *ngIf=\"isValidNumber(longitudeValue) && longitudeValue < 0\">{{\n i18n[lang].cardinalPoints.west\n }}</span>\n <span *ngIf=\"!isValidNumber(longitudeValue)\">-</span>\n</div>\n<div\n [class]=\"\n disabled || readonly || !isClearable()\n ? 'clickable rounded-right postfix symbol'\n : 'clickable postfix symbol'\n \"\n [ngClass]=\"className\"\n (click)=\"openModalMap(modalMap)\"\n>\n <span class=\"icon-globe\"></span>\n</div>\n<button\n #clearButton\n *ngIf=\"!disabled && !readonly && isClearable()\"\n class=\"rounded-right postfix bordered icon icon-clear\"\n [id]=\"inputId + '$clear'\"\n type=\"button\"\n (click)=\"clear()\"\n aria-label=\"clear\"\n></button>\n\n<div *ngIf=\"inlineErrors && lastErrors && (dirty || touched)\" class=\"alert\">\n <div *ngIf=\"lastErrors.required\">\n {{ i18n[lang].userErrors.required }}\n </div>\n <div *ngIf=\"lastErrors.minLatitude\">\n {{\n i18n[lang].userErrors.minLatitude.replace(\n '$minLatitude',\n lastErrors.minLatitude.min\n )\n }}\n </div>\n <div *ngIf=\"lastErrors.maxLatitude\">\n {{\n i18n[lang].userErrors.maxLatitude.replace(\n '$maxLatitude',\n lastErrors.maxLatitude.max\n )\n }}\n </div>\n <div *ngIf=\"lastErrors.minLongitude\">\n {{\n i18n[lang].userErrors.minLongitude.replace(\n '$minLongitude',\n lastErrors.minLongitude.min\n )\n }}\n </div>\n <div *ngIf=\"lastErrors.maxLongitude\">\n {{\n i18n[lang].userErrors.maxLongitude.replace(\n '$maxLongitude',\n lastErrors.maxLongitude.max\n )\n }}\n </div>\n</div>\n\n<ng-template #modalMap let-modal>\n <div class=\"lux-modal-header\">\n <h4 class=\"modal-title default-font\" id=\"modal-basic-title\">{{ mapTitle }}</h4>\n <button\n type=\"button\"\n class=\"close\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss('Cross click')\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n </div>\n <div class=\"lux-modal-body content\">\n <lux-autocomplete\n #searchBar\n [attr.aria-label]=\"i18n[lang].typeToSearch\"\n [placeholder]=\"i18n[lang].typeToSearch\"\n *ngIf=\"!disabled && !readonly\"\n [instance]=\"self\"\n [resolveLabelsFunction]=\"getLabels\"\n [populateFunction]=\"getData\"\n (valueChange)=\"onSearchLocationChanged(searchBar.value, map)\"\n ></lux-autocomplete>\n <div class=\"map-container\">\n <lux-map\n #map\n [center]=\"value\"\n [markerPoint]=\"value\"\n [zoom]=\"zoom\"\n [readonly]=\"readonly === true || disabled === true ? true : false\"\n ></lux-map>\n </div>\n </div>\n <div class=\"lux-modal-footer\">\n <button\n *ngIf=\"disabled || readonly\"\n type=\"button\"\n class=\"btn btn-cancel\"\n (click)=\"modal.close('cancel')\"\n >\n {{ i18n[lang].closeAction }}\n </button>\n <button\n *ngIf=\"!disabled && !readonly\"\n type=\"button\"\n class=\"btn btn-cancel\"\n (click)=\"modal.close('cancel')\"\n >\n {{ i18n[lang].cancelAction }}\n </button>\n <button\n *ngIf=\"!disabled && !readonly\"\n type=\"button\"\n class=\"btn btn-select\"\n (click)=\"modal.close(map.markerPoint.coordinates)\"\n >\n {{ i18n[lang].selectAction }}\n </button>\n </div>\n</ng-template>\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: "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: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AutocompleteComponent, selector: "lux-autocomplete", inputs: ["inputId", "disabled", "readonly", "label", "canAddNewValues", "keepOpenAfterDelete", "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"] }] });
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"] }] });
2888
2922
  }
2889
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GeolocationComponent, decorators: [{
2923
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: GeolocationComponent, decorators: [{
2890
2924
  type: Component,
2891
- args: [{ standalone: false, selector: 'lux-geolocation', providers: [
2925
+ args: [{ selector: 'lux-geolocation', imports: [
2926
+ CommonModule,
2927
+ FormsModule,
2928
+ ReactiveFormsModule,
2929
+ AutocompleteComponent,
2930
+ MapComponent
2931
+ ], providers: [
2892
2932
  {
2893
2933
  provide: NG_VALUE_ACCESSOR,
2894
2934
  multi: true,
@@ -2899,8 +2939,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
2899
2939
  multi: true,
2900
2940
  useExisting: forwardRef(() => GeolocationComponent)
2901
2941
  }
2902
- ], template: "<input\n #latitude\n class=\"rounded-left prefix\"\n [ngClass]=\"className\"\n type=\"number\"\n [id]=\"inputId + '$latitude'\"\n [(ngModel)]=\"latitudeValue\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [attr.min]=\"\n minLatitude !== undefined && minLatitude !== null\n ? minLatitude.toString()\n : undefined\n \"\n [attr.max]=\"\n maxLatitude !== undefined && maxLatitude !== null\n ? maxLatitude.toString()\n : undefined\n \"\n [attr.step]=\"\n step !== undefined && step !== null ? step.toString() : undefined\n \"\n [placeholder]=\"i18n[lang].lat\"\n (keyup)=\"onEventLatitude(latitude.value)\"\n (change)=\"onEventLatitude(latitude.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n/>\n<div\n class=\"infix symbol monospace clickable\"\n [ngClass]=\"className\"\n (click)=\"openModalMap(modalMap)\">\n <span *ngIf=\"isValidNumber(latitudeValue) && latitudeValue >= 0\">{{\n i18n[lang].cardinalPoints.north\n }}</span>\n <span *ngIf=\"isValidNumber(latitudeValue) && latitudeValue < 0\">{{\n i18n[lang].cardinalPoints.south\n }}</span>\n <span *ngIf=\"!isValidNumber(latitudeValue)\">-</span>\n</div>\n<input\n #longitude\n class=\"prefix\"\n [ngClass]=\"className\"\n type=\"number\"\n [id]=\"inputId + '$longitude'\"\n [(ngModel)]=\"longitudeValue\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [attr.min]=\"\n minLongitude !== undefined && minLongitude !== null\n ? minLongitude.toString()\n : undefined\n \"\n [attr.max]=\"\n maxLongitude !== undefined && maxLongitude !== null\n ? maxLongitude.toString()\n : undefined\n \"\n [attr.step]=\"\n step !== undefined && step !== null ? step.toString() : undefined\n \"\n [placeholder]=\"i18n[lang].lon\"\n (keyup)=\"onEventLongitude(longitude.value)\"\n (change)=\"onEventLongitude(longitude.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n/>\n<div\n class=\"infix symbol monospace clickable\"\n [ngClass]=\"className\"\n (click)=\"openModalMap(modalMap)\"\n>\n <span *ngIf=\"isValidNumber(longitudeValue) && longitudeValue >= 0\">{{\n i18n[lang].cardinalPoints.east\n }}</span>\n <span *ngIf=\"isValidNumber(longitudeValue) && longitudeValue < 0\">{{\n i18n[lang].cardinalPoints.west\n }}</span>\n <span *ngIf=\"!isValidNumber(longitudeValue)\">-</span>\n</div>\n<div\n [class]=\"\n disabled || readonly || !isClearable()\n ? 'clickable rounded-right postfix symbol'\n : 'clickable postfix symbol'\n \"\n [ngClass]=\"className\"\n (click)=\"openModalMap(modalMap)\"\n>\n <span class=\"icon-globe\"></span>\n</div>\n<button\n #clearButton\n *ngIf=\"!disabled && !readonly && isClearable()\"\n class=\"rounded-right postfix bordered icon icon-clear\"\n [id]=\"inputId + '$clear'\"\n type=\"button\"\n (click)=\"clear()\"\n aria-label=\"clear\"\n></button>\n\n<div *ngIf=\"inlineErrors && lastErrors && (dirty || touched)\" class=\"alert\">\n <div *ngIf=\"lastErrors.required\">\n {{ i18n[lang].userErrors.required }}\n </div>\n <div *ngIf=\"lastErrors.minLatitude\">\n {{\n i18n[lang].userErrors.minLatitude.replace(\n '$minLatitude',\n lastErrors.minLatitude.min\n )\n }}\n </div>\n <div *ngIf=\"lastErrors.maxLatitude\">\n {{\n i18n[lang].userErrors.maxLatitude.replace(\n '$maxLatitude',\n lastErrors.maxLatitude.max\n )\n }}\n </div>\n <div *ngIf=\"lastErrors.minLongitude\">\n {{\n i18n[lang].userErrors.minLongitude.replace(\n '$minLongitude',\n lastErrors.minLongitude.min\n )\n }}\n </div>\n <div *ngIf=\"lastErrors.maxLongitude\">\n {{\n i18n[lang].userErrors.maxLongitude.replace(\n '$maxLongitude',\n lastErrors.maxLongitude.max\n )\n }}\n </div>\n</div>\n\n<ng-template #modalMap let-modal>\n <div class=\"lux-modal-header\">\n <h4 class=\"modal-title default-font\" id=\"modal-basic-title\">{{ mapTitle }}</h4>\n <button\n type=\"button\"\n class=\"close\"\n aria-label=\"Close\"\n (click)=\"modal.dismiss('Cross click')\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n </div>\n <div class=\"lux-modal-body content\">\n <lux-autocomplete\n #searchBar\n [attr.aria-label]=\"i18n[lang].typeToSearch\"\n [placeholder]=\"i18n[lang].typeToSearch\"\n *ngIf=\"!disabled && !readonly\"\n [instance]=\"self\"\n [resolveLabelsFunction]=\"getLabels\"\n [populateFunction]=\"getData\"\n (valueChange)=\"onSearchLocationChanged(searchBar.value, map)\"\n ></lux-autocomplete>\n <div class=\"map-container\">\n <lux-map\n #map\n [center]=\"value\"\n [markerPoint]=\"value\"\n [zoom]=\"zoom\"\n [readonly]=\"readonly === true || disabled === true ? true : false\"\n ></lux-map>\n </div>\n </div>\n <div class=\"lux-modal-footer\">\n <button\n *ngIf=\"disabled || readonly\"\n type=\"button\"\n class=\"btn btn-cancel\"\n (click)=\"modal.close('cancel')\"\n >\n {{ i18n[lang].closeAction }}\n </button>\n <button\n *ngIf=\"!disabled && !readonly\"\n type=\"button\"\n class=\"btn btn-cancel\"\n (click)=\"modal.close('cancel')\"\n >\n {{ i18n[lang].cancelAction }}\n </button>\n <button\n *ngIf=\"!disabled && !readonly\"\n type=\"button\"\n class=\"btn btn-select\"\n (click)=\"modal.close(map.markerPoint.coordinates)\"\n >\n {{ i18n[lang].selectAction }}\n </button>\n </div>\n</ng-template>\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"] }]
2903
- }], ctorParameters: () => [{ type: ModalService }, { type: GeolocationService }], propDecorators: { latitude: [{
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 <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"] }]
2943
+ }], propDecorators: { latitude: [{
2904
2944
  type: ViewChild,
2905
2945
  args: ['latitude', { static: true }]
2906
2946
  }], longitude: [{
@@ -3129,16 +3169,16 @@ class RegexpService {
3129
3169
  // TODO: RETURN AN EMPTY STRING
3130
3170
  return 'NO DEBERÍA SER POSIBLE';
3131
3171
  }
3132
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RegexpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3133
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RegexpService, providedIn: 'root' });
3172
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RegexpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3173
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RegexpService, providedIn: 'root' });
3134
3174
  }
3135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RegexpService, decorators: [{
3175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RegexpService, decorators: [{
3136
3176
  type: Injectable,
3137
3177
  args: [{ providedIn: 'root' }]
3138
3178
  }], ctorParameters: () => [] });
3139
3179
 
3140
3180
  class InputComponent {
3141
- regexpService;
3181
+ regexpService = inject(RegexpService);
3142
3182
  static idCounter = 0;
3143
3183
  input;
3144
3184
  textarea;
@@ -3268,9 +3308,6 @@ class InputComponent {
3268
3308
  keyPress = new EventEmitter();
3269
3309
  onChange = (value) => { };
3270
3310
  onTouched = () => { };
3271
- constructor(regexpService) {
3272
- this.regexpService = regexpService;
3273
- }
3274
3311
  // ControlValueAccessor Interface implementation
3275
3312
  writeValue(value) {
3276
3313
  this.value = value;
@@ -3520,8 +3557,8 @@ class InputComponent {
3520
3557
  this.max = this.max || 1000.0;
3521
3558
  this.placeholder = '0.00';
3522
3559
  }
3523
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: InputComponent, deps: [{ token: RegexpService }], target: i0.ɵɵFactoryTarget.Component });
3524
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: InputComponent, isStandalone: false, 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: [
3560
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3561
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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: [
3525
3562
  {
3526
3563
  provide: NG_VALUE_ACCESSOR,
3527
3564
  multi: true,
@@ -3532,11 +3569,11 @@ class InputComponent {
3532
3569
  multi: true,
3533
3570
  useExisting: forwardRef(() => InputComponent)
3534
3571
  }
3535
- ], 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: "<div *ngIf=\"currency && currency === 'USD'\" class=\"prefix rounded-left symbol\" [ngClass]=\"className\">\n <span>$</span>\n</div>\n<input\n #input\n *ngIf=\"type !== 'textarea'\"\n [class]=\"hasPrefix() ? (hasPostfix() ? 'infix' : 'postfix rounded-right') : (hasPostfix() ? 'prefix rounded-left' : 'rounded')\"\n [ngClass]=\"className\"\n placement=\"top\"\n [id]=\"inputId\"\n [type]=\"domain\"\n [attr.value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [attr.min]=\"min?.toString() || undefined\"\n [attr.max]=\"max?.toString() || undefined\"\n [attr.step]=\"step?.toString() || undefined\"\n [attr.pattern]=\"pattern || undefined\"\n [placeholder]=\"placeholder\"\n (keyup)=\"onKeyUp(input.value)\"\n (change)=\"onChangeValue(input.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n/>\n<textarea\n #textarea\n *ngIf=\"type === 'textarea'\"\n class=\"rounded\"\n [ngClass]=\"className\"\n placement=\"top\"\n [id]=\"inputId\"\n [attr.value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [attr.cols]=\"cols?.toString() || undefined\"\n [attr.rows]=\"rows?.toString() || undefined\"\n [placeholder]=\"placeholder\"\n (keyup)=\"onKeyUp(textarea.value)\"\n (change)=\"onChangeValue(textarea.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n></textarea>\n<div *ngIf=\"currency && currency === 'EUR'\" class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\n <span>\u20AC</span>\n</div>\n<div *ngIf=\"isPercentage()\" class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\n <span>%</span>\n</div>\n<div *ngIf=\"isPermillage()\" class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\n <span>\u2030</span>\n</div>\n<div *ngIf=\"isUrl() && !!value\" class=\"postfix rounded-right symbol clickable\" [ngClass]=\"className\">\n <a href=\"{{ value }}\" target=\"_blank\">\n <span class=\"icon-external\"></span>\n </a>\n</div>\n<div *ngIf=\"isColor()\" class=\"postfix rounded-right bordered transparency\" [ngClass]=\"className\">\n <div class=\"rounded-right full-space\" [ngStyle]=\"{'background-color': color}\">\n <input\n #colorpicker\n class=\"minimal-space clickable invisible rounded-right full-space\"\n [id]=\"inputId + '$colorpicker'\"\n type=\"color\"\n [attr.value]=\"value\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n (change)=\"onColorPicked(colorpicker.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n />\n </div>\n</div>\n\n<div *ngIf=\"inlineErrors && lastErrors && (dirty || touched)\" class=\"alert\">\n <div *ngIf=\"lastErrors.required\">\n {{ userErrors[this.lang].required }}\n </div>\n <div *ngIf=\"lastErrors.email\">{{ userErrors[this.lang].email }}</div>\n <div *ngIf=\"lastErrors.url\">{{ userErrors[this.lang].url }}</div>\n <div *ngIf=\"lastErrors.min\">\n {{ userErrors[this.lang].min.replace('$min', lastErrors.min.min) }}\n </div>\n <div *ngIf=\"lastErrors.max\">\n {{ userErrors[this.lang].max.replace('$max', lastErrors.max.max) }}\n </div>\n</div>\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: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
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 <span>$</span>\r\n</div>\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 [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\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} @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 [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\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} @if (currency && currency === 'EUR') {\r\n<div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>\u20AC</span>\r\n</div>\r\n} @if (isPercentage()) {\r\n<div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>%</span>\r\n</div>\r\n} @if (isPermillage()) {\r\n<div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>\u2030</span>\r\n</div>\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} @if (isColor()) {\r\n<div class=\"postfix rounded-right bordered transparency\" [ngClass]=\"className\">\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} @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 } @if (lastErrors.email) {\r\n <div>{{ userErrors[this.lang].email }}</div>\r\n } @if (lastErrors.url) {\r\n <div>{{ userErrors[this.lang].url }}</div>\r\n } @if (lastErrors.min) {\r\n <div>\r\n {{ userErrors[this.lang].min.replace('$min', lastErrors.min.min) }}\r\n </div>\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 }] });
3536
3573
  }
3537
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: InputComponent, decorators: [{
3574
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: InputComponent, decorators: [{
3538
3575
  type: Component,
3539
- args: [{ standalone: false, selector: 'lux-input', providers: [
3576
+ args: [{ selector: 'lux-input', imports: [CommonModule, FormsModule], providers: [
3540
3577
  {
3541
3578
  provide: NG_VALUE_ACCESSOR,
3542
3579
  multi: true,
@@ -3547,8 +3584,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
3547
3584
  multi: true,
3548
3585
  useExisting: forwardRef(() => InputComponent)
3549
3586
  }
3550
- ], template: "<div *ngIf=\"currency && currency === 'USD'\" class=\"prefix rounded-left symbol\" [ngClass]=\"className\">\n <span>$</span>\n</div>\n<input\n #input\n *ngIf=\"type !== 'textarea'\"\n [class]=\"hasPrefix() ? (hasPostfix() ? 'infix' : 'postfix rounded-right') : (hasPostfix() ? 'prefix rounded-left' : 'rounded')\"\n [ngClass]=\"className\"\n placement=\"top\"\n [id]=\"inputId\"\n [type]=\"domain\"\n [attr.value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [attr.min]=\"min?.toString() || undefined\"\n [attr.max]=\"max?.toString() || undefined\"\n [attr.step]=\"step?.toString() || undefined\"\n [attr.pattern]=\"pattern || undefined\"\n [placeholder]=\"placeholder\"\n (keyup)=\"onKeyUp(input.value)\"\n (change)=\"onChangeValue(input.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n/>\n<textarea\n #textarea\n *ngIf=\"type === 'textarea'\"\n class=\"rounded\"\n [ngClass]=\"className\"\n placement=\"top\"\n [id]=\"inputId\"\n [attr.value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n [attr.cols]=\"cols?.toString() || undefined\"\n [attr.rows]=\"rows?.toString() || undefined\"\n [placeholder]=\"placeholder\"\n (keyup)=\"onKeyUp(textarea.value)\"\n (change)=\"onChangeValue(textarea.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n></textarea>\n<div *ngIf=\"currency && currency === 'EUR'\" class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\n <span>\u20AC</span>\n</div>\n<div *ngIf=\"isPercentage()\" class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\n <span>%</span>\n</div>\n<div *ngIf=\"isPermillage()\" class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\n <span>\u2030</span>\n</div>\n<div *ngIf=\"isUrl() && !!value\" class=\"postfix rounded-right symbol clickable\" [ngClass]=\"className\">\n <a href=\"{{ value }}\" target=\"_blank\">\n <span class=\"icon-external\"></span>\n </a>\n</div>\n<div *ngIf=\"isColor()\" class=\"postfix rounded-right bordered transparency\" [ngClass]=\"className\">\n <div class=\"rounded-right full-space\" [ngStyle]=\"{'background-color': color}\">\n <input\n #colorpicker\n class=\"minimal-space clickable invisible rounded-right full-space\"\n [id]=\"inputId + '$colorpicker'\"\n type=\"color\"\n [attr.value]=\"value\"\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\n (change)=\"onColorPicked(colorpicker.value)\"\n (keypress)=\"onKeyPress($event)\"\n (blur)=\"onLostFocus()\"\n />\n </div>\n</div>\n\n<div *ngIf=\"inlineErrors && lastErrors && (dirty || touched)\" class=\"alert\">\n <div *ngIf=\"lastErrors.required\">\n {{ userErrors[this.lang].required }}\n </div>\n <div *ngIf=\"lastErrors.email\">{{ userErrors[this.lang].email }}</div>\n <div *ngIf=\"lastErrors.url\">{{ userErrors[this.lang].url }}</div>\n <div *ngIf=\"lastErrors.min\">\n {{ userErrors[this.lang].min.replace('$min', lastErrors.min.min) }}\n </div>\n <div *ngIf=\"lastErrors.max\">\n {{ userErrors[this.lang].max.replace('$max', lastErrors.max.max) }}\n </div>\n</div>\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"] }]
3551
- }], ctorParameters: () => [{ type: RegexpService }], propDecorators: { input: [{
3587
+ ], template: "@if (currency && currency === 'USD') {\r\n<div class=\"prefix rounded-left symbol\" [ngClass]=\"className\">\r\n <span>$</span>\r\n</div>\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 [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\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} @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 [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\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} @if (currency && currency === 'EUR') {\r\n<div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>\u20AC</span>\r\n</div>\r\n} @if (isPercentage()) {\r\n<div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>%</span>\r\n</div>\r\n} @if (isPermillage()) {\r\n<div class=\"postfix rounded-right symbol\" [ngClass]=\"className\">\r\n <span>\u2030</span>\r\n</div>\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} @if (isColor()) {\r\n<div class=\"postfix rounded-right bordered transparency\" [ngClass]=\"className\">\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} @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 } @if (lastErrors.email) {\r\n <div>{{ userErrors[this.lang].email }}</div>\r\n } @if (lastErrors.url) {\r\n <div>{{ userErrors[this.lang].url }}</div>\r\n } @if (lastErrors.min) {\r\n <div>\r\n {{ userErrors[this.lang].min.replace('$min', lastErrors.min.min) }}\r\n </div>\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
+ }], propDecorators: { input: [{
3552
3589
  type: ViewChild,
3553
3590
  args: ['input', { static: false }]
3554
3591
  }], textarea: [{
@@ -3612,21 +3649,22 @@ var Placement;
3612
3649
  class TooltipComponent {
3613
3650
  context;
3614
3651
  constructor() { }
3615
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3616
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: TooltipComponent, isStandalone: false, selector: "ng-component", inputs: { context: "context" }, ngImport: i0, template: `
3617
- <span class="lux-tooltip" style="transition: opacity 200ms">{{
3618
- context.message
3619
- }}</span>
3620
- `, isInline: true });
3652
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3653
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.14", type: TooltipComponent, isStandalone: true, selector: "lux-tooltip", inputs: { context: "context" }, ngImport: i0, template: `
3654
+ <span class="lux-tooltip" style="transition: opacity 200ms">{{
3655
+ context.message
3656
+ }}</span>
3657
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
3621
3658
  }
3622
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TooltipComponent, decorators: [{
3659
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TooltipComponent, decorators: [{
3623
3660
  type: Component,
3624
3661
  args: [{
3625
- standalone: false,
3626
- template: `
3627
- <span class="lux-tooltip" style="transition: opacity 200ms">{{
3628
- context.message
3629
- }}</span>
3662
+ selector: 'lux-tooltip',
3663
+ imports: [CommonModule],
3664
+ template: `
3665
+ <span class="lux-tooltip" style="transition: opacity 200ms">{{
3666
+ context.message
3667
+ }}</span>
3630
3668
  `
3631
3669
  }]
3632
3670
  }], ctorParameters: () => [], propDecorators: { context: [{
@@ -3643,14 +3681,9 @@ class TooltipContentRef {
3643
3681
  }
3644
3682
 
3645
3683
  class TooltipService {
3646
- _injector;
3647
- _crf;
3648
- _applicationRef;
3649
- constructor(_injector, _crf, _applicationRef) {
3650
- this._injector = _injector;
3651
- this._crf = _crf;
3652
- this._applicationRef = _applicationRef;
3653
- }
3684
+ _injector = inject(Injector);
3685
+ _crf = inject(ComponentFactoryResolver);
3686
+ _applicationRef = inject(ApplicationRef);
3654
3687
  appendComponentToBody(content, elHost, placement) {
3655
3688
  const tooltipContentRef = this.getTooltipContentRef(content);
3656
3689
  if (tooltipContentRef) {
@@ -3767,19 +3800,19 @@ class TooltipService {
3767
3800
  domElem.style.left = `${left}px`;
3768
3801
  return domElem;
3769
3802
  }
3770
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TooltipService, deps: [{ token: i0.Injector }, { token: i0.ComponentFactoryResolver }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
3771
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TooltipService });
3803
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TooltipService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3804
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TooltipService });
3772
3805
  }
3773
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TooltipService, decorators: [{
3806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TooltipService, decorators: [{
3774
3807
  type: Injectable
3775
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }] });
3808
+ }] });
3776
3809
 
3777
3810
  /**
3778
3811
  * Tooltip directive
3779
3812
  */
3780
3813
  class LuxTooltipDirective {
3781
- elHost;
3782
- tooltipService;
3814
+ elHost = inject(ElementRef);
3815
+ tooltipService = inject(TooltipService);
3783
3816
  /** Tooltip title */
3784
3817
  luxTooltip;
3785
3818
  /** Component, TemplateRef or String */
@@ -3787,13 +3820,13 @@ class LuxTooltipDirective {
3787
3820
  /** Placement */
3788
3821
  placement;
3789
3822
  tooltipRef;
3790
- constructor(elHost, tooltipService) {
3791
- this.elHost = elHost;
3792
- this.tooltipService = tooltipService;
3793
- }
3794
3823
  onMouseEnter() {
3795
3824
  if (!this.tooltipRef) {
3796
- this.tooltipRef = this.show(this.content, this.elHost, this.placement);
3825
+ // Use luxTooltip if provided, otherwise use content
3826
+ const tooltipContent = this.luxTooltip || this.content;
3827
+ if (tooltipContent) {
3828
+ this.tooltipRef = this.show(tooltipContent, this.elHost, this.placement);
3829
+ }
3797
3830
  }
3798
3831
  }
3799
3832
  onMouseLeave() {
@@ -3814,16 +3847,17 @@ class LuxTooltipDirective {
3814
3847
  remove(tooltipRef) {
3815
3848
  this.tooltipService.removeComponentFromBody(tooltipRef);
3816
3849
  }
3817
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxTooltipDirective, deps: [{ token: i0.ElementRef }, { token: TooltipService }], target: i0.ɵɵFactoryTarget.Directive });
3818
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: LuxTooltipDirective, isStandalone: false, selector: "[luxTooltip]", inputs: { luxTooltip: "luxTooltip", content: "content", placement: "placement" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "onClick()" } }, ngImport: i0 });
3850
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3851
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", 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 });
3819
3852
  }
3820
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxTooltipDirective, decorators: [{
3853
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxTooltipDirective, decorators: [{
3821
3854
  type: Directive,
3822
3855
  args: [{
3823
- standalone: false,
3824
- selector: '[luxTooltip]'
3856
+ selector: '[luxTooltip]',
3857
+ standalone: true,
3858
+ providers: [TooltipService]
3825
3859
  }]
3826
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: TooltipService }], propDecorators: { luxTooltip: [{
3860
+ }], propDecorators: { luxTooltip: [{
3827
3861
  type: Input
3828
3862
  }], content: [{
3829
3863
  type: Input
@@ -3963,12 +3997,12 @@ class PaginationComponent {
3963
3997
  this.next = l.next;
3964
3998
  this.last = l.last;
3965
3999
  }
3966
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3967
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: PaginationComponent, isStandalone: false, selector: "lux-pagination", inputs: { lang: "lang", paginationInfo: "paginationInfo" }, outputs: { goToPage: "goToPage", pageSizeChange: "pageSizeChange" }, ngImport: i0, template: "<div class=\"lux-pagination\" *ngIf=\"showPagination\">\n <ng-container *ngIf=\"!hidePrevious\">\n <a\n luxTooltip\n [content]=\"first\"\n placement=\"top\"\n delay=\"500\"\n (click)=\"onFirst()\"\n [ngClass]=\"{\n enabledFirstLast: !hidePrevious\n }\"\n class=\"button-pagination icon arrow-left-end\"\n ></a>\n <a\n luxTooltip\n [content]=\"previous\"\n placement=\"top\"\n delay=\"500\"\n (click)=\"onPrevious()\"\n [ngClass]=\"{\n enabledFirstLast: !hidePrevious\n }\"\n class=\"button-pagination icon arrow-left\"\n ></a>\n </ng-container>\n\n <span class=\"ellipsis\" *ngIf=\"displayPreviousEllipsis\">...</span>\n\n <ng-container *ngFor=\"let pageNum of pages\">\n <a\n placement=\"top\"\n delay=\"500\"\n [ngClass]=\"{\n disabled: pageNum === paginationInfo.page,\n enabled: pageNum !== paginationInfo.page\n }\"\n class=\"button-pagination\"\n (click)=\"onPage(pageNum)\"\n >{{ pageNum + 1 }}</a\n >\n </ng-container>\n\n <span class=\"ellipsis\" *ngIf=\"displayNextEllipsis\">...</span>\n\n <ng-container *ngIf=\"!lastPage\">\n <a\n luxTooltip\n [content]=\"next\"\n placement=\"top\"\n delay=\"500\"\n (click)=\"onNext()\"\n [ngClass]=\"{\n enabledFirstLast: !lastPage\n }\"\n class=\"button-pagination icon arrow-right\"\n ></a>\n <a\n luxTooltip\n [content]=\"last\"\n placement=\"top\"\n delay=\"500\"\n (click)=\"onLast()\"\n [ngClass]=\"{\n enabledFirstLast: !lastPage\n }\"\n class=\"button-pagination icon arrow-right-end\"\n ></a>\n </ng-container>\n</div>\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: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LuxTooltipDirective, selector: "[luxTooltip]", inputs: ["luxTooltip", "content", "placement"] }] });
4000
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4001
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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"] }] });
3968
4002
  }
3969
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PaginationComponent, decorators: [{
4003
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: PaginationComponent, decorators: [{
3970
4004
  type: Component,
3971
- args: [{ standalone: false, selector: 'lux-pagination', template: "<div class=\"lux-pagination\" *ngIf=\"showPagination\">\n <ng-container *ngIf=\"!hidePrevious\">\n <a\n luxTooltip\n [content]=\"first\"\n placement=\"top\"\n delay=\"500\"\n (click)=\"onFirst()\"\n [ngClass]=\"{\n enabledFirstLast: !hidePrevious\n }\"\n class=\"button-pagination icon arrow-left-end\"\n ></a>\n <a\n luxTooltip\n [content]=\"previous\"\n placement=\"top\"\n delay=\"500\"\n (click)=\"onPrevious()\"\n [ngClass]=\"{\n enabledFirstLast: !hidePrevious\n }\"\n class=\"button-pagination icon arrow-left\"\n ></a>\n </ng-container>\n\n <span class=\"ellipsis\" *ngIf=\"displayPreviousEllipsis\">...</span>\n\n <ng-container *ngFor=\"let pageNum of pages\">\n <a\n placement=\"top\"\n delay=\"500\"\n [ngClass]=\"{\n disabled: pageNum === paginationInfo.page,\n enabled: pageNum !== paginationInfo.page\n }\"\n class=\"button-pagination\"\n (click)=\"onPage(pageNum)\"\n >{{ pageNum + 1 }}</a\n >\n </ng-container>\n\n <span class=\"ellipsis\" *ngIf=\"displayNextEllipsis\">...</span>\n\n <ng-container *ngIf=\"!lastPage\">\n <a\n luxTooltip\n [content]=\"next\"\n placement=\"top\"\n delay=\"500\"\n (click)=\"onNext()\"\n [ngClass]=\"{\n enabledFirstLast: !lastPage\n }\"\n class=\"button-pagination icon arrow-right\"\n ></a>\n <a\n luxTooltip\n [content]=\"last\"\n placement=\"top\"\n delay=\"500\"\n (click)=\"onLast()\"\n [ngClass]=\"{\n enabledFirstLast: !lastPage\n }\"\n class=\"button-pagination icon arrow-right-end\"\n ></a>\n </ng-container>\n</div>\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"] }]
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: 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"] }]
3972
4006
  }], ctorParameters: () => [], propDecorators: { goToPage: [{
3973
4007
  type: Output
3974
4008
  }], pageSizeChange: [{
@@ -4057,8 +4091,8 @@ class RadiogroupComponent {
4057
4091
  }
4058
4092
  return item;
4059
4093
  }
4060
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RadiogroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4061
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: RadiogroupComponent, isStandalone: false, selector: "lux-radiogroup", inputs: { name: "name", disabled: "disabled", readonly: "readonly", required: "required", items: "items", value: "value" }, outputs: { itemsChange: "itemsChange", valueChange: "valueChange" }, providers: [
4094
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RadiogroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4095
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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: [
4062
4096
  {
4063
4097
  provide: NG_VALUE_ACCESSOR,
4064
4098
  multi: true,
@@ -4069,11 +4103,11 @@ class RadiogroupComponent {
4069
4103
  multi: true,
4070
4104
  useExisting: forwardRef(() => RadiogroupComponent)
4071
4105
  }
4072
- ], ngImport: i0, template: "<div class=\"radiogroup\"\n [class.disabled]=\"disabled || readonly\"\n >\n <ng-container *ngFor=\"let item of items; let first=first; let last=last\">\n <div [class.radio-start]=\"first\"\n [class.radio-end]=\"last\"\n class=\"radio-item\"\n [class.selected]=\"item.value === value\"\n (click)=\"setValue($event, item)\"\n >\n <input [id]=\"item.name\"\n type=\"radio\"\n [name]=\"name\"\n [attr.disabled]=\"disabled || null\"\n [attr.readonly]=\"readonly || null\"\n [value]=\"item.value\">\n <label [for]=\"item.name\"\n class=\"unselectable\"\n >{{ item.label }}</label>\n </div>\n</ng-container>\n</div>\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"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
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"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
4073
4107
  }
4074
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RadiogroupComponent, decorators: [{
4108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RadiogroupComponent, decorators: [{
4075
4109
  type: Component,
4076
- args: [{ standalone: false, selector: 'lux-radiogroup', providers: [
4110
+ args: [{ selector: 'lux-radiogroup', imports: [CommonModule], providers: [
4077
4111
  {
4078
4112
  provide: NG_VALUE_ACCESSOR,
4079
4113
  multi: true,
@@ -4084,7 +4118,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
4084
4118
  multi: true,
4085
4119
  useExisting: forwardRef(() => RadiogroupComponent)
4086
4120
  }
4087
- ], template: "<div class=\"radiogroup\"\n [class.disabled]=\"disabled || readonly\"\n >\n <ng-container *ngFor=\"let item of items; let first=first; let last=last\">\n <div [class.radio-start]=\"first\"\n [class.radio-end]=\"last\"\n class=\"radio-item\"\n [class.selected]=\"item.value === value\"\n (click)=\"setValue($event, item)\"\n >\n <input [id]=\"item.name\"\n type=\"radio\"\n [name]=\"name\"\n [attr.disabled]=\"disabled || null\"\n [attr.readonly]=\"readonly || null\"\n [value]=\"item.value\">\n <label [for]=\"item.name\"\n class=\"unselectable\"\n >{{ item.label }}</label>\n </div>\n</ng-container>\n</div>\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"] }]
4121
+ ], 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"] }]
4088
4122
  }], ctorParameters: () => [], propDecorators: { name: [{
4089
4123
  type: Input
4090
4124
  }], disabled: [{
@@ -4198,8 +4232,8 @@ class SelectComponent {
4198
4232
  this.error = this.validateItem(newValue);
4199
4233
  this.isValidNewEntry = !this.error;
4200
4234
  }
4201
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4202
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: SelectComponent, isStandalone: false, selector: "lux-select", inputs: { id: "id", disabled: "disabled", required: "required", multiple: "multiple", value: "value", placeholder: "placeholder", unique: "unique", validateItem: "validateItem" }, outputs: { valueChange: "valueChange" }, providers: [
4235
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4236
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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: [
4203
4237
  {
4204
4238
  provide: NG_VALUE_ACCESSOR,
4205
4239
  multi: true,
@@ -4210,11 +4244,11 @@ class SelectComponent {
4210
4244
  multi: true,
4211
4245
  useExisting: forwardRef(() => SelectComponent)
4212
4246
  }
4213
- ], ngImport: i0, template: "<div class=\"lux-select\">\n <ul class=\"list\">\n <li *ngFor=\"let item of value; let i = index\">\n <span>{{ item }}</span>\n <button *ngIf=\"!disabled\"\n class=\"remove\"\n type=\"button\"\n (click)=\"remove(i)\"\n [attr.aria-label]=\"'Remove ' + item\"\n >Remove</button>\n </li>\n </ul>\n <div class=\"add-new-item\" *ngIf=\"!disabled\">\n <lux-input\n id=\"{{ id + 'addNew' }}\"\n type=\"string\"\n [placeholder]=\"placeholder\"\n [attr.aria-label]=\"placeholder\"\n [disabled]=\"disabled\"\n [(value)]=\"newEntry\"\n (keyPress)=\"onKeyPress($event)\"\n (valueChange)=\"onChangeNewEntry($event)\"\n >\n </lux-input>\n <div *ngIf=\"canAdd\">\n <button *ngIf=\"isValidNewEntry\" type=\"button\" (click)=\"add(newEntry)\">Add</button>\n </div>\n <div class=\"error\">\n {{ error }}\n </div>\n </div>\n</div>\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: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }] });
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: "ngmodule", type: CommonModule }, { 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"] }] });
4214
4248
  }
4215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SelectComponent, decorators: [{
4249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: SelectComponent, decorators: [{
4216
4250
  type: Component,
4217
- args: [{ standalone: false, selector: 'lux-select', providers: [
4251
+ args: [{ selector: 'lux-select', imports: [CommonModule, InputComponent], providers: [
4218
4252
  {
4219
4253
  provide: NG_VALUE_ACCESSOR,
4220
4254
  multi: true,
@@ -4225,7 +4259,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
4225
4259
  multi: true,
4226
4260
  useExisting: forwardRef(() => SelectComponent)
4227
4261
  }
4228
- ], template: "<div class=\"lux-select\">\n <ul class=\"list\">\n <li *ngFor=\"let item of value; let i = index\">\n <span>{{ item }}</span>\n <button *ngIf=\"!disabled\"\n class=\"remove\"\n type=\"button\"\n (click)=\"remove(i)\"\n [attr.aria-label]=\"'Remove ' + item\"\n >Remove</button>\n </li>\n </ul>\n <div class=\"add-new-item\" *ngIf=\"!disabled\">\n <lux-input\n id=\"{{ id + 'addNew' }}\"\n type=\"string\"\n [placeholder]=\"placeholder\"\n [attr.aria-label]=\"placeholder\"\n [disabled]=\"disabled\"\n [(value)]=\"newEntry\"\n (keyPress)=\"onKeyPress($event)\"\n (valueChange)=\"onChangeNewEntry($event)\"\n >\n </lux-input>\n <div *ngIf=\"canAdd\">\n <button *ngIf=\"isValidNewEntry\" type=\"button\" (click)=\"add(newEntry)\">Add</button>\n </div>\n <div class=\"error\">\n {{ error }}\n </div>\n </div>\n</div>\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"] }]
4262
+ ], 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"] }]
4229
4263
  }], ctorParameters: () => [], propDecorators: { id: [{
4230
4264
  type: Input
4231
4265
  }], disabled: [{
@@ -4247,16 +4281,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
4247
4281
  }] } });
4248
4282
 
4249
4283
  class VoiceRecognitionDirective {
4250
- el;
4251
- renderer;
4284
+ el = inject(ElementRef);
4285
+ renderer = inject(Renderer2);
4252
4286
  language;
4253
4287
  // See API at: https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition
4254
4288
  recognition;
4255
4289
  isRecognizing = false;
4256
4290
  mic;
4257
- constructor(el, renderer) {
4258
- this.el = el;
4259
- this.renderer = renderer;
4291
+ constructor() {
4260
4292
  const speechRecognition = window.webkitSpeechRecognition;
4261
4293
  if (speechRecognition) {
4262
4294
  this.recognition = new speechRecognition();
@@ -4299,16 +4331,15 @@ class VoiceRecognitionDirective {
4299
4331
  this.el.nativeElement.value = recognizedText;
4300
4332
  this.renderer.removeClass(this.mic, 'lux-recording');
4301
4333
  }
4302
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VoiceRecognitionDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
4303
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.1", type: VoiceRecognitionDirective, isStandalone: false, selector: "[luxVoiceRecognition]", inputs: { language: "language" }, ngImport: i0 });
4334
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: VoiceRecognitionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4335
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: VoiceRecognitionDirective, isStandalone: true, selector: "[luxVoiceRecognition]", inputs: { language: "language" }, ngImport: i0 });
4304
4336
  }
4305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VoiceRecognitionDirective, decorators: [{
4337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: VoiceRecognitionDirective, decorators: [{
4306
4338
  type: Directive,
4307
4339
  args: [{
4308
- standalone: false,
4309
4340
  selector: '[luxVoiceRecognition]'
4310
4341
  }]
4311
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { language: [{
4342
+ }], ctorParameters: () => [], propDecorators: { language: [{
4312
4343
  type: Input
4313
4344
  }] } });
4314
4345
  const getRecordingMessage = (lang) => {
@@ -4363,28 +4394,29 @@ const windowProvider = {
4363
4394
  const WINDOW_PROVIDERS = [browserWindowProvider, windowProvider];
4364
4395
 
4365
4396
  class LuxModule {
4366
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4367
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: LuxModule, declarations: [AutocompleteComponent,
4368
- AutocompleteListComponent,
4397
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4398
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: LuxModule, imports: [FormsModule,
4369
4399
  FilterComponent,
4400
+ GeolocationComponent,
4401
+ InputComponent,
4402
+ AutocompleteListComponent,
4403
+ AutocompleteComponent,
4370
4404
  CheckboxComponent,
4371
4405
  DatetimeComponent,
4372
- InputComponent,
4373
- GeolocationComponent,
4406
+ LuxBreadcrumbComponent,
4374
4407
  LuxTooltipDirective,
4375
4408
  LuxModalWindowComponent,
4376
4409
  LuxModalBackdropComponent,
4377
- LuxBreadcrumbComponent,
4378
4410
  MapComponent,
4379
- SelectComponent,
4380
- TooltipComponent,
4381
4411
  PaginationComponent,
4382
4412
  RadiogroupComponent,
4383
- VoiceRecognitionDirective], imports: [FormsModule,
4384
4413
  HttpClientModule,
4385
4414
  ReactiveFormsModule,
4386
4415
  RouterModule,
4387
- CommonModule], exports: [AutocompleteComponent,
4416
+ SelectComponent,
4417
+ CommonModule,
4418
+ TooltipComponent,
4419
+ VoiceRecognitionDirective], exports: [AutocompleteComponent,
4388
4420
  AutocompleteListComponent,
4389
4421
  FilterComponent,
4390
4422
  CheckboxComponent,
@@ -4392,48 +4424,59 @@ class LuxModule {
4392
4424
  InputComponent,
4393
4425
  GeolocationComponent,
4394
4426
  LuxTooltipDirective,
4395
- LuxBreadcrumbComponent,
4396
- LuxBreadcrumbComponent,
4397
4427
  MapComponent,
4398
4428
  SelectComponent,
4399
4429
  PaginationComponent,
4400
4430
  RadiogroupComponent,
4401
4431
  VoiceRecognitionDirective] });
4402
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModule, providers: [ModalService, TooltipService, WINDOW_PROVIDERS], imports: [FormsModule,
4432
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxModule, providers: [ModalService, TooltipService, WINDOW_PROVIDERS], imports: [FormsModule,
4433
+ FilterComponent,
4434
+ GeolocationComponent,
4435
+ InputComponent,
4436
+ AutocompleteListComponent,
4437
+ AutocompleteComponent,
4438
+ DatetimeComponent,
4439
+ LuxBreadcrumbComponent,
4440
+ LuxModalWindowComponent,
4441
+ LuxModalBackdropComponent,
4442
+ MapComponent,
4443
+ PaginationComponent,
4444
+ RadiogroupComponent,
4403
4445
  HttpClientModule,
4404
4446
  ReactiveFormsModule,
4405
4447
  RouterModule,
4406
- CommonModule] });
4448
+ SelectComponent,
4449
+ CommonModule,
4450
+ TooltipComponent] });
4407
4451
  }
4408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModule, decorators: [{
4452
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: LuxModule, decorators: [{
4409
4453
  type: NgModule,
4410
4454
  args: [{
4411
- declarations: [
4412
- AutocompleteComponent,
4413
- AutocompleteListComponent,
4455
+ declarations: [],
4456
+ providers: [ModalService, TooltipService, WINDOW_PROVIDERS],
4457
+ imports: [
4458
+ FormsModule,
4414
4459
  FilterComponent,
4460
+ GeolocationComponent,
4461
+ InputComponent,
4462
+ AutocompleteListComponent,
4463
+ AutocompleteComponent,
4415
4464
  CheckboxComponent,
4416
4465
  DatetimeComponent,
4417
- InputComponent,
4418
- GeolocationComponent,
4466
+ LuxBreadcrumbComponent,
4419
4467
  LuxTooltipDirective,
4420
4468
  LuxModalWindowComponent,
4421
4469
  LuxModalBackdropComponent,
4422
- LuxBreadcrumbComponent,
4423
4470
  MapComponent,
4424
- SelectComponent,
4425
- TooltipComponent,
4426
4471
  PaginationComponent,
4427
4472
  RadiogroupComponent,
4428
- VoiceRecognitionDirective
4429
- ],
4430
- providers: [ModalService, TooltipService, WINDOW_PROVIDERS],
4431
- imports: [
4432
- FormsModule,
4433
4473
  HttpClientModule,
4434
4474
  ReactiveFormsModule,
4435
4475
  RouterModule,
4436
- CommonModule
4476
+ SelectComponent,
4477
+ CommonModule,
4478
+ TooltipComponent,
4479
+ VoiceRecognitionDirective
4437
4480
  ],
4438
4481
  exports: [
4439
4482
  AutocompleteComponent,
@@ -4444,8 +4487,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
4444
4487
  InputComponent,
4445
4488
  GeolocationComponent,
4446
4489
  LuxTooltipDirective,
4447
- LuxBreadcrumbComponent,
4448
- LuxBreadcrumbComponent,
4449
4490
  MapComponent,
4450
4491
  SelectComponent,
4451
4492
  PaginationComponent,