@ecodev/natural 61.0.1 → 61.0.2

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 (82) 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/directives/http-prefix.directive.mjs +4 -6
  9. package/esm2022/lib/modules/alert/alert.service.mjs +5 -7
  10. package/esm2022/lib/modules/alert/confirm.component.mjs +4 -6
  11. package/esm2022/lib/modules/avatar/component/avatar.component.mjs +21 -19
  12. package/esm2022/lib/modules/avatar/service/avatar.service.mjs +22 -24
  13. package/esm2022/lib/modules/avatar/sources/source.mjs +2 -1
  14. package/esm2022/lib/modules/columns-picker/columns-picker.component.mjs +17 -18
  15. package/esm2022/lib/modules/common/directives/background-density.directive.mjs +4 -6
  16. package/esm2022/lib/modules/common/directives/linkable-tab.directive.mjs +12 -12
  17. package/esm2022/lib/modules/common/directives/src-density.directive.mjs +4 -6
  18. package/esm2022/lib/modules/common/pipes/capitalize.pipe.mjs +3 -3
  19. package/esm2022/lib/modules/common/pipes/ellipsis.pipe.mjs +3 -3
  20. package/esm2022/lib/modules/common/pipes/enum.pipe.mjs +4 -6
  21. package/esm2022/lib/modules/common/pipes/time-ago.pipe.mjs +4 -3
  22. package/esm2022/lib/modules/common/services/memory-storage.mjs +4 -6
  23. package/esm2022/lib/modules/common/services/seo.service.mjs +12 -11
  24. package/esm2022/lib/modules/detail-header/detail-header.component.mjs +38 -33
  25. package/esm2022/lib/modules/dialog-trigger/dialog-trigger.component.mjs +8 -6
  26. package/esm2022/lib/modules/dropdown-components/abstract-association-select-component.directive.mjs +13 -12
  27. package/esm2022/lib/modules/dropdown-components/type-boolean/type-boolean.component.mjs +3 -3
  28. package/esm2022/lib/modules/dropdown-components/type-date/type-date.component.mjs +20 -19
  29. package/esm2022/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +18 -17
  30. package/esm2022/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +3 -3
  31. package/esm2022/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.mjs +3 -3
  32. package/esm2022/lib/modules/dropdown-components/type-number/type-number.component.mjs +19 -18
  33. package/esm2022/lib/modules/dropdown-components/type-options/type-options.component.mjs +11 -9
  34. package/esm2022/lib/modules/dropdown-components/type-select/type-select.component.mjs +21 -19
  35. package/esm2022/lib/modules/dropdown-components/type-text/type-text.component.mjs +7 -7
  36. package/esm2022/lib/modules/file/abstract-file.mjs +51 -47
  37. package/esm2022/lib/modules/file/component/file.component.mjs +44 -31
  38. package/esm2022/lib/modules/file/file-drop.directive.mjs +10 -13
  39. package/esm2022/lib/modules/file/file-select.directive.mjs +9 -12
  40. package/esm2022/lib/modules/file/file.service.mjs +13 -15
  41. package/esm2022/lib/modules/fixed-button/fixed-button.component.mjs +7 -8
  42. package/esm2022/lib/modules/fixed-button-detail/fixed-button-detail.component.mjs +9 -7
  43. package/esm2022/lib/modules/hierarchic-selector/classes/flat-node.mjs +8 -2
  44. package/esm2022/lib/modules/hierarchic-selector/classes/model-node.mjs +4 -2
  45. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.mjs +63 -46
  46. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +16 -18
  47. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.mjs +12 -4
  48. package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.mjs +4 -6
  49. package/esm2022/lib/modules/icon/icon.directive.mjs +9 -9
  50. package/esm2022/lib/modules/logger/error-handler.mjs +7 -7
  51. package/esm2022/lib/modules/matomo/matomo.service.mjs +10 -9
  52. package/esm2022/lib/modules/panels/abstract-panel.mjs +23 -19
  53. package/esm2022/lib/modules/panels/panels.component.mjs +4 -4
  54. package/esm2022/lib/modules/panels/panels.service.mjs +49 -41
  55. package/esm2022/lib/modules/relations/relations.component.mjs +64 -35
  56. package/esm2022/lib/modules/search/dropdown-container/dropdown-container.component.mjs +15 -13
  57. package/esm2022/lib/modules/search/dropdown-container/dropdown-ref.mjs +4 -2
  58. package/esm2022/lib/modules/search/dropdown-container/dropdown.service.mjs +5 -7
  59. package/esm2022/lib/modules/search/facet-selector/facet-selector.component.mjs +9 -11
  60. package/esm2022/lib/modules/search/group/group.component.mjs +12 -11
  61. package/esm2022/lib/modules/search/input/input.component.mjs +77 -63
  62. package/esm2022/lib/modules/search/search/search.component.mjs +29 -31
  63. package/esm2022/lib/modules/select/abstract-select.component.mjs +66 -39
  64. package/esm2022/lib/modules/select/select/select.component.mjs +51 -48
  65. package/esm2022/lib/modules/select/select-enum/select-enum.component.mjs +21 -8
  66. package/esm2022/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +27 -19
  67. package/esm2022/lib/modules/sidenav/sidenav/sidenav.component.mjs +3 -3
  68. package/esm2022/lib/modules/sidenav/sidenav-container/sidenav-container.component.mjs +30 -24
  69. package/esm2022/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +3 -3
  70. package/esm2022/lib/modules/sidenav/sidenav-stack.service.mjs +13 -15
  71. package/esm2022/lib/modules/sidenav/sidenav.service.mjs +42 -44
  72. package/esm2022/lib/modules/stamp/stamp.component.mjs +4 -3
  73. package/esm2022/lib/modules/table-button/table-button.component.mjs +16 -13
  74. package/esm2022/lib/services/abstract-model.service.mjs +17 -7
  75. package/esm2022/lib/services/debounce.service.mjs +7 -9
  76. package/esm2022/lib/services/enum.service.mjs +4 -6
  77. package/esm2022/lib/services/link-mutation.service.mjs +8 -6
  78. package/esm2022/lib/services/persistence.service.mjs +6 -8
  79. package/esm2022/lib/services/swiss-parsing-date-adapter.service.mjs +3 -3
  80. package/fesm2022/ecodev-natural.mjs +1234 -1051
  81. package/fesm2022/ecodev-natural.mjs.map +1 -1
  82. 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,
@@ -496,9 +496,9 @@ function mergeConcatArray(destValue, source) {
496
496
  * ```
497
497
  */
498
498
  class NaturalQueryVariablesManager {
499
+ variables = new BehaviorSubject(undefined);
500
+ channels = new Map();
499
501
  constructor(queryVariablesManager) {
500
- this.variables = new BehaviorSubject(undefined);
501
- this.channels = new Map();
502
502
  if (queryVariablesManager) {
503
503
  this.channels = queryVariablesManager.getChannelsCopy();
504
504
  this.updateVariables();
@@ -2267,10 +2267,8 @@ function money(control) {
2267
2267
  * Cumulate all changes made to an object over time
2268
2268
  */
2269
2269
  class CumulativeChanges {
2270
- constructor() {
2271
- this.original = {};
2272
- this.diff = {};
2273
- }
2270
+ original = {};
2271
+ diff = {};
2274
2272
  /**
2275
2273
  * Initialize the original values, should be called exactly one time per instance
2276
2274
  */
@@ -2322,43 +2320,46 @@ function isNaturalDialogTriggerProvidedData(dialogData) {
2322
2320
  }
2323
2321
  // @dynamic
2324
2322
  class NaturalAbstractDetail extends NaturalAbstractPanel {
2323
+ key;
2324
+ service;
2325
+ /**
2326
+ * Data retrieved by the server via route resolvers.
2327
+ *
2328
+ * The key `model` is special. It is readonly and represents the model being updated
2329
+ * as it exists on server. The value is kept up to date when Apollo mutates it on server.
2330
+ *
2331
+ * The only time when `model` is not readonly is during creation. Only then can we modify the model values directly.
2332
+ *
2333
+ * Other keys, if present, are whatever is returned from route resolvers as-is.
2334
+ */
2335
+ data;
2336
+ /**
2337
+ * Form that manages the data from the controller
2338
+ */
2339
+ form = new UntypedFormGroup({});
2340
+ /**
2341
+ * Show / hides the bottom fab button (mostly to hide it when we are on other tabs where semantic of button can conflict with ...
2342
+ * semantic of data on other tab, like relations that list other objects)
2343
+ */
2344
+ showFabButton = true;
2345
+ alertService = inject(NaturalAlertService);
2346
+ router = inject(Router);
2347
+ route = inject(ActivatedRoute);
2348
+ _dialogData = inject(MAT_DIALOG_DATA, { optional: true });
2349
+ /**
2350
+ * Once set, this must not change anymore, especially not right after the creation mutation,
2351
+ * so the form does not switch from creation mode to update mode without an actual reload of
2352
+ * model from DB (by navigating to update page).
2353
+ */
2354
+ _isUpdatePage = false;
2355
+ changes = new CumulativeChanges();
2325
2356
  constructor(key, service) {
2326
2357
  super();
2327
2358
  this.key = key;
2328
2359
  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
2360
  this.data = {
2340
2361
  model: this.service.getDefaultForServer(),
2341
2362
  };
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
2363
  }
2363
2364
  /**
2364
2365
  * You probably should not override this method. Instead, consider overriding `initForm()`.
@@ -2519,8 +2520,8 @@ class NaturalAbstractDetail extends NaturalAbstractPanel {
2519
2520
  this.form = this.service.getFormGroup(this.data.model);
2520
2521
  this.changes.initialize(this.form.getRawValue());
2521
2522
  }
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 }); }
2523
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractDetail, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
2524
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractDetail, isStandalone: true, usesInheritance: true, ngImport: i0 });
2524
2525
  }
2525
2526
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractDetail, decorators: [{
2526
2527
  type: Directive,
@@ -2548,11 +2549,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
2548
2549
  * @dynamic
2549
2550
  */
2550
2551
  class NaturalAbstractEditableList {
2552
+ service;
2553
+ form;
2554
+ formArray = new UntypedFormArray([]);
2555
+ variablesManager = new NaturalQueryVariablesManager();
2556
+ dataSource = new MatTableDataSource();
2551
2557
  constructor(service) {
2552
2558
  this.service = service;
2553
- this.formArray = new UntypedFormArray([]);
2554
- this.variablesManager = new NaturalQueryVariablesManager();
2555
- this.dataSource = new MatTableDataSource();
2556
2559
  // Create a form group with a line attributes that contain an array of formGroups (one by line = one by model)
2557
2560
  this.form = new UntypedFormGroup({ rows: this.formArray });
2558
2561
  this.dataSource.data = this.formArray.controls;
@@ -2609,8 +2612,8 @@ class NaturalAbstractEditableList {
2609
2612
  validateForm() {
2610
2613
  validateAllFormControls(this.form);
2611
2614
  }
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 }); }
2615
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractEditableList, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
2616
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractEditableList, isStandalone: true, ngImport: i0 });
2614
2617
  }
2615
2618
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractEditableList, decorators: [{
2616
2619
  type: Directive,
@@ -2831,18 +2834,20 @@ function throwMatDialogContentAlreadyAttachedError() {
2831
2834
  }
2832
2835
  const NATURAL_DROPDOWN_CONTAINER_DATA = new InjectionToken('NaturalDropdownContainerData');
2833
2836
  class NaturalDropdownContainerComponent extends BasePortalOutlet {
2837
+ elementRef = inject(ElementRef);
2838
+ focusTrapFactory = inject(ConfigurableFocusTrapFactory);
2839
+ data = inject(NATURAL_DROPDOWN_CONTAINER_DATA);
2840
+ portalOutlet;
2841
+ templateRef;
2842
+ closed = new Subject();
2843
+ /** Current state of the panel animation. */
2844
+ panelAnimationState = 'void';
2845
+ /** Emits whenever an animation on the menu completes. */
2846
+ animationDone = new Subject();
2847
+ focusTrap = null;
2848
+ elementFocusedBeforeDialogWasOpened = null;
2834
2849
  constructor() {
2835
2850
  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
2851
  }
2847
2852
  ngOnDestroy() {
2848
2853
  this.closed.complete();
@@ -2888,8 +2893,8 @@ class NaturalDropdownContainerComponent extends BasePortalOutlet {
2888
2893
  this.focusTrap.destroy();
2889
2894
  }
2890
2895
  }
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 }); }
2896
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2897
+ 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
2898
  }
2894
2899
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownContainerComponent, decorators: [{
2895
2900
  type: Component,
@@ -2903,9 +2908,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
2903
2908
  }] } });
2904
2909
 
2905
2910
  class NaturalDropdownRef {
2911
+ dropdownContainer;
2912
+ componentInstance;
2913
+ closed = new Subject();
2906
2914
  constructor(dropdownContainer, component, customProviders, parentInjector, containerRef) {
2907
2915
  this.dropdownContainer = dropdownContainer;
2908
- this.closed = new Subject();
2909
2916
  // Customize injector to allow data and dropdown reference injection in component
2910
2917
  customProviders.push({ provide: NaturalDropdownRef, useValue: this });
2911
2918
  const customInjector = Injector.create({ providers: customProviders, parent: parentInjector });
@@ -2923,10 +2930,8 @@ class NaturalDropdownRef {
2923
2930
 
2924
2931
  const NATURAL_DROPDOWN_DATA = new InjectionToken('NaturalDropdownData');
2925
2932
  class NaturalDropdownService {
2926
- constructor() {
2927
- this.overlay = inject(Overlay);
2928
- this.injector = inject(Injector);
2929
- }
2933
+ overlay = inject(Overlay);
2934
+ injector = inject(Injector);
2930
2935
  open(component, connectedElement, customProviders, showValidateButton) {
2931
2936
  // Container data
2932
2937
  const containerData = {
@@ -2996,8 +3001,8 @@ class NaturalDropdownService {
2996
3001
  },
2997
3002
  ]);
2998
3003
  }
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' }); }
3004
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3005
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownService, providedIn: 'root' });
3001
3006
  }
3002
3007
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDropdownService, decorators: [{
3003
3008
  type: Injectable,
@@ -3083,23 +3088,24 @@ function dateMax(dateAdapter, max) {
3083
3088
  }
3084
3089
 
3085
3090
  class TypeDateComponent {
3091
+ dateAdapter = inject(DateAdapter);
3092
+ dateFormats = inject(MAT_DATE_FORMATS);
3093
+ renderedValue = new BehaviorSubject('');
3094
+ configuration;
3095
+ operatorCtrl = new FormControl('equal', { nonNullable: true });
3096
+ valueCtrl = new FormControl(null);
3097
+ todayCtrl = new FormControl(false);
3098
+ operators = possibleComparableOperators;
3099
+ form = new FormGroup({
3100
+ operator: this.operatorCtrl,
3101
+ value: this.valueCtrl,
3102
+ today: this.todayCtrl,
3103
+ });
3104
+ defaults = {
3105
+ min: null,
3106
+ max: null,
3107
+ };
3086
3108
  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
3109
  const data = inject(NATURAL_DROPDOWN_DATA);
3104
3110
  this.configuration = { ...this.defaults, ...data.configuration };
3105
3111
  this.todayCtrl.valueChanges.pipe(takeUntilDestroyed()).subscribe(isToday => {
@@ -3216,8 +3222,8 @@ class TypeDateComponent {
3216
3222
  return '';
3217
3223
  }
3218
3224
  }
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"] }] }); }
3225
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3226
+ 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
3227
  }
3222
3228
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeDateComponent, decorators: [{
3223
3229
  type: Component,
@@ -3400,9 +3406,7 @@ const LOCAL_STORAGE = new InjectionToken('Local storage that can be shimed when
3400
3406
  * Should be used to shim sessionStorage when running on server or in our tests
3401
3407
  */
3402
3408
  class NaturalMemoryStorage {
3403
- constructor() {
3404
- this.data = new Map();
3405
- }
3409
+ data = new Map();
3406
3410
  get length() {
3407
3411
  return this.data.size;
3408
3412
  }
@@ -3428,8 +3432,8 @@ class NaturalMemoryStorage {
3428
3432
  setItem(key, value) {
3429
3433
  this.data.set(key, value);
3430
3434
  }
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' }); }
3435
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMemoryStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3436
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMemoryStorage, providedIn: 'root' });
3433
3437
  }
3434
3438
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMemoryStorage, decorators: [{
3435
3439
  type: Injectable,
@@ -3504,11 +3508,9 @@ const memoryLocalStorageProvider = {
3504
3508
 
3505
3509
  const NATURAL_PERSISTENCE_VALIDATOR = new InjectionToken('Validator for persisted value retrieved from NaturalPersistenceService. If returns false, the persisted value will never be returned.');
3506
3510
  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
- }
3511
+ router = inject(Router);
3512
+ sessionStorage = inject(SESSION_STORAGE);
3513
+ isValid = inject(NATURAL_PERSISTENCE_VALIDATOR, { optional: true }) ?? (() => true); // By default, anything is valid
3512
3514
  /**
3513
3515
  * Persist in url and local storage the given value with the given key.
3514
3516
  * When stored in storage, we need more "key" to identify the controller.
@@ -3604,8 +3606,8 @@ class NaturalPersistenceService {
3604
3606
  }
3605
3607
  return this.isValid(key, storageKey, result) ? result : null;
3606
3608
  }
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' }); }
3609
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPersistenceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3610
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPersistenceService, providedIn: 'root' });
3609
3611
  }
3610
3612
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPersistenceService, decorators: [{
3611
3613
  type: Injectable,
@@ -3621,9 +3623,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
3621
3623
  * It also allow some extra data manipulation
3622
3624
  */
3623
3625
  class NaturalDataSource extends DataSource {
3626
+ ngUnsubscribe = new Subject();
3627
+ internalData;
3624
3628
  constructor(value) {
3625
3629
  super();
3626
- this.ngUnsubscribe = new Subject();
3627
3630
  if (value instanceof Observable) {
3628
3631
  this.internalData = new BehaviorSubject(null);
3629
3632
  value.pipe(takeUntil(this.ngUnsubscribe)).subscribe(res => (this.data = res));
@@ -3701,61 +3704,80 @@ function unwrapNavigable(item) {
3701
3704
  */
3702
3705
  // @dynamic
3703
3706
  class NaturalAbstractList extends NaturalAbstractPanel {
3707
+ service;
3708
+ /**
3709
+ * Whether search should be loaded from url/storage and persisted in it too.
3710
+ */
3711
+ persistSearch = true;
3712
+ /**
3713
+ * List of columns that are available to the end-user to select from, via `<natural-columns-picker>`
3714
+ */
3715
+ availableColumns = [];
3716
+ /**
3717
+ * Columns list after interaction with `<natural-columns-picker>`
3718
+ */
3719
+ columnsForTable = [];
3720
+ /**
3721
+ * The default column selection that automatically happened after `<natural-columns-picker>` initialization
3722
+ */
3723
+ defaultSelectedColumns = null;
3724
+ /**
3725
+ * Visible (checked) columns
3726
+ *
3727
+ * Instead of using this, you should consider correctly configuring `AvailableColumn.checked`.
3728
+ */
3729
+ selectedColumns;
3730
+ /**
3731
+ * Source of the list
3732
+ */
3733
+ dataSource;
3734
+ /**
3735
+ * Selection for bulk actions
3736
+ */
3737
+ selection = new SelectionModel(true, []);
3738
+ /**
3739
+ * Next executed action from bulk menu
3740
+ */
3741
+ bulkActionSelected = null;
3742
+ /**
3743
+ * Centralisation of query variables
3744
+ */
3745
+ variablesManager = new NaturalQueryVariablesManager();
3746
+ /**
3747
+ * Configuration for natural-search facets
3748
+ */
3749
+ naturalSearchFacets = [];
3750
+ /**
3751
+ * Result of a search (can be provided as input for initialisation)
3752
+ */
3753
+ naturalSearchSelections = [[]];
3754
+ /**
3755
+ * Data attribute provided by activated route snapshot
3756
+ */
3757
+ routeData;
3758
+ /**
3759
+ * List of page sizes
3760
+ */
3761
+ pageSizeOptions = [5, 25, 50, 100, 200];
3762
+ /**
3763
+ * Initial pagination setup
3764
+ */
3765
+ defaultPagination = {
3766
+ offset: null,
3767
+ pageIndex: 0,
3768
+ pageSize: 25,
3769
+ };
3770
+ /**
3771
+ * Initial sorting
3772
+ */
3773
+ defaultSorting;
3774
+ router = inject(Router);
3775
+ route = inject(ActivatedRoute);
3776
+ alertService = inject(NaturalAlertService);
3777
+ persistenceService = inject(NaturalPersistenceService);
3704
3778
  constructor(service) {
3705
3779
  super();
3706
3780
  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
3781
  }
3760
3782
  /**
3761
3783
  * Variables that are always forced on a list, in addition to whatever the end-user might select
@@ -4089,8 +4111,8 @@ class NaturalAbstractList extends NaturalAbstractPanel {
4089
4111
  this.persistenceService.persist('col', value, this.route, this.getStorageKey());
4090
4112
  }
4091
4113
  }
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 }); }
4114
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractList, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
4115
+ 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
4116
  }
4095
4117
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractList, decorators: [{
4096
4118
  type: Directive,
@@ -4112,14 +4134,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
4112
4134
  * @dynamic
4113
4135
  */
4114
4136
  class NaturalAbstractNavigableList extends NaturalAbstractList {
4137
+ /**
4138
+ * Name of filter for child items to access ancestor item
4139
+ */
4140
+ ancestorRelationName = 'parent';
4141
+ oldAncertorId = null;
4142
+ breadcrumbs = [];
4115
4143
  constructor(service) {
4116
4144
  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
4145
  }
4124
4146
  ngOnInit() {
4125
4147
  // In fact, "na" and "ns" key may exist at the same time in url (but shouldn't).
@@ -4221,8 +4243,8 @@ class NaturalAbstractNavigableList extends NaturalAbstractList {
4221
4243
  }
4222
4244
  return [item];
4223
4245
  }
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 }); }
4246
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractNavigableList, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
4247
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalAbstractNavigableList, isStandalone: true, inputs: { ancestorRelationName: "ancestorRelationName" }, usesInheritance: true, ngImport: i0 });
4226
4248
  }
4227
4249
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractNavigableList, decorators: [{
4228
4250
  type: Directive,
@@ -4339,12 +4361,10 @@ function debug(debugName) {
4339
4361
  * `id` must be the ID of the object that will be updated.
4340
4362
  */
4341
4363
  class NaturalDebounceService {
4342
- constructor() {
4343
- /**
4344
- * Stores the debounced update function
4345
- */
4346
- this.allDebouncedUpdateCache = new Map();
4347
- }
4364
+ /**
4365
+ * Stores the debounced update function
4366
+ */
4367
+ allDebouncedUpdateCache = new Map();
4348
4368
  /**
4349
4369
  * Debounce the `modelService.updateNow()` mutation for a short time. If called multiple times with the same
4350
4370
  * modelService and id, it will postpone the subscription to the mutation.
@@ -4469,8 +4489,8 @@ class NaturalDebounceService {
4469
4489
  this.allDebouncedUpdateCache.delete(modelService);
4470
4490
  }
4471
4491
  }
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' }); }
4492
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDebounceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4493
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDebounceService, providedIn: 'root' });
4474
4494
  }
4475
4495
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDebounceService, decorators: [{
4476
4496
  type: Injectable,
@@ -4480,6 +4500,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
4480
4500
  }] });
4481
4501
 
4482
4502
  class NaturalAbstractModelService {
4503
+ name;
4504
+ oneQuery;
4505
+ allQuery;
4506
+ createMutation;
4507
+ updateMutation;
4508
+ deleteMutation;
4509
+ createName;
4510
+ updateName;
4511
+ deleteName;
4512
+ /**
4513
+ * Store the creation mutations that are pending
4514
+ */
4515
+ creatingCache = new Map();
4516
+ apollo = inject(Apollo);
4517
+ naturalDebounceService = inject(NaturalDebounceService);
4518
+ plural;
4483
4519
  /**
4484
4520
  *
4485
4521
  * @param name service and single object query name (eg. userForFront or user).
@@ -4503,12 +4539,6 @@ class NaturalAbstractModelService {
4503
4539
  this.createName = createName;
4504
4540
  this.updateName = updateName;
4505
4541
  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
4542
  this.plural = plural ?? makePlural(this.name);
4513
4543
  }
4514
4544
  /**
@@ -4996,9 +5026,7 @@ const enumTypeQuery = gql `
4996
5026
  }
4997
5027
  `;
4998
5028
  class NaturalEnumService {
4999
- constructor() {
5000
- this.apollo = inject(Apollo);
5001
- }
5029
+ apollo = inject(Apollo);
5002
5030
  /**
5003
5031
  * Return a list of observable enumerables considering the given name
5004
5032
  */
@@ -5036,8 +5064,8 @@ class NaturalEnumService {
5036
5064
  return '';
5037
5065
  }));
5038
5066
  }
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' }); }
5067
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5068
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumService, providedIn: 'root' });
5041
5069
  }
5042
5070
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumService, decorators: [{
5043
5071
  type: Injectable,
@@ -5067,9 +5095,11 @@ const queriesQuery = gql `
5067
5095
  }
5068
5096
  `;
5069
5097
  class NaturalLinkMutationService {
5070
- constructor() {
5071
- this.apollo = inject(Apollo);
5072
- }
5098
+ apollo = inject(Apollo);
5099
+ /**
5100
+ * Receives the list of available mutations
5101
+ */
5102
+ allMutations;
5073
5103
  /**
5074
5104
  * Link two objects together
5075
5105
  */
@@ -5181,8 +5211,8 @@ class NaturalLinkMutationService {
5181
5211
  }
5182
5212
  }`;
5183
5213
  }
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' }); }
5214
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkMutationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5215
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkMutationService, providedIn: 'root' });
5186
5216
  }
5187
5217
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkMutationService, decorators: [{
5188
5218
  type: Injectable,
@@ -5241,8 +5271,8 @@ class NaturalSwissParsingDateAdapter extends NativeDateAdapter {
5241
5271
  // Also see https://github.com/tc39/ecma402/issues/6
5242
5272
  return 1;
5243
5273
  }
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' }); }
5274
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSwissParsingDateAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5275
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSwissParsingDateAdapter, providedIn: 'root' });
5246
5276
  }
5247
5277
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSwissParsingDateAdapter, decorators: [{
5248
5278
  type: Injectable,
@@ -5274,13 +5304,13 @@ const naturalRegistered = Symbol('Natural icon registered');
5274
5304
  * ```
5275
5305
  */
5276
5306
  class NaturalIconDirective {
5307
+ matIconRegistry = inject(MatIconRegistry);
5308
+ domSanitizer = inject(DomSanitizer);
5309
+ config = inject(NATURAL_ICONS_CONFIG, { optional: true });
5310
+ matIconComponent = inject(MatIcon, { host: true, self: true });
5311
+ _size = undefined;
5312
+ classes = '';
5277
5313
  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
5314
  const config = this.config;
5285
5315
  this.registerIcons(config ?? {});
5286
5316
  }
@@ -5319,8 +5349,8 @@ class NaturalIconDirective {
5319
5349
  }
5320
5350
  }
5321
5351
  }
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 }); }
5352
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5353
+ 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
5354
  }
5325
5355
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalIconDirective, decorators: [{
5326
5356
  type: Directive,
@@ -5348,21 +5378,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
5348
5378
  }] } });
5349
5379
 
5350
5380
  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
- }
5381
+ destroyRef = inject(DestroyRef);
5382
+ breakpointObserver = inject(BreakpointObserver);
5383
+ _selections;
5384
+ _availableColumns = [];
5385
+ buttons = [];
5366
5386
  /**
5367
5387
  * Set all the columns that are available.
5368
5388
  */
@@ -5393,6 +5413,15 @@ class NaturalColumnsPickerComponent {
5393
5413
  col.checked = columns.includes(col.id);
5394
5414
  });
5395
5415
  }
5416
+ /**
5417
+ * Emit a list of valid and selected column keys whenever the selection changes
5418
+ */
5419
+ selectionChange = new EventEmitter();
5420
+ /**
5421
+ * Displayed options in the dropdown menu
5422
+ */
5423
+ displayedColumns = [];
5424
+ isMobile = this.breakpointObserver.observe(Breakpoints.XSmall).pipe(map$1(result => result.matches));
5396
5425
  initColumns() {
5397
5426
  this._availableColumns?.forEach(col => {
5398
5427
  col.checked = this._selections?.length ? this._selections.includes(col.id) : col.checked;
@@ -5434,8 +5463,8 @@ class NaturalColumnsPickerComponent {
5434
5463
  const visibleButtons = this.buttons?.reduce((sum, button) => (this.defaultTrue(button.show) ? 1 : 0), 0) ?? 0;
5435
5464
  return visibleButtons > 0;
5436
5465
  }
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"] }] }); }
5466
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalColumnsPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5467
+ 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
5468
  }
5440
5469
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalColumnsPickerComponent, decorators: [{
5441
5470
  type: Component,
@@ -5481,16 +5510,16 @@ function getTabId(tab) {
5481
5510
  * ```
5482
5511
  */
5483
5512
  class NaturalLinkableTabDirective {
5513
+ destroyRef = inject(DestroyRef);
5514
+ component = inject(MatTabGroup);
5515
+ route = inject(ActivatedRoute);
5516
+ router = inject(Router);
5517
+ /**
5518
+ * If false, disables the persistent navigation
5519
+ */
5520
+ naturalLinkableTab = true;
5521
+ isLoadingRouteConfig = false;
5484
5522
  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
5523
  this.router.events.pipe(takeUntilDestroyed()).subscribe(event => {
5495
5524
  if (event instanceof RouteConfigLoadStart) {
5496
5525
  this.isLoadingRouteConfig = true;
@@ -5537,8 +5566,8 @@ class NaturalLinkableTabDirective {
5537
5566
  getTabIndex(fragment) {
5538
5567
  return this.component._tabs.toArray().findIndex(tab => fragment === getTabId(tab));
5539
5568
  }
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 }); }
5569
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkableTabDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5570
+ 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
5571
  }
5543
5572
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalLinkableTabDirective, decorators: [{
5544
5573
  type: Directive,
@@ -5560,8 +5589,8 @@ class NaturalCapitalizePipe {
5560
5589
  }
5561
5590
  return value;
5562
5591
  }
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" }); }
5592
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5593
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalCapitalizePipe, isStandalone: true, name: "capitalize" });
5565
5594
  }
5566
5595
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalCapitalizePipe, decorators: [{
5567
5596
  type: Pipe,
@@ -5575,8 +5604,8 @@ class NaturalEllipsisPipe {
5575
5604
  transform(value, limit) {
5576
5605
  return value.substr(0, limit - 1) + (value.length > limit ? '…' : '');
5577
5606
  }
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" }); }
5607
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEllipsisPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5608
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalEllipsisPipe, isStandalone: true, name: "ellipsis" });
5580
5609
  }
5581
5610
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEllipsisPipe, decorators: [{
5582
5611
  type: Pipe,
@@ -5592,14 +5621,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
5592
5621
  * Usage would be: {{ element.priority | enum: 'Priority' | async }}
5593
5622
  */
5594
5623
  class NaturalEnumPipe {
5595
- constructor() {
5596
- this.enumService = inject(NaturalEnumService);
5597
- }
5624
+ enumService = inject(NaturalEnumService);
5598
5625
  transform(value, enumName) {
5599
5626
  return this.enumService.getValueName(value, enumName);
5600
5627
  }
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" }); }
5628
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
5629
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumPipe, isStandalone: true, name: "enum" });
5603
5630
  }
5604
5631
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalEnumPipe, decorators: [{
5605
5632
  type: Pipe,
@@ -5622,6 +5649,7 @@ function isDate(value) {
5622
5649
  * - "dans 3 ans"
5623
5650
  */
5624
5651
  class NaturalTimeAgoPipe {
5652
+ fakedNow;
5625
5653
  constructor(fakedNow = null) {
5626
5654
  this.fakedNow = fakedNow;
5627
5655
  }
@@ -5730,8 +5758,8 @@ class NaturalTimeAgoPipe {
5730
5758
  throw new Error('Time travelling just happened');
5731
5759
  }
5732
5760
  }
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" }); }
5761
+ 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 });
5762
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.3", ngImport: i0, type: NaturalTimeAgoPipe, isStandalone: true, name: "timeAgo" });
5735
5763
  }
5736
5764
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalTimeAgoPipe, decorators: [{
5737
5765
  type: Pipe,
@@ -5769,9 +5797,7 @@ function densities(src, forImageSet) {
5769
5797
  return result;
5770
5798
  }
5771
5799
  class NaturalSrcDensityDirective {
5772
- constructor() {
5773
- this.elementRef = inject(ElementRef);
5774
- }
5800
+ elementRef = inject(ElementRef);
5775
5801
  /**
5776
5802
  * Automatically apply image selection based on screen density.
5777
5803
  *
@@ -5804,8 +5830,8 @@ class NaturalSrcDensityDirective {
5804
5830
  this.elementRef.nativeElement.src = src;
5805
5831
  this.elementRef.nativeElement.srcset = densities(src, false);
5806
5832
  }
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 }); }
5833
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSrcDensityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5834
+ 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
5835
  }
5810
5836
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSrcDensityDirective, decorators: [{
5811
5837
  type: Directive,
@@ -5819,9 +5845,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
5819
5845
  }] } });
5820
5846
 
5821
5847
  class NaturalBackgroundDensityDirective {
5822
- constructor() {
5823
- this.elementRef = inject(ElementRef);
5824
- }
5848
+ elementRef = inject(ElementRef);
5825
5849
  /**
5826
5850
  * Automatically apply background image selection based on screen density.
5827
5851
  *
@@ -5866,8 +5890,8 @@ class NaturalBackgroundDensityDirective {
5866
5890
  this.elementRef.nativeElement.style.backgroundImage = responsive;
5867
5891
  }
5868
5892
  }
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 }); }
5893
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalBackgroundDensityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5894
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: NaturalBackgroundDensityDirective, isStandalone: true, selector: "[naturalBackgroundDensity]", inputs: { naturalBackgroundDensity: "naturalBackgroundDensity" }, ngImport: i0 });
5871
5895
  }
5872
5896
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalBackgroundDensityDirective, decorators: [{
5873
5897
  type: Directive,
@@ -5881,10 +5905,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
5881
5905
  }] } });
5882
5906
 
5883
5907
  class NaturalDialogTriggerComponent {
5908
+ dialog = inject(MatDialog);
5909
+ route = inject(ActivatedRoute);
5910
+ router = inject(Router);
5911
+ dialogRef;
5912
+ triggerConfig;
5884
5913
  constructor() {
5885
- this.dialog = inject(MatDialog);
5886
- this.route = inject(ActivatedRoute);
5887
- this.router = inject(Router);
5888
5914
  // Data from activated route
5889
5915
  this.triggerConfig = this.route.snapshot.data.trigger;
5890
5916
  // Get data relative to dialog service configuration
@@ -5935,8 +5961,8 @@ class NaturalDialogTriggerComponent {
5935
5961
  this.router.navigate(['.'], { relativeTo: this.route.parent });
5936
5962
  }
5937
5963
  }
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 }); }
5964
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDialogTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5965
+ 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
5966
  }
5941
5967
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDialogTriggerComponent, decorators: [{
5942
5968
  type: Component,
@@ -5965,15 +5991,16 @@ function stripTags(str) {
5965
5991
  * configured for it in the routing.
5966
5992
  */
5967
5993
  class NaturalSeoService {
5994
+ router = inject(Router);
5995
+ titleService = inject(Title);
5996
+ metaTagService = inject(Meta);
5997
+ document = inject(DOCUMENT);
5998
+ locale = inject(LOCALE_ID);
5999
+ routeData;
6000
+ config = {
6001
+ applicationName: '',
6002
+ };
5968
6003
  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
6004
  const configToken = inject(NATURAL_SEO_CONFIG);
5978
6005
  combineLatest({
5979
6006
  config: configToken instanceof Observable ? configToken.pipe(startWith$1(this.config)) : of(configToken),
@@ -6162,8 +6189,8 @@ class NaturalSeoService {
6162
6189
  }
6163
6190
  return of(seo);
6164
6191
  }
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' }); }
6192
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSeoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6193
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSeoService, providedIn: 'root' });
6167
6194
  }
6168
6195
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSeoService, decorators: [{
6169
6196
  type: Injectable,
@@ -6198,36 +6225,41 @@ function provideSeo(config) {
6198
6225
  */
6199
6226
 
6200
6227
  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
- }
6228
+ /**
6229
+ * Base URL used to build links, defaults to '/'
6230
+ */
6231
+ currentBaseUrl;
6232
+ /**
6233
+ * Must be set to get proper links when used in panels
6234
+ */
6235
+ isPanel = false;
6236
+ /**
6237
+ * If given will show icon before title
6238
+ */
6239
+ icon = '';
6240
+ /**
6241
+ * Title shown if model has no name, or empty name.
6242
+ *
6243
+ * Typically should be the human name for the object type, eg: 'Product'
6244
+ */
6245
+ label = '';
6246
+ /**
6247
+ * Label of the root of the breadcrumb, defaults to the value of `label`.
6248
+ *
6249
+ * Typically should be the plural form of the object type, eg: 'Products'
6250
+ */
6251
+ rootLabel = '';
6252
+ /**
6253
+ * Title shown if model has no id.
6254
+ *
6255
+ * Typically should be similar to 'New product'.
6256
+ */
6257
+ newLabel = '';
6258
+ model;
6259
+ breadcrumbs = [];
6260
+ listRoute = [];
6261
+ listFragment;
6262
+ link;
6231
6263
  getRootLink() {
6232
6264
  return [this.currentBaseUrl || '/'].concat(this.listRoute);
6233
6265
  }
@@ -6237,8 +6269,8 @@ class NaturalDetailHeaderComponent {
6237
6269
  }
6238
6270
  return this.getRootLink().concat([id]);
6239
6271
  }
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"] }] }); }
6272
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDetailHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6273
+ 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
6274
  }
6243
6275
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalDetailHeaderComponent, decorators: [{
6244
6276
  type: Component,
@@ -6273,23 +6305,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
6273
6305
  */
6274
6306
 
6275
6307
  class TypeSelectComponent {
6308
+ destroyRef = inject(DestroyRef);
6309
+ renderedValue = new BehaviorSubject('');
6310
+ list;
6311
+ requireValueCtrl = false;
6312
+ operators = possibleDiscreteOperators;
6313
+ operatorCtrl = new FormControl('is', { nonNullable: true });
6314
+ valueCtrl = new FormControl();
6315
+ form = new FormGroup({
6316
+ operator: this.operatorCtrl,
6317
+ value: this.valueCtrl,
6318
+ });
6319
+ items = [];
6320
+ configuration;
6321
+ defaults = {
6322
+ items: [],
6323
+ multiple: true,
6324
+ operators: true,
6325
+ };
6276
6326
  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
6327
  const data = inject(NATURAL_DROPDOWN_DATA);
6294
6328
  this.configuration = { ...this.defaults, ...data.configuration };
6295
6329
  // Immediately initValidators and everytime the operator change later
@@ -6417,8 +6451,8 @@ class TypeSelectComponent {
6417
6451
  throw new Error('Unsupported operator key: ' + key);
6418
6452
  }
6419
6453
  }
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"] }] }); }
6454
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6455
+ 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
6456
  }
6423
6457
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeSelectComponent, decorators: [{
6424
6458
  type: Component,
@@ -6429,16 +6463,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
6429
6463
  }] } });
6430
6464
 
6431
6465
  class AbstractAssociationSelectComponent {
6466
+ configuration;
6467
+ renderedValue = new BehaviorSubject('');
6468
+ requireValueCtrl = false;
6469
+ operators = possibleDiscreteOperators;
6470
+ operatorCtrl = new FormControl('is', { nonNullable: true });
6471
+ valueCtrl = new FormControl();
6472
+ form = new FormGroup({
6473
+ operator: this.operatorCtrl,
6474
+ value: this.valueCtrl,
6475
+ });
6432
6476
  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
6477
  this.configuration = data.configuration;
6443
6478
  // Immediately initValidators and everytime the operator change later
6444
6479
  this.operatorCtrl.valueChanges.pipe(startWith(null)).subscribe(() => this.initValidators());
@@ -6509,8 +6544,8 @@ class AbstractAssociationSelectComponent {
6509
6544
  throw new Error('Unsupported operator key: ' + key);
6510
6545
  }
6511
6546
  }
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 }); }
6547
+ 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 });
6548
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.3", type: AbstractAssociationSelectComponent, isStandalone: true, ngImport: i0 });
6514
6549
  }
6515
6550
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractAssociationSelectComponent, decorators: [{
6516
6551
  type: Directive,
@@ -6527,6 +6562,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
6527
6562
  * custom FormControl class ("NaturalFormControl").
6528
6563
  */
6529
6564
  class ExternalFormControlMatcher extends ErrorStateMatcher {
6565
+ component;
6530
6566
  constructor(component) {
6531
6567
  super();
6532
6568
  this.component = component;
@@ -6540,6 +6576,12 @@ class ExternalFormControlMatcher extends ErrorStateMatcher {
6540
6576
  }
6541
6577
  }
6542
6578
  class AbstractSelect {
6579
+ ngControl;
6580
+ placeholder;
6581
+ /**
6582
+ * Mat-hint
6583
+ */
6584
+ hint = null;
6543
6585
  /**
6544
6586
  * If the field is required
6545
6587
  */
@@ -6550,44 +6592,64 @@ class AbstractSelect {
6550
6592
  get required() {
6551
6593
  return !!this._required;
6552
6594
  }
6595
+ _required;
6596
+ /**
6597
+ * Add a suffix button that is a link to given destination
6598
+ */
6599
+ navigateTo;
6600
+ /**
6601
+ * If provided cause a new clear button to appear
6602
+ */
6603
+ clearLabel;
6604
+ /**
6605
+ * Whether to show the search icon
6606
+ */
6607
+ showIcon = true;
6608
+ /**
6609
+ * Icon name
6610
+ */
6611
+ icon = 'search';
6612
+ /**
6613
+ * Function to customize the rendering of the selected item as text in input
6614
+ */
6615
+ displayWith;
6616
+ /**
6617
+ * Emit the selected value whenever it changes
6618
+ */
6619
+ selectionChange = new EventEmitter();
6620
+ /**
6621
+ * Emits when internal input is blurred
6622
+ */
6623
+ // eslint-disable-next-line @angular-eslint/no-output-native
6624
+ blur = new EventEmitter();
6625
+ /**
6626
+ * Contains internal representation for current selection AND searched text (for autocomplete)
6627
+ *
6628
+ * It is **not** necessarily `V | null`.
6629
+ *
6630
+ * - NaturalSelectComponent: `string | V | null`. We allow `string`
6631
+ * only when `optionRequired` is false, so most of the time it is `V | null`.
6632
+ * - NaturalSelectHierarchicComponent: `string | null`.
6633
+ * - NaturalSelectEnumComponent: `V | null`.
6634
+ *
6635
+ * In natural-select context, we use pristine and dirty to identify if the displayed value is search or committed model :
6636
+ * - Pristine status (unchanged value) means the model is displayed and propagated = the selection is committed
6637
+ * - Dirty status (changed value) means we are in search/autocomplete mode
6638
+ */
6639
+ internalCtrl = new FormControl(null);
6640
+ /**
6641
+ * Interface with ControlValueAccessor
6642
+ * Notifies parent model / form controller
6643
+ */
6644
+ onChange;
6645
+ /**
6646
+ * Interface with ControlValueAccessor
6647
+ * Notifies parent model / form controller
6648
+ */
6649
+ onTouched;
6650
+ matcher;
6553
6651
  constructor(ngControl) {
6554
6652
  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
6653
  if (this.ngControl) {
6592
6654
  this.ngControl.valueAccessor = this;
6593
6655
  }
@@ -6682,8 +6744,8 @@ class AbstractSelect {
6682
6744
  }
6683
6745
  this.internalCtrl.updateValueAndValidity();
6684
6746
  }
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 }); }
6747
+ 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 });
6748
+ 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
6749
  }
6688
6750
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractSelect, decorators: [{
6689
6751
  type: Directive,
@@ -6749,57 +6811,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
6749
6811
  * ```
6750
6812
  */
6751
6813
  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
- }
6814
+ destroyRef = inject(DestroyRef);
6815
+ autoTrigger;
6816
+ itemTemplate;
6817
+ /**
6818
+ * Service with watchAll function that accepts queryVariables.
6819
+ */
6820
+ service;
6821
+ /**
6822
+ * If false, allows to input free string without selecting an option from autocomplete suggestions
6823
+ */
6824
+ optionRequired = true;
6825
+ /**
6826
+ * The field on which to search for, default to 'custom'.
6827
+ */
6828
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
6829
+ searchField = 'custom';
6830
+ /**
6831
+ * The operator with which to search for, default to 'search' if `searchField` is 'custom', else 'like'.
6832
+ */
6833
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
6834
+ searchOperator = null;
6835
+ /**
6836
+ * Cache the committed value during search mode.
6837
+ * It's used to be restored in case we cancel the selection
6838
+ */
6839
+ lastValidValue = null;
6797
6840
  /**
6798
6841
  * Additional filter for query
6799
6842
  */
6800
6843
  set filter(filter) {
6801
6844
  this.variablesManager.set('additional-filter', { filter: filter });
6802
6845
  }
6846
+ /**
6847
+ * Items returned by server to show in listing
6848
+ */
6849
+ items = null;
6850
+ /**
6851
+ * Whether we are searching something
6852
+ */
6853
+ loading = false;
6854
+ /**
6855
+ * If some items are not shown in result list
6856
+ * Shows a message after list if true
6857
+ */
6858
+ hasMoreItems = false;
6859
+ nbTotal = 0;
6860
+ /**
6861
+ * Default page size
6862
+ */
6863
+ pageSize = 10;
6864
+ /**
6865
+ * Init search options
6866
+ */
6867
+ variablesManager = new NaturalQueryVariablesManager();
6803
6868
  /**
6804
6869
  * Whether the value can be changed
6805
6870
  */
@@ -6953,8 +7018,8 @@ class NaturalSelectComponent extends AbstractSelect {
6953
7018
  getVariablesForDebug() {
6954
7019
  return this.variablesManager.variables.value;
6955
7020
  }
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"] }] }); }
7021
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7022
+ 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
7023
  }
6959
7024
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectComponent, decorators: [{
6960
7025
  type: Component,
@@ -7014,8 +7079,8 @@ class TypeNaturalSelectComponent extends AbstractAssociationSelectComponent {
7014
7079
  const selectedName = selected?.fullName || selected?.name || '';
7015
7080
  return selectedName;
7016
7081
  }
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"] }] }); }
7082
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeNaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7083
+ 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
7084
  }
7020
7085
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeNaturalSelectComponent, decorators: [{
7021
7086
  type: Component,
@@ -7038,11 +7103,11 @@ let InvalidWithValueStateMatcher$1 = class InvalidWithValueStateMatcher {
7038
7103
  }
7039
7104
  };
7040
7105
  class TypeTextComponent {
7106
+ dropdownRef = inject(NaturalDropdownRef);
7107
+ renderedValue = new BehaviorSubject('');
7108
+ formCtrl = new FormControl('', { nonNullable: true });
7109
+ matcher = new InvalidWithValueStateMatcher$1();
7041
7110
  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
7111
  const data = inject(NATURAL_DROPDOWN_DATA);
7047
7112
  this.formCtrl.valueChanges.subscribe(value => {
7048
7113
  this.renderedValue.next(value === null ? '' : this.formCtrl.value + '');
@@ -7072,8 +7137,8 @@ class TypeTextComponent {
7072
7137
  this.dropdownRef.close(); // undefined value, discard changes / prevent to add a condition (on new fields
7073
7138
  }
7074
7139
  }
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"] }] }); }
7140
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7141
+ 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
7142
  }
7078
7143
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeTextComponent, decorators: [{
7079
7144
  type: Component,
@@ -7081,22 +7146,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7081
7146
  }], ctorParameters: () => [] });
7082
7147
 
7083
7148
  class TypeNumberComponent {
7149
+ dropdownRef = inject(NaturalDropdownRef);
7150
+ renderedValue = new BehaviorSubject('');
7151
+ configuration;
7152
+ operatorCtrl = new FormControl('equal', { nonNullable: true });
7153
+ valueCtrl = new FormControl();
7154
+ matcher = new InvalidWithValueStateMatcher$1();
7155
+ form = new FormGroup({
7156
+ operator: this.operatorCtrl,
7157
+ value: this.valueCtrl,
7158
+ });
7159
+ operators = possibleComparableOperators;
7160
+ defaults = {
7161
+ min: null,
7162
+ max: null,
7163
+ step: null,
7164
+ };
7084
7165
  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
7166
  const data = inject(NATURAL_DROPDOWN_DATA);
7101
7167
  this.configuration = { ...this.defaults, ...data.configuration };
7102
7168
  merge$1(this.operatorCtrl.valueChanges, this.valueCtrl.valueChanges).subscribe(() => {
@@ -7163,8 +7229,8 @@ class TypeNumberComponent {
7163
7229
  return operator.label + ' ' + this.valueCtrl.value;
7164
7230
  }
7165
7231
  }
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"] }] }); }
7232
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7233
+ 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
7234
  }
7169
7235
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeNumberComponent, decorators: [{
7170
7236
  type: Component,
@@ -7172,6 +7238,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7172
7238
  }], ctorParameters: () => [] });
7173
7239
 
7174
7240
  class HierarchicFlatNode {
7241
+ node;
7242
+ name;
7243
+ level;
7244
+ expandable;
7245
+ selectable;
7246
+ deselectable;
7247
+ loading = false;
7175
7248
  constructor(node, name, level = 0, expandable = false, selectable = true, deselectable = true) {
7176
7249
  this.node = node;
7177
7250
  this.name = name;
@@ -7179,15 +7252,16 @@ class HierarchicFlatNode {
7179
7252
  this.expandable = expandable;
7180
7253
  this.selectable = selectable;
7181
7254
  this.deselectable = deselectable;
7182
- this.loading = false;
7183
7255
  }
7184
7256
  }
7185
7257
 
7186
7258
  class HierarchicModelNode {
7259
+ model;
7260
+ config;
7261
+ childrenChange = new BehaviorSubject([]);
7187
7262
  constructor(model, config) {
7188
7263
  this.model = model;
7189
7264
  this.config = config;
7190
- this.childrenChange = new BehaviorSubject([]);
7191
7265
  }
7192
7266
  get children() {
7193
7267
  return this.childrenChange.value;
@@ -7195,21 +7269,19 @@ class HierarchicModelNode {
7195
7269
  }
7196
7270
 
7197
7271
  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
- }
7272
+ injector = inject(Injector);
7273
+ /**
7274
+ * Stores the global result of the tree
7275
+ * This observable contains Node.
7276
+ * When it's updated, the TreeController and TreeFlattener process the new array to generate the flat tree.
7277
+ */
7278
+ dataChange = new BehaviorSubject([]);
7279
+ /**
7280
+ * Configuration for relations and selection constraints
7281
+ *
7282
+ * The list should be sorted in the order of the hierarchic (list first parent rules, then child rules)
7283
+ */
7284
+ configuration = [];
7213
7285
  /**
7214
7286
  * Init component by saving the complete configuration, and then retrieving root elements.
7215
7287
  * Updates **another** observable (this.dataChange) when data is retrieved.
@@ -7432,8 +7504,8 @@ class NaturalHierarchicSelectorService {
7432
7504
  const node = this.dataChange.value.find(n => n.model.id === item.id && n.model.__typename === item.__typename);
7433
7505
  return node || new HierarchicModelNode(item, configuration);
7434
7506
  }
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' }); }
7507
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7508
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorService, providedIn: 'root' });
7437
7509
  }
7438
7510
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorService, decorators: [{
7439
7511
  type: Injectable,
@@ -7441,14 +7513,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7441
7513
  }] });
7442
7514
 
7443
7515
  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
- }
7516
+ data = inject(NATURAL_DROPDOWN_DATA);
7517
+ dropdownRef = inject(NaturalDropdownRef);
7518
+ // Never has a real value
7519
+ renderedValue = new BehaviorSubject('');
7520
+ facets = this.data.configuration.facets;
7521
+ selection = null;
7452
7522
  /**
7453
7523
  * Get value, including rich object types
7454
7524
  */
@@ -7472,8 +7542,8 @@ class FacetSelectorComponent {
7472
7542
  isDirty() {
7473
7543
  return true;
7474
7544
  }
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"] }] }); }
7545
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FacetSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7546
+ 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
7547
  }
7478
7548
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: FacetSelectorComponent, decorators: [{
7479
7549
  type: Component,
@@ -7495,66 +7565,80 @@ function isComponentValid(component) {
7495
7565
  };
7496
7566
  }
7497
7567
  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
- }
7568
+ element = inject(ElementRef);
7569
+ dropdownService = inject(NaturalDropdownService);
7570
+ injector = inject(EnvironmentInjector);
7571
+ /**
7572
+ * Controls the ripple effect, used when opening a dropdown
7573
+ */
7574
+ ripple;
7575
+ /**
7576
+ * Native element ref for <input> related to this <natural-input> component
7577
+ */
7578
+ input;
7579
+ /**
7580
+ * Label for this field
7581
+ */
7582
+ placeholder;
7583
+ /**
7584
+ * Name of the field on which do a global search (without facet)
7585
+ */
7586
+ searchFieldName = 'search';
7587
+ /**
7588
+ * Selected setted for this component
7589
+ */
7590
+ selection = null;
7591
+ /**
7592
+ * Available facets, allows the user to pick one, than generated then a selection
7593
+ */
7594
+ facets;
7595
+ /**
7596
+ * Text display in the dropdown to select the facet
7597
+ */
7598
+ dropdownTitle = '';
7599
+ /**
7600
+ * Emits when user a added/updated/deleted a search (from global context or from facet)
7601
+ */
7602
+ selectionChange = new EventEmitter();
7603
+ /**
7604
+ * Emits when user removes the search by pressing the cross icon
7605
+ */
7606
+ cleared = new EventEmitter();
7607
+ /**
7608
+ * Selected facet from the list of available facets
7609
+ */
7610
+ facet = null;
7611
+ /**
7612
+ * Controller for the input field
7613
+ */
7614
+ formCtrl = new FormControl(null);
7615
+ /**
7616
+ * Customer error matcher that should validate on each change (including initialisation)
7617
+ */
7618
+ errorMatcher = new AlwaysErrorStateMatcher();
7619
+ /**
7620
+ * Reference of the opened dropdown container
7621
+ */
7622
+ dropdownRef = null;
7623
+ /**
7624
+ * Reference of the component inside the dropdown container
7625
+ */
7626
+ dropdownComponentRef = null;
7627
+ /**
7628
+ * Minimum input length (number of chars)
7629
+ * See length attribute
7630
+ */
7631
+ minLength = 5;
7632
+ /**
7633
+ * Size of the input (number of chars)
7634
+ * Match the input.size attribute
7635
+ */
7636
+ length = this.minLength;
7637
+ /**
7638
+ * Flag, that, if marked as yes, prevents the opening of the dropdown
7639
+ * Is used to prevent dropdown opening when natural-search takes the focus from parent context (like on modal opening)
7640
+ */
7641
+ neutralizeDropdownOpening = false;
7558
7642
  /**
7559
7643
  * Custom management for taking the focus from parent context
7560
7644
  * When focusing manually on the <input>, a dropdown is opened
@@ -7771,8 +7855,8 @@ class NaturalInputComponent {
7771
7855
  }
7772
7856
  return selection;
7773
7857
  }
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"] }] }); }
7858
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7859
+ 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
7860
  }
7777
7861
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalInputComponent, decorators: [{
7778
7862
  type: Component,
@@ -7813,14 +7897,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7813
7897
  }] } });
7814
7898
 
7815
7899
  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
- }
7900
+ newValueInput;
7901
+ /**
7902
+ * Text display in the dropdown to select the facet
7903
+ */
7904
+ dropdownTitle = '';
7905
+ placeholder;
7906
+ facets;
7907
+ selectionChange = new EventEmitter();
7908
+ innerSelections = [];
7824
7909
  set selections(selection) {
7825
7910
  this.innerSelections = deepClone(selection);
7826
7911
  }
@@ -7837,8 +7922,8 @@ class NaturalGroupComponent {
7837
7922
  this.innerSelections.splice(index, 1);
7838
7923
  this.selectionChange.emit(this.innerSelections);
7839
7924
  }
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"] }] }); }
7925
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7926
+ 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
7927
  }
7843
7928
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalGroupComponent, decorators: [{
7844
7929
  type: Component,
@@ -7861,40 +7946,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7861
7946
  }] } });
7862
7947
 
7863
7948
  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
- }
7949
+ breakpointObserver = inject(BreakpointObserver);
7950
+ /**
7951
+ * Placeholder for last input (the free search input)
7952
+ */
7953
+ placeholder = $localize `Rechercher`;
7954
+ /**
7955
+ * Exhaustive list of facets to be used in this <natural-search>
7956
+ */
7957
+ facets = [];
7958
+ /**
7959
+ * Whether to allow end-user to create multiple `OR` groups
7960
+ */
7961
+ multipleGroups = false;
7962
+ /**
7963
+ * Text display in the dropdown to select the facet
7964
+ */
7965
+ dropdownTitle = '';
7966
+ /**
7967
+ * Emits when some selection has been setted by the user
7968
+ */
7969
+ selectionChange = new EventEmitter();
7970
+ /**
7971
+ * Cleaned inputted selections. Allow valid selections to be manipulated inside component
7972
+ */
7973
+ innerSelections = [[]];
7892
7974
  /**
7893
7975
  * Input to display at component initialisation
7894
7976
  */
7895
7977
  set selections(selections) {
7896
7978
  this.innerSelections = selections?.[0] ? deepClone(selections) : [[]];
7897
7979
  }
7980
+ isMobile = this.breakpointObserver.observe(Breakpoints.XSmall).pipe(map$1(result => result.matches));
7898
7981
  ngOnChanges() {
7899
7982
  if (!this.facets) {
7900
7983
  this.facets = [];
@@ -7919,8 +8002,8 @@ class NaturalSearchComponent {
7919
8002
  this.innerSelections = [[]];
7920
8003
  this.selectionChange.emit([[]]);
7921
8004
  }
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"] }] }); }
8005
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8006
+ 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
8007
  }
7925
8008
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSearchComponent, decorators: [{
7926
8009
  type: Component,
@@ -7948,49 +8031,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
7948
8031
  }] } });
7949
8032
 
7950
8033
  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
- }
8034
+ destroyRef = inject(DestroyRef);
8035
+ hierarchicSelectorService = inject(NaturalHierarchicSelectorService);
8036
+ /**
8037
+ * Function that receives a model and returns a string for display value
8038
+ */
8039
+ displayWith;
8040
+ /**
8041
+ * Config for items and relations arrangement
8042
+ */
8043
+ config;
8044
+ /**
8045
+ * If multiple or single item selection
8046
+ */
8047
+ multiple = false;
8048
+ /**
8049
+ * Selected items
8050
+ * Organized by key, containing each an array of selected items of same type
8051
+ */
8052
+ selected = {};
8053
+ /**
8054
+ * Whether selectable elements can be unselected
8055
+ */
8056
+ allowUnselect = true;
8057
+ /**
8058
+ * Filters that apply to each query
8059
+ */
8060
+ filters;
8061
+ /**
8062
+ * Search facets
8063
+ */
8064
+ searchFacets = [];
8065
+ /**
8066
+ * Selections to apply on natural-search on component initialisation
8067
+ */
8068
+ searchSelections = [];
8069
+ /**
8070
+ * Emits when natural-search selections change
8071
+ */
8072
+ searchSelectionChange = new EventEmitter();
8073
+ /**
8074
+ * Inner representation of selected @Input() to allow flat listing as mat-chip.
8075
+ */
8076
+ selectedNodes = [];
8077
+ /**
8078
+ * Emits selection change
8079
+ * Returns a Literal where selected models are organized by key
8080
+ */
8081
+ selectionChange = new EventEmitter();
8082
+ /**
8083
+ * Controller for nodes selection
8084
+ */
8085
+ flatNodesSelection;
8086
+ treeControl;
8087
+ treeFlattener;
8088
+ dataSource;
8089
+ loading = false;
8090
+ /**
8091
+ * Cache for transformed nodes
8092
+ */
8093
+ flatNodeMap = new Map();
7994
8094
  /**
7995
8095
  * Angular OnChange implementation
7996
8096
  */
@@ -8263,8 +8363,8 @@ class NaturalHierarchicSelectorComponent {
8263
8363
  getMapKey(model) {
8264
8364
  return model.__typename + '-' + model.id;
8265
8365
  }
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]" }] }); }
8366
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8367
+ 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
8368
  }
8269
8369
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorComponent, decorators: [{
8270
8370
  type: Component,
@@ -8352,8 +8452,8 @@ class TypeHierarchicSelectorComponent extends AbstractAssociationSelectComponent
8352
8452
  noEmptySelection(selection) {
8353
8453
  return selection[this.configuration.key].length ? selection : null;
8354
8454
  }
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"] }] }); }
8455
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeHierarchicSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
8456
+ 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
8457
  }
8358
8458
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeHierarchicSelectorComponent, decorators: [{
8359
8459
  type: Component,
@@ -8398,21 +8498,22 @@ function toGreaterThanFrom(dateAdapter) {
8398
8498
  * If you need optional bounding date, then use `TypeDateComponent` instead.
8399
8499
  */
8400
8500
  class TypeDateRangeComponent {
8501
+ dateAdapter = inject(DateAdapter);
8502
+ dateFormats = inject(MAT_DATE_FORMATS);
8503
+ renderedValue = new BehaviorSubject('');
8504
+ configuration;
8505
+ matcher = new InvalidWithValueStateMatcher();
8506
+ fromCtrl = new FormControl(null);
8507
+ toCtrl = new FormControl(null);
8508
+ form = new FormGroup({
8509
+ from: this.fromCtrl,
8510
+ to: this.toCtrl,
8511
+ });
8512
+ defaults = {
8513
+ min: null,
8514
+ max: null,
8515
+ };
8401
8516
  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
8517
  const data = inject(NATURAL_DROPDOWN_DATA);
8417
8518
  this.configuration = { ...this.defaults, ...data.configuration };
8418
8519
  merge$1(this.fromCtrl.valueChanges, this.toCtrl.valueChanges).subscribe(() => {
@@ -8478,8 +8579,8 @@ class TypeDateRangeComponent {
8478
8579
  return '';
8479
8580
  }
8480
8581
  }
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"] }] }); }
8582
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8583
+ 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
8584
  }
8484
8585
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeDateRangeComponent, decorators: [{
8485
8586
  type: Component,
@@ -8487,14 +8588,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
8487
8588
  }], ctorParameters: () => [] });
8488
8589
 
8489
8590
  class TypeOptionsComponent {
8591
+ data;
8592
+ renderedValue = new BehaviorSubject('');
8593
+ formControl = new FormControl({}, { nonNullable: true });
8594
+ configuration;
8595
+ defaults = {
8596
+ options: [],
8597
+ };
8598
+ dropdownRef = inject(NaturalDropdownRef);
8490
8599
  constructor(data) {
8491
8600
  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
8601
  this.configuration = { ...this.defaults, ...data.configuration };
8499
8602
  if (!this.configuration.options.length) {
8500
8603
  throw new Error('TypeOptions need options, empty array or null given');
@@ -8527,8 +8630,8 @@ class TypeOptionsComponent {
8527
8630
  isDirty() {
8528
8631
  return this.formControl.dirty;
8529
8632
  }
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"] }] }); }
8633
+ 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 });
8634
+ 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
8635
  }
8533
8636
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeOptionsComponent, decorators: [{
8534
8637
  type: Component,
@@ -8560,8 +8663,8 @@ class TypeBooleanComponent extends TypeOptionsComponent {
8560
8663
  };
8561
8664
  super(typeOptionsData);
8562
8665
  }
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"] }] }); }
8666
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeBooleanComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8667
+ 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
8668
  }
8566
8669
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: TypeBooleanComponent, decorators: [{
8567
8670
  type: Component,
@@ -8703,18 +8806,16 @@ function eventToFiles(event) {
8703
8806
 
8704
8807
  // @dynamic
8705
8808
  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
- }
8809
+ document = inject(DOCUMENT);
8810
+ /**
8811
+ * Allow to subscribe to selected files in the entire application. So a
8812
+ * child component is able to receive a file that was dropped on a parent
8813
+ * component.
8814
+ *
8815
+ * Typically useful to drop a file on the entire screen, instead of a precise
8816
+ * component.
8817
+ */
8818
+ filesChanged = new Subject();
8718
8819
  getDownloadLink(model) {
8719
8820
  const window = this.document.defaultView;
8720
8821
  if (!window) {
@@ -8732,8 +8833,8 @@ class NaturalFileService {
8732
8833
  }
8733
8834
  return null;
8734
8835
  }
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' }); }
8836
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
8837
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileService, providedIn: 'root' });
8737
8838
  }
8738
8839
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileService, decorators: [{
8739
8840
  type: Injectable,
@@ -8752,54 +8853,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
8752
8853
  * @dynamic
8753
8854
  */
8754
8855
  class NaturalAbstractFile {
8856
+ element;
8857
+ naturalFileService;
8858
+ document;
8859
+ fileElement;
8860
+ /**
8861
+ * Whether we should accept a single file or multiple files
8862
+ */
8863
+ multiple = false;
8864
+ /**
8865
+ * Comma-separated list of unique file type specifiers. Like the native element
8866
+ * it can be a mix of mime-type and file extensions.
8867
+ *
8868
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
8869
+ */
8870
+ accept = '';
8871
+ /**
8872
+ * Maximum file size in bytes. 0 means no validation at all.
8873
+ */
8874
+ maxSize = 0;
8875
+ /**
8876
+ * Disable the file selection entirely
8877
+ */
8878
+ fileSelectionDisabled = false;
8879
+ /**
8880
+ * Whether the user can click on the element to select something
8881
+ *
8882
+ * This has only effect during initialization. Subsequent changes will have
8883
+ * no effect.
8884
+ */
8885
+ selectable = false;
8886
+ /**
8887
+ * If true, the file selection will be broadcast through `NaturalFileService.filesChanged`.
8888
+ *
8889
+ * It is useful to set this to false if there is two upload on a page with different purpose
8890
+ * and the second upload should not be confused with the first one.
8891
+ */
8892
+ broadcast = true;
8893
+ /**
8894
+ * The single valid file that has been selected.
8895
+ *
8896
+ * It is for convenience of use, and will only emit if there is at least one
8897
+ * valid file. See `filesChange` for a more complete output.
8898
+ */
8899
+ fileChange = new EventEmitter();
8900
+ /**
8901
+ * The list of files that have been selected.
8902
+ */
8903
+ filesChange = new EventEmitter();
8755
8904
  constructor(element, naturalFileService, document) {
8756
8905
  this.element = element;
8757
8906
  this.naturalFileService = naturalFileService;
8758
8907
  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
8908
  }
8804
8909
  ngOnDestroy() {
8805
8910
  delete this.fileElement; // faster memory release of dom element
@@ -8932,8 +9037,8 @@ class NaturalAbstractFile {
8932
9037
  return null;
8933
9038
  }));
8934
9039
  }
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 }); }
9040
+ 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 });
9041
+ 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
9042
  }
8938
9043
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAbstractFile, decorators: [{
8939
9044
  type: Directive,
@@ -8976,16 +9081,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
8976
9081
  * ```
8977
9082
  */
8978
9083
  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
- }
9084
+ destroyRef = inject(DestroyRef);
9085
+ fileOverClass = false;
9086
+ /**
9087
+ * Emits whenever files are being dragged over
9088
+ */
9089
+ fileOver = new EventEmitter();
9090
+ rawFileOver = new Subject();
8989
9091
  ngOnInit() {
8990
9092
  super.ngOnInit();
8991
9093
  // Automatically change the class, but not too often to avoid visual
@@ -9044,8 +9146,8 @@ class NaturalFileDropDirective extends NaturalAbstractFile {
9044
9146
  this.filesChange.observed ||
9045
9147
  (this.broadcast && this.naturalFileService.filesChanged.observed));
9046
9148
  }
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 }); }
9149
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileDropDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
9150
+ 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
9151
  }
9050
9152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileDropDirective, decorators: [{
9051
9153
  type: Directive,
@@ -9073,17 +9175,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9073
9175
  * This directive has all options to select files, except drag'n'drop.
9074
9176
  */
9075
9177
  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 }); }
9178
+ /**
9179
+ * Whether the user can click on the element to select something
9180
+ *
9181
+ * Override parent to enable it by default
9182
+ */
9183
+ selectable = true;
9184
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileSelectDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
9185
+ 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
9186
  }
9088
9187
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileSelectDirective, decorators: [{
9089
9188
  type: Directive,
@@ -9097,34 +9196,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9097
9196
 
9098
9197
  // @dynamic
9099
9198
  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
- }
9199
+ naturalFileService = inject(NaturalFileService);
9200
+ alertService = inject(NaturalAlertService);
9201
+ document = inject(DOCUMENT);
9202
+ height = 250;
9203
+ action = null;
9204
+ backgroundSize = 'contain';
9205
+ /**
9206
+ * Comma-separated list of unique file type specifiers. Like the native element,
9207
+ * it can be a mix of mime-type and file extensions.
9208
+ *
9209
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
9210
+ */
9211
+ accept = 'image/bmp,image/gif,image/jpeg,image/pjpeg,image/png,image/svg+xml,image/svg,image/webp';
9212
+ /**
9213
+ * If given, it will be called when a new file is selected. The callback should typically upload the file
9214
+ * to the server and link the newly uploaded file to the existing related object.
9215
+ *
9216
+ * The callback **must** be able to run even if the calling component has been destroyed. That means in most
9217
+ * cases you **must** `bind()` the callback explicitly, like so:
9218
+ *
9219
+ * ```html
9220
+ * <natural-file [uploader]="myCallback.bind(this)" />
9221
+ * ```
9222
+ *
9223
+ * Also, you probably **should** set a `[formCtrl]` so that the form is updated automatically, instead of doing
9224
+ * it manually within the callback.
9225
+ */
9226
+ uploader;
9227
+ model = null;
9228
+ /**
9229
+ * If provided, its value will get updated when the model changes.
9230
+ * But its value is never read, so if you want to set a value use `[model]` instead.
9231
+ */
9232
+ formCtrl = null;
9233
+ /**
9234
+ * This **must not** be used to mutate the server, because it is very likely it will never be called if the
9235
+ * human navigates away from the page before the upload is finished. Instead, you should use `[uploader]`.
9236
+ */
9237
+ modelChange = new EventEmitter();
9238
+ imagePreview = '';
9239
+ filePreview = null;
9128
9240
  ngOnChanges(changes) {
9129
9241
  if (changes.model && changes.model.previousValue !== changes.model.currentValue) {
9130
9242
  this.updateImage();
@@ -9205,8 +9317,8 @@ class NaturalFileComponent {
9205
9317
  reader.readAsBinaryString(file);
9206
9318
  return subject.asObservable();
9207
9319
  }
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"] }] }); }
9320
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9321
+ 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
9322
  }
9211
9323
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFileComponent, decorators: [{
9212
9324
  type: Component,
@@ -9245,13 +9357,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9245
9357
  */
9246
9358
 
9247
9359
  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"] }] }); }
9360
+ icon;
9361
+ link = [];
9362
+ color = 'accent';
9363
+ disabled = false;
9364
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFixedButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9365
+ 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
9366
  }
9256
9367
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFixedButtonComponent, decorators: [{
9257
9368
  type: Component,
@@ -9272,6 +9383,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9272
9383
  */
9273
9384
 
9274
9385
  class NaturalFixedButtonDetailComponent {
9386
+ canChange = true;
9387
+ isCreation = false;
9275
9388
  get model() {
9276
9389
  return this._model;
9277
9390
  }
@@ -9282,11 +9395,11 @@ class NaturalFixedButtonDetailComponent {
9282
9395
  this.canChange = false;
9283
9396
  }
9284
9397
  }
9398
+ _model;
9399
+ form;
9400
+ create = new EventEmitter();
9401
+ delete = new EventEmitter();
9285
9402
  constructor() {
9286
- this.canChange = true;
9287
- this.isCreation = false;
9288
- this.create = new EventEmitter();
9289
- this.delete = new EventEmitter();
9290
9403
  const route = inject(ActivatedRoute);
9291
9404
  route.params.pipe(takeUntilDestroyed()).subscribe(() => (this.canChange = true));
9292
9405
  }
@@ -9300,8 +9413,8 @@ class NaturalFixedButtonDetailComponent {
9300
9413
  this.delete.emit();
9301
9414
  }
9302
9415
  }
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"] }] }); }
9416
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFixedButtonDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9417
+ 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
9418
  }
9306
9419
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalFixedButtonDetailComponent, decorators: [{
9307
9420
  type: Component,
@@ -9323,8 +9436,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9323
9436
  */
9324
9437
 
9325
9438
  class NaturalHierarchicSelectorDialogComponent {
9439
+ dialogRef = inject(MatDialogRef);
9440
+ /**
9441
+ * Set of hierarchic configurations to pass as attribute to HierarchicComponent
9442
+ */
9443
+ config;
9444
+ /**
9445
+ * Natural search selections after initialisation
9446
+ */
9447
+ searchSelectionsOutput;
9326
9448
  constructor() {
9327
- this.dialogRef = inject(MatDialogRef);
9328
9449
  const data = inject(MAT_DIALOG_DATA);
9329
9450
  this.config = defaults(data, { multiple: true, allowUnselect: true });
9330
9451
  this.searchSelectionsOutput = this.config.searchSelections;
@@ -9336,8 +9457,8 @@ class NaturalHierarchicSelectorDialogComponent {
9336
9457
  };
9337
9458
  this.dialogRef.close(result);
9338
9459
  }
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"] }] }); }
9460
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9461
+ 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
9462
  }
9342
9463
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogComponent, decorators: [{
9343
9464
  type: Component,
@@ -9345,9 +9466,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9345
9466
  }], ctorParameters: () => [] });
9346
9467
 
9347
9468
  class NaturalHierarchicSelectorDialogService {
9348
- constructor() {
9349
- this.dialog = inject(MatDialog);
9350
- }
9469
+ dialog = inject(MatDialog);
9351
9470
  open(hierarchicConfig, dialogConfig) {
9352
9471
  const defaultDialogConfig = {
9353
9472
  width: '700px',
@@ -9355,8 +9474,8 @@ class NaturalHierarchicSelectorDialogService {
9355
9474
  };
9356
9475
  return this.dialog.open(NaturalHierarchicSelectorDialogComponent, defaults(dialogConfig, defaultDialogConfig));
9357
9476
  }
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' }); }
9477
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9478
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogService, providedIn: 'root' });
9360
9479
  }
9361
9480
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHierarchicSelectorDialogService, decorators: [{
9362
9481
  type: Injectable,
@@ -9497,52 +9616,60 @@ function compareConfigs(a, b) {
9497
9616
  * @dynamic
9498
9617
  */
9499
9618
  class NaturalPanelsService {
9619
+ router = inject(Router);
9620
+ dialog = inject(MatDialog);
9621
+ injector = inject(Injector);
9622
+ hooksConfig = inject(PanelsHooksConfig);
9623
+ panelWidth = '960px';
9500
9624
  /**
9501
9625
  * Because of this static property Panels are **not** compatible with SSR.
9502
9626
  * And we cannot make it non-static, because `UrlMatcher` cannot be injected.
9503
9627
  */
9504
- static { this._opened = false; }
9628
+ static _opened = false;
9505
9629
  static get opened() {
9506
9630
  return this._opened;
9507
9631
  }
9632
+ /**
9633
+ * Stream that emits when all open dialog have finished closing
9634
+ */
9635
+ afterAllClosed = new Subject();
9636
+ /**
9637
+ * Cache for panels counter. Works more like an ID.
9638
+ * Is used to give an unique identifier to multiple similar panels configurations
9639
+ */
9640
+ counter = 1;
9641
+ /**
9642
+ * Class applied to dialog overlay related with panels
9643
+ * If change, change CSS too
9644
+ */
9645
+ panelClass = 'panel';
9646
+ /**
9647
+ * Cache for panels setup before navigation change.
9648
+ * Used to detect panels openings/closings and adapt for new configuration
9649
+ */
9650
+ oldFullConfig = [];
9651
+ /**
9652
+ * Cache for subscription stop
9653
+ */
9654
+ routeSub;
9655
+ /**
9656
+ * Cache for subscription stop
9657
+ */
9658
+ navSub;
9659
+ /**
9660
+ * Horizontal gaps between panels
9661
+ */
9662
+ panelsOffsetH = 35;
9663
+ /**
9664
+ * Vertical gaps between panels
9665
+ */
9666
+ panelsOffsetV = 40;
9667
+ /**
9668
+ * Cache of previous screen size
9669
+ * Used to change panels stack orientation on small screens
9670
+ */
9671
+ isVertical = false;
9508
9672
  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
9673
  const breakpointObserver = inject(BreakpointObserver);
9547
9674
  // Watch media to know if display panels horizontally or vertically
9548
9675
  breakpointObserver
@@ -9787,8 +9914,8 @@ class NaturalPanelsService {
9787
9914
  dialog.updatePosition(position);
9788
9915
  }
9789
9916
  }
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' }); }
9917
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9918
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsService, providedIn: 'root' });
9792
9919
  }
9793
9920
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsService, decorators: [{
9794
9921
  type: Injectable,
@@ -9798,18 +9925,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
9798
9925
  }], ctorParameters: () => [] });
9799
9926
 
9800
9927
  class NaturalPanelsComponent {
9928
+ panelsService = inject(NaturalPanelsService);
9801
9929
  // PanelsComponent is kind of a "ghost" component to respond to an url matcher in route config,
9802
9930
  // An UrlMatcher (matcher attribute) is required to catch urls with an undefined number of params in url after a given param /panels/
9803
9931
  constructor() {
9804
- this.panelsService = inject(NaturalPanelsService);
9805
9932
  const route = inject(ActivatedRoute);
9806
9933
  this.panelsService.start(route);
9807
9934
  }
9808
9935
  ngOnDestroy() {
9809
9936
  this.panelsService.stop();
9810
9937
  }
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 }); }
9938
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9939
+ 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
9940
  }
9814
9941
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalPanelsComponent, decorators: [{
9815
9942
  type: Component,
@@ -9847,38 +9974,12 @@ const fallbackIfNoOpenedPanels = (segments) => {
9847
9974
  * ```
9848
9975
  */
9849
9976
  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
- }
9977
+ destroyRef = inject(DestroyRef);
9978
+ linkMutationService = inject(NaturalLinkMutationService);
9979
+ hierarchicSelectorDialog = inject(NaturalHierarchicSelectorDialogService);
9980
+ select;
9981
+ itemTemplate;
9982
+ _service;
9882
9983
  get service() {
9883
9984
  return this._service;
9884
9985
  }
@@ -9892,6 +9993,61 @@ class NaturalRelationsComponent {
9892
9993
  }));
9893
9994
  this.dataSource = new NaturalDataSource(items$);
9894
9995
  }
9996
+ /**
9997
+ * The placeholder used in the button to add a new relation
9998
+ */
9999
+ placeholder = '';
10000
+ /**
10001
+ * Filter for autocomplete selector
10002
+ */
10003
+ autocompleteSelectorFilter;
10004
+ /**
10005
+ * Function to customize the rendering of the selected item as text in input
10006
+ */
10007
+ displayWith;
10008
+ /**
10009
+ * Whether the relations can be changed
10010
+ */
10011
+ disabled = false;
10012
+ /**
10013
+ * The main object to which all relations belong to
10014
+ */
10015
+ main;
10016
+ /**
10017
+ * Emits after relations were successfully added on the server
10018
+ */
10019
+ selectionChange = new EventEmitter();
10020
+ /**
10021
+ * Filters for hierarchic selector
10022
+ */
10023
+ hierarchicSelectorFilters;
10024
+ /**
10025
+ * Configuration in case we prefer hierarchic selection over autocomplete selection
10026
+ */
10027
+ hierarchicSelectorConfig;
10028
+ /**
10029
+ * Link mutation semantic
10030
+ */
10031
+ otherName;
10032
+ /**
10033
+ * Listing service instance
10034
+ */
10035
+ dataSource;
10036
+ loading = false;
10037
+ /**
10038
+ * Table columns
10039
+ */
10040
+ displayedColumns = ['name'];
10041
+ pageSizeOptions = [5, 25, 50, 100];
10042
+ defaultPagination = {
10043
+ pageIndex: 0,
10044
+ pageSize: 25,
10045
+ };
10046
+ /**
10047
+ * Observable variables/options for listing service usage and apollo watchQuery
10048
+ */
10049
+ variablesManager = new NaturalQueryVariablesManager();
10050
+ removing = new Set();
9895
10051
  /**
9896
10052
  * The filter used to filter relations
9897
10053
  *
@@ -9988,8 +10144,8 @@ class NaturalRelationsComponent {
9988
10144
  }
9989
10145
  return this.hierarchicSelectorConfig.find(c => !!c.selectableAtKey)?.selectableAtKey;
9990
10146
  }
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"] }] }); }
10147
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalRelationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10148
+ 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
10149
  }
9994
10150
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalRelationsComponent, decorators: [{
9995
10151
  type: Component,
@@ -10041,14 +10197,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10041
10197
  */
10042
10198
 
10043
10199
  class NaturalSelectEnumComponent extends AbstractSelect {
10200
+ enumService = inject(NaturalEnumService);
10201
+ /**
10202
+ * The name of the enum type, eg: `"ActionStatus"`
10203
+ */
10204
+ enumName;
10205
+ /**
10206
+ * If given an extra option is added to select `null` with given label
10207
+ */
10208
+ nullLabel;
10209
+ /**
10210
+ * Functions that receives an enum value and returns whether that value is disabled
10211
+ */
10212
+ optionDisabled;
10213
+ /**
10214
+ * Whether the user should be allowed to select multiple options
10215
+ */
10216
+ multiple = false;
10217
+ items;
10044
10218
  constructor() {
10045
10219
  const ngControl = inject(NgControl, { optional: true, self: true });
10046
10220
  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
10221
  }
10053
10222
  ngOnInit() {
10054
10223
  super.ngOnInit();
@@ -10057,8 +10226,8 @@ class NaturalSelectEnumComponent extends AbstractSelect {
10057
10226
  getDisplayFn() {
10058
10227
  throw new Error('This should never be called');
10059
10228
  }
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 }] }); }
10229
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectEnumComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10230
+ 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
10231
  }
10063
10232
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectEnumComponent, decorators: [{
10064
10233
  type: Component,
@@ -10100,25 +10269,33 @@ function defaultDisplayFn(item) {
10100
10269
  * ```
10101
10270
  */
10102
10271
  class NaturalSelectHierarchicComponent extends AbstractSelect {
10272
+ hierarchicSelectorDialogService = inject(NaturalHierarchicSelectorDialogService);
10273
+ /**
10274
+ * If provided cause a new select button to appear
10275
+ */
10276
+ selectLabel;
10277
+ /**
10278
+ * Configuration for hierarchic relations
10279
+ *
10280
+ * It should be an array with at least one element with `selectableAtKey` configured, otherwise the selector will never open.
10281
+ */
10282
+ config = null;
10283
+ /**
10284
+ * Filters formatted for hierarchic selector
10285
+ */
10286
+ filters;
10287
+ /**
10288
+ * The selected value as an object. The internal value is `internalCtrl.value`, and that is a string.
10289
+ */
10290
+ value = null;
10291
+ /**
10292
+ * On Firefox, the combination of <input (focus)> event and dialog opening cause some strange bug where focus event is called multiple
10293
+ * times This prevents it.
10294
+ */
10295
+ lockOpenDialog = false;
10103
10296
  constructor() {
10104
10297
  const ngControl = inject(NgControl, { optional: true, self: true });
10105
10298
  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
10299
  }
10123
10300
  /**
10124
10301
  * Very important to return something, above all if [select]='displayedValue' attribute value is used
@@ -10183,8 +10360,8 @@ class NaturalSelectHierarchicComponent extends AbstractSelect {
10183
10360
  getSelectKey() {
10184
10361
  return this.config?.find(c => !!c.selectableAtKey)?.selectableAtKey;
10185
10362
  }
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"] }] }); }
10363
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectHierarchicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10364
+ 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
10365
  }
10189
10366
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectHierarchicComponent, decorators: [{
10190
10367
  type: Component,
@@ -10212,18 +10389,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10212
10389
  */
10213
10390
 
10214
10391
  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
- }
10392
+ /**
10393
+ * The stack of all currently living sidenavs
10394
+ */
10395
+ sidenavs = [];
10396
+ /**
10397
+ * Emits the most recent living SidenavContainer whenever it changes. So it's
10398
+ * either the SidenavContainer that was just added, or the one "before" the
10399
+ * SidenavContainer that was just removed
10400
+ */
10401
+ currentSidenav = new Subject();
10227
10402
  /**
10228
10403
  * For internal use only
10229
10404
  * @internal
@@ -10252,8 +10427,8 @@ class NaturalSidenavStackService {
10252
10427
  next() {
10253
10428
  this.currentSidenav.next(this.sidenavs[this.sidenavs.length - 1]);
10254
10429
  }
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' }); }
10430
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavStackService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10431
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavStackService, providedIn: 'root' });
10257
10432
  }
10258
10433
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavStackService, decorators: [{
10259
10434
  type: Injectable,
@@ -10275,47 +10450,45 @@ function assert(value) {
10275
10450
  * Maybe the better is to wait next release
10276
10451
  */
10277
10452
  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
- }
10453
+ destroyRef = inject(DestroyRef);
10454
+ breakpointObserver = inject(BreakpointObserver);
10455
+ router = inject(Router);
10456
+ sessionStorage = inject(SESSION_STORAGE);
10457
+ naturalSidenavStackService = inject(NaturalSidenavStackService);
10458
+ /**
10459
+ * Navigation modes
10460
+ * First is for desktop view
10461
+ * Second is for mobile view
10462
+ */
10463
+ modes = ['side', 'push'];
10464
+ /**
10465
+ * Activated mode
10466
+ * Default to desktop view
10467
+ */
10468
+ mode = this.modes[0];
10469
+ /**
10470
+ * Whether nav is opened or not
10471
+ */
10472
+ opened = true;
10473
+ /**
10474
+ * Stores the opened status during mobile view, to restore if we come back to desktop view
10475
+ */
10476
+ tmpOpened = this.opened;
10477
+ /**
10478
+ * Whether nav is minimized or not
10479
+ */
10480
+ minimized = false;
10481
+ /**
10482
+ * LocalStorage key that stores the minimized status
10483
+ */
10484
+ minimizedStorageKey = 'menu-minimized';
10485
+ /**
10486
+ * LocalStorage key that stores the opened status
10487
+ */
10488
+ openedStorageKey = 'menu-opened';
10489
+ minimizedStorageKeyWithName = null;
10490
+ openedStorageKeyWithName = null;
10491
+ _isMobileView = false;
10319
10492
  get activeMode() {
10320
10493
  return this.mode;
10321
10494
  }
@@ -10442,8 +10615,8 @@ class NaturalSidenavService {
10442
10615
  this.sessionStorage.setItem(this.openedStorageKeyWithName, this.opened ? 'true' : 'false');
10443
10616
  }
10444
10617
  }
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' }); }
10618
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10619
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavService, providedIn: 'root' });
10447
10620
  }
10448
10621
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavService, decorators: [{
10449
10622
  type: Injectable,
@@ -10451,8 +10624,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10451
10624
  }] });
10452
10625
 
10453
10626
  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 }); }
10627
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10628
+ 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
10629
  }
10457
10630
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavComponent, decorators: [{
10458
10631
  type: Component,
@@ -10464,27 +10637,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10464
10637
  }] });
10465
10638
 
10466
10639
  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
- }
10640
+ sidenavService = inject(NaturalSidenavService);
10641
+ /**
10642
+ * Unique identifier used for the local storage
10643
+ */
10644
+ name;
10645
+ /**
10646
+ * The side that the drawer is attached to
10647
+ */
10648
+ position = 'start';
10649
+ /**
10650
+ * If true listens to route changes to close side nav after a route change if mobile view is active
10651
+ * Actually a navigation to current route does not emit a route change, and the sidenav don't close.
10652
+ */
10653
+ mobileAutoClose = true;
10654
+ /**
10655
+ * Width of the minimized menu
10656
+ */
10657
+ minimizedWidth = 150;
10658
+ /**
10659
+ * If true, prevents "native" material sidenav to scroll at container level and delegates the scroll responsability to the transcluded
10660
+ * content
10661
+ */
10662
+ noScroll = false;
10663
+ /**
10664
+ * Inner "native" material sidenav
10665
+ */
10666
+ menuSidenav;
10488
10667
  get isMinimized() {
10489
10668
  return this.sidenavService.isMinimized;
10490
10669
  }
@@ -10515,8 +10694,8 @@ class NaturalSidenavContainerComponent {
10515
10694
  toggleMinimized() {
10516
10695
  this.sidenavService.toggleMinimized();
10517
10696
  }
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"] }] }); }
10697
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10698
+ 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
10699
  }
10521
10700
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavContainerComponent, decorators: [{
10522
10701
  type: Component,
@@ -10541,8 +10720,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10541
10720
  }] } });
10542
10721
 
10543
10722
  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"] }); }
10723
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10724
+ 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
10725
  }
10547
10726
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSidenavContentComponent, decorators: [{
10548
10727
  type: Component,
@@ -10554,14 +10733,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10554
10733
  */
10555
10734
 
10556
10735
  class NaturalStampComponent {
10736
+ item;
10557
10737
  showUpdate() {
10558
10738
  const same = this.item.updater?.id === this.item.creator?.id &&
10559
10739
  this.item.updateDate &&
10560
10740
  this.item.updateDate === this.item.creationDate;
10561
10741
  return !same && (!!this.item.updateDate || !!this.item.updater);
10562
10742
  }
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" }] }); }
10743
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalStampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10744
+ 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
10745
  }
10566
10746
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalStampComponent, decorators: [{
10567
10747
  type: Component,
@@ -10586,16 +10766,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10586
10766
  * External URL will always be opened in new tab.
10587
10767
  */
10588
10768
  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
- }
10769
+ queryParams = {};
10770
+ queryParamsHandling = '';
10771
+ label;
10772
+ icon;
10773
+ href;
10774
+ navigate = [];
10775
+ fragment;
10776
+ preserveFragment = false;
10777
+ disabled = false;
10778
+ raised = false;
10779
+ color;
10780
+ buttonClick = new EventEmitter();
10781
+ type = 'none';
10599
10782
  ngOnChanges() {
10600
10783
  if (this.navigate instanceof UrlTree || this.navigate?.length || Object.keys(this.queryParams).length) {
10601
10784
  this.type = 'routerLink';
@@ -10610,8 +10793,8 @@ class NaturalTableButtonComponent {
10610
10793
  this.type = 'none';
10611
10794
  }
10612
10795
  }
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 }); }
10796
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalTableButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10797
+ 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
10798
  }
10616
10799
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalTableButtonComponent, decorators: [{
10617
10800
  type: Component,
@@ -10656,6 +10839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
10656
10839
  * in order to provide the avatar source.
10657
10840
  */
10658
10841
  class Source {
10842
+ value;
10659
10843
  constructor(value) {
10660
10844
  this.value = value;
10661
10845
  this.value = value;
@@ -10953,27 +11137,25 @@ class Image extends Source {
10953
11137
  * Provides utilities methods related to Avatar component
10954
11138
  */
10955
11139
  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
- }
11140
+ /**
11141
+ * Ordered pairs of possible sources. First in the list is the highest priority.
11142
+ * And key must match one the input of AvatarComponent.
11143
+ */
11144
+ sourceCreators = new Map([
11145
+ ['gravatar', Gravatar],
11146
+ ['image', Image],
11147
+ ['initials', Initials],
11148
+ ]);
11149
+ avatarColors = [
11150
+ '#e37900', // 2.99 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=e37900
11151
+ '#e6b102', // 2.26 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=c7ab00
11152
+ '#00bbbb', // 2.37 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=00bbbb
11153
+ '#008cff', // 3.38 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=008cff
11154
+ '#d9138c', // 4.51 pass https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=d901b8
11155
+ '#7321d1', // 4.28 fail https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=c800ff
11156
+ '#3b3b3b', // 11.2 pass https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=3b3b3b
11157
+ ];
11158
+ failedSources = new Map();
10977
11159
  getRandomColor(avatarText) {
10978
11160
  if (!avatarText) {
10979
11161
  return 'transparent';
@@ -10999,8 +11181,8 @@ class AvatarService {
10999
11181
  .map(letter => letter.charCodeAt(0))
11000
11182
  .reduce((previous, current) => previous + current);
11001
11183
  }
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' }); }
11184
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AvatarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11185
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AvatarService, providedIn: 'root' });
11004
11186
  }
11005
11187
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AvatarService, decorators: [{
11006
11188
  type: Injectable,
@@ -11013,21 +11195,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
11013
11195
  * Show an avatar from different sources
11014
11196
  */
11015
11197
  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
- }
11198
+ avatarService = inject(AvatarService);
11199
+ image;
11200
+ initials;
11201
+ gravatar;
11202
+ size = 50;
11203
+ decorated = true;
11204
+ textSizeRatio = 2.25;
11205
+ bgColor;
11206
+ fgColor = '#FFF';
11207
+ borderRadius = '';
11208
+ textMaximumLength = 2;
11209
+ avatarSrc = null;
11210
+ avatarText = null;
11211
+ avatarStyle = {};
11212
+ hostStyle = {};
11213
+ currentIndex = -1;
11214
+ sources = [];
11031
11215
  /**
11032
11216
  * Detect inputs change
11033
11217
  */
@@ -11130,8 +11314,8 @@ class NaturalAvatarComponent {
11130
11314
  height: this.size + 'px',
11131
11315
  };
11132
11316
  }
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: `
11317
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
11318
+ 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
11319
  <div class="avatar-container" [ngStyle]="hostStyle">
11136
11320
  @if (avatarSrc) {
11137
11321
  <img
@@ -11150,7 +11334,7 @@ class NaturalAvatarComponent {
11150
11334
  </div>
11151
11335
  }
11152
11336
  </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"] }] }); }
11337
+ `, 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
11338
  }
11155
11339
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalAvatarComponent, decorators: [{
11156
11340
  type: Component,
@@ -11215,13 +11399,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
11215
11399
  * @dynamic
11216
11400
  */
11217
11401
  class NaturalMatomoService {
11402
+ router = inject(Router);
11403
+ document = inject(DOCUMENT);
11404
+ titleService = inject(Title);
11405
+ isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
11406
+ window;
11407
+ subscription = null;
11408
+ referrerUrl = '';
11218
11409
  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
11410
  const window = this.document.defaultView;
11226
11411
  if (!window) {
11227
11412
  throw new Error('Could not init MatomoService `window` is undefined');
@@ -11289,8 +11474,8 @@ class NaturalMatomoService {
11289
11474
  this.referrerUrl = currentUrl;
11290
11475
  });
11291
11476
  }
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' }); }
11477
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMatomoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11478
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMatomoService, providedIn: 'root' });
11294
11479
  }
11295
11480
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalMatomoService, decorators: [{
11296
11481
  type: Injectable,
@@ -11315,12 +11500,12 @@ const NaturalLoggerConfigExtra = new InjectionToken('Class that may provide extr
11315
11500
  * ```
11316
11501
  */
11317
11502
  class NaturalErrorHandler extends ErrorHandler {
11503
+ http = inject(HttpClient);
11504
+ document = inject(DOCUMENT);
11505
+ url = inject(NaturalLoggerConfigUrl, { optional: true });
11506
+ loggerExtra = inject(NaturalLoggerConfigExtra, { optional: true });
11318
11507
  constructor() {
11319
11508
  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
11509
  }
11325
11510
  handleError(error) {
11326
11511
  console.error(error);
@@ -11375,8 +11560,8 @@ class NaturalErrorHandler extends ErrorHandler {
11375
11560
  .subscribe();
11376
11561
  }
11377
11562
  }
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' }); }
11563
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalErrorHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11564
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalErrorHandler, providedIn: 'root' });
11380
11565
  }
11381
11566
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalErrorHandler, decorators: [{
11382
11567
  type: Injectable,
@@ -11429,9 +11614,7 @@ function ensureHttpPrefix(value) {
11429
11614
  * This directive only supports ReactiveForms due to ngModel/ngControl encapsulation and changes emissions.
11430
11615
  */
11431
11616
  class NaturalHttpPrefixDirective {
11432
- constructor() {
11433
- this.naturalHttpPrefix = null;
11434
- }
11617
+ naturalHttpPrefix = null;
11435
11618
  httpize($event) {
11436
11619
  if (this.naturalHttpPrefix) {
11437
11620
  const newValue = ensureHttpPrefix($event) || $event;
@@ -11440,8 +11623,8 @@ class NaturalHttpPrefixDirective {
11440
11623
  }
11441
11624
  }
11442
11625
  }
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 }); }
11626
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHttpPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11627
+ 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
11628
  }
11446
11629
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalHttpPrefixDirective, decorators: [{
11447
11630
  type: Directive,