@ecodev/natural 62.1.0 → 62.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/classes/abstract-list.mjs +4 -2
- package/esm2022/lib/classes/crypto.mjs +23 -0
- package/esm2022/lib/classes/signing.mjs +10 -8
- package/esm2022/lib/modules/avatar/component/avatar.component.mjs +3 -3
- package/esm2022/lib/modules/avatar/sources/gravatar.mjs +5 -5
- package/esm2022/lib/modules/avatar/sources/image.mjs +2 -2
- package/esm2022/lib/modules/avatar/sources/initials.mjs +2 -2
- package/esm2022/lib/modules/avatar/sources/source.mjs +1 -1
- package/esm2022/lib/modules/select/abstract-select.component.mjs +7 -7
- package/esm2022/lib/modules/select/select/select.component.mjs +3 -3
- package/esm2022/lib/modules/select/select-enum/select-enum.component.mjs +3 -3
- package/esm2022/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +3 -3
- package/fesm2022/ecodev-natural.mjs +50 -232
- package/fesm2022/ecodev-natural.mjs.map +1 -1
- package/lib/classes/crypto.d.ts +8 -0
- package/lib/modules/avatar/sources/gravatar.d.ts +2 -2
- package/lib/modules/avatar/sources/image.d.ts +1 -1
- package/lib/modules/avatar/sources/initials.d.ts +1 -1
- package/lib/modules/avatar/sources/source.d.ts +1 -1
- package/lib/modules/select/abstract-select.component.d.ts +5 -3
- package/package.json +1 -2
- package/esm2022/lib/modules/avatar/service/md5.mjs +0 -207
- package/lib/modules/avatar/service/md5.d.ts +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Component, Injectable, DestroyRef, Directive, HostBinding, HostListener, InjectionToken, ElementRef, TemplateRef, ViewEncapsulation, ViewChild, Injector, Input, EventEmitter, Output, Pipe, Optional, Inject, LOCALE_ID, APP_INITIALIZER, ContentChild, EnvironmentInjector, createEnvironmentInjector, createComponent,
|
|
2
|
+
import { inject, Component, Injectable, DestroyRef, Directive, HostBinding, HostListener, InjectionToken, ElementRef, TemplateRef, ViewEncapsulation, ViewChild, Injector, Input, EventEmitter, Output, Pipe, Optional, Inject, LOCALE_ID, APP_INITIALIZER, input, computed, ContentChild, EnvironmentInjector, createEnvironmentInjector, createComponent, runInInjectionContext, PLATFORM_ID, 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';
|
|
@@ -69,7 +69,6 @@ import { MatPaginatorModule } from '@angular/material/paginator';
|
|
|
69
69
|
import * as i1$6 from '@angular/material/sidenav';
|
|
70
70
|
import { MatSidenav, MatSidenavModule } from '@angular/material/sidenav';
|
|
71
71
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
72
|
-
import { HmacSHA256 } from 'crypto-es/lib/sha256';
|
|
73
72
|
|
|
74
73
|
class NaturalConfirmComponent {
|
|
75
74
|
data = inject(MAT_DIALOG_DATA);
|
|
@@ -3826,7 +3825,9 @@ class NaturalAbstractList extends NaturalAbstractPanel {
|
|
|
3826
3825
|
.pipe(takeUntilDestroyed(this.destroyRef), filter(event => event instanceof NavigationEnd && isPopState))
|
|
3827
3826
|
.subscribe(() => {
|
|
3828
3827
|
isPopState = false; // reset flag
|
|
3829
|
-
|
|
3828
|
+
const selections = fromUrl(this.persistenceService.getFromUrl('ns', this.route));
|
|
3829
|
+
this.naturalSearchSelections = selections;
|
|
3830
|
+
this.search(selections);
|
|
3830
3831
|
});
|
|
3831
3832
|
}
|
|
3832
3833
|
/**
|
|
@@ -6607,9 +6608,11 @@ class ExternalFormControlMatcher extends ErrorStateMatcher {
|
|
|
6607
6608
|
class AbstractSelect {
|
|
6608
6609
|
placeholder;
|
|
6609
6610
|
/**
|
|
6610
|
-
* Mat-hint
|
|
6611
|
+
* Mat-hint, if given, and it is non-empty, then `subscriptSizing` will
|
|
6612
|
+
* automatically be set to `dynamic` to allow for long, wrapping text.
|
|
6611
6613
|
*/
|
|
6612
|
-
hint =
|
|
6614
|
+
hint = input();
|
|
6615
|
+
subscriptSizing = computed(() => (this.hint() ? 'dynamic' : 'fixed'));
|
|
6613
6616
|
/**
|
|
6614
6617
|
* If given an error message, it will be displayed in a `<mat-error>`, but only if the control
|
|
6615
6618
|
* is actually in an error state via one of its validators.
|
|
@@ -6780,15 +6783,13 @@ class AbstractSelect {
|
|
|
6780
6783
|
this.internalCtrl.updateValueAndValidity();
|
|
6781
6784
|
}
|
|
6782
6785
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6783
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
6786
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.3", type: AbstractSelect, isStandalone: true, inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, navigateTo: { classPropertyName: "navigateTo", publicName: "navigateTo", isSignal: false, isRequired: false, transformFunction: null }, clearLabel: { classPropertyName: "clearLabel", publicName: "clearLabel", isSignal: false, isRequired: false, transformFunction: null }, showIcon: { classPropertyName: "showIcon", publicName: "showIcon", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", blur: "blur" }, ngImport: i0 });
|
|
6784
6787
|
}
|
|
6785
6788
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: AbstractSelect, decorators: [{
|
|
6786
6789
|
type: Directive,
|
|
6787
6790
|
args: [{ standalone: true }]
|
|
6788
6791
|
}], ctorParameters: () => [], propDecorators: { placeholder: [{
|
|
6789
6792
|
type: Input
|
|
6790
|
-
}], hint: [{
|
|
6791
|
-
type: Input
|
|
6792
6793
|
}], error: [{
|
|
6793
6794
|
type: Input
|
|
6794
6795
|
}], required: [{
|
|
@@ -7052,7 +7053,7 @@ class NaturalSelectComponent extends AbstractSelect {
|
|
|
7052
7053
|
return this.variablesManager.variables.value;
|
|
7053
7054
|
}
|
|
7054
7055
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7055
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectComponent, isStandalone: true, selector: "natural-select", inputs: { service: "service", optionRequired: "optionRequired", searchField: "searchField", searchOperator: "searchOperator", filter: "filter", disabled: "disabled" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "autoTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n @for (item of items | async; track $index) {\n <mat-option [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n />\n </mat-option>\n }\n @if (hasMoreItems) {\n <div class=\"mat-caption\" i18n style=\"padding: 5px 10px\">Saisir pour chercher parmi {{ nbTotal }} r\u00E9sultats</div>\n }\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <!-- Meta data -->\n @if (!loading && showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (loading) {\n <div class=\"loading-wrapper\" matIconPrefix>\n <mat-progress-spinner [diameter]=\"21\" [strokeWidth]=\"5\" mode=\"indeterminate\" />\n </div>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button (click)=\"clear()\" mat-icon-button i18n-matTooltip matTooltip=\"D\u00E9s\u00E9lectionner\">\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.dirty && internalCtrl.enabled && optionRequired) {\n <button (click)=\"reset()\" mat-icon-button i18n-matTooltip matTooltip=\"Annuler la recherche\">\n <mat-icon naturalIcon=\"undo\" />\n </button>\n }\n @if (internalCtrl.pristine && internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @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 (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}:host .loading-wrapper{display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"], dependencies: [{ kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i1$5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1$5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
7056
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectComponent, isStandalone: true, selector: "natural-select", inputs: { service: "service", optionRequired: "optionRequired", searchField: "searchField", searchOperator: "searchOperator", filter: "filter", disabled: "disabled" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "autoTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n @for (item of items | async; track $index) {\n <mat-option [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n />\n </mat-option>\n }\n @if (hasMoreItems) {\n <div class=\"mat-caption\" i18n style=\"padding: 5px 10px\">Saisir pour chercher parmi {{ nbTotal }} r\u00E9sultats</div>\n }\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field [subscriptSizing]=\"subscriptSizing()\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n @if (hint()) {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n\n <!-- Meta data -->\n @if (!loading && showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (loading) {\n <div class=\"loading-wrapper\" matIconPrefix>\n <mat-progress-spinner [diameter]=\"21\" [strokeWidth]=\"5\" mode=\"indeterminate\" />\n </div>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button (click)=\"clear()\" mat-icon-button i18n-matTooltip matTooltip=\"D\u00E9s\u00E9lectionner\">\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.dirty && internalCtrl.enabled && optionRequired) {\n <button (click)=\"reset()\" mat-icon-button i18n-matTooltip matTooltip=\"Annuler la recherche\">\n <mat-icon naturalIcon=\"undo\" />\n </button>\n }\n @if (internalCtrl.pristine && internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @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 (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}:host .loading-wrapper{display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"], dependencies: [{ kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i1$5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1$5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
7056
7057
|
}
|
|
7057
7058
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectComponent, decorators: [{
|
|
7058
7059
|
type: Component,
|
|
@@ -7070,7 +7071,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
|
|
|
7070
7071
|
MatButtonModule,
|
|
7071
7072
|
MatTooltipModule,
|
|
7072
7073
|
RouterLink,
|
|
7073
|
-
], template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n @for (item of items | async; track $index) {\n <mat-option [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n />\n </mat-option>\n }\n @if (hasMoreItems) {\n <div class=\"mat-caption\" i18n style=\"padding: 5px 10px\">Saisir pour chercher parmi {{ nbTotal }} r\u00E9sultats</div>\n }\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <!-- Meta data -->\n @if (!loading && showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (loading) {\n <div class=\"loading-wrapper\" matIconPrefix>\n <mat-progress-spinner [diameter]=\"21\" [strokeWidth]=\"5\" mode=\"indeterminate\" />\n </div>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button (click)=\"clear()\" mat-icon-button i18n-matTooltip matTooltip=\"D\u00E9s\u00E9lectionner\">\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.dirty && internalCtrl.enabled && optionRequired) {\n <button (click)=\"reset()\" mat-icon-button i18n-matTooltip matTooltip=\"Annuler la recherche\">\n <mat-icon naturalIcon=\"undo\" />\n </button>\n }\n @if (internalCtrl.pristine && internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @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 (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}:host .loading-wrapper{display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"] }]
|
|
7074
|
+
], template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n @for (item of items | async; track $index) {\n <mat-option [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n />\n </mat-option>\n }\n @if (hasMoreItems) {\n <div class=\"mat-caption\" i18n style=\"padding: 5px 10px\">Saisir pour chercher parmi {{ nbTotal }} r\u00E9sultats</div>\n }\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field [subscriptSizing]=\"subscriptSizing()\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n @if (hint()) {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n\n <!-- Meta data -->\n @if (!loading && showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (loading) {\n <div class=\"loading-wrapper\" matIconPrefix>\n <mat-progress-spinner [diameter]=\"21\" [strokeWidth]=\"5\" mode=\"indeterminate\" />\n </div>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button (click)=\"clear()\" mat-icon-button i18n-matTooltip matTooltip=\"D\u00E9s\u00E9lectionner\">\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.dirty && internalCtrl.enabled && optionRequired) {\n <button (click)=\"reset()\" mat-icon-button i18n-matTooltip matTooltip=\"Annuler la recherche\">\n <mat-icon naturalIcon=\"undo\" />\n </button>\n }\n @if (internalCtrl.pristine && internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @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 (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}:host .loading-wrapper{display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"] }]
|
|
7074
7075
|
}], propDecorators: { autoTrigger: [{
|
|
7075
7076
|
type: ViewChild,
|
|
7076
7077
|
args: [MatAutocompleteTrigger]
|
|
@@ -10247,11 +10248,11 @@ class NaturalSelectEnumComponent extends AbstractSelect {
|
|
|
10247
10248
|
throw new Error('This should never be called');
|
|
10248
10249
|
}
|
|
10249
10250
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectEnumComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
10250
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectEnumComponent, isStandalone: true, selector: "natural-select-enum", inputs: { enumName: "enumName", nullLabel: "nullLabel", optionDisabled: "optionDisabled", multiple: "multiple" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"onBlur()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n @if (nullLabel) {\n <mat-option [value]=\"null\">{{ nullLabel }}</mat-option>\n }\n @for (item of items | async; track item.value) {\n <mat-option [value]=\"item.value\" [disabled]=\"optionDisabled ? optionDisabled(item) : false\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @else if (error) {\n <mat-error>{{ error }}</mat-error>\n }\n</mat-form-field>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatOptionModule }] });
|
|
10251
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectEnumComponent, isStandalone: true, selector: "natural-select-enum", inputs: { enumName: "enumName", nullLabel: "nullLabel", optionDisabled: "optionDisabled", multiple: "multiple" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field [subscriptSizing]=\"subscriptSizing()\">\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"onBlur()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n @if (nullLabel) {\n <mat-option [value]=\"null\">{{ nullLabel }}</mat-option>\n }\n @for (item of items | async; track item.value) {\n <mat-option [value]=\"item.value\" [disabled]=\"optionDisabled ? optionDisabled(item) : false\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n\n @if (hint()) {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @else if (error) {\n <mat-error>{{ error }}</mat-error>\n }\n</mat-form-field>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatOptionModule }] });
|
|
10251
10252
|
}
|
|
10252
10253
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectEnumComponent, decorators: [{
|
|
10253
10254
|
type: Component,
|
|
10254
|
-
args: [{ selector: 'natural-select-enum', standalone: true, imports: [MatFormFieldModule, MatSelectModule, FormsModule, ReactiveFormsModule, CommonModule, MatOptionModule], template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"onBlur()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n @if (nullLabel) {\n <mat-option [value]=\"null\">{{ nullLabel }}</mat-option>\n }\n @for (item of items | async; track item.value) {\n <mat-option [value]=\"item.value\" [disabled]=\"optionDisabled ? optionDisabled(item) : false\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @else if (error) {\n <mat-error>{{ error }}</mat-error>\n }\n</mat-form-field>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
10255
|
+
args: [{ selector: 'natural-select-enum', standalone: true, imports: [MatFormFieldModule, MatSelectModule, FormsModule, ReactiveFormsModule, CommonModule, MatOptionModule], template: "<mat-form-field [subscriptSizing]=\"subscriptSizing()\">\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"onBlur()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n @if (nullLabel) {\n <mat-option [value]=\"null\">{{ nullLabel }}</mat-option>\n }\n @for (item of items | async; track item.value) {\n <mat-option [value]=\"item.value\" [disabled]=\"optionDisabled ? optionDisabled(item) : false\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n\n @if (hint()) {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @else if (error) {\n <mat-error>{{ error }}</mat-error>\n }\n</mat-form-field>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
10255
10256
|
}], propDecorators: { enumName: [{
|
|
10256
10257
|
type: Input,
|
|
10257
10258
|
args: [{ required: true }]
|
|
@@ -10377,7 +10378,7 @@ class NaturalSelectHierarchicComponent extends AbstractSelect {
|
|
|
10377
10378
|
return this.config?.find(c => !!c.selectableAtKey)?.selectableAtKey;
|
|
10378
10379
|
}
|
|
10379
10380
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectHierarchicComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
10380
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectHierarchicComponent, isStandalone: true, selector: "natural-select-hierarchic", inputs: { selectLabel: "selectLabel", config: "config", filters: "filters" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n @if (showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @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 (showSelectButton() || showClearButton()) {\n <div class=\"external-buttons\">\n @if (showSelectButton()) {\n <button (click)=\"openDialog()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n }\n @if (showClearButton()) {\n <button (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
10381
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.3", type: NaturalSelectHierarchicComponent, isStandalone: true, selector: "natural-select-hierarchic", inputs: { selectLabel: "selectLabel", config: "config", filters: "filters" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field [subscriptSizing]=\"subscriptSizing()\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n @if (showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (hint()) {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @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 (showSelectButton() || showClearButton()) {\n <div class=\"external-buttons\">\n @if (showSelectButton()) {\n <button (click)=\"openDialog()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n }\n @if (showClearButton()) {\n <button (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
10381
10382
|
}
|
|
10382
10383
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: NaturalSelectHierarchicComponent, decorators: [{
|
|
10383
10384
|
type: Component,
|
|
@@ -10391,7 +10392,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
|
|
|
10391
10392
|
MatButtonModule,
|
|
10392
10393
|
MatTooltipModule,
|
|
10393
10394
|
RouterLink,
|
|
10394
|
-
], template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n @if (showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (hint) {\n <mat-hint>{{ hint }}</mat-hint>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @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 (showSelectButton() || showClearButton()) {\n <div class=\"external-buttons\">\n @if (showSelectButton()) {\n <button (click)=\"openDialog()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n }\n @if (showClearButton()) {\n <button (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"] }]
|
|
10395
|
+
], template: "<mat-form-field [subscriptSizing]=\"subscriptSizing()\">\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n @if (showIcon) {\n <mat-icon [naturalIcon]=\"icon\" matIconPrefix />\n }\n\n @if (hint()) {\n <mat-hint>{{ hint() }}</mat-hint>\n }\n\n <!-- Clear button -->\n <div matIconSuffix>\n @if (internalCtrl.value && internalCtrl.enabled && !clearLabel) {\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\" />\n </button>\n }\n @if (internalCtrl.value && navigateTo) {\n <button\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\" />\n </button>\n }\n </div>\n\n @if (hasRequiredError()) {\n <mat-error i18n>Ce champ est requis</mat-error>\n } @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 (showSelectButton() || showClearButton()) {\n <div class=\"external-buttons\">\n @if (showSelectButton()) {\n <button (click)=\"openDialog()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n }\n @if (showClearButton()) {\n <button (click)=\"clear()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"] }]
|
|
10395
10396
|
}], propDecorators: { selectLabel: [{
|
|
10396
10397
|
type: Input
|
|
10397
10398
|
}], config: [{
|
|
@@ -10865,211 +10866,27 @@ class Source {
|
|
|
10865
10866
|
}
|
|
10866
10867
|
}
|
|
10867
10868
|
|
|
10868
|
-
function
|
|
10869
|
-
const
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
const
|
|
10877
|
-
const
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
const
|
|
10885
|
-
const
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
let d = 0x10325476;
|
|
10890
|
-
for (let k = 0; k < x.length; k += 16) {
|
|
10891
|
-
const AA = a;
|
|
10892
|
-
const BB = b;
|
|
10893
|
-
const CC = c;
|
|
10894
|
-
const DD = d;
|
|
10895
|
-
a = FF(a, b, c, d, x[k], S11, 0xd76aa478);
|
|
10896
|
-
d = FF(d, a, b, c, x[k + 1], S12, 0xe8c7b756);
|
|
10897
|
-
c = FF(c, d, a, b, x[k + 2], S13, 0x242070db);
|
|
10898
|
-
b = FF(b, c, d, a, x[k + 3], S14, 0xc1bdceee);
|
|
10899
|
-
a = FF(a, b, c, d, x[k + 4], S11, 0xf57c0faf);
|
|
10900
|
-
d = FF(d, a, b, c, x[k + 5], S12, 0x4787c62a);
|
|
10901
|
-
c = FF(c, d, a, b, x[k + 6], S13, 0xa8304613);
|
|
10902
|
-
b = FF(b, c, d, a, x[k + 7], S14, 0xfd469501);
|
|
10903
|
-
a = FF(a, b, c, d, x[k + 8], S11, 0x698098d8);
|
|
10904
|
-
d = FF(d, a, b, c, x[k + 9], S12, 0x8b44f7af);
|
|
10905
|
-
c = FF(c, d, a, b, x[k + 10], S13, 0xffff5bb1);
|
|
10906
|
-
b = FF(b, c, d, a, x[k + 11], S14, 0x895cd7be);
|
|
10907
|
-
a = FF(a, b, c, d, x[k + 12], S11, 0x6b901122);
|
|
10908
|
-
d = FF(d, a, b, c, x[k + 13], S12, 0xfd987193);
|
|
10909
|
-
c = FF(c, d, a, b, x[k + 14], S13, 0xa679438e);
|
|
10910
|
-
b = FF(b, c, d, a, x[k + 15], S14, 0x49b40821);
|
|
10911
|
-
a = GG(a, b, c, d, x[k + 1], S21, 0xf61e2562);
|
|
10912
|
-
d = GG(d, a, b, c, x[k + 6], S22, 0xc040b340);
|
|
10913
|
-
c = GG(c, d, a, b, x[k + 11], S23, 0x265e5a51);
|
|
10914
|
-
b = GG(b, c, d, a, x[k], S24, 0xe9b6c7aa);
|
|
10915
|
-
a = GG(a, b, c, d, x[k + 5], S21, 0xd62f105d);
|
|
10916
|
-
d = GG(d, a, b, c, x[k + 10], S22, 0x2441453);
|
|
10917
|
-
c = GG(c, d, a, b, x[k + 15], S23, 0xd8a1e681);
|
|
10918
|
-
b = GG(b, c, d, a, x[k + 4], S24, 0xe7d3fbc8);
|
|
10919
|
-
a = GG(a, b, c, d, x[k + 9], S21, 0x21e1cde6);
|
|
10920
|
-
d = GG(d, a, b, c, x[k + 14], S22, 0xc33707d6);
|
|
10921
|
-
c = GG(c, d, a, b, x[k + 3], S23, 0xf4d50d87);
|
|
10922
|
-
b = GG(b, c, d, a, x[k + 8], S24, 0x455a14ed);
|
|
10923
|
-
a = GG(a, b, c, d, x[k + 13], S21, 0xa9e3e905);
|
|
10924
|
-
d = GG(d, a, b, c, x[k + 2], S22, 0xfcefa3f8);
|
|
10925
|
-
c = GG(c, d, a, b, x[k + 7], S23, 0x676f02d9);
|
|
10926
|
-
b = GG(b, c, d, a, x[k + 12], S24, 0x8d2a4c8a);
|
|
10927
|
-
a = HH(a, b, c, d, x[k + 5], S31, 0xfffa3942);
|
|
10928
|
-
d = HH(d, a, b, c, x[k + 8], S32, 0x8771f681);
|
|
10929
|
-
c = HH(c, d, a, b, x[k + 11], S33, 0x6d9d6122);
|
|
10930
|
-
b = HH(b, c, d, a, x[k + 14], S34, 0xfde5380c);
|
|
10931
|
-
a = HH(a, b, c, d, x[k + 1], S31, 0xa4beea44);
|
|
10932
|
-
d = HH(d, a, b, c, x[k + 4], S32, 0x4bdecfa9);
|
|
10933
|
-
c = HH(c, d, a, b, x[k + 7], S33, 0xf6bb4b60);
|
|
10934
|
-
b = HH(b, c, d, a, x[k + 10], S34, 0xbebfbc70);
|
|
10935
|
-
a = HH(a, b, c, d, x[k + 13], S31, 0x289b7ec6);
|
|
10936
|
-
d = HH(d, a, b, c, x[k], S32, 0xeaa127fa);
|
|
10937
|
-
c = HH(c, d, a, b, x[k + 3], S33, 0xd4ef3085);
|
|
10938
|
-
b = HH(b, c, d, a, x[k + 6], S34, 0x4881d05);
|
|
10939
|
-
a = HH(a, b, c, d, x[k + 9], S31, 0xd9d4d039);
|
|
10940
|
-
d = HH(d, a, b, c, x[k + 12], S32, 0xe6db99e5);
|
|
10941
|
-
c = HH(c, d, a, b, x[k + 15], S33, 0x1fa27cf8);
|
|
10942
|
-
b = HH(b, c, d, a, x[k + 2], S34, 0xc4ac5665);
|
|
10943
|
-
a = II(a, b, c, d, x[k], S41, 0xf4292244);
|
|
10944
|
-
d = II(d, a, b, c, x[k + 7], S42, 0x432aff97);
|
|
10945
|
-
c = II(c, d, a, b, x[k + 14], S43, 0xab9423a7);
|
|
10946
|
-
b = II(b, c, d, a, x[k + 5], S44, 0xfc93a039);
|
|
10947
|
-
a = II(a, b, c, d, x[k + 12], S41, 0x655b59c3);
|
|
10948
|
-
d = II(d, a, b, c, x[k + 3], S42, 0x8f0ccc92);
|
|
10949
|
-
c = II(c, d, a, b, x[k + 10], S43, 0xffeff47d);
|
|
10950
|
-
b = II(b, c, d, a, x[k + 1], S44, 0x85845dd1);
|
|
10951
|
-
a = II(a, b, c, d, x[k + 8], S41, 0x6fa87e4f);
|
|
10952
|
-
d = II(d, a, b, c, x[k + 15], S42, 0xfe2ce6e0);
|
|
10953
|
-
c = II(c, d, a, b, x[k + 6], S43, 0xa3014314);
|
|
10954
|
-
b = II(b, c, d, a, x[k + 13], S44, 0x4e0811a1);
|
|
10955
|
-
a = II(a, b, c, d, x[k + 4], S41, 0xf7537e82);
|
|
10956
|
-
d = II(d, a, b, c, x[k + 11], S42, 0xbd3af235);
|
|
10957
|
-
c = II(c, d, a, b, x[k + 2], S43, 0x2ad7d2bb);
|
|
10958
|
-
b = II(b, c, d, a, x[k + 9], S44, 0xeb86d391);
|
|
10959
|
-
a = addUnsigned(a, AA);
|
|
10960
|
-
b = addUnsigned(b, BB);
|
|
10961
|
-
c = addUnsigned(c, CC);
|
|
10962
|
-
d = addUnsigned(d, DD);
|
|
10963
|
-
}
|
|
10964
|
-
const result = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
|
|
10965
|
-
return result.toLowerCase();
|
|
10966
|
-
}
|
|
10967
|
-
function addUnsigned(lX, lY) {
|
|
10968
|
-
const lX8 = lX & 0x80000000;
|
|
10969
|
-
const lY8 = lY & 0x80000000;
|
|
10970
|
-
const lX4 = lX & 0x40000000;
|
|
10971
|
-
const lY4 = lY & 0x40000000;
|
|
10972
|
-
const lResult = (lX & 0x3fffffff) + (lY & 0x3fffffff);
|
|
10973
|
-
if (lX4 & lY4) {
|
|
10974
|
-
return lResult ^ 0x80000000 ^ lX8 ^ lY8;
|
|
10975
|
-
}
|
|
10976
|
-
if (lX4 | lY4) {
|
|
10977
|
-
if (lResult & 0x40000000) {
|
|
10978
|
-
return lResult ^ 0xc0000000 ^ lX8 ^ lY8;
|
|
10979
|
-
}
|
|
10980
|
-
else {
|
|
10981
|
-
return lResult ^ 0x40000000 ^ lX8 ^ lY8;
|
|
10982
|
-
}
|
|
10983
|
-
}
|
|
10984
|
-
else {
|
|
10985
|
-
return lResult ^ lX8 ^ lY8;
|
|
10986
|
-
}
|
|
10987
|
-
}
|
|
10988
|
-
function rotateLeft(lValue, iShiftBits) {
|
|
10989
|
-
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
|
|
10990
|
-
}
|
|
10991
|
-
function F(x, y, z) {
|
|
10992
|
-
return (x & y) | (~x & z);
|
|
10993
|
-
}
|
|
10994
|
-
function G(x, y, z) {
|
|
10995
|
-
return (x & z) | (y & ~z);
|
|
10996
|
-
}
|
|
10997
|
-
function H(x, y, z) {
|
|
10998
|
-
return x ^ y ^ z;
|
|
10999
|
-
}
|
|
11000
|
-
function I(x, y, z) {
|
|
11001
|
-
return y ^ (x | ~z);
|
|
11002
|
-
}
|
|
11003
|
-
function FF(a, b, c, d, x, s, ac) {
|
|
11004
|
-
a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac));
|
|
11005
|
-
return addUnsigned(rotateLeft(a, s), b);
|
|
11006
|
-
}
|
|
11007
|
-
function GG(a, b, c, d, x, s, ac) {
|
|
11008
|
-
a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac));
|
|
11009
|
-
return addUnsigned(rotateLeft(a, s), b);
|
|
11010
|
-
}
|
|
11011
|
-
function HH(a, b, c, d, x, s, ac) {
|
|
11012
|
-
a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac));
|
|
11013
|
-
return addUnsigned(rotateLeft(a, s), b);
|
|
11014
|
-
}
|
|
11015
|
-
function II(a, b, c, d, x, s, ac) {
|
|
11016
|
-
a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac));
|
|
11017
|
-
return addUnsigned(rotateLeft(a, s), b);
|
|
11018
|
-
}
|
|
11019
|
-
function convertToWordArray(string) {
|
|
11020
|
-
let lWordCount;
|
|
11021
|
-
const lMessageLength = string.length;
|
|
11022
|
-
const lNumberOfWords_temp1 = lMessageLength + 8;
|
|
11023
|
-
const lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64;
|
|
11024
|
-
const lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
|
|
11025
|
-
const lWordArray = Array(lNumberOfWords - 1);
|
|
11026
|
-
let lBytePosition = 0;
|
|
11027
|
-
let lByteCount = 0;
|
|
11028
|
-
while (lByteCount < lMessageLength) {
|
|
11029
|
-
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
|
11030
|
-
lBytePosition = (lByteCount % 4) * 8;
|
|
11031
|
-
lWordArray[lWordCount] = lWordArray[lWordCount] | (string.charCodeAt(lByteCount) << lBytePosition);
|
|
11032
|
-
lByteCount++;
|
|
11033
|
-
}
|
|
11034
|
-
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
|
11035
|
-
lBytePosition = (lByteCount % 4) * 8;
|
|
11036
|
-
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
|
|
11037
|
-
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
|
|
11038
|
-
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
|
|
11039
|
-
return lWordArray;
|
|
11040
|
-
}
|
|
11041
|
-
function wordToHex(lValue) {
|
|
11042
|
-
let WordToHexValue = '';
|
|
11043
|
-
let WordToHexValue_temp = '';
|
|
11044
|
-
let lByte;
|
|
11045
|
-
let lCount;
|
|
11046
|
-
for (lCount = 0; lCount <= 3; lCount++) {
|
|
11047
|
-
lByte = (lValue >>> (lCount * 8)) & 255;
|
|
11048
|
-
WordToHexValue_temp = '0' + lByte.toString(16);
|
|
11049
|
-
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
|
|
11050
|
-
}
|
|
11051
|
-
return WordToHexValue;
|
|
11052
|
-
}
|
|
11053
|
-
function utf8Encode(string) {
|
|
11054
|
-
let utftext = '';
|
|
11055
|
-
let c;
|
|
11056
|
-
string = string.replace(/\r\n/g, '\n');
|
|
11057
|
-
for (let n = 0; n < string.length; n++) {
|
|
11058
|
-
c = string.charCodeAt(n);
|
|
11059
|
-
if (c < 128) {
|
|
11060
|
-
utftext += String.fromCharCode(c);
|
|
11061
|
-
}
|
|
11062
|
-
else if (c > 127 && c < 2048) {
|
|
11063
|
-
utftext += String.fromCharCode((c >> 6) | 192);
|
|
11064
|
-
utftext += String.fromCharCode((c & 63) | 128);
|
|
11065
|
-
}
|
|
11066
|
-
else {
|
|
11067
|
-
utftext += String.fromCharCode((c >> 12) | 224);
|
|
11068
|
-
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
|
11069
|
-
utftext += String.fromCharCode((c & 63) | 128);
|
|
11070
|
-
}
|
|
11071
|
-
}
|
|
11072
|
-
return utftext;
|
|
10869
|
+
function bufferToHexa(hashBuffer) {
|
|
10870
|
+
const hashArray = new Uint8Array(hashBuffer); // convert buffer to byte array
|
|
10871
|
+
return hashArray.reduce((result, byte) => result + byte.toString(16).padStart(2, '0'), ''); // convert bytes to hex string
|
|
10872
|
+
}
|
|
10873
|
+
/**
|
|
10874
|
+
* Thin wrapper around browsers' native SubtleCrypto for convenience of use
|
|
10875
|
+
*/
|
|
10876
|
+
async function sha256(message) {
|
|
10877
|
+
const msgUint8 = new TextEncoder().encode(message); // encode as (utf-8) Uint8Array
|
|
10878
|
+
const hashBuffer = await crypto.subtle.digest('SHA-256', msgUint8); // hash the message
|
|
10879
|
+
return bufferToHexa(hashBuffer);
|
|
10880
|
+
}
|
|
10881
|
+
/**
|
|
10882
|
+
* Thin wrapper around browsers' native SubtleCrypto for convenience of use
|
|
10883
|
+
*/
|
|
10884
|
+
async function hmacSha256(secret, payload) {
|
|
10885
|
+
const encoder = new TextEncoder();
|
|
10886
|
+
const algorithm = { name: 'HMAC', hash: 'SHA-256' };
|
|
10887
|
+
const key = await crypto.subtle.importKey('raw', encoder.encode(secret), algorithm, false, ['sign']);
|
|
10888
|
+
const signature = await crypto.subtle.sign(algorithm.name, key, encoder.encode(payload));
|
|
10889
|
+
return bufferToHexa(signature);
|
|
11073
10890
|
}
|
|
11074
10891
|
|
|
11075
10892
|
function isRetina() {
|
|
@@ -11085,12 +10902,12 @@ function isRetina() {
|
|
|
11085
10902
|
return !!myWindow?.matchMedia(mediaQuery).matches;
|
|
11086
10903
|
}
|
|
11087
10904
|
/**
|
|
11088
|
-
* Return URL to Gravatar image from either an email or a MD5
|
|
10905
|
+
* Return URL to Gravatar image from either an email or a MD5 or SHA-256 of an email
|
|
11089
10906
|
*/
|
|
11090
10907
|
class Gravatar extends Source {
|
|
11091
|
-
getAvatar(size) {
|
|
10908
|
+
async getAvatar(size) {
|
|
11092
10909
|
const value = this.getValue();
|
|
11093
|
-
const hash = /^[a-f0-9]{32}$/.exec(value) ? value :
|
|
10910
|
+
const hash = /^([a-f0-9]{32}|[a-f0-9]{64})$/.exec(value) ? value : await sha256(value.trim().toLowerCase());
|
|
11094
10911
|
const avatarSize = isRetina() ? size * 2 : size;
|
|
11095
10912
|
return `https://secure.gravatar.com/avatar/${hash}?s=${avatarSize}&d=404`;
|
|
11096
10913
|
}
|
|
@@ -11130,7 +10947,7 @@ function getInitials(name, size) {
|
|
|
11130
10947
|
*/
|
|
11131
10948
|
class Initials extends Source {
|
|
11132
10949
|
getAvatar(size) {
|
|
11133
|
-
return getInitials(this.getValue(), size);
|
|
10950
|
+
return Promise.resolve(getInitials(this.getValue(), size));
|
|
11134
10951
|
}
|
|
11135
10952
|
isTextual() {
|
|
11136
10953
|
return true;
|
|
@@ -11142,7 +10959,7 @@ class Initials extends Source {
|
|
|
11142
10959
|
*/
|
|
11143
10960
|
class Image extends Source {
|
|
11144
10961
|
getAvatar() {
|
|
11145
|
-
return this.getValue();
|
|
10962
|
+
return Promise.resolve(this.getValue());
|
|
11146
10963
|
}
|
|
11147
10964
|
isTextual() {
|
|
11148
10965
|
return false;
|
|
@@ -11295,12 +11112,12 @@ class NaturalAvatarComponent {
|
|
|
11295
11112
|
}
|
|
11296
11113
|
buildTextAvatar(avatarSource) {
|
|
11297
11114
|
this.clearAvatar();
|
|
11298
|
-
|
|
11115
|
+
avatarSource.getAvatar(+this.textMaximumLength).then(avatarText => (this.avatarText = avatarText));
|
|
11299
11116
|
this.avatarStyle = this.getTextualStyle(avatarSource.getValue());
|
|
11300
11117
|
}
|
|
11301
11118
|
buildImageAvatar(avatarSource) {
|
|
11302
11119
|
this.clearAvatar();
|
|
11303
|
-
|
|
11120
|
+
avatarSource.getAvatar(+this.size).then(avatarSrc => (this.avatarSrc = avatarSrc));
|
|
11304
11121
|
this.avatarStyle = this.getImageStyle();
|
|
11305
11122
|
}
|
|
11306
11123
|
/**
|
|
@@ -11690,12 +11507,13 @@ function graphqlQuerySigner(key) {
|
|
|
11690
11507
|
const operations = getOperations(req);
|
|
11691
11508
|
const timestamp = Math.round(Date.now() / 1000);
|
|
11692
11509
|
const payload = timestamp + operations;
|
|
11693
|
-
|
|
11694
|
-
|
|
11695
|
-
|
|
11696
|
-
|
|
11697
|
-
|
|
11698
|
-
|
|
11510
|
+
return from(hmacSha256(key, payload)).pipe(switchMap$1(hash => {
|
|
11511
|
+
const header = `v1.${timestamp}.${hash}`;
|
|
11512
|
+
const signedRequest = req.clone({
|
|
11513
|
+
headers: req.headers.set('X-Signature', header),
|
|
11514
|
+
});
|
|
11515
|
+
return next(signedRequest);
|
|
11516
|
+
}));
|
|
11699
11517
|
};
|
|
11700
11518
|
}
|
|
11701
11519
|
|