@wemake4u/form-player 2.0.2 → 2.0.3
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/README.md +56 -11
- package/THIRD_PARTY_LICENSES.txt +65 -67
- package/fesm2022/wemake4u-form-player.mjs +583 -2049
- package/fesm2022/wemake4u-form-player.mjs.map +1 -1
- package/package.json +6 -14
- package/types/wemake4u-form-player.d.ts +95 -44
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, DOCUMENT, DestroyRef, Directive, ElementRef, EventEmitter,
|
|
3
|
-
import * as i1$
|
|
2
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, DOCUMENT, DestroyRef, Directive, ElementRef, EventEmitter, HostListener, Injectable, Injector, Input, Optional, Output, PLATFORM_ID, Renderer2, Self, SkipSelf, ViewChild, ViewContainerRef, ViewEncapsulation, createEnvironmentInjector, effect, forwardRef, inject, input, isSignal, signal, untracked } from "@angular/core";
|
|
3
|
+
import * as i1$5 from "@angular/common";
|
|
4
4
|
import { CommonModule, DOCUMENT as DOCUMENT$1, isPlatformBrowser } from "@angular/common";
|
|
5
|
-
import * as i1$
|
|
5
|
+
import * as i1$2 from "@angular/forms";
|
|
6
6
|
import { AbstractControl, FormArray, FormControl as FormControl$1, FormGroup, FormsModule, ReactiveFormsModule, Validators } from "@angular/forms";
|
|
7
7
|
import { BehaviorSubject, Observable, Subject, TimeoutError, catchError, combineLatest, debounceTime, distinctUntilChanged, filter, finalize, interval, isObservable, map, merge, of, pairwise, shareReplay, startWith, take, takeUntil, tap } from "rxjs";
|
|
8
8
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
9
|
-
import * as i1$
|
|
9
|
+
import * as i1$3 from "@wemake4u/interact";
|
|
10
10
|
import { LanguageService, downloadBlob, downloadFile } from "@wemake4u/interact";
|
|
11
|
-
import {
|
|
12
|
-
import * as i1$
|
|
11
|
+
import { filter as filter$1, map as map$1, shareReplay as shareReplay$1, take as take$1, tap as tap$1 } from "rxjs/operators";
|
|
12
|
+
import * as i1$4 from "@angular/router";
|
|
13
13
|
import { ActivatedRoute, NavigationStart } from "@angular/router";
|
|
14
14
|
import { buildSimpleTree, evaluate, parser } from "feelers";
|
|
15
15
|
import { evaluate as evaluate$1, parseExpression, unaryTest } from "feelin";
|
|
16
|
-
import * as i1$
|
|
17
|
-
import { SIRIO_DATA_GRID, SirioAccordion, SirioAccordionContent, SirioAccordionItem, SirioAlert, SirioAlertContent, SirioBadgeTag, SirioButton, SirioCheckbox, SirioChecklist, SirioCollapse, SirioCollapseToggle, SirioDataGrid, SirioDate, SirioDateTime, SirioDialog, SirioDialogFooter, SirioDialogRef, SirioDialogService, SirioFileUpload, SirioInfoButton, SirioNotify, SirioNotifyContent, SirioNumber, SirioOptionLabel, SirioPagination, SirioRadioGroup, SirioSelect, SirioSidenav, SirioSlider, SirioStepper, SirioTab, SirioTabContent, SirioTabs, SirioTextarea, SirioTextbox, SirioTime, provideSirioReadonlyAppearance, provideSirioValidationPresenter, sirioGridClassText, sirioGridFilterActive, sirioGridStyleObject, sirioIsFilterCondition } from "@wemake4u/form-controls";
|
|
18
|
-
import { CellStyleModule, ClientSideRowModelApiModule, ClientSideRowModelModule, ColumnApiModule, ColumnAutoSizeModule, CustomFilterModule, DateFilterModule, HighlightChangesModule, InfiniteRowModelModule, LocaleModule, NumberFilterModule, PaginationModule, RowApiModule, RowAutoHeightModule, RowSelectionModule, RowStyleModule, TextFilterModule, iconSetAlpine, themeQuartz } from "ag-grid-community";
|
|
19
|
-
import { AG_GRID_LOCALE_DE, AG_GRID_LOCALE_EN, AG_GRID_LOCALE_ES, AG_GRID_LOCALE_FR, AG_GRID_LOCALE_IT, AG_GRID_LOCALE_PT } from "@ag-grid-community/locale";
|
|
16
|
+
import * as i1$6 from "@wemake4u/form-controls";
|
|
17
|
+
import { SIRIO_DATA_GRID, SirioAccordion, SirioAccordionContent, SirioAccordionItem, SirioAlert, SirioAlertContent, SirioBadgeTag, SirioButton, SirioCheckbox, SirioChecklist, SirioCollapse, SirioCollapseToggle, SirioDataGrid, SirioDate, SirioDateTime, SirioDialog, SirioDialogFooter, SirioDialogRef, SirioDialogService, SirioFileUpload, SirioInfoButton, SirioNotify, SirioNotifyContent, SirioNumber, SirioOptionLabel, SirioPagination, SirioRadioGroup, SirioSelect, SirioSidenav, SirioSlider, SirioStepper, SirioTab, SirioTabContent, SirioTabs, SirioTextarea, SirioTextbox, SirioTime, provideSirioReadonlyAppearance, provideSirioValidationPresenter, sirioGridClassText, sirioGridFilterActive, sirioGridStyleObject, sirioIsFilterCondition, sirioToFilterModel } from "@wemake4u/form-controls";
|
|
20
18
|
import { marked } from "marked";
|
|
21
|
-
import * as i1$2 from "ag-grid-angular";
|
|
22
|
-
import { AgGridAngular } from "ag-grid-angular";
|
|
23
19
|
import { AgCharts } from "ag-charts-angular";
|
|
24
|
-
import
|
|
20
|
+
import DOMPurify from "dompurify";
|
|
25
21
|
import * as i1$1 from "@angular/platform-browser";
|
|
26
|
-
import mimeDb from "mime-db";
|
|
27
22
|
import * as i1 from "@angular/common/http";
|
|
28
|
-
import { HttpParams } from "@angular/common/http";
|
|
23
|
+
import { HttpErrorResponse, HttpParams } from "@angular/common/http";
|
|
29
24
|
var FormGroupEx = class extends FormGroup {
|
|
30
25
|
constructor(controls, mode, validatorOrOpts, asyncValidator) {
|
|
31
26
|
super(controls, validatorOrOpts, asyncValidator);
|
|
@@ -211,6 +206,8 @@ const Texts$6 = {
|
|
|
211
206
|
SomethingWentWrong: "Si è verificato un problema",
|
|
212
207
|
TimeoutOccurred: "Il server non ha risposto in tempo. Riprova tra qualche istante",
|
|
213
208
|
GenericError: "Si è verificato un errore imprevisto",
|
|
209
|
+
ServiceUnreachable: "Il servizio non è raggiungibile. Riprova tra qualche istante",
|
|
210
|
+
GridNavigationHint: "Usa le frecce per spostarti tra celle e pulsanti, Tab per uscire dalla tabella",
|
|
214
211
|
ItemPosition: "elemento {0} di {1}",
|
|
215
212
|
ItemAdded: "Elemento {0} aggiunto",
|
|
216
213
|
ItemRemoved: "Elemento {0} rimosso",
|
|
@@ -278,6 +275,8 @@ const Texts$5 = {
|
|
|
278
275
|
SomethingWentWrong: "Something went wrong",
|
|
279
276
|
TimeoutOccurred: "The server did not respond in time. Please try again in a few moments",
|
|
280
277
|
GenericError: "An unexpected error occurred",
|
|
278
|
+
ServiceUnreachable: "The service cannot be reached. Please try again in a few moments",
|
|
279
|
+
GridNavigationHint: "Use the arrow keys to move between cells and buttons, Tab to leave the table",
|
|
281
280
|
ItemPosition: "item {0} of {1}",
|
|
282
281
|
ItemAdded: "Item {0} added",
|
|
283
282
|
ItemRemoved: "Item {0} removed",
|
|
@@ -345,6 +344,8 @@ const Texts$4 = {
|
|
|
345
344
|
SomethingWentWrong: "Etwas ist schiefgelaufen",
|
|
346
345
|
TimeoutOccurred: "Der Server hat nicht rechtzeitig geantwortet. Bitte versuchen Sie es in wenigen Augenblicken erneut",
|
|
347
346
|
GenericError: "Ein unerwarteter Fehler ist aufgetreten",
|
|
347
|
+
ServiceUnreachable: "Der Dienst ist nicht erreichbar. Bitte versuchen Sie es in wenigen Augenblicken erneut",
|
|
348
|
+
GridNavigationHint: "Mit den Pfeiltasten zwischen Zellen und Schaltflächen wechseln, mit Tab die Tabelle verlassen",
|
|
348
349
|
ItemPosition: "Element {0} von {1}",
|
|
349
350
|
ItemAdded: "Element {0} hinzugefügt",
|
|
350
351
|
ItemRemoved: "Element {0} entfernt",
|
|
@@ -412,6 +413,8 @@ const Texts$3 = {
|
|
|
412
413
|
SomethingWentWrong: "Une erreur s'est produite",
|
|
413
414
|
TimeoutOccurred: "Le serveur n'a pas répondu à temps. Veuillez réessayer dans quelques instants",
|
|
414
415
|
GenericError: "Une erreur inattendue s'est produite",
|
|
416
|
+
ServiceUnreachable: "Le service n'est pas joignable. Veuillez réessayer dans quelques instants",
|
|
417
|
+
GridNavigationHint: "Utilisez les flèches pour vous déplacer entre les cellules et les boutons, Tab pour quitter le tableau",
|
|
415
418
|
ItemPosition: "élément {0} sur {1}",
|
|
416
419
|
ItemAdded: "Élément {0} ajouté",
|
|
417
420
|
ItemRemoved: "Élément {0} supprimé",
|
|
@@ -479,6 +482,8 @@ const Texts$2 = {
|
|
|
479
482
|
SomethingWentWrong: "Algo salió mal",
|
|
480
483
|
TimeoutOccurred: "El servidor no respondió a tiempo. Inténtalo de nuevo en unos instantes",
|
|
481
484
|
GenericError: "Se produjo un error inesperado",
|
|
485
|
+
ServiceUnreachable: "No se puede acceder al servicio. Inténtalo de nuevo en unos instantes",
|
|
486
|
+
GridNavigationHint: "Usa las flechas para moverte entre celdas y botones, Tab para salir de la tabla",
|
|
482
487
|
ItemPosition: "elemento {0} de {1}",
|
|
483
488
|
ItemAdded: "Elemento {0} añadido",
|
|
484
489
|
ItemRemoved: "Elemento {0} eliminado",
|
|
@@ -546,6 +551,8 @@ const Texts$1 = {
|
|
|
546
551
|
SomethingWentWrong: "Algo deu errado",
|
|
547
552
|
TimeoutOccurred: "O servidor não respondeu a tempo. Tente novamente dentro de alguns instantes",
|
|
548
553
|
GenericError: "Ocorreu um erro inesperado",
|
|
554
|
+
ServiceUnreachable: "O serviço não está acessível. Tente novamente dentro de alguns instantes",
|
|
555
|
+
GridNavigationHint: "Use as setas para mover-se entre células e botões, Tab para sair da tabela",
|
|
549
556
|
ItemPosition: "item {0} de {1}",
|
|
550
557
|
ItemAdded: "Item {0} adicionado",
|
|
551
558
|
ItemRemoved: "Item {0} removido",
|
|
@@ -1056,7 +1063,7 @@ var ToastService = class ToastService {
|
|
|
1056
1063
|
version: "22.2.2",
|
|
1057
1064
|
ngImport: i0,
|
|
1058
1065
|
type: ToastService,
|
|
1059
|
-
deps: [{ token: i1$
|
|
1066
|
+
deps: [{ token: i1$6.SirioToastService }, { token: GlobalService }],
|
|
1060
1067
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
1061
1068
|
});
|
|
1062
1069
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
@@ -1076,7 +1083,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1076
1083
|
type: Injectable,
|
|
1077
1084
|
args: [{ providedIn: "root" }]
|
|
1078
1085
|
}],
|
|
1079
|
-
ctorParameters: () => [{ type: i1$
|
|
1086
|
+
ctorParameters: () => [{ type: i1$6.SirioToastService }, { type: GlobalService }]
|
|
1080
1087
|
});
|
|
1081
1088
|
var DialogComponent = class DialogComponent {
|
|
1082
1089
|
formHost;
|
|
@@ -1211,8 +1218,8 @@ var DialogComponent = class DialogComponent {
|
|
|
1211
1218
|
static: true
|
|
1212
1219
|
}],
|
|
1213
1220
|
ngImport: i0,
|
|
1214
|
-
template: "<wm-sirio-dialog\r\n [title]=\"options.title ?? ''\"\r\n [icon]=\"icon()\"\r\n [tone]=\"tone()\"\r\n centered\r\n [size]=\"options.size ?? 'default'\"\r\n [drawer]=\"options.isDrawer ?? false\"\r\n [alert]=\"options.alert ?? false\"\r\n [dismissible]=\"showCloseButton()\"\r\n [closeLabel]=\"locale(Texts, 'Close')\"\r\n [closeOnBackdrop]=\"options.isDrawer ?? false\"\r\n (closed)=\"onClosed()\">\r\n\r\n <ng-template #formHost></ng-template>\r\n\r\n @if (showFooter()) {\r\n <div wmSirioDialogFooter>\r\n @switch (options.buttons) {\r\n <!-- OK -->\r\n @case ('OK') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'OK' }\"></ng-container>\r\n }\r\n <!-- Caso: OKCancel -->\r\n @case ('OKCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'OK' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: ConfirmClose -->\r\n @case ('ConfirmCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Confirm' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: AbortRetryIgnore -->\r\n @case ('AbortRetryIgnore') {\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Abort' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Retry' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Ignore' }\"></ng-container>\r\n }\r\n <!-- Caso: YesNoCancel -->\r\n @case ('YesNoCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Yes' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'No' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: YesNo -->\r\n @case ('YesNo') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Yes' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'No' }\"></ng-container>\r\n }\r\n <!-- Caso: RetryCancel -->\r\n @case ('RetryCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Retry' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: CancelTryContinue -->\r\n @case ('CancelTryContinue') {\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Try' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Continue' }\"></ng-container>\r\n }\r\n <!-- Caso: Custom -->\r\n @case ('Custom') {\r\n @for (customButton of options.customButtons ?? []; track customButton; let i = $index) {\r\n <ng-container *ngTemplateOutlet=\"customTemplate; context: { customButton: customButton }\"></ng-container>\r\n }\r\n }\r\n }\r\n <!-- Templates -->\r\n <ng-template #confirmTemplate let-action=\"action\">\r\n <button type=\"button\" wmSirioButton=\"primary\" (click)=\"doSubmit(action)\" [disabled]=\"!canSubmit()\">{{ locale(Texts, action) }}</button>\r\n </ng-template>\r\n <ng-template #closeTemplate let-action=\"action\">\r\n <button type=\"button\" wmSirioButton=\"secondary\" (click)=\"doAction(action)\">{{ locale(Texts, action) }}</button>\r\n </ng-template>\r\n <ng-template #customTemplate\r\n let-customButton=\"customButton\">\r\n <!-- No color = plain button (ngx-sirio-lib color null). -->\r\n <button type=\"button\" [wmSirioButton]=\"customButton.color || 'ghost'\" (click)=\"doAction(customButton.action)\">{{ customButton.text }}</button>\r\n </ng-template>\r\n </div>\r\n }\r\n\r\n</wm-sirio-dialog>\r\n",
|
|
1215
|
-
styles: ["::ng-deep .sirio-
|
|
1221
|
+
template: "<wm-sirio-dialog\r\n [title]=\"options.title ?? ''\"\r\n [icon]=\"icon()\"\r\n [tone]=\"tone()\"\r\n centered\r\n backdrop=\"light\"\r\n [size]=\"options.size ?? 'default'\"\r\n [drawer]=\"options.isDrawer ?? false\"\r\n [alert]=\"options.alert ?? false\"\r\n [dismissible]=\"showCloseButton()\"\r\n [closeLabel]=\"locale(Texts, 'Close')\"\r\n [closeOnBackdrop]=\"options.isDrawer ?? false\"\r\n (closed)=\"onClosed()\">\r\n\r\n <ng-template #formHost></ng-template>\r\n\r\n @if (showFooter()) {\r\n <div wmSirioDialogFooter>\r\n @switch (options.buttons) {\r\n <!-- OK -->\r\n @case ('OK') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'OK' }\"></ng-container>\r\n }\r\n <!-- Caso: OKCancel -->\r\n @case ('OKCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'OK' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: ConfirmClose -->\r\n @case ('ConfirmCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Confirm' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: AbortRetryIgnore -->\r\n @case ('AbortRetryIgnore') {\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Abort' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Retry' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Ignore' }\"></ng-container>\r\n }\r\n <!-- Caso: YesNoCancel -->\r\n @case ('YesNoCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Yes' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'No' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: YesNo -->\r\n @case ('YesNo') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Yes' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'No' }\"></ng-container>\r\n }\r\n <!-- Caso: RetryCancel -->\r\n @case ('RetryCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Retry' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: CancelTryContinue -->\r\n @case ('CancelTryContinue') {\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Try' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Continue' }\"></ng-container>\r\n }\r\n <!-- Caso: Custom -->\r\n @case ('Custom') {\r\n @for (customButton of options.customButtons ?? []; track customButton; let i = $index) {\r\n <ng-container *ngTemplateOutlet=\"customTemplate; context: { customButton: customButton }\"></ng-container>\r\n }\r\n }\r\n }\r\n <!-- Templates -->\r\n <ng-template #confirmTemplate let-action=\"action\">\r\n <button type=\"button\" wmSirioButton=\"primary\" (click)=\"doSubmit(action)\" [disabled]=\"!canSubmit()\">{{ locale(Texts, action) }}</button>\r\n </ng-template>\r\n <ng-template #closeTemplate let-action=\"action\">\r\n <button type=\"button\" wmSirioButton=\"secondary\" (click)=\"doAction(action)\">{{ locale(Texts, action) }}</button>\r\n </ng-template>\r\n <ng-template #customTemplate\r\n let-customButton=\"customButton\">\r\n <!-- No color = plain button (ngx-sirio-lib color null). -->\r\n <button type=\"button\" [wmSirioButton]=\"customButton.color || 'ghost'\" (click)=\"doAction(customButton.action)\">{{ customButton.text }}</button>\r\n </ng-template>\r\n </div>\r\n }\r\n\r\n</wm-sirio-dialog>\r\n",
|
|
1222
|
+
styles: ["::ng-deep .sirio-drawer .sirio-dialog .sirio-dialog-sm .sirio-dialog-content{max-width:18.75rem}::ng-deep .sirio-drawer .sirio-dialog .sirio-dialog-lg .sirio-dialog-content{max-width:50rem}::ng-deep .sirio-drawer .sirio-dialog .sirio-dialog-xl .sirio-dialog-content{max-width:71.25rem}\n"],
|
|
1216
1223
|
dependencies: [
|
|
1217
1224
|
{
|
|
1218
1225
|
kind: "ngmodule",
|
|
@@ -1220,7 +1227,7 @@ var DialogComponent = class DialogComponent {
|
|
|
1220
1227
|
},
|
|
1221
1228
|
{
|
|
1222
1229
|
kind: "directive",
|
|
1223
|
-
type: i1$
|
|
1230
|
+
type: i1$5.NgTemplateOutlet,
|
|
1224
1231
|
selector: "[ngTemplateOutlet]",
|
|
1225
1232
|
inputs: [
|
|
1226
1233
|
"ngTemplateOutletContext",
|
|
@@ -1246,6 +1253,8 @@ var DialogComponent = class DialogComponent {
|
|
|
1246
1253
|
"closeOnBackdrop",
|
|
1247
1254
|
"alert",
|
|
1248
1255
|
"drawer",
|
|
1256
|
+
"backdrop",
|
|
1257
|
+
"header",
|
|
1249
1258
|
"panelClass",
|
|
1250
1259
|
"inline"
|
|
1251
1260
|
],
|
|
@@ -1296,8 +1305,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1296
1305
|
SirioButton
|
|
1297
1306
|
],
|
|
1298
1307
|
changeDetection: ChangeDetectionStrategy.Eager,
|
|
1299
|
-
template: "<wm-sirio-dialog\r\n [title]=\"options.title ?? ''\"\r\n [icon]=\"icon()\"\r\n [tone]=\"tone()\"\r\n centered\r\n [size]=\"options.size ?? 'default'\"\r\n [drawer]=\"options.isDrawer ?? false\"\r\n [alert]=\"options.alert ?? false\"\r\n [dismissible]=\"showCloseButton()\"\r\n [closeLabel]=\"locale(Texts, 'Close')\"\r\n [closeOnBackdrop]=\"options.isDrawer ?? false\"\r\n (closed)=\"onClosed()\">\r\n\r\n <ng-template #formHost></ng-template>\r\n\r\n @if (showFooter()) {\r\n <div wmSirioDialogFooter>\r\n @switch (options.buttons) {\r\n <!-- OK -->\r\n @case ('OK') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'OK' }\"></ng-container>\r\n }\r\n <!-- Caso: OKCancel -->\r\n @case ('OKCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'OK' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: ConfirmClose -->\r\n @case ('ConfirmCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Confirm' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: AbortRetryIgnore -->\r\n @case ('AbortRetryIgnore') {\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Abort' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Retry' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Ignore' }\"></ng-container>\r\n }\r\n <!-- Caso: YesNoCancel -->\r\n @case ('YesNoCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Yes' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'No' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: YesNo -->\r\n @case ('YesNo') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Yes' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'No' }\"></ng-container>\r\n }\r\n <!-- Caso: RetryCancel -->\r\n @case ('RetryCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Retry' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: CancelTryContinue -->\r\n @case ('CancelTryContinue') {\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Try' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Continue' }\"></ng-container>\r\n }\r\n <!-- Caso: Custom -->\r\n @case ('Custom') {\r\n @for (customButton of options.customButtons ?? []; track customButton; let i = $index) {\r\n <ng-container *ngTemplateOutlet=\"customTemplate; context: { customButton: customButton }\"></ng-container>\r\n }\r\n }\r\n }\r\n <!-- Templates -->\r\n <ng-template #confirmTemplate let-action=\"action\">\r\n <button type=\"button\" wmSirioButton=\"primary\" (click)=\"doSubmit(action)\" [disabled]=\"!canSubmit()\">{{ locale(Texts, action) }}</button>\r\n </ng-template>\r\n <ng-template #closeTemplate let-action=\"action\">\r\n <button type=\"button\" wmSirioButton=\"secondary\" (click)=\"doAction(action)\">{{ locale(Texts, action) }}</button>\r\n </ng-template>\r\n <ng-template #customTemplate\r\n let-customButton=\"customButton\">\r\n <!-- No color = plain button (ngx-sirio-lib color null). -->\r\n <button type=\"button\" [wmSirioButton]=\"customButton.color || 'ghost'\" (click)=\"doAction(customButton.action)\">{{ customButton.text }}</button>\r\n </ng-template>\r\n </div>\r\n }\r\n\r\n</wm-sirio-dialog>\r\n",
|
|
1300
|
-
styles: ["::ng-deep .sirio-
|
|
1308
|
+
template: "<wm-sirio-dialog\r\n [title]=\"options.title ?? ''\"\r\n [icon]=\"icon()\"\r\n [tone]=\"tone()\"\r\n centered\r\n backdrop=\"light\"\r\n [size]=\"options.size ?? 'default'\"\r\n [drawer]=\"options.isDrawer ?? false\"\r\n [alert]=\"options.alert ?? false\"\r\n [dismissible]=\"showCloseButton()\"\r\n [closeLabel]=\"locale(Texts, 'Close')\"\r\n [closeOnBackdrop]=\"options.isDrawer ?? false\"\r\n (closed)=\"onClosed()\">\r\n\r\n <ng-template #formHost></ng-template>\r\n\r\n @if (showFooter()) {\r\n <div wmSirioDialogFooter>\r\n @switch (options.buttons) {\r\n <!-- OK -->\r\n @case ('OK') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'OK' }\"></ng-container>\r\n }\r\n <!-- Caso: OKCancel -->\r\n @case ('OKCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'OK' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: ConfirmClose -->\r\n @case ('ConfirmCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Confirm' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: AbortRetryIgnore -->\r\n @case ('AbortRetryIgnore') {\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Abort' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Retry' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Ignore' }\"></ng-container>\r\n }\r\n <!-- Caso: YesNoCancel -->\r\n @case ('YesNoCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Yes' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'No' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: YesNo -->\r\n @case ('YesNo') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Yes' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'No' }\"></ng-container>\r\n }\r\n <!-- Caso: RetryCancel -->\r\n @case ('RetryCancel') {\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Retry' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n }\r\n <!-- Caso: CancelTryContinue -->\r\n @case ('CancelTryContinue') {\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Cancel' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"confirmTemplate; context: { action: 'Try' }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"closeTemplate; context: { action: 'Continue' }\"></ng-container>\r\n }\r\n <!-- Caso: Custom -->\r\n @case ('Custom') {\r\n @for (customButton of options.customButtons ?? []; track customButton; let i = $index) {\r\n <ng-container *ngTemplateOutlet=\"customTemplate; context: { customButton: customButton }\"></ng-container>\r\n }\r\n }\r\n }\r\n <!-- Templates -->\r\n <ng-template #confirmTemplate let-action=\"action\">\r\n <button type=\"button\" wmSirioButton=\"primary\" (click)=\"doSubmit(action)\" [disabled]=\"!canSubmit()\">{{ locale(Texts, action) }}</button>\r\n </ng-template>\r\n <ng-template #closeTemplate let-action=\"action\">\r\n <button type=\"button\" wmSirioButton=\"secondary\" (click)=\"doAction(action)\">{{ locale(Texts, action) }}</button>\r\n </ng-template>\r\n <ng-template #customTemplate\r\n let-customButton=\"customButton\">\r\n <!-- No color = plain button (ngx-sirio-lib color null). -->\r\n <button type=\"button\" [wmSirioButton]=\"customButton.color || 'ghost'\" (click)=\"doAction(customButton.action)\">{{ customButton.text }}</button>\r\n </ng-template>\r\n </div>\r\n }\r\n\r\n</wm-sirio-dialog>\r\n",
|
|
1309
|
+
styles: ["::ng-deep .sirio-drawer .sirio-dialog .sirio-dialog-sm .sirio-dialog-content{max-width:18.75rem}::ng-deep .sirio-drawer .sirio-dialog .sirio-dialog-lg .sirio-dialog-content{max-width:50rem}::ng-deep .sirio-drawer .sirio-dialog .sirio-dialog-xl .sirio-dialog-content{max-width:71.25rem}\n"]
|
|
1301
1310
|
}]
|
|
1302
1311
|
}],
|
|
1303
1312
|
propDecorators: {
|
|
@@ -2360,7 +2369,7 @@ var NavigationService = class NavigationService {
|
|
|
2360
2369
|
version: "22.2.2",
|
|
2361
2370
|
ngImport: i0,
|
|
2362
2371
|
type: NavigationService,
|
|
2363
|
-
deps: [{ token: i1$
|
|
2372
|
+
deps: [{ token: i1$4.Router }],
|
|
2364
2373
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
2365
2374
|
});
|
|
2366
2375
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
@@ -2380,7 +2389,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2380
2389
|
type: Injectable,
|
|
2381
2390
|
args: [{ providedIn: "root" }]
|
|
2382
2391
|
}],
|
|
2383
|
-
ctorParameters: () => [{ type: i1$
|
|
2392
|
+
ctorParameters: () => [{ type: i1$4.Router }]
|
|
2384
2393
|
});
|
|
2385
2394
|
var StateService = class StateService {
|
|
2386
2395
|
navigation;
|
|
@@ -3610,7 +3619,7 @@ var ValidationService = class ValidationService {
|
|
|
3610
3619
|
version: "22.2.2",
|
|
3611
3620
|
ngImport: i0,
|
|
3612
3621
|
type: ValidationService,
|
|
3613
|
-
deps: [{ token: i1$
|
|
3622
|
+
deps: [{ token: i1$3.LanguageService }, { token: ProgrammabilityService }],
|
|
3614
3623
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
3615
3624
|
});
|
|
3616
3625
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
@@ -3626,7 +3635,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3626
3635
|
ngImport: i0,
|
|
3627
3636
|
type: ValidationService,
|
|
3628
3637
|
decorators: [{ type: Injectable }],
|
|
3629
|
-
ctorParameters: () => [{ type: i1$
|
|
3638
|
+
ctorParameters: () => [{ type: i1$3.LanguageService }, { type: ProgrammabilityService }]
|
|
3630
3639
|
});
|
|
3631
3640
|
var DisableService = class DisableService {
|
|
3632
3641
|
programmability;
|
|
@@ -3668,6 +3677,7 @@ var DisableService = class DisableService {
|
|
|
3668
3677
|
logDisabled(value);
|
|
3669
3678
|
} else {
|
|
3670
3679
|
if (control.enabled && !container) return;
|
|
3680
|
+
if (control.parent?.disabled) return;
|
|
3671
3681
|
control.enable();
|
|
3672
3682
|
logDisabled(value);
|
|
3673
3683
|
}
|
|
@@ -3852,8 +3862,9 @@ var StatusService = class StatusService {
|
|
|
3852
3862
|
totalErrors: 0,
|
|
3853
3863
|
visibleErrors: 0
|
|
3854
3864
|
});
|
|
3865
|
+
const dirtyKey = key ?? collection.rootKey;
|
|
3855
3866
|
const markDirty = () => {
|
|
3856
|
-
const entry = this.invalidMap.get(
|
|
3867
|
+
const entry = this.invalidMap.get(dirtyKey);
|
|
3857
3868
|
if (entry) entry.dirty = true;
|
|
3858
3869
|
this.statusDone.notify();
|
|
3859
3870
|
};
|
|
@@ -3936,6 +3947,7 @@ var StatusCollection = class StatusCollection {
|
|
|
3936
3947
|
}
|
|
3937
3948
|
controls = /* @__PURE__ */ new Set();
|
|
3938
3949
|
children = /* @__PURE__ */ new Map();
|
|
3950
|
+
rootKey;
|
|
3939
3951
|
add(control) {
|
|
3940
3952
|
this.controls.add(control);
|
|
3941
3953
|
return this;
|
|
@@ -3955,6 +3967,7 @@ var StatusCollection = class StatusCollection {
|
|
|
3955
3967
|
let collection = this.children.get(key);
|
|
3956
3968
|
if (!collection) {
|
|
3957
3969
|
collection = new StatusCollection();
|
|
3970
|
+
collection.rootKey = this.key ?? this.rootKey;
|
|
3958
3971
|
this.children.set(key, collection);
|
|
3959
3972
|
}
|
|
3960
3973
|
return collection;
|
|
@@ -4662,200 +4675,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4662
4675
|
}],
|
|
4663
4676
|
ctorParameters: () => [{ type: ProgrammabilityService }]
|
|
4664
4677
|
});
|
|
4665
|
-
const getLabelSymbol = Symbol("getLabel");
|
|
4666
|
-
function isLabeledRecord(obj, isKey, isValue, getLabelSymbol) {
|
|
4667
|
-
if (!isRecord(obj, isKey, isValue)) return false;
|
|
4668
|
-
const getLabel = obj[getLabelSymbol];
|
|
4669
|
-
return getLabel !== void 0 && typeof getLabel === "function";
|
|
4670
|
-
}
|
|
4671
|
-
function isRecord(obj, isKey, isValue) {
|
|
4672
|
-
if (typeof obj !== "object" || obj === null || Array.isArray(obj)) return false;
|
|
4673
|
-
return Object.entries(obj).every(([key, val]) => {
|
|
4674
|
-
return isKey(key) && isValue(val);
|
|
4675
|
-
});
|
|
4676
|
-
}
|
|
4677
|
-
function isNumericKey(key) {
|
|
4678
|
-
return typeof key === "string" && !isNaN(Number(key));
|
|
4679
|
-
}
|
|
4680
|
-
var SetFilterComponent = class SetFilterComponent {
|
|
4681
|
-
params;
|
|
4682
|
-
fieldName;
|
|
4683
|
-
Texts = Texts$6;
|
|
4684
|
-
selectAll = true;
|
|
4685
|
-
searchText = "";
|
|
4686
|
-
options = [];
|
|
4687
|
-
filteredOptions = [];
|
|
4688
|
-
agInit(params) {
|
|
4689
|
-
this.params = params;
|
|
4690
|
-
this.fieldName = params.colDef.field;
|
|
4691
|
-
const map = params.colDef.filterParams?.map;
|
|
4692
|
-
if (isRecord(map, (key) => typeof key === "string" || typeof key === "number", (val) => typeof val === "string")) this.options = Object.entries(map).map(([key, label]) => ({
|
|
4693
|
-
value: this.parseKey(key),
|
|
4694
|
-
label,
|
|
4695
|
-
selected: true
|
|
4696
|
-
}));
|
|
4697
|
-
else this.options = [];
|
|
4698
|
-
this.filteredOptions = [...this.options];
|
|
4699
|
-
}
|
|
4700
|
-
isFilterActive() {
|
|
4701
|
-
return this.options.some((o) => !o.selected);
|
|
4702
|
-
}
|
|
4703
|
-
doesFilterPass(params) {
|
|
4704
|
-
const value = this.resolvePath(params.data, this.fieldName);
|
|
4705
|
-
return this.options.some((o) => o.selected && o.value === value);
|
|
4706
|
-
}
|
|
4707
|
-
getModel() {
|
|
4708
|
-
const selectedValues = this.options.filter((o) => o.selected).map((o) => o.value);
|
|
4709
|
-
if (selectedValues.length === this.options.length) return null;
|
|
4710
|
-
if (selectedValues.length === 0) return {
|
|
4711
|
-
filterType: "text",
|
|
4712
|
-
type: "excludeAll"
|
|
4713
|
-
};
|
|
4714
|
-
const filterType = this.getFilterType();
|
|
4715
|
-
const filters = selectedValues.map((value) => ({
|
|
4716
|
-
filterType,
|
|
4717
|
-
type: "equals",
|
|
4718
|
-
filter: value
|
|
4719
|
-
}));
|
|
4720
|
-
if (filters.length === 1) return filters[0];
|
|
4721
|
-
return {
|
|
4722
|
-
filterType,
|
|
4723
|
-
operator: "OR",
|
|
4724
|
-
conditions: filters
|
|
4725
|
-
};
|
|
4726
|
-
}
|
|
4727
|
-
setModel(model) {
|
|
4728
|
-
if (model == null) return;
|
|
4729
|
-
this.selectAll = false;
|
|
4730
|
-
if (model?.type === "excludeAll") this.options.forEach((o) => o.selected = false);
|
|
4731
|
-
else if (model?.type === "equals") this.options.forEach((o) => o.selected = o.value == model.filter);
|
|
4732
|
-
else if (model?.operator === "OR" && Array.isArray(model.conditions)) {
|
|
4733
|
-
const selected = model.conditions.map((x) => x.filter);
|
|
4734
|
-
this.options.forEach((o) => o.selected = selected.includes(o.value));
|
|
4735
|
-
}
|
|
4736
|
-
this.updateFilteredOptions();
|
|
4737
|
-
}
|
|
4738
|
-
onSelectionChange() {
|
|
4739
|
-
this.params.filterChangedCallback();
|
|
4740
|
-
}
|
|
4741
|
-
onSearchChange() {
|
|
4742
|
-
this.updateFilteredOptions();
|
|
4743
|
-
}
|
|
4744
|
-
onSelectAllChange() {
|
|
4745
|
-
this.setAll(this.selectAll);
|
|
4746
|
-
}
|
|
4747
|
-
parseKey(key) {
|
|
4748
|
-
if (key === "true") return true;
|
|
4749
|
-
if (key === "false") return false;
|
|
4750
|
-
const num = Number(key);
|
|
4751
|
-
return isNaN(num) ? key : num;
|
|
4752
|
-
}
|
|
4753
|
-
setAll(select) {
|
|
4754
|
-
this.options.forEach((o) => o.selected = select);
|
|
4755
|
-
this.updateFilteredOptions();
|
|
4756
|
-
this.params.filterChangedCallback();
|
|
4757
|
-
}
|
|
4758
|
-
updateFilteredOptions() {
|
|
4759
|
-
const search = this.searchText.toLowerCase();
|
|
4760
|
-
this.filteredOptions = this.options.filter((o) => o.label.toLowerCase().includes(search));
|
|
4761
|
-
}
|
|
4762
|
-
resolvePath(obj, path) {
|
|
4763
|
-
return path.split(".").reduce((acc, part) => acc?.[part], obj);
|
|
4764
|
-
}
|
|
4765
|
-
getFilterType() {
|
|
4766
|
-
switch (this.params?.colDef?.cellDataType) {
|
|
4767
|
-
case "number": return "number";
|
|
4768
|
-
case "date":
|
|
4769
|
-
case "dateTime": return "date";
|
|
4770
|
-
case "text": return "text";
|
|
4771
|
-
default: return "number";
|
|
4772
|
-
}
|
|
4773
|
-
}
|
|
4774
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
4775
|
-
minVersion: "12.0.0",
|
|
4776
|
-
version: "22.2.2",
|
|
4777
|
-
ngImport: i0,
|
|
4778
|
-
type: SetFilterComponent,
|
|
4779
|
-
deps: [],
|
|
4780
|
-
target: i0.ɵɵFactoryTarget.Component
|
|
4781
|
-
});
|
|
4782
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
4783
|
-
minVersion: "17.0.0",
|
|
4784
|
-
version: "22.2.2",
|
|
4785
|
-
type: SetFilterComponent,
|
|
4786
|
-
isStandalone: true,
|
|
4787
|
-
selector: "ng-component",
|
|
4788
|
-
ngImport: i0,
|
|
4789
|
-
template: "<div class=\"set-filter\">\r\n\r\n <wm-sirio-textbox\r\n [placeholder]=\"Texts.TypeToSearch\"\r\n [ariaLabel]=\"Texts.TypeToSearch\"\r\n autocomplete=\"off\"\r\n [(ngModel)]=\"searchText\"\r\n (ngModelChange)=\"onSearchChange()\" />\r\n\r\n <div class=\"set-filter-options\">\r\n <wm-sirio-checkbox [label]=\"Texts.SelectAll\" [(ngModel)]=\"selectAll\" (ngModelChange)=\"onSelectAllChange()\" />\r\n\r\n @for (option of filteredOptions; track option) {\r\n <wm-sirio-checkbox\r\n [label]=\"option.label\"\r\n [(ngModel)]=\"option.selected\"\r\n (ngModelChange)=\"onSelectionChange()\" />\r\n }\r\n </div>\r\n\r\n</div>\r\n",
|
|
4790
|
-
styles: [".set-filter{padding:10px;background-color:#fff}.set-filter-options{max-height:200px;overflow-y:auto}\n"],
|
|
4791
|
-
dependencies: [
|
|
4792
|
-
{
|
|
4793
|
-
kind: "ngmodule",
|
|
4794
|
-
type: FormsModule
|
|
4795
|
-
},
|
|
4796
|
-
{
|
|
4797
|
-
kind: "directive",
|
|
4798
|
-
type: i1$3.NgControlStatus,
|
|
4799
|
-
selector: "[formControlName],[ngModel],[formControl]"
|
|
4800
|
-
},
|
|
4801
|
-
{
|
|
4802
|
-
kind: "directive",
|
|
4803
|
-
type: i1$3.NgModel,
|
|
4804
|
-
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
4805
|
-
inputs: [
|
|
4806
|
-
"name",
|
|
4807
|
-
"disabled",
|
|
4808
|
-
"ngModel",
|
|
4809
|
-
"ngModelOptions"
|
|
4810
|
-
],
|
|
4811
|
-
outputs: ["ngModelChange"],
|
|
4812
|
-
exportAs: ["ngModel"]
|
|
4813
|
-
},
|
|
4814
|
-
{
|
|
4815
|
-
kind: "component",
|
|
4816
|
-
type: SirioTextbox,
|
|
4817
|
-
selector: "wm-sirio-textbox",
|
|
4818
|
-
inputs: [
|
|
4819
|
-
"type",
|
|
4820
|
-
"maxlength",
|
|
4821
|
-
"autocomplete",
|
|
4822
|
-
"emptyAsNull",
|
|
4823
|
-
"textCase"
|
|
4824
|
-
]
|
|
4825
|
-
},
|
|
4826
|
-
{
|
|
4827
|
-
kind: "component",
|
|
4828
|
-
type: SirioCheckbox,
|
|
4829
|
-
selector: "wm-sirio-checkbox",
|
|
4830
|
-
inputs: [
|
|
4831
|
-
"toggle",
|
|
4832
|
-
"togglePosition",
|
|
4833
|
-
"inline"
|
|
4834
|
-
]
|
|
4835
|
-
}
|
|
4836
|
-
],
|
|
4837
|
-
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
4838
|
-
});
|
|
4839
|
-
};
|
|
4840
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
4841
|
-
minVersion: "12.0.0",
|
|
4842
|
-
version: "22.2.2",
|
|
4843
|
-
ngImport: i0,
|
|
4844
|
-
type: SetFilterComponent,
|
|
4845
|
-
decorators: [{
|
|
4846
|
-
type: Component,
|
|
4847
|
-
args: [{
|
|
4848
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
4849
|
-
imports: [
|
|
4850
|
-
FormsModule,
|
|
4851
|
-
SirioTextbox,
|
|
4852
|
-
SirioCheckbox
|
|
4853
|
-
],
|
|
4854
|
-
template: "<div class=\"set-filter\">\r\n\r\n <wm-sirio-textbox\r\n [placeholder]=\"Texts.TypeToSearch\"\r\n [ariaLabel]=\"Texts.TypeToSearch\"\r\n autocomplete=\"off\"\r\n [(ngModel)]=\"searchText\"\r\n (ngModelChange)=\"onSearchChange()\" />\r\n\r\n <div class=\"set-filter-options\">\r\n <wm-sirio-checkbox [label]=\"Texts.SelectAll\" [(ngModel)]=\"selectAll\" (ngModelChange)=\"onSelectAllChange()\" />\r\n\r\n @for (option of filteredOptions; track option) {\r\n <wm-sirio-checkbox\r\n [label]=\"option.label\"\r\n [(ngModel)]=\"option.selected\"\r\n (ngModelChange)=\"onSelectionChange()\" />\r\n }\r\n </div>\r\n\r\n</div>\r\n",
|
|
4855
|
-
styles: [".set-filter{padding:10px;background-color:#fff}.set-filter-options{max-height:200px;overflow-y:auto}\n"]
|
|
4856
|
-
}]
|
|
4857
|
-
}]
|
|
4858
|
-
});
|
|
4859
4678
|
var HostCellRendererComponent = class HostCellRendererComponent {
|
|
4860
4679
|
injector;
|
|
4861
4680
|
programmability;
|
|
@@ -4998,856 +4817,102 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4998
4817
|
}]
|
|
4999
4818
|
}] }
|
|
5000
4819
|
});
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
let el = element;
|
|
5006
|
-
while (el) {
|
|
5007
|
-
const style = window.getComputedStyle(el);
|
|
5008
|
-
if (style.display === "none" || style.visibility === "hidden") return false;
|
|
5009
|
-
el = el.parentElement;
|
|
4820
|
+
var CacheContextService = class CacheContextService {
|
|
4821
|
+
programmability;
|
|
4822
|
+
constructor(programmability) {
|
|
4823
|
+
this.programmability = programmability;
|
|
5010
4824
|
}
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
function isFocusable(element) {
|
|
5014
|
-
const style = window.getComputedStyle(element);
|
|
5015
|
-
const hasTabIndex = element.tabIndex >= 0;
|
|
5016
|
-
const isContentEditable = element.hasAttribute("contenteditable") && element.getAttribute("contenteditable") !== "false";
|
|
5017
|
-
if (element.contentEditable === "true") return true;
|
|
5018
|
-
return (hasTabIndex || isContentEditable) && style.visibility !== "hidden" && style.display !== "none" && !element.hasAttribute("disabled") && isVisible(element);
|
|
5019
|
-
}
|
|
5020
|
-
function getFocusables(el, firstOnly = false) {
|
|
5021
|
-
const candidates = getCandidate(el);
|
|
5022
|
-
const result = [];
|
|
5023
|
-
for (const focusableEl of candidates) if (isFocusable(focusableEl)) {
|
|
5024
|
-
result.push(focusableEl);
|
|
5025
|
-
if (firstOnly) break;
|
|
4825
|
+
isExpression(text) {
|
|
4826
|
+
return this.programmability.isExpression(text);
|
|
5026
4827
|
}
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
function setFocus(el, preventScroll = false) {
|
|
5030
|
-
const focusables = getFocusables(el, true);
|
|
5031
|
-
if (focusables.length === 0) return null;
|
|
5032
|
-
const target = focusables[0];
|
|
5033
|
-
target.focus({ preventScroll });
|
|
5034
|
-
return target;
|
|
5035
|
-
}
|
|
5036
|
-
function hasFieldFocus(container) {
|
|
5037
|
-
const active = container.ownerDocument.activeElement;
|
|
5038
|
-
return !!active && active !== container && container.contains(active) && active.matches("input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])");
|
|
5039
|
-
}
|
|
5040
|
-
var MarkdownService = class MarkdownService {
|
|
5041
|
-
constructor() {
|
|
5042
|
-
marked.use({
|
|
5043
|
-
async: false,
|
|
5044
|
-
gfm: true,
|
|
5045
|
-
breaks: true
|
|
5046
|
-
});
|
|
5047
|
-
const renderer = new marked.Renderer();
|
|
5048
|
-
renderer.link = function(args) {
|
|
5049
|
-
if (args.href?.startsWith("action://")) return `<a href="#" data-action="${args.href.substring(9)}">${args.text}</a>`;
|
|
5050
|
-
return `<a href="${args.href}" target="_blank">${args.text}</a>`;
|
|
5051
|
-
};
|
|
5052
|
-
marked.setOptions({ renderer });
|
|
4828
|
+
getExpression(text) {
|
|
4829
|
+
return this.programmability.getExpression(text);
|
|
5053
4830
|
}
|
|
5054
|
-
|
|
5055
|
-
return
|
|
4831
|
+
evaluateString(cacheControl, formGroup, value, options = {}) {
|
|
4832
|
+
if (this.isExpression(value)) return this.call(cacheControl, value, () => this.programmability.evaluateString(formGroup, value, this.getOptions(options)));
|
|
4833
|
+
return value ?? "";
|
|
5056
4834
|
}
|
|
5057
|
-
|
|
5058
|
-
|
|
4835
|
+
evaluateBoolean(cacheControl, formGroup, value, options = {}) {
|
|
4836
|
+
if (typeof value === "boolean") return value;
|
|
4837
|
+
else if (this.isExpression(value)) return this.call(cacheControl, value, () => this.programmability.evaluateBoolean(formGroup, value, this.getOptions(options)));
|
|
4838
|
+
return null;
|
|
4839
|
+
}
|
|
4840
|
+
evaluateNumber(cacheControl, formGroup, value, options = {}) {
|
|
4841
|
+
if (typeof value === "number") return value;
|
|
4842
|
+
else if (this.isExpression(value)) return this.call(cacheControl, value, () => this.programmability.evaluateNumber(formGroup, value, this.getOptions(options)));
|
|
4843
|
+
return null;
|
|
4844
|
+
}
|
|
4845
|
+
evaluate(cacheControl, formGroup, value, options = {}) {
|
|
4846
|
+
if (this.isExpression(value)) return this.call(cacheControl, value, () => this.programmability.evaluate(formGroup, value, this.getOptions(options)));
|
|
4847
|
+
return value;
|
|
4848
|
+
}
|
|
4849
|
+
evaluateTemplate(cacheControl, formGroup, value, options = {}) {
|
|
4850
|
+
return this.call(cacheControl, value, () => this.programmability.evaluateTemplate(formGroup, value, this.getOptions(options)));
|
|
4851
|
+
}
|
|
4852
|
+
evaluateUnary(cacheControl, formGroup, value, input, options = {}) {
|
|
4853
|
+
if (this.isExpression(value)) return this.call(cacheControl, value, () => this.programmability.evaluateUnary(formGroup, value, input, this.getOptions(options)));
|
|
4854
|
+
return null;
|
|
4855
|
+
}
|
|
4856
|
+
invalidate(cacheControl) {
|
|
4857
|
+
if (this.cache.has(cacheControl)) this.cache.delete(cacheControl);
|
|
4858
|
+
}
|
|
4859
|
+
invalidateAll() {
|
|
4860
|
+
this.cache = /* @__PURE__ */ new WeakMap();
|
|
4861
|
+
}
|
|
4862
|
+
getOptions(options) {
|
|
4863
|
+
return {
|
|
4864
|
+
...options,
|
|
4865
|
+
cacheable: false
|
|
4866
|
+
};
|
|
4867
|
+
}
|
|
4868
|
+
call(cacheControl, value, evaluate) {
|
|
4869
|
+
if (value === null) return null;
|
|
4870
|
+
if (!this.cache.has(cacheControl)) this.cache.set(cacheControl, {});
|
|
4871
|
+
const cachedObject = this.cache.get(cacheControl);
|
|
4872
|
+
if (value in cachedObject) return cachedObject[value];
|
|
4873
|
+
const result = evaluate();
|
|
4874
|
+
cachedObject[value] = result;
|
|
4875
|
+
return result;
|
|
5059
4876
|
}
|
|
4877
|
+
cache = /* @__PURE__ */ new WeakMap();
|
|
5060
4878
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5061
4879
|
minVersion: "12.0.0",
|
|
5062
4880
|
version: "22.2.2",
|
|
5063
4881
|
ngImport: i0,
|
|
5064
|
-
type:
|
|
5065
|
-
deps: [],
|
|
4882
|
+
type: CacheContextService,
|
|
4883
|
+
deps: [{ token: ProgrammabilityService }],
|
|
5066
4884
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
5067
4885
|
});
|
|
5068
4886
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
5069
4887
|
minVersion: "12.0.0",
|
|
5070
4888
|
version: "22.2.2",
|
|
5071
4889
|
ngImport: i0,
|
|
5072
|
-
type:
|
|
5073
|
-
providedIn: "root"
|
|
4890
|
+
type: CacheContextService
|
|
5074
4891
|
});
|
|
5075
4892
|
};
|
|
5076
4893
|
i0.ɵɵngDeclareClassMetadata({
|
|
5077
4894
|
minVersion: "12.0.0",
|
|
5078
4895
|
version: "22.2.2",
|
|
5079
4896
|
ngImport: i0,
|
|
5080
|
-
type:
|
|
5081
|
-
decorators: [{
|
|
5082
|
-
|
|
5083
|
-
args: [{ providedIn: "root" }]
|
|
5084
|
-
}],
|
|
5085
|
-
ctorParameters: () => []
|
|
4897
|
+
type: CacheContextService,
|
|
4898
|
+
decorators: [{ type: Injectable }],
|
|
4899
|
+
ctorParameters: () => [{ type: ProgrammabilityService }]
|
|
5086
4900
|
});
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
this.programmability = programmability;
|
|
5098
|
-
this.metadata = metadata;
|
|
5099
|
-
this.markdownService = markdownService;
|
|
5100
|
-
this.weak = weak;
|
|
5101
|
-
}
|
|
5102
|
-
getModules() {
|
|
5103
|
-
return [
|
|
5104
|
-
ClientSideRowModelModule,
|
|
5105
|
-
InfiniteRowModelModule,
|
|
5106
|
-
PaginationModule,
|
|
5107
|
-
LocaleModule,
|
|
5108
|
-
CellStyleModule,
|
|
5109
|
-
ClientSideRowModelApiModule,
|
|
5110
|
-
TextFilterModule,
|
|
5111
|
-
NumberFilterModule,
|
|
5112
|
-
DateFilterModule,
|
|
5113
|
-
CustomFilterModule,
|
|
5114
|
-
ColumnAutoSizeModule,
|
|
5115
|
-
ColumnApiModule,
|
|
5116
|
-
RowSelectionModule,
|
|
5117
|
-
RowApiModule,
|
|
5118
|
-
RowAutoHeightModule,
|
|
5119
|
-
RowStyleModule,
|
|
5120
|
-
HighlightChangesModule
|
|
5121
|
-
];
|
|
5122
|
-
}
|
|
5123
|
-
getOptions(component, formGroup) {
|
|
5124
|
-
const selection = this.getRowSelection(component, formGroup);
|
|
5125
|
-
const rowId = this.getRowId(component);
|
|
5126
|
-
const pagination = this.getPaginable(component);
|
|
5127
|
-
const pageSize = this.getPageSize(component);
|
|
5128
|
-
const texts = this.getTexts();
|
|
5129
|
-
const theme = this.getTheme();
|
|
5130
|
-
const autoHeight = component.autoHeight === true;
|
|
5131
|
-
const options = {
|
|
5132
|
-
defaultColDef: {
|
|
5133
|
-
floatingFilter: component.floatingFilter === true,
|
|
5134
|
-
headerClass: component.floatingFilter === true ? "show-filter" : "hide-filter"
|
|
5135
|
-
},
|
|
5136
|
-
selectionColumnDef: { pinned: "left" },
|
|
5137
|
-
dataTypeDefinitions: this.getDataTypeDefinitions(),
|
|
5138
|
-
rowSelection: selection,
|
|
5139
|
-
pagination,
|
|
5140
|
-
paginationPageSize: pageSize,
|
|
5141
|
-
cacheBlockSize: pageSize,
|
|
5142
|
-
paginationPageSizeSelector: [
|
|
5143
|
-
5,
|
|
5144
|
-
10,
|
|
5145
|
-
20,
|
|
5146
|
-
50
|
|
5147
|
-
],
|
|
5148
|
-
localeText: texts,
|
|
5149
|
-
enableCellTextSelection: true,
|
|
5150
|
-
theme,
|
|
5151
|
-
getRowId: rowId,
|
|
5152
|
-
domLayout: autoHeight ? "autoHeight" : void 0,
|
|
5153
|
-
onGridSizeChanged: (params) => {
|
|
5154
|
-
this.resizeGrid(component, params.api);
|
|
5155
|
-
},
|
|
5156
|
-
onModelUpdated: (params) => {
|
|
5157
|
-
this.resizeGrid(component, params.api);
|
|
5158
|
-
this.onRowSelecting(component, formGroup, params);
|
|
5159
|
-
}
|
|
5160
|
-
};
|
|
5161
|
-
this.setRowStyle(component, options, formGroup);
|
|
5162
|
-
return options;
|
|
5163
|
-
}
|
|
5164
|
-
getColumnDefs(component, columns, formGroup) {
|
|
5165
|
-
if (Array.isArray(columns)) {
|
|
5166
|
-
const groupedColumns = this.groupColumns(columns);
|
|
5167
|
-
const columnDefs = this.groupsToColumnDefs(groupedColumns, (cs) => this.createColumnDefs(component, cs, formGroup));
|
|
5168
|
-
this.addActionColumnDef(component, columnDefs, formGroup);
|
|
5169
|
-
this.addRowNumbersColumnDef(component, columnDefs);
|
|
5170
|
-
return columnDefs;
|
|
5171
|
-
} else return [];
|
|
5172
|
-
}
|
|
5173
|
-
onSelectionChanged(component, formGroup, gridEvent) {
|
|
5174
|
-
if (component.selectionChanged) {
|
|
5175
|
-
const event = { selectedRows: gridEvent.api.getSelectedRows() };
|
|
5176
|
-
return this.programmability.evaluate(formGroup, component.selectionChanged, {
|
|
5177
|
-
cacheable: false,
|
|
5178
|
-
extendContext: () => ({ "event": event }),
|
|
5179
|
-
invokeArgs: [event]
|
|
5180
|
-
});
|
|
5181
|
-
}
|
|
5182
|
-
}
|
|
5183
|
-
getCacheKey() {
|
|
5184
|
-
return `getGridOptions_${this.language}`;
|
|
5185
|
-
}
|
|
5186
|
-
invalidateOptions(component) {
|
|
5187
|
-
this.weak.invalidate(component, this.getCacheKey());
|
|
5188
|
-
}
|
|
5189
|
-
onRowDataChanged(component, api, rowData) {
|
|
5190
|
-
if (this.hasRowNumbers(component) && this.hasRowId(component)) this.refreshRowNumbers(api);
|
|
5191
|
-
}
|
|
5192
|
-
onDataSourceChanged(component, api, dataSource) {}
|
|
5193
|
-
get language() {
|
|
5194
|
-
return this.languageService.getLanguage();
|
|
5195
|
-
}
|
|
5196
|
-
locale(component, key) {
|
|
5197
|
-
return localize(this.language, component, key);
|
|
5198
|
-
}
|
|
5199
|
-
resizeGrid(component, api) {
|
|
5200
|
-
const columnsToResize = [];
|
|
5201
|
-
if (this.hasActions(component)) columnsToResize.push("actions");
|
|
5202
|
-
if (this.hasRowNumbers(component)) columnsToResize.push("rowNumbers");
|
|
5203
|
-
if (columnsToResize.length > 0) api.autoSizeColumns(columnsToResize);
|
|
5204
|
-
}
|
|
5205
|
-
hasActions(component) {
|
|
5206
|
-
return Array.isArray(component.actions) && component.actions.length > 0;
|
|
5207
|
-
}
|
|
5208
|
-
hasRowNumbers(component) {
|
|
5209
|
-
return component.rowNumbers;
|
|
5210
|
-
}
|
|
5211
|
-
createColumnDefs(component, columns, formGroup) {
|
|
5212
|
-
if (Array.isArray(columns)) return columns.map((column) => {
|
|
5213
|
-
const colDef = {
|
|
5214
|
-
field: column.key,
|
|
5215
|
-
headerName: this.locale(column, "label")
|
|
5216
|
-
};
|
|
5217
|
-
this.setCellDataType(column, colDef);
|
|
5218
|
-
const map = this.getMap(column, colDef, formGroup);
|
|
5219
|
-
this.setCellRenderer(column, colDef, map, formGroup);
|
|
5220
|
-
this.setValueGetter(column, colDef, formGroup);
|
|
5221
|
-
this.setColStyles(column, colDef, formGroup);
|
|
5222
|
-
this.setAutoHeight(column, colDef);
|
|
5223
|
-
this.setResizable(column, colDef);
|
|
5224
|
-
this.setSortable(column, colDef);
|
|
5225
|
-
this.setFilter(column, colDef, map);
|
|
5226
|
-
this.setFilterParams(column, colDef, map);
|
|
5227
|
-
this.setSuppressMovable(column, colDef);
|
|
5228
|
-
this.setFlex(column, colDef);
|
|
5229
|
-
this.setAlign(column, colDef);
|
|
5230
|
-
this.setPinned(column, colDef);
|
|
5231
|
-
this.setWidth(column, colDef);
|
|
5232
|
-
this.setValueFormatter(column, colDef, map);
|
|
5233
|
-
this.setCellChangeFlash(column, colDef);
|
|
5234
|
-
return colDef;
|
|
5235
|
-
});
|
|
5236
|
-
else return [];
|
|
5237
|
-
}
|
|
5238
|
-
addActionColumnDef(component, columnDefs, formGroup) {
|
|
5239
|
-
if (this.hasActions(component)) columnDefs.push({
|
|
5240
|
-
colId: "actions",
|
|
5241
|
-
headerName: this.locale(Texts, "Actions"),
|
|
5242
|
-
resizable: false,
|
|
5243
|
-
sortable: false,
|
|
5244
|
-
filter: false,
|
|
5245
|
-
cellDataType: false,
|
|
5246
|
-
hide: this.suppressActions(component, formGroup),
|
|
5247
|
-
pinned: "right",
|
|
5248
|
-
cellRendererParams: {
|
|
5249
|
-
component,
|
|
5250
|
-
formGroup
|
|
5251
|
-
},
|
|
5252
|
-
cellRenderer: ActionsCellRendererComponent,
|
|
5253
|
-
suppressKeyboardEvent: this.navigateInsideCell.bind(this)
|
|
5254
|
-
});
|
|
5255
|
-
}
|
|
5256
|
-
addRowNumbersColumnDef(component, columnDefs) {
|
|
5257
|
-
if (this.hasRowNumbers(component)) columnDefs.unshift({
|
|
5258
|
-
colId: "rowNumbers",
|
|
5259
|
-
headerName: "#",
|
|
5260
|
-
pinned: "left",
|
|
5261
|
-
headerClass: "row-numbers-header",
|
|
5262
|
-
cellClass: "row-numbers-cell",
|
|
5263
|
-
resizable: false,
|
|
5264
|
-
sortable: false,
|
|
5265
|
-
valueGetter: (n) => n.node.rowIndex + 1
|
|
5266
|
-
});
|
|
5267
|
-
}
|
|
5268
|
-
refreshRowNumbers(api) {
|
|
5269
|
-
if (api) {
|
|
5270
|
-
const rowNumbers = ["rowNumbers"];
|
|
5271
|
-
api.setColumnsVisible(rowNumbers, false);
|
|
5272
|
-
api.setColumnsVisible(rowNumbers, true);
|
|
5273
|
-
}
|
|
5274
|
-
}
|
|
5275
|
-
groupColumns(columns) {
|
|
5276
|
-
const rootItemsOrdered = [];
|
|
5277
|
-
function findOrCreateGroup(groups, name) {
|
|
5278
|
-
let group = groups.find((item) => item.type === "group" && item.name === name);
|
|
5279
|
-
if (!group) {
|
|
5280
|
-
group = {
|
|
5281
|
-
name,
|
|
5282
|
-
type: "group",
|
|
5283
|
-
columns: []
|
|
5284
|
-
};
|
|
5285
|
-
groups.push(group);
|
|
5286
|
-
}
|
|
5287
|
-
return group;
|
|
5288
|
-
}
|
|
5289
|
-
for (const column of columns) {
|
|
5290
|
-
const groupParts = (column.group ?? "").split(/[\\/]/).map((part) => part.trim()).filter((part) => part.length > 0);
|
|
5291
|
-
if (groupParts.length === 0) rootItemsOrdered.push(column);
|
|
5292
|
-
else {
|
|
5293
|
-
let currentLevel = rootItemsOrdered;
|
|
5294
|
-
for (let i = 0; i < groupParts.length; i++) {
|
|
5295
|
-
const part = groupParts[i];
|
|
5296
|
-
currentLevel = findOrCreateGroup(currentLevel, part).columns;
|
|
5297
|
-
}
|
|
5298
|
-
currentLevel.push(column);
|
|
5299
|
-
}
|
|
5300
|
-
}
|
|
5301
|
-
return rootItemsOrdered;
|
|
5302
|
-
}
|
|
5303
|
-
groupsToColumnDefs(grouped, getColumnsDef) {
|
|
5304
|
-
return grouped.map((item) => {
|
|
5305
|
-
if ("type" in item && item.type === "group") return {
|
|
5306
|
-
headerName: item.name,
|
|
5307
|
-
children: this.groupsToColumnDefs(item.columns, getColumnsDef)
|
|
5308
|
-
};
|
|
5309
|
-
else return getColumnsDef([item])[0];
|
|
5310
|
-
});
|
|
5311
|
-
}
|
|
5312
|
-
setCellDataType(column, colDef) {
|
|
5313
|
-
if (column.dataType === "component" || column.dataType === "template" || column.dataType === "formatted" || column.dataType === "auto") return;
|
|
5314
|
-
if (typeof column.dataType === "string" && column.dataType.trim() !== "") colDef.cellDataType = column.dataType;
|
|
5315
|
-
}
|
|
5316
|
-
setRowStyle(component, gridOptions, formGroup) {
|
|
5317
|
-
this.applyStyle(gridOptions, formGroup, component.rowClass, "getRowClass", "rowClass");
|
|
5318
|
-
this.applyStyle(gridOptions, formGroup, component.rowStyle, "getRowStyle", "rowStyle");
|
|
5319
|
-
this.applyStyle(gridOptions, formGroup, component.rowClassRules, "rowClassRules", "rowClassRules");
|
|
5320
|
-
}
|
|
5321
|
-
setColStyles(column, colDef, formGroup) {
|
|
5322
|
-
this.applyStyle(colDef, formGroup, column.headerClass, "headerClass", "headerClass");
|
|
5323
|
-
this.applyStyle(colDef, formGroup, column.headerStyle, "headerStyle", "headerStyle");
|
|
5324
|
-
this.applyStyle(colDef, formGroup, column.cellClass, "cellClass", "cellClass");
|
|
5325
|
-
this.applyStyle(colDef, formGroup, column.cellStyle, "cellStyle", "cellStyle");
|
|
5326
|
-
this.applyStyle(colDef, formGroup, column.cellClassRules, "cellClassRules", "cellClassRules");
|
|
5327
|
-
}
|
|
5328
|
-
setCellRenderer(column, colDef, map, formGroup) {
|
|
5329
|
-
if (column.format === "objectURL") colDef.cellRenderer = ObjectURLRendererComponent;
|
|
5330
|
-
if (column.format === "deleteRow") colDef.cellRenderer = DeleteRowRendererComponent;
|
|
5331
|
-
if (colDef.cellDataType === "boolean" && map) colDef.cellRenderer = (params) => {
|
|
5332
|
-
return this.formatMap(params.value, map);
|
|
5333
|
-
};
|
|
5334
|
-
if (column.dataType === "formatted") colDef.cellRenderer = (params) => {
|
|
5335
|
-
return this.markdownService.toHtml(params.value);
|
|
5336
|
-
};
|
|
5337
|
-
if (column.dataType === "component") {
|
|
5338
|
-
colDef.cellRenderer = HostCellRendererComponent;
|
|
5339
|
-
colDef.cellRendererParams = {
|
|
5340
|
-
componentType: column.component,
|
|
5341
|
-
properties: column.properties,
|
|
5342
|
-
formGroup
|
|
5343
|
-
};
|
|
5344
|
-
colDef.cellClass = "cell-component";
|
|
5345
|
-
}
|
|
5346
|
-
if (column.dataType === "template") {
|
|
5347
|
-
const template = this.metadata.getTemplateByName(column.template);
|
|
5348
|
-
if (template) {
|
|
5349
|
-
colDef.cellRenderer = HostCellRendererComponent;
|
|
5350
|
-
colDef.cellRendererParams = {
|
|
5351
|
-
componentType: "form-host",
|
|
5352
|
-
properties: {
|
|
5353
|
-
schema: template,
|
|
5354
|
-
showNav: false,
|
|
5355
|
-
showProgress: false,
|
|
5356
|
-
showNavButton: false,
|
|
5357
|
-
showFormTitle: false
|
|
5358
|
-
},
|
|
5359
|
-
onPropertiesResolved: (props, params) => ({ value: params.data })
|
|
5360
|
-
};
|
|
5361
|
-
colDef.cellClass = "cell-component";
|
|
5362
|
-
}
|
|
5363
|
-
}
|
|
5364
|
-
if (column.dataType === "custom") this.applyExpression(colDef, formGroup, column.customRenderer, "cellRenderer");
|
|
5365
|
-
}
|
|
5366
|
-
setValueGetter(column, colDef, formGroup) {
|
|
5367
|
-
this.applyExpression(colDef, formGroup, column.valueGetter, "valueGetter");
|
|
5368
|
-
}
|
|
5369
|
-
setCellChangeFlash(column, colDef) {
|
|
5370
|
-
colDef.enableCellChangeFlash = true;
|
|
5371
|
-
}
|
|
5372
|
-
setAutoHeight(column, colDef) {
|
|
5373
|
-
if (column.autoHeight) {
|
|
5374
|
-
colDef.autoHeight = true;
|
|
5375
|
-
colDef.wrapText = true;
|
|
5376
|
-
}
|
|
5377
|
-
}
|
|
5378
|
-
setResizable(column, colDef) {
|
|
5379
|
-
colDef.resizable = column.resize === true;
|
|
5380
|
-
}
|
|
5381
|
-
setSortable(column, colDef) {
|
|
5382
|
-
colDef.sortable = column.sort === true;
|
|
5383
|
-
}
|
|
5384
|
-
setFilter(column, colDef, map) {
|
|
5385
|
-
if (column.filter === true) {
|
|
5386
|
-
colDef.filter = true;
|
|
5387
|
-
if (map) colDef.filter = SetFilterComponent;
|
|
5388
|
-
}
|
|
5389
|
-
}
|
|
5390
|
-
setFilterParams(column, colDef, map) {
|
|
5391
|
-
const filterParams = {};
|
|
5392
|
-
if (column.dataType === "uuid") this.setUuidFilterParams(filterParams);
|
|
5393
|
-
else if (column.dataType === "integer") this.setIntegerFilterParams(filterParams);
|
|
5394
|
-
else if (column.dataType === "date") this.setDateFilterParams(filterParams);
|
|
5395
|
-
else if (column.dataType === "boolean") this.setBooleanFilterParams(filterParams);
|
|
5396
|
-
if (map) filterParams.map = map;
|
|
5397
|
-
colDef.filterParams = filterParams;
|
|
5398
|
-
}
|
|
5399
|
-
setUuidFilterParams(filterParams) {
|
|
5400
|
-
filterParams.filterOptions = ["equals", "notEqual"];
|
|
5401
|
-
}
|
|
5402
|
-
setIntegerFilterParams(filterParams) {
|
|
5403
|
-
filterParams.allowedCharPattern = "\\d";
|
|
5404
|
-
}
|
|
5405
|
-
setDateFilterParams(filterParams) {
|
|
5406
|
-
filterParams.comparator = (filterLocalDateAtMidnight, cellValue) => {
|
|
5407
|
-
if (!cellValue) return -1;
|
|
5408
|
-
const cellDate = new Date(cellValue);
|
|
5409
|
-
if (isNaN(cellDate.getTime())) return -1;
|
|
5410
|
-
const cellDateNoTime = new Date(cellDate.getFullYear(), cellDate.getMonth(), cellDate.getDate());
|
|
5411
|
-
if (cellDateNoTime < filterLocalDateAtMidnight) return -1;
|
|
5412
|
-
if (cellDateNoTime > filterLocalDateAtMidnight) return 1;
|
|
5413
|
-
return 0;
|
|
5414
|
-
};
|
|
5415
|
-
}
|
|
5416
|
-
setBooleanFilterParams(filterParams) {
|
|
5417
|
-
filterParams.filterOptions = [
|
|
5418
|
-
{
|
|
5419
|
-
displayKey: "includeAll",
|
|
5420
|
-
displayName: Texts.ChooseOne,
|
|
5421
|
-
numberOfInputs: 0,
|
|
5422
|
-
predicate: ([filter], value) => true
|
|
5423
|
-
},
|
|
5424
|
-
{
|
|
5425
|
-
displayKey: "true",
|
|
5426
|
-
displayName: Texts.True,
|
|
5427
|
-
numberOfInputs: 0,
|
|
5428
|
-
predicate: ([filter], value) => value === true
|
|
5429
|
-
},
|
|
5430
|
-
{
|
|
5431
|
-
displayKey: "false",
|
|
5432
|
-
displayName: Texts.False,
|
|
5433
|
-
numberOfInputs: 0,
|
|
5434
|
-
predicate: ([filter], value) => value === false
|
|
5435
|
-
},
|
|
5436
|
-
{
|
|
5437
|
-
displayKey: "blank",
|
|
5438
|
-
displayName: Texts.Blank,
|
|
5439
|
-
numberOfInputs: 0,
|
|
5440
|
-
predicate: ([filter], value) => value === null
|
|
5441
|
-
},
|
|
5442
|
-
{
|
|
5443
|
-
displayKey: "notBlank",
|
|
5444
|
-
displayName: Texts.NotBlank,
|
|
5445
|
-
numberOfInputs: 0,
|
|
5446
|
-
predicate: ([filter], value) => value !== null
|
|
5447
|
-
}
|
|
5448
|
-
];
|
|
5449
|
-
filterParams.suppressAndOrCondition = true;
|
|
5450
|
-
}
|
|
5451
|
-
setSuppressMovable(column, colDef) {
|
|
5452
|
-
if (!(column.move === true)) colDef.suppressMovable = true;
|
|
5453
|
-
}
|
|
5454
|
-
setFlex(column, colDef) {
|
|
5455
|
-
if (column.flex === true) colDef.flex = 1;
|
|
5456
|
-
}
|
|
5457
|
-
setAlign(column, colDef) {
|
|
5458
|
-
if (column.align === "left") colDef.cellStyle = { textAlign: "left" };
|
|
5459
|
-
else if (column.align === "center") colDef.cellStyle = { textAlign: "center" };
|
|
5460
|
-
else if (column.align === "right") colDef.cellStyle = { textAlign: "right" };
|
|
5461
|
-
}
|
|
5462
|
-
setPinned(column, colDef) {
|
|
5463
|
-
if (typeof column.pinned === "string") colDef.pinned = column.pinned;
|
|
5464
|
-
}
|
|
5465
|
-
setWidth(column, colDef) {
|
|
5466
|
-
if (typeof column.width === "number") colDef.width = column.width;
|
|
5467
|
-
if (typeof column.minWidth === "number") colDef.minWidth = column.minWidth;
|
|
5468
|
-
if (typeof column.maxWidth === "number") colDef.maxWidth = column.maxWidth;
|
|
5469
|
-
}
|
|
5470
|
-
setValueFormatter(column, colDef, map) {
|
|
5471
|
-
if (map) colDef.valueFormatter = (params) => this.formatMap(params.value, map);
|
|
5472
|
-
}
|
|
5473
|
-
getRowSelection(component, formGroup) {
|
|
5474
|
-
let options = void 0;
|
|
5475
|
-
if (this.selectable(component, formGroup)) {
|
|
5476
|
-
const trigger = this.selectionTrigger(component);
|
|
5477
|
-
const checkboxes = trigger !== "click";
|
|
5478
|
-
const click = trigger !== "checkbox";
|
|
5479
|
-
if (this.multiSelect(component, formGroup)) options = {
|
|
5480
|
-
mode: "multiRow",
|
|
5481
|
-
selectAll: "filtered",
|
|
5482
|
-
hideDisabledCheckboxes: true,
|
|
5483
|
-
checkboxes,
|
|
5484
|
-
headerCheckbox: checkboxes,
|
|
5485
|
-
enableClickSelection: click,
|
|
5486
|
-
enableSelectionWithoutKeys: click
|
|
5487
|
-
};
|
|
5488
|
-
else options = {
|
|
5489
|
-
mode: "singleRow",
|
|
5490
|
-
checkboxes,
|
|
5491
|
-
enableClickSelection: click
|
|
5492
|
-
};
|
|
5493
|
-
if (component.rowSelectable) options = {
|
|
5494
|
-
...options,
|
|
5495
|
-
isRowSelectable: (rowNode) => this.onRowSelectable(component, formGroup, rowNode.data)
|
|
5496
|
-
};
|
|
5497
|
-
}
|
|
5498
|
-
return options;
|
|
5499
|
-
}
|
|
5500
|
-
hasRowId(component) {
|
|
5501
|
-
return typeof component.rowId === "string" && component.rowId.trim() !== "";
|
|
5502
|
-
}
|
|
5503
|
-
getRowId(component) {
|
|
5504
|
-
if (this.hasRowId(component)) return (params) => params.data[component.rowId];
|
|
5505
|
-
else return;
|
|
5506
|
-
}
|
|
5507
|
-
applyStyle(target, formGroup, styleExpression, funcName, staticName) {
|
|
5508
|
-
if (styleExpression) {
|
|
5509
|
-
const value = this.programmability.evaluate(formGroup, styleExpression);
|
|
5510
|
-
if (typeof value === "function") target[funcName] = value;
|
|
5511
|
-
else target[staticName] = value;
|
|
5512
|
-
}
|
|
5513
|
-
}
|
|
5514
|
-
applyExpression(target, formGroup, expression, propertyName) {
|
|
5515
|
-
if (expression) {
|
|
5516
|
-
const value = this.programmability.evaluate(formGroup, expression);
|
|
5517
|
-
if (typeof value === "function") target[propertyName] = (n) => value(n.data);
|
|
5518
|
-
else target[propertyName] = () => value;
|
|
5519
|
-
}
|
|
5520
|
-
}
|
|
5521
|
-
onRowSelectable(component, formGroup, data) {
|
|
5522
|
-
if (!data) return false;
|
|
5523
|
-
const event = { data };
|
|
5524
|
-
return this.programmability.evaluate(formGroup, component.rowSelectable, {
|
|
5525
|
-
cacheable: false,
|
|
5526
|
-
extendContext: () => ({ "event": event }),
|
|
5527
|
-
invokeArgs: [event]
|
|
5528
|
-
}) === true;
|
|
5529
|
-
}
|
|
5530
|
-
onRowSelected(component, formGroup, data) {
|
|
5531
|
-
if (!data) return false;
|
|
5532
|
-
const event = { data };
|
|
5533
|
-
return this.programmability.evaluate(formGroup, component.rowSelected, {
|
|
5534
|
-
cacheable: false,
|
|
5535
|
-
extendContext: () => ({ "event": event }),
|
|
5536
|
-
invokeArgs: [event]
|
|
5537
|
-
}) === true;
|
|
5538
|
-
}
|
|
5539
|
-
onRowSelecting(component, formGroup, params) {
|
|
5540
|
-
if (params.newData && component.rowSelected && this.selectable(component, formGroup)) params.api.forEachNode((node) => {
|
|
5541
|
-
if (this.onRowSelected(component, formGroup, node.data)) node.setSelected(true);
|
|
5542
|
-
});
|
|
5543
|
-
}
|
|
5544
|
-
suppressActions(component, formGroup) {
|
|
5545
|
-
return this.programmability.evaluateBoolean(formGroup, component.suppressActions, { cacheable: false }) ?? false;
|
|
5546
|
-
}
|
|
5547
|
-
selectable(component, formGroup) {
|
|
5548
|
-
return this.programmability.evaluateBoolean(formGroup, component.selectable, { cacheable: false }) ?? false;
|
|
5549
|
-
}
|
|
5550
|
-
multiSelect(component, formGroup) {
|
|
5551
|
-
return this.programmability.evaluateBoolean(formGroup, component.multiSelect, { cacheable: false }) ?? false;
|
|
5552
|
-
}
|
|
5553
|
-
selectionTrigger(component) {
|
|
5554
|
-
const value = component.selectionTrigger;
|
|
5555
|
-
const trigger = typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
5556
|
-
return trigger === "click" || trigger === "both" ? trigger : "checkbox";
|
|
5557
|
-
}
|
|
5558
|
-
getPaginable(component) {
|
|
5559
|
-
return typeof component.rowCount === "number" && component.rowCount > 0;
|
|
5560
|
-
}
|
|
5561
|
-
getPageSize(component) {
|
|
5562
|
-
if (typeof component.rowCount === "number") return component.rowCount;
|
|
5563
|
-
}
|
|
5564
|
-
getTexts() {
|
|
5565
|
-
if (this.language === "it") return AG_GRID_LOCALE_IT;
|
|
5566
|
-
else if (this.language === "en") return AG_GRID_LOCALE_EN;
|
|
5567
|
-
else if (this.language === "de") return AG_GRID_LOCALE_DE;
|
|
5568
|
-
else if (this.language === "fr") return AG_GRID_LOCALE_FR;
|
|
5569
|
-
else if (this.language === "es") return AG_GRID_LOCALE_ES;
|
|
5570
|
-
else if (this.language === "pt") return AG_GRID_LOCALE_PT;
|
|
5571
|
-
else if (this.language === "") return AG_GRID_LOCALE_IT;
|
|
5572
|
-
else return AG_GRID_LOCALE_EN;
|
|
5573
|
-
}
|
|
5574
|
-
getTheme() {
|
|
5575
|
-
return themeQuartz.withPart(iconSetAlpine).withParams({
|
|
5576
|
-
backgroundColor: "#FAFAFA",
|
|
5577
|
-
borderColor: "#D9E4F7",
|
|
5578
|
-
browserColorScheme: "light",
|
|
5579
|
-
cellTextColor: "#00121A",
|
|
5580
|
-
columnBorder: true,
|
|
5581
|
-
fontFamily: "inherit",
|
|
5582
|
-
fontSize: 16,
|
|
5583
|
-
headerBackgroundColor: "#002460",
|
|
5584
|
-
headerColumnBorder: true,
|
|
5585
|
-
headerColumnResizeHandleColor: "#F2F6FC",
|
|
5586
|
-
headerColumnResizeHandleWidth: 2,
|
|
5587
|
-
headerFontSize: 16,
|
|
5588
|
-
headerFontWeight: 600,
|
|
5589
|
-
headerRowBorder: true,
|
|
5590
|
-
headerTextColor: "#F2F6FC",
|
|
5591
|
-
rowBorder: true
|
|
5592
|
-
});
|
|
5593
|
-
}
|
|
5594
|
-
getDataTypeDefinitions() {
|
|
5595
|
-
return {
|
|
5596
|
-
uuid: {
|
|
5597
|
-
baseDataType: "text",
|
|
5598
|
-
extendsDataType: "text"
|
|
5599
|
-
},
|
|
5600
|
-
date: {
|
|
5601
|
-
baseDataType: "dateString",
|
|
5602
|
-
extendsDataType: "dateString",
|
|
5603
|
-
dateParser: (value) => {
|
|
5604
|
-
return value ? new Date(value) : void 0;
|
|
5605
|
-
},
|
|
5606
|
-
valueFormatter: (params) => {
|
|
5607
|
-
return this.formatter.formatDate(params.value);
|
|
5608
|
-
}
|
|
5609
|
-
},
|
|
5610
|
-
dateTime: {
|
|
5611
|
-
baseDataType: "dateString",
|
|
5612
|
-
extendsDataType: "dateString",
|
|
5613
|
-
dateParser: (value) => {
|
|
5614
|
-
return value ? new Date(value) : void 0;
|
|
5615
|
-
},
|
|
5616
|
-
valueFormatter: (params) => {
|
|
5617
|
-
return this.formatter.formatDateTime(params.value);
|
|
5618
|
-
}
|
|
5619
|
-
},
|
|
5620
|
-
time: {
|
|
5621
|
-
baseDataType: "dateString",
|
|
5622
|
-
extendsDataType: "dateString",
|
|
5623
|
-
dateParser: (value) => {
|
|
5624
|
-
return value ? new Date(value) : void 0;
|
|
5625
|
-
},
|
|
5626
|
-
valueFormatter: (params) => {
|
|
5627
|
-
return this.formatter.formatTime(params.value);
|
|
5628
|
-
}
|
|
5629
|
-
},
|
|
5630
|
-
currency: {
|
|
5631
|
-
extendsDataType: "number",
|
|
5632
|
-
baseDataType: "number",
|
|
5633
|
-
valueFormatter: (params) => params.value == null ? "" : this.formatter.formatCurrency(params.value)
|
|
5634
|
-
},
|
|
5635
|
-
decimal: {
|
|
5636
|
-
extendsDataType: "number",
|
|
5637
|
-
baseDataType: "number",
|
|
5638
|
-
valueFormatter: (params) => params.value == null ? "" : this.formatter.formatNumber(params.value)
|
|
5639
|
-
},
|
|
5640
|
-
integer: {
|
|
5641
|
-
extendsDataType: "number",
|
|
5642
|
-
baseDataType: "number",
|
|
5643
|
-
valueFormatter: (params) => params.value == null ? "" : this.formatter.formatNumber(params.value, 0)
|
|
5644
|
-
},
|
|
5645
|
-
percentage: {
|
|
5646
|
-
extendsDataType: "number",
|
|
5647
|
-
baseDataType: "number",
|
|
5648
|
-
valueFormatter: (params) => params.value == null ? "" : `${Math.round(params.value * 100)}%`
|
|
5649
|
-
},
|
|
5650
|
-
flags: {
|
|
5651
|
-
extendsDataType: "number",
|
|
5652
|
-
baseDataType: "number"
|
|
5653
|
-
}
|
|
5654
|
-
};
|
|
5655
|
-
}
|
|
5656
|
-
getMap(column, colDef, formGroup) {
|
|
5657
|
-
if ((colDef.cellDataType === "boolean" || colDef.cellDataType === "text" || colDef.cellDataType === "number" || colDef.cellDataType === "flags") && column.map) {
|
|
5658
|
-
const map = this.programmability.evaluate(formGroup, column.mapValues);
|
|
5659
|
-
if (!isRecord(map, (key) => typeof key === "string" || typeof key === "number", (val) => typeof val === "string")) return null;
|
|
5660
|
-
if (colDef.cellDataType === "flags") map[getLabelSymbol] = (key) => this.formatFlags(key, map);
|
|
5661
|
-
return map;
|
|
5662
|
-
} else return null;
|
|
5663
|
-
}
|
|
5664
|
-
formatMap(value, map) {
|
|
5665
|
-
if (value == null) return map?.["null"] ?? "";
|
|
5666
|
-
if (map) {
|
|
5667
|
-
var result = map[value];
|
|
5668
|
-
if (result === void 0) {
|
|
5669
|
-
if (isLabeledRecord(map, (key) => typeof key === "string" || typeof key === "number", (val) => typeof val === "string", getLabelSymbol)) result = map[getLabelSymbol](value);
|
|
5670
|
-
}
|
|
5671
|
-
return result ?? value.toString();
|
|
5672
|
-
} else return value.toString();
|
|
5673
|
-
}
|
|
5674
|
-
formatFlags(value, map) {
|
|
5675
|
-
if (typeof value === "number" && isRecord(map, isNumericKey, (val) => typeof val === "string")) {
|
|
5676
|
-
if (value == 0) return map[0] ?? "0";
|
|
5677
|
-
const flags = Object.keys(map).map(Number).filter((flag) => flag !== 0).filter((flag) => (value & flag) === flag);
|
|
5678
|
-
if ((value & flags.reduce((sum, f) => sum | f, 0)) !== value) return null;
|
|
5679
|
-
return flags.map((flag) => map[flag]).filter((label) => !!label).join(", ");
|
|
5680
|
-
} else return null;
|
|
5681
|
-
}
|
|
5682
|
-
navigateInsideCell({ event }) {
|
|
5683
|
-
const GRID_CELL_CLASSNAME = "ag-cell";
|
|
5684
|
-
const { key, shiftKey } = event;
|
|
5685
|
-
const path = this.getEventPath(event);
|
|
5686
|
-
const isTabForward = key === "Tab" && shiftKey === false;
|
|
5687
|
-
const isTabBackward = key === "Tab" && shiftKey === true;
|
|
5688
|
-
let suppressEvent = false;
|
|
5689
|
-
if (isTabForward || isTabBackward) {
|
|
5690
|
-
const eGridCell = path.find((el) => {
|
|
5691
|
-
if (el.classList === void 0) return false;
|
|
5692
|
-
return el.classList.contains(GRID_CELL_CLASSNAME);
|
|
5693
|
-
});
|
|
5694
|
-
if (!eGridCell) return suppressEvent;
|
|
5695
|
-
const focusableChildrenElements = getFocusables(eGridCell);
|
|
5696
|
-
const lastCellChildEl = focusableChildrenElements[focusableChildrenElements.length - 1];
|
|
5697
|
-
const firstCellChildEl = focusableChildrenElements[0];
|
|
5698
|
-
if (focusableChildrenElements.length === 0) return false;
|
|
5699
|
-
const currentIndex = focusableChildrenElements.indexOf(document.activeElement);
|
|
5700
|
-
if (isTabForward) {
|
|
5701
|
-
if (!(lastCellChildEl && document.activeElement === lastCellChildEl)) {
|
|
5702
|
-
suppressEvent = true;
|
|
5703
|
-
if (currentIndex !== -1 || document.activeElement === eGridCell) {
|
|
5704
|
-
event.preventDefault();
|
|
5705
|
-
focusableChildrenElements[currentIndex + 1].focus();
|
|
5706
|
-
}
|
|
5707
|
-
}
|
|
5708
|
-
} else {
|
|
5709
|
-
if (!(eGridCell.contains(document.activeElement) && eGridCell !== document.activeElement)) {
|
|
5710
|
-
lastCellChildEl.focus();
|
|
5711
|
-
event.preventDefault();
|
|
5712
|
-
}
|
|
5713
|
-
if (!(firstCellChildEl && document.activeElement === firstCellChildEl)) {
|
|
5714
|
-
suppressEvent = true;
|
|
5715
|
-
if (currentIndex !== -1 || document.activeElement === eGridCell) {
|
|
5716
|
-
event.preventDefault();
|
|
5717
|
-
focusableChildrenElements[currentIndex - 1].focus();
|
|
5718
|
-
}
|
|
5719
|
-
}
|
|
5720
|
-
}
|
|
5721
|
-
}
|
|
5722
|
-
return suppressEvent;
|
|
5723
|
-
}
|
|
5724
|
-
getEventPath(event) {
|
|
5725
|
-
const path = [];
|
|
5726
|
-
let currentTarget = event.target;
|
|
5727
|
-
while (currentTarget) {
|
|
5728
|
-
path.push(currentTarget);
|
|
5729
|
-
currentTarget = currentTarget.parentElement;
|
|
5730
|
-
}
|
|
5731
|
-
return path;
|
|
5732
|
-
}
|
|
5733
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5734
|
-
minVersion: "12.0.0",
|
|
5735
|
-
version: "22.2.2",
|
|
5736
|
-
ngImport: i0,
|
|
5737
|
-
type: GridService,
|
|
5738
|
-
deps: [
|
|
5739
|
-
{ token: FormatterService },
|
|
5740
|
-
{ token: i1$4.LanguageService },
|
|
5741
|
-
{ token: ProgrammabilityService },
|
|
5742
|
-
{ token: MetadataService },
|
|
5743
|
-
{ token: MarkdownService },
|
|
5744
|
-
{ token: WeakService }
|
|
5745
|
-
],
|
|
5746
|
-
target: i0.ɵɵFactoryTarget.Injectable
|
|
5747
|
-
});
|
|
5748
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
5749
|
-
minVersion: "12.0.0",
|
|
5750
|
-
version: "22.2.2",
|
|
5751
|
-
ngImport: i0,
|
|
5752
|
-
type: GridService
|
|
5753
|
-
});
|
|
5754
|
-
};
|
|
5755
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
5756
|
-
minVersion: "12.0.0",
|
|
5757
|
-
version: "22.2.2",
|
|
5758
|
-
ngImport: i0,
|
|
5759
|
-
type: GridService,
|
|
5760
|
-
decorators: [{ type: Injectable }],
|
|
5761
|
-
ctorParameters: () => [
|
|
5762
|
-
{ type: FormatterService },
|
|
5763
|
-
{ type: i1$4.LanguageService },
|
|
5764
|
-
{ type: ProgrammabilityService },
|
|
5765
|
-
{ type: MetadataService },
|
|
5766
|
-
{ type: MarkdownService },
|
|
5767
|
-
{ type: WeakService }
|
|
5768
|
-
]
|
|
5769
|
-
});
|
|
5770
|
-
var CacheContextService = class CacheContextService {
|
|
5771
|
-
programmability;
|
|
5772
|
-
constructor(programmability) {
|
|
5773
|
-
this.programmability = programmability;
|
|
5774
|
-
}
|
|
5775
|
-
isExpression(text) {
|
|
5776
|
-
return this.programmability.isExpression(text);
|
|
5777
|
-
}
|
|
5778
|
-
getExpression(text) {
|
|
5779
|
-
return this.programmability.getExpression(text);
|
|
5780
|
-
}
|
|
5781
|
-
evaluateString(cacheControl, formGroup, value, options = {}) {
|
|
5782
|
-
if (this.isExpression(value)) return this.call(cacheControl, value, () => this.programmability.evaluateString(formGroup, value, this.getOptions(options)));
|
|
5783
|
-
return value ?? "";
|
|
5784
|
-
}
|
|
5785
|
-
evaluateBoolean(cacheControl, formGroup, value, options = {}) {
|
|
5786
|
-
if (typeof value === "boolean") return value;
|
|
5787
|
-
else if (this.isExpression(value)) return this.call(cacheControl, value, () => this.programmability.evaluateBoolean(formGroup, value, this.getOptions(options)));
|
|
5788
|
-
return null;
|
|
5789
|
-
}
|
|
5790
|
-
evaluateNumber(cacheControl, formGroup, value, options = {}) {
|
|
5791
|
-
if (typeof value === "number") return value;
|
|
5792
|
-
else if (this.isExpression(value)) return this.call(cacheControl, value, () => this.programmability.evaluateNumber(formGroup, value, this.getOptions(options)));
|
|
5793
|
-
return null;
|
|
5794
|
-
}
|
|
5795
|
-
evaluate(cacheControl, formGroup, value, options = {}) {
|
|
5796
|
-
if (this.isExpression(value)) return this.call(cacheControl, value, () => this.programmability.evaluate(formGroup, value, this.getOptions(options)));
|
|
5797
|
-
return value;
|
|
5798
|
-
}
|
|
5799
|
-
evaluateTemplate(cacheControl, formGroup, value, options = {}) {
|
|
5800
|
-
return this.call(cacheControl, value, () => this.programmability.evaluateTemplate(formGroup, value, this.getOptions(options)));
|
|
5801
|
-
}
|
|
5802
|
-
evaluateUnary(cacheControl, formGroup, value, input, options = {}) {
|
|
5803
|
-
if (this.isExpression(value)) return this.call(cacheControl, value, () => this.programmability.evaluateUnary(formGroup, value, input, this.getOptions(options)));
|
|
5804
|
-
return null;
|
|
5805
|
-
}
|
|
5806
|
-
invalidate(cacheControl) {
|
|
5807
|
-
if (this.cache.has(cacheControl)) this.cache.delete(cacheControl);
|
|
5808
|
-
}
|
|
5809
|
-
invalidateAll() {
|
|
5810
|
-
this.cache = /* @__PURE__ */ new WeakMap();
|
|
5811
|
-
}
|
|
5812
|
-
getOptions(options) {
|
|
5813
|
-
return {
|
|
5814
|
-
...options,
|
|
5815
|
-
cacheable: false
|
|
5816
|
-
};
|
|
5817
|
-
}
|
|
5818
|
-
call(cacheControl, value, evaluate) {
|
|
5819
|
-
if (value === null) return null;
|
|
5820
|
-
if (!this.cache.has(cacheControl)) this.cache.set(cacheControl, {});
|
|
5821
|
-
const cachedObject = this.cache.get(cacheControl);
|
|
5822
|
-
if (value in cachedObject) return cachedObject[value];
|
|
5823
|
-
const result = evaluate();
|
|
5824
|
-
cachedObject[value] = result;
|
|
5825
|
-
return result;
|
|
5826
|
-
}
|
|
5827
|
-
cache = /* @__PURE__ */ new WeakMap();
|
|
5828
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5829
|
-
minVersion: "12.0.0",
|
|
5830
|
-
version: "22.2.2",
|
|
5831
|
-
ngImport: i0,
|
|
5832
|
-
type: CacheContextService,
|
|
5833
|
-
deps: [{ token: ProgrammabilityService }],
|
|
5834
|
-
target: i0.ɵɵFactoryTarget.Injectable
|
|
5835
|
-
});
|
|
5836
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
5837
|
-
minVersion: "12.0.0",
|
|
5838
|
-
version: "22.2.2",
|
|
5839
|
-
ngImport: i0,
|
|
5840
|
-
type: CacheContextService
|
|
4901
|
+
const getLabelSymbol = Symbol("getLabel");
|
|
4902
|
+
function isLabeledRecord(obj, isKey, isValue, getLabelSymbol) {
|
|
4903
|
+
if (!isRecord(obj, isKey, isValue)) return false;
|
|
4904
|
+
const getLabel = obj[getLabelSymbol];
|
|
4905
|
+
return getLabel !== void 0 && typeof getLabel === "function";
|
|
4906
|
+
}
|
|
4907
|
+
function isRecord(obj, isKey, isValue) {
|
|
4908
|
+
if (typeof obj !== "object" || obj === null || Array.isArray(obj)) return false;
|
|
4909
|
+
return Object.entries(obj).every(([key, val]) => {
|
|
4910
|
+
return isKey(key) && isValue(val);
|
|
5841
4911
|
});
|
|
5842
|
-
}
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
ngImport: i0,
|
|
5847
|
-
type: CacheContextService,
|
|
5848
|
-
decorators: [{ type: Injectable }],
|
|
5849
|
-
ctorParameters: () => [{ type: ProgrammabilityService }]
|
|
5850
|
-
});
|
|
4912
|
+
}
|
|
4913
|
+
function isNumericKey(key) {
|
|
4914
|
+
return typeof key === "string" && !isNaN(Number(key));
|
|
4915
|
+
}
|
|
5851
4916
|
const FROM_AG = {
|
|
5852
4917
|
notEqual: "notEquals",
|
|
5853
4918
|
inRange: "between"
|
|
@@ -5858,7 +4923,7 @@ const TO_AG = {
|
|
|
5858
4923
|
};
|
|
5859
4924
|
const isoDay = (value) => typeof value === "string" && value.length >= 10 ? value.slice(0, 10) : null;
|
|
5860
4925
|
const agDate = (value) => typeof value === "string" && value.length >= 10 ? `${value.slice(0, 10)} 00:00:00` : null;
|
|
5861
|
-
function
|
|
4926
|
+
function filterModelToSirio(model, columns) {
|
|
5862
4927
|
const result = {};
|
|
5863
4928
|
if (!model) return result;
|
|
5864
4929
|
for (const [key, filter] of Object.entries(model)) {
|
|
@@ -5924,14 +4989,12 @@ function agFilterToCondition(filter, type, key) {
|
|
|
5924
4989
|
value: filter["filter"] ?? null
|
|
5925
4990
|
};
|
|
5926
4991
|
}
|
|
5927
|
-
function
|
|
4992
|
+
function sirioFiltersToModel(filters, columns) {
|
|
5928
4993
|
const result = {};
|
|
5929
4994
|
for (const [key, value] of Object.entries(filters ?? {})) {
|
|
5930
4995
|
if (!sirioGridFilterActive(value)) continue;
|
|
5931
|
-
const
|
|
5932
|
-
|
|
5933
|
-
const target = byField ? column?.field || key : key;
|
|
5934
|
-
if (filter && !(target in result)) result[target] = filter;
|
|
4996
|
+
const filter = sirioValueToAg(value, columns.find((c) => c.key === key)?.filter ?? "text");
|
|
4997
|
+
if (filter) result[key] = filter;
|
|
5935
4998
|
}
|
|
5936
4999
|
return result;
|
|
5937
5000
|
}
|
|
@@ -6022,13 +5085,13 @@ function agFilterType(type, value) {
|
|
|
6022
5085
|
default: return "text";
|
|
6023
5086
|
}
|
|
6024
5087
|
}
|
|
6025
|
-
function
|
|
5088
|
+
function orderModelToSirio(order) {
|
|
6026
5089
|
return (order ?? []).filter((o) => o && (o.sort === "asc" || o.sort === "desc")).map((o) => ({
|
|
6027
5090
|
field: o.colId,
|
|
6028
5091
|
direction: o.sort
|
|
6029
5092
|
}));
|
|
6030
5093
|
}
|
|
6031
|
-
function
|
|
5094
|
+
function sirioSortToOrderModel(sort) {
|
|
6032
5095
|
return sort.map((s) => ({
|
|
6033
5096
|
colId: s.field,
|
|
6034
5097
|
sort: s.direction
|
|
@@ -6066,8 +5129,8 @@ function rowsSourceToDataSource(source, columns) {
|
|
|
6066
5129
|
const params = {
|
|
6067
5130
|
startRow: query.offset,
|
|
6068
5131
|
endRow: query.offset + size,
|
|
6069
|
-
sortModel:
|
|
6070
|
-
filterModel:
|
|
5132
|
+
sortModel: sirioSortToOrderModel(query.sort),
|
|
5133
|
+
filterModel: serverFilterModel(query.filters, columns()),
|
|
6071
5134
|
context: void 0,
|
|
6072
5135
|
successCallback: (rows, lastRow) => {
|
|
6073
5136
|
const list = Array.isArray(rows) ? rows : [];
|
|
@@ -6102,6 +5165,63 @@ function rowsSourceToDataSource(source, columns) {
|
|
|
6102
5165
|
pagedSize
|
|
6103
5166
|
};
|
|
6104
5167
|
}
|
|
5168
|
+
function serverFilterModel(filters, columns) {
|
|
5169
|
+
const filterTypes = {};
|
|
5170
|
+
for (const column of columns) if (column.filter) filterTypes[column.key] = column.filter;
|
|
5171
|
+
const result = {};
|
|
5172
|
+
for (const [key, filter] of Object.entries(sirioToFilterModel(filters, filterTypes))) {
|
|
5173
|
+
const field = columns.find((c) => c.key === key)?.field || key;
|
|
5174
|
+
if (!(field in result)) result[field] = filter;
|
|
5175
|
+
}
|
|
5176
|
+
return result;
|
|
5177
|
+
}
|
|
5178
|
+
var MarkdownService = class MarkdownService {
|
|
5179
|
+
constructor() {
|
|
5180
|
+
marked.use({
|
|
5181
|
+
async: false,
|
|
5182
|
+
gfm: true,
|
|
5183
|
+
breaks: true
|
|
5184
|
+
});
|
|
5185
|
+
const renderer = new marked.Renderer();
|
|
5186
|
+
renderer.link = function(args) {
|
|
5187
|
+
if (args.href?.startsWith("action://")) return `<a href="#" data-action="${args.href.substring(9)}">${args.text}</a>`;
|
|
5188
|
+
return `<a href="${args.href}" target="_blank">${args.text}</a>`;
|
|
5189
|
+
};
|
|
5190
|
+
marked.setOptions({ renderer });
|
|
5191
|
+
}
|
|
5192
|
+
toHtml(text) {
|
|
5193
|
+
return marked.parse(text ?? "");
|
|
5194
|
+
}
|
|
5195
|
+
toInlineHtml(text) {
|
|
5196
|
+
return marked.parseInline(text ?? "");
|
|
5197
|
+
}
|
|
5198
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5199
|
+
minVersion: "12.0.0",
|
|
5200
|
+
version: "22.2.2",
|
|
5201
|
+
ngImport: i0,
|
|
5202
|
+
type: MarkdownService,
|
|
5203
|
+
deps: [],
|
|
5204
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
5205
|
+
});
|
|
5206
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
5207
|
+
minVersion: "12.0.0",
|
|
5208
|
+
version: "22.2.2",
|
|
5209
|
+
ngImport: i0,
|
|
5210
|
+
type: MarkdownService,
|
|
5211
|
+
providedIn: "root"
|
|
5212
|
+
});
|
|
5213
|
+
};
|
|
5214
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
5215
|
+
minVersion: "12.0.0",
|
|
5216
|
+
version: "22.2.2",
|
|
5217
|
+
ngImport: i0,
|
|
5218
|
+
type: MarkdownService,
|
|
5219
|
+
decorators: [{
|
|
5220
|
+
type: Injectable,
|
|
5221
|
+
args: [{ providedIn: "root" }]
|
|
5222
|
+
}],
|
|
5223
|
+
ctorParameters: () => []
|
|
5224
|
+
});
|
|
6105
5225
|
const NO_PAGED_SIZE = signal(null).asReadonly();
|
|
6106
5226
|
var SirioGridService = class SirioGridService {
|
|
6107
5227
|
formatter;
|
|
@@ -6162,11 +5282,18 @@ var SirioGridService = class SirioGridService {
|
|
|
6162
5282
|
};
|
|
6163
5283
|
}
|
|
6164
5284
|
getRows(source, config, onData) {
|
|
6165
|
-
if (!source || typeof source !== "object") return this.staticRows([]);
|
|
5285
|
+
if (!source || typeof source !== "object" && typeof source !== "function") return this.staticRows([]);
|
|
6166
5286
|
const cached = this.rowsCache.get(source);
|
|
6167
5287
|
if (cached) return cached;
|
|
6168
5288
|
let rows;
|
|
6169
|
-
if (
|
|
5289
|
+
if (typeof source === "function") rows = {
|
|
5290
|
+
data: signal(null),
|
|
5291
|
+
dataSource: source,
|
|
5292
|
+
loading: signal(false),
|
|
5293
|
+
failed: signal(false),
|
|
5294
|
+
pagedSize: NO_PAGED_SIZE
|
|
5295
|
+
};
|
|
5296
|
+
else if (Array.isArray(source)) {
|
|
6170
5297
|
rows = this.staticRows(source);
|
|
6171
5298
|
onData(source);
|
|
6172
5299
|
} else if (isRowsSource(source)) {
|
|
@@ -6625,7 +5752,7 @@ var SirioGridService = class SirioGridService {
|
|
|
6625
5752
|
type: SirioGridService,
|
|
6626
5753
|
deps: [
|
|
6627
5754
|
{ token: FormatterService },
|
|
6628
|
-
{ token: i1$
|
|
5755
|
+
{ token: i1$3.LanguageService },
|
|
6629
5756
|
{ token: ProgrammabilityService },
|
|
6630
5757
|
{ token: MetadataService },
|
|
6631
5758
|
{ token: MarkdownService }
|
|
@@ -6647,7 +5774,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6647
5774
|
decorators: [{ type: Injectable }],
|
|
6648
5775
|
ctorParameters: () => [
|
|
6649
5776
|
{ type: FormatterService },
|
|
6650
|
-
{ type: i1$
|
|
5777
|
+
{ type: i1$3.LanguageService },
|
|
6651
5778
|
{ type: ProgrammabilityService },
|
|
6652
5779
|
{ type: MetadataService },
|
|
6653
5780
|
{ type: MarkdownService }
|
|
@@ -6989,7 +6116,7 @@ var ChartService = class ChartService {
|
|
|
6989
6116
|
version: "22.2.2",
|
|
6990
6117
|
ngImport: i0,
|
|
6991
6118
|
type: ChartService,
|
|
6992
|
-
deps: [{ token: ProgrammabilityService }, { token: i1$
|
|
6119
|
+
deps: [{ token: ProgrammabilityService }, { token: i1$3.LanguageService }],
|
|
6993
6120
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
6994
6121
|
});
|
|
6995
6122
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
@@ -7005,7 +6132,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7005
6132
|
ngImport: i0,
|
|
7006
6133
|
type: ChartService,
|
|
7007
6134
|
decorators: [{ type: Injectable }],
|
|
7008
|
-
ctorParameters: () => [{ type: ProgrammabilityService }, { type: i1$
|
|
6135
|
+
ctorParameters: () => [{ type: ProgrammabilityService }, { type: i1$3.LanguageService }]
|
|
7009
6136
|
});
|
|
7010
6137
|
var RecursionDirective = class RecursionDirective {
|
|
7011
6138
|
controlContainer;
|
|
@@ -7130,337 +6257,38 @@ var RecursionDirective = class RecursionDirective {
|
|
|
7130
6257
|
}
|
|
7131
6258
|
prepareChildArray(formItem, childArray) {
|
|
7132
6259
|
if (childArray.createNewArray) return childArray;
|
|
7133
|
-
const parentArray = formItem.parent;
|
|
7134
|
-
if (parentArray instanceof FormArray && parentArray.createNewArray) {
|
|
7135
|
-
var newArray = parentArray.createNewArray();
|
|
7136
|
-
this.formService.patch(newArray, childArray.value, { strict: false });
|
|
7137
|
-
return newArray;
|
|
7138
|
-
}
|
|
7139
|
-
return childArray;
|
|
7140
|
-
}
|
|
7141
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
7142
|
-
minVersion: "12.0.0",
|
|
7143
|
-
version: "22.2.2",
|
|
7144
|
-
ngImport: i0,
|
|
7145
|
-
type: RecursionDirective,
|
|
7146
|
-
deps: [
|
|
7147
|
-
{ token: i1$3.ControlContainer },
|
|
7148
|
-
{ token: FormService },
|
|
7149
|
-
{ token: CacheContextService }
|
|
7150
|
-
],
|
|
7151
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
7152
|
-
});
|
|
7153
|
-
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
7154
|
-
minVersion: "14.0.0",
|
|
7155
|
-
version: "22.2.2",
|
|
7156
|
-
type: RecursionDirective,
|
|
7157
|
-
isStandalone: true,
|
|
7158
|
-
selector: "[recursion]",
|
|
7159
|
-
inputs: {
|
|
7160
|
-
formGroup: "formGroup",
|
|
7161
|
-
component: ["recursion", "component"]
|
|
7162
|
-
},
|
|
7163
|
-
providers: [CacheContextService],
|
|
7164
|
-
exportAs: ["recursion"],
|
|
7165
|
-
usesOnChanges: true,
|
|
7166
|
-
ngImport: i0
|
|
7167
|
-
});
|
|
7168
|
-
};
|
|
7169
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
7170
|
-
minVersion: "12.0.0",
|
|
7171
|
-
version: "22.2.2",
|
|
7172
|
-
ngImport: i0,
|
|
7173
|
-
type: RecursionDirective,
|
|
7174
|
-
decorators: [{
|
|
7175
|
-
type: Directive,
|
|
7176
|
-
args: [{
|
|
7177
|
-
selector: "[recursion]",
|
|
7178
|
-
exportAs: "recursion",
|
|
7179
|
-
standalone: true,
|
|
7180
|
-
providers: [CacheContextService]
|
|
7181
|
-
}]
|
|
7182
|
-
}],
|
|
7183
|
-
ctorParameters: () => [
|
|
7184
|
-
{ type: i1$3.ControlContainer },
|
|
7185
|
-
{ type: FormService },
|
|
7186
|
-
{ type: CacheContextService }
|
|
7187
|
-
],
|
|
7188
|
-
propDecorators: {
|
|
7189
|
-
formGroup: [{ type: Input }],
|
|
7190
|
-
component: [{
|
|
7191
|
-
type: Input,
|
|
7192
|
-
args: ["recursion"]
|
|
7193
|
-
}]
|
|
7194
|
-
}
|
|
7195
|
-
});
|
|
7196
|
-
var FrameSecurityDirective = class FrameSecurityDirective {
|
|
7197
|
-
el;
|
|
7198
|
-
renderer;
|
|
7199
|
-
frameSecurity = null;
|
|
7200
|
-
constructor(el, renderer) {
|
|
7201
|
-
this.el = el;
|
|
7202
|
-
this.renderer = renderer;
|
|
7203
|
-
}
|
|
7204
|
-
ngAfterViewInit() {
|
|
7205
|
-
const frame = this.el.nativeElement;
|
|
7206
|
-
const sandbox = this.getSandBox(this.frameSecurity);
|
|
7207
|
-
if (sandbox) this.renderer.setAttribute(frame, "sandbox", sandbox);
|
|
7208
|
-
const allow = this.getAllow(this.frameSecurity);
|
|
7209
|
-
if (allow) this.renderer.setAttribute(frame, "allow", allow);
|
|
7210
|
-
}
|
|
7211
|
-
getSandBox(security) {
|
|
7212
|
-
let allowedProperties = [
|
|
7213
|
-
"allowScripts",
|
|
7214
|
-
"allowSameOrigin",
|
|
7215
|
-
"allowForms",
|
|
7216
|
-
"allowModals",
|
|
7217
|
-
"allowPopups",
|
|
7218
|
-
"allowTopNavigation",
|
|
7219
|
-
"allowStorageAccessByUserActivation"
|
|
7220
|
-
];
|
|
7221
|
-
return Object.entries(security).filter(([key, value]) => value === true && allowedProperties.includes(key)).map(([key]) => this.camelToKebabCase(key)).join(" ");
|
|
7222
|
-
}
|
|
7223
|
-
getAllow(security) {
|
|
7224
|
-
let allowedProperties = [
|
|
7225
|
-
"fullscreen",
|
|
7226
|
-
"geolocation",
|
|
7227
|
-
"camera",
|
|
7228
|
-
"microphone"
|
|
7229
|
-
];
|
|
7230
|
-
return Object.entries(security).filter(([key, value]) => value === true && allowedProperties.includes(key)).map(([key]) => key).join(" ");
|
|
7231
|
-
}
|
|
7232
|
-
camelToKebabCase(str) {
|
|
7233
|
-
return str.replace(/[A-Z]/g, (match) => "-" + match.toLowerCase());
|
|
7234
|
-
}
|
|
7235
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
7236
|
-
minVersion: "12.0.0",
|
|
7237
|
-
version: "22.2.2",
|
|
7238
|
-
ngImport: i0,
|
|
7239
|
-
type: FrameSecurityDirective,
|
|
7240
|
-
deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }],
|
|
7241
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
7242
|
-
});
|
|
7243
|
-
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
7244
|
-
minVersion: "14.0.0",
|
|
7245
|
-
version: "22.2.2",
|
|
7246
|
-
type: FrameSecurityDirective,
|
|
7247
|
-
isStandalone: true,
|
|
7248
|
-
selector: "[frameSecurity]",
|
|
7249
|
-
inputs: { frameSecurity: "frameSecurity" },
|
|
7250
|
-
ngImport: i0
|
|
7251
|
-
});
|
|
7252
|
-
};
|
|
7253
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
7254
|
-
minVersion: "12.0.0",
|
|
7255
|
-
version: "22.2.2",
|
|
7256
|
-
ngImport: i0,
|
|
7257
|
-
type: FrameSecurityDirective,
|
|
7258
|
-
decorators: [{
|
|
7259
|
-
type: Directive,
|
|
7260
|
-
args: [{
|
|
7261
|
-
selector: "[frameSecurity]",
|
|
7262
|
-
standalone: true
|
|
7263
|
-
}]
|
|
7264
|
-
}],
|
|
7265
|
-
ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }],
|
|
7266
|
-
propDecorators: { frameSecurity: [{ type: Input }] }
|
|
7267
|
-
});
|
|
7268
|
-
var GridDirective = class GridDirective {
|
|
7269
|
-
grid;
|
|
7270
|
-
gridService;
|
|
7271
|
-
cacheContext;
|
|
7272
|
-
languageService;
|
|
7273
|
-
destroyRef;
|
|
7274
|
-
rowSource;
|
|
7275
|
-
columns = null;
|
|
7276
|
-
selectable = null;
|
|
7277
|
-
multiSelect = null;
|
|
7278
|
-
suppressActions = null;
|
|
7279
|
-
formGroup;
|
|
7280
|
-
component = null;
|
|
7281
|
-
constructor(grid, gridService, cacheContext, languageService, destroyRef) {
|
|
7282
|
-
this.grid = grid;
|
|
7283
|
-
this.gridService = gridService;
|
|
7284
|
-
this.cacheContext = cacheContext;
|
|
7285
|
-
this.languageService = languageService;
|
|
7286
|
-
this.destroyRef = destroyRef;
|
|
7287
|
-
grid.gridReady.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((params) => {
|
|
7288
|
-
this.gridApi = params.api;
|
|
7289
|
-
this.prepareContext();
|
|
7290
|
-
this.isGridReady = true;
|
|
7291
|
-
this.onGridReady();
|
|
7292
|
-
});
|
|
7293
|
-
}
|
|
7294
|
-
ngOnChanges(changes) {
|
|
7295
|
-
if (this.isRowSourceChanged(changes)) this.onRowSourceChanged();
|
|
7296
|
-
if (this.isColumnDefsChanged(changes)) this.onColumnDefsChanged();
|
|
7297
|
-
if (this.isSelectionChanged(changes)) this.onSelectionChanged();
|
|
7298
|
-
if (this.isSuppressActionChanged(changes)) this.onSuppressAction();
|
|
7299
|
-
}
|
|
7300
|
-
gridApi;
|
|
7301
|
-
isGridReady = false;
|
|
7302
|
-
noData = of([]);
|
|
7303
|
-
prepareContext() {
|
|
7304
|
-
const context = this.gridApi.getGridOption("context") ?? {};
|
|
7305
|
-
context["cacheContext"] = this.cacheContext;
|
|
7306
|
-
this.gridApi.setGridOption("context", context);
|
|
7307
|
-
}
|
|
7308
|
-
applyResult(data) {
|
|
7309
|
-
if (this.isArray(data)) this.setRowData(data);
|
|
7310
|
-
else if (this.isDataSource(data)) this.setDataSource(data);
|
|
7311
|
-
else this.setRowData([]);
|
|
7312
|
-
}
|
|
7313
|
-
setRowData(rowSource) {
|
|
7314
|
-
this.grid.rowModelType = "clientSide";
|
|
7315
|
-
if (this.isGridReady) this.grid.api.setGridOption("rowData", rowSource);
|
|
7316
|
-
else this.grid.rowData = rowSource;
|
|
7317
|
-
this.gridService.onRowDataChanged(this.component, this.gridApi, rowSource);
|
|
7318
|
-
}
|
|
7319
|
-
setDataSource(rowSource) {
|
|
7320
|
-
this.grid.rowModelType = "infinite";
|
|
7321
|
-
if (this.isGridReady) this.grid.api.setGridOption("datasource", rowSource);
|
|
7322
|
-
else this.grid.datasource = rowSource;
|
|
7323
|
-
this.gridService.onDataSourceChanged(this.component, this.gridApi, rowSource);
|
|
7324
|
-
}
|
|
7325
|
-
isArray(rowSource) {
|
|
7326
|
-
return Array.isArray(rowSource);
|
|
7327
|
-
}
|
|
7328
|
-
isDataSource(obj) {
|
|
7329
|
-
return obj && typeof obj.getRows === "function";
|
|
7330
|
-
}
|
|
7331
|
-
onGridReady() {
|
|
7332
|
-
this.onColumnDefsChanged();
|
|
7333
|
-
}
|
|
7334
|
-
isRowSourceChanged(changes) {
|
|
7335
|
-
return ["rowSource"].some((key) => !!changes[key]);
|
|
7336
|
-
}
|
|
7337
|
-
onRowSourceChanged() {
|
|
7338
|
-
this.cacheContext.invalidateAll();
|
|
7339
|
-
if (isObservable(this.rowSource)) this.wrapObservable(this.rowSource).pipe(take$1(1), takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
|
|
7340
|
-
this.applyResult(value ?? []);
|
|
7341
|
-
});
|
|
7342
|
-
else if (this.isDataSource(this.rowSource)) this.applyResult(this.wrapRowsSource(this.rowSource));
|
|
7343
|
-
else this.applyResult(this.rowSource);
|
|
7344
|
-
}
|
|
7345
|
-
isColumnDefsChanged(changes) {
|
|
7346
|
-
return ["columnDefs"].some((key) => !!changes[key]);
|
|
7347
|
-
}
|
|
7348
|
-
onColumnDefsChanged() {
|
|
7349
|
-
if (this.gridApi) {
|
|
7350
|
-
const columnDef = this.gridService.getColumnDefs(this.component, this.columns, this.formGroup);
|
|
7351
|
-
this.gridApi.setGridOption("columnDefs", columnDef);
|
|
7352
|
-
}
|
|
7353
|
-
}
|
|
7354
|
-
isSelectionChanged(changes) {
|
|
7355
|
-
return ["selectable", "multiSelect"].some((key) => !!changes[key] && !changes[key].isFirstChange());
|
|
7356
|
-
}
|
|
7357
|
-
onSelectionChanged() {
|
|
7358
|
-
if (this.gridApi) {
|
|
7359
|
-
const rowSelection = this.gridService.getRowSelection(this.component, this.formGroup);
|
|
7360
|
-
this.gridApi.setGridOption("rowSelection", rowSelection);
|
|
7361
|
-
}
|
|
7362
|
-
}
|
|
7363
|
-
isSuppressActionChanged(changes) {
|
|
7364
|
-
return ["suppressActions"].some((key) => !!changes[key] && !changes[key].isFirstChange());
|
|
7365
|
-
}
|
|
7366
|
-
onSuppressAction() {
|
|
7367
|
-
if (this.gridApi) {
|
|
7368
|
-
this.gridApi.setColumnsVisible(["actions"], !(this.suppressActions ?? false));
|
|
7369
|
-
this.gridService.resizeGrid(this.component, this.gridApi);
|
|
7370
|
-
}
|
|
7371
|
-
}
|
|
7372
|
-
showLoading(value) {
|
|
7373
|
-
if (this.gridApi) this.gridApi.setGridOption("loading", value);
|
|
7374
|
-
}
|
|
7375
|
-
showLoadError(value) {
|
|
7376
|
-
if (!this.gridApi) return;
|
|
7377
|
-
if (value) {
|
|
7378
|
-
this.grid.api.setGridOption("overlayNoRowsTemplate", this.locale(Texts, "LoadingFailed"));
|
|
7379
|
-
this.grid.api.showNoRowsOverlay();
|
|
7380
|
-
} else this.grid.api.setGridOption("overlayNoRowsTemplate", void 0);
|
|
7381
|
-
}
|
|
7382
|
-
get language() {
|
|
7383
|
-
return this.languageService.getLanguage();
|
|
7384
|
-
}
|
|
7385
|
-
locale(component, key) {
|
|
7386
|
-
return localize(this.language, component, key);
|
|
7387
|
-
}
|
|
7388
|
-
wrapObservable(source) {
|
|
7389
|
-
this.showLoading(true);
|
|
7390
|
-
this.showLoadError(false);
|
|
7391
|
-
return source.pipe(tap$1(() => this.showLoadError(false)), catchError$1((err) => {
|
|
7392
|
-
this.showLoadError(true);
|
|
7393
|
-
return this.noData;
|
|
7394
|
-
}), finalize$1(() => this.showLoading(false)));
|
|
7395
|
-
}
|
|
7396
|
-
wrapRowsSource(source) {
|
|
7397
|
-
const thisRef = this;
|
|
7398
|
-
function calculateLastRow(params, rows, lastRow) {
|
|
7399
|
-
if (lastRow === void 0 && Array.isArray(rows)) {
|
|
7400
|
-
if (rows.length < params.endRow - params.startRow) return params.startRow + rows.length;
|
|
7401
|
-
}
|
|
7402
|
-
return lastRow;
|
|
7403
|
-
}
|
|
7404
|
-
function wrapParams(params) {
|
|
7405
|
-
thisRef.showLoading(true);
|
|
7406
|
-
thisRef.showLoadError(false);
|
|
7407
|
-
return {
|
|
7408
|
-
...params,
|
|
7409
|
-
successCallback: (rows, lastRow) => {
|
|
7410
|
-
try {
|
|
7411
|
-
params.successCallback(rows, calculateLastRow(params, rows, lastRow));
|
|
7412
|
-
} finally {
|
|
7413
|
-
thisRef.showLoading(false);
|
|
7414
|
-
}
|
|
7415
|
-
},
|
|
7416
|
-
failCallback: () => {
|
|
7417
|
-
try {
|
|
7418
|
-
params.failCallback();
|
|
7419
|
-
} finally {
|
|
7420
|
-
thisRef.showLoading(false);
|
|
7421
|
-
thisRef.showLoadError(true);
|
|
7422
|
-
}
|
|
7423
|
-
}
|
|
7424
|
-
};
|
|
6260
|
+
const parentArray = formItem.parent;
|
|
6261
|
+
if (parentArray instanceof FormArray && parentArray.createNewArray) {
|
|
6262
|
+
var newArray = parentArray.createNewArray();
|
|
6263
|
+
this.formService.patch(newArray, childArray.value, { strict: false });
|
|
6264
|
+
return newArray;
|
|
7425
6265
|
}
|
|
7426
|
-
return
|
|
7427
|
-
const wrapped = wrapParams(params);
|
|
7428
|
-
source.getRows(wrapped);
|
|
7429
|
-
} };
|
|
6266
|
+
return childArray;
|
|
7430
6267
|
}
|
|
7431
6268
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
7432
6269
|
minVersion: "12.0.0",
|
|
7433
6270
|
version: "22.2.2",
|
|
7434
6271
|
ngImport: i0,
|
|
7435
|
-
type:
|
|
6272
|
+
type: RecursionDirective,
|
|
7436
6273
|
deps: [
|
|
7437
|
-
{
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
},
|
|
7441
|
-
{ token: GridService },
|
|
7442
|
-
{ token: CacheContextService },
|
|
7443
|
-
{ token: i1$4.LanguageService },
|
|
7444
|
-
{ token: i0.DestroyRef }
|
|
6274
|
+
{ token: i1$2.ControlContainer },
|
|
6275
|
+
{ token: FormService },
|
|
6276
|
+
{ token: CacheContextService }
|
|
7445
6277
|
],
|
|
7446
6278
|
target: i0.ɵɵFactoryTarget.Directive
|
|
7447
6279
|
});
|
|
7448
6280
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
7449
6281
|
minVersion: "14.0.0",
|
|
7450
6282
|
version: "22.2.2",
|
|
7451
|
-
type:
|
|
6283
|
+
type: RecursionDirective,
|
|
7452
6284
|
isStandalone: true,
|
|
7453
|
-
selector: "[
|
|
6285
|
+
selector: "[recursion]",
|
|
7454
6286
|
inputs: {
|
|
7455
|
-
rowSource: "rowSource",
|
|
7456
|
-
columns: "columns",
|
|
7457
|
-
selectable: "selectable",
|
|
7458
|
-
multiSelect: "multiSelect",
|
|
7459
|
-
suppressActions: "suppressActions",
|
|
7460
6287
|
formGroup: "formGroup",
|
|
7461
|
-
component: ["
|
|
6288
|
+
component: ["recursion", "component"]
|
|
7462
6289
|
},
|
|
7463
6290
|
providers: [CacheContextService],
|
|
6291
|
+
exportAs: ["recursion"],
|
|
7464
6292
|
usesOnChanges: true,
|
|
7465
6293
|
ngImport: i0
|
|
7466
6294
|
});
|
|
@@ -7469,41 +6297,101 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7469
6297
|
minVersion: "12.0.0",
|
|
7470
6298
|
version: "22.2.2",
|
|
7471
6299
|
ngImport: i0,
|
|
7472
|
-
type:
|
|
6300
|
+
type: RecursionDirective,
|
|
7473
6301
|
decorators: [{
|
|
7474
6302
|
type: Directive,
|
|
7475
6303
|
args: [{
|
|
7476
|
-
selector: "[
|
|
6304
|
+
selector: "[recursion]",
|
|
6305
|
+
exportAs: "recursion",
|
|
7477
6306
|
standalone: true,
|
|
7478
6307
|
providers: [CacheContextService]
|
|
7479
6308
|
}]
|
|
7480
6309
|
}],
|
|
7481
6310
|
ctorParameters: () => [
|
|
7482
|
-
{
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
},
|
|
7486
|
-
{ type: GridService },
|
|
7487
|
-
{ type: CacheContextService },
|
|
7488
|
-
{ type: i1$4.LanguageService },
|
|
7489
|
-
{ type: i0.DestroyRef }
|
|
6311
|
+
{ type: i1$2.ControlContainer },
|
|
6312
|
+
{ type: FormService },
|
|
6313
|
+
{ type: CacheContextService }
|
|
7490
6314
|
],
|
|
7491
6315
|
propDecorators: {
|
|
7492
|
-
rowSource: [{ type: Input }],
|
|
7493
|
-
columns: [{
|
|
7494
|
-
type: Input,
|
|
7495
|
-
args: ["columns"]
|
|
7496
|
-
}],
|
|
7497
|
-
selectable: [{ type: Input }],
|
|
7498
|
-
multiSelect: [{ type: Input }],
|
|
7499
|
-
suppressActions: [{ type: Input }],
|
|
7500
6316
|
formGroup: [{ type: Input }],
|
|
7501
6317
|
component: [{
|
|
7502
6318
|
type: Input,
|
|
7503
|
-
args: ["
|
|
6319
|
+
args: ["recursion"]
|
|
7504
6320
|
}]
|
|
7505
6321
|
}
|
|
7506
6322
|
});
|
|
6323
|
+
var FrameSecurityDirective = class FrameSecurityDirective {
|
|
6324
|
+
el;
|
|
6325
|
+
renderer;
|
|
6326
|
+
frameSecurity = null;
|
|
6327
|
+
constructor(el, renderer) {
|
|
6328
|
+
this.el = el;
|
|
6329
|
+
this.renderer = renderer;
|
|
6330
|
+
}
|
|
6331
|
+
ngAfterViewInit() {
|
|
6332
|
+
const frame = this.el.nativeElement;
|
|
6333
|
+
const sandbox = this.getSandBox(this.frameSecurity);
|
|
6334
|
+
if (sandbox) this.renderer.setAttribute(frame, "sandbox", sandbox);
|
|
6335
|
+
const allow = this.getAllow(this.frameSecurity);
|
|
6336
|
+
if (allow) this.renderer.setAttribute(frame, "allow", allow);
|
|
6337
|
+
}
|
|
6338
|
+
getSandBox(security) {
|
|
6339
|
+
let allowedProperties = [
|
|
6340
|
+
"allowScripts",
|
|
6341
|
+
"allowSameOrigin",
|
|
6342
|
+
"allowForms",
|
|
6343
|
+
"allowModals",
|
|
6344
|
+
"allowPopups",
|
|
6345
|
+
"allowTopNavigation",
|
|
6346
|
+
"allowStorageAccessByUserActivation"
|
|
6347
|
+
];
|
|
6348
|
+
return Object.entries(security).filter(([key, value]) => value === true && allowedProperties.includes(key)).map(([key]) => this.camelToKebabCase(key)).join(" ");
|
|
6349
|
+
}
|
|
6350
|
+
getAllow(security) {
|
|
6351
|
+
let allowedProperties = [
|
|
6352
|
+
"fullscreen",
|
|
6353
|
+
"geolocation",
|
|
6354
|
+
"camera",
|
|
6355
|
+
"microphone"
|
|
6356
|
+
];
|
|
6357
|
+
return Object.entries(security).filter(([key, value]) => value === true && allowedProperties.includes(key)).map(([key]) => key).join(" ");
|
|
6358
|
+
}
|
|
6359
|
+
camelToKebabCase(str) {
|
|
6360
|
+
return str.replace(/[A-Z]/g, (match) => "-" + match.toLowerCase());
|
|
6361
|
+
}
|
|
6362
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
6363
|
+
minVersion: "12.0.0",
|
|
6364
|
+
version: "22.2.2",
|
|
6365
|
+
ngImport: i0,
|
|
6366
|
+
type: FrameSecurityDirective,
|
|
6367
|
+
deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }],
|
|
6368
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
6369
|
+
});
|
|
6370
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
6371
|
+
minVersion: "14.0.0",
|
|
6372
|
+
version: "22.2.2",
|
|
6373
|
+
type: FrameSecurityDirective,
|
|
6374
|
+
isStandalone: true,
|
|
6375
|
+
selector: "[frameSecurity]",
|
|
6376
|
+
inputs: { frameSecurity: "frameSecurity" },
|
|
6377
|
+
ngImport: i0
|
|
6378
|
+
});
|
|
6379
|
+
};
|
|
6380
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
6381
|
+
minVersion: "12.0.0",
|
|
6382
|
+
version: "22.2.2",
|
|
6383
|
+
ngImport: i0,
|
|
6384
|
+
type: FrameSecurityDirective,
|
|
6385
|
+
decorators: [{
|
|
6386
|
+
type: Directive,
|
|
6387
|
+
args: [{
|
|
6388
|
+
selector: "[frameSecurity]",
|
|
6389
|
+
standalone: true
|
|
6390
|
+
}]
|
|
6391
|
+
}],
|
|
6392
|
+
ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }],
|
|
6393
|
+
propDecorators: { frameSecurity: [{ type: Input }] }
|
|
6394
|
+
});
|
|
7507
6395
|
var ChangeDirective = class ChangeDirective {
|
|
7508
6396
|
observe;
|
|
7509
6397
|
callback;
|
|
@@ -7746,119 +6634,21 @@ var AccordionControl = class extends ContainerControl {
|
|
|
7746
6634
|
};
|
|
7747
6635
|
var DynamicListControl = class extends ContainerControl {};
|
|
7748
6636
|
var GroupControl = class extends ContainerControl {};
|
|
7749
|
-
function subscribeOnce(source$, next, error, complete) {
|
|
7750
|
-
source$.pipe(take$1(1)).subscribe({
|
|
7751
|
-
next,
|
|
7752
|
-
error,
|
|
7753
|
-
complete
|
|
7754
|
-
});
|
|
7755
|
-
}
|
|
7756
6637
|
var TableControl = class extends Control {
|
|
7757
6638
|
setFilter(filter) {
|
|
7758
|
-
this.
|
|
7759
|
-
}
|
|
7760
|
-
getFilter() {
|
|
7761
|
-
return this.grid.api.getFilterModel();
|
|
7762
|
-
}
|
|
7763
|
-
clearFilter() {
|
|
7764
|
-
this.grid.api.setFilterModel(null);
|
|
7765
|
-
}
|
|
7766
|
-
getOrder() {
|
|
7767
|
-
return this.grid.api.getColumnState().filter((col) => col.sort === "asc" || col.sort === "desc").sort((a, b) => (a.sortIndex ?? 0) - (b.sortIndex ?? 0)).map((col) => ({
|
|
7768
|
-
colId: col.colId,
|
|
7769
|
-
sort: col.sort
|
|
7770
|
-
}));
|
|
7771
|
-
}
|
|
7772
|
-
setOrder(order) {
|
|
7773
|
-
this.grid.api.applyColumnState({
|
|
7774
|
-
state: order.map((o, i) => ({
|
|
7775
|
-
colId: o.colId,
|
|
7776
|
-
sort: o.sort,
|
|
7777
|
-
sortIndex: i
|
|
7778
|
-
})),
|
|
7779
|
-
defaultState: { sort: null }
|
|
7780
|
-
});
|
|
7781
|
-
}
|
|
7782
|
-
refresh() {
|
|
7783
|
-
this.grid._refresh();
|
|
7784
|
-
}
|
|
7785
|
-
redraw() {
|
|
7786
|
-
this.grid.api.redrawRows();
|
|
7787
|
-
}
|
|
7788
|
-
currentState = null;
|
|
7789
|
-
onLoadState() {
|
|
7790
|
-
const destroyRef = this.getDestroyRef();
|
|
7791
|
-
merge(this.grid.filterChanged, this.grid.sortChanged, this.grid.columnResized, this.grid.paginationChanged).pipe(takeUntilDestroyed(destroyRef)).subscribe(() => {
|
|
7792
|
-
this.currentState = this.createState();
|
|
7793
|
-
});
|
|
7794
|
-
this.grid.gridReady.pipe(takeUntilDestroyed(destroyRef)).subscribe((event) => {
|
|
7795
|
-
this.applyState();
|
|
7796
|
-
});
|
|
7797
|
-
}
|
|
7798
|
-
onSaveState() {
|
|
7799
|
-
this.setState(this.currentState);
|
|
7800
|
-
}
|
|
7801
|
-
createState() {
|
|
7802
|
-
return {
|
|
7803
|
-
columns: this.grid.api.getColumnState(),
|
|
7804
|
-
filter: this.grid.api.getFilterModel(),
|
|
7805
|
-
pagination: this.paginationEnabled() ? {
|
|
7806
|
-
page: this.grid.api.paginationGetCurrentPage(),
|
|
7807
|
-
pageSize: this.grid.api.paginationGetPageSize()
|
|
7808
|
-
} : null
|
|
7809
|
-
};
|
|
7810
|
-
}
|
|
7811
|
-
applyState() {
|
|
7812
|
-
const state = this.getState();
|
|
7813
|
-
if (state) {
|
|
7814
|
-
if (state.columns) this.grid.api.applyColumnState({
|
|
7815
|
-
state: state.columns,
|
|
7816
|
-
applyOrder: true
|
|
7817
|
-
});
|
|
7818
|
-
if (state.filter) this.grid.api.setFilterModel(state.filter);
|
|
7819
|
-
if (state.pagination) this.applyPagination(state.pagination);
|
|
7820
|
-
}
|
|
7821
|
-
}
|
|
7822
|
-
applyPagination(pagination) {
|
|
7823
|
-
if (!this.paginationEnabled()) return;
|
|
7824
|
-
this.applyPageSize(pagination.pageSize);
|
|
7825
|
-
this.applyPageNumber(pagination.page);
|
|
7826
|
-
}
|
|
7827
|
-
applyPageSize(pageSize) {
|
|
7828
|
-
if (this.grid.api.paginationGetPageSize() != pageSize) this.grid.api.setGridOption("paginationPageSize", pageSize);
|
|
7829
|
-
}
|
|
7830
|
-
applyPageNumber(pageNumber, subscribe = true) {
|
|
7831
|
-
if (this.grid.api.paginationGetCurrentPage() != pageNumber) {
|
|
7832
|
-
this.grid.api.paginationGoToPage(pageNumber);
|
|
7833
|
-
if (subscribe) subscribeOnce(this.grid.firstDataRendered, () => {
|
|
7834
|
-
this.applyPageNumber(pageNumber, false);
|
|
7835
|
-
});
|
|
7836
|
-
}
|
|
7837
|
-
}
|
|
7838
|
-
get grid() {
|
|
7839
|
-
const ref = this.getComponentRef();
|
|
7840
|
-
if (!(ref instanceof AgGridAngular)) throw new Error("ComponentRef is not a AgGridAngular");
|
|
7841
|
-
return ref;
|
|
7842
|
-
}
|
|
7843
|
-
paginationEnabled() {
|
|
7844
|
-
return this.grid.api.getGridOption("pagination") === true;
|
|
7845
|
-
}
|
|
7846
|
-
};
|
|
7847
|
-
var DataGridControl = class extends TableControl {
|
|
7848
|
-
setFilter(filter) {
|
|
7849
|
-
this.dataGrid.filters.set(agFiltersToSirio(filter, this.modelColumns()));
|
|
6639
|
+
this.dataGrid.filters.set(filterModelToSirio(filter, this.modelColumns()));
|
|
7850
6640
|
}
|
|
7851
6641
|
getFilter() {
|
|
7852
|
-
return
|
|
6642
|
+
return sirioFiltersToModel(this.dataGrid.filters(), this.modelColumns());
|
|
7853
6643
|
}
|
|
7854
6644
|
clearFilter() {
|
|
7855
6645
|
this.dataGrid.clearFilters();
|
|
7856
6646
|
}
|
|
7857
6647
|
getOrder() {
|
|
7858
|
-
return
|
|
6648
|
+
return sirioSortToOrderModel(this.dataGrid.sort());
|
|
7859
6649
|
}
|
|
7860
6650
|
setOrder(order) {
|
|
7861
|
-
this.dataGrid.sort.set(
|
|
6651
|
+
this.dataGrid.sort.set(orderModelToSirio(order));
|
|
7862
6652
|
}
|
|
7863
6653
|
refresh() {
|
|
7864
6654
|
this.dataGrid._refresh?.();
|
|
@@ -7941,7 +6731,7 @@ function createControl(context) {
|
|
|
7941
6731
|
default: return new DynamicListControl(context);
|
|
7942
6732
|
}
|
|
7943
6733
|
case "group": return new GroupControl(context);
|
|
7944
|
-
case "table": return
|
|
6734
|
+
case "table": return new TableControl(context);
|
|
7945
6735
|
case "chart": return new ChartControl(context);
|
|
7946
6736
|
case "button": return new ButtonControl(context);
|
|
7947
6737
|
case "separator": return new SeparatorControl(context);
|
|
@@ -8411,7 +7201,7 @@ var CollapseDirective = class CollapseDirective {
|
|
|
8411
7201
|
{ token: i0.Renderer2 },
|
|
8412
7202
|
{ token: i0.DestroyRef },
|
|
8413
7203
|
{ token: ListenerService },
|
|
8414
|
-
{ token: i1$
|
|
7204
|
+
{ token: i1$3.LanguageService }
|
|
8415
7205
|
],
|
|
8416
7206
|
target: i0.ɵɵFactoryTarget.Directive
|
|
8417
7207
|
});
|
|
@@ -8450,7 +7240,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8450
7240
|
{ type: i0.Renderer2 },
|
|
8451
7241
|
{ type: i0.DestroyRef },
|
|
8452
7242
|
{ type: ListenerService },
|
|
8453
|
-
{ type: i1$
|
|
7243
|
+
{ type: i1$3.LanguageService }
|
|
8454
7244
|
],
|
|
8455
7245
|
propDecorators: {
|
|
8456
7246
|
maxHeight: [{
|
|
@@ -8803,7 +7593,7 @@ var JsonFileDirective = class JsonFileDirective {
|
|
|
8803
7593
|
type: JsonFileDirective,
|
|
8804
7594
|
deps: [
|
|
8805
7595
|
{
|
|
8806
|
-
token: i1$
|
|
7596
|
+
token: i1$2.NgControl,
|
|
8807
7597
|
self: true
|
|
8808
7598
|
},
|
|
8809
7599
|
{ token: SubscribeService },
|
|
@@ -8834,7 +7624,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8834
7624
|
}],
|
|
8835
7625
|
ctorParameters: () => [
|
|
8836
7626
|
{
|
|
8837
|
-
type: i1$
|
|
7627
|
+
type: i1$2.NgControl,
|
|
8838
7628
|
decorators: [{ type: Self }]
|
|
8839
7629
|
},
|
|
8840
7630
|
{ type: SubscribeService },
|
|
@@ -8950,7 +7740,7 @@ var RequiredOnInputDirective = class RequiredOnInputDirective {
|
|
|
8950
7740
|
{ token: ValidationService },
|
|
8951
7741
|
{ token: i0.ElementRef },
|
|
8952
7742
|
{
|
|
8953
|
-
token: i1$
|
|
7743
|
+
token: i1$2.NgControl,
|
|
8954
7744
|
optional: true
|
|
8955
7745
|
}
|
|
8956
7746
|
],
|
|
@@ -8982,7 +7772,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8982
7772
|
{ type: ValidationService },
|
|
8983
7773
|
{ type: i0.ElementRef },
|
|
8984
7774
|
{
|
|
8985
|
-
type: i1$
|
|
7775
|
+
type: i1$2.NgControl,
|
|
8986
7776
|
decorators: [{ type: Optional }]
|
|
8987
7777
|
}
|
|
8988
7778
|
],
|
|
@@ -9022,7 +7812,7 @@ var RequiredOnBlurDirective = class RequiredOnBlurDirective {
|
|
|
9022
7812
|
deps: [
|
|
9023
7813
|
{ token: i0.ElementRef },
|
|
9024
7814
|
{
|
|
9025
|
-
token: i1$
|
|
7815
|
+
token: i1$2.NgControl,
|
|
9026
7816
|
optional: true,
|
|
9027
7817
|
self: true
|
|
9028
7818
|
},
|
|
@@ -9056,7 +7846,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
9056
7846
|
ctorParameters: () => [
|
|
9057
7847
|
{ type: i0.ElementRef },
|
|
9058
7848
|
{
|
|
9059
|
-
type: i1$
|
|
7849
|
+
type: i1$2.NgControl,
|
|
9060
7850
|
decorators: [{ type: Optional }, { type: Self }]
|
|
9061
7851
|
},
|
|
9062
7852
|
{ type: ValidationService }
|
|
@@ -9105,7 +7895,7 @@ var MarkdownDirective = class MarkdownDirective {
|
|
|
9105
7895
|
type: MarkdownDirective,
|
|
9106
7896
|
isStandalone: true,
|
|
9107
7897
|
selector: "[markdown]",
|
|
9108
|
-
inputs: { onAnchorClick: "onAnchorClick" },
|
|
7898
|
+
inputs: { onAnchorClick: ["markdown", "onAnchorClick"] },
|
|
9109
7899
|
host: { listeners: { "click": "onClick($event)" } },
|
|
9110
7900
|
ngImport: i0
|
|
9111
7901
|
});
|
|
@@ -9123,7 +7913,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
9123
7913
|
}]
|
|
9124
7914
|
}],
|
|
9125
7915
|
propDecorators: {
|
|
9126
|
-
onAnchorClick: [{
|
|
7916
|
+
onAnchorClick: [{
|
|
7917
|
+
type: Input,
|
|
7918
|
+
args: ["markdown"]
|
|
7919
|
+
}],
|
|
9127
7920
|
onClick: [{
|
|
9128
7921
|
type: HostListener,
|
|
9129
7922
|
args: ["click", ["$event"]]
|
|
@@ -9576,6 +8369,45 @@ function isMeaningful(x) {
|
|
|
9576
8369
|
if (typeof x === "object") return Object.keys(x).length > 0;
|
|
9577
8370
|
return !!x;
|
|
9578
8371
|
}
|
|
8372
|
+
function getCandidate(element) {
|
|
8373
|
+
return Array.from(element.querySelectorAll("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex]:not([tabindex=\"-1\"]), [contenteditable]"));
|
|
8374
|
+
}
|
|
8375
|
+
function isVisible(element) {
|
|
8376
|
+
let el = element;
|
|
8377
|
+
while (el) {
|
|
8378
|
+
const style = window.getComputedStyle(el);
|
|
8379
|
+
if (style.display === "none" || style.visibility === "hidden") return false;
|
|
8380
|
+
el = el.parentElement;
|
|
8381
|
+
}
|
|
8382
|
+
return true;
|
|
8383
|
+
}
|
|
8384
|
+
function isFocusable(element) {
|
|
8385
|
+
const style = window.getComputedStyle(element);
|
|
8386
|
+
const hasTabIndex = element.tabIndex >= 0;
|
|
8387
|
+
const isContentEditable = element.hasAttribute("contenteditable") && element.getAttribute("contenteditable") !== "false";
|
|
8388
|
+
if (element.contentEditable === "true") return true;
|
|
8389
|
+
return (hasTabIndex || isContentEditable) && style.visibility !== "hidden" && style.display !== "none" && !element.hasAttribute("disabled") && isVisible(element);
|
|
8390
|
+
}
|
|
8391
|
+
function getFocusables(el, firstOnly = false) {
|
|
8392
|
+
const candidates = getCandidate(el);
|
|
8393
|
+
const result = [];
|
|
8394
|
+
for (const focusableEl of candidates) if (isFocusable(focusableEl)) {
|
|
8395
|
+
result.push(focusableEl);
|
|
8396
|
+
if (firstOnly) break;
|
|
8397
|
+
}
|
|
8398
|
+
return result;
|
|
8399
|
+
}
|
|
8400
|
+
function setFocus(el, preventScroll = false) {
|
|
8401
|
+
const focusables = getFocusables(el, true);
|
|
8402
|
+
if (focusables.length === 0) return null;
|
|
8403
|
+
const target = focusables[0];
|
|
8404
|
+
target.focus({ preventScroll });
|
|
8405
|
+
return target;
|
|
8406
|
+
}
|
|
8407
|
+
function hasFieldFocus(container) {
|
|
8408
|
+
const active = container.ownerDocument.activeElement;
|
|
8409
|
+
return !!active && active !== container && container.contains(active) && active.matches("input, select, textarea, [contenteditable]:not([contenteditable=\"false\"])");
|
|
8410
|
+
}
|
|
9579
8411
|
function flattenTree(nodes, options) {
|
|
9580
8412
|
if (nodes == null) return [];
|
|
9581
8413
|
if (!Array.isArray(nodes)) {
|
|
@@ -9675,9 +8507,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
9675
8507
|
args: [{ providedIn: "root" }]
|
|
9676
8508
|
}]
|
|
9677
8509
|
});
|
|
8510
|
+
const CONTROL_PARSE_ERROR_KEYS = ["sirioDateTime"];
|
|
9678
8511
|
const formPlayerValidationPresenter = (control) => {
|
|
9679
8512
|
const errors = control.errors;
|
|
9680
8513
|
if (!errors) return null;
|
|
8514
|
+
if (CONTROL_PARSE_ERROR_KEYS.some((key) => key in errors)) return null;
|
|
9681
8515
|
if (errors["silent"]) return { state: "none" };
|
|
9682
8516
|
const message = typeof errors["message"] === "string" ? errors["message"] : null;
|
|
9683
8517
|
if (errors["warning"]) return {
|
|
@@ -9689,26 +8523,108 @@ const formPlayerValidationPresenter = (control) => {
|
|
|
9689
8523
|
message
|
|
9690
8524
|
} : null;
|
|
9691
8525
|
};
|
|
8526
|
+
const ALLOWED_TAGS = [
|
|
8527
|
+
"address",
|
|
8528
|
+
"article",
|
|
8529
|
+
"aside",
|
|
8530
|
+
"footer",
|
|
8531
|
+
"header",
|
|
8532
|
+
"h1",
|
|
8533
|
+
"h2",
|
|
8534
|
+
"h3",
|
|
8535
|
+
"h4",
|
|
8536
|
+
"h5",
|
|
8537
|
+
"h6",
|
|
8538
|
+
"hgroup",
|
|
8539
|
+
"main",
|
|
8540
|
+
"nav",
|
|
8541
|
+
"section",
|
|
8542
|
+
"blockquote",
|
|
8543
|
+
"dd",
|
|
8544
|
+
"div",
|
|
8545
|
+
"dl",
|
|
8546
|
+
"dt",
|
|
8547
|
+
"figcaption",
|
|
8548
|
+
"figure",
|
|
8549
|
+
"hr",
|
|
8550
|
+
"li",
|
|
8551
|
+
"menu",
|
|
8552
|
+
"ol",
|
|
8553
|
+
"p",
|
|
8554
|
+
"pre",
|
|
8555
|
+
"ul",
|
|
8556
|
+
"a",
|
|
8557
|
+
"abbr",
|
|
8558
|
+
"b",
|
|
8559
|
+
"bdi",
|
|
8560
|
+
"bdo",
|
|
8561
|
+
"br",
|
|
8562
|
+
"cite",
|
|
8563
|
+
"code",
|
|
8564
|
+
"data",
|
|
8565
|
+
"dfn",
|
|
8566
|
+
"em",
|
|
8567
|
+
"i",
|
|
8568
|
+
"kbd",
|
|
8569
|
+
"mark",
|
|
8570
|
+
"q",
|
|
8571
|
+
"rb",
|
|
8572
|
+
"rp",
|
|
8573
|
+
"rt",
|
|
8574
|
+
"rtc",
|
|
8575
|
+
"ruby",
|
|
8576
|
+
"s",
|
|
8577
|
+
"samp",
|
|
8578
|
+
"small",
|
|
8579
|
+
"span",
|
|
8580
|
+
"strong",
|
|
8581
|
+
"sub",
|
|
8582
|
+
"sup",
|
|
8583
|
+
"time",
|
|
8584
|
+
"u",
|
|
8585
|
+
"var",
|
|
8586
|
+
"wbr",
|
|
8587
|
+
"caption",
|
|
8588
|
+
"col",
|
|
8589
|
+
"colgroup",
|
|
8590
|
+
"table",
|
|
8591
|
+
"tbody",
|
|
8592
|
+
"td",
|
|
8593
|
+
"tfoot",
|
|
8594
|
+
"th",
|
|
8595
|
+
"thead",
|
|
8596
|
+
"tr",
|
|
8597
|
+
"img"
|
|
8598
|
+
];
|
|
8599
|
+
const ALLOWED_ATTR = [
|
|
8600
|
+
"href",
|
|
8601
|
+
"name",
|
|
8602
|
+
"target",
|
|
8603
|
+
"src",
|
|
8604
|
+
"srcset",
|
|
8605
|
+
"alt",
|
|
8606
|
+
"title",
|
|
8607
|
+
"width",
|
|
8608
|
+
"height",
|
|
8609
|
+
"loading",
|
|
8610
|
+
"style",
|
|
8611
|
+
"align",
|
|
8612
|
+
"class",
|
|
8613
|
+
"id",
|
|
8614
|
+
"data-action"
|
|
8615
|
+
];
|
|
8616
|
+
const ALLOWED_URI_REGEXP = /^(?:(?:https?|ftp|mailto|tel):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;
|
|
9692
8617
|
var SanitizeService = class SanitizeService {
|
|
9693
8618
|
sanitizer;
|
|
9694
8619
|
constructor(sanitizer) {
|
|
9695
8620
|
this.sanitizer = sanitizer;
|
|
9696
|
-
this.
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
"*": [
|
|
9701
|
-
"style",
|
|
9702
|
-
"align",
|
|
9703
|
-
"class",
|
|
9704
|
-
"id",
|
|
9705
|
-
"data-action"
|
|
9706
|
-
]
|
|
9707
|
-
}
|
|
9708
|
-
};
|
|
8621
|
+
this.purify = DOMPurify(window);
|
|
8622
|
+
this.purify.addHook("uponSanitizeAttribute", (_node, data) => {
|
|
8623
|
+
if (data.attrName === "src" && /^\s*data:/i.test(data.attrValue)) data.keepAttr = false;
|
|
8624
|
+
});
|
|
9709
8625
|
}
|
|
9710
8626
|
sanitizeHtml(html) {
|
|
9711
|
-
return
|
|
8627
|
+
return this.purify.sanitize(html ?? "", this.sanitizeOption);
|
|
9712
8628
|
}
|
|
9713
8629
|
sanitizeSafeHtml(html) {
|
|
9714
8630
|
return this.sanitizer.bypassSecurityTrustHtml(this.sanitizeHtml(html));
|
|
@@ -9719,7 +8635,13 @@ var SanitizeService = class SanitizeService {
|
|
|
9719
8635
|
toString(safeHtml) {
|
|
9720
8636
|
return this.sanitizer.sanitize(1, safeHtml) || "";
|
|
9721
8637
|
}
|
|
9722
|
-
|
|
8638
|
+
purify;
|
|
8639
|
+
sanitizeOption = {
|
|
8640
|
+
ALLOWED_TAGS,
|
|
8641
|
+
ALLOWED_ATTR,
|
|
8642
|
+
ALLOW_DATA_ATTR: false,
|
|
8643
|
+
ALLOWED_URI_REGEXP
|
|
8644
|
+
};
|
|
9723
8645
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
9724
8646
|
minVersion: "12.0.0",
|
|
9725
8647
|
version: "22.2.2",
|
|
@@ -9748,14 +8670,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
9748
8670
|
ctorParameters: () => [{ type: i1$1.DomSanitizer }]
|
|
9749
8671
|
});
|
|
9750
8672
|
var MimeService = class MimeService {
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
return (extensions ?? "").split(",").map((ext) => this.getMimeType(ext.trim())).filter((mime) => mime !== null).join(", ");
|
|
9754
|
-
}
|
|
9755
|
-
getMimeType(extension) {
|
|
9756
|
-
const ext = extension.startsWith(".") ? extension.slice(1) : extension;
|
|
9757
|
-
for (const [mimeType, info] of Object.entries(mimeDb)) if (info.extensions && info.extensions.includes(ext)) return mimeType;
|
|
9758
|
-
return null;
|
|
8673
|
+
getAccept(accept) {
|
|
8674
|
+
return (accept ?? "").split(",").map((token) => token.trim()).filter((token) => token.length > 0).map((token) => token.startsWith(".") || token.includes("/") ? token : `.${token}`).join(",");
|
|
9759
8675
|
}
|
|
9760
8676
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
9761
8677
|
minVersion: "12.0.0",
|
|
@@ -9781,8 +8697,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
9781
8697
|
decorators: [{
|
|
9782
8698
|
type: Injectable,
|
|
9783
8699
|
args: [{ providedIn: "root" }]
|
|
9784
|
-
}]
|
|
9785
|
-
ctorParameters: () => []
|
|
8700
|
+
}]
|
|
9786
8701
|
});
|
|
9787
8702
|
var AutoFocusService = class AutoFocusService {
|
|
9788
8703
|
map = /* @__PURE__ */ new WeakMap();
|
|
@@ -9842,7 +8757,6 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
9842
8757
|
languageService;
|
|
9843
8758
|
global;
|
|
9844
8759
|
formService;
|
|
9845
|
-
grid;
|
|
9846
8760
|
sirioGrid;
|
|
9847
8761
|
chart;
|
|
9848
8762
|
dialog;
|
|
@@ -9858,12 +8772,10 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
9858
8772
|
identity;
|
|
9859
8773
|
identityIndex;
|
|
9860
8774
|
disableAutoFocus;
|
|
9861
|
-
static useDataGrid = true;
|
|
9862
|
-
useDataGrid = DynamicFieldsComponent.useDataGrid;
|
|
9863
8775
|
Texts = Texts;
|
|
9864
8776
|
toastService = inject(ToastService);
|
|
9865
8777
|
announcer = inject(AnnouncerService);
|
|
9866
|
-
constructor(cdr, destroyRef, sanitizer, markdown, mime, programmability, validation, weak, register, metadata, languageService, global, formService,
|
|
8778
|
+
constructor(cdr, destroyRef, sanitizer, markdown, mime, programmability, validation, weak, register, metadata, languageService, global, formService, sirioGrid, chart, dialog, autoFocus, formBuilder, el) {
|
|
9867
8779
|
this.cdr = cdr;
|
|
9868
8780
|
this.destroyRef = destroyRef;
|
|
9869
8781
|
this.sanitizer = sanitizer;
|
|
@@ -9877,7 +8789,6 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
9877
8789
|
this.languageService = languageService;
|
|
9878
8790
|
this.global = global;
|
|
9879
8791
|
this.formService = formService;
|
|
9880
|
-
this.grid = grid;
|
|
9881
8792
|
this.sirioGrid = sirioGrid;
|
|
9882
8793
|
this.chart = chart;
|
|
9883
8794
|
this.dialog = dialog;
|
|
@@ -9927,13 +8838,15 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
9927
8838
|
evaluateNumber(value) {
|
|
9928
8839
|
return this.programmability.evaluateNumber(this.formGroup, value);
|
|
9929
8840
|
}
|
|
8841
|
+
isFieldRequired(component) {
|
|
8842
|
+
if (this.suppressRequiredIndicator) return false;
|
|
8843
|
+
const readOnly = this.readOnly || this.evaluateBoolean(component?.readonly);
|
|
8844
|
+
return !!component?.validate?.required && !readOnly;
|
|
8845
|
+
}
|
|
9930
8846
|
evaluateLabel(value, component) {
|
|
9931
8847
|
const label = this.asString(this.programmability.evaluateString(this.formGroup, value));
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
if (this.suppressRequiredIndicator) return label;
|
|
9935
|
-
const trimmed = label?.trim();
|
|
9936
|
-
return required && !readOnly && !!trimmed && !trimmed.endsWith("*") ? `${label}*` : label;
|
|
8848
|
+
if (!label || !this.isFieldRequired(component)) return label;
|
|
8849
|
+
return label.replace(/\s*\*\s*$/, "");
|
|
9937
8850
|
}
|
|
9938
8851
|
evaluateUrl(value) {
|
|
9939
8852
|
const url = this.programmability.evaluateString(this.formGroup, value);
|
|
@@ -10066,8 +8979,8 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10066
8979
|
sanitize(html) {
|
|
10067
8980
|
return this.sanitizer.sanitizeSafeHtml(html);
|
|
10068
8981
|
}
|
|
10069
|
-
|
|
10070
|
-
return this.mime.
|
|
8982
|
+
getAccept(accept) {
|
|
8983
|
+
return this.mime.getAccept(accept);
|
|
10071
8984
|
}
|
|
10072
8985
|
clickButton(component, event) {
|
|
10073
8986
|
if (component.click) this.evaluate(component.click, false);
|
|
@@ -10153,15 +9066,6 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10153
9066
|
const expression = this.chart.getDataExpression(component);
|
|
10154
9067
|
return this.programmability.evaluate(this.formGroup, expression);
|
|
10155
9068
|
}
|
|
10156
|
-
getGridOptions(component) {
|
|
10157
|
-
return this.weak.call(component, this.grid.getCacheKey(), () => this.grid.getOptions(component, this.formGroup));
|
|
10158
|
-
}
|
|
10159
|
-
getGridModules(component) {
|
|
10160
|
-
return this.weak.call(component, "getGridModules", () => this.grid.getModules());
|
|
10161
|
-
}
|
|
10162
|
-
onGridSelectionChanged(component, event) {
|
|
10163
|
-
this.grid.onSelectionChanged(component, this.formGroup, event);
|
|
10164
|
-
}
|
|
10165
9069
|
getSirioGrid(component) {
|
|
10166
9070
|
const columns = component.columns || this.evaluateWithHydratation(component.columnsExpression) || [];
|
|
10167
9071
|
return this.weak.call(component, this.sirioGrid.getCacheKey(), () => this.sirioGrid.getConfig(component, columns, this.formGroup), (config) => config.source === columns);
|
|
@@ -10496,10 +9400,9 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10496
9400
|
{ token: WeakService },
|
|
10497
9401
|
{ token: RegisterService },
|
|
10498
9402
|
{ token: MetadataService },
|
|
10499
|
-
{ token: i1$
|
|
9403
|
+
{ token: i1$3.LanguageService },
|
|
10500
9404
|
{ token: GlobalService },
|
|
10501
9405
|
{ token: FormService },
|
|
10502
|
-
{ token: GridService },
|
|
10503
9406
|
{ token: SirioGridService },
|
|
10504
9407
|
{ token: ChartService },
|
|
10505
9408
|
{ token: DialogService },
|
|
@@ -10529,16 +9432,15 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10529
9432
|
providers: [
|
|
10530
9433
|
RegisterService,
|
|
10531
9434
|
ProgrammabilityService,
|
|
10532
|
-
GridService,
|
|
10533
9435
|
SirioGridService,
|
|
10534
9436
|
ChartService,
|
|
10535
9437
|
provideSirioValidationPresenter(formPlayerValidationPresenter)
|
|
10536
9438
|
],
|
|
10537
9439
|
usesOnChanges: true,
|
|
10538
9440
|
ngImport: i0,
|
|
10539
|
-
template: "<div [ngClass]=\"getFormClass()\">\r\n <ng-container *ngFor=\"let row of rows\" [formGroup]=\"formGroup\">\r\n <div class=\"row field-set\">\r\n <ng-container *ngFor=\"let component of row.components\">\r\n <ng-container [ngSwitch]=\"component.type\">\r\n <div [ngClass]=\"getComponentClass(component)\"\r\n [style]=\"getComponentStyle(component)\"\r\n [ngAttrs]=\"getComponentAttrs(component)\"\r\n *ngIf=\"shouldRender(component)\">\r\n <div *ngIf=\"canShow(component)\">\r\n <!-- #region textfield -->\r\n <ng-container *ngSwitchCase=\"'textfield'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-textbox type=\"text\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [prefix]=\"evaluateString(component.appearance?.prefixAdorner) || ''\"\r\n [suffix]=\"evaluateString(component.appearance?.suffixAdorner) || ''\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textCase]=\"toTextCase(component.textCase)\"\r\n [maxlength]=\"evaluateNumber(component.maxLength)\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #textfield\r\n [register]=\"component\"\r\n [componentRef]=\"textfield\">\r\n </wm-sirio-textbox>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region select -->\r\n <ng-container *ngSwitchCase=\"'select'\" [formGroup]=\"resolvePath(component.path)\">\r\n @let selectValues = getSirioValues(component);\r\n @let selectOptions = selectValues.values$ | async;\r\n <!-- @wemake4u/form-controls: strict = the value must be one of the options (was the dropdown directive);\r\n searchable shows the selection in the search field (was prefillSearch).\r\n Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-select\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(selectOptions)\"\r\n [loading]=\"selectValues.state.loading\"\r\n [loadingText]=\"locale(Texts, 'Loading')\"\r\n [searchable]=\"component.searchable\"\r\n [strict]=\"true\"\r\n (optionSelected)=\"selectionChanged(component, $event)\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #select\r\n [register]=\"component\"\r\n [componentRef]=\"select\">\r\n </wm-sirio-select>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region taglist -->\r\n <ng-container *ngSwitchCase=\"'taglist'\" [formGroup]=\"resolvePath(component.path)\">\r\n @let taglistValues = getSirioValues(component);\r\n @let taglistOptions = taglistValues.values$ | async;\r\n <!-- @wemake4u/form-controls: multiple select with \"select all\" and the \"n selected\" summary\r\n (was the tag directive). Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-select\r\n multiple\r\n selectAll\r\n [selectAllLabel]=\"locale(Texts, 'SelectAll')\"\r\n [maxVisibleSelections]=\"component.maxVisibleTags\"\r\n [selectionSummary]=\"sirioSelectionSummary\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(taglistOptions)\"\r\n [loading]=\"taglistValues.state.loading\"\r\n [loadingText]=\"locale(Texts, 'Loading')\"\r\n [searchable]=\"component.searchable\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #taglist\r\n [register]=\"component\"\r\n [componentRef]=\"taglist\">\r\n </wm-sirio-select>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region number -->\r\n <ng-container *ngSwitchCase=\"'number'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-number\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [prefix]=\"evaluateString(component.appearance?.prefixAdorner) || ''\"\r\n [suffix]=\"evaluateString(component.appearance?.suffixAdorner) || ''\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [defaultValue]=\"evaluateNumber(component.defaultValue)\"\r\n [min]=\"evaluateNumber(component.minimum)\"\r\n [max]=\"evaluateNumber(component.maximum)\"\r\n [decimals]=\"evaluateNumber(component.decimalDigits)\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #number\r\n [register]=\"component\"\r\n [componentRef]=\"number\">\r\n </wm-sirio-number>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region datetime -->\r\n <ng-container *ngSwitchCase=\"'datetime'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: date 'yyyy-MM-dd', time 'HH:mm', date and time 'yyyy-MM-ddTHH:mm:ss'.\r\n min/max only limit the pickers (typed values outside are moved to the nearest limit).\r\n Errors/warnings come from the validation presenter. -->\r\n <ng-container [ngSwitch]=\"component.subtype\">\r\n <!-- #region date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <wm-sirio-date\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaDateLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'dateLabel'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [pickLevel]=\"component.pick || 'date'\"\r\n [min]=\"evaluateString(component.range?.min) || null\"\r\n [max]=\"evaluateString(component.range?.max) || null\"\r\n [hideOnFocus]=\"evaluateBoolean(component.hideOnFocus)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #date\r\n [register]=\"component\"\r\n [componentRef]=\"date\">\r\n </wm-sirio-date>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region time -->\r\n <ng-container *ngSwitchCase=\"'time'\">\r\n <wm-sirio-time\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaTimeLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'timeLabel'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [minuteStep]=\"component.timeInterval || 1\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #time\r\n [register]=\"component\"\r\n [componentRef]=\"time\">\r\n </wm-sirio-time>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region datetime -->\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <!-- fieldLabels: dateLabel above the date, timeLabel above the time (as before);\r\n completeParts: date only -> 00:00, time only -> today (was the dateTimeCoordinator). -->\r\n <wm-sirio-datetime\r\n valueType=\"iso-seconds\"\r\n fieldLabels\r\n completeParts\r\n [label]=\"evaluateLabel(locale(component, 'dateLabel'), component)\"\r\n [timeLabel]=\"evaluateString(locale(component, 'timeLabel'))\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [min]=\"evaluateString(component.range?.min) || null\"\r\n [max]=\"evaluateString(component.range?.max) || null\"\r\n [hideOnFocus]=\"evaluateBoolean(component.hideOnFocus)\"\r\n [minuteStep]=\"component.timeInterval || 1\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #datetime\r\n [register]=\"component\"\r\n [componentRef]=\"datetime\">\r\n </wm-sirio-datetime>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region checkbox -->\r\n <ng-container *ngSwitchCase=\"'checkbox'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: checkbox and toggle (subtype 'toggle'); the markdown label is projected\r\n inside the kit <label> as inline HTML. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-checkbox\r\n [toggle]=\"component.subtype === 'toggle'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #checkbox\r\n [register]=\"component\"\r\n [componentRef]=\"checkbox\"><span [innerHTML]=\"toInlineHTML(evaluateTemplate(locale(component, 'label')))\"></span></wm-sirio-checkbox>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region radio -->\r\n <ng-container *ngSwitchCase=\"'radio'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: radio buttons and chips (subtype 'chip'); markdown option labels are\r\n rendered inline inside the kit <label>. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-radio-group\r\n [chips]=\"component.subtype === 'chip'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(getValues(component) | async)\"\r\n [inline]=\"component.displayInline\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #radio\r\n [register]=\"component\"\r\n [componentRef]=\"radio\">\r\n <ng-template wmSirioOptionLabel let-option><span [innerHTML]=\"toInlineHTML(evaluateTemplate(option.label))\"></span></ng-template>\r\n </wm-sirio-radio-group>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region checklist -->\r\n <ng-container *ngSwitchCase=\"'checklist'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: checkbox list and chips (subtype 'chip'); markdown option labels are\r\n rendered inline inside the kit <label>. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-checklist\r\n [chips]=\"component.subtype === 'chip'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(getValues(component) | async)\"\r\n [inline]=\"component.displayInline\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #checklist\r\n [register]=\"component\"\r\n [componentRef]=\"checklist\">\r\n <ng-template wmSirioOptionLabel let-option><span [innerHTML]=\"toInlineHTML(evaluateTemplate(option.label))\"></span></ng-template>\r\n </wm-sirio-checklist>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region textarea -->\r\n <ng-container *ngSwitchCase=\"'textarea'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-textarea\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textCase]=\"toTextCase(component.textCase)\"\r\n [maxlength]=\"evaluateNumber(component.maxLength)\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #textarea\r\n [register]=\"component\"\r\n [componentRef]=\"textarea\">\r\n </wm-sirio-textarea>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region filepicker -->\r\n <ng-container *ngSwitchCase=\"'filepicker'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers);\r\n upload, delete and download of the stored files are handled by the control. -->\r\n <wm-sirio-file-upload class=\"w-100\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [buttonLabel]=\"evaluateString(locale(component, 'text')) || locale(Texts, 'Upload')\"\r\n [accept]=\"getMimeTypes(component.accept)\"\r\n [multiple]=\"evaluateBoolean(component.multiple)\"\r\n valueType=\"array\"\r\n details\r\n downloadable\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [instantUpload]=\"evaluateBoolean(component.instantUpload)\"\r\n [uploadHandler]=\"evaluate(component.uploadHandler)\"\r\n [deleteHandler]=\"evaluate(component.deleteHandler)\"\r\n [downloadHandler]=\"evaluate(component.downloadHandler)\"\r\n [removeLabel]=\"locale(Texts, 'Remove')\"\r\n [downloadLabel]=\"locale(Texts, 'Download')\"\r\n [uploadingLabel]=\"locale(Texts, 'Uploading')\"\r\n [deletingLabel]=\"locale(Texts, 'Deleting')\"\r\n [downloadingLabel]=\"locale(Texts, 'Downloading')\"\r\n [formControlName]=\"component.key\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n (filesAdded)=\"filesAdded($event, filepicker)\"\r\n (fileError)=\"fileError($event)\"\r\n #filepicker\r\n [register]=\"component\"\r\n [componentRef]=\"filepicker\">\r\n </wm-sirio-file-upload>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region range -->\r\n <ng-container *ngSwitchCase=\"'range'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-slider\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [min]=\"evaluateNumber(component.range?.min) ?? 0\"\r\n [max]=\"evaluateNumber(component.range?.max) ?? 0\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #range\r\n [register]=\"component\"\r\n [componentRef]=\"range\">\r\n </wm-sirio-slider>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region displayfield -->\r\n <ng-container *ngSwitchCase=\"'displayfield'\">\r\n <div class=\"display-field\"\r\n #displayfield\r\n [register]=\"component\"\r\n [componentRef]=\"displayfield\">\r\n <div *ngIf=\"component.label\" class=\"sirio-label\">\r\n {{ evaluateString(locale(component, 'label')) }}\r\n <!-- @wemake4u/form-controls: kit info button with popover, as next to the labels of the controls. -->\r\n <wm-sirio-info-button *ngIf=\"component.tooltip\"\r\n [content]=\"evaluateString(locale(component, 'tooltip'))\"\r\n [title]=\"evaluateString(locale(component, 'label'))\"\r\n [label]=\"locale(Texts, 'InformationAbout') + ' ' + evaluateString(locale(component, 'ariaLabel') || locale(component, 'label'))\"></wm-sirio-info-button>\r\n </div>\r\n <div [class.sirio-form-control]=\"component.fieldtype !== 'filelist'\"\r\n [style.text-align]=\"component.fieldtype !== 'filelist' ? (component.textAlign || null) : null\"\r\n class=\"data-display\" [ngClass]=\"component.fieldtype\">\r\n <ng-container [ngSwitch]=\"component.fieldtype\">\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <ng-container *ngTemplateOutlet=\"formattedTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'filelist'\">\r\n <ng-container *ngTemplateOutlet=\"filelistTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"defaultTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #checkboxTemplate>\r\n <i *ngIf=\"evaluate(component.expression)\" class=\"fas fa-check\"></i>\r\n </ng-template>\r\n <ng-template #defaultTemplate>\r\n <ng-container *ngIf=\"supportValues(component) && hasValues(component); else simpleTemplate\">\r\n <ng-container *ngIf=\"getValues(component) | async as values\">\r\n {{ toLabel(evaluate(component.expression), values) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #simpleTemplate>\r\n {{ evaluate(component.expression) }}\r\n </ng-template>\r\n <ng-template #formattedTemplate>\r\n <div class=\"text-paragraph\" style=\"margin-top: -6px;\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(component.expression))\">\r\n </div>\r\n </ng-template>\r\n <ng-template #filelistTemplate>\r\n <ng-container *ngIf=\"{ files: evaluate(component.expression) } as expr\"\r\n fileHandler\r\n #fileHandlerRef=\"fileHandler\"\r\n [downloadHandler]=\"evaluate(component.downloadHandler)\">\r\n <ng-container *ngIf=\"expr.files?.length > 0\">\r\n <div *ngFor=\"let file of expr.files\" class=\"row w-100 p-3 g-0 sirio-bg-primary-light-40 sirio-text-secondary mt-1\">\r\n <div class=\"col-auto ms-auto\">\r\n <span [ngClass]=\"fileHandlerRef.getIcon(file)\" class=\"fas fa-24 mt-1 me-3 ms-1\" aria-hidden=\"true\"></span>\r\n </div>\r\n <div class=\"col\">\r\n <p class=\"mb-0\"><span class=\"h6 sirio-text-link sirio-font-weight-700\">{{ file.name }}</span></p>\r\n {{ fileHandlerRef.getExtension(file) }}, {{ fileHandlerRef.getSize(file) }}\r\n </div>\r\n <div class=\"col-auto ms-auto d-lg-flex flex-column align-items-end\">\r\n <ng-container *ngIf=\"fileHandlerRef.canDownload(file)\">\r\n <div *ngIf=\"fileHandlerRef.isDownloading(file)\" class=\"mt-2\">\r\n <span class=\"d-none d-sm-inline-block\">{{ locale(Texts, 'Downloading') }}</span>\r\n <span class=\"fas fa-arrows-rotate fa-spin ms-2\" aria-hidden=\"true\"></span>\r\n </div>\r\n <!-- Buttons, not links: announced as buttons, activated also with Space. -->\r\n <button *ngIf=\"fileHandlerRef.isLocal(file)\"\r\n type=\"button\"\r\n class=\"sirio-text-link fp-link-button\"\r\n (click)=\"fileHandlerRef.downloadLocal(file)\"\r\n [attr.aria-label]=\"locale(Texts, 'Download') + ' ' + file.name\"\r\n [attr.title]=\"locale(Texts, 'Download') + ' ' + file.name\">\r\n <span class=\"d-none d-sm-inline-block\">\r\n {{ locale(Texts, 'Download') }}\r\n </span>\r\n <span class=\"fas fa-download ms-2\" aria-hidden=\"true\"></span>\r\n </button>\r\n <button *ngIf=\"fileHandlerRef.isHandled(file)\"\r\n type=\"button\"\r\n class=\"sirio-text-link fp-link-button\"\r\n (click)=\"fileHandlerRef.downloadHandled(file)\"\r\n [attr.aria-label]=\"locale(Texts, 'Download') + ' ' + file.name\"\r\n [attr.title]=\"locale(Texts, 'Download') + ' ' + file.name\">\r\n <span class=\"d-none d-sm-inline-block\">{{ locale(Texts, 'Download') }}</span>\r\n <span class=\"fas fa-download ms-2\" aria-hidden=\"true\"></span>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!(expr.files?.length > 0)\">\r\n <div class=\"row p-3 g-0 sirio-bg-primary-light-40 sirio-text-secondary mt-1\">\r\n <div class=\"col\">\r\n <p class=\"mb-0\">\r\n <span class=\"h6 sirio-text-link sirio-font-weight-700\">Nessun file presente</span>\r\n </p>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </div>\r\n <p *ngIf=\"component.description\" class=\"sirio-form-text-help\">\r\n {{ evaluateString(locale(component, 'description')) }}\r\n </p>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region dynamiclist -->\r\n <ng-container *ngSwitchCase=\"'dynamiclist'\">\r\n <ng-container *ngIf=\"resolvePath(component.path) as formGroup\">\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- data-fp-repeater: root of the repeater, where the focus goes after add / remove / move. -->\r\n <div [formArrayName]=\"component.key\"\r\n data-fp-repeater\r\n [formGroup]=\"formGroup\"\r\n [recursion]=\"component\"\r\n #recursion=\"recursion\">\r\n <p *ngIf=\"component.description\">{{ evaluateString(locale(component, 'description')) }}</p>\r\n <ng-container *ngIf=\"getFormArray(resolvePath(component.path).get(component.key)) as formArray\">\r\n <ng-template navigatorState\r\n [total]=\"formArray.controls.length\"\r\n #state=\"navigatorState\"></ng-template>\r\n <ng-container *ngIf=\"component.subtype == 'navigation'\">\r\n <ng-container *ngTemplateOutlet=\"navigation; context: { formArray: formArray, state: state }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"formArray.controls.length > 0\">\r\n <ng-container [ngSwitch]=\"component.subtype\">\r\n <!-- #region tab -->\r\n <ng-container *ngSwitchCase=\"'tab'\">\r\n <!-- @wemake4u/form-controls: activateAdded selects the added tab (after a removal the library selects the one\r\n taking its place); focusContent moves the focus to the first field of the panel. -->\r\n <div [register]=\"component\"\r\n [componentRef]=\"tabInstance\">\r\n <wm-sirio-tabs [scrollLeftLabel]=\"locale(Texts, 'ScrollLeft')\"\r\n [scrollRightLabel]=\"locale(Texts, 'ScrollRight')\"\r\n [focusablePanels]=\"false\"\r\n activateAdded\r\n focusContent\r\n #tabInstance>\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <wm-sirio-tab [label]=\"evaluateWithEventAsString(locale(component, 'label'), event)\"\r\n [badge]=\"evaluateWithEvent(component.badge, event)\">\r\n <ng-template wmSirioTabContent>\r\n <div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </wm-sirio-tab>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-tabs>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region accordion -->\r\n <ng-container *ngSwitchCase=\"'accordion'\">\r\n <!-- @wemake4u/form-controls: activateAdded opens the first section at the start and the added one (after a removal\r\n the library opens the one taking its place); focusContent moves the focus to its first field. -->\r\n <div [register]=\"component\"\r\n [componentRef]=\"dynamiclistaccordion\">\r\n <wm-sirio-accordion exclusive\r\n activateAdded\r\n focusContent\r\n #dynamiclistaccordion>\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <wm-sirio-accordion-item [title]=\"evaluateWithEventAsString(locale(component, 'label'), event)\"\r\n [badge]=\"evaluateWithEvent(component.badge, event)\">\r\n <ng-template wmSirioAccordionContent>\r\n <div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </wm-sirio-accordion-item>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-accordion>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region table -->\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div #dynamiclist\r\n [register]=\"component\"\r\n [componentRef]=\"dynamiclist\">\r\n <table class=\"dynamiclist-table\" [ngClass]=\"{ 'main': recursionLevel == 0 }\">\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"getFormGroup(item) as formItem\">\r\n <ng-container *ngIf=\"{ itemsArray: recursion.getItemsArray(formItem) } as recursionData\">\r\n <tr>\r\n <td class=\"content-cell\">\r\n <div [ngClass]=\"{'group-outline': component.showOutline === true && component.subtype !== 'table', 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"formItem\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </td>\r\n <td class=\"command-cell\">\r\n <div>\r\n <ng-container *ngIf=\"recursionData.itemsArray\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: recursionData.itemsArray, compact: true }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsReorder; context: { formArray: formArray, i: i, compact: true }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i, compact: true }\"></ng-container>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"recursionData.itemsArray && recursionData.itemsArray.length > 0\">\r\n <td colspan=\"2\" class=\"recursion-cell\">\r\n <div class=\"layout\">\r\n <div class=\"recursion-toggle\">\r\n <!-- @wemake4u/form-controls: open at the start (as before); label for screen readers. -->\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n [wmSirioCollapseToggle]=\"collapse\"\r\n iconOnly\r\n [icon]=\"collapse.expanded() ? 'fa-chevron-down' : 'fa-chevron-right'\"\r\n [label]=\"recursionData.itemsArray.length + ' elementi presenti'\"></button>\r\n </div>\r\n <div *ngIf=\"!collapse.expanded()\" class=\"recursion-title\">\r\n <div class=\"recursion-text\">\r\n {{ recursionData.itemsArray.length }} elementi presenti\r\n </div>\r\n </div>\r\n <div class=\"recursion-content\">\r\n <div wmSirioCollapse #collapse=\"wmSirioCollapse\" [expanded]=\"true\">\r\n <div *ngIf=\"collapse.expanded()\" style=\"margin-bottom: -11px;\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"recursion.getFormGroup(formItem)\"\r\n [readOnly]=\"readOnly\"\r\n [recursionLevel]=\"recursionLevel+1\"\r\n [rows]=\"recursion.getComponentRows()\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region navigation -->\r\n <ng-container *ngSwitchCase=\"'navigation'\">\r\n <div>\r\n <ng-container *ngIf=\"formArray.controls[state.index] as item\">\r\n <div [ngClass]=\"{'group-outline': component.showOutline === true, 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: state.index } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region default -->\r\n <ng-container *ngSwitchDefault>\r\n <div #dynamiclist\r\n [register]=\"component\"\r\n [componentRef]=\"dynamiclist\"\r\n selectionGroup\r\n [selectionMode]=\"evaluateString(component.selection?.mode)\"\r\n [selectableClass]=\"evaluateString(component.selection?.selectableClass)\"\r\n [selectedClass]=\"evaluateString(component.selection?.selectedClass)\"\r\n [onSelectionChanged]=\"callExpression(component.selection?.selectionChanged)\">\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <div [selectionItem]=\"item\"\r\n [ngClass]=\"{'group-outline': component.showOutline === true, 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <ng-container *ngIf=\"component.allowAddRemove || component.allowReorder\">\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsReorder; context: { formArray: formArray, i: i }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"formArray.controls.length == 0\">\r\n <div class=\"dynamiclist-no-data\">{{ evaluateString(locale(component, 'noDataText')) || locale(Texts, 'NoData') }}</div>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"feedback\"></ng-container>\r\n <ng-container *ngIf=\"recursionLevel == 0 && component.subtype !== 'navigation'\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: formArray, state: state }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #region templates -->\r\n <ng-template #btnMoveUp let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"locale(Texts, 'MoveUp') as upLabel\">\r\n <!-- Name with the position (\"Sposta Sù elemento 3 di 5\"): the visible text first, the rest for screen readers. -->\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"moveUpItem(formArray, i, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"up\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-arrow-up\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"upLabel + ' ' + itemPosition(i, formArray.length)\">{{ upLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnMoveDown let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"locale(Texts, 'MoveDown') as downLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"moveDownItem(formArray, i, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"down\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-arrow-down\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"downLabel + ' ' + itemPosition(i, formArray.length)\">{{ downLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnRemove let-formArray=\"formArray\" let-state=\"state\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'removeLabel') || locale(Texts, 'RemoveItem')) as removeLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"removeItem(formArray, i, true, state, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"remove\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-trash\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"removeLabel + ' ' + itemPosition(i, formArray.length)\">{{ removeLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnAdd let-formArray=\"formArray\" let-state=\"state\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'addLabel') || locale(Texts, 'AddItem')) as addLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"addItem(formArray, state)\"\r\n data-fp-action=\"add\"\r\n class=\"add-item\"\r\n icon=\"fa-plus\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"addLabel\">{{ addLabel }}</button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsReorder let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowReorder\">\r\n <ng-container *ngTemplateOutlet=\"btnMoveUp; context: { formArray: formArray, i: i, compact: compact }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"btnMoveDown; context: { formArray: formArray, i: i, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsRemove let-formArray=\"formArray\" let-state=\"state\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.removeCondition, { item: formArray.at(i)?.value, index: i, total: state.total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnRemove; context: { formArray: formArray, state: state, i: i, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsAdd let-formArray=\"formArray\" let-state=\"state\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.addCondition, { total: state.total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnAdd; context: { formArray: formArray, state: state, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #feedback>\r\n <ng-container *ngIf=\"getTextFeedback(component) as textFeedback\">\r\n <div>\r\n <span class=\"sirio-form-feedback d-block sirio-text-danger\">{{textFeedback}}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'description')) as textHelp\">\r\n <div>\r\n <p class=\"sirio-form-text-help\">{{textHelp}}</p>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #navigation let-formArray=\"formArray\" let-state=\"state\">\r\n <!-- @wemake4u/form-controls: item navigator (page = element, 1-based); the actions are projected at the end of the row. -->\r\n <wm-sirio-pagination [showItems]=\"false\"\r\n [pageSize]=\"1\"\r\n [total]=\"state.total\"\r\n [page]=\"state.index + 1\"\r\n (pageChange)=\"state.index = $event - 1\"\r\n [ariaLabel]=\"locale(Texts, 'ElementsNavigation')\"\r\n [ofLabel]=\"locale(Texts, 'Of')\"\r\n [pagesLabel]=\"locale(Texts, 'Elements')\"\r\n [pageLabel]=\"locale(Texts, 'Element')\"\r\n [goToPageLabel]=\"locale(Texts, 'GoToElement')\"\r\n [previousLabel]=\"locale(Texts, 'PreviousElement')\"\r\n [nextLabel]=\"locale(Texts, 'NextElement')\">\r\n <div class=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: formArray, state: state }\"></ng-container>\r\n <ng-container *ngIf=\"state.total && state.index != -1\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: state.index }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </wm-sirio-pagination>\r\n </ng-template>\r\n <!-- #endregion -->\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region group -->\r\n <ng-container *ngSwitchCase=\"'group'\">\r\n <div *ngIf=\"resolveBoundGroup(component) as resolvedGroup\"\r\n [ngClass]=\"getGroupOutline(component)\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'label')) as labelText\">\r\n <label>{{ labelText }}</label>\r\n </ng-container>\r\n <div #group\r\n [register]=\"component\"\r\n [componentRef]=\"group\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvedGroup\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region tab -->\r\n <ng-container *ngSwitchCase=\"'tab'\">\r\n <ng-container *ngIf=\"(getPanels(component) | async) as panels\">\r\n <ng-container *ngIf=\"panels.length > 0\">\r\n <!-- @wemake4u/form-controls: focusContent moves the focus into the panel shown at the start or selected (not for the\r\n arrow keys), except for the panels with disableAutoFocus. -->\r\n <wm-sirio-tabs #tabInstance\r\n [register]=\"component\"\r\n [componentRef]=\"tabInstance\"\r\n [scrollLeftLabel]=\"locale(Texts, 'ScrollLeft')\"\r\n [scrollRightLabel]=\"locale(Texts, 'ScrollRight')\"\r\n [line]=\"!!component.navigation\"\r\n [vertical]=\"!!component.vertical\"\r\n [focusablePanels]=\"false\"\r\n focusContent>\r\n <ng-container *ngFor=\"let panel of panels; let i = index;\">\r\n <wm-sirio-tab *ngIf=\"evaluateConditional(panel.conditional)\"\r\n [label]=\"evaluateString(locale(panel, 'label'))\"\r\n [icon]=\"evaluateString(panel.icon) || null\"\r\n [disabled]=\"evaluateBoolean(panel.disabled) ?? false\"\r\n [badge]=\"evaluate(panel.badge)\"\r\n [focusContent]=\"panel.disableAutoFocus !== true\">\r\n <ng-template wmSirioTabContent>\r\n <ng-container *ngIf=\"getTemplate(panel.template) as template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvePath(panel.path)\"\r\n [rows]=\"template.rows\"\r\n [identity]=\"component.id\"\r\n [identityIndex]=\"i\"\r\n [readOnly]=\"readOnly || evaluateBoolean(panel.readonly)\"\r\n [disableAutoFocus]=\"template.disableAutoFocus\"\r\n [alignment]=\"template.verticalAlignment\"></app-dynamic-fields>\r\n </ng-container>\r\n </ng-template>\r\n </wm-sirio-tab>\r\n </ng-container>\r\n </wm-sirio-tabs>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region accordion -->\r\n <ng-container *ngSwitchCase=\"'accordion'\">\r\n <ng-container *ngIf=\"(getPanels(component) | async) as panels\">\r\n <ng-container *ngIf=\"panels.length > 0\">\r\n <!-- exclusive: one section open at a time, as with ngx-sirio-lib. -->\r\n <wm-sirio-accordion exclusive\r\n #accordion\r\n [register]=\"component\"\r\n [componentRef]=\"accordion\">\r\n <ng-container *ngFor=\"let panel of panels; let i = index;\">\r\n <ng-container *ngIf=\"resolvePath(panel.path) as formGroup\">\r\n <!-- Content not lazy (as before): the fields of closed sections stay in the form. -->\r\n <wm-sirio-accordion-item *ngIf=\"evaluateConditional(panel.conditional)\"\r\n [title]=\"evaluateString(locale(panel, 'label'))\"\r\n [badge]=\"evaluate(panel.badge)\"\r\n [disabled]=\"evaluateBoolean(panel.disabled)\">\r\n <ng-container *ngIf=\"getTemplate(panel.template) as template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"formGroup\"\r\n [readOnly]=\"readOnly || evaluateBoolean(panel.readonly)\"\r\n [rows]=\"template.rows\"\r\n [identity]=\"component.id\"\r\n [identityIndex]=\"i\"\r\n [disableAutoFocus]=\"template.disableAutoFocus\"\r\n [alignment]=\"template.verticalAlignment\"></app-dynamic-fields>\r\n </ng-container>\r\n </wm-sirio-accordion-item>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-accordion>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region text -->\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [collapse]=\"component.collapseTo\"\r\n [onCollapse]=\"callExpression(component.onCollapse)\"\r\n [onExpand]=\"callExpression(component.onExpand)\"\r\n #text\r\n [register]=\"component\"\r\n [componentRef]=\"text\">\r\n <!--Reset View Context-->\r\n <div tabindex=\"0\" style=\"display:none\"></div>\r\n <div class=\"flex\">\r\n <div class=\"text-paragraph\" markdown\r\n [onAnchorClick]=\"callExpression(component.anchorClick)\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n <ng-container *ngIf=\"component.tooltip\">\r\n <wm-sirio-info-button [content]=\"tooltipTemplate\"\r\n [label]=\"locale(Texts, 'Information')\"></wm-sirio-info-button>\r\n <ng-template #tooltipTemplate>\r\n <div class=\"sirio-tooltip-body\">\r\n <div class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'tooltip')))\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region html -->\r\n <ng-container *ngSwitchCase=\"'html'\">\r\n <div class=\"html-paragraph\"\r\n [innerHTML]=\"sanitize(evaluateTemplate(locale(component, 'content')))\"\r\n #html\r\n [register]=\"component\"\r\n [componentRef]=\"html\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <!-- || '': an alt expression giving null would be read aloud as \"null\". -->\r\n <img [src]=\"evaluateString(component.source)\"\r\n [alt]=\"evaluateString(locale(component, 'alt')) || ''\"\r\n style=\"width: 100%;height: 100%;\"\r\n #image\r\n [register]=\"component\"\r\n [componentRef]=\"image\">\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region table -->\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <label *ngIf=\"evaluateString(locale(component, 'label')) as tableLabel\">{{ tableLabel }}</label>\r\n @if (useDataGrid) {\r\n <!-- Sirio data grid (DynamicFieldsComponent.useDataGrid): configuration from SirioGridService. -->\r\n @let grid = getSirioGrid(component);\r\n @let rows = getSirioRows(component, grid);\r\n <!-- Paginator with rowCount > 0, or when the server source pages its rows. -->\r\n @let pagedSize = grid.pageable ? null : rows.pagedSize();\r\n @let gridHeight = component.autoHeight ? null : evaluateSize(component.height);\r\n <wm-sirio-data-grid #table\r\n class=\"fp-data-grid\"\r\n variant=\"dark\"\r\n size=\"sm\"\r\n [filterButton]=\"component.floatingFilter === true ? 'always' : 'none'\"\r\n [showFilterChips]=\"false\"\r\n paginationVariant=\"compact\"\r\n [caption]=\"evaluateString(locale(component, 'label'))\"\r\n [data]=\"rows.data()\"\r\n [dataSource]=\"rows.dataSource\"\r\n [loading]=\"rows.loading()\"\r\n [emptyText]=\"rows.failed() ? locale(Texts, 'LoadingFailed') : 'Nessun risultato'\"\r\n [loadErrorText]=\"locale(Texts, 'LoadingFailed')\"\r\n [rowId]=\"grid.rowId\"\r\n [selection]=\"sirioSelection(component)\"\r\n singleSelectionControl=\"checkbox\"\r\n [selectionColumn]=\"grid.checkboxes\"\r\n [selectOnRowClick]=\"grid.checkboxes && grid.clickSelect\"\r\n selectAll=\"filtered\"\r\n hideUnselectable\r\n [rowSelectable]=\"grid.rowSelectable\"\r\n [selected]=\"grid.selected()\"\r\n (selectedChange)=\"onSirioSelectionChanged(component, grid, $event)\"\r\n [rowClass]=\"grid.rowClass\"\r\n [rowStyle]=\"grid.rowStyle\"\r\n [pageable]=\"grid.pageable || pagedSize !== null\"\r\n [pageSize]=\"pagedSize ?? grid.pageSize\"\r\n [pageSizeOptions]=\"sirioPageSizes(pagedSize)\"\r\n [rowNumbers]=\"grid.rowNumbers\"\r\n rowNumberHeader=\"#\"\r\n [resizable]=\"grid.resizable\"\r\n [reorderable]=\"grid.reorderable\"\r\n filterOperators\r\n [filterRow]=\"component.floatingFilter === true\"\r\n [filterYesLabel]=\"locale(Texts, 'True')\"\r\n [filterNoLabel]=\"locale(Texts, 'False')\"\r\n [height]=\"gridHeight\"\r\n [stickyHeader]=\"!!gridHeight\"\r\n [minHeight]=\"evaluateSize(component.minHeight)\"\r\n [refresh]=\"refreshRowSource(component)\"\r\n [register]=\"component\"\r\n [componentRef]=\"table\">\r\n @for (col of grid.columns; track col.id) {\r\n <wm-sirio-grid-column [field]=\"col.field\"\r\n [header]=\"col.header\"\r\n [value]=\"col.value\"\r\n [format]=\"col.format\"\r\n [align]=\"col.align\"\r\n [filter]=\"col.filter\"\r\n [filterOptions]=\"col.filterOptions\"\r\n [filterMultiple]=\"col.filterMultiple\"\r\n [filterOperators]=\"col.filterOperators\"\r\n [sortable]=\"col.sortable\"\r\n [resizable]=\"col.resizable\"\r\n [wrap]=\"col.wrap\"\r\n [mono]=\"col.mono\"\r\n [fit]=\"col.fit\"\r\n [fixed]=\"col.fixed\"\r\n [flex]=\"col.flex\"\r\n [width]=\"col.width\"\r\n [minWidth]=\"col.minWidth\"\r\n [maxWidth]=\"col.maxWidth\"\r\n [group]=\"col.group\"\r\n [hidden]=\"col.actions && evaluateBoolean(component.suppressActions) === true\"\r\n [cellClass]=\"col.cellClass\"\r\n [cellStyle]=\"col.cellStyle\"\r\n [headerClass]=\"col.headerClass\"\r\n [headerStyle]=\"col.headerStyle\">\r\n @if (col.renderer; as renderer) {\r\n <ng-template wmSirioGridCell let-row let-value=\"value\" let-index=\"index\">\r\n @if (renderer.kind === 'html') {\r\n <span [innerHTML]=\"renderer.html(row, value)\"></span>\r\n } @else {\r\n <fp-sirio-cell-host [renderer]=\"renderer.type\" [params]=\"renderer.params(row, value, index)\" />\r\n }\r\n </ng-template>\r\n }\r\n </wm-sirio-grid-column>\r\n }\r\n </wm-sirio-data-grid>\r\n } @else {\r\n <ag-grid-angular [modules]=\"getGridModules(component)\"\r\n [gridOptions]=\"getGridOptions(component)\"\r\n [selectable]=\"evaluateBoolean(component.selectable)\"\r\n [multiSelect]=\"evaluateBoolean(component.multiSelect)\"\r\n (selectionChanged)=\"onGridSelectionChanged(component, $event)\"\r\n [suppressActions]=\"evaluateBoolean(component.suppressActions)\"\r\n [columns]=\"component.columns || evaluateWithHydratation(component.columnsExpression) || []\"\r\n [rowSource]=\"getRowSource(component)\"\r\n [refresh]=\"refreshRowSource(component)\"\r\n [style.height]=\"component.autoHeight ? null : evaluateSize(component.height)\"\r\n [style.min-height]=\"evaluateSize(component.minHeight)\"\r\n [formGroup]=\"formGroup\"\r\n #table\r\n [register]=\"component\"\r\n [componentRef]=\"table\" />\r\n }\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region button -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: color \"ghost\" = plain sirio-btn; icon on the left unless iconPosition \"right\". -->\r\n <button type=\"button\"\r\n [wmSirioButton]=\"evaluateVariant(component.color)\"\r\n [disabled]=\"evaluateBoolean(component.disabled) ?? false\"\r\n [icon]=\"evaluateString(component.icon) || null\"\r\n [iconPosition]=\"component.iconPosition == 'right' ? 'end' : 'start'\"\r\n (click)=\"clickButton(component, $event)\"\r\n #button\r\n [register]=\"component\"\r\n [componentRef]=\"button\">{{ evaluateString(locale(component, 'label')) }}</button>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region separator -->\r\n <ng-container *ngSwitchCase=\"'separator'\">\r\n <div class=\"separator\"\r\n #separator\r\n [register]=\"component\"\r\n [componentRef]=\"separator\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region spacer -->\r\n <ng-container *ngSwitchCase=\"'spacer'\">\r\n <div style=\"width: 100%\"\r\n [style.height.px]=\"component.height\"\r\n #spacer\r\n [register]=\"component\"\r\n [componentRef]=\"spacer\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region iframe -->\r\n <ng-container *ngSwitchCase=\"'iframe'\">\r\n <label [for]=\"component.id\">{{ evaluateString(locale(component, 'label')) }}</label>\r\n <iframe [src]=\"evaluateUrl(component.url)\"\r\n [title]=\"evaluateString(locale(component, 'label'))\"\r\n [style.width]=\"'100%'\"\r\n [style.height.px]=\"component.height\"\r\n [frameSecurity]=\"component.security\"\r\n #iframe\r\n [register]=\"component\"\r\n [componentRef]=\"iframe\">\r\n </iframe>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region alert -->\r\n <ng-container *ngSwitchCase=\"'alert'\">\r\n <!-- @wemake4u/form-controls: preventClose → no close button; markdown as block content. -->\r\n <wm-sirio-alert [type]=\"component.role || 'info'\"\r\n [closeLabel]=\"locale(Texts, 'Close')\"\r\n [dismissible]=\"!evaluateBoolean(component.preventClose)\"\r\n #alert\r\n [register]=\"component\"\r\n [componentRef]=\"alert\">\r\n <div wmSirioAlertContent\r\n class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </wm-sirio-alert>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region notice -->\r\n <ng-container *ngSwitchCase=\"'notice'\">\r\n <!-- @wemake4u/form-controls: light notice (kit default); markdown as block content. -->\r\n <wm-sirio-notify #notice\r\n [title]=\"evaluateString(locale(component, 'title'))\"\r\n [register]=\"component\"\r\n [componentRef]=\"notice\">\r\n <div wmSirioNotifyContent\r\n class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </wm-sirio-notify>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region tooltip -->\r\n <ng-container *ngSwitchCase=\"'tooltip'\">\r\n <!-- @wemake4u/form-controls: the title is the popover title of the kit. -->\r\n <wm-sirio-info-button [content]=\"tooltipTemplate\"\r\n [title]=\"evaluateString(locale(component, 'title'))\"\r\n [label]=\"evaluateString(locale(component, 'title')) || locale(Texts, 'Information')\"\r\n #tooltip\r\n [register]=\"component\"\r\n [componentRef]=\"tooltip\"></wm-sirio-info-button>\r\n <ng-template #tooltipTemplate>\r\n <div class=\"sirio-tooltip-body\">\r\n <div class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region chart -->\r\n <ng-container *ngSwitchCase=\"'chart'\">\r\n <label>{{ evaluateString(locale(component, 'label')) }}</label>\r\n <ng-container [observe]=\"getChartData(component)\"\r\n [callback]=\"invalidateChart(component)\">\r\n <ag-charts [options]=\"(getChartOptions(component) | async) ?? {}\"\r\n [style.height.px]=\"component.height\"\r\n #chart\r\n [register]=\"component\"\r\n [componentRef]=\"chart\" />\r\n </ng-container> \r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region component -->\r\n <ng-container *ngSwitchCase=\"'component'\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'label')) as labelText\">\r\n <label>{{ labelText }}</label>\r\n </ng-container>\r\n <ng-container *ngIf=\"component.isInput; else noInputTemplate\">\r\n <app-dynamic-host [properties]=\"getFeelableProperties(component)\"\r\n [formGroup]=\"resolvePath(component.path)\"\r\n #componentHost\r\n [register]=\"component\"\r\n [componentRef]=\"componentHost\" />\r\n <ng-container *ngIf=\"getTextFeedback(component) as textFeedback\">\r\n <span class=\"sirio-form-feedback d-block sirio-text-danger\">{{textFeedback}}</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'description')) as textHelp\">\r\n <p class=\"sirio-form-text-help\">{{textHelp}}</p>\r\n </ng-container>\r\n <ng-template #noInputTemplate>\r\n <app-dynamic-host [properties]=\"getFeelableProperties(component)\"\r\n #componentHost\r\n [register]=\"component\"\r\n [componentRef]=\"componentHost\" />\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region templatehost -->\r\n <ng-container *ngSwitchCase=\"'templatehost'\">\r\n <ng-container *ngIf=\"getTemplate(component.template) as template\">\r\n <div #template\r\n [register]=\"component\"\r\n [componentRef]=\"template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvePath(component.path)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"template?.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region treelist -->\r\n <ng-container *ngSwitchCase=\"'treelist'\">\r\n <label>{{ evaluateString(locale(component, 'label')) }}</label>\r\n <div class=\"treelist\"\r\n [style.height]=\"component.height ? evaluateSize(component.height): null\"\r\n *ngIf=\"getTreeColumns(component) as columns\">\r\n <ng-container *ngIf=\"((getTreeSource(component) | async) ?? []) as rows\">\r\n <table #treelist\r\n [register]=\"component\"\r\n [componentRef]=\"treelist\"\r\n [treelist]=\"rows\">\r\n <colgroup>\r\n <col *ngFor=\"let column of columns\"\r\n [style.width]=\"evaluateSize(column.width)\">\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n <th scope=\"col\" *ngFor=\"let column of columns\"\r\n [ngClass]=\"getClass(column)\"\r\n [style.text-align]=\"column.align\">\r\n {{column.label}}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container>\r\n <tr *ngFor=\"let row of rows\"\r\n [attr.data-id]=\"row.id\"\r\n [attr.data-parent]=\"row.parentId\"\r\n [attr.data-expanded]=\"row.expanded ? 'true': 'false'\"\r\n [ngClass]=\"row.meta?.['cssClass']\">\r\n <td *ngFor=\"let column of columns; let i = index\"\r\n [ngClass]=\"getClass(column)\">\r\n <div [style.justify-content]=\"getJustify(column.align)\">\r\n <span *ngIf=\"i==component.expanderColumn\"\r\n [style.visibility]=\"row.hasChildren ? 'visible' : 'hidden'\"\r\n [style.padding-left]=\"evaluateSize(20 * row.level)\"\r\n class=\"toggle\"></span>\r\n <span class=\"text\"\r\n [title]=\"row.data[column.key]\">\r\n {{ row.data[column.key] }}\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region navigator -->\r\n <ng-container *ngSwitchCase=\"'navigator'\">\r\n <div #navigator\r\n [register]=\"component\"\r\n [componentRef]=\"navigator\">\r\n <div navigatorState\r\n [index]=\"evaluateNumber(component.index) ?? 0\"\r\n [total]=\"evaluateNumber(component.total) ?? 0\"\r\n (indexChange)=\"evaluateWithEventAsHandler(component.selectionChanged, { index: $event, count: state.total })\"\r\n #state=\"navigatorState\">\r\n <!-- @wemake4u/form-controls: item navigator (page = element, 1-based); the actions are projected at the end of the row. -->\r\n <wm-sirio-pagination [showItems]=\"false\"\r\n [pageSize]=\"1\"\r\n [total]=\"state.total\"\r\n [page]=\"state.index + 1\"\r\n (pageChange)=\"state.index = $event - 1\"\r\n [ariaLabel]=\"locale(Texts, 'ElementsNavigation')\"\r\n [ofLabel]=\"locale(Texts, 'Of')\"\r\n [pagesLabel]=\"locale(Texts, 'Elements')\"\r\n [pageLabel]=\"locale(Texts, 'Element')\"\r\n [goToPageLabel]=\"locale(Texts, 'GoToElement')\"\r\n [previousLabel]=\"locale(Texts, 'PreviousElement')\"\r\n [nextLabel]=\"locale(Texts, 'NextElement')\">\r\n <div class=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { total: state.total }\"></ng-container>\r\n <ng-container *ngIf=\"state.total && state.index != -1\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { i: state.index, total: state.total }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </wm-sirio-pagination>\r\n </div>\r\n </div>\r\n <ng-template #buttonsAdd let-total=\"total\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.addCondition, { total: total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnAdd; context: { total: total }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsRemove let-i=\"i\" let-total=\"total\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.removeCondition, { index: i, total: total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnRemove; context: { i: i, total: total }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnAdd let-total=\"total\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'addLabel') || locale(Texts, 'AddItem')) as addLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n class=\"add-item\"\r\n (click)=\"evaluateWithEventAsHandler(component.addExpression, { total: total })\"\r\n icon=\"fa-plus\" iconPosition=\"start\">{{ addLabel }}</button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnRemove let-i=\"i\" let-total=\"total\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'removeLabel') || locale(Texts, 'RemoveItem')) as removeLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n class=\"remove-item\"\r\n (click)=\"evaluateWithEventAsHandler(component.removeExpression, { index: i, total: total })\"\r\n icon=\"fa-trash\" iconPosition=\"start\">{{ removeLabel }}<span class=\"sr-only\"> {{ itemPosition(i, total) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</div>\r\n\r\n",
|
|
9441
|
+
template: "<div [ngClass]=\"getFormClass()\">\r\n <ng-container *ngFor=\"let row of rows\" [formGroup]=\"formGroup\">\r\n <div class=\"row field-set\">\r\n <ng-container *ngFor=\"let component of row.components\">\r\n <ng-container [ngSwitch]=\"component.type\">\r\n <div [ngClass]=\"getComponentClass(component)\"\r\n [style]=\"getComponentStyle(component)\"\r\n [ngAttrs]=\"getComponentAttrs(component)\"\r\n *ngIf=\"shouldRender(component)\">\r\n <div *ngIf=\"canShow(component)\">\r\n <!-- #region textfield -->\r\n <ng-container *ngSwitchCase=\"'textfield'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-textbox type=\"text\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [prefix]=\"evaluateString(component.appearance?.prefixAdorner) || ''\"\r\n [suffix]=\"evaluateString(component.appearance?.suffixAdorner) || ''\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textCase]=\"toTextCase(component.textCase)\"\r\n [maxlength]=\"evaluateNumber(component.maxLength)\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #textfield\r\n [register]=\"component\"\r\n [componentRef]=\"textfield\">\r\n </wm-sirio-textbox>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region select -->\r\n <ng-container *ngSwitchCase=\"'select'\" [formGroup]=\"resolvePath(component.path)\">\r\n @let selectValues = getSirioValues(component);\r\n @let selectOptions = selectValues.values$ | async;\r\n <!-- @wemake4u/form-controls: strict = the value must be one of the options (was the dropdown directive);\r\n searchable shows the selection in the search field (was prefillSearch).\r\n Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-select\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(selectOptions)\"\r\n [loading]=\"selectValues.state.loading\"\r\n [loadingText]=\"locale(Texts, 'Loading')\"\r\n [searchable]=\"component.searchable\"\r\n [strict]=\"true\"\r\n (optionSelected)=\"selectionChanged(component, $event)\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #select\r\n [register]=\"component\"\r\n [componentRef]=\"select\">\r\n </wm-sirio-select>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region taglist -->\r\n <ng-container *ngSwitchCase=\"'taglist'\" [formGroup]=\"resolvePath(component.path)\">\r\n @let taglistValues = getSirioValues(component);\r\n @let taglistOptions = taglistValues.values$ | async;\r\n <!-- @wemake4u/form-controls: multiple select with \"select all\" and the \"n selected\" summary\r\n (was the tag directive). Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-select\r\n multiple\r\n selectAll\r\n [selectAllLabel]=\"locale(Texts, 'SelectAll')\"\r\n [maxVisibleSelections]=\"component.maxVisibleTags\"\r\n [selectionSummary]=\"sirioSelectionSummary\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(taglistOptions)\"\r\n [loading]=\"taglistValues.state.loading\"\r\n [loadingText]=\"locale(Texts, 'Loading')\"\r\n [searchable]=\"component.searchable\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #taglist\r\n [register]=\"component\"\r\n [componentRef]=\"taglist\">\r\n </wm-sirio-select>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region number -->\r\n <ng-container *ngSwitchCase=\"'number'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-number\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [prefix]=\"evaluateString(component.appearance?.prefixAdorner) || ''\"\r\n [suffix]=\"evaluateString(component.appearance?.suffixAdorner) || ''\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [defaultValue]=\"evaluateNumber(component.defaultValue)\"\r\n [min]=\"evaluateNumber(component.minimum)\"\r\n [max]=\"evaluateNumber(component.maximum)\"\r\n [decimals]=\"evaluateNumber(component.decimalDigits)\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #number\r\n [register]=\"component\"\r\n [componentRef]=\"number\">\r\n </wm-sirio-number>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region datetime -->\r\n <ng-container *ngSwitchCase=\"'datetime'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: date 'yyyy-MM-dd', time 'HH:mm', date and time 'yyyy-MM-ddTHH:mm:ss'.\r\n min/max only limit the pickers (typed values outside are moved to the nearest limit).\r\n Errors/warnings come from the validation presenter. -->\r\n <ng-container [ngSwitch]=\"component.subtype\">\r\n <!-- #region date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <wm-sirio-date\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaDateLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'dateLabel'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [pickLevel]=\"component.pick || 'date'\"\r\n [min]=\"evaluateString(component.range?.min) || null\"\r\n [max]=\"evaluateString(component.range?.max) || null\"\r\n [hideOnFocus]=\"evaluateBoolean(component.hideOnFocus)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #date\r\n [register]=\"component\"\r\n [componentRef]=\"date\">\r\n </wm-sirio-date>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region time -->\r\n <ng-container *ngSwitchCase=\"'time'\">\r\n <wm-sirio-time\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaTimeLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'timeLabel'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [minuteStep]=\"component.timeInterval || 1\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #time\r\n [register]=\"component\"\r\n [componentRef]=\"time\">\r\n </wm-sirio-time>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region datetime -->\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <!-- fieldLabels: dateLabel above the date, timeLabel above the time (as before);\r\n completeParts: date only -> 00:00, time only -> today (was the dateTimeCoordinator). -->\r\n <wm-sirio-datetime\r\n valueType=\"iso-seconds\"\r\n fieldLabels\r\n completeParts\r\n [label]=\"evaluateLabel(locale(component, 'dateLabel'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [timeLabel]=\"evaluateString(locale(component, 'timeLabel'))\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [min]=\"evaluateString(component.range?.min) || null\"\r\n [max]=\"evaluateString(component.range?.max) || null\"\r\n [hideOnFocus]=\"evaluateBoolean(component.hideOnFocus)\"\r\n [minuteStep]=\"component.timeInterval || 1\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #datetime\r\n [register]=\"component\"\r\n [componentRef]=\"datetime\">\r\n </wm-sirio-datetime>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region checkbox -->\r\n <ng-container *ngSwitchCase=\"'checkbox'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: checkbox and toggle (subtype 'toggle'); the markdown label is projected\r\n inside the kit <label> as inline HTML. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-checkbox\r\n [toggle]=\"component.subtype === 'toggle'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #checkbox\r\n [register]=\"component\"\r\n [componentRef]=\"checkbox\"><span [innerHTML]=\"toInlineHTML(evaluateTemplate(locale(component, 'label')))\"></span></wm-sirio-checkbox>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region radio -->\r\n <ng-container *ngSwitchCase=\"'radio'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: radio buttons and chips (subtype 'chip'); markdown option labels are\r\n rendered inline inside the kit <label>. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-radio-group\r\n [chips]=\"component.subtype === 'chip'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(getValues(component) | async)\"\r\n [inline]=\"component.displayInline\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #radio\r\n [register]=\"component\"\r\n [componentRef]=\"radio\">\r\n <ng-template wmSirioOptionLabel let-option><span [innerHTML]=\"toInlineHTML(evaluateTemplate(option.label))\"></span></ng-template>\r\n </wm-sirio-radio-group>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region checklist -->\r\n <ng-container *ngSwitchCase=\"'checklist'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: checkbox list and chips (subtype 'chip'); markdown option labels are\r\n rendered inline inside the kit <label>. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-checklist\r\n [chips]=\"component.subtype === 'chip'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(getValues(component) | async)\"\r\n [inline]=\"component.displayInline\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #checklist\r\n [register]=\"component\"\r\n [componentRef]=\"checklist\">\r\n <ng-template wmSirioOptionLabel let-option><span [innerHTML]=\"toInlineHTML(evaluateTemplate(option.label))\"></span></ng-template>\r\n </wm-sirio-checklist>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region textarea -->\r\n <ng-container *ngSwitchCase=\"'textarea'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-textarea\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textCase]=\"toTextCase(component.textCase)\"\r\n [maxlength]=\"evaluateNumber(component.maxLength)\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #textarea\r\n [register]=\"component\"\r\n [componentRef]=\"textarea\">\r\n </wm-sirio-textarea>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region filepicker -->\r\n <ng-container *ngSwitchCase=\"'filepicker'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers);\r\n upload, delete and download of the stored files are handled by the control. -->\r\n <wm-sirio-file-upload class=\"w-100\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [buttonLabel]=\"evaluateString(locale(component, 'text')) || locale(Texts, 'Upload')\"\r\n [accept]=\"getAccept(component.accept)\"\r\n [multiple]=\"evaluateBoolean(component.multiple)\"\r\n valueType=\"array\"\r\n details\r\n downloadable\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [instantUpload]=\"evaluateBoolean(component.instantUpload)\"\r\n [uploadHandler]=\"evaluate(component.uploadHandler)\"\r\n [deleteHandler]=\"evaluate(component.deleteHandler)\"\r\n [downloadHandler]=\"evaluate(component.downloadHandler)\"\r\n [removeLabel]=\"locale(Texts, 'Remove')\"\r\n [downloadLabel]=\"locale(Texts, 'Download')\"\r\n [uploadingLabel]=\"locale(Texts, 'Uploading')\"\r\n [deletingLabel]=\"locale(Texts, 'Deleting')\"\r\n [downloadingLabel]=\"locale(Texts, 'Downloading')\"\r\n [formControlName]=\"component.key\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n (filesAdded)=\"filesAdded($event, filepicker)\"\r\n (fileError)=\"fileError($event)\"\r\n #filepicker\r\n [register]=\"component\"\r\n [componentRef]=\"filepicker\">\r\n </wm-sirio-file-upload>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region range -->\r\n <ng-container *ngSwitchCase=\"'range'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-slider\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [min]=\"evaluateNumber(component.range?.min) ?? 0\"\r\n [max]=\"evaluateNumber(component.range?.max) ?? 0\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #range\r\n [register]=\"component\"\r\n [componentRef]=\"range\">\r\n </wm-sirio-slider>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region displayfield -->\r\n <ng-container *ngSwitchCase=\"'displayfield'\">\r\n <div class=\"display-field\"\r\n #displayfield\r\n [register]=\"component\"\r\n [componentRef]=\"displayfield\">\r\n <div *ngIf=\"component.label\" class=\"sirio-label\">\r\n {{ evaluateString(locale(component, 'label')) }}\r\n <!-- @wemake4u/form-controls: kit info button with popover, as next to the labels of the controls. -->\r\n <wm-sirio-info-button *ngIf=\"component.tooltip\"\r\n [content]=\"evaluateString(locale(component, 'tooltip'))\"\r\n [title]=\"evaluateString(locale(component, 'label'))\"\r\n [label]=\"locale(Texts, 'InformationAbout') + ' ' + evaluateString(locale(component, 'ariaLabel') || locale(component, 'label'))\"></wm-sirio-info-button>\r\n </div>\r\n <div [class.sirio-form-control]=\"component.fieldtype !== 'filelist'\"\r\n [style.text-align]=\"component.fieldtype !== 'filelist' ? (component.textAlign || null) : null\"\r\n class=\"data-display\" [ngClass]=\"component.fieldtype\">\r\n <ng-container [ngSwitch]=\"component.fieldtype\">\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <ng-container *ngTemplateOutlet=\"formattedTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'filelist'\">\r\n <ng-container *ngTemplateOutlet=\"filelistTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"defaultTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #checkboxTemplate>\r\n <i *ngIf=\"evaluate(component.expression)\" class=\"fas fa-check\"></i>\r\n </ng-template>\r\n <ng-template #defaultTemplate>\r\n <ng-container *ngIf=\"supportValues(component) && hasValues(component); else simpleTemplate\">\r\n <ng-container *ngIf=\"getValues(component) | async as values\">\r\n {{ toLabel(evaluate(component.expression), values) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #simpleTemplate>\r\n {{ evaluate(component.expression) }}\r\n </ng-template>\r\n <ng-template #formattedTemplate>\r\n <div class=\"text-paragraph\" style=\"margin-top: -6px;\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(component.expression))\">\r\n </div>\r\n </ng-template>\r\n <ng-template #filelistTemplate>\r\n <ng-container *ngIf=\"{ files: evaluate(component.expression) } as expr\"\r\n fileHandler\r\n #fileHandlerRef=\"fileHandler\"\r\n [downloadHandler]=\"evaluate(component.downloadHandler)\">\r\n <ng-container *ngIf=\"expr.files?.length > 0\">\r\n <div *ngFor=\"let file of expr.files\" class=\"row w-100 p-3 g-0 sirio-bg-primary-light-40 sirio-text-secondary mt-1\">\r\n <div class=\"col-auto ms-auto\">\r\n <span [ngClass]=\"fileHandlerRef.getIcon(file)\" class=\"fas fa-24 mt-1 me-3 ms-1\" aria-hidden=\"true\"></span>\r\n </div>\r\n <div class=\"col\">\r\n <p class=\"mb-0\"><span class=\"h6 sirio-text-link sirio-font-weight-700\">{{ file.name }}</span></p>\r\n {{ fileHandlerRef.getExtension(file) }}, {{ fileHandlerRef.getSize(file) }}\r\n </div>\r\n <div class=\"col-auto ms-auto d-lg-flex flex-column align-items-end\">\r\n <ng-container *ngIf=\"fileHandlerRef.canDownload(file)\">\r\n <div *ngIf=\"fileHandlerRef.isDownloading(file)\" class=\"mt-2\">\r\n <span class=\"d-none d-sm-inline-block\">{{ locale(Texts, 'Downloading') }}</span>\r\n <span class=\"fas fa-arrows-rotate fa-spin ms-2\" aria-hidden=\"true\"></span>\r\n </div>\r\n <!-- Buttons, not links: announced as buttons, activated also with Space. -->\r\n <button *ngIf=\"fileHandlerRef.isLocal(file)\"\r\n type=\"button\"\r\n class=\"sirio-text-link fp-link-button\"\r\n (click)=\"fileHandlerRef.downloadLocal(file)\"\r\n [attr.aria-label]=\"locale(Texts, 'Download') + ' ' + file.name\"\r\n [attr.title]=\"locale(Texts, 'Download') + ' ' + file.name\">\r\n <span class=\"d-none d-sm-inline-block\">\r\n {{ locale(Texts, 'Download') }}\r\n </span>\r\n <span class=\"fas fa-download ms-2\" aria-hidden=\"true\"></span>\r\n </button>\r\n <button *ngIf=\"fileHandlerRef.isHandled(file)\"\r\n type=\"button\"\r\n class=\"sirio-text-link fp-link-button\"\r\n (click)=\"fileHandlerRef.downloadHandled(file)\"\r\n [attr.aria-label]=\"locale(Texts, 'Download') + ' ' + file.name\"\r\n [attr.title]=\"locale(Texts, 'Download') + ' ' + file.name\">\r\n <span class=\"d-none d-sm-inline-block\">{{ locale(Texts, 'Download') }}</span>\r\n <span class=\"fas fa-download ms-2\" aria-hidden=\"true\"></span>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!(expr.files?.length > 0)\">\r\n <div class=\"row p-3 g-0 sirio-bg-primary-light-40 sirio-text-secondary mt-1\">\r\n <div class=\"col\">\r\n <p class=\"mb-0\">\r\n <span class=\"h6 sirio-text-link sirio-font-weight-700\">Nessun file presente</span>\r\n </p>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </div>\r\n <p *ngIf=\"component.description\" class=\"sirio-form-text-help\">\r\n {{ evaluateString(locale(component, 'description')) }}\r\n </p>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region dynamiclist -->\r\n <ng-container *ngSwitchCase=\"'dynamiclist'\">\r\n <ng-container *ngIf=\"resolvePath(component.path) as formGroup\">\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- data-fp-repeater: root of the repeater, where the focus goes after add / remove / move. -->\r\n <div [formArrayName]=\"component.key\"\r\n data-fp-repeater\r\n [formGroup]=\"formGroup\"\r\n [recursion]=\"component\"\r\n #recursion=\"recursion\">\r\n <p *ngIf=\"component.description\">{{ evaluateString(locale(component, 'description')) }}</p>\r\n <ng-container *ngIf=\"getFormArray(resolvePath(component.path).get(component.key)) as formArray\">\r\n <ng-template navigatorState\r\n [total]=\"formArray.controls.length\"\r\n #state=\"navigatorState\"></ng-template>\r\n <ng-container *ngIf=\"component.subtype == 'navigation'\">\r\n <ng-container *ngTemplateOutlet=\"navigation; context: { formArray: formArray, state: state }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"formArray.controls.length > 0\">\r\n <ng-container [ngSwitch]=\"component.subtype\">\r\n <!-- #region tab -->\r\n <ng-container *ngSwitchCase=\"'tab'\">\r\n <!-- @wemake4u/form-controls: activateAdded selects the added tab (after a removal the library selects the one\r\n taking its place); focusContent moves the focus to the first field of the panel. -->\r\n <div [register]=\"component\"\r\n [componentRef]=\"tabInstance\">\r\n <wm-sirio-tabs [scrollLeftLabel]=\"locale(Texts, 'ScrollLeft')\"\r\n [scrollRightLabel]=\"locale(Texts, 'ScrollRight')\"\r\n [focusablePanels]=\"false\"\r\n activateAdded\r\n focusContent\r\n #tabInstance>\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <wm-sirio-tab [label]=\"evaluateWithEventAsString(locale(component, 'label'), event)\"\r\n [badge]=\"evaluateWithEvent(component.badge, event)\">\r\n <ng-template wmSirioTabContent>\r\n <div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </wm-sirio-tab>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-tabs>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region accordion -->\r\n <ng-container *ngSwitchCase=\"'accordion'\">\r\n <!-- @wemake4u/form-controls: activateAdded opens the first section at the start and the added one (after a removal\r\n the library opens the one taking its place); focusContent moves the focus to its first field. -->\r\n <div [register]=\"component\"\r\n [componentRef]=\"dynamiclistaccordion\">\r\n <wm-sirio-accordion exclusive\r\n activateAdded\r\n focusContent\r\n #dynamiclistaccordion>\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <wm-sirio-accordion-item [title]=\"evaluateWithEventAsString(locale(component, 'label'), event)\"\r\n [badge]=\"evaluateWithEvent(component.badge, event)\">\r\n <ng-template wmSirioAccordionContent>\r\n <div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </wm-sirio-accordion-item>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-accordion>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region table -->\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div #dynamiclist\r\n [register]=\"component\"\r\n [componentRef]=\"dynamiclist\">\r\n <table class=\"dynamiclist-table\" [ngClass]=\"{ 'main': recursionLevel == 0 }\">\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"getFormGroup(item) as formItem\">\r\n <ng-container *ngIf=\"{ itemsArray: recursion.getItemsArray(formItem) } as recursionData\">\r\n <tr>\r\n <td class=\"content-cell\">\r\n <div [ngClass]=\"{'group-outline': component.showOutline === true && component.subtype !== 'table', 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"formItem\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </td>\r\n <td class=\"command-cell\">\r\n <div>\r\n <ng-container *ngIf=\"recursionData.itemsArray\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: recursionData.itemsArray, compact: true }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsReorder; context: { formArray: formArray, i: i, compact: true }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i, compact: true }\"></ng-container>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"recursionData.itemsArray && recursionData.itemsArray.length > 0\">\r\n <td colspan=\"2\" class=\"recursion-cell\">\r\n <div class=\"layout\">\r\n <div class=\"recursion-toggle\">\r\n <!-- @wemake4u/form-controls: open at the start (as before); label for screen readers. -->\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n [wmSirioCollapseToggle]=\"collapse\"\r\n iconOnly\r\n [icon]=\"collapse.expanded() ? 'fa-chevron-down' : 'fa-chevron-right'\"\r\n [label]=\"recursionData.itemsArray.length + ' elementi presenti'\"></button>\r\n </div>\r\n <div *ngIf=\"!collapse.expanded()\" class=\"recursion-title\">\r\n <div class=\"recursion-text\">\r\n {{ recursionData.itemsArray.length }} elementi presenti\r\n </div>\r\n </div>\r\n <div class=\"recursion-content\">\r\n <div wmSirioCollapse #collapse=\"wmSirioCollapse\" [expanded]=\"true\">\r\n <div *ngIf=\"collapse.expanded()\" style=\"margin-bottom: -11px;\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"recursion.getFormGroup(formItem)\"\r\n [readOnly]=\"readOnly\"\r\n [recursionLevel]=\"recursionLevel+1\"\r\n [rows]=\"recursion.getComponentRows()\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region navigation -->\r\n <ng-container *ngSwitchCase=\"'navigation'\">\r\n <div>\r\n <ng-container *ngIf=\"formArray.controls[state.index] as item\">\r\n <div [ngClass]=\"{'group-outline': component.showOutline === true, 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: state.index } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region default -->\r\n <ng-container *ngSwitchDefault>\r\n <div #dynamiclist\r\n [register]=\"component\"\r\n [componentRef]=\"dynamiclist\"\r\n selectionGroup\r\n [selectionMode]=\"evaluateString(component.selection?.mode)\"\r\n [selectableClass]=\"evaluateString(component.selection?.selectableClass)\"\r\n [selectedClass]=\"evaluateString(component.selection?.selectedClass)\"\r\n [onSelectionChanged]=\"callExpression(component.selection?.selectionChanged)\">\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <div [selectionItem]=\"item\"\r\n [ngClass]=\"{'group-outline': component.showOutline === true, 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <ng-container *ngIf=\"component.allowAddRemove || component.allowReorder\">\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsReorder; context: { formArray: formArray, i: i }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"formArray.controls.length == 0\">\r\n <div class=\"dynamiclist-no-data\">{{ evaluateString(locale(component, 'noDataText')) || locale(Texts, 'NoData') }}</div>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"feedback\"></ng-container>\r\n <ng-container *ngIf=\"recursionLevel == 0 && component.subtype !== 'navigation'\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: formArray, state: state }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #region templates -->\r\n <ng-template #btnMoveUp let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"locale(Texts, 'MoveUp') as upLabel\">\r\n <!-- Name with the position (\"Sposta Sù elemento 3 di 5\"): the visible text first, the rest for screen readers. -->\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"moveUpItem(formArray, i, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"up\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-arrow-up\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"upLabel + ' ' + itemPosition(i, formArray.length)\">{{ upLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnMoveDown let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"locale(Texts, 'MoveDown') as downLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"moveDownItem(formArray, i, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"down\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-arrow-down\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"downLabel + ' ' + itemPosition(i, formArray.length)\">{{ downLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnRemove let-formArray=\"formArray\" let-state=\"state\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'removeLabel') || locale(Texts, 'RemoveItem')) as removeLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"removeItem(formArray, i, true, state, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"remove\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-trash\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"removeLabel + ' ' + itemPosition(i, formArray.length)\">{{ removeLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnAdd let-formArray=\"formArray\" let-state=\"state\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'addLabel') || locale(Texts, 'AddItem')) as addLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"addItem(formArray, state)\"\r\n data-fp-action=\"add\"\r\n class=\"add-item\"\r\n icon=\"fa-plus\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"addLabel\">{{ addLabel }}</button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsReorder let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowReorder\">\r\n <ng-container *ngTemplateOutlet=\"btnMoveUp; context: { formArray: formArray, i: i, compact: compact }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"btnMoveDown; context: { formArray: formArray, i: i, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsRemove let-formArray=\"formArray\" let-state=\"state\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.removeCondition, { item: formArray.at(i)?.value, index: i, total: state.total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnRemove; context: { formArray: formArray, state: state, i: i, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsAdd let-formArray=\"formArray\" let-state=\"state\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.addCondition, { total: state.total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnAdd; context: { formArray: formArray, state: state, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #feedback>\r\n <ng-container *ngIf=\"getTextFeedback(component) as textFeedback\">\r\n <div>\r\n <span class=\"sirio-form-feedback d-block sirio-text-danger\">{{textFeedback}}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'description')) as textHelp\">\r\n <div>\r\n <p class=\"sirio-form-text-help\">{{textHelp}}</p>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #navigation let-formArray=\"formArray\" let-state=\"state\">\r\n <!-- @wemake4u/form-controls: item navigator (page = element, 1-based); the actions are projected at the end of the row. -->\r\n <wm-sirio-pagination [showItems]=\"false\"\r\n [pageSize]=\"1\"\r\n [total]=\"state.total\"\r\n [page]=\"state.index + 1\"\r\n (pageChange)=\"state.index = $event - 1\"\r\n [ariaLabel]=\"locale(Texts, 'ElementsNavigation')\"\r\n [ofLabel]=\"locale(Texts, 'Of')\"\r\n [pagesLabel]=\"locale(Texts, 'Elements')\"\r\n [pageLabel]=\"locale(Texts, 'Element')\"\r\n [goToPageLabel]=\"locale(Texts, 'GoToElement')\"\r\n [previousLabel]=\"locale(Texts, 'PreviousElement')\"\r\n [nextLabel]=\"locale(Texts, 'NextElement')\">\r\n <div class=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: formArray, state: state }\"></ng-container>\r\n <ng-container *ngIf=\"state.total && state.index != -1\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: state.index }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </wm-sirio-pagination>\r\n </ng-template>\r\n <!-- #endregion -->\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region group -->\r\n <ng-container *ngSwitchCase=\"'group'\">\r\n <div *ngIf=\"resolveBoundGroup(component) as resolvedGroup\"\r\n [ngClass]=\"getGroupOutline(component)\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'label')) as labelText\">\r\n <label>{{ labelText }}</label>\r\n </ng-container>\r\n <div #group\r\n [register]=\"component\"\r\n [componentRef]=\"group\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvedGroup\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region tab -->\r\n <ng-container *ngSwitchCase=\"'tab'\">\r\n <ng-container *ngIf=\"(getPanels(component) | async) as panels\">\r\n <ng-container *ngIf=\"panels.length > 0\">\r\n <!-- @wemake4u/form-controls: focusContent moves the focus into the panel shown at the start or selected (not for the\r\n arrow keys), except for the panels with disableAutoFocus. -->\r\n <wm-sirio-tabs #tabInstance\r\n [register]=\"component\"\r\n [componentRef]=\"tabInstance\"\r\n [scrollLeftLabel]=\"locale(Texts, 'ScrollLeft')\"\r\n [scrollRightLabel]=\"locale(Texts, 'ScrollRight')\"\r\n [line]=\"!!component.navigation\"\r\n [vertical]=\"!!component.vertical\"\r\n [focusablePanels]=\"false\"\r\n focusContent>\r\n <ng-container *ngFor=\"let panel of panels; let i = index;\">\r\n <wm-sirio-tab *ngIf=\"evaluateConditional(panel.conditional)\"\r\n [label]=\"evaluateString(locale(panel, 'label'))\"\r\n [icon]=\"evaluateString(panel.icon) || null\"\r\n [disabled]=\"evaluateBoolean(panel.disabled) ?? false\"\r\n [badge]=\"evaluate(panel.badge)\"\r\n [focusContent]=\"panel.disableAutoFocus !== true\">\r\n <ng-template wmSirioTabContent>\r\n <ng-container *ngIf=\"getTemplate(panel.template) as template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvePath(panel.path)\"\r\n [rows]=\"template.rows\"\r\n [identity]=\"component.id\"\r\n [identityIndex]=\"i\"\r\n [readOnly]=\"readOnly || evaluateBoolean(panel.readonly)\"\r\n [disableAutoFocus]=\"template.disableAutoFocus\"\r\n [alignment]=\"template.verticalAlignment\"></app-dynamic-fields>\r\n </ng-container>\r\n </ng-template>\r\n </wm-sirio-tab>\r\n </ng-container>\r\n </wm-sirio-tabs>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region accordion -->\r\n <ng-container *ngSwitchCase=\"'accordion'\">\r\n <ng-container *ngIf=\"(getPanels(component) | async) as panels\">\r\n <ng-container *ngIf=\"panels.length > 0\">\r\n <!-- exclusive: one section open at a time, as with ngx-sirio-lib. -->\r\n <wm-sirio-accordion exclusive\r\n #accordion\r\n [register]=\"component\"\r\n [componentRef]=\"accordion\">\r\n <ng-container *ngFor=\"let panel of panels; let i = index;\">\r\n <ng-container *ngIf=\"resolvePath(panel.path) as formGroup\">\r\n <!-- Content not lazy (as before): the fields of closed sections stay in the form. -->\r\n <wm-sirio-accordion-item *ngIf=\"evaluateConditional(panel.conditional)\"\r\n [title]=\"evaluateString(locale(panel, 'label'))\"\r\n [badge]=\"evaluate(panel.badge)\"\r\n [disabled]=\"evaluateBoolean(panel.disabled)\">\r\n <ng-container *ngIf=\"getTemplate(panel.template) as template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"formGroup\"\r\n [readOnly]=\"readOnly || evaluateBoolean(panel.readonly)\"\r\n [rows]=\"template.rows\"\r\n [identity]=\"component.id\"\r\n [identityIndex]=\"i\"\r\n [disableAutoFocus]=\"template.disableAutoFocus\"\r\n [alignment]=\"template.verticalAlignment\"></app-dynamic-fields>\r\n </ng-container>\r\n </wm-sirio-accordion-item>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-accordion>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region text -->\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [collapse]=\"component.collapseTo\"\r\n [onCollapse]=\"callExpression(component.onCollapse)\"\r\n [onExpand]=\"callExpression(component.onExpand)\"\r\n #text\r\n [register]=\"component\"\r\n [componentRef]=\"text\">\r\n <!--Reset View Context-->\r\n <div tabindex=\"0\" style=\"display:none\"></div>\r\n <div class=\"flex\">\r\n <div class=\"text-paragraph\"\r\n [markdown]=\"callExpression(component.anchorClick)\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n <ng-container *ngIf=\"component.tooltip\">\r\n <wm-sirio-info-button [content]=\"tooltipTemplate\"\r\n [label]=\"locale(Texts, 'Information')\"></wm-sirio-info-button>\r\n <ng-template #tooltipTemplate>\r\n <div class=\"sirio-tooltip-body\">\r\n <div class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'tooltip')))\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region html -->\r\n <ng-container *ngSwitchCase=\"'html'\">\r\n <div class=\"html-paragraph\"\r\n [innerHTML]=\"sanitize(evaluateTemplate(locale(component, 'content')))\"\r\n #html\r\n [register]=\"component\"\r\n [componentRef]=\"html\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <!-- || '': an alt expression giving null would be read aloud as \"null\". -->\r\n <img [src]=\"evaluateString(component.source)\"\r\n [alt]=\"evaluateString(locale(component, 'alt')) || ''\"\r\n style=\"width: 100%;height: 100%;\"\r\n #image\r\n [register]=\"component\"\r\n [componentRef]=\"image\">\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region table -->\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <label *ngIf=\"evaluateString(locale(component, 'label')) as tableLabel\">{{ tableLabel }}</label>\r\n <!-- Sirio data grid: configuration from SirioGridService. -->\r\n @let grid = getSirioGrid(component);\r\n @let rows = getSirioRows(component, grid);\r\n <!-- Paginator with rowCount > 0, or when the server source pages its rows. -->\r\n @let pagedSize = grid.pageable ? null : rows.pagedSize();\r\n @let gridHeight = component.autoHeight ? null : evaluateSize(component.height);\r\n <wm-sirio-data-grid #table\r\n class=\"fp-data-grid\"\r\n variant=\"dark\"\r\n size=\"sm\"\r\n [filterButton]=\"component.floatingFilter === true ? 'always' : 'none'\"\r\n [showFilterChips]=\"false\"\r\n paginationVariant=\"compact\"\r\n [caption]=\"evaluateString(locale(component, 'label'))\"\r\n [keyboardNavigation]=\"component.keyboardNavigation !== false\"\r\n [navigationHint]=\"evaluateString(locale(component, 'navigationHint')) || locale(Texts, 'GridNavigationHint')\"\r\n [data]=\"rows.data()\"\r\n [dataSource]=\"rows.dataSource\"\r\n [loading]=\"rows.loading()\"\r\n [emptyText]=\"rows.failed() ? locale(Texts, 'LoadingFailed') : locale(Texts, 'NoData')\"\r\n [loadErrorText]=\"locale(Texts, 'LoadingFailed')\"\r\n [rowId]=\"grid.rowId\"\r\n [selection]=\"sirioSelection(component)\"\r\n singleSelectionControl=\"checkbox\"\r\n [selectionColumn]=\"grid.checkboxes\"\r\n [selectOnRowClick]=\"grid.checkboxes && grid.clickSelect\"\r\n selectAll=\"filtered\"\r\n hideUnselectable\r\n [rowSelectable]=\"grid.rowSelectable\"\r\n [selected]=\"grid.selected()\"\r\n (selectedChange)=\"onSirioSelectionChanged(component, grid, $event)\"\r\n [rowClass]=\"grid.rowClass\"\r\n [rowStyle]=\"grid.rowStyle\"\r\n [pageable]=\"grid.pageable || pagedSize !== null\"\r\n [pageSize]=\"pagedSize ?? grid.pageSize\"\r\n [pageSizeOptions]=\"sirioPageSizes(pagedSize)\"\r\n [rowNumbers]=\"grid.rowNumbers\"\r\n rowNumberHeader=\"#\"\r\n [resizable]=\"grid.resizable\"\r\n [reorderable]=\"grid.reorderable\"\r\n filterOperators\r\n [filterRow]=\"component.floatingFilter === true\"\r\n [filterYesLabel]=\"locale(Texts, 'True')\"\r\n [filterNoLabel]=\"locale(Texts, 'False')\"\r\n [height]=\"gridHeight\"\r\n [stickyHeader]=\"!!gridHeight\"\r\n [minHeight]=\"evaluateSize(component.minHeight)\"\r\n [refresh]=\"refreshRowSource(component)\"\r\n [register]=\"component\"\r\n [componentRef]=\"table\">\r\n @for (col of grid.columns; track col.id) {\r\n <wm-sirio-grid-column [field]=\"col.field\"\r\n [header]=\"col.header\"\r\n [value]=\"col.value\"\r\n [format]=\"col.format\"\r\n [align]=\"col.align\"\r\n [filter]=\"col.filter\"\r\n [filterOptions]=\"col.filterOptions\"\r\n [filterMultiple]=\"col.filterMultiple\"\r\n [filterOperators]=\"col.filterOperators\"\r\n [sortable]=\"col.sortable\"\r\n [resizable]=\"col.resizable\"\r\n [wrap]=\"col.wrap\"\r\n [mono]=\"col.mono\"\r\n [fit]=\"col.fit\"\r\n [fixed]=\"col.fixed\"\r\n [flex]=\"col.flex\"\r\n [width]=\"col.width\"\r\n [minWidth]=\"col.minWidth\"\r\n [maxWidth]=\"col.maxWidth\"\r\n [group]=\"col.group\"\r\n [hidden]=\"col.actions && evaluateBoolean(component.suppressActions) === true\"\r\n [cellClass]=\"col.cellClass\"\r\n [cellStyle]=\"col.cellStyle\"\r\n [headerClass]=\"col.headerClass\"\r\n [headerStyle]=\"col.headerStyle\">\r\n @if (col.renderer; as renderer) {\r\n <ng-template wmSirioGridCell let-row let-value=\"value\" let-index=\"index\">\r\n @if (renderer.kind === 'html') {\r\n <span [innerHTML]=\"renderer.html(row, value)\"></span>\r\n } @else {\r\n <fp-sirio-cell-host [renderer]=\"renderer.type\" [params]=\"renderer.params(row, value, index)\" />\r\n }\r\n </ng-template>\r\n }\r\n </wm-sirio-grid-column>\r\n }\r\n </wm-sirio-data-grid>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region button -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: color \"ghost\" = plain sirio-btn; icon on the left unless iconPosition \"right\". -->\r\n <button type=\"button\"\r\n [wmSirioButton]=\"evaluateVariant(component.color)\"\r\n [disabled]=\"evaluateBoolean(component.disabled) ?? false\"\r\n [icon]=\"evaluateString(component.icon) || null\"\r\n [iconPosition]=\"component.iconPosition == 'right' ? 'end' : 'start'\"\r\n (click)=\"clickButton(component, $event)\"\r\n #button\r\n [register]=\"component\"\r\n [componentRef]=\"button\">{{ evaluateString(locale(component, 'label')) }}</button>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region separator -->\r\n <ng-container *ngSwitchCase=\"'separator'\">\r\n <div class=\"separator\"\r\n #separator\r\n [register]=\"component\"\r\n [componentRef]=\"separator\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region spacer -->\r\n <ng-container *ngSwitchCase=\"'spacer'\">\r\n <div style=\"width: 100%\"\r\n [style.height.px]=\"component.height\"\r\n #spacer\r\n [register]=\"component\"\r\n [componentRef]=\"spacer\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region iframe -->\r\n <ng-container *ngSwitchCase=\"'iframe'\">\r\n <label [for]=\"component.id\">{{ evaluateString(locale(component, 'label')) }}</label>\r\n <iframe [src]=\"evaluateUrl(component.url)\"\r\n [title]=\"evaluateString(locale(component, 'label'))\"\r\n [style.width]=\"'100%'\"\r\n [style.height.px]=\"component.height\"\r\n [frameSecurity]=\"component.security\"\r\n #iframe\r\n [register]=\"component\"\r\n [componentRef]=\"iframe\">\r\n </iframe>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region alert -->\r\n <ng-container *ngSwitchCase=\"'alert'\">\r\n <!-- @wemake4u/form-controls: preventClose → no close button; markdown as block content. -->\r\n <wm-sirio-alert [type]=\"component.role || 'info'\"\r\n [closeLabel]=\"locale(Texts, 'Close')\"\r\n [dismissible]=\"!evaluateBoolean(component.preventClose)\"\r\n #alert\r\n [register]=\"component\"\r\n [componentRef]=\"alert\">\r\n <div wmSirioAlertContent\r\n class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </wm-sirio-alert>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region notice -->\r\n <ng-container *ngSwitchCase=\"'notice'\">\r\n <!-- @wemake4u/form-controls: light notice (kit default); markdown as block content. -->\r\n <wm-sirio-notify #notice\r\n [title]=\"evaluateString(locale(component, 'title'))\"\r\n [register]=\"component\"\r\n [componentRef]=\"notice\">\r\n <div wmSirioNotifyContent\r\n class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </wm-sirio-notify>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region tooltip -->\r\n <ng-container *ngSwitchCase=\"'tooltip'\">\r\n <!-- @wemake4u/form-controls: the title is the popover title of the kit. -->\r\n <wm-sirio-info-button [content]=\"tooltipTemplate\"\r\n [title]=\"evaluateString(locale(component, 'title'))\"\r\n [label]=\"evaluateString(locale(component, 'title')) || locale(Texts, 'Information')\"\r\n #tooltip\r\n [register]=\"component\"\r\n [componentRef]=\"tooltip\"></wm-sirio-info-button>\r\n <ng-template #tooltipTemplate>\r\n <div class=\"sirio-tooltip-body\">\r\n <div class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region chart -->\r\n <ng-container *ngSwitchCase=\"'chart'\">\r\n <label>{{ evaluateString(locale(component, 'label')) }}</label>\r\n <ng-container [observe]=\"getChartData(component)\"\r\n [callback]=\"invalidateChart(component)\">\r\n <ag-charts [options]=\"(getChartOptions(component) | async) ?? {}\"\r\n [style.height.px]=\"component.height\"\r\n #chart\r\n [register]=\"component\"\r\n [componentRef]=\"chart\" />\r\n </ng-container> \r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region component -->\r\n <ng-container *ngSwitchCase=\"'component'\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'label')) as labelText\">\r\n <label>{{ labelText }}</label>\r\n </ng-container>\r\n <ng-container *ngIf=\"component.isInput; else noInputTemplate\">\r\n <app-dynamic-host [properties]=\"getFeelableProperties(component)\"\r\n [formGroup]=\"resolvePath(component.path)\"\r\n #componentHost\r\n [register]=\"component\"\r\n [componentRef]=\"componentHost\" />\r\n <ng-container *ngIf=\"getTextFeedback(component) as textFeedback\">\r\n <span class=\"sirio-form-feedback d-block sirio-text-danger\">{{textFeedback}}</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'description')) as textHelp\">\r\n <p class=\"sirio-form-text-help\">{{textHelp}}</p>\r\n </ng-container>\r\n <ng-template #noInputTemplate>\r\n <app-dynamic-host [properties]=\"getFeelableProperties(component)\"\r\n #componentHost\r\n [register]=\"component\"\r\n [componentRef]=\"componentHost\" />\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region templatehost -->\r\n <ng-container *ngSwitchCase=\"'templatehost'\">\r\n <ng-container *ngIf=\"getTemplate(component.template) as template\">\r\n <div #template\r\n [register]=\"component\"\r\n [componentRef]=\"template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvePath(component.path)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"template?.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region treelist -->\r\n <ng-container *ngSwitchCase=\"'treelist'\">\r\n <label>{{ evaluateString(locale(component, 'label')) }}</label>\r\n <div class=\"treelist\"\r\n [style.height]=\"component.height ? evaluateSize(component.height): null\"\r\n *ngIf=\"getTreeColumns(component) as columns\">\r\n <ng-container *ngIf=\"((getTreeSource(component) | async) ?? []) as rows\">\r\n <table #treelist\r\n [register]=\"component\"\r\n [componentRef]=\"treelist\"\r\n [treelist]=\"rows\">\r\n <colgroup>\r\n <col *ngFor=\"let column of columns\"\r\n [style.width]=\"evaluateSize(column.width)\">\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n <th scope=\"col\" *ngFor=\"let column of columns\"\r\n [ngClass]=\"getClass(column)\"\r\n [style.text-align]=\"column.align\">\r\n {{column.label}}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container>\r\n <tr *ngFor=\"let row of rows\"\r\n [attr.data-id]=\"row.id\"\r\n [attr.data-parent]=\"row.parentId\"\r\n [attr.data-expanded]=\"row.expanded ? 'true': 'false'\"\r\n [ngClass]=\"row.meta?.['cssClass']\">\r\n <td *ngFor=\"let column of columns; let i = index\"\r\n [ngClass]=\"getClass(column)\">\r\n <div [style.justify-content]=\"getJustify(column.align)\">\r\n <span *ngIf=\"i==component.expanderColumn\"\r\n [style.visibility]=\"row.hasChildren ? 'visible' : 'hidden'\"\r\n [style.padding-left]=\"evaluateSize(20 * row.level)\"\r\n class=\"toggle\"></span>\r\n <span class=\"text\"\r\n [title]=\"row.data[column.key]\">\r\n {{ row.data[column.key] }}\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region navigator -->\r\n <ng-container *ngSwitchCase=\"'navigator'\">\r\n <div #navigator\r\n [register]=\"component\"\r\n [componentRef]=\"navigator\">\r\n <div navigatorState\r\n [index]=\"evaluateNumber(component.index) ?? 0\"\r\n [total]=\"evaluateNumber(component.total) ?? 0\"\r\n (indexChange)=\"evaluateWithEventAsHandler(component.selectionChanged, { index: $event, count: state.total })\"\r\n #state=\"navigatorState\">\r\n <!-- @wemake4u/form-controls: item navigator (page = element, 1-based); the actions are projected at the end of the row. -->\r\n <wm-sirio-pagination [showItems]=\"false\"\r\n [pageSize]=\"1\"\r\n [total]=\"state.total\"\r\n [page]=\"state.index + 1\"\r\n (pageChange)=\"state.index = $event - 1\"\r\n [ariaLabel]=\"locale(Texts, 'ElementsNavigation')\"\r\n [ofLabel]=\"locale(Texts, 'Of')\"\r\n [pagesLabel]=\"locale(Texts, 'Elements')\"\r\n [pageLabel]=\"locale(Texts, 'Element')\"\r\n [goToPageLabel]=\"locale(Texts, 'GoToElement')\"\r\n [previousLabel]=\"locale(Texts, 'PreviousElement')\"\r\n [nextLabel]=\"locale(Texts, 'NextElement')\">\r\n <div class=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { total: state.total }\"></ng-container>\r\n <ng-container *ngIf=\"state.total && state.index != -1\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { i: state.index, total: state.total }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </wm-sirio-pagination>\r\n </div>\r\n </div>\r\n <ng-template #buttonsAdd let-total=\"total\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.addCondition, { total: total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnAdd; context: { total: total }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsRemove let-i=\"i\" let-total=\"total\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.removeCondition, { index: i, total: total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnRemove; context: { i: i, total: total }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnAdd let-total=\"total\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'addLabel') || locale(Texts, 'AddItem')) as addLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n class=\"add-item\"\r\n (click)=\"evaluateWithEventAsHandler(component.addExpression, { total: total })\"\r\n icon=\"fa-plus\" iconPosition=\"start\">{{ addLabel }}</button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnRemove let-i=\"i\" let-total=\"total\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'removeLabel') || locale(Texts, 'RemoveItem')) as removeLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n class=\"remove-item\"\r\n (click)=\"evaluateWithEventAsHandler(component.removeExpression, { index: i, total: total })\"\r\n icon=\"fa-trash\" iconPosition=\"start\">{{ removeLabel }}<span class=\"sr-only\"> {{ itemPosition(i, total) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</div>\r\n\r\n",
|
|
10540
9442
|
styles: [
|
|
10541
|
-
".flex{display:flex}.field-set{align-items:start}.field-set>.col-host>*{margin-bottom:10px}.separator{border-bottom:2px solid #d9e4f7;width:100%;margin:10px 0}.group-outline{border:1px solid #d9e4f7;padding:15px;margin-top:2px;margin-bottom:2px}.group-outline-repeat{margin-top:8px;margin-bottom:8px}.valign-start>.row{align-items:start}.valign-center>.row{align-items:center}.valign-end>.row{align-items:end}.component-start{align-self:start}.component-center{align-self:center}.component-end{align-self:end}.text-paragraph p{margin-bottom:0!important}.sirio-tab.sirio-tab-vertical .sirio-tab-body{margin-left:10px;margin-right:10px}.sirio-tab:not(.sirio-tab-vertical) .sirio-tab-body{margin-top:10px;margin-bottom:10px}.sirio-label{cursor:default}.w-100{width:100%!important}.col-host .sirio-accordion .sirio-accordion-body .sirio-accordion-content{padding:16px}.sirio-dialog-title{display:flex;margin-top:0}.sirio-dialog-title span{margin-right:10px;margin-bottom:0!important}.
|
|
9443
|
+
".flex{display:flex}.field-set{align-items:start}.field-set>.col-host>*{margin-bottom:10px}.separator{border-bottom:2px solid #d9e4f7;width:100%;margin:10px 0}.group-outline{border:1px solid #d9e4f7;padding:15px;margin-top:2px;margin-bottom:2px}.group-outline-repeat{margin-top:8px;margin-bottom:8px}.valign-start>.row{align-items:start}.valign-center>.row{align-items:center}.valign-end>.row{align-items:end}.component-start{align-self:start}.component-center{align-self:center}.component-end{align-self:end}.text-paragraph p{margin-bottom:0!important}.sirio-tab.sirio-tab-vertical .sirio-tab-body{margin-left:10px;margin-right:10px}.sirio-tab:not(.sirio-tab-vertical) .sirio-tab-body{margin-top:10px;margin-bottom:10px}.sirio-label{cursor:default}.w-100{width:100%!important}.col-host .sirio-accordion .sirio-accordion-body .sirio-accordion-content{padding:16px}.sirio-dialog-title{display:flex;margin-top:0}.sirio-dialog-title span{margin-right:10px;margin-bottom:0!important}.sirio-tab.sirio-tab-scroll{display:block}.sirio-btn.add-item,.sirio-btn.remove-item{padding:.875rem .9375rem}.fp-data-grid .btn-small-group{display:flex;flex-wrap:nowrap;justify-content:center;align-items:center}.fp-data-grid .btn-small-group .btn-small.sirio-btn{flex:none;padding:.25rem .0625rem;margin:2px}ag-charts{display:block;height:100%;border-radius:8px;background-color:var(--chart-bg);border:1px solid var(--chart-border);overflow:hidden}.badge-header{display:flex;justify-content:space-between;align-items:center;width:100%;margin-right:10px}.badge-header .badge-header-tag{margin-left:10px}wm-sirio-datetime .sirio-datetime-row>.sirio-datetime-date,wm-sirio-datetime .sirio-datetime-row>.sirio-datetime-time{flex:1 1 0;min-width:0}.horizontal-left{display:flex;justify-content:left}.horizontal-center{display:flex;justify-content:center}.horizontal-right{display:flex;justify-content:right}.horizontal-fill button{width:100%}.horizontal-left legend,.horizontal-center legend,.horizontal-right legend,.horizontal-fill legend{float:none}.fp-link-button{background:none;border:0;padding:0;font-family:inherit;font-size:inherit;cursor:pointer}.fp-link-button:hover{color:#00368f;text-decoration:underline}\n",
|
|
10542
9444
|
".display-field .sirio-form-control.data-display{border-color:#e3e5e8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.display-field .sirio-form-control.data-display.textarea{white-space:pre;overflow:auto;height:auto;line-height:140%;min-height:3rem;padding:1rem}.display-field .sirio-form-control.data-display.text,.display-field .sirio-form-control:hover.data-display.text{overflow:auto;height:auto;margin-top:-6px;color:#454d56}.display-field .sirio-form-control.data-display.number{font-family:Roboto Mono,monospace}.display-field .sirio-form-control.data-display.checkbox{display:flex;justify-content:center;align-items:center}\n",
|
|
10543
9445
|
".light-readonly label:hover,.light-view div.sirio-label:hover{color:#454d56}.light-readonly input.sirio-form-control,.light-readonly .sirio-dropdown .sirio-dropdown-select,.light-readonly textarea.sirio-form-control,.light-view div.sirio-form-control{background:none!important;border:0px;padding-left:0}.light-readonly .sirio-input-group .sirio-input-group-text{background:none}.light-readonly .sirio-input-group .sirio-input-group-text span{color:#5b6571}.light-readonly .sirio-input-group .sirio-input-group-text.prefix{padding-left:0}wm-sirio-number.light-readonly .sirio-number-spinner{display:none}\n",
|
|
10544
9446
|
":root{--dynamiclist-border: 1px solid #ccc}.dynamiclist-no-data{text-align:center;padding:20px;font-style:italic;border:var(--dynamiclist-border)}.dynamiclist-table{width:100%;border-collapse:collapse;border:none}.dynamiclist-table.main{border:var(--dynamiclist-border)}.dynamiclist-table.main .dynamiclist-table{border-left:var(--dynamiclist-border);border-bottom:var(--dynamiclist-border)}.dynamiclist-table td{border:var(--dynamiclist-border)}.dynamiclist-table tr:first-child td{border-top:none}.dynamiclist-table tr:last-child td{border-bottom:none}.dynamiclist-table tr td:first-child{border-left:none}.dynamiclist-table tr td:last-child{border-right:none}.dynamiclist-table td.content-cell{width:100%;padding-left:8px;padding-right:8px;border-left:var(--dynamiclist-border)}.dynamiclist-table td.content-cell .group-outline-repeat{margin-bottom:0}.dynamiclist-table td.command-cell{vertical-align:middle}.dynamiclist-table td.command-cell>div{display:flex;justify-content:right}.dynamiclist-table td.recursion-cell .layout{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;width:100%;height:100%}.dynamiclist-table td.recursion-cell .recursion-toggle{grid-row:1 / span 2;grid-column:1;background-color:#f5f5f5;align-items:center}.dynamiclist-table td.recursion-cell .recursion-title{grid-row:1;grid-column:2;background:#f5f5f5;display:flex;align-items:center;min-height:34px}.dynamiclist-table td.recursion-cell .recursion-title .recursion-text{flex:1;text-align:center}.dynamiclist-table td.recursion-cell .recursion-title .recursion-add{margin-left:auto}.dynamiclist-table td.recursion-cell .recursion-content{grid-row:2;grid-column:2}.dynamiclist-table td.recursion-cell .recursion-content [data-sirio-visible=true]{overflow:visible!important}.dynamiclist-table .sirio-btn{padding:7px}\n",
|
|
@@ -10570,13 +9472,13 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10570
9472
|
},
|
|
10571
9473
|
{
|
|
10572
9474
|
kind: "directive",
|
|
10573
|
-
type: i1$
|
|
9475
|
+
type: i1$5.NgClass,
|
|
10574
9476
|
selector: "[ngClass]",
|
|
10575
9477
|
inputs: ["class", "ngClass"]
|
|
10576
9478
|
},
|
|
10577
9479
|
{
|
|
10578
9480
|
kind: "directive",
|
|
10579
|
-
type: i1$
|
|
9481
|
+
type: i1$5.NgForOf,
|
|
10580
9482
|
selector: "[ngFor][ngForOf]",
|
|
10581
9483
|
inputs: [
|
|
10582
9484
|
"ngForOf",
|
|
@@ -10586,7 +9488,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10586
9488
|
},
|
|
10587
9489
|
{
|
|
10588
9490
|
kind: "directive",
|
|
10589
|
-
type: i1$
|
|
9491
|
+
type: i1$5.NgIf,
|
|
10590
9492
|
selector: "[ngIf]",
|
|
10591
9493
|
inputs: [
|
|
10592
9494
|
"ngIf",
|
|
@@ -10596,7 +9498,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10596
9498
|
},
|
|
10597
9499
|
{
|
|
10598
9500
|
kind: "directive",
|
|
10599
|
-
type: i1$
|
|
9501
|
+
type: i1$5.NgTemplateOutlet,
|
|
10600
9502
|
selector: "[ngTemplateOutlet]",
|
|
10601
9503
|
inputs: [
|
|
10602
9504
|
"ngTemplateOutletContext",
|
|
@@ -10606,19 +9508,19 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10606
9508
|
},
|
|
10607
9509
|
{
|
|
10608
9510
|
kind: "directive",
|
|
10609
|
-
type: i1$
|
|
9511
|
+
type: i1$5.NgSwitch,
|
|
10610
9512
|
selector: "[ngSwitch]",
|
|
10611
9513
|
inputs: ["ngSwitch"]
|
|
10612
9514
|
},
|
|
10613
9515
|
{
|
|
10614
9516
|
kind: "directive",
|
|
10615
|
-
type: i1$
|
|
9517
|
+
type: i1$5.NgSwitchCase,
|
|
10616
9518
|
selector: "[ngSwitchCase]",
|
|
10617
9519
|
inputs: ["ngSwitchCase"]
|
|
10618
9520
|
},
|
|
10619
9521
|
{
|
|
10620
9522
|
kind: "directive",
|
|
10621
|
-
type: i1$
|
|
9523
|
+
type: i1$5.NgSwitchDefault,
|
|
10622
9524
|
selector: "[ngSwitchDefault]"
|
|
10623
9525
|
},
|
|
10624
9526
|
{
|
|
@@ -10627,23 +9529,23 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10627
9529
|
},
|
|
10628
9530
|
{
|
|
10629
9531
|
kind: "directive",
|
|
10630
|
-
type: i1$
|
|
9532
|
+
type: i1$2.NgControlStatus,
|
|
10631
9533
|
selector: "[formControlName],[ngModel],[formControl]"
|
|
10632
9534
|
},
|
|
10633
9535
|
{
|
|
10634
9536
|
kind: "directive",
|
|
10635
|
-
type: i1$
|
|
9537
|
+
type: i1$2.NgControlStatusGroup,
|
|
10636
9538
|
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
10637
9539
|
},
|
|
10638
9540
|
{
|
|
10639
9541
|
kind: "directive",
|
|
10640
|
-
type: i1$
|
|
9542
|
+
type: i1$2.MaxLengthValidator,
|
|
10641
9543
|
selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
|
|
10642
9544
|
inputs: ["maxlength"]
|
|
10643
9545
|
},
|
|
10644
9546
|
{
|
|
10645
9547
|
kind: "directive",
|
|
10646
|
-
type: i1$
|
|
9548
|
+
type: i1$2.FormGroupDirective,
|
|
10647
9549
|
selector: "[formGroup]",
|
|
10648
9550
|
inputs: ["formGroup"],
|
|
10649
9551
|
outputs: ["ngSubmit"],
|
|
@@ -10651,7 +9553,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10651
9553
|
},
|
|
10652
9554
|
{
|
|
10653
9555
|
kind: "directive",
|
|
10654
|
-
type: i1$
|
|
9556
|
+
type: i1$2.FormControlName,
|
|
10655
9557
|
selector: "[formControlName]",
|
|
10656
9558
|
inputs: [
|
|
10657
9559
|
"formControlName",
|
|
@@ -10662,13 +9564,13 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10662
9564
|
},
|
|
10663
9565
|
{
|
|
10664
9566
|
kind: "directive",
|
|
10665
|
-
type: i1$
|
|
9567
|
+
type: i1$2.FormGroupName,
|
|
10666
9568
|
selector: "[formGroupName]",
|
|
10667
9569
|
inputs: ["formGroupName"]
|
|
10668
9570
|
},
|
|
10669
9571
|
{
|
|
10670
9572
|
kind: "directive",
|
|
10671
|
-
type: i1$
|
|
9573
|
+
type: i1$2.FormArrayName,
|
|
10672
9574
|
selector: "[formArrayName]",
|
|
10673
9575
|
inputs: ["formArrayName"]
|
|
10674
9576
|
},
|
|
@@ -10689,20 +9591,6 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10689
9591
|
inputs: ["formGroup", "recursion"],
|
|
10690
9592
|
exportAs: ["recursion"]
|
|
10691
9593
|
},
|
|
10692
|
-
{
|
|
10693
|
-
kind: "directive",
|
|
10694
|
-
type: GridDirective,
|
|
10695
|
-
selector: "[rowSource], [columns], [selectable], [multiSelect], [suppressActions]",
|
|
10696
|
-
inputs: [
|
|
10697
|
-
"rowSource",
|
|
10698
|
-
"columns",
|
|
10699
|
-
"selectable",
|
|
10700
|
-
"multiSelect",
|
|
10701
|
-
"suppressActions",
|
|
10702
|
-
"formGroup",
|
|
10703
|
-
"register"
|
|
10704
|
-
]
|
|
10705
|
-
},
|
|
10706
9594
|
{
|
|
10707
9595
|
kind: "directive",
|
|
10708
9596
|
type: ChangeDirective,
|
|
@@ -10797,7 +9685,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10797
9685
|
kind: "directive",
|
|
10798
9686
|
type: MarkdownDirective,
|
|
10799
9687
|
selector: "[markdown]",
|
|
10800
|
-
inputs: ["
|
|
9688
|
+
inputs: ["markdown"]
|
|
10801
9689
|
},
|
|
10802
9690
|
{
|
|
10803
9691
|
kind: "component",
|
|
@@ -10823,6 +9711,8 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10823
9711
|
"padDecimals",
|
|
10824
9712
|
"grouping",
|
|
10825
9713
|
"showSpinner",
|
|
9714
|
+
"incrementLabel",
|
|
9715
|
+
"decrementLabel",
|
|
10826
9716
|
"step"
|
|
10827
9717
|
]
|
|
10828
9718
|
},
|
|
@@ -10834,6 +9724,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10834
9724
|
"rows",
|
|
10835
9725
|
"maxlength",
|
|
10836
9726
|
"showCounter",
|
|
9727
|
+
"emptyAsNull",
|
|
10837
9728
|
"textCase",
|
|
10838
9729
|
"textAlign"
|
|
10839
9730
|
]
|
|
@@ -10845,7 +9736,10 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10845
9736
|
inputs: [
|
|
10846
9737
|
"toggle",
|
|
10847
9738
|
"togglePosition",
|
|
10848
|
-
"inline"
|
|
9739
|
+
"inline",
|
|
9740
|
+
"trueLabel",
|
|
9741
|
+
"falseLabel",
|
|
9742
|
+
"nullOptionLabel"
|
|
10849
9743
|
]
|
|
10850
9744
|
},
|
|
10851
9745
|
{
|
|
@@ -10869,7 +9763,8 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10869
9763
|
"options",
|
|
10870
9764
|
"inline",
|
|
10871
9765
|
"chips",
|
|
10872
|
-
"compareWith"
|
|
9766
|
+
"compareWith",
|
|
9767
|
+
"nullOptionLabel"
|
|
10873
9768
|
]
|
|
10874
9769
|
},
|
|
10875
9770
|
{
|
|
@@ -10883,6 +9778,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10883
9778
|
"searchable",
|
|
10884
9779
|
"searchMinLength",
|
|
10885
9780
|
"noResultsText",
|
|
9781
|
+
"noDataText",
|
|
10886
9782
|
"loading",
|
|
10887
9783
|
"loadingText",
|
|
10888
9784
|
"resetLabel",
|
|
@@ -10908,7 +9804,8 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10908
9804
|
inputs: [
|
|
10909
9805
|
"valueType",
|
|
10910
9806
|
"hideOnFocus",
|
|
10911
|
-
"pickLevel"
|
|
9807
|
+
"pickLevel",
|
|
9808
|
+
"keyboardHint"
|
|
10912
9809
|
]
|
|
10913
9810
|
},
|
|
10914
9811
|
{
|
|
@@ -10927,7 +9824,8 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
10927
9824
|
"minuteStep",
|
|
10928
9825
|
"timeLabel",
|
|
10929
9826
|
"fieldLabels",
|
|
10930
|
-
"completeParts"
|
|
9827
|
+
"completeParts",
|
|
9828
|
+
"keyboardHint"
|
|
10931
9829
|
]
|
|
10932
9830
|
},
|
|
10933
9831
|
{
|
|
@@ -11060,6 +9958,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
11060
9958
|
"content",
|
|
11061
9959
|
"title",
|
|
11062
9960
|
"label",
|
|
9961
|
+
"labelledBy",
|
|
11063
9962
|
"placement"
|
|
11064
9963
|
]
|
|
11065
9964
|
},
|
|
@@ -11179,7 +10078,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
11179
10078
|
},
|
|
11180
10079
|
{
|
|
11181
10080
|
kind: "component",
|
|
11182
|
-
type: i1$
|
|
10081
|
+
type: i1$6.SirioDataGrid,
|
|
11183
10082
|
selector: "wm-sirio-data-grid",
|
|
11184
10083
|
inputs: [
|
|
11185
10084
|
"data",
|
|
@@ -11219,6 +10118,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
11219
10118
|
"grouping",
|
|
11220
10119
|
"expanded",
|
|
11221
10120
|
"rowExpandable",
|
|
10121
|
+
"expandAllTools",
|
|
11222
10122
|
"rowNumbers",
|
|
11223
10123
|
"selectOnRowClick",
|
|
11224
10124
|
"selectionColumn",
|
|
@@ -11283,6 +10183,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
11283
10183
|
"expandRowLabel",
|
|
11284
10184
|
"collapseRowLabel",
|
|
11285
10185
|
"resizeColumnLabel",
|
|
10186
|
+
"navigationHint",
|
|
11286
10187
|
"reorderHint",
|
|
11287
10188
|
"resizeHint",
|
|
11288
10189
|
"filterHint",
|
|
@@ -11326,7 +10227,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
11326
10227
|
},
|
|
11327
10228
|
{
|
|
11328
10229
|
kind: "component",
|
|
11329
|
-
type: i1$
|
|
10230
|
+
type: i1$6.SirioGridColumn,
|
|
11330
10231
|
selector: "wm-sirio-grid-column",
|
|
11331
10232
|
inputs: [
|
|
11332
10233
|
"field",
|
|
@@ -11366,7 +10267,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
11366
10267
|
},
|
|
11367
10268
|
{
|
|
11368
10269
|
kind: "directive",
|
|
11369
|
-
type: i1$
|
|
10270
|
+
type: i1$6.SirioGridCell,
|
|
11370
10271
|
selector: "ng-template[wmSirioGridCell]"
|
|
11371
10272
|
},
|
|
11372
10273
|
{
|
|
@@ -11375,430 +10276,6 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
11375
10276
|
selector: "fp-sirio-cell-host",
|
|
11376
10277
|
inputs: ["renderer", "params"]
|
|
11377
10278
|
},
|
|
11378
|
-
{
|
|
11379
|
-
kind: "component",
|
|
11380
|
-
type: AgGridAngular,
|
|
11381
|
-
selector: "ag-grid-angular",
|
|
11382
|
-
inputs: [
|
|
11383
|
-
"gridOptions",
|
|
11384
|
-
"modules",
|
|
11385
|
-
"statusBar",
|
|
11386
|
-
"sideBar",
|
|
11387
|
-
"suppressContextMenu",
|
|
11388
|
-
"preventDefaultOnContextMenu",
|
|
11389
|
-
"allowContextMenuWithControlKey",
|
|
11390
|
-
"columnMenu",
|
|
11391
|
-
"suppressMenuHide",
|
|
11392
|
-
"enableBrowserTooltips",
|
|
11393
|
-
"tooltipTrigger",
|
|
11394
|
-
"tooltipShowDelay",
|
|
11395
|
-
"tooltipHideDelay",
|
|
11396
|
-
"tooltipMouseTrack",
|
|
11397
|
-
"tooltipShowMode",
|
|
11398
|
-
"tooltipInteraction",
|
|
11399
|
-
"popupParent",
|
|
11400
|
-
"copyHeadersToClipboard",
|
|
11401
|
-
"copyGroupHeadersToClipboard",
|
|
11402
|
-
"clipboardDelimiter",
|
|
11403
|
-
"suppressCopyRowsToClipboard",
|
|
11404
|
-
"suppressCopySingleCellRanges",
|
|
11405
|
-
"suppressLastEmptyLineOnPaste",
|
|
11406
|
-
"suppressClipboardPaste",
|
|
11407
|
-
"suppressClipboardApi",
|
|
11408
|
-
"suppressCutToClipboard",
|
|
11409
|
-
"columnDefs",
|
|
11410
|
-
"defaultColDef",
|
|
11411
|
-
"defaultColGroupDef",
|
|
11412
|
-
"columnTypes",
|
|
11413
|
-
"dataTypeDefinitions",
|
|
11414
|
-
"maintainColumnOrder",
|
|
11415
|
-
"enableStrictPivotColumnOrder",
|
|
11416
|
-
"suppressFieldDotNotation",
|
|
11417
|
-
"headerHeight",
|
|
11418
|
-
"groupHeaderHeight",
|
|
11419
|
-
"floatingFiltersHeight",
|
|
11420
|
-
"pivotHeaderHeight",
|
|
11421
|
-
"pivotGroupHeaderHeight",
|
|
11422
|
-
"allowDragFromColumnsToolPanel",
|
|
11423
|
-
"suppressMovableColumns",
|
|
11424
|
-
"suppressColumnMoveAnimation",
|
|
11425
|
-
"suppressMoveWhenColumnDragging",
|
|
11426
|
-
"suppressDragLeaveHidesColumns",
|
|
11427
|
-
"suppressGroupChangesColumnVisibility",
|
|
11428
|
-
"suppressMakeColumnVisibleAfterUnGroup",
|
|
11429
|
-
"suppressRowGroupHidesColumns",
|
|
11430
|
-
"colResizeDefault",
|
|
11431
|
-
"suppressAutoSize",
|
|
11432
|
-
"autoSizePadding",
|
|
11433
|
-
"skipHeaderOnAutoSize",
|
|
11434
|
-
"autoSizeStrategy",
|
|
11435
|
-
"components",
|
|
11436
|
-
"editType",
|
|
11437
|
-
"singleClickEdit",
|
|
11438
|
-
"suppressClickEdit",
|
|
11439
|
-
"readOnlyEdit",
|
|
11440
|
-
"stopEditingWhenCellsLoseFocus",
|
|
11441
|
-
"enterNavigatesVertically",
|
|
11442
|
-
"enterNavigatesVerticallyAfterEdit",
|
|
11443
|
-
"enableCellEditingOnBackspace",
|
|
11444
|
-
"undoRedoCellEditing",
|
|
11445
|
-
"undoRedoCellEditingLimit",
|
|
11446
|
-
"defaultCsvExportParams",
|
|
11447
|
-
"suppressCsvExport",
|
|
11448
|
-
"defaultExcelExportParams",
|
|
11449
|
-
"suppressExcelExport",
|
|
11450
|
-
"excelStyles",
|
|
11451
|
-
"findSearchValue",
|
|
11452
|
-
"findOptions",
|
|
11453
|
-
"quickFilterText",
|
|
11454
|
-
"cacheQuickFilter",
|
|
11455
|
-
"includeHiddenColumnsInQuickFilter",
|
|
11456
|
-
"quickFilterParser",
|
|
11457
|
-
"quickFilterMatcher",
|
|
11458
|
-
"applyQuickFilterBeforePivotOrAgg",
|
|
11459
|
-
"excludeChildrenWhenTreeDataFiltering",
|
|
11460
|
-
"enableAdvancedFilter",
|
|
11461
|
-
"alwaysPassFilter",
|
|
11462
|
-
"includeHiddenColumnsInAdvancedFilter",
|
|
11463
|
-
"advancedFilterParent",
|
|
11464
|
-
"advancedFilterBuilderParams",
|
|
11465
|
-
"suppressAdvancedFilterEval",
|
|
11466
|
-
"suppressSetFilterByDefault",
|
|
11467
|
-
"enableCharts",
|
|
11468
|
-
"chartThemes",
|
|
11469
|
-
"customChartThemes",
|
|
11470
|
-
"chartThemeOverrides",
|
|
11471
|
-
"chartToolPanelsDef",
|
|
11472
|
-
"chartMenuItems",
|
|
11473
|
-
"loadingCellRenderer",
|
|
11474
|
-
"loadingCellRendererParams",
|
|
11475
|
-
"loadingCellRendererSelector",
|
|
11476
|
-
"localeText",
|
|
11477
|
-
"masterDetail",
|
|
11478
|
-
"keepDetailRows",
|
|
11479
|
-
"keepDetailRowsCount",
|
|
11480
|
-
"detailCellRenderer",
|
|
11481
|
-
"detailCellRendererParams",
|
|
11482
|
-
"detailRowHeight",
|
|
11483
|
-
"detailRowAutoHeight",
|
|
11484
|
-
"context",
|
|
11485
|
-
"alignedGrids",
|
|
11486
|
-
"tabIndex",
|
|
11487
|
-
"rowBuffer",
|
|
11488
|
-
"valueCache",
|
|
11489
|
-
"valueCacheNeverExpires",
|
|
11490
|
-
"enableCellExpressions",
|
|
11491
|
-
"suppressTouch",
|
|
11492
|
-
"suppressFocusAfterRefresh",
|
|
11493
|
-
"suppressBrowserResizeObserver",
|
|
11494
|
-
"suppressPropertyNamesCheck",
|
|
11495
|
-
"suppressChangeDetection",
|
|
11496
|
-
"debug",
|
|
11497
|
-
"loading",
|
|
11498
|
-
"overlayLoadingTemplate",
|
|
11499
|
-
"loadingOverlayComponent",
|
|
11500
|
-
"loadingOverlayComponentParams",
|
|
11501
|
-
"suppressLoadingOverlay",
|
|
11502
|
-
"overlayNoRowsTemplate",
|
|
11503
|
-
"noRowsOverlayComponent",
|
|
11504
|
-
"noRowsOverlayComponentParams",
|
|
11505
|
-
"suppressNoRowsOverlay",
|
|
11506
|
-
"pagination",
|
|
11507
|
-
"paginationPageSize",
|
|
11508
|
-
"paginationPageSizeSelector",
|
|
11509
|
-
"paginationAutoPageSize",
|
|
11510
|
-
"paginateChildRows",
|
|
11511
|
-
"suppressPaginationPanel",
|
|
11512
|
-
"pivotMode",
|
|
11513
|
-
"pivotPanelShow",
|
|
11514
|
-
"pivotMaxGeneratedColumns",
|
|
11515
|
-
"pivotDefaultExpanded",
|
|
11516
|
-
"pivotColumnGroupTotals",
|
|
11517
|
-
"pivotRowTotals",
|
|
11518
|
-
"pivotSuppressAutoColumn",
|
|
11519
|
-
"suppressExpandablePivotGroups",
|
|
11520
|
-
"functionsReadOnly",
|
|
11521
|
-
"aggFuncs",
|
|
11522
|
-
"suppressAggFuncInHeader",
|
|
11523
|
-
"alwaysAggregateAtRootLevel",
|
|
11524
|
-
"aggregateOnlyChangedColumns",
|
|
11525
|
-
"suppressAggFilteredOnly",
|
|
11526
|
-
"removePivotHeaderRowWhenSingleValueColumn",
|
|
11527
|
-
"animateRows",
|
|
11528
|
-
"cellFlashDuration",
|
|
11529
|
-
"cellFadeDuration",
|
|
11530
|
-
"allowShowChangeAfterFilter",
|
|
11531
|
-
"domLayout",
|
|
11532
|
-
"ensureDomOrder",
|
|
11533
|
-
"enableCellSpan",
|
|
11534
|
-
"enableRtl",
|
|
11535
|
-
"suppressColumnVirtualisation",
|
|
11536
|
-
"suppressMaxRenderedRowRestriction",
|
|
11537
|
-
"suppressRowVirtualisation",
|
|
11538
|
-
"rowDragManaged",
|
|
11539
|
-
"suppressRowDrag",
|
|
11540
|
-
"suppressMoveWhenRowDragging",
|
|
11541
|
-
"rowDragEntireRow",
|
|
11542
|
-
"rowDragMultiRow",
|
|
11543
|
-
"rowDragText",
|
|
11544
|
-
"dragAndDropImageComponent",
|
|
11545
|
-
"dragAndDropImageComponentParams",
|
|
11546
|
-
"fullWidthCellRenderer",
|
|
11547
|
-
"fullWidthCellRendererParams",
|
|
11548
|
-
"embedFullWidthRows",
|
|
11549
|
-
"groupDisplayType",
|
|
11550
|
-
"groupDefaultExpanded",
|
|
11551
|
-
"autoGroupColumnDef",
|
|
11552
|
-
"groupMaintainOrder",
|
|
11553
|
-
"groupSelectsChildren",
|
|
11554
|
-
"groupLockGroupColumns",
|
|
11555
|
-
"groupAggFiltering",
|
|
11556
|
-
"groupTotalRow",
|
|
11557
|
-
"grandTotalRow",
|
|
11558
|
-
"suppressStickyTotalRow",
|
|
11559
|
-
"groupSuppressBlankHeader",
|
|
11560
|
-
"groupSelectsFiltered",
|
|
11561
|
-
"showOpenedGroup",
|
|
11562
|
-
"groupHideParentOfSingleChild",
|
|
11563
|
-
"groupRemoveSingleChildren",
|
|
11564
|
-
"groupRemoveLowestSingleChildren",
|
|
11565
|
-
"groupHideOpenParents",
|
|
11566
|
-
"groupAllowUnbalanced",
|
|
11567
|
-
"rowGroupPanelShow",
|
|
11568
|
-
"groupRowRenderer",
|
|
11569
|
-
"groupRowRendererParams",
|
|
11570
|
-
"treeData",
|
|
11571
|
-
"treeDataChildrenField",
|
|
11572
|
-
"treeDataParentIdField",
|
|
11573
|
-
"rowGroupPanelSuppressSort",
|
|
11574
|
-
"suppressGroupRowsSticky",
|
|
11575
|
-
"pinnedTopRowData",
|
|
11576
|
-
"pinnedBottomRowData",
|
|
11577
|
-
"enableRowPinning",
|
|
11578
|
-
"isRowPinnable",
|
|
11579
|
-
"isRowPinned",
|
|
11580
|
-
"rowModelType",
|
|
11581
|
-
"rowData",
|
|
11582
|
-
"asyncTransactionWaitMillis",
|
|
11583
|
-
"suppressModelUpdateAfterUpdateTransaction",
|
|
11584
|
-
"datasource",
|
|
11585
|
-
"cacheOverflowSize",
|
|
11586
|
-
"infiniteInitialRowCount",
|
|
11587
|
-
"serverSideInitialRowCount",
|
|
11588
|
-
"suppressServerSideFullWidthLoadingRow",
|
|
11589
|
-
"cacheBlockSize",
|
|
11590
|
-
"maxBlocksInCache",
|
|
11591
|
-
"maxConcurrentDatasourceRequests",
|
|
11592
|
-
"blockLoadDebounceMillis",
|
|
11593
|
-
"purgeClosedRowNodes",
|
|
11594
|
-
"serverSideDatasource",
|
|
11595
|
-
"serverSideSortAllLevels",
|
|
11596
|
-
"serverSideEnableClientSideSort",
|
|
11597
|
-
"serverSideOnlyRefreshFilteredGroups",
|
|
11598
|
-
"serverSidePivotResultFieldSeparator",
|
|
11599
|
-
"viewportDatasource",
|
|
11600
|
-
"viewportRowModelPageSize",
|
|
11601
|
-
"viewportRowModelBufferSize",
|
|
11602
|
-
"alwaysShowHorizontalScroll",
|
|
11603
|
-
"alwaysShowVerticalScroll",
|
|
11604
|
-
"debounceVerticalScrollbar",
|
|
11605
|
-
"suppressHorizontalScroll",
|
|
11606
|
-
"suppressScrollOnNewData",
|
|
11607
|
-
"suppressScrollWhenPopupsAreOpen",
|
|
11608
|
-
"suppressAnimationFrame",
|
|
11609
|
-
"suppressMiddleClickScrolls",
|
|
11610
|
-
"suppressPreventDefaultOnMouseWheel",
|
|
11611
|
-
"scrollbarWidth",
|
|
11612
|
-
"rowSelection",
|
|
11613
|
-
"cellSelection",
|
|
11614
|
-
"rowMultiSelectWithClick",
|
|
11615
|
-
"suppressRowDeselection",
|
|
11616
|
-
"suppressRowClickSelection",
|
|
11617
|
-
"suppressCellFocus",
|
|
11618
|
-
"suppressHeaderFocus",
|
|
11619
|
-
"selectionColumnDef",
|
|
11620
|
-
"rowNumbers",
|
|
11621
|
-
"suppressMultiRangeSelection",
|
|
11622
|
-
"enableCellTextSelection",
|
|
11623
|
-
"enableRangeSelection",
|
|
11624
|
-
"enableRangeHandle",
|
|
11625
|
-
"enableFillHandle",
|
|
11626
|
-
"fillHandleDirection",
|
|
11627
|
-
"suppressClearOnFillReduction",
|
|
11628
|
-
"sortingOrder",
|
|
11629
|
-
"accentedSort",
|
|
11630
|
-
"unSortIcon",
|
|
11631
|
-
"suppressMultiSort",
|
|
11632
|
-
"alwaysMultiSort",
|
|
11633
|
-
"multiSortKey",
|
|
11634
|
-
"suppressMaintainUnsortedOrder",
|
|
11635
|
-
"icons",
|
|
11636
|
-
"rowHeight",
|
|
11637
|
-
"rowStyle",
|
|
11638
|
-
"rowClass",
|
|
11639
|
-
"rowClassRules",
|
|
11640
|
-
"suppressRowHoverHighlight",
|
|
11641
|
-
"suppressRowTransform",
|
|
11642
|
-
"columnHoverHighlight",
|
|
11643
|
-
"gridId",
|
|
11644
|
-
"deltaSort",
|
|
11645
|
-
"treeDataDisplayType",
|
|
11646
|
-
"enableGroupEdit",
|
|
11647
|
-
"initialState",
|
|
11648
|
-
"theme",
|
|
11649
|
-
"loadThemeGoogleFonts",
|
|
11650
|
-
"themeCssLayer",
|
|
11651
|
-
"styleNonce",
|
|
11652
|
-
"themeStyleContainer",
|
|
11653
|
-
"getContextMenuItems",
|
|
11654
|
-
"getMainMenuItems",
|
|
11655
|
-
"postProcessPopup",
|
|
11656
|
-
"processUnpinnedColumns",
|
|
11657
|
-
"processCellForClipboard",
|
|
11658
|
-
"processHeaderForClipboard",
|
|
11659
|
-
"processGroupHeaderForClipboard",
|
|
11660
|
-
"processCellFromClipboard",
|
|
11661
|
-
"sendToClipboard",
|
|
11662
|
-
"processDataFromClipboard",
|
|
11663
|
-
"isExternalFilterPresent",
|
|
11664
|
-
"doesExternalFilterPass",
|
|
11665
|
-
"getChartToolbarItems",
|
|
11666
|
-
"createChartContainer",
|
|
11667
|
-
"focusGridInnerElement",
|
|
11668
|
-
"navigateToNextHeader",
|
|
11669
|
-
"tabToNextHeader",
|
|
11670
|
-
"navigateToNextCell",
|
|
11671
|
-
"tabToNextCell",
|
|
11672
|
-
"getLocaleText",
|
|
11673
|
-
"getDocument",
|
|
11674
|
-
"paginationNumberFormatter",
|
|
11675
|
-
"getGroupRowAgg",
|
|
11676
|
-
"isGroupOpenByDefault",
|
|
11677
|
-
"initialGroupOrderComparator",
|
|
11678
|
-
"processPivotResultColDef",
|
|
11679
|
-
"processPivotResultColGroupDef",
|
|
11680
|
-
"getDataPath",
|
|
11681
|
-
"getChildCount",
|
|
11682
|
-
"getServerSideGroupLevelParams",
|
|
11683
|
-
"isServerSideGroupOpenByDefault",
|
|
11684
|
-
"isApplyServerSideTransaction",
|
|
11685
|
-
"isServerSideGroup",
|
|
11686
|
-
"getServerSideGroupKey",
|
|
11687
|
-
"getBusinessKeyForNode",
|
|
11688
|
-
"getRowId",
|
|
11689
|
-
"resetRowDataOnUpdate",
|
|
11690
|
-
"processRowPostCreate",
|
|
11691
|
-
"isRowSelectable",
|
|
11692
|
-
"isRowMaster",
|
|
11693
|
-
"fillOperation",
|
|
11694
|
-
"postSortRows",
|
|
11695
|
-
"getRowStyle",
|
|
11696
|
-
"getRowClass",
|
|
11697
|
-
"getRowHeight",
|
|
11698
|
-
"isFullWidthRow"
|
|
11699
|
-
],
|
|
11700
|
-
outputs: [
|
|
11701
|
-
"toolPanelVisibleChanged",
|
|
11702
|
-
"toolPanelSizeChanged",
|
|
11703
|
-
"columnMenuVisibleChanged",
|
|
11704
|
-
"contextMenuVisibleChanged",
|
|
11705
|
-
"cutStart",
|
|
11706
|
-
"cutEnd",
|
|
11707
|
-
"pasteStart",
|
|
11708
|
-
"pasteEnd",
|
|
11709
|
-
"columnVisible",
|
|
11710
|
-
"columnPinned",
|
|
11711
|
-
"columnResized",
|
|
11712
|
-
"columnMoved",
|
|
11713
|
-
"columnValueChanged",
|
|
11714
|
-
"columnPivotModeChanged",
|
|
11715
|
-
"columnPivotChanged",
|
|
11716
|
-
"columnGroupOpened",
|
|
11717
|
-
"newColumnsLoaded",
|
|
11718
|
-
"gridColumnsChanged",
|
|
11719
|
-
"displayedColumnsChanged",
|
|
11720
|
-
"virtualColumnsChanged",
|
|
11721
|
-
"columnEverythingChanged",
|
|
11722
|
-
"columnHeaderMouseOver",
|
|
11723
|
-
"columnHeaderMouseLeave",
|
|
11724
|
-
"columnHeaderClicked",
|
|
11725
|
-
"columnHeaderContextMenu",
|
|
11726
|
-
"componentStateChanged",
|
|
11727
|
-
"cellValueChanged",
|
|
11728
|
-
"cellEditRequest",
|
|
11729
|
-
"rowValueChanged",
|
|
11730
|
-
"cellEditingStarted",
|
|
11731
|
-
"cellEditingStopped",
|
|
11732
|
-
"rowEditingStarted",
|
|
11733
|
-
"rowEditingStopped",
|
|
11734
|
-
"undoStarted",
|
|
11735
|
-
"undoEnded",
|
|
11736
|
-
"redoStarted",
|
|
11737
|
-
"redoEnded",
|
|
11738
|
-
"cellSelectionDeleteStart",
|
|
11739
|
-
"cellSelectionDeleteEnd",
|
|
11740
|
-
"rangeDeleteStart",
|
|
11741
|
-
"rangeDeleteEnd",
|
|
11742
|
-
"fillStart",
|
|
11743
|
-
"fillEnd",
|
|
11744
|
-
"filterOpened",
|
|
11745
|
-
"filterChanged",
|
|
11746
|
-
"filterModified",
|
|
11747
|
-
"advancedFilterBuilderVisibleChanged",
|
|
11748
|
-
"findChanged",
|
|
11749
|
-
"chartCreated",
|
|
11750
|
-
"chartRangeSelectionChanged",
|
|
11751
|
-
"chartOptionsChanged",
|
|
11752
|
-
"chartDestroyed",
|
|
11753
|
-
"cellKeyDown",
|
|
11754
|
-
"gridReady",
|
|
11755
|
-
"firstDataRendered",
|
|
11756
|
-
"gridSizeChanged",
|
|
11757
|
-
"modelUpdated",
|
|
11758
|
-
"virtualRowRemoved",
|
|
11759
|
-
"viewportChanged",
|
|
11760
|
-
"bodyScroll",
|
|
11761
|
-
"bodyScrollEnd",
|
|
11762
|
-
"dragStarted",
|
|
11763
|
-
"dragStopped",
|
|
11764
|
-
"dragCancelled",
|
|
11765
|
-
"stateUpdated",
|
|
11766
|
-
"paginationChanged",
|
|
11767
|
-
"rowDragEnter",
|
|
11768
|
-
"rowDragMove",
|
|
11769
|
-
"rowDragLeave",
|
|
11770
|
-
"rowDragEnd",
|
|
11771
|
-
"rowDragCancel",
|
|
11772
|
-
"rowResizeStarted",
|
|
11773
|
-
"rowResizeEnded",
|
|
11774
|
-
"columnRowGroupChanged",
|
|
11775
|
-
"rowGroupOpened",
|
|
11776
|
-
"expandOrCollapseAll",
|
|
11777
|
-
"pivotMaxColumnsExceeded",
|
|
11778
|
-
"pinnedRowDataChanged",
|
|
11779
|
-
"pinnedRowsChanged",
|
|
11780
|
-
"rowDataUpdated",
|
|
11781
|
-
"asyncTransactionsFlushed",
|
|
11782
|
-
"storeRefreshed",
|
|
11783
|
-
"headerFocused",
|
|
11784
|
-
"cellClicked",
|
|
11785
|
-
"cellDoubleClicked",
|
|
11786
|
-
"cellFocused",
|
|
11787
|
-
"cellMouseOver",
|
|
11788
|
-
"cellMouseOut",
|
|
11789
|
-
"cellMouseDown",
|
|
11790
|
-
"rowClicked",
|
|
11791
|
-
"rowDoubleClicked",
|
|
11792
|
-
"rowSelected",
|
|
11793
|
-
"selectionChanged",
|
|
11794
|
-
"cellContextMenu",
|
|
11795
|
-
"rangeSelectionChanged",
|
|
11796
|
-
"cellSelectionChanged",
|
|
11797
|
-
"tooltipShow",
|
|
11798
|
-
"tooltipHide",
|
|
11799
|
-
"sortChanged"
|
|
11800
|
-
]
|
|
11801
|
-
},
|
|
11802
10279
|
{
|
|
11803
10280
|
kind: "component",
|
|
11804
10281
|
type: AgCharts,
|
|
@@ -11808,7 +10285,7 @@ var DynamicFieldsComponent = class DynamicFieldsComponent {
|
|
|
11808
10285
|
},
|
|
11809
10286
|
{
|
|
11810
10287
|
kind: "pipe",
|
|
11811
|
-
type: i1$
|
|
10288
|
+
type: i1$5.AsyncPipe,
|
|
11812
10289
|
name: "async"
|
|
11813
10290
|
}
|
|
11814
10291
|
],
|
|
@@ -11831,7 +10308,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11831
10308
|
FormsModule,
|
|
11832
10309
|
FrameSecurityDirective,
|
|
11833
10310
|
RecursionDirective,
|
|
11834
|
-
GridDirective,
|
|
11835
10311
|
ChangeDirective,
|
|
11836
10312
|
RegisterDirective,
|
|
11837
10313
|
RefreshDirective,
|
|
@@ -11878,22 +10354,20 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11878
10354
|
DynamicHostComponent,
|
|
11879
10355
|
SIRIO_DATA_GRID,
|
|
11880
10356
|
SirioCellHostComponent,
|
|
11881
|
-
AgGridAngular,
|
|
11882
10357
|
AgCharts
|
|
11883
10358
|
],
|
|
11884
10359
|
providers: [
|
|
11885
10360
|
RegisterService,
|
|
11886
10361
|
ProgrammabilityService,
|
|
11887
|
-
GridService,
|
|
11888
10362
|
SirioGridService,
|
|
11889
10363
|
ChartService,
|
|
11890
10364
|
provideSirioValidationPresenter(formPlayerValidationPresenter)
|
|
11891
10365
|
],
|
|
11892
10366
|
encapsulation: ViewEncapsulation.None,
|
|
11893
10367
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11894
|
-
template: "<div [ngClass]=\"getFormClass()\">\r\n <ng-container *ngFor=\"let row of rows\" [formGroup]=\"formGroup\">\r\n <div class=\"row field-set\">\r\n <ng-container *ngFor=\"let component of row.components\">\r\n <ng-container [ngSwitch]=\"component.type\">\r\n <div [ngClass]=\"getComponentClass(component)\"\r\n [style]=\"getComponentStyle(component)\"\r\n [ngAttrs]=\"getComponentAttrs(component)\"\r\n *ngIf=\"shouldRender(component)\">\r\n <div *ngIf=\"canShow(component)\">\r\n <!-- #region textfield -->\r\n <ng-container *ngSwitchCase=\"'textfield'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-textbox type=\"text\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [prefix]=\"evaluateString(component.appearance?.prefixAdorner) || ''\"\r\n [suffix]=\"evaluateString(component.appearance?.suffixAdorner) || ''\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textCase]=\"toTextCase(component.textCase)\"\r\n [maxlength]=\"evaluateNumber(component.maxLength)\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #textfield\r\n [register]=\"component\"\r\n [componentRef]=\"textfield\">\r\n </wm-sirio-textbox>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region select -->\r\n <ng-container *ngSwitchCase=\"'select'\" [formGroup]=\"resolvePath(component.path)\">\r\n @let selectValues = getSirioValues(component);\r\n @let selectOptions = selectValues.values$ | async;\r\n <!-- @wemake4u/form-controls: strict = the value must be one of the options (was the dropdown directive);\r\n searchable shows the selection in the search field (was prefillSearch).\r\n Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-select\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(selectOptions)\"\r\n [loading]=\"selectValues.state.loading\"\r\n [loadingText]=\"locale(Texts, 'Loading')\"\r\n [searchable]=\"component.searchable\"\r\n [strict]=\"true\"\r\n (optionSelected)=\"selectionChanged(component, $event)\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #select\r\n [register]=\"component\"\r\n [componentRef]=\"select\">\r\n </wm-sirio-select>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region taglist -->\r\n <ng-container *ngSwitchCase=\"'taglist'\" [formGroup]=\"resolvePath(component.path)\">\r\n @let taglistValues = getSirioValues(component);\r\n @let taglistOptions = taglistValues.values$ | async;\r\n <!-- @wemake4u/form-controls: multiple select with \"select all\" and the \"n selected\" summary\r\n (was the tag directive). Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-select\r\n multiple\r\n selectAll\r\n [selectAllLabel]=\"locale(Texts, 'SelectAll')\"\r\n [maxVisibleSelections]=\"component.maxVisibleTags\"\r\n [selectionSummary]=\"sirioSelectionSummary\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(taglistOptions)\"\r\n [loading]=\"taglistValues.state.loading\"\r\n [loadingText]=\"locale(Texts, 'Loading')\"\r\n [searchable]=\"component.searchable\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #taglist\r\n [register]=\"component\"\r\n [componentRef]=\"taglist\">\r\n </wm-sirio-select>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region number -->\r\n <ng-container *ngSwitchCase=\"'number'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-number\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [prefix]=\"evaluateString(component.appearance?.prefixAdorner) || ''\"\r\n [suffix]=\"evaluateString(component.appearance?.suffixAdorner) || ''\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [defaultValue]=\"evaluateNumber(component.defaultValue)\"\r\n [min]=\"evaluateNumber(component.minimum)\"\r\n [max]=\"evaluateNumber(component.maximum)\"\r\n [decimals]=\"evaluateNumber(component.decimalDigits)\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #number\r\n [register]=\"component\"\r\n [componentRef]=\"number\">\r\n </wm-sirio-number>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region datetime -->\r\n <ng-container *ngSwitchCase=\"'datetime'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: date 'yyyy-MM-dd', time 'HH:mm', date and time 'yyyy-MM-ddTHH:mm:ss'.\r\n min/max only limit the pickers (typed values outside are moved to the nearest limit).\r\n Errors/warnings come from the validation presenter. -->\r\n <ng-container [ngSwitch]=\"component.subtype\">\r\n <!-- #region date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <wm-sirio-date\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaDateLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'dateLabel'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [pickLevel]=\"component.pick || 'date'\"\r\n [min]=\"evaluateString(component.range?.min) || null\"\r\n [max]=\"evaluateString(component.range?.max) || null\"\r\n [hideOnFocus]=\"evaluateBoolean(component.hideOnFocus)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #date\r\n [register]=\"component\"\r\n [componentRef]=\"date\">\r\n </wm-sirio-date>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region time -->\r\n <ng-container *ngSwitchCase=\"'time'\">\r\n <wm-sirio-time\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaTimeLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'timeLabel'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [minuteStep]=\"component.timeInterval || 1\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #time\r\n [register]=\"component\"\r\n [componentRef]=\"time\">\r\n </wm-sirio-time>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region datetime -->\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <!-- fieldLabels: dateLabel above the date, timeLabel above the time (as before);\r\n completeParts: date only -> 00:00, time only -> today (was the dateTimeCoordinator). -->\r\n <wm-sirio-datetime\r\n valueType=\"iso-seconds\"\r\n fieldLabels\r\n completeParts\r\n [label]=\"evaluateLabel(locale(component, 'dateLabel'), component)\"\r\n [timeLabel]=\"evaluateString(locale(component, 'timeLabel'))\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [min]=\"evaluateString(component.range?.min) || null\"\r\n [max]=\"evaluateString(component.range?.max) || null\"\r\n [hideOnFocus]=\"evaluateBoolean(component.hideOnFocus)\"\r\n [minuteStep]=\"component.timeInterval || 1\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #datetime\r\n [register]=\"component\"\r\n [componentRef]=\"datetime\">\r\n </wm-sirio-datetime>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region checkbox -->\r\n <ng-container *ngSwitchCase=\"'checkbox'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: checkbox and toggle (subtype 'toggle'); the markdown label is projected\r\n inside the kit <label> as inline HTML. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-checkbox\r\n [toggle]=\"component.subtype === 'toggle'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #checkbox\r\n [register]=\"component\"\r\n [componentRef]=\"checkbox\"><span [innerHTML]=\"toInlineHTML(evaluateTemplate(locale(component, 'label')))\"></span></wm-sirio-checkbox>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region radio -->\r\n <ng-container *ngSwitchCase=\"'radio'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: radio buttons and chips (subtype 'chip'); markdown option labels are\r\n rendered inline inside the kit <label>. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-radio-group\r\n [chips]=\"component.subtype === 'chip'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(getValues(component) | async)\"\r\n [inline]=\"component.displayInline\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #radio\r\n [register]=\"component\"\r\n [componentRef]=\"radio\">\r\n <ng-template wmSirioOptionLabel let-option><span [innerHTML]=\"toInlineHTML(evaluateTemplate(option.label))\"></span></ng-template>\r\n </wm-sirio-radio-group>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region checklist -->\r\n <ng-container *ngSwitchCase=\"'checklist'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: checkbox list and chips (subtype 'chip'); markdown option labels are\r\n rendered inline inside the kit <label>. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-checklist\r\n [chips]=\"component.subtype === 'chip'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(getValues(component) | async)\"\r\n [inline]=\"component.displayInline\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #checklist\r\n [register]=\"component\"\r\n [componentRef]=\"checklist\">\r\n <ng-template wmSirioOptionLabel let-option><span [innerHTML]=\"toInlineHTML(evaluateTemplate(option.label))\"></span></ng-template>\r\n </wm-sirio-checklist>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region textarea -->\r\n <ng-container *ngSwitchCase=\"'textarea'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-textarea\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textCase]=\"toTextCase(component.textCase)\"\r\n [maxlength]=\"evaluateNumber(component.maxLength)\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #textarea\r\n [register]=\"component\"\r\n [componentRef]=\"textarea\">\r\n </wm-sirio-textarea>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region filepicker -->\r\n <ng-container *ngSwitchCase=\"'filepicker'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers);\r\n upload, delete and download of the stored files are handled by the control. -->\r\n <wm-sirio-file-upload class=\"w-100\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [buttonLabel]=\"evaluateString(locale(component, 'text')) || locale(Texts, 'Upload')\"\r\n [accept]=\"getMimeTypes(component.accept)\"\r\n [multiple]=\"evaluateBoolean(component.multiple)\"\r\n valueType=\"array\"\r\n details\r\n downloadable\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [instantUpload]=\"evaluateBoolean(component.instantUpload)\"\r\n [uploadHandler]=\"evaluate(component.uploadHandler)\"\r\n [deleteHandler]=\"evaluate(component.deleteHandler)\"\r\n [downloadHandler]=\"evaluate(component.downloadHandler)\"\r\n [removeLabel]=\"locale(Texts, 'Remove')\"\r\n [downloadLabel]=\"locale(Texts, 'Download')\"\r\n [uploadingLabel]=\"locale(Texts, 'Uploading')\"\r\n [deletingLabel]=\"locale(Texts, 'Deleting')\"\r\n [downloadingLabel]=\"locale(Texts, 'Downloading')\"\r\n [formControlName]=\"component.key\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n (filesAdded)=\"filesAdded($event, filepicker)\"\r\n (fileError)=\"fileError($event)\"\r\n #filepicker\r\n [register]=\"component\"\r\n [componentRef]=\"filepicker\">\r\n </wm-sirio-file-upload>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region range -->\r\n <ng-container *ngSwitchCase=\"'range'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-slider\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [min]=\"evaluateNumber(component.range?.min) ?? 0\"\r\n [max]=\"evaluateNumber(component.range?.max) ?? 0\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #range\r\n [register]=\"component\"\r\n [componentRef]=\"range\">\r\n </wm-sirio-slider>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region displayfield -->\r\n <ng-container *ngSwitchCase=\"'displayfield'\">\r\n <div class=\"display-field\"\r\n #displayfield\r\n [register]=\"component\"\r\n [componentRef]=\"displayfield\">\r\n <div *ngIf=\"component.label\" class=\"sirio-label\">\r\n {{ evaluateString(locale(component, 'label')) }}\r\n <!-- @wemake4u/form-controls: kit info button with popover, as next to the labels of the controls. -->\r\n <wm-sirio-info-button *ngIf=\"component.tooltip\"\r\n [content]=\"evaluateString(locale(component, 'tooltip'))\"\r\n [title]=\"evaluateString(locale(component, 'label'))\"\r\n [label]=\"locale(Texts, 'InformationAbout') + ' ' + evaluateString(locale(component, 'ariaLabel') || locale(component, 'label'))\"></wm-sirio-info-button>\r\n </div>\r\n <div [class.sirio-form-control]=\"component.fieldtype !== 'filelist'\"\r\n [style.text-align]=\"component.fieldtype !== 'filelist' ? (component.textAlign || null) : null\"\r\n class=\"data-display\" [ngClass]=\"component.fieldtype\">\r\n <ng-container [ngSwitch]=\"component.fieldtype\">\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <ng-container *ngTemplateOutlet=\"formattedTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'filelist'\">\r\n <ng-container *ngTemplateOutlet=\"filelistTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"defaultTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #checkboxTemplate>\r\n <i *ngIf=\"evaluate(component.expression)\" class=\"fas fa-check\"></i>\r\n </ng-template>\r\n <ng-template #defaultTemplate>\r\n <ng-container *ngIf=\"supportValues(component) && hasValues(component); else simpleTemplate\">\r\n <ng-container *ngIf=\"getValues(component) | async as values\">\r\n {{ toLabel(evaluate(component.expression), values) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #simpleTemplate>\r\n {{ evaluate(component.expression) }}\r\n </ng-template>\r\n <ng-template #formattedTemplate>\r\n <div class=\"text-paragraph\" style=\"margin-top: -6px;\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(component.expression))\">\r\n </div>\r\n </ng-template>\r\n <ng-template #filelistTemplate>\r\n <ng-container *ngIf=\"{ files: evaluate(component.expression) } as expr\"\r\n fileHandler\r\n #fileHandlerRef=\"fileHandler\"\r\n [downloadHandler]=\"evaluate(component.downloadHandler)\">\r\n <ng-container *ngIf=\"expr.files?.length > 0\">\r\n <div *ngFor=\"let file of expr.files\" class=\"row w-100 p-3 g-0 sirio-bg-primary-light-40 sirio-text-secondary mt-1\">\r\n <div class=\"col-auto ms-auto\">\r\n <span [ngClass]=\"fileHandlerRef.getIcon(file)\" class=\"fas fa-24 mt-1 me-3 ms-1\" aria-hidden=\"true\"></span>\r\n </div>\r\n <div class=\"col\">\r\n <p class=\"mb-0\"><span class=\"h6 sirio-text-link sirio-font-weight-700\">{{ file.name }}</span></p>\r\n {{ fileHandlerRef.getExtension(file) }}, {{ fileHandlerRef.getSize(file) }}\r\n </div>\r\n <div class=\"col-auto ms-auto d-lg-flex flex-column align-items-end\">\r\n <ng-container *ngIf=\"fileHandlerRef.canDownload(file)\">\r\n <div *ngIf=\"fileHandlerRef.isDownloading(file)\" class=\"mt-2\">\r\n <span class=\"d-none d-sm-inline-block\">{{ locale(Texts, 'Downloading') }}</span>\r\n <span class=\"fas fa-arrows-rotate fa-spin ms-2\" aria-hidden=\"true\"></span>\r\n </div>\r\n <!-- Buttons, not links: announced as buttons, activated also with Space. -->\r\n <button *ngIf=\"fileHandlerRef.isLocal(file)\"\r\n type=\"button\"\r\n class=\"sirio-text-link fp-link-button\"\r\n (click)=\"fileHandlerRef.downloadLocal(file)\"\r\n [attr.aria-label]=\"locale(Texts, 'Download') + ' ' + file.name\"\r\n [attr.title]=\"locale(Texts, 'Download') + ' ' + file.name\">\r\n <span class=\"d-none d-sm-inline-block\">\r\n {{ locale(Texts, 'Download') }}\r\n </span>\r\n <span class=\"fas fa-download ms-2\" aria-hidden=\"true\"></span>\r\n </button>\r\n <button *ngIf=\"fileHandlerRef.isHandled(file)\"\r\n type=\"button\"\r\n class=\"sirio-text-link fp-link-button\"\r\n (click)=\"fileHandlerRef.downloadHandled(file)\"\r\n [attr.aria-label]=\"locale(Texts, 'Download') + ' ' + file.name\"\r\n [attr.title]=\"locale(Texts, 'Download') + ' ' + file.name\">\r\n <span class=\"d-none d-sm-inline-block\">{{ locale(Texts, 'Download') }}</span>\r\n <span class=\"fas fa-download ms-2\" aria-hidden=\"true\"></span>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!(expr.files?.length > 0)\">\r\n <div class=\"row p-3 g-0 sirio-bg-primary-light-40 sirio-text-secondary mt-1\">\r\n <div class=\"col\">\r\n <p class=\"mb-0\">\r\n <span class=\"h6 sirio-text-link sirio-font-weight-700\">Nessun file presente</span>\r\n </p>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </div>\r\n <p *ngIf=\"component.description\" class=\"sirio-form-text-help\">\r\n {{ evaluateString(locale(component, 'description')) }}\r\n </p>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region dynamiclist -->\r\n <ng-container *ngSwitchCase=\"'dynamiclist'\">\r\n <ng-container *ngIf=\"resolvePath(component.path) as formGroup\">\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- data-fp-repeater: root of the repeater, where the focus goes after add / remove / move. -->\r\n <div [formArrayName]=\"component.key\"\r\n data-fp-repeater\r\n [formGroup]=\"formGroup\"\r\n [recursion]=\"component\"\r\n #recursion=\"recursion\">\r\n <p *ngIf=\"component.description\">{{ evaluateString(locale(component, 'description')) }}</p>\r\n <ng-container *ngIf=\"getFormArray(resolvePath(component.path).get(component.key)) as formArray\">\r\n <ng-template navigatorState\r\n [total]=\"formArray.controls.length\"\r\n #state=\"navigatorState\"></ng-template>\r\n <ng-container *ngIf=\"component.subtype == 'navigation'\">\r\n <ng-container *ngTemplateOutlet=\"navigation; context: { formArray: formArray, state: state }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"formArray.controls.length > 0\">\r\n <ng-container [ngSwitch]=\"component.subtype\">\r\n <!-- #region tab -->\r\n <ng-container *ngSwitchCase=\"'tab'\">\r\n <!-- @wemake4u/form-controls: activateAdded selects the added tab (after a removal the library selects the one\r\n taking its place); focusContent moves the focus to the first field of the panel. -->\r\n <div [register]=\"component\"\r\n [componentRef]=\"tabInstance\">\r\n <wm-sirio-tabs [scrollLeftLabel]=\"locale(Texts, 'ScrollLeft')\"\r\n [scrollRightLabel]=\"locale(Texts, 'ScrollRight')\"\r\n [focusablePanels]=\"false\"\r\n activateAdded\r\n focusContent\r\n #tabInstance>\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <wm-sirio-tab [label]=\"evaluateWithEventAsString(locale(component, 'label'), event)\"\r\n [badge]=\"evaluateWithEvent(component.badge, event)\">\r\n <ng-template wmSirioTabContent>\r\n <div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </wm-sirio-tab>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-tabs>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region accordion -->\r\n <ng-container *ngSwitchCase=\"'accordion'\">\r\n <!-- @wemake4u/form-controls: activateAdded opens the first section at the start and the added one (after a removal\r\n the library opens the one taking its place); focusContent moves the focus to its first field. -->\r\n <div [register]=\"component\"\r\n [componentRef]=\"dynamiclistaccordion\">\r\n <wm-sirio-accordion exclusive\r\n activateAdded\r\n focusContent\r\n #dynamiclistaccordion>\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <wm-sirio-accordion-item [title]=\"evaluateWithEventAsString(locale(component, 'label'), event)\"\r\n [badge]=\"evaluateWithEvent(component.badge, event)\">\r\n <ng-template wmSirioAccordionContent>\r\n <div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </wm-sirio-accordion-item>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-accordion>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region table -->\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div #dynamiclist\r\n [register]=\"component\"\r\n [componentRef]=\"dynamiclist\">\r\n <table class=\"dynamiclist-table\" [ngClass]=\"{ 'main': recursionLevel == 0 }\">\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"getFormGroup(item) as formItem\">\r\n <ng-container *ngIf=\"{ itemsArray: recursion.getItemsArray(formItem) } as recursionData\">\r\n <tr>\r\n <td class=\"content-cell\">\r\n <div [ngClass]=\"{'group-outline': component.showOutline === true && component.subtype !== 'table', 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"formItem\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </td>\r\n <td class=\"command-cell\">\r\n <div>\r\n <ng-container *ngIf=\"recursionData.itemsArray\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: recursionData.itemsArray, compact: true }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsReorder; context: { formArray: formArray, i: i, compact: true }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i, compact: true }\"></ng-container>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"recursionData.itemsArray && recursionData.itemsArray.length > 0\">\r\n <td colspan=\"2\" class=\"recursion-cell\">\r\n <div class=\"layout\">\r\n <div class=\"recursion-toggle\">\r\n <!-- @wemake4u/form-controls: open at the start (as before); label for screen readers. -->\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n [wmSirioCollapseToggle]=\"collapse\"\r\n iconOnly\r\n [icon]=\"collapse.expanded() ? 'fa-chevron-down' : 'fa-chevron-right'\"\r\n [label]=\"recursionData.itemsArray.length + ' elementi presenti'\"></button>\r\n </div>\r\n <div *ngIf=\"!collapse.expanded()\" class=\"recursion-title\">\r\n <div class=\"recursion-text\">\r\n {{ recursionData.itemsArray.length }} elementi presenti\r\n </div>\r\n </div>\r\n <div class=\"recursion-content\">\r\n <div wmSirioCollapse #collapse=\"wmSirioCollapse\" [expanded]=\"true\">\r\n <div *ngIf=\"collapse.expanded()\" style=\"margin-bottom: -11px;\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"recursion.getFormGroup(formItem)\"\r\n [readOnly]=\"readOnly\"\r\n [recursionLevel]=\"recursionLevel+1\"\r\n [rows]=\"recursion.getComponentRows()\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region navigation -->\r\n <ng-container *ngSwitchCase=\"'navigation'\">\r\n <div>\r\n <ng-container *ngIf=\"formArray.controls[state.index] as item\">\r\n <div [ngClass]=\"{'group-outline': component.showOutline === true, 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: state.index } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region default -->\r\n <ng-container *ngSwitchDefault>\r\n <div #dynamiclist\r\n [register]=\"component\"\r\n [componentRef]=\"dynamiclist\"\r\n selectionGroup\r\n [selectionMode]=\"evaluateString(component.selection?.mode)\"\r\n [selectableClass]=\"evaluateString(component.selection?.selectableClass)\"\r\n [selectedClass]=\"evaluateString(component.selection?.selectedClass)\"\r\n [onSelectionChanged]=\"callExpression(component.selection?.selectionChanged)\">\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <div [selectionItem]=\"item\"\r\n [ngClass]=\"{'group-outline': component.showOutline === true, 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <ng-container *ngIf=\"component.allowAddRemove || component.allowReorder\">\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsReorder; context: { formArray: formArray, i: i }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"formArray.controls.length == 0\">\r\n <div class=\"dynamiclist-no-data\">{{ evaluateString(locale(component, 'noDataText')) || locale(Texts, 'NoData') }}</div>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"feedback\"></ng-container>\r\n <ng-container *ngIf=\"recursionLevel == 0 && component.subtype !== 'navigation'\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: formArray, state: state }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #region templates -->\r\n <ng-template #btnMoveUp let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"locale(Texts, 'MoveUp') as upLabel\">\r\n <!-- Name with the position (\"Sposta Sù elemento 3 di 5\"): the visible text first, the rest for screen readers. -->\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"moveUpItem(formArray, i, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"up\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-arrow-up\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"upLabel + ' ' + itemPosition(i, formArray.length)\">{{ upLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnMoveDown let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"locale(Texts, 'MoveDown') as downLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"moveDownItem(formArray, i, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"down\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-arrow-down\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"downLabel + ' ' + itemPosition(i, formArray.length)\">{{ downLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnRemove let-formArray=\"formArray\" let-state=\"state\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'removeLabel') || locale(Texts, 'RemoveItem')) as removeLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"removeItem(formArray, i, true, state, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"remove\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-trash\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"removeLabel + ' ' + itemPosition(i, formArray.length)\">{{ removeLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnAdd let-formArray=\"formArray\" let-state=\"state\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'addLabel') || locale(Texts, 'AddItem')) as addLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"addItem(formArray, state)\"\r\n data-fp-action=\"add\"\r\n class=\"add-item\"\r\n icon=\"fa-plus\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"addLabel\">{{ addLabel }}</button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsReorder let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowReorder\">\r\n <ng-container *ngTemplateOutlet=\"btnMoveUp; context: { formArray: formArray, i: i, compact: compact }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"btnMoveDown; context: { formArray: formArray, i: i, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsRemove let-formArray=\"formArray\" let-state=\"state\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.removeCondition, { item: formArray.at(i)?.value, index: i, total: state.total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnRemove; context: { formArray: formArray, state: state, i: i, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsAdd let-formArray=\"formArray\" let-state=\"state\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.addCondition, { total: state.total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnAdd; context: { formArray: formArray, state: state, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #feedback>\r\n <ng-container *ngIf=\"getTextFeedback(component) as textFeedback\">\r\n <div>\r\n <span class=\"sirio-form-feedback d-block sirio-text-danger\">{{textFeedback}}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'description')) as textHelp\">\r\n <div>\r\n <p class=\"sirio-form-text-help\">{{textHelp}}</p>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #navigation let-formArray=\"formArray\" let-state=\"state\">\r\n <!-- @wemake4u/form-controls: item navigator (page = element, 1-based); the actions are projected at the end of the row. -->\r\n <wm-sirio-pagination [showItems]=\"false\"\r\n [pageSize]=\"1\"\r\n [total]=\"state.total\"\r\n [page]=\"state.index + 1\"\r\n (pageChange)=\"state.index = $event - 1\"\r\n [ariaLabel]=\"locale(Texts, 'ElementsNavigation')\"\r\n [ofLabel]=\"locale(Texts, 'Of')\"\r\n [pagesLabel]=\"locale(Texts, 'Elements')\"\r\n [pageLabel]=\"locale(Texts, 'Element')\"\r\n [goToPageLabel]=\"locale(Texts, 'GoToElement')\"\r\n [previousLabel]=\"locale(Texts, 'PreviousElement')\"\r\n [nextLabel]=\"locale(Texts, 'NextElement')\">\r\n <div class=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: formArray, state: state }\"></ng-container>\r\n <ng-container *ngIf=\"state.total && state.index != -1\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: state.index }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </wm-sirio-pagination>\r\n </ng-template>\r\n <!-- #endregion -->\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region group -->\r\n <ng-container *ngSwitchCase=\"'group'\">\r\n <div *ngIf=\"resolveBoundGroup(component) as resolvedGroup\"\r\n [ngClass]=\"getGroupOutline(component)\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'label')) as labelText\">\r\n <label>{{ labelText }}</label>\r\n </ng-container>\r\n <div #group\r\n [register]=\"component\"\r\n [componentRef]=\"group\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvedGroup\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region tab -->\r\n <ng-container *ngSwitchCase=\"'tab'\">\r\n <ng-container *ngIf=\"(getPanels(component) | async) as panels\">\r\n <ng-container *ngIf=\"panels.length > 0\">\r\n <!-- @wemake4u/form-controls: focusContent moves the focus into the panel shown at the start or selected (not for the\r\n arrow keys), except for the panels with disableAutoFocus. -->\r\n <wm-sirio-tabs #tabInstance\r\n [register]=\"component\"\r\n [componentRef]=\"tabInstance\"\r\n [scrollLeftLabel]=\"locale(Texts, 'ScrollLeft')\"\r\n [scrollRightLabel]=\"locale(Texts, 'ScrollRight')\"\r\n [line]=\"!!component.navigation\"\r\n [vertical]=\"!!component.vertical\"\r\n [focusablePanels]=\"false\"\r\n focusContent>\r\n <ng-container *ngFor=\"let panel of panels; let i = index;\">\r\n <wm-sirio-tab *ngIf=\"evaluateConditional(panel.conditional)\"\r\n [label]=\"evaluateString(locale(panel, 'label'))\"\r\n [icon]=\"evaluateString(panel.icon) || null\"\r\n [disabled]=\"evaluateBoolean(panel.disabled) ?? false\"\r\n [badge]=\"evaluate(panel.badge)\"\r\n [focusContent]=\"panel.disableAutoFocus !== true\">\r\n <ng-template wmSirioTabContent>\r\n <ng-container *ngIf=\"getTemplate(panel.template) as template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvePath(panel.path)\"\r\n [rows]=\"template.rows\"\r\n [identity]=\"component.id\"\r\n [identityIndex]=\"i\"\r\n [readOnly]=\"readOnly || evaluateBoolean(panel.readonly)\"\r\n [disableAutoFocus]=\"template.disableAutoFocus\"\r\n [alignment]=\"template.verticalAlignment\"></app-dynamic-fields>\r\n </ng-container>\r\n </ng-template>\r\n </wm-sirio-tab>\r\n </ng-container>\r\n </wm-sirio-tabs>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region accordion -->\r\n <ng-container *ngSwitchCase=\"'accordion'\">\r\n <ng-container *ngIf=\"(getPanels(component) | async) as panels\">\r\n <ng-container *ngIf=\"panels.length > 0\">\r\n <!-- exclusive: one section open at a time, as with ngx-sirio-lib. -->\r\n <wm-sirio-accordion exclusive\r\n #accordion\r\n [register]=\"component\"\r\n [componentRef]=\"accordion\">\r\n <ng-container *ngFor=\"let panel of panels; let i = index;\">\r\n <ng-container *ngIf=\"resolvePath(panel.path) as formGroup\">\r\n <!-- Content not lazy (as before): the fields of closed sections stay in the form. -->\r\n <wm-sirio-accordion-item *ngIf=\"evaluateConditional(panel.conditional)\"\r\n [title]=\"evaluateString(locale(panel, 'label'))\"\r\n [badge]=\"evaluate(panel.badge)\"\r\n [disabled]=\"evaluateBoolean(panel.disabled)\">\r\n <ng-container *ngIf=\"getTemplate(panel.template) as template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"formGroup\"\r\n [readOnly]=\"readOnly || evaluateBoolean(panel.readonly)\"\r\n [rows]=\"template.rows\"\r\n [identity]=\"component.id\"\r\n [identityIndex]=\"i\"\r\n [disableAutoFocus]=\"template.disableAutoFocus\"\r\n [alignment]=\"template.verticalAlignment\"></app-dynamic-fields>\r\n </ng-container>\r\n </wm-sirio-accordion-item>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-accordion>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region text -->\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [collapse]=\"component.collapseTo\"\r\n [onCollapse]=\"callExpression(component.onCollapse)\"\r\n [onExpand]=\"callExpression(component.onExpand)\"\r\n #text\r\n [register]=\"component\"\r\n [componentRef]=\"text\">\r\n <!--Reset View Context-->\r\n <div tabindex=\"0\" style=\"display:none\"></div>\r\n <div class=\"flex\">\r\n <div class=\"text-paragraph\" markdown\r\n [onAnchorClick]=\"callExpression(component.anchorClick)\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n <ng-container *ngIf=\"component.tooltip\">\r\n <wm-sirio-info-button [content]=\"tooltipTemplate\"\r\n [label]=\"locale(Texts, 'Information')\"></wm-sirio-info-button>\r\n <ng-template #tooltipTemplate>\r\n <div class=\"sirio-tooltip-body\">\r\n <div class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'tooltip')))\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region html -->\r\n <ng-container *ngSwitchCase=\"'html'\">\r\n <div class=\"html-paragraph\"\r\n [innerHTML]=\"sanitize(evaluateTemplate(locale(component, 'content')))\"\r\n #html\r\n [register]=\"component\"\r\n [componentRef]=\"html\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <!-- || '': an alt expression giving null would be read aloud as \"null\". -->\r\n <img [src]=\"evaluateString(component.source)\"\r\n [alt]=\"evaluateString(locale(component, 'alt')) || ''\"\r\n style=\"width: 100%;height: 100%;\"\r\n #image\r\n [register]=\"component\"\r\n [componentRef]=\"image\">\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region table -->\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <label *ngIf=\"evaluateString(locale(component, 'label')) as tableLabel\">{{ tableLabel }}</label>\r\n @if (useDataGrid) {\r\n <!-- Sirio data grid (DynamicFieldsComponent.useDataGrid): configuration from SirioGridService. -->\r\n @let grid = getSirioGrid(component);\r\n @let rows = getSirioRows(component, grid);\r\n <!-- Paginator with rowCount > 0, or when the server source pages its rows. -->\r\n @let pagedSize = grid.pageable ? null : rows.pagedSize();\r\n @let gridHeight = component.autoHeight ? null : evaluateSize(component.height);\r\n <wm-sirio-data-grid #table\r\n class=\"fp-data-grid\"\r\n variant=\"dark\"\r\n size=\"sm\"\r\n [filterButton]=\"component.floatingFilter === true ? 'always' : 'none'\"\r\n [showFilterChips]=\"false\"\r\n paginationVariant=\"compact\"\r\n [caption]=\"evaluateString(locale(component, 'label'))\"\r\n [data]=\"rows.data()\"\r\n [dataSource]=\"rows.dataSource\"\r\n [loading]=\"rows.loading()\"\r\n [emptyText]=\"rows.failed() ? locale(Texts, 'LoadingFailed') : 'Nessun risultato'\"\r\n [loadErrorText]=\"locale(Texts, 'LoadingFailed')\"\r\n [rowId]=\"grid.rowId\"\r\n [selection]=\"sirioSelection(component)\"\r\n singleSelectionControl=\"checkbox\"\r\n [selectionColumn]=\"grid.checkboxes\"\r\n [selectOnRowClick]=\"grid.checkboxes && grid.clickSelect\"\r\n selectAll=\"filtered\"\r\n hideUnselectable\r\n [rowSelectable]=\"grid.rowSelectable\"\r\n [selected]=\"grid.selected()\"\r\n (selectedChange)=\"onSirioSelectionChanged(component, grid, $event)\"\r\n [rowClass]=\"grid.rowClass\"\r\n [rowStyle]=\"grid.rowStyle\"\r\n [pageable]=\"grid.pageable || pagedSize !== null\"\r\n [pageSize]=\"pagedSize ?? grid.pageSize\"\r\n [pageSizeOptions]=\"sirioPageSizes(pagedSize)\"\r\n [rowNumbers]=\"grid.rowNumbers\"\r\n rowNumberHeader=\"#\"\r\n [resizable]=\"grid.resizable\"\r\n [reorderable]=\"grid.reorderable\"\r\n filterOperators\r\n [filterRow]=\"component.floatingFilter === true\"\r\n [filterYesLabel]=\"locale(Texts, 'True')\"\r\n [filterNoLabel]=\"locale(Texts, 'False')\"\r\n [height]=\"gridHeight\"\r\n [stickyHeader]=\"!!gridHeight\"\r\n [minHeight]=\"evaluateSize(component.minHeight)\"\r\n [refresh]=\"refreshRowSource(component)\"\r\n [register]=\"component\"\r\n [componentRef]=\"table\">\r\n @for (col of grid.columns; track col.id) {\r\n <wm-sirio-grid-column [field]=\"col.field\"\r\n [header]=\"col.header\"\r\n [value]=\"col.value\"\r\n [format]=\"col.format\"\r\n [align]=\"col.align\"\r\n [filter]=\"col.filter\"\r\n [filterOptions]=\"col.filterOptions\"\r\n [filterMultiple]=\"col.filterMultiple\"\r\n [filterOperators]=\"col.filterOperators\"\r\n [sortable]=\"col.sortable\"\r\n [resizable]=\"col.resizable\"\r\n [wrap]=\"col.wrap\"\r\n [mono]=\"col.mono\"\r\n [fit]=\"col.fit\"\r\n [fixed]=\"col.fixed\"\r\n [flex]=\"col.flex\"\r\n [width]=\"col.width\"\r\n [minWidth]=\"col.minWidth\"\r\n [maxWidth]=\"col.maxWidth\"\r\n [group]=\"col.group\"\r\n [hidden]=\"col.actions && evaluateBoolean(component.suppressActions) === true\"\r\n [cellClass]=\"col.cellClass\"\r\n [cellStyle]=\"col.cellStyle\"\r\n [headerClass]=\"col.headerClass\"\r\n [headerStyle]=\"col.headerStyle\">\r\n @if (col.renderer; as renderer) {\r\n <ng-template wmSirioGridCell let-row let-value=\"value\" let-index=\"index\">\r\n @if (renderer.kind === 'html') {\r\n <span [innerHTML]=\"renderer.html(row, value)\"></span>\r\n } @else {\r\n <fp-sirio-cell-host [renderer]=\"renderer.type\" [params]=\"renderer.params(row, value, index)\" />\r\n }\r\n </ng-template>\r\n }\r\n </wm-sirio-grid-column>\r\n }\r\n </wm-sirio-data-grid>\r\n } @else {\r\n <ag-grid-angular [modules]=\"getGridModules(component)\"\r\n [gridOptions]=\"getGridOptions(component)\"\r\n [selectable]=\"evaluateBoolean(component.selectable)\"\r\n [multiSelect]=\"evaluateBoolean(component.multiSelect)\"\r\n (selectionChanged)=\"onGridSelectionChanged(component, $event)\"\r\n [suppressActions]=\"evaluateBoolean(component.suppressActions)\"\r\n [columns]=\"component.columns || evaluateWithHydratation(component.columnsExpression) || []\"\r\n [rowSource]=\"getRowSource(component)\"\r\n [refresh]=\"refreshRowSource(component)\"\r\n [style.height]=\"component.autoHeight ? null : evaluateSize(component.height)\"\r\n [style.min-height]=\"evaluateSize(component.minHeight)\"\r\n [formGroup]=\"formGroup\"\r\n #table\r\n [register]=\"component\"\r\n [componentRef]=\"table\" />\r\n }\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region button -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: color \"ghost\" = plain sirio-btn; icon on the left unless iconPosition \"right\". -->\r\n <button type=\"button\"\r\n [wmSirioButton]=\"evaluateVariant(component.color)\"\r\n [disabled]=\"evaluateBoolean(component.disabled) ?? false\"\r\n [icon]=\"evaluateString(component.icon) || null\"\r\n [iconPosition]=\"component.iconPosition == 'right' ? 'end' : 'start'\"\r\n (click)=\"clickButton(component, $event)\"\r\n #button\r\n [register]=\"component\"\r\n [componentRef]=\"button\">{{ evaluateString(locale(component, 'label')) }}</button>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region separator -->\r\n <ng-container *ngSwitchCase=\"'separator'\">\r\n <div class=\"separator\"\r\n #separator\r\n [register]=\"component\"\r\n [componentRef]=\"separator\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region spacer -->\r\n <ng-container *ngSwitchCase=\"'spacer'\">\r\n <div style=\"width: 100%\"\r\n [style.height.px]=\"component.height\"\r\n #spacer\r\n [register]=\"component\"\r\n [componentRef]=\"spacer\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region iframe -->\r\n <ng-container *ngSwitchCase=\"'iframe'\">\r\n <label [for]=\"component.id\">{{ evaluateString(locale(component, 'label')) }}</label>\r\n <iframe [src]=\"evaluateUrl(component.url)\"\r\n [title]=\"evaluateString(locale(component, 'label'))\"\r\n [style.width]=\"'100%'\"\r\n [style.height.px]=\"component.height\"\r\n [frameSecurity]=\"component.security\"\r\n #iframe\r\n [register]=\"component\"\r\n [componentRef]=\"iframe\">\r\n </iframe>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region alert -->\r\n <ng-container *ngSwitchCase=\"'alert'\">\r\n <!-- @wemake4u/form-controls: preventClose → no close button; markdown as block content. -->\r\n <wm-sirio-alert [type]=\"component.role || 'info'\"\r\n [closeLabel]=\"locale(Texts, 'Close')\"\r\n [dismissible]=\"!evaluateBoolean(component.preventClose)\"\r\n #alert\r\n [register]=\"component\"\r\n [componentRef]=\"alert\">\r\n <div wmSirioAlertContent\r\n class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </wm-sirio-alert>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region notice -->\r\n <ng-container *ngSwitchCase=\"'notice'\">\r\n <!-- @wemake4u/form-controls: light notice (kit default); markdown as block content. -->\r\n <wm-sirio-notify #notice\r\n [title]=\"evaluateString(locale(component, 'title'))\"\r\n [register]=\"component\"\r\n [componentRef]=\"notice\">\r\n <div wmSirioNotifyContent\r\n class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </wm-sirio-notify>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region tooltip -->\r\n <ng-container *ngSwitchCase=\"'tooltip'\">\r\n <!-- @wemake4u/form-controls: the title is the popover title of the kit. -->\r\n <wm-sirio-info-button [content]=\"tooltipTemplate\"\r\n [title]=\"evaluateString(locale(component, 'title'))\"\r\n [label]=\"evaluateString(locale(component, 'title')) || locale(Texts, 'Information')\"\r\n #tooltip\r\n [register]=\"component\"\r\n [componentRef]=\"tooltip\"></wm-sirio-info-button>\r\n <ng-template #tooltipTemplate>\r\n <div class=\"sirio-tooltip-body\">\r\n <div class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region chart -->\r\n <ng-container *ngSwitchCase=\"'chart'\">\r\n <label>{{ evaluateString(locale(component, 'label')) }}</label>\r\n <ng-container [observe]=\"getChartData(component)\"\r\n [callback]=\"invalidateChart(component)\">\r\n <ag-charts [options]=\"(getChartOptions(component) | async) ?? {}\"\r\n [style.height.px]=\"component.height\"\r\n #chart\r\n [register]=\"component\"\r\n [componentRef]=\"chart\" />\r\n </ng-container> \r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region component -->\r\n <ng-container *ngSwitchCase=\"'component'\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'label')) as labelText\">\r\n <label>{{ labelText }}</label>\r\n </ng-container>\r\n <ng-container *ngIf=\"component.isInput; else noInputTemplate\">\r\n <app-dynamic-host [properties]=\"getFeelableProperties(component)\"\r\n [formGroup]=\"resolvePath(component.path)\"\r\n #componentHost\r\n [register]=\"component\"\r\n [componentRef]=\"componentHost\" />\r\n <ng-container *ngIf=\"getTextFeedback(component) as textFeedback\">\r\n <span class=\"sirio-form-feedback d-block sirio-text-danger\">{{textFeedback}}</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'description')) as textHelp\">\r\n <p class=\"sirio-form-text-help\">{{textHelp}}</p>\r\n </ng-container>\r\n <ng-template #noInputTemplate>\r\n <app-dynamic-host [properties]=\"getFeelableProperties(component)\"\r\n #componentHost\r\n [register]=\"component\"\r\n [componentRef]=\"componentHost\" />\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region templatehost -->\r\n <ng-container *ngSwitchCase=\"'templatehost'\">\r\n <ng-container *ngIf=\"getTemplate(component.template) as template\">\r\n <div #template\r\n [register]=\"component\"\r\n [componentRef]=\"template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvePath(component.path)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"template?.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region treelist -->\r\n <ng-container *ngSwitchCase=\"'treelist'\">\r\n <label>{{ evaluateString(locale(component, 'label')) }}</label>\r\n <div class=\"treelist\"\r\n [style.height]=\"component.height ? evaluateSize(component.height): null\"\r\n *ngIf=\"getTreeColumns(component) as columns\">\r\n <ng-container *ngIf=\"((getTreeSource(component) | async) ?? []) as rows\">\r\n <table #treelist\r\n [register]=\"component\"\r\n [componentRef]=\"treelist\"\r\n [treelist]=\"rows\">\r\n <colgroup>\r\n <col *ngFor=\"let column of columns\"\r\n [style.width]=\"evaluateSize(column.width)\">\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n <th scope=\"col\" *ngFor=\"let column of columns\"\r\n [ngClass]=\"getClass(column)\"\r\n [style.text-align]=\"column.align\">\r\n {{column.label}}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container>\r\n <tr *ngFor=\"let row of rows\"\r\n [attr.data-id]=\"row.id\"\r\n [attr.data-parent]=\"row.parentId\"\r\n [attr.data-expanded]=\"row.expanded ? 'true': 'false'\"\r\n [ngClass]=\"row.meta?.['cssClass']\">\r\n <td *ngFor=\"let column of columns; let i = index\"\r\n [ngClass]=\"getClass(column)\">\r\n <div [style.justify-content]=\"getJustify(column.align)\">\r\n <span *ngIf=\"i==component.expanderColumn\"\r\n [style.visibility]=\"row.hasChildren ? 'visible' : 'hidden'\"\r\n [style.padding-left]=\"evaluateSize(20 * row.level)\"\r\n class=\"toggle\"></span>\r\n <span class=\"text\"\r\n [title]=\"row.data[column.key]\">\r\n {{ row.data[column.key] }}\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region navigator -->\r\n <ng-container *ngSwitchCase=\"'navigator'\">\r\n <div #navigator\r\n [register]=\"component\"\r\n [componentRef]=\"navigator\">\r\n <div navigatorState\r\n [index]=\"evaluateNumber(component.index) ?? 0\"\r\n [total]=\"evaluateNumber(component.total) ?? 0\"\r\n (indexChange)=\"evaluateWithEventAsHandler(component.selectionChanged, { index: $event, count: state.total })\"\r\n #state=\"navigatorState\">\r\n <!-- @wemake4u/form-controls: item navigator (page = element, 1-based); the actions are projected at the end of the row. -->\r\n <wm-sirio-pagination [showItems]=\"false\"\r\n [pageSize]=\"1\"\r\n [total]=\"state.total\"\r\n [page]=\"state.index + 1\"\r\n (pageChange)=\"state.index = $event - 1\"\r\n [ariaLabel]=\"locale(Texts, 'ElementsNavigation')\"\r\n [ofLabel]=\"locale(Texts, 'Of')\"\r\n [pagesLabel]=\"locale(Texts, 'Elements')\"\r\n [pageLabel]=\"locale(Texts, 'Element')\"\r\n [goToPageLabel]=\"locale(Texts, 'GoToElement')\"\r\n [previousLabel]=\"locale(Texts, 'PreviousElement')\"\r\n [nextLabel]=\"locale(Texts, 'NextElement')\">\r\n <div class=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { total: state.total }\"></ng-container>\r\n <ng-container *ngIf=\"state.total && state.index != -1\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { i: state.index, total: state.total }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </wm-sirio-pagination>\r\n </div>\r\n </div>\r\n <ng-template #buttonsAdd let-total=\"total\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.addCondition, { total: total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnAdd; context: { total: total }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsRemove let-i=\"i\" let-total=\"total\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.removeCondition, { index: i, total: total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnRemove; context: { i: i, total: total }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnAdd let-total=\"total\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'addLabel') || locale(Texts, 'AddItem')) as addLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n class=\"add-item\"\r\n (click)=\"evaluateWithEventAsHandler(component.addExpression, { total: total })\"\r\n icon=\"fa-plus\" iconPosition=\"start\">{{ addLabel }}</button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnRemove let-i=\"i\" let-total=\"total\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'removeLabel') || locale(Texts, 'RemoveItem')) as removeLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n class=\"remove-item\"\r\n (click)=\"evaluateWithEventAsHandler(component.removeExpression, { index: i, total: total })\"\r\n icon=\"fa-trash\" iconPosition=\"start\">{{ removeLabel }}<span class=\"sr-only\"> {{ itemPosition(i, total) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</div>\r\n\r\n",
|
|
10368
|
+
template: "<div [ngClass]=\"getFormClass()\">\r\n <ng-container *ngFor=\"let row of rows\" [formGroup]=\"formGroup\">\r\n <div class=\"row field-set\">\r\n <ng-container *ngFor=\"let component of row.components\">\r\n <ng-container [ngSwitch]=\"component.type\">\r\n <div [ngClass]=\"getComponentClass(component)\"\r\n [style]=\"getComponentStyle(component)\"\r\n [ngAttrs]=\"getComponentAttrs(component)\"\r\n *ngIf=\"shouldRender(component)\">\r\n <div *ngIf=\"canShow(component)\">\r\n <!-- #region textfield -->\r\n <ng-container *ngSwitchCase=\"'textfield'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-textbox type=\"text\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [prefix]=\"evaluateString(component.appearance?.prefixAdorner) || ''\"\r\n [suffix]=\"evaluateString(component.appearance?.suffixAdorner) || ''\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textCase]=\"toTextCase(component.textCase)\"\r\n [maxlength]=\"evaluateNumber(component.maxLength)\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #textfield\r\n [register]=\"component\"\r\n [componentRef]=\"textfield\">\r\n </wm-sirio-textbox>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region select -->\r\n <ng-container *ngSwitchCase=\"'select'\" [formGroup]=\"resolvePath(component.path)\">\r\n @let selectValues = getSirioValues(component);\r\n @let selectOptions = selectValues.values$ | async;\r\n <!-- @wemake4u/form-controls: strict = the value must be one of the options (was the dropdown directive);\r\n searchable shows the selection in the search field (was prefillSearch).\r\n Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-select\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(selectOptions)\"\r\n [loading]=\"selectValues.state.loading\"\r\n [loadingText]=\"locale(Texts, 'Loading')\"\r\n [searchable]=\"component.searchable\"\r\n [strict]=\"true\"\r\n (optionSelected)=\"selectionChanged(component, $event)\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #select\r\n [register]=\"component\"\r\n [componentRef]=\"select\">\r\n </wm-sirio-select>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region taglist -->\r\n <ng-container *ngSwitchCase=\"'taglist'\" [formGroup]=\"resolvePath(component.path)\">\r\n @let taglistValues = getSirioValues(component);\r\n @let taglistOptions = taglistValues.values$ | async;\r\n <!-- @wemake4u/form-controls: multiple select with \"select all\" and the \"n selected\" summary\r\n (was the tag directive). Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-select\r\n multiple\r\n selectAll\r\n [selectAllLabel]=\"locale(Texts, 'SelectAll')\"\r\n [maxVisibleSelections]=\"component.maxVisibleTags\"\r\n [selectionSummary]=\"sirioSelectionSummary\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(taglistOptions)\"\r\n [loading]=\"taglistValues.state.loading\"\r\n [loadingText]=\"locale(Texts, 'Loading')\"\r\n [searchable]=\"component.searchable\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #taglist\r\n [register]=\"component\"\r\n [componentRef]=\"taglist\">\r\n </wm-sirio-select>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region number -->\r\n <ng-container *ngSwitchCase=\"'number'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-number\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [prefix]=\"evaluateString(component.appearance?.prefixAdorner) || ''\"\r\n [suffix]=\"evaluateString(component.appearance?.suffixAdorner) || ''\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [defaultValue]=\"evaluateNumber(component.defaultValue)\"\r\n [min]=\"evaluateNumber(component.minimum)\"\r\n [max]=\"evaluateNumber(component.maximum)\"\r\n [decimals]=\"evaluateNumber(component.decimalDigits)\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #number\r\n [register]=\"component\"\r\n [componentRef]=\"number\">\r\n </wm-sirio-number>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region datetime -->\r\n <ng-container *ngSwitchCase=\"'datetime'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: date 'yyyy-MM-dd', time 'HH:mm', date and time 'yyyy-MM-ddTHH:mm:ss'.\r\n min/max only limit the pickers (typed values outside are moved to the nearest limit).\r\n Errors/warnings come from the validation presenter. -->\r\n <ng-container [ngSwitch]=\"component.subtype\">\r\n <!-- #region date -->\r\n <ng-container *ngSwitchCase=\"'date'\">\r\n <wm-sirio-date\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaDateLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'dateLabel'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [pickLevel]=\"component.pick || 'date'\"\r\n [min]=\"evaluateString(component.range?.min) || null\"\r\n [max]=\"evaluateString(component.range?.max) || null\"\r\n [hideOnFocus]=\"evaluateBoolean(component.hideOnFocus)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #date\r\n [register]=\"component\"\r\n [componentRef]=\"date\">\r\n </wm-sirio-date>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region time -->\r\n <ng-container *ngSwitchCase=\"'time'\">\r\n <wm-sirio-time\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaTimeLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'timeLabel'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [minuteStep]=\"component.timeInterval || 1\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #time\r\n [register]=\"component\"\r\n [componentRef]=\"time\">\r\n </wm-sirio-time>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region datetime -->\r\n <ng-container *ngSwitchCase=\"'datetime'\">\r\n <!-- fieldLabels: dateLabel above the date, timeLabel above the time (as before);\r\n completeParts: date only -> 00:00, time only -> today (was the dateTimeCoordinator). -->\r\n <wm-sirio-datetime\r\n valueType=\"iso-seconds\"\r\n fieldLabels\r\n completeParts\r\n [label]=\"evaluateLabel(locale(component, 'dateLabel'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [timeLabel]=\"evaluateString(locale(component, 'timeLabel'))\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [min]=\"evaluateString(component.range?.min) || null\"\r\n [max]=\"evaluateString(component.range?.max) || null\"\r\n [hideOnFocus]=\"evaluateBoolean(component.hideOnFocus)\"\r\n [minuteStep]=\"component.timeInterval || 1\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #datetime\r\n [register]=\"component\"\r\n [componentRef]=\"datetime\">\r\n </wm-sirio-datetime>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region checkbox -->\r\n <ng-container *ngSwitchCase=\"'checkbox'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: checkbox and toggle (subtype 'toggle'); the markdown label is projected\r\n inside the kit <label> as inline HTML. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-checkbox\r\n [toggle]=\"component.subtype === 'toggle'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #checkbox\r\n [register]=\"component\"\r\n [componentRef]=\"checkbox\"><span [innerHTML]=\"toInlineHTML(evaluateTemplate(locale(component, 'label')))\"></span></wm-sirio-checkbox>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region radio -->\r\n <ng-container *ngSwitchCase=\"'radio'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: radio buttons and chips (subtype 'chip'); markdown option labels are\r\n rendered inline inside the kit <label>. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-radio-group\r\n [chips]=\"component.subtype === 'chip'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(getValues(component) | async)\"\r\n [inline]=\"component.displayInline\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #radio\r\n [register]=\"component\"\r\n [componentRef]=\"radio\">\r\n <ng-template wmSirioOptionLabel let-option><span [innerHTML]=\"toInlineHTML(evaluateTemplate(option.label))\"></span></ng-template>\r\n </wm-sirio-radio-group>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region checklist -->\r\n <ng-container *ngSwitchCase=\"'checklist'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: checkbox list and chips (subtype 'chip'); markdown option labels are\r\n rendered inline inside the kit <label>. Errors/warnings come from the validation presenter. -->\r\n <wm-sirio-checklist\r\n [chips]=\"component.subtype === 'chip'\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [options]=\"sirioOptions(getValues(component) | async)\"\r\n [inline]=\"component.displayInline\"\r\n [refresh]=\"refreshValues(component)\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #checklist\r\n [register]=\"component\"\r\n [componentRef]=\"checklist\">\r\n <ng-template wmSirioOptionLabel let-option><span [innerHTML]=\"toInlineHTML(evaluateTemplate(option.label))\"></span></ng-template>\r\n </wm-sirio-checklist>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region textarea -->\r\n <ng-container *ngSwitchCase=\"'textarea'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-textarea\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [placeholder]=\"locale(component, 'placeholder')\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [textCase]=\"toTextCase(component.textCase)\"\r\n [maxlength]=\"evaluateNumber(component.maxLength)\"\r\n [textAlign]=\"component.textAlign || null\"\r\n [requiredOnInput]=\"component.validate?.required\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n #textarea\r\n [register]=\"component\"\r\n [componentRef]=\"textarea\">\r\n </wm-sirio-textarea>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region filepicker -->\r\n <ng-container *ngSwitchCase=\"'filepicker'\" [formGroup]=\"resolvePath(component.path)\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers);\r\n upload, delete and download of the stored files are handled by the control. -->\r\n <wm-sirio-file-upload class=\"w-100\"\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [buttonLabel]=\"evaluateString(locale(component, 'text')) || locale(Texts, 'Upload')\"\r\n [accept]=\"getAccept(component.accept)\"\r\n [multiple]=\"evaluateBoolean(component.multiple)\"\r\n valueType=\"array\"\r\n details\r\n downloadable\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [instantUpload]=\"evaluateBoolean(component.instantUpload)\"\r\n [uploadHandler]=\"evaluate(component.uploadHandler)\"\r\n [deleteHandler]=\"evaluate(component.deleteHandler)\"\r\n [downloadHandler]=\"evaluate(component.downloadHandler)\"\r\n [removeLabel]=\"locale(Texts, 'Remove')\"\r\n [downloadLabel]=\"locale(Texts, 'Download')\"\r\n [uploadingLabel]=\"locale(Texts, 'Uploading')\"\r\n [deletingLabel]=\"locale(Texts, 'Deleting')\"\r\n [downloadingLabel]=\"locale(Texts, 'Downloading')\"\r\n [formControlName]=\"component.key\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n [valueSync]=\"component.valueSync\"\r\n (filesAdded)=\"filesAdded($event, filepicker)\"\r\n (fileError)=\"fileError($event)\"\r\n #filepicker\r\n [register]=\"component\"\r\n [componentRef]=\"filepicker\">\r\n </wm-sirio-file-upload>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region range -->\r\n <ng-container *ngSwitchCase=\"'range'\" [formGroup]=\"resolvePath(component.path)\">\r\n <!-- @wemake4u/form-controls: errors/warnings come from the validation presenter (see providers). -->\r\n <wm-sirio-slider\r\n [ariaLabel]=\"evaluateString(locale(component, 'ariaLabel')) || null\"\r\n [label]=\"evaluateLabel(locale(component, 'label'), component)\"\r\n [requiredIndicator]=\"isFieldRequired(component)\"\r\n [info]=\"evaluateString(locale(component, 'tooltip')) || null\"\r\n [helpText]=\"evaluateString(locale(component, 'description'))\"\r\n [readonly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [formControlName]=\"component.key\"\r\n [min]=\"evaluateNumber(component.range?.min) ?? 0\"\r\n [max]=\"evaluateNumber(component.range?.max) ?? 0\"\r\n [valueSync]=\"component.valueSync\"\r\n [requiredOnBlur]=\"component.validate?.required\"\r\n #range\r\n [register]=\"component\"\r\n [componentRef]=\"range\">\r\n </wm-sirio-slider>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region displayfield -->\r\n <ng-container *ngSwitchCase=\"'displayfield'\">\r\n <div class=\"display-field\"\r\n #displayfield\r\n [register]=\"component\"\r\n [componentRef]=\"displayfield\">\r\n <div *ngIf=\"component.label\" class=\"sirio-label\">\r\n {{ evaluateString(locale(component, 'label')) }}\r\n <!-- @wemake4u/form-controls: kit info button with popover, as next to the labels of the controls. -->\r\n <wm-sirio-info-button *ngIf=\"component.tooltip\"\r\n [content]=\"evaluateString(locale(component, 'tooltip'))\"\r\n [title]=\"evaluateString(locale(component, 'label'))\"\r\n [label]=\"locale(Texts, 'InformationAbout') + ' ' + evaluateString(locale(component, 'ariaLabel') || locale(component, 'label'))\"></wm-sirio-info-button>\r\n </div>\r\n <div [class.sirio-form-control]=\"component.fieldtype !== 'filelist'\"\r\n [style.text-align]=\"component.fieldtype !== 'filelist' ? (component.textAlign || null) : null\"\r\n class=\"data-display\" [ngClass]=\"component.fieldtype\">\r\n <ng-container [ngSwitch]=\"component.fieldtype\">\r\n <ng-container *ngSwitchCase=\"'checkbox'\">\r\n <ng-container *ngTemplateOutlet=\"checkboxTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <ng-container *ngTemplateOutlet=\"formattedTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'filelist'\">\r\n <ng-container *ngTemplateOutlet=\"filelistTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngTemplateOutlet=\"defaultTemplate\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #checkboxTemplate>\r\n <i *ngIf=\"evaluate(component.expression)\" class=\"fas fa-check\"></i>\r\n </ng-template>\r\n <ng-template #defaultTemplate>\r\n <ng-container *ngIf=\"supportValues(component) && hasValues(component); else simpleTemplate\">\r\n <ng-container *ngIf=\"getValues(component) | async as values\">\r\n {{ toLabel(evaluate(component.expression), values) }}\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #simpleTemplate>\r\n {{ evaluate(component.expression) }}\r\n </ng-template>\r\n <ng-template #formattedTemplate>\r\n <div class=\"text-paragraph\" style=\"margin-top: -6px;\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(component.expression))\">\r\n </div>\r\n </ng-template>\r\n <ng-template #filelistTemplate>\r\n <ng-container *ngIf=\"{ files: evaluate(component.expression) } as expr\"\r\n fileHandler\r\n #fileHandlerRef=\"fileHandler\"\r\n [downloadHandler]=\"evaluate(component.downloadHandler)\">\r\n <ng-container *ngIf=\"expr.files?.length > 0\">\r\n <div *ngFor=\"let file of expr.files\" class=\"row w-100 p-3 g-0 sirio-bg-primary-light-40 sirio-text-secondary mt-1\">\r\n <div class=\"col-auto ms-auto\">\r\n <span [ngClass]=\"fileHandlerRef.getIcon(file)\" class=\"fas fa-24 mt-1 me-3 ms-1\" aria-hidden=\"true\"></span>\r\n </div>\r\n <div class=\"col\">\r\n <p class=\"mb-0\"><span class=\"h6 sirio-text-link sirio-font-weight-700\">{{ file.name }}</span></p>\r\n {{ fileHandlerRef.getExtension(file) }}, {{ fileHandlerRef.getSize(file) }}\r\n </div>\r\n <div class=\"col-auto ms-auto d-lg-flex flex-column align-items-end\">\r\n <ng-container *ngIf=\"fileHandlerRef.canDownload(file)\">\r\n <div *ngIf=\"fileHandlerRef.isDownloading(file)\" class=\"mt-2\">\r\n <span class=\"d-none d-sm-inline-block\">{{ locale(Texts, 'Downloading') }}</span>\r\n <span class=\"fas fa-arrows-rotate fa-spin ms-2\" aria-hidden=\"true\"></span>\r\n </div>\r\n <!-- Buttons, not links: announced as buttons, activated also with Space. -->\r\n <button *ngIf=\"fileHandlerRef.isLocal(file)\"\r\n type=\"button\"\r\n class=\"sirio-text-link fp-link-button\"\r\n (click)=\"fileHandlerRef.downloadLocal(file)\"\r\n [attr.aria-label]=\"locale(Texts, 'Download') + ' ' + file.name\"\r\n [attr.title]=\"locale(Texts, 'Download') + ' ' + file.name\">\r\n <span class=\"d-none d-sm-inline-block\">\r\n {{ locale(Texts, 'Download') }}\r\n </span>\r\n <span class=\"fas fa-download ms-2\" aria-hidden=\"true\"></span>\r\n </button>\r\n <button *ngIf=\"fileHandlerRef.isHandled(file)\"\r\n type=\"button\"\r\n class=\"sirio-text-link fp-link-button\"\r\n (click)=\"fileHandlerRef.downloadHandled(file)\"\r\n [attr.aria-label]=\"locale(Texts, 'Download') + ' ' + file.name\"\r\n [attr.title]=\"locale(Texts, 'Download') + ' ' + file.name\">\r\n <span class=\"d-none d-sm-inline-block\">{{ locale(Texts, 'Download') }}</span>\r\n <span class=\"fas fa-download ms-2\" aria-hidden=\"true\"></span>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!(expr.files?.length > 0)\">\r\n <div class=\"row p-3 g-0 sirio-bg-primary-light-40 sirio-text-secondary mt-1\">\r\n <div class=\"col\">\r\n <p class=\"mb-0\">\r\n <span class=\"h6 sirio-text-link sirio-font-weight-700\">Nessun file presente</span>\r\n </p>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </div>\r\n <p *ngIf=\"component.description\" class=\"sirio-form-text-help\">\r\n {{ evaluateString(locale(component, 'description')) }}\r\n </p>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region dynamiclist -->\r\n <ng-container *ngSwitchCase=\"'dynamiclist'\">\r\n <ng-container *ngIf=\"resolvePath(component.path) as formGroup\">\r\n <ng-container [formGroup]=\"formGroup\">\r\n <!-- data-fp-repeater: root of the repeater, where the focus goes after add / remove / move. -->\r\n <div [formArrayName]=\"component.key\"\r\n data-fp-repeater\r\n [formGroup]=\"formGroup\"\r\n [recursion]=\"component\"\r\n #recursion=\"recursion\">\r\n <p *ngIf=\"component.description\">{{ evaluateString(locale(component, 'description')) }}</p>\r\n <ng-container *ngIf=\"getFormArray(resolvePath(component.path).get(component.key)) as formArray\">\r\n <ng-template navigatorState\r\n [total]=\"formArray.controls.length\"\r\n #state=\"navigatorState\"></ng-template>\r\n <ng-container *ngIf=\"component.subtype == 'navigation'\">\r\n <ng-container *ngTemplateOutlet=\"navigation; context: { formArray: formArray, state: state }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"formArray.controls.length > 0\">\r\n <ng-container [ngSwitch]=\"component.subtype\">\r\n <!-- #region tab -->\r\n <ng-container *ngSwitchCase=\"'tab'\">\r\n <!-- @wemake4u/form-controls: activateAdded selects the added tab (after a removal the library selects the one\r\n taking its place); focusContent moves the focus to the first field of the panel. -->\r\n <div [register]=\"component\"\r\n [componentRef]=\"tabInstance\">\r\n <wm-sirio-tabs [scrollLeftLabel]=\"locale(Texts, 'ScrollLeft')\"\r\n [scrollRightLabel]=\"locale(Texts, 'ScrollRight')\"\r\n [focusablePanels]=\"false\"\r\n activateAdded\r\n focusContent\r\n #tabInstance>\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <wm-sirio-tab [label]=\"evaluateWithEventAsString(locale(component, 'label'), event)\"\r\n [badge]=\"evaluateWithEvent(component.badge, event)\">\r\n <ng-template wmSirioTabContent>\r\n <div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </wm-sirio-tab>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-tabs>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region accordion -->\r\n <ng-container *ngSwitchCase=\"'accordion'\">\r\n <!-- @wemake4u/form-controls: activateAdded opens the first section at the start and the added one (after a removal\r\n the library opens the one taking its place); focusContent moves the focus to its first field. -->\r\n <div [register]=\"component\"\r\n [componentRef]=\"dynamiclistaccordion\">\r\n <wm-sirio-accordion exclusive\r\n activateAdded\r\n focusContent\r\n #dynamiclistaccordion>\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <wm-sirio-accordion-item [title]=\"evaluateWithEventAsString(locale(component, 'label'), event)\"\r\n [badge]=\"evaluateWithEvent(component.badge, event)\">\r\n <ng-template wmSirioAccordionContent>\r\n <div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </wm-sirio-accordion-item>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-accordion>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region table -->\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <div #dynamiclist\r\n [register]=\"component\"\r\n [componentRef]=\"dynamiclist\">\r\n <table class=\"dynamiclist-table\" [ngClass]=\"{ 'main': recursionLevel == 0 }\">\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <ng-container *ngIf=\"getFormGroup(item) as formItem\">\r\n <ng-container *ngIf=\"{ itemsArray: recursion.getItemsArray(formItem) } as recursionData\">\r\n <tr>\r\n <td class=\"content-cell\">\r\n <div [ngClass]=\"{'group-outline': component.showOutline === true && component.subtype !== 'table', 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"formItem\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </td>\r\n <td class=\"command-cell\">\r\n <div>\r\n <ng-container *ngIf=\"recursionData.itemsArray\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: recursionData.itemsArray, compact: true }\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsReorder; context: { formArray: formArray, i: i, compact: true }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i, compact: true }\"></ng-container>\r\n </div>\r\n </td>\r\n </tr>\r\n <tr *ngIf=\"recursionData.itemsArray && recursionData.itemsArray.length > 0\">\r\n <td colspan=\"2\" class=\"recursion-cell\">\r\n <div class=\"layout\">\r\n <div class=\"recursion-toggle\">\r\n <!-- @wemake4u/form-controls: open at the start (as before); label for screen readers. -->\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n [wmSirioCollapseToggle]=\"collapse\"\r\n iconOnly\r\n [icon]=\"collapse.expanded() ? 'fa-chevron-down' : 'fa-chevron-right'\"\r\n [label]=\"recursionData.itemsArray.length + ' elementi presenti'\"></button>\r\n </div>\r\n <div *ngIf=\"!collapse.expanded()\" class=\"recursion-title\">\r\n <div class=\"recursion-text\">\r\n {{ recursionData.itemsArray.length }} elementi presenti\r\n </div>\r\n </div>\r\n <div class=\"recursion-content\">\r\n <div wmSirioCollapse #collapse=\"wmSirioCollapse\" [expanded]=\"true\">\r\n <div *ngIf=\"collapse.expanded()\" style=\"margin-bottom: -11px;\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"recursion.getFormGroup(formItem)\"\r\n [readOnly]=\"readOnly\"\r\n [recursionLevel]=\"recursionLevel+1\"\r\n [rows]=\"recursion.getComponentRows()\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </table>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region navigation -->\r\n <ng-container *ngSwitchCase=\"'navigation'\">\r\n <div>\r\n <ng-container *ngIf=\"formArray.controls[state.index] as item\">\r\n <div [ngClass]=\"{'group-outline': component.showOutline === true, 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: state.index } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region default -->\r\n <ng-container *ngSwitchDefault>\r\n <div #dynamiclist\r\n [register]=\"component\"\r\n [componentRef]=\"dynamiclist\"\r\n selectionGroup\r\n [selectionMode]=\"evaluateString(component.selection?.mode)\"\r\n [selectableClass]=\"evaluateString(component.selection?.selectableClass)\"\r\n [selectedClass]=\"evaluateString(component.selection?.selectedClass)\"\r\n [onSelectionChanged]=\"callExpression(component.selection?.selectionChanged)\">\r\n <ng-container *ngFor=\"let item of formArray.controls; let i = index;\" [formGroupName]=\"i\">\r\n <div [selectionItem]=\"item\"\r\n [ngClass]=\"{'group-outline': component.showOutline === true, 'group-outline-repeat': true }\">\r\n <div>\r\n <div class=\"badge-header\" *ngIf=\"{ formGroup: item, item: item.value, index: i } as event\">\r\n <label *ngIf=\"evaluateWithEventAsString(locale(component, 'label'), event) as itemLabel\">{{ itemLabel }}</label>\r\n <span class=\"badge-header-tag\" [wmSirioBadge]=\"evaluateWithEvent(component.badge, event)\"></span>\r\n </div>\r\n <div>\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"getFormGroup(item)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n <ng-container *ngIf=\"component.allowAddRemove || component.allowReorder\">\r\n <div style=\"text-align:right\">\r\n <ng-container *ngTemplateOutlet=\"buttonsReorder; context: { formArray: formArray, i: i }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: i }\"></ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"formArray.controls.length == 0\">\r\n <div class=\"dynamiclist-no-data\">{{ evaluateString(locale(component, 'noDataText')) || locale(Texts, 'NoData') }}</div>\r\n </ng-container>\r\n <ng-container *ngTemplateOutlet=\"feedback\"></ng-container>\r\n <ng-container *ngIf=\"recursionLevel == 0 && component.subtype !== 'navigation'\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: formArray, state: state }\"></ng-container>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #region templates -->\r\n <ng-template #btnMoveUp let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"locale(Texts, 'MoveUp') as upLabel\">\r\n <!-- Name with the position (\"Sposta Sù elemento 3 di 5\"): the visible text first, the rest for screen readers. -->\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"moveUpItem(formArray, i, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"up\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-arrow-up\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"upLabel + ' ' + itemPosition(i, formArray.length)\">{{ upLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnMoveDown let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"locale(Texts, 'MoveDown') as downLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"moveDownItem(formArray, i, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"down\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-arrow-down\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"downLabel + ' ' + itemPosition(i, formArray.length)\">{{ downLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnRemove let-formArray=\"formArray\" let-state=\"state\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'removeLabel') || locale(Texts, 'RemoveItem')) as removeLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"removeItem(formArray, i, true, state, $event)\"\r\n class=\"remove-item\"\r\n data-fp-action=\"remove\" [attr.data-fp-index]=\"i\"\r\n icon=\"fa-trash\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"removeLabel + ' ' + itemPosition(i, formArray.length)\">{{ removeLabel }}<span *ngIf=\"!compact\" class=\"sr-only\"> {{ itemPosition(i, formArray.length) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnAdd let-formArray=\"formArray\" let-state=\"state\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'addLabel') || locale(Texts, 'AddItem')) as addLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n (click)=\"addItem(formArray, state)\"\r\n data-fp-action=\"add\"\r\n class=\"add-item\"\r\n icon=\"fa-plus\" iconPosition=\"start\"\r\n [iconOnly]=\"!!compact\" [label]=\"addLabel\">{{ addLabel }}</button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsReorder let-formArray=\"formArray\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowReorder\">\r\n <ng-container *ngTemplateOutlet=\"btnMoveUp; context: { formArray: formArray, i: i, compact: compact }\"></ng-container>\r\n <ng-container *ngTemplateOutlet=\"btnMoveDown; context: { formArray: formArray, i: i, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsRemove let-formArray=\"formArray\" let-state=\"state\" let-i=\"i\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.removeCondition, { item: formArray.at(i)?.value, index: i, total: state.total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnRemove; context: { formArray: formArray, state: state, i: i, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsAdd let-formArray=\"formArray\" let-state=\"state\" let-compact=\"compact\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.addCondition, { total: state.total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnAdd; context: { formArray: formArray, state: state, compact: compact }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #feedback>\r\n <ng-container *ngIf=\"getTextFeedback(component) as textFeedback\">\r\n <div>\r\n <span class=\"sirio-form-feedback d-block sirio-text-danger\">{{textFeedback}}</span>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'description')) as textHelp\">\r\n <div>\r\n <p class=\"sirio-form-text-help\">{{textHelp}}</p>\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #navigation let-formArray=\"formArray\" let-state=\"state\">\r\n <!-- @wemake4u/form-controls: item navigator (page = element, 1-based); the actions are projected at the end of the row. -->\r\n <wm-sirio-pagination [showItems]=\"false\"\r\n [pageSize]=\"1\"\r\n [total]=\"state.total\"\r\n [page]=\"state.index + 1\"\r\n (pageChange)=\"state.index = $event - 1\"\r\n [ariaLabel]=\"locale(Texts, 'ElementsNavigation')\"\r\n [ofLabel]=\"locale(Texts, 'Of')\"\r\n [pagesLabel]=\"locale(Texts, 'Elements')\"\r\n [pageLabel]=\"locale(Texts, 'Element')\"\r\n [goToPageLabel]=\"locale(Texts, 'GoToElement')\"\r\n [previousLabel]=\"locale(Texts, 'PreviousElement')\"\r\n [nextLabel]=\"locale(Texts, 'NextElement')\">\r\n <div class=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { formArray: formArray, state: state }\"></ng-container>\r\n <ng-container *ngIf=\"state.total && state.index != -1\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { formArray: formArray, state: state, i: state.index }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </wm-sirio-pagination>\r\n </ng-template>\r\n <!-- #endregion -->\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region group -->\r\n <ng-container *ngSwitchCase=\"'group'\">\r\n <div *ngIf=\"resolveBoundGroup(component) as resolvedGroup\"\r\n [ngClass]=\"getGroupOutline(component)\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'label')) as labelText\">\r\n <label>{{ labelText }}</label>\r\n </ng-container>\r\n <div #group\r\n [register]=\"component\"\r\n [componentRef]=\"group\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvedGroup\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"component.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region tab -->\r\n <ng-container *ngSwitchCase=\"'tab'\">\r\n <ng-container *ngIf=\"(getPanels(component) | async) as panels\">\r\n <ng-container *ngIf=\"panels.length > 0\">\r\n <!-- @wemake4u/form-controls: focusContent moves the focus into the panel shown at the start or selected (not for the\r\n arrow keys), except for the panels with disableAutoFocus. -->\r\n <wm-sirio-tabs #tabInstance\r\n [register]=\"component\"\r\n [componentRef]=\"tabInstance\"\r\n [scrollLeftLabel]=\"locale(Texts, 'ScrollLeft')\"\r\n [scrollRightLabel]=\"locale(Texts, 'ScrollRight')\"\r\n [line]=\"!!component.navigation\"\r\n [vertical]=\"!!component.vertical\"\r\n [focusablePanels]=\"false\"\r\n focusContent>\r\n <ng-container *ngFor=\"let panel of panels; let i = index;\">\r\n <wm-sirio-tab *ngIf=\"evaluateConditional(panel.conditional)\"\r\n [label]=\"evaluateString(locale(panel, 'label'))\"\r\n [icon]=\"evaluateString(panel.icon) || null\"\r\n [disabled]=\"evaluateBoolean(panel.disabled) ?? false\"\r\n [badge]=\"evaluate(panel.badge)\"\r\n [focusContent]=\"panel.disableAutoFocus !== true\">\r\n <ng-template wmSirioTabContent>\r\n <ng-container *ngIf=\"getTemplate(panel.template) as template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvePath(panel.path)\"\r\n [rows]=\"template.rows\"\r\n [identity]=\"component.id\"\r\n [identityIndex]=\"i\"\r\n [readOnly]=\"readOnly || evaluateBoolean(panel.readonly)\"\r\n [disableAutoFocus]=\"template.disableAutoFocus\"\r\n [alignment]=\"template.verticalAlignment\"></app-dynamic-fields>\r\n </ng-container>\r\n </ng-template>\r\n </wm-sirio-tab>\r\n </ng-container>\r\n </wm-sirio-tabs>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region accordion -->\r\n <ng-container *ngSwitchCase=\"'accordion'\">\r\n <ng-container *ngIf=\"(getPanels(component) | async) as panels\">\r\n <ng-container *ngIf=\"panels.length > 0\">\r\n <!-- exclusive: one section open at a time, as with ngx-sirio-lib. -->\r\n <wm-sirio-accordion exclusive\r\n #accordion\r\n [register]=\"component\"\r\n [componentRef]=\"accordion\">\r\n <ng-container *ngFor=\"let panel of panels; let i = index;\">\r\n <ng-container *ngIf=\"resolvePath(panel.path) as formGroup\">\r\n <!-- Content not lazy (as before): the fields of closed sections stay in the form. -->\r\n <wm-sirio-accordion-item *ngIf=\"evaluateConditional(panel.conditional)\"\r\n [title]=\"evaluateString(locale(panel, 'label'))\"\r\n [badge]=\"evaluate(panel.badge)\"\r\n [disabled]=\"evaluateBoolean(panel.disabled)\">\r\n <ng-container *ngIf=\"getTemplate(panel.template) as template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"formGroup\"\r\n [readOnly]=\"readOnly || evaluateBoolean(panel.readonly)\"\r\n [rows]=\"template.rows\"\r\n [identity]=\"component.id\"\r\n [identityIndex]=\"i\"\r\n [disableAutoFocus]=\"template.disableAutoFocus\"\r\n [alignment]=\"template.verticalAlignment\"></app-dynamic-fields>\r\n </ng-container>\r\n </wm-sirio-accordion-item>\r\n </ng-container>\r\n </ng-container>\r\n </wm-sirio-accordion>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region text -->\r\n <ng-container *ngSwitchCase=\"'text'\">\r\n <div [collapse]=\"component.collapseTo\"\r\n [onCollapse]=\"callExpression(component.onCollapse)\"\r\n [onExpand]=\"callExpression(component.onExpand)\"\r\n #text\r\n [register]=\"component\"\r\n [componentRef]=\"text\">\r\n <!--Reset View Context-->\r\n <div tabindex=\"0\" style=\"display:none\"></div>\r\n <div class=\"flex\">\r\n <div class=\"text-paragraph\"\r\n [markdown]=\"callExpression(component.anchorClick)\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n <ng-container *ngIf=\"component.tooltip\">\r\n <wm-sirio-info-button [content]=\"tooltipTemplate\"\r\n [label]=\"locale(Texts, 'Information')\"></wm-sirio-info-button>\r\n <ng-template #tooltipTemplate>\r\n <div class=\"sirio-tooltip-body\">\r\n <div class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'tooltip')))\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region html -->\r\n <ng-container *ngSwitchCase=\"'html'\">\r\n <div class=\"html-paragraph\"\r\n [innerHTML]=\"sanitize(evaluateTemplate(locale(component, 'content')))\"\r\n #html\r\n [register]=\"component\"\r\n [componentRef]=\"html\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region image -->\r\n <ng-container *ngSwitchCase=\"'image'\">\r\n <!-- || '': an alt expression giving null would be read aloud as \"null\". -->\r\n <img [src]=\"evaluateString(component.source)\"\r\n [alt]=\"evaluateString(locale(component, 'alt')) || ''\"\r\n style=\"width: 100%;height: 100%;\"\r\n #image\r\n [register]=\"component\"\r\n [componentRef]=\"image\">\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region table -->\r\n <ng-container *ngSwitchCase=\"'table'\">\r\n <label *ngIf=\"evaluateString(locale(component, 'label')) as tableLabel\">{{ tableLabel }}</label>\r\n <!-- Sirio data grid: configuration from SirioGridService. -->\r\n @let grid = getSirioGrid(component);\r\n @let rows = getSirioRows(component, grid);\r\n <!-- Paginator with rowCount > 0, or when the server source pages its rows. -->\r\n @let pagedSize = grid.pageable ? null : rows.pagedSize();\r\n @let gridHeight = component.autoHeight ? null : evaluateSize(component.height);\r\n <wm-sirio-data-grid #table\r\n class=\"fp-data-grid\"\r\n variant=\"dark\"\r\n size=\"sm\"\r\n [filterButton]=\"component.floatingFilter === true ? 'always' : 'none'\"\r\n [showFilterChips]=\"false\"\r\n paginationVariant=\"compact\"\r\n [caption]=\"evaluateString(locale(component, 'label'))\"\r\n [keyboardNavigation]=\"component.keyboardNavigation !== false\"\r\n [navigationHint]=\"evaluateString(locale(component, 'navigationHint')) || locale(Texts, 'GridNavigationHint')\"\r\n [data]=\"rows.data()\"\r\n [dataSource]=\"rows.dataSource\"\r\n [loading]=\"rows.loading()\"\r\n [emptyText]=\"rows.failed() ? locale(Texts, 'LoadingFailed') : locale(Texts, 'NoData')\"\r\n [loadErrorText]=\"locale(Texts, 'LoadingFailed')\"\r\n [rowId]=\"grid.rowId\"\r\n [selection]=\"sirioSelection(component)\"\r\n singleSelectionControl=\"checkbox\"\r\n [selectionColumn]=\"grid.checkboxes\"\r\n [selectOnRowClick]=\"grid.checkboxes && grid.clickSelect\"\r\n selectAll=\"filtered\"\r\n hideUnselectable\r\n [rowSelectable]=\"grid.rowSelectable\"\r\n [selected]=\"grid.selected()\"\r\n (selectedChange)=\"onSirioSelectionChanged(component, grid, $event)\"\r\n [rowClass]=\"grid.rowClass\"\r\n [rowStyle]=\"grid.rowStyle\"\r\n [pageable]=\"grid.pageable || pagedSize !== null\"\r\n [pageSize]=\"pagedSize ?? grid.pageSize\"\r\n [pageSizeOptions]=\"sirioPageSizes(pagedSize)\"\r\n [rowNumbers]=\"grid.rowNumbers\"\r\n rowNumberHeader=\"#\"\r\n [resizable]=\"grid.resizable\"\r\n [reorderable]=\"grid.reorderable\"\r\n filterOperators\r\n [filterRow]=\"component.floatingFilter === true\"\r\n [filterYesLabel]=\"locale(Texts, 'True')\"\r\n [filterNoLabel]=\"locale(Texts, 'False')\"\r\n [height]=\"gridHeight\"\r\n [stickyHeader]=\"!!gridHeight\"\r\n [minHeight]=\"evaluateSize(component.minHeight)\"\r\n [refresh]=\"refreshRowSource(component)\"\r\n [register]=\"component\"\r\n [componentRef]=\"table\">\r\n @for (col of grid.columns; track col.id) {\r\n <wm-sirio-grid-column [field]=\"col.field\"\r\n [header]=\"col.header\"\r\n [value]=\"col.value\"\r\n [format]=\"col.format\"\r\n [align]=\"col.align\"\r\n [filter]=\"col.filter\"\r\n [filterOptions]=\"col.filterOptions\"\r\n [filterMultiple]=\"col.filterMultiple\"\r\n [filterOperators]=\"col.filterOperators\"\r\n [sortable]=\"col.sortable\"\r\n [resizable]=\"col.resizable\"\r\n [wrap]=\"col.wrap\"\r\n [mono]=\"col.mono\"\r\n [fit]=\"col.fit\"\r\n [fixed]=\"col.fixed\"\r\n [flex]=\"col.flex\"\r\n [width]=\"col.width\"\r\n [minWidth]=\"col.minWidth\"\r\n [maxWidth]=\"col.maxWidth\"\r\n [group]=\"col.group\"\r\n [hidden]=\"col.actions && evaluateBoolean(component.suppressActions) === true\"\r\n [cellClass]=\"col.cellClass\"\r\n [cellStyle]=\"col.cellStyle\"\r\n [headerClass]=\"col.headerClass\"\r\n [headerStyle]=\"col.headerStyle\">\r\n @if (col.renderer; as renderer) {\r\n <ng-template wmSirioGridCell let-row let-value=\"value\" let-index=\"index\">\r\n @if (renderer.kind === 'html') {\r\n <span [innerHTML]=\"renderer.html(row, value)\"></span>\r\n } @else {\r\n <fp-sirio-cell-host [renderer]=\"renderer.type\" [params]=\"renderer.params(row, value, index)\" />\r\n }\r\n </ng-template>\r\n }\r\n </wm-sirio-grid-column>\r\n }\r\n </wm-sirio-data-grid>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region button -->\r\n <ng-container *ngSwitchCase=\"'button'\">\r\n <div [ngClass]=\"getHorizontalAlignment(component)\">\r\n <!-- @wemake4u/form-controls: color \"ghost\" = plain sirio-btn; icon on the left unless iconPosition \"right\". -->\r\n <button type=\"button\"\r\n [wmSirioButton]=\"evaluateVariant(component.color)\"\r\n [disabled]=\"evaluateBoolean(component.disabled) ?? false\"\r\n [icon]=\"evaluateString(component.icon) || null\"\r\n [iconPosition]=\"component.iconPosition == 'right' ? 'end' : 'start'\"\r\n (click)=\"clickButton(component, $event)\"\r\n #button\r\n [register]=\"component\"\r\n [componentRef]=\"button\">{{ evaluateString(locale(component, 'label')) }}</button>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region separator -->\r\n <ng-container *ngSwitchCase=\"'separator'\">\r\n <div class=\"separator\"\r\n #separator\r\n [register]=\"component\"\r\n [componentRef]=\"separator\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region spacer -->\r\n <ng-container *ngSwitchCase=\"'spacer'\">\r\n <div style=\"width: 100%\"\r\n [style.height.px]=\"component.height\"\r\n #spacer\r\n [register]=\"component\"\r\n [componentRef]=\"spacer\">\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region iframe -->\r\n <ng-container *ngSwitchCase=\"'iframe'\">\r\n <label [for]=\"component.id\">{{ evaluateString(locale(component, 'label')) }}</label>\r\n <iframe [src]=\"evaluateUrl(component.url)\"\r\n [title]=\"evaluateString(locale(component, 'label'))\"\r\n [style.width]=\"'100%'\"\r\n [style.height.px]=\"component.height\"\r\n [frameSecurity]=\"component.security\"\r\n #iframe\r\n [register]=\"component\"\r\n [componentRef]=\"iframe\">\r\n </iframe>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region alert -->\r\n <ng-container *ngSwitchCase=\"'alert'\">\r\n <!-- @wemake4u/form-controls: preventClose → no close button; markdown as block content. -->\r\n <wm-sirio-alert [type]=\"component.role || 'info'\"\r\n [closeLabel]=\"locale(Texts, 'Close')\"\r\n [dismissible]=\"!evaluateBoolean(component.preventClose)\"\r\n #alert\r\n [register]=\"component\"\r\n [componentRef]=\"alert\">\r\n <div wmSirioAlertContent\r\n class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </wm-sirio-alert>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region notice -->\r\n <ng-container *ngSwitchCase=\"'notice'\">\r\n <!-- @wemake4u/form-controls: light notice (kit default); markdown as block content. -->\r\n <wm-sirio-notify #notice\r\n [title]=\"evaluateString(locale(component, 'title'))\"\r\n [register]=\"component\"\r\n [componentRef]=\"notice\">\r\n <div wmSirioNotifyContent\r\n class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </wm-sirio-notify>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region tooltip -->\r\n <ng-container *ngSwitchCase=\"'tooltip'\">\r\n <!-- @wemake4u/form-controls: the title is the popover title of the kit. -->\r\n <wm-sirio-info-button [content]=\"tooltipTemplate\"\r\n [title]=\"evaluateString(locale(component, 'title'))\"\r\n [label]=\"evaluateString(locale(component, 'title')) || locale(Texts, 'Information')\"\r\n #tooltip\r\n [register]=\"component\"\r\n [componentRef]=\"tooltip\"></wm-sirio-info-button>\r\n <ng-template #tooltipTemplate>\r\n <div class=\"sirio-tooltip-body\">\r\n <div class=\"text-paragraph\"\r\n [innerHTML]=\"toHTML(evaluateTemplate(locale(component, 'text')))\">\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region chart -->\r\n <ng-container *ngSwitchCase=\"'chart'\">\r\n <label>{{ evaluateString(locale(component, 'label')) }}</label>\r\n <ng-container [observe]=\"getChartData(component)\"\r\n [callback]=\"invalidateChart(component)\">\r\n <ag-charts [options]=\"(getChartOptions(component) | async) ?? {}\"\r\n [style.height.px]=\"component.height\"\r\n #chart\r\n [register]=\"component\"\r\n [componentRef]=\"chart\" />\r\n </ng-container> \r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region component -->\r\n <ng-container *ngSwitchCase=\"'component'\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'label')) as labelText\">\r\n <label>{{ labelText }}</label>\r\n </ng-container>\r\n <ng-container *ngIf=\"component.isInput; else noInputTemplate\">\r\n <app-dynamic-host [properties]=\"getFeelableProperties(component)\"\r\n [formGroup]=\"resolvePath(component.path)\"\r\n #componentHost\r\n [register]=\"component\"\r\n [componentRef]=\"componentHost\" />\r\n <ng-container *ngIf=\"getTextFeedback(component) as textFeedback\">\r\n <span class=\"sirio-form-feedback d-block sirio-text-danger\">{{textFeedback}}</span>\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'description')) as textHelp\">\r\n <p class=\"sirio-form-text-help\">{{textHelp}}</p>\r\n </ng-container>\r\n <ng-template #noInputTemplate>\r\n <app-dynamic-host [properties]=\"getFeelableProperties(component)\"\r\n #componentHost\r\n [register]=\"component\"\r\n [componentRef]=\"componentHost\" />\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region templatehost -->\r\n <ng-container *ngSwitchCase=\"'templatehost'\">\r\n <ng-container *ngIf=\"getTemplate(component.template) as template\">\r\n <div #template\r\n [register]=\"component\"\r\n [componentRef]=\"template\">\r\n <app-dynamic-fields [form]=\"form\"\r\n [formGroup]=\"resolvePath(component.path)\"\r\n [readOnly]=\"readOnly || evaluateBoolean(component.readonly)\"\r\n [rows]=\"template?.rows\"\r\n [identity]=\"component.id\"\r\n [disableAutoFocus]=\"component.disableAutoFocus\"\r\n [alignment]=\"component.verticalAlignment\"></app-dynamic-fields>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region treelist -->\r\n <ng-container *ngSwitchCase=\"'treelist'\">\r\n <label>{{ evaluateString(locale(component, 'label')) }}</label>\r\n <div class=\"treelist\"\r\n [style.height]=\"component.height ? evaluateSize(component.height): null\"\r\n *ngIf=\"getTreeColumns(component) as columns\">\r\n <ng-container *ngIf=\"((getTreeSource(component) | async) ?? []) as rows\">\r\n <table #treelist\r\n [register]=\"component\"\r\n [componentRef]=\"treelist\"\r\n [treelist]=\"rows\">\r\n <colgroup>\r\n <col *ngFor=\"let column of columns\"\r\n [style.width]=\"evaluateSize(column.width)\">\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n <th scope=\"col\" *ngFor=\"let column of columns\"\r\n [ngClass]=\"getClass(column)\"\r\n [style.text-align]=\"column.align\">\r\n {{column.label}}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container>\r\n <tr *ngFor=\"let row of rows\"\r\n [attr.data-id]=\"row.id\"\r\n [attr.data-parent]=\"row.parentId\"\r\n [attr.data-expanded]=\"row.expanded ? 'true': 'false'\"\r\n [ngClass]=\"row.meta?.['cssClass']\">\r\n <td *ngFor=\"let column of columns; let i = index\"\r\n [ngClass]=\"getClass(column)\">\r\n <div [style.justify-content]=\"getJustify(column.align)\">\r\n <span *ngIf=\"i==component.expanderColumn\"\r\n [style.visibility]=\"row.hasChildren ? 'visible' : 'hidden'\"\r\n [style.padding-left]=\"evaluateSize(20 * row.level)\"\r\n class=\"toggle\"></span>\r\n <span class=\"text\"\r\n [title]=\"row.data[column.key]\">\r\n {{ row.data[column.key] }}\r\n </span>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n <!-- #endregion -->\r\n <!-- #region navigator -->\r\n <ng-container *ngSwitchCase=\"'navigator'\">\r\n <div #navigator\r\n [register]=\"component\"\r\n [componentRef]=\"navigator\">\r\n <div navigatorState\r\n [index]=\"evaluateNumber(component.index) ?? 0\"\r\n [total]=\"evaluateNumber(component.total) ?? 0\"\r\n (indexChange)=\"evaluateWithEventAsHandler(component.selectionChanged, { index: $event, count: state.total })\"\r\n #state=\"navigatorState\">\r\n <!-- @wemake4u/form-controls: item navigator (page = element, 1-based); the actions are projected at the end of the row. -->\r\n <wm-sirio-pagination [showItems]=\"false\"\r\n [pageSize]=\"1\"\r\n [total]=\"state.total\"\r\n [page]=\"state.index + 1\"\r\n (pageChange)=\"state.index = $event - 1\"\r\n [ariaLabel]=\"locale(Texts, 'ElementsNavigation')\"\r\n [ofLabel]=\"locale(Texts, 'Of')\"\r\n [pagesLabel]=\"locale(Texts, 'Elements')\"\r\n [pageLabel]=\"locale(Texts, 'Element')\"\r\n [goToPageLabel]=\"locale(Texts, 'GoToElement')\"\r\n [previousLabel]=\"locale(Texts, 'PreviousElement')\"\r\n [nextLabel]=\"locale(Texts, 'NextElement')\">\r\n <div class=\"actions\">\r\n <ng-container *ngTemplateOutlet=\"buttonsAdd; context: { total: state.total }\"></ng-container>\r\n <ng-container *ngIf=\"state.total && state.index != -1\">\r\n <ng-container *ngTemplateOutlet=\"buttonsRemove; context: { i: state.index, total: state.total }\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </wm-sirio-pagination>\r\n </div>\r\n </div>\r\n <ng-template #buttonsAdd let-total=\"total\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.addCondition, { total: total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnAdd; context: { total: total }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #buttonsRemove let-i=\"i\" let-total=\"total\">\r\n <ng-container *ngIf=\"!(readOnly || evaluateBoolean(component.readonly)) && component.allowAddRemove && evaluateWithEventAsBoolean(component.removeCondition, { index: i, total: total }, true)\">\r\n <ng-container *ngTemplateOutlet=\"btnRemove; context: { i: i, total: total }\"></ng-container>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnAdd let-total=\"total\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'addLabel') || locale(Texts, 'AddItem')) as addLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n class=\"add-item\"\r\n (click)=\"evaluateWithEventAsHandler(component.addExpression, { total: total })\"\r\n icon=\"fa-plus\" iconPosition=\"start\">{{ addLabel }}</button>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template #btnRemove let-i=\"i\" let-total=\"total\">\r\n <ng-container *ngIf=\"evaluateString(locale(component, 'removeLabel') || locale(Texts, 'RemoveItem')) as removeLabel\">\r\n <button type=\"button\" wmSirioButton=\"ghost\"\r\n class=\"remove-item\"\r\n (click)=\"evaluateWithEventAsHandler(component.removeExpression, { index: i, total: total })\"\r\n icon=\"fa-trash\" iconPosition=\"start\">{{ removeLabel }}<span class=\"sr-only\"> {{ itemPosition(i, total) }}</span></button>\r\n </ng-container>\r\n </ng-template>\r\n </ng-container>\r\n <!-- #endregion -->\r\n </div>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n</div>\r\n\r\n",
|
|
11895
10369
|
styles: [
|
|
11896
|
-
".flex{display:flex}.field-set{align-items:start}.field-set>.col-host>*{margin-bottom:10px}.separator{border-bottom:2px solid #d9e4f7;width:100%;margin:10px 0}.group-outline{border:1px solid #d9e4f7;padding:15px;margin-top:2px;margin-bottom:2px}.group-outline-repeat{margin-top:8px;margin-bottom:8px}.valign-start>.row{align-items:start}.valign-center>.row{align-items:center}.valign-end>.row{align-items:end}.component-start{align-self:start}.component-center{align-self:center}.component-end{align-self:end}.text-paragraph p{margin-bottom:0!important}.sirio-tab.sirio-tab-vertical .sirio-tab-body{margin-left:10px;margin-right:10px}.sirio-tab:not(.sirio-tab-vertical) .sirio-tab-body{margin-top:10px;margin-bottom:10px}.sirio-label{cursor:default}.w-100{width:100%!important}.col-host .sirio-accordion .sirio-accordion-body .sirio-accordion-content{padding:16px}.sirio-dialog-title{display:flex;margin-top:0}.sirio-dialog-title span{margin-right:10px;margin-bottom:0!important}.
|
|
10370
|
+
".flex{display:flex}.field-set{align-items:start}.field-set>.col-host>*{margin-bottom:10px}.separator{border-bottom:2px solid #d9e4f7;width:100%;margin:10px 0}.group-outline{border:1px solid #d9e4f7;padding:15px;margin-top:2px;margin-bottom:2px}.group-outline-repeat{margin-top:8px;margin-bottom:8px}.valign-start>.row{align-items:start}.valign-center>.row{align-items:center}.valign-end>.row{align-items:end}.component-start{align-self:start}.component-center{align-self:center}.component-end{align-self:end}.text-paragraph p{margin-bottom:0!important}.sirio-tab.sirio-tab-vertical .sirio-tab-body{margin-left:10px;margin-right:10px}.sirio-tab:not(.sirio-tab-vertical) .sirio-tab-body{margin-top:10px;margin-bottom:10px}.sirio-label{cursor:default}.w-100{width:100%!important}.col-host .sirio-accordion .sirio-accordion-body .sirio-accordion-content{padding:16px}.sirio-dialog-title{display:flex;margin-top:0}.sirio-dialog-title span{margin-right:10px;margin-bottom:0!important}.sirio-tab.sirio-tab-scroll{display:block}.sirio-btn.add-item,.sirio-btn.remove-item{padding:.875rem .9375rem}.fp-data-grid .btn-small-group{display:flex;flex-wrap:nowrap;justify-content:center;align-items:center}.fp-data-grid .btn-small-group .btn-small.sirio-btn{flex:none;padding:.25rem .0625rem;margin:2px}ag-charts{display:block;height:100%;border-radius:8px;background-color:var(--chart-bg);border:1px solid var(--chart-border);overflow:hidden}.badge-header{display:flex;justify-content:space-between;align-items:center;width:100%;margin-right:10px}.badge-header .badge-header-tag{margin-left:10px}wm-sirio-datetime .sirio-datetime-row>.sirio-datetime-date,wm-sirio-datetime .sirio-datetime-row>.sirio-datetime-time{flex:1 1 0;min-width:0}.horizontal-left{display:flex;justify-content:left}.horizontal-center{display:flex;justify-content:center}.horizontal-right{display:flex;justify-content:right}.horizontal-fill button{width:100%}.horizontal-left legend,.horizontal-center legend,.horizontal-right legend,.horizontal-fill legend{float:none}.fp-link-button{background:none;border:0;padding:0;font-family:inherit;font-size:inherit;cursor:pointer}.fp-link-button:hover{color:#00368f;text-decoration:underline}\n",
|
|
11897
10371
|
".display-field .sirio-form-control.data-display{border-color:#e3e5e8;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.display-field .sirio-form-control.data-display.textarea{white-space:pre;overflow:auto;height:auto;line-height:140%;min-height:3rem;padding:1rem}.display-field .sirio-form-control.data-display.text,.display-field .sirio-form-control:hover.data-display.text{overflow:auto;height:auto;margin-top:-6px;color:#454d56}.display-field .sirio-form-control.data-display.number{font-family:Roboto Mono,monospace}.display-field .sirio-form-control.data-display.checkbox{display:flex;justify-content:center;align-items:center}\n",
|
|
11898
10372
|
".light-readonly label:hover,.light-view div.sirio-label:hover{color:#454d56}.light-readonly input.sirio-form-control,.light-readonly .sirio-dropdown .sirio-dropdown-select,.light-readonly textarea.sirio-form-control,.light-view div.sirio-form-control{background:none!important;border:0px;padding-left:0}.light-readonly .sirio-input-group .sirio-input-group-text{background:none}.light-readonly .sirio-input-group .sirio-input-group-text span{color:#5b6571}.light-readonly .sirio-input-group .sirio-input-group-text.prefix{padding-left:0}wm-sirio-number.light-readonly .sirio-number-spinner{display:none}\n",
|
|
11899
10373
|
":root{--dynamiclist-border: 1px solid #ccc}.dynamiclist-no-data{text-align:center;padding:20px;font-style:italic;border:var(--dynamiclist-border)}.dynamiclist-table{width:100%;border-collapse:collapse;border:none}.dynamiclist-table.main{border:var(--dynamiclist-border)}.dynamiclist-table.main .dynamiclist-table{border-left:var(--dynamiclist-border);border-bottom:var(--dynamiclist-border)}.dynamiclist-table td{border:var(--dynamiclist-border)}.dynamiclist-table tr:first-child td{border-top:none}.dynamiclist-table tr:last-child td{border-bottom:none}.dynamiclist-table tr td:first-child{border-left:none}.dynamiclist-table tr td:last-child{border-right:none}.dynamiclist-table td.content-cell{width:100%;padding-left:8px;padding-right:8px;border-left:var(--dynamiclist-border)}.dynamiclist-table td.content-cell .group-outline-repeat{margin-bottom:0}.dynamiclist-table td.command-cell{vertical-align:middle}.dynamiclist-table td.command-cell>div{display:flex;justify-content:right}.dynamiclist-table td.recursion-cell .layout{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;width:100%;height:100%}.dynamiclist-table td.recursion-cell .recursion-toggle{grid-row:1 / span 2;grid-column:1;background-color:#f5f5f5;align-items:center}.dynamiclist-table td.recursion-cell .recursion-title{grid-row:1;grid-column:2;background:#f5f5f5;display:flex;align-items:center;min-height:34px}.dynamiclist-table td.recursion-cell .recursion-title .recursion-text{flex:1;text-align:center}.dynamiclist-table td.recursion-cell .recursion-title .recursion-add{margin-left:auto}.dynamiclist-table td.recursion-cell .recursion-content{grid-row:2;grid-column:2}.dynamiclist-table td.recursion-cell .recursion-content [data-sirio-visible=true]{overflow:visible!important}.dynamiclist-table .sirio-btn{padding:7px}\n",
|
|
@@ -11915,10 +10389,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11915
10389
|
{ type: WeakService },
|
|
11916
10390
|
{ type: RegisterService },
|
|
11917
10391
|
{ type: MetadataService },
|
|
11918
|
-
{ type: i1$
|
|
10392
|
+
{ type: i1$3.LanguageService },
|
|
11919
10393
|
{ type: GlobalService },
|
|
11920
10394
|
{ type: FormService },
|
|
11921
|
-
{ type: GridService },
|
|
11922
10395
|
{ type: SirioGridService },
|
|
11923
10396
|
{ type: ChartService },
|
|
11924
10397
|
{ type: DialogService },
|
|
@@ -12095,7 +10568,7 @@ var StyleDirective = class StyleDirective {
|
|
|
12095
10568
|
doc = inject(DOCUMENT);
|
|
12096
10569
|
host = inject(ElementRef);
|
|
12097
10570
|
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
12098
|
-
scopeAttr = `df-style-${nextId++}`;
|
|
10571
|
+
scopeAttr = `data-df-style-${nextId++}`;
|
|
12099
10572
|
sheet;
|
|
12100
10573
|
styleEl;
|
|
12101
10574
|
constructor() {
|
|
@@ -12675,6 +11148,7 @@ var DynamicFormComponent = class DynamicFormComponent {
|
|
|
12675
11148
|
}
|
|
12676
11149
|
hasPreviousErrors(index) {
|
|
12677
11150
|
for (let i = index - 1; i >= 0; i--) {
|
|
11151
|
+
if (this.isDisabled(i)) continue;
|
|
12678
11152
|
const previousForm = this.getFormByIndex(i);
|
|
12679
11153
|
if (previousForm && this.statusService.countErrors(previousForm, true) > 0) return true;
|
|
12680
11154
|
}
|
|
@@ -12776,14 +11250,14 @@ var DynamicFormComponent = class DynamicFormComponent {
|
|
|
12776
11250
|
{ token: StatusService },
|
|
12777
11251
|
{ token: EventService },
|
|
12778
11252
|
{ token: RegisterService },
|
|
12779
|
-
{ token: i1$
|
|
11253
|
+
{ token: i1$3.LanguageService },
|
|
12780
11254
|
{ token: SubscribeService },
|
|
12781
11255
|
{ token: MetadataService },
|
|
12782
11256
|
{ token: FormService },
|
|
12783
11257
|
{ token: DialogService },
|
|
12784
11258
|
{ token: i0.Injector },
|
|
12785
|
-
{ token: i1$
|
|
12786
|
-
{ token: i1$
|
|
11259
|
+
{ token: i1$4.Router },
|
|
11260
|
+
{ token: i1$4.ActivatedRoute },
|
|
12787
11261
|
{
|
|
12788
11262
|
token: ScopeService,
|
|
12789
11263
|
optional: true
|
|
@@ -12860,7 +11334,7 @@ var DynamicFormComponent = class DynamicFormComponent {
|
|
|
12860
11334
|
},
|
|
12861
11335
|
{
|
|
12862
11336
|
kind: "directive",
|
|
12863
|
-
type: i1$
|
|
11337
|
+
type: i1$5.NgClass,
|
|
12864
11338
|
selector: "[ngClass]",
|
|
12865
11339
|
inputs: ["class", "ngClass"]
|
|
12866
11340
|
},
|
|
@@ -12870,12 +11344,12 @@ var DynamicFormComponent = class DynamicFormComponent {
|
|
|
12870
11344
|
},
|
|
12871
11345
|
{
|
|
12872
11346
|
kind: "directive",
|
|
12873
|
-
type: i1$
|
|
11347
|
+
type: i1$2.NgControlStatusGroup,
|
|
12874
11348
|
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
12875
11349
|
},
|
|
12876
11350
|
{
|
|
12877
11351
|
kind: "directive",
|
|
12878
|
-
type: i1$
|
|
11352
|
+
type: i1$2.FormGroupDirective,
|
|
12879
11353
|
selector: "[formGroup]",
|
|
12880
11354
|
inputs: ["formGroup"],
|
|
12881
11355
|
outputs: ["ngSubmit"],
|
|
@@ -13021,14 +11495,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
13021
11495
|
{ type: StatusService },
|
|
13022
11496
|
{ type: EventService },
|
|
13023
11497
|
{ type: RegisterService },
|
|
13024
|
-
{ type: i1$
|
|
11498
|
+
{ type: i1$3.LanguageService },
|
|
13025
11499
|
{ type: SubscribeService },
|
|
13026
11500
|
{ type: MetadataService },
|
|
13027
11501
|
{ type: FormService },
|
|
13028
11502
|
{ type: DialogService },
|
|
13029
11503
|
{ type: i0.Injector },
|
|
13030
|
-
{ type: i1$
|
|
13031
|
-
{ type: i1$
|
|
11504
|
+
{ type: i1$4.Router },
|
|
11505
|
+
{ type: i1$4.ActivatedRoute },
|
|
13032
11506
|
{
|
|
13033
11507
|
type: ScopeService,
|
|
13034
11508
|
decorators: [{ type: Optional }]
|
|
@@ -13139,6 +11613,13 @@ async function resolveRefsAsync(input, resolver, options = {}) {
|
|
|
13139
11613
|
}
|
|
13140
11614
|
return visit(input, null, null, input);
|
|
13141
11615
|
}
|
|
11616
|
+
function subscribeOnce(source$, next, error, complete) {
|
|
11617
|
+
source$.pipe(take$1(1)).subscribe({
|
|
11618
|
+
next,
|
|
11619
|
+
error,
|
|
11620
|
+
complete
|
|
11621
|
+
});
|
|
11622
|
+
}
|
|
13142
11623
|
function deepEqual(a, b, options, visited) {
|
|
13143
11624
|
if (options?.handleCircular && !visited) visited = /* @__PURE__ */ new WeakMap();
|
|
13144
11625
|
if (a === b) return true;
|
|
@@ -13220,7 +11701,7 @@ var ODataSource = class {
|
|
|
13220
11701
|
}
|
|
13221
11702
|
addOrderBy(params, queryParams) {
|
|
13222
11703
|
if (!params.sortModel || params.sortModel.length === 0) return queryParams;
|
|
13223
|
-
const orderByParams = params.sortModel.map((sort) => `${sort.colId} ${sort.sort}`).join(",");
|
|
11704
|
+
const orderByParams = params.sortModel.map((sort) => `${this.resolveColumn(sort.colId)} ${sort.sort}`).join(",");
|
|
13224
11705
|
return queryParams.set("$orderby", orderByParams);
|
|
13225
11706
|
}
|
|
13226
11707
|
addFilterBy(params, queryParams) {
|
|
@@ -13232,17 +11713,21 @@ var ODataSource = class {
|
|
|
13232
11713
|
const condition = this.getCondition(column, filter);
|
|
13233
11714
|
if (condition) filters.push(condition);
|
|
13234
11715
|
}
|
|
13235
|
-
return queryParams.set("$filter", filters.join(" and "));
|
|
11716
|
+
return filters.length ? queryParams.set("$filter", filters.join(" and ")) : queryParams;
|
|
13236
11717
|
}
|
|
13237
11718
|
getCondition(column, filter) {
|
|
13238
11719
|
if (filter.operator === "AND" || filter.operator === "OR") {
|
|
13239
|
-
if (Array.isArray(filter.conditions))
|
|
11720
|
+
if (Array.isArray(filter.conditions)) {
|
|
11721
|
+
const conditions = filter.conditions.map((subfilter) => this.getCondition(column, subfilter)).filter((condition) => !!condition);
|
|
11722
|
+
return conditions.length ? "(" + conditions.join(` ${filter.operator.toLowerCase()} `) + ")" : null;
|
|
11723
|
+
}
|
|
13240
11724
|
return null;
|
|
13241
11725
|
}
|
|
13242
11726
|
const value = filter.filter;
|
|
11727
|
+
column = this.resolveColumn(column);
|
|
13243
11728
|
switch (filter.filterType) {
|
|
13244
11729
|
case "text":
|
|
13245
|
-
const text = (value ?? "").replace(/'/g, "''");
|
|
11730
|
+
const text = (value ?? "").toString().replace(/'/g, "''");
|
|
13246
11731
|
if (filter.type === "contains") return `contains(${column}, '${text}')`;
|
|
13247
11732
|
else if (filter.type === "notContains") return `not contains(${column}, '${text}')`;
|
|
13248
11733
|
else if (filter.type === "equals") return `${column} eq '${text}'`;
|
|
@@ -13253,18 +11738,52 @@ var ODataSource = class {
|
|
|
13253
11738
|
else if (filter.type === "notBlank") return `${column} ne null`;
|
|
13254
11739
|
else if (filter.type === "true") return `${column} eq true`;
|
|
13255
11740
|
else if (filter.type === "false") return `${column} eq false`;
|
|
11741
|
+
else if (filter.type === "includeAll") return `${column} eq ${column}`;
|
|
11742
|
+
else if (filter.type === "excludeAll") return `${column} ne ${column}`;
|
|
13256
11743
|
break;
|
|
13257
11744
|
case "number":
|
|
13258
11745
|
if (filter.type === "equals") return `${column} eq ${value}`;
|
|
11746
|
+
else if (filter.type === "notEqual") return `${column} ne ${value}`;
|
|
13259
11747
|
else if (filter.type === "greaterThan") return `${column} gt ${value}`;
|
|
13260
11748
|
else if (filter.type === "lessThan") return `${column} lt ${value}`;
|
|
13261
11749
|
else if (filter.type === "greaterThanOrEqual") return `${column} ge ${value}`;
|
|
13262
11750
|
else if (filter.type === "lessThanOrEqual") return `${column} le ${value}`;
|
|
11751
|
+
else if (filter.type === "inRange") return `(${column} ge ${value} and ${column} le ${filter.filterTo})`;
|
|
11752
|
+
else if (filter.type === "blank") return `${column} eq null`;
|
|
11753
|
+
else if (filter.type === "notBlank") return `${column} ne null`;
|
|
13263
11754
|
break;
|
|
13264
|
-
case "date":
|
|
11755
|
+
case "date":
|
|
11756
|
+
const dateFrom = this.getDateValue(filter.dateFrom);
|
|
11757
|
+
const dateTo = this.getDateValue(filter.dateTo);
|
|
11758
|
+
if (filter.type === "blank") return `${column} eq null`;
|
|
11759
|
+
else if (filter.type === "notBlank") return `${column} ne null`;
|
|
11760
|
+
else if (!dateFrom) return null;
|
|
11761
|
+
else if (filter.type === "equals") return `${column} eq ${dateFrom}`;
|
|
11762
|
+
else if (filter.type === "notEqual") return `${column} ne ${dateFrom}`;
|
|
11763
|
+
else if (filter.type === "greaterThan") return `${column} gt ${dateFrom}`;
|
|
11764
|
+
else if (filter.type === "lessThan") return `${column} lt ${dateFrom}`;
|
|
11765
|
+
else if (filter.type === "greaterThanOrEqual") return `${column} ge ${dateFrom}`;
|
|
11766
|
+
else if (filter.type === "lessThanOrEqual") return `${column} le ${dateFrom}`;
|
|
11767
|
+
else if (filter.type === "inRange" && dateTo) return `(${column} ge ${dateFrom} and ${column} le ${dateTo})`;
|
|
13265
11768
|
}
|
|
13266
11769
|
return null;
|
|
13267
11770
|
}
|
|
11771
|
+
resolveColumn(column) {
|
|
11772
|
+
return column.replace(/\./g, "/");
|
|
11773
|
+
}
|
|
11774
|
+
getDateValue(rawDate) {
|
|
11775
|
+
if (!rawDate) return null;
|
|
11776
|
+
const date = new Date(rawDate);
|
|
11777
|
+
if (isNaN(date.getTime())) return null;
|
|
11778
|
+
if (!this.hasTime(date)) return this.toDateString(date);
|
|
11779
|
+
return date.toISOString();
|
|
11780
|
+
}
|
|
11781
|
+
hasTime(date) {
|
|
11782
|
+
return date.getHours() !== 0 || date.getMinutes() !== 0 || date.getSeconds() !== 0 || date.getMilliseconds() !== 0;
|
|
11783
|
+
}
|
|
11784
|
+
toDateString(date) {
|
|
11785
|
+
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
11786
|
+
}
|
|
13268
11787
|
toNumber(value) {
|
|
13269
11788
|
if (!value) return void 0;
|
|
13270
11789
|
const num = parseFloat(value);
|
|
@@ -13493,19 +12012,30 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
13493
12012
|
}],
|
|
13494
12013
|
ctorParameters: () => [{ type: DialogService }]
|
|
13495
12014
|
});
|
|
12015
|
+
const ERROR_TITLE_PROPERTY = "errorTitle";
|
|
12016
|
+
const ERROR_DETAIL_PROPERTY = "errorDetail";
|
|
13496
12017
|
var DefaultMessageFactory = class DefaultMessageFactory {
|
|
13497
12018
|
languageService;
|
|
12019
|
+
global = inject(GlobalService);
|
|
13498
12020
|
constructor(languageService) {
|
|
13499
12021
|
this.languageService = languageService;
|
|
13500
12022
|
}
|
|
13501
12023
|
createError(err) {
|
|
13502
|
-
if (typeof err
|
|
12024
|
+
if (typeof err?.error === "object" && (err.error?.title || err.error?.detail)) err = err.error;
|
|
13503
12025
|
const title = err?.title ?? this.getTitleText();
|
|
13504
12026
|
if (err instanceof TimeoutError) return {
|
|
13505
12027
|
title,
|
|
13506
12028
|
detail: this.getTimeoutText(),
|
|
13507
12029
|
severity: "error"
|
|
13508
12030
|
};
|
|
12031
|
+
if (err instanceof HttpErrorResponse) {
|
|
12032
|
+
console.error(err);
|
|
12033
|
+
return {
|
|
12034
|
+
title,
|
|
12035
|
+
detail: err.status === 0 ? this.getUnreachableText() : this.getDetailText(),
|
|
12036
|
+
severity: "error"
|
|
12037
|
+
};
|
|
12038
|
+
}
|
|
13509
12039
|
return {
|
|
13510
12040
|
title,
|
|
13511
12041
|
detail: err?.detail ?? err?.message ?? this.getDetailText(),
|
|
@@ -13519,20 +12049,23 @@ var DefaultMessageFactory = class DefaultMessageFactory {
|
|
|
13519
12049
|
return localize(this.language, component, key);
|
|
13520
12050
|
}
|
|
13521
12051
|
getTitleText() {
|
|
13522
|
-
return this.locale(Texts, "SomethingWentWrong");
|
|
12052
|
+
return this.global.getProperty("errorTitle") || this.locale(Texts, "SomethingWentWrong");
|
|
13523
12053
|
}
|
|
13524
12054
|
getTimeoutText() {
|
|
13525
12055
|
return this.locale(Texts, "TimeoutOccurred");
|
|
13526
12056
|
}
|
|
12057
|
+
getUnreachableText() {
|
|
12058
|
+
return this.locale(Texts, "ServiceUnreachable");
|
|
12059
|
+
}
|
|
13527
12060
|
getDetailText() {
|
|
13528
|
-
return this.locale(Texts, "GenericError");
|
|
12061
|
+
return this.global.getProperty("errorDetail") || this.locale(Texts, "GenericError");
|
|
13529
12062
|
}
|
|
13530
12063
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
13531
12064
|
minVersion: "12.0.0",
|
|
13532
12065
|
version: "22.2.2",
|
|
13533
12066
|
ngImport: i0,
|
|
13534
12067
|
type: DefaultMessageFactory,
|
|
13535
|
-
deps: [{ token: i1$
|
|
12068
|
+
deps: [{ token: i1$3.LanguageService }],
|
|
13536
12069
|
target: i0.ɵɵFactoryTarget.Injectable
|
|
13537
12070
|
});
|
|
13538
12071
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
@@ -13552,7 +12085,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
13552
12085
|
type: Injectable,
|
|
13553
12086
|
args: [{ providedIn: "root" }]
|
|
13554
12087
|
}],
|
|
13555
|
-
ctorParameters: () => [{ type: i1$
|
|
12088
|
+
ctorParameters: () => [{ type: i1$3.LanguageService }]
|
|
13556
12089
|
});
|
|
13557
12090
|
var console_default = {
|
|
13558
12091
|
name: "console",
|
|
@@ -14654,6 +13187,7 @@ const builtIn = [
|
|
|
14654
13187
|
]
|
|
14655
13188
|
}
|
|
14656
13189
|
];
|
|
14657
|
-
|
|
13190
|
+
const DataGridControl = TableControl;
|
|
13191
|
+
export { AccordionControl, ButtonControl, ChartControl, CheckBoxControl, CheckListControl, ContainerControl, Control, DataGridControl, DataService, DateControl, DateTimeControl, DefaultConfirmationController, DefaultMessageFactory, DefaultNotificationController, DefaultPromptController, DialogService, DisplayFieldControl, DynamicFormComponent, DynamicListControl, ERROR_DETAIL_PROPERTY, ERROR_TITLE_PROPERTY, FeelService, FilePickerControl, FormControl, FormService, GlobalService, GroupControl, HtmlControl, IFrameControl, ImageControl, ItemControl, MarkdownService, NavigationService, NumberControl, RadioControl, RangeControl, SanitizeService, ScopeService, SelectControl, SeparatorControl, SpacerControl, TabControl, TableControl, TagListControl, TextAreaControl, TextControl, TextFieldControl, TimeControl, ToastService, TooltipControl, builtIn, deepEqual, navigateTo, parseRoute, resolveRefs, resolveRefsAsync, subscribeOnce, syncronize };
|
|
14658
13192
|
|
|
14659
13193
|
//# sourceMappingURL=wemake4u-form-player.mjs.map
|