@ecodev/natural 63.0.0 → 63.2.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.
- package/fesm2022/ecodev-natural-vanilla.mjs +7 -1
- package/fesm2022/ecodev-natural-vanilla.mjs.map +1 -1
- package/fesm2022/ecodev-natural.mjs +57 -37
- package/fesm2022/ecodev-natural.mjs.map +1 -1
- package/lib/classes/abstract-editable-list.d.ts +3 -2
- package/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.d.ts +1 -0
- package/lib/modules/dropdown-components/type-select/type-select.component.d.ts +1 -1
- package/lib/modules/file/component/file.component.d.ts +1 -1
- package/lib/modules/hierarchic-selector/classes/model-node.d.ts +1 -1
- package/lib/modules/relations/relations.component.d.ts +1 -1
- package/lib/modules/search/search/search.component.d.ts +3 -2
- package/lib/modules/select/select/select.component.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Component, Injectable, DestroyRef, HostListener, HostBinding, Directive, InjectionToken, ElementRef, viewChild, ViewEncapsulation, Injector, Input, PLATFORM_ID, signal, output, Pipe, Optional, Inject, LOCALE_ID, provideAppInitializer, input, computed,
|
|
2
|
+
import { inject, Component, Injectable, DestroyRef, HostListener, HostBinding, Directive, InjectionToken, ElementRef, viewChild, ViewEncapsulation, Injector, Input, PLATFORM_ID, signal, output, Pipe, Optional, Inject, LOCALE_ID, provideAppInitializer, input, computed, contentChild, TemplateRef, EnvironmentInjector, createEnvironmentInjector, createComponent, runInInjectionContext, ErrorHandler, importProvidersFrom } from '@angular/core';
|
|
3
3
|
import * as i1$2 from '@angular/forms';
|
|
4
4
|
import { FormGroup, FormArray, Validators, UntypedFormGroup, UntypedFormArray, FormControl, FormsModule, ReactiveFormsModule, UntypedFormControl, NgControl, FormControlDirective, FormControlName } from '@angular/forms';
|
|
5
5
|
import { ActivatedRoute, Router, NavigationStart, NavigationEnd, RouteConfigLoadStart, RouteConfigLoadEnd, PRIMARY_OUTLET, RouterLink, NavigationError, DefaultUrlSerializer, UrlTree } from '@angular/router';
|
|
@@ -9,7 +9,7 @@ import { MAT_DIALOG_DATA, MatDialogModule, MatDialog, MatDialogRef } from '@angu
|
|
|
9
9
|
import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
|
|
10
10
|
import * as i2 from '@angular/material/button';
|
|
11
11
|
import { MatButtonModule } from '@angular/material/button';
|
|
12
|
-
import { Observable, BehaviorSubject, of, timer, switchMap as switchMap$1, tap, endWith, last, EMPTY, finalize, Subject, merge as merge$1, first as first$1, take, takeUntil as takeUntil$1, map as map$1, ReplaySubject, debounceTime, raceWith, mergeMap, shareReplay, catchError, forkJoin, combineLatest, from, filter as filter$1, startWith as startWith$1, asyncScheduler } from 'rxjs';
|
|
12
|
+
import { Observable, BehaviorSubject, of, timer, switchMap as switchMap$1, tap, endWith, last, EMPTY, finalize, Subject, merge as merge$1, first as first$1, take, takeUntil as takeUntil$1, map as map$1, ReplaySubject, debounceTime, raceWith, mergeMap, shareReplay, catchError, forkJoin, combineLatest, from, filter as filter$1, startWith as startWith$1, asyncScheduler, throwError } from 'rxjs';
|
|
13
13
|
import { takeUntilDestroyed, outputFromObservable } from '@angular/core/rxjs-interop';
|
|
14
14
|
import { switchMap, first, map, filter, takeUntil, takeWhile, debounceTime as debounceTime$1, tap as tap$1, shareReplay as shareReplay$1, startWith, distinctUntilChanged, finalize as finalize$1, throttleTime } from 'rxjs/operators';
|
|
15
15
|
import * as i2$3 from '@angular/material/table';
|
|
@@ -361,6 +361,7 @@ function copyToClipboard(document, text) {
|
|
|
361
361
|
document.body.append(input);
|
|
362
362
|
input.value = text;
|
|
363
363
|
input.select();
|
|
364
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
364
365
|
document.execCommand('copy');
|
|
365
366
|
document.body.removeChild(input);
|
|
366
367
|
}
|
|
@@ -2548,8 +2549,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
2548
2549
|
*
|
|
2549
2550
|
* To access data of this component from a parent component, use:
|
|
2550
2551
|
*
|
|
2551
|
-
* ```
|
|
2552
|
-
*
|
|
2552
|
+
* ```ts
|
|
2553
|
+
* private readonly cmp = viewChildren(ComponentType);
|
|
2554
|
+
*
|
|
2553
2555
|
* this.cmp.getItems();
|
|
2554
2556
|
* ```
|
|
2555
2557
|
*
|
|
@@ -5712,7 +5714,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
5712
5714
|
|
|
5713
5715
|
class NaturalEllipsisPipe {
|
|
5714
5716
|
transform(value, limit) {
|
|
5715
|
-
return value.
|
|
5717
|
+
return value.substring(0, limit - 1) + (value.length > limit ? '…' : '');
|
|
5716
5718
|
}
|
|
5717
5719
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NaturalEllipsisPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
5718
5720
|
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: NaturalEllipsisPipe, isStandalone: true, name: "ellipsis" });
|
|
@@ -6412,7 +6414,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
6412
6414
|
class TypeSelectComponent {
|
|
6413
6415
|
destroyRef = inject(DestroyRef);
|
|
6414
6416
|
renderedValue = new BehaviorSubject('');
|
|
6415
|
-
list = viewChild
|
|
6417
|
+
list = viewChild(MatSelectionList);
|
|
6416
6418
|
requireValueCtrl = false;
|
|
6417
6419
|
operators = possibleDiscreteOperators;
|
|
6418
6420
|
operatorCtrl = new FormControl('is', { nonNullable: true });
|
|
@@ -6916,7 +6918,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
6916
6918
|
class NaturalSelectComponent extends AbstractSelect {
|
|
6917
6919
|
destroyRef = inject(DestroyRef);
|
|
6918
6920
|
autoTrigger = viewChild.required(MatAutocompleteTrigger);
|
|
6919
|
-
itemTemplate;
|
|
6921
|
+
itemTemplate = contentChild(TemplateRef);
|
|
6920
6922
|
/**
|
|
6921
6923
|
* Service with watchAll function that accepts queryVariables.
|
|
6922
6924
|
*/
|
|
@@ -7122,7 +7124,7 @@ class NaturalSelectComponent extends AbstractSelect {
|
|
|
7122
7124
|
return this.variablesManager.variables.value;
|
|
7123
7125
|
}
|
|
7124
7126
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", 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, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n panelWidth=\"auto !important\"\n [displayWith]=\"getDisplayFn()\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n>\n @for (item of items | async; track $index) {\n <mat-option [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"
|
|
7127
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: NaturalSelectComponent, isStandalone: true, selector: "natural-select", inputs: { service: "service", optionRequired: "optionRequired", searchField: "searchField", searchOperator: "searchOperator", filter: "filter", pageSize: "pageSize", disabled: "disabled" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "autoTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n panelWidth=\"auto !important\"\n [displayWith]=\"getDisplayFn()\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n>\n @for (item of items | async; track $index) {\n <mat-option [value]=\"item\">\n @let customTemplate = itemTemplate();\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"customTemplate ? customTemplate : 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 [subscriptSizing]=\"subscriptSizing()\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n [errorStateMatcher]=\"matcher\"\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger().openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\n />\n\n @if (hint()) {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n\n <!-- Meta data -->\n @if (!loading && showIcon) {\n <mat-icon matIconPrefix [naturalIcon]=\"icon\" />\n }\n\n @if (loading) {\n <div class=\"loading-wrapper\" matIconPrefix>\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"21\" [strokeWidth]=\"5\" />\n </div>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button mat-icon-button i18n-matTooltip matTooltip=\"D\u00E9s\u00E9lectionner\" (click)=\"clear()\">\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.dirty && internalCtrl.enabled && optionRequired) {\n <button mat-icon-button i18n-matTooltip matTooltip=\"Annuler la recherche\" (click)=\"reset()\">\n <mat-icon naturalIcon=\"undo\" />\n </button>\n }\n @if (internalCtrl.pristine && internalCtrl.value && navigateTo) {\n <button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\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 } @else if (error) {\n <mat-error>{{ error }}</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 color=\"warn\" mat-button (click)=\"clear()\">{{ 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: i3.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: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], 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"] }] });
|
|
7126
7128
|
}
|
|
7127
7129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NaturalSelectComponent, decorators: [{
|
|
7128
7130
|
type: Component,
|
|
@@ -7140,11 +7142,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
7140
7142
|
MatButtonModule,
|
|
7141
7143
|
MatTooltipModule,
|
|
7142
7144
|
RouterLink,
|
|
7143
|
-
], template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n panelWidth=\"auto !important\"\n [displayWith]=\"getDisplayFn()\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n>\n @for (item of items | async; track $index) {\n <mat-option [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"
|
|
7144
|
-
}], propDecorators: {
|
|
7145
|
-
type: ContentChild,
|
|
7146
|
-
args: [TemplateRef]
|
|
7147
|
-
}], service: [{
|
|
7145
|
+
], template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n panelWidth=\"auto !important\"\n [displayWith]=\"getDisplayFn()\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n>\n @for (item of items | async; track $index) {\n <mat-option [value]=\"item\">\n @let customTemplate = itemTemplate();\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"customTemplate ? customTemplate : 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 [subscriptSizing]=\"subscriptSizing()\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n [errorStateMatcher]=\"matcher\"\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger().openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\n />\n\n @if (hint()) {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n\n <!-- Meta data -->\n @if (!loading && showIcon) {\n <mat-icon matIconPrefix [naturalIcon]=\"icon\" />\n }\n\n @if (loading) {\n <div class=\"loading-wrapper\" matIconPrefix>\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"21\" [strokeWidth]=\"5\" />\n </div>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button mat-icon-button i18n-matTooltip matTooltip=\"D\u00E9s\u00E9lectionner\" (click)=\"clear()\">\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.dirty && internalCtrl.enabled && optionRequired) {\n <button mat-icon-button i18n-matTooltip matTooltip=\"Annuler la recherche\" (click)=\"reset()\">\n <mat-icon naturalIcon=\"undo\" />\n </button>\n }\n @if (internalCtrl.pristine && internalCtrl.value && navigateTo) {\n <button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\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 } @else if (error) {\n <mat-error>{{ error }}</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 color=\"warn\" mat-button (click)=\"clear()\">{{ 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"] }]
|
|
7146
|
+
}], propDecorators: { service: [{
|
|
7148
7147
|
type: Input,
|
|
7149
7148
|
args: [{ required: true }]
|
|
7150
7149
|
}], optionRequired: [{
|
|
@@ -7155,6 +7154,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
7155
7154
|
type: Input
|
|
7156
7155
|
}], filter: [{
|
|
7157
7156
|
type: Input
|
|
7157
|
+
}], pageSize: [{
|
|
7158
|
+
type: Input
|
|
7158
7159
|
}], disabled: [{
|
|
7159
7160
|
type: Input
|
|
7160
7161
|
}] } });
|
|
@@ -7180,7 +7181,7 @@ class TypeNaturalSelectComponent extends AbstractAssociationSelectComponent {
|
|
|
7180
7181
|
return selectedName;
|
|
7181
7182
|
}
|
|
7182
7183
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TypeNaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7183
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", 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 panelWidth=\"\" [formControl]=\"operatorCtrl\" [required]=\"true\">\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", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.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"] }] });
|
|
7184
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", 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 panelWidth=\"\" [formControl]=\"operatorCtrl\" [required]=\"true\">\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 [pageSize]=\"configuration.pageSize || 10\"\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", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.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", "pageSize", "disabled"] }] });
|
|
7184
7185
|
}
|
|
7185
7186
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TypeNaturalSelectComponent, decorators: [{
|
|
7186
7187
|
type: Component,
|
|
@@ -7191,7 +7192,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
7191
7192
|
MatSelectModule,
|
|
7192
7193
|
MatOptionModule,
|
|
7193
7194
|
NaturalSelectComponent,
|
|
7194
|
-
], 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 panelWidth=\"\" [formControl]=\"operatorCtrl\" [required]=\"true\">\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" }]
|
|
7195
|
+
], 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 panelWidth=\"\" [formControl]=\"operatorCtrl\" [required]=\"true\">\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 [pageSize]=\"configuration.pageSize || 10\"\n />\n }\n</form>\n" }]
|
|
7195
7196
|
}] });
|
|
7196
7197
|
|
|
7197
7198
|
/**
|
|
@@ -7948,7 +7949,7 @@ class NaturalInputComponent {
|
|
|
7948
7949
|
return selection;
|
|
7949
7950
|
}
|
|
7950
7951
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NaturalInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7951
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", 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, isSignal: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: 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
|
|
7952
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", 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, isSignal: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: 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 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 autocomplete=\"off\"\n matInput\n type=\"text\"\n [attr.size]=\"length\"\n [errorStateMatcher]=\"errorMatcher\"\n [formControl]=\"formCtrl\"\n [readonly]=\"(isDropdown() && !!selection) || isFlag()\"\n (blur)=\"search($event)\"\n (keydown.enter)=\"search($event)\"\n />\n\n @if (!facet && !selection) {\n <mat-icon naturalIcon=\"search\" matIconPrefix />\n }\n\n @if (selection) {\n <button mat-icon-button matIconSuffix (click)=\"clear()\">\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n\n @if (facet && !selection) {\n <button mat-icon-button matIconSuffix (click)=\"clear()\">\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: i2$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], 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"] }] });
|
|
7952
7953
|
}
|
|
7953
7954
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NaturalInputComponent, decorators: [{
|
|
7954
7955
|
type: Component,
|
|
@@ -7961,7 +7962,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
7961
7962
|
MatIconModule,
|
|
7962
7963
|
NaturalIconDirective,
|
|
7963
7964
|
MatButtonModule,
|
|
7964
|
-
], template: "<!-- click condition should match to allow click action only when no other button is visible -->\n<mat-form-field
|
|
7965
|
+
], template: "<!-- click condition should match to allow click action only when no other button is visible -->\n<mat-form-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 autocomplete=\"off\"\n matInput\n type=\"text\"\n [attr.size]=\"length\"\n [errorStateMatcher]=\"errorMatcher\"\n [formControl]=\"formCtrl\"\n [readonly]=\"(isDropdown() && !!selection) || isFlag()\"\n (blur)=\"search($event)\"\n (keydown.enter)=\"search($event)\"\n />\n\n @if (!facet && !selection) {\n <mat-icon naturalIcon=\"search\" matIconPrefix />\n }\n\n @if (selection) {\n <button mat-icon-button matIconSuffix (click)=\"clear()\">\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n\n @if (facet && !selection) {\n <button mat-icon-button matIconSuffix (click)=\"clear()\">\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"] }]
|
|
7965
7966
|
}], propDecorators: { placeholder: [{
|
|
7966
7967
|
type: Input
|
|
7967
7968
|
}], searchFieldName: [{
|
|
@@ -8047,12 +8048,16 @@ class NaturalSearchComponent {
|
|
|
8047
8048
|
/**
|
|
8048
8049
|
* Cleaned inputted selections. Allow valid selections to be manipulated inside component
|
|
8049
8050
|
*/
|
|
8050
|
-
innerSelections = [[]];
|
|
8051
|
+
#innerSelections = signal([[]]);
|
|
8052
|
+
/**
|
|
8053
|
+
* Cleaned inputted selections. This public API is useful because `selectionChange` does not emit changes made via `[selections]`
|
|
8054
|
+
*/
|
|
8055
|
+
innerSelections = this.#innerSelections.asReadonly();
|
|
8051
8056
|
/**
|
|
8052
8057
|
* Input to display at component initialisation
|
|
8053
8058
|
*/
|
|
8054
8059
|
set selections(selections) {
|
|
8055
|
-
this.
|
|
8060
|
+
this.#innerSelections.set(selections?.[0] ? deepClone(selections) : [[]]);
|
|
8056
8061
|
}
|
|
8057
8062
|
isMobile = this.breakpointObserver.observe(Breakpoints.XSmall).pipe(map$1(result => result.matches));
|
|
8058
8063
|
ngOnChanges() {
|
|
@@ -8061,26 +8066,32 @@ class NaturalSearchComponent {
|
|
|
8061
8066
|
}
|
|
8062
8067
|
}
|
|
8063
8068
|
updateGroup(groupSelections, groupIndex) {
|
|
8069
|
+
const selections = [...this.#innerSelections()];
|
|
8064
8070
|
for (let i = 0; i < groupSelections.length; i++) {
|
|
8065
|
-
|
|
8071
|
+
selections[groupIndex][i] = groupSelections[i];
|
|
8066
8072
|
}
|
|
8067
|
-
|
|
8068
|
-
this
|
|
8073
|
+
selections[groupIndex].length = groupSelections.length;
|
|
8074
|
+
this.#notify(selections);
|
|
8069
8075
|
}
|
|
8070
8076
|
addGroup() {
|
|
8071
|
-
this
|
|
8072
|
-
|
|
8077
|
+
const selections = [...this.#innerSelections()];
|
|
8078
|
+
selections.push([]);
|
|
8079
|
+
this.#notify(selections);
|
|
8073
8080
|
}
|
|
8074
8081
|
removeGroup(index) {
|
|
8075
|
-
this
|
|
8076
|
-
|
|
8082
|
+
const selections = [...this.#innerSelections()];
|
|
8083
|
+
selections.splice(index, 1);
|
|
8084
|
+
this.#notify(selections);
|
|
8077
8085
|
}
|
|
8078
8086
|
clear() {
|
|
8079
|
-
this
|
|
8080
|
-
|
|
8087
|
+
this.#notify([[]]);
|
|
8088
|
+
}
|
|
8089
|
+
#notify(selections) {
|
|
8090
|
+
this.#innerSelections.set(selections);
|
|
8091
|
+
this.selectionChange.emit(selections);
|
|
8081
8092
|
}
|
|
8082
8093
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NaturalSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8083
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", 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 [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n [dropdownTitle]=\"dropdownTitle\"\n (selectionChange)=\"updateGroup($event, $index)\"\n />\n <div class=\"endOfRowButton\">\n @if (
|
|
8094
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", 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 [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n [dropdownTitle]=\"dropdownTitle\"\n (selectionChange)=\"updateGroup($event, $index)\"\n />\n <div class=\"endOfRowButton\">\n @if ($count > 1) {\n <button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Supprimer ce groupe\"\n (click)=\"removeGroup($index)\"\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 mat-icon-button i18n-matTooltip matTooltip=\"Ajouter un groupe logique OU\" (click)=\"addGroup()\">\n <mat-icon naturalIcon=\"add\" />\n </button>\n }\n\n <button\n mat-icon-button\n class=\"clear-button\"\n i18n-matTooltip\n matTooltip=\"Annuler la recherche\"\n (click)=\"clear()\"\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: i4$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }] });
|
|
8084
8095
|
}
|
|
8085
8096
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NaturalSearchComponent, decorators: [{
|
|
8086
8097
|
type: Component,
|
|
@@ -8092,7 +8103,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
8092
8103
|
MatIconModule,
|
|
8093
8104
|
NaturalIconDirective,
|
|
8094
8105
|
MatDividerModule,
|
|
8095
|
-
], 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 [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n [dropdownTitle]=\"dropdownTitle\"\n (selectionChange)=\"updateGroup($event, $index)\"\n />\n <div class=\"endOfRowButton\">\n @if (
|
|
8106
|
+
], 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 [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n [dropdownTitle]=\"dropdownTitle\"\n (selectionChange)=\"updateGroup($event, $index)\"\n />\n <div class=\"endOfRowButton\">\n @if ($count > 1) {\n <button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Supprimer ce groupe\"\n (click)=\"removeGroup($index)\"\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 mat-icon-button i18n-matTooltip matTooltip=\"Ajouter un groupe logique OU\" (click)=\"addGroup()\">\n <mat-icon naturalIcon=\"add\" />\n </button>\n }\n\n <button\n mat-icon-button\n class=\"clear-button\"\n i18n-matTooltip\n matTooltip=\"Annuler la recherche\"\n (click)=\"clear()\"\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"] }]
|
|
8096
8107
|
}], propDecorators: { placeholder: [{
|
|
8097
8108
|
type: Input
|
|
8098
8109
|
}], facets: [{
|
|
@@ -8158,8 +8169,11 @@ class NaturalHierarchicSelectorComponent {
|
|
|
8158
8169
|
* Controller for nodes selection
|
|
8159
8170
|
*/
|
|
8160
8171
|
flatNodesSelection;
|
|
8172
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
8161
8173
|
treeControl;
|
|
8174
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
8162
8175
|
treeFlattener;
|
|
8176
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
8163
8177
|
dataSource;
|
|
8164
8178
|
loading = false;
|
|
8165
8179
|
/**
|
|
@@ -8184,10 +8198,13 @@ class NaturalHierarchicSelectorComponent {
|
|
|
8184
8198
|
// Init tree checkbox selectors
|
|
8185
8199
|
this.flatNodesSelection = new SelectionModel(this.multiple);
|
|
8186
8200
|
// Tree controllers and manipulators
|
|
8201
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
8187
8202
|
this.treeFlattener = new MatTreeFlattener(this.transformer(), this.getLevel(), this.isExpandable(), this.getChildren());
|
|
8203
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
8188
8204
|
this.treeControl = new FlatTreeControl(this.getLevel(), this.isExpandable());
|
|
8189
8205
|
// The dataSource contains a nested ModelNodes list. Each ModelNode has a child attribute that returns an observable.
|
|
8190
8206
|
// The dataSource contains a flat representation of the nested ModelNodes that is generated by the treeFlattener related functions
|
|
8207
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
8191
8208
|
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
|
|
8192
8209
|
// Update dataSource when receiving new list -> we assign the whole tree
|
|
8193
8210
|
// The treeControl and treeFlattener will generate the displayed tree
|
|
@@ -9383,6 +9400,7 @@ class NaturalFileComponent {
|
|
|
9383
9400
|
subject.next(btoa(ev.target.result));
|
|
9384
9401
|
subject.complete();
|
|
9385
9402
|
});
|
|
9403
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
9386
9404
|
reader.readAsBinaryString(file);
|
|
9387
9405
|
return subject.asObservable();
|
|
9388
9406
|
}
|
|
@@ -10023,7 +10041,7 @@ class NaturalRelationsComponent {
|
|
|
10023
10041
|
linkMutationService = inject(NaturalLinkMutationService);
|
|
10024
10042
|
hierarchicSelectorDialog = inject(NaturalHierarchicSelectorDialogService);
|
|
10025
10043
|
select = viewChild(NaturalSelectComponent);
|
|
10026
|
-
itemTemplate;
|
|
10044
|
+
itemTemplate = contentChild(TemplateRef);
|
|
10027
10045
|
_service;
|
|
10028
10046
|
get service() {
|
|
10029
10047
|
return this._service;
|
|
@@ -10190,7 +10208,7 @@ class NaturalRelationsComponent {
|
|
|
10190
10208
|
return this.hierarchicSelectorConfig.find(c => !!c.selectableAtKey)?.selectableAtKey;
|
|
10191
10209
|
}
|
|
10192
10210
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NaturalRelationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10193
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", 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, isSignal: 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 class=\"natural-row-click\" mat-table [dataSource]=\"dataSource\">\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]=\"
|
|
10211
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", 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, isSignal: true }], viewQueries: [{ propertyName: "select", first: true, predicate: NaturalSelectComponent, descendants: true, isSignal: 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 class=\"natural-row-click\" mat-table [dataSource]=\"dataSource\">\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 @let customTemplate = itemTemplate();\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"customTemplate ? customTemplate : 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 color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n [disabled]=\"removing.has(element)\"\n (click)=\"removeRelation(element)\"\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 [length]=\"dataSource.data.length || 0\"\n [pageIndex]=\"dataSource.data.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource.data.pageSize || 0\"\n (page)=\"pagination($event)\"\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 class=\"loading\" mode=\"indeterminate\" [diameter]=\"40\" />\n }\n</div>\n\n@if (!disabled) {\n @if (hierarchicSelectorConfig) {\n <div>\n <button color=\"primary\" mat-flat-button (click)=\"openNaturalHierarchicSelector()\">{{ placeholder }}</button>\n </div>\n } @else {\n <natural-select\n [displayWith]=\"$any(getDisplayFn())\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n (selectionChange)=\"addRelations([$event])\"\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$3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2$3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2$3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2$3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2$3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2$3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2$3.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", "pageSize", "disabled"] }] });
|
|
10194
10212
|
}
|
|
10195
10213
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NaturalRelationsComponent, decorators: [{
|
|
10196
10214
|
type: Component,
|
|
@@ -10204,11 +10222,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
10204
10222
|
MatPaginatorModule,
|
|
10205
10223
|
MatProgressSpinnerModule,
|
|
10206
10224
|
NaturalSelectComponent,
|
|
10207
|
-
], template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table class=\"natural-row-click\" mat-table [dataSource]=\"dataSource\">\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]=\"
|
|
10208
|
-
}], propDecorators: {
|
|
10209
|
-
type: ContentChild,
|
|
10210
|
-
args: [TemplateRef]
|
|
10211
|
-
}], service: [{
|
|
10225
|
+
], template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table class=\"natural-row-click\" mat-table [dataSource]=\"dataSource\">\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 @let customTemplate = itemTemplate();\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"customTemplate ? customTemplate : 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 color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n [disabled]=\"removing.has(element)\"\n (click)=\"removeRelation(element)\"\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 [length]=\"dataSource.data.length || 0\"\n [pageIndex]=\"dataSource.data.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource.data.pageSize || 0\"\n (page)=\"pagination($event)\"\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 class=\"loading\" mode=\"indeterminate\" [diameter]=\"40\" />\n }\n</div>\n\n@if (!disabled) {\n @if (hierarchicSelectorConfig) {\n <div>\n <button color=\"primary\" mat-flat-button (click)=\"openNaturalHierarchicSelector()\">{{ placeholder }}</button>\n </div>\n } @else {\n <natural-select\n [displayWith]=\"$any(getDisplayFn())\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n (selectionChange)=\"addRelations([$event])\"\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"] }]
|
|
10226
|
+
}], propDecorators: { service: [{
|
|
10212
10227
|
type: Input,
|
|
10213
10228
|
args: [{ required: true }]
|
|
10214
10229
|
}], placeholder: [{
|
|
@@ -11510,6 +11525,11 @@ function getOperations(req) {
|
|
|
11510
11525
|
* The server will validate the signature before executing the GraphQL query.
|
|
11511
11526
|
*/
|
|
11512
11527
|
function graphqlQuerySigner(key) {
|
|
11528
|
+
// Validates the configuration exactly 1 time (not for
|
|
11529
|
+
// every query), and if not reject **all** HTTP requests
|
|
11530
|
+
if (!key) {
|
|
11531
|
+
return () => throwError(() => new Error('graphqlQuerySigner requires a non-empty key. Configure it in local.php under signedQueries.'));
|
|
11532
|
+
}
|
|
11513
11533
|
return (req, next) => {
|
|
11514
11534
|
const mustSign = req.method === 'POST' && /\/graphql(\?|$)/.exec(req.url);
|
|
11515
11535
|
if (!mustSign) {
|