@elderbyte/ngx-starter 17.11.0-beta5 → 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 +8 -8
  7. package/esm2022/lib/components/select/filter/elder-chip-filter-style-resolver.mjs +15 -11
  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 +20 -6
  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 +22 -12
  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 +674 -616
  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 +3 -3
  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} +12 -8
  24. package/lib/components/select/filter/elder-filter-chip-template/elder-filter-chip-template.component.d.ts +6 -0
  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 +6 -1
  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 -102
  32. package/lib/components/forms/search/filter/include-exclude-input-converter.d.ts +0 -62
@@ -5,7 +5,7 @@ import { Pipe, LOCALE_ID, Inject, NgModule, Optional, SkipSelf, Directive, Outpu
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 *
@@ -23287,15 +23292,29 @@ class ElderFilterChipTemplateComponent {
23287
23292
  get avatarRef$() {
23288
23293
  return this._avatarRef$.asObservable();
23289
23294
  }
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
+ }
23308
+ }
23290
23309
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderFilterChipTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23291
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.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: ["avatar"], descendants: true }], ngImport: i0, template: "<ng-template #avatar let-chipModel>\n @if(avatarResolverFn(); 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: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
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 }); }
23292
23311
  }
23293
23312
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderFilterChipTemplateComponent, decorators: [{
23294
23313
  type: Component,
23295
- args: [{ selector: 'elder-filter-chip-template', standalone: true, imports: [AsyncPipe, MatIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #avatar let-chipModel>\n @if(avatarResolverFn(); 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
+ 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"] }]
23296
23315
  }], propDecorators: { avatarRef: [{
23297
23316
  type: ViewChild,
23298
- args: ['avatar']
23317
+ args: [ElderSelectChipAvatarDirective, { read: TemplateRef, static: true }]
23299
23318
  }] } });
23300
23319
 
23301
23320
  class IncludeExcludeState {
@@ -23323,6 +23342,7 @@ class IncludeExcludeSelectionModel {
23323
23342
  * *
23324
23343
  **************************************************************************/
23325
23344
  this.log = LoggerFactory.getLogger(this.constructor.name);
23345
+ this._defaultInitialValue = IncludeExcludeValue.INCLUDE;
23326
23346
  this.stateById$ = new BehaviorSubject(new Map());
23327
23347
  if (!strategy)
23328
23348
  throw new Error('strategy is required!');
@@ -23345,11 +23365,27 @@ class IncludeExcludeSelectionModel {
23345
23365
  set strategy(strategy) {
23346
23366
  this._strategy = strategy;
23347
23367
  }
23368
+ get defaultInitialValue() {
23369
+ return this._defaultInitialValue;
23370
+ }
23371
+ set defaultInitialValue(strategy) {
23372
+ this._defaultInitialValue = strategy;
23373
+ }
23348
23374
  /***************************************************************************
23349
23375
  * *
23350
23376
  * Public API *
23351
23377
  * *
23352
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
+ }
23353
23389
  cycleExisting(id) {
23354
23390
  const existingState = this.findStateById(id);
23355
23391
  if (existingState) {
@@ -23367,11 +23403,14 @@ class IncludeExcludeSelectionModel {
23367
23403
  newStates.set(id, current.get(id));
23368
23404
  }
23369
23405
  else {
23370
- newStates.set(id, new IncludeExcludeState(id, initialValueOverride ?? this.initialValueByStrategy()));
23406
+ newStates.set(id, new IncludeExcludeState(id, initialValueOverride ?? this.defaultInitialValue));
23371
23407
  }
23372
23408
  });
23373
23409
  this.stateById$.next(newStates);
23374
23410
  }
23411
+ clear() {
23412
+ this.replaceSelection([]);
23413
+ }
23375
23414
  replaceSelection(newStates) {
23376
23415
  this.stateById$.next(this.toStateMap(newStates));
23377
23416
  }
@@ -23400,16 +23439,6 @@ class IncludeExcludeSelectionModel {
23400
23439
  * Private methods *
23401
23440
  * *
23402
23441
  **************************************************************************/
23403
- initialValueByStrategy() {
23404
- switch (this._strategy) {
23405
- case 'FULL_CYCLE':
23406
- return IncludeExcludeValue.NEUTRAL;
23407
- case 'TOGGLE':
23408
- return IncludeExcludeValue.INCLUDE;
23409
- default:
23410
- throw new Error('Unsupported cycle strategy: ' + this._strategy);
23411
- }
23412
- }
23413
23442
  nextValueByStrategy(current) {
23414
23443
  switch (this._strategy) {
23415
23444
  case 'FULL_CYCLE':
@@ -23503,27 +23532,165 @@ class ElderChipFilterStyleResolver {
23503
23532
  return this.neutralChipSpec;
23504
23533
  }
23505
23534
  }
23535
+ return this.neutralChipSpec;
23506
23536
  }
23507
- resolveAvatar(filterEntity) {
23508
- switch (filterEntity.mode) {
23509
- case IncludeExcludeValue.NEUTRAL:
23510
- return 'radio_button_unchecked';
23511
- case IncludeExcludeValue.INCLUDE:
23512
- return 'task_alt';
23513
- case IncludeExcludeValue.EXCLUDE:
23514
- return 'block';
23515
- default:
23516
- 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
+ }
23517
23549
  }
23550
+ return 'help_outline';
23518
23551
  }
23519
23552
  }
23520
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
+
23521
23688
  /**
23522
23689
  * Immutable representation of the state of an search input
23523
23690
  */
23524
23691
  class SearchInputState {
23525
- static of(attribute, filters, pristine, userEvent) {
23526
- return new SearchInputState(attribute, filters, pristine, userEvent);
23692
+ static of(queryKey, filters, pristine, userEvent) {
23693
+ return new SearchInputState(queryKey, filters, pristine, userEvent);
23527
23694
  }
23528
23695
  static unknown() {
23529
23696
  return new SearchInputState(null, [], true, false);
@@ -23537,7 +23704,7 @@ class SearchInputState {
23537
23704
  /**
23538
23705
  * attribute The name
23539
23706
  */
23540
- attribute,
23707
+ queryKey,
23541
23708
  /**
23542
23709
  * value of the input
23543
23710
  */
@@ -23550,7 +23717,7 @@ class SearchInputState {
23550
23717
  * Was the input changed by a user interaction
23551
23718
  */
23552
23719
  userEvent) {
23553
- this.attribute = attribute;
23720
+ this.queryKey = queryKey;
23554
23721
  this.filters = filters;
23555
23722
  this.pristine = pristine;
23556
23723
  this.userEvent = userEvent;
@@ -23601,127 +23768,90 @@ class SearchInputState {
23601
23768
  pristineNow = pristine;
23602
23769
  }
23603
23770
  }
23604
- return SearchInputState.of(this.attribute, [filter], pristineNow, true);
23771
+ return SearchInputState.of(this.queryKey, [filter], pristineNow, true);
23605
23772
  }
23606
23773
  }
23607
23774
 
23608
- /**
23609
- * Search name adapter for input controls.
23610
- */
23611
- class ElderInitialValueDirective {
23612
- /***************************************************************************
23613
- * *
23614
- * Constructor *
23615
- * *
23616
- **************************************************************************/
23617
- constructor(ngModel) {
23618
- //TODO: The debounce time is a hacky workaround, find a proper way to set initial value.
23619
- // ngModel regular and two way binding differ in initial value, which led to this solution
23620
- this.ngModel = ngModel;
23621
- /***************************************************************************
23622
- * *
23623
- * Fields *
23624
- * *
23625
- **************************************************************************/
23626
- this.log = LoggerFactory.getLogger(this.constructor.name);
23627
- this.initialValue$ = new BehaviorSubject(null);
23628
- this.destroy$ = new Subject();
23629
- this._initialDone$ = new Subject();
23630
- const ngModelValue$ = of('dummy')
23631
- .pipe(delay(10), map(() => this.ngModel.model));
23632
- ngModelValue$
23633
- .pipe(combineLatestWith$1(this.initialValue$), takeUntil(this._initialDone$), takeUntil(this.destroy$)).subscribe(([ngModelValue, initialValue]) => {
23634
- if (initialValue) {
23635
- ngModel.control.setValue(initialValue);
23636
- }
23637
- this._initialDone$.next();
23638
- this._initialDone$.complete();
23639
- });
23775
+ /***************************************************************************
23776
+ * *
23777
+ * Common functions *
23778
+ * *
23779
+ **************************************************************************/
23780
+ class FilterCommons {
23781
+ static isArrayAndNotEmpty(value) {
23782
+ return this.isArray(value) && this.isNotEmptyArray(value);
23640
23783
  }
23641
- /***************************************************************************
23642
- * *
23643
- * Life Cycle *
23644
- * *
23645
- **************************************************************************/
23646
- /***************************************************************************
23647
- * *
23648
- * Properties *
23649
- * *
23650
- **************************************************************************/
23651
- get initialDone$() {
23652
- return this._initialDone$.asObservable();
23784
+ static isArray(value) {
23785
+ return value !== null && Array.isArray(value);
23653
23786
  }
23654
- get valueChanges$() {
23655
- return this.ngModel.control.valueChanges
23656
- .pipe(takeUntil(this.destroy$));
23787
+ static isNotEmptyArray(value) {
23788
+ return value.length > 0;
23657
23789
  }
23658
- setValue(value) {
23659
- if (value) {
23660
- this.ngModel.control.setValue(value);
23790
+ static getValuesIfArrayElseEmpty(value) {
23791
+ if (this.isArray(value)) {
23792
+ return value;
23661
23793
  }
23662
- this.initialValue$.next(value);
23663
- }
23664
- ngOnDestroy() {
23665
- this.destroy$.next();
23666
- this.destroy$.complete();
23794
+ return [];
23667
23795
  }
23668
- 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 }); }
23669
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: ElderInitialValueDirective, isStandalone: true, selector: "[elderInitialValue]", exportAs: ["elderInitialValue"], ngImport: i0 }); }
23670
23796
  }
23671
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderInitialValueDirective, decorators: [{
23672
- type: Directive,
23673
- args: [{
23674
- selector: '[elderInitialValue]',
23675
- exportAs: 'elderInitialValue',
23676
- standalone: true
23677
- }]
23678
- }], ctorParameters: () => [{ type: i3.NgModel, decorators: [{
23679
- type: Host
23680
- }] }] });
23681
23797
 
23682
- class DefaultInputFilterConverter {
23683
- /***************************************************************************
23684
- * *
23685
- * Static Builders *
23686
- * *
23687
- **************************************************************************/
23688
- static of(queryKeyProviderFn) {
23689
- return new DefaultInputFilterConverter(queryKeyProviderFn);
23690
- }
23798
+ class IncludeExcludeModelFilterAdapter {
23691
23799
  /***************************************************************************
23692
23800
  * *
23693
23801
  * Constructors *
23694
23802
  * *
23695
23803
  **************************************************************************/
23696
- constructor(queryKeyProviderFn) {
23697
- this.queryKeyProviderFn = queryKeyProviderFn;
23804
+ constructor(includeExcludeModel, includeQueryKey, excludeQueryKey) {
23805
+ this.includeExcludeModel = includeExcludeModel;
23806
+ this.includeQueryKey = includeQueryKey;
23807
+ this.excludeQueryKey = excludeQueryKey;
23698
23808
  }
23699
23809
  /***************************************************************************
23700
23810
  * *
23701
23811
  * Public API *
23702
23812
  * *
23703
23813
  **************************************************************************/
23704
- 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();
23705
23826
  return [
23706
- new Filter(this.queryKey(), inputValue)
23827
+ new Filter(this.includeQueryKey, this.nonEmptyArrayOrNull(includedIds)),
23828
+ new Filter(this.excludeQueryKey, this.nonEmptyArrayOrNull(excludedIds))
23707
23829
  ];
23708
23830
  }
23709
- convertToValue(filters) {
23710
- const queryKey = this.queryKey();
23711
- for (const filter of filters) {
23712
- if (filter.key === queryKey) {
23713
- return filter.value;
23714
- }
23715
- }
23716
- return null;
23717
- }
23718
23831
  /***************************************************************************
23719
23832
  * *
23720
23833
  * Private methods *
23721
23834
  * *
23722
23835
  **************************************************************************/
23723
- queryKey() {
23724
- 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;
23725
23855
  }
23726
23856
  }
23727
23857
 
@@ -23936,7 +24066,7 @@ class ElderSearchContextDirective {
23936
24066
  /**
23937
24067
  * Returns the current user touched attributes. (ignoring fallbacks)
23938
24068
  */
23939
- get userDefinedAttributes$() {
24069
+ get touchedSearchInputs$() {
23940
24070
  return this.states$.pipe(map(states => states
23941
24071
  .filter(s => !s.pristine)
23942
24072
  .filter(s => !s.hasFallbackValue)));
@@ -23953,7 +24083,7 @@ class ElderSearchContextDirective {
23953
24083
  if (this.initialFiltersRegistered) {
23954
24084
  searchInput.applyFilters(this.initialFilters);
23955
24085
  }
23956
- this.log.debug('Registering search input [' + searchInput.name + '].');
24086
+ this.log.debug('Registering search input [' + searchInput.queryKey + '].');
23957
24087
  this._searchInputs$.next([
23958
24088
  ...this.searchInputs(),
23959
24089
  searchInput
@@ -24019,17 +24149,17 @@ class ElderSearchContextDirective {
24019
24149
  this.applyFiltersToInputs(mergedFilters);
24020
24150
  }
24021
24151
  applyFiltersToInputs(filters) {
24022
- this.saveInitialFitlers(filters);
24152
+ this.saveInitialFilters(filters);
24023
24153
  if (filters.length > 0) {
24024
- const inputsByName = this.searchInputsByName();
24025
- this.log.warn('applyFiltersToInputs [' + Array.from(inputsByName.keys()) + ']', {
24154
+ const inputsByKey = this.searchInputsByQueryKey();
24155
+ this.log.warn('applyFiltersToInputs [' + Array.from(inputsByKey.keys()) + ']', {
24026
24156
  filters: filters,
24027
- inputsByName: inputsByName
24157
+ inputsByQueryKey: inputsByKey
24028
24158
  });
24029
24159
  this.searchInputs().forEach(searchInput => searchInput.applyFilters(filters));
24030
24160
  }
24031
24161
  }
24032
- saveInitialFitlers(filters) {
24162
+ saveInitialFilters(filters) {
24033
24163
  this.initialFiltersRegistered = true;
24034
24164
  this.initialFilters.push(...filters);
24035
24165
  }
@@ -24038,10 +24168,10 @@ class ElderSearchContextDirective {
24038
24168
  filters.forEach(filter => map.set(filter.key, filter));
24039
24169
  return map;
24040
24170
  }
24041
- searchInputsByName() {
24171
+ searchInputsByQueryKey() {
24042
24172
  const inputs = this._searchInputs$.getValue();
24043
24173
  const map = new Map();
24044
- inputs.forEach(input => map.set(input.name, input));
24174
+ inputs.forEach(input => map.set(input.queryKey, input));
24045
24175
  return map;
24046
24176
  }
24047
24177
  convertToFilters(states) {
@@ -24070,16 +24200,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
24070
24200
  }] } });
24071
24201
 
24072
24202
  /**
24073
- * Search name adapter for input controls.
24203
+ * Binds a IncludeExcludeModel to a SearchContexts Filter.
24074
24204
  */
24075
- class ElderSearchInputDirective {
24205
+ class ElderSearchIncludeExcludeDirective {
24076
24206
  /***************************************************************************
24077
24207
  * *
24078
24208
  * Constructor *
24079
24209
  * *
24080
24210
  **************************************************************************/
24081
- constructor(searchContext, ngModel) {
24211
+ constructor(searchContext, destroyRef, selectionModel, ngModel) {
24082
24212
  this.searchContext = searchContext;
24213
+ this.destroyRef = destroyRef;
24214
+ this.selectionModel = selectionModel;
24083
24215
  this.ngModel = ngModel;
24084
24216
  /***************************************************************************
24085
24217
  * *
@@ -24088,9 +24220,8 @@ class ElderSearchInputDirective {
24088
24220
  **************************************************************************/
24089
24221
  this.log = LoggerFactory.getLogger(this.constructor.name);
24090
24222
  this._queryKey$ = new BehaviorSubject(null);
24091
- this._inputConverter = DefaultInputFilterConverter.of(() => this.name);
24092
- this.destroy$ = new Subject();
24093
- this._initialValueDirective = new ElderInitialValueDirective(ngModel);
24223
+ this.includeSuffix = '';
24224
+ this.initialDone$ = new Subject();
24094
24225
  this._state$ = this.buildInputStateObservable().pipe(
24095
24226
  // tap(state => this.log.error('EMIT SEARCH INPUT STATE [' + state.queryKey + ']: ' + state.queryValue + (state.pristine ? '(pristine)' : ''), state))
24096
24227
  );
@@ -24103,17 +24234,9 @@ class ElderSearchInputDirective {
24103
24234
  ngOnInit() {
24104
24235
  this._extractedName = this.extractName();
24105
24236
  this.updateQueryKey();
24237
+ this.includeExcludeAdapter = new IncludeExcludeModelFilterAdapter(this.selectionModel, this.queryKey + this.includeSuffix, this.queryKey + this.excludeSuffix);
24106
24238
  this.searchContext.register(this);
24107
24239
  }
24108
- ngAfterViewInit() {
24109
- this._extractedName = this.extractName();
24110
- this.updateQueryKey();
24111
- this.log.debug(this.queryKey + ' | ' + this.resolvePath);
24112
- }
24113
- ngOnDestroy() {
24114
- this.destroy$.next();
24115
- this.destroy$.complete();
24116
- }
24117
24240
  /***************************************************************************
24118
24241
  * *
24119
24242
  * Properties *
@@ -24132,33 +24255,11 @@ class ElderSearchInputDirective {
24132
24255
  get queryKey$() {
24133
24256
  return this._queryKey$;
24134
24257
  }
24135
- set inputConverter(inputConverter) {
24136
- this._inputConverter = inputConverter;
24137
- }
24138
- get initialDone$() {
24139
- return this._initialValueDirective.initialDone$;
24140
- }
24141
24258
  get state$() {
24142
24259
  return this._state$;
24143
24260
  }
24144
- get name() {
24145
- if (this.queryKey) {
24146
- return this.queryKey;
24147
- }
24148
- if (this._extractedName) {
24149
- return this._extractedName;
24150
- }
24151
- throw new Error('Could not determine the search name key name.' +
24152
- ' Either specify the name property or explicitly set [elderSearchInputKey].');
24153
- }
24154
- get value() {
24155
- return this.ngModel.value;
24156
- }
24157
24261
  get readonly() {
24158
- return this.ngModel.isDisabled;
24159
- }
24160
- get hasFallback() {
24161
- return SearchInputState.isValueDefined(this.fallbackValue);
24262
+ return this.ngModel?.isDisabled;
24162
24263
  }
24163
24264
  /***************************************************************************
24164
24265
  * *
@@ -24166,10 +24267,10 @@ class ElderSearchInputDirective {
24166
24267
  * *
24167
24268
  **************************************************************************/
24168
24269
  applyFilters(filters) {
24169
- this.setInputValue(this._inputConverter.convertToValue(filters));
24270
+ this.includeExcludeAdapter.applyFilters(filters);
24170
24271
  }
24171
24272
  reset() {
24172
- this.ngModel.reset();
24273
+ this.selectionModel.replaceSelection([]);
24173
24274
  }
24174
24275
  /***************************************************************************
24175
24276
  * *
@@ -24182,472 +24283,57 @@ class ElderSearchInputDirective {
24182
24283
  this._queryKey$.next(newKey);
24183
24284
  }
24184
24285
  }
24185
- setInputValue(queryString) {
24186
- const value = this.convertQueryStringToRawModelValue(queryString);
24187
- this._initialValueDirective.setValue(value);
24188
- }
24189
- get valueChanges$() {
24190
- return this.ngModel.control.valueChanges
24191
- .pipe(takeUntil(this.destroy$));
24192
- }
24193
24286
  buildInputStateObservable() {
24194
24287
  const viewStabilized$ = of('stabilized$').pipe(delay(20), first());
24195
- 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));
24196
24289
  const startDelayed$ = of('start').pipe(delay(15), map(start => {
24197
- const state = this.buildInputState(this.ngModel.control.value, false);
24198
- return state;
24290
+ return this.buildInputState(false);
24199
24291
  }));
24200
24292
  return concat(startDelayed$, inputStateChanges$);
24201
24293
  }
24202
- buildInputState(controlValue, userEvent) {
24203
- const queryValue = this.convertRawModelValueToQueryString(controlValue);
24204
- const filters = this._inputConverter.convertToFilters(queryValue);
24205
- return new SearchInputState(this.name, filters, this.areAllPristine(filters) || this.isFallbackValue(queryValue), userEvent);
24206
- }
24207
- isFallbackValue(queryValue) {
24208
- if (this.hasFallback) {
24209
- return (this.fallbackValue === queryValue);
24210
- }
24211
- return false;
24294
+ buildInputState(userEvent) {
24295
+ const filters = this.includeExcludeAdapter.toFilters();
24296
+ return new SearchInputState(this.queryKey, filters, this.areAllPristine(filters), userEvent);
24212
24297
  }
24213
24298
  areAllPristine(filters) {
24214
- return filters.every(f => this.isPristine(f));
24215
- }
24216
- isPristine(filter) {
24217
- return !this.isAttributeValuePresent(filter.value);
24218
- }
24219
- convertQueryStringToRawModelValue(queryString) {
24220
- if (Objects.nonNull(queryString)) {
24221
- return queryString;
24222
- }
24223
- return null;
24224
- }
24225
- convertRawModelValueToQueryString(model) {
24226
- let queryValue = null;
24227
- if (this.valueAsId != undefined) {
24228
- queryValue = this.checkAndConvertFaultyValuesToNull(model);
24229
- }
24230
- else if (this.isAttributeValuePresent(model)) {
24231
- // Attribute value is present
24232
- queryValue = this.resolveValue(model);
24299
+ if (filters.length > 0) {
24300
+ return filters.every(f => this.isPristine(f));
24233
24301
  }
24234
24302
  else {
24235
- if (this.hasFallback) {
24236
- queryValue = this.fallbackValue;
24237
- }
24238
- }
24239
- return queryValue;
24240
- }
24241
- checkAndConvertFaultyValuesToNull(value) {
24242
- let fixedValue = value;
24243
- fixedValue = this.convertEmptyArrayToNull(fixedValue);
24244
- fixedValue = this.convertEmptyStringToNull(fixedValue);
24245
- return fixedValue;
24246
- }
24247
- convertEmptyArrayToNull(value) {
24248
- if (value instanceof Array && value.length === 0) {
24249
- return null;
24303
+ return true;
24250
24304
  }
24251
- return value;
24252
24305
  }
24253
- convertEmptyStringToNull(value) {
24254
- if (typeof value === 'string' && value.length === 0) {
24255
- return null;
24256
- }
24257
- return value;
24306
+ isPristine(filter) {
24307
+ return !this.isAttributeValuePresent(filter.value);
24258
24308
  }
24259
24309
  isAttributeValuePresent(value) {
24260
24310
  return SearchInputState.isValueDefined(value)
24261
24311
  && (value + '').length !== 0;
24262
24312
  }
24263
- resolveValue(value) {
24264
- if (Objects.nonNull(value)) {
24265
- if (value instanceof Array) {
24266
- const resolvedValues = value
24267
- .map(v => this.resolveSingleValue(v))
24268
- .filter(v => Objects.nonNull(v));
24269
- return this.concatIfNecessary(resolvedValues);
24270
- }
24271
- else {
24272
- return this.resolveSingleValue(value);
24273
- }
24274
- }
24275
- else {
24276
- return null;
24277
- }
24278
- }
24279
- resolveSingleValue(value) {
24280
- value = PropertyPathUtil.resolveValue(value, this.resolvePath);
24281
- value = this.valueTransform ? this.valueTransform(value) : value;
24282
- if (Objects.nonNull(value)) {
24283
- if (value instanceof Array) {
24284
- return value
24285
- .filter(i => Objects.nonNull(i))
24286
- .map(i => i.toString());
24287
- }
24288
- else {
24289
- return value.toString();
24290
- }
24291
- }
24292
- else {
24293
- return null;
24294
- }
24295
- }
24296
24313
  extractName() {
24297
- return this.ngModel.name;
24298
- }
24299
- concatIfNecessary(values) {
24300
- const arrays = values.map(v => {
24301
- if (v instanceof Array) {
24302
- return v;
24303
- }
24304
- else {
24305
- return [v];
24306
- }
24307
- });
24308
- return CollectionUtil.flatten(arrays);
24314
+ return this.ngModel?.name;
24309
24315
  }
24310
- 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 }); }
24311
- 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 }); }
24312
- }
24313
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchInputDirective, decorators: [{
24314
- type: Directive,
24315
- args: [{
24316
- selector: '[elderSearchInput]',
24317
- exportAs: 'elderSearchInput',
24318
- standalone: true
24319
- }]
24320
- }], ctorParameters: () => [{ type: ElderSearchContextDirective }, { type: i3.NgModel, decorators: [{
24321
- type: Host
24322
- }] }], propDecorators: { valueTransform: [{
24323
- type: Input,
24324
- args: ['elderSearchInputTransform']
24325
- }], resolvePath: [{
24326
- type: Input,
24327
- args: ['elderSearchInput']
24328
- }], dataSource: [{
24329
- type: Input
24330
- }], fallbackValue: [{
24331
- type: Input,
24332
- args: ['elderSearchInputFallback']
24333
- }], valueAsId: [{
24334
- type: Input
24335
- }], queryKey: [{
24336
- type: Input,
24337
- args: ['elderSearchInputKey']
24338
- }] } });
24339
-
24340
- class ElderChipsFilterDirective {
24341
- /***************************************************************************
24342
- * *
24343
- * Constructor *
24344
- * *
24345
- **************************************************************************/
24346
- constructor(elderMultiSelectChips, elderSearchInput, vcr, destroyRef) {
24347
- this.elderMultiSelectChips = elderMultiSelectChips;
24348
- this.elderSearchInput = elderSearchInput;
24349
- this.vcr = vcr;
24350
- this.destroyRef = destroyRef;
24351
- /***************************************************************************
24352
- * *
24353
- * Fields *
24354
- * *
24355
- **************************************************************************/
24356
- this.log = LoggerFactory.getLogger(this.constructor.name);
24357
- this.selectionModel = new IncludeExcludeSelectionModel('FULL_CYCLE');
24358
- this.chipStyleResolver = new ElderChipFilterStyleResolver();
24359
- this.setupFilterChips();
24360
- this.setupElderMultiSelectChipsListeners();
24361
- }
24362
- /***************************************************************************
24363
- * *
24364
- * Properties *
24365
- * *
24366
- **************************************************************************/
24367
- set cycleStrategy(strategy) {
24368
- this.selectionModel.strategy = strategy;
24369
- }
24370
- /***************************************************************************
24371
- * *
24372
- * Private methods *
24373
- * *
24374
- **************************************************************************/
24375
- setupFilterChips() {
24376
- const chipTemplate = this.createFilterChipTemplate();
24377
- this.elderMultiSelectChips.chipSpecFn = (entity) => this.resolveChipSpec(entity);
24378
- chipTemplate.avatarRef$.pipe(takeUntilDestroyed(this.destroyRef), filter((avatarRef) => !!avatarRef), first()).subscribe((avatarRef) => {
24379
- this.elderMultiSelectChips.chipAvatarTemplate = avatarRef;
24380
- });
24381
- }
24382
- createFilterChipTemplate() {
24383
- const ref = this.vcr.createComponent(ElderFilterChipTemplateComponent);
24384
- ref.setInput('avatarResolverFn', (id) => this.resolveAvatar(id));
24385
- return ref.instance;
24386
- }
24387
- setupElderMultiSelectChipsListeners() {
24388
- this.elderMultiSelectChips.currentClicked
24389
- .pipe(takeUntilDestroyed(this.destroyRef))
24390
- .subscribe((entity) => this.handleChipClick(entity));
24391
- this.elderMultiSelectChips.entityIds$.pipe(takeUntilDestroyed(this.destroyRef), skipUntil(this.elderSearchInput.initialDone$), startWith(this.elderMultiSelectChips.entityIds), filter(entityIds => !!entityIds)).subscribe(entityIds => {
24392
- this.selectionModel.initTo(entityIds);
24393
- });
24394
- }
24395
- resolveChipSpec(entity) {
24396
- return this.chipStyleResolver.resolveChipSpec(this.findFilterEntityByEntity(entity));
24397
- }
24398
- resolveAvatar(id) {
24399
- return this.chipStyleResolver.resolveAvatar(this.findFilterEntityById(id));
24400
- }
24401
- handleChipClick(entity) {
24402
- const entityId = this.elderMultiSelectChips.getEntityId(entity);
24403
- const newState = this.selectionModel.cycleExisting(entityId);
24404
- if (newState) {
24405
- this.elderMultiSelectChips.appendEntities([]); // TODO Why??
24406
- }
24407
- else {
24408
- this.log.warn('The entity id "' + entityId + '" is not in the selection');
24409
- }
24410
- }
24411
- findFilterEntityByEntity(entity) {
24412
- const searchedId = this.elderMultiSelectChips.getEntityId(entity);
24413
- return this.findFilterEntityById(searchedId);
24414
- }
24415
- findFilterEntityById(id) {
24416
- return this.selectionModel.findStateById(id);
24417
- }
24418
- 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 }); }
24419
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: ElderChipsFilterDirective, isStandalone: true, selector: "[elderChipsFilter]", inputs: { cycleStrategy: "cycleStrategy" }, ngImport: i0 }); }
24420
- }
24421
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderChipsFilterDirective, decorators: [{
24422
- type: Directive,
24423
- args: [{
24424
- selector: '[elderChipsFilter]',
24425
- standalone: true
24426
- }]
24427
- }], ctorParameters: () => [{ type: ElderMultiSelectChipsComponent }, { type: ElderSearchInputDirective }, { type: i0.ViewContainerRef }, { type: i0.DestroyRef }], propDecorators: { cycleStrategy: [{
24428
- type: Input
24429
- }] } });
24430
-
24431
- /***************************************************************************
24432
- * *
24433
- * Common functions *
24434
- * *
24435
- **************************************************************************/
24436
- class FilterCommons {
24437
- static isArrayAndNotEmpty(value) {
24438
- return this.isArray(value) && this.isNotEmptyArray(value);
24439
- }
24440
- static isArray(value) {
24441
- return value !== null && Array.isArray(value);
24442
- }
24443
- static isNotEmptyArray(value) {
24444
- return value.length > 0;
24445
- }
24446
- static getValuesIfArrayElseEmpty(value) {
24447
- if (this.isArray(value)) {
24448
- return value;
24449
- }
24450
- return [];
24451
- }
24452
- }
24453
-
24454
- class IncludeExcludeInputConverter {
24455
- /***************************************************************************
24456
- * *
24457
- * Constructors *
24458
- * *
24459
- **************************************************************************/
24460
- constructor(selectionModel, queryKey, includeSuffix, excludeSuffix) {
24461
- this.selectionModel = selectionModel;
24462
- this.queryKey = queryKey;
24463
- this.includeSuffix = includeSuffix;
24464
- this.excludeSuffix = excludeSuffix;
24465
- }
24466
- /***************************************************************************
24467
- * *
24468
- * Public API *
24469
- * *
24470
- **************************************************************************/
24471
- convertToValue(filters) {
24472
- const values = this.convertFiltersToMap(filters);
24473
- const includes = this.buildMergeIncludeValues(values);
24474
- const excludes = this.buildMergeExcludeValues(values);
24475
- this.updateSelectionModel(includes, excludes);
24476
- return this.mergeValues(includes, excludes);
24477
- }
24478
- convertToFilters(inputValue) {
24479
- return this.buildFilters(this.buildSplitIncludeValues(inputValue), this.buildSplitExcludeValues(inputValue));
24480
- }
24481
- /***************************************************************************
24482
- * *
24483
- * Private Properties *
24484
- * *
24485
- **************************************************************************/
24486
- get includeQueryKey() {
24487
- return this.queryKey + this.includeSuffix;
24488
- }
24489
- get excludeQueryKey() {
24490
- return this.queryKey + this.excludeSuffix;
24491
- }
24492
- /***************************************************************************
24493
- * *
24494
- * Private Methods *
24495
- * *
24496
- **************************************************************************/
24497
- findValueOrDefault(values, key) {
24498
- const value = values.get(key);
24499
- return value ? value : null;
24500
- }
24501
- convertFiltersToMap(filters) {
24502
- const map = new Map();
24503
- filters.forEach(filter => map.set(filter.key, filter.value));
24504
- return map;
24505
- }
24506
- flattenFilterValues(values) {
24507
- const nonNullValues = values.filter(value => !!value);
24508
- if (nonNullValues.length > 0) {
24509
- return nonNullValues.flatMap(value => value);
24510
- }
24511
- return null;
24512
- }
24513
- replaceEmptyArrayWithNull(value) {
24514
- return FilterCommons.isArrayAndNotEmpty(value) ? value : null;
24515
- }
24516
- validateArrayAndReturn(value) {
24517
- if (FilterCommons.isArrayAndNotEmpty(value)) {
24518
- return value;
24519
- }
24520
- return null;
24521
- }
24522
- /***************************************************************************
24523
- * *
24524
- * Split *
24525
- * *
24526
- **************************************************************************/
24527
- /**
24528
- * If the filter before split is an empty array, include will be set to empty and exclude to null
24529
- * Else, an empty array will always be set to null
24530
- */
24531
- buildFilters(includeValue, excludeValue) {
24532
- let newIncludeValue = includeValue;
24533
- const newExcludeValue = this.replaceEmptyArrayWithNull(excludeValue);
24534
- if (FilterCommons.isArrayAndNotEmpty(newExcludeValue)) {
24535
- newIncludeValue = this.replaceEmptyArrayWithNull(includeValue);
24536
- }
24537
- return [
24538
- new Filter(this.includeQueryKey, newIncludeValue),
24539
- new Filter(this.excludeQueryKey, newExcludeValue),
24540
- ];
24541
- }
24542
- buildSplitIncludeValues(value) {
24543
- let splitValues = null;
24544
- if (FilterCommons.isArrayAndNotEmpty(value)) {
24545
- const values = FilterCommons.getValuesIfArrayElseEmpty(value);
24546
- splitValues = values.filter(value => this.selectionModel.isInMode(value, IncludeExcludeValue.INCLUDE));
24547
- }
24548
- return this.validateArrayAndReturn(splitValues);
24549
- }
24550
- buildSplitExcludeValues(value) {
24551
- let splitValues = null;
24552
- if (FilterCommons.isArrayAndNotEmpty(value)) {
24553
- const values = FilterCommons.getValuesIfArrayElseEmpty(value);
24554
- splitValues = values
24555
- .filter(value => this.selectionModel.isInMode(value, IncludeExcludeValue.EXCLUDE));
24556
- }
24557
- return this.validateArrayAndReturn(splitValues);
24558
- }
24559
- /***************************************************************************
24560
- * *
24561
- * Merge *
24562
- * *
24563
- **************************************************************************/
24564
- mergeValues(includeValue, excludeValue) {
24565
- return this.flattenFilterValues([includeValue, excludeValue]);
24566
- }
24567
- updateSelectionModel(includeValue, excludeValue) {
24568
- const updates = [
24569
- ...this.buildNewSelectionStates(includeValue, IncludeExcludeValue.INCLUDE),
24570
- ...this.buildNewSelectionStates(excludeValue, IncludeExcludeValue.EXCLUDE),
24571
- ];
24572
- this.selectionModel.updateStates(updates);
24573
- }
24574
- buildNewSelectionStates(values, selection) {
24575
- if (FilterCommons.isArray(values)) {
24576
- return values.map(value => new IncludeExcludeState(value, selection));
24577
- }
24578
- return [];
24579
- }
24580
- buildMergeIncludeValues(values) {
24581
- return this.validateArrayAndReturn(this.findValueOrDefault(values, this.includeQueryKey));
24582
- }
24583
- buildMergeExcludeValues(values) {
24584
- return this.validateArrayAndReturn(this.findValueOrDefault(values, this.excludeQueryKey));
24585
- }
24586
- }
24587
-
24588
- class ElderSearchIncludeExcludeDirective {
24589
- /***************************************************************************
24590
- * *
24591
- * Properties *
24592
- * *
24593
- **************************************************************************/
24594
- set includeSuffix(suffix) {
24595
- this._includeSuffix$.next(suffix);
24596
- }
24597
- set excludeSuffix(suffix) {
24598
- this._excludeSuffix$.next(suffix);
24599
- }
24600
- /***************************************************************************
24601
- * *
24602
- * Constructor *
24603
- * *
24604
- **************************************************************************/
24605
- constructor(elderSearchInput, elderChipsFilter, destroyRef) {
24606
- this.elderSearchInput = elderSearchInput;
24607
- this.elderChipsFilter = elderChipsFilter;
24608
- this.destroyRef = destroyRef;
24609
- /***************************************************************************
24610
- * *
24611
- * Fields *
24612
- * *
24613
- **************************************************************************/
24614
- this._includeSuffix$ = new BehaviorSubject('');
24615
- this._excludeSuffix$ = new BehaviorSubject(null);
24616
- this.setupSearchQueryTransforms();
24617
- }
24618
- /***************************************************************************
24619
- * *
24620
- * Private Methods *
24621
- * *
24622
- **************************************************************************/
24623
- setupSearchQueryTransforms() {
24624
- combineLatest([
24625
- this.elderSearchInput.queryKey$,
24626
- this._includeSuffix$,
24627
- this._excludeSuffix$
24628
- ])
24629
- .pipe(takeUntilDestroyed(this.destroyRef), filter(([queryKey, includeSuffix, excludeSuffix]) => !!queryKey && Objects.nonNull(includeSuffix) && Objects.nonNull(excludeSuffix)))
24630
- .subscribe(([queryKey, includeSuffix, excludeSuffix]) => {
24631
- this.elderSearchInput.inputConverter = this.buildConverter(queryKey, includeSuffix, excludeSuffix);
24632
- });
24633
- }
24634
- buildConverter(queryKey, includeSuffix, excludeSuffix) {
24635
- return new IncludeExcludeInputConverter(this.elderChipsFilter.selectionModel, queryKey, includeSuffix, excludeSuffix);
24636
- }
24637
- 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 }); }
24638
- 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 }); }
24639
24318
  }
24640
24319
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchIncludeExcludeDirective, decorators: [{
24641
24320
  type: Directive,
24642
24321
  args: [{
24643
24322
  selector: '[elderSearchIncludeExclude]',
24323
+ exportAs: 'elderSearchInput',
24644
24324
  standalone: true
24645
24325
  }]
24646
- }], 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: [{
24647
24331
  type: Input
24648
24332
  }], excludeSuffix: [{
24649
24333
  type: Input,
24650
24334
  args: [{ required: true }]
24335
+ }], queryKey: [{
24336
+ type: Input
24651
24337
  }] } });
24652
24338
 
24653
24339
  class ElderSelectModule {
@@ -24682,7 +24368,7 @@ class ElderSelectModule {
24682
24368
  ElderSelectOptionComponent,
24683
24369
  ElderMultiSelectAllInitialDirective,
24684
24370
  ElderAutoSelectSuggestFirstDirective,
24685
- ElderChipsFilterDirective,
24371
+ ElderChipsIncludeExcludeDirective,
24686
24372
  ElderFilterChipTemplateComponent,
24687
24373
  ElderSearchIncludeExcludeDirective], exports: [ElderSelectComponent,
24688
24374
  ElderSelectValueDirective,
@@ -24699,7 +24385,7 @@ class ElderSelectModule {
24699
24385
  ElderSelectOptionComponent,
24700
24386
  ElderMultiSelectAllInitialDirective,
24701
24387
  ElderAutoSelectSuggestFirstDirective,
24702
- ElderChipsFilterDirective,
24388
+ ElderChipsIncludeExcludeDirective,
24703
24389
  ElderFilterChipTemplateComponent,
24704
24390
  ElderSearchIncludeExcludeDirective] }); }
24705
24391
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSelectModule, imports: [CommonModule, FormsModule, ReactiveFormsModule,
@@ -24755,7 +24441,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
24755
24441
  ElderSelectOptionComponent,
24756
24442
  ElderMultiSelectAllInitialDirective,
24757
24443
  ElderAutoSelectSuggestFirstDirective,
24758
- ElderChipsFilterDirective,
24444
+ ElderChipsIncludeExcludeDirective,
24759
24445
  ElderFilterChipTemplateComponent,
24760
24446
  ElderSearchIncludeExcludeDirective
24761
24447
  ],
@@ -24775,9 +24461,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
24775
24461
  ElderSelectOptionComponent,
24776
24462
  ElderMultiSelectAllInitialDirective,
24777
24463
  ElderAutoSelectSuggestFirstDirective,
24778
- ElderChipsFilterDirective,
24464
+ ElderChipsIncludeExcludeDirective,
24779
24465
  ElderFilterChipTemplateComponent,
24780
- ElderSearchIncludeExcludeDirective,
24466
+ ElderSearchIncludeExcludeDirective
24781
24467
  ]
24782
24468
  }]
24783
24469
  }] });
@@ -28228,6 +27914,378 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
28228
27914
  type: Input
28229
27915
  }] } });
28230
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
+
28231
28289
  class ElderSearchPanelComponent {
28232
28290
  constructor() { }
28233
28291
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -28641,7 +28699,7 @@ class ElderSearchBoxComponent {
28641
28699
  this.queryKey = 'query';
28642
28700
  this._dense = false;
28643
28701
  this.autocomplete = 'off';
28644
- this.userFilters$ = searchContextDirective.userDefinedAttributes$.pipe(
28702
+ this.touchedSearchInputs$ = searchContextDirective.touchedSearchInputs$.pipe(
28645
28703
  // tap(attrs => this.logger.error('Attrs', attrs))
28646
28704
  );
28647
28705
  }
@@ -28679,11 +28737,11 @@ class ElderSearchBoxComponent {
28679
28737
  this.searchContextDirective.reset();
28680
28738
  }
28681
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 }); }
28682
- 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 }); }
28683
28741
  }
28684
28742
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ElderSearchBoxComponent, decorators: [{
28685
28743
  type: Component,
28686
- 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"] }]
28687
28745
  }], ctorParameters: () => [{ type: ElderSearchContextDirective }], propDecorators: { search: [{
28688
28746
  type: ViewChild,
28689
28747
  args: ['search']
@@ -33359,5 +33417,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
33359
33417
  * Generated bundle index. Do not edit.
33360
33418
  */
33361
33419
 
33362
- 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, 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 };
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 };
33363
33421
  //# sourceMappingURL=elderbyte-ngx-starter.mjs.map