@ecodev/natural 53.2.0 → 53.4.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.
@@ -14,7 +14,7 @@ import { MatButtonModule } from '@angular/material/button';
14
14
  import * as i2$1 from '@angular/material/snack-bar';
15
15
  import { MatSnackBarModule } from '@angular/material/snack-bar';
16
16
  import { switchMap, first, map, filter, finalize, takeUntil, take, tap, takeWhile, debounceTime, shareReplay, startWith, distinctUntilChanged, throttleTime } from 'rxjs/operators';
17
- import * as i3$5 from '@angular/material/table';
17
+ import * as i3$6 from '@angular/material/table';
18
18
  import { MatTableDataSource, MatTableModule } from '@angular/material/table';
19
19
  import { DataSource, SelectionModel } from '@angular/cdk/collections';
20
20
  import * as i1$3 from '@angular/material/core';
@@ -24,7 +24,7 @@ import { OverlayConfig } from '@angular/cdk/overlay';
24
24
  import * as i2$2 from '@angular/cdk/portal';
25
25
  import { BasePortalOutlet, CdkPortalOutlet, PortalModule, ComponentPortal } from '@angular/cdk/portal';
26
26
  import { trigger, state, style, transition, sequence, query, animate, group } from '@angular/animations';
27
- import { NgIf, NgFor, NgClass, AsyncPipe, DatePipe, NgTemplateOutlet, DOCUMENT, UpperCasePipe, NgStyle, isPlatformBrowser } from '@angular/common';
27
+ import { NgIf, NgFor, NgClass, AsyncPipe, DatePipe, NgTemplateOutlet, CommonModule, DOCUMENT, UpperCasePipe, NgStyle, isPlatformBrowser } from '@angular/common';
28
28
  import * as i1$1 from '@angular/cdk/a11y';
29
29
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
30
30
  import * as i7 from '@angular/material/checkbox';
@@ -64,7 +64,9 @@ import * as i7$2 from '@angular/material/chips';
64
64
  import { MatChipsModule } from '@angular/material/chips';
65
65
  import * as i5$1 from '@angular/material/divider';
66
66
  import { MatDividerModule } from '@angular/material/divider';
67
- import * as i3$4 from '@ngbracket/ngx-layout';
67
+ import * as i3$4 from '@angular/material/button-toggle';
68
+ import { MatButtonToggleModule } from '@angular/material/button-toggle';
69
+ import * as i3$5 from '@ngbracket/ngx-layout';
68
70
  import * as i7$3 from '@angular/material/paginator';
69
71
  import { MatPaginatorModule } from '@angular/material/paginator';
70
72
  import * as i2$6 from '@angular/material/sidenav';
@@ -8192,49 +8194,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
8192
8194
  args: [MAT_DATE_FORMATS]
8193
8195
  }] }]; } });
8194
8196
 
8195
- class TypeBooleanComponent extends NaturalAbstractController {
8197
+ class TypeOptionsComponent {
8196
8198
  constructor(data, dropdownRef) {
8197
- super();
8199
+ this.data = data;
8198
8200
  this.dropdownRef = dropdownRef;
8199
8201
  this.renderedValue = new BehaviorSubject('');
8200
- this.operatorCtrl = new FormControl(true, { nonNullable: true });
8202
+ this.formControl = new FormControl({}, { nonNullable: true });
8201
8203
  this.defaults = {
8202
- displayWhenActive: '',
8203
- displayWhenInactive: '',
8204
+ options: [],
8204
8205
  };
8205
8206
  this.configuration = { ...this.defaults, ...data.configuration };
8206
- const updateDisplay = (value) => this.renderedValue.next(value ? this.configuration.displayWhenActive : this.configuration.displayWhenInactive);
8207
- if (data.condition?.equal) {
8208
- this.operatorCtrl.setValue(!!data.condition.equal.value);
8207
+ if (!this.configuration.options.length) {
8208
+ throw new Error('TypeOptions need options, empty array or null given');
8209
+ }
8210
+ this.formControl.setValidators([Validators.required]);
8211
+ if (data.condition) {
8212
+ const option = this.configuration.options.find(option => isEqual(option.condition, data.condition));
8213
+ if (option) {
8214
+ this.formControl.setValue(option);
8215
+ this.renderedValue.next(option.display);
8216
+ }
8209
8217
  }
8210
8218
  // Update rendered value
8211
- this.operatorCtrl.valueChanges.subscribe(value => updateDisplay(value));
8212
- updateDisplay(this.operatorCtrl.value);
8219
+ this.formControl.valueChanges.subscribe(option => {
8220
+ if (option) {
8221
+ this.renderedValue.next(option.display);
8222
+ this.dropdownRef.close(option);
8223
+ }
8224
+ });
8213
8225
  }
8214
8226
  getCondition() {
8215
8227
  if (!this.isValid()) {
8216
8228
  return {};
8217
8229
  }
8218
- return { equal: { value: this.operatorCtrl.value } };
8230
+ return this.formControl.value.condition;
8219
8231
  }
8220
- /**
8221
- * Always valid because checked and unchecked are both valid values
8222
- */
8223
8232
  isValid() {
8224
- return true;
8233
+ return this.formControl.valid && !!this.formControl.value?.condition;
8225
8234
  }
8226
- /**
8227
- * Always dirty because even on dropdown opening, the default value is accepted as intentional. There is no "default/empty" state
8228
- */
8229
8235
  isDirty() {
8230
- return true;
8236
+ return this.formControl.dirty;
8237
+ }
8238
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeOptionsComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: NaturalDropdownRef }], target: i0.ɵɵFactoryTarget.Component }); }
8239
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeOptionsComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<mat-button-toggle-group [formControl]=\"formControl\">\n <mat-button-toggle *ngFor=\"let option of configuration.options\" [value]=\"option\">{{\n option.display\n }}</mat-button-toggle>\n</mat-button-toggle-group>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i3$4.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3$4.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: CommonModule }] }); }
8240
+ }
8241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeOptionsComponent, decorators: [{
8242
+ type: Component,
8243
+ args: [{ standalone: true, imports: [FormsModule, ReactiveFormsModule, NgIf, NgFor, MatButtonToggleModule, CommonModule], template: "<mat-button-toggle-group [formControl]=\"formControl\">\n <mat-button-toggle *ngFor=\"let option of configuration.options\" [value]=\"option\">{{\n option.display\n }}</mat-button-toggle>\n</mat-button-toggle-group>\n" }]
8244
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
8245
+ type: Inject,
8246
+ args: [NATURAL_DROPDOWN_DATA]
8247
+ }] }, { type: NaturalDropdownRef }]; } });
8248
+
8249
+ class TypeBooleanComponent extends TypeOptionsComponent {
8250
+ constructor(data, dropdownRef) {
8251
+ // Set up options from hardcoded conditions with custom labels from config
8252
+ const configuration = {
8253
+ options: [
8254
+ {
8255
+ display: data.configuration.displayWhenActive,
8256
+ condition: { equal: { value: true } },
8257
+ },
8258
+ {
8259
+ display: data.configuration.displayWhenInactive,
8260
+ condition: { equal: { value: false } },
8261
+ },
8262
+ ],
8263
+ };
8264
+ const typeOptionsData = {
8265
+ ...data,
8266
+ ...{ configuration: configuration },
8267
+ };
8268
+ super(typeOptionsData, dropdownRef);
8231
8269
  }
8232
8270
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeBooleanComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: NaturalDropdownRef }], target: i0.ɵɵFactoryTarget.Component }); }
8233
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeBooleanComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<mat-checkbox [formControl]=\"operatorCtrl\">{{ renderedValue.value }}</mat-checkbox>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] }); }
8271
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeBooleanComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<mat-button-toggle-group [formControl]=\"formControl\">\n <mat-button-toggle *ngFor=\"let option of configuration.options\" [value]=\"option\">{{\n option.display\n }}</mat-button-toggle>\n</mat-button-toggle-group>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i3$4.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3$4.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: CommonModule }] }); }
8234
8272
  }
8235
8273
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeBooleanComponent, decorators: [{
8236
8274
  type: Component,
8237
- args: [{ standalone: true, imports: [FormsModule, ReactiveFormsModule, NgIf, NgFor, MatCheckboxModule], template: "<mat-checkbox [formControl]=\"operatorCtrl\">{{ renderedValue.value }}</mat-checkbox>\n" }]
8275
+ args: [{ standalone: true, imports: [FormsModule, ReactiveFormsModule, NgIf, NgFor, MatButtonToggleModule, CommonModule], template: "<mat-button-toggle-group [formControl]=\"formControl\">\n <mat-button-toggle *ngFor=\"let option of configuration.options\" [value]=\"option\">{{\n option.display\n }}</mat-button-toggle>\n</mat-button-toggle-group>\n" }]
8238
8276
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
8239
8277
  type: Inject,
8240
8278
  args: [NATURAL_DROPDOWN_DATA]
@@ -9466,7 +9504,7 @@ class NaturalPanelsService {
9466
9504
  dialog.updatePosition(position);
9467
9505
  }
9468
9506
  }
9469
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsService, deps: [{ token: i2$4.Router }, { token: i1.MatDialog }, { token: i0.Injector }, { token: PanelsHooksConfig }, { token: i3$4.MediaObserver }], target: i0.ɵɵFactoryTarget.Injectable }); }
9507
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsService, deps: [{ token: i2$4.Router }, { token: i1.MatDialog }, { token: i0.Injector }, { token: PanelsHooksConfig }, { token: i3$5.MediaObserver }], target: i0.ɵɵFactoryTarget.Injectable }); }
9470
9508
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsService, providedIn: 'root' }); }
9471
9509
  }
9472
9510
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsService, decorators: [{
@@ -9477,7 +9515,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
9477
9515
  }], ctorParameters: function () { return [{ type: i2$4.Router }, { type: i1.MatDialog }, { type: i0.Injector }, { type: undefined, decorators: [{
9478
9516
  type: Inject,
9479
9517
  args: [PanelsHooksConfig]
9480
- }] }, { type: i3$4.MediaObserver }]; } });
9518
+ }] }, { type: i3$5.MediaObserver }]; } });
9481
9519
 
9482
9520
  class NaturalPanelsComponent {
9483
9521
  // PanelsComponent is kind of a "ghost" component to respond to an url matcher in route config,
@@ -9672,7 +9710,7 @@ class NaturalRelationsComponent extends NaturalAbstractController {
9672
9710
  return this.hierarchicSelectorConfig.filter(c => !!c.selectableAtKey)[0].selectableAtKey;
9673
9711
  }
9674
9712
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalRelationsComponent, deps: [{ token: NaturalLinkMutationService }, { token: NaturalHierarchicSelectorDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
9675
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", 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 }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n ></ng-template>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n <button\n *ngIf=\"!disabled\"\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <mat-icon naturalIcon=\"link_off\"></mat-icon>\n </button>\n </td>\n </ng-container>\n </table>\n\n <mat-paginator\n (page)=\"pagination($event)\"\n *ngIf=\"dataSource?.data && (dataSource?.data?.length || 0) > (dataSource?.data?.pageSize || 0)\"\n [length]=\"dataSource?.data?.length || 0\"\n [pageIndex]=\"dataSource?.data?.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource?.data?.pageSize || 0\"\n ></mat-paginator>\n\n <div *ngIf=\"!loading && dataSource?.data?.length === 0\" class=\"margin-v mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n\n <mat-progress-spinner *ngIf=\"loading\" [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\"></mat-progress-spinner>\n</div>\n\n<natural-select\n (selectionChange)=\"addRelations([$event])\"\n *ngIf=\"!hierarchicSelectorConfig && service && !disabled\"\n [displayWith]=\"$any(getDisplayFn())\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n></natural-select>\n\n<div *ngIf=\"hierarchicSelectorConfig && !disabled\">\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$5.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3$5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.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: i7$3.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7$1.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"] }] }); }
9713
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", 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 }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n ></ng-template>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n <button\n *ngIf=\"!disabled\"\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <mat-icon naturalIcon=\"link_off\"></mat-icon>\n </button>\n </td>\n </ng-container>\n </table>\n\n <mat-paginator\n (page)=\"pagination($event)\"\n *ngIf=\"dataSource?.data && (dataSource?.data?.length || 0) > (dataSource?.data?.pageSize || 0)\"\n [length]=\"dataSource?.data?.length || 0\"\n [pageIndex]=\"dataSource?.data?.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource?.data?.pageSize || 0\"\n ></mat-paginator>\n\n <div *ngIf=\"!loading && dataSource?.data?.length === 0\" class=\"margin-v mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n\n <mat-progress-spinner *ngIf=\"loading\" [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\"></mat-progress-spinner>\n</div>\n\n<natural-select\n (selectionChange)=\"addRelations([$event])\"\n *ngIf=\"!hierarchicSelectorConfig && service && !disabled\"\n [displayWith]=\"$any(getDisplayFn())\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n></natural-select>\n\n<div *ngIf=\"hierarchicSelectorConfig && !disabled\">\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$6.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3$6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.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: i7$3.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7$1.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"] }] }); }
9676
9714
  }
9677
9715
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalRelationsComponent, decorators: [{
9678
9716
  type: Component,
@@ -10126,13 +10164,13 @@ class NaturalSidenavService extends NaturalAbstractController {
10126
10164
  this.sessionStorage.setItem(this.openedStorageKeyWithName, this.opened ? 'true' : 'false');
10127
10165
  }
10128
10166
  }
10129
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavService, deps: [{ token: i3$4.MediaObserver }, { token: i2$4.Router }, { token: SESSION_STORAGE }, { token: NaturalSidenavStackService }], target: i0.ɵɵFactoryTarget.Injectable }); }
10167
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavService, deps: [{ token: i3$5.MediaObserver }, { token: i2$4.Router }, { token: SESSION_STORAGE }, { token: NaturalSidenavStackService }], target: i0.ɵɵFactoryTarget.Injectable }); }
10130
10168
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavService, providedIn: 'root' }); }
10131
10169
  }
10132
10170
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavService, decorators: [{
10133
10171
  type: Injectable,
10134
10172
  args: [{ providedIn: 'root' }]
10135
- }], ctorParameters: function () { return [{ type: i3$4.MediaObserver }, { type: i2$4.Router }, { type: undefined, decorators: [{
10173
+ }], ctorParameters: function () { return [{ type: i3$5.MediaObserver }, { type: i2$4.Router }, { type: undefined, decorators: [{
10136
10174
  type: Inject,
10137
10175
  args: [SESSION_STORAGE]
10138
10176
  }] }, { type: NaturalSidenavStackService }]; } });
@@ -11095,7 +11133,7 @@ function provideErrorHandler(url, extraService) {
11095
11133
  */
11096
11134
 
11097
11135
  /**
11098
- * Need to add http:// prefix if we don't have prefix already AND we don't have part of it
11136
+ * Need to add http:// prefix if we don't have prefix already AND we don't have part of it
11099
11137
  */
11100
11138
  function ensureHttpPrefix(value) {
11101
11139
  if (!value) {
@@ -11113,9 +11151,8 @@ function ensureHttpPrefix(value) {
11113
11151
  /**
11114
11152
  * This directive only supports ReactiveForms due to ngModel/ngControl encapsulation and changes emissions.
11115
11153
  */
11116
- class NaturalHttpPrefixDirective extends NaturalAbstractController {
11154
+ class NaturalHttpPrefixDirective {
11117
11155
  constructor() {
11118
- super();
11119
11156
  this.naturalHttpPrefix = null;
11120
11157
  }
11121
11158
  httpize($event) {
@@ -11127,7 +11164,7 @@ class NaturalHttpPrefixDirective extends NaturalAbstractController {
11127
11164
  }
11128
11165
  }
11129
11166
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHttpPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
11130
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalHttpPrefixDirective, isStandalone: true, selector: "[naturalHttpPrefix]", inputs: { naturalHttpPrefix: "naturalHttpPrefix" }, host: { listeners: { "ngModelChange": "httpize($event)" } }, usesInheritance: true, ngImport: i0 }); }
11167
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalHttpPrefixDirective, isStandalone: true, selector: "[naturalHttpPrefix]", inputs: { naturalHttpPrefix: "naturalHttpPrefix" }, host: { listeners: { "ngModelChange": "httpize($event)" } }, ngImport: i0 }); }
11131
11168
  }
11132
11169
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHttpPrefixDirective, decorators: [{
11133
11170
  type: Directive,
@@ -11135,7 +11172,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
11135
11172
  selector: '[naturalHttpPrefix]',
11136
11173
  standalone: true,
11137
11174
  }]
11138
- }], ctorParameters: function () { return []; }, propDecorators: { naturalHttpPrefix: [{
11175
+ }], propDecorators: { naturalHttpPrefix: [{
11139
11176
  type: Input
11140
11177
  }], httpize: [{
11141
11178
  type: HostListener,
@@ -11157,5 +11194,5 @@ const naturalProviders = [
11157
11194
  * Generated bundle index. Do not edit.
11158
11195
  */
11159
11196
 
11160
- export { AvatarService, LOCAL_STORAGE, NATURAL_DROPDOWN_DATA, NATURAL_ICONS_CONFIG, NATURAL_PERSISTENCE_VALIDATOR, NATURAL_SEO_CONFIG, NaturalAbstractController, NaturalAbstractDetail, NaturalAbstractEditableList, NaturalAbstractList, NaturalAbstractModelService, NaturalAbstractNavigableList, NaturalAbstractPanel, NaturalAlertService, NaturalAvatarComponent, NaturalCapitalizePipe, NaturalColumnsPickerComponent, NaturalConfirmComponent, NaturalDataSource, NaturalDebounceService, NaturalDetailHeaderComponent, NaturalDialogTriggerComponent, NaturalDropdownRef, NaturalEllipsisPipe, NaturalEnumPipe, NaturalEnumService, NaturalErrorHandler, NaturalFileComponent, NaturalFileDropDirective, NaturalFileSelectDirective, NaturalFileService, NaturalFixedButtonComponent, NaturalFixedButtonDetailComponent, NaturalHierarchicSelectorComponent, NaturalHierarchicSelectorDialogComponent, NaturalHierarchicSelectorDialogService, NaturalHierarchicSelectorService, NaturalHttpPrefixDirective, NaturalIconDirective, NaturalLinkMutationService, NaturalLinkableTabDirective, NaturalLoggerConfigExtra, NaturalLoggerConfigUrl, NaturalMatomoService, NaturalMemoryStorage, NaturalPanelsComponent, NaturalPanelsService, NaturalPersistenceService, NaturalQueryVariablesManager, NaturalRelationsComponent, NaturalSearchComponent, NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent, NaturalSeoService, NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent, NaturalSidenavService, NaturalSidenavStackService, NaturalSrcDensityDirective, NaturalStampComponent, NaturalSwissDatePipe, NaturalSwissParsingDateAdapter, NaturalTableButtonComponent, NaturalTimeAgoPipe, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeBooleanComponent, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeSelectComponent, TypeTextComponent, available, cancellableTimeout, cleanSameValues, collectErrors, copyToClipboard, debug, decimal, deepFreeze, deliverableEmail, ensureHttpPrefix, fallbackIfNoOpenedPanels, formatIsoDate, formatIsoDateTime, fromUrl, getForegroundColor, hasFilesAndProcessDate, ifValid, integer, isMutation, localStorageFactory, localStorageProvider, lowerCaseFirstLetter, makePlural, memoryLocalStorageProvider, memorySessionStorageProvider, mergeOverrideArray, money, naturalPanelsUrlMatcher, naturalProviders, provideErrorHandler, provideIcons, providePanels, provideSeo, relationsToIds, replaceObjectKeepingReference, replaceOperatorByField, replaceOperatorByName, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, wrapLike };
11197
+ export { AvatarService, LOCAL_STORAGE, NATURAL_DROPDOWN_DATA, NATURAL_ICONS_CONFIG, NATURAL_PERSISTENCE_VALIDATOR, NATURAL_SEO_CONFIG, NaturalAbstractController, NaturalAbstractDetail, NaturalAbstractEditableList, NaturalAbstractList, NaturalAbstractModelService, NaturalAbstractNavigableList, NaturalAbstractPanel, NaturalAlertService, NaturalAvatarComponent, NaturalCapitalizePipe, NaturalColumnsPickerComponent, NaturalConfirmComponent, NaturalDataSource, NaturalDebounceService, NaturalDetailHeaderComponent, NaturalDialogTriggerComponent, NaturalDropdownRef, NaturalEllipsisPipe, NaturalEnumPipe, NaturalEnumService, NaturalErrorHandler, NaturalFileComponent, NaturalFileDropDirective, NaturalFileSelectDirective, NaturalFileService, NaturalFixedButtonComponent, NaturalFixedButtonDetailComponent, NaturalHierarchicSelectorComponent, NaturalHierarchicSelectorDialogComponent, NaturalHierarchicSelectorDialogService, NaturalHierarchicSelectorService, NaturalHttpPrefixDirective, NaturalIconDirective, NaturalLinkMutationService, NaturalLinkableTabDirective, NaturalLoggerConfigExtra, NaturalLoggerConfigUrl, NaturalMatomoService, NaturalMemoryStorage, NaturalPanelsComponent, NaturalPanelsService, NaturalPersistenceService, NaturalQueryVariablesManager, NaturalRelationsComponent, NaturalSearchComponent, NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent, NaturalSeoService, NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent, NaturalSidenavService, NaturalSidenavStackService, NaturalSrcDensityDirective, NaturalStampComponent, NaturalSwissDatePipe, NaturalSwissParsingDateAdapter, NaturalTableButtonComponent, NaturalTimeAgoPipe, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeBooleanComponent, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeOptionsComponent, TypeSelectComponent, TypeTextComponent, available, cancellableTimeout, cleanSameValues, collectErrors, copyToClipboard, debug, decimal, deepFreeze, deliverableEmail, ensureHttpPrefix, fallbackIfNoOpenedPanels, formatIsoDate, formatIsoDateTime, fromUrl, getForegroundColor, hasFilesAndProcessDate, ifValid, integer, isMutation, localStorageFactory, localStorageProvider, lowerCaseFirstLetter, makePlural, memoryLocalStorageProvider, memorySessionStorageProvider, mergeOverrideArray, money, naturalPanelsUrlMatcher, naturalProviders, provideErrorHandler, provideIcons, providePanels, provideSeo, relationsToIds, replaceObjectKeepingReference, replaceOperatorByField, replaceOperatorByName, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, wrapLike };
11161
11198
  //# sourceMappingURL=ecodev-natural.mjs.map