@ecodev/natural 45.4.2 → 46.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/esm2020/lib/classes/abstract-controller.mjs +2 -2
  2. package/esm2020/lib/classes/abstract-detail.mjs +10 -3
  3. package/esm2020/lib/classes/abstract-list.mjs +1 -1
  4. package/esm2020/lib/classes/abstract-navigable-list.mjs +1 -1
  5. package/esm2020/lib/classes/rxjs.mjs +1 -1
  6. package/esm2020/lib/classes/validators.mjs +2 -2
  7. package/esm2020/lib/modules/avatar/service/avatar.service.mjs +2 -2
  8. package/esm2020/lib/modules/avatar/service/md5.mjs +4 -4
  9. package/esm2020/lib/modules/columns-picker/columns-picker-column.directive.mjs +1 -1
  10. package/esm2020/lib/modules/common/pipes/swiss-date.pipe.mjs +1 -1
  11. package/esm2020/lib/modules/dropdown-components/type-date/type-date.component.mjs +67 -34
  12. package/esm2020/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +4 -4
  13. package/esm2020/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +1 -1
  14. package/esm2020/lib/modules/dropdown-components/type-text/type-text.component.mjs +2 -2
  15. package/esm2020/lib/modules/file/abstract-file.mjs +2 -2
  16. package/esm2020/lib/modules/file/component/file.component.mjs +32 -24
  17. package/esm2020/lib/modules/file/file-drop.directive.mjs +1 -1
  18. package/esm2020/lib/modules/file/file-select.directive.mjs +1 -1
  19. package/esm2020/lib/modules/fixed-button/fixed-button.component.mjs +2 -2
  20. package/esm2020/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.mjs +1 -1
  21. package/esm2020/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +1 -1
  22. package/esm2020/lib/modules/logger/error-handler.mjs +1 -1
  23. package/esm2020/lib/modules/panels/fallback-if-no-opened-panels.urlmatcher.mjs +2 -2
  24. package/esm2020/lib/modules/panels/panels.service.mjs +2 -2
  25. package/esm2020/lib/modules/panels/types.mjs +1 -1
  26. package/esm2020/lib/modules/relations/relations.component.mjs +2 -2
  27. package/esm2020/lib/modules/search/classes/graphql-doctrine.mjs +11 -5
  28. package/esm2020/lib/modules/search/classes/transformers.mjs +51 -1
  29. package/esm2020/lib/modules/search/input/input.component.mjs +4 -4
  30. package/esm2020/lib/modules/search/public-api.mjs +2 -2
  31. package/esm2020/lib/modules/search/search/search.component.mjs +2 -2
  32. package/esm2020/lib/modules/search/types/facet.mjs +1 -1
  33. package/esm2020/lib/modules/search/types/values.mjs +1 -1
  34. package/esm2020/lib/modules/select/abstract-select.component.mjs +2 -2
  35. package/esm2020/lib/modules/select/select/select.component.mjs +1 -1
  36. package/esm2020/lib/modules/select/select-enum/select-enum.component.mjs +1 -2
  37. package/esm2020/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +1 -1
  38. package/esm2020/lib/modules/sidenav/sidenav/sidenav.component.mjs +2 -3
  39. package/esm2020/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +2 -3
  40. package/esm2020/lib/modules/sidenav/sidenav.service.mjs +1 -1
  41. package/esm2020/lib/modules/table-button/table-button.component.mjs +2 -2
  42. package/esm2020/lib/services/abstract-model.service.mjs +8 -1
  43. package/esm2020/lib/services/debounce.service.mjs +1 -1
  44. package/esm2020/lib/services/persistence.service.mjs +4 -2
  45. package/esm2020/lib/services/swiss-parsing-date-adapter.service.mjs +1 -1
  46. package/fesm2015/ecodev-natural.mjs +1299 -1194
  47. package/fesm2015/ecodev-natural.mjs.map +1 -1
  48. package/fesm2020/ecodev-natural.mjs +712 -609
  49. package/fesm2020/ecodev-natural.mjs.map +1 -1
  50. package/lib/classes/abstract-controller.d.ts +0 -1
  51. package/lib/modules/avatar/service/avatar.service.d.ts +0 -1
  52. package/lib/modules/dropdown-components/type-date/type-date.component.d.ts +6 -2
  53. package/lib/modules/dropdown-components/type-date-range/type-date-range.component.d.ts +1 -1
  54. package/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.d.ts +1 -2
  55. package/lib/modules/dropdown-components/type-text/type-text.component.d.ts +2 -2
  56. package/lib/modules/file/abstract-file.d.ts +1 -1
  57. package/lib/modules/file/component/file.component.d.ts +32 -9
  58. package/lib/modules/fixed-button/fixed-button.component.d.ts +0 -1
  59. package/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.d.ts +1 -2
  60. package/lib/modules/panels/types.d.ts +1 -2
  61. package/lib/modules/relations/relations.component.d.ts +2 -2
  62. package/lib/modules/search/classes/transformers.d.ts +15 -0
  63. package/lib/modules/search/input/input.component.d.ts +6 -5
  64. package/lib/modules/search/public-api.d.ts +1 -1
  65. package/lib/modules/search/search/search.component.d.ts +2 -2
  66. package/lib/modules/search/types/facet.d.ts +1 -2
  67. package/lib/modules/search/types/values.d.ts +2 -4
  68. package/lib/modules/select/abstract-select.component.d.ts +2 -2
  69. package/lib/modules/select/select-enum/select-enum.component.d.ts +0 -1
  70. package/lib/modules/sidenav/sidenav/sidenav.component.d.ts +0 -1
  71. package/lib/modules/sidenav/sidenav-content/sidenav-content.component.d.ts +0 -1
  72. package/lib/modules/table-button/table-button.component.d.ts +2 -2
  73. package/lib/services/debounce.service.d.ts +1 -1
  74. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import '@angular/localize/init';
2
2
  import * as i0 from '@angular/core';
3
- import { Directive, Component, Inject, Injectable, HostBinding, HostListener, InjectionToken, Optional, Input, NgModule, EventEmitter, ChangeDetectionStrategy, Output, ContentChildren, Pipe, TemplateRef, ViewEncapsulation, ViewChild, Injector, Self, ContentChild, createEnvironmentInjector, createComponent, PLATFORM_ID, ErrorHandler } from '@angular/core';
4
- import { Subject, BehaviorSubject, of, timer, switchMap as switchMap$1, endWith, last, EMPTY, Observable, first as first$1, combineLatest, catchError, ReplaySubject, debounceTime as debounceTime$1, raceWith, take as take$1, mergeMap, shareReplay as shareReplay$1, forkJoin, map as map$1, merge as merge$1, tap as tap$1, asyncScheduler, takeUntil as takeUntil$1 } from 'rxjs';
3
+ import { Directive, Component, Inject, Injectable, HostBinding, HostListener, InjectionToken, TemplateRef, ViewEncapsulation, ViewChild, Injector, Optional, Input, NgModule, EventEmitter, ChangeDetectionStrategy, Output, ContentChildren, Pipe, Self, ContentChild, createEnvironmentInjector, createComponent, PLATFORM_ID, ErrorHandler } from '@angular/core';
4
+ import { Subject, BehaviorSubject, of, timer, switchMap as switchMap$1, endWith, last, EMPTY, merge as merge$1, Observable, first as first$1, combineLatest, catchError, ReplaySubject, debounceTime as debounceTime$1, raceWith, take as take$1, mergeMap, shareReplay as shareReplay$1, forkJoin, map as map$1, tap as tap$1, asyncScheduler, takeUntil as takeUntil$1 } from 'rxjs';
5
5
  import * as i3 from '@angular/forms';
6
- import { FormGroup, FormArray, Validators, UntypedFormGroup, UntypedFormArray, UntypedFormControl, FormsModule, FormControl, FormControlDirective, FormControlName, ReactiveFormsModule } from '@angular/forms';
6
+ import { FormGroup, FormArray, Validators, UntypedFormGroup, UntypedFormArray, FormControl, UntypedFormControl, FormsModule, FormControlDirective, FormControlName, ReactiveFormsModule } from '@angular/forms';
7
7
  import * as i2$1 from '@angular/router';
8
8
  import { Router, ActivatedRoute, NavigationStart, NavigationEnd, RouterModule, NavigationError, DefaultUrlSerializer } from '@angular/router';
9
9
  import { merge, isObject, isArray, pickBy, isEmpty, cloneDeep, uniq, groupBy, mergeWith, defaultsDeep, omit, kebabCase, clone, pick, isEqual, defaults, intersection, flatten, differenceWith } from 'lodash-es';
@@ -14,53 +14,53 @@ import { MatButtonModule } from '@angular/material/button';
14
14
  import * as i2 from '@angular/material/snack-bar';
15
15
  import { MatSnackBarModule } from '@angular/material/snack-bar';
16
16
  import { switchMap, first, map, filter, finalize, takeUntil, take, tap, takeWhile, debounceTime, shareReplay, startWith, distinctUntilChanged, throttleTime } from 'rxjs/operators';
17
- import * as i7$2 from '@angular/material/table';
17
+ import * as i7$3 from '@angular/material/table';
18
18
  import { MatTableDataSource, MatTableModule } from '@angular/material/table';
19
19
  import { DataSource, SelectionModel } from '@angular/cdk/collections';
20
- import * as i1$1 from 'apollo-angular';
20
+ import * as i1$4 from '@angular/material/core';
21
+ import { MAT_DATE_FORMATS, NativeDateAdapter, ErrorStateMatcher, MatRipple, MatRippleModule } from '@angular/material/core';
22
+ import * as i1$3 from '@angular/cdk/overlay';
23
+ import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
24
+ import * as i4$1 from '@angular/cdk/portal';
25
+ import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, PortalModule } from '@angular/cdk/portal';
26
+ import { trigger, state, style, transition, sequence, query, animate, group } from '@angular/animations';
27
+ import * as i1$1 from '@angular/cdk/a11y';
28
+ import * as i1$2 from '@angular/common';
29
+ import { CommonModule, DatePipe, DOCUMENT, isPlatformBrowser } from '@angular/common';
30
+ import * as i4$2 from '@angular/material/form-field';
31
+ import { MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
32
+ import * as i5 from '@angular/material/input';
33
+ import { MatInputModule } from '@angular/material/input';
34
+ import * as i6 from '@angular/material/checkbox';
35
+ import { MatCheckboxModule } from '@angular/material/checkbox';
36
+ import * as i7 from '@angular/material/datepicker';
37
+ import { MatDatepickerModule } from '@angular/material/datepicker';
38
+ import * as i4$3 from '@angular/material/select';
39
+ import { MatSelectModule } from '@angular/material/select';
40
+ import * as i1$5 from 'apollo-angular';
21
41
  import { gql } from 'apollo-angular';
22
42
  import { NetworkStatus } from '@apollo/client/core';
23
- import * as i1$7 from '@angular/material/core';
24
- import { NativeDateAdapter, ErrorStateMatcher, MatRipple, MAT_DATE_FORMATS, MatRippleModule } from '@angular/material/core';
25
- import * as i1$3 from '@angular/common';
26
- import { CommonModule, DatePipe, DOCUMENT, isPlatformBrowser } from '@angular/common';
27
43
  import * as i3$1 from '@angular/material/menu';
28
44
  import { MatMenuModule } from '@angular/material/menu';
29
- import * as i5 from '@angular/material/checkbox';
30
- import { MatCheckboxModule } from '@angular/material/checkbox';
31
- import * as i1$2 from '@angular/material/icon';
45
+ import * as i1$6 from '@angular/material/icon';
32
46
  import { MatIconModule } from '@angular/material/icon';
33
47
  import * as i2$2 from '@angular/platform-browser';
34
- import * as i7 from '@angular/material/tooltip';
48
+ import * as i7$1 from '@angular/material/tooltip';
35
49
  import { MatTooltipModule } from '@angular/material/tooltip';
36
- import * as i1$4 from '@angular/material/tabs';
37
- import * as i4$2 from '@angular/material/form-field';
38
- import { MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
39
- import * as i5$1 from '@angular/material/input';
40
- import { MatInputModule } from '@angular/material/input';
41
- import * as i4$4 from '@angular/material/select';
42
- import { MatSelectModule } from '@angular/material/select';
43
- import * as i4$3 from '@angular/material/list';
50
+ import * as i1$7 from '@angular/material/tabs';
51
+ import * as i4$4 from '@angular/material/list';
44
52
  import { MatSelectionList, MatListModule } from '@angular/material/list';
45
- import * as i1$6 from '@angular/cdk/overlay';
46
- import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
47
- import * as i4$1 from '@angular/cdk/portal';
48
- import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, PortalModule } from '@angular/cdk/portal';
49
- import { trigger, state, style, transition, sequence, query, animate, group } from '@angular/animations';
50
- import * as i1$5 from '@angular/cdk/a11y';
51
53
  import * as i2$3 from '@angular/material/autocomplete';
52
54
  import { MatAutocompleteTrigger, MatAutocompleteModule } from '@angular/material/autocomplete';
53
55
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
54
- import * as i7$1 from '@angular/material/progress-spinner';
56
+ import * as i7$2 from '@angular/material/progress-spinner';
55
57
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
56
58
  import { FlatTreeControl, CdkTreeModule } from '@angular/cdk/tree';
57
- import * as i5$2 from '@angular/material/tree';
59
+ import * as i5$1 from '@angular/material/tree';
58
60
  import { MatTreeFlattener, MatTreeFlatDataSource, MatTreeModule } from '@angular/material/tree';
59
61
  import * as i8 from '@angular/material/chips';
60
62
  import { MatChipsModule } from '@angular/material/chips';
61
63
  import * as i3$2 from '@angular/material/divider';
62
- import * as i6 from '@angular/material/datepicker';
63
- import { MatDatepickerModule } from '@angular/material/datepicker';
64
64
  import * as i3$3 from '@angular/flex-layout';
65
65
  import * as i9 from '@angular/material/paginator';
66
66
  import { MatPaginatorModule } from '@angular/material/paginator';
@@ -94,7 +94,7 @@ NaturalAbstractController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0"
94
94
  NaturalAbstractController.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.1", type: NaturalAbstractController, ngImport: i0 });
95
95
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalAbstractController, decorators: [{
96
96
  type: Directive
97
- }], ctorParameters: function () { return []; } });
97
+ }] });
98
98
 
99
99
  class NaturalConfirmComponent {
100
100
  constructor(data) {
@@ -2188,7 +2188,7 @@ function ifValid(control) {
2188
2188
  // - is too lax because it accepts pretty much anything else
2189
2189
  //
2190
2190
  // but the TLD will be validated against a whitelist so that should make the whole thing acceptable
2191
- const RFC_5322 = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[^@ ]+\.[^@]+$/u;
2191
+ const RFC_5322 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[^@ ]+\.[^@]+$/u;
2192
2192
  /**
2193
2193
  * Validate an email address according to RFC, and also that it is publicly deliverable (not "root@localhost" or "root@127.0.0.1")
2194
2194
  *
@@ -2386,15 +2386,22 @@ class NaturalAbstractDetail extends NaturalAbstractPanel {
2386
2386
  }), finalize(() => this.form.enable()))
2387
2387
  .subscribe();
2388
2388
  }
2389
- postUpdate(model) { }
2389
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2390
+ postUpdate(model) {
2391
+ // noop
2392
+ }
2390
2393
  /**
2391
2394
  * Returns an observable that will be subscribed to immediately and the
2392
2395
  * redirect navigation will only happen after the observable completes.
2393
2396
  */
2397
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2394
2398
  postCreate(model) {
2395
2399
  return EMPTY;
2396
2400
  }
2397
- preDelete(model) { }
2401
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2402
+ preDelete(model) {
2403
+ // noop
2404
+ }
2398
2405
  initForm() {
2399
2406
  this.form = this.service.getFormGroup(this.data.model);
2400
2407
  }
@@ -2506,23 +2513,580 @@ function getFacetFromSelection(facets, selection) {
2506
2513
  if (!facets) {
2507
2514
  return null;
2508
2515
  }
2509
- return (facets.find(facet => facet.name != null && facet.name === selection.name) ||
2510
- facets.find(facet => facet.field === selection.field) ||
2511
- null);
2512
- }
2513
- /**
2514
- * Deep clone a literal via JSON serializing/unserializing
2515
- *
2516
- * It will **not** work with:
2517
- *
2518
- * - functions (will be removed)
2519
- * - `undefined` (will be removed)
2520
- * - cyclic references (will crash)
2521
- * - objects (will be converted to `{}`)
2522
- */
2523
- function deepClone(obj) {
2524
- return JSON.parse(JSON.stringify(obj));
2516
+ return (facets.find(facet => facet.name != null && facet.name === selection.name) ||
2517
+ facets.find(facet => facet.field === selection.field) ||
2518
+ null);
2519
+ }
2520
+ /**
2521
+ * Deep clone a literal via JSON serializing/unserializing
2522
+ *
2523
+ * It will **not** work with:
2524
+ *
2525
+ * - functions (will be removed)
2526
+ * - `undefined` (will be removed)
2527
+ * - cyclic references (will crash)
2528
+ * - objects (will be converted to `{}`)
2529
+ */
2530
+ function deepClone(obj) {
2531
+ return JSON.parse(JSON.stringify(obj));
2532
+ }
2533
+
2534
+ /**
2535
+ * Wrap the searched value by `%` SQL wildcard
2536
+ *
2537
+ * So:
2538
+ *
2539
+ * {field: 'myFieldName', condition: {like: {value: 'foo'}}}
2540
+ *
2541
+ * will become
2542
+ *
2543
+ * {field: 'myFieldName', condition: {like: {value: '%foo%'}}}
2544
+ */
2545
+ function wrapLike(selection) {
2546
+ if (selection.condition.like) {
2547
+ selection.condition.like.value = '%' + selection.condition.like.value + '%';
2548
+ }
2549
+ return selection;
2550
+ }
2551
+ /**
2552
+ * Replace the operator name (usually "like", "in" or "between") with the
2553
+ * attribute "field" or "name" defined in the configuration
2554
+ *
2555
+ * So:
2556
+ *
2557
+ * {field: 'myFieldName', condition: {in: {values: [1, 2, 3]}}}
2558
+ *
2559
+ * will become
2560
+ *
2561
+ * {field: 'myFieldName', condition: {myFieldName: {values: [1, 2, 3]}}}
2562
+ */
2563
+ function replaceOperatorByField(selection) {
2564
+ return replaceOperatorByAttribute(selection, 'field');
2565
+ }
2566
+ /**
2567
+ * Replace the operator name (usually "like", "in" or "between") with the
2568
+ * field "name" defined in the configuration
2569
+ *
2570
+ * So:
2571
+ *
2572
+ * {field: 'myFieldName', name:'myConfigName', condition: {in: {values: [1, 2, 3]}}}
2573
+ *
2574
+ * will become
2575
+ *
2576
+ * {field: 'myFieldName', name:'myConfigName', condition: {myConfigName: {values: [1, 2, 3]}}}
2577
+ */
2578
+ function replaceOperatorByName(selection) {
2579
+ return replaceOperatorByAttribute(selection, 'name');
2580
+ }
2581
+ function replaceOperatorByAttribute(selection, attribute) {
2582
+ const oldOperator = Object.keys(selection.condition)[0];
2583
+ const attributeValue = selection[attribute];
2584
+ if (!attributeValue) {
2585
+ throw new Error('Attribute cannot be empty. Most likely the configuration was wrong');
2586
+ }
2587
+ selection.condition[attributeValue] = selection.condition[oldOperator];
2588
+ delete selection.condition[oldOperator];
2589
+ return selection;
2590
+ }
2591
+ /**
2592
+ * Replace `"today"` and `"tomorrow"` by their real value right now.
2593
+ *
2594
+ * This transformer is applied automatically and should **not** be part
2595
+ * of Natural public API.
2596
+ *
2597
+ * So:
2598
+ *
2599
+ * {field: 'myFieldName', condition: {greater: {value: 'today'}}}
2600
+ *
2601
+ * will become
2602
+ *
2603
+ * {field: 'myFieldName', condition: {greater: {value: '2023-01-03'}}}
2604
+ */
2605
+ function replaceToday(selection) {
2606
+ const date = new Date();
2607
+ const today = formatIsoDate(date);
2608
+ date.setDate(date.getDate() + 1);
2609
+ const tomorrow = formatIsoDate(date);
2610
+ // Transparently adapt exclusive/inclusive ranges for special "today" value.
2611
+ // Ideally this should be done in `TypeDateComponent`, like it is done for real date values. But unfortunately I
2612
+ // could not find a reasonable way to do that while still being able to reload a coherent GUI without showing
2613
+ // "Demain" somewhere in the GUI. And that is something we want to avoid, we only want to show either "Aujourd'hui"
2614
+ // or a real date. Otherwise, the human would start thinking with "Demain", and it would then need to be properly
2615
+ // supported which over/complexify the code, the GUI and the workflow.
2616
+ const condition = selection.condition;
2617
+ if (Object.keys(condition).length === 1) {
2618
+ if (condition.lessOrEqual?.value === 'today') {
2619
+ delete condition.lessOrEqual;
2620
+ condition.less = { value: 'tomorrow' };
2621
+ }
2622
+ else if (condition.greater?.value === 'today') {
2623
+ delete condition.greater;
2624
+ condition.greaterOrEqual = { value: 'tomorrow' };
2625
+ }
2626
+ }
2627
+ for (const key in condition) {
2628
+ const operator = condition[key];
2629
+ if (operator && 'value' in operator) {
2630
+ if (operator.value === 'today') {
2631
+ operator.value = today;
2632
+ }
2633
+ else if (operator.value === 'tomorrow') {
2634
+ operator.value = tomorrow;
2635
+ }
2636
+ }
2637
+ }
2638
+ return selection;
2639
+ }
2640
+
2641
+ /**
2642
+ * Animations used by the mat-menu component.
2643
+ * Animation duration and timing values are based on:
2644
+ * https://material.io/guidelines/components/menus.html#menus-usage
2645
+ */
2646
+ const naturalDropdownAnimations = {
2647
+ /**
2648
+ * This animation controls the menu panel's entry and exit from the page.
2649
+ *
2650
+ * When the menu panel is added to the DOM, it scales in and fades in its border.
2651
+ *
2652
+ * When the menu panel is removed from the DOM, it simply fades out after a brief
2653
+ * delay to display the ripple.
2654
+ */
2655
+ transformMenu: trigger('transformMenu', [
2656
+ state('void', style({
2657
+ opacity: 0,
2658
+ // This starts off from 0.01, instead of 0, because there's an issue in the Angular animations
2659
+ // as of 4.2, which causes the animation to be skipped if it starts from 0.
2660
+ transform: 'scale(0.01, 0.01)',
2661
+ })),
2662
+ transition('void => enter', sequence([
2663
+ query('.natural-dropdown-container-content', style({ opacity: 0 })),
2664
+ animate('100ms linear', style({ opacity: 1, transform: 'scale(1, 0.5)' })),
2665
+ group([
2666
+ query('.natural-dropdown-container-content', animate('400ms cubic-bezier(0.55, 0, 0.55, 0.2)', style({ opacity: 1 }))),
2667
+ animate('300ms cubic-bezier(0.25, 0.8, 0.25, 1)', style({ transform: 'scale(1, 1)' })),
2668
+ ]),
2669
+ ])),
2670
+ transition('* => void', animate('150ms 50ms linear', style({ opacity: 0 }))),
2671
+ ]),
2672
+ /**
2673
+ * This animation fades in the background color and content of the menu panel
2674
+ * after its containing element is scaled in.
2675
+ */
2676
+ fadeInItems: trigger('fadeInItems', [
2677
+ // TODO(crisbeto): this is inside the `transformMenu`
2678
+ // now. Remove next time we do breaking changes.
2679
+ state('showing', style({ opacity: 1 })),
2680
+ transition('void => *', [style({ opacity: 0 }), animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')]),
2681
+ ]),
2682
+ };
2683
+
2684
+ function throwMatDialogContentAlreadyAttachedError() {
2685
+ throw Error('Attempting to attach dialog content after content is already attached');
2686
+ }
2687
+ const NATURAL_DROPDOWN_CONTAINER_DATA = new InjectionToken('NaturalDropdownContainerData');
2688
+ class NaturalDropdownContainerComponent extends BasePortalOutlet {
2689
+ constructor(elementRef, focusTrapFactory, data) {
2690
+ super();
2691
+ this.elementRef = elementRef;
2692
+ this.focusTrapFactory = focusTrapFactory;
2693
+ this.data = data;
2694
+ this.closed = new Subject();
2695
+ /** Current state of the panel animation. */
2696
+ this.panelAnimationState = 'void';
2697
+ /** Emits whenever an animation on the menu completes. */
2698
+ this.animationDone = new Subject();
2699
+ this.focusTrap = null;
2700
+ this.elementFocusedBeforeDialogWasOpened = null;
2701
+ }
2702
+ ngOnDestroy() {
2703
+ this.closed.complete();
2704
+ }
2705
+ close() {
2706
+ this.closed.next();
2707
+ }
2708
+ attachTemplatePortal(portal) {
2709
+ return this.portalOutlet.attachTemplatePortal(portal);
2710
+ }
2711
+ attachComponentPortal(portal) {
2712
+ if (this.portalOutlet.hasAttached()) {
2713
+ throwMatDialogContentAlreadyAttachedError();
2714
+ }
2715
+ return this.portalOutlet.attachComponentPortal(portal);
2716
+ }
2717
+ startAnimation() {
2718
+ this.panelAnimationState = 'enter';
2719
+ }
2720
+ onAnimationDone(event) {
2721
+ if (event.toState === 'enter') {
2722
+ this.trapFocus();
2723
+ }
2724
+ else if (event.toState === 'exit') {
2725
+ this.restoreFocus();
2726
+ }
2727
+ this.animationDone.next();
2728
+ }
2729
+ trapFocus() {
2730
+ if (!this.focusTrap) {
2731
+ this.focusTrap = this.focusTrapFactory.create(this.elementRef.nativeElement);
2732
+ }
2733
+ this.focusTrap.focusInitialElementWhenReady();
2734
+ }
2735
+ /** Restores focus to the element that was focused before the dialog opened. */
2736
+ restoreFocus() {
2737
+ const toFocus = this.elementFocusedBeforeDialogWasOpened;
2738
+ // We need the extra check, because IE can set the `activeElement` to null in some cases.
2739
+ if (toFocus && typeof toFocus.focus === 'function') {
2740
+ toFocus.focus();
2741
+ }
2742
+ if (this.focusTrap) {
2743
+ this.focusTrap.destroy();
2744
+ }
2745
+ }
2746
+ }
2747
+ NaturalDropdownContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDropdownContainerComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ConfigurableFocusTrapFactory }, { token: NATURAL_DROPDOWN_CONTAINER_DATA }], target: i0.ɵɵFactoryTarget.Component });
2748
+ NaturalDropdownContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalDropdownContainerComponent, selector: "ng-component", viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n (@transformMenu.done)=\"onAnimationDone($event)\"\n [@transformMenu]=\"panelAnimationState\"\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <div *ngIf=\"data.showValidateButton\" class=\"natural-dropdown-validate-button\">\n <button (click)=\"close()\" color=\"primary\" mat-raised-button i18n>Valider</button>\n </div>\n</div>\n", styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{flex:none;display:flex;flex-direction:row;justify-content:flex-end;margin:5px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], encapsulation: i0.ViewEncapsulation.None });
2749
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDropdownContainerComponent, decorators: [{
2750
+ type: Component,
2751
+ args: [{ encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], template: "<div\n (@transformMenu.done)=\"onAnimationDone($event)\"\n [@transformMenu]=\"panelAnimationState\"\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <div *ngIf=\"data.showValidateButton\" class=\"natural-dropdown-validate-button\">\n <button (click)=\"close()\" color=\"primary\" mat-raised-button i18n>Valider</button>\n </div>\n</div>\n", styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{flex:none;display:flex;flex-direction:row;justify-content:flex-end;margin:5px}\n"] }]
2752
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ConfigurableFocusTrapFactory }, { type: undefined, decorators: [{
2753
+ type: Inject,
2754
+ args: [NATURAL_DROPDOWN_CONTAINER_DATA]
2755
+ }] }]; }, propDecorators: { portalOutlet: [{
2756
+ type: ViewChild,
2757
+ args: [CdkPortalOutlet, { static: true }]
2758
+ }], templateRef: [{
2759
+ type: ViewChild,
2760
+ args: [TemplateRef, { static: true }]
2761
+ }] } });
2762
+
2763
+ class NaturalDropdownRef {
2764
+ constructor(dropdownContainer, component, customProviders, parentInjector, containerRef) {
2765
+ this.dropdownContainer = dropdownContainer;
2766
+ this.closed = new Subject();
2767
+ // Customize injector to allow data and dropdown reference injection in component
2768
+ customProviders.push({ provide: NaturalDropdownRef, useValue: this });
2769
+ const customInjector = Injector.create({ providers: customProviders, parent: parentInjector });
2770
+ // Content (type component given in configuration)
2771
+ const componentPortal = new ComponentPortal(component, undefined, customInjector);
2772
+ const contentRef = containerRef.instance.attachComponentPortal(componentPortal);
2773
+ this.componentInstance = contentRef.instance;
2774
+ }
2775
+ close(result) {
2776
+ this.closed.next(result);
2777
+ this.closed.complete();
2778
+ this.dropdownContainer.close();
2779
+ }
2780
+ }
2781
+
2782
+ const NATURAL_DROPDOWN_DATA = new InjectionToken('NaturalDropdownData');
2783
+ class NaturalDropdownService {
2784
+ constructor(overlay, injector) {
2785
+ this.overlay = overlay;
2786
+ this.injector = injector;
2787
+ }
2788
+ open(component, connectedElement, customProviders, showValidateButton) {
2789
+ // Container data
2790
+ const containerData = {
2791
+ showValidateButton: showValidateButton,
2792
+ };
2793
+ const injectionTokens = [
2794
+ {
2795
+ provide: NATURAL_DROPDOWN_CONTAINER_DATA,
2796
+ useValue: containerData,
2797
+ },
2798
+ ];
2799
+ const containerInjector = Injector.create({ providers: injectionTokens, parent: this.injector });
2800
+ // Container
2801
+ const overlayRef = this.overlay.create(this.getOverlayConfig(connectedElement));
2802
+ const containerPortal = new ComponentPortal(NaturalDropdownContainerComponent, undefined, containerInjector);
2803
+ const containerRef = overlayRef.attach(containerPortal);
2804
+ const dropdownContainer = containerRef.instance;
2805
+ const dropdownRef = new NaturalDropdownRef(dropdownContainer, component, customProviders, this.injector, containerRef);
2806
+ // Start animation that shows menu
2807
+ dropdownContainer.startAnimation();
2808
+ const close = () => {
2809
+ if (dropdownRef.componentInstance.isValid() && dropdownRef.componentInstance.isDirty()) {
2810
+ dropdownRef.close({
2811
+ condition: dropdownRef.componentInstance.getCondition(),
2812
+ });
2813
+ }
2814
+ else {
2815
+ dropdownRef.close();
2816
+ }
2817
+ };
2818
+ // When parent closes, remove overlay from dom and update "return" valu
2819
+ dropdownContainer.closed.subscribe(() => {
2820
+ overlayRef.dispose();
2821
+ close();
2822
+ });
2823
+ // When click on backdrop, validate result.. ?
2824
+ overlayRef
2825
+ .backdropClick()
2826
+ .pipe(takeUntil(dropdownContainer.closed))
2827
+ .subscribe(() => dropdownContainer.close());
2828
+ return dropdownRef;
2829
+ }
2830
+ /**
2831
+ * This method builds the configuration object needed to create the overlay, the OverlayState.
2832
+ */
2833
+ getOverlayConfig(element) {
2834
+ return new OverlayConfig({
2835
+ positionStrategy: this.getPosition(element),
2836
+ hasBackdrop: true,
2837
+ backdropClass: 'cdk-overlay-transparent-backdrop',
2838
+ });
2839
+ }
2840
+ getPosition(element) {
2841
+ return this.overlay
2842
+ .position()
2843
+ .flexibleConnectedTo(element)
2844
+ .withFlexibleDimensions(true)
2845
+ .withViewportMargin(30)
2846
+ .withPush(false)
2847
+ .withPositions([
2848
+ {
2849
+ originX: 'start',
2850
+ originY: 'bottom',
2851
+ overlayX: 'start',
2852
+ overlayY: 'top',
2853
+ offsetY: 10,
2854
+ },
2855
+ ]);
2856
+ }
2857
+ }
2858
+ NaturalDropdownService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDropdownService, deps: [{ token: i1$3.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
2859
+ NaturalDropdownService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDropdownService, providedIn: 'root' });
2860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDropdownService, decorators: [{
2861
+ type: Injectable,
2862
+ args: [{
2863
+ providedIn: 'root',
2864
+ }]
2865
+ }], ctorParameters: function () { return [{ type: i1$3.Overlay }, { type: i0.Injector }]; } });
2866
+
2867
+ const possibleComparableOperators = [
2868
+ {
2869
+ key: 'less',
2870
+ label: '<',
2871
+ },
2872
+ {
2873
+ key: 'lessOrEqual',
2874
+ label: '≤',
2875
+ },
2876
+ {
2877
+ key: 'equal',
2878
+ label: '=',
2879
+ },
2880
+ {
2881
+ key: 'greaterOrEqual',
2882
+ label: '≥',
2883
+ },
2884
+ {
2885
+ key: 'greater',
2886
+ label: '>',
2887
+ },
2888
+ ];
2889
+ const possibleDiscreteOperators = [
2890
+ {
2891
+ key: 'is',
2892
+ label: $localize `est`,
2893
+ },
2894
+ {
2895
+ key: 'isnot',
2896
+ label: $localize `n'est pas`,
2897
+ },
2898
+ {
2899
+ key: 'any',
2900
+ label: $localize `tous`,
2901
+ },
2902
+ {
2903
+ key: 'none',
2904
+ label: $localize `aucun`,
2905
+ },
2906
+ ];
2907
+
2908
+ /**
2909
+ * Get only date, without time and ignoring entirely the timezone
2910
+ */
2911
+ function serialize(dateAdapter, value) {
2912
+ if (!value) {
2913
+ return '';
2914
+ }
2915
+ const y = dateAdapter.getYear(value);
2916
+ const m = dateAdapter.getMonth(value) + 1;
2917
+ const d = dateAdapter.getDate(value);
2918
+ return y + '-' + (m < 10 ? '0' : '') + m + '-' + (d < 10 ? '0' : '') + d;
2919
+ }
2920
+ /**
2921
+ * Min date validator
2922
+ */
2923
+ function dateMin(dateAdapter, min) {
2924
+ return (control) => {
2925
+ if (control.value && dateAdapter.compareDate(control.value, min) < 0) {
2926
+ return { min: true };
2927
+ }
2928
+ return null;
2929
+ };
2930
+ }
2931
+ /**
2932
+ * Max date validator
2933
+ */
2934
+ function dateMax(dateAdapter, max) {
2935
+ return (control) => {
2936
+ if (control.value && dateAdapter.compareDate(control.value, max) > 0) {
2937
+ return { max: true };
2938
+ }
2939
+ return null;
2940
+ };
2941
+ }
2942
+
2943
+ class TypeDateComponent extends NaturalAbstractController {
2944
+ constructor(data, dateAdapter, dateFormats) {
2945
+ super();
2946
+ this.dateAdapter = dateAdapter;
2947
+ this.dateFormats = dateFormats;
2948
+ this.renderedValue = new BehaviorSubject('');
2949
+ this.operatorCtrl = new FormControl('equal', { nonNullable: true });
2950
+ this.valueCtrl = new FormControl(null);
2951
+ this.todayCtrl = new FormControl(false);
2952
+ this.operators = possibleComparableOperators;
2953
+ this.form = new FormGroup({
2954
+ operator: this.operatorCtrl,
2955
+ value: this.valueCtrl,
2956
+ today: this.todayCtrl,
2957
+ });
2958
+ this.defaults = {
2959
+ min: null,
2960
+ max: null,
2961
+ };
2962
+ this.configuration = { ...this.defaults, ...data.configuration };
2963
+ this.todayCtrl.valueChanges.pipe(takeUntil(this.ngUnsubscribe)).subscribe(isToday => {
2964
+ if (isToday) {
2965
+ this.valueCtrl.setValue(this.dateAdapter.today());
2966
+ this.valueCtrl.disable();
2967
+ }
2968
+ else {
2969
+ this.valueCtrl.enable();
2970
+ }
2971
+ });
2972
+ merge$1(this.operatorCtrl.valueChanges, this.valueCtrl.valueChanges, this.todayCtrl.valueChanges)
2973
+ .pipe(takeUntil(this.ngUnsubscribe))
2974
+ .subscribe(() => this.renderedValue.next(this.getRenderedValue()));
2975
+ this.initValidators();
2976
+ this.reloadCondition(data.condition);
2977
+ }
2978
+ getCondition() {
2979
+ if (!this.valueCtrl.value) {
2980
+ return {};
2981
+ }
2982
+ const condition = {};
2983
+ let operator = this.operatorCtrl.value;
2984
+ let date;
2985
+ let dayAfter;
2986
+ if (this.todayCtrl.value) {
2987
+ date = 'today';
2988
+ dayAfter = 'tomorrow';
2989
+ }
2990
+ else {
2991
+ date = serialize(this.dateAdapter, this.valueCtrl.value);
2992
+ dayAfter = serialize(this.dateAdapter, this.getDayAfter(this.valueCtrl.value));
2993
+ }
2994
+ if (operator === 'equal') {
2995
+ condition.greaterOrEqual = { value: date };
2996
+ condition.less = { value: dayAfter };
2997
+ }
2998
+ else {
2999
+ // Transparently adapt exclusive/inclusive ranges
3000
+ if (date !== 'today') {
3001
+ if (operator === 'greater') {
3002
+ operator = 'greaterOrEqual';
3003
+ date = dayAfter;
3004
+ }
3005
+ else if (operator === 'lessOrEqual') {
3006
+ operator = 'less';
3007
+ date = dayAfter;
3008
+ }
3009
+ }
3010
+ condition[operator] = { value: date };
3011
+ }
3012
+ return condition;
3013
+ }
3014
+ isValid() {
3015
+ return this.form.valid;
3016
+ }
3017
+ isDirty() {
3018
+ return this.form.dirty;
3019
+ }
3020
+ reloadCondition(condition) {
3021
+ if (!condition) {
3022
+ return;
3023
+ }
3024
+ // Special case for '='
3025
+ if (condition.greaterOrEqual && condition.less) {
3026
+ this.operatorCtrl.setValue('equal');
3027
+ this.setTodayOrDate(condition.greaterOrEqual.value);
3028
+ return;
3029
+ }
3030
+ for (const operator of this.operators) {
3031
+ const reloadedOperator = condition[operator.key];
3032
+ if (reloadedOperator) {
3033
+ this.operatorCtrl.setValue(operator.key);
3034
+ this.setTodayOrDate(reloadedOperator.value);
3035
+ }
3036
+ }
3037
+ }
3038
+ setTodayOrDate(value) {
3039
+ if (value === 'today') {
3040
+ this.valueCtrl.setValue(this.dateAdapter.today());
3041
+ this.todayCtrl.setValue(true);
3042
+ }
3043
+ else {
3044
+ this.valueCtrl.setValue(this.dateAdapter.deserialize(value));
3045
+ this.todayCtrl.setValue(false);
3046
+ }
3047
+ }
3048
+ initValidators() {
3049
+ const validators = [Validators.required];
3050
+ if (this.configuration.min) {
3051
+ validators.push(dateMin(this.dateAdapter, this.configuration.min));
3052
+ }
3053
+ if (this.configuration.max) {
3054
+ validators.push(dateMax(this.dateAdapter, this.configuration.max));
3055
+ }
3056
+ this.valueCtrl.setValidators(validators);
3057
+ }
3058
+ getDayAfter(date) {
3059
+ return this.dateAdapter.addCalendarDays(this.dateAdapter.clone(date), 1);
3060
+ }
3061
+ getRenderedValue() {
3062
+ const operator = this.operators.find(v => v.key === this.operatorCtrl.value);
3063
+ let value = '';
3064
+ if (this.todayCtrl.value) {
3065
+ value = $localize `Aujourd'hui`;
3066
+ }
3067
+ else if (this.valueCtrl.value) {
3068
+ value = this.dateAdapter.format(this.valueCtrl.value, this.dateFormats.display.dateInput);
3069
+ }
3070
+ if (operator && value) {
3071
+ return operator.label + ' ' + value;
3072
+ }
3073
+ else {
3074
+ return '';
3075
+ }
3076
+ }
2525
3077
  }
3078
+ TypeDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: i1$4.DateAdapter }, { token: MAT_DATE_FORMATS }], target: i0.ɵɵFactoryTarget.Component });
3079
+ TypeDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeDateComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-checkbox [formControl]=\"todayCtrl\" i18n>Aujourd'hui</mat-checkbox>\n</form>\n", styles: ["form{display:grid;grid:auto auto/4em auto;grid-gap:0 1em}form>*{align-self:end}form>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.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: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$4.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
3080
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateComponent, decorators: [{
3081
+ type: Component,
3082
+ args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-checkbox [formControl]=\"todayCtrl\" i18n>Aujourd'hui</mat-checkbox>\n</form>\n", styles: ["form{display:grid;grid:auto auto/4em auto;grid-gap:0 1em}form>*{align-self:end}form>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"] }]
3083
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
3084
+ type: Inject,
3085
+ args: [NATURAL_DROPDOWN_DATA]
3086
+ }] }, { type: i1$4.DateAdapter }, { type: undefined, decorators: [{
3087
+ type: Inject,
3088
+ args: [MAT_DATE_FORMATS]
3089
+ }] }]; } });
2526
3090
 
2527
3091
  function toGraphQLDoctrineFilter(facets, selections) {
2528
3092
  selections = deepClone(selections);
@@ -2537,7 +3101,7 @@ function toGraphQLDoctrineFilter(facets, selections) {
2537
3101
  const facet = getFacetFromSelection(facets, selection);
2538
3102
  const transformedSelection = transformSelection(facet, selection);
2539
3103
  // Skip inverted flag and remove it from needed inverted flags
2540
- if (facet && isInvertedFlag(facet)) {
3104
+ if (isInvertedFlag(facet)) {
2541
3105
  neededInversedFlags.splice(neededInversedFlags.indexOf(facet), 1);
2542
3106
  }
2543
3107
  else {
@@ -2621,10 +3185,14 @@ function wrapWithFieldName(field, condition) {
2621
3185
  return result;
2622
3186
  }
2623
3187
  function transformSelection(facet, selection) {
2624
- return facet && facet.transform ? facet.transform(selection) : selection;
3188
+ const newSelection = facet && facet.transform ? facet.transform(selection) : selection;
3189
+ return isDateFacet(facet) ? replaceToday(newSelection) : selection;
2625
3190
  }
2626
- function isInvertedFlag(f) {
2627
- return ('inversed' in f && f.inversed) || false;
3191
+ function isInvertedFlag(facet) {
3192
+ return (!!facet && 'inversed' in facet && facet.inversed) || false;
3193
+ }
3194
+ function isDateFacet(facet) {
3195
+ return !!facet && 'component' in facet && facet.component === TypeDateComponent;
2628
3196
  }
2629
3197
 
2630
3198
  /**
@@ -2884,7 +3452,9 @@ class NaturalPersistenceService {
2884
3452
  try {
2885
3453
  result = JSON.parse(value);
2886
3454
  }
2887
- catch (e) { }
3455
+ catch (e) {
3456
+ // noop
3457
+ }
2888
3458
  return this.isValid(key, storageKey, result) ? result : null;
2889
3459
  }
2890
3460
  }
@@ -3601,24 +4171,28 @@ class NaturalAbstractModelService {
3601
4171
  /**
3602
4172
  * List of individual fields validators
3603
4173
  */
4174
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
3604
4175
  getFormValidators(model) {
3605
4176
  return {};
3606
4177
  }
3607
4178
  /**
3608
4179
  * List of individual async fields validators
3609
4180
  */
4181
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
3610
4182
  getFormAsyncValidators(model) {
3611
4183
  return {};
3612
4184
  }
3613
4185
  /**
3614
4186
  * List of grouped fields validators (like password + confirm password)
3615
4187
  */
4188
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
3616
4189
  getFormGroupValidators(model) {
3617
4190
  return [];
3618
4191
  }
3619
4192
  /**
3620
4193
  * List of async group fields validators (like unique constraint on multiple columns)
3621
4194
  */
4195
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
3622
4196
  getFormGroupAsyncValidators(model) {
3623
4197
  return [];
3624
4198
  }
@@ -4011,6 +4585,7 @@ class NaturalAbstractModelService {
4011
4585
  *
4012
4586
  * This is typically a site or state ID
4013
4587
  */
4588
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4014
4589
  getPartialVariablesForCreation(object) {
4015
4590
  return {};
4016
4591
  }
@@ -4019,6 +4594,7 @@ class NaturalAbstractModelService {
4019
4594
  *
4020
4595
  * This is typically a site or state ID
4021
4596
  */
4597
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4022
4598
  getPartialVariablesForUpdate(object) {
4023
4599
  return {};
4024
4600
  }
@@ -4027,6 +4603,7 @@ class NaturalAbstractModelService {
4027
4603
  *
4028
4604
  * This is typically a site or state ID
4029
4605
  */
4606
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4030
4607
  getPartialVariablesForDelete(objects) {
4031
4608
  return {};
4032
4609
  }
@@ -4232,14 +4809,14 @@ class NaturalEnumService {
4232
4809
  }));
4233
4810
  }
4234
4811
  }
4235
- NaturalEnumService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalEnumService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
4812
+ NaturalEnumService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalEnumService, deps: [{ token: i1$5.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
4236
4813
  NaturalEnumService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalEnumService, providedIn: 'root' });
4237
4814
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalEnumService, decorators: [{
4238
4815
  type: Injectable,
4239
4816
  args: [{
4240
4817
  providedIn: 'root',
4241
4818
  }]
4242
- }], ctorParameters: function () { return [{ type: i1$1.Apollo }]; } });
4819
+ }], ctorParameters: function () { return [{ type: i1$5.Apollo }]; } });
4243
4820
 
4244
4821
  /**
4245
4822
  * Query to get list of mutations
@@ -4377,14 +4954,14 @@ class NaturalLinkMutationService {
4377
4954
  }`;
4378
4955
  }
4379
4956
  }
4380
- NaturalLinkMutationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalLinkMutationService, deps: [{ token: i1$1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
4957
+ NaturalLinkMutationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalLinkMutationService, deps: [{ token: i1$5.Apollo }], target: i0.ɵɵFactoryTarget.Injectable });
4381
4958
  NaturalLinkMutationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalLinkMutationService, providedIn: 'root' });
4382
4959
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalLinkMutationService, decorators: [{
4383
4960
  type: Injectable,
4384
4961
  args: [{
4385
4962
  providedIn: 'root',
4386
4963
  }]
4387
- }], ctorParameters: function () { return [{ type: i1$1.Apollo }]; } });
4964
+ }], ctorParameters: function () { return [{ type: i1$5.Apollo }]; } });
4388
4965
 
4389
4966
  const patterns = [
4390
4967
  /^(?<day>\d{1,2})\.(?<month>\d{1,2})\.(?<year>\d{4}|\d{2})$/,
@@ -4557,12 +5134,12 @@ class NaturalIconComponent {
4557
5134
  }
4558
5135
  }
4559
5136
  }
4560
- NaturalIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalIconComponent, deps: [{ token: i1$2.MatIconRegistry }, { token: i2$2.DomSanitizer }, { token: IconsConfigService }], target: i0.ɵɵFactoryTarget.Component });
4561
- NaturalIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalIconComponent, selector: "natural-icon", inputs: { label: "label", labelColor: "labelColor", labelPosition: "labelPosition", name: "name", size: "size" }, host: { properties: { "style.color": "this.fgColor", "class.material-icons": "this.isMaterialIcon", "class.mat-icon": "this.isIcon", "style.min-width.px": "this.width", "style.min-height.px": "this.height", "style.font-size.px": "this.fontSize" } }, ngImport: i0, template: "<mat-icon *ngIf=\"icon?.font\" [class]=\"icon.class\" data-nosnippet>{{ icon.font }}</mat-icon>\n<mat-icon *ngIf=\"icon?.svg\" [class]=\"icon.class\" [svgIcon]=\"icon.name\" class=\"svg-icon\"></mat-icon>\n\n<div *ngIf=\"label\" [ngClass]=\"labelColor + ' ' + labelPosition\" class=\"label\">{{ label }}</div>\n", styles: [":host{position:relative}:host mat-icon{background-repeat:inherit;display:inherit;fill:inherit;height:inherit;width:inherit;font-family:inherit;font-weight:inherit;font-style:inherit;font-size:inherit;line-height:inherit;text-transform:inherit;letter-spacing:inherit;word-wrap:inherit;white-space:inherit;direction:inherit;-webkit-font-smoothing:inherit;text-rendering:inherit;-moz-osx-font-smoothing:inherit;font-feature-settings:inherit;min-height:inherit;min-width:inherit;vertical-align:unset}:host .label{position:absolute;padding:2px;border-radius:100%;font-family:Quicksand sans-serif;font-size:14px;line-height:1em;height:14px;min-width:14px;text-align:center}:host .label.top-left{top:0;left:0;transform:translate(-50%)}:host .label.top-right{top:0;right:0;transform:translate(50%)}:host .label.bottom-left{bottom:0;left:0;transform:translate(-50%)}:host .label.bottom-right{bottom:0;right:0;transform:translate(50%)}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
5137
+ NaturalIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalIconComponent, deps: [{ token: i1$6.MatIconRegistry }, { token: i2$2.DomSanitizer }, { token: IconsConfigService }], target: i0.ɵɵFactoryTarget.Component });
5138
+ NaturalIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalIconComponent, selector: "natural-icon", inputs: { label: "label", labelColor: "labelColor", labelPosition: "labelPosition", name: "name", size: "size" }, host: { properties: { "style.color": "this.fgColor", "class.material-icons": "this.isMaterialIcon", "class.mat-icon": "this.isIcon", "style.min-width.px": "this.width", "style.min-height.px": "this.height", "style.font-size.px": "this.fontSize" } }, ngImport: i0, template: "<mat-icon *ngIf=\"icon?.font\" [class]=\"icon.class\" data-nosnippet>{{ icon.font }}</mat-icon>\n<mat-icon *ngIf=\"icon?.svg\" [class]=\"icon.class\" [svgIcon]=\"icon.name\" class=\"svg-icon\"></mat-icon>\n\n<div *ngIf=\"label\" [ngClass]=\"labelColor + ' ' + labelPosition\" class=\"label\">{{ label }}</div>\n", styles: [":host{position:relative}:host mat-icon{background-repeat:inherit;display:inherit;fill:inherit;height:inherit;width:inherit;font-family:inherit;font-weight:inherit;font-style:inherit;font-size:inherit;line-height:inherit;text-transform:inherit;letter-spacing:inherit;word-wrap:inherit;white-space:inherit;direction:inherit;-webkit-font-smoothing:inherit;text-rendering:inherit;-moz-osx-font-smoothing:inherit;font-feature-settings:inherit;min-height:inherit;min-width:inherit;vertical-align:unset}:host .label{position:absolute;padding:2px;border-radius:100%;font-family:Quicksand sans-serif;font-size:14px;line-height:1em;height:14px;min-width:14px;text-align:center}:host .label.top-left{top:0;left:0;transform:translate(-50%)}:host .label.top-right{top:0;right:0;transform:translate(50%)}:host .label.bottom-left{bottom:0;left:0;transform:translate(-50%)}:host .label.bottom-right{bottom:0;right:0;transform:translate(50%)}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
4562
5139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalIconComponent, decorators: [{
4563
5140
  type: Component,
4564
5141
  args: [{ selector: 'natural-icon', template: "<mat-icon *ngIf=\"icon?.font\" [class]=\"icon.class\" data-nosnippet>{{ icon.font }}</mat-icon>\n<mat-icon *ngIf=\"icon?.svg\" [class]=\"icon.class\" [svgIcon]=\"icon.name\" class=\"svg-icon\"></mat-icon>\n\n<div *ngIf=\"label\" [ngClass]=\"labelColor + ' ' + labelPosition\" class=\"label\">{{ label }}</div>\n", styles: [":host{position:relative}:host mat-icon{background-repeat:inherit;display:inherit;fill:inherit;height:inherit;width:inherit;font-family:inherit;font-weight:inherit;font-style:inherit;font-size:inherit;line-height:inherit;text-transform:inherit;letter-spacing:inherit;word-wrap:inherit;white-space:inherit;direction:inherit;-webkit-font-smoothing:inherit;text-rendering:inherit;-moz-osx-font-smoothing:inherit;font-feature-settings:inherit;min-height:inherit;min-width:inherit;vertical-align:unset}:host .label{position:absolute;padding:2px;border-radius:100%;font-family:Quicksand sans-serif;font-size:14px;line-height:1em;height:14px;min-width:14px;text-align:center}:host .label.top-left{top:0;left:0;transform:translate(-50%)}:host .label.top-right{top:0;right:0;transform:translate(50%)}:host .label.bottom-left{bottom:0;left:0;transform:translate(-50%)}:host .label.bottom-right{bottom:0;right:0;transform:translate(50%)}\n"] }]
4565
- }], ctorParameters: function () { return [{ type: i1$2.MatIconRegistry }, { type: i2$2.DomSanitizer }, { type: undefined, decorators: [{
5142
+ }], ctorParameters: function () { return [{ type: i1$6.MatIconRegistry }, { type: i2$2.DomSanitizer }, { type: undefined, decorators: [{
4566
5143
  type: Inject,
4567
5144
  args: [IconsConfigService]
4568
5145
  }] }]; }, propDecorators: { fgColor: [{
@@ -4654,7 +5231,7 @@ class NaturalColumnsPickerComponent {
4654
5231
  }
4655
5232
  }
4656
5233
  NaturalColumnsPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalColumnsPickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4657
- NaturalColumnsPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalColumnsPickerComponent, selector: "natural-columns-picker", inputs: { selections: "selections" }, outputs: { selectionChange: "selectionChange" }, queries: [{ propertyName: "availableColumns", predicate: NaturalColumnsPickerColumnDirective }], ngImport: i0, template: "<div>\n <mat-menu #naturalMenu=\"matMenu\">\n <div\n (click)=\"$event.stopPropagation(); column.checked = !column.checked; updateColumns()\"\n *ngFor=\"let column of displayedColumns\"\n class=\"mat-menu-item\"\n >\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"updateColumns()\" [(ngModel)]=\"column.checked\">{{\n column.label\n }}</mat-checkbox>\n </div>\n </mat-menu>\n <button [matMenuTriggerFor]=\"naturalMenu\" mat-icon-button i18n-matTooltip matTooltip=\"S\u00E9lectionner les colonnes\">\n <natural-icon name=\"view_column\"></natural-icon>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "component", type: i3$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5234
+ NaturalColumnsPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalColumnsPickerComponent, selector: "natural-columns-picker", inputs: { selections: "selections" }, outputs: { selectionChange: "selectionChange" }, queries: [{ propertyName: "availableColumns", predicate: NaturalColumnsPickerColumnDirective }], ngImport: i0, template: "<div>\n <mat-menu #naturalMenu=\"matMenu\">\n <div\n (click)=\"$event.stopPropagation(); column.checked = !column.checked; updateColumns()\"\n *ngFor=\"let column of displayedColumns\"\n class=\"mat-menu-item\"\n >\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"updateColumns()\" [(ngModel)]=\"column.checked\">{{\n column.label\n }}</mat-checkbox>\n </div>\n </mat-menu>\n <button [matMenuTriggerFor]=\"naturalMenu\" mat-icon-button i18n-matTooltip matTooltip=\"S\u00E9lectionner les colonnes\">\n <natural-icon name=\"view_column\"></natural-icon>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "component", type: i3$1.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4658
5235
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalColumnsPickerComponent, decorators: [{
4659
5236
  type: Component,
4660
5237
  args: [{ selector: 'natural-columns-picker', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <mat-menu #naturalMenu=\"matMenu\">\n <div\n (click)=\"$event.stopPropagation(); column.checked = !column.checked; updateColumns()\"\n *ngFor=\"let column of displayedColumns\"\n class=\"mat-menu-item\"\n >\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"updateColumns()\" [(ngModel)]=\"column.checked\">{{\n column.label\n }}</mat-checkbox>\n </div>\n </mat-menu>\n <button [matMenuTriggerFor]=\"naturalMenu\" mat-icon-button i18n-matTooltip matTooltip=\"S\u00E9lectionner les colonnes\">\n <natural-icon name=\"view_column\"></natural-icon>\n </button>\n</div>\n" }]
@@ -4838,14 +5415,14 @@ class NaturalLinkableTabDirective extends NaturalAbstractController {
4838
5415
  return this.component._tabs.toArray().findIndex(tab => fragment === getTabId(tab));
4839
5416
  }
4840
5417
  }
4841
- NaturalLinkableTabDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalLinkableTabDirective, deps: [{ token: i1$4.MatTabGroup }, { token: i2$1.ActivatedRoute }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Directive });
5418
+ NaturalLinkableTabDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalLinkableTabDirective, deps: [{ token: i1$7.MatTabGroup }, { token: i2$1.ActivatedRoute }, { token: i2$1.Router }], target: i0.ɵɵFactoryTarget.Directive });
4842
5419
  NaturalLinkableTabDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.1", type: NaturalLinkableTabDirective, selector: "mat-tab-group[naturalLinkableTab]", inputs: { naturalLinkableTab: "naturalLinkableTab" }, usesInheritance: true, ngImport: i0 });
4843
5420
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalLinkableTabDirective, decorators: [{
4844
5421
  type: Directive,
4845
5422
  args: [{
4846
5423
  selector: 'mat-tab-group[naturalLinkableTab]',
4847
5424
  }]
4848
- }], ctorParameters: function () { return [{ type: i1$4.MatTabGroup }, { type: i2$1.ActivatedRoute }, { type: i2$1.Router }]; }, propDecorators: { naturalLinkableTab: [{
5425
+ }], ctorParameters: function () { return [{ type: i1$7.MatTabGroup }, { type: i2$1.ActivatedRoute }, { type: i2$1.Router }]; }, propDecorators: { naturalLinkableTab: [{
4849
5426
  type: Input
4850
5427
  }] } });
4851
5428
 
@@ -5304,7 +5881,7 @@ class NaturalDetailHeaderComponent {
5304
5881
  }
5305
5882
  }
5306
5883
  NaturalDetailHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDetailHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5307
- NaturalDetailHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalDetailHeaderComponent, selector: "natural-detail-header", inputs: { currentBaseUrl: "currentBaseUrl", isPanel: "isPanel", icon: "icon", label: "label", rootLabel: "rootLabel", newLabel: "newLabel", model: "model", breadcrumbs: "breadcrumbs", listRoute: "listRoute", listFragment: "listFragment", link: "link" }, ngImport: i0, template: "<div class=\"breadcrumb\">\n <a [routerLink]=\"isPanel ? [] : getRootLink()\" [fragment]=\"listFragment\" color=\"primary\" mat-button>{{\n rootLabel || label\n }}</a>\n <ng-container *ngFor=\"let parent of breadcrumbs\">\n /\n <a [routerLink]=\"isPanel ? [] : getLink(parent.id)\" color=\"primary\" mat-button>\n {{ parent?.fullName || parent?.name }}</a\n >\n </ng-container>\n</div>\n\n<div class=\"body\">\n <div *ngIf=\"icon\" style=\"width: 30px\">\n <natural-icon [name]=\"icon\"></natural-icon>\n </div>\n <div *ngIf=\"!model.id\" class=\"mat-headline no-margin newLabel\">{{ newLabel }}</div>\n <div *ngIf=\"model.id\" class=\"mat-headline no-margin label\">{{ model.name || model.fullName || label }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body natural-icon{display:none}}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "component", type: i4.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }] });
5884
+ NaturalDetailHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalDetailHeaderComponent, selector: "natural-detail-header", inputs: { currentBaseUrl: "currentBaseUrl", isPanel: "isPanel", icon: "icon", label: "label", rootLabel: "rootLabel", newLabel: "newLabel", model: "model", breadcrumbs: "breadcrumbs", listRoute: "listRoute", listFragment: "listFragment", link: "link" }, ngImport: i0, template: "<div class=\"breadcrumb\">\n <a [routerLink]=\"isPanel ? [] : getRootLink()\" [fragment]=\"listFragment\" color=\"primary\" mat-button>{{\n rootLabel || label\n }}</a>\n <ng-container *ngFor=\"let parent of breadcrumbs\">\n /\n <a [routerLink]=\"isPanel ? [] : getLink(parent.id)\" color=\"primary\" mat-button>\n {{ parent?.fullName || parent?.name }}</a\n >\n </ng-container>\n</div>\n\n<div class=\"body\">\n <div *ngIf=\"icon\" style=\"width: 30px\">\n <natural-icon [name]=\"icon\"></natural-icon>\n </div>\n <div *ngIf=\"!model.id\" class=\"mat-headline no-margin newLabel\">{{ newLabel }}</div>\n <div *ngIf=\"model.id\" class=\"mat-headline no-margin label\">{{ model.name || model.fullName || label }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body natural-icon{display:none}}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "component", type: i4.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }] });
5308
5885
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDetailHeaderComponent, decorators: [{
5309
5886
  type: Component,
5310
5887
  args: [{ selector: 'natural-detail-header', template: "<div class=\"breadcrumb\">\n <a [routerLink]=\"isPanel ? [] : getRootLink()\" [fragment]=\"listFragment\" color=\"primary\" mat-button>{{\n rootLabel || label\n }}</a>\n <ng-container *ngFor=\"let parent of breadcrumbs\">\n /\n <a [routerLink]=\"isPanel ? [] : getLink(parent.id)\" color=\"primary\" mat-button>\n {{ parent?.fullName || parent?.name }}</a\n >\n </ng-container>\n</div>\n\n<div class=\"body\">\n <div *ngIf=\"icon\" style=\"width: 30px\">\n <natural-icon [name]=\"icon\"></natural-icon>\n </div>\n <div *ngIf=\"!model.id\" class=\"mat-headline no-margin newLabel\">{{ newLabel }}</div>\n <div *ngIf=\"model.id\" class=\"mat-headline no-margin label\">{{ model.name || model.fullName || label }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body natural-icon{display:none}}\n"] }]
@@ -5344,278 +5921,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
5344
5921
  imports: [CommonModule, RouterModule, MatButtonModule, NaturalIconModule],
5345
5922
  exports: [NaturalDetailHeaderComponent],
5346
5923
  }]
5347
- }] });
5348
-
5349
- /*
5350
- * Public API Surface of natural
5351
- */
5352
-
5353
- /**
5354
- * Animations used by the mat-menu component.
5355
- * Animation duration and timing values are based on:
5356
- * https://material.io/guidelines/components/menus.html#menus-usage
5357
- */
5358
- const naturalDropdownAnimations = {
5359
- /**
5360
- * This animation controls the menu panel's entry and exit from the page.
5361
- *
5362
- * When the menu panel is added to the DOM, it scales in and fades in its border.
5363
- *
5364
- * When the menu panel is removed from the DOM, it simply fades out after a brief
5365
- * delay to display the ripple.
5366
- */
5367
- transformMenu: trigger('transformMenu', [
5368
- state('void', style({
5369
- opacity: 0,
5370
- // This starts off from 0.01, instead of 0, because there's an issue in the Angular animations
5371
- // as of 4.2, which causes the animation to be skipped if it starts from 0.
5372
- transform: 'scale(0.01, 0.01)',
5373
- })),
5374
- transition('void => enter', sequence([
5375
- query('.natural-dropdown-container-content', style({ opacity: 0 })),
5376
- animate('100ms linear', style({ opacity: 1, transform: 'scale(1, 0.5)' })),
5377
- group([
5378
- query('.natural-dropdown-container-content', animate('400ms cubic-bezier(0.55, 0, 0.55, 0.2)', style({ opacity: 1 }))),
5379
- animate('300ms cubic-bezier(0.25, 0.8, 0.25, 1)', style({ transform: 'scale(1, 1)' })),
5380
- ]),
5381
- ])),
5382
- transition('* => void', animate('150ms 50ms linear', style({ opacity: 0 }))),
5383
- ]),
5384
- /**
5385
- * This animation fades in the background color and content of the menu panel
5386
- * after its containing element is scaled in.
5387
- */
5388
- fadeInItems: trigger('fadeInItems', [
5389
- // TODO(crisbeto): this is inside the `transformMenu`
5390
- // now. Remove next time we do breaking changes.
5391
- state('showing', style({ opacity: 1 })),
5392
- transition('void => *', [style({ opacity: 0 }), animate('400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)')]),
5393
- ]),
5394
- };
5395
-
5396
- function throwMatDialogContentAlreadyAttachedError() {
5397
- throw Error('Attempting to attach dialog content after content is already attached');
5398
- }
5399
- const NATURAL_DROPDOWN_CONTAINER_DATA = new InjectionToken('NaturalDropdownContainerData');
5400
- class NaturalDropdownContainerComponent extends BasePortalOutlet {
5401
- constructor(elementRef, focusTrapFactory, data) {
5402
- super();
5403
- this.elementRef = elementRef;
5404
- this.focusTrapFactory = focusTrapFactory;
5405
- this.data = data;
5406
- this.closed = new Subject();
5407
- /** Current state of the panel animation. */
5408
- this.panelAnimationState = 'void';
5409
- /** Emits whenever an animation on the menu completes. */
5410
- this.animationDone = new Subject();
5411
- this.focusTrap = null;
5412
- this.elementFocusedBeforeDialogWasOpened = null;
5413
- }
5414
- ngOnDestroy() {
5415
- this.closed.complete();
5416
- }
5417
- close() {
5418
- this.closed.next();
5419
- }
5420
- attachTemplatePortal(portal) {
5421
- return this.portalOutlet.attachTemplatePortal(portal);
5422
- }
5423
- attachComponentPortal(portal) {
5424
- if (this.portalOutlet.hasAttached()) {
5425
- throwMatDialogContentAlreadyAttachedError();
5426
- }
5427
- return this.portalOutlet.attachComponentPortal(portal);
5428
- }
5429
- startAnimation() {
5430
- this.panelAnimationState = 'enter';
5431
- }
5432
- onAnimationDone(event) {
5433
- if (event.toState === 'enter') {
5434
- this.trapFocus();
5435
- }
5436
- else if (event.toState === 'exit') {
5437
- this.restoreFocus();
5438
- }
5439
- this.animationDone.next();
5440
- }
5441
- trapFocus() {
5442
- if (!this.focusTrap) {
5443
- this.focusTrap = this.focusTrapFactory.create(this.elementRef.nativeElement);
5444
- }
5445
- this.focusTrap.focusInitialElementWhenReady();
5446
- }
5447
- /** Restores focus to the element that was focused before the dialog opened. */
5448
- restoreFocus() {
5449
- const toFocus = this.elementFocusedBeforeDialogWasOpened;
5450
- // We need the extra check, because IE can set the `activeElement` to null in some cases.
5451
- if (toFocus && typeof toFocus.focus === 'function') {
5452
- toFocus.focus();
5453
- }
5454
- if (this.focusTrap) {
5455
- this.focusTrap.destroy();
5456
- }
5457
- }
5458
- }
5459
- NaturalDropdownContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDropdownContainerComponent, deps: [{ token: i0.ElementRef }, { token: i1$5.ConfigurableFocusTrapFactory }, { token: NATURAL_DROPDOWN_CONTAINER_DATA }], target: i0.ɵɵFactoryTarget.Component });
5460
- NaturalDropdownContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalDropdownContainerComponent, selector: "ng-component", viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n (@transformMenu.done)=\"onAnimationDone($event)\"\n [@transformMenu]=\"panelAnimationState\"\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <div *ngIf=\"data.showValidateButton\" class=\"natural-dropdown-validate-button\">\n <button (click)=\"close()\" color=\"primary\" mat-raised-button i18n>Valider</button>\n </div>\n</div>\n", styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{flex:none;display:flex;flex-direction:row;justify-content:flex-end;margin:5px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], encapsulation: i0.ViewEncapsulation.None });
5461
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDropdownContainerComponent, decorators: [{
5462
- type: Component,
5463
- args: [{ encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], template: "<div\n (@transformMenu.done)=\"onAnimationDone($event)\"\n [@transformMenu]=\"panelAnimationState\"\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <div *ngIf=\"data.showValidateButton\" class=\"natural-dropdown-validate-button\">\n <button (click)=\"close()\" color=\"primary\" mat-raised-button i18n>Valider</button>\n </div>\n</div>\n", styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{flex:none;display:flex;flex-direction:row;justify-content:flex-end;margin:5px}\n"] }]
5464
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$5.ConfigurableFocusTrapFactory }, { type: undefined, decorators: [{
5465
- type: Inject,
5466
- args: [NATURAL_DROPDOWN_CONTAINER_DATA]
5467
- }] }]; }, propDecorators: { portalOutlet: [{
5468
- type: ViewChild,
5469
- args: [CdkPortalOutlet, { static: true }]
5470
- }], templateRef: [{
5471
- type: ViewChild,
5472
- args: [TemplateRef, { static: true }]
5473
- }] } });
5474
-
5475
- class NaturalDropdownRef {
5476
- constructor(dropdownContainer, component, customProviders, parentInjector, containerRef) {
5477
- this.dropdownContainer = dropdownContainer;
5478
- this.closed = new Subject();
5479
- // Customize injector to allow data and dropdown reference injection in component
5480
- customProviders.push({ provide: NaturalDropdownRef, useValue: this });
5481
- const customInjector = Injector.create({ providers: customProviders, parent: parentInjector });
5482
- // Content (type component given in configuration)
5483
- const componentPortal = new ComponentPortal(component, undefined, customInjector);
5484
- const contentRef = containerRef.instance.attachComponentPortal(componentPortal);
5485
- this.componentInstance = contentRef.instance;
5486
- }
5487
- close(result) {
5488
- this.closed.next(result);
5489
- this.closed.complete();
5490
- this.dropdownContainer.close();
5491
- }
5492
- }
5493
-
5494
- const NATURAL_DROPDOWN_DATA = new InjectionToken('NaturalDropdownData');
5495
- class NaturalDropdownService {
5496
- constructor(overlay, injector) {
5497
- this.overlay = overlay;
5498
- this.injector = injector;
5499
- }
5500
- open(component, connectedElement, customProviders, showValidateButton) {
5501
- // Container data
5502
- const containerData = {
5503
- showValidateButton: showValidateButton,
5504
- };
5505
- const injectionTokens = [
5506
- {
5507
- provide: NATURAL_DROPDOWN_CONTAINER_DATA,
5508
- useValue: containerData,
5509
- },
5510
- ];
5511
- const containerInjector = Injector.create({ providers: injectionTokens, parent: this.injector });
5512
- // Container
5513
- const overlayRef = this.overlay.create(this.getOverlayConfig(connectedElement));
5514
- const containerPortal = new ComponentPortal(NaturalDropdownContainerComponent, undefined, containerInjector);
5515
- const containerRef = overlayRef.attach(containerPortal);
5516
- const dropdownContainer = containerRef.instance;
5517
- const dropdownRef = new NaturalDropdownRef(dropdownContainer, component, customProviders, this.injector, containerRef);
5518
- // Start animation that shows menu
5519
- dropdownContainer.startAnimation();
5520
- const close = () => {
5521
- if (dropdownRef.componentInstance.isValid() && dropdownRef.componentInstance.isDirty()) {
5522
- dropdownRef.close({
5523
- condition: dropdownRef.componentInstance.getCondition(),
5524
- });
5525
- }
5526
- else {
5527
- dropdownRef.close();
5528
- }
5529
- };
5530
- // When parent closes, remove overlay from dom and update "return" valu
5531
- dropdownContainer.closed.subscribe(() => {
5532
- overlayRef.dispose();
5533
- close();
5534
- });
5535
- // When click on backdrop, validate result.. ?
5536
- overlayRef
5537
- .backdropClick()
5538
- .pipe(takeUntil(dropdownContainer.closed))
5539
- .subscribe(() => dropdownContainer.close());
5540
- return dropdownRef;
5541
- }
5542
- /**
5543
- * This method builds the configuration object needed to create the overlay, the OverlayState.
5544
- */
5545
- getOverlayConfig(element) {
5546
- return new OverlayConfig({
5547
- positionStrategy: this.getPosition(element),
5548
- hasBackdrop: true,
5549
- backdropClass: 'cdk-overlay-transparent-backdrop',
5550
- });
5551
- }
5552
- getPosition(element) {
5553
- return this.overlay
5554
- .position()
5555
- .flexibleConnectedTo(element)
5556
- .withFlexibleDimensions(true)
5557
- .withViewportMargin(30)
5558
- .withPush(false)
5559
- .withPositions([
5560
- {
5561
- originX: 'start',
5562
- originY: 'bottom',
5563
- overlayX: 'start',
5564
- overlayY: 'top',
5565
- offsetY: 10,
5566
- },
5567
- ]);
5568
- }
5569
- }
5570
- NaturalDropdownService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDropdownService, deps: [{ token: i1$6.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
5571
- NaturalDropdownService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDropdownService, providedIn: 'root' });
5572
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalDropdownService, decorators: [{
5573
- type: Injectable,
5574
- args: [{
5575
- providedIn: 'root',
5576
- }]
5577
- }], ctorParameters: function () { return [{ type: i1$6.Overlay }, { type: i0.Injector }]; } });
5924
+ }] });
5578
5925
 
5579
- const possibleComparableOperators = [
5580
- {
5581
- key: 'less',
5582
- label: '<',
5583
- },
5584
- {
5585
- key: 'lessOrEqual',
5586
- label: '≤',
5587
- },
5588
- {
5589
- key: 'equal',
5590
- label: '=',
5591
- },
5592
- {
5593
- key: 'greaterOrEqual',
5594
- label: '≥',
5595
- },
5596
- {
5597
- key: 'greater',
5598
- label: '>',
5599
- },
5600
- ];
5601
- const possibleDiscreteOperators = [
5602
- {
5603
- key: 'is',
5604
- label: $localize `est`,
5605
- },
5606
- {
5607
- key: 'isnot',
5608
- label: $localize `n'est pas`,
5609
- },
5610
- {
5611
- key: 'any',
5612
- label: $localize `tous`,
5613
- },
5614
- {
5615
- key: 'none',
5616
- label: $localize `aucun`,
5617
- },
5618
- ];
5926
+ /*
5927
+ * Public API Surface of natural
5928
+ */
5619
5929
 
5620
5930
  class TypeSelectComponent extends NaturalAbstractController {
5621
5931
  constructor(data) {
@@ -5763,7 +6073,7 @@ class TypeSelectComponent extends NaturalAbstractController {
5763
6073
  }
5764
6074
  }
5765
6075
  TypeSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeSelectComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }], target: i0.ɵɵFactoryTarget.Component });
5766
- TypeSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeSelectComponent, selector: "ng-component", viewQueries: [{ propertyName: "list", first: true, predicate: MatSelectionList, descendants: true }], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\" *ngIf=\"configuration.operators\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-selection-list *ngIf=\"requireValueCtrl\" [formControl]=\"valueCtrl\">\n <mat-list-option *ngFor=\"let item of items\" [value]=\"getId(item)\" checkboxPosition=\"before\">\n {{ getDisplay(item) }}\n </mat-list-option>\n </mat-selection-list>\n</form>\n", dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4$3.MatSelectionList, selector: "mat-selection-list", inputs: ["disableRipple", "color", "compareWith", "disabled", "multiple"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i4$3.MatListOption, selector: "mat-list-option", inputs: ["disableRipple", "checkboxPosition", "color", "value", "disabled", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "component", type: i4$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$7.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
6076
+ TypeSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeSelectComponent, selector: "ng-component", viewQueries: [{ propertyName: "list", first: true, predicate: MatSelectionList, descendants: true }], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\" *ngIf=\"configuration.operators\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-selection-list *ngIf=\"requireValueCtrl\" [formControl]=\"valueCtrl\">\n <mat-list-option *ngFor=\"let item of items\" [value]=\"getId(item)\" checkboxPosition=\"before\">\n {{ getDisplay(item) }}\n </mat-list-option>\n </mat-selection-list>\n</form>\n", dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4$4.MatSelectionList, selector: "mat-selection-list", inputs: ["disableRipple", "color", "compareWith", "disabled", "multiple"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i4$4.MatListOption, selector: "mat-list-option", inputs: ["disableRipple", "checkboxPosition", "color", "value", "disabled", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$4.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
5767
6077
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeSelectComponent, decorators: [{
5768
6078
  type: Component,
5769
6079
  args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\" *ngIf=\"configuration.operators\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-selection-list *ngIf=\"requireValueCtrl\" [formControl]=\"valueCtrl\">\n <mat-list-option *ngFor=\"let item of items\" [value]=\"getId(item)\" checkboxPosition=\"before\">\n {{ getDisplay(item) }}\n </mat-list-option>\n </mat-selection-list>\n</form>\n" }]
@@ -5877,7 +6187,7 @@ class ExternalFormControlMatcher extends ErrorStateMatcher {
5877
6187
  super();
5878
6188
  this.component = component;
5879
6189
  }
5880
- isErrorState(control, form) {
6190
+ isErrorState() {
5881
6191
  const externalCtrl = this.component.ngControl?.control || this.component.internalCtrl;
5882
6192
  if (externalCtrl) {
5883
6193
  return !!(externalCtrl.errors && (externalCtrl.touched || externalCtrl.dirty));
@@ -6212,7 +6522,7 @@ class NaturalSelectComponent extends AbstractSelect {
6212
6522
  }
6213
6523
  }
6214
6524
  NaturalSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6215
- NaturalSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSelectComponent, selector: "natural-select", inputs: { service: "service", optionRequired: "optionRequired", searchField: "searchField", filter: "filter", disabled: "disabled" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "autoTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n <mat-option *ngFor=\"let item of items | async\" [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n ></ng-template>\n </mat-option>\n <div *ngIf=\"moreNbItems > 0\" class=\"mat-caption\" i18n style=\"padding: 5px 10px\"\n >{{ moreNbItems }} \u00E9l\u00E9ment(s) suppl\u00E9mentaire(s)</div\n >\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field [floatLabel]=\"floatPlaceholder\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"touch(); blur.emit()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"clear()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n <!-- Meta data -->\n <natural-icon *ngIf=\"!loading && showIcon\" [name]=\"icon\" matPrefix></natural-icon>\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"21\"\n [strokeWidth]=\"5\"\n matPrefix\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <natural-icon name=\"open_in_browser\"></natural-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showClearButton()\" class=\"external-buttons\">\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i2$3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i1$7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5$1.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: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }] });
6525
+ NaturalSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSelectComponent, selector: "natural-select", inputs: { service: "service", optionRequired: "optionRequired", searchField: "searchField", filter: "filter", disabled: "disabled" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "autoTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n <mat-option *ngFor=\"let item of items | async\" [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n ></ng-template>\n </mat-option>\n <div *ngIf=\"moreNbItems > 0\" class=\"mat-caption\" i18n style=\"padding: 5px 10px\"\n >{{ moreNbItems }} \u00E9l\u00E9ment(s) suppl\u00E9mentaire(s)</div\n >\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field [floatLabel]=\"floatPlaceholder\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"touch(); blur.emit()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"clear()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n <!-- Meta data -->\n <natural-icon *ngIf=\"!loading && showIcon\" [name]=\"icon\" matPrefix></natural-icon>\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"21\"\n [strokeWidth]=\"5\"\n matPrefix\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <natural-icon name=\"open_in_browser\"></natural-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showClearButton()\" class=\"external-buttons\">\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2$3.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i2$3.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i1$4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5.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: "component", type: i7$2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }] });
6216
6526
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSelectComponent, decorators: [{
6217
6527
  type: Component,
6218
6528
  args: [{ selector: 'natural-select', template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n <mat-option *ngFor=\"let item of items | async\" [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n ></ng-template>\n </mat-option>\n <div *ngIf=\"moreNbItems > 0\" class=\"mat-caption\" i18n style=\"padding: 5px 10px\"\n >{{ moreNbItems }} \u00E9l\u00E9ment(s) suppl\u00E9mentaire(s)</div\n >\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field [floatLabel]=\"floatPlaceholder\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"touch(); blur.emit()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"clear()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n <!-- Meta data -->\n <natural-icon *ngIf=\"!loading && showIcon\" [name]=\"icon\" matPrefix></natural-icon>\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"21\"\n [strokeWidth]=\"5\"\n matPrefix\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <natural-icon name=\"open_in_browser\"></natural-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showClearButton()\" class=\"external-buttons\">\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"] }]
@@ -6256,14 +6566,14 @@ class TypeNaturalSelectComponent extends AbstractAssociationSelectComponent {
6256
6566
  }
6257
6567
  }
6258
6568
  TypeNaturalSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeNaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6259
- TypeNaturalSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeNaturalSelectComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-select\n style=\"display: inline\"\n *ngIf=\"configuration && requireValueCtrl\"\n [formControl]=\"valueCtrl\"\n [placeholder]=\"configuration.placeholder\"\n [service]=\"configuration.service\"\n [filter]=\"configuration.filter\"\n ></natural-select>\n</form>\n", dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "filter", "disabled"] }] });
6569
+ TypeNaturalSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeNaturalSelectComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-select\n style=\"display: inline\"\n *ngIf=\"configuration && requireValueCtrl\"\n [formControl]=\"valueCtrl\"\n [placeholder]=\"configuration.placeholder\"\n [service]=\"configuration.service\"\n [filter]=\"configuration.filter\"\n ></natural-select>\n</form>\n", dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "filter", "disabled"] }] });
6260
6570
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeNaturalSelectComponent, decorators: [{
6261
6571
  type: Component,
6262
6572
  args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-select\n style=\"display: inline\"\n *ngIf=\"configuration && requireValueCtrl\"\n [formControl]=\"valueCtrl\"\n [placeholder]=\"configuration.placeholder\"\n [service]=\"configuration.service\"\n [filter]=\"configuration.filter\"\n ></natural-select>\n</form>\n" }]
6263
6573
  }] });
6264
6574
 
6265
6575
  class InvalidWithValueStateMatcher$1 {
6266
- isErrorState(control, form) {
6576
+ isErrorState(control) {
6267
6577
  return control && control.invalid && control.value;
6268
6578
  }
6269
6579
  }
@@ -6303,7 +6613,7 @@ class TypeTextComponent {
6303
6613
  }
6304
6614
  }
6305
6615
  TypeTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeTextComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: NaturalDropdownRef }], target: i0.ɵɵFactoryTarget.Component });
6306
- TypeTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeTextComponent, selector: "ng-component", ngImport: i0, template: "<mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"formCtrl\"\n [required]=\"true\"\n matInput\n type=\"text\"\n />\n <mat-error *ngIf=\"formCtrl.hasError('required')\">*</mat-error>\n</mat-form-field>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.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"] }] });
6616
+ TypeTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeTextComponent, selector: "ng-component", ngImport: i0, template: "<mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"formCtrl\"\n [required]=\"true\"\n matInput\n type=\"text\"\n />\n <mat-error *ngIf=\"formCtrl.hasError('required')\">*</mat-error>\n</mat-form-field>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.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"] }] });
6307
6617
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeTextComponent, decorators: [{
6308
6618
  type: Component,
6309
6619
  args: [{ template: "<mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"formCtrl\"\n [required]=\"true\"\n matInput\n type=\"text\"\n />\n <mat-error *ngIf=\"formCtrl.hasError('required')\">*</mat-error>\n</mat-form-field>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"] }]
@@ -6396,7 +6706,7 @@ class TypeNumberComponent {
6396
6706
  }
6397
6707
  }
6398
6708
  TypeNumberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeNumberComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: NaturalDropdownRef }], target: i0.ɵɵFactoryTarget.Component });
6399
- TypeNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeNumberComponent, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 4em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"valueCtrl\"\n [attr.max]=\"configuration.max\"\n [attr.min]=\"configuration.min\"\n [required]=\"true\"\n [step]=\"configuration.step\"\n matInput\n type=\"number\"\n />\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n </mat-form-field>\n</form>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.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: "component", type: i4$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$7.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
6709
+ TypeNumberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeNumberComponent, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 4em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"valueCtrl\"\n [attr.max]=\"configuration.max\"\n [attr.min]=\"configuration.min\"\n [required]=\"true\"\n [step]=\"configuration.step\"\n matInput\n type=\"number\"\n />\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n </mat-form-field>\n</form>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.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: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$4.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
6400
6710
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeNumberComponent, decorators: [{
6401
6711
  type: Component,
6402
6712
  args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 4em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"valueCtrl\"\n [attr.max]=\"configuration.max\"\n [attr.min]=\"configuration.min\"\n [required]=\"true\"\n [step]=\"configuration.step\"\n matInput\n type=\"number\"\n />\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n </mat-form-field>\n</form>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"] }]
@@ -6706,7 +7016,7 @@ class FacetSelectorComponent {
6706
7016
  }
6707
7017
  }
6708
7018
  FacetSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FacetSelectorComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: NaturalDropdownRef }], target: i0.ɵɵFactoryTarget.Component });
6709
- FacetSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: FacetSelectorComponent, selector: "ng-component", ngImport: i0, template: "<mat-nav-list>\n <mat-list-item (click)=\"selection = facet; close()\" *ngFor=\"let facet of facets\">\n <a matLine>{{ facet.display }}</a>\n </mat-list-item>\n</mat-nav-list>\n", styles: [":host .mat-nav-list{padding:0}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4$3.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { kind: "component", type: i4$3.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$7.MatLine, selector: "[mat-line], [matLine]" }] });
7019
+ FacetSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: FacetSelectorComponent, selector: "ng-component", ngImport: i0, template: "<mat-nav-list>\n <mat-list-item (click)=\"selection = facet; close()\" *ngFor=\"let facet of facets\">\n <a matLine>{{ facet.display }}</a>\n </mat-list-item>\n</mat-nav-list>\n", styles: [":host .mat-nav-list{padding:0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4$4.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { kind: "component", type: i4$4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { kind: "directive", type: i1$4.MatLine, selector: "[mat-line], [matLine]" }] });
6710
7020
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FacetSelectorComponent, decorators: [{
6711
7021
  type: Component,
6712
7022
  args: [{ template: "<mat-nav-list>\n <mat-list-item (click)=\"selection = facet; close()\" *ngFor=\"let facet of facets\">\n <a matLine>{{ facet.display }}</a>\n </mat-list-item>\n</mat-nav-list>\n", styles: [":host .mat-nav-list{padding:0}\n"] }]
@@ -6717,7 +7027,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
6717
7027
 
6718
7028
  // Required to check invalid fields when initializing natural-search
6719
7029
  class AlwaysErrorStateMatcher {
6720
- isErrorState(control, form) {
7030
+ isErrorState(control) {
6721
7031
  return !!control && control.invalid;
6722
7032
  }
6723
7033
  }
@@ -6819,7 +7129,7 @@ class NaturalInputComponent {
6819
7129
  this.dropdownComponentRef.destroy();
6820
7130
  }
6821
7131
  }
6822
- ngOnChanges(changes) {
7132
+ ngOnChanges() {
6823
7133
  if (!this.facets && this.selection) {
6824
7134
  setTimeout(() => this.clear());
6825
7135
  }
@@ -7000,7 +7310,7 @@ class NaturalInputComponent {
7000
7310
  }
7001
7311
  }
7002
7312
  NaturalInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalInputComponent, deps: [{ token: i0.ElementRef }, { token: NaturalDropdownService }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Component });
7003
- NaturalInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalInputComponent, selector: "natural-input", inputs: { placeholder: "placeholder", searchFieldName: "searchFieldName", selection: "selection", facets: "facets" }, outputs: { selectionChange: "selectionChange", cleared: "cleared" }, host: { listeners: { "focus": "focus()" } }, viewQueries: [{ propertyName: "ripple", first: true, predicate: MatRipple, descendants: true, static: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- click condition should match to allow click action only when no other button is visible -->\n<mat-form-field #field matRipple (click)=\"!selection && !(facet && !selection) ? openDropdown() : null\">\n <mat-label *ngIf=\"facet\">{{ facet.display }}</mat-label>\n <mat-label *ngIf=\"!facet\">{{ placeholder }}</mat-label>\n\n <input\n #input\n (blur)=\"search($event)\"\n (keydown.enter)=\"search($event)\"\n [attr.size]=\"length\"\n [errorStateMatcher]=\"errorMatcher\"\n [formControl]=\"formCtrl\"\n [readonly]=\"(isDropdown() && !!selection) || isFlag()\"\n autocomplete=\"off\"\n matInput\n type=\"text\"\n />\n\n <!-- TODO : replace this void button -->\n <div *ngIf=\"!facet && !selection\" class=\"search-icon\" matPrefix>\n <natural-icon name=\"search\"></natural-icon>\n </div>\n\n <button (click)=\"clear()\" *ngIf=\"selection\" mat-icon-button matSuffix>\n <natural-icon name=\"close\"></natural-icon>\n </button>\n\n <button (click)=\"clear()\" *ngIf=\"facet && !selection\" mat-icon-button matSuffix>\n <natural-icon name=\"undo\"></natural-icon>\n </button>\n</mat-form-field>\n<div class=\"hide\">{{ formCtrl.value ? formCtrl.value : facet ? facet.display : placeholder }}</div>\n", styles: [":host{position:relative;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;flex-direction:column}:host .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}:host .hide{color:transparent;height:0;margin:0 50px 0 10px;font-size:inherit;white-space:nowrap;font-family:Roboto,Helvetica Neue,sans-serif}:host .search-icon{display:block;width:35px;height:35px}:host .search-icon natural-icon{margin:5px auto 0}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5$1.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: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }] });
7313
+ NaturalInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalInputComponent, selector: "natural-input", inputs: { placeholder: "placeholder", searchFieldName: "searchFieldName", selection: "selection", facets: "facets" }, outputs: { selectionChange: "selectionChange", cleared: "cleared" }, host: { listeners: { "focus": "focus()" } }, viewQueries: [{ propertyName: "ripple", first: true, predicate: MatRipple, descendants: true, static: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- click condition should match to allow click action only when no other button is visible -->\n<mat-form-field #field matRipple (click)=\"!selection && !(facet && !selection) ? openDropdown() : null\">\n <mat-label *ngIf=\"facet\">{{ facet.display }}</mat-label>\n <mat-label *ngIf=\"!facet\">{{ placeholder }}</mat-label>\n\n <input\n #input\n (blur)=\"search($event)\"\n (keydown.enter)=\"search($event)\"\n [attr.size]=\"length\"\n [errorStateMatcher]=\"errorMatcher\"\n [formControl]=\"formCtrl\"\n [readonly]=\"(isDropdown() && !!selection) || isFlag()\"\n autocomplete=\"off\"\n matInput\n type=\"text\"\n />\n\n <!-- TODO : replace this void button -->\n <div *ngIf=\"!facet && !selection\" class=\"search-icon\" matPrefix>\n <natural-icon name=\"search\"></natural-icon>\n </div>\n\n <button (click)=\"clear()\" *ngIf=\"selection\" mat-icon-button matSuffix>\n <natural-icon name=\"close\"></natural-icon>\n </button>\n\n <button (click)=\"clear()\" *ngIf=\"facet && !selection\" mat-icon-button matSuffix>\n <natural-icon name=\"undo\"></natural-icon>\n </button>\n</mat-form-field>\n<div class=\"hide\">{{ formCtrl.value ? formCtrl.value : facet ? facet.display : placeholder }}</div>\n", styles: [":host{position:relative;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;flex-direction:column}:host .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}:host .hide{color:transparent;height:0;margin:0 50px 0 10px;font-size:inherit;white-space:nowrap;font-family:Roboto,Helvetica Neue,sans-serif}:host .search-icon{display:block;width:35px;height:35px}:host .search-icon natural-icon{margin:5px auto 0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5.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: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }] });
7004
7314
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalInputComponent, decorators: [{
7005
7315
  type: Component,
7006
7316
  args: [{ selector: 'natural-input', template: "<!-- click condition should match to allow click action only when no other button is visible -->\n<mat-form-field #field matRipple (click)=\"!selection && !(facet && !selection) ? openDropdown() : null\">\n <mat-label *ngIf=\"facet\">{{ facet.display }}</mat-label>\n <mat-label *ngIf=\"!facet\">{{ placeholder }}</mat-label>\n\n <input\n #input\n (blur)=\"search($event)\"\n (keydown.enter)=\"search($event)\"\n [attr.size]=\"length\"\n [errorStateMatcher]=\"errorMatcher\"\n [formControl]=\"formCtrl\"\n [readonly]=\"(isDropdown() && !!selection) || isFlag()\"\n autocomplete=\"off\"\n matInput\n type=\"text\"\n />\n\n <!-- TODO : replace this void button -->\n <div *ngIf=\"!facet && !selection\" class=\"search-icon\" matPrefix>\n <natural-icon name=\"search\"></natural-icon>\n </div>\n\n <button (click)=\"clear()\" *ngIf=\"selection\" mat-icon-button matSuffix>\n <natural-icon name=\"close\"></natural-icon>\n </button>\n\n <button (click)=\"clear()\" *ngIf=\"facet && !selection\" mat-icon-button matSuffix>\n <natural-icon name=\"undo\"></natural-icon>\n </button>\n</mat-form-field>\n<div class=\"hide\">{{ formCtrl.value ? formCtrl.value : facet ? facet.display : placeholder }}</div>\n", styles: [":host{position:relative;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;flex-direction:column}:host .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}:host .hide{color:transparent;height:0;margin:0 50px 0 10px;font-size:inherit;white-space:nowrap;font-family:Roboto,Helvetica Neue,sans-serif}:host .search-icon{display:block;width:35px;height:35px}:host .search-icon natural-icon{margin:5px auto 0}\n"] }]
@@ -7050,7 +7360,7 @@ class NaturalGroupComponent {
7050
7360
  }
7051
7361
  }
7052
7362
  NaturalGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7053
- NaturalGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalGroupComponent, selector: "natural-group", inputs: { placeholder: "placeholder", facets: "facets", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "newValueInput", first: true, predicate: ["newValueInput"], descendants: true }], ngImport: i0, template: "<natural-input\n (cleared)=\"removeInput(i)\"\n (selectionChange)=\"updateInput($event, i)\"\n *ngFor=\"let selection of innerSelections; let i = index\"\n [facets]=\"facets\"\n [selection]=\"selection\"\n></natural-input>\n\n<natural-input\n #newValueInput\n (selectionChange)=\"addInput($event)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n tabIndex=\"10\"\n cdkFocusInitial\n></natural-input>\n", styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{flex:auto;display:inline-flex;margin-right:10px;margin-bottom:10px}:host natural-input:last-of-type{flex:1;min-width:250px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: NaturalInputComponent, selector: "natural-input", inputs: ["placeholder", "searchFieldName", "selection", "facets"], outputs: ["selectionChange", "cleared"] }] });
7363
+ NaturalGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalGroupComponent, selector: "natural-group", inputs: { placeholder: "placeholder", facets: "facets", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "newValueInput", first: true, predicate: ["newValueInput"], descendants: true }], ngImport: i0, template: "<natural-input\n (cleared)=\"removeInput(i)\"\n (selectionChange)=\"updateInput($event, i)\"\n *ngFor=\"let selection of innerSelections; let i = index\"\n [facets]=\"facets\"\n [selection]=\"selection\"\n></natural-input>\n\n<natural-input\n #newValueInput\n (selectionChange)=\"addInput($event)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n tabIndex=\"10\"\n cdkFocusInitial\n></natural-input>\n", styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{flex:auto;display:inline-flex;margin-right:10px;margin-bottom:10px}:host natural-input:last-of-type{flex:1;min-width:250px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: NaturalInputComponent, selector: "natural-input", inputs: ["placeholder", "searchFieldName", "selection", "facets"], outputs: ["selectionChange", "cleared"] }] });
7054
7364
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalGroupComponent, decorators: [{
7055
7365
  type: Component,
7056
7366
  args: [{ selector: 'natural-group', template: "<natural-input\n (cleared)=\"removeInput(i)\"\n (selectionChange)=\"updateInput($event, i)\"\n *ngFor=\"let selection of innerSelections; let i = index\"\n [facets]=\"facets\"\n [selection]=\"selection\"\n></natural-input>\n\n<natural-input\n #newValueInput\n (selectionChange)=\"addInput($event)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n tabIndex=\"10\"\n cdkFocusInitial\n></natural-input>\n", styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{flex:auto;display:inline-flex;margin-right:10px;margin-bottom:10px}:host natural-input:last-of-type{flex:1;min-width:250px}\n"] }]
@@ -7096,7 +7406,7 @@ class NaturalSearchComponent {
7096
7406
  set selections(selections) {
7097
7407
  this.innerSelections = selections && selections[0] ? deepClone(selections) : [[]];
7098
7408
  }
7099
- ngOnChanges(changes) {
7409
+ ngOnChanges() {
7100
7410
  if (!this.facets) {
7101
7411
  this.facets = [];
7102
7412
  }
@@ -7122,7 +7432,7 @@ class NaturalSearchComponent {
7122
7432
  }
7123
7433
  }
7124
7434
  NaturalSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7125
- NaturalSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSearchComponent, selector: "natural-search", inputs: { placeholder: "placeholder", facets: "facets", multipleGroups: "multipleGroups", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"natural-search\">\n <div class=\"groupsWrapper\">\n <ng-container *ngFor=\"let groupSelections of innerSelections; let i = index; let last = last\">\n <div class=\"groupWrapper\">\n <natural-group\n (selectionChange)=\"updateGroup($event, i)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n ></natural-group>\n\n <div class=\"endOfRowButton inGroup\">\n <button (click)=\"removeGroup(i)\" *ngIf=\"innerSelections.length > 1\" mat-icon-button>\n <natural-icon name=\"remove\"></natural-icon>\n </button>\n </div>\n\n <div class=\"endOfRowButton inGroup\">\n <button (click)=\"addGroup()\" *ngIf=\"last && multipleGroups\" mat-icon-button>\n <natural-icon name=\"add\"></natural-icon>\n </button>\n </div>\n\n <!-- Spaceholder to keep fields alignment (prevent to push until end of line)--->\n <div *ngIf=\"!last\" class=\"spacer\"></div>\n </div>\n <mat-divider *ngIf=\"!last\"></mat-divider>\n </ng-container>\n </div>\n\n <div class=\"endOfRowButton outOfGroup\">\n <button (click)=\"clear()\" mat-icon-button>\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host .natural-search{display:flex;flex-direction:row;align-items:flex-end}:host .natural-search .groupsWrapper{display:flex;flex-direction:column;flex:1;min-width:0}:host .natural-search .groupWrapper{display:flex;flex-direction:row;margin-bottom:10px;min-width:0}:host .natural-search .groupWrapper natural-group{flex:1;max-width:100%}:host .natural-search .groupWrapper:last-of-type{margin-bottom:0}:host .natural-search .groupWrapper .spacer{width:40px;height:40px}:host .natural-search .endOfRowButton{height:53px;display:flex;flex-direction:row;align-items:center;margin-bottom:10px}:host .natural-search mat-divider{margin:-10px 10px 10px 0}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "component", type: NaturalGroupComponent, selector: "natural-group", inputs: ["placeholder", "facets", "selections"], outputs: ["selectionChange"] }] });
7435
+ NaturalSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSearchComponent, selector: "natural-search", inputs: { placeholder: "placeholder", facets: "facets", multipleGroups: "multipleGroups", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"natural-search\">\n <div class=\"groupsWrapper\">\n <ng-container *ngFor=\"let groupSelections of innerSelections; let i = index; let last = last\">\n <div class=\"groupWrapper\">\n <natural-group\n (selectionChange)=\"updateGroup($event, i)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n ></natural-group>\n\n <div class=\"endOfRowButton inGroup\">\n <button (click)=\"removeGroup(i)\" *ngIf=\"innerSelections.length > 1\" mat-icon-button>\n <natural-icon name=\"remove\"></natural-icon>\n </button>\n </div>\n\n <div class=\"endOfRowButton inGroup\">\n <button (click)=\"addGroup()\" *ngIf=\"last && multipleGroups\" mat-icon-button>\n <natural-icon name=\"add\"></natural-icon>\n </button>\n </div>\n\n <!-- Spaceholder to keep fields alignment (prevent to push until end of line)--->\n <div *ngIf=\"!last\" class=\"spacer\"></div>\n </div>\n <mat-divider *ngIf=\"!last\"></mat-divider>\n </ng-container>\n </div>\n\n <div class=\"endOfRowButton outOfGroup\">\n <button (click)=\"clear()\" mat-icon-button>\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host .natural-search{display:flex;flex-direction:row;align-items:flex-end}:host .natural-search .groupsWrapper{display:flex;flex-direction:column;flex:1;min-width:0}:host .natural-search .groupWrapper{display:flex;flex-direction:row;margin-bottom:10px;min-width:0}:host .natural-search .groupWrapper natural-group{flex:1;max-width:100%}:host .natural-search .groupWrapper:last-of-type{margin-bottom:0}:host .natural-search .groupWrapper .spacer{width:40px;height:40px}:host .natural-search .endOfRowButton{height:53px;display:flex;flex-direction:row;align-items:center;margin-bottom:10px}:host .natural-search mat-divider{margin:-10px 10px 10px 0}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "component", type: NaturalGroupComponent, selector: "natural-group", inputs: ["placeholder", "facets", "selections"], outputs: ["selectionChange"] }] });
7126
7436
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSearchComponent, decorators: [{
7127
7437
  type: Component,
7128
7438
  args: [{ selector: 'natural-search', template: "<div class=\"natural-search\">\n <div class=\"groupsWrapper\">\n <ng-container *ngFor=\"let groupSelections of innerSelections; let i = index; let last = last\">\n <div class=\"groupWrapper\">\n <natural-group\n (selectionChange)=\"updateGroup($event, i)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n ></natural-group>\n\n <div class=\"endOfRowButton inGroup\">\n <button (click)=\"removeGroup(i)\" *ngIf=\"innerSelections.length > 1\" mat-icon-button>\n <natural-icon name=\"remove\"></natural-icon>\n </button>\n </div>\n\n <div class=\"endOfRowButton inGroup\">\n <button (click)=\"addGroup()\" *ngIf=\"last && multipleGroups\" mat-icon-button>\n <natural-icon name=\"add\"></natural-icon>\n </button>\n </div>\n\n <!-- Spaceholder to keep fields alignment (prevent to push until end of line)--->\n <div *ngIf=\"!last\" class=\"spacer\"></div>\n </div>\n <mat-divider *ngIf=\"!last\"></mat-divider>\n </ng-container>\n </div>\n\n <div class=\"endOfRowButton outOfGroup\">\n <button (click)=\"clear()\" mat-icon-button>\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host .natural-search{display:flex;flex-direction:row;align-items:flex-end}:host .natural-search .groupsWrapper{display:flex;flex-direction:column;flex:1;min-width:0}:host .natural-search .groupWrapper{display:flex;flex-direction:row;margin-bottom:10px;min-width:0}:host .natural-search .groupWrapper natural-group{flex:1;max-width:100%}:host .natural-search .groupWrapper:last-of-type{margin-bottom:0}:host .natural-search .groupWrapper .spacer{width:40px;height:40px}:host .natural-search .endOfRowButton{height:53px;display:flex;flex-direction:row;align-items:center;margin-bottom:10px}:host .natural-search mat-divider{margin:-10px 10px 10px 0}\n"] }]
@@ -7456,7 +7766,7 @@ class NaturalHierarchicSelectorComponent extends NaturalAbstractController {
7456
7766
  }
7457
7767
  }
7458
7768
  NaturalHierarchicSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalHierarchicSelectorComponent, deps: [{ token: NaturalHierarchicSelectorService }], target: i0.ɵɵFactoryTarget.Component });
7459
- NaturalHierarchicSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: { displayWith: "displayWith", config: "config", multiple: "multiple", selected: "selected", allowUnselect: "allowUnselect", filters: "filters", searchFacets: "searchFacets", searchSelections: "searchSelections" }, outputs: { searchSelectionChange: "searchSelectionChange", selectionChange: "selectionChange" }, providers: [NaturalHierarchicSelectorService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search\n (selectionChange)=\"search($event)\"\n [facets]=\"searchFacets\"\n [selections]=\"searchSelections\"\n ></natural-search>\n</div>\n\n<div class=\"body\">\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"36\"\n mode=\"indeterminate\"\n style=\"margin: 10px\"\n ></mat-progress-spinner>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n <button\n (click)=\"loadChildren(node)\"\n *ngIf=\"node.expandable\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n <mat-progress-spinner\n *ngIf=\"node.loading\"\n [diameter]=\"24\"\n [strokeWidth]=\"5\"\n mode=\"indeterminate\"\n style=\"margin: 8px\"\n ></mat-progress-spinner>\n\n <natural-icon\n *ngIf=\"!node.loading\"\n [name]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\"\n >\n </natural-icon>\n </button>\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n <natural-icon\n *ngIf=\"node.node.config.icon\"\n [name]=\"node.node.config.icon\"\n style=\"margin-right: 10px\"\n ></natural-icon>\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-list aria-orientation=\"vertical\" class=\"mat-chip-list-stacked\">\n <mat-chip\n (removed)=\"unselectModelNode(node)\"\n *ngFor=\"let node of selectedNodes\"\n [removable]=\"true\"\n [selectable]=\"false\"\n >\n <natural-icon *ngIf=\"node.config.icon\" [name]=\"node.config.icon\"></natural-icon>\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <natural-icon matChipRemove name=\"cancel\"></natural-icon>\n </mat-chip>\n </mat-chip-list>\n</div>\n\n<div *ngIf=\"!loading && !dataSource.data.length\" class=\"margin-v\" i18n>Aucun r\u00E9sultat</div>\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host natural-icon{width:18px;height:18px;font-size:18px;margin-right:5px}:host .mat-tree-node.leaf{margin-left:40px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-list{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-list{margin-left:10px}:host mat-chip{display:flex;flex-direction:row;height:auto!important}:host mat-chip .chip-label{flex:1}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i5$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i5$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i5$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i5$2.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "component", type: i8.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i8.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i8.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: NaturalSearchComponent, selector: "natural-search", inputs: ["placeholder", "facets", "multipleGroups", "selections"], outputs: ["selectionChange"] }] });
7769
+ NaturalHierarchicSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: { displayWith: "displayWith", config: "config", multiple: "multiple", selected: "selected", allowUnselect: "allowUnselect", filters: "filters", searchFacets: "searchFacets", searchSelections: "searchSelections" }, outputs: { searchSelectionChange: "searchSelectionChange", selectionChange: "selectionChange" }, providers: [NaturalHierarchicSelectorService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search\n (selectionChange)=\"search($event)\"\n [facets]=\"searchFacets\"\n [selections]=\"searchSelections\"\n ></natural-search>\n</div>\n\n<div class=\"body\">\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"36\"\n mode=\"indeterminate\"\n style=\"margin: 10px\"\n ></mat-progress-spinner>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n <button\n (click)=\"loadChildren(node)\"\n *ngIf=\"node.expandable\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n <mat-progress-spinner\n *ngIf=\"node.loading\"\n [diameter]=\"24\"\n [strokeWidth]=\"5\"\n mode=\"indeterminate\"\n style=\"margin: 8px\"\n ></mat-progress-spinner>\n\n <natural-icon\n *ngIf=\"!node.loading\"\n [name]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\"\n >\n </natural-icon>\n </button>\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n <natural-icon\n *ngIf=\"node.node.config.icon\"\n [name]=\"node.node.config.icon\"\n style=\"margin-right: 10px\"\n ></natural-icon>\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-list aria-orientation=\"vertical\" class=\"mat-chip-list-stacked\">\n <mat-chip\n (removed)=\"unselectModelNode(node)\"\n *ngFor=\"let node of selectedNodes\"\n [removable]=\"true\"\n [selectable]=\"false\"\n >\n <natural-icon *ngIf=\"node.config.icon\" [name]=\"node.config.icon\"></natural-icon>\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <natural-icon matChipRemove name=\"cancel\"></natural-icon>\n </mat-chip>\n </mat-chip-list>\n</div>\n\n<div *ngIf=\"!loading && !dataSource.data.length\" class=\"margin-v\" i18n>Aucun r\u00E9sultat</div>\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host natural-icon{width:18px;height:18px;font-size:18px;margin-right:5px}:host .mat-tree-node.leaf{margin-left:40px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-list{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-list{margin-left:10px}:host mat-chip{display:flex;flex-direction:row;height:auto!important}:host mat-chip .chip-label{flex:1}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i5$1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i5$1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i5$1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i5$1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i5$1.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "component", type: i7$2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "component", type: i8.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i8.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: i8.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: NaturalSearchComponent, selector: "natural-search", inputs: ["placeholder", "facets", "multipleGroups", "selections"], outputs: ["selectionChange"] }] });
7460
7770
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalHierarchicSelectorComponent, decorators: [{
7461
7771
  type: Component,
7462
7772
  args: [{ selector: 'natural-hierarchic-selector', providers: [NaturalHierarchicSelectorService], template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search\n (selectionChange)=\"search($event)\"\n [facets]=\"searchFacets\"\n [selections]=\"searchSelections\"\n ></natural-search>\n</div>\n\n<div class=\"body\">\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"36\"\n mode=\"indeterminate\"\n style=\"margin: 10px\"\n ></mat-progress-spinner>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n <button\n (click)=\"loadChildren(node)\"\n *ngIf=\"node.expandable\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n <mat-progress-spinner\n *ngIf=\"node.loading\"\n [diameter]=\"24\"\n [strokeWidth]=\"5\"\n mode=\"indeterminate\"\n style=\"margin: 8px\"\n ></mat-progress-spinner>\n\n <natural-icon\n *ngIf=\"!node.loading\"\n [name]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\"\n >\n </natural-icon>\n </button>\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n <natural-icon\n *ngIf=\"node.node.config.icon\"\n [name]=\"node.node.config.icon\"\n style=\"margin-right: 10px\"\n ></natural-icon>\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-list aria-orientation=\"vertical\" class=\"mat-chip-list-stacked\">\n <mat-chip\n (removed)=\"unselectModelNode(node)\"\n *ngFor=\"let node of selectedNodes\"\n [removable]=\"true\"\n [selectable]=\"false\"\n >\n <natural-icon *ngIf=\"node.config.icon\" [name]=\"node.config.icon\"></natural-icon>\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <natural-icon matChipRemove name=\"cancel\"></natural-icon>\n </mat-chip>\n </mat-chip-list>\n</div>\n\n<div *ngIf=\"!loading && !dataSource.data.length\" class=\"margin-v\" i18n>Aucun r\u00E9sultat</div>\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host natural-icon{width:18px;height:18px;font-size:18px;margin-right:5px}:host .mat-tree-node.leaf{margin-left:40px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-list{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-list{margin-left:10px}:host mat-chip{display:flex;flex-direction:row;height:auto!important}:host mat-chip .chip-label{flex:1}\n"] }]
@@ -7533,165 +7843,12 @@ class TypeHierarchicSelectorComponent extends AbstractAssociationSelectComponent
7533
7843
  }
7534
7844
  }
7535
7845
  TypeHierarchicSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeHierarchicSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7536
- TypeHierarchicSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeHierarchicSelectorComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-hierarchic-selector\n *ngIf=\"requireValueCtrl\"\n (selectionChange)=\"selectionChange($event)\"\n [config]=\"configuration.config\"\n [filters]=\"configuration.filters\"\n [multiple]=\"true\"\n [selected]=\"valueCtrl.value || {}\"\n style=\"margin-right: 20px\"\n ></natural-hierarchic-selector>\n</form>\n", dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: ["displayWith", "config", "multiple", "selected", "allowUnselect", "filters", "searchFacets", "searchSelections"], outputs: ["searchSelectionChange", "selectionChange"] }] });
7846
+ TypeHierarchicSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeHierarchicSelectorComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-hierarchic-selector\n *ngIf=\"requireValueCtrl\"\n (selectionChange)=\"selectionChange($event)\"\n [config]=\"configuration.config\"\n [filters]=\"configuration.filters\"\n [multiple]=\"true\"\n [selected]=\"valueCtrl.value || {}\"\n style=\"margin-right: 20px\"\n ></natural-hierarchic-selector>\n</form>\n", dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: ["displayWith", "config", "multiple", "selected", "allowUnselect", "filters", "searchFacets", "searchSelections"], outputs: ["searchSelectionChange", "selectionChange"] }] });
7537
7847
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeHierarchicSelectorComponent, decorators: [{
7538
7848
  type: Component,
7539
7849
  args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-hierarchic-selector\n *ngIf=\"requireValueCtrl\"\n (selectionChange)=\"selectionChange($event)\"\n [config]=\"configuration.config\"\n [filters]=\"configuration.filters\"\n [multiple]=\"true\"\n [selected]=\"valueCtrl.value || {}\"\n style=\"margin-right: 20px\"\n ></natural-hierarchic-selector>\n</form>\n" }]
7540
7850
  }] });
7541
7851
 
7542
- /**
7543
- * Get only date, without time and ignoring entirely the timezone
7544
- */
7545
- function serialize(dateAdapter, value) {
7546
- if (!value) {
7547
- return '';
7548
- }
7549
- const y = dateAdapter.getYear(value);
7550
- const m = dateAdapter.getMonth(value) + 1;
7551
- const d = dateAdapter.getDate(value);
7552
- return y + '-' + (m < 10 ? '0' : '') + m + '-' + (d < 10 ? '0' : '') + d;
7553
- }
7554
- /**
7555
- * Min date validator
7556
- */
7557
- function dateMin(dateAdapter, min) {
7558
- return (control) => {
7559
- if (control.value && dateAdapter.compareDate(control.value, min) < 0) {
7560
- return { min: true };
7561
- }
7562
- return null;
7563
- };
7564
- }
7565
- /**
7566
- * Max date validator
7567
- */
7568
- function dateMax(dateAdapter, max) {
7569
- return (control) => {
7570
- if (control.value && dateAdapter.compareDate(control.value, max) > 0) {
7571
- return { max: true };
7572
- }
7573
- return null;
7574
- };
7575
- }
7576
-
7577
- class TypeDateComponent {
7578
- constructor(data, dateAdapter, dateFormats) {
7579
- this.dateAdapter = dateAdapter;
7580
- this.dateFormats = dateFormats;
7581
- this.renderedValue = new BehaviorSubject('');
7582
- this.operatorCtrl = new FormControl('equal', { nonNullable: true });
7583
- this.valueCtrl = new FormControl(null);
7584
- this.operators = possibleComparableOperators;
7585
- this.form = new FormGroup({
7586
- operator: this.operatorCtrl,
7587
- value: this.valueCtrl,
7588
- });
7589
- this.defaults = {
7590
- min: null,
7591
- max: null,
7592
- };
7593
- this.configuration = { ...this.defaults, ...data.configuration };
7594
- merge$1(this.operatorCtrl.valueChanges, this.valueCtrl.valueChanges).subscribe(() => {
7595
- this.renderedValue.next(this.getRenderedValue());
7596
- });
7597
- this.initValidators();
7598
- this.reloadCondition(data.condition);
7599
- }
7600
- getCondition() {
7601
- if (!this.valueCtrl.value) {
7602
- return {};
7603
- }
7604
- const condition = {};
7605
- let operator = this.operatorCtrl.value;
7606
- let date = this.valueCtrl.value;
7607
- const dayAfter = this.getDayAfter(date);
7608
- if (operator === 'equal') {
7609
- condition.greaterOrEqual = {
7610
- value: serialize(this.dateAdapter, date),
7611
- };
7612
- condition.less = {
7613
- value: serialize(this.dateAdapter, dayAfter),
7614
- };
7615
- }
7616
- else {
7617
- // Transparently adapt exclusive/inclusive ranges
7618
- if (operator === 'greater') {
7619
- operator = 'greaterOrEqual';
7620
- date = dayAfter;
7621
- }
7622
- else if (operator === 'lessOrEqual') {
7623
- operator = 'less';
7624
- date = dayAfter;
7625
- }
7626
- condition[operator] = {
7627
- value: serialize(this.dateAdapter, date),
7628
- };
7629
- }
7630
- return condition;
7631
- }
7632
- isValid() {
7633
- return this.form.valid;
7634
- }
7635
- isDirty() {
7636
- return this.form.dirty;
7637
- }
7638
- reloadCondition(condition) {
7639
- if (!condition) {
7640
- return;
7641
- }
7642
- // Special case for '='
7643
- if (condition.greaterOrEqual && condition.less) {
7644
- this.operatorCtrl.setValue('equal');
7645
- const value = this.dateAdapter.deserialize(condition.greaterOrEqual.value);
7646
- this.valueCtrl.setValue(value);
7647
- return;
7648
- }
7649
- for (const operator of this.operators) {
7650
- const reloadedOperator = condition[operator.key];
7651
- if (reloadedOperator) {
7652
- this.operatorCtrl.setValue(operator.key);
7653
- const value = this.dateAdapter.deserialize(reloadedOperator.value);
7654
- this.valueCtrl.setValue(value);
7655
- }
7656
- }
7657
- }
7658
- initValidators() {
7659
- const validators = [Validators.required];
7660
- if (this.configuration.min) {
7661
- validators.push(dateMin(this.dateAdapter, this.configuration.min));
7662
- }
7663
- if (this.configuration.max) {
7664
- validators.push(dateMax(this.dateAdapter, this.configuration.max));
7665
- }
7666
- this.valueCtrl.setValidators(validators);
7667
- }
7668
- getDayAfter(date) {
7669
- return this.dateAdapter.addCalendarDays(this.dateAdapter.clone(date), 1);
7670
- }
7671
- getRenderedValue() {
7672
- const operator = this.operators.find(v => v.key === this.operatorCtrl.value);
7673
- if (this.valueCtrl.value === null || !operator) {
7674
- return '';
7675
- }
7676
- else {
7677
- const value = this.dateAdapter.format(this.valueCtrl.value, this.dateFormats.display.dateInput);
7678
- return operator.label + ' ' + value;
7679
- }
7680
- }
7681
- }
7682
- TypeDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: i1$7.DateAdapter }, { token: MAT_DATE_FORMATS }], target: i0.ɵɵFactoryTarget.Component });
7683
- TypeDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeDateComponent, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 4em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error>\n <span *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</span>\n <span *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</span>\n <span *ngIf=\"valueCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.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: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$7.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
7684
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateComponent, decorators: [{
7685
- type: Component,
7686
- args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 4em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error>\n <span *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</span>\n <span *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</span>\n <span *ngIf=\"valueCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n</form>\n" }]
7687
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
7688
- type: Inject,
7689
- args: [NATURAL_DROPDOWN_DATA]
7690
- }] }, { type: i1$7.DateAdapter }, { type: undefined, decorators: [{
7691
- type: Inject,
7692
- args: [MAT_DATE_FORMATS]
7693
- }] }]; } });
7694
-
7695
7852
  class InvalidWithValueStateMatcher {
7696
7853
  isErrorState(control, form) {
7697
7854
  return (form && form.invalid && (form.value.to || form.value.from)) || (control && control.invalid);
@@ -7720,7 +7877,7 @@ function toGreaterThanFrom(dateAdapter) {
7720
7877
  /**
7721
7878
  * Date range with mandatory bounding dates.
7722
7879
  *
7723
- * If you need ooptional bounding date, then use `TypeDateComponent` instead.
7880
+ * If you need optional bounding date, then use `TypeDateComponent` instead.
7724
7881
  */
7725
7882
  class TypeDateRangeComponent {
7726
7883
  constructor(data, dateAdapter, dateFormats) {
@@ -7803,15 +7960,15 @@ class TypeDateRangeComponent {
7803
7960
  }
7804
7961
  }
7805
7962
  }
7806
- TypeDateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateRangeComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: i1$7.DateAdapter }, { token: MAT_DATE_FORMATS }], target: i0.ɵɵFactoryTarget.Component });
7807
- TypeDateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeDateRangeComponent, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error>\n <span *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error>\n <span *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">< {{ configuration.min }}</span>\n <span *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">> {{ configuration.max }}</span>\n <span *ngIf=\"toCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.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: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] });
7963
+ TypeDateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateRangeComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: i1$4.DateAdapter }, { token: MAT_DATE_FORMATS }], target: i0.ɵɵFactoryTarget.Component });
7964
+ TypeDateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeDateRangeComponent, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">\n < {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">\n > {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.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: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] });
7808
7965
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateRangeComponent, decorators: [{
7809
7966
  type: Component,
7810
- args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error>\n <span *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error>\n <span *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">< {{ configuration.min }}</span>\n <span *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">> {{ configuration.max }}</span>\n <span *ngIf=\"toCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n</form>\n" }]
7967
+ args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">\n < {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">\n > {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n</form>\n" }]
7811
7968
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
7812
7969
  type: Inject,
7813
7970
  args: [NATURAL_DROPDOWN_DATA]
7814
- }] }, { type: i1$7.DateAdapter }, { type: undefined, decorators: [{
7971
+ }] }, { type: i1$4.DateAdapter }, { type: undefined, decorators: [{
7815
7972
  type: Inject,
7816
7973
  args: [MAT_DATE_FORMATS]
7817
7974
  }] }]; } });
@@ -8084,7 +8241,7 @@ class NaturalSelectHierarchicComponent extends AbstractSelect {
8084
8241
  }
8085
8242
  }
8086
8243
  NaturalSelectHierarchicComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSelectHierarchicComponent, deps: [{ token: NaturalHierarchicSelectorDialogService }, { token: i3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
8087
- NaturalSelectHierarchicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSelectHierarchicComponent, selector: "natural-select-hierarchic", inputs: { selectLabel: "selectLabel", config: "config", filters: "filters" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatPlaceholder\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n (keydown.esc)=\"clear()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n <natural-icon *ngIf=\"showIcon\" [name]=\"icon\" matPrefix></natural-icon>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <natural-icon name=\"open_in_browser\"></natural-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showSelectButton() || showClearButton()\" class=\"external-buttons\">\n <button (click)=\"openDialog()\" *ngIf=\"showSelectButton()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5$1.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: "directive", type: i7.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }] });
8244
+ NaturalSelectHierarchicComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSelectHierarchicComponent, selector: "natural-select-hierarchic", inputs: { selectLabel: "selectLabel", config: "config", filters: "filters" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field [floatLabel]=\"floatPlaceholder\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n (keydown.esc)=\"clear()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n <natural-icon *ngIf=\"showIcon\" [name]=\"icon\" matPrefix></natural-icon>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <natural-icon name=\"open_in_browser\"></natural-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showSelectButton() || showClearButton()\" class=\"external-buttons\">\n <button (click)=\"openDialog()\" *ngIf=\"showSelectButton()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i5.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: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }] });
8088
8245
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSelectHierarchicComponent, decorators: [{
8089
8246
  type: Component,
8090
8247
  args: [{ selector: 'natural-select-hierarchic', template: "<mat-form-field [floatLabel]=\"floatPlaceholder\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n (keydown.esc)=\"clear()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n <natural-icon *ngIf=\"showIcon\" [name]=\"icon\" matPrefix></natural-icon>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <natural-icon name=\"close\"></natural-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <natural-icon name=\"open_in_browser\"></natural-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showSelectButton() || showClearButton()\" class=\"external-buttons\">\n <button (click)=\"openDialog()\" *ngIf=\"showSelectButton()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"] }]
@@ -8104,7 +8261,6 @@ class NaturalSelectEnumComponent extends AbstractSelect {
8104
8261
  constructor(enumService, ngControl) {
8105
8262
  super(ngControl);
8106
8263
  this.enumService = enumService;
8107
- this.ngControl = ngControl;
8108
8264
  /**
8109
8265
  * Whether the user should be allowed to select multiple options
8110
8266
  */
@@ -8119,7 +8275,7 @@ class NaturalSelectEnumComponent extends AbstractSelect {
8119
8275
  }
8120
8276
  }
8121
8277
  NaturalSelectEnumComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSelectEnumComponent, deps: [{ token: NaturalEnumService }, { token: i3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
8122
- NaturalSelectEnumComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSelectEnumComponent, selector: "natural-select-enum", inputs: { enumName: "enumName", nullLabel: "nullLabel", optionDisabled: "optionDisabled", multiple: "multiple" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"touch(); blur.emit()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n <mat-option *ngIf=\"nullLabel\" [value]=\"null\">{{ nullLabel }}</mat-option>\n <mat-option\n *ngFor=\"let item of items | async\"\n [value]=\"item.value\"\n [disabled]=\"optionDisabled ? optionDisabled(item) : false\"\n >\n {{ item.name | capitalize }}\n </mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error></mat-form-field\n>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "component", type: i4$4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }] });
8278
+ NaturalSelectEnumComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSelectEnumComponent, selector: "natural-select-enum", inputs: { enumName: "enumName", nullLabel: "nullLabel", optionDisabled: "optionDisabled", multiple: "multiple" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"touch(); blur.emit()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n <mat-option *ngIf=\"nullLabel\" [value]=\"null\">{{ nullLabel }}</mat-option>\n <mat-option\n *ngFor=\"let item of items | async\"\n [value]=\"item.value\"\n [disabled]=\"optionDisabled ? optionDisabled(item) : false\"\n >\n {{ item.name | capitalize }}\n </mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error></mat-form-field\n>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$4.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }] });
8123
8279
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSelectEnumComponent, decorators: [{
8124
8280
  type: Component,
8125
8281
  args: [{ selector: 'natural-select-enum', template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"touch(); blur.emit()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n <mat-option *ngIf=\"nullLabel\" [value]=\"null\">{{ nullLabel }}</mat-option>\n <mat-option\n *ngFor=\"let item of items | async\"\n [value]=\"item.value\"\n [disabled]=\"optionDisabled ? optionDisabled(item) : false\"\n >\n {{ item.name | capitalize }}\n </mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error></mat-form-field\n>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
@@ -8443,7 +8599,7 @@ class NaturalAbstractFile extends NaturalAbstractController {
8443
8599
  this.multiple = false;
8444
8600
  /**
8445
8601
  * Comma-separated list of unique file type specifiers. Like the native element
8446
- * it can be a mixed of mime-type and file extensions.
8602
+ * it can be a mix of mime-type and file extensions.
8447
8603
  *
8448
8604
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
8449
8605
  */
@@ -8774,23 +8930,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
8774
8930
 
8775
8931
  // @dynamic
8776
8932
  class FileComponent {
8777
- constructor(naturalFileService, sanitizer, document) {
8933
+ constructor(naturalFileService, alertService, sanitizer, document) {
8778
8934
  this.naturalFileService = naturalFileService;
8935
+ this.alertService = alertService;
8779
8936
  this.sanitizer = sanitizer;
8780
8937
  this.document = document;
8781
8938
  this.height = 250;
8782
8939
  this.action = null;
8783
8940
  this.backgroundSize = 'contain';
8784
8941
  /**
8785
- * Comma separated list of accepted mimetypes
8942
+ * Comma-separated list of unique file type specifiers. Like the native element
8943
+ * it can be a mix of mime-type and file extensions.
8944
+ *
8945
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
8786
8946
  */
8787
8947
  this.accept = 'image/bmp,image/gif,image/jpeg,image/pjpeg,image/png,image/svg+xml,image/svg,image/webp';
8788
8948
  this.model = null;
8789
8949
  /**
8790
- * If provided, get updated on change
8791
- * Is not used for reading -> use [model]
8950
+ * If provided, its value will get updated when the model changes.
8951
+ * But its value is never read, so if you want to set a value use `[model]` instead.
8792
8952
  */
8793
8953
  this.formCtrl = null;
8954
+ /**
8955
+ * This **must not** be used to mutate the server, because it is very likely it will never be called if the
8956
+ * human navigates away from the page before the upload is finished. Instead, you should use `[uploader]`.
8957
+ */
8794
8958
  this.modelChange = new EventEmitter();
8795
8959
  this.imagePreview = null;
8796
8960
  this.filePreview = null;
@@ -8809,15 +8973,14 @@ class FileComponent {
8809
8973
  if (this.formCtrl) {
8810
8974
  this.formCtrl.setValue(this.model);
8811
8975
  }
8812
- if (this.service) {
8813
- this.service.create(this.model).subscribe(result => {
8814
- this.model = result;
8815
- this.modelChange.emit(result);
8816
- });
8817
- }
8818
- else {
8976
+ const observable = this.uploader?.(file).pipe(tap$1(() => this.alertService.info($localize `Mis à jour`))) ?? of(this.model);
8977
+ observable.subscribe(result => {
8978
+ this.model = result;
8979
+ if (this.formCtrl) {
8980
+ this.formCtrl.setValue(this.model);
8981
+ }
8819
8982
  this.modelChange.emit(this.model);
8820
- }
8983
+ });
8821
8984
  }
8822
8985
  getDownloadLink() {
8823
8986
  if (this.action !== 'download') {
@@ -8875,12 +9038,12 @@ class FileComponent {
8875
9038
  return subject.asObservable();
8876
9039
  }
8877
9040
  }
8878
- FileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FileComponent, deps: [{ token: NaturalFileService }, { token: i2$2.DomSanitizer }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
8879
- FileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: FileComponent, selector: "natural-file", inputs: { height: "height", action: "action", backgroundSize: "backgroundSize", accept: "accept", service: "service", model: "model", formCtrl: "formCtrl" }, outputs: { modelChange: "modelChange" }, host: { properties: { "style.height.px": "this.height" } }, usesOnChanges: true, ngImport: i0, template: "<a\n (fileChange)=\"upload($event)\"\n naturalFileDrop\n [selectable]=\"true\"\n [accept]=\"accept\"\n [attr.href]=\"getDownloadLink()\"\n [class.has-action]=\"!!action\"\n [class.suggest-upload]=\"!model && action === 'upload'\"\n [fileSelectionDisabled]=\"action !== 'upload'\"\n [matRippleDisabled]=\"!action\"\n [style.backgroundImage]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n <div *ngIf=\"filePreview\" class=\"file-preview\">\n <natural-icon [size]=\"height * 0.33\" name=\"attachment\"></natural-icon>\n {{ filePreview | uppercase }}\n </div>\n\n <div class=\"action-overlay\">\n <natural-icon *ngIf=\"action === 'upload'\" [size]=\"height * 0.66\" name=\"cloud_upload\"></natural-icon>\n <natural-icon *ngIf=\"action === 'download'\" [size]=\"height * 0.66\" name=\"get_app\"></natural-icon>\n {{ action | capitalize }}\n </div>\n</a>\n", styles: [":host{display:flex;flex-direction:row;overflow:hidden;position:relative}:host>a{position:relative;flex:1;background-position:center;background-repeat:no-repeat}:host>a.has-action{cursor:pointer}:host>a.has-action.suggest-upload .action-overlay{opacity:.66}:host>a.has-action:hover .action-overlay,:host>a.has-action.natural-file-over .action-overlay{opacity:1}:host .action-overlay,:host .file-preview{display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0;justify-content:center;align-items:center;font-size:36px;line-height:1.3em;text-align:center}:host .action-overlay{opacity:0}:host .action-overlay>div{opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "directive", type: i1$7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: NaturalFileDropDirective, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: ["fileOver"] }, { kind: "pipe", type: i1$3.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }] });
9041
+ FileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FileComponent, deps: [{ token: NaturalFileService }, { token: NaturalAlertService }, { token: i2$2.DomSanitizer }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
9042
+ FileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: FileComponent, selector: "natural-file", inputs: { height: "height", action: "action", backgroundSize: "backgroundSize", accept: "accept", uploader: "uploader", model: "model", formCtrl: "formCtrl" }, outputs: { modelChange: "modelChange" }, host: { properties: { "style.height.px": "this.height" } }, usesOnChanges: true, ngImport: i0, template: "<a\n (fileChange)=\"upload($event)\"\n naturalFileDrop\n [selectable]=\"true\"\n [accept]=\"accept\"\n [attr.href]=\"getDownloadLink()\"\n [class.has-action]=\"!!action\"\n [class.suggest-upload]=\"!model && action === 'upload'\"\n [fileSelectionDisabled]=\"action !== 'upload'\"\n [matRippleDisabled]=\"!action\"\n [style.backgroundImage]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n <div *ngIf=\"filePreview\" class=\"file-preview\">\n <natural-icon [size]=\"height * 0.33\" name=\"attachment\"></natural-icon>\n {{ filePreview | uppercase }}\n </div>\n\n <div class=\"action-overlay\">\n <natural-icon *ngIf=\"action === 'upload'\" [size]=\"height * 0.66\" name=\"cloud_upload\"></natural-icon>\n <natural-icon *ngIf=\"action === 'download'\" [size]=\"height * 0.66\" name=\"get_app\"></natural-icon>\n {{ action | capitalize }}\n </div>\n</a>\n", styles: [":host{display:flex;flex-direction:row;overflow:hidden;position:relative}:host>a{position:relative;flex:1;background-position:center;background-repeat:no-repeat}:host>a.has-action{cursor:pointer}:host>a.has-action.suggest-upload .action-overlay{opacity:.66}:host>a.has-action:hover .action-overlay,:host>a.has-action.natural-file-over .action-overlay{opacity:1}:host .action-overlay,:host .file-preview{display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0;justify-content:center;align-items:center;font-size:36px;line-height:1.3em;text-align:center}:host .action-overlay{opacity:0}:host .action-overlay>div{opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "directive", type: i1$4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: NaturalFileDropDirective, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: ["fileOver"] }, { kind: "pipe", type: i1$2.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }] });
8880
9043
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FileComponent, decorators: [{
8881
9044
  type: Component,
8882
9045
  args: [{ selector: 'natural-file', template: "<a\n (fileChange)=\"upload($event)\"\n naturalFileDrop\n [selectable]=\"true\"\n [accept]=\"accept\"\n [attr.href]=\"getDownloadLink()\"\n [class.has-action]=\"!!action\"\n [class.suggest-upload]=\"!model && action === 'upload'\"\n [fileSelectionDisabled]=\"action !== 'upload'\"\n [matRippleDisabled]=\"!action\"\n [style.backgroundImage]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n <div *ngIf=\"filePreview\" class=\"file-preview\">\n <natural-icon [size]=\"height * 0.33\" name=\"attachment\"></natural-icon>\n {{ filePreview | uppercase }}\n </div>\n\n <div class=\"action-overlay\">\n <natural-icon *ngIf=\"action === 'upload'\" [size]=\"height * 0.66\" name=\"cloud_upload\"></natural-icon>\n <natural-icon *ngIf=\"action === 'download'\" [size]=\"height * 0.66\" name=\"get_app\"></natural-icon>\n {{ action | capitalize }}\n </div>\n</a>\n", styles: [":host{display:flex;flex-direction:row;overflow:hidden;position:relative}:host>a{position:relative;flex:1;background-position:center;background-repeat:no-repeat}:host>a.has-action{cursor:pointer}:host>a.has-action.suggest-upload .action-overlay{opacity:.66}:host>a.has-action:hover .action-overlay,:host>a.has-action.natural-file-over .action-overlay{opacity:1}:host .action-overlay,:host .file-preview{display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0;justify-content:center;align-items:center;font-size:36px;line-height:1.3em;text-align:center}:host .action-overlay{opacity:0}:host .action-overlay>div{opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}\n"] }]
8883
- }], ctorParameters: function () { return [{ type: NaturalFileService }, { type: i2$2.DomSanitizer }, { type: Document, decorators: [{
9046
+ }], ctorParameters: function () { return [{ type: NaturalFileService }, { type: NaturalAlertService }, { type: i2$2.DomSanitizer }, { type: Document, decorators: [{
8884
9047
  type: Inject,
8885
9048
  args: [DOCUMENT]
8886
9049
  }] }]; }, propDecorators: { height: [{
@@ -8894,7 +9057,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
8894
9057
  type: Input
8895
9058
  }], accept: [{
8896
9059
  type: Input
8897
- }], service: [{
9060
+ }], uploader: [{
8898
9061
  type: Input
8899
9062
  }], model: [{
8900
9063
  type: Input
@@ -8935,7 +9098,7 @@ NaturalFixedButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
8935
9098
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalFixedButtonComponent, decorators: [{
8936
9099
  type: Component,
8937
9100
  args: [{ selector: 'natural-fixed-button', template: "<button\n [color]=\"color\"\n [disabled]=\"disabled\"\n [routerLink]=\"link\"\n class=\"floating-button bottom-right\"\n mat-fab\n mat-raised-button\n>\n <natural-icon [name]=\"icon\"></natural-icon>\n</button>\n", styles: [":host{position:fixed!important;z-index:999;bottom:32px;right:32px}\n"] }]
8938
- }], ctorParameters: function () { return []; }, propDecorators: { icon: [{
9101
+ }], propDecorators: { icon: [{
8939
9102
  type: Input
8940
9103
  }], link: [{
8941
9104
  type: Input
@@ -8994,7 +9157,7 @@ class NaturalFixedButtonDetailComponent extends NaturalAbstractController {
8994
9157
  }
8995
9158
  }
8996
9159
  NaturalFixedButtonDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalFixedButtonDetailComponent, deps: [{ token: i2$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
8997
- NaturalFixedButtonDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalFixedButtonDetailComponent, selector: "natural-fixed-button-detail", inputs: { model: "model", form: "form" }, outputs: { create: "create", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<natural-fixed-button\n (click)=\"clickCreate()\"\n *ngIf=\"isCreation\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n></natural-fixed-button>\n\n<natural-fixed-button\n (click)=\"clickDelete()\"\n *ngIf=\"!isCreation && (!model.permissions || model.permissions.delete)\"\n [disabled]=\"form.disabled\"\n class=\"detail-speed-dial\"\n color=\"warn\"\n icon=\"delete_forever\"\n i18n-matTooltip\n matTooltip=\"Supprimer d\u00E9finitivement\"\n matTooltipPosition=\"left\"\n></natural-fixed-button>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalFixedButtonComponent, selector: "natural-fixed-button", inputs: ["icon", "link", "color", "disabled"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
9160
+ NaturalFixedButtonDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalFixedButtonDetailComponent, selector: "natural-fixed-button-detail", inputs: { model: "model", form: "form" }, outputs: { create: "create", delete: "delete" }, usesInheritance: true, ngImport: i0, template: "<natural-fixed-button\n (click)=\"clickCreate()\"\n *ngIf=\"isCreation\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n></natural-fixed-button>\n\n<natural-fixed-button\n (click)=\"clickDelete()\"\n *ngIf=\"!isCreation && (!model.permissions || model.permissions.delete)\"\n [disabled]=\"form.disabled\"\n class=\"detail-speed-dial\"\n color=\"warn\"\n icon=\"delete_forever\"\n i18n-matTooltip\n matTooltip=\"Supprimer d\u00E9finitivement\"\n matTooltipPosition=\"left\"\n></natural-fixed-button>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalFixedButtonComponent, selector: "natural-fixed-button", inputs: ["icon", "link", "color", "disabled"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
8998
9161
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalFixedButtonDetailComponent, decorators: [{
8999
9162
  type: Component,
9000
9163
  args: [{ selector: 'natural-fixed-button-detail', template: "<natural-fixed-button\n (click)=\"clickCreate()\"\n *ngIf=\"isCreation\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n></natural-fixed-button>\n\n<natural-fixed-button\n (click)=\"clickDelete()\"\n *ngIf=\"!isCreation && (!model.permissions || model.permissions.delete)\"\n [disabled]=\"form.disabled\"\n class=\"detail-speed-dial\"\n color=\"warn\"\n icon=\"delete_forever\"\n i18n-matTooltip\n matTooltip=\"Supprimer d\u00E9finitivement\"\n matTooltipPosition=\"left\"\n></natural-fixed-button>\n" }]
@@ -9221,7 +9384,7 @@ class NaturalPanelsService {
9221
9384
  const originalErrorHandler = this.router.errorHandler;
9222
9385
  // Nullify error handler (will be de-neutralized after route redirection)
9223
9386
  if (config) {
9224
- this.router.errorHandler = () => { };
9387
+ this.router.errorHandler = () => undefined;
9225
9388
  }
9226
9389
  // Navigate to same url + /risk/new Result : /risk/risk/new
9227
9390
  const newUrl = config.map(conf => segmentsToString(conf.route.segments)).join('/');
@@ -9478,7 +9641,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
9478
9641
  * Url fallback matcher to be used instead of `path: '**'` when Panel system
9479
9642
  * is used in the project.
9480
9643
  */
9481
- const fallbackIfNoOpenedPanels = (segments, group, route) => {
9644
+ const fallbackIfNoOpenedPanels = (segments) => {
9482
9645
  if (!NaturalPanelsService.opened) {
9483
9646
  return { consumed: segments };
9484
9647
  }
@@ -9543,7 +9706,7 @@ class NaturalRelationsComponent extends NaturalAbstractController {
9543
9706
  this.disabled = this.disabled || !this.main.permissions.update;
9544
9707
  }
9545
9708
  }
9546
- ngOnChanges(changes) {
9709
+ ngOnChanges() {
9547
9710
  if (this.service) {
9548
9711
  this.queryItems();
9549
9712
  }
@@ -9643,7 +9806,7 @@ class NaturalRelationsComponent extends NaturalAbstractController {
9643
9806
  }
9644
9807
  }
9645
9808
  NaturalRelationsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalRelationsComponent, deps: [{ token: NaturalLinkMutationService }, { token: NaturalHierarchicSelectorDialogService }], target: i0.ɵɵFactoryTarget.Component });
9646
- NaturalRelationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalRelationsComponent, selector: "natural-relations", inputs: { service: "service", placeholder: "placeholder", autocompleteSelectorFilter: "autocompleteSelectorFilter", displayWith: "displayWith", disabled: "disabled", main: "main", hierarchicSelectorFilters: "hierarchicSelectorFilters", hierarchicSelectorConfig: "hierarchicSelectorConfig", otherName: "otherName", filter: "filter" }, outputs: { selectionChange: "selectionChange" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "select", first: true, predicate: NaturalSelectComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n ></ng-template>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n <button\n *ngIf=\"!disabled\"\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <natural-icon name=\"link_off\"></natural-icon>\n </button>\n </td>\n </ng-container>\n </table>\n\n <mat-paginator\n (page)=\"pagination($event)\"\n *ngIf=\"dataSource?.data && (dataSource?.data?.length || 0) > (dataSource?.data?.pageSize || 0)\"\n [length]=\"dataSource?.data?.length || 0\"\n [pageIndex]=\"dataSource?.data?.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource?.data?.pageSize || 0\"\n ></mat-paginator>\n\n <div *ngIf=\"!loading && dataSource?.data?.length === 0\" class=\"margin-v mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n\n <mat-progress-spinner *ngIf=\"loading\" [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\"></mat-progress-spinner>\n</div>\n\n<natural-select\n #select\n (selectionChange)=\"addRelations([$any($event)])\"\n *ngIf=\"!hierarchicSelectorConfig && service && !disabled\"\n [displayWith]=\"getDisplayFn()\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n></natural-select>\n\n<div *ngIf=\"hierarchicSelectorConfig && !disabled\">\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "component", type: i7$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i7$2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7$2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "filter", "disabled"] }, { kind: "component", type: i9.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
9809
+ NaturalRelationsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalRelationsComponent, selector: "natural-relations", inputs: { service: "service", placeholder: "placeholder", autocompleteSelectorFilter: "autocompleteSelectorFilter", displayWith: "displayWith", disabled: "disabled", main: "main", hierarchicSelectorFilters: "hierarchicSelectorFilters", hierarchicSelectorConfig: "hierarchicSelectorConfig", otherName: "otherName", filter: "filter" }, outputs: { selectionChange: "selectionChange" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "select", first: true, predicate: NaturalSelectComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n ></ng-template>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n <button\n *ngIf=\"!disabled\"\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <natural-icon name=\"link_off\"></natural-icon>\n </button>\n </td>\n </ng-container>\n </table>\n\n <mat-paginator\n (page)=\"pagination($event)\"\n *ngIf=\"dataSource?.data && (dataSource?.data?.length || 0) > (dataSource?.data?.pageSize || 0)\"\n [length]=\"dataSource?.data?.length || 0\"\n [pageIndex]=\"dataSource?.data?.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource?.data?.pageSize || 0\"\n ></mat-paginator>\n\n <div *ngIf=\"!loading && dataSource?.data?.length === 0\" class=\"margin-v mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n\n <mat-progress-spinner *ngIf=\"loading\" [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\"></mat-progress-spinner>\n</div>\n\n<natural-select\n #select\n (selectionChange)=\"addRelations([$any($event)])\"\n *ngIf=\"!hierarchicSelectorConfig && service && !disabled\"\n [displayWith]=\"getDisplayFn()\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n></natural-select>\n\n<div *ngIf=\"hierarchicSelectorConfig && !disabled\">\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "component", type: i7$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i7$3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7$3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "filter", "disabled"] }, { kind: "component", type: i9.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
9647
9810
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalRelationsComponent, decorators: [{
9648
9811
  type: Component,
9649
9812
  args: [{ selector: 'natural-relations', template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n ></ng-template>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n <button\n *ngIf=\"!disabled\"\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <natural-icon name=\"link_off\"></natural-icon>\n </button>\n </td>\n </ng-container>\n </table>\n\n <mat-paginator\n (page)=\"pagination($event)\"\n *ngIf=\"dataSource?.data && (dataSource?.data?.length || 0) > (dataSource?.data?.pageSize || 0)\"\n [length]=\"dataSource?.data?.length || 0\"\n [pageIndex]=\"dataSource?.data?.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource?.data?.pageSize || 0\"\n ></mat-paginator>\n\n <div *ngIf=\"!loading && dataSource?.data?.length === 0\" class=\"margin-v mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n\n <mat-progress-spinner *ngIf=\"loading\" [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\"></mat-progress-spinner>\n</div>\n\n<natural-select\n #select\n (selectionChange)=\"addRelations([$any($event)])\"\n *ngIf=\"!hierarchicSelectorConfig && service && !disabled\"\n [displayWith]=\"getDisplayFn()\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n></natural-select>\n\n<div *ngIf=\"hierarchicSelectorConfig && !disabled\">\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"] }]
@@ -9724,64 +9887,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
9724
9887
  * Public API Surface of natural
9725
9888
  */
9726
9889
 
9727
- /**
9728
- * Wrap the searched value by `%` SQL wildcard
9729
- *
9730
- * So:
9731
- *
9732
- * {field: 'myFieldName', condition: {like: {value: 'foo'}}}
9733
- *
9734
- * will become
9735
- *
9736
- * {field: 'myFieldName', condition: {like: {value: '%foo%'}}}
9737
- */
9738
- function wrapLike(selection) {
9739
- if (selection.condition.like) {
9740
- selection.condition.like.value = '%' + selection.condition.like.value + '%';
9741
- }
9742
- return selection;
9743
- }
9744
- /**
9745
- * Replace the operator name (usually "like", "in" or "between") with the
9746
- * attribute "field" or "name" defined in the configuration
9747
- *
9748
- * So:
9749
- *
9750
- * {field: 'myFieldName', condition: {in: {values: [1, 2, 3]}}}
9751
- *
9752
- * will become
9753
- *
9754
- * {field: 'myFieldName', condition: {myFieldName: {values: [1, 2, 3]}}}
9755
- */
9756
- function replaceOperatorByField(selection) {
9757
- return replaceOperatorByAttribute(selection, 'field');
9758
- }
9759
- /**
9760
- * Replace the operator name (usually "like", "in" or "between") with the
9761
- * field "name" defined in the configuration
9762
- *
9763
- * So:
9764
- *
9765
- * {field: 'myFieldName', name:'myConfigName', condition: {in: {values: [1, 2, 3]}}}
9766
- *
9767
- * will become
9768
- *
9769
- * {field: 'myFieldName', name:'myConfigName', condition: {myConfigName: {values: [1, 2, 3]}}}
9770
- */
9771
- function replaceOperatorByName(selection) {
9772
- return replaceOperatorByAttribute(selection, 'name');
9773
- }
9774
- function replaceOperatorByAttribute(selection, attribute) {
9775
- const oldOperator = Object.keys(selection.condition)[0];
9776
- const attributeValue = selection[attribute];
9777
- if (!attributeValue) {
9778
- throw new Error('Attribute cannot be empty. Most likely the configuration was wrong');
9779
- }
9780
- selection.condition[attributeValue] = selection.condition[oldOperator];
9781
- delete selection.condition[oldOperator];
9782
- return selection;
9783
- }
9784
-
9785
9890
  /*
9786
9891
  * Public API Surface of natural
9787
9892
  */
@@ -10075,7 +10180,7 @@ class NaturalSidenavContainerComponent {
10075
10180
  }
10076
10181
  }
10077
10182
  NaturalSidenavContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSidenavContainerComponent, deps: [{ token: NaturalSidenavService }], target: i0.ɵɵFactoryTarget.Component });
10078
- NaturalSidenavContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSidenavContainerComponent, selector: "natural-sidenav-container", inputs: { name: "name", position: "position", mobileAutoClose: "mobileAutoClose", minimizedWidth: "minimizedWidth", noScroll: "noScroll" }, host: { properties: { "attr.no-scroll": "this.noScroll" } }, providers: [NaturalSidenavService], viewQueries: [{ propertyName: "menuContainer", first: true, predicate: MatSidenavContainer, descendants: true, static: true }, { propertyName: "menuSidenav", first: true, predicate: MatSidenav, descendants: true, static: true }], ngImport: i0, template: "<mat-sidenav-container (backdropClick)=\"sidenavService.setOpened(false)\">\n <mat-sidenav\n [mode]=\"sidenavService.activeMode\"\n [ngClass]=\"sidenavService.isMinimized ? 'menuMinimized' : ''\"\n [opened]=\"sidenavService.isOpened\"\n [style.min-width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [style.width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [position]=\"position\"\n >\n <ng-content select=\"natural-sidenav\"></ng-content>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-content\"></ng-content>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}:host mat-sidenav-container{display:flex;flex-direction:column;flex:1}:host mat-sidenav-content>div{overflow:auto}:host .menuMinimized{overflow-x:hidden}:host .buttons{display:flex;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3$4.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i3$4.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i3$4.MatSidenavContent, selector: "mat-sidenav-content" }] });
10183
+ NaturalSidenavContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSidenavContainerComponent, selector: "natural-sidenav-container", inputs: { name: "name", position: "position", mobileAutoClose: "mobileAutoClose", minimizedWidth: "minimizedWidth", noScroll: "noScroll" }, host: { properties: { "attr.no-scroll": "this.noScroll" } }, providers: [NaturalSidenavService], viewQueries: [{ propertyName: "menuContainer", first: true, predicate: MatSidenavContainer, descendants: true, static: true }, { propertyName: "menuSidenav", first: true, predicate: MatSidenav, descendants: true, static: true }], ngImport: i0, template: "<mat-sidenav-container (backdropClick)=\"sidenavService.setOpened(false)\">\n <mat-sidenav\n [mode]=\"sidenavService.activeMode\"\n [ngClass]=\"sidenavService.isMinimized ? 'menuMinimized' : ''\"\n [opened]=\"sidenavService.isOpened\"\n [style.min-width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [style.width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [position]=\"position\"\n >\n <ng-content select=\"natural-sidenav\"></ng-content>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-content\"></ng-content>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}:host mat-sidenav-container{display:flex;flex-direction:column;flex:1}:host mat-sidenav-content>div{overflow:auto}:host .menuMinimized{overflow-x:hidden}:host .buttons{display:flex;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3$4.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i3$4.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i3$4.MatSidenavContent, selector: "mat-sidenav-content" }] });
10079
10184
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSidenavContainerComponent, decorators: [{
10080
10185
  type: Component,
10081
10186
  args: [{ selector: 'natural-sidenav-container', providers: [NaturalSidenavService], template: "<mat-sidenav-container (backdropClick)=\"sidenavService.setOpened(false)\">\n <mat-sidenav\n [mode]=\"sidenavService.activeMode\"\n [ngClass]=\"sidenavService.isMinimized ? 'menuMinimized' : ''\"\n [opened]=\"sidenavService.isOpened\"\n [style.min-width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [style.width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [position]=\"position\"\n >\n <ng-content select=\"natural-sidenav\"></ng-content>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-content\"></ng-content>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}:host mat-sidenav-container{display:flex;flex-direction:column;flex:1}:host mat-sidenav-content>div{overflow:auto}:host .menuMinimized{overflow-x:hidden}:host .buttons{display:flex;flex-direction:row;justify-content:flex-end}\n"] }]
@@ -10101,17 +10206,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
10101
10206
  }] } });
10102
10207
 
10103
10208
  class NaturalSidenavContentComponent {
10104
- constructor() { }
10105
10209
  }
10106
10210
  NaturalSidenavContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSidenavContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10107
10211
  NaturalSidenavContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSidenavContentComponent, selector: "natural-sidenav-content", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}\n"] });
10108
10212
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSidenavContentComponent, decorators: [{
10109
10213
  type: Component,
10110
10214
  args: [{ selector: 'natural-sidenav-content', template: '<ng-content></ng-content>', styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}\n"] }]
10111
- }], ctorParameters: function () { return []; } });
10215
+ }] });
10112
10216
 
10113
10217
  class NaturalSidenavComponent {
10114
- constructor() { }
10115
10218
  }
10116
10219
  NaturalSidenavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10117
10220
  NaturalSidenavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSidenavComponent, selector: "natural-sidenav", ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
@@ -10121,7 +10224,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
10121
10224
  selector: 'natural-sidenav',
10122
10225
  template: '<ng-content></ng-content>',
10123
10226
  }]
10124
- }], ctorParameters: function () { return []; } });
10227
+ }] });
10125
10228
 
10126
10229
  class NaturalSidenavModule {
10127
10230
  }
@@ -10151,7 +10254,7 @@ class NaturalStampComponent {
10151
10254
  }
10152
10255
  }
10153
10256
  NaturalStampComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalStampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10154
- NaturalStampComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalStampComponent, selector: "natural-stamp", inputs: { item: "item" }, ngImport: i0, template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-body-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">,&nbsp;</span>\n <span *ngIf=\"item.creationDate\">{{ item.creationDate | swissDate }} ({{ item.creationDate | timeAgo }})</span>\n </div>\n\n <div *ngIf=\"showUpdate()\">\n <span class=\"mat-body-2\" i18n>Modification</span>\n :\n <span *ngIf=\"item.updater\">{{ item.updater.fullName || item.updater.name }}</span>\n <span *ngIf=\"item.updater && item.updateDate\">,&nbsp;</span>\n <span *ngIf=\"item.updateDate\">{{ item.updateDate | swissDate }} ({{ item.updateDate | timeAgo }})</span>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: NaturalSwissDatePipe, name: "swissDate" }, { kind: "pipe", type: NaturalTimeAgoPipe, name: "timeAgo" }] });
10257
+ NaturalStampComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalStampComponent, selector: "natural-stamp", inputs: { item: "item" }, ngImport: i0, template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-body-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">,&nbsp;</span>\n <span *ngIf=\"item.creationDate\">{{ item.creationDate | swissDate }} ({{ item.creationDate | timeAgo }})</span>\n </div>\n\n <div *ngIf=\"showUpdate()\">\n <span class=\"mat-body-2\" i18n>Modification</span>\n :\n <span *ngIf=\"item.updater\">{{ item.updater.fullName || item.updater.name }}</span>\n <span *ngIf=\"item.updater && item.updateDate\">,&nbsp;</span>\n <span *ngIf=\"item.updateDate\">{{ item.updateDate | swissDate }} ({{ item.updateDate | timeAgo }})</span>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: NaturalSwissDatePipe, name: "swissDate" }, { kind: "pipe", type: NaturalTimeAgoPipe, name: "timeAgo" }] });
10155
10258
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalStampComponent, decorators: [{
10156
10259
  type: Component,
10157
10260
  args: [{ selector: 'natural-stamp', template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-body-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">,&nbsp;</span>\n <span *ngIf=\"item.creationDate\">{{ item.creationDate | swissDate }} ({{ item.creationDate | timeAgo }})</span>\n </div>\n\n <div *ngIf=\"showUpdate()\">\n <span class=\"mat-body-2\" i18n>Modification</span>\n :\n <span *ngIf=\"item.updater\">{{ item.updater.fullName || item.updater.name }}</span>\n <span *ngIf=\"item.updater && item.updateDate\">,&nbsp;</span>\n <span *ngIf=\"item.updateDate\">{{ item.updateDate | swissDate }} ({{ item.updateDate | timeAgo }})</span>\n </div>\n</ng-container>\n" }]
@@ -10198,7 +10301,7 @@ class NaturalTableButtonComponent {
10198
10301
  this.buttonClick = new EventEmitter();
10199
10302
  this.type = 'none';
10200
10303
  }
10201
- ngOnChanges(changes) {
10304
+ ngOnChanges() {
10202
10305
  if (this.navigate?.length || Object.keys(this.queryParams).length) {
10203
10306
  this.type = 'routerLink';
10204
10307
  }
@@ -10214,7 +10317,7 @@ class NaturalTableButtonComponent {
10214
10317
  }
10215
10318
  }
10216
10319
  NaturalTableButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalTableButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10217
- NaturalTableButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalTableButtonComponent, selector: "natural-table-button", inputs: { queryParams: "queryParams", queryParamsHandling: "queryParamsHandling", label: "label", icon: "icon", href: "href", navigate: "navigate", fragment: "fragment", preserveFragment: "preserveFragment", raised: "raised", color: "color" }, outputs: { buttonClick: "buttonClick" }, usesOnChanges: true, ngImport: i0, template: "<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n\n<!-- Edge case of a button without any kind of link at all -->\n<span *ngIf=\"type === 'none'\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span *ngIf=\"label\">{{ label }}</span>\n</span>\n\n<ng-container *ngIf=\"!raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-icon-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- Click with label... -->\n <a *ngIf=\"type === 'click' && label\" [color]=\"color\" (click)=\"buttonClick.emit($event)\" mat-button>\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"type === 'click' && !label\" (click)=\"buttonClick.emit($event)\" mat-icon-button>\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- External link with label... -->\n <a *ngIf=\"type === 'href' && label\" [attr.href]=\"href\" [color]=\"color\" mat-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"type === 'href' && !label\" [attr.href]=\"href\" [color]=\"color\" mat-icon-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n</ng-container>\n\n<ng-container *ngIf=\"raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-icon-button\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n <!-- Click with label... -->\n <a *ngIf=\"type === 'click' && label\" [color]=\"color\" (click)=\"buttonClick.emit($event)\" mat-raised-button>\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'click' && !label\"\n [color]=\"color\"\n (click)=\"buttonClick.emit($event)\"\n mat-icon-button\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- External link with label... -->\n <a *ngIf=\"type === 'href' && label\" [attr.href]=\"href\" [color]=\"color\" mat-raised-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n mat-icon-button\n mat-raised-button\n target=\"_blank\"\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n</ng-container>\n", styles: ["natural-table-button{flex:1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button a.mat-button{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}natural-table-button a.mat-button .mat-button-wrapper{display:flex;flex-direction:row;align-items:center}natural-table-button a.mat-button .mat-button-wrapper>*{display:flex;flex-direction:row;align-items:center}natural-table-button a.mat-button .mat-button-wrapper>:not(:last-child){margin-right:5px}natural-table-button>span{padding:0 16px}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "component", type: i4.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }], encapsulation: i0.ViewEncapsulation.None });
10320
+ NaturalTableButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalTableButtonComponent, selector: "natural-table-button", inputs: { queryParams: "queryParams", queryParamsHandling: "queryParamsHandling", label: "label", icon: "icon", href: "href", navigate: "navigate", fragment: "fragment", preserveFragment: "preserveFragment", raised: "raised", color: "color" }, outputs: { buttonClick: "buttonClick" }, usesOnChanges: true, ngImport: i0, template: "<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n\n<!-- Edge case of a button without any kind of link at all -->\n<span *ngIf=\"type === 'none'\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span *ngIf=\"label\">{{ label }}</span>\n</span>\n\n<ng-container *ngIf=\"!raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-icon-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- Click with label... -->\n <a *ngIf=\"type === 'click' && label\" [color]=\"color\" (click)=\"buttonClick.emit($event)\" mat-button>\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"type === 'click' && !label\" (click)=\"buttonClick.emit($event)\" mat-icon-button>\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- External link with label... -->\n <a *ngIf=\"type === 'href' && label\" [attr.href]=\"href\" [color]=\"color\" mat-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"type === 'href' && !label\" [attr.href]=\"href\" [color]=\"color\" mat-icon-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n</ng-container>\n\n<ng-container *ngIf=\"raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-icon-button\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n <!-- Click with label... -->\n <a *ngIf=\"type === 'click' && label\" [color]=\"color\" (click)=\"buttonClick.emit($event)\" mat-raised-button>\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'click' && !label\"\n [color]=\"color\"\n (click)=\"buttonClick.emit($event)\"\n mat-icon-button\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- External link with label... -->\n <a *ngIf=\"type === 'href' && label\" [attr.href]=\"href\" [color]=\"color\" mat-raised-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n mat-icon-button\n mat-raised-button\n target=\"_blank\"\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n</ng-container>\n", styles: ["natural-table-button{flex:1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button a.mat-button{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}natural-table-button a.mat-button .mat-button-wrapper{display:flex;flex-direction:row;align-items:center}natural-table-button a.mat-button .mat-button-wrapper>*{display:flex;flex-direction:row;align-items:center}natural-table-button a.mat-button .mat-button-wrapper>:not(:last-child){margin-right:5px}natural-table-button>span{padding:0 16px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { kind: "component", type: i4.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }], encapsulation: i0.ViewEncapsulation.None });
10218
10321
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalTableButtonComponent, decorators: [{
10219
10322
  type: Component,
10220
10323
  args: [{ selector: 'natural-table-button', encapsulation: ViewEncapsulation.None, template: "<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n\n<!-- Edge case of a button without any kind of link at all -->\n<span *ngIf=\"type === 'none'\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span *ngIf=\"label\">{{ label }}</span>\n</span>\n\n<ng-container *ngIf=\"!raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-icon-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- Click with label... -->\n <a *ngIf=\"type === 'click' && label\" [color]=\"color\" (click)=\"buttonClick.emit($event)\" mat-button>\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"type === 'click' && !label\" (click)=\"buttonClick.emit($event)\" mat-icon-button>\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- External link with label... -->\n <a *ngIf=\"type === 'href' && label\" [attr.href]=\"href\" [color]=\"color\" mat-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"type === 'href' && !label\" [attr.href]=\"href\" [color]=\"color\" mat-icon-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n</ng-container>\n\n<ng-container *ngIf=\"raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n mat-icon-button\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n <!-- Click with label... -->\n <a *ngIf=\"type === 'click' && label\" [color]=\"color\" (click)=\"buttonClick.emit($event)\" mat-raised-button>\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'click' && !label\"\n [color]=\"color\"\n (click)=\"buttonClick.emit($event)\"\n mat-icon-button\n mat-raised-button\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n\n <!-- External link with label... -->\n <a *ngIf=\"type === 'href' && label\" [attr.href]=\"href\" [color]=\"color\" mat-raised-button target=\"_blank\">\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n mat-icon-button\n mat-raised-button\n target=\"_blank\"\n >\n <natural-icon *ngIf=\"icon\" [name]=\"icon\"></natural-icon>\n </a>\n</ng-container>\n", styles: ["natural-table-button{flex:1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button a.mat-button{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}natural-table-button a.mat-button .mat-button-wrapper{display:flex;flex-direction:row;align-items:center}natural-table-button a.mat-button .mat-button-wrapper>*{display:flex;flex-direction:row;align-items:center}natural-table-button a.mat-button .mat-button-wrapper>:not(:last-child){margin-right:5px}natural-table-button>span{padding:0 16px}\n"] }]
@@ -10463,11 +10566,11 @@ function addUnsigned(lX, lY) {
10463
10566
  const lX4 = lX & 0x40000000;
10464
10567
  const lY4 = lY & 0x40000000;
10465
10568
  const lResult = (lX & 0x3fffffff) + (lY & 0x3fffffff);
10466
- if (!!(lX4 & lY4)) {
10569
+ if (lX4 & lY4) {
10467
10570
  return lResult ^ 0x80000000 ^ lX8 ^ lY8;
10468
10571
  }
10469
- if (!!(lX4 | lY4)) {
10470
- if (!!(lResult & 0x40000000)) {
10572
+ if (lX4 | lY4) {
10573
+ if (lResult & 0x40000000) {
10471
10574
  return lResult ^ 0xc0000000 ^ lX8 ^ lY8;
10472
10575
  }
10473
10576
  else {
@@ -10693,7 +10796,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
10693
10796
  args: [{
10694
10797
  providedIn: 'root',
10695
10798
  }]
10696
- }], ctorParameters: function () { return []; } });
10799
+ }] });
10697
10800
 
10698
10801
  /**
10699
10802
  * Show an avatar from different sources
@@ -10831,7 +10934,7 @@ AvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
10831
10934
  {{ avatarText }}
10832
10935
  </div>
10833
10936
  </div>
10834
- `, isInline: true, styles: [":host{border-radius:50%}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
10937
+ `, isInline: true, styles: [":host{border-radius:50%}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
10835
10938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: AvatarComponent, decorators: [{
10836
10939
  type: Component,
10837
10940
  args: [{ selector: 'natural-avatar', template: `