@elderbyte/ngx-starter 17.11.0-beta4 → 17.11.0-beta6

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 (32) hide show
  1. package/esm2022/lib/components/forms/search/domain/input/search-input-state.mjs +6 -6
  2. package/esm2022/lib/components/forms/search/domain/input/search-input.mjs +1 -1
  3. package/esm2022/lib/components/forms/search/elder-search-context.directive.mjs +10 -10
  4. package/esm2022/lib/components/forms/search/elder-search-input.directive.mjs +14 -29
  5. package/esm2022/lib/components/forms/search/search-box/elder-search-box.component.mjs +4 -4
  6. package/esm2022/lib/components/select/elder-select.module.mjs +15 -15
  7. package/esm2022/lib/components/select/filter/elder-chip-filter-style-resolver.mjs +19 -15
  8. package/esm2022/lib/components/select/filter/elder-chips-include-exclude.directive.mjs +144 -0
  9. package/esm2022/lib/components/select/filter/elder-filter-chip-template/elder-filter-chip-template.component.mjs +24 -31
  10. package/esm2022/lib/components/select/filter/include-exclude-model-filter-adapter.mjs +63 -0
  11. package/esm2022/lib/components/select/filter/include-exclude-selection-model.mjs +76 -20
  12. package/esm2022/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.mjs +7 -2
  13. package/esm2022/lib/components/select/multi/elder-search-include-exclude.directive.mjs +117 -43
  14. package/fesm2022/elderbyte-ngx-starter.mjs +741 -649
  15. package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
  16. package/lib/components/forms/search/domain/input/search-input-state.d.ts +3 -3
  17. package/lib/components/forms/search/domain/input/search-input.d.ts +2 -6
  18. package/lib/components/forms/search/elder-search-context.directive.d.ts +3 -3
  19. package/lib/components/forms/search/elder-search-input.directive.d.ts +7 -11
  20. package/lib/components/forms/search/search-box/elder-search-box.component.d.ts +2 -1
  21. package/lib/components/select/elder-select.module.d.ts +4 -4
  22. package/lib/components/select/filter/elder-chip-filter-style-resolver.d.ts +1 -1
  23. package/lib/components/select/filter/{elder-chips-filter.directive.d.ts → elder-chips-include-exclude.directive.d.ts} +20 -9
  24. package/lib/components/select/filter/elder-filter-chip-template/elder-filter-chip-template.component.d.ts +9 -14
  25. package/lib/components/select/filter/include-exclude-model-filter-adapter.d.ts +29 -0
  26. package/lib/components/select/filter/include-exclude-selection-model.d.ts +25 -7
  27. package/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.d.ts +2 -0
  28. package/lib/components/select/multi/elder-search-include-exclude.directive.d.ts +57 -17
  29. package/package.json +1 -1
  30. package/esm2022/lib/components/forms/search/filter/include-exclude-input-converter.mjs +0 -137
  31. package/esm2022/lib/components/select/filter/elder-chips-filter.directive.mjs +0 -93
  32. package/lib/components/forms/search/filter/include-exclude-input-converter.d.ts +0 -62
@@ -1,11 +1,11 @@
1
1
  import * as i2$1 from '@angular/common';
2
2
  import { formatDate, CommonModule, formatCurrency, getCurrencySymbol, NgIf, AsyncPipe, NgFor, NgClass, NgTemplateOutlet, NgStyle, formatNumber, DecimalPipe, DatePipe, registerLocaleData, CurrencyPipe } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Pipe, LOCALE_ID, Inject, NgModule, Optional, SkipSelf, Directive, Output, Input, forwardRef, ViewChild, HostBinding, ViewChildren, ContentChild, Injectable, Component, ChangeDetectionStrategy, Host, APP_INITIALIZER, TemplateRef, HostListener, EventEmitter, ViewEncapsulation, InjectionToken, ContentChildren, Self } from '@angular/core';
4
+ import { Pipe, LOCALE_ID, Inject, NgModule, Optional, SkipSelf, Directive, Output, Input, forwardRef, ViewChild, HostBinding, ViewChildren, ContentChild, Injectable, Component, ChangeDetectionStrategy, Host, APP_INITIALIZER, TemplateRef, HostListener, EventEmitter, ViewEncapsulation, InjectionToken, ContentChildren, Self, input } from '@angular/core';
5
5
  import * as i1 from '@angular/platform-browser';
6
6
  import { Duration, Period, TemporalQueries, LocalTime, Instant, LocalDate, nativeJs, ZoneId, DateTimeFormatter, convert, ZonedDateTime, Temporal } from '@js-joda/core';
7
7
  import { LoggerFactory } from '@elderbyte/ts-logger';
8
- import { timer, ReplaySubject, finalize, exhaustMap, concat, defer, BehaviorSubject, Subject, of, switchMap, combineLatest, EMPTY, merge, throwError, forkJoin, mergeWith, Observable, zip, mergeMap as mergeMap$1, fromEvent, combineLatestWith as combineLatestWith$1, skipUntil, NEVER } from 'rxjs';
8
+ import { timer, ReplaySubject, finalize, exhaustMap, concat, defer, BehaviorSubject, Subject, of, switchMap, combineLatest, EMPTY, merge, throwError, forkJoin, mergeWith, Observable, zip, mergeMap as mergeMap$1, fromEvent, skipUntil, combineLatestWith as combineLatestWith$1, NEVER } from 'rxjs';
9
9
  import { tap, takeUntil, takeWhile, map, filter, distinctUntilChanged, debounceTime, catchError, first, take, switchMap as switchMap$1, mergeMap, expand, reduce, startWith, skip, delay, share, combineLatestWith, skipWhile, timeout } from 'rxjs/operators';
10
10
  import * as i1$2 from '@angular/common/http';
11
11
  import { HttpParams, HttpEventType, HttpRequest, HttpClient, HttpErrorResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
@@ -22393,6 +22393,7 @@ class ElderMultiSelectChipsComponent extends ElderMultiSelectBase {
22393
22393
  this.chipTemplate$ = new BehaviorSubject(null);
22394
22394
  this.chipAvatarTemplate$ = new BehaviorSubject(null);
22395
22395
  this.customInputTemplate$ = new BehaviorSubject(null);
22396
+ this.refresh$ = new BehaviorSubject(true);
22396
22397
  this.log = LoggerFactory.getLogger(this.constructor.name);
22397
22398
  this.placeholder = '...';
22398
22399
  this.selectChips$ = combineLatest([
@@ -22401,7 +22402,8 @@ class ElderMultiSelectChipsComponent extends ElderMultiSelectBase {
22401
22402
  this.state$,
22402
22403
  this.displayPropertyResolver$,
22403
22404
  this.readonly$,
22404
- this.disabled$
22405
+ this.disabled$,
22406
+ this.refresh$
22405
22407
  ]).pipe(map(([entities, entityIds, state, dPR]) => this.buildChipModelsOrFallback(entities, entityIds, state, dPR)));
22406
22408
  this.templates$ = combineLatest([
22407
22409
  this.chipTemplate$,
@@ -22489,6 +22491,9 @@ class ElderMultiSelectChipsComponent extends ElderMultiSelectBase {
22489
22491
  // TODO this.inputControl?.blur();
22490
22492
  // this.customInputTemplate.blur()
22491
22493
  }
22494
+ refresh() {
22495
+ this.refresh$.next(true);
22496
+ }
22492
22497
  /***************************************************************************
22493
22498
  * *
22494
22499
  * Private methods *
@@ -23266,12 +23271,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
23266
23271
  type: Optional
23267
23272
  }] }, { type: i0.DestroyRef }] });
23268
23273
 
23269
- class ElderFilterChipTemplate {
23270
- /***************************************************************************
23271
- * *
23272
- * Constructor *
23273
- * *
23274
- **************************************************************************/
23274
+ class ElderFilterChipTemplateComponent {
23275
23275
  constructor() {
23276
23276
  /***************************************************************************
23277
23277
  * *
@@ -23279,8 +23279,7 @@ class ElderFilterChipTemplate {
23279
23279
  * *
23280
23280
  **************************************************************************/
23281
23281
  this._avatarRef$ = new BehaviorSubject(null);
23282
- this._bodyRef$ = new BehaviorSubject(null);
23283
- this._resolveAvatar$ = new BehaviorSubject(null);
23282
+ this.avatarResolverFn = input.required();
23284
23283
  }
23285
23284
  /***************************************************************************
23286
23285
  * *
@@ -23293,30 +23292,29 @@ class ElderFilterChipTemplate {
23293
23292
  get avatarRef$() {
23294
23293
  return this._avatarRef$.asObservable();
23295
23294
  }
23296
- set bodyRef(avatarRef) {
23297
- this._bodyRef$.next(avatarRef);
23298
- }
23299
- get bodyRef$() {
23300
- return this._bodyRef$.asObservable();
23301
- }
23302
- set resolveAvatar(fn) {
23303
- this._resolveAvatar$.next(fn);
23304
- }
23305
- get resolveAvatar$() {
23306
- return this._resolveAvatar$.asObservable();
23295
+ /***************************************************************************
23296
+ * *
23297
+ * Public API *
23298
+ * *
23299
+ **************************************************************************/
23300
+ currentIcon(id) {
23301
+ const fun = this.avatarResolverFn();
23302
+ if (id != null || id != undefined) {
23303
+ return fun ? fun(id) : 'help_outline';
23304
+ }
23305
+ else {
23306
+ return 'help_outline';
23307
+ }
23307
23308
  }
23308
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderFilterChipTemplate, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23309
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.11", type: ElderFilterChipTemplate, isStandalone: true, selector: "elder-filter-chip-template", viewQueries: [{ propertyName: "avatarRef", first: true, predicate: ["avatar"], descendants: true }, { propertyName: "bodyRef", first: true, predicate: ["body"], descendants: true }], ngImport: i0, template: "<ng-template #avatar let-chipModel>\n @if(resolveAvatar$ | async; as resolveAvatar) {\n <mat-icon class=\"material-icons-outlined\">{{resolveAvatar(chipModel?.value?.id)}}</mat-icon>\n }\n</ng-template>\n", styles: [".elder-chip-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.elder-trailing-icon{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color);opacity:.54}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
23309
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderFilterChipTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23310
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.11", type: ElderFilterChipTemplateComponent, isStandalone: true, selector: "elder-filter-chip-template", inputs: { avatarResolverFn: { classPropertyName: "avatarResolverFn", publicName: "avatarResolverFn", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "avatarRef", first: true, predicate: ElderSelectChipAvatarDirective, descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<mat-icon\n *elderSelectChipAvatar=\"let chipModel\"\n class=\"material-icons-outlined\">\n {{currentIcon(chipModel?.value?.id)}}\n</mat-icon>\n", styles: [".elder-chip-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.elder-trailing-icon{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color);opacity:.54}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: ElderSelectChipAvatarDirective, selector: "[elderSelectChipAvatar]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23310
23311
  }
23311
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderFilterChipTemplate, decorators: [{
23312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderFilterChipTemplateComponent, decorators: [{
23312
23313
  type: Component,
23313
- args: [{ selector: 'elder-filter-chip-template', standalone: true, imports: [AsyncPipe, MatIcon], template: "<ng-template #avatar let-chipModel>\n @if(resolveAvatar$ | async; as resolveAvatar) {\n <mat-icon class=\"material-icons-outlined\">{{resolveAvatar(chipModel?.value?.id)}}</mat-icon>\n }\n</ng-template>\n", styles: [".elder-chip-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.elder-trailing-icon{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color);opacity:.54}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
23314
- }], ctorParameters: () => [], propDecorators: { avatarRef: [{
23315
- type: ViewChild,
23316
- args: ['avatar']
23317
- }], bodyRef: [{
23314
+ args: [{ selector: 'elder-filter-chip-template', standalone: true, imports: [MatIcon, ElderSelectChipAvatarDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-icon\n *elderSelectChipAvatar=\"let chipModel\"\n class=\"material-icons-outlined\">\n {{currentIcon(chipModel?.value?.id)}}\n</mat-icon>\n", styles: [".elder-chip-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.elder-trailing-icon{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color);opacity:.54}.cdk-drag-preview{box-sizing:border-box;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
23315
+ }], propDecorators: { avatarRef: [{
23318
23316
  type: ViewChild,
23319
- args: ['body']
23317
+ args: [ElderSelectChipAvatarDirective, { read: TemplateRef, static: true }]
23320
23318
  }] } });
23321
23319
 
23322
23320
  class IncludeExcludeState {
@@ -23325,21 +23323,30 @@ class IncludeExcludeState {
23325
23323
  this.mode = mode;
23326
23324
  }
23327
23325
  }
23328
- var IncludeExcludeMode;
23329
- (function (IncludeExcludeMode) {
23330
- IncludeExcludeMode["NEUTRAL"] = "NEUTRAL";
23331
- IncludeExcludeMode["INCLUDE"] = "INCLUDE";
23332
- IncludeExcludeMode["EXCLUDE"] = "EXCLUDE";
23333
- })(IncludeExcludeMode || (IncludeExcludeMode = {}));
23326
+ var IncludeExcludeValue;
23327
+ (function (IncludeExcludeValue) {
23328
+ IncludeExcludeValue["NEUTRAL"] = "NEUTRAL";
23329
+ IncludeExcludeValue["INCLUDE"] = "INCLUDE";
23330
+ IncludeExcludeValue["EXCLUDE"] = "EXCLUDE";
23331
+ })(IncludeExcludeValue || (IncludeExcludeValue = {}));
23334
23332
  class IncludeExcludeSelectionModel {
23335
- constructor() {
23333
+ /***************************************************************************
23334
+ * *
23335
+ * Constructor *
23336
+ * *
23337
+ **************************************************************************/
23338
+ constructor(strategy) {
23336
23339
  /***************************************************************************
23337
23340
  * *
23338
23341
  * Fields *
23339
23342
  * *
23340
23343
  **************************************************************************/
23341
23344
  this.log = LoggerFactory.getLogger(this.constructor.name);
23345
+ this._defaultInitialValue = IncludeExcludeValue.INCLUDE;
23342
23346
  this.stateById$ = new BehaviorSubject(new Map());
23347
+ if (!strategy)
23348
+ throw new Error('strategy is required!');
23349
+ this._strategy = strategy;
23343
23350
  }
23344
23351
  /***************************************************************************
23345
23352
  * *
@@ -23352,21 +23359,43 @@ class IncludeExcludeSelectionModel {
23352
23359
  get selection$() {
23353
23360
  return this.stateById$.pipe(map(stateMap => Array.from(stateMap.values())));
23354
23361
  }
23362
+ get strategy() {
23363
+ return this._strategy;
23364
+ }
23365
+ set strategy(strategy) {
23366
+ this._strategy = strategy;
23367
+ }
23368
+ get defaultInitialValue() {
23369
+ return this._defaultInitialValue;
23370
+ }
23371
+ set defaultInitialValue(strategy) {
23372
+ this._defaultInitialValue = strategy;
23373
+ }
23355
23374
  /***************************************************************************
23356
23375
  * *
23357
23376
  * Public API *
23358
23377
  * *
23359
23378
  **************************************************************************/
23379
+ findIncluded() {
23380
+ return this.selection
23381
+ .filter(s => s.mode === IncludeExcludeValue.INCLUDE)
23382
+ .map(s => s.id);
23383
+ }
23384
+ findExcluded() {
23385
+ return this.selection
23386
+ .filter(s => s.mode === IncludeExcludeValue.EXCLUDE)
23387
+ .map(s => s.id);
23388
+ }
23360
23389
  cycleExisting(id) {
23361
23390
  const existingState = this.findStateById(id);
23362
23391
  if (existingState) {
23363
- return this.updateState(id, this.cycleFilterEntitySelection(existingState.mode));
23392
+ return this.updateState(id, this.nextValueByStrategy(existingState.mode));
23364
23393
  }
23365
23394
  else {
23366
23395
  return null;
23367
23396
  }
23368
23397
  }
23369
- initTo(ids, initialMode = IncludeExcludeMode.NEUTRAL) {
23398
+ initTo(ids, initialValueOverride) {
23370
23399
  const current = this.stateById$.getValue();
23371
23400
  const newStates = new Map();
23372
23401
  ids.forEach(id => {
@@ -23374,11 +23403,14 @@ class IncludeExcludeSelectionModel {
23374
23403
  newStates.set(id, current.get(id));
23375
23404
  }
23376
23405
  else {
23377
- newStates.set(id, new IncludeExcludeState(id, initialMode));
23406
+ newStates.set(id, new IncludeExcludeState(id, initialValueOverride ?? this.defaultInitialValue));
23378
23407
  }
23379
23408
  });
23380
23409
  this.stateById$.next(newStates);
23381
23410
  }
23411
+ clear() {
23412
+ this.replaceSelection([]);
23413
+ }
23382
23414
  replaceSelection(newStates) {
23383
23415
  this.stateById$.next(this.toStateMap(newStates));
23384
23416
  }
@@ -23407,16 +23439,38 @@ class IncludeExcludeSelectionModel {
23407
23439
  * Private methods *
23408
23440
  * *
23409
23441
  **************************************************************************/
23410
- cycleFilterEntitySelection(selection) {
23411
- switch (selection) {
23412
- case IncludeExcludeMode.NEUTRAL:
23413
- return IncludeExcludeMode.INCLUDE;
23414
- case IncludeExcludeMode.INCLUDE:
23415
- return IncludeExcludeMode.EXCLUDE;
23416
- case IncludeExcludeMode.EXCLUDE:
23417
- return IncludeExcludeMode.NEUTRAL;
23442
+ nextValueByStrategy(current) {
23443
+ switch (this._strategy) {
23444
+ case 'FULL_CYCLE':
23445
+ return this.nextValueFullCycle(current);
23446
+ case 'TOGGLE':
23447
+ return this.nextValueToggle(current);
23448
+ default:
23449
+ throw new Error('Unsupported cycle strategy: ' + this._strategy);
23450
+ }
23451
+ }
23452
+ nextValueToggle(current) {
23453
+ switch (current) {
23454
+ case IncludeExcludeValue.NEUTRAL:
23455
+ return IncludeExcludeValue.INCLUDE;
23456
+ case IncludeExcludeValue.INCLUDE:
23457
+ return IncludeExcludeValue.EXCLUDE;
23458
+ case IncludeExcludeValue.EXCLUDE:
23459
+ return IncludeExcludeValue.INCLUDE;
23460
+ default:
23461
+ return IncludeExcludeValue.INCLUDE;
23462
+ }
23463
+ }
23464
+ nextValueFullCycle(current) {
23465
+ switch (current) {
23466
+ case IncludeExcludeValue.NEUTRAL:
23467
+ return IncludeExcludeValue.INCLUDE;
23468
+ case IncludeExcludeValue.INCLUDE:
23469
+ return IncludeExcludeValue.EXCLUDE;
23470
+ case IncludeExcludeValue.EXCLUDE:
23471
+ return IncludeExcludeValue.NEUTRAL;
23418
23472
  default:
23419
- return IncludeExcludeMode.NEUTRAL;
23473
+ return IncludeExcludeValue.NEUTRAL;
23420
23474
  }
23421
23475
  }
23422
23476
  toStateMap(list) {
@@ -23468,37 +23522,175 @@ class ElderChipFilterStyleResolver {
23468
23522
  resolveChipSpec(filterEntity) {
23469
23523
  if (filterEntity) {
23470
23524
  switch (filterEntity.mode) {
23471
- case IncludeExcludeMode.NEUTRAL:
23525
+ case IncludeExcludeValue.NEUTRAL:
23472
23526
  return this.neutralChipSpec;
23473
- case IncludeExcludeMode.INCLUDE:
23527
+ case IncludeExcludeValue.INCLUDE:
23474
23528
  return this.includedChipSpec;
23475
- case IncludeExcludeMode.EXCLUDE:
23529
+ case IncludeExcludeValue.EXCLUDE:
23476
23530
  return this.excludedChipSpec;
23477
23531
  default:
23478
23532
  return this.neutralChipSpec;
23479
23533
  }
23480
23534
  }
23535
+ return this.neutralChipSpec;
23481
23536
  }
23482
- resolveAvatar(filterEntity) {
23483
- switch (filterEntity.mode) {
23484
- case IncludeExcludeMode.NEUTRAL:
23485
- return 'radio_button_unchecked';
23486
- case IncludeExcludeMode.INCLUDE:
23487
- return 'task_alt';
23488
- case IncludeExcludeMode.EXCLUDE:
23489
- return 'block';
23490
- default:
23491
- return 'circle';
23537
+ resolveAvatarIcon(filterEntity) {
23538
+ if (filterEntity) {
23539
+ switch (filterEntity.mode) {
23540
+ case IncludeExcludeValue.NEUTRAL:
23541
+ return 'radio_button_unchecked';
23542
+ case IncludeExcludeValue.INCLUDE:
23543
+ return 'task_alt';
23544
+ case IncludeExcludeValue.EXCLUDE:
23545
+ return 'block';
23546
+ default:
23547
+ return 'circle';
23548
+ }
23492
23549
  }
23550
+ return 'help_outline';
23493
23551
  }
23494
23552
  }
23495
23553
 
23554
+ /**
23555
+ * Adds the ability to toggle select chips of a ElderMultiSelectChipsComponent by
23556
+ * binding it to a IncludeExcludeSelectionModel.
23557
+ */
23558
+ class ElderChipsIncludeExcludeDirective {
23559
+ /***************************************************************************
23560
+ * *
23561
+ * Constructor *
23562
+ * *
23563
+ **************************************************************************/
23564
+ constructor(elderMultiSelectChips, selectionModel, vcr, destroyRef) {
23565
+ this.elderMultiSelectChips = elderMultiSelectChips;
23566
+ this.selectionModel = selectionModel;
23567
+ this.vcr = vcr;
23568
+ this.destroyRef = destroyRef;
23569
+ /***************************************************************************
23570
+ * *
23571
+ * Fields *
23572
+ * *
23573
+ **************************************************************************/
23574
+ this.log = LoggerFactory.getLogger(this.constructor.name);
23575
+ this.chipStyleResolver = new ElderChipFilterStyleResolver();
23576
+ this.setupFilterChips();
23577
+ this.setupElderMultiSelectChipsListeners();
23578
+ selectionModel.selection$.pipe(takeUntilDestroyed(), debounceTime(10)).subscribe({
23579
+ next: states => this.refreshChips(states)
23580
+ });
23581
+ }
23582
+ /***************************************************************************
23583
+ * *
23584
+ * Properties *
23585
+ * *
23586
+ **************************************************************************/
23587
+ set cycleStrategy(strategy) {
23588
+ this.selectionModel.strategy = strategy;
23589
+ }
23590
+ /***************************************************************************
23591
+ * *
23592
+ * Private methods *
23593
+ * *
23594
+ **************************************************************************/
23595
+ setupFilterChips() {
23596
+ const chipTemplate = this.createFilterChipTemplate();
23597
+ this.elderMultiSelectChips.chipSpecFn = (entity) => this.resolveChipSpec(entity);
23598
+ chipTemplate.avatarRef$.pipe(takeUntilDestroyed(this.destroyRef), filter((avatarRef) => !!avatarRef), first()).subscribe((avatarRef) => {
23599
+ this.elderMultiSelectChips.chipAvatarTemplate = avatarRef;
23600
+ });
23601
+ }
23602
+ createFilterChipTemplate() {
23603
+ const ref = this.vcr.createComponent(ElderFilterChipTemplateComponent);
23604
+ ref.setInput('avatarResolverFn', (id) => this.resolveAvatarIcon(id));
23605
+ return ref.instance;
23606
+ }
23607
+ setupElderMultiSelectChipsListeners() {
23608
+ this.elderMultiSelectChips.currentClicked
23609
+ .pipe(takeUntilDestroyed(this.destroyRef))
23610
+ .subscribe((entity) => this.handleChipClick(entity));
23611
+ this.elderMultiSelectChips.entityIdsUpdated.pipe(// Updated is a user event when entries are modified
23612
+ takeUntilDestroyed(this.destroyRef), filter(entityIds => !!entityIds)).subscribe(entityIds => {
23613
+ this.selectionModel.initTo(entityIds);
23614
+ });
23615
+ }
23616
+ resolveChipSpec(entity) {
23617
+ return this.chipStyleResolver.resolveChipSpec(this.findFilterEntityByEntity(entity));
23618
+ }
23619
+ resolveAvatarIcon(id) {
23620
+ return this.chipStyleResolver.resolveAvatarIcon(this.findFilterEntityById(id));
23621
+ }
23622
+ handleChipClick(entity) {
23623
+ const entityId = this.elderMultiSelectChips.getEntityId(entity);
23624
+ const newState = this.selectionModel.cycleExisting(entityId);
23625
+ if (!newState) {
23626
+ this.log.warn('The entity id "' + entityId + '" is not in the selection');
23627
+ }
23628
+ }
23629
+ refreshChips(selected) {
23630
+ if (this.ensureChipsNoChanges(selected)) {
23631
+ this.elderMultiSelectChips.refresh();
23632
+ }
23633
+ }
23634
+ ensureChipsNoChanges(selected) {
23635
+ const requiredIds = selected
23636
+ .filter(s => s.mode != IncludeExcludeValue.NEUTRAL)
23637
+ .map(s => s.id);
23638
+ const currentIds = this.elderMultiSelectChips.entityIds ?? [];
23639
+ const currentIdSet = new Set(currentIds);
23640
+ const missingIds = requiredIds
23641
+ .filter(required => !currentIdSet.has(required));
23642
+ if (missingIds.length > 0) {
23643
+ this.elderMultiSelectChips.entityIds = [...currentIds, ...missingIds];
23644
+ return false;
23645
+ }
23646
+ else {
23647
+ return true;
23648
+ }
23649
+ }
23650
+ findFilterEntityByEntity(entity) {
23651
+ const searchedId = this.elderMultiSelectChips.getEntityId(entity);
23652
+ return this.findFilterEntityById(searchedId);
23653
+ }
23654
+ findFilterEntityById(id) {
23655
+ return this.selectionModel.findStateById(id);
23656
+ }
23657
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderChipsIncludeExcludeDirective, deps: [{ token: ElderMultiSelectChipsComponent }, { token: IncludeExcludeSelectionModel }, { token: i0.ViewContainerRef }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Directive }); }
23658
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: ElderChipsIncludeExcludeDirective, isStandalone: true, selector: "[elderChipsIncludeExclude]", inputs: { cycleStrategy: "cycleStrategy" }, providers: [
23659
+ {
23660
+ provide: IncludeExcludeSelectionModel,
23661
+ useFactory: (existing) => {
23662
+ return existing ?? new IncludeExcludeSelectionModel('FULL_CYCLE');
23663
+ },
23664
+ deps: [[new Optional(), new SkipSelf(), IncludeExcludeSelectionModel]]
23665
+ }
23666
+ ], exportAs: ["elderChipsIncludeExclude"], ngImport: i0 }); }
23667
+ }
23668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderChipsIncludeExcludeDirective, decorators: [{
23669
+ type: Directive,
23670
+ args: [{
23671
+ selector: '[elderChipsIncludeExclude]',
23672
+ exportAs: 'elderChipsIncludeExclude',
23673
+ standalone: true,
23674
+ providers: [
23675
+ {
23676
+ provide: IncludeExcludeSelectionModel,
23677
+ useFactory: (existing) => {
23678
+ return existing ?? new IncludeExcludeSelectionModel('FULL_CYCLE');
23679
+ },
23680
+ deps: [[new Optional(), new SkipSelf(), IncludeExcludeSelectionModel]]
23681
+ }
23682
+ ]
23683
+ }]
23684
+ }], ctorParameters: () => [{ type: ElderMultiSelectChipsComponent }, { type: IncludeExcludeSelectionModel }, { type: i0.ViewContainerRef }, { type: i0.DestroyRef }], propDecorators: { cycleStrategy: [{
23685
+ type: Input
23686
+ }] } });
23687
+
23496
23688
  /**
23497
23689
  * Immutable representation of the state of an search input
23498
23690
  */
23499
23691
  class SearchInputState {
23500
- static of(attribute, filters, pristine, userEvent) {
23501
- return new SearchInputState(attribute, filters, pristine, userEvent);
23692
+ static of(queryKey, filters, pristine, userEvent) {
23693
+ return new SearchInputState(queryKey, filters, pristine, userEvent);
23502
23694
  }
23503
23695
  static unknown() {
23504
23696
  return new SearchInputState(null, [], true, false);
@@ -23512,7 +23704,7 @@ class SearchInputState {
23512
23704
  /**
23513
23705
  * attribute The name
23514
23706
  */
23515
- attribute,
23707
+ queryKey,
23516
23708
  /**
23517
23709
  * value of the input
23518
23710
  */
@@ -23525,7 +23717,7 @@ class SearchInputState {
23525
23717
  * Was the input changed by a user interaction
23526
23718
  */
23527
23719
  userEvent) {
23528
- this.attribute = attribute;
23720
+ this.queryKey = queryKey;
23529
23721
  this.filters = filters;
23530
23722
  this.pristine = pristine;
23531
23723
  this.userEvent = userEvent;
@@ -23576,127 +23768,90 @@ class SearchInputState {
23576
23768
  pristineNow = pristine;
23577
23769
  }
23578
23770
  }
23579
- return SearchInputState.of(this.attribute, [filter], pristineNow, true);
23771
+ return SearchInputState.of(this.queryKey, [filter], pristineNow, true);
23580
23772
  }
23581
23773
  }
23582
23774
 
23583
- /**
23584
- * Search name adapter for input controls.
23585
- */
23586
- class ElderInitialValueDirective {
23587
- /***************************************************************************
23588
- * *
23589
- * Constructor *
23590
- * *
23591
- **************************************************************************/
23592
- constructor(ngModel) {
23593
- //TODO: The debounce time is a hacky workaround, find a proper way to set initial value.
23594
- // ngModel regular and two way binding differ in initial value, which led to this solution
23595
- this.ngModel = ngModel;
23596
- /***************************************************************************
23597
- * *
23598
- * Fields *
23599
- * *
23600
- **************************************************************************/
23601
- this.log = LoggerFactory.getLogger(this.constructor.name);
23602
- this.initialValue$ = new BehaviorSubject(null);
23603
- this.destroy$ = new Subject();
23604
- this._initialDone$ = new Subject();
23605
- const ngModelValue$ = of('dummy')
23606
- .pipe(delay(10), map(() => this.ngModel.model));
23607
- ngModelValue$
23608
- .pipe(combineLatestWith$1(this.initialValue$), takeUntil(this._initialDone$), takeUntil(this.destroy$)).subscribe(([ngModelValue, initialValue]) => {
23609
- if (initialValue) {
23610
- ngModel.control.setValue(initialValue);
23611
- }
23612
- this._initialDone$.next();
23613
- this._initialDone$.complete();
23614
- });
23775
+ /***************************************************************************
23776
+ * *
23777
+ * Common functions *
23778
+ * *
23779
+ **************************************************************************/
23780
+ class FilterCommons {
23781
+ static isArrayAndNotEmpty(value) {
23782
+ return this.isArray(value) && this.isNotEmptyArray(value);
23615
23783
  }
23616
- /***************************************************************************
23617
- * *
23618
- * Life Cycle *
23619
- * *
23620
- **************************************************************************/
23621
- /***************************************************************************
23622
- * *
23623
- * Properties *
23624
- * *
23625
- **************************************************************************/
23626
- get initialDone$() {
23627
- return this._initialDone$.asObservable();
23784
+ static isArray(value) {
23785
+ return value !== null && Array.isArray(value);
23628
23786
  }
23629
- get valueChanges$() {
23630
- return this.ngModel.control.valueChanges
23631
- .pipe(takeUntil(this.destroy$));
23787
+ static isNotEmptyArray(value) {
23788
+ return value.length > 0;
23632
23789
  }
23633
- setValue(value) {
23634
- if (value) {
23635
- this.ngModel.control.setValue(value);
23790
+ static getValuesIfArrayElseEmpty(value) {
23791
+ if (this.isArray(value)) {
23792
+ return value;
23636
23793
  }
23637
- this.initialValue$.next(value);
23638
- }
23639
- ngOnDestroy() {
23640
- this.destroy$.next();
23641
- this.destroy$.complete();
23794
+ return [];
23642
23795
  }
23643
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderInitialValueDirective, deps: [{ token: i3.NgModel, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
23644
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: ElderInitialValueDirective, isStandalone: true, selector: "[elderInitialValue]", exportAs: ["elderInitialValue"], ngImport: i0 }); }
23645
23796
  }
23646
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderInitialValueDirective, decorators: [{
23647
- type: Directive,
23648
- args: [{
23649
- selector: '[elderInitialValue]',
23650
- exportAs: 'elderInitialValue',
23651
- standalone: true
23652
- }]
23653
- }], ctorParameters: () => [{ type: i3.NgModel, decorators: [{
23654
- type: Host
23655
- }] }] });
23656
23797
 
23657
- class DefaultInputFilterConverter {
23658
- /***************************************************************************
23659
- * *
23660
- * Static Builders *
23661
- * *
23662
- **************************************************************************/
23663
- static of(queryKeyProviderFn) {
23664
- return new DefaultInputFilterConverter(queryKeyProviderFn);
23665
- }
23798
+ class IncludeExcludeModelFilterAdapter {
23666
23799
  /***************************************************************************
23667
23800
  * *
23668
23801
  * Constructors *
23669
23802
  * *
23670
23803
  **************************************************************************/
23671
- constructor(queryKeyProviderFn) {
23672
- this.queryKeyProviderFn = queryKeyProviderFn;
23804
+ constructor(includeExcludeModel, includeQueryKey, excludeQueryKey) {
23805
+ this.includeExcludeModel = includeExcludeModel;
23806
+ this.includeQueryKey = includeQueryKey;
23807
+ this.excludeQueryKey = excludeQueryKey;
23673
23808
  }
23674
23809
  /***************************************************************************
23675
23810
  * *
23676
23811
  * Public API *
23677
23812
  * *
23678
23813
  **************************************************************************/
23679
- convertToFilters(inputValue) {
23814
+ applyFilters(filters) {
23815
+ const filterMap = this.convertFiltersToMap(filters);
23816
+ const includeIds = this.findArrayOrNull(filterMap, this.includeQueryKey);
23817
+ const excludeIds = this.findArrayOrNull(filterMap, this.excludeQueryKey);
23818
+ this.includeExcludeModel.updateStates([
23819
+ ...this.buildStates(includeIds, IncludeExcludeValue.INCLUDE),
23820
+ ...this.buildStates(excludeIds, IncludeExcludeValue.EXCLUDE)
23821
+ ]);
23822
+ }
23823
+ toFilters() {
23824
+ const includedIds = this.includeExcludeModel.findIncluded();
23825
+ const excludedIds = this.includeExcludeModel.findExcluded();
23680
23826
  return [
23681
- new Filter(this.queryKey(), inputValue)
23827
+ new Filter(this.includeQueryKey, this.nonEmptyArrayOrNull(includedIds)),
23828
+ new Filter(this.excludeQueryKey, this.nonEmptyArrayOrNull(excludedIds))
23682
23829
  ];
23683
23830
  }
23684
- convertToValue(filters) {
23685
- const queryKey = this.queryKey();
23686
- for (const filter of filters) {
23687
- if (filter.key === queryKey) {
23688
- return filter.value;
23689
- }
23690
- }
23691
- return null;
23692
- }
23693
23831
  /***************************************************************************
23694
23832
  * *
23695
23833
  * Private methods *
23696
23834
  * *
23697
23835
  **************************************************************************/
23698
- queryKey() {
23699
- return this.queryKeyProviderFn();
23836
+ nonEmptyArrayOrNull(value) {
23837
+ if (FilterCommons.isArrayAndNotEmpty(value)) {
23838
+ return value;
23839
+ }
23840
+ return null;
23841
+ }
23842
+ buildStates(ids, value) {
23843
+ return ids
23844
+ ? ids.map(id => new IncludeExcludeState(id, value))
23845
+ : [];
23846
+ }
23847
+ convertFiltersToMap(filters) {
23848
+ const map = new Map();
23849
+ filters.forEach(filter => map.set(filter.key, filter.value));
23850
+ return map;
23851
+ }
23852
+ findArrayOrNull(values, key) {
23853
+ const value = this.nonEmptyArrayOrNull(values.get(key));
23854
+ return value ? value : null;
23700
23855
  }
23701
23856
  }
23702
23857
 
@@ -23911,7 +24066,7 @@ class ElderSearchContextDirective {
23911
24066
  /**
23912
24067
  * Returns the current user touched attributes. (ignoring fallbacks)
23913
24068
  */
23914
- get userDefinedAttributes$() {
24069
+ get touchedSearchInputs$() {
23915
24070
  return this.states$.pipe(map(states => states
23916
24071
  .filter(s => !s.pristine)
23917
24072
  .filter(s => !s.hasFallbackValue)));
@@ -23928,7 +24083,7 @@ class ElderSearchContextDirective {
23928
24083
  if (this.initialFiltersRegistered) {
23929
24084
  searchInput.applyFilters(this.initialFilters);
23930
24085
  }
23931
- this.log.debug('Registering search input [' + searchInput.name + '].');
24086
+ this.log.debug('Registering search input [' + searchInput.queryKey + '].');
23932
24087
  this._searchInputs$.next([
23933
24088
  ...this.searchInputs(),
23934
24089
  searchInput
@@ -23994,17 +24149,17 @@ class ElderSearchContextDirective {
23994
24149
  this.applyFiltersToInputs(mergedFilters);
23995
24150
  }
23996
24151
  applyFiltersToInputs(filters) {
23997
- this.saveInitialFitlers(filters);
24152
+ this.saveInitialFilters(filters);
23998
24153
  if (filters.length > 0) {
23999
- const inputsByName = this.searchInputsByName();
24000
- this.log.warn('applyFiltersToInputs [' + Array.from(inputsByName.keys()) + ']', {
24154
+ const inputsByKey = this.searchInputsByQueryKey();
24155
+ this.log.warn('applyFiltersToInputs [' + Array.from(inputsByKey.keys()) + ']', {
24001
24156
  filters: filters,
24002
- inputsByName: inputsByName
24157
+ inputsByQueryKey: inputsByKey
24003
24158
  });
24004
24159
  this.searchInputs().forEach(searchInput => searchInput.applyFilters(filters));
24005
24160
  }
24006
24161
  }
24007
- saveInitialFitlers(filters) {
24162
+ saveInitialFilters(filters) {
24008
24163
  this.initialFiltersRegistered = true;
24009
24164
  this.initialFilters.push(...filters);
24010
24165
  }
@@ -24013,10 +24168,10 @@ class ElderSearchContextDirective {
24013
24168
  filters.forEach(filter => map.set(filter.key, filter));
24014
24169
  return map;
24015
24170
  }
24016
- searchInputsByName() {
24171
+ searchInputsByQueryKey() {
24017
24172
  const inputs = this._searchInputs$.getValue();
24018
24173
  const map = new Map();
24019
- inputs.forEach(input => map.set(input.name, input));
24174
+ inputs.forEach(input => map.set(input.queryKey, input));
24020
24175
  return map;
24021
24176
  }
24022
24177
  convertToFilters(states) {
@@ -24045,16 +24200,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
24045
24200
  }] } });
24046
24201
 
24047
24202
  /**
24048
- * Search name adapter for input controls.
24203
+ * Binds a IncludeExcludeModel to a SearchContexts Filter.
24049
24204
  */
24050
- class ElderSearchInputDirective {
24205
+ class ElderSearchIncludeExcludeDirective {
24051
24206
  /***************************************************************************
24052
24207
  * *
24053
24208
  * Constructor *
24054
24209
  * *
24055
24210
  **************************************************************************/
24056
- constructor(searchContext, ngModel) {
24211
+ constructor(searchContext, destroyRef, selectionModel, ngModel) {
24057
24212
  this.searchContext = searchContext;
24213
+ this.destroyRef = destroyRef;
24214
+ this.selectionModel = selectionModel;
24058
24215
  this.ngModel = ngModel;
24059
24216
  /***************************************************************************
24060
24217
  * *
@@ -24063,9 +24220,8 @@ class ElderSearchInputDirective {
24063
24220
  **************************************************************************/
24064
24221
  this.log = LoggerFactory.getLogger(this.constructor.name);
24065
24222
  this._queryKey$ = new BehaviorSubject(null);
24066
- this._inputConverter = DefaultInputFilterConverter.of(() => this.name);
24067
- this.destroy$ = new Subject();
24068
- this._initialValueDirective = new ElderInitialValueDirective(ngModel);
24223
+ this.includeSuffix = '';
24224
+ this.initialDone$ = new Subject();
24069
24225
  this._state$ = this.buildInputStateObservable().pipe(
24070
24226
  // tap(state => this.log.error('EMIT SEARCH INPUT STATE [' + state.queryKey + ']: ' + state.queryValue + (state.pristine ? '(pristine)' : ''), state))
24071
24227
  );
@@ -24078,17 +24234,9 @@ class ElderSearchInputDirective {
24078
24234
  ngOnInit() {
24079
24235
  this._extractedName = this.extractName();
24080
24236
  this.updateQueryKey();
24237
+ this.includeExcludeAdapter = new IncludeExcludeModelFilterAdapter(this.selectionModel, this.queryKey + this.includeSuffix, this.queryKey + this.excludeSuffix);
24081
24238
  this.searchContext.register(this);
24082
24239
  }
24083
- ngAfterViewInit() {
24084
- this._extractedName = this.extractName();
24085
- this.updateQueryKey();
24086
- this.log.debug(this.queryKey + ' | ' + this.resolvePath);
24087
- }
24088
- ngOnDestroy() {
24089
- this.destroy$.next();
24090
- this.destroy$.complete();
24091
- }
24092
24240
  /***************************************************************************
24093
24241
  * *
24094
24242
  * Properties *
@@ -24107,33 +24255,11 @@ class ElderSearchInputDirective {
24107
24255
  get queryKey$() {
24108
24256
  return this._queryKey$;
24109
24257
  }
24110
- set inputConverter(inputConverter) {
24111
- this._inputConverter = inputConverter;
24112
- }
24113
- get initialDone$() {
24114
- return this._initialValueDirective.initialDone$;
24115
- }
24116
24258
  get state$() {
24117
24259
  return this._state$;
24118
24260
  }
24119
- get name() {
24120
- if (this.queryKey) {
24121
- return this.queryKey;
24122
- }
24123
- if (this._extractedName) {
24124
- return this._extractedName;
24125
- }
24126
- throw new Error('Could not determine the search name key name.' +
24127
- ' Either specify the name property or explicitly set [elderSearchInputKey].');
24128
- }
24129
- get value() {
24130
- return this.ngModel.value;
24131
- }
24132
24261
  get readonly() {
24133
- return this.ngModel.isDisabled;
24134
- }
24135
- get hasFallback() {
24136
- return SearchInputState.isValueDefined(this.fallbackValue);
24262
+ return this.ngModel?.isDisabled;
24137
24263
  }
24138
24264
  /***************************************************************************
24139
24265
  * *
@@ -24141,10 +24267,10 @@ class ElderSearchInputDirective {
24141
24267
  * *
24142
24268
  **************************************************************************/
24143
24269
  applyFilters(filters) {
24144
- this.setInputValue(this._inputConverter.convertToValue(filters));
24270
+ this.includeExcludeAdapter.applyFilters(filters);
24145
24271
  }
24146
24272
  reset() {
24147
- this.ngModel.reset();
24273
+ this.selectionModel.replaceSelection([]);
24148
24274
  }
24149
24275
  /***************************************************************************
24150
24276
  * *
@@ -24157,463 +24283,57 @@ class ElderSearchInputDirective {
24157
24283
  this._queryKey$.next(newKey);
24158
24284
  }
24159
24285
  }
24160
- setInputValue(queryString) {
24161
- const value = this.convertQueryStringToRawModelValue(queryString);
24162
- this._initialValueDirective.setValue(value);
24163
- }
24164
- get valueChanges$() {
24165
- return this.ngModel.control.valueChanges
24166
- .pipe(takeUntil(this.destroy$));
24167
- }
24168
24286
  buildInputStateObservable() {
24169
24287
  const viewStabilized$ = of('stabilized$').pipe(delay(20), first());
24170
- const inputStateChanges$ = this.valueChanges$.pipe(takeUntil(this.destroy$), map(value => this.buildInputState(value, true)), skipUntil(viewStabilized$), debounceTime(20));
24288
+ const inputStateChanges$ = this.selectionModel.selection$.pipe(takeUntilDestroyed(this.destroyRef), map(value => this.buildInputState(true)), skipUntil(viewStabilized$), tap(() => this.initialDone$.next()), debounceTime(20));
24171
24289
  const startDelayed$ = of('start').pipe(delay(15), map(start => {
24172
- const state = this.buildInputState(this.ngModel.control.value, false);
24173
- return state;
24290
+ return this.buildInputState(false);
24174
24291
  }));
24175
24292
  return concat(startDelayed$, inputStateChanges$);
24176
24293
  }
24177
- buildInputState(controlValue, userEvent) {
24178
- const queryValue = this.convertRawModelValueToQueryString(controlValue);
24179
- const filters = this._inputConverter.convertToFilters(queryValue);
24180
- return new SearchInputState(this.name, filters, this.areAllPristine(filters) || this.isFallbackValue(queryValue), userEvent);
24181
- }
24182
- isFallbackValue(queryValue) {
24183
- if (this.hasFallback) {
24184
- return (this.fallbackValue === queryValue);
24185
- }
24186
- return false;
24294
+ buildInputState(userEvent) {
24295
+ const filters = this.includeExcludeAdapter.toFilters();
24296
+ return new SearchInputState(this.queryKey, filters, this.areAllPristine(filters), userEvent);
24187
24297
  }
24188
24298
  areAllPristine(filters) {
24189
- return filters.every(f => this.isPristine(f));
24190
- }
24191
- isPristine(filter) {
24192
- return !this.isAttributeValuePresent(filter.value);
24193
- }
24194
- convertQueryStringToRawModelValue(queryString) {
24195
- if (Objects.nonNull(queryString)) {
24196
- return queryString;
24197
- }
24198
- return null;
24199
- }
24200
- convertRawModelValueToQueryString(model) {
24201
- let queryValue = null;
24202
- if (this.valueAsId != undefined) {
24203
- queryValue = this.checkAndConvertFaultyValuesToNull(model);
24204
- }
24205
- else if (this.isAttributeValuePresent(model)) {
24206
- // Attribute value is present
24207
- queryValue = this.resolveValue(model);
24299
+ if (filters.length > 0) {
24300
+ return filters.every(f => this.isPristine(f));
24208
24301
  }
24209
24302
  else {
24210
- if (this.hasFallback) {
24211
- queryValue = this.fallbackValue;
24212
- }
24213
- }
24214
- return queryValue;
24215
- }
24216
- checkAndConvertFaultyValuesToNull(value) {
24217
- let fixedValue = value;
24218
- fixedValue = this.convertEmptyArrayToNull(fixedValue);
24219
- fixedValue = this.convertEmptyStringToNull(fixedValue);
24220
- return fixedValue;
24221
- }
24222
- convertEmptyArrayToNull(value) {
24223
- if (value instanceof Array && value.length === 0) {
24224
- return null;
24303
+ return true;
24225
24304
  }
24226
- return value;
24227
24305
  }
24228
- convertEmptyStringToNull(value) {
24229
- if (typeof value === 'string' && value.length === 0) {
24230
- return null;
24231
- }
24232
- return value;
24306
+ isPristine(filter) {
24307
+ return !this.isAttributeValuePresent(filter.value);
24233
24308
  }
24234
24309
  isAttributeValuePresent(value) {
24235
24310
  return SearchInputState.isValueDefined(value)
24236
24311
  && (value + '').length !== 0;
24237
24312
  }
24238
- resolveValue(value) {
24239
- if (Objects.nonNull(value)) {
24240
- if (value instanceof Array) {
24241
- const resolvedValues = value
24242
- .map(v => this.resolveSingleValue(v))
24243
- .filter(v => Objects.nonNull(v));
24244
- return this.concatIfNecessary(resolvedValues);
24245
- }
24246
- else {
24247
- return this.resolveSingleValue(value);
24248
- }
24249
- }
24250
- else {
24251
- return null;
24252
- }
24253
- }
24254
- resolveSingleValue(value) {
24255
- value = PropertyPathUtil.resolveValue(value, this.resolvePath);
24256
- value = this.valueTransform ? this.valueTransform(value) : value;
24257
- if (Objects.nonNull(value)) {
24258
- if (value instanceof Array) {
24259
- return value
24260
- .filter(i => Objects.nonNull(i))
24261
- .map(i => i.toString());
24262
- }
24263
- else {
24264
- return value.toString();
24265
- }
24266
- }
24267
- else {
24268
- return null;
24269
- }
24270
- }
24271
24313
  extractName() {
24272
- return this.ngModel.name;
24314
+ return this.ngModel?.name;
24273
24315
  }
24274
- concatIfNecessary(values) {
24275
- const arrays = values.map(v => {
24276
- if (v instanceof Array) {
24277
- return v;
24278
- }
24279
- else {
24280
- return [v];
24281
- }
24282
- });
24283
- return CollectionUtil.flatten(arrays);
24284
- }
24285
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchInputDirective, deps: [{ token: ElderSearchContextDirective }, { token: i3.NgModel, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
24286
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: ElderSearchInputDirective, isStandalone: true, selector: "[elderSearchInput]", inputs: { valueTransform: ["elderSearchInputTransform", "valueTransform"], resolvePath: ["elderSearchInput", "resolvePath"], dataSource: "dataSource", fallbackValue: ["elderSearchInputFallback", "fallbackValue"], valueAsId: "valueAsId", queryKey: ["elderSearchInputKey", "queryKey"] }, exportAs: ["elderSearchInput"], ngImport: i0 }); }
24287
- }
24288
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchInputDirective, decorators: [{
24289
- type: Directive,
24290
- args: [{
24291
- selector: '[elderSearchInput]',
24292
- exportAs: 'elderSearchInput',
24293
- standalone: true
24294
- }]
24295
- }], ctorParameters: () => [{ type: ElderSearchContextDirective }, { type: i3.NgModel, decorators: [{
24296
- type: Host
24297
- }] }], propDecorators: { valueTransform: [{
24298
- type: Input,
24299
- args: ['elderSearchInputTransform']
24300
- }], resolvePath: [{
24301
- type: Input,
24302
- args: ['elderSearchInput']
24303
- }], dataSource: [{
24304
- type: Input
24305
- }], fallbackValue: [{
24306
- type: Input,
24307
- args: ['elderSearchInputFallback']
24308
- }], valueAsId: [{
24309
- type: Input
24310
- }], queryKey: [{
24311
- type: Input,
24312
- args: ['elderSearchInputKey']
24313
- }] } });
24314
-
24315
- class ElderChipsFilterDirective {
24316
- /***************************************************************************
24317
- * *
24318
- * Constructor *
24319
- * *
24320
- **************************************************************************/
24321
- constructor(elderMultiSelectChips, elderSearchInput, vcr, destroyRef) {
24322
- this.elderMultiSelectChips = elderMultiSelectChips;
24323
- this.elderSearchInput = elderSearchInput;
24324
- this.vcr = vcr;
24325
- this.destroyRef = destroyRef;
24326
- /***************************************************************************
24327
- * *
24328
- * Fields *
24329
- * *
24330
- **************************************************************************/
24331
- this.log = LoggerFactory.getLogger(this.constructor.name);
24332
- this.selectionModel = new IncludeExcludeSelectionModel();
24333
- this.chipStyleResolver = new ElderChipFilterStyleResolver();
24334
- this.setupFilterChips();
24335
- this.setupElderMultiSelectChipsListeners();
24336
- }
24337
- /***************************************************************************
24338
- * *
24339
- * Private methods *
24340
- * *
24341
- **************************************************************************/
24342
- setupFilterChips() {
24343
- const ref = this.vcr.createComponent(ElderFilterChipTemplate);
24344
- ref.instance.resolveAvatar = (id) => this.resolveAvatar(id);
24345
- combineLatest([
24346
- ref.instance.resolveAvatar$,
24347
- ref.instance.avatarRef$
24348
- ])
24349
- .pipe(takeUntilDestroyed(this.destroyRef), filter(([resolveAvatar, avatarRef]) => !!resolveAvatar && !!avatarRef))
24350
- .subscribe(([resolveAvatar, avatarRef]) => {
24351
- this.elderMultiSelectChips.chipAvatarTemplate = avatarRef;
24352
- this.elderMultiSelectChips.chipSpecFn = (entity) => this.resolveChipSpec(entity);
24353
- });
24354
- }
24355
- setupElderMultiSelectChipsListeners() {
24356
- this.elderMultiSelectChips.currentClicked
24357
- .pipe(takeUntilDestroyed(this.destroyRef))
24358
- .subscribe((entity) => this.handleChipClick(entity));
24359
- this.elderMultiSelectChips.entityIds$.pipe(takeUntilDestroyed(this.destroyRef), skipUntil(this.elderSearchInput.initialDone$), startWith(this.elderMultiSelectChips.entityIds), filter(entityIds => !!entityIds)).subscribe(entityIds => {
24360
- this.selectionModel.initTo(entityIds);
24361
- });
24362
- }
24363
- resolveChipSpec(entity) {
24364
- return this.chipStyleResolver.resolveChipSpec(this.findFilterEntityByEntity(entity));
24365
- }
24366
- resolveAvatar(id) {
24367
- return this.chipStyleResolver.resolveAvatar(this.findFilterEntityById(id));
24368
- }
24369
- handleChipClick(entity) {
24370
- const entityId = this.elderMultiSelectChips.getEntityId(entity);
24371
- const newState = this.selectionModel.cycleExisting(entityId);
24372
- if (newState) {
24373
- this.elderMultiSelectChips.appendEntities([]); // TODO Why??
24374
- }
24375
- else {
24376
- this.log.warn('The entity id "' + entityId + '" is not in the selection');
24377
- }
24378
- }
24379
- findFilterEntityByEntity(entity) {
24380
- const searchedId = this.elderMultiSelectChips.getEntityId(entity);
24381
- return this.findFilterEntityById(searchedId);
24382
- }
24383
- findFilterEntityById(id) {
24384
- return this.selectionModel.findStateById(id);
24385
- }
24386
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderChipsFilterDirective, deps: [{ token: ElderMultiSelectChipsComponent }, { token: ElderSearchInputDirective }, { token: i0.ViewContainerRef }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Directive }); }
24387
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: ElderChipsFilterDirective, isStandalone: true, selector: "[elderChipsFilter]", ngImport: i0 }); }
24388
- }
24389
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderChipsFilterDirective, decorators: [{
24390
- type: Directive,
24391
- args: [{
24392
- selector: '[elderChipsFilter]',
24393
- standalone: true
24394
- }]
24395
- }], ctorParameters: () => [{ type: ElderMultiSelectChipsComponent }, { type: ElderSearchInputDirective }, { type: i0.ViewContainerRef }, { type: i0.DestroyRef }] });
24396
-
24397
- /***************************************************************************
24398
- * *
24399
- * Common functions *
24400
- * *
24401
- **************************************************************************/
24402
- class FilterCommons {
24403
- static isArrayAndNotEmpty(value) {
24404
- return this.isArray(value) && this.isNotEmptyArray(value);
24405
- }
24406
- static isArray(value) {
24407
- return value !== null && Array.isArray(value);
24408
- }
24409
- static isNotEmptyArray(value) {
24410
- return value.length > 0;
24411
- }
24412
- static getValuesIfArrayElseEmpty(value) {
24413
- if (this.isArray(value)) {
24414
- return value;
24415
- }
24416
- return [];
24417
- }
24418
- }
24419
-
24420
- class IncludeExcludeInputConverter {
24421
- /***************************************************************************
24422
- * *
24423
- * Constructors *
24424
- * *
24425
- **************************************************************************/
24426
- constructor(selectionModel, queryKey, includeSuffix, excludeSuffix) {
24427
- this.selectionModel = selectionModel;
24428
- this.queryKey = queryKey;
24429
- this.includeSuffix = includeSuffix;
24430
- this.excludeSuffix = excludeSuffix;
24431
- }
24432
- /***************************************************************************
24433
- * *
24434
- * Public API *
24435
- * *
24436
- **************************************************************************/
24437
- convertToValue(filters) {
24438
- const values = this.convertFiltersToMap(filters);
24439
- const includes = this.buildMergeIncludeValues(values);
24440
- const excludes = this.buildMergeExcludeValues(values);
24441
- this.updateSelectionModel(includes, excludes);
24442
- return this.mergeValues(includes, excludes);
24443
- }
24444
- convertToFilters(inputValue) {
24445
- return this.buildFilters(this.buildSplitIncludeValues(inputValue), this.buildSplitExcludeValues(inputValue));
24446
- }
24447
- /***************************************************************************
24448
- * *
24449
- * Private Properties *
24450
- * *
24451
- **************************************************************************/
24452
- get includeQueryKey() {
24453
- return this.queryKey + this.includeSuffix;
24454
- }
24455
- get excludeQueryKey() {
24456
- return this.queryKey + this.excludeSuffix;
24457
- }
24458
- /***************************************************************************
24459
- * *
24460
- * Private Methods *
24461
- * *
24462
- **************************************************************************/
24463
- findValueOrDefault(values, key) {
24464
- const value = values.get(key);
24465
- return value ? value : null;
24466
- }
24467
- convertFiltersToMap(filters) {
24468
- const map = new Map();
24469
- filters.forEach(filter => map.set(filter.key, filter.value));
24470
- return map;
24471
- }
24472
- flattenFilterValues(values) {
24473
- const nonNullValues = values.filter(value => !!value);
24474
- if (nonNullValues.length > 0) {
24475
- return nonNullValues.flatMap(value => value);
24476
- }
24477
- return null;
24478
- }
24479
- replaceEmptyArrayWithNull(value) {
24480
- return FilterCommons.isArrayAndNotEmpty(value) ? value : null;
24481
- }
24482
- validateArrayAndReturn(value) {
24483
- if (FilterCommons.isArrayAndNotEmpty(value)) {
24484
- return value;
24485
- }
24486
- return null;
24487
- }
24488
- /***************************************************************************
24489
- * *
24490
- * Split *
24491
- * *
24492
- **************************************************************************/
24493
- /**
24494
- * If the filter before split is an empty array, include will be set to empty and exclude to null
24495
- * Else, an empty array will always be set to null
24496
- */
24497
- buildFilters(includeValue, excludeValue) {
24498
- let newIncludeValue = includeValue;
24499
- const newExcludeValue = this.replaceEmptyArrayWithNull(excludeValue);
24500
- if (FilterCommons.isArrayAndNotEmpty(newExcludeValue)) {
24501
- newIncludeValue = this.replaceEmptyArrayWithNull(includeValue);
24502
- }
24503
- return [
24504
- new Filter(this.includeQueryKey, newIncludeValue),
24505
- new Filter(this.excludeQueryKey, newExcludeValue),
24506
- ];
24507
- }
24508
- buildSplitIncludeValues(value) {
24509
- let splitValues = null;
24510
- if (FilterCommons.isArrayAndNotEmpty(value)) {
24511
- const values = FilterCommons.getValuesIfArrayElseEmpty(value);
24512
- splitValues = values.filter(value => this.selectionModel.isInMode(value, IncludeExcludeMode.INCLUDE));
24513
- }
24514
- return this.validateArrayAndReturn(splitValues);
24515
- }
24516
- buildSplitExcludeValues(value) {
24517
- let splitValues = null;
24518
- if (FilterCommons.isArrayAndNotEmpty(value)) {
24519
- const values = FilterCommons.getValuesIfArrayElseEmpty(value);
24520
- splitValues = values
24521
- .filter(value => this.selectionModel.isInMode(value, IncludeExcludeMode.EXCLUDE));
24522
- }
24523
- return this.validateArrayAndReturn(splitValues);
24524
- }
24525
- /***************************************************************************
24526
- * *
24527
- * Merge *
24528
- * *
24529
- **************************************************************************/
24530
- mergeValues(includeValue, excludeValue) {
24531
- return this.flattenFilterValues([includeValue, excludeValue]);
24532
- }
24533
- updateSelectionModel(includeValue, excludeValue) {
24534
- const updates = [
24535
- ...this.buildNewSelectionStates(includeValue, IncludeExcludeMode.INCLUDE),
24536
- ...this.buildNewSelectionStates(excludeValue, IncludeExcludeMode.EXCLUDE),
24537
- ];
24538
- this.selectionModel.updateStates(updates);
24539
- }
24540
- buildNewSelectionStates(values, selection) {
24541
- if (FilterCommons.isArray(values)) {
24542
- return values.map(value => new IncludeExcludeState(value, selection));
24543
- }
24544
- return [];
24545
- }
24546
- buildMergeIncludeValues(values) {
24547
- return this.validateArrayAndReturn(this.findValueOrDefault(values, this.includeQueryKey));
24548
- }
24549
- buildMergeExcludeValues(values) {
24550
- return this.validateArrayAndReturn(this.findValueOrDefault(values, this.excludeQueryKey));
24551
- }
24552
- }
24553
-
24554
- class ElderSearchIncludeExcludeDirective {
24555
- /***************************************************************************
24556
- * *
24557
- * Properties *
24558
- * *
24559
- **************************************************************************/
24560
- set includeSuffix(suffix) {
24561
- this._includeSuffix$.next(suffix);
24562
- }
24563
- set excludeSuffix(suffix) {
24564
- this._excludeSuffix$.next(suffix);
24565
- }
24566
- /***************************************************************************
24567
- * *
24568
- * Constructor *
24569
- * *
24570
- **************************************************************************/
24571
- constructor(elderSearchInput, elderChipsFilter, destroyRef) {
24572
- this.elderSearchInput = elderSearchInput;
24573
- this.elderChipsFilter = elderChipsFilter;
24574
- this.destroyRef = destroyRef;
24575
- /***************************************************************************
24576
- * *
24577
- * Fields *
24578
- * *
24579
- **************************************************************************/
24580
- this._includeSuffix$ = new BehaviorSubject('');
24581
- this._excludeSuffix$ = new BehaviorSubject(null);
24582
- this.setupSearchQueryTransforms();
24583
- }
24584
- /***************************************************************************
24585
- * *
24586
- * Private Methods *
24587
- * *
24588
- **************************************************************************/
24589
- setupSearchQueryTransforms() {
24590
- combineLatest([
24591
- this.elderSearchInput.queryKey$,
24592
- this._includeSuffix$,
24593
- this._excludeSuffix$
24594
- ])
24595
- .pipe(takeUntilDestroyed(this.destroyRef), filter(([queryKey, includeSuffix, excludeSuffix]) => !!queryKey && Objects.nonNull(includeSuffix) && Objects.nonNull(excludeSuffix)))
24596
- .subscribe(([queryKey, includeSuffix, excludeSuffix]) => {
24597
- this.elderSearchInput.inputConverter = this.buildConverter(queryKey, includeSuffix, excludeSuffix);
24598
- });
24599
- }
24600
- buildConverter(queryKey, includeSuffix, excludeSuffix) {
24601
- return new IncludeExcludeInputConverter(this.elderChipsFilter.selectionModel, queryKey, includeSuffix, excludeSuffix);
24602
- }
24603
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchIncludeExcludeDirective, deps: [{ token: ElderSearchInputDirective }, { token: ElderChipsFilterDirective }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Directive }); }
24604
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: ElderSearchIncludeExcludeDirective, isStandalone: true, selector: "[elderSearchIncludeExclude]", inputs: { includeSuffix: "includeSuffix", excludeSuffix: "excludeSuffix" }, ngImport: i0 }); }
24316
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchIncludeExcludeDirective, deps: [{ token: ElderSearchContextDirective }, { token: i0.DestroyRef }, { token: IncludeExcludeSelectionModel }, { token: i3.NgModel, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
24317
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: ElderSearchIncludeExcludeDirective, isStandalone: true, selector: "[elderSearchIncludeExclude]", inputs: { includeSuffix: "includeSuffix", excludeSuffix: "excludeSuffix", queryKey: "queryKey" }, exportAs: ["elderSearchInput"], ngImport: i0 }); }
24605
24318
  }
24606
24319
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchIncludeExcludeDirective, decorators: [{
24607
24320
  type: Directive,
24608
24321
  args: [{
24609
24322
  selector: '[elderSearchIncludeExclude]',
24323
+ exportAs: 'elderSearchInput',
24610
24324
  standalone: true
24611
24325
  }]
24612
- }], ctorParameters: () => [{ type: ElderSearchInputDirective }, { type: ElderChipsFilterDirective }, { type: i0.DestroyRef }], propDecorators: { includeSuffix: [{
24326
+ }], ctorParameters: () => [{ type: ElderSearchContextDirective }, { type: i0.DestroyRef }, { type: IncludeExcludeSelectionModel }, { type: i3.NgModel, decorators: [{
24327
+ type: Optional
24328
+ }, {
24329
+ type: Host
24330
+ }] }], propDecorators: { includeSuffix: [{
24613
24331
  type: Input
24614
24332
  }], excludeSuffix: [{
24615
24333
  type: Input,
24616
24334
  args: [{ required: true }]
24335
+ }], queryKey: [{
24336
+ type: Input
24617
24337
  }] } });
24618
24338
 
24619
24339
  class ElderSelectModule {
@@ -24648,8 +24368,8 @@ class ElderSelectModule {
24648
24368
  ElderSelectOptionComponent,
24649
24369
  ElderMultiSelectAllInitialDirective,
24650
24370
  ElderAutoSelectSuggestFirstDirective,
24651
- ElderChipsFilterDirective,
24652
- ElderFilterChipTemplate,
24371
+ ElderChipsIncludeExcludeDirective,
24372
+ ElderFilterChipTemplateComponent,
24653
24373
  ElderSearchIncludeExcludeDirective], exports: [ElderSelectComponent,
24654
24374
  ElderSelectValueDirective,
24655
24375
  TemplatedSelectionDialogComponent,
@@ -24665,8 +24385,8 @@ class ElderSelectModule {
24665
24385
  ElderSelectOptionComponent,
24666
24386
  ElderMultiSelectAllInitialDirective,
24667
24387
  ElderAutoSelectSuggestFirstDirective,
24668
- ElderChipsFilterDirective,
24669
- ElderFilterChipTemplate,
24388
+ ElderChipsIncludeExcludeDirective,
24389
+ ElderFilterChipTemplateComponent,
24670
24390
  ElderSearchIncludeExcludeDirective] }); }
24671
24391
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSelectModule, imports: [CommonModule, FormsModule, ReactiveFormsModule,
24672
24392
  MatFormFieldModule,
@@ -24685,7 +24405,7 @@ class ElderSelectModule {
24685
24405
  TemplatedSelectionDialogComponent,
24686
24406
  ElderMultiSelectChipsComponent,
24687
24407
  ElderMultiSelectChipOptionsComponent,
24688
- ElderFilterChipTemplate] }); }
24408
+ ElderFilterChipTemplateComponent] }); }
24689
24409
  }
24690
24410
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSelectModule, decorators: [{
24691
24411
  type: NgModule,
@@ -24721,8 +24441,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
24721
24441
  ElderSelectOptionComponent,
24722
24442
  ElderMultiSelectAllInitialDirective,
24723
24443
  ElderAutoSelectSuggestFirstDirective,
24724
- ElderChipsFilterDirective,
24725
- ElderFilterChipTemplate,
24444
+ ElderChipsIncludeExcludeDirective,
24445
+ ElderFilterChipTemplateComponent,
24726
24446
  ElderSearchIncludeExcludeDirective
24727
24447
  ],
24728
24448
  exports: [
@@ -24741,9 +24461,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
24741
24461
  ElderSelectOptionComponent,
24742
24462
  ElderMultiSelectAllInitialDirective,
24743
24463
  ElderAutoSelectSuggestFirstDirective,
24744
- ElderChipsFilterDirective,
24745
- ElderFilterChipTemplate,
24746
- ElderSearchIncludeExcludeDirective,
24464
+ ElderChipsIncludeExcludeDirective,
24465
+ ElderFilterChipTemplateComponent,
24466
+ ElderSearchIncludeExcludeDirective
24747
24467
  ]
24748
24468
  }]
24749
24469
  }] });
@@ -28194,6 +27914,378 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
28194
27914
  type: Input
28195
27915
  }] } });
28196
27916
 
27917
+ /**
27918
+ * Search name adapter for input controls.
27919
+ */
27920
+ class ElderInitialValueDirective {
27921
+ /***************************************************************************
27922
+ * *
27923
+ * Constructor *
27924
+ * *
27925
+ **************************************************************************/
27926
+ constructor(ngModel) {
27927
+ //TODO: The debounce time is a hacky workaround, find a proper way to set initial value.
27928
+ // ngModel regular and two way binding differ in initial value, which led to this solution
27929
+ this.ngModel = ngModel;
27930
+ /***************************************************************************
27931
+ * *
27932
+ * Fields *
27933
+ * *
27934
+ **************************************************************************/
27935
+ this.log = LoggerFactory.getLogger(this.constructor.name);
27936
+ this.initialValue$ = new BehaviorSubject(null);
27937
+ this.destroy$ = new Subject();
27938
+ this._initialDone$ = new Subject();
27939
+ const ngModelValue$ = of('dummy')
27940
+ .pipe(delay(10), map(() => this.ngModel.model));
27941
+ ngModelValue$
27942
+ .pipe(combineLatestWith$1(this.initialValue$), takeUntil(this._initialDone$), takeUntil(this.destroy$)).subscribe(([ngModelValue, initialValue]) => {
27943
+ if (initialValue) {
27944
+ ngModel.control.setValue(initialValue);
27945
+ }
27946
+ this._initialDone$.next();
27947
+ this._initialDone$.complete();
27948
+ });
27949
+ }
27950
+ /***************************************************************************
27951
+ * *
27952
+ * Life Cycle *
27953
+ * *
27954
+ **************************************************************************/
27955
+ /***************************************************************************
27956
+ * *
27957
+ * Properties *
27958
+ * *
27959
+ **************************************************************************/
27960
+ get initialDone$() {
27961
+ return this._initialDone$.asObservable();
27962
+ }
27963
+ get valueChanges$() {
27964
+ return this.ngModel.control.valueChanges
27965
+ .pipe(takeUntil(this.destroy$));
27966
+ }
27967
+ setValue(value) {
27968
+ if (value) {
27969
+ this.ngModel.control.setValue(value);
27970
+ }
27971
+ this.initialValue$.next(value);
27972
+ }
27973
+ ngOnDestroy() {
27974
+ this.destroy$.next();
27975
+ this.destroy$.complete();
27976
+ }
27977
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderInitialValueDirective, deps: [{ token: i3.NgModel, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
27978
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: ElderInitialValueDirective, isStandalone: true, selector: "[elderInitialValue]", exportAs: ["elderInitialValue"], ngImport: i0 }); }
27979
+ }
27980
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderInitialValueDirective, decorators: [{
27981
+ type: Directive,
27982
+ args: [{
27983
+ selector: '[elderInitialValue]',
27984
+ exportAs: 'elderInitialValue',
27985
+ standalone: true
27986
+ }]
27987
+ }], ctorParameters: () => [{ type: i3.NgModel, decorators: [{
27988
+ type: Host
27989
+ }] }] });
27990
+
27991
+ class DefaultInputFilterConverter {
27992
+ /***************************************************************************
27993
+ * *
27994
+ * Static Builders *
27995
+ * *
27996
+ **************************************************************************/
27997
+ static of(queryKeyProviderFn) {
27998
+ return new DefaultInputFilterConverter(queryKeyProviderFn);
27999
+ }
28000
+ /***************************************************************************
28001
+ * *
28002
+ * Constructors *
28003
+ * *
28004
+ **************************************************************************/
28005
+ constructor(queryKeyProviderFn) {
28006
+ this.queryKeyProviderFn = queryKeyProviderFn;
28007
+ }
28008
+ /***************************************************************************
28009
+ * *
28010
+ * Public API *
28011
+ * *
28012
+ **************************************************************************/
28013
+ convertToFilters(inputValue) {
28014
+ return [
28015
+ new Filter(this.queryKey(), inputValue)
28016
+ ];
28017
+ }
28018
+ convertToValue(filters) {
28019
+ const queryKey = this.queryKey();
28020
+ for (const filter of filters) {
28021
+ if (filter.key === queryKey) {
28022
+ return filter.value;
28023
+ }
28024
+ }
28025
+ return null;
28026
+ }
28027
+ /***************************************************************************
28028
+ * *
28029
+ * Private methods *
28030
+ * *
28031
+ **************************************************************************/
28032
+ queryKey() {
28033
+ return this.queryKeyProviderFn();
28034
+ }
28035
+ }
28036
+
28037
+ /**
28038
+ * Binds the control value (ngModel) to a SearchContexts Filter.
28039
+ */
28040
+ class ElderSearchInputDirective {
28041
+ /***************************************************************************
28042
+ * *
28043
+ * Constructor *
28044
+ * *
28045
+ **************************************************************************/
28046
+ constructor(searchContext, ngModel, destroyRef) {
28047
+ this.searchContext = searchContext;
28048
+ this.ngModel = ngModel;
28049
+ this.destroyRef = destroyRef;
28050
+ /***************************************************************************
28051
+ * *
28052
+ * Fields *
28053
+ * *
28054
+ **************************************************************************/
28055
+ this.log = LoggerFactory.getLogger(this.constructor.name);
28056
+ this._queryKey$ = new BehaviorSubject(null);
28057
+ this._inputConverter = DefaultInputFilterConverter.of(() => this.queryKey);
28058
+ this._initialValueDirective = new ElderInitialValueDirective(ngModel);
28059
+ this._state$ = this.buildInputStateObservable().pipe(
28060
+ // tap(state => this.log.error('EMIT SEARCH INPUT STATE [' + state.queryKey + ']: ' + state.queryValue + (state.pristine ? '(pristine)' : ''), state))
28061
+ );
28062
+ }
28063
+ /***************************************************************************
28064
+ * *
28065
+ * Life Cycle *
28066
+ * *
28067
+ **************************************************************************/
28068
+ ngOnInit() {
28069
+ this._extractedName = this.extractName();
28070
+ this.updateQueryKey();
28071
+ this.searchContext.register(this);
28072
+ }
28073
+ ngAfterViewInit() {
28074
+ this._extractedName = this.extractName();
28075
+ this.updateQueryKey();
28076
+ this.log.debug(this.queryKey + ' | ' + this.resolvePath);
28077
+ }
28078
+ /***************************************************************************
28079
+ * *
28080
+ * Properties *
28081
+ * *
28082
+ **************************************************************************/
28083
+ /**
28084
+ * (Optional) Usually the control name is used, this allows a custom query key
28085
+ */
28086
+ set queryKey(value) {
28087
+ this._userQueryKey = value;
28088
+ this.updateQueryKey();
28089
+ }
28090
+ get queryKey() {
28091
+ return this._queryKey$.getValue();
28092
+ }
28093
+ get queryKey$() {
28094
+ return this._queryKey$;
28095
+ }
28096
+ set inputConverter(inputConverter) {
28097
+ this._inputConverter = inputConverter;
28098
+ }
28099
+ get initialDone$() {
28100
+ return this._initialValueDirective.initialDone$;
28101
+ }
28102
+ get state$() {
28103
+ return this._state$;
28104
+ }
28105
+ get value() {
28106
+ return this.ngModel.value;
28107
+ }
28108
+ get readonly() {
28109
+ return this.ngModel.isDisabled;
28110
+ }
28111
+ get hasFallback() {
28112
+ return SearchInputState.isValueDefined(this.fallbackValue);
28113
+ }
28114
+ /***************************************************************************
28115
+ * *
28116
+ * Public API *
28117
+ * *
28118
+ **************************************************************************/
28119
+ applyFilters(filters) {
28120
+ this.setInputValue(this._inputConverter.convertToValue(filters));
28121
+ }
28122
+ reset() {
28123
+ this.ngModel.reset();
28124
+ }
28125
+ /***************************************************************************
28126
+ * *
28127
+ * Private methods *
28128
+ * *
28129
+ **************************************************************************/
28130
+ updateQueryKey() {
28131
+ const newKey = this._userQueryKey ?? this._extractedName;
28132
+ if (this._queryKey$.getValue() !== newKey) {
28133
+ this._queryKey$.next(newKey);
28134
+ }
28135
+ }
28136
+ setInputValue(queryString) {
28137
+ const value = this.convertQueryStringToRawModelValue(queryString);
28138
+ this._initialValueDirective.setValue(value);
28139
+ }
28140
+ get valueChanges$() {
28141
+ return this.ngModel.control.valueChanges
28142
+ .pipe(takeUntilDestroyed(this.destroyRef));
28143
+ }
28144
+ buildInputStateObservable() {
28145
+ const viewStabilized$ = of('stabilized$').pipe(delay(20), first());
28146
+ const inputStateChanges$ = this.valueChanges$.pipe(takeUntilDestroyed(this.destroyRef), map(value => this.buildInputState(value, true)), skipUntil(viewStabilized$), debounceTime(20));
28147
+ const startDelayed$ = of('start').pipe(delay(15), map(start => {
28148
+ const state = this.buildInputState(this.ngModel.control.value, false);
28149
+ return state;
28150
+ }));
28151
+ return concat(startDelayed$, inputStateChanges$);
28152
+ }
28153
+ buildInputState(controlValue, userEvent) {
28154
+ const queryValue = this.convertRawModelValueToQueryString(controlValue);
28155
+ const filters = this._inputConverter.convertToFilters(queryValue);
28156
+ return new SearchInputState(this.queryKey, filters, this.areAllPristine(filters) || this.isFallbackValue(queryValue), userEvent);
28157
+ }
28158
+ isFallbackValue(queryValue) {
28159
+ if (this.hasFallback) {
28160
+ return (this.fallbackValue === queryValue);
28161
+ }
28162
+ return false;
28163
+ }
28164
+ areAllPristine(filters) {
28165
+ return filters.every(f => this.isPristine(f));
28166
+ }
28167
+ isPristine(filter) {
28168
+ return !this.isAttributeValuePresent(filter.value);
28169
+ }
28170
+ convertQueryStringToRawModelValue(queryString) {
28171
+ if (Objects.nonNull(queryString)) {
28172
+ return queryString;
28173
+ }
28174
+ return null;
28175
+ }
28176
+ convertRawModelValueToQueryString(model) {
28177
+ let queryValue = null;
28178
+ if (this.valueAsId != undefined) {
28179
+ queryValue = this.checkAndConvertFaultyValuesToNull(model);
28180
+ }
28181
+ else if (this.isAttributeValuePresent(model)) {
28182
+ // Attribute value is present
28183
+ queryValue = this.resolveValue(model);
28184
+ }
28185
+ else {
28186
+ if (this.hasFallback) {
28187
+ queryValue = this.fallbackValue;
28188
+ }
28189
+ }
28190
+ return queryValue;
28191
+ }
28192
+ checkAndConvertFaultyValuesToNull(value) {
28193
+ let fixedValue = value;
28194
+ fixedValue = this.convertEmptyArrayToNull(fixedValue);
28195
+ fixedValue = this.convertEmptyStringToNull(fixedValue);
28196
+ return fixedValue;
28197
+ }
28198
+ convertEmptyArrayToNull(value) {
28199
+ if (value instanceof Array && value.length === 0) {
28200
+ return null;
28201
+ }
28202
+ return value;
28203
+ }
28204
+ convertEmptyStringToNull(value) {
28205
+ if (typeof value === 'string' && value.length === 0) {
28206
+ return null;
28207
+ }
28208
+ return value;
28209
+ }
28210
+ isAttributeValuePresent(value) {
28211
+ return SearchInputState.isValueDefined(value)
28212
+ && (value + '').length !== 0;
28213
+ }
28214
+ resolveValue(value) {
28215
+ if (Objects.nonNull(value)) {
28216
+ if (value instanceof Array) {
28217
+ const resolvedValues = value
28218
+ .map(v => this.resolveSingleValue(v))
28219
+ .filter(v => Objects.nonNull(v));
28220
+ return this.concatIfNecessary(resolvedValues);
28221
+ }
28222
+ else {
28223
+ return this.resolveSingleValue(value);
28224
+ }
28225
+ }
28226
+ else {
28227
+ return null;
28228
+ }
28229
+ }
28230
+ resolveSingleValue(value) {
28231
+ value = PropertyPathUtil.resolveValue(value, this.resolvePath);
28232
+ value = this.valueTransform ? this.valueTransform(value) : value;
28233
+ if (Objects.nonNull(value)) {
28234
+ if (value instanceof Array) {
28235
+ return value
28236
+ .filter(i => Objects.nonNull(i))
28237
+ .map(i => i.toString());
28238
+ }
28239
+ else {
28240
+ return value.toString();
28241
+ }
28242
+ }
28243
+ else {
28244
+ return null;
28245
+ }
28246
+ }
28247
+ extractName() {
28248
+ return this.ngModel.name;
28249
+ }
28250
+ concatIfNecessary(values) {
28251
+ const arrays = values.map(v => {
28252
+ if (v instanceof Array) {
28253
+ return v;
28254
+ }
28255
+ else {
28256
+ return [v];
28257
+ }
28258
+ });
28259
+ return CollectionUtil.flatten(arrays);
28260
+ }
28261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchInputDirective, deps: [{ token: ElderSearchContextDirective }, { token: i3.NgModel, host: true }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Directive }); }
28262
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: ElderSearchInputDirective, isStandalone: true, selector: "[elderSearchInput]", inputs: { valueTransform: ["elderSearchInputTransform", "valueTransform"], resolvePath: ["elderSearchInput", "resolvePath"], fallbackValue: ["elderSearchInputFallback", "fallbackValue"], valueAsId: "valueAsId", queryKey: ["elderSearchInputKey", "queryKey"] }, exportAs: ["elderSearchInput"], ngImport: i0 }); }
28263
+ }
28264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchInputDirective, decorators: [{
28265
+ type: Directive,
28266
+ args: [{
28267
+ selector: '[elderSearchInput]',
28268
+ exportAs: 'elderSearchInput',
28269
+ standalone: true
28270
+ }]
28271
+ }], ctorParameters: () => [{ type: ElderSearchContextDirective }, { type: i3.NgModel, decorators: [{
28272
+ type: Host
28273
+ }] }, { type: i0.DestroyRef }], propDecorators: { valueTransform: [{
28274
+ type: Input,
28275
+ args: ['elderSearchInputTransform']
28276
+ }], resolvePath: [{
28277
+ type: Input,
28278
+ args: ['elderSearchInput']
28279
+ }], fallbackValue: [{
28280
+ type: Input,
28281
+ args: ['elderSearchInputFallback']
28282
+ }], valueAsId: [{
28283
+ type: Input
28284
+ }], queryKey: [{
28285
+ type: Input,
28286
+ args: ['elderSearchInputKey']
28287
+ }] } });
28288
+
28197
28289
  class ElderSearchPanelComponent {
28198
28290
  constructor() { }
28199
28291
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -28607,7 +28699,7 @@ class ElderSearchBoxComponent {
28607
28699
  this.queryKey = 'query';
28608
28700
  this._dense = false;
28609
28701
  this.autocomplete = 'off';
28610
- this.userFilters$ = searchContextDirective.userDefinedAttributes$.pipe(
28702
+ this.touchedSearchInputs$ = searchContextDirective.touchedSearchInputs$.pipe(
28611
28703
  // tap(attrs => this.logger.error('Attrs', attrs))
28612
28704
  );
28613
28705
  }
@@ -28645,11 +28737,11 @@ class ElderSearchBoxComponent {
28645
28737
  this.searchContextDirective.reset();
28646
28738
  }
28647
28739
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchBoxComponent, deps: [{ token: ElderSearchContextDirective }], target: i0.ɵɵFactoryTarget.Component }); }
28648
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ElderSearchBoxComponent, isStandalone: true, selector: "elder-search-box", inputs: { autoPanel: "autoPanel", name: "name", queryKey: "queryKey", placeholder: "placeholder", label: "label", hint: "hint", autocomplete: "autocomplete", appearance: "appearance", dense: "dense" }, host: { classAttribute: "elder-form-field-host" }, queries: [{ propertyName: "advancedSearch", first: true, predicate: ElderSearchPanelComponent, descendants: true }], viewQueries: [{ propertyName: "search", first: true, predicate: ["search"], descendants: true }], exportAs: ["elderSearchBox"], ngImport: i0, template: "<div class=\"layout-row place-stretch-center full flex\">\n <mat-form-field\n *ngIf=\"overlayState$ | async as overlayState\"\n [appearance]=\"appearance\"\n class=\"elder-search-box-field flex-auto\" subscriptSizing=\"dynamic\"\n [elderDense]=\"dense\">\n\n <button matPrefix mat-icon-button type=\"button\"\n [elderOverlayTrigger]=\"searchPanel\" (click)=\"blurFocus($event)\"\n >\n <mat-icon>search</mat-icon>\n </button>\n\n <input matInput type=\"text\" [name]=\"name\" [placeholder]=\"placeholder\" #search cdkFocusInitial\n ngModel\n elderSearchInput [elderSearchInputKey]=\"queryKey\" #searchInput=\"elderSearchInput\"\n [autocomplete]=\"(autoPanel && overlayState.hasOverlay) ? 'off' : autocomplete\"\n [elderOverlayOrigin]=\"searchPanel\"\n [elderOverlayTrigger]=\"searchPanel\"\n [elderOverlayTriggerType]=\"'focus'\"\n [elderOverlayTriggerEnabled]=\"autoPanel && overlayState.hasOverlay && (searchInput?.state$ | async)?.pristine\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n\n <div class=\"layout-row\" matSuffix *ngIf=\"userFilters$ | async as userDefinedFilters\">\n\n <button mat-icon-button type=\"button\"\n *ngIf=\"userDefinedFilters.length > 0\"\n (click)=\"clearSearch($event)\"\n name=\"clear\" aria-label=\"Clear\">\n <mat-icon>close</mat-icon>\n </button>\n\n <button mat-icon-button type=\"button\"\n *ngIf=\"overlayState.hasOverlay\" name=\"openPanel\"\n [elderOverlayTrigger]=\"searchPanel\" (click)=\"blurFocus($event)\">\n <mat-icon\n [matBadge]=\"userDefinedFilters.length\"\n matBadgeSize=\"small\"\n [matBadgeOverlap]=\"true\"\n [matBadgeHidden]=\"userDefinedFilters.length === 0\"\n matBadgeColor=\"accent\"\n [color]=\"userDefinedFilters.length > 0 ? 'accent' : undefined\"\n >\n filter_list\n </mat-icon>\n </button>\n </div>\n </mat-form-field>\n</div>\n\n\n<!-- Overlay Panel for advanced search -->\n<elder-overlay #searchPanel=\"elderOverlay\">\n <elder-dialog-panel class=\"elder-search-panel-container\">\n\n <!-- Project the users search inputs here -->\n <ng-content select=\"elder-search-panel\"></ng-content>\n\n <div class=\"layout-row place-between-center\">\n <button mat-raised-button type=\"button\" name=\"clear\"\n (click)=\"clearSearch($event)\">{{'context.reset' | translate}}\n </button>\n\n <button mat-raised-button type=\"button\" name=\"ok\" color=\"primary\"\n (click)=\"searchPanel.closeOverlay()\">Ok\n </button>\n </div>\n </elder-dialog-panel>\n</elder-overlay>\n", styles: [".elder-search-box-field{margin-top:4px;margin-bottom:4px}.elder-search-panel-container{min-width:250px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: ElderFormFieldDenseDirective, selector: "mat-form-field[elderDense]", inputs: ["elderDense", "subscriptSizing", "floatLabel"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: ElderOverlayTriggerDirective, selector: "[elderOverlayTrigger]", inputs: ["elderOverlayTrigger", "elderOverlayTriggerType", "elderOverlayTriggerEnabled"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ElderSearchInputDirective, selector: "[elderSearchInput]", inputs: ["elderSearchInputTransform", "elderSearchInput", "dataSource", "elderSearchInputFallback", "valueAsId", "elderSearchInputKey"], exportAs: ["elderSearchInput"] }, { kind: "directive", type: ElderOverlayOriginDirective, selector: "[elderOverlayOrigin]", inputs: ["elderOverlayOrigin"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: ElderOverlayComponent, selector: "elder-overlay", inputs: ["originX", "originY", "overlayX", "overlayY", "offsetY", "offsetX", "backdrop", "backdropVisible", "origin", "positionStrategy", "overlaySize"], outputs: ["keydownEvents", "attachedChange"], exportAs: ["elderOverlay"] }, { kind: "component", type: ElderDialogPanelComponent, selector: "elder-dialog-panel" }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
28740
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: ElderSearchBoxComponent, isStandalone: true, selector: "elder-search-box", inputs: { autoPanel: "autoPanel", name: "name", queryKey: "queryKey", placeholder: "placeholder", label: "label", hint: "hint", autocomplete: "autocomplete", appearance: "appearance", dense: "dense" }, host: { classAttribute: "elder-form-field-host" }, queries: [{ propertyName: "advancedSearch", first: true, predicate: ElderSearchPanelComponent, descendants: true }], viewQueries: [{ propertyName: "search", first: true, predicate: ["search"], descendants: true }], exportAs: ["elderSearchBox"], ngImport: i0, template: "<div class=\"layout-row place-stretch-center full flex\">\n <mat-form-field\n *ngIf=\"overlayState$ | async as overlayState\"\n [appearance]=\"appearance\"\n class=\"elder-search-box-field flex-auto\" subscriptSizing=\"dynamic\"\n [elderDense]=\"dense\">\n\n <button matPrefix mat-icon-button type=\"button\"\n [elderOverlayTrigger]=\"searchPanel\" (click)=\"blurFocus($event)\"\n >\n <mat-icon>search</mat-icon>\n </button>\n\n <input matInput type=\"text\" [name]=\"name\" [placeholder]=\"placeholder\" #search cdkFocusInitial\n ngModel\n elderSearchInput [elderSearchInputKey]=\"queryKey\" #searchInput=\"elderSearchInput\"\n [autocomplete]=\"(autoPanel && overlayState.hasOverlay) ? 'off' : autocomplete\"\n [elderOverlayOrigin]=\"searchPanel\"\n [elderOverlayTrigger]=\"searchPanel\"\n [elderOverlayTriggerType]=\"'focus'\"\n [elderOverlayTriggerEnabled]=\"autoPanel && overlayState.hasOverlay && (searchInput?.state$ | async)?.pristine\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n\n <div class=\"layout-row\" matSuffix *ngIf=\"touchedSearchInputs$ | async as touchedInputs\">\n\n <button mat-icon-button type=\"button\"\n *ngIf=\"touchedInputs.length > 0\"\n (click)=\"clearSearch($event)\"\n name=\"clear\" aria-label=\"Clear\">\n <mat-icon>close</mat-icon>\n </button>\n\n <button mat-icon-button type=\"button\"\n *ngIf=\"overlayState.hasOverlay\" name=\"openPanel\"\n [elderOverlayTrigger]=\"searchPanel\" (click)=\"blurFocus($event)\">\n <mat-icon\n [matBadge]=\"touchedInputs.length\"\n matBadgeSize=\"small\"\n [matBadgeOverlap]=\"true\"\n [matBadgeHidden]=\"touchedInputs.length === 0\"\n matBadgeColor=\"accent\"\n [color]=\"touchedInputs.length > 0 ? 'accent' : undefined\"\n >\n filter_list\n </mat-icon>\n </button>\n </div>\n </mat-form-field>\n</div>\n\n\n<!-- Overlay Panel for advanced search -->\n<elder-overlay #searchPanel=\"elderOverlay\">\n <elder-dialog-panel class=\"elder-search-panel-container\">\n\n <!-- Project the users search inputs here -->\n <ng-content select=\"elder-search-panel\"></ng-content>\n\n <div class=\"layout-row place-between-center\">\n <button mat-raised-button type=\"button\" name=\"clear\"\n (click)=\"clearSearch($event)\">{{'context.reset' | translate}}\n </button>\n\n <button mat-raised-button type=\"button\" name=\"ok\" color=\"primary\"\n (click)=\"searchPanel.closeOverlay()\">Ok\n </button>\n </div>\n </elder-dialog-panel>\n</elder-overlay>\n", styles: [".elder-search-box-field{margin-top:4px;margin-bottom:4px}.elder-search-panel-container{min-width:250px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: ElderFormFieldDenseDirective, selector: "mat-form-field[elderDense]", inputs: ["elderDense", "subscriptSizing", "floatLabel"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: ElderOverlayTriggerDirective, selector: "[elderOverlayTrigger]", inputs: ["elderOverlayTrigger", "elderOverlayTriggerType", "elderOverlayTriggerEnabled"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ElderSearchInputDirective, selector: "[elderSearchInput]", inputs: ["elderSearchInputTransform", "elderSearchInput", "elderSearchInputFallback", "valueAsId", "elderSearchInputKey"], exportAs: ["elderSearchInput"] }, { kind: "directive", type: ElderOverlayOriginDirective, selector: "[elderOverlayOrigin]", inputs: ["elderOverlayOrigin"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: ElderOverlayComponent, selector: "elder-overlay", inputs: ["originX", "originY", "overlayX", "overlayY", "offsetY", "offsetX", "backdrop", "backdropVisible", "origin", "positionStrategy", "overlaySize"], outputs: ["keydownEvents", "attachedChange"], exportAs: ["elderOverlay"] }, { kind: "component", type: ElderDialogPanelComponent, selector: "elder-dialog-panel" }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
28649
28741
  }
28650
28742
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchBoxComponent, decorators: [{
28651
28743
  type: Component,
28652
- args: [{ selector: 'elder-search-box', exportAs: 'elderSearchBox', host: { 'class': 'elder-form-field-host' }, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, MatFormField, ElderFormFieldDenseDirective, MatIconButton, MatPrefix, ElderOverlayTriggerDirective, MatIcon, MatInput, FormsModule, ElderSearchInputDirective, ElderOverlayOriginDirective, MatHint, MatSuffix, MatBadge, ElderOverlayComponent, ElderDialogPanelComponent, MatButton, AsyncPipe, TranslateModule], template: "<div class=\"layout-row place-stretch-center full flex\">\n <mat-form-field\n *ngIf=\"overlayState$ | async as overlayState\"\n [appearance]=\"appearance\"\n class=\"elder-search-box-field flex-auto\" subscriptSizing=\"dynamic\"\n [elderDense]=\"dense\">\n\n <button matPrefix mat-icon-button type=\"button\"\n [elderOverlayTrigger]=\"searchPanel\" (click)=\"blurFocus($event)\"\n >\n <mat-icon>search</mat-icon>\n </button>\n\n <input matInput type=\"text\" [name]=\"name\" [placeholder]=\"placeholder\" #search cdkFocusInitial\n ngModel\n elderSearchInput [elderSearchInputKey]=\"queryKey\" #searchInput=\"elderSearchInput\"\n [autocomplete]=\"(autoPanel && overlayState.hasOverlay) ? 'off' : autocomplete\"\n [elderOverlayOrigin]=\"searchPanel\"\n [elderOverlayTrigger]=\"searchPanel\"\n [elderOverlayTriggerType]=\"'focus'\"\n [elderOverlayTriggerEnabled]=\"autoPanel && overlayState.hasOverlay && (searchInput?.state$ | async)?.pristine\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n\n <div class=\"layout-row\" matSuffix *ngIf=\"userFilters$ | async as userDefinedFilters\">\n\n <button mat-icon-button type=\"button\"\n *ngIf=\"userDefinedFilters.length > 0\"\n (click)=\"clearSearch($event)\"\n name=\"clear\" aria-label=\"Clear\">\n <mat-icon>close</mat-icon>\n </button>\n\n <button mat-icon-button type=\"button\"\n *ngIf=\"overlayState.hasOverlay\" name=\"openPanel\"\n [elderOverlayTrigger]=\"searchPanel\" (click)=\"blurFocus($event)\">\n <mat-icon\n [matBadge]=\"userDefinedFilters.length\"\n matBadgeSize=\"small\"\n [matBadgeOverlap]=\"true\"\n [matBadgeHidden]=\"userDefinedFilters.length === 0\"\n matBadgeColor=\"accent\"\n [color]=\"userDefinedFilters.length > 0 ? 'accent' : undefined\"\n >\n filter_list\n </mat-icon>\n </button>\n </div>\n </mat-form-field>\n</div>\n\n\n<!-- Overlay Panel for advanced search -->\n<elder-overlay #searchPanel=\"elderOverlay\">\n <elder-dialog-panel class=\"elder-search-panel-container\">\n\n <!-- Project the users search inputs here -->\n <ng-content select=\"elder-search-panel\"></ng-content>\n\n <div class=\"layout-row place-between-center\">\n <button mat-raised-button type=\"button\" name=\"clear\"\n (click)=\"clearSearch($event)\">{{'context.reset' | translate}}\n </button>\n\n <button mat-raised-button type=\"button\" name=\"ok\" color=\"primary\"\n (click)=\"searchPanel.closeOverlay()\">Ok\n </button>\n </div>\n </elder-dialog-panel>\n</elder-overlay>\n", styles: [".elder-search-box-field{margin-top:4px;margin-bottom:4px}.elder-search-panel-container{min-width:250px}\n"] }]
28744
+ args: [{ selector: 'elder-search-box', exportAs: 'elderSearchBox', host: { 'class': 'elder-form-field-host' }, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgIf, MatFormField, ElderFormFieldDenseDirective, MatIconButton, MatPrefix, ElderOverlayTriggerDirective, MatIcon, MatInput, FormsModule, ElderSearchInputDirective, ElderOverlayOriginDirective, MatHint, MatSuffix, MatBadge, ElderOverlayComponent, ElderDialogPanelComponent, MatButton, AsyncPipe, TranslateModule], template: "<div class=\"layout-row place-stretch-center full flex\">\n <mat-form-field\n *ngIf=\"overlayState$ | async as overlayState\"\n [appearance]=\"appearance\"\n class=\"elder-search-box-field flex-auto\" subscriptSizing=\"dynamic\"\n [elderDense]=\"dense\">\n\n <button matPrefix mat-icon-button type=\"button\"\n [elderOverlayTrigger]=\"searchPanel\" (click)=\"blurFocus($event)\"\n >\n <mat-icon>search</mat-icon>\n </button>\n\n <input matInput type=\"text\" [name]=\"name\" [placeholder]=\"placeholder\" #search cdkFocusInitial\n ngModel\n elderSearchInput [elderSearchInputKey]=\"queryKey\" #searchInput=\"elderSearchInput\"\n [autocomplete]=\"(autoPanel && overlayState.hasOverlay) ? 'off' : autocomplete\"\n [elderOverlayOrigin]=\"searchPanel\"\n [elderOverlayTrigger]=\"searchPanel\"\n [elderOverlayTriggerType]=\"'focus'\"\n [elderOverlayTriggerEnabled]=\"autoPanel && overlayState.hasOverlay && (searchInput?.state$ | async)?.pristine\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n\n <div class=\"layout-row\" matSuffix *ngIf=\"touchedSearchInputs$ | async as touchedInputs\">\n\n <button mat-icon-button type=\"button\"\n *ngIf=\"touchedInputs.length > 0\"\n (click)=\"clearSearch($event)\"\n name=\"clear\" aria-label=\"Clear\">\n <mat-icon>close</mat-icon>\n </button>\n\n <button mat-icon-button type=\"button\"\n *ngIf=\"overlayState.hasOverlay\" name=\"openPanel\"\n [elderOverlayTrigger]=\"searchPanel\" (click)=\"blurFocus($event)\">\n <mat-icon\n [matBadge]=\"touchedInputs.length\"\n matBadgeSize=\"small\"\n [matBadgeOverlap]=\"true\"\n [matBadgeHidden]=\"touchedInputs.length === 0\"\n matBadgeColor=\"accent\"\n [color]=\"touchedInputs.length > 0 ? 'accent' : undefined\"\n >\n filter_list\n </mat-icon>\n </button>\n </div>\n </mat-form-field>\n</div>\n\n\n<!-- Overlay Panel for advanced search -->\n<elder-overlay #searchPanel=\"elderOverlay\">\n <elder-dialog-panel class=\"elder-search-panel-container\">\n\n <!-- Project the users search inputs here -->\n <ng-content select=\"elder-search-panel\"></ng-content>\n\n <div class=\"layout-row place-between-center\">\n <button mat-raised-button type=\"button\" name=\"clear\"\n (click)=\"clearSearch($event)\">{{'context.reset' | translate}}\n </button>\n\n <button mat-raised-button type=\"button\" name=\"ok\" color=\"primary\"\n (click)=\"searchPanel.closeOverlay()\">Ok\n </button>\n </div>\n </elder-dialog-panel>\n</elder-overlay>\n", styles: [".elder-search-box-field{margin-top:4px;margin-bottom:4px}.elder-search-panel-container{min-width:250px}\n"] }]
28653
28745
  }], ctorParameters: () => [{ type: ElderSearchContextDirective }], propDecorators: { search: [{
28654
28746
  type: ViewChild,
28655
28747
  args: ['search']
@@ -33325,5 +33417,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
33325
33417
  * Generated bundle index. Do not edit.
33326
33418
  */
33327
33419
 
33328
- export { ActivationEventSource, Arrays, AuditedEntity, AutoStartSpec, BlobUrl, BytesFormat, BytesPerSecondFormat, BytesPipe, CardDropEvent, CardOrganizerData, CardStack, CollectionUtil, ComparatorBuilder, ConfirmDialogConfig, ContinuableListing, CsvColumnSpec, CsvSerializer, CsvSpec, CsvStreamExporter, CsvStreamExporterBuilder, CsvStreamExporterBuilderService, Currency, CurrencyCode, CurrencyFormatUtil, CurrencyUnit, CurrencyUnitRegistry, CustomDateAdapter, DataContextActivePage, DataContextAutoStarter, DataContextBase, DataContextBuilder, DataContextContinuableBase, DataContextContinuablePaged, DataContextContinuableToken, DataContextLifeCycleBinding, DataContextSelectionDirective, DataContextSimple, DataContextSnapshot, DataContextSourceEventBinding, DataContextStateIndicatorComponent, DataContextStatus, DataSourceAdapter, DataSourceBase, DataSourceChangeEvent, DataSourceChangeType, DataSourceProcessor, DataTransferFactory, DataTransferProgress, DataTransferProgressAggregate, DataTransferState, DataTransferStatus, DataViewIframeAdapterDirective, DataViewIframeComponent, DataViewMessage, DataViewMessageTypeValues, DataViewOptionsProviderBinding, DataViewSelection, DataViewSelectionInit, DateUtil, DelegateContinuableDataSource, DelegateDataSource, DelegateListDataSource, DelegatePagedDataSource, Dimensions, DrawerOutletBinding, DurationBucket, DurationFormat, DurationFormatUtil, ELDER_DATA_VIEW, ELDER_SELECT_BASE, ElderAccessDeniedComponent, ElderAccessDeniedModule, ElderAppHeaderComponent, ElderAuditModule, ElderAuditedEntityComponent, ElderAutoSelectFirstDirective, ElderAutoSelectSuggestFirstDirective, ElderAutocompleteDirective, ElderAutocompleteManyDirective, ElderAutocompleteModule, ElderBadgeChipAvatarDirective, ElderBadgeChipDirective, ElderBadgeComponent, ElderBadgeDirective, ElderBadgeModule, ElderBlobViewerComponent, ElderBreadCrumbsComponent, ElderBreadCrumbsModule, ElderButtonGroupComponent, ElderButtonGroupModule, ElderCardComponent, ElderCardContentDirective, ElderCardHeaderActionsDirective, ElderCardHeaderComponent, ElderCardModule, ElderCardOrganizerComponent, ElderCardOrganizerModule, ElderCardPanelComponent, ElderCardStackComponent, ElderCardSubtitleDirective, ElderCardTitleDirective, ElderCheckboxState, ElderChipLabelDirective, ElderChipListSelectComponent, ElderChipListSelectModule, ElderChipsFilterDirective, ElderChipsModule, ElderClearSelectDirective, ElderClipboardPutDirective, ElderClipboardService, ElderConfirmDialogComponent, ElderConnectivityModule, ElderConnectivityService, ElderContainersModule, ElderCsvExportBtnComponent, ElderCsvModule, ElderCurrencyModule, ElderCurrencyPipe, ElderDataCommonModule, ElderDataToolbarComponent, ElderDataTransferModule, ElderDataTransferService, ElderDataViewBaseComponent, ElderDataViewOptions, ElderDataViewOptionsProvider, ElderDateSwitcherComponent, ElderDateTimeInputComponent, ElderDelayedFocusDirective, ElderDeleteActiveDirective, ElderDetailDialogComponent, ElderDetailDirective, ElderDialogConfig, ElderDialogModule, ElderDialogPanelComponent, ElderDialogService, ElderDimensionsInputComponent, ElderDropZoneComponent, ElderDurationInputComponent, ElderEntityValueAccessorUtil, ElderEnumTranslationService, ElderErrorModule, ElderEventSourceService, ElderExceptionDetailComponent, ElderExpandToggleButtonComponent, ElderExpandToggleButtonModule, ElderFileDropZoneDirective, ElderFileModule, ElderFileSelectComponent, ElderFileSelectDirective, ElderFileUploadComponent, ElderFilterChipTemplate, ElderFormFieldControlBase, ElderFormFieldDenseDirective, ElderFormFieldLabelDirective, ElderFormFieldNoHintDirective, ElderFormFieldNoSpinnerDirective, ElderFormsDirectivesModule, ElderFormsModule, ElderFromFieldBase, ElderFromFieldEntityBase, ElderFromFieldMultiEntityBase, ElderGlobalSearchComponent, ElderGlobalSearchModule, ElderGlobalSearchService, ElderGridComponent, ElderGridModule, ElderGridTileDirective, ElderGridToolbarDirective, ElderHeaderComponent, ElderHeaderModule, ElderHttpClient, ElderI18nEntitiesModule, ElderIFrameModule, ElderInfiniteAutocompleteDirective, ElderInfiniteScrollDirective, ElderInfiniteScrollModule, ElderInputPatternDirective, ElderIntervalInputComponent, ElderKeyEventDirective, ElderLabelInputComponent, ElderLabelsModule, ElderLanguageConfig, ElderLanguageInterceptor, ElderLanguageModule, ElderLanguageService, ElderLanguageSwitcherComponent, ElderLocalDateInputComponent, ElderLocalTimeInputComponent, ElderLocalesDeChModule, ElderLocalizedInputComponent, ElderLocalizedInputDialogComponent, ElderLocalizedInputDialogService, ElderLocalizedInputTableComponent, ElderLocalizedTextColumnDirective, ElderLocalizedTextsDirective, ElderMasterActivationDirective, ElderMasterDetailComponent, ElderMasterDetailModule, ElderMasterDetailService, ElderMasterDirective, ElderMaxValidator, ElderMeasuresModule, ElderMinValidator, ElderMultiEntityValueAccessorUtil, ElderMultiSelectAllInitialDirective, ElderMultiSelectBase, ElderMultiSelectChipOptionsComponent, ElderMultiSelectChipsComponent, ElderMultiSelectFormField, ElderMultipleOfUtil, ElderMultipleOfValidator, ElderNavGroupComponent, ElderNavLinkComponent, ElderNavListComponent, ElderNavModule, ElderNextFocusableDirective, ElderNumberCellDirective, ElderOfflineIndicatorComponent, ElderOverlayComponent, ElderOverlayModule, ElderOverlayOriginDirective, ElderOverlayRef, ElderOverlayTriggerDirective, ElderPaddingDirective, ElderPanelComponent, ElderPanelModule, ElderPeriodInputComponent, ElderPipesModule, ElderPlugParentFormDirective, ElderProgressBarComponent, ElderProgressBarModule, ElderQuantityFormFieldComponent, ElderQuantityInputControlComponent, ElderQuantityModule, ElderQuantityPipe, ElderQuantityRangeValidator, ElderQuantityService, ElderQuantityTransformPipe, ElderQuestionDialogComponent, ElderRepeatPipe, ElderRepeatPipeLegacy, ElderRequiredDimensionsValidator, ElderRequiredIgnoreZeroValidator, ElderRequiredQuantityValidator, ElderRoundPipe, ElderRouteOutletDrawerService, ElderRouterOutletService, ElderRouterService, ElderSafeUrlPipe, ElderScrollContainerComponent, ElderScrollbarDirective, ElderScrollbarModule, ElderSearchBoxComponent, ElderSearchContextDirective, ElderSearchIncludeExcludeDirective, ElderSearchInputDirective, ElderSearchModule, ElderSearchPanelComponent, ElderSearchUrlDirective, ElderSelectBase, ElderSelectChipAvatarDirective, ElderSelectChipDirective, ElderSelectComponent, ElderSelectComponentState, ElderSelectCustomInputDirective, ElderSelectFormField, ElderSelectModule, ElderSelectOnTabDirective, ElderSelectOptionComponent, ElderSelectValueDirective, ElderSelectionDialogComponent, ElderSelectionDialogDirective, ElderSelectionMasterCheckboxComponent, ElderSelectionPopupTriggerAdapterDirective, ElderShellCenterDirective, ElderShellComponent, ElderShellModule, ElderShellNavigationToggleComponent, ElderShellService, ElderShellSideLeftDirective, ElderShellSideRightDirective, ElderShellSlotDirective, ElderSimpleSelectionViewComponent, ElderSimpleSelectionViewModule, ElderSingleSortComponent, ElderStackCardDirective, ElderStopEventPropagationDirective, ElderSuggestionPanelComponent, ElderSvgViewerComponent, ElderTabDirective, ElderTabFocusTrapDirective, ElderTabGroupRoutingDirective, ElderTabModule, ElderTableActivationDirective, ElderTableComponent, ElderTableExtensionDirective, ElderTableGroup, ElderTableModel, ElderTableModelCdkTableBinding, ElderTableModelQueryGroup, ElderTableModule, ElderTableProviders, ElderTableRootDirective, ElderTableSortDirective, ElderTableToolbarDirective, ElderThemeApplierDirective, ElderThemeDirective, ElderThemeModule, ElderThemePreferenceService, ElderThemeService, ElderThemeToggleComponent, ElderTimeModule, ElderToastModule, ElderToastService, ElderTogglePanelComponent, ElderTogglePanelPrimaryDirective, ElderTogglePanelSecondaryDirective, ElderTogglePanelTriggerDirective, ElderToolbarColumnDirective, ElderToolbarComponent, ElderToolbarContentDirective, ElderToolbarModule, ElderToolbarService, ElderToolbarTitleComponent, ElderToolbarTitleService, ElderTouchedDirective, ElderTrimPipe, ElderTripleStateCheckboxDirective, ElderTruncatePipe, ElderUnitSelectDirective, ElderUnitService, ElderUrlFragment, ElderUrlFragmentModule, ElderUrlFragmentParamsService, ElderUrlFragmentSwitcherComponent, ElderValidationErrorDirective, ElderViewersModule, EntitySetPatch, ErrorUtil, ExceptionDetailCtx, FileEntry, FileListingRx, FileUploadClient, Filter, FilterContext, FilterUtil, FocusUtil, FormFieldBaseComponent, GlobalDragDropService, HttpClientBuilder, HttpClientPristine, HttpDataTransfer, HttpDataTransferAggregateComponent, HttpDataTransferComponent, HttpDataTransferIndicatorComponent, HttpDataTransferOverviewComponent, HttpParamsBuilder, I18nBase, I18nPickAsyncPipe, I18nPickPipe, I18nText, IFrameState, IframeCloseDirective, IframeDialogComponent, IframeHostComponent, IframeService, IframeSideContentComponent, IncludeExcludeMode, IncludeExcludeSelectionModel, IncludeExcludeState, IndexedEntities, InternalRestClientConfig, Interval, IsoDurationPipe, IsoIntervalFormatUtil, IsoIntervalParsePipe, IsoIntervalPipe, ItemActivationEvent, ItemActivationOptions, JsonMapUtil, KafentConfig, KafentEvent, KafentEventService, KafentEventStream, KafentEventStreamDisabled, KafentEventStreamSse, KafentEventTransport, KafentModule, KafentSseEventChannel, KafentTokenProvider, KafentTokenProviderSessionStorage, KafentTopicSse, KnownElderThemes, KnownLocaleTags, LocalListDataSource, LocalPagedDataSource, LocalisationPickerService, MasterDetailActivationEvent, MasterSelectionState, MatTableDataContextBinding, MatTableDataContextBindingBuilder, MultiModelBaseComponent, NextNumberUtil, Objects, OnlineStatus, Page, PageRequest, Pageable, ParseUtil, Path, PathNode, PeriodBucket, PeriodDuration, PeriodFormat, ProcessIterationContext, ProcessState, PropertyPathUtil, Quantity, QueryListBinding, QuestionDialogConfig, ReactiveEventSource, ReactiveEventSourceState, ReactiveFetchEventSource, ReactiveFetchEventSourceService, ReactiveMap, ReactiveSSeMessage, RefreshingEntity, RestClient, RestClientConfig, RestClientContinuable, RestClientList, RestClientPaged, SearchQuery, SelectChipSpecUtil, SelectOptionChipSpecUtil, SelectionModel, SelectionModelPopupDirective, Sets, SimpleLocalisationPicker, Sort, SortOption, SortUtil, StandardToastComponent, SubBar, SuggestionProvider, TemplateCompositeControl, TemplatedSelectionDialogComponent, ThemeSpec, TimeAgoPipe, TimeDurationPipe, TimeUtil, ToIsoDateStringPipe, ToastType, TokenChunkRequest, ToolbarHeader, Translated, TranslatedConverter, TranslatedEnumValue, TranslatedText, TypedEventMessage, Unit, UnitDimension, UnitDimensionInfo, UnitInfo, UnitRegistry, UrlBuilder, UrlQueryParams, UuidUtil, ValueAccessorBase, ValueWrapper, ViewProviders, WeightPipe, alphaNumStringComparator, buildFormIntegrationProviders, coerceInterval, coerceIntervalIsoStr, createDataOptionsProvider, createSelectionModel, existingOrNewElderTableModel, initSearchUrlService, isActivePagedDataContext, isContinuableDataContext, isContinuableDataSource, isDataContext, isDataSource, isDataViewMessageType, isElderEntityValueAccessor, isElderMultiEntityValueAccessor, isListDataSource, isPagedDataSource, lazySample, lazySampleTime, naturalValueComparator, newElderTableModel, proxyControlContainer, registerLocale, runInZone, themeInit };
33420
+ export { ActivationEventSource, Arrays, AuditedEntity, AutoStartSpec, BlobUrl, BytesFormat, BytesPerSecondFormat, BytesPipe, CardDropEvent, CardOrganizerData, CardStack, CollectionUtil, ComparatorBuilder, ConfirmDialogConfig, ContinuableListing, CsvColumnSpec, CsvSerializer, CsvSpec, CsvStreamExporter, CsvStreamExporterBuilder, CsvStreamExporterBuilderService, Currency, CurrencyCode, CurrencyFormatUtil, CurrencyUnit, CurrencyUnitRegistry, CustomDateAdapter, DataContextActivePage, DataContextAutoStarter, DataContextBase, DataContextBuilder, DataContextContinuableBase, DataContextContinuablePaged, DataContextContinuableToken, DataContextLifeCycleBinding, DataContextSelectionDirective, DataContextSimple, DataContextSnapshot, DataContextSourceEventBinding, DataContextStateIndicatorComponent, DataContextStatus, DataSourceAdapter, DataSourceBase, DataSourceChangeEvent, DataSourceChangeType, DataSourceProcessor, DataTransferFactory, DataTransferProgress, DataTransferProgressAggregate, DataTransferState, DataTransferStatus, DataViewIframeAdapterDirective, DataViewIframeComponent, DataViewMessage, DataViewMessageTypeValues, DataViewOptionsProviderBinding, DataViewSelection, DataViewSelectionInit, DateUtil, DelegateContinuableDataSource, DelegateDataSource, DelegateListDataSource, DelegatePagedDataSource, Dimensions, DrawerOutletBinding, DurationBucket, DurationFormat, DurationFormatUtil, ELDER_DATA_VIEW, ELDER_SELECT_BASE, ElderAccessDeniedComponent, ElderAccessDeniedModule, ElderAppHeaderComponent, ElderAuditModule, ElderAuditedEntityComponent, ElderAutoSelectFirstDirective, ElderAutoSelectSuggestFirstDirective, ElderAutocompleteDirective, ElderAutocompleteManyDirective, ElderAutocompleteModule, ElderBadgeChipAvatarDirective, ElderBadgeChipDirective, ElderBadgeComponent, ElderBadgeDirective, ElderBadgeModule, ElderBlobViewerComponent, ElderBreadCrumbsComponent, ElderBreadCrumbsModule, ElderButtonGroupComponent, ElderButtonGroupModule, ElderCardComponent, ElderCardContentDirective, ElderCardHeaderActionsDirective, ElderCardHeaderComponent, ElderCardModule, ElderCardOrganizerComponent, ElderCardOrganizerModule, ElderCardPanelComponent, ElderCardStackComponent, ElderCardSubtitleDirective, ElderCardTitleDirective, ElderCheckboxState, ElderChipLabelDirective, ElderChipListSelectComponent, ElderChipListSelectModule, ElderChipsIncludeExcludeDirective, ElderChipsModule, ElderClearSelectDirective, ElderClipboardPutDirective, ElderClipboardService, ElderConfirmDialogComponent, ElderConnectivityModule, ElderConnectivityService, ElderContainersModule, ElderCsvExportBtnComponent, ElderCsvModule, ElderCurrencyModule, ElderCurrencyPipe, ElderDataCommonModule, ElderDataToolbarComponent, ElderDataTransferModule, ElderDataTransferService, ElderDataViewBaseComponent, ElderDataViewOptions, ElderDataViewOptionsProvider, ElderDateSwitcherComponent, ElderDateTimeInputComponent, ElderDelayedFocusDirective, ElderDeleteActiveDirective, ElderDetailDialogComponent, ElderDetailDirective, ElderDialogConfig, ElderDialogModule, ElderDialogPanelComponent, ElderDialogService, ElderDimensionsInputComponent, ElderDropZoneComponent, ElderDurationInputComponent, ElderEntityValueAccessorUtil, ElderEnumTranslationService, ElderErrorModule, ElderEventSourceService, ElderExceptionDetailComponent, ElderExpandToggleButtonComponent, ElderExpandToggleButtonModule, ElderFileDropZoneDirective, ElderFileModule, ElderFileSelectComponent, ElderFileSelectDirective, ElderFileUploadComponent, ElderFilterChipTemplateComponent, ElderFormFieldControlBase, ElderFormFieldDenseDirective, ElderFormFieldLabelDirective, ElderFormFieldNoHintDirective, ElderFormFieldNoSpinnerDirective, ElderFormsDirectivesModule, ElderFormsModule, ElderFromFieldBase, ElderFromFieldEntityBase, ElderFromFieldMultiEntityBase, ElderGlobalSearchComponent, ElderGlobalSearchModule, ElderGlobalSearchService, ElderGridComponent, ElderGridModule, ElderGridTileDirective, ElderGridToolbarDirective, ElderHeaderComponent, ElderHeaderModule, ElderHttpClient, ElderI18nEntitiesModule, ElderIFrameModule, ElderInfiniteAutocompleteDirective, ElderInfiniteScrollDirective, ElderInfiniteScrollModule, ElderInputPatternDirective, ElderIntervalInputComponent, ElderKeyEventDirective, ElderLabelInputComponent, ElderLabelsModule, ElderLanguageConfig, ElderLanguageInterceptor, ElderLanguageModule, ElderLanguageService, ElderLanguageSwitcherComponent, ElderLocalDateInputComponent, ElderLocalTimeInputComponent, ElderLocalesDeChModule, ElderLocalizedInputComponent, ElderLocalizedInputDialogComponent, ElderLocalizedInputDialogService, ElderLocalizedInputTableComponent, ElderLocalizedTextColumnDirective, ElderLocalizedTextsDirective, ElderMasterActivationDirective, ElderMasterDetailComponent, ElderMasterDetailModule, ElderMasterDetailService, ElderMasterDirective, ElderMaxValidator, ElderMeasuresModule, ElderMinValidator, ElderMultiEntityValueAccessorUtil, ElderMultiSelectAllInitialDirective, ElderMultiSelectBase, ElderMultiSelectChipOptionsComponent, ElderMultiSelectChipsComponent, ElderMultiSelectFormField, ElderMultipleOfUtil, ElderMultipleOfValidator, ElderNavGroupComponent, ElderNavLinkComponent, ElderNavListComponent, ElderNavModule, ElderNextFocusableDirective, ElderNumberCellDirective, ElderOfflineIndicatorComponent, ElderOverlayComponent, ElderOverlayModule, ElderOverlayOriginDirective, ElderOverlayRef, ElderOverlayTriggerDirective, ElderPaddingDirective, ElderPanelComponent, ElderPanelModule, ElderPeriodInputComponent, ElderPipesModule, ElderPlugParentFormDirective, ElderProgressBarComponent, ElderProgressBarModule, ElderQuantityFormFieldComponent, ElderQuantityInputControlComponent, ElderQuantityModule, ElderQuantityPipe, ElderQuantityRangeValidator, ElderQuantityService, ElderQuantityTransformPipe, ElderQuestionDialogComponent, ElderRepeatPipe, ElderRepeatPipeLegacy, ElderRequiredDimensionsValidator, ElderRequiredIgnoreZeroValidator, ElderRequiredQuantityValidator, ElderRoundPipe, ElderRouteOutletDrawerService, ElderRouterOutletService, ElderRouterService, ElderSafeUrlPipe, ElderScrollContainerComponent, ElderScrollbarDirective, ElderScrollbarModule, ElderSearchBoxComponent, ElderSearchContextDirective, ElderSearchIncludeExcludeDirective, ElderSearchInputDirective, ElderSearchModule, ElderSearchPanelComponent, ElderSearchUrlDirective, ElderSelectBase, ElderSelectChipAvatarDirective, ElderSelectChipDirective, ElderSelectComponent, ElderSelectComponentState, ElderSelectCustomInputDirective, ElderSelectFormField, ElderSelectModule, ElderSelectOnTabDirective, ElderSelectOptionComponent, ElderSelectValueDirective, ElderSelectionDialogComponent, ElderSelectionDialogDirective, ElderSelectionMasterCheckboxComponent, ElderSelectionPopupTriggerAdapterDirective, ElderShellCenterDirective, ElderShellComponent, ElderShellModule, ElderShellNavigationToggleComponent, ElderShellService, ElderShellSideLeftDirective, ElderShellSideRightDirective, ElderShellSlotDirective, ElderSimpleSelectionViewComponent, ElderSimpleSelectionViewModule, ElderSingleSortComponent, ElderStackCardDirective, ElderStopEventPropagationDirective, ElderSuggestionPanelComponent, ElderSvgViewerComponent, ElderTabDirective, ElderTabFocusTrapDirective, ElderTabGroupRoutingDirective, ElderTabModule, ElderTableActivationDirective, ElderTableComponent, ElderTableExtensionDirective, ElderTableGroup, ElderTableModel, ElderTableModelCdkTableBinding, ElderTableModelQueryGroup, ElderTableModule, ElderTableProviders, ElderTableRootDirective, ElderTableSortDirective, ElderTableToolbarDirective, ElderThemeApplierDirective, ElderThemeDirective, ElderThemeModule, ElderThemePreferenceService, ElderThemeService, ElderThemeToggleComponent, ElderTimeModule, ElderToastModule, ElderToastService, ElderTogglePanelComponent, ElderTogglePanelPrimaryDirective, ElderTogglePanelSecondaryDirective, ElderTogglePanelTriggerDirective, ElderToolbarColumnDirective, ElderToolbarComponent, ElderToolbarContentDirective, ElderToolbarModule, ElderToolbarService, ElderToolbarTitleComponent, ElderToolbarTitleService, ElderTouchedDirective, ElderTrimPipe, ElderTripleStateCheckboxDirective, ElderTruncatePipe, ElderUnitSelectDirective, ElderUnitService, ElderUrlFragment, ElderUrlFragmentModule, ElderUrlFragmentParamsService, ElderUrlFragmentSwitcherComponent, ElderValidationErrorDirective, ElderViewersModule, EntitySetPatch, ErrorUtil, ExceptionDetailCtx, FileEntry, FileListingRx, FileUploadClient, Filter, FilterContext, FilterUtil, FocusUtil, FormFieldBaseComponent, GlobalDragDropService, HttpClientBuilder, HttpClientPristine, HttpDataTransfer, HttpDataTransferAggregateComponent, HttpDataTransferComponent, HttpDataTransferIndicatorComponent, HttpDataTransferOverviewComponent, HttpParamsBuilder, I18nBase, I18nPickAsyncPipe, I18nPickPipe, I18nText, IFrameState, IframeCloseDirective, IframeDialogComponent, IframeHostComponent, IframeService, IframeSideContentComponent, IncludeExcludeSelectionModel, IncludeExcludeState, IncludeExcludeValue, IndexedEntities, InternalRestClientConfig, Interval, IsoDurationPipe, IsoIntervalFormatUtil, IsoIntervalParsePipe, IsoIntervalPipe, ItemActivationEvent, ItemActivationOptions, JsonMapUtil, KafentConfig, KafentEvent, KafentEventService, KafentEventStream, KafentEventStreamDisabled, KafentEventStreamSse, KafentEventTransport, KafentModule, KafentSseEventChannel, KafentTokenProvider, KafentTokenProviderSessionStorage, KafentTopicSse, KnownElderThemes, KnownLocaleTags, LocalListDataSource, LocalPagedDataSource, LocalisationPickerService, MasterDetailActivationEvent, MasterSelectionState, MatTableDataContextBinding, MatTableDataContextBindingBuilder, MultiModelBaseComponent, NextNumberUtil, Objects, OnlineStatus, Page, PageRequest, Pageable, ParseUtil, Path, PathNode, PeriodBucket, PeriodDuration, PeriodFormat, ProcessIterationContext, ProcessState, PropertyPathUtil, Quantity, QueryListBinding, QuestionDialogConfig, ReactiveEventSource, ReactiveEventSourceState, ReactiveFetchEventSource, ReactiveFetchEventSourceService, ReactiveMap, ReactiveSSeMessage, RefreshingEntity, RestClient, RestClientConfig, RestClientContinuable, RestClientList, RestClientPaged, SearchQuery, SelectChipSpecUtil, SelectOptionChipSpecUtil, SelectionModel, SelectionModelPopupDirective, Sets, SimpleLocalisationPicker, Sort, SortOption, SortUtil, StandardToastComponent, SubBar, SuggestionProvider, TemplateCompositeControl, TemplatedSelectionDialogComponent, ThemeSpec, TimeAgoPipe, TimeDurationPipe, TimeUtil, ToIsoDateStringPipe, ToastType, TokenChunkRequest, ToolbarHeader, Translated, TranslatedConverter, TranslatedEnumValue, TranslatedText, TypedEventMessage, Unit, UnitDimension, UnitDimensionInfo, UnitInfo, UnitRegistry, UrlBuilder, UrlQueryParams, UuidUtil, ValueAccessorBase, ValueWrapper, ViewProviders, WeightPipe, alphaNumStringComparator, buildFormIntegrationProviders, coerceInterval, coerceIntervalIsoStr, createDataOptionsProvider, createSelectionModel, existingOrNewElderTableModel, initSearchUrlService, isActivePagedDataContext, isContinuableDataContext, isContinuableDataSource, isDataContext, isDataSource, isDataViewMessageType, isElderEntityValueAccessor, isElderMultiEntityValueAccessor, isListDataSource, isPagedDataSource, lazySample, lazySampleTime, naturalValueComparator, newElderTableModel, proxyControlContainer, registerLocale, runInZone, themeInit };
33329
33421
  //# sourceMappingURL=elderbyte-ngx-starter.mjs.map