@ecodev/natural 45.5.0 → 46.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/esm2020/lib/classes/abstract-controller.mjs +2 -2
  2. package/esm2020/lib/classes/abstract-detail.mjs +10 -3
  3. package/esm2020/lib/classes/abstract-navigable-list.mjs +1 -1
  4. package/esm2020/lib/classes/rxjs.mjs +1 -1
  5. package/esm2020/lib/classes/validators.mjs +2 -2
  6. package/esm2020/lib/modules/avatar/service/avatar.service.mjs +2 -2
  7. package/esm2020/lib/modules/avatar/service/md5.mjs +4 -4
  8. package/esm2020/lib/modules/columns-picker/columns-picker-column.directive.mjs +1 -1
  9. package/esm2020/lib/modules/common/pipes/swiss-date.pipe.mjs +1 -1
  10. package/esm2020/lib/modules/dropdown-components/type-date/type-date.component.mjs +3 -3
  11. package/esm2020/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +4 -4
  12. package/esm2020/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +1 -1
  13. package/esm2020/lib/modules/dropdown-components/type-text/type-text.component.mjs +2 -2
  14. package/esm2020/lib/modules/file/abstract-file.mjs +2 -2
  15. package/esm2020/lib/modules/file/component/file.component.mjs +32 -24
  16. package/esm2020/lib/modules/file/file-drop.directive.mjs +1 -1
  17. package/esm2020/lib/modules/file/file-select.directive.mjs +1 -1
  18. package/esm2020/lib/modules/fixed-button/fixed-button.component.mjs +2 -2
  19. package/esm2020/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.mjs +1 -1
  20. package/esm2020/lib/modules/logger/error-handler.mjs +1 -1
  21. package/esm2020/lib/modules/panels/fallback-if-no-opened-panels.urlmatcher.mjs +2 -2
  22. package/esm2020/lib/modules/panels/panels.service.mjs +2 -2
  23. package/esm2020/lib/modules/panels/types.mjs +1 -1
  24. package/esm2020/lib/modules/relations/relations.component.mjs +2 -2
  25. package/esm2020/lib/modules/search/input/input.component.mjs +4 -4
  26. package/esm2020/lib/modules/search/search/search.component.mjs +2 -2
  27. package/esm2020/lib/modules/search/types/facet.mjs +1 -1
  28. package/esm2020/lib/modules/search/types/values.mjs +1 -1
  29. package/esm2020/lib/modules/select/abstract-select.component.mjs +2 -2
  30. package/esm2020/lib/modules/select/select/select.component.mjs +1 -1
  31. package/esm2020/lib/modules/select/select-enum/select-enum.component.mjs +1 -2
  32. package/esm2020/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +1 -1
  33. package/esm2020/lib/modules/sidenav/sidenav/sidenav.component.mjs +2 -3
  34. package/esm2020/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +2 -3
  35. package/esm2020/lib/modules/sidenav/sidenav.service.mjs +1 -1
  36. package/esm2020/lib/modules/table-button/table-button.component.mjs +2 -2
  37. package/esm2020/lib/services/abstract-model.service.mjs +8 -1
  38. package/esm2020/lib/services/debounce.service.mjs +1 -1
  39. package/esm2020/lib/services/persistence.service.mjs +4 -2
  40. package/esm2020/lib/services/swiss-parsing-date-adapter.service.mjs +1 -1
  41. package/fesm2015/ecodev-natural.mjs +67 -46
  42. package/fesm2015/ecodev-natural.mjs.map +1 -1
  43. package/fesm2020/ecodev-natural.mjs +66 -46
  44. package/fesm2020/ecodev-natural.mjs.map +1 -1
  45. package/lib/classes/abstract-controller.d.ts +0 -1
  46. package/lib/modules/avatar/service/avatar.service.d.ts +0 -1
  47. package/lib/modules/dropdown-components/type-date-range/type-date-range.component.d.ts +1 -1
  48. package/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.d.ts +1 -2
  49. package/lib/modules/dropdown-components/type-text/type-text.component.d.ts +2 -2
  50. package/lib/modules/file/abstract-file.d.ts +1 -1
  51. package/lib/modules/file/component/file.component.d.ts +32 -9
  52. package/lib/modules/fixed-button/fixed-button.component.d.ts +0 -1
  53. package/lib/modules/hierarchic-selector/classes/hierarchic-filters-configuration.d.ts +1 -2
  54. package/lib/modules/panels/types.d.ts +1 -2
  55. package/lib/modules/relations/relations.component.d.ts +2 -2
  56. package/lib/modules/search/input/input.component.d.ts +6 -5
  57. package/lib/modules/search/search/search.component.d.ts +2 -2
  58. package/lib/modules/search/types/facet.d.ts +1 -2
  59. package/lib/modules/search/types/values.d.ts +2 -4
  60. package/lib/modules/select/abstract-select.component.d.ts +2 -2
  61. package/lib/modules/select/select-enum/select-enum.component.d.ts +0 -1
  62. package/lib/modules/sidenav/sidenav/sidenav.component.d.ts +0 -1
  63. package/lib/modules/sidenav/sidenav-content/sidenav-content.component.d.ts +0 -1
  64. package/lib/modules/table-button/table-button.component.d.ts +2 -2
  65. package/lib/services/debounce.service.d.ts +1 -1
  66. package/package.json +1 -1
@@ -94,7 +94,7 @@ NaturalAbstractController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0"
94
94
  NaturalAbstractController.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.1", type: NaturalAbstractController, ngImport: i0 });
95
95
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalAbstractController, decorators: [{
96
96
  type: Directive
97
- }], ctorParameters: function () { return []; } });
97
+ }] });
98
98
 
99
99
  class NaturalConfirmComponent {
100
100
  constructor(data) {
@@ -2188,7 +2188,7 @@ function ifValid(control) {
2188
2188
  // - is too lax because it accepts pretty much anything else
2189
2189
  //
2190
2190
  // but the TLD will be validated against a whitelist so that should make the whole thing acceptable
2191
- const RFC_5322 = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[^@ ]+\.[^@]+$/u;
2191
+ const RFC_5322 = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[^@ ]+\.[^@]+$/u;
2192
2192
  /**
2193
2193
  * Validate an email address according to RFC, and also that it is publicly deliverable (not "root@localhost" or "root@127.0.0.1")
2194
2194
  *
@@ -2386,15 +2386,22 @@ class NaturalAbstractDetail extends NaturalAbstractPanel {
2386
2386
  }), finalize(() => this.form.enable()))
2387
2387
  .subscribe();
2388
2388
  }
2389
- postUpdate(model) { }
2389
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2390
+ postUpdate(model) {
2391
+ // noop
2392
+ }
2390
2393
  /**
2391
2394
  * Returns an observable that will be subscribed to immediately and the
2392
2395
  * redirect navigation will only happen after the observable completes.
2393
2396
  */
2397
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2394
2398
  postCreate(model) {
2395
2399
  return EMPTY;
2396
2400
  }
2397
- preDelete(model) { }
2401
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2402
+ preDelete(model) {
2403
+ // noop
2404
+ }
2398
2405
  initForm() {
2399
2406
  this.form = this.service.getFormGroup(this.data.model);
2400
2407
  }
@@ -3069,10 +3076,10 @@ class TypeDateComponent extends NaturalAbstractController {
3069
3076
  }
3070
3077
  }
3071
3078
  TypeDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: i1$4.DateAdapter }, { token: MAT_DATE_FORMATS }], target: i0.ɵɵFactoryTarget.Component });
3072
- TypeDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeDateComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error>\n <span *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</span>\n <span *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</span>\n <span *ngIf=\"valueCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n\n <mat-checkbox [formControl]=\"todayCtrl\" i18n>Aujourd'hui</mat-checkbox>\n</form>\n", styles: ["form{display:grid;grid:auto auto/4em auto;grid-gap:0 1em}form>*{align-self:end}form>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$4.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
3079
+ TypeDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeDateComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-checkbox [formControl]=\"todayCtrl\" i18n>Aujourd'hui</mat-checkbox>\n</form>\n", styles: ["form{display:grid;grid:auto auto/4em auto;grid-gap:0 1em}form>*{align-self:end}form>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i1$4.MatOption, selector: "mat-option", exportAs: ["matOption"] }] });
3073
3080
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateComponent, decorators: [{
3074
3081
  type: Component,
3075
- args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error>\n <span *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</span>\n <span *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</span>\n <span *ngIf=\"valueCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n\n <mat-checkbox [formControl]=\"todayCtrl\" i18n>Aujourd'hui</mat-checkbox>\n</form>\n", styles: ["form{display:grid;grid:auto auto/4em auto;grid-gap:0 1em}form>*{align-self:end}form>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"] }]
3082
+ args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-checkbox [formControl]=\"todayCtrl\" i18n>Aujourd'hui</mat-checkbox>\n</form>\n", styles: ["form{display:grid;grid:auto auto/4em auto;grid-gap:0 1em}form>*{align-self:end}form>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"] }]
3076
3083
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
3077
3084
  type: Inject,
3078
3085
  args: [NATURAL_DROPDOWN_DATA]
@@ -3445,7 +3452,9 @@ class NaturalPersistenceService {
3445
3452
  try {
3446
3453
  result = JSON.parse(value);
3447
3454
  }
3448
- catch (e) { }
3455
+ catch (e) {
3456
+ // noop
3457
+ }
3449
3458
  return this.isValid(key, storageKey, result) ? result : null;
3450
3459
  }
3451
3460
  }
@@ -4162,24 +4171,28 @@ class NaturalAbstractModelService {
4162
4171
  /**
4163
4172
  * List of individual fields validators
4164
4173
  */
4174
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4165
4175
  getFormValidators(model) {
4166
4176
  return {};
4167
4177
  }
4168
4178
  /**
4169
4179
  * List of individual async fields validators
4170
4180
  */
4181
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4171
4182
  getFormAsyncValidators(model) {
4172
4183
  return {};
4173
4184
  }
4174
4185
  /**
4175
4186
  * List of grouped fields validators (like password + confirm password)
4176
4187
  */
4188
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4177
4189
  getFormGroupValidators(model) {
4178
4190
  return [];
4179
4191
  }
4180
4192
  /**
4181
4193
  * List of async group fields validators (like unique constraint on multiple columns)
4182
4194
  */
4195
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4183
4196
  getFormGroupAsyncValidators(model) {
4184
4197
  return [];
4185
4198
  }
@@ -4572,6 +4585,7 @@ class NaturalAbstractModelService {
4572
4585
  *
4573
4586
  * This is typically a site or state ID
4574
4587
  */
4588
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4575
4589
  getPartialVariablesForCreation(object) {
4576
4590
  return {};
4577
4591
  }
@@ -4580,6 +4594,7 @@ class NaturalAbstractModelService {
4580
4594
  *
4581
4595
  * This is typically a site or state ID
4582
4596
  */
4597
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4583
4598
  getPartialVariablesForUpdate(object) {
4584
4599
  return {};
4585
4600
  }
@@ -4588,6 +4603,7 @@ class NaturalAbstractModelService {
4588
4603
  *
4589
4604
  * This is typically a site or state ID
4590
4605
  */
4606
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4591
4607
  getPartialVariablesForDelete(objects) {
4592
4608
  return {};
4593
4609
  }
@@ -6171,7 +6187,7 @@ class ExternalFormControlMatcher extends ErrorStateMatcher {
6171
6187
  super();
6172
6188
  this.component = component;
6173
6189
  }
6174
- isErrorState(control, form) {
6190
+ isErrorState() {
6175
6191
  const externalCtrl = this.component.ngControl?.control || this.component.internalCtrl;
6176
6192
  if (externalCtrl) {
6177
6193
  return !!(externalCtrl.errors && (externalCtrl.touched || externalCtrl.dirty));
@@ -6557,7 +6573,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
6557
6573
  }] });
6558
6574
 
6559
6575
  class InvalidWithValueStateMatcher$1 {
6560
- isErrorState(control, form) {
6576
+ isErrorState(control) {
6561
6577
  return control && control.invalid && control.value;
6562
6578
  }
6563
6579
  }
@@ -7011,7 +7027,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
7011
7027
 
7012
7028
  // Required to check invalid fields when initializing natural-search
7013
7029
  class AlwaysErrorStateMatcher {
7014
- isErrorState(control, form) {
7030
+ isErrorState(control) {
7015
7031
  return !!control && control.invalid;
7016
7032
  }
7017
7033
  }
@@ -7113,7 +7129,7 @@ class NaturalInputComponent {
7113
7129
  this.dropdownComponentRef.destroy();
7114
7130
  }
7115
7131
  }
7116
- ngOnChanges(changes) {
7132
+ ngOnChanges() {
7117
7133
  if (!this.facets && this.selection) {
7118
7134
  setTimeout(() => this.clear());
7119
7135
  }
@@ -7390,7 +7406,7 @@ class NaturalSearchComponent {
7390
7406
  set selections(selections) {
7391
7407
  this.innerSelections = selections && selections[0] ? deepClone(selections) : [[]];
7392
7408
  }
7393
- ngOnChanges(changes) {
7409
+ ngOnChanges() {
7394
7410
  if (!this.facets) {
7395
7411
  this.facets = [];
7396
7412
  }
@@ -7861,7 +7877,7 @@ function toGreaterThanFrom(dateAdapter) {
7861
7877
  /**
7862
7878
  * Date range with mandatory bounding dates.
7863
7879
  *
7864
- * If you need ooptional bounding date, then use `TypeDateComponent` instead.
7880
+ * If you need optional bounding date, then use `TypeDateComponent` instead.
7865
7881
  */
7866
7882
  class TypeDateRangeComponent {
7867
7883
  constructor(data, dateAdapter, dateFormats) {
@@ -7945,10 +7961,10 @@ class TypeDateRangeComponent {
7945
7961
  }
7946
7962
  }
7947
7963
  TypeDateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateRangeComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: i1$4.DateAdapter }, { token: MAT_DATE_FORMATS }], target: i0.ɵɵFactoryTarget.Component });
7948
- TypeDateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeDateRangeComponent, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error>\n <span *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error>\n <span *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">< {{ configuration.min }}</span>\n <span *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">> {{ configuration.max }}</span>\n <span *ngIf=\"toCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] });
7964
+ TypeDateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TypeDateRangeComponent, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">\n < {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">\n > {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i7.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] });
7949
7965
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TypeDateRangeComponent, decorators: [{
7950
7966
  type: Component,
7951
- args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error>\n <span *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</span\n >\n <span *ngIf=\"fromCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error>\n <span *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">< {{ configuration.min }}</span>\n <span *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">> {{ configuration.max }}</span>\n <span *ngIf=\"toCtrl.hasError('required')\">*</span>\n </mat-error>\n </mat-form-field>\n</form>\n" }]
7967
+ args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">\n < {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">\n > {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n</form>\n" }]
7952
7968
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
7953
7969
  type: Inject,
7954
7970
  args: [NATURAL_DROPDOWN_DATA]
@@ -8245,7 +8261,6 @@ class NaturalSelectEnumComponent extends AbstractSelect {
8245
8261
  constructor(enumService, ngControl) {
8246
8262
  super(ngControl);
8247
8263
  this.enumService = enumService;
8248
- this.ngControl = ngControl;
8249
8264
  /**
8250
8265
  * Whether the user should be allowed to select multiple options
8251
8266
  */
@@ -8584,7 +8599,7 @@ class NaturalAbstractFile extends NaturalAbstractController {
8584
8599
  this.multiple = false;
8585
8600
  /**
8586
8601
  * Comma-separated list of unique file type specifiers. Like the native element
8587
- * it can be a mixed of mime-type and file extensions.
8602
+ * it can be a mix of mime-type and file extensions.
8588
8603
  *
8589
8604
  * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
8590
8605
  */
@@ -8915,23 +8930,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
8915
8930
 
8916
8931
  // @dynamic
8917
8932
  class FileComponent {
8918
- constructor(naturalFileService, sanitizer, document) {
8933
+ constructor(naturalFileService, alertService, sanitizer, document) {
8919
8934
  this.naturalFileService = naturalFileService;
8935
+ this.alertService = alertService;
8920
8936
  this.sanitizer = sanitizer;
8921
8937
  this.document = document;
8922
8938
  this.height = 250;
8923
8939
  this.action = null;
8924
8940
  this.backgroundSize = 'contain';
8925
8941
  /**
8926
- * Comma separated list of accepted mimetypes
8942
+ * Comma-separated list of unique file type specifiers. Like the native element
8943
+ * it can be a mix of mime-type and file extensions.
8944
+ *
8945
+ * See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept
8927
8946
  */
8928
8947
  this.accept = 'image/bmp,image/gif,image/jpeg,image/pjpeg,image/png,image/svg+xml,image/svg,image/webp';
8929
8948
  this.model = null;
8930
8949
  /**
8931
- * If provided, get updated on change
8932
- * Is not used for reading -> use [model]
8950
+ * If provided, its value will get updated when the model changes.
8951
+ * But its value is never read, so if you want to set a value use `[model]` instead.
8933
8952
  */
8934
8953
  this.formCtrl = null;
8954
+ /**
8955
+ * This **must not** be used to mutate the server, because it is very likely it will never be called if the
8956
+ * human navigates away from the page before the upload is finished. Instead, you should use `[uploader]`.
8957
+ */
8935
8958
  this.modelChange = new EventEmitter();
8936
8959
  this.imagePreview = null;
8937
8960
  this.filePreview = null;
@@ -8950,15 +8973,14 @@ class FileComponent {
8950
8973
  if (this.formCtrl) {
8951
8974
  this.formCtrl.setValue(this.model);
8952
8975
  }
8953
- if (this.service) {
8954
- this.service.create(this.model).subscribe(result => {
8955
- this.model = result;
8956
- this.modelChange.emit(result);
8957
- });
8958
- }
8959
- else {
8976
+ const observable = this.uploader?.(file).pipe(tap$1(() => this.alertService.info($localize `Mis à jour`))) ?? of(this.model);
8977
+ observable.subscribe(result => {
8978
+ this.model = result;
8979
+ if (this.formCtrl) {
8980
+ this.formCtrl.setValue(this.model);
8981
+ }
8960
8982
  this.modelChange.emit(this.model);
8961
- }
8983
+ });
8962
8984
  }
8963
8985
  getDownloadLink() {
8964
8986
  if (this.action !== 'download') {
@@ -9016,12 +9038,12 @@ class FileComponent {
9016
9038
  return subject.asObservable();
9017
9039
  }
9018
9040
  }
9019
- FileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FileComponent, deps: [{ token: NaturalFileService }, { token: i2$2.DomSanitizer }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
9020
- FileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: FileComponent, selector: "natural-file", inputs: { height: "height", action: "action", backgroundSize: "backgroundSize", accept: "accept", service: "service", model: "model", formCtrl: "formCtrl" }, outputs: { modelChange: "modelChange" }, host: { properties: { "style.height.px": "this.height" } }, usesOnChanges: true, ngImport: i0, template: "<a\n (fileChange)=\"upload($event)\"\n naturalFileDrop\n [selectable]=\"true\"\n [accept]=\"accept\"\n [attr.href]=\"getDownloadLink()\"\n [class.has-action]=\"!!action\"\n [class.suggest-upload]=\"!model && action === 'upload'\"\n [fileSelectionDisabled]=\"action !== 'upload'\"\n [matRippleDisabled]=\"!action\"\n [style.backgroundImage]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n <div *ngIf=\"filePreview\" class=\"file-preview\">\n <natural-icon [size]=\"height * 0.33\" name=\"attachment\"></natural-icon>\n {{ filePreview | uppercase }}\n </div>\n\n <div class=\"action-overlay\">\n <natural-icon *ngIf=\"action === 'upload'\" [size]=\"height * 0.66\" name=\"cloud_upload\"></natural-icon>\n <natural-icon *ngIf=\"action === 'download'\" [size]=\"height * 0.66\" name=\"get_app\"></natural-icon>\n {{ action | capitalize }}\n </div>\n</a>\n", styles: [":host{display:flex;flex-direction:row;overflow:hidden;position:relative}:host>a{position:relative;flex:1;background-position:center;background-repeat:no-repeat}:host>a.has-action{cursor:pointer}:host>a.has-action.suggest-upload .action-overlay{opacity:.66}:host>a.has-action:hover .action-overlay,:host>a.has-action.natural-file-over .action-overlay{opacity:1}:host .action-overlay,:host .file-preview{display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0;justify-content:center;align-items:center;font-size:36px;line-height:1.3em;text-align:center}:host .action-overlay{opacity:0}:host .action-overlay>div{opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "directive", type: i1$4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: NaturalFileDropDirective, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: ["fileOver"] }, { kind: "pipe", type: i1$2.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }] });
9041
+ FileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FileComponent, deps: [{ token: NaturalFileService }, { token: NaturalAlertService }, { token: i2$2.DomSanitizer }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
9042
+ FileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: FileComponent, selector: "natural-file", inputs: { height: "height", action: "action", backgroundSize: "backgroundSize", accept: "accept", uploader: "uploader", model: "model", formCtrl: "formCtrl" }, outputs: { modelChange: "modelChange" }, host: { properties: { "style.height.px": "this.height" } }, usesOnChanges: true, ngImport: i0, template: "<a\n (fileChange)=\"upload($event)\"\n naturalFileDrop\n [selectable]=\"true\"\n [accept]=\"accept\"\n [attr.href]=\"getDownloadLink()\"\n [class.has-action]=\"!!action\"\n [class.suggest-upload]=\"!model && action === 'upload'\"\n [fileSelectionDisabled]=\"action !== 'upload'\"\n [matRippleDisabled]=\"!action\"\n [style.backgroundImage]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n <div *ngIf=\"filePreview\" class=\"file-preview\">\n <natural-icon [size]=\"height * 0.33\" name=\"attachment\"></natural-icon>\n {{ filePreview | uppercase }}\n </div>\n\n <div class=\"action-overlay\">\n <natural-icon *ngIf=\"action === 'upload'\" [size]=\"height * 0.66\" name=\"cloud_upload\"></natural-icon>\n <natural-icon *ngIf=\"action === 'download'\" [size]=\"height * 0.66\" name=\"get_app\"></natural-icon>\n {{ action | capitalize }}\n </div>\n</a>\n", styles: [":host{display:flex;flex-direction:row;overflow:hidden;position:relative}:host>a{position:relative;flex:1;background-position:center;background-repeat:no-repeat}:host>a.has-action{cursor:pointer}:host>a.has-action.suggest-upload .action-overlay{opacity:.66}:host>a.has-action:hover .action-overlay,:host>a.has-action.natural-file-over .action-overlay{opacity:1}:host .action-overlay,:host .file-preview{display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0;justify-content:center;align-items:center;font-size:36px;line-height:1.3em;text-align:center}:host .action-overlay{opacity:0}:host .action-overlay>div{opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalIconComponent, selector: "natural-icon", inputs: ["label", "labelColor", "labelPosition", "name", "size"] }, { kind: "directive", type: i1$4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: NaturalFileDropDirective, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: ["fileOver"] }, { kind: "pipe", type: i1$2.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }] });
9021
9043
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FileComponent, decorators: [{
9022
9044
  type: Component,
9023
9045
  args: [{ selector: 'natural-file', template: "<a\n (fileChange)=\"upload($event)\"\n naturalFileDrop\n [selectable]=\"true\"\n [accept]=\"accept\"\n [attr.href]=\"getDownloadLink()\"\n [class.has-action]=\"!!action\"\n [class.suggest-upload]=\"!model && action === 'upload'\"\n [fileSelectionDisabled]=\"action !== 'upload'\"\n [matRippleDisabled]=\"!action\"\n [style.backgroundImage]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n <div *ngIf=\"filePreview\" class=\"file-preview\">\n <natural-icon [size]=\"height * 0.33\" name=\"attachment\"></natural-icon>\n {{ filePreview | uppercase }}\n </div>\n\n <div class=\"action-overlay\">\n <natural-icon *ngIf=\"action === 'upload'\" [size]=\"height * 0.66\" name=\"cloud_upload\"></natural-icon>\n <natural-icon *ngIf=\"action === 'download'\" [size]=\"height * 0.66\" name=\"get_app\"></natural-icon>\n {{ action | capitalize }}\n </div>\n</a>\n", styles: [":host{display:flex;flex-direction:row;overflow:hidden;position:relative}:host>a{position:relative;flex:1;background-position:center;background-repeat:no-repeat}:host>a.has-action{cursor:pointer}:host>a.has-action.suggest-upload .action-overlay{opacity:.66}:host>a.has-action:hover .action-overlay,:host>a.has-action.natural-file-over .action-overlay{opacity:1}:host .action-overlay,:host .file-preview{display:flex;flex-direction:column;position:absolute;top:0;left:0;right:0;bottom:0;justify-content:center;align-items:center;font-size:36px;line-height:1.3em;text-align:center}:host .action-overlay{opacity:0}:host .action-overlay>div{opacity:0;position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}\n"] }]
9024
- }], ctorParameters: function () { return [{ type: NaturalFileService }, { type: i2$2.DomSanitizer }, { type: Document, decorators: [{
9046
+ }], ctorParameters: function () { return [{ type: NaturalFileService }, { type: NaturalAlertService }, { type: i2$2.DomSanitizer }, { type: Document, decorators: [{
9025
9047
  type: Inject,
9026
9048
  args: [DOCUMENT]
9027
9049
  }] }]; }, propDecorators: { height: [{
@@ -9035,7 +9057,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
9035
9057
  type: Input
9036
9058
  }], accept: [{
9037
9059
  type: Input
9038
- }], service: [{
9060
+ }], uploader: [{
9039
9061
  type: Input
9040
9062
  }], model: [{
9041
9063
  type: Input
@@ -9076,7 +9098,7 @@ NaturalFixedButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.
9076
9098
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalFixedButtonComponent, decorators: [{
9077
9099
  type: Component,
9078
9100
  args: [{ selector: 'natural-fixed-button', template: "<button\n [color]=\"color\"\n [disabled]=\"disabled\"\n [routerLink]=\"link\"\n class=\"floating-button bottom-right\"\n mat-fab\n mat-raised-button\n>\n <natural-icon [name]=\"icon\"></natural-icon>\n</button>\n", styles: [":host{position:fixed!important;z-index:999;bottom:32px;right:32px}\n"] }]
9079
- }], ctorParameters: function () { return []; }, propDecorators: { icon: [{
9101
+ }], propDecorators: { icon: [{
9080
9102
  type: Input
9081
9103
  }], link: [{
9082
9104
  type: Input
@@ -9362,7 +9384,7 @@ class NaturalPanelsService {
9362
9384
  const originalErrorHandler = this.router.errorHandler;
9363
9385
  // Nullify error handler (will be de-neutralized after route redirection)
9364
9386
  if (config) {
9365
- this.router.errorHandler = () => { };
9387
+ this.router.errorHandler = () => undefined;
9366
9388
  }
9367
9389
  // Navigate to same url + /risk/new Result : /risk/risk/new
9368
9390
  const newUrl = config.map(conf => segmentsToString(conf.route.segments)).join('/');
@@ -9619,7 +9641,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
9619
9641
  * Url fallback matcher to be used instead of `path: '**'` when Panel system
9620
9642
  * is used in the project.
9621
9643
  */
9622
- const fallbackIfNoOpenedPanels = (segments, group, route) => {
9644
+ const fallbackIfNoOpenedPanels = (segments) => {
9623
9645
  if (!NaturalPanelsService.opened) {
9624
9646
  return { consumed: segments };
9625
9647
  }
@@ -9684,7 +9706,7 @@ class NaturalRelationsComponent extends NaturalAbstractController {
9684
9706
  this.disabled = this.disabled || !this.main.permissions.update;
9685
9707
  }
9686
9708
  }
9687
- ngOnChanges(changes) {
9709
+ ngOnChanges() {
9688
9710
  if (this.service) {
9689
9711
  this.queryItems();
9690
9712
  }
@@ -10184,17 +10206,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
10184
10206
  }] } });
10185
10207
 
10186
10208
  class NaturalSidenavContentComponent {
10187
- constructor() { }
10188
10209
  }
10189
10210
  NaturalSidenavContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSidenavContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10190
10211
  NaturalSidenavContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSidenavContentComponent, selector: "natural-sidenav-content", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}\n"] });
10191
10212
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSidenavContentComponent, decorators: [{
10192
10213
  type: Component,
10193
10214
  args: [{ selector: 'natural-sidenav-content', template: '<ng-content></ng-content>', styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}\n"] }]
10194
- }], ctorParameters: function () { return []; } });
10215
+ }] });
10195
10216
 
10196
10217
  class NaturalSidenavComponent {
10197
- constructor() { }
10198
10218
  }
10199
10219
  NaturalSidenavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NaturalSidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10200
10220
  NaturalSidenavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: NaturalSidenavComponent, selector: "natural-sidenav", ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
@@ -10204,7 +10224,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
10204
10224
  selector: 'natural-sidenav',
10205
10225
  template: '<ng-content></ng-content>',
10206
10226
  }]
10207
- }], ctorParameters: function () { return []; } });
10227
+ }] });
10208
10228
 
10209
10229
  class NaturalSidenavModule {
10210
10230
  }
@@ -10281,7 +10301,7 @@ class NaturalTableButtonComponent {
10281
10301
  this.buttonClick = new EventEmitter();
10282
10302
  this.type = 'none';
10283
10303
  }
10284
- ngOnChanges(changes) {
10304
+ ngOnChanges() {
10285
10305
  if (this.navigate?.length || Object.keys(this.queryParams).length) {
10286
10306
  this.type = 'routerLink';
10287
10307
  }
@@ -10546,11 +10566,11 @@ function addUnsigned(lX, lY) {
10546
10566
  const lX4 = lX & 0x40000000;
10547
10567
  const lY4 = lY & 0x40000000;
10548
10568
  const lResult = (lX & 0x3fffffff) + (lY & 0x3fffffff);
10549
- if (!!(lX4 & lY4)) {
10569
+ if (lX4 & lY4) {
10550
10570
  return lResult ^ 0x80000000 ^ lX8 ^ lY8;
10551
10571
  }
10552
- if (!!(lX4 | lY4)) {
10553
- if (!!(lResult & 0x40000000)) {
10572
+ if (lX4 | lY4) {
10573
+ if (lResult & 0x40000000) {
10554
10574
  return lResult ^ 0xc0000000 ^ lX8 ^ lY8;
10555
10575
  }
10556
10576
  else {
@@ -10776,7 +10796,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
10776
10796
  args: [{
10777
10797
  providedIn: 'root',
10778
10798
  }]
10779
- }], ctorParameters: function () { return []; } });
10799
+ }] });
10780
10800
 
10781
10801
  /**
10782
10802
  * Show an avatar from different sources