@ecodev/natural 61.0.1 → 61.1.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 (84) hide show
  1. package/esm2022/lib/classes/abstract-detail.mjs +36 -33
  2. package/esm2022/lib/classes/abstract-editable-list.mjs +8 -6
  3. package/esm2022/lib/classes/abstract-list.mjs +74 -55
  4. package/esm2022/lib/classes/abstract-navigable-list.mjs +9 -9
  5. package/esm2022/lib/classes/cumulative-changes.mjs +3 -5
  6. package/esm2022/lib/classes/data-source.mjs +3 -2
  7. package/esm2022/lib/classes/query-variable-manager.mjs +3 -3
  8. package/esm2022/lib/classes/utility.mjs +15 -1
  9. package/esm2022/lib/directives/http-prefix.directive.mjs +4 -6
  10. package/esm2022/lib/modules/alert/alert.service.mjs +5 -7
  11. package/esm2022/lib/modules/alert/confirm.component.mjs +4 -6
  12. package/esm2022/lib/modules/avatar/component/avatar.component.mjs +21 -19
  13. package/esm2022/lib/modules/avatar/service/avatar.service.mjs +22 -24
  14. package/esm2022/lib/modules/avatar/sources/source.mjs +2 -1
  15. package/esm2022/lib/modules/columns-picker/columns-picker.component.mjs +17 -18
  16. package/esm2022/lib/modules/common/directives/background-density.directive.mjs +4 -6
  17. package/esm2022/lib/modules/common/directives/linkable-tab.directive.mjs +12 -12
  18. package/esm2022/lib/modules/common/directives/src-density.directive.mjs +4 -6
  19. package/esm2022/lib/modules/common/pipes/capitalize.pipe.mjs +3 -3
  20. package/esm2022/lib/modules/common/pipes/ellipsis.pipe.mjs +3 -3
  21. package/esm2022/lib/modules/common/pipes/enum.pipe.mjs +4 -6
  22. package/esm2022/lib/modules/common/pipes/time-ago.pipe.mjs +4 -3
  23. package/esm2022/lib/modules/common/services/memory-storage.mjs +4 -6
  24. package/esm2022/lib/modules/common/services/seo.service.mjs +12 -11
  25. package/esm2022/lib/modules/detail-header/detail-header.component.mjs +38 -33
  26. package/esm2022/lib/modules/dialog-trigger/dialog-trigger.component.mjs +8 -6
  27. package/esm2022/lib/modules/dropdown-components/abstract-association-select-component.directive.mjs +13 -12
  28. package/esm2022/lib/modules/dropdown-components/type-boolean/type-boolean.component.mjs +3 -3
  29. package/esm2022/lib/modules/dropdown-components/type-date/type-date.component.mjs +21 -20
  30. package/esm2022/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +19 -18
  31. package/esm2022/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +3 -3
  32. package/esm2022/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.mjs +3 -3
  33. package/esm2022/lib/modules/dropdown-components/type-number/type-number.component.mjs +19 -18
  34. package/esm2022/lib/modules/dropdown-components/type-options/type-options.component.mjs +11 -9
  35. package/esm2022/lib/modules/dropdown-components/type-select/type-select.component.mjs +21 -19
  36. package/esm2022/lib/modules/dropdown-components/type-text/type-text.component.mjs +7 -7
  37. package/esm2022/lib/modules/file/abstract-file.mjs +51 -47
  38. package/esm2022/lib/modules/file/component/file.component.mjs +44 -31
  39. package/esm2022/lib/modules/file/file-drop.directive.mjs +10 -13
  40. package/esm2022/lib/modules/file/file-select.directive.mjs +9 -12
  41. package/esm2022/lib/modules/file/file.service.mjs +13 -15
  42. package/esm2022/lib/modules/fixed-button/fixed-button.component.mjs +7 -8
  43. package/esm2022/lib/modules/fixed-button-detail/fixed-button-detail.component.mjs +9 -7
  44. package/esm2022/lib/modules/hierarchic-selector/classes/flat-node.mjs +8 -2
  45. package/esm2022/lib/modules/hierarchic-selector/classes/model-node.mjs +4 -2
  46. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.mjs +63 -46
  47. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +16 -18
  48. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.mjs +12 -4
  49. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.mjs +4 -6
  50. package/esm2022/lib/modules/icon/icon.directive.mjs +9 -9
  51. package/esm2022/lib/modules/logger/error-handler.mjs +7 -7
  52. package/esm2022/lib/modules/matomo/matomo.service.mjs +10 -9
  53. package/esm2022/lib/modules/panels/abstract-panel.mjs +23 -19
  54. package/esm2022/lib/modules/panels/panels.component.mjs +4 -4
  55. package/esm2022/lib/modules/panels/panels.service.mjs +50 -42
  56. package/esm2022/lib/modules/relations/relations.component.mjs +64 -35
  57. package/esm2022/lib/modules/search/dropdown-container/dropdown-container.component.mjs +15 -13
  58. package/esm2022/lib/modules/search/dropdown-container/dropdown-ref.mjs +4 -2
  59. package/esm2022/lib/modules/search/dropdown-container/dropdown.service.mjs +5 -7
  60. package/esm2022/lib/modules/search/facet-selector/facet-selector.component.mjs +9 -11
  61. package/esm2022/lib/modules/search/group/group.component.mjs +12 -11
  62. package/esm2022/lib/modules/search/input/input.component.mjs +77 -63
  63. package/esm2022/lib/modules/search/search/search.component.mjs +29 -31
  64. package/esm2022/lib/modules/select/abstract-select.component.mjs +66 -39
  65. package/esm2022/lib/modules/select/select/select.component.mjs +51 -48
  66. package/esm2022/lib/modules/select/select-enum/select-enum.component.mjs +21 -8
  67. package/esm2022/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +27 -19
  68. package/esm2022/lib/modules/sidenav/sidenav/sidenav.component.mjs +3 -3
  69. package/esm2022/lib/modules/sidenav/sidenav-container/sidenav-container.component.mjs +30 -24
  70. package/esm2022/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +3 -3
  71. package/esm2022/lib/modules/sidenav/sidenav-stack.service.mjs +13 -15
  72. package/esm2022/lib/modules/sidenav/sidenav.service.mjs +42 -44
  73. package/esm2022/lib/modules/stamp/stamp.component.mjs +4 -3
  74. package/esm2022/lib/modules/table-button/table-button.component.mjs +16 -13
  75. package/esm2022/lib/services/abstract-model.service.mjs +17 -7
  76. package/esm2022/lib/services/debounce.service.mjs +7 -9
  77. package/esm2022/lib/services/enum.service.mjs +4 -6
  78. package/esm2022/lib/services/link-mutation.service.mjs +8 -6
  79. package/esm2022/lib/services/persistence.service.mjs +6 -8
  80. package/esm2022/lib/services/swiss-parsing-date-adapter.service.mjs +3 -3
  81. package/fesm2022/ecodev-natural.mjs +1249 -1052
  82. package/fesm2022/ecodev-natural.mjs.map +1 -1
  83. package/lib/classes/utility.d.ts +8 -0
  84. package/package.json +1 -1
@@ -72,11 +72,9 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
72
72
  import { HmacSHA256 } from 'crypto-es/lib/sha256';
73
73
 
74
74
  class NaturalConfirmComponent {
75
- constructor() {
76
- this.data = inject(MAT_DIALOG_DATA);
77
- }
78
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
79
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalConfirmComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<h2 mat-dialog-title>{{ data.title }}</h2>\n<mat-dialog-content\n ><p class=\"mat-body\">{{ data.message }}</p></mat-dialog-content\n>\n<mat-dialog-actions align=\"end\">\n <button [mat-dialog-close]=\"false\" mat-button>{{ data.cancelText }}</button>\n <button [mat-dialog-close]=\"true\" mat-stroked-button cdkFocusInitial>{{ data.confirmText }}</button>\n</mat-dialog-actions>\n", styles: ["mat-dialog-content{max-width:40em}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
75
+ data = inject(MAT_DIALOG_DATA);
76
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
77
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalConfirmComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<h2 mat-dialog-title>{{ data.title }}</h2>\n<mat-dialog-content\n ><p class=\"mat-body\">{{ data.message }}</p></mat-dialog-content\n>\n<mat-dialog-actions align=\"end\">\n <button [mat-dialog-close]=\"false\" mat-button>{{ data.cancelText }}</button>\n <button [mat-dialog-close]=\"true\" mat-stroked-button cdkFocusInitial>{{ data.confirmText }}</button>\n</mat-dialog-actions>\n", styles: ["mat-dialog-content{max-width:40em}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] });
80
78
  }
81
79
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalConfirmComponent, decorators: [{
82
80
  type: Component,
@@ -84,10 +82,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
84
82
  }] });
85
83
 
86
84
  class NaturalAlertService {
87
- constructor() {
88
- this.dialog = inject(MatDialog);
89
- this.snackBar = inject(MatSnackBar);
90
- }
85
+ dialog = inject(MatDialog);
86
+ snackBar = inject(MatSnackBar);
91
87
  /**
92
88
  * Show an informative message in a snack bar
93
89
  */
@@ -123,8 +119,8 @@ class NaturalAlertService {
123
119
  });
124
120
  return dialog.afterClosed();
125
121
  }
126
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
127
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAlertService, providedIn: 'root' }); }
122
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
123
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAlertService, providedIn: 'root' });
128
124
  }
129
125
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAlertService, decorators: [{
130
126
  type: Injectable,
@@ -134,22 +130,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
134
130
  }] });
135
131
 
136
132
  class NaturalAbstractPanel {
137
- constructor() {
138
- this.destroyRef = inject(DestroyRef);
139
- /**
140
- * The data property is the container where the resolved content is stored
141
- * When loading a component from a panel opening (dialog), receives the data provided by the service
142
- */
143
- this.data = {};
144
- /**
145
- * Bind isFrontPanel style class on root component
146
- */
147
- this.isFrontPanel = false;
148
- /**
149
- * Bind isPanel style class on root component
150
- */
151
- this.isPanel = false;
152
- }
133
+ destroyRef = inject(DestroyRef);
134
+ /**
135
+ * The data property is the container where the resolved content is stored
136
+ * When loading a component from a panel opening (dialog), receives the data provided by the service
137
+ */
138
+ data = {};
139
+ /**
140
+ * Bind isFrontPanel style class on root component
141
+ */
142
+ isFrontPanel = false;
143
+ /**
144
+ * Bind isPanel style class on root component
145
+ */
146
+ isPanel = false;
147
+ /**
148
+ * Merging of data provided by the very root component (that is in a route context) and inherited data through panels
149
+ * TODO: provide type with available attributes
150
+ */
151
+ panelData;
152
+ panelService;
153
153
  /**
154
154
  * Bind click on panels, to allow the selection of those who are behind
155
155
  */
@@ -184,8 +184,8 @@ class NaturalAbstractPanel {
184
184
  }
185
185
  }
186
186
  }
187
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractPanel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
188
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractPanel, isStandalone: true, host: { listeners: { "click": "clickPanel()" }, properties: { "class.isFrontPanel": "this.isFrontPanel", "class.isPanel": "this.isPanel" } }, ngImport: i0 }); }
187
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractPanel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
188
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractPanel, isStandalone: true, host: { listeners: { "click": "clickPanel()" }, properties: { "class.isFrontPanel": "this.isFrontPanel", "class.isPanel": "this.isPanel" } }, ngImport: i0 });
189
189
  }
190
190
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractPanel, decorators: [{
191
191
  type: Directive,
@@ -332,6 +332,20 @@ function hexToRgb(hex) {
332
332
  b: 0,
333
333
  };
334
334
  }
335
+ /**
336
+ * Convert RGB color to hexadecimal color
337
+ *
338
+ * ```ts
339
+ * rgbToHex('rgb(255, 00, 255)'); // '#FF00FF'
340
+ * ```
341
+ */
342
+ function rgbToHex(rgb) {
343
+ const m = /^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/.exec(rgb);
344
+ if (!m) {
345
+ return rgb;
346
+ }
347
+ return '#' + [m[1], m[2], m[3]].map(x => parseInt(x).toString(16).toUpperCase().padStart(2, '0')).join('');
348
+ }
335
349
  /**
336
350
  * During lodash.mergeWith, overrides arrays
337
351
  */
@@ -496,9 +510,9 @@ function mergeConcatArray(destValue, source) {
496
510
  * ```
497
511
  */
498
512
  class NaturalQueryVariablesManager {
513
+ variables = new BehaviorSubject(undefined);
514
+ channels = new Map();
499
515
  constructor(queryVariablesManager) {
500
- this.variables = new BehaviorSubject(undefined);
501
- this.channels = new Map();
502
516
  if (queryVariablesManager) {
503
517
  this.channels = queryVariablesManager.getChannelsCopy();
504
518
  this.updateVariables();
@@ -2267,10 +2281,8 @@ function money(control) {
2267
2281
  * Cumulate all changes made to an object over time
2268
2282
  */
2269
2283
  class CumulativeChanges {
2270
- constructor() {
2271
- this.original = {};
2272
- this.diff = {};
2273
- }
2284
+ original = {};
2285
+ diff = {};
2274
2286
  /**
2275
2287
  * Initialize the original values, should be called exactly one time per instance
2276
2288
  */
@@ -2322,43 +2334,46 @@ function isNaturalDialogTriggerProvidedData(dialogData) {
2322
2334
  }
2323
2335
  // @dynamic
2324
2336
  class NaturalAbstractDetail extends NaturalAbstractPanel {
2337
+ key;
2338
+ service;
2339
+ /**
2340
+ * Data retrieved by the server via route resolvers.
2341
+ *
2342
+ * The key `model` is special. It is readonly and represents the model being updated
2343
+ * as it exists on server. The value is kept up to date when Apollo mutates it on server.
2344
+ *
2345
+ * The only time when `model` is not readonly is during creation. Only then can we modify the model values directly.
2346
+ *
2347
+ * Other keys, if present, are whatever is returned from route resolvers as-is.
2348
+ */
2349
+ data;
2350
+ /**
2351
+ * Form that manages the data from the controller
2352
+ */
2353
+ form = new UntypedFormGroup({});
2354
+ /**
2355
+ * Show / hides the bottom fab button (mostly to hide it when we are on other tabs where semantic of button can conflict with ...
2356
+ * semantic of data on other tab, like relations that list other objects)
2357
+ */
2358
+ showFabButton = true;
2359
+ alertService = inject(NaturalAlertService);
2360
+ router = inject(Router);
2361
+ route = inject(ActivatedRoute);
2362
+ _dialogData = inject(MAT_DIALOG_DATA, { optional: true });
2363
+ /**
2364
+ * Once set, this must not change anymore, especially not right after the creation mutation,
2365
+ * so the form does not switch from creation mode to update mode without an actual reload of
2366
+ * model from DB (by navigating to update page).
2367
+ */
2368
+ _isUpdatePage = false;
2369
+ changes = new CumulativeChanges();
2325
2370
  constructor(key, service) {
2326
2371
  super();
2327
2372
  this.key = key;
2328
2373
  this.service = service;
2329
- /**
2330
- * Data retrieved by the server via route resolvers.
2331
- *
2332
- * The key `model` is special. It is readonly and represents the model being updated
2333
- * as it exists on server. The value is kept up to date when Apollo mutates it on server.
2334
- *
2335
- * The only time when `model` is not readonly is during creation. Only then can we modify the model values directly.
2336
- *
2337
- * Other keys, if present, are whatever is returned from route resolvers as-is.
2338
- */
2339
2374
  this.data = {
2340
2375
  model: this.service.getDefaultForServer(),
2341
2376
  };
2342
- /**
2343
- * Form that manages the data from the controller
2344
- */
2345
- this.form = new UntypedFormGroup({});
2346
- /**
2347
- * Show / hides the bottom fab button (mostly to hide it when we are on other tabs where semantic of button can conflict with ...
2348
- * semantic of data on other tab, like relations that list other objects)
2349
- */
2350
- this.showFabButton = true;
2351
- this.alertService = inject(NaturalAlertService);
2352
- this.router = inject(Router);
2353
- this.route = inject(ActivatedRoute);
2354
- this._dialogData = inject(MAT_DIALOG_DATA, { optional: true });
2355
- /**
2356
- * Once set, this must not change anymore, especially not right after the creation mutation,
2357
- * so the form does not switch from creation mode to update mode without an actual reload of
2358
- * model from DB (by navigating to update page).
2359
- */
2360
- this._isUpdatePage = false;
2361
- this.changes = new CumulativeChanges();
2362
2377
  }
2363
2378
  /**
2364
2379
  * You probably should not override this method. Instead, consider overriding `initForm()`.
@@ -2519,8 +2534,8 @@ class NaturalAbstractDetail extends NaturalAbstractPanel {
2519
2534
  this.form = this.service.getFormGroup(this.data.model);
2520
2535
  this.changes.initialize(this.form.getRawValue());
2521
2536
  }
2522
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractDetail, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
2523
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractDetail, isStandalone: true, usesInheritance: true, ngImport: i0 }); }
2537
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractDetail, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
2538
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractDetail, isStandalone: true, usesInheritance: true, ngImport: i0 });
2524
2539
  }
2525
2540
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractDetail, decorators: [{
2526
2541
  type: Directive,
@@ -2548,11 +2563,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
2548
2563
  * @dynamic
2549
2564
  */
2550
2565
  class NaturalAbstractEditableList {
2566
+ service;
2567
+ form;
2568
+ formArray = new UntypedFormArray([]);
2569
+ variablesManager = new NaturalQueryVariablesManager();
2570
+ dataSource = new MatTableDataSource();
2551
2571
  constructor(service) {
2552
2572
  this.service = service;
2553
- this.formArray = new UntypedFormArray([]);
2554
- this.variablesManager = new NaturalQueryVariablesManager();
2555
- this.dataSource = new MatTableDataSource();
2556
2573
  // Create a form group with a line attributes that contain an array of formGroups (one by line = one by model)
2557
2574
  this.form = new UntypedFormGroup({ rows: this.formArray });
2558
2575
  this.dataSource.data = this.formArray.controls;
@@ -2609,8 +2626,8 @@ class NaturalAbstractEditableList {
2609
2626
  validateForm() {
2610
2627
  validateAllFormControls(this.form);
2611
2628
  }
2612
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractEditableList, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
2613
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractEditableList, isStandalone: true, ngImport: i0 }); }
2629
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractEditableList, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
2630
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractEditableList, isStandalone: true, ngImport: i0 });
2614
2631
  }
2615
2632
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractEditableList, decorators: [{
2616
2633
  type: Directive,
@@ -2831,18 +2848,20 @@ function throwMatDialogContentAlreadyAttachedError() {
2831
2848
  }
2832
2849
  const NATURAL_DROPDOWN_CONTAINER_DATA = new InjectionToken('NaturalDropdownContainerData');
2833
2850
  class NaturalDropdownContainerComponent extends BasePortalOutlet {
2851
+ elementRef = inject(ElementRef);
2852
+ focusTrapFactory = inject(ConfigurableFocusTrapFactory);
2853
+ data = inject(NATURAL_DROPDOWN_CONTAINER_DATA);
2854
+ portalOutlet;
2855
+ templateRef;
2856
+ closed = new Subject();
2857
+ /** Current state of the panel animation. */
2858
+ panelAnimationState = 'void';
2859
+ /** Emits whenever an animation on the menu completes. */
2860
+ animationDone = new Subject();
2861
+ focusTrap = null;
2862
+ elementFocusedBeforeDialogWasOpened = null;
2834
2863
  constructor() {
2835
2864
  super();
2836
- this.elementRef = inject(ElementRef);
2837
- this.focusTrapFactory = inject(ConfigurableFocusTrapFactory);
2838
- this.data = inject(NATURAL_DROPDOWN_CONTAINER_DATA);
2839
- this.closed = new Subject();
2840
- /** Current state of the panel animation. */
2841
- this.panelAnimationState = 'void';
2842
- /** Emits whenever an animation on the menu completes. */
2843
- this.animationDone = new Subject();
2844
- this.focusTrap = null;
2845
- this.elementFocusedBeforeDialogWasOpened = null;
2846
2865
  }
2847
2866
  ngOnDestroy() {
2848
2867
  this.closed.complete();
@@ -2888,8 +2907,8 @@ class NaturalDropdownContainerComponent extends BasePortalOutlet {
2888
2907
  this.focusTrap.destroy();
2889
2908
  }
2890
2909
  }
2891
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2892
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalDropdownContainerComponent, isStandalone: true, 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 />\n </div>\n\n @if (data.showValidateButton) {\n <div class=\"natural-dropdown-validate-button\">\n <button (click)=\"close()\" color=\"primary\" mat-raised-button i18n>Valider</button>\n </div>\n }\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{display:flex;flex:none;flex-direction:row;justify-content:flex-end;margin:5px}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], encapsulation: i0.ViewEncapsulation.None }); }
2910
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2911
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalDropdownContainerComponent, isStandalone: true, 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 />\n </div>\n\n @if (data.showValidateButton) {\n <div class=\"natural-dropdown-validate-button\">\n <button (click)=\"close()\" color=\"primary\" mat-raised-button i18n>Valider</button>\n </div>\n }\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{display:flex;flex:none;flex-direction:row;justify-content:flex-end;margin:5px}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], encapsulation: i0.ViewEncapsulation.None });
2893
2912
  }
2894
2913
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownContainerComponent, decorators: [{
2895
2914
  type: Component,
@@ -2903,9 +2922,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
2903
2922
  }] } });
2904
2923
 
2905
2924
  class NaturalDropdownRef {
2925
+ dropdownContainer;
2926
+ componentInstance;
2927
+ closed = new Subject();
2906
2928
  constructor(dropdownContainer, component, customProviders, parentInjector, containerRef) {
2907
2929
  this.dropdownContainer = dropdownContainer;
2908
- this.closed = new Subject();
2909
2930
  // Customize injector to allow data and dropdown reference injection in component
2910
2931
  customProviders.push({ provide: NaturalDropdownRef, useValue: this });
2911
2932
  const customInjector = Injector.create({ providers: customProviders, parent: parentInjector });
@@ -2923,10 +2944,8 @@ class NaturalDropdownRef {
2923
2944
 
2924
2945
  const NATURAL_DROPDOWN_DATA = new InjectionToken('NaturalDropdownData');
2925
2946
  class NaturalDropdownService {
2926
- constructor() {
2927
- this.overlay = inject(Overlay);
2928
- this.injector = inject(Injector);
2929
- }
2947
+ overlay = inject(Overlay);
2948
+ injector = inject(Injector);
2930
2949
  open(component, connectedElement, customProviders, showValidateButton) {
2931
2950
  // Container data
2932
2951
  const containerData = {
@@ -2996,8 +3015,8 @@ class NaturalDropdownService {
2996
3015
  },
2997
3016
  ]);
2998
3017
  }
2999
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3000
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownService, providedIn: 'root' }); }
3018
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3019
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownService, providedIn: 'root' });
3001
3020
  }
3002
3021
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownService, decorators: [{
3003
3022
  type: Injectable,
@@ -3083,23 +3102,24 @@ function dateMax(dateAdapter, max) {
3083
3102
  }
3084
3103
 
3085
3104
  class TypeDateComponent {
3105
+ dateAdapter = inject(DateAdapter);
3106
+ dateFormats = inject(MAT_DATE_FORMATS);
3107
+ renderedValue = new BehaviorSubject('');
3108
+ configuration;
3109
+ operatorCtrl = new FormControl('equal', { nonNullable: true });
3110
+ valueCtrl = new FormControl(null);
3111
+ todayCtrl = new FormControl(false);
3112
+ operators = possibleComparableOperators;
3113
+ form = new FormGroup({
3114
+ operator: this.operatorCtrl,
3115
+ value: this.valueCtrl,
3116
+ today: this.todayCtrl,
3117
+ });
3118
+ defaults = {
3119
+ min: null,
3120
+ max: null,
3121
+ };
3086
3122
  constructor() {
3087
- this.dateAdapter = inject(DateAdapter);
3088
- this.dateFormats = inject(MAT_DATE_FORMATS);
3089
- this.renderedValue = new BehaviorSubject('');
3090
- this.operatorCtrl = new FormControl('equal', { nonNullable: true });
3091
- this.valueCtrl = new FormControl(null);
3092
- this.todayCtrl = new FormControl(false);
3093
- this.operators = possibleComparableOperators;
3094
- this.form = new FormGroup({
3095
- operator: this.operatorCtrl,
3096
- value: this.valueCtrl,
3097
- today: this.todayCtrl,
3098
- });
3099
- this.defaults = {
3100
- min: null,
3101
- max: null,
3102
- };
3103
3123
  const data = inject(NATURAL_DROPDOWN_DATA);
3104
3124
  this.configuration = { ...this.defaults, ...data.configuration };
3105
3125
  this.todayCtrl.valueChanges.pipe(takeUntilDestroyed()).subscribe(isToday => {
@@ -3216,8 +3236,8 @@ class TypeDateComponent {
3216
3236
  return '';
3217
3237
  }
3218
3238
  }
3219
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3220
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeDateComponent, isStandalone: true, selector: "ng-component", 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\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\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\" matIconSuffix />\n <mat-datepicker #value />\n @if (valueCtrl.hasError('min')) {\n <mat-error>< {{ configuration.min }}</mat-error>\n }\n @if (valueCtrl.hasError('max')) {\n <mat-error>> {{ configuration.max }}</mat-error>\n }\n @if (valueCtrl.hasError('required')) {\n <mat-error>*</mat-error>\n }\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>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: MatDatepickerModule }, { 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: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }] }); }
3239
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3240
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeDateComponent, isStandalone: true, selector: "ng-component", 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\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\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\" matIconSuffix />\n <mat-datepicker #value />\n @if (valueCtrl.hasError('min')) {\n <mat-error>< {{ configuration.min }}</mat-error>\n }\n @if (valueCtrl.hasError('max')) {\n <mat-error>> {{ configuration.max }}</mat-error>\n }\n @if (valueCtrl.hasError('required')) {\n <mat-error>*</mat-error>\n }\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>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: MatDatepickerModule }, { 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: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }] });
3221
3241
  }
3222
3242
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeDateComponent, decorators: [{
3223
3243
  type: Component,
@@ -3400,9 +3420,7 @@ const LOCAL_STORAGE = new InjectionToken('Local storage that can be shimed when
3400
3420
  * Should be used to shim sessionStorage when running on server or in our tests
3401
3421
  */
3402
3422
  class NaturalMemoryStorage {
3403
- constructor() {
3404
- this.data = new Map();
3405
- }
3423
+ data = new Map();
3406
3424
  get length() {
3407
3425
  return this.data.size;
3408
3426
  }
@@ -3428,8 +3446,8 @@ class NaturalMemoryStorage {
3428
3446
  setItem(key, value) {
3429
3447
  this.data.set(key, value);
3430
3448
  }
3431
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMemoryStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3432
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMemoryStorage, providedIn: 'root' }); }
3449
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMemoryStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3450
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMemoryStorage, providedIn: 'root' });
3433
3451
  }
3434
3452
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMemoryStorage, decorators: [{
3435
3453
  type: Injectable,
@@ -3504,11 +3522,9 @@ const memoryLocalStorageProvider = {
3504
3522
 
3505
3523
  const NATURAL_PERSISTENCE_VALIDATOR = new InjectionToken('Validator for persisted value retrieved from NaturalPersistenceService. If returns false, the persisted value will never be returned.');
3506
3524
  class NaturalPersistenceService {
3507
- constructor() {
3508
- this.router = inject(Router);
3509
- this.sessionStorage = inject(SESSION_STORAGE);
3510
- this.isValid = inject(NATURAL_PERSISTENCE_VALIDATOR, { optional: true }) ?? (() => true); // By default, anything is valid
3511
- }
3525
+ router = inject(Router);
3526
+ sessionStorage = inject(SESSION_STORAGE);
3527
+ isValid = inject(NATURAL_PERSISTENCE_VALIDATOR, { optional: true }) ?? (() => true); // By default, anything is valid
3512
3528
  /**
3513
3529
  * Persist in url and local storage the given value with the given key.
3514
3530
  * When stored in storage, we need more "key" to identify the controller.
@@ -3604,8 +3620,8 @@ class NaturalPersistenceService {
3604
3620
  }
3605
3621
  return this.isValid(key, storageKey, result) ? result : null;
3606
3622
  }
3607
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPersistenceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3608
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPersistenceService, providedIn: 'root' }); }
3623
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPersistenceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3624
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPersistenceService, providedIn: 'root' });
3609
3625
  }
3610
3626
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPersistenceService, decorators: [{
3611
3627
  type: Injectable,
@@ -3621,9 +3637,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
3621
3637
  * It also allow some extra data manipulation
3622
3638
  */
3623
3639
  class NaturalDataSource extends DataSource {
3640
+ ngUnsubscribe = new Subject();
3641
+ internalData;
3624
3642
  constructor(value) {
3625
3643
  super();
3626
- this.ngUnsubscribe = new Subject();
3627
3644
  if (value instanceof Observable) {
3628
3645
  this.internalData = new BehaviorSubject(null);
3629
3646
  value.pipe(takeUntil(this.ngUnsubscribe)).subscribe(res => (this.data = res));
@@ -3701,61 +3718,80 @@ function unwrapNavigable(item) {
3701
3718
  */
3702
3719
  // @dynamic
3703
3720
  class NaturalAbstractList extends NaturalAbstractPanel {
3721
+ service;
3722
+ /**
3723
+ * Whether search should be loaded from url/storage and persisted in it too.
3724
+ */
3725
+ persistSearch = true;
3726
+ /**
3727
+ * List of columns that are available to the end-user to select from, via `<natural-columns-picker>`
3728
+ */
3729
+ availableColumns = [];
3730
+ /**
3731
+ * Columns list after interaction with `<natural-columns-picker>`
3732
+ */
3733
+ columnsForTable = [];
3734
+ /**
3735
+ * The default column selection that automatically happened after `<natural-columns-picker>` initialization
3736
+ */
3737
+ defaultSelectedColumns = null;
3738
+ /**
3739
+ * Visible (checked) columns
3740
+ *
3741
+ * Instead of using this, you should consider correctly configuring `AvailableColumn.checked`.
3742
+ */
3743
+ selectedColumns;
3744
+ /**
3745
+ * Source of the list
3746
+ */
3747
+ dataSource;
3748
+ /**
3749
+ * Selection for bulk actions
3750
+ */
3751
+ selection = new SelectionModel(true, []);
3752
+ /**
3753
+ * Next executed action from bulk menu
3754
+ */
3755
+ bulkActionSelected = null;
3756
+ /**
3757
+ * Centralisation of query variables
3758
+ */
3759
+ variablesManager = new NaturalQueryVariablesManager();
3760
+ /**
3761
+ * Configuration for natural-search facets
3762
+ */
3763
+ naturalSearchFacets = [];
3764
+ /**
3765
+ * Result of a search (can be provided as input for initialisation)
3766
+ */
3767
+ naturalSearchSelections = [[]];
3768
+ /**
3769
+ * Data attribute provided by activated route snapshot
3770
+ */
3771
+ routeData;
3772
+ /**
3773
+ * List of page sizes
3774
+ */
3775
+ pageSizeOptions = [5, 25, 50, 100, 200];
3776
+ /**
3777
+ * Initial pagination setup
3778
+ */
3779
+ defaultPagination = {
3780
+ offset: null,
3781
+ pageIndex: 0,
3782
+ pageSize: 25,
3783
+ };
3784
+ /**
3785
+ * Initial sorting
3786
+ */
3787
+ defaultSorting;
3788
+ router = inject(Router);
3789
+ route = inject(ActivatedRoute);
3790
+ alertService = inject(NaturalAlertService);
3791
+ persistenceService = inject(NaturalPersistenceService);
3704
3792
  constructor(service) {
3705
3793
  super();
3706
3794
  this.service = service;
3707
- /**
3708
- * Whether search should be loaded from url/storage and persisted in it too.
3709
- */
3710
- this.persistSearch = true;
3711
- /**
3712
- * List of columns that are available to the end-user to select from, via `<natural-columns-picker>`
3713
- */
3714
- this.availableColumns = [];
3715
- /**
3716
- * Columns list after interaction with `<natural-columns-picker>`
3717
- */
3718
- this.columnsForTable = [];
3719
- /**
3720
- * The default column selection that automatically happened after `<natural-columns-picker>` initialization
3721
- */
3722
- this.defaultSelectedColumns = null;
3723
- /**
3724
- * Selection for bulk actions
3725
- */
3726
- this.selection = new SelectionModel(true, []);
3727
- /**
3728
- * Next executed action from bulk menu
3729
- */
3730
- this.bulkActionSelected = null;
3731
- /**
3732
- * Centralisation of query variables
3733
- */
3734
- this.variablesManager = new NaturalQueryVariablesManager();
3735
- /**
3736
- * Configuration for natural-search facets
3737
- */
3738
- this.naturalSearchFacets = [];
3739
- /**
3740
- * Result of a search (can be provided as input for initialisation)
3741
- */
3742
- this.naturalSearchSelections = [[]];
3743
- /**
3744
- * List of page sizes
3745
- */
3746
- this.pageSizeOptions = [5, 25, 50, 100, 200];
3747
- /**
3748
- * Initial pagination setup
3749
- */
3750
- this.defaultPagination = {
3751
- offset: null,
3752
- pageIndex: 0,
3753
- pageSize: 25,
3754
- };
3755
- this.router = inject(Router);
3756
- this.route = inject(ActivatedRoute);
3757
- this.alertService = inject(NaturalAlertService);
3758
- this.persistenceService = inject(NaturalPersistenceService);
3759
3795
  }
3760
3796
  /**
3761
3797
  * Variables that are always forced on a list, in addition to whatever the end-user might select
@@ -4089,8 +4125,8 @@ class NaturalAbstractList extends NaturalAbstractPanel {
4089
4125
  this.persistenceService.persist('col', value, this.route, this.getStorageKey());
4090
4126
  }
4091
4127
  }
4092
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractList, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
4093
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractList, isStandalone: true, inputs: { persistSearch: "persistSearch", availableColumns: "availableColumns", selectedColumns: "selectedColumns", forcedVariables: "forcedVariables" }, usesInheritance: true, ngImport: i0 }); }
4128
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractList, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
4129
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractList, isStandalone: true, inputs: { persistSearch: "persistSearch", availableColumns: "availableColumns", selectedColumns: "selectedColumns", forcedVariables: "forcedVariables" }, usesInheritance: true, ngImport: i0 });
4094
4130
  }
4095
4131
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractList, decorators: [{
4096
4132
  type: Directive,
@@ -4112,14 +4148,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
4112
4148
  * @dynamic
4113
4149
  */
4114
4150
  class NaturalAbstractNavigableList extends NaturalAbstractList {
4151
+ /**
4152
+ * Name of filter for child items to access ancestor item
4153
+ */
4154
+ ancestorRelationName = 'parent';
4155
+ oldAncertorId = null;
4156
+ breadcrumbs = [];
4115
4157
  constructor(service) {
4116
4158
  super(service);
4117
- /**
4118
- * Name of filter for child items to access ancestor item
4119
- */
4120
- this.ancestorRelationName = 'parent';
4121
- this.oldAncertorId = null;
4122
- this.breadcrumbs = [];
4123
4159
  }
4124
4160
  ngOnInit() {
4125
4161
  // In fact, "na" and "ns" key may exist at the same time in url (but shouldn't).
@@ -4221,8 +4257,8 @@ class NaturalAbstractNavigableList extends NaturalAbstractList {
4221
4257
  }
4222
4258
  return [item];
4223
4259
  }
4224
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractNavigableList, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
4225
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractNavigableList, isStandalone: true, inputs: { ancestorRelationName: "ancestorRelationName" }, usesInheritance: true, ngImport: i0 }); }
4260
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractNavigableList, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
4261
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractNavigableList, isStandalone: true, inputs: { ancestorRelationName: "ancestorRelationName" }, usesInheritance: true, ngImport: i0 });
4226
4262
  }
4227
4263
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractNavigableList, decorators: [{
4228
4264
  type: Directive,
@@ -4339,12 +4375,10 @@ function debug(debugName) {
4339
4375
  * `id` must be the ID of the object that will be updated.
4340
4376
  */
4341
4377
  class NaturalDebounceService {
4342
- constructor() {
4343
- /**
4344
- * Stores the debounced update function
4345
- */
4346
- this.allDebouncedUpdateCache = new Map();
4347
- }
4378
+ /**
4379
+ * Stores the debounced update function
4380
+ */
4381
+ allDebouncedUpdateCache = new Map();
4348
4382
  /**
4349
4383
  * Debounce the `modelService.updateNow()` mutation for a short time. If called multiple times with the same
4350
4384
  * modelService and id, it will postpone the subscription to the mutation.
@@ -4469,8 +4503,8 @@ class NaturalDebounceService {
4469
4503
  this.allDebouncedUpdateCache.delete(modelService);
4470
4504
  }
4471
4505
  }
4472
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDebounceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
4473
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDebounceService, providedIn: 'root' }); }
4506
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDebounceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4507
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDebounceService, providedIn: 'root' });
4474
4508
  }
4475
4509
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDebounceService, decorators: [{
4476
4510
  type: Injectable,
@@ -4480,6 +4514,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
4480
4514
  }] });
4481
4515
 
4482
4516
  class NaturalAbstractModelService {
4517
+ name;
4518
+ oneQuery;
4519
+ allQuery;
4520
+ createMutation;
4521
+ updateMutation;
4522
+ deleteMutation;
4523
+ createName;
4524
+ updateName;
4525
+ deleteName;
4526
+ /**
4527
+ * Store the creation mutations that are pending
4528
+ */
4529
+ creatingCache = new Map();
4530
+ apollo = inject(Apollo);
4531
+ naturalDebounceService = inject(NaturalDebounceService);
4532
+ plural;
4483
4533
  /**
4484
4534
  *
4485
4535
  * @param name service and single object query name (eg. userForFront or user).
@@ -4503,12 +4553,6 @@ class NaturalAbstractModelService {
4503
4553
  this.createName = createName;
4504
4554
  this.updateName = updateName;
4505
4555
  this.deleteName = deleteName;
4506
- /**
4507
- * Store the creation mutations that are pending
4508
- */
4509
- this.creatingCache = new Map();
4510
- this.apollo = inject(Apollo);
4511
- this.naturalDebounceService = inject(NaturalDebounceService);
4512
4556
  this.plural = plural ?? makePlural(this.name);
4513
4557
  }
4514
4558
  /**
@@ -4996,9 +5040,7 @@ const enumTypeQuery = gql `
4996
5040
  }
4997
5041
  `;
4998
5042
  class NaturalEnumService {
4999
- constructor() {
5000
- this.apollo = inject(Apollo);
5001
- }
5043
+ apollo = inject(Apollo);
5002
5044
  /**
5003
5045
  * Return a list of observable enumerables considering the given name
5004
5046
  */
@@ -5036,8 +5078,8 @@ class NaturalEnumService {
5036
5078
  return '';
5037
5079
  }));
5038
5080
  }
5039
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5040
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumService, providedIn: 'root' }); }
5081
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5082
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumService, providedIn: 'root' });
5041
5083
  }
5042
5084
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumService, decorators: [{
5043
5085
  type: Injectable,
@@ -5067,9 +5109,11 @@ const queriesQuery = gql `
5067
5109
  }
5068
5110
  `;
5069
5111
  class NaturalLinkMutationService {
5070
- constructor() {
5071
- this.apollo = inject(Apollo);
5072
- }
5112
+ apollo = inject(Apollo);
5113
+ /**
5114
+ * Receives the list of available mutations
5115
+ */
5116
+ allMutations;
5073
5117
  /**
5074
5118
  * Link two objects together
5075
5119
  */
@@ -5181,8 +5225,8 @@ class NaturalLinkMutationService {
5181
5225
  }
5182
5226
  }`;
5183
5227
  }
5184
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkMutationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5185
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkMutationService, providedIn: 'root' }); }
5228
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkMutationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5229
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkMutationService, providedIn: 'root' });
5186
5230
  }
5187
5231
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkMutationService, decorators: [{
5188
5232
  type: Injectable,
@@ -5241,8 +5285,8 @@ class NaturalSwissParsingDateAdapter extends NativeDateAdapter {
5241
5285
  // Also see https://github.com/tc39/ecma402/issues/6
5242
5286
  return 1;
5243
5287
  }
5244
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSwissParsingDateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
5245
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSwissParsingDateAdapter, providedIn: 'root' }); }
5288
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSwissParsingDateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5289
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSwissParsingDateAdapter, providedIn: 'root' });
5246
5290
  }
5247
5291
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSwissParsingDateAdapter, decorators: [{
5248
5292
  type: Injectable,
@@ -5274,13 +5318,13 @@ const naturalRegistered = Symbol('Natural icon registered');
5274
5318
  * ```
5275
5319
  */
5276
5320
  class NaturalIconDirective {
5321
+ matIconRegistry = inject(MatIconRegistry);
5322
+ domSanitizer = inject(DomSanitizer);
5323
+ config = inject(NATURAL_ICONS_CONFIG, { optional: true });
5324
+ matIconComponent = inject(MatIcon, { host: true, self: true });
5325
+ _size = undefined;
5326
+ classes = '';
5277
5327
  constructor() {
5278
- this.matIconRegistry = inject(MatIconRegistry);
5279
- this.domSanitizer = inject(DomSanitizer);
5280
- this.config = inject(NATURAL_ICONS_CONFIG, { optional: true });
5281
- this.matIconComponent = inject(MatIcon, { host: true, self: true });
5282
- this._size = undefined;
5283
- this.classes = '';
5284
5328
  const config = this.config;
5285
5329
  this.registerIcons(config ?? {});
5286
5330
  }
@@ -5319,8 +5363,8 @@ class NaturalIconDirective {
5319
5363
  }
5320
5364
  }
5321
5365
  }
5322
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
5323
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalIconDirective, isStandalone: true, selector: "mat-icon[naturalIcon]", inputs: { naturalIcon: "naturalIcon", size: "size" }, host: { properties: { "style.font-size.px": "this._size", "style.min-height.px": "this._size", "style.min-width.px": "this._size", "class": "this.classes" } }, ngImport: i0 }); }
5366
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5367
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalIconDirective, isStandalone: true, selector: "mat-icon[naturalIcon]", inputs: { naturalIcon: "naturalIcon", size: "size" }, host: { properties: { "style.font-size.px": "this._size", "style.min-height.px": "this._size", "style.min-width.px": "this._size", "class": "this.classes" } }, ngImport: i0 });
5324
5368
  }
5325
5369
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalIconDirective, decorators: [{
5326
5370
  type: Directive,
@@ -5348,21 +5392,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
5348
5392
  }] } });
5349
5393
 
5350
5394
  class NaturalColumnsPickerComponent {
5351
- constructor() {
5352
- this.destroyRef = inject(DestroyRef);
5353
- this.breakpointObserver = inject(BreakpointObserver);
5354
- this._availableColumns = [];
5355
- this.buttons = [];
5356
- /**
5357
- * Emit a list of valid and selected column keys whenever the selection changes
5358
- */
5359
- this.selectionChange = new EventEmitter();
5360
- /**
5361
- * Displayed options in the dropdown menu
5362
- */
5363
- this.displayedColumns = [];
5364
- this.isMobile = this.breakpointObserver.observe(Breakpoints.XSmall).pipe(map$1(result => result.matches));
5365
- }
5395
+ destroyRef = inject(DestroyRef);
5396
+ breakpointObserver = inject(BreakpointObserver);
5397
+ _selections;
5398
+ _availableColumns = [];
5399
+ buttons = [];
5366
5400
  /**
5367
5401
  * Set all the columns that are available.
5368
5402
  */
@@ -5393,6 +5427,15 @@ class NaturalColumnsPickerComponent {
5393
5427
  col.checked = columns.includes(col.id);
5394
5428
  });
5395
5429
  }
5430
+ /**
5431
+ * Emit a list of valid and selected column keys whenever the selection changes
5432
+ */
5433
+ selectionChange = new EventEmitter();
5434
+ /**
5435
+ * Displayed options in the dropdown menu
5436
+ */
5437
+ displayedColumns = [];
5438
+ isMobile = this.breakpointObserver.observe(Breakpoints.XSmall).pipe(map$1(result => result.matches));
5396
5439
  initColumns() {
5397
5440
  this._availableColumns?.forEach(col => {
5398
5441
  col.checked = this._selections?.length ? this._selections.includes(col.id) : col.checked;
@@ -5434,8 +5477,8 @@ class NaturalColumnsPickerComponent {
5434
5477
  const visibleButtons = this.buttons?.reduce((sum, button) => (this.defaultTrue(button.show) ? 1 : 0), 0) ?? 0;
5435
5478
  return visibleButtons > 0;
5436
5479
  }
5437
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalColumnsPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5438
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalColumnsPickerComponent, isStandalone: true, selector: "natural-columns-picker", inputs: { buttons: "buttons", availableColumns: "availableColumns", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div>\n @if ((isMobile | async) && someVisibleButtons()) {\n <button mat-icon-button [matMenuTriggerFor]=\"mobileMenu\">\n <mat-icon naturalIcon=\"more_vert\" />\n </button>\n <mat-menu #mobileMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (button of buttons; track button) {\n @if (button.href) {\n <a\n mat-menu-item\n [href]=\"defaultTrue(button.show) && button.href\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </a>\n }\n @if (defaultTrue(button.show) && !button.href && !button.buttons) {\n <button\n mat-menu-item\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n }\n @if (defaultTrue(button.show) && button.buttons) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n (click)=\"button.click?.(button, $event)\"\n [ngClass]=\"needMargin(button)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n <mat-menu #subMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n }\n }\n @if (displayedColumns.length) {\n <button [matMenuTriggerFor]=\"columnMenu\" mat-menu-item [ngClass]=\"needMargin(null)\">\n <span i18n>Colonnes</span>\n </button>\n }\n </ng-template>\n </mat-menu>\n } @else {\n @for (button of buttons; track button) {\n @if (button.href) {\n <a\n mat-icon-button\n [href]=\"defaultTrue(button.show) && button.href\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </a>\n }\n @if (defaultTrue(button.show) && !button.href && !button.buttons) {\n <button\n mat-icon-button\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n }\n @if (defaultTrue(button.show) && button.buttons) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n <mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n }\n }\n @if (displayedColumns.length) {\n <button\n [matMenuTriggerFor]=\"columnMenu\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"S\u00E9lectionner les colonnes\"\n >\n <mat-icon naturalIcon=\"view_column\" />\n </button>\n }\n }\n</div>\n\n<mat-menu #columnMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (column of displayedColumns; track column) {\n <div (click)=\"$event.stopPropagation(); column.checked = !column.checked; updateColumns()\" mat-menu-item>\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"updateColumns()\"\n [(ngModel)]=\"column.checked\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </ng-template>\n</mat-menu>\n", styles: [".align-with-checkbox{padding-left:61px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
5480
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalColumnsPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5481
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalColumnsPickerComponent, isStandalone: true, selector: "natural-columns-picker", inputs: { buttons: "buttons", availableColumns: "availableColumns", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div>\n @if ((isMobile | async) && someVisibleButtons()) {\n <button mat-icon-button [matMenuTriggerFor]=\"mobileMenu\">\n <mat-icon naturalIcon=\"more_vert\" />\n </button>\n <mat-menu #mobileMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (button of buttons; track button) {\n @if (button.href) {\n <a\n mat-menu-item\n [href]=\"defaultTrue(button.show) && button.href\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </a>\n }\n @if (defaultTrue(button.show) && !button.href && !button.buttons) {\n <button\n mat-menu-item\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n }\n @if (defaultTrue(button.show) && button.buttons) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n (click)=\"button.click?.(button, $event)\"\n [ngClass]=\"needMargin(button)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n <mat-menu #subMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n }\n }\n @if (displayedColumns.length) {\n <button [matMenuTriggerFor]=\"columnMenu\" mat-menu-item [ngClass]=\"needMargin(null)\">\n <span i18n>Colonnes</span>\n </button>\n }\n </ng-template>\n </mat-menu>\n } @else {\n @for (button of buttons; track button) {\n @if (button.href) {\n <a\n mat-icon-button\n [href]=\"defaultTrue(button.show) && button.href\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </a>\n }\n @if (defaultTrue(button.show) && !button.href && !button.buttons) {\n <button\n mat-icon-button\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n }\n @if (defaultTrue(button.show) && button.buttons) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n <mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n }\n }\n @if (displayedColumns.length) {\n <button\n [matMenuTriggerFor]=\"columnMenu\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"S\u00E9lectionner les colonnes\"\n >\n <mat-icon naturalIcon=\"view_column\" />\n </button>\n }\n }\n</div>\n\n<mat-menu #columnMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (column of displayedColumns; track column) {\n <div (click)=\"$event.stopPropagation(); column.checked = !column.checked; updateColumns()\" mat-menu-item>\n <mat-checkbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"updateColumns()\"\n [(ngModel)]=\"column.checked\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </ng-template>\n</mat-menu>\n", styles: [".align-with-checkbox{padding-left:61px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
5439
5482
  }
5440
5483
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalColumnsPickerComponent, decorators: [{
5441
5484
  type: Component,
@@ -5481,16 +5524,16 @@ function getTabId(tab) {
5481
5524
  * ```
5482
5525
  */
5483
5526
  class NaturalLinkableTabDirective {
5527
+ destroyRef = inject(DestroyRef);
5528
+ component = inject(MatTabGroup);
5529
+ route = inject(ActivatedRoute);
5530
+ router = inject(Router);
5531
+ /**
5532
+ * If false, disables the persistent navigation
5533
+ */
5534
+ naturalLinkableTab = true;
5535
+ isLoadingRouteConfig = false;
5484
5536
  constructor() {
5485
- this.destroyRef = inject(DestroyRef);
5486
- this.component = inject(MatTabGroup);
5487
- this.route = inject(ActivatedRoute);
5488
- this.router = inject(Router);
5489
- /**
5490
- * If false, disables the persistent navigation
5491
- */
5492
- this.naturalLinkableTab = true;
5493
- this.isLoadingRouteConfig = false;
5494
5537
  this.router.events.pipe(takeUntilDestroyed()).subscribe(event => {
5495
5538
  if (event instanceof RouteConfigLoadStart) {
5496
5539
  this.isLoadingRouteConfig = true;
@@ -5537,8 +5580,8 @@ class NaturalLinkableTabDirective {
5537
5580
  getTabIndex(fragment) {
5538
5581
  return this.component._tabs.toArray().findIndex(tab => fragment === getTabId(tab));
5539
5582
  }
5540
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkableTabDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
5541
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalLinkableTabDirective, isStandalone: true, selector: "mat-tab-group[naturalLinkableTab]", inputs: { naturalLinkableTab: "naturalLinkableTab" }, ngImport: i0 }); }
5583
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkableTabDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5584
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalLinkableTabDirective, isStandalone: true, selector: "mat-tab-group[naturalLinkableTab]", inputs: { naturalLinkableTab: "naturalLinkableTab" }, ngImport: i0 });
5542
5585
  }
5543
5586
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkableTabDirective, decorators: [{
5544
5587
  type: Directive,
@@ -5560,8 +5603,8 @@ class NaturalCapitalizePipe {
5560
5603
  }
5561
5604
  return value;
5562
5605
  }
5563
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
5564
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalCapitalizePipe, isStandalone: true, name: "capitalize" }); }
5606
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5607
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalCapitalizePipe, isStandalone: true, name: "capitalize" });
5565
5608
  }
5566
5609
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalCapitalizePipe, decorators: [{
5567
5610
  type: Pipe,
@@ -5575,8 +5618,8 @@ class NaturalEllipsisPipe {
5575
5618
  transform(value, limit) {
5576
5619
  return value.substr(0, limit - 1) + (value.length > limit ? '…' : '');
5577
5620
  }
5578
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEllipsisPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
5579
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalEllipsisPipe, isStandalone: true, name: "ellipsis" }); }
5621
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEllipsisPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5622
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalEllipsisPipe, isStandalone: true, name: "ellipsis" });
5580
5623
  }
5581
5624
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEllipsisPipe, decorators: [{
5582
5625
  type: Pipe,
@@ -5592,14 +5635,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
5592
5635
  * Usage would be: {{ element.priority | enum: 'Priority' | async }}
5593
5636
  */
5594
5637
  class NaturalEnumPipe {
5595
- constructor() {
5596
- this.enumService = inject(NaturalEnumService);
5597
- }
5638
+ enumService = inject(NaturalEnumService);
5598
5639
  transform(value, enumName) {
5599
5640
  return this.enumService.getValueName(value, enumName);
5600
5641
  }
5601
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
5602
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumPipe, isStandalone: true, name: "enum" }); }
5642
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5643
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumPipe, isStandalone: true, name: "enum" });
5603
5644
  }
5604
5645
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumPipe, decorators: [{
5605
5646
  type: Pipe,
@@ -5622,6 +5663,7 @@ function isDate(value) {
5622
5663
  * - "dans 3 ans"
5623
5664
  */
5624
5665
  class NaturalTimeAgoPipe {
5666
+ fakedNow;
5625
5667
  constructor(fakedNow = null) {
5626
5668
  this.fakedNow = fakedNow;
5627
5669
  }
@@ -5730,8 +5772,8 @@ class NaturalTimeAgoPipe {
5730
5772
  throw new Error('Time travelling just happened');
5731
5773
  }
5732
5774
  }
5733
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalTimeAgoPipe, deps: [{ token: 'SHOULD_NEVER_BE_INJECTED', optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
5734
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalTimeAgoPipe, isStandalone: true, name: "timeAgo" }); }
5775
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalTimeAgoPipe, deps: [{ token: 'SHOULD_NEVER_BE_INJECTED', optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
5776
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalTimeAgoPipe, isStandalone: true, name: "timeAgo" });
5735
5777
  }
5736
5778
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalTimeAgoPipe, decorators: [{
5737
5779
  type: Pipe,
@@ -5769,9 +5811,7 @@ function densities(src, forImageSet) {
5769
5811
  return result;
5770
5812
  }
5771
5813
  class NaturalSrcDensityDirective {
5772
- constructor() {
5773
- this.elementRef = inject(ElementRef);
5774
- }
5814
+ elementRef = inject(ElementRef);
5775
5815
  /**
5776
5816
  * Automatically apply image selection based on screen density.
5777
5817
  *
@@ -5804,8 +5844,8 @@ class NaturalSrcDensityDirective {
5804
5844
  this.elementRef.nativeElement.src = src;
5805
5845
  this.elementRef.nativeElement.srcset = densities(src, false);
5806
5846
  }
5807
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSrcDensityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
5808
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalSrcDensityDirective, isStandalone: true, selector: "img[naturalSrcDensity]", inputs: { naturalSrcDensity: "naturalSrcDensity" }, ngImport: i0 }); }
5847
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSrcDensityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5848
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalSrcDensityDirective, isStandalone: true, selector: "img[naturalSrcDensity]", inputs: { naturalSrcDensity: "naturalSrcDensity" }, ngImport: i0 });
5809
5849
  }
5810
5850
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSrcDensityDirective, decorators: [{
5811
5851
  type: Directive,
@@ -5819,9 +5859,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
5819
5859
  }] } });
5820
5860
 
5821
5861
  class NaturalBackgroundDensityDirective {
5822
- constructor() {
5823
- this.elementRef = inject(ElementRef);
5824
- }
5862
+ elementRef = inject(ElementRef);
5825
5863
  /**
5826
5864
  * Automatically apply background image selection based on screen density.
5827
5865
  *
@@ -5866,8 +5904,8 @@ class NaturalBackgroundDensityDirective {
5866
5904
  this.elementRef.nativeElement.style.backgroundImage = responsive;
5867
5905
  }
5868
5906
  }
5869
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalBackgroundDensityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
5870
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalBackgroundDensityDirective, isStandalone: true, selector: "[naturalBackgroundDensity]", inputs: { naturalBackgroundDensity: "naturalBackgroundDensity" }, ngImport: i0 }); }
5907
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalBackgroundDensityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5908
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalBackgroundDensityDirective, isStandalone: true, selector: "[naturalBackgroundDensity]", inputs: { naturalBackgroundDensity: "naturalBackgroundDensity" }, ngImport: i0 });
5871
5909
  }
5872
5910
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalBackgroundDensityDirective, decorators: [{
5873
5911
  type: Directive,
@@ -5881,10 +5919,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
5881
5919
  }] } });
5882
5920
 
5883
5921
  class NaturalDialogTriggerComponent {
5922
+ dialog = inject(MatDialog);
5923
+ route = inject(ActivatedRoute);
5924
+ router = inject(Router);
5925
+ dialogRef;
5926
+ triggerConfig;
5884
5927
  constructor() {
5885
- this.dialog = inject(MatDialog);
5886
- this.route = inject(ActivatedRoute);
5887
- this.router = inject(Router);
5888
5928
  // Data from activated route
5889
5929
  this.triggerConfig = this.route.snapshot.data.trigger;
5890
5930
  // Get data relative to dialog service configuration
@@ -5935,8 +5975,8 @@ class NaturalDialogTriggerComponent {
5935
5975
  this.router.navigate(['.'], { relativeTo: this.route.parent });
5936
5976
  }
5937
5977
  }
5938
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDialogTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5939
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalDialogTriggerComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true }); }
5978
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDialogTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5979
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalDialogTriggerComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
5940
5980
  }
5941
5981
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDialogTriggerComponent, decorators: [{
5942
5982
  type: Component,
@@ -5965,15 +6005,16 @@ function stripTags(str) {
5965
6005
  * configured for it in the routing.
5966
6006
  */
5967
6007
  class NaturalSeoService {
6008
+ router = inject(Router);
6009
+ titleService = inject(Title);
6010
+ metaTagService = inject(Meta);
6011
+ document = inject(DOCUMENT);
6012
+ locale = inject(LOCALE_ID);
6013
+ routeData;
6014
+ config = {
6015
+ applicationName: '',
6016
+ };
5968
6017
  constructor() {
5969
- this.router = inject(Router);
5970
- this.titleService = inject(Title);
5971
- this.metaTagService = inject(Meta);
5972
- this.document = inject(DOCUMENT);
5973
- this.locale = inject(LOCALE_ID);
5974
- this.config = {
5975
- applicationName: '',
5976
- };
5977
6018
  const configToken = inject(NATURAL_SEO_CONFIG);
5978
6019
  combineLatest({
5979
6020
  config: configToken instanceof Observable ? configToken.pipe(startWith$1(this.config)) : of(configToken),
@@ -6162,8 +6203,8 @@ class NaturalSeoService {
6162
6203
  }
6163
6204
  return of(seo);
6164
6205
  }
6165
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSeoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
6166
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSeoService, providedIn: 'root' }); }
6206
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSeoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6207
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSeoService, providedIn: 'root' });
6167
6208
  }
6168
6209
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSeoService, decorators: [{
6169
6210
  type: Injectable,
@@ -6198,36 +6239,41 @@ function provideSeo(config) {
6198
6239
  */
6199
6240
 
6200
6241
  class NaturalDetailHeaderComponent {
6201
- constructor() {
6202
- /**
6203
- * Must be set to get proper links when used in panels
6204
- */
6205
- this.isPanel = false;
6206
- /**
6207
- * If given will show icon before title
6208
- */
6209
- this.icon = '';
6210
- /**
6211
- * Title shown if model has no name, or empty name.
6212
- *
6213
- * Typically should be the human name for the object type, eg: 'Product'
6214
- */
6215
- this.label = '';
6216
- /**
6217
- * Label of the root of the breadcrumb, defaults to the value of `label`.
6218
- *
6219
- * Typically should be the plural form of the object type, eg: 'Products'
6220
- */
6221
- this.rootLabel = '';
6222
- /**
6223
- * Title shown if model has no id.
6224
- *
6225
- * Typically should be similar to 'New product'.
6226
- */
6227
- this.newLabel = '';
6228
- this.breadcrumbs = [];
6229
- this.listRoute = [];
6230
- }
6242
+ /**
6243
+ * Base URL used to build links, defaults to '/'
6244
+ */
6245
+ currentBaseUrl;
6246
+ /**
6247
+ * Must be set to get proper links when used in panels
6248
+ */
6249
+ isPanel = false;
6250
+ /**
6251
+ * If given will show icon before title
6252
+ */
6253
+ icon = '';
6254
+ /**
6255
+ * Title shown if model has no name, or empty name.
6256
+ *
6257
+ * Typically should be the human name for the object type, eg: 'Product'
6258
+ */
6259
+ label = '';
6260
+ /**
6261
+ * Label of the root of the breadcrumb, defaults to the value of `label`.
6262
+ *
6263
+ * Typically should be the plural form of the object type, eg: 'Products'
6264
+ */
6265
+ rootLabel = '';
6266
+ /**
6267
+ * Title shown if model has no id.
6268
+ *
6269
+ * Typically should be similar to 'New product'.
6270
+ */
6271
+ newLabel = '';
6272
+ model;
6273
+ breadcrumbs = [];
6274
+ listRoute = [];
6275
+ listFragment;
6276
+ link;
6231
6277
  getRootLink() {
6232
6278
  return [this.currentBaseUrl || '/'].concat(this.listRoute);
6233
6279
  }
@@ -6237,8 +6283,8 @@ class NaturalDetailHeaderComponent {
6237
6283
  }
6238
6284
  return this.getRootLink().concat([id]);
6239
6285
  }
6240
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDetailHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6241
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalDetailHeaderComponent, isStandalone: true, 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 @if (rootLabel || label) {\n <a [routerLink]=\"isPanel ? [] : getRootLink()\" [fragment]=\"listFragment\" color=\"primary\" mat-button>{{\n rootLabel || label\n }}</a>\n }\n @for (parent of breadcrumbs; track parent.id) {\n /\n <a [routerLink]=\"isPanel ? [] : getLink(parent.id)\" color=\"primary\" mat-button>\n {{ parent?.fullName || parent?.name }}</a\n >\n }\n</div>\n\n<div class=\"body\">\n @if (icon) {\n <div style=\"width: 30px\">\n <mat-icon [naturalIcon]=\"icon\" />\n </div>\n }\n @if (!model.id) {\n <div class=\"mat-headline-5 nat-no-margin newLabel\">{{ newLabel }}</div>\n }\n @if (model.id) {\n <div class=\"mat-headline-5 nat-no-margin label\">{{ model.name || model.fullName || label }}</div>\n }\n <div>\n <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 mat-icon{display:none}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }] }); }
6286
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDetailHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6287
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalDetailHeaderComponent, isStandalone: true, 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 @if (rootLabel || label) {\n <a [routerLink]=\"isPanel ? [] : getRootLink()\" [fragment]=\"listFragment\" color=\"primary\" mat-button>{{\n rootLabel || label\n }}</a>\n }\n @for (parent of breadcrumbs; track parent.id) {\n /\n <a [routerLink]=\"isPanel ? [] : getLink(parent.id)\" color=\"primary\" mat-button>\n {{ parent?.fullName || parent?.name }}</a\n >\n }\n</div>\n\n<div class=\"body\">\n @if (icon) {\n <div style=\"width: 30px\">\n <mat-icon [naturalIcon]=\"icon\" />\n </div>\n }\n @if (!model.id) {\n <div class=\"mat-headline-5 nat-no-margin newLabel\">{{ newLabel }}</div>\n }\n @if (model.id) {\n <div class=\"mat-headline-5 nat-no-margin label\">{{ model.name || model.fullName || label }}</div>\n }\n <div>\n <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 mat-icon{display:none}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }] });
6242
6288
  }
6243
6289
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDetailHeaderComponent, decorators: [{
6244
6290
  type: Component,
@@ -6273,23 +6319,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
6273
6319
  */
6274
6320
 
6275
6321
  class TypeSelectComponent {
6322
+ destroyRef = inject(DestroyRef);
6323
+ renderedValue = new BehaviorSubject('');
6324
+ list;
6325
+ requireValueCtrl = false;
6326
+ operators = possibleDiscreteOperators;
6327
+ operatorCtrl = new FormControl('is', { nonNullable: true });
6328
+ valueCtrl = new FormControl();
6329
+ form = new FormGroup({
6330
+ operator: this.operatorCtrl,
6331
+ value: this.valueCtrl,
6332
+ });
6333
+ items = [];
6334
+ configuration;
6335
+ defaults = {
6336
+ items: [],
6337
+ multiple: true,
6338
+ operators: true,
6339
+ };
6276
6340
  constructor() {
6277
- this.destroyRef = inject(DestroyRef);
6278
- this.renderedValue = new BehaviorSubject('');
6279
- this.requireValueCtrl = false;
6280
- this.operators = possibleDiscreteOperators;
6281
- this.operatorCtrl = new FormControl('is', { nonNullable: true });
6282
- this.valueCtrl = new FormControl();
6283
- this.form = new FormGroup({
6284
- operator: this.operatorCtrl,
6285
- value: this.valueCtrl,
6286
- });
6287
- this.items = [];
6288
- this.defaults = {
6289
- items: [],
6290
- multiple: true,
6291
- operators: true,
6292
- };
6293
6341
  const data = inject(NATURAL_DROPDOWN_DATA);
6294
6342
  this.configuration = { ...this.defaults, ...data.configuration };
6295
6343
  // Immediately initValidators and everytime the operator change later
@@ -6417,8 +6465,8 @@ class TypeSelectComponent {
6417
6465
  throw new Error('Unsupported operator key: ' + key);
6418
6466
  }
6419
6467
  }
6420
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6421
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeSelectComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "list", first: true, predicate: MatSelectionList, descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n @if (configuration.operators) {\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\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n\n @if (requireValueCtrl) {\n <mat-selection-list [formControl]=\"valueCtrl\">\n @for (item of items; track item) {\n <mat-list-option [value]=\"getId(item)\" togglePosition=\"before\">\n {{ getDisplay(item) }}\n </mat-list-option>\n }\n </mat-selection-list>\n }\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i5$2.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i5$2.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }] }); }
6468
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6469
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeSelectComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "list", first: true, predicate: MatSelectionList, descendants: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n @if (configuration.operators) {\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\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n\n @if (requireValueCtrl) {\n <mat-selection-list [formControl]=\"valueCtrl\">\n @for (item of items; track item) {\n <mat-list-option [value]=\"getId(item)\" togglePosition=\"before\">\n {{ getDisplay(item) }}\n </mat-list-option>\n }\n </mat-selection-list>\n }\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i5$2.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i5$2.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }] });
6422
6470
  }
6423
6471
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeSelectComponent, decorators: [{
6424
6472
  type: Component,
@@ -6429,16 +6477,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
6429
6477
  }] } });
6430
6478
 
6431
6479
  class AbstractAssociationSelectComponent {
6480
+ configuration;
6481
+ renderedValue = new BehaviorSubject('');
6482
+ requireValueCtrl = false;
6483
+ operators = possibleDiscreteOperators;
6484
+ operatorCtrl = new FormControl('is', { nonNullable: true });
6485
+ valueCtrl = new FormControl();
6486
+ form = new FormGroup({
6487
+ operator: this.operatorCtrl,
6488
+ value: this.valueCtrl,
6489
+ });
6432
6490
  constructor(data) {
6433
- this.renderedValue = new BehaviorSubject('');
6434
- this.requireValueCtrl = false;
6435
- this.operators = possibleDiscreteOperators;
6436
- this.operatorCtrl = new FormControl('is', { nonNullable: true });
6437
- this.valueCtrl = new FormControl();
6438
- this.form = new FormGroup({
6439
- operator: this.operatorCtrl,
6440
- value: this.valueCtrl,
6441
- });
6442
6491
  this.configuration = data.configuration;
6443
6492
  // Immediately initValidators and everytime the operator change later
6444
6493
  this.operatorCtrl.valueChanges.pipe(startWith(null)).subscribe(() => this.initValidators());
@@ -6509,8 +6558,8 @@ class AbstractAssociationSelectComponent {
6509
6558
  throw new Error('Unsupported operator key: ' + key);
6510
6559
  }
6511
6560
  }
6512
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractAssociationSelectComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }], target: i0.ɵɵFactoryTarget.Directive }); }
6513
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: AbstractAssociationSelectComponent, isStandalone: true, ngImport: i0 }); }
6561
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractAssociationSelectComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }], target: i0.ɵɵFactoryTarget.Directive });
6562
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: AbstractAssociationSelectComponent, isStandalone: true, ngImport: i0 });
6514
6563
  }
6515
6564
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractAssociationSelectComponent, decorators: [{
6516
6565
  type: Directive,
@@ -6527,6 +6576,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
6527
6576
  * custom FormControl class ("NaturalFormControl").
6528
6577
  */
6529
6578
  class ExternalFormControlMatcher extends ErrorStateMatcher {
6579
+ component;
6530
6580
  constructor(component) {
6531
6581
  super();
6532
6582
  this.component = component;
@@ -6540,6 +6590,12 @@ class ExternalFormControlMatcher extends ErrorStateMatcher {
6540
6590
  }
6541
6591
  }
6542
6592
  class AbstractSelect {
6593
+ ngControl;
6594
+ placeholder;
6595
+ /**
6596
+ * Mat-hint
6597
+ */
6598
+ hint = null;
6543
6599
  /**
6544
6600
  * If the field is required
6545
6601
  */
@@ -6550,44 +6606,64 @@ class AbstractSelect {
6550
6606
  get required() {
6551
6607
  return !!this._required;
6552
6608
  }
6609
+ _required;
6610
+ /**
6611
+ * Add a suffix button that is a link to given destination
6612
+ */
6613
+ navigateTo;
6614
+ /**
6615
+ * If provided cause a new clear button to appear
6616
+ */
6617
+ clearLabel;
6618
+ /**
6619
+ * Whether to show the search icon
6620
+ */
6621
+ showIcon = true;
6622
+ /**
6623
+ * Icon name
6624
+ */
6625
+ icon = 'search';
6626
+ /**
6627
+ * Function to customize the rendering of the selected item as text in input
6628
+ */
6629
+ displayWith;
6630
+ /**
6631
+ * Emit the selected value whenever it changes
6632
+ */
6633
+ selectionChange = new EventEmitter();
6634
+ /**
6635
+ * Emits when internal input is blurred
6636
+ */
6637
+ // eslint-disable-next-line @angular-eslint/no-output-native
6638
+ blur = new EventEmitter();
6639
+ /**
6640
+ * Contains internal representation for current selection AND searched text (for autocomplete)
6641
+ *
6642
+ * It is **not** necessarily `V | null`.
6643
+ *
6644
+ * - NaturalSelectComponent: `string | V | null`. We allow `string`
6645
+ * only when `optionRequired` is false, so most of the time it is `V | null`.
6646
+ * - NaturalSelectHierarchicComponent: `string | null`.
6647
+ * - NaturalSelectEnumComponent: `V | null`.
6648
+ *
6649
+ * In natural-select context, we use pristine and dirty to identify if the displayed value is search or committed model :
6650
+ * - Pristine status (unchanged value) means the model is displayed and propagated = the selection is committed
6651
+ * - Dirty status (changed value) means we are in search/autocomplete mode
6652
+ */
6653
+ internalCtrl = new FormControl(null);
6654
+ /**
6655
+ * Interface with ControlValueAccessor
6656
+ * Notifies parent model / form controller
6657
+ */
6658
+ onChange;
6659
+ /**
6660
+ * Interface with ControlValueAccessor
6661
+ * Notifies parent model / form controller
6662
+ */
6663
+ onTouched;
6664
+ matcher;
6553
6665
  constructor(ngControl) {
6554
6666
  this.ngControl = ngControl;
6555
- /**
6556
- * Mat-hint
6557
- */
6558
- this.hint = null;
6559
- /**
6560
- * Whether to show the search icon
6561
- */
6562
- this.showIcon = true;
6563
- /**
6564
- * Icon name
6565
- */
6566
- this.icon = 'search';
6567
- /**
6568
- * Emit the selected value whenever it changes
6569
- */
6570
- this.selectionChange = new EventEmitter();
6571
- /**
6572
- * Emits when internal input is blurred
6573
- */
6574
- // eslint-disable-next-line @angular-eslint/no-output-native
6575
- this.blur = new EventEmitter();
6576
- /**
6577
- * Contains internal representation for current selection AND searched text (for autocomplete)
6578
- *
6579
- * It is **not** necessarily `V | null`.
6580
- *
6581
- * - NaturalSelectComponent: `string | V | null`. We allow `string`
6582
- * only when `optionRequired` is false, so most of the time it is `V | null`.
6583
- * - NaturalSelectHierarchicComponent: `string | null`.
6584
- * - NaturalSelectEnumComponent: `V | null`.
6585
- *
6586
- * In natural-select context, we use pristine and dirty to identify if the displayed value is search or committed model :
6587
- * - Pristine status (unchanged value) means the model is displayed and propagated = the selection is committed
6588
- * - Dirty status (changed value) means we are in search/autocomplete mode
6589
- */
6590
- this.internalCtrl = new FormControl(null);
6591
6667
  if (this.ngControl) {
6592
6668
  this.ngControl.valueAccessor = this;
6593
6669
  }
@@ -6682,8 +6758,8 @@ class AbstractSelect {
6682
6758
  }
6683
6759
  this.internalCtrl.updateValueAndValidity();
6684
6760
  }
6685
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractSelect, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
6686
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: AbstractSelect, isStandalone: true, inputs: { placeholder: "placeholder", hint: "hint", required: "required", navigateTo: "navigateTo", clearLabel: "clearLabel", showIcon: "showIcon", icon: "icon", displayWith: "displayWith", disabled: "disabled" }, outputs: { selectionChange: "selectionChange", blur: "blur" }, ngImport: i0 }); }
6761
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractSelect, deps: [{ token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
6762
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: AbstractSelect, isStandalone: true, inputs: { placeholder: "placeholder", hint: "hint", required: "required", navigateTo: "navigateTo", clearLabel: "clearLabel", showIcon: "showIcon", icon: "icon", displayWith: "displayWith", disabled: "disabled" }, outputs: { selectionChange: "selectionChange", blur: "blur" }, ngImport: i0 });
6687
6763
  }
6688
6764
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractSelect, decorators: [{
6689
6765
  type: Directive,
@@ -6749,57 +6825,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
6749
6825
  * ```
6750
6826
  */
6751
6827
  class NaturalSelectComponent extends AbstractSelect {
6752
- constructor() {
6753
- super(...arguments);
6754
- this.destroyRef = inject(DestroyRef);
6755
- /**
6756
- * If false, allows to input free string without selecting an option from autocomplete suggestions
6757
- */
6758
- this.optionRequired = true;
6759
- /**
6760
- * The field on which to search for, default to 'custom'.
6761
- */
6762
- // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
6763
- this.searchField = 'custom';
6764
- /**
6765
- * The operator with which to search for, default to 'search' if `searchField` is 'custom', else 'like'.
6766
- */
6767
- // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
6768
- this.searchOperator = null;
6769
- /**
6770
- * Cache the committed value during search mode.
6771
- * It's used to be restored in case we cancel the selection
6772
- */
6773
- this.lastValidValue = null;
6774
- /**
6775
- * Items returned by server to show in listing
6776
- */
6777
- this.items = null;
6778
- /**
6779
- * Whether we are searching something
6780
- */
6781
- this.loading = false;
6782
- /**
6783
- * If some items are not shown in result list
6784
- * Shows a message after list if true
6785
- */
6786
- this.hasMoreItems = false;
6787
- this.nbTotal = 0;
6788
- /**
6789
- * Default page size
6790
- */
6791
- this.pageSize = 10;
6792
- /**
6793
- * Init search options
6794
- */
6795
- this.variablesManager = new NaturalQueryVariablesManager();
6796
- }
6828
+ destroyRef = inject(DestroyRef);
6829
+ autoTrigger;
6830
+ itemTemplate;
6831
+ /**
6832
+ * Service with watchAll function that accepts queryVariables.
6833
+ */
6834
+ service;
6835
+ /**
6836
+ * If false, allows to input free string without selecting an option from autocomplete suggestions
6837
+ */
6838
+ optionRequired = true;
6839
+ /**
6840
+ * The field on which to search for, default to 'custom'.
6841
+ */
6842
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
6843
+ searchField = 'custom';
6844
+ /**
6845
+ * The operator with which to search for, default to 'search' if `searchField` is 'custom', else 'like'.
6846
+ */
6847
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
6848
+ searchOperator = null;
6849
+ /**
6850
+ * Cache the committed value during search mode.
6851
+ * It's used to be restored in case we cancel the selection
6852
+ */
6853
+ lastValidValue = null;
6797
6854
  /**
6798
6855
  * Additional filter for query
6799
6856
  */
6800
6857
  set filter(filter) {
6801
6858
  this.variablesManager.set('additional-filter', { filter: filter });
6802
6859
  }
6860
+ /**
6861
+ * Items returned by server to show in listing
6862
+ */
6863
+ items = null;
6864
+ /**
6865
+ * Whether we are searching something
6866
+ */
6867
+ loading = false;
6868
+ /**
6869
+ * If some items are not shown in result list
6870
+ * Shows a message after list if true
6871
+ */
6872
+ hasMoreItems = false;
6873
+ nbTotal = 0;
6874
+ /**
6875
+ * Default page size
6876
+ */
6877
+ pageSize = 10;
6878
+ /**
6879
+ * Init search options
6880
+ */
6881
+ variablesManager = new NaturalQueryVariablesManager();
6803
6882
  /**
6804
6883
  * Whether the value can be changed
6805
6884
  */
@@ -6953,8 +7032,8 @@ class NaturalSelectComponent extends AbstractSelect {
6953
7032
  getVariablesForDebug() {
6954
7033
  return this.variablesManager.variables.value;
6955
7034
  }
6956
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6957
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectComponent, isStandalone: true, selector: "natural-select", inputs: { service: "service", optionRequired: "optionRequired", searchField: "searchField", searchOperator: "searchOperator", 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 @for (item of items | async; track $index) {\n <mat-option [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n />\n </mat-option>\n }\n @if (hasMoreItems) {\n <div class=\"mat-caption\" i18n style=\"padding: 5px 10px\">Saisir pour chercher parmi {{ nbTotal }} r\u00E9sultats</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>\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\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 @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <!-- Meta data -->\n @if (!loading && showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (loading) {\n <div class=\"loading-wrapper\" matIconPrefix>\n <mat-progress-spinner [diameter]=\"21\" [strokeWidth]=\"5\" mode=\"indeterminate\" />\n </div>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button (click)=\"clear()\" mat-icon-button i18n-matTooltip matTooltip=\"D\u00E9s\u00E9lectionner\">\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.dirty && internalCtrl.enabled && optionRequired) {\n <button (click)=\"reset()\" mat-icon-button i18n-matTooltip matTooltip=\"Annuler la recherche\">\n <mat-icon naturalIcon=\"undo\" />\n </button>\n }\n @if (internalCtrl.pristine && internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n }\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@if (showClearButton()) {\n <div class=\"external-buttons\">\n @if (showClearButton()) {\n <button (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}:host .loading-wrapper{display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"], dependencies: [{ kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i1$5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1$5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
7035
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7036
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectComponent, isStandalone: true, selector: "natural-select", inputs: { service: "service", optionRequired: "optionRequired", searchField: "searchField", searchOperator: "searchOperator", 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 @for (item of items | async; track $index) {\n <mat-option [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n />\n </mat-option>\n }\n @if (hasMoreItems) {\n <div class=\"mat-caption\" i18n style=\"padding: 5px 10px\">Saisir pour chercher parmi {{ nbTotal }} r\u00E9sultats</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>\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\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 @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <!-- Meta data -->\n @if (!loading && showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (loading) {\n <div class=\"loading-wrapper\" matIconPrefix>\n <mat-progress-spinner [diameter]=\"21\" [strokeWidth]=\"5\" mode=\"indeterminate\" />\n </div>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button (click)=\"clear()\" mat-icon-button i18n-matTooltip matTooltip=\"D\u00E9s\u00E9lectionner\">\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.dirty && internalCtrl.enabled && optionRequired) {\n <button (click)=\"reset()\" mat-icon-button i18n-matTooltip matTooltip=\"Annuler la recherche\">\n <mat-icon naturalIcon=\"undo\" />\n </button>\n }\n @if (internalCtrl.pristine && internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n }\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@if (showClearButton()) {\n <div class=\"external-buttons\">\n @if (showClearButton()) {\n <button (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}:host .loading-wrapper{display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"], dependencies: [{ kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i1$5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1$5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
6958
7037
  }
6959
7038
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectComponent, decorators: [{
6960
7039
  type: Component,
@@ -7014,8 +7093,8 @@ class TypeNaturalSelectComponent extends AbstractAssociationSelectComponent {
7014
7093
  const selectedName = selected?.fullName || selected?.name || '';
7015
7094
  return selectedName;
7016
7095
  }
7017
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeNaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
7018
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeNaturalSelectComponent, isStandalone: true, 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\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n @if (configuration && requireValueCtrl) {\n <natural-select\n style=\"display: inline\"\n [formControl]=\"valueCtrl\"\n [placeholder]=\"configuration.placeholder\"\n [service]=\"configuration.service\"\n [filter]=\"configuration.filter\"\n />\n }\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "searchOperator", "filter", "disabled"] }] }); }
7096
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeNaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7097
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeNaturalSelectComponent, isStandalone: true, 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\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n @if (configuration && requireValueCtrl) {\n <natural-select\n style=\"display: inline\"\n [formControl]=\"valueCtrl\"\n [placeholder]=\"configuration.placeholder\"\n [service]=\"configuration.service\"\n [filter]=\"configuration.filter\"\n />\n }\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "searchOperator", "filter", "disabled"] }] });
7019
7098
  }
7020
7099
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeNaturalSelectComponent, decorators: [{
7021
7100
  type: Component,
@@ -7038,11 +7117,11 @@ let InvalidWithValueStateMatcher$1 = class InvalidWithValueStateMatcher {
7038
7117
  }
7039
7118
  };
7040
7119
  class TypeTextComponent {
7120
+ dropdownRef = inject(NaturalDropdownRef);
7121
+ renderedValue = new BehaviorSubject('');
7122
+ formCtrl = new FormControl('', { nonNullable: true });
7123
+ matcher = new InvalidWithValueStateMatcher$1();
7041
7124
  constructor() {
7042
- this.dropdownRef = inject(NaturalDropdownRef);
7043
- this.renderedValue = new BehaviorSubject('');
7044
- this.formCtrl = new FormControl('', { nonNullable: true });
7045
- this.matcher = new InvalidWithValueStateMatcher$1();
7046
7125
  const data = inject(NATURAL_DROPDOWN_DATA);
7047
7126
  this.formCtrl.valueChanges.subscribe(value => {
7048
7127
  this.renderedValue.next(value === null ? '' : this.formCtrl.value + '');
@@ -7072,8 +7151,8 @@ class TypeTextComponent {
7072
7151
  this.dropdownRef.close(); // undefined value, discard changes / prevent to add a condition (on new fields
7073
7152
  }
7074
7153
  }
7075
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7076
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeTextComponent, isStandalone: true, 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 autocomplete=\"off\"\n />\n @if (formCtrl.hasError('required')) {\n <mat-error>*</mat-error>\n }\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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] }); }
7154
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7155
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeTextComponent, isStandalone: true, 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 autocomplete=\"off\"\n />\n @if (formCtrl.hasError('required')) {\n <mat-error>*</mat-error>\n }\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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
7077
7156
  }
7078
7157
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeTextComponent, decorators: [{
7079
7158
  type: Component,
@@ -7081,22 +7160,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7081
7160
  }], ctorParameters: () => [] });
7082
7161
 
7083
7162
  class TypeNumberComponent {
7163
+ dropdownRef = inject(NaturalDropdownRef);
7164
+ renderedValue = new BehaviorSubject('');
7165
+ configuration;
7166
+ operatorCtrl = new FormControl('equal', { nonNullable: true });
7167
+ valueCtrl = new FormControl();
7168
+ matcher = new InvalidWithValueStateMatcher$1();
7169
+ form = new FormGroup({
7170
+ operator: this.operatorCtrl,
7171
+ value: this.valueCtrl,
7172
+ });
7173
+ operators = possibleComparableOperators;
7174
+ defaults = {
7175
+ min: null,
7176
+ max: null,
7177
+ step: null,
7178
+ };
7084
7179
  constructor() {
7085
- this.dropdownRef = inject(NaturalDropdownRef);
7086
- this.renderedValue = new BehaviorSubject('');
7087
- this.operatorCtrl = new FormControl('equal', { nonNullable: true });
7088
- this.valueCtrl = new FormControl();
7089
- this.matcher = new InvalidWithValueStateMatcher$1();
7090
- this.form = new FormGroup({
7091
- operator: this.operatorCtrl,
7092
- value: this.valueCtrl,
7093
- });
7094
- this.operators = possibleComparableOperators;
7095
- this.defaults = {
7096
- min: null,
7097
- max: null,
7098
- step: null,
7099
- };
7100
7180
  const data = inject(NATURAL_DROPDOWN_DATA);
7101
7181
  this.configuration = { ...this.defaults, ...data.configuration };
7102
7182
  merge$1(this.operatorCtrl.valueChanges, this.valueCtrl.valueChanges).subscribe(() => {
@@ -7163,8 +7243,8 @@ class TypeNumberComponent {
7163
7243
  return operator.label + ' ' + this.valueCtrl.value;
7164
7244
  }
7165
7245
  }
7166
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7167
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeNumberComponent, isStandalone: true, 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\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\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 @if (valueCtrl.hasError('min')) {\n <mat-error>< {{ configuration.min }}</mat-error>\n }\n @if (valueCtrl.hasError('max')) {\n <mat-error>> {{ configuration.max }}</mat-error>\n }\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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatInputModule }, { 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"] }] }); }
7246
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7247
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeNumberComponent, isStandalone: true, 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\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\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 @if (valueCtrl.hasError('min')) {\n <mat-error>< {{ configuration.min }}</mat-error>\n }\n @if (valueCtrl.hasError('max')) {\n <mat-error>> {{ configuration.max }}</mat-error>\n }\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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatInputModule }, { 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"] }] });
7168
7248
  }
7169
7249
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeNumberComponent, decorators: [{
7170
7250
  type: Component,
@@ -7172,6 +7252,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7172
7252
  }], ctorParameters: () => [] });
7173
7253
 
7174
7254
  class HierarchicFlatNode {
7255
+ node;
7256
+ name;
7257
+ level;
7258
+ expandable;
7259
+ selectable;
7260
+ deselectable;
7261
+ loading = false;
7175
7262
  constructor(node, name, level = 0, expandable = false, selectable = true, deselectable = true) {
7176
7263
  this.node = node;
7177
7264
  this.name = name;
@@ -7179,15 +7266,16 @@ class HierarchicFlatNode {
7179
7266
  this.expandable = expandable;
7180
7267
  this.selectable = selectable;
7181
7268
  this.deselectable = deselectable;
7182
- this.loading = false;
7183
7269
  }
7184
7270
  }
7185
7271
 
7186
7272
  class HierarchicModelNode {
7273
+ model;
7274
+ config;
7275
+ childrenChange = new BehaviorSubject([]);
7187
7276
  constructor(model, config) {
7188
7277
  this.model = model;
7189
7278
  this.config = config;
7190
- this.childrenChange = new BehaviorSubject([]);
7191
7279
  }
7192
7280
  get children() {
7193
7281
  return this.childrenChange.value;
@@ -7195,21 +7283,19 @@ class HierarchicModelNode {
7195
7283
  }
7196
7284
 
7197
7285
  class NaturalHierarchicSelectorService {
7198
- constructor() {
7199
- this.injector = inject(Injector);
7200
- /**
7201
- * Stores the global result of the tree
7202
- * This observable contains Node.
7203
- * When it's updated, the TreeController and TreeFlattener process the new array to generate the flat tree.
7204
- */
7205
- this.dataChange = new BehaviorSubject([]);
7206
- /**
7207
- * Configuration for relations and selection constraints
7208
- *
7209
- * The list should be sorted in the order of the hierarchic (list first parent rules, then child rules)
7210
- */
7211
- this.configuration = [];
7212
- }
7286
+ injector = inject(Injector);
7287
+ /**
7288
+ * Stores the global result of the tree
7289
+ * This observable contains Node.
7290
+ * When it's updated, the TreeController and TreeFlattener process the new array to generate the flat tree.
7291
+ */
7292
+ dataChange = new BehaviorSubject([]);
7293
+ /**
7294
+ * Configuration for relations and selection constraints
7295
+ *
7296
+ * The list should be sorted in the order of the hierarchic (list first parent rules, then child rules)
7297
+ */
7298
+ configuration = [];
7213
7299
  /**
7214
7300
  * Init component by saving the complete configuration, and then retrieving root elements.
7215
7301
  * Updates **another** observable (this.dataChange) when data is retrieved.
@@ -7432,8 +7518,8 @@ class NaturalHierarchicSelectorService {
7432
7518
  const node = this.dataChange.value.find(n => n.model.id === item.id && n.model.__typename === item.__typename);
7433
7519
  return node || new HierarchicModelNode(item, configuration);
7434
7520
  }
7435
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
7436
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorService, providedIn: 'root' }); }
7521
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7522
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorService, providedIn: 'root' });
7437
7523
  }
7438
7524
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorService, decorators: [{
7439
7525
  type: Injectable,
@@ -7441,14 +7527,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7441
7527
  }] });
7442
7528
 
7443
7529
  class FacetSelectorComponent {
7444
- constructor() {
7445
- this.data = inject(NATURAL_DROPDOWN_DATA);
7446
- this.dropdownRef = inject(NaturalDropdownRef);
7447
- // Never has a real value
7448
- this.renderedValue = new BehaviorSubject('');
7449
- this.facets = this.data.configuration.facets;
7450
- this.selection = null;
7451
- }
7530
+ data = inject(NATURAL_DROPDOWN_DATA);
7531
+ dropdownRef = inject(NaturalDropdownRef);
7532
+ // Never has a real value
7533
+ renderedValue = new BehaviorSubject('');
7534
+ facets = this.data.configuration.facets;
7535
+ selection = null;
7452
7536
  /**
7453
7537
  * Get value, including rich object types
7454
7538
  */
@@ -7472,8 +7556,8 @@ class FacetSelectorComponent {
7472
7556
  isDirty() {
7473
7557
  return true;
7474
7558
  }
7475
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FacetSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7476
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: FacetSelectorComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "@if (data.title) {\n <div class=\"dropdown-title mat-body-2\">{{ data.title }}</div>\n}\n<mat-nav-list>\n @for (facet of facets; track $index) {\n <mat-list-item (click)=\"selection = facet; close()\">\n <a>{{ facet.display }}</a>\n </mat-list-item>\n }\n</mat-nav-list>\n", styles: [".mat-nav-list{padding:0}.dropdown-title{opacity:.7;padding:5px;font-variant:all-small-caps;font-size:18px}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i5$2.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i5$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }] }); }
7559
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FacetSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7560
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: FacetSelectorComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "@if (data.title) {\n <div class=\"dropdown-title mat-body-2\">{{ data.title }}</div>\n}\n<mat-nav-list>\n @for (facet of facets; track $index) {\n <mat-list-item (click)=\"selection = facet; close()\">\n <a>{{ facet.display }}</a>\n </mat-list-item>\n }\n</mat-nav-list>\n", styles: [".mat-nav-list{padding:0}.dropdown-title{opacity:.7;padding:5px;font-variant:all-small-caps;font-size:18px}\n"], dependencies: [{ kind: "ngmodule", type: MatListModule }, { kind: "component", type: i5$2.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i5$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }] });
7477
7561
  }
7478
7562
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FacetSelectorComponent, decorators: [{
7479
7563
  type: Component,
@@ -7495,66 +7579,80 @@ function isComponentValid(component) {
7495
7579
  };
7496
7580
  }
7497
7581
  class NaturalInputComponent {
7498
- constructor() {
7499
- this.element = inject(ElementRef);
7500
- this.dropdownService = inject(NaturalDropdownService);
7501
- this.injector = inject(EnvironmentInjector);
7502
- /**
7503
- * Name of the field on which do a global search (without facet)
7504
- */
7505
- this.searchFieldName = 'search';
7506
- /**
7507
- * Selected setted for this component
7508
- */
7509
- this.selection = null;
7510
- /**
7511
- * Text display in the dropdown to select the facet
7512
- */
7513
- this.dropdownTitle = '';
7514
- /**
7515
- * Emits when user a added/updated/deleted a search (from global context or from facet)
7516
- */
7517
- this.selectionChange = new EventEmitter();
7518
- /**
7519
- * Emits when user removes the search by pressing the cross icon
7520
- */
7521
- this.cleared = new EventEmitter();
7522
- /**
7523
- * Selected facet from the list of available facets
7524
- */
7525
- this.facet = null;
7526
- /**
7527
- * Controller for the input field
7528
- */
7529
- this.formCtrl = new FormControl(null);
7530
- /**
7531
- * Customer error matcher that should validate on each change (including initialisation)
7532
- */
7533
- this.errorMatcher = new AlwaysErrorStateMatcher();
7534
- /**
7535
- * Reference of the opened dropdown container
7536
- */
7537
- this.dropdownRef = null;
7538
- /**
7539
- * Reference of the component inside the dropdown container
7540
- */
7541
- this.dropdownComponentRef = null;
7542
- /**
7543
- * Minimum input length (number of chars)
7544
- * See length attribute
7545
- */
7546
- this.minLength = 5;
7547
- /**
7548
- * Size of the input (number of chars)
7549
- * Match the input.size attribute
7550
- */
7551
- this.length = this.minLength;
7552
- /**
7553
- * Flag, that, if marked as yes, prevents the opening of the dropdown
7554
- * Is used to prevent dropdown opening when natural-search takes the focus from parent context (like on modal opening)
7555
- */
7556
- this.neutralizeDropdownOpening = false;
7557
- }
7582
+ element = inject(ElementRef);
7583
+ dropdownService = inject(NaturalDropdownService);
7584
+ injector = inject(EnvironmentInjector);
7585
+ /**
7586
+ * Controls the ripple effect, used when opening a dropdown
7587
+ */
7588
+ ripple;
7589
+ /**
7590
+ * Native element ref for <input> related to this <natural-input> component
7591
+ */
7592
+ input;
7593
+ /**
7594
+ * Label for this field
7595
+ */
7596
+ placeholder;
7597
+ /**
7598
+ * Name of the field on which do a global search (without facet)
7599
+ */
7600
+ searchFieldName = 'search';
7601
+ /**
7602
+ * Selected setted for this component
7603
+ */
7604
+ selection = null;
7605
+ /**
7606
+ * Available facets, allows the user to pick one, than generated then a selection
7607
+ */
7608
+ facets;
7609
+ /**
7610
+ * Text display in the dropdown to select the facet
7611
+ */
7612
+ dropdownTitle = '';
7613
+ /**
7614
+ * Emits when user a added/updated/deleted a search (from global context or from facet)
7615
+ */
7616
+ selectionChange = new EventEmitter();
7617
+ /**
7618
+ * Emits when user removes the search by pressing the cross icon
7619
+ */
7620
+ cleared = new EventEmitter();
7621
+ /**
7622
+ * Selected facet from the list of available facets
7623
+ */
7624
+ facet = null;
7625
+ /**
7626
+ * Controller for the input field
7627
+ */
7628
+ formCtrl = new FormControl(null);
7629
+ /**
7630
+ * Customer error matcher that should validate on each change (including initialisation)
7631
+ */
7632
+ errorMatcher = new AlwaysErrorStateMatcher();
7633
+ /**
7634
+ * Reference of the opened dropdown container
7635
+ */
7636
+ dropdownRef = null;
7637
+ /**
7638
+ * Reference of the component inside the dropdown container
7639
+ */
7640
+ dropdownComponentRef = null;
7641
+ /**
7642
+ * Minimum input length (number of chars)
7643
+ * See length attribute
7644
+ */
7645
+ minLength = 5;
7646
+ /**
7647
+ * Size of the input (number of chars)
7648
+ * Match the input.size attribute
7649
+ */
7650
+ length = this.minLength;
7651
+ /**
7652
+ * Flag, that, if marked as yes, prevents the opening of the dropdown
7653
+ * Is used to prevent dropdown opening when natural-search takes the focus from parent context (like on modal opening)
7654
+ */
7655
+ neutralizeDropdownOpening = false;
7558
7656
  /**
7559
7657
  * Custom management for taking the focus from parent context
7560
7658
  * When focusing manually on the <input>, a dropdown is opened
@@ -7771,8 +7869,8 @@ class NaturalInputComponent {
7771
7869
  }
7772
7870
  return selection;
7773
7871
  }
7774
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7775
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalInputComponent, isStandalone: true, selector: "natural-input", inputs: { placeholder: "placeholder", searchFieldName: "searchFieldName", selection: "selection", facets: "facets", dropdownTitle: "dropdownTitle" }, 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 @if (facet) {\n <mat-label>{{ facet.display }}</mat-label>\n }\n @if (!facet) {\n <mat-label>{{ placeholder }}</mat-label>\n }\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 @if (!facet && !selection) {\n <mat-icon naturalIcon=\"search\" matIconPrefix />\n }\n\n @if (selection) {\n <button (click)=\"clear()\" mat-icon-button matIconSuffix>\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n\n @if (facet && !selection) {\n <button (click)=\"clear()\" mat-icon-button matIconSuffix>\n <mat-icon naturalIcon=\"undo\" />\n </button>\n }\n</mat-form-field>\n<div class=\"hide\">{{ formCtrl.value ? formCtrl.value : facet ? facet.display : placeholder }}</div>\n", styles: [":host{display:flex;position:relative;flex-direction:column;border-top-right-radius:4px;border-top-left-radius:4px;overflow:hidden}:host .hide{margin:0 50px 0 10px;height:0;color:transparent;font-size:inherit;font-family:Roboto,Helvetica Neue,sans-serif;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
7872
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7873
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalInputComponent, isStandalone: true, selector: "natural-input", inputs: { placeholder: "placeholder", searchFieldName: "searchFieldName", selection: "selection", facets: "facets", dropdownTitle: "dropdownTitle" }, 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 @if (facet) {\n <mat-label>{{ facet.display }}</mat-label>\n }\n @if (!facet) {\n <mat-label>{{ placeholder }}</mat-label>\n }\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 @if (!facet && !selection) {\n <mat-icon naturalIcon=\"search\" matIconPrefix />\n }\n\n @if (selection) {\n <button (click)=\"clear()\" mat-icon-button matIconSuffix>\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n\n @if (facet && !selection) {\n <button (click)=\"clear()\" mat-icon-button matIconSuffix>\n <mat-icon naturalIcon=\"undo\" />\n </button>\n }\n</mat-form-field>\n<div class=\"hide\">{{ formCtrl.value ? formCtrl.value : facet ? facet.display : placeholder }}</div>\n", styles: [":host{display:flex;position:relative;flex-direction:column;border-top-right-radius:4px;border-top-left-radius:4px;overflow:hidden}:host .hide{margin:0 50px 0 10px;height:0;color:transparent;font-size:inherit;font-family:Roboto,Helvetica Neue,sans-serif;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] });
7776
7874
  }
7777
7875
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalInputComponent, decorators: [{
7778
7876
  type: Component,
@@ -7813,14 +7911,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7813
7911
  }] } });
7814
7912
 
7815
7913
  class NaturalGroupComponent {
7816
- constructor() {
7817
- /**
7818
- * Text display in the dropdown to select the facet
7819
- */
7820
- this.dropdownTitle = '';
7821
- this.selectionChange = new EventEmitter();
7822
- this.innerSelections = [];
7823
- }
7914
+ newValueInput;
7915
+ /**
7916
+ * Text display in the dropdown to select the facet
7917
+ */
7918
+ dropdownTitle = '';
7919
+ placeholder;
7920
+ facets;
7921
+ selectionChange = new EventEmitter();
7922
+ innerSelections = [];
7824
7923
  set selections(selection) {
7825
7924
  this.innerSelections = deepClone(selection);
7826
7925
  }
@@ -7837,8 +7936,8 @@ class NaturalGroupComponent {
7837
7936
  this.innerSelections.splice(index, 1);
7838
7937
  this.selectionChange.emit(this.innerSelections);
7839
7938
  }
7840
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7841
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalGroupComponent, isStandalone: true, selector: "natural-group", inputs: { dropdownTitle: "dropdownTitle", placeholder: "placeholder", facets: "facets", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "newValueInput", first: true, predicate: ["newValueInput"], descendants: true }], ngImport: i0, template: "@for (selection of innerSelections; track $index) {\n <natural-input\n (cleared)=\"removeInput($index)\"\n (selectionChange)=\"updateInput($event, $index)\"\n [facets]=\"facets\"\n [selection]=\"selection\"\n />\n}\n\n<natural-input\n #newValueInput\n (selectionChange)=\"addInput($event)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n tabIndex=\"10\"\n cdkFocusInitial\n [dropdownTitle]=\"dropdownTitle\"\n/>\n", styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{display:inline-flex;flex:auto;margin-right:10px;margin-bottom:10px}:host natural-input:last-of-type{flex:1;min-width:250px}\n"], dependencies: [{ kind: "component", type: NaturalInputComponent, selector: "natural-input", inputs: ["placeholder", "searchFieldName", "selection", "facets", "dropdownTitle"], outputs: ["selectionChange", "cleared"] }] }); }
7939
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7940
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalGroupComponent, isStandalone: true, selector: "natural-group", inputs: { dropdownTitle: "dropdownTitle", placeholder: "placeholder", facets: "facets", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "newValueInput", first: true, predicate: ["newValueInput"], descendants: true }], ngImport: i0, template: "@for (selection of innerSelections; track $index) {\n <natural-input\n (cleared)=\"removeInput($index)\"\n (selectionChange)=\"updateInput($event, $index)\"\n [facets]=\"facets\"\n [selection]=\"selection\"\n />\n}\n\n<natural-input\n #newValueInput\n (selectionChange)=\"addInput($event)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n tabIndex=\"10\"\n cdkFocusInitial\n [dropdownTitle]=\"dropdownTitle\"\n/>\n", styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{display:inline-flex;flex:auto;margin-right:10px;margin-bottom:10px}:host natural-input:last-of-type{flex:1;min-width:250px}\n"], dependencies: [{ kind: "component", type: NaturalInputComponent, selector: "natural-input", inputs: ["placeholder", "searchFieldName", "selection", "facets", "dropdownTitle"], outputs: ["selectionChange", "cleared"] }] });
7842
7941
  }
7843
7942
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalGroupComponent, decorators: [{
7844
7943
  type: Component,
@@ -7861,40 +7960,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7861
7960
  }] } });
7862
7961
 
7863
7962
  class NaturalSearchComponent {
7864
- constructor() {
7865
- this.breakpointObserver = inject(BreakpointObserver);
7866
- /**
7867
- * Placeholder for last input (the free search input)
7868
- */
7869
- this.placeholder = $localize `Rechercher`;
7870
- /**
7871
- * Exhaustive list of facets to be used in this <natural-search>
7872
- */
7873
- this.facets = [];
7874
- /**
7875
- * Whether to allow end-user to create multiple `OR` groups
7876
- */
7877
- this.multipleGroups = false;
7878
- /**
7879
- * Text display in the dropdown to select the facet
7880
- */
7881
- this.dropdownTitle = '';
7882
- /**
7883
- * Emits when some selection has been setted by the user
7884
- */
7885
- this.selectionChange = new EventEmitter();
7886
- /**
7887
- * Cleaned inputted selections. Allow valid selections to be manipulated inside component
7888
- */
7889
- this.innerSelections = [[]];
7890
- this.isMobile = this.breakpointObserver.observe(Breakpoints.XSmall).pipe(map$1(result => result.matches));
7891
- }
7963
+ breakpointObserver = inject(BreakpointObserver);
7964
+ /**
7965
+ * Placeholder for last input (the free search input)
7966
+ */
7967
+ placeholder = $localize `Rechercher`;
7968
+ /**
7969
+ * Exhaustive list of facets to be used in this <natural-search>
7970
+ */
7971
+ facets = [];
7972
+ /**
7973
+ * Whether to allow end-user to create multiple `OR` groups
7974
+ */
7975
+ multipleGroups = false;
7976
+ /**
7977
+ * Text display in the dropdown to select the facet
7978
+ */
7979
+ dropdownTitle = '';
7980
+ /**
7981
+ * Emits when some selection has been setted by the user
7982
+ */
7983
+ selectionChange = new EventEmitter();
7984
+ /**
7985
+ * Cleaned inputted selections. Allow valid selections to be manipulated inside component
7986
+ */
7987
+ innerSelections = [[]];
7892
7988
  /**
7893
7989
  * Input to display at component initialisation
7894
7990
  */
7895
7991
  set selections(selections) {
7896
7992
  this.innerSelections = selections?.[0] ? deepClone(selections) : [[]];
7897
7993
  }
7994
+ isMobile = this.breakpointObserver.observe(Breakpoints.XSmall).pipe(map$1(result => result.matches));
7898
7995
  ngOnChanges() {
7899
7996
  if (!this.facets) {
7900
7997
  this.facets = [];
@@ -7919,8 +8016,8 @@ class NaturalSearchComponent {
7919
8016
  this.innerSelections = [[]];
7920
8017
  this.selectionChange.emit([[]]);
7921
8018
  }
7922
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7923
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSearchComponent, isStandalone: true, selector: "natural-search", inputs: { placeholder: "placeholder", facets: "facets", multipleGroups: "multipleGroups", dropdownTitle: "dropdownTitle", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"natural-search\" [ngClass]=\"{mobile: isMobile | async, hasMultipleGroups: innerSelections.length > 1}\">\n <div class=\"groupsWrapper\">\n @for (groupSelections of innerSelections; track $index) {\n <div class=\"groupWrapper\">\n <natural-group\n (selectionChange)=\"updateGroup($event, $index)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n [dropdownTitle]=\"dropdownTitle\"\n />\n <div class=\"endOfRowButton\">\n @if (innerSelections.length > 1) {\n <button\n (click)=\"removeGroup($index)\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Supprimer ce groupe\"\n >\n <mat-icon naturalIcon=\"remove\" />\n </button>\n }\n </div>\n </div>\n @if (!$last) {\n <mat-divider />\n }\n }\n </div>\n\n <div class=\"endOfRowButton\">\n @if (multipleGroups) {\n <button (click)=\"addGroup()\" mat-icon-button i18n-matTooltip matTooltip=\"Ajouter un groupe\">\n <mat-icon naturalIcon=\"add\" />\n </button>\n }\n\n <button\n (click)=\"clear()\"\n mat-icon-button\n class=\"clear-button\"\n i18n-matTooltip\n matTooltip=\"Annuler la recherche\"\n >\n <mat-icon naturalIcon=\"close\" />\n </button>\n </div>\n</div>\n", styles: [".natural-search{display:flex;flex-direction:row;align-items:flex-end}.natural-search .groupsWrapper{display:flex;flex:1;flex-direction:column;min-width:0}.natural-search .groupWrapper{display:flex;flex-direction:row;margin-bottom:10px;min-width:0}.natural-search .groupWrapper natural-group{flex:1;max-width:100%}.natural-search .groupWrapper:last-of-type{margin-bottom:0}.natural-search .endOfRowButton{display:flex;flex-direction:row;align-items:center;margin-bottom:15px;height:53px}.natural-search mat-divider{margin:-10px 0 10px}.natural-search.mobile .clear-button{display:none}.natural-search.mobile.hasMultipleGroups{flex-direction:column;align-items:stretch}.natural-search.mobile.hasMultipleGroups .endOfRowButton{flex-direction:row-reverse;margin-bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "component", type: NaturalGroupComponent, selector: "natural-group", inputs: ["dropdownTitle", "placeholder", "facets", "selections"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i5$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }] }); }
8019
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8020
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSearchComponent, isStandalone: true, selector: "natural-search", inputs: { placeholder: "placeholder", facets: "facets", multipleGroups: "multipleGroups", dropdownTitle: "dropdownTitle", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"natural-search\" [ngClass]=\"{mobile: isMobile | async, hasMultipleGroups: innerSelections.length > 1}\">\n <div class=\"groupsWrapper\">\n @for (groupSelections of innerSelections; track $index) {\n <div class=\"groupWrapper\">\n <natural-group\n (selectionChange)=\"updateGroup($event, $index)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n [dropdownTitle]=\"dropdownTitle\"\n />\n <div class=\"endOfRowButton\">\n @if (innerSelections.length > 1) {\n <button\n (click)=\"removeGroup($index)\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Supprimer ce groupe\"\n >\n <mat-icon naturalIcon=\"remove\" />\n </button>\n }\n </div>\n </div>\n @if (!$last) {\n <mat-divider />\n }\n }\n </div>\n\n <div class=\"endOfRowButton\">\n @if (multipleGroups) {\n <button (click)=\"addGroup()\" mat-icon-button i18n-matTooltip matTooltip=\"Ajouter un groupe\">\n <mat-icon naturalIcon=\"add\" />\n </button>\n }\n\n <button\n (click)=\"clear()\"\n mat-icon-button\n class=\"clear-button\"\n i18n-matTooltip\n matTooltip=\"Annuler la recherche\"\n >\n <mat-icon naturalIcon=\"close\" />\n </button>\n </div>\n</div>\n", styles: [".natural-search{display:flex;flex-direction:row;align-items:flex-end}.natural-search .groupsWrapper{display:flex;flex:1;flex-direction:column;min-width:0}.natural-search .groupWrapper{display:flex;flex-direction:row;margin-bottom:10px;min-width:0}.natural-search .groupWrapper natural-group{flex:1;max-width:100%}.natural-search .groupWrapper:last-of-type{margin-bottom:0}.natural-search .endOfRowButton{display:flex;flex-direction:row;align-items:center;margin-bottom:15px;height:53px}.natural-search mat-divider{margin:-10px 0 10px}.natural-search.mobile .clear-button{display:none}.natural-search.mobile.hasMultipleGroups{flex-direction:column;align-items:stretch}.natural-search.mobile.hasMultipleGroups .endOfRowButton{flex-direction:row-reverse;margin-bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "component", type: NaturalGroupComponent, selector: "natural-group", inputs: ["dropdownTitle", "placeholder", "facets", "selections"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i5$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }] });
7924
8021
  }
7925
8022
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSearchComponent, decorators: [{
7926
8023
  type: Component,
@@ -7948,49 +8045,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7948
8045
  }] } });
7949
8046
 
7950
8047
  class NaturalHierarchicSelectorComponent {
7951
- constructor() {
7952
- this.destroyRef = inject(DestroyRef);
7953
- this.hierarchicSelectorService = inject(NaturalHierarchicSelectorService);
7954
- /**
7955
- * If multiple or single item selection
7956
- */
7957
- this.multiple = false;
7958
- /**
7959
- * Selected items
7960
- * Organized by key, containing each an array of selected items of same type
7961
- */
7962
- this.selected = {};
7963
- /**
7964
- * Whether selectable elements can be unselected
7965
- */
7966
- this.allowUnselect = true;
7967
- /**
7968
- * Search facets
7969
- */
7970
- this.searchFacets = [];
7971
- /**
7972
- * Selections to apply on natural-search on component initialisation
7973
- */
7974
- this.searchSelections = [];
7975
- /**
7976
- * Emits when natural-search selections change
7977
- */
7978
- this.searchSelectionChange = new EventEmitter();
7979
- /**
7980
- * Inner representation of selected @Input() to allow flat listing as mat-chip.
7981
- */
7982
- this.selectedNodes = [];
7983
- /**
7984
- * Emits selection change
7985
- * Returns a Literal where selected models are organized by key
7986
- */
7987
- this.selectionChange = new EventEmitter();
7988
- this.loading = false;
7989
- /**
7990
- * Cache for transformed nodes
7991
- */
7992
- this.flatNodeMap = new Map();
7993
- }
8048
+ destroyRef = inject(DestroyRef);
8049
+ hierarchicSelectorService = inject(NaturalHierarchicSelectorService);
8050
+ /**
8051
+ * Function that receives a model and returns a string for display value
8052
+ */
8053
+ displayWith;
8054
+ /**
8055
+ * Config for items and relations arrangement
8056
+ */
8057
+ config;
8058
+ /**
8059
+ * If multiple or single item selection
8060
+ */
8061
+ multiple = false;
8062
+ /**
8063
+ * Selected items
8064
+ * Organized by key, containing each an array of selected items of same type
8065
+ */
8066
+ selected = {};
8067
+ /**
8068
+ * Whether selectable elements can be unselected
8069
+ */
8070
+ allowUnselect = true;
8071
+ /**
8072
+ * Filters that apply to each query
8073
+ */
8074
+ filters;
8075
+ /**
8076
+ * Search facets
8077
+ */
8078
+ searchFacets = [];
8079
+ /**
8080
+ * Selections to apply on natural-search on component initialisation
8081
+ */
8082
+ searchSelections = [];
8083
+ /**
8084
+ * Emits when natural-search selections change
8085
+ */
8086
+ searchSelectionChange = new EventEmitter();
8087
+ /**
8088
+ * Inner representation of selected @Input() to allow flat listing as mat-chip.
8089
+ */
8090
+ selectedNodes = [];
8091
+ /**
8092
+ * Emits selection change
8093
+ * Returns a Literal where selected models are organized by key
8094
+ */
8095
+ selectionChange = new EventEmitter();
8096
+ /**
8097
+ * Controller for nodes selection
8098
+ */
8099
+ flatNodesSelection;
8100
+ treeControl;
8101
+ treeFlattener;
8102
+ dataSource;
8103
+ loading = false;
8104
+ /**
8105
+ * Cache for transformed nodes
8106
+ */
8107
+ flatNodeMap = new Map();
7994
8108
  /**
7995
8109
  * Angular OnChange implementation
7996
8110
  */
@@ -8263,8 +8377,8 @@ class NaturalHierarchicSelectorComponent {
8263
8377
  getMapKey(model) {
8264
8378
  return model.__typename + '-' + model.id;
8265
8379
  }
8266
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8267
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalHierarchicSelectorComponent, isStandalone: true, 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], usesOnChanges: true, ngImport: i0, template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search (selectionChange)=\"search($event)\" [facets]=\"searchFacets\" [selections]=\"searchSelections\" />\n</div>\n\n<div class=\"body\">\n @if (loading) {\n <mat-progress-spinner [diameter]=\"36\" mode=\"indeterminate\" style=\"margin: 10px\" />\n }\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n @if (node.expandable) {\n <button\n (click)=\"loadChildren(node)\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n @if (node.loading) {\n <mat-progress-spinner [diameter]=\"24\" [strokeWidth]=\"5\" mode=\"indeterminate\" />\n }\n @if (!node.loading) {\n <mat-icon [naturalIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\" />\n }\n </button>\n }\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n @if (node.node.config.icon) {\n <mat-icon [naturalIcon]=\"node.node.config.icon\" style=\"margin-right: 10px\" />\n }\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-listbox aria-orientation=\"vertical\" class=\"mat-mdc-chip-set-stacked\">\n @for (node of selectedNodes; track node.model.id) {\n <mat-chip-option (removed)=\"unselectModelNode(node)\" [removable]=\"true\" [selectable]=\"false\">\n @if (node.config.icon) {\n <mat-icon [naturalIcon]=\"node.config.icon\" />\n }\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <button matChipRemove>\n <mat-icon naturalIcon=\"cancel\" />\n </button>\n </mat-chip-option>\n }\n </mat-chip-listbox>\n</div>\n\n@if (!loading && !dataSource.data.length) {\n <div i18n>Aucun r\u00E9sultat</div>\n}\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host mat-icon{width:18px;height:18px;font-size:18px}:host .mat-tree-node.leaf{margin-left:48px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-listbox{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-listbox{margin-left:10px}\n"], dependencies: [{ kind: "component", type: NaturalSearchComponent, selector: "natural-search", inputs: ["placeholder", "facets", "multipleGroups", "dropdownTitle", "selections"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i3$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i3$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i3$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i3$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i3$2.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i7$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i7$1.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i7$1.MatChipRemove, selector: "[matChipRemove]" }] }); }
8380
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8381
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalHierarchicSelectorComponent, isStandalone: true, 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], usesOnChanges: true, ngImport: i0, template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search (selectionChange)=\"search($event)\" [facets]=\"searchFacets\" [selections]=\"searchSelections\" />\n</div>\n\n<div class=\"body\">\n @if (loading) {\n <mat-progress-spinner [diameter]=\"36\" mode=\"indeterminate\" style=\"margin: 10px\" />\n }\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n @if (node.expandable) {\n <button\n (click)=\"loadChildren(node)\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n @if (node.loading) {\n <mat-progress-spinner [diameter]=\"24\" [strokeWidth]=\"5\" mode=\"indeterminate\" />\n }\n @if (!node.loading) {\n <mat-icon [naturalIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\" />\n }\n </button>\n }\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n @if (node.node.config.icon) {\n <mat-icon [naturalIcon]=\"node.node.config.icon\" style=\"margin-right: 10px\" />\n }\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-listbox aria-orientation=\"vertical\" class=\"mat-mdc-chip-set-stacked\">\n @for (node of selectedNodes; track node.model.id) {\n <mat-chip-option (removed)=\"unselectModelNode(node)\" [removable]=\"true\" [selectable]=\"false\">\n @if (node.config.icon) {\n <mat-icon [naturalIcon]=\"node.config.icon\" />\n }\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <button matChipRemove>\n <mat-icon naturalIcon=\"cancel\" />\n </button>\n </mat-chip-option>\n }\n </mat-chip-listbox>\n</div>\n\n@if (!loading && !dataSource.data.length) {\n <div i18n>Aucun r\u00E9sultat</div>\n}\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host mat-icon{width:18px;height:18px;font-size:18px}:host .mat-tree-node.leaf{margin-left:48px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-listbox{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-listbox{margin-left:10px}\n"], dependencies: [{ kind: "component", type: NaturalSearchComponent, selector: "natural-search", inputs: ["placeholder", "facets", "multipleGroups", "dropdownTitle", "selections"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i3$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i3$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i3$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i3$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i3$2.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i7$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i7$1.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i7$1.MatChipRemove, selector: "[matChipRemove]" }] });
8268
8382
  }
8269
8383
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorComponent, decorators: [{
8270
8384
  type: Component,
@@ -8352,8 +8466,8 @@ class TypeHierarchicSelectorComponent extends AbstractAssociationSelectComponent
8352
8466
  noEmptySelection(selection) {
8353
8467
  return selection[this.configuration.key].length ? selection : null;
8354
8468
  }
8355
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeHierarchicSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
8356
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeHierarchicSelectorComponent, isStandalone: true, 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\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n @if (requireValueCtrl) {\n <natural-hierarchic-selector\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 />\n }\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "component", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: ["displayWith", "config", "multiple", "selected", "allowUnselect", "filters", "searchFacets", "searchSelections"], outputs: ["searchSelectionChange", "selectionChange"] }] }); }
8469
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeHierarchicSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
8470
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeHierarchicSelectorComponent, isStandalone: true, 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\" panelWidth=\"\">\n @for (item of operators; track item) {\n <mat-option [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n @if (requireValueCtrl) {\n <natural-hierarchic-selector\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 />\n }\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "component", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: ["displayWith", "config", "multiple", "selected", "allowUnselect", "filters", "searchFacets", "searchSelections"], outputs: ["searchSelectionChange", "selectionChange"] }] });
8357
8471
  }
8358
8472
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeHierarchicSelectorComponent, decorators: [{
8359
8473
  type: Component,
@@ -8398,21 +8512,22 @@ function toGreaterThanFrom(dateAdapter) {
8398
8512
  * If you need optional bounding date, then use `TypeDateComponent` instead.
8399
8513
  */
8400
8514
  class TypeDateRangeComponent {
8515
+ dateAdapter = inject(DateAdapter);
8516
+ dateFormats = inject(MAT_DATE_FORMATS);
8517
+ renderedValue = new BehaviorSubject('');
8518
+ configuration;
8519
+ matcher = new InvalidWithValueStateMatcher();
8520
+ fromCtrl = new FormControl(null);
8521
+ toCtrl = new FormControl(null);
8522
+ form = new FormGroup({
8523
+ from: this.fromCtrl,
8524
+ to: this.toCtrl,
8525
+ });
8526
+ defaults = {
8527
+ min: null,
8528
+ max: null,
8529
+ };
8401
8530
  constructor() {
8402
- this.dateAdapter = inject(DateAdapter);
8403
- this.dateFormats = inject(MAT_DATE_FORMATS);
8404
- this.renderedValue = new BehaviorSubject('');
8405
- this.matcher = new InvalidWithValueStateMatcher();
8406
- this.fromCtrl = new FormControl(null);
8407
- this.toCtrl = new FormControl(null);
8408
- this.form = new FormGroup({
8409
- from: this.fromCtrl,
8410
- to: this.toCtrl,
8411
- });
8412
- this.defaults = {
8413
- min: null,
8414
- max: null,
8415
- };
8416
8531
  const data = inject(NATURAL_DROPDOWN_DATA);
8417
8532
  this.configuration = { ...this.defaults, ...data.configuration };
8418
8533
  merge$1(this.fromCtrl.valueChanges, this.toCtrl.valueChanges).subscribe(() => {
@@ -8478,8 +8593,8 @@ class TypeDateRangeComponent {
8478
8593
  return '';
8479
8594
  }
8480
8595
  }
8481
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8482
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeDateRangeComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n i18n-placeholder\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"from\" />\n <mat-datepicker #from />\n @if (form.hasError('toGreaterThanFrom')) {\n <mat-error>{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</mat-error>\n }\n @if (fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')) {\n <mat-error>< {{ configuration.min }}</mat-error>\n }\n @if (fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')) {\n <mat-error>> {{ configuration.max }}</mat-error>\n }\n @if (fromCtrl.hasError('required')) {\n <mat-error>*</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n i18n-placeholder\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"to\" />\n <mat-datepicker #to />\n @if (toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')) {\n <mat-error> < {{ configuration.min }}</mat-error>\n }\n @if (toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')) {\n <mat-error> > {{ configuration.max }}</mat-error>\n }\n @if (toCtrl.hasError('required')) {\n <mat-error>*</mat-error>\n }\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: MatDatepickerModule }, { 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"] }] }); }
8596
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8597
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeDateRangeComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n i18n-placeholder\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"from\" />\n <mat-datepicker #from />\n @if (form.hasError('toGreaterThanFrom')) {\n <mat-error>{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</mat-error>\n }\n @if (fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')) {\n <mat-error>< {{ configuration.min }}</mat-error>\n }\n @if (fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')) {\n <mat-error>> {{ configuration.max }}</mat-error>\n }\n @if (fromCtrl.hasError('required')) {\n <mat-error>*</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n i18n-placeholder\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"to\" />\n <mat-datepicker #to />\n @if (toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')) {\n <mat-error> < {{ configuration.min }}</mat-error>\n }\n @if (toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')) {\n <mat-error> > {{ configuration.max }}</mat-error>\n }\n @if (toCtrl.hasError('required')) {\n <mat-error>*</mat-error>\n }\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: MatDatepickerModule }, { 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"] }] });
8483
8598
  }
8484
8599
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeDateRangeComponent, decorators: [{
8485
8600
  type: Component,
@@ -8487,14 +8602,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
8487
8602
  }], ctorParameters: () => [] });
8488
8603
 
8489
8604
  class TypeOptionsComponent {
8605
+ data;
8606
+ renderedValue = new BehaviorSubject('');
8607
+ formControl = new FormControl({}, { nonNullable: true });
8608
+ configuration;
8609
+ defaults = {
8610
+ options: [],
8611
+ };
8612
+ dropdownRef = inject(NaturalDropdownRef);
8490
8613
  constructor(data) {
8491
8614
  this.data = data;
8492
- this.renderedValue = new BehaviorSubject('');
8493
- this.formControl = new FormControl({}, { nonNullable: true });
8494
- this.defaults = {
8495
- options: [],
8496
- };
8497
- this.dropdownRef = inject(NaturalDropdownRef);
8498
8615
  this.configuration = { ...this.defaults, ...data.configuration };
8499
8616
  if (!this.configuration.options.length) {
8500
8617
  throw new Error('TypeOptions need options, empty array or null given');
@@ -8527,8 +8644,8 @@ class TypeOptionsComponent {
8527
8644
  isDirty() {
8528
8645
  return this.formControl.dirty;
8529
8646
  }
8530
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeOptionsComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
8531
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeOptionsComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<mat-button-toggle-group [formControl]=\"formControl\">\n @for (option of configuration.options; track option) {\n <mat-button-toggle [value]=\"option\">{{ option.display }}</mat-button-toggle>\n }\n</mat-button-toggle-group>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i2$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i2$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }] }); }
8647
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeOptionsComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }], target: i0.ɵɵFactoryTarget.Component });
8648
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeOptionsComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<mat-button-toggle-group [formControl]=\"formControl\">\n @for (option of configuration.options; track option) {\n <mat-button-toggle [value]=\"option\">{{ option.display }}</mat-button-toggle>\n }\n</mat-button-toggle-group>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i2$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i2$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }] });
8532
8649
  }
8533
8650
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeOptionsComponent, decorators: [{
8534
8651
  type: Component,
@@ -8560,8 +8677,8 @@ class TypeBooleanComponent extends TypeOptionsComponent {
8560
8677
  };
8561
8678
  super(typeOptionsData);
8562
8679
  }
8563
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeBooleanComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8564
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeBooleanComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<mat-button-toggle-group [formControl]=\"formControl\">\n @for (option of configuration.options; track option) {\n <mat-button-toggle [value]=\"option\">{{ option.display }}</mat-button-toggle>\n }\n</mat-button-toggle-group>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i2$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i2$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }] }); }
8680
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeBooleanComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8681
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: TypeBooleanComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<mat-button-toggle-group [formControl]=\"formControl\">\n @for (option of configuration.options; track option) {\n <mat-button-toggle [value]=\"option\">{{ option.display }}</mat-button-toggle>\n }\n</mat-button-toggle-group>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i2$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i2$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }] });
8565
8682
  }
8566
8683
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeBooleanComponent, decorators: [{
8567
8684
  type: Component,
@@ -8703,18 +8820,16 @@ function eventToFiles(event) {
8703
8820
 
8704
8821
  // @dynamic
8705
8822
  class NaturalFileService {
8706
- constructor() {
8707
- this.document = inject(DOCUMENT);
8708
- /**
8709
- * Allow to subscribe to selected files in the entire application. So a
8710
- * child component is able to receive a file that was dropped on a parent
8711
- * component.
8712
- *
8713
- * Typically useful to drop a file on the entire screen, instead of a precise
8714
- * component.
8715
- */
8716
- this.filesChanged = new Subject();
8717
- }
8823
+ document = inject(DOCUMENT);
8824
+ /**
8825
+ * Allow to subscribe to selected files in the entire application. So a
8826
+ * child component is able to receive a file that was dropped on a parent
8827
+ * component.
8828
+ *
8829
+ * Typically useful to drop a file on the entire screen, instead of a precise
8830
+ * component.
8831
+ */
8832
+ filesChanged = new Subject();
8718
8833
  getDownloadLink(model) {
8719
8834
  const window = this.document.defaultView;
8720
8835
  if (!window) {
@@ -8732,8 +8847,8 @@ class NaturalFileService {
8732
8847
  }
8733
8848
  return null;
8734
8849
  }
8735
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
8736
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileService, providedIn: 'root' }); }
8850
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
8851
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileService, providedIn: 'root' });
8737
8852
  }
8738
8853
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileService, decorators: [{
8739
8854
  type: Injectable,
@@ -8752,54 +8867,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
8752
8867
  * @dynamic
8753
8868
  */
8754
8869
  class NaturalAbstractFile {
8870
+ element;
8871
+ naturalFileService;
8872
+ document;
8873
+ fileElement;
8874
+ /**
8875
+ * Whether we should accept a single file or multiple files
8876
+ */
8877
+ multiple = false;
8878
+ /**
8879
+ * Comma-separated list of unique file type specifiers. Like the native element
8880
+ * it can be a mix of mime-type and file extensions.
8881
+ *
8882
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
8883
+ */
8884
+ accept = '';
8885
+ /**
8886
+ * Maximum file size in bytes. 0 means no validation at all.
8887
+ */
8888
+ maxSize = 0;
8889
+ /**
8890
+ * Disable the file selection entirely
8891
+ */
8892
+ fileSelectionDisabled = false;
8893
+ /**
8894
+ * Whether the user can click on the element to select something
8895
+ *
8896
+ * This has only effect during initialization. Subsequent changes will have
8897
+ * no effect.
8898
+ */
8899
+ selectable = false;
8900
+ /**
8901
+ * If true, the file selection will be broadcast through `NaturalFileService.filesChanged`.
8902
+ *
8903
+ * It is useful to set this to false if there is two upload on a page with different purpose
8904
+ * and the second upload should not be confused with the first one.
8905
+ */
8906
+ broadcast = true;
8907
+ /**
8908
+ * The single valid file that has been selected.
8909
+ *
8910
+ * It is for convenience of use, and will only emit if there is at least one
8911
+ * valid file. See `filesChange` for a more complete output.
8912
+ */
8913
+ fileChange = new EventEmitter();
8914
+ /**
8915
+ * The list of files that have been selected.
8916
+ */
8917
+ filesChange = new EventEmitter();
8755
8918
  constructor(element, naturalFileService, document) {
8756
8919
  this.element = element;
8757
8920
  this.naturalFileService = naturalFileService;
8758
8921
  this.document = document;
8759
- /**
8760
- * Whether we should accept a single file or multiple files
8761
- */
8762
- this.multiple = false;
8763
- /**
8764
- * Comma-separated list of unique file type specifiers. Like the native element
8765
- * it can be a mix of mime-type and file extensions.
8766
- *
8767
- * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
8768
- */
8769
- this.accept = '';
8770
- /**
8771
- * Maximum file size in bytes. 0 means no validation at all.
8772
- */
8773
- this.maxSize = 0;
8774
- /**
8775
- * Disable the file selection entirely
8776
- */
8777
- this.fileSelectionDisabled = false;
8778
- /**
8779
- * Whether the user can click on the element to select something
8780
- *
8781
- * This has only effect during initialization. Subsequent changes will have
8782
- * no effect.
8783
- */
8784
- this.selectable = false;
8785
- /**
8786
- * If true, the file selection will be broadcast through `NaturalFileService.filesChanged`.
8787
- *
8788
- * It is useful to set this to false if there is two upload on a page with different purpose
8789
- * and the second upload should not be confused with the first one.
8790
- */
8791
- this.broadcast = true;
8792
- /**
8793
- * The single valid file that has been selected.
8794
- *
8795
- * It is for convenience of use, and will only emit if there is at least one
8796
- * valid file. See `filesChange` for a more complete output.
8797
- */
8798
- this.fileChange = new EventEmitter();
8799
- /**
8800
- * The list of files that have been selected.
8801
- */
8802
- this.filesChange = new EventEmitter();
8803
8922
  }
8804
8923
  ngOnDestroy() {
8805
8924
  delete this.fileElement; // faster memory release of dom element
@@ -8932,8 +9051,8 @@ class NaturalAbstractFile {
8932
9051
  return null;
8933
9052
  }));
8934
9053
  }
8935
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractFile, deps: [{ token: i0.ElementRef }, { token: NaturalFileService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
8936
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractFile, isStandalone: true, inputs: { multiple: "multiple", accept: "accept", maxSize: "maxSize", fileSelectionDisabled: "fileSelectionDisabled", selectable: "selectable", broadcast: "broadcast" }, outputs: { fileChange: "fileChange", filesChange: "filesChange" }, host: { listeners: { "change": "onChange($event)" } }, usesOnChanges: true, ngImport: i0 }); }
9054
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractFile, deps: [{ token: i0.ElementRef }, { token: NaturalFileService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
9055
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractFile, isStandalone: true, inputs: { multiple: "multiple", accept: "accept", maxSize: "maxSize", fileSelectionDisabled: "fileSelectionDisabled", selectable: "selectable", broadcast: "broadcast" }, outputs: { fileChange: "fileChange", filesChange: "filesChange" }, host: { listeners: { "change": "onChange($event)" } }, usesOnChanges: true, ngImport: i0 });
8937
9056
  }
8938
9057
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractFile, decorators: [{
8939
9058
  type: Directive,
@@ -8976,16 +9095,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
8976
9095
  * ```
8977
9096
  */
8978
9097
  class NaturalFileDropDirective extends NaturalAbstractFile {
8979
- constructor() {
8980
- super(...arguments);
8981
- this.destroyRef = inject(DestroyRef);
8982
- this.fileOverClass = false;
8983
- /**
8984
- * Emits whenever files are being dragged over
8985
- */
8986
- this.fileOver = new EventEmitter();
8987
- this.rawFileOver = new Subject();
8988
- }
9098
+ destroyRef = inject(DestroyRef);
9099
+ fileOverClass = false;
9100
+ /**
9101
+ * Emits whenever files are being dragged over
9102
+ */
9103
+ fileOver = new EventEmitter();
9104
+ rawFileOver = new Subject();
8989
9105
  ngOnInit() {
8990
9106
  super.ngOnInit();
8991
9107
  // Automatically change the class, but not too often to avoid visual
@@ -9044,8 +9160,8 @@ class NaturalFileDropDirective extends NaturalAbstractFile {
9044
9160
  this.filesChange.observed ||
9045
9161
  (this.broadcast && this.naturalFileService.filesChanged.observed));
9046
9162
  }
9047
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileDropDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
9048
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalFileDropDirective, isStandalone: true, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: { fileOver: "fileOver" }, host: { listeners: { "drop": "onDrop($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)" }, properties: { "class.natural-file-over": "this.fileOverClass" } }, usesInheritance: true, ngImport: i0 }); }
9163
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileDropDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
9164
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalFileDropDirective, isStandalone: true, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: { fileOver: "fileOver" }, host: { listeners: { "drop": "onDrop($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)" }, properties: { "class.natural-file-over": "this.fileOverClass" } }, usesInheritance: true, ngImport: i0 });
9049
9165
  }
9050
9166
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileDropDirective, decorators: [{
9051
9167
  type: Directive,
@@ -9073,17 +9189,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9073
9189
  * This directive has all options to select files, except drag'n'drop.
9074
9190
  */
9075
9191
  class NaturalFileSelectDirective extends NaturalAbstractFile {
9076
- constructor() {
9077
- super(...arguments);
9078
- /**
9079
- * Whether the user can click on the element to select something
9080
- *
9081
- * Override parent to enable it by default
9082
- */
9083
- this.selectable = true;
9084
- }
9085
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileSelectDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
9086
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalFileSelectDirective, isStandalone: true, selector: ":not([naturalFileDrop])[naturalFileSelect]", inputs: { selectable: "selectable" }, usesInheritance: true, ngImport: i0 }); }
9192
+ /**
9193
+ * Whether the user can click on the element to select something
9194
+ *
9195
+ * Override parent to enable it by default
9196
+ */
9197
+ selectable = true;
9198
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileSelectDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
9199
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalFileSelectDirective, isStandalone: true, selector: ":not([naturalFileDrop])[naturalFileSelect]", inputs: { selectable: "selectable" }, usesInheritance: true, ngImport: i0 });
9087
9200
  }
9088
9201
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileSelectDirective, decorators: [{
9089
9202
  type: Directive,
@@ -9097,34 +9210,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9097
9210
 
9098
9211
  // @dynamic
9099
9212
  class NaturalFileComponent {
9100
- constructor() {
9101
- this.naturalFileService = inject(NaturalFileService);
9102
- this.alertService = inject(NaturalAlertService);
9103
- this.document = inject(DOCUMENT);
9104
- this.height = 250;
9105
- this.action = null;
9106
- this.backgroundSize = 'contain';
9107
- /**
9108
- * Comma-separated list of unique file type specifiers. Like the native element,
9109
- * it can be a mix of mime-type and file extensions.
9110
- *
9111
- * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
9112
- */
9113
- this.accept = 'image/bmp,image/gif,image/jpeg,image/pjpeg,image/png,image/svg+xml,image/svg,image/webp';
9114
- this.model = null;
9115
- /**
9116
- * If provided, its value will get updated when the model changes.
9117
- * But its value is never read, so if you want to set a value use `[model]` instead.
9118
- */
9119
- this.formCtrl = null;
9120
- /**
9121
- * This **must not** be used to mutate the server, because it is very likely it will never be called if the
9122
- * human navigates away from the page before the upload is finished. Instead, you should use `[uploader]`.
9123
- */
9124
- this.modelChange = new EventEmitter();
9125
- this.imagePreview = '';
9126
- this.filePreview = null;
9127
- }
9213
+ naturalFileService = inject(NaturalFileService);
9214
+ alertService = inject(NaturalAlertService);
9215
+ document = inject(DOCUMENT);
9216
+ height = 250;
9217
+ action = null;
9218
+ backgroundSize = 'contain';
9219
+ /**
9220
+ * Comma-separated list of unique file type specifiers. Like the native element,
9221
+ * it can be a mix of mime-type and file extensions.
9222
+ *
9223
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
9224
+ */
9225
+ accept = 'image/bmp,image/gif,image/jpeg,image/pjpeg,image/png,image/svg+xml,image/svg,image/webp';
9226
+ /**
9227
+ * If given, it will be called when a new file is selected. The callback should typically upload the file
9228
+ * to the server and link the newly uploaded file to the existing related object.
9229
+ *
9230
+ * The callback **must** be able to run even if the calling component has been destroyed. That means in most
9231
+ * cases you **must** `bind()` the callback explicitly, like so:
9232
+ *
9233
+ * ```html
9234
+ * <natural-file [uploader]="myCallback.bind(this)" />
9235
+ * ```
9236
+ *
9237
+ * Also, you probably **should** set a `[formCtrl]` so that the form is updated automatically, instead of doing
9238
+ * it manually within the callback.
9239
+ */
9240
+ uploader;
9241
+ model = null;
9242
+ /**
9243
+ * If provided, its value will get updated when the model changes.
9244
+ * But its value is never read, so if you want to set a value use `[model]` instead.
9245
+ */
9246
+ formCtrl = null;
9247
+ /**
9248
+ * This **must not** be used to mutate the server, because it is very likely it will never be called if the
9249
+ * human navigates away from the page before the upload is finished. Instead, you should use `[uploader]`.
9250
+ */
9251
+ modelChange = new EventEmitter();
9252
+ imagePreview = '';
9253
+ filePreview = null;
9128
9254
  ngOnChanges(changes) {
9129
9255
  if (changes.model && changes.model.previousValue !== changes.model.currentValue) {
9130
9256
  this.updateImage();
@@ -9205,8 +9331,8 @@ class NaturalFileComponent {
9205
9331
  reader.readAsBinaryString(file);
9206
9332
  return subject.asObservable();
9207
9333
  }
9208
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9209
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalFileComponent, isStandalone: true, 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 [naturalBackgroundDensity]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n @if (filePreview) {\n <div class=\"file-preview\">\n <mat-icon [size]=\"height * 0.33\" naturalIcon=\"attachment\" />\n {{ filePreview | uppercase }}\n </div>\n }\n\n <div class=\"action-overlay\">\n @if (action === 'upload') {\n <mat-icon [size]=\"height * 0.66\" naturalIcon=\"cloud_upload\" />\n }\n @if (action === 'download') {\n <mat-icon [size]=\"height * 0.66\" naturalIcon=\"get_app\" />\n }\n {{ action | capitalize }}\n </div>\n</a>\n", styles: [":host{display:flex;position:relative;flex-direction:row;overflow:hidden}: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;position:absolute;inset:0;flex-direction:column;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{display:flex;position:absolute;inset:0;justify-content:center;align-items:center;opacity:0}\n"], dependencies: [{ kind: "directive", type: NaturalFileDropDirective, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: ["fileOver"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$4.UpperCasePipe, name: "uppercase" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }, { kind: "directive", type: NaturalBackgroundDensityDirective, selector: "[naturalBackgroundDensity]", inputs: ["naturalBackgroundDensity"] }] }); }
9334
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9335
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalFileComponent, isStandalone: true, 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 [naturalBackgroundDensity]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n @if (filePreview) {\n <div class=\"file-preview\">\n <mat-icon [size]=\"height * 0.33\" naturalIcon=\"attachment\" />\n {{ filePreview | uppercase }}\n </div>\n }\n\n <div class=\"action-overlay\">\n @if (action === 'upload') {\n <mat-icon [size]=\"height * 0.66\" naturalIcon=\"cloud_upload\" />\n }\n @if (action === 'download') {\n <mat-icon [size]=\"height * 0.66\" naturalIcon=\"get_app\" />\n }\n {{ action | capitalize }}\n </div>\n</a>\n", styles: [":host{display:flex;position:relative;flex-direction:row;overflow:hidden}: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;position:absolute;inset:0;flex-direction:column;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{display:flex;position:absolute;inset:0;justify-content:center;align-items:center;opacity:0}\n"], dependencies: [{ kind: "directive", type: NaturalFileDropDirective, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: ["fileOver"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$4.UpperCasePipe, name: "uppercase" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }, { kind: "directive", type: NaturalBackgroundDensityDirective, selector: "[naturalBackgroundDensity]", inputs: ["naturalBackgroundDensity"] }] });
9210
9336
  }
9211
9337
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileComponent, decorators: [{
9212
9338
  type: Component,
@@ -9245,13 +9371,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9245
9371
  */
9246
9372
 
9247
9373
  class NaturalFixedButtonComponent {
9248
- constructor() {
9249
- this.link = [];
9250
- this.color = 'accent';
9251
- this.disabled = false;
9252
- }
9253
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFixedButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9254
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalFixedButtonComponent, isStandalone: true, selector: "natural-fixed-button", inputs: { icon: "icon", link: "link", color: "color", disabled: "disabled" }, ngImport: i0, template: "<button [color]=\"color\" [disabled]=\"disabled\" [routerLink]=\"link\" mat-fab>\n <mat-icon [naturalIcon]=\"icon\" />\n</button>\n", styles: [":host{position:fixed!important;right:32px;bottom:32px;z-index:999}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }] }); }
9374
+ icon;
9375
+ link = [];
9376
+ color = 'accent';
9377
+ disabled = false;
9378
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFixedButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9379
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalFixedButtonComponent, isStandalone: true, selector: "natural-fixed-button", inputs: { icon: "icon", link: "link", color: "color", disabled: "disabled" }, ngImport: i0, template: "<button [color]=\"color\" [disabled]=\"disabled\" [routerLink]=\"link\" mat-fab>\n <mat-icon [naturalIcon]=\"icon\" />\n</button>\n", styles: [":host{position:fixed!important;right:32px;bottom:32px;z-index:999}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }] });
9255
9380
  }
9256
9381
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFixedButtonComponent, decorators: [{
9257
9382
  type: Component,
@@ -9272,6 +9397,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9272
9397
  */
9273
9398
 
9274
9399
  class NaturalFixedButtonDetailComponent {
9400
+ canChange = true;
9401
+ isCreation = false;
9275
9402
  get model() {
9276
9403
  return this._model;
9277
9404
  }
@@ -9282,11 +9409,11 @@ class NaturalFixedButtonDetailComponent {
9282
9409
  this.canChange = false;
9283
9410
  }
9284
9411
  }
9412
+ _model;
9413
+ form;
9414
+ create = new EventEmitter();
9415
+ delete = new EventEmitter();
9285
9416
  constructor() {
9286
- this.canChange = true;
9287
- this.isCreation = false;
9288
- this.create = new EventEmitter();
9289
- this.delete = new EventEmitter();
9290
9417
  const route = inject(ActivatedRoute);
9291
9418
  route.params.pipe(takeUntilDestroyed()).subscribe(() => (this.canChange = true));
9292
9419
  }
@@ -9300,8 +9427,8 @@ class NaturalFixedButtonDetailComponent {
9300
9427
  this.delete.emit();
9301
9428
  }
9302
9429
  }
9303
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFixedButtonDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9304
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalFixedButtonDetailComponent, isStandalone: true, selector: "natural-fixed-button-detail", inputs: { model: "model", form: "form" }, outputs: { create: "create", delete: "delete" }, ngImport: i0, template: "@if (isCreation) {\n <natural-fixed-button\n (click)=\"clickCreate()\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n />\n}\n\n@if (!isCreation && (!model.permissions || model.permissions.delete)) {\n <natural-fixed-button\n (click)=\"clickDelete()\"\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 />\n}\n", styles: [""], dependencies: [{ kind: "component", type: NaturalFixedButtonComponent, selector: "natural-fixed-button", inputs: ["icon", "link", "color", "disabled"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
9430
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFixedButtonDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9431
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalFixedButtonDetailComponent, isStandalone: true, selector: "natural-fixed-button-detail", inputs: { model: "model", form: "form" }, outputs: { create: "create", delete: "delete" }, ngImport: i0, template: "@if (isCreation) {\n <natural-fixed-button\n (click)=\"clickCreate()\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n />\n}\n\n@if (!isCreation && (!model.permissions || model.permissions.delete)) {\n <natural-fixed-button\n (click)=\"clickDelete()\"\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 />\n}\n", styles: [""], dependencies: [{ kind: "component", type: NaturalFixedButtonComponent, selector: "natural-fixed-button", inputs: ["icon", "link", "color", "disabled"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
9305
9432
  }
9306
9433
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFixedButtonDetailComponent, decorators: [{
9307
9434
  type: Component,
@@ -9323,8 +9450,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9323
9450
  */
9324
9451
 
9325
9452
  class NaturalHierarchicSelectorDialogComponent {
9453
+ dialogRef = inject(MatDialogRef);
9454
+ /**
9455
+ * Set of hierarchic configurations to pass as attribute to HierarchicComponent
9456
+ */
9457
+ config;
9458
+ /**
9459
+ * Natural search selections after initialisation
9460
+ */
9461
+ searchSelectionsOutput;
9326
9462
  constructor() {
9327
- this.dialogRef = inject(MatDialogRef);
9328
9463
  const data = inject(MAT_DIALOG_DATA);
9329
9464
  this.config = defaults(data, { multiple: true, allowUnselect: true });
9330
9465
  this.searchSelectionsOutput = this.config.searchSelections;
@@ -9336,8 +9471,8 @@ class NaturalHierarchicSelectorDialogComponent {
9336
9471
  };
9337
9472
  this.dialogRef.close(result);
9338
9473
  }
9339
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9340
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalHierarchicSelectorDialogComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<h2 i18n mat-dialog-title>S\u00E9lection</h2>\n\n<mat-dialog-content>\n <natural-hierarchic-selector\n (selectionChange)=\"config.hierarchicSelection = $event\"\n [selected]=\"config.hierarchicSelection ?? {}\"\n [config]=\"config.hierarchicConfig\"\n [filters]=\"config.hierarchicFilters\"\n [multiple]=\"config.multiple ?? false\"\n [allowUnselect]=\"config.allowUnselect ?? true\"\n [searchFacets]=\"config.searchFacets ?? []\"\n [searchSelections]=\"config.searchSelections ?? []\"\n (searchSelectionChange)=\"searchSelectionsOutput = $event\"\n />\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-dialog-close mat-button i18n>Annuler</button>\n <button (click)=\"close(config.hierarchicSelection)\" color=\"primary\" mat-raised-button\n ><span i18n>Valider</span>\n </button>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: ["displayWith", "config", "multiple", "selected", "allowUnselect", "filters", "searchFacets", "searchSelections"], outputs: ["searchSelectionChange", "selectionChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] }); }
9474
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9475
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalHierarchicSelectorDialogComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<h2 i18n mat-dialog-title>S\u00E9lection</h2>\n\n<mat-dialog-content>\n <natural-hierarchic-selector\n (selectionChange)=\"config.hierarchicSelection = $event\"\n [selected]=\"config.hierarchicSelection ?? {}\"\n [config]=\"config.hierarchicConfig\"\n [filters]=\"config.hierarchicFilters\"\n [multiple]=\"config.multiple ?? false\"\n [allowUnselect]=\"config.allowUnselect ?? true\"\n [searchFacets]=\"config.searchFacets ?? []\"\n [searchSelections]=\"config.searchSelections ?? []\"\n (searchSelectionChange)=\"searchSelectionsOutput = $event\"\n />\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-dialog-close mat-button i18n>Annuler</button>\n <button (click)=\"close(config.hierarchicSelection)\" color=\"primary\" mat-raised-button\n ><span i18n>Valider</span>\n </button>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: ["displayWith", "config", "multiple", "selected", "allowUnselect", "filters", "searchFacets", "searchSelections"], outputs: ["searchSelectionChange", "selectionChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] });
9341
9476
  }
9342
9477
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogComponent, decorators: [{
9343
9478
  type: Component,
@@ -9345,9 +9480,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9345
9480
  }], ctorParameters: () => [] });
9346
9481
 
9347
9482
  class NaturalHierarchicSelectorDialogService {
9348
- constructor() {
9349
- this.dialog = inject(MatDialog);
9350
- }
9483
+ dialog = inject(MatDialog);
9351
9484
  open(hierarchicConfig, dialogConfig) {
9352
9485
  const defaultDialogConfig = {
9353
9486
  width: '700px',
@@ -9355,8 +9488,8 @@ class NaturalHierarchicSelectorDialogService {
9355
9488
  };
9356
9489
  return this.dialog.open(NaturalHierarchicSelectorDialogComponent, defaults(dialogConfig, defaultDialogConfig));
9357
9490
  }
9358
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
9359
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogService, providedIn: 'root' }); }
9491
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9492
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogService, providedIn: 'root' });
9360
9493
  }
9361
9494
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogService, decorators: [{
9362
9495
  type: Injectable,
@@ -9497,52 +9630,60 @@ function compareConfigs(a, b) {
9497
9630
  * @dynamic
9498
9631
  */
9499
9632
  class NaturalPanelsService {
9633
+ router = inject(Router);
9634
+ dialog = inject(MatDialog);
9635
+ injector = inject(Injector);
9636
+ hooksConfig = inject(PanelsHooksConfig);
9637
+ panelWidth = '960px';
9500
9638
  /**
9501
9639
  * Because of this static property Panels are **not** compatible with SSR.
9502
9640
  * And we cannot make it non-static, because `UrlMatcher` cannot be injected.
9503
9641
  */
9504
- static { this._opened = false; }
9642
+ static _opened = false;
9505
9643
  static get opened() {
9506
9644
  return this._opened;
9507
9645
  }
9646
+ /**
9647
+ * Stream that emits when all open dialog have finished closing
9648
+ */
9649
+ afterAllClosed = new Subject();
9650
+ /**
9651
+ * Cache for panels counter. Works more like an ID.
9652
+ * Is used to give an unique identifier to multiple similar panels configurations
9653
+ */
9654
+ counter = 1;
9655
+ /**
9656
+ * Class applied to dialog overlay related with panels
9657
+ * If change, change CSS too
9658
+ */
9659
+ panelClass = 'panel';
9660
+ /**
9661
+ * Cache for panels setup before navigation change.
9662
+ * Used to detect panels openings/closings and adapt for new configuration
9663
+ */
9664
+ oldFullConfig = [];
9665
+ /**
9666
+ * Cache for subscription stop
9667
+ */
9668
+ routeSub;
9669
+ /**
9670
+ * Cache for subscription stop
9671
+ */
9672
+ navSub;
9673
+ /**
9674
+ * Horizontal gaps between panels
9675
+ */
9676
+ panelsOffsetH = 35;
9677
+ /**
9678
+ * Vertical gaps between panels
9679
+ */
9680
+ panelsOffsetV = 40;
9681
+ /**
9682
+ * Cache of previous screen size
9683
+ * Used to change panels stack orientation on small screens
9684
+ */
9685
+ isVertical = false;
9508
9686
  constructor() {
9509
- this.router = inject(Router);
9510
- this.dialog = inject(MatDialog);
9511
- this.injector = inject(Injector);
9512
- this.hooksConfig = inject(PanelsHooksConfig);
9513
- this.panelWidth = '960px';
9514
- /**
9515
- * Stream that emits when all open dialog have finished closing
9516
- */
9517
- this.afterAllClosed = new Subject();
9518
- /**
9519
- * Cache for panels counter. Works more like an ID.
9520
- * Is used to give an unique identifier to multiple similar panels configurations
9521
- */
9522
- this.counter = 1;
9523
- /**
9524
- * Class applied to dialog overlay related with panels
9525
- * If change, change CSS too
9526
- */
9527
- this.panelClass = 'panel';
9528
- /**
9529
- * Cache for panels setup before navigation change.
9530
- * Used to detect panels openings/closings and adapt for new configuration
9531
- */
9532
- this.oldFullConfig = [];
9533
- /**
9534
- * Horizontal gaps between panels
9535
- */
9536
- this.panelsOffsetH = 35;
9537
- /**
9538
- * Vertical gaps between panels
9539
- */
9540
- this.panelsOffsetV = 40;
9541
- /**
9542
- * Cache of previous screen size
9543
- * Used to change panels stack orientation on small screens
9544
- */
9545
- this.isVertical = false;
9546
9687
  const breakpointObserver = inject(BreakpointObserver);
9547
9688
  // Watch media to know if display panels horizontally or vertically
9548
9689
  breakpointObserver
@@ -9787,8 +9928,8 @@ class NaturalPanelsService {
9787
9928
  dialog.updatePosition(position);
9788
9929
  }
9789
9930
  }
9790
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
9791
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsService, providedIn: 'root' }); }
9931
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9932
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsService, providedIn: 'root' });
9792
9933
  }
9793
9934
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsService, decorators: [{
9794
9935
  type: Injectable,
@@ -9798,18 +9939,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9798
9939
  }], ctorParameters: () => [] });
9799
9940
 
9800
9941
  class NaturalPanelsComponent {
9942
+ panelsService = inject(NaturalPanelsService);
9801
9943
  // PanelsComponent is kind of a "ghost" component to respond to an url matcher in route config,
9802
9944
  // An UrlMatcher (matcher attribute) is required to catch urls with an undefined number of params in url after a given param /panels/
9803
9945
  constructor() {
9804
- this.panelsService = inject(NaturalPanelsService);
9805
9946
  const route = inject(ActivatedRoute);
9806
9947
  this.panelsService.start(route);
9807
9948
  }
9808
9949
  ngOnDestroy() {
9809
9950
  this.panelsService.stop();
9810
9951
  }
9811
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9812
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalPanelsComponent, isStandalone: true, selector: "natural-panels", ngImport: i0, template: '', isInline: true }); }
9952
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9953
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalPanelsComponent, isStandalone: true, selector: "natural-panels", ngImport: i0, template: '', isInline: true });
9813
9954
  }
9814
9955
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsComponent, decorators: [{
9815
9956
  type: Component,
@@ -9847,38 +9988,12 @@ const fallbackIfNoOpenedPanels = (segments) => {
9847
9988
  * ```
9848
9989
  */
9849
9990
  class NaturalRelationsComponent {
9850
- constructor() {
9851
- this.destroyRef = inject(DestroyRef);
9852
- this.linkMutationService = inject(NaturalLinkMutationService);
9853
- this.hierarchicSelectorDialog = inject(NaturalHierarchicSelectorDialogService);
9854
- /**
9855
- * The placeholder used in the button to add a new relation
9856
- */
9857
- this.placeholder = '';
9858
- /**
9859
- * Whether the relations can be changed
9860
- */
9861
- this.disabled = false;
9862
- /**
9863
- * Emits after relations were successfully added on the server
9864
- */
9865
- this.selectionChange = new EventEmitter();
9866
- this.loading = false;
9867
- /**
9868
- * Table columns
9869
- */
9870
- this.displayedColumns = ['name'];
9871
- this.pageSizeOptions = [5, 25, 50, 100];
9872
- this.defaultPagination = {
9873
- pageIndex: 0,
9874
- pageSize: 25,
9875
- };
9876
- /**
9877
- * Observable variables/options for listing service usage and apollo watchQuery
9878
- */
9879
- this.variablesManager = new NaturalQueryVariablesManager();
9880
- this.removing = new Set();
9881
- }
9991
+ destroyRef = inject(DestroyRef);
9992
+ linkMutationService = inject(NaturalLinkMutationService);
9993
+ hierarchicSelectorDialog = inject(NaturalHierarchicSelectorDialogService);
9994
+ select;
9995
+ itemTemplate;
9996
+ _service;
9882
9997
  get service() {
9883
9998
  return this._service;
9884
9999
  }
@@ -9892,6 +10007,61 @@ class NaturalRelationsComponent {
9892
10007
  }));
9893
10008
  this.dataSource = new NaturalDataSource(items$);
9894
10009
  }
10010
+ /**
10011
+ * The placeholder used in the button to add a new relation
10012
+ */
10013
+ placeholder = '';
10014
+ /**
10015
+ * Filter for autocomplete selector
10016
+ */
10017
+ autocompleteSelectorFilter;
10018
+ /**
10019
+ * Function to customize the rendering of the selected item as text in input
10020
+ */
10021
+ displayWith;
10022
+ /**
10023
+ * Whether the relations can be changed
10024
+ */
10025
+ disabled = false;
10026
+ /**
10027
+ * The main object to which all relations belong to
10028
+ */
10029
+ main;
10030
+ /**
10031
+ * Emits after relations were successfully added on the server
10032
+ */
10033
+ selectionChange = new EventEmitter();
10034
+ /**
10035
+ * Filters for hierarchic selector
10036
+ */
10037
+ hierarchicSelectorFilters;
10038
+ /**
10039
+ * Configuration in case we prefer hierarchic selection over autocomplete selection
10040
+ */
10041
+ hierarchicSelectorConfig;
10042
+ /**
10043
+ * Link mutation semantic
10044
+ */
10045
+ otherName;
10046
+ /**
10047
+ * Listing service instance
10048
+ */
10049
+ dataSource;
10050
+ loading = false;
10051
+ /**
10052
+ * Table columns
10053
+ */
10054
+ displayedColumns = ['name'];
10055
+ pageSizeOptions = [5, 25, 50, 100];
10056
+ defaultPagination = {
10057
+ pageIndex: 0,
10058
+ pageSize: 25,
10059
+ };
10060
+ /**
10061
+ * Observable variables/options for listing service usage and apollo watchQuery
10062
+ */
10063
+ variablesManager = new NaturalQueryVariablesManager();
10064
+ removing = new Set();
9895
10065
  /**
9896
10066
  * The filter used to filter relations
9897
10067
  *
@@ -9988,8 +10158,8 @@ class NaturalRelationsComponent {
9988
10158
  }
9989
10159
  return this.hierarchicSelectorConfig.find(c => !!c.selectableAtKey)?.selectableAtKey;
9990
10160
  }
9991
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalRelationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9992
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalRelationsComponent, isStandalone: true, 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 }], usesOnChanges: true, ngImport: i0, template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table [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 />\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 @if (!disabled) {\n <button\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <mat-icon naturalIcon=\"link_off\" />\n </button>\n }\n </td>\n </ng-container>\n </table>\n\n @if (dataSource.data && (dataSource.data.length || 0) > (dataSource.data.pageSize || 0)) {\n <mat-paginator\n (page)=\"pagination($event)\"\n [length]=\"dataSource.data.length || 0\"\n [pageIndex]=\"dataSource.data.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource.data.pageSize || 0\"\n />\n }\n\n @if (!loading && dataSource.data?.length === 0) {\n <div class=\"nat-margin-vertical mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n }\n\n @if (loading) {\n <mat-progress-spinner [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\" />\n }\n</div>\n\n@if (!disabled) {\n @if (hierarchicSelectorConfig) {\n <div>\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n </div>\n } @else {\n <natural-select\n (selectionChange)=\"addRelations([$event])\"\n [displayWith]=\"$any(getDisplayFn())\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n />\n }\n}\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: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i2$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2$2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i6$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "searchOperator", "filter", "disabled"] }] }); }
10161
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalRelationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10162
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalRelationsComponent, isStandalone: true, 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 }], usesOnChanges: true, ngImport: i0, template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table [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 />\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 @if (!disabled) {\n <button\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <mat-icon naturalIcon=\"link_off\" />\n </button>\n }\n </td>\n </ng-container>\n </table>\n\n @if (dataSource.data && (dataSource.data.length || 0) > (dataSource.data.pageSize || 0)) {\n <mat-paginator\n (page)=\"pagination($event)\"\n [length]=\"dataSource.data.length || 0\"\n [pageIndex]=\"dataSource.data.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource.data.pageSize || 0\"\n />\n }\n\n @if (!loading && dataSource.data?.length === 0) {\n <div class=\"nat-margin-vertical mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n }\n\n @if (loading) {\n <mat-progress-spinner [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\" />\n }\n</div>\n\n@if (!disabled) {\n @if (hierarchicSelectorConfig) {\n <div>\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n </div>\n } @else {\n <natural-select\n (selectionChange)=\"addRelations([$event])\"\n [displayWith]=\"$any(getDisplayFn())\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n />\n }\n}\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: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i2$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2$2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i6$2.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "searchOperator", "filter", "disabled"] }] });
9993
10163
  }
9994
10164
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalRelationsComponent, decorators: [{
9995
10165
  type: Component,
@@ -10041,14 +10211,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10041
10211
  */
10042
10212
 
10043
10213
  class NaturalSelectEnumComponent extends AbstractSelect {
10214
+ enumService = inject(NaturalEnumService);
10215
+ /**
10216
+ * The name of the enum type, eg: `"ActionStatus"`
10217
+ */
10218
+ enumName;
10219
+ /**
10220
+ * If given an extra option is added to select `null` with given label
10221
+ */
10222
+ nullLabel;
10223
+ /**
10224
+ * Functions that receives an enum value and returns whether that value is disabled
10225
+ */
10226
+ optionDisabled;
10227
+ /**
10228
+ * Whether the user should be allowed to select multiple options
10229
+ */
10230
+ multiple = false;
10231
+ items;
10044
10232
  constructor() {
10045
10233
  const ngControl = inject(NgControl, { optional: true, self: true });
10046
10234
  super(ngControl);
10047
- this.enumService = inject(NaturalEnumService);
10048
- /**
10049
- * Whether the user should be allowed to select multiple options
10050
- */
10051
- this.multiple = false;
10052
10235
  }
10053
10236
  ngOnInit() {
10054
10237
  super.ngOnInit();
@@ -10057,8 +10240,8 @@ class NaturalSelectEnumComponent extends AbstractSelect {
10057
10240
  getDisplayFn() {
10058
10241
  throw new Error('This should never be called');
10059
10242
  }
10060
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectEnumComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10061
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectEnumComponent, isStandalone: true, 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)=\"onBlur()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n @if (nullLabel) {\n <mat-option [value]=\"null\">{{ nullLabel }}</mat-option>\n }\n @for (item of items | async; track item.value) {\n <mat-option [value]=\"item.value\" [disabled]=\"optionDisabled ? optionDisabled(item) : false\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n }\n</mat-form-field>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatOptionModule }] }); }
10243
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectEnumComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10244
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectEnumComponent, isStandalone: true, 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)=\"onBlur()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n @if (nullLabel) {\n <mat-option [value]=\"null\">{{ nullLabel }}</mat-option>\n }\n @for (item of items | async; track item.value) {\n <mat-option [value]=\"item.value\" [disabled]=\"optionDisabled ? optionDisabled(item) : false\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n }\n</mat-form-field>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatOptionModule }] });
10062
10245
  }
10063
10246
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectEnumComponent, decorators: [{
10064
10247
  type: Component,
@@ -10100,25 +10283,33 @@ function defaultDisplayFn(item) {
10100
10283
  * ```
10101
10284
  */
10102
10285
  class NaturalSelectHierarchicComponent extends AbstractSelect {
10286
+ hierarchicSelectorDialogService = inject(NaturalHierarchicSelectorDialogService);
10287
+ /**
10288
+ * If provided cause a new select button to appear
10289
+ */
10290
+ selectLabel;
10291
+ /**
10292
+ * Configuration for hierarchic relations
10293
+ *
10294
+ * It should be an array with at least one element with `selectableAtKey` configured, otherwise the selector will never open.
10295
+ */
10296
+ config = null;
10297
+ /**
10298
+ * Filters formatted for hierarchic selector
10299
+ */
10300
+ filters;
10301
+ /**
10302
+ * The selected value as an object. The internal value is `internalCtrl.value`, and that is a string.
10303
+ */
10304
+ value = null;
10305
+ /**
10306
+ * On Firefox, the combination of <input (focus)> event and dialog opening cause some strange bug where focus event is called multiple
10307
+ * times This prevents it.
10308
+ */
10309
+ lockOpenDialog = false;
10103
10310
  constructor() {
10104
10311
  const ngControl = inject(NgControl, { optional: true, self: true });
10105
10312
  super(ngControl);
10106
- this.hierarchicSelectorDialogService = inject(NaturalHierarchicSelectorDialogService);
10107
- /**
10108
- * Configuration for hierarchic relations
10109
- *
10110
- * It should be an array with at least one element with `selectableAtKey` configured, otherwise the selector will never open.
10111
- */
10112
- this.config = null;
10113
- /**
10114
- * The selected value as an object. The internal value is `internalCtrl.value`, and that is a string.
10115
- */
10116
- this.value = null;
10117
- /**
10118
- * On Firefox, the combination of <input (focus)> event and dialog opening cause some strange bug where focus event is called multiple
10119
- * times This prevents it.
10120
- */
10121
- this.lockOpenDialog = false;
10122
10313
  }
10123
10314
  /**
10124
10315
  * Very important to return something, above all if [select]='displayedValue' attribute value is used
@@ -10183,8 +10374,8 @@ class NaturalSelectHierarchicComponent extends AbstractSelect {
10183
10374
  getSelectKey() {
10184
10375
  return this.config?.find(c => !!c.selectableAtKey)?.selectableAtKey;
10185
10376
  }
10186
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectHierarchicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10187
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectHierarchicComponent, isStandalone: true, selector: "natural-select-hierarchic", inputs: { selectLabel: "selectLabel", config: "config", filters: "filters" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\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 @if (showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n }\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@if (showSelectButton() || showClearButton()) {\n <div class=\"external-buttons\">\n @if (showSelectButton()) {\n <button (click)=\"openDialog()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n }\n @if (showClearButton()) {\n <button (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
10377
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectHierarchicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10378
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectHierarchicComponent, isStandalone: true, selector: "natural-select-hierarchic", inputs: { selectLabel: "selectLabel", config: "config", filters: "filters" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\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 @if (showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n }\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@if (showSelectButton() || showClearButton()) {\n <div class=\"external-buttons\">\n @if (showSelectButton()) {\n <button (click)=\"openDialog()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n }\n @if (showClearButton()) {\n <button (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
10188
10379
  }
10189
10380
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectHierarchicComponent, decorators: [{
10190
10381
  type: Component,
@@ -10212,18 +10403,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10212
10403
  */
10213
10404
 
10214
10405
  class NaturalSidenavStackService {
10215
- constructor() {
10216
- /**
10217
- * The stack of all currently living sidenavs
10218
- */
10219
- this.sidenavs = [];
10220
- /**
10221
- * Emits the most recent living SidenavContainer whenever it changes. So it's
10222
- * either the SidenavContainer that was just added, or the one "before" the
10223
- * SidenavContainer that was just removed
10224
- */
10225
- this.currentSidenav = new Subject();
10226
- }
10406
+ /**
10407
+ * The stack of all currently living sidenavs
10408
+ */
10409
+ sidenavs = [];
10410
+ /**
10411
+ * Emits the most recent living SidenavContainer whenever it changes. So it's
10412
+ * either the SidenavContainer that was just added, or the one "before" the
10413
+ * SidenavContainer that was just removed
10414
+ */
10415
+ currentSidenav = new Subject();
10227
10416
  /**
10228
10417
  * For internal use only
10229
10418
  * @internal
@@ -10252,8 +10441,8 @@ class NaturalSidenavStackService {
10252
10441
  next() {
10253
10442
  this.currentSidenav.next(this.sidenavs[this.sidenavs.length - 1]);
10254
10443
  }
10255
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavStackService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
10256
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavStackService, providedIn: 'root' }); }
10444
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavStackService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10445
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavStackService, providedIn: 'root' });
10257
10446
  }
10258
10447
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavStackService, decorators: [{
10259
10448
  type: Injectable,
@@ -10275,47 +10464,45 @@ function assert(value) {
10275
10464
  * Maybe the better is to wait next release
10276
10465
  */
10277
10466
  class NaturalSidenavService {
10278
- constructor() {
10279
- this.destroyRef = inject(DestroyRef);
10280
- this.breakpointObserver = inject(BreakpointObserver);
10281
- this.router = inject(Router);
10282
- this.sessionStorage = inject(SESSION_STORAGE);
10283
- this.naturalSidenavStackService = inject(NaturalSidenavStackService);
10284
- /**
10285
- * Navigation modes
10286
- * First is for desktop view
10287
- * Second is for mobile view
10288
- */
10289
- this.modes = ['side', 'push'];
10290
- /**
10291
- * Activated mode
10292
- * Default to desktop view
10293
- */
10294
- this.mode = this.modes[0];
10295
- /**
10296
- * Whether nav is opened or not
10297
- */
10298
- this.opened = true;
10299
- /**
10300
- * Stores the opened status during mobile view, to restore if we come back to desktop view
10301
- */
10302
- this.tmpOpened = this.opened;
10303
- /**
10304
- * Whether nav is minimized or not
10305
- */
10306
- this.minimized = false;
10307
- /**
10308
- * LocalStorage key that stores the minimized status
10309
- */
10310
- this.minimizedStorageKey = 'menu-minimized';
10311
- /**
10312
- * LocalStorage key that stores the opened status
10313
- */
10314
- this.openedStorageKey = 'menu-opened';
10315
- this.minimizedStorageKeyWithName = null;
10316
- this.openedStorageKeyWithName = null;
10317
- this._isMobileView = false;
10318
- }
10467
+ destroyRef = inject(DestroyRef);
10468
+ breakpointObserver = inject(BreakpointObserver);
10469
+ router = inject(Router);
10470
+ sessionStorage = inject(SESSION_STORAGE);
10471
+ naturalSidenavStackService = inject(NaturalSidenavStackService);
10472
+ /**
10473
+ * Navigation modes
10474
+ * First is for desktop view
10475
+ * Second is for mobile view
10476
+ */
10477
+ modes = ['side', 'push'];
10478
+ /**
10479
+ * Activated mode
10480
+ * Default to desktop view
10481
+ */
10482
+ mode = this.modes[0];
10483
+ /**
10484
+ * Whether nav is opened or not
10485
+ */
10486
+ opened = true;
10487
+ /**
10488
+ * Stores the opened status during mobile view, to restore if we come back to desktop view
10489
+ */
10490
+ tmpOpened = this.opened;
10491
+ /**
10492
+ * Whether nav is minimized or not
10493
+ */
10494
+ minimized = false;
10495
+ /**
10496
+ * LocalStorage key that stores the minimized status
10497
+ */
10498
+ minimizedStorageKey = 'menu-minimized';
10499
+ /**
10500
+ * LocalStorage key that stores the opened status
10501
+ */
10502
+ openedStorageKey = 'menu-opened';
10503
+ minimizedStorageKeyWithName = null;
10504
+ openedStorageKeyWithName = null;
10505
+ _isMobileView = false;
10319
10506
  get activeMode() {
10320
10507
  return this.mode;
10321
10508
  }
@@ -10442,8 +10629,8 @@ class NaturalSidenavService {
10442
10629
  this.sessionStorage.setItem(this.openedStorageKeyWithName, this.opened ? 'true' : 'false');
10443
10630
  }
10444
10631
  }
10445
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
10446
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavService, providedIn: 'root' }); }
10632
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10633
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavService, providedIn: 'root' });
10447
10634
  }
10448
10635
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavService, decorators: [{
10449
10636
  type: Injectable,
@@ -10451,8 +10638,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10451
10638
  }] });
10452
10639
 
10453
10640
  class NaturalSidenavComponent {
10454
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10455
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalSidenavComponent, isStandalone: true, selector: "natural-sidenav", ngImport: i0, template: '<ng-content />', isInline: true }); }
10641
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10642
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalSidenavComponent, isStandalone: true, selector: "natural-sidenav", ngImport: i0, template: '<ng-content />', isInline: true });
10456
10643
  }
10457
10644
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavComponent, decorators: [{
10458
10645
  type: Component,
@@ -10464,27 +10651,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10464
10651
  }] });
10465
10652
 
10466
10653
  class NaturalSidenavContainerComponent {
10467
- constructor() {
10468
- this.sidenavService = inject(NaturalSidenavService);
10469
- /**
10470
- * The side that the drawer is attached to
10471
- */
10472
- this.position = 'start';
10473
- /**
10474
- * If true listens to route changes to close side nav after a route change if mobile view is active
10475
- * Actually a navigation to current route does not emit a route change, and the sidenav don't close.
10476
- */
10477
- this.mobileAutoClose = true;
10478
- /**
10479
- * Width of the minimized menu
10480
- */
10481
- this.minimizedWidth = 150;
10482
- /**
10483
- * If true, prevents "native" material sidenav to scroll at container level and delegates the scroll responsability to the transcluded
10484
- * content
10485
- */
10486
- this.noScroll = false;
10487
- }
10654
+ sidenavService = inject(NaturalSidenavService);
10655
+ /**
10656
+ * Unique identifier used for the local storage
10657
+ */
10658
+ name;
10659
+ /**
10660
+ * The side that the drawer is attached to
10661
+ */
10662
+ position = 'start';
10663
+ /**
10664
+ * If true listens to route changes to close side nav after a route change if mobile view is active
10665
+ * Actually a navigation to current route does not emit a route change, and the sidenav don't close.
10666
+ */
10667
+ mobileAutoClose = true;
10668
+ /**
10669
+ * Width of the minimized menu
10670
+ */
10671
+ minimizedWidth = 150;
10672
+ /**
10673
+ * If true, prevents "native" material sidenav to scroll at container level and delegates the scroll responsability to the transcluded
10674
+ * content
10675
+ */
10676
+ noScroll = false;
10677
+ /**
10678
+ * Inner "native" material sidenav
10679
+ */
10680
+ menuSidenav;
10488
10681
  get isMinimized() {
10489
10682
  return this.sidenavService.isMinimized;
10490
10683
  }
@@ -10515,8 +10708,8 @@ class NaturalSidenavContainerComponent {
10515
10708
  toggleMinimized() {
10516
10709
  this.sidenavService.toggleMinimized();
10517
10710
  }
10518
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10519
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalSidenavContainerComponent, isStandalone: true, 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: "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\" />\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-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:1;flex-direction:column}: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: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1$6.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i1$6.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i1$6.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
10711
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10712
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalSidenavContainerComponent, isStandalone: true, 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: "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\" />\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-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:1;flex-direction:column}: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: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1$6.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i1$6.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i1$6.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
10520
10713
  }
10521
10714
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavContainerComponent, decorators: [{
10522
10715
  type: Component,
@@ -10541,8 +10734,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10541
10734
  }] } });
10542
10735
 
10543
10736
  class NaturalSidenavContentComponent {
10544
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10545
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalSidenavContentComponent, isStandalone: true, selector: "natural-sidenav-content", ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:flex;flex:1;flex-direction:column;overflow:auto}\n"] }); }
10737
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10738
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.3", type: NaturalSidenavContentComponent, isStandalone: true, selector: "natural-sidenav-content", ngImport: i0, template: '<ng-content />', isInline: true, styles: [":host{display:flex;flex:1;flex-direction:column;overflow:auto}\n"] });
10546
10739
  }
10547
10740
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavContentComponent, decorators: [{
10548
10741
  type: Component,
@@ -10554,14 +10747,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10554
10747
  */
10555
10748
 
10556
10749
  class NaturalStampComponent {
10750
+ item;
10557
10751
  showUpdate() {
10558
10752
  const same = this.item.updater?.id === this.item.creator?.id &&
10559
10753
  this.item.updateDate &&
10560
10754
  this.item.updateDate === this.item.creationDate;
10561
10755
  return !same && (!!this.item.updateDate || !!this.item.updater);
10562
10756
  }
10563
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalStampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10564
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalStampComponent, isStandalone: true, selector: "natural-stamp", inputs: { item: "item" }, ngImport: i0, template: "@if (item) {\n @if (item.creationDate || item.creator) {\n <div>\n <span class=\"mat-subtitle-2\" i18n>Cr\u00E9ation</span>\n :\n @if (item.creator) {\n <span>{{ item.creator.fullName || item.creator.name }}</span>\n }\n @if (item.creator && item.creationDate) {\n <span>,&nbsp;</span>\n }\n @if (item.creationDate) {\n <span>{{ item.creationDate | date }} ({{ item.creationDate | timeAgo }})</span>\n }\n </div>\n }\n @if (showUpdate()) {\n <div>\n <span class=\"mat-subtitle-2\" i18n>Modification</span>\n :\n @if (item.updater) {\n <span>{{ item.updater.fullName || item.updater.name }}</span>\n }\n @if (item.updater && item.updateDate) {\n <span>,&nbsp;</span>\n }\n @if (item.updateDate) {\n <span>{{ item.updateDate | date }} ({{ item.updateDate | timeAgo }})</span>\n }\n </div>\n }\n}\n", dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: NaturalTimeAgoPipe, name: "timeAgo" }] }); }
10757
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalStampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10758
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalStampComponent, isStandalone: true, selector: "natural-stamp", inputs: { item: "item" }, ngImport: i0, template: "@if (item) {\n @if (item.creationDate || item.creator) {\n <div>\n <span class=\"mat-subtitle-2\" i18n>Cr\u00E9ation</span>\n :\n @if (item.creator) {\n <span>{{ item.creator.fullName || item.creator.name }}</span>\n }\n @if (item.creator && item.creationDate) {\n <span>,&nbsp;</span>\n }\n @if (item.creationDate) {\n <span>{{ item.creationDate | date }} ({{ item.creationDate | timeAgo }})</span>\n }\n </div>\n }\n @if (showUpdate()) {\n <div>\n <span class=\"mat-subtitle-2\" i18n>Modification</span>\n :\n @if (item.updater) {\n <span>{{ item.updater.fullName || item.updater.name }}</span>\n }\n @if (item.updater && item.updateDate) {\n <span>,&nbsp;</span>\n }\n @if (item.updateDate) {\n <span>{{ item.updateDate | date }} ({{ item.updateDate | timeAgo }})</span>\n }\n </div>\n }\n}\n", dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: NaturalTimeAgoPipe, name: "timeAgo" }] });
10565
10759
  }
10566
10760
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalStampComponent, decorators: [{
10567
10761
  type: Component,
@@ -10586,16 +10780,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10586
10780
  * External URL will always be opened in new tab.
10587
10781
  */
10588
10782
  class NaturalTableButtonComponent {
10589
- constructor() {
10590
- this.queryParams = {};
10591
- this.queryParamsHandling = '';
10592
- this.navigate = [];
10593
- this.preserveFragment = false;
10594
- this.disabled = false;
10595
- this.raised = false;
10596
- this.buttonClick = new EventEmitter();
10597
- this.type = 'none';
10598
- }
10783
+ queryParams = {};
10784
+ queryParamsHandling = '';
10785
+ label;
10786
+ icon;
10787
+ href;
10788
+ navigate = [];
10789
+ fragment;
10790
+ preserveFragment = false;
10791
+ disabled = false;
10792
+ raised = false;
10793
+ color;
10794
+ buttonClick = new EventEmitter();
10795
+ type = 'none';
10599
10796
  ngOnChanges() {
10600
10797
  if (this.navigate instanceof UrlTree || this.navigate?.length || Object.keys(this.queryParams).length) {
10601
10798
  this.type = 'routerLink';
@@ -10610,8 +10807,8 @@ class NaturalTableButtonComponent {
10610
10807
  this.type = 'none';
10611
10808
  }
10612
10809
  }
10613
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalTableButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10614
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalTableButtonComponent, isStandalone: true, selector: "natural-table-button", inputs: { queryParams: "queryParams", queryParamsHandling: "queryParamsHandling", label: "label", icon: "icon", href: "href", navigate: "navigate", fragment: "fragment", preserveFragment: "preserveFragment", disabled: "disabled", 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@if (type === 'none') {\n <span>\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n @if (label) {\n <span>{{ label }}</span>\n }\n </span>\n}\n\n@if (!raised) {\n <!-- App routed link with label... -->\n @if (type === 'routerLink' && label) {\n <a\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-button\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'routerLink' && !label) {\n <a\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n <!-- Click with label... -->\n @if (type === 'click' && label) {\n <a [color]=\"color\" (click)=\"buttonClick.emit($event)\" [disabled]=\"disabled\" mat-button>\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'click' && !label) {\n <a (click)=\"buttonClick.emit($event)\" [disabled]=\"disabled\" mat-icon-button>\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n <!-- External link with label... -->\n @if (type === 'href' && label) {\n <a [attr.href]=\"href\" [color]=\"color\" [disabled]=\"disabled\" mat-button target=\"_blank\">\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'href' && !label) {\n <a [attr.href]=\"href\" [color]=\"color\" [disabled]=\"disabled\" mat-icon-button target=\"_blank\">\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n}\n\n@if (raised) {\n <!-- App routed link with label... -->\n @if (type === 'routerLink' && label) {\n <a\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-raised-button\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'routerLink' && !label) {\n <a\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n <!-- Click with label... -->\n @if (type === 'click' && label) {\n <a [color]=\"color\" [disabled]=\"disabled\" (click)=\"buttonClick.emit($event)\" mat-raised-button>\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'click' && !label) {\n <a\n [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick.emit($event)\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n <!-- External link with label... -->\n @if (type === 'href' && label) {\n <a [attr.href]=\"href\" [color]=\"color\" [disabled]=\"disabled\" mat-raised-button target=\"_blank\">\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'href' && !label) {\n <a\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n target=\"_blank\"\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n}\n", styles: ["natural-table-button{display:flex;flex:1;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button mat-icon:not(:last-child){margin-right:5px}natural-table-button a.mat-mdc-button{display:flex;flex:1;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button a.mat-mdc-button .mdc-button__label{display:flex;flex-direction:row;align-items:center}natural-table-button>span{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;padding:0 8px}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], encapsulation: i0.ViewEncapsulation.None }); }
10810
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalTableButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10811
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalTableButtonComponent, isStandalone: true, selector: "natural-table-button", inputs: { queryParams: "queryParams", queryParamsHandling: "queryParamsHandling", label: "label", icon: "icon", href: "href", navigate: "navigate", fragment: "fragment", preserveFragment: "preserveFragment", disabled: "disabled", 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@if (type === 'none') {\n <span>\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n @if (label) {\n <span>{{ label }}</span>\n }\n </span>\n}\n\n@if (!raised) {\n <!-- App routed link with label... -->\n @if (type === 'routerLink' && label) {\n <a\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-button\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'routerLink' && !label) {\n <a\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n <!-- Click with label... -->\n @if (type === 'click' && label) {\n <a [color]=\"color\" (click)=\"buttonClick.emit($event)\" [disabled]=\"disabled\" mat-button>\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'click' && !label) {\n <a (click)=\"buttonClick.emit($event)\" [disabled]=\"disabled\" mat-icon-button>\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n <!-- External link with label... -->\n @if (type === 'href' && label) {\n <a [attr.href]=\"href\" [color]=\"color\" [disabled]=\"disabled\" mat-button target=\"_blank\">\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'href' && !label) {\n <a [attr.href]=\"href\" [color]=\"color\" [disabled]=\"disabled\" mat-icon-button target=\"_blank\">\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n}\n\n@if (raised) {\n <!-- App routed link with label... -->\n @if (type === 'routerLink' && label) {\n <a\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-raised-button\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'routerLink' && !label) {\n <a\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n <!-- Click with label... -->\n @if (type === 'click' && label) {\n <a [color]=\"color\" [disabled]=\"disabled\" (click)=\"buttonClick.emit($event)\" mat-raised-button>\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'click' && !label) {\n <a\n [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick.emit($event)\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n <!-- External link with label... -->\n @if (type === 'href' && label) {\n <a [attr.href]=\"href\" [color]=\"color\" [disabled]=\"disabled\" mat-raised-button target=\"_blank\">\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n <span>{{ label }}</span>\n </a>\n }\n <!-- ... and without label -->\n @if (type === 'href' && !label) {\n <a\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n target=\"_blank\"\n >\n @if (icon) {\n <mat-icon [naturalIcon]=\"icon\" />\n }\n </a>\n }\n}\n", styles: ["natural-table-button{display:flex;flex:1;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button mat-icon:not(:last-child){margin-right:5px}natural-table-button a.mat-mdc-button{display:flex;flex:1;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button a.mat-mdc-button .mdc-button__label{display:flex;flex-direction:row;align-items:center}natural-table-button>span{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;padding:0 8px}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], encapsulation: i0.ViewEncapsulation.None });
10615
10812
  }
10616
10813
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalTableButtonComponent, decorators: [{
10617
10814
  type: Component,
@@ -10656,6 +10853,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10656
10853
  * in order to provide the avatar source.
10657
10854
  */
10658
10855
  class Source {
10856
+ value;
10659
10857
  constructor(value) {
10660
10858
  this.value = value;
10661
10859
  this.value = value;
@@ -10953,27 +11151,25 @@ class Image extends Source {
10953
11151
  * Provides utilities methods related to Avatar component
10954
11152
  */
10955
11153
  class AvatarService {
10956
- constructor() {
10957
- /**
10958
- * Ordered pairs of possible sources. First in the list is the highest priority.
10959
- * And key must match one the input of AvatarComponent.
10960
- */
10961
- this.sourceCreators = new Map([
10962
- ['gravatar', Gravatar],
10963
- ['image', Image],
10964
- ['initials', Initials],
10965
- ]);
10966
- this.avatarColors = [
10967
- '#e37900', // 2.99 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=e37900
10968
- '#e6b102', // 2.26 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=c7ab00
10969
- '#00bbbb', // 2.37 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=00bbbb
10970
- '#008cff', // 3.38 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=008cff
10971
- '#d9138c', // 4.51 pass https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=d901b8
10972
- '#7321d1', // 4.28 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=c800ff
10973
- '#3b3b3b', // 11.2 pass https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=3b3b3b
10974
- ];
10975
- this.failedSources = new Map();
10976
- }
11154
+ /**
11155
+ * Ordered pairs of possible sources. First in the list is the highest priority.
11156
+ * And key must match one the input of AvatarComponent.
11157
+ */
11158
+ sourceCreators = new Map([
11159
+ ['gravatar', Gravatar],
11160
+ ['image', Image],
11161
+ ['initials', Initials],
11162
+ ]);
11163
+ avatarColors = [
11164
+ '#e37900', // 2.99 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=e37900
11165
+ '#e6b102', // 2.26 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=c7ab00
11166
+ '#00bbbb', // 2.37 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=00bbbb
11167
+ '#008cff', // 3.38 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=008cff
11168
+ '#d9138c', // 4.51 pass https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=d901b8
11169
+ '#7321d1', // 4.28 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=c800ff
11170
+ '#3b3b3b', // 11.2 pass https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=3b3b3b
11171
+ ];
11172
+ failedSources = new Map();
10977
11173
  getRandomColor(avatarText) {
10978
11174
  if (!avatarText) {
10979
11175
  return 'transparent';
@@ -10999,8 +11195,8 @@ class AvatarService {
10999
11195
  .map(letter => letter.charCodeAt(0))
11000
11196
  .reduce((previous, current) => previous + current);
11001
11197
  }
11002
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AvatarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
11003
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AvatarService, providedIn: 'root' }); }
11198
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AvatarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11199
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AvatarService, providedIn: 'root' });
11004
11200
  }
11005
11201
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AvatarService, decorators: [{
11006
11202
  type: Injectable,
@@ -11013,21 +11209,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
11013
11209
  * Show an avatar from different sources
11014
11210
  */
11015
11211
  class NaturalAvatarComponent {
11016
- constructor() {
11017
- this.avatarService = inject(AvatarService);
11018
- this.size = 50;
11019
- this.decorated = true;
11020
- this.textSizeRatio = 2.25;
11021
- this.fgColor = '#FFF';
11022
- this.borderRadius = '';
11023
- this.textMaximumLength = 2;
11024
- this.avatarSrc = null;
11025
- this.avatarText = null;
11026
- this.avatarStyle = {};
11027
- this.hostStyle = {};
11028
- this.currentIndex = -1;
11029
- this.sources = [];
11030
- }
11212
+ avatarService = inject(AvatarService);
11213
+ image;
11214
+ initials;
11215
+ gravatar;
11216
+ size = 50;
11217
+ decorated = true;
11218
+ textSizeRatio = 2.25;
11219
+ bgColor;
11220
+ fgColor = '#FFF';
11221
+ borderRadius = '';
11222
+ textMaximumLength = 2;
11223
+ avatarSrc = null;
11224
+ avatarText = null;
11225
+ avatarStyle = {};
11226
+ hostStyle = {};
11227
+ currentIndex = -1;
11228
+ sources = [];
11031
11229
  /**
11032
11230
  * Detect inputs change
11033
11231
  */
@@ -11130,8 +11328,8 @@ class NaturalAvatarComponent {
11130
11328
  height: this.size + 'px',
11131
11329
  };
11132
11330
  }
11133
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11134
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalAvatarComponent, isStandalone: true, selector: "natural-avatar", inputs: { image: "image", initials: "initials", gravatar: "gravatar", size: "size", decorated: "decorated", textSizeRatio: "textSizeRatio", bgColor: "bgColor", fgColor: "fgColor", borderRadius: "borderRadius", textMaximumLength: "textMaximumLength" }, host: { properties: { "style.height.px": "this.size", "style.width.px": "this.size", "class.decorated": "this.decorated" } }, usesOnChanges: true, ngImport: i0, template: `
11331
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11332
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalAvatarComponent, isStandalone: true, selector: "natural-avatar", inputs: { image: "image", initials: "initials", gravatar: "gravatar", size: "size", decorated: "decorated", textSizeRatio: "textSizeRatio", bgColor: "bgColor", fgColor: "fgColor", borderRadius: "borderRadius", textMaximumLength: "textMaximumLength" }, host: { properties: { "style.height.px": "this.size", "style.width.px": "this.size", "class.decorated": "this.decorated" } }, usesOnChanges: true, ngImport: i0, template: `
11135
11333
  <div class="avatar-container" [ngStyle]="hostStyle">
11136
11334
  @if (avatarSrc) {
11137
11335
  <img
@@ -11150,7 +11348,7 @@ class NaturalAvatarComponent {
11150
11348
  </div>
11151
11349
  }
11152
11350
  </div>
11153
- `, isInline: true, styles: [":host{display:block}:host.decorated{position:relative}:host.decorated .avatar-container:before{position:absolute;inset:0;border-radius:50%;background:linear-gradient(345deg,#fff0 25%,#ffffff54);content:\"\"}:host.decorated .avatar-content{text-shadow:0 1px 0 rgba(0,0,0,.6)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
11351
+ `, isInline: true, styles: [":host{display:block}:host.decorated{position:relative}:host.decorated .avatar-container:before{position:absolute;inset:0;border-radius:50%;background:linear-gradient(345deg,#fff0 25%,#ffffff54);content:\"\"}:host.decorated .avatar-content{text-shadow:0 1px 0 rgba(0,0,0,.6)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
11154
11352
  }
11155
11353
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAvatarComponent, decorators: [{
11156
11354
  type: Component,
@@ -11215,13 +11413,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
11215
11413
  * @dynamic
11216
11414
  */
11217
11415
  class NaturalMatomoService {
11416
+ router = inject(Router);
11417
+ document = inject(DOCUMENT);
11418
+ titleService = inject(Title);
11419
+ isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
11420
+ window;
11421
+ subscription = null;
11422
+ referrerUrl = '';
11218
11423
  constructor() {
11219
- this.router = inject(Router);
11220
- this.document = inject(DOCUMENT);
11221
- this.titleService = inject(Title);
11222
- this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
11223
- this.subscription = null;
11224
- this.referrerUrl = '';
11225
11424
  const window = this.document.defaultView;
11226
11425
  if (!window) {
11227
11426
  throw new Error('Could not init MatomoService `window` is undefined');
@@ -11289,8 +11488,8 @@ class NaturalMatomoService {
11289
11488
  this.referrerUrl = currentUrl;
11290
11489
  });
11291
11490
  }
11292
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMatomoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
11293
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMatomoService, providedIn: 'root' }); }
11491
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMatomoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11492
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMatomoService, providedIn: 'root' });
11294
11493
  }
11295
11494
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMatomoService, decorators: [{
11296
11495
  type: Injectable,
@@ -11315,12 +11514,12 @@ const NaturalLoggerConfigExtra = new InjectionToken('Class that may provide extr
11315
11514
  * ```
11316
11515
  */
11317
11516
  class NaturalErrorHandler extends ErrorHandler {
11517
+ http = inject(HttpClient);
11518
+ document = inject(DOCUMENT);
11519
+ url = inject(NaturalLoggerConfigUrl, { optional: true });
11520
+ loggerExtra = inject(NaturalLoggerConfigExtra, { optional: true });
11318
11521
  constructor() {
11319
11522
  super();
11320
- this.http = inject(HttpClient);
11321
- this.document = inject(DOCUMENT);
11322
- this.url = inject(NaturalLoggerConfigUrl, { optional: true });
11323
- this.loggerExtra = inject(NaturalLoggerConfigExtra, { optional: true });
11324
11523
  }
11325
11524
  handleError(error) {
11326
11525
  console.error(error);
@@ -11375,8 +11574,8 @@ class NaturalErrorHandler extends ErrorHandler {
11375
11574
  .subscribe();
11376
11575
  }
11377
11576
  }
11378
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
11379
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalErrorHandler, providedIn: 'root' }); }
11577
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11578
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalErrorHandler, providedIn: 'root' });
11380
11579
  }
11381
11580
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalErrorHandler, decorators: [{
11382
11581
  type: Injectable,
@@ -11429,9 +11628,7 @@ function ensureHttpPrefix(value) {
11429
11628
  * This directive only supports ReactiveForms due to ngModel/ngControl encapsulation and changes emissions.
11430
11629
  */
11431
11630
  class NaturalHttpPrefixDirective {
11432
- constructor() {
11433
- this.naturalHttpPrefix = null;
11434
- }
11631
+ naturalHttpPrefix = null;
11435
11632
  httpize($event) {
11436
11633
  if (this.naturalHttpPrefix) {
11437
11634
  const newValue = ensureHttpPrefix($event) || $event;
@@ -11440,8 +11637,8 @@ class NaturalHttpPrefixDirective {
11440
11637
  }
11441
11638
  }
11442
11639
  }
11443
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHttpPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
11444
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalHttpPrefixDirective, isStandalone: true, selector: "[naturalHttpPrefix]", inputs: { naturalHttpPrefix: "naturalHttpPrefix" }, host: { listeners: { "ngModelChange": "httpize($event)" } }, ngImport: i0 }); }
11640
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHttpPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11641
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalHttpPrefixDirective, isStandalone: true, selector: "[naturalHttpPrefix]", inputs: { naturalHttpPrefix: "naturalHttpPrefix" }, host: { listeners: { "ngModelChange": "httpize($event)" } }, ngImport: i0 });
11445
11642
  }
11446
11643
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHttpPrefixDirective, decorators: [{
11447
11644
  type: Directive,
@@ -11509,5 +11706,5 @@ function graphqlQuerySigner(key) {
11509
11706
  * Generated bundle index. Do not edit.
11510
11707
  */
11511
11708
 
11512
- export { AvatarService, InvalidWithValueStateMatcher$1 as InvalidWithValueStateMatcher, LOCAL_STORAGE, NATURAL_DROPDOWN_DATA, NATURAL_ICONS_CONFIG, NATURAL_PERSISTENCE_VALIDATOR, NATURAL_SEO_CONFIG, NaturalAbstractDetail, NaturalAbstractEditableList, NaturalAbstractList, NaturalAbstractModelService, NaturalAbstractNavigableList, NaturalAbstractPanel, NaturalAlertService, NaturalAvatarComponent, NaturalBackgroundDensityDirective, NaturalCapitalizePipe, NaturalColumnsPickerComponent, NaturalConfirmComponent, NaturalDataSource, NaturalDebounceService, NaturalDetailHeaderComponent, NaturalDialogTriggerComponent, NaturalDropdownRef, NaturalEllipsisPipe, NaturalEnumPipe, NaturalEnumService, NaturalErrorHandler, NaturalFileComponent, NaturalFileDropDirective, NaturalFileSelectDirective, NaturalFileService, NaturalFixedButtonComponent, NaturalFixedButtonDetailComponent, NaturalHierarchicSelectorComponent, NaturalHierarchicSelectorDialogComponent, NaturalHierarchicSelectorDialogService, NaturalHierarchicSelectorService, NaturalHttpPrefixDirective, NaturalIconDirective, NaturalLinkMutationService, NaturalLinkableTabDirective, NaturalLoggerConfigExtra, NaturalLoggerConfigUrl, NaturalMatomoService, NaturalMemoryStorage, NaturalPanelsComponent, NaturalPanelsService, NaturalPersistenceService, NaturalQueryVariablesManager, NaturalRelationsComponent, NaturalSearchComponent, NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent, NaturalSeoService, NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent, NaturalSidenavService, NaturalSidenavStackService, NaturalSrcDensityDirective, NaturalStampComponent, NaturalSwissParsingDateAdapter, NaturalTableButtonComponent, NaturalTimeAgoPipe, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeBooleanComponent, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeOptionsComponent, TypeSelectComponent, TypeTextComponent, available, cancellableTimeout, collectErrors, copyToClipboard, createHttpLink, debug, decimal, deepFreeze, deliverableEmail, ensureHttpPrefix, fallbackIfNoOpenedPanels, formatIsoDate, formatIsoDateTime, fromUrl, getForegroundColor, graphqlQuerySigner, ifValid, integer, localStorageFactory, localStorageProvider, makePlural, memoryLocalStorageProvider, memorySessionStorageProvider, mergeOverrideArray, money, naturalPanelsUrlMatcher, naturalProviders, possibleComparableOperators, provideErrorHandler, provideIcons, providePanels, provideSeo, relationsToIds, replaceObjectKeepingReference, replaceOperatorByField, replaceOperatorByName, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, validateColumns, validatePagination, validateSorting, wrapLike, wrapPrefix, wrapSuffix };
11709
+ export { AvatarService, InvalidWithValueStateMatcher$1 as InvalidWithValueStateMatcher, LOCAL_STORAGE, NATURAL_DROPDOWN_DATA, NATURAL_ICONS_CONFIG, NATURAL_PERSISTENCE_VALIDATOR, NATURAL_SEO_CONFIG, NaturalAbstractDetail, NaturalAbstractEditableList, NaturalAbstractList, NaturalAbstractModelService, NaturalAbstractNavigableList, NaturalAbstractPanel, NaturalAlertService, NaturalAvatarComponent, NaturalBackgroundDensityDirective, NaturalCapitalizePipe, NaturalColumnsPickerComponent, NaturalConfirmComponent, NaturalDataSource, NaturalDebounceService, NaturalDetailHeaderComponent, NaturalDialogTriggerComponent, NaturalDropdownRef, NaturalEllipsisPipe, NaturalEnumPipe, NaturalEnumService, NaturalErrorHandler, NaturalFileComponent, NaturalFileDropDirective, NaturalFileSelectDirective, NaturalFileService, NaturalFixedButtonComponent, NaturalFixedButtonDetailComponent, NaturalHierarchicSelectorComponent, NaturalHierarchicSelectorDialogComponent, NaturalHierarchicSelectorDialogService, NaturalHierarchicSelectorService, NaturalHttpPrefixDirective, NaturalIconDirective, NaturalLinkMutationService, NaturalLinkableTabDirective, NaturalLoggerConfigExtra, NaturalLoggerConfigUrl, NaturalMatomoService, NaturalMemoryStorage, NaturalPanelsComponent, NaturalPanelsService, NaturalPersistenceService, NaturalQueryVariablesManager, NaturalRelationsComponent, NaturalSearchComponent, NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent, NaturalSeoService, NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent, NaturalSidenavService, NaturalSidenavStackService, NaturalSrcDensityDirective, NaturalStampComponent, NaturalSwissParsingDateAdapter, NaturalTableButtonComponent, NaturalTimeAgoPipe, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeBooleanComponent, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeOptionsComponent, TypeSelectComponent, TypeTextComponent, available, cancellableTimeout, collectErrors, copyToClipboard, createHttpLink, debug, decimal, deepFreeze, deliverableEmail, ensureHttpPrefix, fallbackIfNoOpenedPanels, formatIsoDate, formatIsoDateTime, fromUrl, getForegroundColor, graphqlQuerySigner, ifValid, integer, localStorageFactory, localStorageProvider, makePlural, memoryLocalStorageProvider, memorySessionStorageProvider, mergeOverrideArray, money, naturalPanelsUrlMatcher, naturalProviders, possibleComparableOperators, provideErrorHandler, provideIcons, providePanels, provideSeo, relationsToIds, replaceObjectKeepingReference, replaceOperatorByField, replaceOperatorByName, rgbToHex, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, validateColumns, validatePagination, validateSorting, wrapLike, wrapPrefix, wrapSuffix };
11513
11710
  //# sourceMappingURL=ecodev-natural.mjs.map