@ecodev/natural 63.9.0 → 63.9.1
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.mjs +60 -62
- package/fesm2022/ecodev-natural.mjs.map +1 -1
- package/lib/modules/common/pipes/time-ago.pipe.d.ts +2 -3
- package/lib/modules/dropdown-components/abstract-association-select-component.directive.d.ts +1 -2
- package/lib/modules/file/abstract-file.d.ts +4 -5
- package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.d.ts +2 -1
- 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,
|
|
2
|
+
import { inject, Component, Injectable, DestroyRef, HostListener, HostBinding, Directive, InjectionToken, ElementRef, viewChild, ViewEncapsulation, Injector, Input, PLATFORM_ID, signal, output, Pipe, LOCALE_ID, provideAppInitializer, input, computed, contentChild, TemplateRef, EnvironmentInjector, createEnvironmentInjector, createComponent, Inject, runInInjectionContext, ChangeDetectionStrategy, linkedSignal, 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 { NavigationStart, NavigationEnd, ActivatedRoute, Router, RouteConfigLoadStart, RouteConfigLoadEnd, PRIMARY_OUTLET, RouterLink, NavigationError, DefaultUrlSerializer, UrlTree } from '@angular/router';
|
|
@@ -2383,7 +2383,11 @@ class NaturalAbstractDetail extends NaturalAbstractPanel {
|
|
|
2383
2383
|
*/
|
|
2384
2384
|
_isUpdatePage = false;
|
|
2385
2385
|
changes = new CumulativeChanges();
|
|
2386
|
-
constructor(
|
|
2386
|
+
constructor(
|
|
2387
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject
|
|
2388
|
+
key,
|
|
2389
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject
|
|
2390
|
+
service) {
|
|
2387
2391
|
super();
|
|
2388
2392
|
this.key = key;
|
|
2389
2393
|
this.service = service;
|
|
@@ -2592,6 +2596,7 @@ class NaturalAbstractEditableList {
|
|
|
2592
2596
|
formArray = new UntypedFormArray([]);
|
|
2593
2597
|
variablesManager = new NaturalQueryVariablesManager();
|
|
2594
2598
|
dataSource = new MatTableDataSource();
|
|
2599
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject
|
|
2595
2600
|
constructor(service) {
|
|
2596
2601
|
this.service = service;
|
|
2597
2602
|
// Create a form group with a line attributes that contain an array of formGroups (one by line = one by model)
|
|
@@ -2893,7 +2898,7 @@ class NaturalDropdownContainerComponent extends BasePortalOutlet {
|
|
|
2893
2898
|
}
|
|
2894
2899
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalDropdownContainerComponent, decorators: [{
|
|
2895
2900
|
type: Component,
|
|
2896
|
-
args: [{ encapsulation: ViewEncapsulation.None, preserveWhitespaces: false,
|
|
2901
|
+
args: [{ imports: [PortalModule, MatButtonModule], encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, template: "<div\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n [class.mat-menu-panel-exit-animation]=\"panelAnimationState === 'void'\"\n (animationend)=\"onAnimationDone($event.animationName)\"\n (animationcancel)=\"onAnimationDone($event.animationName)\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet />\n </div>\n\n @if (data.showValidateButton) {\n <div class=\"natural-dropdown-validate-button\">\n <button color=\"primary\" mat-raised-button i18n (click)=\"close()\">Valider</button>\n </div>\n }\n</div>\n", styles: ["@keyframes _mat-menu-enter{0%{transform:scale(.8);opacity:0}to{transform:none;opacity:1}}@keyframes _mat-menu-exit{0%{opacity:1}to{opacity:0}}.natural-dropdown-container{display:flex;flex-direction:column;animation:_mat-menu-enter .12s cubic-bezier(0,0,.2,1);border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{display:flex;flex:none;flex-direction:row;justify-content:flex-end;margin:5px}.natural-dropdown-container.mat-menu-panel-exit-animation{animation:_mat-menu-exit .1s 25ms linear forwards}\n"] }]
|
|
2897
2902
|
}] });
|
|
2898
2903
|
|
|
2899
2904
|
class NaturalDropdownRef {
|
|
@@ -3762,6 +3767,7 @@ class NaturalAbstractList extends NaturalAbstractPanel {
|
|
|
3762
3767
|
route = inject(ActivatedRoute);
|
|
3763
3768
|
alertService = inject(NaturalAlertService);
|
|
3764
3769
|
persistenceService = inject(NaturalPersistenceService);
|
|
3770
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject
|
|
3765
3771
|
constructor(service) {
|
|
3766
3772
|
super();
|
|
3767
3773
|
this.service = service;
|
|
@@ -3864,7 +3870,7 @@ class NaturalAbstractList extends NaturalAbstractPanel {
|
|
|
3864
3870
|
*/
|
|
3865
3871
|
getPagination() {
|
|
3866
3872
|
const paginationChannel = this.variablesManager.get('pagination');
|
|
3867
|
-
if (paginationChannel
|
|
3873
|
+
if (paginationChannel?.pagination) {
|
|
3868
3874
|
// The cast should not be necessary because Typescript correctly narrow down the type to `PaginationInput`
|
|
3869
3875
|
// but somehow still get confused when returning it
|
|
3870
3876
|
return paginationChannel.pagination;
|
|
@@ -4122,6 +4128,7 @@ class NaturalAbstractNavigableList extends NaturalAbstractList {
|
|
|
4122
4128
|
ancestorRelationName = 'parent';
|
|
4123
4129
|
oldAncertorId = null;
|
|
4124
4130
|
breadcrumbs = [];
|
|
4131
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject
|
|
4125
4132
|
constructor(service) {
|
|
4126
4133
|
super(service);
|
|
4127
4134
|
}
|
|
@@ -5544,7 +5551,7 @@ class NaturalColumnsPickerComponent {
|
|
|
5544
5551
|
}
|
|
5545
5552
|
}
|
|
5546
5553
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalColumnsPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5547
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.13", type: NaturalColumnsPickerComponent, isStandalone: true, selector: "natural-columns-picker", inputs: { buttons: "buttons", availableColumns: "availableColumns", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div>\n @if ((isMobile | async) && someVisibleButtons()) {\n <button mat-icon-button [matMenuTriggerFor]=\"mobileMenu\">\n <mat-icon naturalIcon=\"more_vert\" />\n </button>\n <mat-menu #mobileMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (button of buttons; track button) {\n @if (defaultTrue(button.show)) {\n @if (button.href) {\n <a\n mat-menu-item\n [href]=\"button.href\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </a>\n } @else if (button.buttons) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n <mat-menu #subMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n }\n }\n }\n\n @if (displayedColumns.length) {\n <button mat-menu-item [matMenuTriggerFor]=\"columnMenu\" [ngClass]=\"needMargin(null)\">\n <span i18n>Colonnes</span>\n </button>\n }\n </ng-template>\n </mat-menu>\n } @else {\n @for (button of buttons; track button) {\n @if (defaultTrue(button.show)) {\n @if (button.href) {\n <a\n mat-icon-button\n [href]=\"button.href\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </a>\n } @else if (button.buttons) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n <mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n } @else {\n <button\n mat-icon-button\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n }\n }\n }\n\n @if (displayedColumns.length) {\n <button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"S\u00E9lectionner les colonnes\"\n [matMenuTriggerFor]=\"columnMenu\"\n >\n <mat-icon naturalIcon=\"view_column\" />\n </button>\n }\n }\n</div>\n\n<mat-menu #columnMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (column of displayedColumns; track column) {\n <div mat-menu-item (click)=\"menuItemClicked($event, column)\">\n <mat-checkbox\n [(ngModel)]=\"column.checked\"\n (click)=\"checkboxClicked($event, column)\"\n (change)=\"updateColumns()\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </ng-template>\n</mat-menu>\n", styles: [".align-with-checkbox{padding-left:61px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
5554
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.13", type: NaturalColumnsPickerComponent, isStandalone: true, selector: "natural-columns-picker", inputs: { buttons: "buttons", availableColumns: "availableColumns", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/cyclomatic-complexity -->\n<div>\n @if ((isMobile | async) && someVisibleButtons()) {\n <button mat-icon-button [matMenuTriggerFor]=\"mobileMenu\">\n <mat-icon naturalIcon=\"more_vert\" />\n </button>\n <mat-menu #mobileMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (button of buttons; track button) {\n @if (defaultTrue(button.show)) {\n @if (button.href) {\n <a\n mat-menu-item\n [href]=\"button.href\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </a>\n } @else if (button.buttons) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n <mat-menu #subMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n }\n }\n }\n\n @if (displayedColumns.length) {\n <button mat-menu-item [matMenuTriggerFor]=\"columnMenu\" [ngClass]=\"needMargin(null)\">\n <span i18n>Colonnes</span>\n </button>\n }\n </ng-template>\n </mat-menu>\n } @else {\n @for (button of buttons; track button) {\n @if (defaultTrue(button.show)) {\n @if (button.href) {\n <a\n mat-icon-button\n [href]=\"button.href\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </a>\n } @else if (button.buttons) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n <mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n } @else {\n <button\n mat-icon-button\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n }\n }\n }\n\n @if (displayedColumns.length) {\n <button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"S\u00E9lectionner les colonnes\"\n [matMenuTriggerFor]=\"columnMenu\"\n >\n <mat-icon naturalIcon=\"view_column\" />\n </button>\n }\n }\n</div>\n\n<mat-menu #columnMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (column of displayedColumns; track column) {\n <div mat-menu-item (click)=\"menuItemClicked($event, column)\">\n <mat-checkbox\n [(ngModel)]=\"column.checked\"\n (click)=\"checkboxClicked($event, column)\"\n (change)=\"updateColumns()\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </ng-template>\n</mat-menu>\n", styles: [".align-with-checkbox{padding-left:61px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i3$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
5548
5555
|
}
|
|
5549
5556
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalColumnsPickerComponent, decorators: [{
|
|
5550
5557
|
type: Component,
|
|
@@ -5557,7 +5564,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
5557
5564
|
MatCheckboxModule,
|
|
5558
5565
|
MatTooltipModule,
|
|
5559
5566
|
FormsModule,
|
|
5560
|
-
], template: "<div>\n @if ((isMobile | async) && someVisibleButtons()) {\n <button mat-icon-button [matMenuTriggerFor]=\"mobileMenu\">\n <mat-icon naturalIcon=\"more_vert\" />\n </button>\n <mat-menu #mobileMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (button of buttons; track button) {\n @if (defaultTrue(button.show)) {\n @if (button.href) {\n <a\n mat-menu-item\n [href]=\"button.href\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </a>\n } @else if (button.buttons) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n <mat-menu #subMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n }\n }\n }\n\n @if (displayedColumns.length) {\n <button mat-menu-item [matMenuTriggerFor]=\"columnMenu\" [ngClass]=\"needMargin(null)\">\n <span i18n>Colonnes</span>\n </button>\n }\n </ng-template>\n </mat-menu>\n } @else {\n @for (button of buttons; track button) {\n @if (defaultTrue(button.show)) {\n @if (button.href) {\n <a\n mat-icon-button\n [href]=\"button.href\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </a>\n } @else if (button.buttons) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n <mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n } @else {\n <button\n mat-icon-button\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n }\n }\n }\n\n @if (displayedColumns.length) {\n <button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"S\u00E9lectionner les colonnes\"\n [matMenuTriggerFor]=\"columnMenu\"\n >\n <mat-icon naturalIcon=\"view_column\" />\n </button>\n }\n }\n</div>\n\n<mat-menu #columnMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (column of displayedColumns; track column) {\n <div mat-menu-item (click)=\"menuItemClicked($event, column)\">\n <mat-checkbox\n [(ngModel)]=\"column.checked\"\n (click)=\"checkboxClicked($event, column)\"\n (change)=\"updateColumns()\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </ng-template>\n</mat-menu>\n", styles: [".align-with-checkbox{padding-left:61px}\n"] }]
|
|
5567
|
+
], template: "<!-- eslint-disable @angular-eslint/template/cyclomatic-complexity -->\n<div>\n @if ((isMobile | async) && someVisibleButtons()) {\n <button mat-icon-button [matMenuTriggerFor]=\"mobileMenu\">\n <mat-icon naturalIcon=\"more_vert\" />\n </button>\n <mat-menu #mobileMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (button of buttons; track button) {\n @if (defaultTrue(button.show)) {\n @if (button.href) {\n <a\n mat-menu-item\n [href]=\"button.href\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </a>\n } @else if (button.buttons) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n <mat-menu #subMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n } @else {\n <button\n mat-menu-item\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n (click)=\"button.click?.(button, $event)\"\n >\n @if (useCheckbox(button)) {\n <mat-checkbox [checked]=\"button.checked\" />\n }\n {{ button.label }}\n </button>\n }\n }\n }\n\n @if (displayedColumns.length) {\n <button mat-menu-item [matMenuTriggerFor]=\"columnMenu\" [ngClass]=\"needMargin(null)\">\n <span i18n>Colonnes</span>\n </button>\n }\n </ng-template>\n </mat-menu>\n } @else {\n @for (button of buttons; track button) {\n @if (defaultTrue(button.show)) {\n @if (button.href) {\n <a\n mat-icon-button\n [href]=\"button.href\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </a>\n } @else if (button.buttons) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n <mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent>\n @for (subButton of button.buttons; track subButton) {\n <a\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n }\n </ng-template>\n </mat-menu>\n } @else {\n <button\n mat-icon-button\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n (click)=\"button.click?.(button, $event)\"\n >\n <mat-icon [naturalIcon]=\"button.icon\" />\n </button>\n }\n }\n }\n\n @if (displayedColumns.length) {\n <button\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"S\u00E9lectionner les colonnes\"\n [matMenuTriggerFor]=\"columnMenu\"\n >\n <mat-icon naturalIcon=\"view_column\" />\n </button>\n }\n }\n</div>\n\n<mat-menu #columnMenu=\"matMenu\">\n <ng-template matMenuContent>\n @for (column of displayedColumns; track column) {\n <div mat-menu-item (click)=\"menuItemClicked($event, column)\">\n <mat-checkbox\n [(ngModel)]=\"column.checked\"\n (click)=\"checkboxClicked($event, column)\"\n (change)=\"updateColumns()\"\n >{{ column.label }}</mat-checkbox\n >\n </div>\n }\n </ng-template>\n</mat-menu>\n", styles: [".align-with-checkbox{padding-left:61px}\n"] }]
|
|
5561
5568
|
}], propDecorators: { buttons: [{
|
|
5562
5569
|
type: Input
|
|
5563
5570
|
}], availableColumns: [{
|
|
@@ -5727,10 +5734,7 @@ function isDate(value) {
|
|
|
5727
5734
|
* - "dans 3 ans"
|
|
5728
5735
|
*/
|
|
5729
5736
|
class NaturalTimeAgoPipe {
|
|
5730
|
-
fakedNow;
|
|
5731
|
-
constructor(fakedNow = null) {
|
|
5732
|
-
this.fakedNow = fakedNow;
|
|
5733
|
-
}
|
|
5737
|
+
fakedNow = null;
|
|
5734
5738
|
getNow() {
|
|
5735
5739
|
return this.fakedNow ?? Date.now();
|
|
5736
5740
|
}
|
|
@@ -5836,7 +5840,7 @@ class NaturalTimeAgoPipe {
|
|
|
5836
5840
|
throw new Error('Time travelling just happened');
|
|
5837
5841
|
}
|
|
5838
5842
|
}
|
|
5839
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalTimeAgoPipe, deps: [
|
|
5843
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalTimeAgoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
5840
5844
|
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.13", ngImport: i0, type: NaturalTimeAgoPipe, isStandalone: true, name: "timeAgo" });
|
|
5841
5845
|
}
|
|
5842
5846
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalTimeAgoPipe, decorators: [{
|
|
@@ -5845,12 +5849,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
5845
5849
|
name: 'timeAgo',
|
|
5846
5850
|
standalone: true,
|
|
5847
5851
|
}]
|
|
5848
|
-
}]
|
|
5849
|
-
type: Optional
|
|
5850
|
-
}, {
|
|
5851
|
-
type: Inject,
|
|
5852
|
-
args: ['SHOULD_NEVER_BE_INJECTED']
|
|
5853
|
-
}] }] });
|
|
5852
|
+
}] });
|
|
5854
5853
|
|
|
5855
5854
|
function densities(src, forImageSet) {
|
|
5856
5855
|
const match = /^(.*\/)(\d+)$/.exec(src);
|
|
@@ -6045,8 +6044,8 @@ class NaturalDialogTriggerComponent {
|
|
|
6045
6044
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalDialogTriggerComponent, decorators: [{
|
|
6046
6045
|
type: Component,
|
|
6047
6046
|
args: [{
|
|
6048
|
-
template: '',
|
|
6049
6047
|
standalone: true,
|
|
6048
|
+
template: '',
|
|
6050
6049
|
}]
|
|
6051
6050
|
}], ctorParameters: () => [] });
|
|
6052
6051
|
|
|
@@ -6544,7 +6543,8 @@ class AbstractAssociationSelectComponent {
|
|
|
6544
6543
|
operator: this.operatorCtrl,
|
|
6545
6544
|
value: this.valueCtrl,
|
|
6546
6545
|
});
|
|
6547
|
-
constructor(
|
|
6546
|
+
constructor() {
|
|
6547
|
+
const data = inject(NATURAL_DROPDOWN_DATA);
|
|
6548
6548
|
this.configuration = data.configuration;
|
|
6549
6549
|
// Immediately initValidators and everytime the operator change later
|
|
6550
6550
|
this.operatorCtrl.valueChanges.pipe(startWith(null)).subscribe(() => this.initValidators());
|
|
@@ -6615,16 +6615,13 @@ class AbstractAssociationSelectComponent {
|
|
|
6615
6615
|
throw new Error('Unsupported operator key: ' + key);
|
|
6616
6616
|
}
|
|
6617
6617
|
}
|
|
6618
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: AbstractAssociationSelectComponent, deps: [
|
|
6618
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: AbstractAssociationSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6619
6619
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.13", type: AbstractAssociationSelectComponent, isStandalone: true, ngImport: i0 });
|
|
6620
6620
|
}
|
|
6621
6621
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: AbstractAssociationSelectComponent, decorators: [{
|
|
6622
6622
|
type: Directive,
|
|
6623
6623
|
args: [{ standalone: true }]
|
|
6624
|
-
}], ctorParameters: () => [
|
|
6625
|
-
type: Inject,
|
|
6626
|
-
args: [NATURAL_DROPDOWN_DATA]
|
|
6627
|
-
}] }] });
|
|
6624
|
+
}], ctorParameters: () => [] });
|
|
6628
6625
|
|
|
6629
6626
|
/**
|
|
6630
6627
|
* This will completely ignore internal formControl and instead use the one from the component
|
|
@@ -7090,7 +7087,7 @@ class NaturalSelectComponent extends AbstractSelect {
|
|
|
7090
7087
|
return this.variablesManager.variables.value;
|
|
7091
7088
|
}
|
|
7092
7089
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
7093
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.13", 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"] }] });
|
|
7090
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.13", 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: "<!-- eslint-disable @angular-eslint/template/cyclomatic-complexity -->\n<!-- 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"] }] });
|
|
7094
7091
|
}
|
|
7095
7092
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalSelectComponent, decorators: [{
|
|
7096
7093
|
type: Component,
|
|
@@ -7108,7 +7105,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
7108
7105
|
MatButtonModule,
|
|
7109
7106
|
MatTooltipModule,
|
|
7110
7107
|
RouterLink,
|
|
7111
|
-
], 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"] }]
|
|
7108
|
+
], template: "<!-- eslint-disable @angular-eslint/template/cyclomatic-complexity -->\n<!-- 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"] }]
|
|
7112
7109
|
}], propDecorators: { service: [{
|
|
7113
7110
|
type: Input,
|
|
7114
7111
|
args: [{ required: true }]
|
|
@@ -7177,7 +7174,7 @@ class TypeTextComponent {
|
|
|
7177
7174
|
constructor() {
|
|
7178
7175
|
const data = inject(NATURAL_DROPDOWN_DATA);
|
|
7179
7176
|
this.formCtrl.valueChanges.subscribe(value => {
|
|
7180
|
-
this.renderedValue.next(value === null ? '' : this.formCtrl.value
|
|
7177
|
+
this.renderedValue.next(value === null ? '' : this.formCtrl.value);
|
|
7181
7178
|
});
|
|
7182
7179
|
this.formCtrl.setValidators([Validators.required]);
|
|
7183
7180
|
if (data.condition?.like) {
|
|
@@ -7874,7 +7871,7 @@ class NaturalHierarchicSelectorService {
|
|
|
7874
7871
|
* Mark loading status individually on nodes.
|
|
7875
7872
|
*/
|
|
7876
7873
|
loadChildren(flatNode, contextFilter = null) {
|
|
7877
|
-
//
|
|
7874
|
+
// Don't refetch children. Improve performances
|
|
7878
7875
|
// Prevents interferences between HierarchicModelNode structure and angular components navigation.
|
|
7879
7876
|
// Prevents a bug where grand children were lost if closing root
|
|
7880
7877
|
if (flatNode.node.children.length) {
|
|
@@ -8153,7 +8150,10 @@ class NaturalHierarchicSelectorComponent {
|
|
|
8153
8150
|
/**
|
|
8154
8151
|
* Cache for transformed nodes
|
|
8155
8152
|
*/
|
|
8156
|
-
flatNodeMap = new Map();
|
|
8153
|
+
flatNodeMap = signal(new Map(), { equal: () => false });
|
|
8154
|
+
tooBig = computed(() => {
|
|
8155
|
+
return this.flatNodeMap().size === 999;
|
|
8156
|
+
});
|
|
8157
8157
|
/**
|
|
8158
8158
|
* Angular OnChange implementation
|
|
8159
8159
|
*/
|
|
@@ -8218,7 +8218,7 @@ class NaturalHierarchicSelectorComponent {
|
|
|
8218
8218
|
}
|
|
8219
8219
|
}
|
|
8220
8220
|
selectAll() {
|
|
8221
|
-
this.flatNodeMap.forEach(flatNode => {
|
|
8221
|
+
this.flatNodeMap().forEach(flatNode => {
|
|
8222
8222
|
if (!this.isNodeSelected(flatNode.node)) {
|
|
8223
8223
|
this.selectFlatNode(flatNode);
|
|
8224
8224
|
}
|
|
@@ -8332,7 +8332,7 @@ class NaturalHierarchicSelectorComponent {
|
|
|
8332
8332
|
}
|
|
8333
8333
|
loadRoots(searchVariables) {
|
|
8334
8334
|
this.loading = true;
|
|
8335
|
-
this.flatNodeMap
|
|
8335
|
+
this.flatNodeMap.set(new Map());
|
|
8336
8336
|
this.hierarchicSelectorService
|
|
8337
8337
|
.init(this.config, this.filters, searchVariables || null)
|
|
8338
8338
|
.pipe(finalize$1(() => (this.loading = false)))
|
|
@@ -8407,7 +8407,7 @@ class NaturalHierarchicSelectorComponent {
|
|
|
8407
8407
|
}
|
|
8408
8408
|
getFlatNode(node) {
|
|
8409
8409
|
const key = this.getMapKey(node.model);
|
|
8410
|
-
return this.flatNodeMap.get(key) || null;
|
|
8410
|
+
return this.flatNodeMap().get(key) || null;
|
|
8411
8411
|
}
|
|
8412
8412
|
createFlatNode(node, level) {
|
|
8413
8413
|
const key = this.getMapKey(node.model);
|
|
@@ -8427,7 +8427,10 @@ class NaturalHierarchicSelectorComponent {
|
|
|
8427
8427
|
this.flatNodesSelection.select(flatNode);
|
|
8428
8428
|
}
|
|
8429
8429
|
// Cache FlatNode
|
|
8430
|
-
this.flatNodeMap.
|
|
8430
|
+
this.flatNodeMap.update(map => {
|
|
8431
|
+
map.set(key, flatNode);
|
|
8432
|
+
return map;
|
|
8433
|
+
});
|
|
8431
8434
|
return flatNode;
|
|
8432
8435
|
}
|
|
8433
8436
|
/**
|
|
@@ -8438,11 +8441,11 @@ class NaturalHierarchicSelectorComponent {
|
|
|
8438
8441
|
return model.__typename + '-' + model.id;
|
|
8439
8442
|
}
|
|
8440
8443
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalHierarchicSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8441
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.13", type: NaturalHierarchicSelectorComponent, isStandalone: true, selector: "natural-hierarchic-selector", inputs: { displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: false, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, allowUnselect: { classPropertyName: "allowUnselect", publicName: "allowUnselect", isSignal: false, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: false, isRequired: false, transformFunction: null }, searchFacets: { classPropertyName: "searchFacets", publicName: "searchFacets", isSignal: false, isRequired: false, transformFunction: null }, searchSelections: { classPropertyName: "searchSelections", publicName: "searchSelections", isSignal: false, isRequired: false, transformFunction: null }, allowSelectAll: { classPropertyName: "allowSelectAll", publicName: "allowSelectAll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchSelectionChange: "searchSelectionChange", selectionChange: "selectionChange" }, providers: [NaturalHierarchicSelectorService], usesOnChanges: true, ngImport: i0, template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search [facets]=\"searchFacets\" [selections]=\"searchSelections\" (selectionChange)=\"search($event)\" />\n</div>\n\n@if (allowSelectAll() && multiple) {\n <a i18n mat-button (click)=\"selectAll()\">Tout s\u00E9lectionner</a>\n}\n\n<div class=\"body\">\n @if (loading) {\n <mat-progress-spinner mode=\"indeterminate\" style=\"margin: 10px\" [diameter]=\"36\" />\n }\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding [ngClass]=\"{leaf: !node.expandable}\">\n @if (node.expandable) {\n <button\n mat-icon-button\n matTreeNodeToggle\n [attr.aria-label]=\"
|
|
8444
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.13", type: NaturalHierarchicSelectorComponent, isStandalone: true, selector: "natural-hierarchic-selector", inputs: { displayWith: { classPropertyName: "displayWith", publicName: "displayWith", isSignal: false, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, allowUnselect: { classPropertyName: "allowUnselect", publicName: "allowUnselect", isSignal: false, isRequired: false, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: false, isRequired: false, transformFunction: null }, searchFacets: { classPropertyName: "searchFacets", publicName: "searchFacets", isSignal: false, isRequired: false, transformFunction: null }, searchSelections: { classPropertyName: "searchSelections", publicName: "searchSelections", isSignal: false, isRequired: false, transformFunction: null }, allowSelectAll: { classPropertyName: "allowSelectAll", publicName: "allowSelectAll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchSelectionChange: "searchSelectionChange", selectionChange: "selectionChange" }, providers: [NaturalHierarchicSelectorService], usesOnChanges: true, ngImport: i0, template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search [facets]=\"searchFacets\" [selections]=\"searchSelections\" (selectionChange)=\"search($event)\" />\n</div>\n\n@if (allowSelectAll() && multiple) {\n <div class=\"select-all\" [matTooltip]=\"tooBig() ? 'Trop de r\u00E9sultats, veuillez affiner la recherche' : null\">\n <a i18n mat-button [disabled]=\"tooBig()\" (click)=\"selectAll()\">Tout s\u00E9lectionner</a>\n </div>\n}\n\n<div class=\"body\">\n @if (loading) {\n <mat-progress-spinner mode=\"indeterminate\" style=\"margin: 10px\" [diameter]=\"36\" />\n }\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding [ngClass]=\"{leaf: !node.expandable}\">\n @if (node.expandable) {\n <button\n mat-icon-button\n matTreeNodeToggle\n [attr.aria-label]=\"`toggle ${node.name}`\"\n (click)=\"loadChildren(node)\"\n >\n @if (node.loading) {\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"24\" [strokeWidth]=\"5\" />\n }\n @if (!node.loading) {\n <mat-icon [naturalIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\" />\n }\n </button>\n }\n\n <mat-checkbox\n style=\"margin-right: 10px\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n (change)=\"toggleFlatNode(node)\"\n >\n @if (node.node.config.icon) {\n <mat-icon style=\"margin-right: 10px\" [naturalIcon]=\"node.node.config.icon\" />\n }\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-listbox aria-orientation=\"vertical\" class=\"mat-mdc-chip-set-stacked\">\n @for (node of selectedNodes; track node.model.id) {\n <mat-chip-option [removable]=\"true\" [selectable]=\"false\" (removed)=\"unselectModelNode(node)\">\n @if (node.config.icon) {\n <mat-icon matChipAvatar [naturalIcon]=\"node.config.icon\" />\n }\n {{ node.model.name || node.model.fullName }}\n <button matChipRemove>\n <mat-icon naturalIcon=\"cancel\" />\n </button>\n </mat-chip-option>\n } @empty {\n <p class=\"mat-body nat-padding-horizontal\" i18n>Aucune s\u00E9lection</p>\n }\n </mat-chip-listbox>\n</div>\n\n@if (!loading && !dataSource.data.length) {\n <div i18n>Aucun r\u00E9sultat</div>\n}\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host mat-icon{width:18px;height:18px;font-size:18px}:host .select-all{display:inline-block;margin-top:-15px;margin-bottom:5px}:host .mat-tree-node.leaf{margin-left:48px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-listbox{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-listbox{margin-left:10px}\n"], dependencies: [{ kind: "component", type: NaturalSearchComponent, selector: "natural-search", inputs: ["placeholder", "facets", "multipleGroups", "dropdownTitle", "selections"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i8.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i3$2.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i3$2.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i3$2.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i3$2.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i3$2.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "directive", type: i7.MatChipAvatar, selector: "mat-chip-avatar, [matChipAvatar]" }, { kind: "component", type: i7.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i7.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i7.MatChipRemove, selector: "[matChipRemove]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] });
|
|
8442
8445
|
}
|
|
8443
8446
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalHierarchicSelectorComponent, decorators: [{
|
|
8444
8447
|
type: Component,
|
|
8445
|
-
args: [{ selector: 'natural-hierarchic-selector',
|
|
8448
|
+
args: [{ selector: 'natural-hierarchic-selector', imports: [
|
|
8446
8449
|
NaturalSearchComponent,
|
|
8447
8450
|
CommonModule,
|
|
8448
8451
|
MatProgressSpinnerModule,
|
|
@@ -8452,7 +8455,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
8452
8455
|
NaturalIconDirective,
|
|
8453
8456
|
MatCheckboxModule,
|
|
8454
8457
|
MatChipsModule,
|
|
8455
|
-
|
|
8458
|
+
MatTooltipModule,
|
|
8459
|
+
], providers: [NaturalHierarchicSelectorService], template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search [facets]=\"searchFacets\" [selections]=\"searchSelections\" (selectionChange)=\"search($event)\" />\n</div>\n\n@if (allowSelectAll() && multiple) {\n <div class=\"select-all\" [matTooltip]=\"tooBig() ? 'Trop de r\u00E9sultats, veuillez affiner la recherche' : null\">\n <a i18n mat-button [disabled]=\"tooBig()\" (click)=\"selectAll()\">Tout s\u00E9lectionner</a>\n </div>\n}\n\n<div class=\"body\">\n @if (loading) {\n <mat-progress-spinner mode=\"indeterminate\" style=\"margin: 10px\" [diameter]=\"36\" />\n }\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding [ngClass]=\"{leaf: !node.expandable}\">\n @if (node.expandable) {\n <button\n mat-icon-button\n matTreeNodeToggle\n [attr.aria-label]=\"`toggle ${node.name}`\"\n (click)=\"loadChildren(node)\"\n >\n @if (node.loading) {\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"24\" [strokeWidth]=\"5\" />\n }\n @if (!node.loading) {\n <mat-icon [naturalIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\" />\n }\n </button>\n }\n\n <mat-checkbox\n style=\"margin-right: 10px\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n (change)=\"toggleFlatNode(node)\"\n >\n @if (node.node.config.icon) {\n <mat-icon style=\"margin-right: 10px\" [naturalIcon]=\"node.node.config.icon\" />\n }\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-listbox aria-orientation=\"vertical\" class=\"mat-mdc-chip-set-stacked\">\n @for (node of selectedNodes; track node.model.id) {\n <mat-chip-option [removable]=\"true\" [selectable]=\"false\" (removed)=\"unselectModelNode(node)\">\n @if (node.config.icon) {\n <mat-icon matChipAvatar [naturalIcon]=\"node.config.icon\" />\n }\n {{ node.model.name || node.model.fullName }}\n <button matChipRemove>\n <mat-icon naturalIcon=\"cancel\" />\n </button>\n </mat-chip-option>\n } @empty {\n <p class=\"mat-body nat-padding-horizontal\" i18n>Aucune s\u00E9lection</p>\n }\n </mat-chip-listbox>\n</div>\n\n@if (!loading && !dataSource.data.length) {\n <div i18n>Aucun r\u00E9sultat</div>\n}\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host mat-icon{width:18px;height:18px;font-size:18px}:host .select-all{display:inline-block;margin-top:-15px;margin-bottom:5px}:host .mat-tree-node.leaf{margin-left:48px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-listbox{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-listbox{margin-left:10px}\n"] }]
|
|
8456
8460
|
}], propDecorators: { displayWith: [{
|
|
8457
8461
|
type: Input
|
|
8458
8462
|
}], config: [{
|
|
@@ -8666,7 +8670,9 @@ class TypeOptionsComponent {
|
|
|
8666
8670
|
options: [],
|
|
8667
8671
|
};
|
|
8668
8672
|
dropdownRef = inject(NaturalDropdownRef);
|
|
8669
|
-
constructor(
|
|
8673
|
+
constructor(
|
|
8674
|
+
// eslint-disable-next-line @angular-eslint/prefer-inject
|
|
8675
|
+
data) {
|
|
8670
8676
|
this.data = data;
|
|
8671
8677
|
this.configuration = { ...this.defaults, ...data.configuration };
|
|
8672
8678
|
if (!this.configuration.options.length) {
|
|
@@ -8923,9 +8929,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
8923
8929
|
* @dynamic
|
|
8924
8930
|
*/
|
|
8925
8931
|
class NaturalAbstractFile {
|
|
8926
|
-
element;
|
|
8927
|
-
naturalFileService;
|
|
8928
|
-
document;
|
|
8929
8932
|
fileElement;
|
|
8930
8933
|
/**
|
|
8931
8934
|
* Whether we should accept a single file or multiple files
|
|
@@ -8973,11 +8976,9 @@ class NaturalAbstractFile {
|
|
|
8973
8976
|
* The list of files that have been selected.
|
|
8974
8977
|
*/
|
|
8975
8978
|
filesChange = outputFromObservable(this.filesChange$);
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
this.document = document;
|
|
8980
|
-
}
|
|
8979
|
+
element = inject(ElementRef);
|
|
8980
|
+
naturalFileService = inject(NaturalFileService);
|
|
8981
|
+
document = inject(DOCUMENT);
|
|
8981
8982
|
ngOnDestroy() {
|
|
8982
8983
|
delete this.fileElement; // faster memory release of dom element
|
|
8983
8984
|
}
|
|
@@ -9114,16 +9115,13 @@ class NaturalAbstractFile {
|
|
|
9114
9115
|
this.filesChange$.observed ||
|
|
9115
9116
|
(this.broadcast && this.naturalFileService.filesChanged.observed));
|
|
9116
9117
|
}
|
|
9117
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalAbstractFile, deps: [
|
|
9118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalAbstractFile, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9118
9119
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.13", type: NaturalAbstractFile, isStandalone: true, inputs: { multiple: "multiple", accept: "accept", maxSize: "maxSize", fileSelectionDisabled: "fileSelectionDisabled", selectable: "selectable", broadcast: "broadcast" }, outputs: { fileChange: "fileChange", filesChange: "filesChange" }, host: { listeners: { "change": "onChange($event)" } }, usesOnChanges: true, ngImport: i0 });
|
|
9119
9120
|
}
|
|
9120
9121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalAbstractFile, decorators: [{
|
|
9121
9122
|
type: Directive,
|
|
9122
9123
|
args: [{ standalone: true }]
|
|
9123
|
-
}],
|
|
9124
|
-
type: Inject,
|
|
9125
|
-
args: [DOCUMENT]
|
|
9126
|
-
}] }], propDecorators: { multiple: [{
|
|
9124
|
+
}], propDecorators: { multiple: [{
|
|
9127
9125
|
type: Input
|
|
9128
9126
|
}], accept: [{
|
|
9129
9127
|
type: Input
|
|
@@ -10006,8 +10004,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
10006
10004
|
type: Component,
|
|
10007
10005
|
args: [{
|
|
10008
10006
|
selector: 'natural-panels',
|
|
10009
|
-
template: '',
|
|
10010
10007
|
standalone: true,
|
|
10008
|
+
template: '',
|
|
10011
10009
|
}]
|
|
10012
10010
|
}], ctorParameters: () => [] });
|
|
10013
10011
|
|
|
@@ -10690,8 +10688,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
10690
10688
|
type: Component,
|
|
10691
10689
|
args: [{
|
|
10692
10690
|
selector: 'natural-sidenav',
|
|
10693
|
-
template: '<ng-content />',
|
|
10694
10691
|
standalone: true,
|
|
10692
|
+
template: '<ng-content />',
|
|
10695
10693
|
}]
|
|
10696
10694
|
}] });
|
|
10697
10695
|
|
|
@@ -10758,7 +10756,7 @@ class NaturalSidenavContainerComponent {
|
|
|
10758
10756
|
}
|
|
10759
10757
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalSidenavContainerComponent, decorators: [{
|
|
10760
10758
|
type: Component,
|
|
10761
|
-
args: [{ selector: 'natural-sidenav-container',
|
|
10759
|
+
args: [{ selector: 'natural-sidenav-container', imports: [MatSidenavModule, CommonModule], providers: [NaturalSidenavService], template: "<mat-sidenav-container (backdropClick)=\"sidenavService.setOpened(false)\">\n <mat-sidenav\n [mode]=\"sidenavService.activeMode\"\n [ngClass]=\"sidenavService.isMinimized ? 'menuMinimized' : ''\"\n [opened]=\"sidenavService.isOpened\"\n [style.min-width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [style.width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [position]=\"position\"\n >\n <ng-content select=\"natural-sidenav\" />\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-content\" />\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}:host mat-sidenav-container{display:flex;flex:1;flex-direction:column}:host mat-sidenav-content>div{overflow:auto}:host .menuMinimized{overflow-x:hidden}:host .buttons{display:flex;flex-direction:row;justify-content:flex-end}\n"] }]
|
|
10762
10760
|
}], propDecorators: { name: [{
|
|
10763
10761
|
type: Input,
|
|
10764
10762
|
args: [{ required: true }]
|
|
@@ -10781,7 +10779,7 @@ class NaturalSidenavContentComponent {
|
|
|
10781
10779
|
}
|
|
10782
10780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalSidenavContentComponent, decorators: [{
|
|
10783
10781
|
type: Component,
|
|
10784
|
-
args: [{ selector: 'natural-sidenav-content', template: '<ng-content />',
|
|
10782
|
+
args: [{ selector: 'natural-sidenav-content', standalone: true, template: '<ng-content />', styles: [":host{display:flex;flex:1;flex-direction:column;overflow:auto}\n"] }]
|
|
10785
10783
|
}] });
|
|
10786
10784
|
|
|
10787
10785
|
/*
|
|
@@ -10851,11 +10849,11 @@ class NaturalTableButtonComponent {
|
|
|
10851
10849
|
}
|
|
10852
10850
|
});
|
|
10853
10851
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalTableButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10854
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.13", type: NaturalTableButtonComponent, isStandalone: true, selector: "natural-table-button", inputs: { queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, navigate: { classPropertyName: "navigate", publicName: "navigate", isSignal: true, isRequired: false, transformFunction: null }, fragment: { classPropertyName: "fragment", publicName: "fragment", isSignal: true, isRequired: false, transformFunction: null }, preserveFragment: { classPropertyName: "preserveFragment", publicName: "preserveFragment", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n@let theIcon = icon();\n\n<!-- Edge case of a button without any kind of link at all -->\n@if (type() === 'none') {\n <span>\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n @if (label()) {\n <span>{{ label() }}</span>\n }\n </span>\n} @else if (!raised()) {\n @switch (type()) {\n <!-- App routed link -->\n @case ('routerLink') {\n @if (label()) {\n <a\n mat-button\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- Click -->\n @case ('click') {\n @if (label()) {\n <a mat-button [color]=\"color()\" [disabled]=\"disabled()\" (click)=\"buttonClick$.next($event)\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a mat-icon-button [disabled]=\"disabled()\" (click)=\"buttonClick$.next($event)\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- External link -->\n @case ('href') {\n @if (label()) {\n <a mat-button target=\"_blank\" [attr.href]=\"href()\" [color]=\"color()\" [disabled]=\"disabled()\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a mat-icon-button target=\"_blank\" [attr.href]=\"href()\" [color]=\"color()\" [disabled]=\"disabled()\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n }\n} @else {\n <!-- App routed link -->\n @switch (type()) {\n @case ('routerLink') {\n @if (label()) {\n <a\n mat-raised-button\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n class=\"mat-elevation-z4\"\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- Click -->\n @case ('click') {\n @if (label()) {\n <a mat-raised-button [color]=\"color()\" [disabled]=\"disabled()\" (click)=\"buttonClick$.next($event)\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n class=\"mat-elevation-z4\"\n [color]=\"color()\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick$.next($event)\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- External link -->\n @case ('href') {\n @if (label()) {\n <a mat-raised-button target=\"_blank\" [attr.href]=\"href()\" [color]=\"color()\" [disabled]=\"disabled()\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n class=\"mat-elevation-z4\"\n target=\"_blank\"\n [attr.href]=\"href()\"\n [color]=\"color()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n }\n}\n", styles: ["natural-table-button{display:flex;flex:1;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button mat-icon:not(:last-child){margin-right:5px}natural-table-button a.mat-mdc-button{display:flex;flex:1;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button a.mat-mdc-button .mdc-button__label{display:flex;flex-direction:row;align-items:center}natural-table-button>span{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;padding:0 8px}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
10852
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.13", type: NaturalTableButtonComponent, isStandalone: true, selector: "natural-table-button", inputs: { queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, queryParamsHandling: { classPropertyName: "queryParamsHandling", publicName: "queryParamsHandling", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, navigate: { classPropertyName: "navigate", publicName: "navigate", isSignal: true, isRequired: false, transformFunction: null }, fragment: { classPropertyName: "fragment", publicName: "fragment", isSignal: true, isRequired: false, transformFunction: null }, preserveFragment: { classPropertyName: "preserveFragment", publicName: "preserveFragment", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/cyclomatic-complexity -->\n<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n@let theIcon = icon();\n\n<!-- Edge case of a button without any kind of link at all -->\n@if (type() === 'none') {\n <span>\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n @if (label()) {\n <span>{{ label() }}</span>\n }\n </span>\n} @else if (!raised()) {\n @switch (type()) {\n <!-- App routed link -->\n @case ('routerLink') {\n @if (label()) {\n <a\n mat-button\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- Click -->\n @case ('click') {\n @if (label()) {\n <a mat-button [color]=\"color()\" [disabled]=\"disabled()\" (click)=\"buttonClick$.next($event)\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a mat-icon-button [disabled]=\"disabled()\" (click)=\"buttonClick$.next($event)\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- External link -->\n @case ('href') {\n @if (label()) {\n <a mat-button target=\"_blank\" [attr.href]=\"href()\" [color]=\"color()\" [disabled]=\"disabled()\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a mat-icon-button target=\"_blank\" [attr.href]=\"href()\" [color]=\"color()\" [disabled]=\"disabled()\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n }\n} @else {\n <!-- App routed link -->\n @switch (type()) {\n @case ('routerLink') {\n @if (label()) {\n <a\n mat-raised-button\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n class=\"mat-elevation-z4\"\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- Click -->\n @case ('click') {\n @if (label()) {\n <a mat-raised-button [color]=\"color()\" [disabled]=\"disabled()\" (click)=\"buttonClick$.next($event)\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n class=\"mat-elevation-z4\"\n [color]=\"color()\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick$.next($event)\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- External link -->\n @case ('href') {\n @if (label()) {\n <a mat-raised-button target=\"_blank\" [attr.href]=\"href()\" [color]=\"color()\" [disabled]=\"disabled()\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n class=\"mat-elevation-z4\"\n target=\"_blank\"\n [attr.href]=\"href()\"\n [color]=\"color()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n }\n}\n", styles: ["natural-table-button{display:flex;flex:1;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button mat-icon:not(:last-child){margin-right:5px}natural-table-button a.mat-mdc-button{display:flex;flex:1;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button a.mat-mdc-button .mdc-button__label{display:flex;flex-direction:row;align-items:center}natural-table-button>span{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;padding:0 8px}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
10855
10853
|
}
|
|
10856
10854
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalTableButtonComponent, decorators: [{
|
|
10857
10855
|
type: Component,
|
|
10858
|
-
args: [{ selector: 'natural-table-button', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10856
|
+
args: [{ selector: 'natural-table-button', imports: [MatIconModule, NaturalIconDirective, MatButtonModule, RouterLink], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- eslint-disable @angular-eslint/template/cyclomatic-complexity -->\n<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n@let theIcon = icon();\n\n<!-- Edge case of a button without any kind of link at all -->\n@if (type() === 'none') {\n <span>\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n @if (label()) {\n <span>{{ label() }}</span>\n }\n </span>\n} @else if (!raised()) {\n @switch (type()) {\n <!-- App routed link -->\n @case ('routerLink') {\n @if (label()) {\n <a\n mat-button\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- Click -->\n @case ('click') {\n @if (label()) {\n <a mat-button [color]=\"color()\" [disabled]=\"disabled()\" (click)=\"buttonClick$.next($event)\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a mat-icon-button [disabled]=\"disabled()\" (click)=\"buttonClick$.next($event)\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- External link -->\n @case ('href') {\n @if (label()) {\n <a mat-button target=\"_blank\" [attr.href]=\"href()\" [color]=\"color()\" [disabled]=\"disabled()\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a mat-icon-button target=\"_blank\" [attr.href]=\"href()\" [color]=\"color()\" [disabled]=\"disabled()\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n }\n} @else {\n <!-- App routed link -->\n @switch (type()) {\n @case ('routerLink') {\n @if (label()) {\n <a\n mat-raised-button\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n class=\"mat-elevation-z4\"\n [color]=\"color()\"\n [queryParams]=\"queryParams()\"\n [queryParamsHandling]=\"queryParamsHandling()\"\n [routerLink]=\"navigate()\"\n [fragment]=\"fragment()\"\n [preserveFragment]=\"preserveFragment()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- Click -->\n @case ('click') {\n @if (label()) {\n <a mat-raised-button [color]=\"color()\" [disabled]=\"disabled()\" (click)=\"buttonClick$.next($event)\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n class=\"mat-elevation-z4\"\n [color]=\"color()\"\n [disabled]=\"disabled()\"\n (click)=\"buttonClick$.next($event)\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n <!-- External link -->\n @case ('href') {\n @if (label()) {\n <a mat-raised-button target=\"_blank\" [attr.href]=\"href()\" [color]=\"color()\" [disabled]=\"disabled()\">\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n <span>{{ label() }}</span>\n </a>\n } @else {\n <a\n mat-icon-button\n class=\"mat-elevation-z4\"\n target=\"_blank\"\n [attr.href]=\"href()\"\n [color]=\"color()\"\n [disabled]=\"disabled()\"\n >\n @if (theIcon) {\n <mat-icon [naturalIcon]=\"theIcon\" />\n }\n </a>\n }\n }\n }\n}\n", styles: ["natural-table-button{display:flex;flex:1;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button mat-icon:not(:last-child){margin-right:5px}natural-table-button a.mat-mdc-button{display:flex;flex:1;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button a.mat-mdc-button .mdc-button__label{display:flex;flex-direction:row;align-items:center}natural-table-button>span{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;padding:0 8px}\n"] }]
|
|
10859
10857
|
}] });
|
|
10860
10858
|
|
|
10861
10859
|
/*
|
|
@@ -10915,7 +10913,7 @@ function isRetina() {
|
|
|
10915
10913
|
return true;
|
|
10916
10914
|
}
|
|
10917
10915
|
const mediaQuery = '(-webkit-min-device-pixel-ratio: 1.25), (min--moz-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5/4), (min-resolution: 1.25dppx)';
|
|
10918
|
-
return
|
|
10916
|
+
return myWindow?.matchMedia(mediaQuery).matches;
|
|
10919
10917
|
}
|
|
10920
10918
|
/**
|
|
10921
10919
|
* Return URL to Gravatar image from either an email or a MD5 or SHA-256 of an email
|
|
@@ -11072,8 +11070,8 @@ class NaturalAvatarComponent {
|
|
|
11072
11070
|
const sources = this.sources();
|
|
11073
11071
|
return sources.sources[sources.currentIndex];
|
|
11074
11072
|
});
|
|
11075
|
-
imageAvatar = computed(() => this.currentSource()?.getAvatar(
|
|
11076
|
-
textAvatar = computed(() => this.currentSource()?.getAvatar(
|
|
11073
|
+
imageAvatar = computed(() => this.currentSource()?.getAvatar(this.size()));
|
|
11074
|
+
textAvatar = computed(() => this.currentSource()?.getAvatar(this.textMaximumLength()));
|
|
11077
11075
|
/**
|
|
11078
11076
|
* Try to use the next available avatar source that has not already failed in the past
|
|
11079
11077
|
*/
|
|
@@ -11111,7 +11109,7 @@ class NaturalAvatarComponent {
|
|
|
11111
11109
|
textTransform: 'uppercase',
|
|
11112
11110
|
color: this.fgColor(),
|
|
11113
11111
|
backgroundColor: backgroundColor,
|
|
11114
|
-
font: Math.floor(
|
|
11112
|
+
font: Math.floor(this.size() / this.textSizeRatio()) + 'px Helvetica, Arial, sans-serif',
|
|
11115
11113
|
lineHeight: this.size() + 'px',
|
|
11116
11114
|
width: this.size() + 'px',
|
|
11117
11115
|
height: this.size() + 'px',
|
|
@@ -11154,7 +11152,7 @@ class NaturalAvatarComponent {
|
|
|
11154
11152
|
}
|
|
11155
11153
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImport: i0, type: NaturalAvatarComponent, decorators: [{
|
|
11156
11154
|
type: Component,
|
|
11157
|
-
args: [{ selector: 'natural-avatar', template: `
|
|
11155
|
+
args: [{ selector: 'natural-avatar', imports: [CommonModule], template: `
|
|
11158
11156
|
@let source = currentSource();
|
|
11159
11157
|
<div class="avatar-container" [style.height.px]="size()" [style.width.px]="size()">
|
|
11160
11158
|
@if (source && source?.isTextual()) {
|
|
@@ -11179,7 +11177,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.13", ngImpo
|
|
|
11179
11177
|
'[style.height.px]': 'size()',
|
|
11180
11178
|
'[style.width.px]': 'size()',
|
|
11181
11179
|
'[class.decorated]': 'decorated()',
|
|
11182
|
-
},
|
|
11180
|
+
}, styles: [":host{display:block}:host.decorated{position:relative}:host.decorated .avatar-container:before{position:absolute;inset:0;border-radius:50%;background:linear-gradient(345deg,#fff0 25%,#ffffff54);content:\"\"}:host.decorated .avatar-content{text-shadow:0 1px 0 rgba(0,0,0,.6)}\n"] }]
|
|
11183
11181
|
}] });
|
|
11184
11182
|
|
|
11185
11183
|
/*
|