@metadev/lux 0.31.0 → 21.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/fesm2022/metadev-lux.mjs +1101 -1058
  2. package/fesm2022/metadev-lux.mjs.map +1 -1
  3. package/index.d.ts +945 -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: "21.1.0", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
569
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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: "21.1.0", 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: "21.1.0", ngImport: i0, type: AutocompleteListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
877
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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: "21.1.0", 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: "21.1.0", ngImport: i0, type: LuxBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
996
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: LuxBreadcrumbComponent, isStandalone: true, selector: "lux-breadcrumb", ngImport: i0, template: "<ul class=\"lux-breadcrumb\">\r\n @for (breadcrumb of breadcrumbs; track breadcrumb.url; let isLast = $last; let\r\n isFirst = $first) {\r\n <li class=\"lux-breadcrumb-item\">\r\n <a [class.first]=\"isFirst\" routerLink=\"{{ breadcrumb.url }}\">{{\r\n breadcrumb.label\r\n }}</a>\r\n @if (!isLast) {\r\n <div class=\"lux-breadcrumb-separator\"></div>\r\n }\r\n </li>\r\n }\r\n</ul>\r\n", styles: [".lux-breadcrumb{padding:10px 12px;list-style:none;list-style-type:none}.lux-breadcrumb li{display:inline;font-size:.8em}.lux-breadcrumb li a.first{font-weight:700}.lux-breadcrumb li+li:before{padding:8px;color:#000}.lux-breadcrumb li a,ol.lux-breadcrumb li a:hover{text-decoration:underline}.lux-breadcrumb a{cursor:hand}.lux-breadcrumb-separator{color:red;position:relative;top:5px;height:16px;padding:0 8px;background-image:url('data:image/svg+xml,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">%0A <path d=\"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z\"/>%0A</svg>%0A');background-repeat:no-repeat;display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "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: "21.1.0", 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: [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 {
@@ -962,7 +1019,7 @@ class CheckboxComponent {
962
1019
  get lang() {
963
1020
  return this._lang;
964
1021
  }
965
- internalValue;
1022
+ internalValue = false;
966
1023
  get value() {
967
1024
  return this.internalValue;
968
1025
  }
@@ -977,6 +1034,7 @@ class CheckboxComponent {
977
1034
  if (!initialAndEmpty) {
978
1035
  this.valueChange.emit(v);
979
1036
  }
1037
+ this.cdr.markForCheck();
980
1038
  }
981
1039
  get tabindexValue() {
982
1040
  return this.disabled ? null : '0';
@@ -993,6 +1051,7 @@ class CheckboxComponent {
993
1051
  }
994
1052
  this._disabled = v;
995
1053
  this.syncModel();
1054
+ this.cdr.markForCheck();
996
1055
  }
997
1056
  inputId;
998
1057
  literals = {
@@ -1007,7 +1066,7 @@ class CheckboxComponent {
1007
1066
  };
1008
1067
  touched = false;
1009
1068
  valueChange = new EventEmitter();
1010
- constructor() { }
1069
+ cdr = inject(ChangeDetectorRef);
1011
1070
  // ControlValueAccessor Interface
1012
1071
  onChange = (value) => { };
1013
1072
  onTouched = () => { };
@@ -1036,7 +1095,9 @@ class CheckboxComponent {
1036
1095
  : `${this.name || 'checkbox'}$${CheckboxComponent.idCounter++}`;
1037
1096
  }
1038
1097
  ngAfterViewInit() {
1039
- this.syncModel();
1098
+ setTimeout(() => {
1099
+ this.syncModel();
1100
+ });
1040
1101
  }
1041
1102
  clicked() {
1042
1103
  if (!this.disabled) {
@@ -1056,25 +1117,25 @@ class CheckboxComponent {
1056
1117
  this.ck.nativeElement.checked = this.internalValue;
1057
1118
  }
1058
1119
  }
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: [
1120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1121
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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
1122
  {
1062
1123
  provide: NG_VALUE_ACCESSOR,
1063
1124
  multi: true,
1064
1125
  useExisting: forwardRef(() => CheckboxComponent)
1065
1126
  }
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"] }] });
1127
+ ], viewQueries: [{ propertyName: "ck", first: true, predicate: ["ck"], descendants: true }], ngImport: i0, template: "<div class=\"switch\">\r\n <div>\r\n @if (label) {\r\n <label [for]=\"inputId\">{{ label }}</label>\r\n }\r\n </div>\r\n @if (!disabled) {\r\n <div class=\"switch-item\" (click)=\"clicked()\">\r\n <input #ck [name]=\"name\" type=\"checkbox\" [id]=\"inputId\" />\r\n <div\r\n class=\"slider round\"\r\n [class.on]=\"value\"\r\n [class.disabled]=\"disabled\"\r\n [tabindex]=\"tabindexValue\"\r\n (keyup)=\"onKey($event)\"\r\n ></div>\r\n </div>\r\n }\r\n <div>\r\n @if (value) {\r\n <span class=\"checkbox-label\">{{ literals[lang].yesLabel }}</span>\r\n } @if (!value) {\r\n <span class=\"checkbox-label\">{{ literals[lang].noLabel }}</span>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".switch{display:flex;flex-flow:row wrap;align-items:center}label{padding-right:1.1rem}.switch-item{padding-right:.5em}.slider.round{border-radius:.7rem;width:3.1rem;height:1.4rem}.slider.round:before{border-radius:50%}.switch input{opacity:0;width:0;height:0}.slider{cursor:pointer;position:relative;top:-.7rem;background-color:#ccc;transition:.4s}.slider.on{background-color:#2196f3}.slider:before{position:absolute;content:\"\";height:1rem;width:1rem;left:.2rem;bottom:.2rem;background-color:#fff;transition:.4s}.slider.on:before{transform:translate(26px)}input:focus+.slider{box-shadow:0 0 1px #2196f3}\n"] });
1067
1128
  }
1068
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: CheckboxComponent, decorators: [{
1129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CheckboxComponent, decorators: [{
1069
1130
  type: Component,
1070
- args: [{ standalone: false, selector: 'lux-checkbox', providers: [
1131
+ args: [{ selector: 'lux-checkbox', imports: [], providers: [
1071
1132
  {
1072
1133
  provide: NG_VALUE_ACCESSOR,
1073
1134
  multi: true,
1074
1135
  useExisting: forwardRef(() => CheckboxComponent)
1075
1136
  }
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"] }]
1077
- }], ctorParameters: () => [], propDecorators: { ck: [{
1137
+ ], template: "<div class=\"switch\">\r\n <div>\r\n @if (label) {\r\n <label [for]=\"inputId\">{{ label }}</label>\r\n }\r\n </div>\r\n @if (!disabled) {\r\n <div class=\"switch-item\" (click)=\"clicked()\">\r\n <input #ck [name]=\"name\" type=\"checkbox\" [id]=\"inputId\" />\r\n <div\r\n class=\"slider round\"\r\n [class.on]=\"value\"\r\n [class.disabled]=\"disabled\"\r\n [tabindex]=\"tabindexValue\"\r\n (keyup)=\"onKey($event)\"\r\n ></div>\r\n </div>\r\n }\r\n <div>\r\n @if (value) {\r\n <span class=\"checkbox-label\">{{ literals[lang].yesLabel }}</span>\r\n } @if (!value) {\r\n <span class=\"checkbox-label\">{{ literals[lang].noLabel }}</span>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".switch{display:flex;flex-flow:row wrap;align-items:center}label{padding-right:1.1rem}.switch-item{padding-right:.5em}.slider.round{border-radius:.7rem;width:3.1rem;height:1.4rem}.slider.round:before{border-radius:50%}.switch input{opacity:0;width:0;height:0}.slider{cursor:pointer;position:relative;top:-.7rem;background-color:#ccc;transition:.4s}.slider.on{background-color:#2196f3}.slider:before{position:absolute;content:\"\";height:1rem;width:1rem;left:.2rem;bottom:.2rem;background-color:#fff;transition:.4s}.slider.on:before{transform:translate(26px)}input:focus+.slider{box-shadow:0 0 1px #2196f3}\n"] }]
1138
+ }], propDecorators: { ck: [{
1078
1139
  type: ViewChild,
1079
1140
  args: ['ck', { static: false }]
1080
1141
  }], lang: [{
@@ -1333,8 +1394,8 @@ class DatetimeComponent {
1333
1394
  this.min = this.min || '1900-01-01';
1334
1395
  this.max = this.max || '2100-01-01';
1335
1396
  }
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: [
1397
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: DatetimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1398
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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
1399
  {
1339
1400
  provide: NG_VALUE_ACCESSOR,
1340
1401
  multi: true,
@@ -1345,11 +1406,11 @@ class DatetimeComponent {
1345
1406
  multi: true,
1346
1407
  useExisting: forwardRef(() => DatetimeComponent)
1347
1408
  }
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"] }] });
1409
+ ], viewQueries: [{ propertyName: "dateInput", first: true, predicate: ["dateInput"], descendants: true, static: true }, { propertyName: "timeInput", first: true, predicate: ["timeInput"], descendants: true, static: true }], ngImport: i0, template: "<input\r\n #dateInput\r\n class=\"rounded-left prefix\"\r\n [ngClass]=\"className\"\r\n type=\"date\"\r\n [id]=\"inputId + '$date'\"\r\n [(ngModel)]=\"dateValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [placeholder]=\"\"\r\n (keyup)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (change)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n<input\r\n #timeInput\r\n [class]=\"\r\n (disabled || readonly || !isClearable()) && localTime ? 'rounded-right' : ''\r\n \"\r\n [ngClass]=\"className\"\r\n type=\"time\"\r\n [id]=\"inputId + '$time'\"\r\n [(ngModel)]=\"timeValue\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [attr.disabled]=\"disabled === true ? 'true' : undefined\"\r\n [attr.readonly]=\"readonly === true ? 'true' : undefined\"\r\n [placeholder]=\"\"\r\n [step]=\"includeSeconds ? 1 : 60\"\r\n (keyup)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (change)=\"onEventDatetime(dateInput.value, timeInput.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n@if (!localTime) {\r\n<div\r\n [class]=\"\r\n disabled || readonly || !isClearable()\r\n ? 'rounded-right postfix symbol'\r\n : 'postfix symbol'\r\n \"\r\n [ngClass]=\"className\"\r\n>\r\n <span>{{ localTime ? '' : 'UTC' }}</span>\r\n</div>\r\n} @if (!disabled && !readonly && isClearable()) {\r\n<button\r\n #clearButton\r\n type=\"button\"\r\n class=\"rounded-right postfix bordered icon-clear\"\r\n [id]=\"inputId + '$clear'\"\r\n (click)=\"clear()\"\r\n aria-label=\"clear\"\r\n></button>\r\n} @if (inlineErrors && lastErrors && (dirty || touched)) {\r\n<div class=\"alert\">\r\n @if (lastErrors.required) {\r\n <div>{{ userErrors[lang].required }}</div>\r\n } @if (lastErrors.min) {\r\n <div>{{ userErrors[lang].min.replace('$min', lastErrors.min.min) }}</div>\r\n } @if (lastErrors.max) {\r\n <div>{{ userErrors[lang].max.replace('$max', lastErrors.max.max) }}</div>\r\n }\r\n</div>\r\n}\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}:host{display:flex;align-items:stretch}.readonly{border:none}.readonly:focus{border:none;outline:none}.disabled{background-color:var(--lux-disabled-color, #f1f1f1);border-color:var(--lux-disabled-border-color, #6d6d6d)}.icon-clear{grid-row:1;grid-column:2;width:var(--lux-autocomplete-icon-width, 1.5rem);background:var(--lux-autocomplete-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-autocomplete-icon-bg-size, .5rem .5rem);z-index:1}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[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
1410
  }
1350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: DatetimeComponent, decorators: [{
1411
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: DatetimeComponent, decorators: [{
1351
1412
  type: Component,
1352
- args: [{ standalone: false, selector: 'lux-datetime', providers: [
1413
+ args: [{ selector: 'lux-datetime', imports: [FormsModule, CommonModule], providers: [
1353
1414
  {
1354
1415
  provide: NG_VALUE_ACCESSOR,
1355
1416
  multi: true,
@@ -1360,7 +1421,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
1360
1421
  multi: true,
1361
1422
  useExisting: forwardRef(() => DatetimeComponent)
1362
1423
  }
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"] }]
1424
+ ], 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
1425
  }], ctorParameters: () => [], propDecorators: { dateInput: [{
1365
1426
  type: ViewChild,
1366
1427
  args: ['dateInput', { static: true }]
@@ -1513,24 +1574,24 @@ class FilterComponent {
1513
1574
  addEvent() {
1514
1575
  this.subject.next(this.searchValue);
1515
1576
  }
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: [
1577
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1578
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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
1579
  {
1519
1580
  provide: NG_VALUE_ACCESSOR,
1520
1581
  multi: true,
1521
1582
  useExisting: forwardRef(() => FilterComponent)
1522
1583
  }
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"] }] });
1584
+ ], ngImport: i0, template: "<div class=\"filter\">\r\n <input\r\n #i0\r\n type=\"text\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [placeholder]=\"placeholder\"\r\n [id]=\"inputId\"\r\n [disabled]=\"disabled\"\r\n [value]=\"searchValue\"\r\n (valueChange)=\"onInputValueChange(i0.value)\"\r\n (keyup)=\"keyup($event, i0.value)\"\r\n />\r\n\r\n <button\r\n [class.hide]=\"!searchValue\"\r\n aria-label=\"Clear\"\r\n class=\"clear-indicator icon icon-clear\"\r\n type=\"button\"\r\n (click)=\"clear()\"\r\n ></button>\r\n @if (searchOnType) {\r\n <i class=\"search-indicator icon icon-search\"></i>\r\n } @if (!searchOnType) {\r\n <button\r\n class=\"btn-search\"\r\n type=\"button\"\r\n [disabled]=\"disabled\"\r\n (click)=\"search()\"\r\n >\r\n Search\r\n </button>\r\n }\r\n</div>\r\n", styles: [":focus{z-index:1}input,select,textarea{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057);margin:var(--lux-input-margin, 0rem);padding:var(--lux-input-padding, 0rem .5rem)}.alert{padding:.2rem 2rem;background:var(--lux-alert-background, #fe2e2e);color:var(--lux-alert-color, white);font-family:Consolas,monospace;width:45%;margin-right:1rem;display:inline-block}.symbol{display:inline-block;align-items:baseline;padding:0rem .5rem;margin-bottom:0;font-weight:400;color:var(--lux-symbol-color, default);text-align:center;white-space:nowrap;background:var(--lux-symbol-background, default);font-size:var(--lux-symbol-font-size, 1rem)}.bordered,.symbol{border:var(--lux-input-border, 1px solid) var(--lux-input-border-color, #495057)}.rounded,.rounded-right,.rounded-middle,.rounded-left{border-radius:var(--lux-border-radius, .25rem)}.rounded-left{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-middle{border-radius:0}.rounded-right{border-top-left-radius:0;border-bottom-left-radius:0}.prefix{border-right:none}.infix{border-left:none;border-right:none}.postfix{border-left:none;display:flex;align-items:center}.monospace{font-family:monospace}.default-font{color:var(--lux-font-color, black)}.filter{display:grid;grid-template-columns:auto 1.5rem 1.5rem .5rem auto}.filter input{grid-row:1;grid-column-start:1;grid-column-end:4}.filter .hide{visibility:collapse}.filter .clear-indicator{grid-row:1;grid-column:2;border:none}.filter .search-indicator{grid-row:1;grid-column:3}.filter .btn-search{grid-row:1;grid-column:5}.filter .icon-search{background:var(--lux-filter-icon-search, url(/assets/img/filter-search.png) no-repeat center);background-size:var(--lux-filter-icon-bg-size, 1rem);background-position:center;width:var(--lux-filter-icon-width, 1rem)}.filter .icon-clear{background:var(--lux-filter-icon-clear, url(/assets/img/filter-clear.png) no-repeat center);background-size:var(--lux-filter-icon-bg-size, 1rem);background-position:center}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }] });
1524
1585
  }
1525
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: FilterComponent, decorators: [{
1586
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: FilterComponent, decorators: [{
1526
1587
  type: Component,
1527
- args: [{ standalone: false, selector: 'lux-filter', providers: [
1588
+ args: [{ selector: 'lux-filter', imports: [FormsModule], providers: [
1528
1589
  {
1529
1590
  provide: NG_VALUE_ACCESSOR,
1530
1591
  multi: true,
1531
1592
  useExisting: forwardRef(() => FilterComponent)
1532
1593
  }
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"] }]
1594
+ ], 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
1595
  }], ctorParameters: () => [], propDecorators: { disabled: [{
1535
1596
  type: Input
1536
1597
  }], inputId: [{
@@ -1550,993 +1611,975 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
1550
1611
  type: Output
1551
1612
  }] } });
1552
1613
 
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' });
1614
+ let openLayersIsInstalled = false;
1615
+ class OpenLayerLoaderService {
1616
+ load() {
1617
+ if (window.ol) {
1618
+ return of(true);
1619
+ }
1620
+ const openLayerJsUrl = 'https://openlayers.org/en/v5.3.0/build/ol.js';
1621
+ const openLayerCssUrl = 'https://openlayers.org/en/v5.3.0/css/ol.css';
1622
+ if (!openLayersIsInstalled) {
1623
+ openLayersIsInstalled = true; // only try to install it once
1624
+ loadCss(openLayerCssUrl, () => { });
1625
+ return from(new Promise((resolve, _) => {
1626
+ loadScript(openLayerJsUrl, () => resolve(true));
1627
+ }));
1628
+ }
1629
+ return of(true);
1630
+ }
1631
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OpenLayerLoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1632
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OpenLayerLoaderService, providedIn: 'root' });
1581
1633
  }
1582
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModalConfig, decorators: [{
1634
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OpenLayerLoaderService, decorators: [{
1583
1635
  type: Injectable,
1584
1636
  args: [{ providedIn: 'root' }]
1585
1637
  }] });
1638
+ /** Dynamically load a script from url and return a callback */
1639
+ const loadScript = (url, callback) => {
1640
+ const script = document.createElement('script');
1641
+ script.type = 'text/javascript';
1642
+ if (script.readyState) {
1643
+ // for old IE
1644
+ script.onreadystatechange = () => {
1645
+ if (script.readyState === 'loaded' || script.readyState === 'complete') {
1646
+ script.onreadystatechange = null;
1647
+ callback();
1648
+ }
1649
+ };
1650
+ }
1651
+ else {
1652
+ // Others browsers
1653
+ script.onload = () => {
1654
+ callback();
1655
+ };
1656
+ }
1657
+ script.src = url;
1658
+ document.getElementsByTagName('head')[0].appendChild(script);
1659
+ };
1660
+ /** Dynamically load css from url and return a callback */
1661
+ const loadCss = (url, callback) => {
1662
+ const link = document.createElement('link');
1663
+ link.type = 'text/css';
1664
+ link.rel = 'stylesheet';
1665
+ link.type = 'text/javascript';
1666
+ link.href = url;
1667
+ link.onload = () => {
1668
+ callback();
1669
+ };
1670
+ document.getElementsByTagName('head')[0].appendChild(link);
1671
+ };
1586
1672
 
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;
1673
+ /* eslint-disable no-self-assign */
1674
+ class MapComponent {
1675
+ static idCounter = 0;
1676
+ loaded$ = new BehaviorSubject(false);
1677
+ _map;
1678
+ mapId;
1679
+ _zoom;
1680
+ set zoom(zoom) {
1681
+ if (!isNaN(zoom)) {
1682
+ this._zoom = zoom;
1683
+ if (this._map) {
1684
+ this._map.getView().setZoom(zoom);
1685
+ }
1606
1686
  }
1607
1687
  }
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, () => { });
1688
+ get zoom() {
1689
+ return this._zoom;
1625
1690
  }
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);
1691
+ _center;
1692
+ set center(center) {
1693
+ if (center && center.coordinates && center.coordinates.length === 2) {
1694
+ this._center = center;
1695
+ if (this._map) {
1696
+ this._map.getView().setCenter(ol.proj.fromLonLat(center.coordinates));
1635
1697
  }
1636
- this._removeModalElements();
1637
1698
  }
1638
1699
  }
1639
- _dismiss(reason) {
1640
- if (this._reject) {
1641
- this._reject(reason);
1642
- }
1643
- this._removeModalElements();
1700
+ get center() {
1701
+ return this._center;
1644
1702
  }
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);
1703
+ _readonly;
1704
+ set readonly(readonly) {
1705
+ if (!readonly) {
1706
+ if (this._map) {
1707
+ this._map.on('click', (args) => {
1708
+ // args.coordinate is in EPSG:3857 (meters), we transform it into EPSG:4326 (degrees)
1709
+ const coordinates = ol.proj.toLonLat(args.coordinate);
1710
+ // alternatively: const lonLat = ol.proj.transform(args.coordinate,'EPSG:3857','EPSG:4326');
1711
+ this.addMarkerAtCoordinates(coordinates);
1712
+ });
1713
+ this._map.on('pointermove', (event) => {
1714
+ const pixel = this._map.getEventPixel(event.originalEvent);
1715
+ const hit = this._map.hasFeatureAtPixel(pixel);
1716
+ this._map.getViewport().style.cursor = hit ? 'move' : 'grab';
1717
+ });
1654
1718
  }
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
- }
1719
+ }
1720
+ else {
1721
+ if (this._map) {
1722
+ this._map.on('click', (args) => { });
1723
+ this._map.on('pointermove', (event) => { });
1724
+ this._map.getViewport().style.cursor = 'grab';
1667
1725
  }
1668
1726
  }
1727
+ this._readonly = readonly;
1728
+ // reset marker coordinates so marker interactions can be created or recreated accordingly
1729
+ // to the changes to readonly
1730
+ this.markerCoordinates = this.markerCoordinates;
1669
1731
  }
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;
1732
+ get readonly() {
1733
+ return this._readonly;
1685
1734
  }
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();
1735
+ _marker;
1736
+ _markerInteraction;
1737
+ _markerCoordinates;
1738
+ set markerCoordinates(markerCoordinates) {
1739
+ if (markerCoordinates && markerCoordinates.length === 2) {
1740
+ this._markerCoordinates = markerCoordinates;
1741
+ if (this._map) {
1742
+ this.addMarkerAtCoordinates(markerCoordinates);
1743
+ }
1754
1744
  }
1755
- if (focusedElement === last && !tabEvent.shiftKey) {
1756
- first.focus();
1757
- tabEvent.preventDefault();
1745
+ else {
1746
+ this._markerCoordinates = undefined;
1747
+ if (this._map) {
1748
+ this.removeMarker();
1749
+ }
1758
1750
  }
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
- }
1787
- role = 'dialog';
1788
- tabindex = '-1';
1789
- ariamodal = true;
1790
- get hostAriaLabelledBy() {
1791
- return this.ariaLabelledBy;
1792
1751
  }
1793
- get hostAriaDescribedBy() {
1794
- return this.ariaDescribedBy;
1752
+ get markerCoordinates() {
1753
+ return this._markerCoordinates;
1795
1754
  }
1796
- backdropClick(btn) {
1797
- if (this.backdrop === true && this._elRef.nativeElement === btn) {
1798
- this.dismiss(ModalDismissReasons.BackdropClick);
1755
+ set markerPoint(markerPoint) {
1756
+ if (!markerPoint ||
1757
+ !(markerPoint.coordinates && markerPoint.coordinates.length === 2)) {
1758
+ this.markerCoordinates = undefined;
1799
1759
  }
1800
- }
1801
- escKey(event) {
1802
- if (this.keyboard && !event.defaultPrevented) {
1803
- this.dismiss(ModalDismissReasons.Esc);
1760
+ else {
1761
+ this.markerCoordinates = [
1762
+ +markerPoint.coordinates[0],
1763
+ +markerPoint.coordinates[1]
1764
+ ];
1804
1765
  }
1766
+ this.valueChange.emit(markerPoint);
1805
1767
  }
1806
- constructor(_document, _elRef) {
1807
- this._document = _document;
1808
- this._elRef = _elRef;
1768
+ get markerPoint() {
1769
+ return {
1770
+ type: 'Point',
1771
+ coordinates: this.markerCoordinates
1772
+ };
1809
1773
  }
1810
- dismiss(reason) {
1811
- this.dismissEvent.emit(reason);
1774
+ valueChange = new EventEmitter();
1775
+ _markerSource;
1776
+ _markerStyle;
1777
+ constructor() {
1778
+ const olLoader = inject(OpenLayerLoaderService);
1779
+ olLoader.load().subscribe((_) => {
1780
+ // Initialize
1781
+ this._markerSource = new ol.source.Vector();
1782
+ this._markerStyle = new ol.style.Style({
1783
+ image: new ol.style.Icon({
1784
+ anchor: [0.5, 1],
1785
+ scale: 0.25,
1786
+ src: '/assets/img/marker.png'
1787
+ })
1788
+ });
1789
+ this.loaded$.next(true);
1790
+ });
1812
1791
  }
1813
1792
  ngOnInit() {
1814
- this._elWithFocus = this._document.activeElement;
1793
+ this.mapId = this.mapId ? this.mapId : 'map' + MapComponent.idCounter++;
1815
1794
  }
1816
1795
  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
- }
1796
+ this.loaded$.subscribe((loaded) => {
1797
+ if (loaded) {
1798
+ this.initMap();
1799
+ }
1800
+ });
1822
1801
  }
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;
1802
+ initMap() {
1803
+ this._map = new ol.Map({
1804
+ target: this.mapId,
1805
+ controls: ol.control.defaults({ attribution: false }),
1806
+ layers: [
1807
+ new ol.layer.Tile({
1808
+ source: new ol.source.OSM()
1809
+ }),
1810
+ new ol.layer.Vector({
1811
+ source: this._markerSource,
1812
+ style: this._markerStyle
1813
+ })
1814
+ ],
1815
+ view: new ol.View({
1816
+ center: ol.proj.fromLonLat(this.center !== undefined ? this.center.coordinates : [0, 0]),
1817
+ zoom: this.zoom
1818
+ })
1819
+ });
1820
+ if (this.center === undefined || this.center === null) {
1821
+ // if the center is not set, we set its default value
1822
+ if ('geolocation' in navigator) {
1823
+ navigator.geolocation.getCurrentPosition((position) => {
1824
+ this.center = {
1825
+ type: 'Point',
1826
+ coordinates: [position.coords.longitude, position.coords.latitude]
1827
+ };
1828
+ }, (error) => {
1829
+ this.center = {
1830
+ type: 'Point',
1831
+ coordinates: [0, 0]
1832
+ };
1833
+ });
1834
+ }
1835
+ else {
1836
+ this.center = {
1837
+ type: 'Point',
1838
+ coordinates: [0, 0]
1839
+ };
1840
+ }
1829
1841
  }
1830
1842
  else {
1831
- elementToFocus = body;
1843
+ // the center needs the map to be properly set, so if it was set before the map was initialized,
1844
+ // we set the center again to perform necessary adjustements
1845
+ this.center = this.center;
1846
+ }
1847
+ if (this.zoom === undefined || this.zoom === null) {
1848
+ // if the zoom is not set, we set its default value
1849
+ this.zoom = 18;
1850
+ }
1851
+ else {
1852
+ // the zoom needs the map to be properly set, so if it was set before the map was initialized,
1853
+ // we set the zoom again to perform necessary adjustements
1854
+ this.zoom = this.zoom;
1855
+ }
1856
+ if (this.readonly === undefined || this.readonly === null) {
1857
+ // if readonly is not set, we set its default value
1858
+ this.readonly = false;
1859
+ }
1860
+ else {
1861
+ // readonly needs the map to be properly set, so if it was set before the map was initialized,
1862
+ // we set readonly again to perform necessary adjustements
1863
+ this.readonly = this.readonly;
1864
+ }
1865
+ if (this.markerCoordinates !== undefined &&
1866
+ this.markerCoordinates !== null) {
1867
+ // the marker coordinates need the map to be properly set, so if they were set before the map was initialized,
1868
+ // we set the marker coordinates again to perform necessary adjustements
1869
+ this.markerCoordinates = this.markerCoordinates;
1832
1870
  }
1833
- elementToFocus.focus();
1834
- this._elWithFocus = null;
1835
1871
  }
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: [{
1872
+ addMarkerAtCoordinates(coordinates) {
1873
+ if (coordinates && coordinates.length === 2) {
1874
+ if (this._marker !== undefined) {
1875
+ this.removeMarker();
1876
+ }
1877
+ this._marker = new ol.Feature({
1878
+ geometry: new ol.geom.Point(
1879
+ // [lon, lat] is in EPSG:4326 (degrees), we transform it into EPSG:3857 (meters)
1880
+ ol.proj.transform(coordinates, 'EPSG:4326', 'EPSG:3857'))
1881
+ });
1882
+ this._markerSource.addFeature(this._marker);
1883
+ this._markerCoordinates = this.getMarkerCoordinates();
1884
+ if (!this.readonly) {
1885
+ const dragInteraction = new ol.interaction.Modify({
1886
+ features: new ol.Collection([this._marker]),
1887
+ style: this._markerStyle,
1888
+ pixelTolerance: 50,
1889
+ hitDetection: true
1890
+ });
1891
+ this._markerInteraction = dragInteraction;
1892
+ this._map.addInteraction(dragInteraction);
1893
+ }
1894
+ this._marker.on('change', () => {
1895
+ this._markerCoordinates = this.getMarkerCoordinates();
1896
+ }, this._marker);
1897
+ }
1898
+ }
1899
+ removeMarker() {
1900
+ if (this._marker !== undefined) {
1901
+ this._markerSource.removeFeature(this._marker);
1902
+ this._marker = undefined;
1903
+ }
1904
+ if (this._markerInteraction !== undefined) {
1905
+ this._map.getInteractions().pop();
1906
+ this._markerInteraction = undefined;
1907
+ }
1908
+ }
1909
+ getMarkerCoordinates() {
1910
+ if (this._marker === undefined || this._marker == null) {
1911
+ return this._marker;
1912
+ }
1913
+ const coordinates = this._marker.getGeometry().getCoordinates();
1914
+ // coordinates is in EPSG:3857 (meters), we transform it into EPSG:4326 (degrees)
1915
+ return ol.proj.transform(coordinates, 'EPSG:3857', 'EPSG:4326');
1916
+ }
1917
+ onResize() {
1918
+ if (this._map) {
1919
+ this._map.updateSize();
1920
+ }
1921
+ }
1922
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1923
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", 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"] });
1924
+ }
1925
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MapComponent, decorators: [{
1926
+ type: Component,
1927
+ args: [{ selector: 'lux-map', imports: [], template: "<div [id]=\"mapId\" class=\"map\" (resized)=\"onResize()\"></div>\n", styles: [".map{min-height:100px;height:100%;min-width:160px;width:100%}\n"] }]
1928
+ }], ctorParameters: () => [], propDecorators: { mapId: [{
1858
1929
  type: Input
1859
- }], ariaLabelledBy: [{
1930
+ }], zoom: [{
1860
1931
  type: Input
1861
- }], backdrop: [{
1932
+ }], center: [{
1862
1933
  type: Input
1863
- }], keyboard: [{
1934
+ }], readonly: [{
1864
1935
  type: Input
1865
- }], windowClass: [{
1936
+ }], markerCoordinates: [{
1866
1937
  type: Input
1867
- }], dismissEvent: [{
1938
+ }], markerPoint: [{
1939
+ type: Input
1940
+ }], valueChange: [{
1868
1941
  type: Output
1942
+ }] } });
1943
+
1944
+ class LuxModalBackdropComponent {
1945
+ backdropClass;
1946
+ class = 'modal-backdrop fade show';
1947
+ style = 'z-index: 1050';
1948
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxModalBackdropComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1949
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: LuxModalBackdropComponent, isStandalone: true, selector: "lux-modal-backdrop", inputs: { backdropClass: "backdropClass" }, host: { properties: { "class": "this.class", "style": "this.style" } }, ngImport: i0, template: '', isInline: true });
1950
+ }
1951
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxModalBackdropComponent, decorators: [{
1952
+ type: Component,
1953
+ args: [{
1954
+ imports: [],
1955
+ selector: 'lux-modal-backdrop',
1956
+ template: ''
1957
+ }]
1958
+ }], propDecorators: { backdropClass: [{
1959
+ type: Input
1869
1960
  }], class: [{
1870
1961
  type: HostBinding,
1871
1962
  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: [{
1963
+ }], style: [{
1885
1964
  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']]
1965
+ args: ['style']
1893
1966
  }] } });
1894
1967
 
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();
1968
+ class LuxModalConfig {
1969
+ backdrop = true;
1970
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxModalConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1971
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxModalConfig, providedIn: 'root' });
1972
+ }
1973
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxModalConfig, decorators: [{
1974
+ type: Injectable,
1975
+ args: [{ providedIn: 'root' }]
1976
+ }] });
1977
+
1978
+ class ActiveModal {
1979
+ close(result) { }
1980
+ dismiss(reason) { }
1981
+ }
1982
+ class ModalRef {
1983
+ _windowCmptRef;
1984
+ _contentRef;
1985
+ _backdropCmptRef;
1986
+ _beforeDismiss;
1987
+ _resolve;
1988
+ _reject;
1989
+ /**
1990
+ * The instance of a component used for the modal content.
1991
+ *
1992
+ * When a `TemplateRef` is used as the content, will return `undefined`.
1993
+ */
1994
+ get componentInstance() {
1995
+ if (this._contentRef.componentRef) {
1996
+ return this._contentRef.componentRef.instance;
1961
1997
  }
1962
- windowCmptRef.changeDetectorRef.detectChanges();
1963
- return modalRef;
1964
1998
  }
1965
- _applyWindowOptions(windowInstance, config) {
1966
- this._windowAttributes.forEach((optionName) => {
1967
- if (isDefined(config[optionName])) {
1968
- windowInstance[optionName] = config[optionName];
1969
- }
1999
+ /**
2000
+ * The promise that is resolved when the modal is closed and rejected when the modal is dismissed.
2001
+ */
2002
+ result;
2003
+ constructor(_windowCmptRef, _contentRef, _backdropCmptRef, _beforeDismiss) {
2004
+ this._windowCmptRef = _windowCmptRef;
2005
+ this._contentRef = _contentRef;
2006
+ this._backdropCmptRef = _backdropCmptRef;
2007
+ this._beforeDismiss = _beforeDismiss;
2008
+ _windowCmptRef.instance.dismissEvent.subscribe((reason) => {
2009
+ this.dismiss(reason);
1970
2010
  });
1971
- }
1972
- _applyBackgroundOptions(backgroudInstance, config) {
1973
- this._backdropAttributes.forEach((optionName) => {
1974
- if (isDefined(config[optionName])) {
1975
- backgroudInstance[optionName] = config[optionName];
1976
- }
2011
+ this.result = new Promise((resolve, reject) => {
2012
+ this._resolve = resolve;
2013
+ this._reject = reject;
1977
2014
  });
2015
+ this.result.then(null, () => { });
1978
2016
  }
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');
2017
+ /**
2018
+ * Closes the modal with an optional `result` value.
2019
+ *
2020
+ * The `NgbMobalRef.result` promise will be resolved with the provided value.
2021
+ */
2022
+ close(result) {
2023
+ if (this._windowCmptRef) {
2024
+ if (this._resolve) {
2025
+ this._resolve(result);
1986
2026
  }
1987
- });
1988
- this._ariaHiddenValues.clear();
2027
+ this._removeModalElements();
2028
+ }
1989
2029
  }
1990
- getContentRef(moduleCFR, content, activeModal) {
1991
- if (content instanceof TemplateRef) {
1992
- return this.createFromTemplateRef(content, activeModal);
2030
+ _dismiss(reason) {
2031
+ if (this._reject) {
2032
+ this._reject(reason);
1993
2033
  }
2034
+ this._removeModalElements();
1994
2035
  }
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);
2036
+ /**
2037
+ * Dismisses the modal with an optional `reason` value.
2038
+ *
2039
+ * The `NgbModalRef.result` promise will be rejected with the provided value.
2040
+ */
2041
+ dismiss(reason) {
2042
+ if (this._windowCmptRef) {
2043
+ if (!this._beforeDismiss) {
2044
+ this._dismiss(reason);
2003
2045
  }
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);
2046
+ else {
2047
+ const dismiss = this._beforeDismiss();
2048
+ if (dismiss && dismiss.then) {
2049
+ dismiss.then((result) => {
2050
+ if (result !== false) {
2051
+ this._dismiss(reason);
2052
+ }
2053
+ }, () => { });
2054
+ }
2055
+ else if (dismiss !== false) {
2056
+ this._dismiss(reason);
2057
+ }
2041
2058
  }
2042
- });
2059
+ }
2043
2060
  }
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);
2061
+ _removeModalElements() {
2062
+ const windowNativeEl = this._windowCmptRef.location.nativeElement;
2063
+ windowNativeEl.parentNode.removeChild(windowNativeEl);
2064
+ this._windowCmptRef.destroy();
2065
+ if (this._backdropCmptRef) {
2066
+ const backdropNativeEl = this._backdropCmptRef.location.nativeElement;
2067
+ backdropNativeEl.parentNode.removeChild(backdropNativeEl);
2068
+ this._backdropCmptRef.destroy();
2069
+ }
2070
+ if (this._contentRef && this._contentRef.viewRef) {
2071
+ this._contentRef.viewRef.destroy();
2054
2072
  }
2073
+ this._windowCmptRef = null;
2074
+ this._backdropCmptRef = null;
2075
+ this._contentRef = null;
2055
2076
  }
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
2077
  }
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
2078
 
2079
+ var ModalDismissReasons;
2080
+ (function (ModalDismissReasons) {
2081
+ ModalDismissReasons[ModalDismissReasons["BackdropClick"] = 0] = "BackdropClick";
2082
+ ModalDismissReasons[ModalDismissReasons["Esc"] = 1] = "Esc";
2083
+ })(ModalDismissReasons || (ModalDismissReasons = {}));
2084
+
2085
+ const FOCUS = 'focus';
2086
+ var Key;
2087
+ (function (Key) {
2088
+ Key[Key["Tab"] = 9] = "Tab";
2089
+ Key[Key["Enter"] = 13] = "Enter";
2090
+ Key[Key["Escape"] = 27] = "Escape";
2091
+ Key[Key["Space"] = 32] = "Space";
2092
+ Key[Key["PageUp"] = 33] = "PageUp";
2093
+ Key[Key["PageDown"] = 34] = "PageDown";
2094
+ Key[Key["End"] = 35] = "End";
2095
+ Key[Key["Home"] = 36] = "Home";
2096
+ Key[Key["ArrowLeft"] = 37] = "ArrowLeft";
2097
+ Key[Key["ArrowUp"] = 38] = "ArrowUp";
2098
+ Key[Key["ArrowRight"] = 39] = "ArrowRight";
2099
+ Key[Key["ArrowDown"] = 40] = "ArrowDown";
2100
+ })(Key || (Key = {}));
2101
+ const isDefined = (value) => value !== undefined && value !== null;
2102
+ class ContentRef {
2103
+ nodes;
2104
+ viewRef;
2105
+ componentRef;
2106
+ constructor(nodes, viewRef, componentRef) {
2107
+ this.nodes = nodes;
2108
+ this.viewRef = viewRef;
2109
+ this.componentRef = componentRef;
2110
+ }
2111
+ }
2112
+ const FOCUSABLE_ELEMENTS_SELECTOR = [
2113
+ 'a[href]',
2114
+ 'button:not([disabled])',
2115
+ 'input:not([disabled]):not([type="hidden"])',
2116
+ 'select:not([disabled])',
2117
+ 'textarea:not([disabled])',
2118
+ '[contenteditable]',
2119
+ '[tabindex]:not([tabindex="-1"])'
2120
+ ].join(', ');
2067
2121
  /**
2068
- * A service that it allow open an close modal components
2122
+ * Returns first and last focusable elements inside of a given element based on specific CSS selector
2069
2123
  */
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);
2124
+ const getFocusableBoundaryElements = (element) => {
2125
+ const list = Array.from(element.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR)).filter((el) => el.tabIndex !== -1);
2126
+ return [list[0], list[list.length - 1]];
2127
+ };
2128
+ /**
2129
+ * Function that enforces browser focus to be trapped inside a DOM element.
2130
+ *
2131
+ * Works only for clicks inside the element and navigation with 'Tab', ignoring clicks outside of the element
2132
+ *
2133
+ * @param element The element around which focus will be trapped inside
2134
+ * @param stopFocusTrap$ The observable stream. When completed the focus trap will clean up listeners
2135
+ * and free internal resources
2136
+ * @param refocusOnClick Put the focus back to the last focused element whenever a click occurs on element (default to
2137
+ * false)
2138
+ */
2139
+ const focusTrap = (element, stopFocusTrap$, refocusOnClick = false) => {
2140
+ // last focused element
2141
+ const lastFocusedElement$ = fromEvent(element, 'focusin').pipe(takeUntil(stopFocusTrap$), map((e) => e.target));
2142
+ // 'tab' / 'shift+tab' stream
2143
+ fromEvent(element, 'keydown')
2144
+ .pipe(takeUntil(stopFocusTrap$), filter((e) => e.which === Key.Tab), withLatestFrom(lastFocusedElement$))
2145
+ .subscribe(([tabEvent, focusedElement]) => {
2146
+ const [first, last] = getFocusableBoundaryElements(element);
2147
+ if ((focusedElement === first || focusedElement === element) &&
2148
+ tabEvent.shiftKey) {
2149
+ last.focus();
2150
+ tabEvent.preventDefault();
2151
+ }
2152
+ if (focusedElement === last && !tabEvent.shiftKey) {
2153
+ first.focus();
2154
+ tabEvent.preventDefault();
2155
+ }
2156
+ });
2157
+ // inside click
2158
+ if (refocusOnClick) {
2159
+ fromEvent(element, 'click')
2160
+ .pipe(takeUntil(stopFocusTrap$), withLatestFrom(lastFocusedElement$), map((arr) => arr[1]))
2161
+ .subscribe((lastFocusedElement) => lastFocusedElement.focus());
2082
2162
  }
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 }] });
2163
+ };
2090
2164
 
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$;
2165
+ class LuxModalWindowComponent {
2166
+ _document = inject(DOCUMENT);
2167
+ _elRef = inject(ElementRef);
2168
+ _elWithFocus; // element that is focused prior to modal opening
2169
+ ariaDescribedBy;
2170
+ ariaLabelledBy;
2171
+ backdrop = false;
2172
+ keyboard = true;
2173
+ windowClass;
2174
+ dismissEvent = new EventEmitter();
2175
+ get class() {
2176
+ return `modal ${this.windowClass || ''}`;
2128
2177
  }
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
- }));
2178
+ role = 'dialog';
2179
+ tabindex = '-1';
2180
+ ariamodal = true;
2181
+ get hostAriaLabelledBy() {
2182
+ return this.ariaLabelledBy;
2143
2183
  }
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
- })));
2184
+ get hostAriaDescribedBy() {
2185
+ return this.ariaDescribedBy;
2153
2186
  }
2154
- // Cache implemementation ---
2155
- getFromCache(query) {
2156
- if (this.lastQueriesWithResults.has(query)) {
2157
- return this.lastQueriesWithResults.get(query);
2187
+ backdropClick(event) {
2188
+ const btn = event.target;
2189
+ if (this.backdrop === true && this._elRef.nativeElement === btn) {
2190
+ this.dismiss(ModalDismissReasons.BackdropClick);
2158
2191
  }
2159
- return undefined;
2160
2192
  }
2161
- addToCache(query, data) {
2162
- if (this.lastQueriesWithResults.keys.length >= this.cacheSize) {
2163
- const deletedQuery = this.lastQueriesLru[0];
2164
- this.revomeFromCache(deletedQuery);
2193
+ escKey(event) {
2194
+ if (this.keyboard && !event.defaultPrevented) {
2195
+ this.dismiss(ModalDismissReasons.Esc);
2165
2196
  }
2166
- this.lastQueriesWithResults.set(query, data);
2167
- this.lastQueriesLru.push(query);
2168
- return data;
2169
2197
  }
2170
- revomeFromCache(query) {
2171
- this.lastQueriesWithResults.delete(query);
2172
- const index = this.lastQueriesLru.findIndex((it) => it === query);
2173
- this.lastQueriesLru.splice(index, 1);
2198
+ dismiss(reason) {
2199
+ this.dismissEvent.emit(reason);
2174
2200
  }
2175
- getLatestQuery() {
2176
- return this.lastQueriesLru.length
2177
- ? this.lastQueriesLru[this.lastQueriesLru.length - 1]
2178
- : null;
2201
+ ngOnInit() {
2202
+ this._elWithFocus = this._document.activeElement;
2179
2203
  }
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;
2204
+ ngAfterViewInit() {
2205
+ if (!this._elRef.nativeElement.contains(document.activeElement)) {
2206
+ const firstFocusable = getFocusableBoundaryElements(this._elRef.nativeElement)[0];
2207
+ const elementToFocus = firstFocusable || this._elRef.nativeElement;
2208
+ elementToFocus.focus();
2202
2209
  }
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);
2210
+ }
2211
+ ngOnDestroy() {
2212
+ const body = this._document.body;
2213
+ const elWithFocus = this._elWithFocus;
2214
+ let elementToFocus;
2215
+ if (elWithFocus && elWithFocus[FOCUS] && body.contains(elWithFocus)) {
2216
+ elementToFocus = elWithFocus;
2213
2217
  }
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
- }));
2218
+ else {
2219
+ elementToFocus = body;
2222
2220
  }
2223
- return of(true);
2221
+ elementToFocus.focus();
2222
+ this._elWithFocus = null;
2224
2223
  }
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' });
2224
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxModalWindowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2225
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: LuxModalWindowComponent, isStandalone: true, selector: "lux-modal-window", inputs: { ariaDescribedBy: "ariaDescribedBy", ariaLabelledBy: "ariaLabelledBy", backdrop: "backdrop", keyboard: "keyboard", windowClass: "windowClass" }, outputs: { dismissEvent: "dismissEvent" }, host: { listeners: { "click": "backdropClick($event)", "keyup.esc": "escKey($event)" }, properties: { "class": "this.class", "attr.role": "this.role", "tabindex": "this.tabindex", "attr.aria-modal": "this.ariamodal", "attr.aria-labelledby": "this.hostAriaLabelledBy", "attr.aria-describedby": "this.hostAriaDescribedBy" } }, ngImport: i0, template: `
2226
+ <div class="modal-dialog" role="document">
2227
+ <div class="modal-content"><ng-content></ng-content></div>
2228
+ </div>
2229
+ `, isInline: true });
2227
2230
  }
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
- };
2231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxModalWindowComponent, decorators: [{
2232
+ type: Component,
2233
+ args: [{
2234
+ selector: 'lux-modal-window',
2235
+ imports: [],
2236
+ template: `
2237
+ <div class="modal-dialog" role="document">
2238
+ <div class="modal-content"><ng-content></ng-content></div>
2239
+ </div>
2240
+ `
2241
+ }]
2242
+ }], propDecorators: { ariaDescribedBy: [{
2243
+ type: Input
2244
+ }], ariaLabelledBy: [{
2245
+ type: Input
2246
+ }], backdrop: [{
2247
+ type: Input
2248
+ }], keyboard: [{
2249
+ type: Input
2250
+ }], windowClass: [{
2251
+ type: Input
2252
+ }], dismissEvent: [{
2253
+ type: Output
2254
+ }], class: [{
2255
+ type: HostBinding,
2256
+ args: ['class']
2257
+ }], role: [{
2258
+ type: HostBinding,
2259
+ args: ['attr.role']
2260
+ }], tabindex: [{
2261
+ type: HostBinding,
2262
+ args: ['tabindex']
2263
+ }], ariamodal: [{
2264
+ type: HostBinding,
2265
+ args: ['attr.aria-modal']
2266
+ }], hostAriaLabelledBy: [{
2267
+ type: HostBinding,
2268
+ args: ['attr.aria-labelledby']
2269
+ }], hostAriaDescribedBy: [{
2270
+ type: HostBinding,
2271
+ args: ['attr.aria-describedby']
2272
+ }], backdropClick: [{
2273
+ type: HostListener,
2274
+ args: ['click', ['$event']]
2275
+ }], escKey: [{
2276
+ type: HostListener,
2277
+ args: ['keyup.esc', ['$event']]
2278
+ }] } });
2266
2279
 
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));
2280
+ class ModalStack {
2281
+ _applicationRef = inject(ApplicationRef);
2282
+ _document = inject(DOCUMENT);
2283
+ _injector = inject(Injector);
2284
+ _rendererFactory = inject(RendererFactory2);
2285
+ modalConfig = inject(LuxModalConfig);
2286
+ _activeWindowCmptHasChanged = new Subject();
2287
+ _modalRefs = [];
2288
+ _windowCmpts = [];
2289
+ _ariaHiddenValues = new Map();
2290
+ _backdropAttributes = ['backdropClass'];
2291
+ _windowAttributes = [
2292
+ 'ariaLabelledBy',
2293
+ 'backdrop',
2294
+ 'centered',
2295
+ 'keyboard',
2296
+ 'scrollable',
2297
+ 'size',
2298
+ 'windowClass'
2299
+ ];
2300
+ constructor() {
2301
+ this._activeWindowCmptHasChanged.subscribe(() => {
2302
+ if (this._windowCmpts.length) {
2303
+ const activeWindowCmpt = this._windowCmpts[this._windowCmpts.length - 1];
2304
+ focusTrap(activeWindowCmpt.location.nativeElement, this._activeWindowCmptHasChanged);
2305
+ this._revertAriaHidden();
2306
+ this._setAriaHidden(activeWindowCmpt.location.nativeElement);
2291
2307
  }
2292
- }
2293
- }
2294
- get center() {
2295
- return this._center;
2308
+ });
2296
2309
  }
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
- });
2310
+ open(moduleCFR, content, options) {
2311
+ const config = Object.assign({}, this.modalConfig, options);
2312
+ const containerEl = this._document.body;
2313
+ const renderer = this._rendererFactory.createRenderer(null, null);
2314
+ const removeBodyClass = () => {
2315
+ if (!this._modalRefs.length) {
2316
+ renderer.removeClass(this._document.body, 'modal-open');
2317
+ this._revertAriaHidden();
2312
2318
  }
2319
+ };
2320
+ const activeModal = new ActiveModal();
2321
+ const contentRef = this.getContentRef(moduleCFR, content, activeModal);
2322
+ const backdropCmptRef = config.backdrop ? this._attachBackdrop(moduleCFR, containerEl) : null;
2323
+ const windowCmptRef = this._attachWindowComponent(moduleCFR, containerEl, contentRef);
2324
+ const modalRef = new ModalRef(windowCmptRef, contentRef, backdropCmptRef);
2325
+ this._registerModalRef(modalRef);
2326
+ this._registerWindowCmpt(windowCmptRef);
2327
+ modalRef.result.then(removeBodyClass, removeBodyClass);
2328
+ activeModal.close = (result) => {
2329
+ modalRef.close(result);
2330
+ };
2331
+ activeModal.dismiss = (reason) => {
2332
+ modalRef.dismiss(reason);
2333
+ };
2334
+ this._applyWindowOptions(windowCmptRef.instance, config);
2335
+ if (this._modalRefs.length === 1) {
2336
+ renderer.addClass(this._document.body, 'modal-open');
2313
2337
  }
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
- }
2338
+ if (backdropCmptRef && backdropCmptRef.instance) {
2339
+ this._applyBackgroundOptions(backdropCmptRef.instance, config);
2340
+ backdropCmptRef.changeDetectorRef.detectChanges();
2320
2341
  }
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;
2342
+ windowCmptRef.changeDetectorRef.detectChanges();
2343
+ return modalRef;
2328
2344
  }
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);
2337
- }
2338
- }
2339
- else {
2340
- this._markerCoordinates = undefined;
2341
- if (this._map) {
2342
- this.removeMarker();
2345
+ _applyWindowOptions(windowInstance, config) {
2346
+ this._windowAttributes.forEach((optionName) => {
2347
+ if (isDefined(config[optionName])) {
2348
+ windowInstance[optionName] = config[optionName];
2343
2349
  }
2344
- }
2345
- }
2346
- get markerCoordinates() {
2347
- return this._markerCoordinates;
2348
- }
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
- ];
2359
- }
2360
- this.valueChange.emit(markerPoint);
2361
- }
2362
- get markerPoint() {
2363
- return {
2364
- type: 'Point',
2365
- coordinates: this.markerCoordinates
2366
- };
2367
- }
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
2350
  });
2384
2351
  }
2385
- ngOnInit() {
2386
- this.mapId = this.mapId ? this.mapId : 'map' + MapComponent.idCounter++;
2387
- }
2388
- ngAfterViewInit() {
2389
- this.loaded$.subscribe((loaded) => {
2390
- if (loaded) {
2391
- this.initMap();
2352
+ _applyBackgroundOptions(backgroudInstance, config) {
2353
+ this._backdropAttributes.forEach((optionName) => {
2354
+ if (isDefined(config[optionName])) {
2355
+ backgroudInstance[optionName] = config[optionName];
2392
2356
  }
2393
2357
  });
2394
2358
  }
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
- });
2359
+ _revertAriaHidden() {
2360
+ this._ariaHiddenValues.forEach((value, element) => {
2361
+ if (value) {
2362
+ element.setAttribute('aria-hidden', value);
2427
2363
  }
2428
2364
  else {
2429
- this.center = {
2430
- type: 'Point',
2431
- coordinates: [0, 0]
2432
- };
2365
+ element.removeAttribute('aria-hidden');
2433
2366
  }
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;
2367
+ });
2368
+ this._ariaHiddenValues.clear();
2369
+ }
2370
+ getContentRef(moduleCFR, content, activeModal) {
2371
+ if (content instanceof TemplateRef) {
2372
+ return this.createFromTemplateRef(content, activeModal);
2463
2373
  }
2464
2374
  }
2465
- addMarkerAtCoordinates(coordinates) {
2466
- if (coordinates && coordinates.length === 2) {
2467
- if (this._marker !== undefined) {
2468
- this.removeMarker();
2375
+ createFromTemplateRef(content, activeModal) {
2376
+ const context = {
2377
+ $implicit: activeModal,
2378
+ close(result) {
2379
+ activeModal.close(result);
2380
+ },
2381
+ dismiss(reason) {
2382
+ activeModal.dismiss(reason);
2383
+ }
2384
+ };
2385
+ const viewRef = content.createEmbeddedView(context);
2386
+ this._applicationRef.attachView(viewRef);
2387
+ return new ContentRef([viewRef.rootNodes], viewRef);
2388
+ }
2389
+ _attachBackdrop(moduleCFR, containerEl) {
2390
+ const backdropFactory = moduleCFR.resolveComponentFactory(LuxModalBackdropComponent);
2391
+ const backdropCmptRef = backdropFactory.create(this._injector);
2392
+ this._applicationRef.attachView(backdropCmptRef.hostView);
2393
+ containerEl.appendChild(backdropCmptRef.location.nativeElement);
2394
+ return backdropCmptRef;
2395
+ }
2396
+ _attachWindowComponent(moduleCFR, containerEl, contentRef) {
2397
+ const windowFactory = moduleCFR.resolveComponentFactory(LuxModalWindowComponent);
2398
+ const windowCmptRef = windowFactory.create(this._injector, contentRef.nodes);
2399
+ this._applicationRef.attachView(windowCmptRef.hostView);
2400
+ containerEl.appendChild(windowCmptRef.location.nativeElement);
2401
+ return windowCmptRef;
2402
+ }
2403
+ _registerModalRef(modalRef) {
2404
+ const unregisterModalRef = () => {
2405
+ const index = this._modalRefs.indexOf(modalRef);
2406
+ if (index > -1) {
2407
+ this._modalRefs.splice(index, 1);
2408
+ }
2409
+ };
2410
+ this._modalRefs.push(modalRef);
2411
+ modalRef.result.then(unregisterModalRef, unregisterModalRef);
2412
+ }
2413
+ _registerWindowCmpt(windowCmpt) {
2414
+ this._windowCmpts.push(windowCmpt);
2415
+ this._activeWindowCmptHasChanged.next(null);
2416
+ windowCmpt.onDestroy(() => {
2417
+ const index = this._windowCmpts.indexOf(windowCmpt);
2418
+ if (index > -1) {
2419
+ this._windowCmpts.splice(index, 1);
2420
+ this._activeWindowCmptHasChanged.next(null);
2469
2421
  }
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'))
2422
+ });
2423
+ }
2424
+ _setAriaHidden(element) {
2425
+ const parent = element.parentElement;
2426
+ if (parent && element !== this._document.body) {
2427
+ Array.from(parent.children).forEach((sibling) => {
2428
+ if (sibling !== element && sibling.nodeName !== 'SCRIPT') {
2429
+ this._ariaHiddenValues.set(sibling, sibling.getAttribute('aria-hidden'));
2430
+ sibling.setAttribute('aria-hidden', 'true');
2431
+ }
2474
2432
  });
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);
2433
+ this._setAriaHidden(parent);
2490
2434
  }
2491
2435
  }
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
- }
2436
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ModalStack, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2437
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ModalStack, providedIn: 'root' });
2438
+ }
2439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ModalStack, decorators: [{
2440
+ type: Injectable,
2441
+ args: [{ providedIn: 'root' }]
2442
+ }], ctorParameters: () => [] });
2443
+
2444
+ /**
2445
+ * A service that it allow open an close modal components
2446
+ */
2447
+ class ModalService {
2448
+ modalStack = inject(ModalStack);
2449
+ moduleCFR = inject(ComponentFactoryResolver);
2450
+ /**Open a modal component
2451
+ * @param content TemplateRef
2452
+ */
2453
+ open(content, options = {}) {
2454
+ return this.modalStack.open(this.moduleCFR, content, options);
2501
2455
  }
2502
- getMarkerCoordinates() {
2503
- if (this._marker === undefined || this._marker == null) {
2504
- return this._marker;
2456
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2457
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ModalService, providedIn: 'root' });
2458
+ }
2459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ModalService, decorators: [{
2460
+ type: Injectable,
2461
+ args: [{ providedIn: 'root' }]
2462
+ }] });
2463
+
2464
+ class GeolocationService {
2465
+ http = inject(HttpClient);
2466
+ debouncePeriodMs = 300; // ms
2467
+ cacheSize = 20;
2468
+ lastQueriesWithResults = new Map();
2469
+ lastQueriesLru = [];
2470
+ currentSearch$;
2471
+ currentQuery$;
2472
+ constructor() {
2473
+ this.currentSearch$ = new Subject();
2474
+ const typed$ = this.currentSearch$
2475
+ .asObservable()
2476
+ .pipe(distinctUntilChanged());
2477
+ this.currentQuery$ = typed$.pipe(debounceTime(this.debouncePeriodMs), switchMap((currentQuery) => {
2478
+ const data = this.getFromCache(currentQuery);
2479
+ if (data !== undefined) {
2480
+ return of(data);
2481
+ }
2482
+ // Nominatim search documentation:
2483
+ // https://nominatim.org/release-docs/develop/api/Search/
2484
+ const url = 'https://nominatim.openstreetmap.org/search?format=json&limit=20&q=' +
2485
+ encodeURIComponent(currentQuery);
2486
+ const headers = {
2487
+ 'Content-Type': 'application/json'
2488
+ };
2489
+ this.addToCache(currentQuery, []);
2490
+ return this.http.get(url, { headers }).pipe(map((response) => {
2491
+ const searchResults = response;
2492
+ const uniqueResults = distinct(searchResults);
2493
+ return this.addToCache(currentQuery, uniqueResults);
2494
+ }));
2495
+ }));
2496
+ }
2497
+ searchGeolocation(query) {
2498
+ this.currentSearch$.next(query);
2499
+ return this.currentQuery$;
2500
+ }
2501
+ getLabels(instance, keys) {
2502
+ const searchResults = instance.lastQueriesWithResults
2503
+ .get(instance.getLatestQuery())
2504
+ .filter((searchResult) => samePosition(searchResult, keys));
2505
+ return of(searchResults.map((searchResult) => {
2506
+ const key = {
2507
+ type: 'Point',
2508
+ coordinates: [searchResult.lon, searchResult.lat]
2509
+ };
2510
+ return {
2511
+ key,
2512
+ label: searchResult.display_name
2513
+ };
2514
+ }));
2515
+ }
2516
+ getData(instance, search) {
2517
+ return instance.searchGeolocation(search).pipe(map((searchResults) => searchResults.map((searchResult) => {
2518
+ const key = {
2519
+ type: 'Point',
2520
+ coordinates: [searchResult.lon, searchResult.lat]
2521
+ };
2522
+ const label = searchResult.display_name;
2523
+ return { key, label };
2524
+ })));
2525
+ }
2526
+ // Cache implemementation ---
2527
+ getFromCache(query) {
2528
+ if (this.lastQueriesWithResults.has(query)) {
2529
+ return this.lastQueriesWithResults.get(query);
2505
2530
  }
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');
2531
+ return undefined;
2509
2532
  }
2510
- onResize() {
2511
- if (this._map) {
2512
- this._map.updateSize();
2533
+ addToCache(query, data) {
2534
+ if (this.lastQueriesWithResults.keys.length >= this.cacheSize) {
2535
+ const deletedQuery = this.lastQueriesLru[0];
2536
+ this.revomeFromCache(deletedQuery);
2513
2537
  }
2538
+ this.lastQueriesWithResults.set(query, data);
2539
+ this.lastQueriesLru.push(query);
2540
+ return data;
2541
+ }
2542
+ revomeFromCache(query) {
2543
+ this.lastQueriesWithResults.delete(query);
2544
+ const index = this.lastQueriesLru.findIndex((it) => it === query);
2545
+ this.lastQueriesLru.splice(index, 1);
2546
+ }
2547
+ getLatestQuery() {
2548
+ return this.lastQueriesLru.length
2549
+ ? this.lastQueriesLru[this.lastQueriesLru.length - 1]
2550
+ : null;
2514
2551
  }
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"] });
2552
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: GeolocationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2553
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: GeolocationService, providedIn: 'root' });
2517
2554
  }
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
- }] } });
2555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: GeolocationService, decorators: [{
2556
+ type: Injectable,
2557
+ args: [{ providedIn: 'root' }]
2558
+ }], ctorParameters: () => [] });
2559
+ const samePosition = (searchResult, keys) => {
2560
+ let found = false;
2561
+ keys.forEach((item) => {
2562
+ if (searchResult.lon === item.coordinates[0] &&
2563
+ searchResult.lat === item.coordinates[1]) {
2564
+ found = true;
2565
+ }
2566
+ });
2567
+ return found;
2568
+ };
2569
+ const distinct = (data) => {
2570
+ const unique = {};
2571
+ return data.filter((r) => {
2572
+ if (unique[r.display_name]) {
2573
+ return false;
2574
+ }
2575
+ unique[r.display_name] = 1;
2576
+ return true;
2577
+ });
2578
+ };
2536
2579
 
2537
2580
  class GeolocationComponent {
2538
- modalService;
2539
- locationService;
2581
+ modalService = inject(ModalService);
2582
+ locationService = inject(GeolocationService);
2540
2583
  static idCounter = 0;
2541
2584
  latitude;
2542
2585
  longitude;
@@ -2660,10 +2703,6 @@ class GeolocationComponent {
2660
2703
  keyPress = new EventEmitter();
2661
2704
  onChange = (value) => { };
2662
2705
  onTouched = () => { };
2663
- constructor(modalService, locationService) {
2664
- this.modalService = modalService;
2665
- this.locationService = locationService;
2666
- }
2667
2706
  // ControlValueAccessor Interface implementation
2668
2707
  writeValue(value) {
2669
2708
  this.value = value;
@@ -2872,8 +2911,8 @@ class GeolocationComponent {
2872
2911
  this.minLongitude = this.minLongitude || -180;
2873
2912
  this.maxLongitude = this.maxLongitude || +180;
2874
2913
  }
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: [
2914
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: GeolocationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2915
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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
2916
  {
2878
2917
  provide: NG_VALUE_ACCESSOR,
2879
2918
  multi: true,
@@ -2884,11 +2923,17 @@ class GeolocationComponent {
2884
2923
  multi: true,
2885
2924
  useExisting: forwardRef(() => GeolocationComponent)
2886
2925
  }
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"] }] });
2926
+ ], 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
2927
  }
2889
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: GeolocationComponent, decorators: [{
2928
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: GeolocationComponent, decorators: [{
2890
2929
  type: Component,
2891
- args: [{ standalone: false, selector: 'lux-geolocation', providers: [
2930
+ args: [{ selector: 'lux-geolocation', imports: [
2931
+ CommonModule,
2932
+ FormsModule,
2933
+ ReactiveFormsModule,
2934
+ AutocompleteComponent,
2935
+ MapComponent
2936
+ ], providers: [
2892
2937
  {
2893
2938
  provide: NG_VALUE_ACCESSOR,
2894
2939
  multi: true,
@@ -2899,8 +2944,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
2899
2944
  multi: true,
2900
2945
  useExisting: forwardRef(() => GeolocationComponent)
2901
2946
  }
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: [{
2947
+ ], 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"] }]
2948
+ }], propDecorators: { latitude: [{
2904
2949
  type: ViewChild,
2905
2950
  args: ['latitude', { static: true }]
2906
2951
  }], longitude: [{
@@ -3129,16 +3174,17 @@ class RegexpService {
3129
3174
  // TODO: RETURN AN EMPTY STRING
3130
3175
  return 'NO DEBERÍA SER POSIBLE';
3131
3176
  }
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' });
3177
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RegexpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3178
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RegexpService, providedIn: 'root' });
3134
3179
  }
3135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RegexpService, decorators: [{
3180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RegexpService, decorators: [{
3136
3181
  type: Injectable,
3137
3182
  args: [{ providedIn: 'root' }]
3138
3183
  }], ctorParameters: () => [] });
3139
3184
 
3140
3185
  class InputComponent {
3141
- regexpService;
3186
+ regexpService = inject(RegexpService);
3187
+ cdr = inject(ChangeDetectorRef);
3142
3188
  static idCounter = 0;
3143
3189
  input;
3144
3190
  textarea;
@@ -3146,7 +3192,7 @@ class InputComponent {
3146
3192
  touched = false;
3147
3193
  dirty = false;
3148
3194
  lastErrors = null;
3149
- _disabled;
3195
+ _disabled = false;
3150
3196
  _value = '';
3151
3197
  _type;
3152
3198
  _placeholder;
@@ -3192,6 +3238,7 @@ class InputComponent {
3192
3238
  set disabled(v) {
3193
3239
  v = typeof v === 'string' ? true : v;
3194
3240
  this._disabled = v;
3241
+ this.cdr.markForCheck();
3195
3242
  }
3196
3243
  get disabled() {
3197
3244
  return this._disabled;
@@ -3268,9 +3315,6 @@ class InputComponent {
3268
3315
  keyPress = new EventEmitter();
3269
3316
  onChange = (value) => { };
3270
3317
  onTouched = () => { };
3271
- constructor(regexpService) {
3272
- this.regexpService = regexpService;
3273
- }
3274
3318
  // ControlValueAccessor Interface implementation
3275
3319
  writeValue(value) {
3276
3320
  this.value = value;
@@ -3520,8 +3564,8 @@ class InputComponent {
3520
3564
  this.max = this.max || 1000.0;
3521
3565
  this.placeholder = '0.00';
3522
3566
  }
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: [
3567
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3568
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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
3569
  {
3526
3570
  provide: NG_VALUE_ACCESSOR,
3527
3571
  multi: true,
@@ -3532,11 +3576,11 @@ class InputComponent {
3532
3576
  multi: true,
3533
3577
  useExisting: forwardRef(() => InputComponent)
3534
3578
  }
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"] }] });
3579
+ ], 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 [disabled]=\"disabled === true\"\r\n [readonly]=\"readonly === true\"\r\n [attr.min]=\"min?.toString() || undefined\"\r\n [attr.max]=\"max?.toString() || undefined\"\r\n [attr.step]=\"step?.toString() || undefined\"\r\n [attr.pattern]=\"pattern || undefined\"\r\n [placeholder]=\"placeholder\"\r\n (keyup)=\"onKeyUp(input.value)\"\r\n (change)=\"onChangeValue(input.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n} @if (type === 'textarea') {\r\n<textarea\r\n #textarea\r\n class=\"rounded\"\r\n [ngClass]=\"className\"\r\n placement=\"top\"\r\n [id]=\"inputId\"\r\n [attr.value]=\"value\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [disabled]=\"disabled === true\"\r\n [readonly]=\"readonly === true\"\r\n [attr.cols]=\"cols?.toString() || undefined\"\r\n [attr.rows]=\"rows?.toString() || undefined\"\r\n [placeholder]=\"placeholder\"\r\n (keyup)=\"onKeyUp(textarea.value)\"\r\n (change)=\"onChangeValue(textarea.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n></textarea>\r\n} @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
3580
  }
3537
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: InputComponent, decorators: [{
3581
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: InputComponent, decorators: [{
3538
3582
  type: Component,
3539
- args: [{ standalone: false, selector: 'lux-input', providers: [
3583
+ args: [{ selector: 'lux-input', imports: [CommonModule, FormsModule], providers: [
3540
3584
  {
3541
3585
  provide: NG_VALUE_ACCESSOR,
3542
3586
  multi: true,
@@ -3547,8 +3591,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
3547
3591
  multi: true,
3548
3592
  useExisting: forwardRef(() => InputComponent)
3549
3593
  }
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: [{
3594
+ ], 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 [disabled]=\"disabled === true\"\r\n [readonly]=\"readonly === true\"\r\n [attr.min]=\"min?.toString() || undefined\"\r\n [attr.max]=\"max?.toString() || undefined\"\r\n [attr.step]=\"step?.toString() || undefined\"\r\n [attr.pattern]=\"pattern || undefined\"\r\n [placeholder]=\"placeholder\"\r\n (keyup)=\"onKeyUp(input.value)\"\r\n (change)=\"onChangeValue(input.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n/>\r\n} @if (type === 'textarea') {\r\n<textarea\r\n #textarea\r\n class=\"rounded\"\r\n [ngClass]=\"className\"\r\n placement=\"top\"\r\n [id]=\"inputId\"\r\n [attr.value]=\"value\"\r\n [attr.aria-label]=\"ariaLabel\"\r\n [disabled]=\"disabled === true\"\r\n [readonly]=\"readonly === true\"\r\n [attr.cols]=\"cols?.toString() || undefined\"\r\n [attr.rows]=\"rows?.toString() || undefined\"\r\n [placeholder]=\"placeholder\"\r\n (keyup)=\"onKeyUp(textarea.value)\"\r\n (change)=\"onChangeValue(textarea.value)\"\r\n (keypress)=\"onKeyPress($event)\"\r\n (blur)=\"onLostFocus()\"\r\n></textarea>\r\n} @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"] }]
3595
+ }], propDecorators: { input: [{
3552
3596
  type: ViewChild,
3553
3597
  args: ['input', { static: false }]
3554
3598
  }], textarea: [{
@@ -3612,17 +3656,18 @@ var Placement;
3612
3656
  class TooltipComponent {
3613
3657
  context;
3614
3658
  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: `
3659
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3660
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.0", type: TooltipComponent, isStandalone: true, selector: "lux-tooltip", inputs: { context: "context" }, ngImport: i0, template: `
3617
3661
  <span class="lux-tooltip" style="transition: opacity 200ms">{{
3618
3662
  context.message
3619
3663
  }}</span>
3620
3664
  `, isInline: true });
3621
3665
  }
3622
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TooltipComponent, decorators: [{
3666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TooltipComponent, decorators: [{
3623
3667
  type: Component,
3624
3668
  args: [{
3625
- standalone: false,
3669
+ selector: 'lux-tooltip',
3670
+ imports: [],
3626
3671
  template: `
3627
3672
  <span class="lux-tooltip" style="transition: opacity 200ms">{{
3628
3673
  context.message
@@ -3643,14 +3688,9 @@ class TooltipContentRef {
3643
3688
  }
3644
3689
 
3645
3690
  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
- }
3691
+ _injector = inject(Injector);
3692
+ _crf = inject(ComponentFactoryResolver);
3693
+ _applicationRef = inject(ApplicationRef);
3654
3694
  appendComponentToBody(content, elHost, placement) {
3655
3695
  const tooltipContentRef = this.getTooltipContentRef(content);
3656
3696
  if (tooltipContentRef) {
@@ -3767,19 +3807,19 @@ class TooltipService {
3767
3807
  domElem.style.left = `${left}px`;
3768
3808
  return domElem;
3769
3809
  }
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 });
3810
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TooltipService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3811
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TooltipService });
3772
3812
  }
3773
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TooltipService, decorators: [{
3813
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: TooltipService, decorators: [{
3774
3814
  type: Injectable
3775
- }], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ComponentFactoryResolver }, { type: i0.ApplicationRef }] });
3815
+ }] });
3776
3816
 
3777
3817
  /**
3778
3818
  * Tooltip directive
3779
3819
  */
3780
3820
  class LuxTooltipDirective {
3781
- elHost;
3782
- tooltipService;
3821
+ elHost = inject(ElementRef);
3822
+ tooltipService = inject(TooltipService);
3783
3823
  /** Tooltip title */
3784
3824
  luxTooltip;
3785
3825
  /** Component, TemplateRef or String */
@@ -3787,13 +3827,13 @@ class LuxTooltipDirective {
3787
3827
  /** Placement */
3788
3828
  placement;
3789
3829
  tooltipRef;
3790
- constructor(elHost, tooltipService) {
3791
- this.elHost = elHost;
3792
- this.tooltipService = tooltipService;
3793
- }
3794
3830
  onMouseEnter() {
3795
3831
  if (!this.tooltipRef) {
3796
- this.tooltipRef = this.show(this.content, this.elHost, this.placement);
3832
+ // Use luxTooltip if provided, otherwise use content
3833
+ const tooltipContent = this.luxTooltip || this.content;
3834
+ if (tooltipContent) {
3835
+ this.tooltipRef = this.show(tooltipContent, this.elHost, this.placement);
3836
+ }
3797
3837
  }
3798
3838
  }
3799
3839
  onMouseLeave() {
@@ -3814,16 +3854,17 @@ class LuxTooltipDirective {
3814
3854
  remove(tooltipRef) {
3815
3855
  this.tooltipService.removeComponentFromBody(tooltipRef);
3816
3856
  }
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 });
3857
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxTooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3858
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", 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
3859
  }
3820
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxTooltipDirective, decorators: [{
3860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxTooltipDirective, decorators: [{
3821
3861
  type: Directive,
3822
3862
  args: [{
3823
- standalone: false,
3824
- selector: '[luxTooltip]'
3863
+ selector: '[luxTooltip]',
3864
+ standalone: true,
3865
+ providers: [TooltipService]
3825
3866
  }]
3826
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: TooltipService }], propDecorators: { luxTooltip: [{
3867
+ }], propDecorators: { luxTooltip: [{
3827
3868
  type: Input
3828
3869
  }], content: [{
3829
3870
  type: Input
@@ -3963,12 +4004,12 @@ class PaginationComponent {
3963
4004
  this.next = l.next;
3964
4005
  this.last = l.last;
3965
4006
  }
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"] }] });
4007
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4008
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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
4009
  }
3969
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PaginationComponent, decorators: [{
4010
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PaginationComponent, decorators: [{
3970
4011
  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"] }]
4012
+ 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
4013
  }], ctorParameters: () => [], propDecorators: { goToPage: [{
3973
4014
  type: Output
3974
4015
  }], pageSizeChange: [{
@@ -4057,8 +4098,8 @@ class RadiogroupComponent {
4057
4098
  }
4058
4099
  return item;
4059
4100
  }
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: [
4101
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RadiogroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4102
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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
4103
  {
4063
4104
  provide: NG_VALUE_ACCESSOR,
4064
4105
  multi: true,
@@ -4069,11 +4110,11 @@ class RadiogroupComponent {
4069
4110
  multi: true,
4070
4111
  useExisting: forwardRef(() => RadiogroupComponent)
4071
4112
  }
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"] }] });
4113
+ ], 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"] });
4073
4114
  }
4074
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: RadiogroupComponent, decorators: [{
4115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RadiogroupComponent, decorators: [{
4075
4116
  type: Component,
4076
- args: [{ standalone: false, selector: 'lux-radiogroup', providers: [
4117
+ args: [{ selector: 'lux-radiogroup', imports: [], providers: [
4077
4118
  {
4078
4119
  provide: NG_VALUE_ACCESSOR,
4079
4120
  multi: true,
@@ -4084,7 +4125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
4084
4125
  multi: true,
4085
4126
  useExisting: forwardRef(() => RadiogroupComponent)
4086
4127
  }
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"] }]
4128
+ ], 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
4129
  }], ctorParameters: () => [], propDecorators: { name: [{
4089
4130
  type: Input
4090
4131
  }], disabled: [{
@@ -4198,8 +4239,8 @@ class SelectComponent {
4198
4239
  this.error = this.validateItem(newValue);
4199
4240
  this.isValidNewEntry = !this.error;
4200
4241
  }
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: [
4242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4243
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", 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
4244
  {
4204
4245
  provide: NG_VALUE_ACCESSOR,
4205
4246
  multi: true,
@@ -4210,11 +4251,11 @@ class SelectComponent {
4210
4251
  multi: true,
4211
4252
  useExisting: forwardRef(() => SelectComponent)
4212
4253
  }
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"] }] });
4254
+ ], ngImport: i0, template: "<div class=\"lux-select\">\r\n <ul class=\"list\">\r\n @for (item of value; track i; let i = $index) {\r\n <li>\r\n <span>{{ item }}</span>\r\n @if (!disabled) {\r\n <button\r\n class=\"remove\"\r\n type=\"button\"\r\n (click)=\"remove(i)\"\r\n [attr.aria-label]=\"'Remove ' + item\"\r\n >\r\n Remove\r\n </button>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n @if (!disabled) {\r\n <div class=\"add-new-item\">\r\n <lux-input\r\n id=\"{{ id + 'addNew' }}\"\r\n type=\"string\"\r\n [placeholder]=\"placeholder\"\r\n [attr.aria-label]=\"placeholder\"\r\n [disabled]=\"disabled\"\r\n [(value)]=\"newEntry\"\r\n (keyPress)=\"onKeyPress($event)\"\r\n (valueChange)=\"onChangeNewEntry($event)\"\r\n >\r\n </lux-input>\r\n @if (canAdd) {\r\n <div>\r\n @if (isValidNewEntry) {\r\n <button type=\"button\" (click)=\"add(newEntry)\">Add</button>\r\n }\r\n </div>\r\n }\r\n <div class=\"error\">\r\n {{ error }}\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".lux-select{margin-bottom:.5em}.lux-select .list{margin:1em;padding-bottom:.2em;list-style-type:square}.lux-select .list span{margin-bottom:.3em}.remove{margin-left:2em;font-size:.65em;color:#b22222;background:transparent;border:2px solid #BBB}.add-new-item{display:inline-flex;margin-left:2.2em;height:1.6em}.error{margin:.5em 0;color:#b22222}\n"], dependencies: [{ kind: "component", type: InputComponent, selector: "lux-input", inputs: ["rows", "cols", "step", "min", "max", "lang", "inlineErrors", "inputId", "aria-label", "readonly", "disabled", "pattern", "currency", "placeholder", "required", "type", "value"], outputs: ["valueChange", "keyPress"] }] });
4214
4255
  }
4215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: SelectComponent, decorators: [{
4256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: SelectComponent, decorators: [{
4216
4257
  type: Component,
4217
- args: [{ standalone: false, selector: 'lux-select', providers: [
4258
+ args: [{ selector: 'lux-select', imports: [InputComponent], providers: [
4218
4259
  {
4219
4260
  provide: NG_VALUE_ACCESSOR,
4220
4261
  multi: true,
@@ -4225,7 +4266,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
4225
4266
  multi: true,
4226
4267
  useExisting: forwardRef(() => SelectComponent)
4227
4268
  }
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"] }]
4269
+ ], 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
4270
  }], ctorParameters: () => [], propDecorators: { id: [{
4230
4271
  type: Input
4231
4272
  }], disabled: [{
@@ -4247,16 +4288,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
4247
4288
  }] } });
4248
4289
 
4249
4290
  class VoiceRecognitionDirective {
4250
- el;
4251
- renderer;
4291
+ el = inject(ElementRef);
4292
+ renderer = inject(Renderer2);
4252
4293
  language;
4253
4294
  // See API at: https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition
4254
4295
  recognition;
4255
4296
  isRecognizing = false;
4256
4297
  mic;
4257
- constructor(el, renderer) {
4258
- this.el = el;
4259
- this.renderer = renderer;
4298
+ constructor() {
4260
4299
  const speechRecognition = window.webkitSpeechRecognition;
4261
4300
  if (speechRecognition) {
4262
4301
  this.recognition = new speechRecognition();
@@ -4299,16 +4338,15 @@ class VoiceRecognitionDirective {
4299
4338
  this.el.nativeElement.value = recognizedText;
4300
4339
  this.renderer.removeClass(this.mic, 'lux-recording');
4301
4340
  }
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 });
4341
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: VoiceRecognitionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4342
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.0", type: VoiceRecognitionDirective, isStandalone: true, selector: "[luxVoiceRecognition]", inputs: { language: "language" }, ngImport: i0 });
4304
4343
  }
4305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VoiceRecognitionDirective, decorators: [{
4344
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: VoiceRecognitionDirective, decorators: [{
4306
4345
  type: Directive,
4307
4346
  args: [{
4308
- standalone: false,
4309
4347
  selector: '[luxVoiceRecognition]'
4310
4348
  }]
4311
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { language: [{
4349
+ }], ctorParameters: () => [], propDecorators: { language: [{
4312
4350
  type: Input
4313
4351
  }] } });
4314
4352
  const getRecordingMessage = (lang) => {
@@ -4363,28 +4401,29 @@ const windowProvider = {
4363
4401
  const WINDOW_PROVIDERS = [browserWindowProvider, windowProvider];
4364
4402
 
4365
4403
  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,
4404
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4405
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.0", ngImport: i0, type: LuxModule, imports: [FormsModule,
4369
4406
  FilterComponent,
4407
+ GeolocationComponent,
4408
+ InputComponent,
4409
+ AutocompleteListComponent,
4410
+ AutocompleteComponent,
4370
4411
  CheckboxComponent,
4371
4412
  DatetimeComponent,
4372
- InputComponent,
4373
- GeolocationComponent,
4413
+ LuxBreadcrumbComponent,
4374
4414
  LuxTooltipDirective,
4375
4415
  LuxModalWindowComponent,
4376
4416
  LuxModalBackdropComponent,
4377
- LuxBreadcrumbComponent,
4378
4417
  MapComponent,
4379
- SelectComponent,
4380
- TooltipComponent,
4381
4418
  PaginationComponent,
4382
4419
  RadiogroupComponent,
4383
- VoiceRecognitionDirective], imports: [FormsModule,
4384
4420
  HttpClientModule,
4385
4421
  ReactiveFormsModule,
4386
4422
  RouterModule,
4387
- CommonModule], exports: [AutocompleteComponent,
4423
+ SelectComponent,
4424
+ CommonModule,
4425
+ TooltipComponent,
4426
+ VoiceRecognitionDirective], exports: [AutocompleteComponent,
4388
4427
  AutocompleteListComponent,
4389
4428
  FilterComponent,
4390
4429
  CheckboxComponent,
@@ -4392,48 +4431,54 @@ class LuxModule {
4392
4431
  InputComponent,
4393
4432
  GeolocationComponent,
4394
4433
  LuxTooltipDirective,
4395
- LuxBreadcrumbComponent,
4396
- LuxBreadcrumbComponent,
4397
4434
  MapComponent,
4398
4435
  SelectComponent,
4399
4436
  PaginationComponent,
4400
4437
  RadiogroupComponent,
4401
4438
  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,
4439
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxModule, providers: [ModalService, TooltipService, WINDOW_PROVIDERS], imports: [FormsModule,
4440
+ FilterComponent,
4441
+ GeolocationComponent,
4442
+ InputComponent,
4443
+ AutocompleteListComponent,
4444
+ AutocompleteComponent,
4445
+ DatetimeComponent,
4446
+ LuxBreadcrumbComponent,
4447
+ PaginationComponent,
4403
4448
  HttpClientModule,
4404
4449
  ReactiveFormsModule,
4405
4450
  RouterModule,
4451
+ SelectComponent,
4406
4452
  CommonModule] });
4407
4453
  }
4408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: LuxModule, decorators: [{
4454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LuxModule, decorators: [{
4409
4455
  type: NgModule,
4410
4456
  args: [{
4411
- declarations: [
4412
- AutocompleteComponent,
4413
- AutocompleteListComponent,
4457
+ declarations: [],
4458
+ providers: [ModalService, TooltipService, WINDOW_PROVIDERS],
4459
+ imports: [
4460
+ FormsModule,
4414
4461
  FilterComponent,
4462
+ GeolocationComponent,
4463
+ InputComponent,
4464
+ AutocompleteListComponent,
4465
+ AutocompleteComponent,
4415
4466
  CheckboxComponent,
4416
4467
  DatetimeComponent,
4417
- InputComponent,
4418
- GeolocationComponent,
4468
+ LuxBreadcrumbComponent,
4419
4469
  LuxTooltipDirective,
4420
4470
  LuxModalWindowComponent,
4421
4471
  LuxModalBackdropComponent,
4422
- LuxBreadcrumbComponent,
4423
4472
  MapComponent,
4424
- SelectComponent,
4425
- TooltipComponent,
4426
4473
  PaginationComponent,
4427
4474
  RadiogroupComponent,
4428
- VoiceRecognitionDirective
4429
- ],
4430
- providers: [ModalService, TooltipService, WINDOW_PROVIDERS],
4431
- imports: [
4432
- FormsModule,
4433
4475
  HttpClientModule,
4434
4476
  ReactiveFormsModule,
4435
4477
  RouterModule,
4436
- CommonModule
4478
+ SelectComponent,
4479
+ CommonModule,
4480
+ TooltipComponent,
4481
+ VoiceRecognitionDirective
4437
4482
  ],
4438
4483
  exports: [
4439
4484
  AutocompleteComponent,
@@ -4444,8 +4489,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
4444
4489
  InputComponent,
4445
4490
  GeolocationComponent,
4446
4491
  LuxTooltipDirective,
4447
- LuxBreadcrumbComponent,
4448
- LuxBreadcrumbComponent,
4449
4492
  MapComponent,
4450
4493
  SelectComponent,
4451
4494
  PaginationComponent,