@ajf/material 15.3.3 → 15.3.5
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/esm2020/form-builder/form-builder-module.mjs +4 -3
- package/esm2020/form-builder/form-builder-service.mjs +98 -3
- package/esm2020/form-builder/form-builder.mjs +7 -9
- package/esm2020/form-builder/node-entry.mjs +38 -33
- package/esm2020/form-builder/node-properties-name-validator.mjs +64 -0
- package/esm2020/form-builder/node-properties.mjs +46 -19
- package/esm2020/forms/field-service.mjs +6 -1
- package/esm2020/forms/forms-module.mjs +8 -1
- package/esm2020/forms/range-field.mjs +2 -2
- package/esm2020/forms/signature-field.mjs +50 -0
- package/esm2020/node-icon/node-icon.mjs +3 -1
- package/esm2020/signature/ajf-material-signature.mjs +5 -0
- package/esm2020/signature/public_api.mjs +24 -0
- package/esm2020/signature/signature-module.mjs +61 -0
- package/esm2020/signature/signature.mjs +77 -0
- package/fesm2015/ajf-material-form-builder.mjs +252 -69
- package/fesm2015/ajf-material-form-builder.mjs.map +1 -1
- package/fesm2015/ajf-material-forms.mjs +60 -5
- package/fesm2015/ajf-material-forms.mjs.map +1 -1
- package/fesm2015/ajf-material-node-icon.mjs +2 -0
- package/fesm2015/ajf-material-node-icon.mjs.map +1 -1
- package/fesm2015/ajf-material-signature.mjs +164 -0
- package/fesm2015/ajf-material-signature.mjs.map +1 -0
- package/fesm2020/ajf-material-form-builder.mjs +252 -69
- package/fesm2020/ajf-material-form-builder.mjs.map +1 -1
- package/fesm2020/ajf-material-forms.mjs +58 -5
- package/fesm2020/ajf-material-forms.mjs.map +1 -1
- package/fesm2020/ajf-material-node-icon.mjs +2 -0
- package/fesm2020/ajf-material-node-icon.mjs.map +1 -1
- package/fesm2020/ajf-material-signature.mjs +163 -0
- package/fesm2020/ajf-material-signature.mjs.map +1 -0
- package/form-builder/form-builder-service.d.ts +48 -0
- package/form-builder/form-builder.d.ts +0 -2
- package/form-builder/node-entry.d.ts +4 -5
- package/form-builder/node-properties-name-validator.d.ts +43 -0
- package/form-builder/node-properties.d.ts +7 -2
- package/forms/forms-module.d.ts +35 -33
- package/forms/signature-field.d.ts +36 -0
- package/package.json +10 -2
- package/signature/index.d.ts +5 -0
- package/signature/public_api.d.ts +23 -0
- package/signature/signature-module.d.ts +13 -0
- package/signature/signature.d.ts +37 -0
|
@@ -13,9 +13,9 @@ import * as i4 from '@angular/material/autocomplete';
|
|
|
13
13
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
14
14
|
import * as i5 from '@angular/material/button';
|
|
15
15
|
import { MatButtonModule } from '@angular/material/button';
|
|
16
|
-
import * as i6$
|
|
16
|
+
import * as i6$2 from '@angular/material/card';
|
|
17
17
|
import { MatCardModule } from '@angular/material/card';
|
|
18
|
-
import * as
|
|
18
|
+
import * as i8$2 from '@angular/material/checkbox';
|
|
19
19
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
20
20
|
import * as i7$2 from '@angular/material/chips';
|
|
21
21
|
import { MatChipsModule } from '@angular/material/chips';
|
|
@@ -23,27 +23,27 @@ import * as i2 from '@angular/material/dialog';
|
|
|
23
23
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
24
24
|
import * as i8$1 from '@angular/material/expansion';
|
|
25
25
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
26
|
-
import * as
|
|
26
|
+
import * as i9 from '@angular/material/form-field';
|
|
27
27
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
28
|
-
import * as
|
|
28
|
+
import * as i10 from '@angular/material/icon';
|
|
29
29
|
import { MatIconModule } from '@angular/material/icon';
|
|
30
|
-
import * as i6
|
|
30
|
+
import * as i6 from '@angular/material/input';
|
|
31
31
|
import { MatInputModule } from '@angular/material/input';
|
|
32
32
|
import * as i7$1 from '@angular/material/list';
|
|
33
33
|
import { MatListModule } from '@angular/material/list';
|
|
34
|
-
import * as i7$
|
|
34
|
+
import * as i7$3 from '@angular/material/menu';
|
|
35
35
|
import { MatMenuModule } from '@angular/material/menu';
|
|
36
36
|
import * as i12 from '@angular/material/select';
|
|
37
37
|
import { MatSelectModule } from '@angular/material/select';
|
|
38
|
-
import * as i8$
|
|
38
|
+
import * as i8$3 from '@angular/material/sidenav';
|
|
39
39
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
40
40
|
import * as i11 from '@angular/material/slide-toggle';
|
|
41
41
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
42
|
-
import * as
|
|
42
|
+
import * as i13 from '@angular/material/slider';
|
|
43
43
|
import { MatSliderModule } from '@angular/material/slider';
|
|
44
44
|
import * as i7 from '@angular/material/table';
|
|
45
45
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
46
|
-
import * as i9 from '@angular/material/toolbar';
|
|
46
|
+
import * as i9$1 from '@angular/material/toolbar';
|
|
47
47
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
48
48
|
import * as i8 from '@angular/material/tooltip';
|
|
49
49
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
@@ -51,12 +51,12 @@ import * as i1 from '@ajf/core/forms';
|
|
|
51
51
|
import { isChoicesFixedOrigin, isContainerNode, AjfFieldType, AjfNodeType, createField, createContainerNode, createForm, createChoicesFixedOrigin, isSlidesNode, isFieldWithChoices, isRepeatingContainerNode, isField, createValidationGroup, notEmptyValidation, minValidation, maxValidation, minDigitsValidation, maxDigitsValidation, createValidation, createWarningGroup, notEmptyWarning, createWarning, isRangeField, isTableField, isNumberField } from '@ajf/core/forms';
|
|
52
52
|
import { DataSource } from '@angular/cdk/collections';
|
|
53
53
|
import { BehaviorSubject, of, Subject, Subscription, combineLatest } from 'rxjs';
|
|
54
|
-
import * as i6$
|
|
55
|
-
import { filter, map, scan, shareReplay, withLatestFrom, take, distinctUntilChanged, sample } from 'rxjs/operators';
|
|
54
|
+
import * as i6$1 from '@ngneat/transloco';
|
|
55
|
+
import { filter, map, scan, shareReplay, withLatestFrom, debounceTime, finalize, take, distinctUntilChanged, sample } from 'rxjs/operators';
|
|
56
56
|
import { createCondition, alwaysCondition, createFormula, neverCondition } from '@ajf/core/models';
|
|
57
57
|
import { deepCopy } from '@ajf/core/utils';
|
|
58
58
|
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
59
|
-
import * as i5$
|
|
59
|
+
import * as i5$1 from '@angular/material/core';
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* @license
|
|
@@ -235,7 +235,7 @@ class AjfFbChoicesOriginEditor {
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
AjfFbChoicesOriginEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbChoicesOriginEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
238
|
-
AjfFbChoicesOriginEditor.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbChoicesOriginEditor, selector: "ajf-fb-choices-origin-editor", inputs: { choicesOrigin: "choicesOrigin" }, ngImport: i0, template: "<div>\n <mat-form-field>\n <input matInput [(ngModel)]=\"name\" [placeholder]=\"'Name' | transloco\" />\n </mat-form-field>\n <mat-form-field>\n <input matInput [(ngModel)]=\"label\" [placeholder]=\"'Label' | transloco\" />\n </mat-form-field>\n <ng-template [ngIf]=\"canEditChoices\">\n <button (click)=\"addRow()\" mat-button>\n <mat-icon>add</mat-icon>\n <span>{{'Add value'|transloco}}</span>\n </button>\n <mat-table [dataSource]=\"choices\">\n <ng-container matColumnDef=\"label\">\n <mat-header-cell *matHeaderCellDef\n >{{'Label'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <input matInput [(ngModel)]=\"row.label\" type=\"text\" />\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"value\">\n <mat-header-cell *matHeaderCellDef\n >{{'Value'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <input matInput [(ngModel)]=\"row.value\" type=\"text\" />\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"delete\">\n <mat-header-cell *matHeaderCellDef\n >{{'Delete'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-icon (click)=\"deleteRow(idx)\">delete</mat-icon>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>\n </mat-table>\n </ng-template>\n</div>\n", styles: ["ajf-fb-choices-origin-editor mat-form-field+mat-form-field{margin-left:1em}ajf-fb-choices-origin-editor mat-table{max-height:300px}ajf-fb-choices-origin-editor mat-table mat-icon{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type:
|
|
238
|
+
AjfFbChoicesOriginEditor.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbChoicesOriginEditor, selector: "ajf-fb-choices-origin-editor", inputs: { choicesOrigin: "choicesOrigin" }, ngImport: i0, template: "<div>\n <mat-form-field>\n <input matInput [(ngModel)]=\"name\" [placeholder]=\"'Name' | transloco\" />\n </mat-form-field>\n <mat-form-field>\n <input matInput [(ngModel)]=\"label\" [placeholder]=\"'Label' | transloco\" />\n </mat-form-field>\n <ng-template [ngIf]=\"canEditChoices\">\n <button (click)=\"addRow()\" mat-button>\n <mat-icon>add</mat-icon>\n <span>{{'Add value'|transloco}}</span>\n </button>\n <mat-table [dataSource]=\"choices\">\n <ng-container matColumnDef=\"label\">\n <mat-header-cell *matHeaderCellDef\n >{{'Label'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <input matInput [(ngModel)]=\"row.label\" type=\"text\" />\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"value\">\n <mat-header-cell *matHeaderCellDef\n >{{'Value'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <input matInput [(ngModel)]=\"row.value\" type=\"text\" />\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"delete\">\n <mat-header-cell *matHeaderCellDef\n >{{'Delete'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-icon (click)=\"deleteRow(idx)\">delete</mat-icon>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>\n </mat-table>\n </ng-template>\n</div>\n", styles: ["ajf-fb-choices-origin-editor mat-form-field+mat-form-field{margin-left:1em}ajf-fb-choices-origin-editor mat-table{max-height:300px}ajf-fb-choices-origin-editor mat-table mat-icon{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
239
239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbChoicesOriginEditor, decorators: [{
|
|
240
240
|
type: Component,
|
|
241
241
|
args: [{ selector: 'ajf-fb-choices-origin-editor', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div>\n <mat-form-field>\n <input matInput [(ngModel)]=\"name\" [placeholder]=\"'Name' | transloco\" />\n </mat-form-field>\n <mat-form-field>\n <input matInput [(ngModel)]=\"label\" [placeholder]=\"'Label' | transloco\" />\n </mat-form-field>\n <ng-template [ngIf]=\"canEditChoices\">\n <button (click)=\"addRow()\" mat-button>\n <mat-icon>add</mat-icon>\n <span>{{'Add value'|transloco}}</span>\n </button>\n <mat-table [dataSource]=\"choices\">\n <ng-container matColumnDef=\"label\">\n <mat-header-cell *matHeaderCellDef\n >{{'Label'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <input matInput [(ngModel)]=\"row.label\" type=\"text\" />\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"value\">\n <mat-header-cell *matHeaderCellDef\n >{{'Value'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <input matInput [(ngModel)]=\"row.value\" type=\"text\" />\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"delete\">\n <mat-header-cell *matHeaderCellDef\n >{{'Delete'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-icon (click)=\"deleteRow(idx)\">delete</mat-icon>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>\n </mat-table>\n </ng-template>\n</div>\n", styles: ["ajf-fb-choices-origin-editor mat-form-field+mat-form-field{margin-left:1em}ajf-fb-choices-origin-editor mat-table{max-height:300px}ajf-fb-choices-origin-editor mat-table mat-icon{cursor:pointer}\n"] }]
|
|
@@ -426,6 +426,10 @@ class AjfFormBuilderService {
|
|
|
426
426
|
label: 'Barcode',
|
|
427
427
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Barcode },
|
|
428
428
|
},
|
|
429
|
+
{
|
|
430
|
+
label: 'Signature',
|
|
431
|
+
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Signature },
|
|
432
|
+
},
|
|
429
433
|
{
|
|
430
434
|
label: 'File',
|
|
431
435
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.File },
|
|
@@ -452,6 +456,14 @@ class AjfFormBuilderService {
|
|
|
452
456
|
* A list of the ids of the dropLists connected to the source list.
|
|
453
457
|
*/
|
|
454
458
|
this._connectedDropLists = new BehaviorSubject([]);
|
|
459
|
+
/**
|
|
460
|
+
* A dictionary of the 'expanded' status of all nodeEntries in the tree {node.name: boolean}
|
|
461
|
+
*/
|
|
462
|
+
this._nodeEntriesTreeExpandedStatus = new BehaviorSubject({});
|
|
463
|
+
/**
|
|
464
|
+
* Determines the default expanded state of nodeEntries when the FormBuilder loads
|
|
465
|
+
*/
|
|
466
|
+
this._defaultExpanded = false;
|
|
455
467
|
this._editedNodeEntry = new BehaviorSubject(null);
|
|
456
468
|
this._editedNodeEntryObs = this
|
|
457
469
|
._editedNodeEntry;
|
|
@@ -479,6 +491,11 @@ class AjfFormBuilderService {
|
|
|
479
491
|
* Subscribes to the moveNodeEntryEvent event emitter;
|
|
480
492
|
*/
|
|
481
493
|
this._moveNodeSub = Subscription.EMPTY;
|
|
494
|
+
/**
|
|
495
|
+
* Counters for default name assigned to inserted fields/slides
|
|
496
|
+
*/
|
|
497
|
+
this._emptyFieldCounter = 1;
|
|
498
|
+
this._emptySlideCounter = 1;
|
|
482
499
|
this._initChoicesOriginsStreams();
|
|
483
500
|
this._initAttachmentsOriginsStreams();
|
|
484
501
|
this._initStringIdentifierStreams();
|
|
@@ -530,6 +547,9 @@ class AjfFormBuilderService {
|
|
|
530
547
|
get connectedDropLists() {
|
|
531
548
|
return this._connectedDropLists;
|
|
532
549
|
}
|
|
550
|
+
get nodeEntriesTreeExpandedStatus() {
|
|
551
|
+
return this._nodeEntriesTreeExpandedStatus;
|
|
552
|
+
}
|
|
533
553
|
get editedNodeEntry() {
|
|
534
554
|
return this._editedNodeEntryObs;
|
|
535
555
|
}
|
|
@@ -595,8 +615,10 @@ class AjfFormBuilderService {
|
|
|
595
615
|
fieldType: nodeType.nodeType.field,
|
|
596
616
|
parent: parent.id,
|
|
597
617
|
parentNode,
|
|
598
|
-
name:
|
|
618
|
+
name: `new_field_${this._emptyFieldCounter}`,
|
|
619
|
+
label: `New ${AjfFieldType[nodeType.nodeType.field]} field ${this._emptyFieldCounter}`,
|
|
599
620
|
});
|
|
621
|
+
this._emptyFieldCounter++;
|
|
600
622
|
}
|
|
601
623
|
else {
|
|
602
624
|
node = createContainerNode({
|
|
@@ -604,9 +626,11 @@ class AjfFormBuilderService {
|
|
|
604
626
|
nodeType: nodeType.nodeType.node,
|
|
605
627
|
parent: 0,
|
|
606
628
|
parentNode,
|
|
607
|
-
name:
|
|
629
|
+
name: `new_slide_${this._emptySlideCounter}`,
|
|
630
|
+
label: `New Slide ${this._emptySlideCounter}`,
|
|
608
631
|
nodes: [],
|
|
609
632
|
});
|
|
633
|
+
this._emptySlideCounter++;
|
|
610
634
|
}
|
|
611
635
|
this._beforeNodesUpdate.emit();
|
|
612
636
|
this._nodesUpdates.next((nodes) => {
|
|
@@ -627,6 +651,7 @@ class AjfFormBuilderService {
|
|
|
627
651
|
}
|
|
628
652
|
return nodes;
|
|
629
653
|
});
|
|
654
|
+
this.cancelNodeEntryEdit();
|
|
630
655
|
}
|
|
631
656
|
saveNodeEntry(properties) {
|
|
632
657
|
this._saveNodeEntryEvent.emit(properties);
|
|
@@ -644,6 +669,7 @@ class AjfFormBuilderService {
|
|
|
644
669
|
moveNodeEntry(nodeEntry, from, to) {
|
|
645
670
|
const moveEvent = { nodeEntry: nodeEntry, fromIndex: from, toIndex: to };
|
|
646
671
|
this._moveNodeEntryEvent.next(moveEvent);
|
|
672
|
+
this.cancelNodeEntryEdit();
|
|
647
673
|
}
|
|
648
674
|
getCurrentForm() {
|
|
649
675
|
return combineLatest([
|
|
@@ -702,6 +728,73 @@ class AjfFormBuilderService {
|
|
|
702
728
|
saveStringIdentifier(identifier) {
|
|
703
729
|
this._stringIdentifierUpdates.next(() => [...identifier]);
|
|
704
730
|
}
|
|
731
|
+
/**
|
|
732
|
+
* Resets the nodeEntriesTreeExpandedStatus dictionary to an empty object.
|
|
733
|
+
*/
|
|
734
|
+
resetNodeEntriesTreeExpandedStatus() {
|
|
735
|
+
this._nodeEntriesTreeExpandedStatus.next({});
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* Gets the expanded status of an entry in the nodeEntriesTreeExpandedStatus dictionary
|
|
739
|
+
* @param nodeName The unique name of the nodeEntry
|
|
740
|
+
*/
|
|
741
|
+
getExpandedStatus(nodeName) {
|
|
742
|
+
return this._nodeEntriesTreeExpandedStatus.pipe(map(tree => {
|
|
743
|
+
if (nodeName in tree) {
|
|
744
|
+
return tree[nodeName];
|
|
745
|
+
}
|
|
746
|
+
return this._defaultExpanded;
|
|
747
|
+
}));
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Upserts an entry in the nodeEntriesTreeExpandedStatus dictionary
|
|
751
|
+
* @param nodeName The unique name of the nodeEntry
|
|
752
|
+
* @param expanded True if the nodeEntry is expanded
|
|
753
|
+
*/
|
|
754
|
+
updateExpandedStatus(nodeName, expanded) {
|
|
755
|
+
if (!nodeName)
|
|
756
|
+
return;
|
|
757
|
+
const dictValue = this._nodeEntriesTreeExpandedStatus.value;
|
|
758
|
+
this._nodeEntriesTreeExpandedStatus.next({ ...dictValue, [nodeName]: expanded });
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* Removes an entry from the nodeEntriesTreeExpandedStatus dictionary
|
|
762
|
+
* @param nodeName The unique name of the nodeEntry
|
|
763
|
+
*/
|
|
764
|
+
removeExpandedStatus(nodeName) {
|
|
765
|
+
const dictValue = this._nodeEntriesTreeExpandedStatus.value;
|
|
766
|
+
delete dictValue[nodeName];
|
|
767
|
+
this._nodeEntriesTreeExpandedStatus.next(dictValue);
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Sets expanded to true for each entry in the nodeEntriesTreeExpandedStatus dictionary
|
|
771
|
+
*/
|
|
772
|
+
expandAll() {
|
|
773
|
+
const dictValue = this._nodeEntriesTreeExpandedStatus.value;
|
|
774
|
+
for (let nodeName in dictValue) {
|
|
775
|
+
dictValue[nodeName] = true;
|
|
776
|
+
}
|
|
777
|
+
this._defaultExpanded = true;
|
|
778
|
+
this._nodeEntriesTreeExpandedStatus.next(dictValue);
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Sets expanded to false for each entry in the nodeEntriesTreeExpandedStatus dictionary
|
|
782
|
+
*/
|
|
783
|
+
collapseAll() {
|
|
784
|
+
const dictValue = this._nodeEntriesTreeExpandedStatus.value;
|
|
785
|
+
for (let nodeName in dictValue) {
|
|
786
|
+
dictValue[nodeName] = false;
|
|
787
|
+
}
|
|
788
|
+
this._defaultExpanded = false;
|
|
789
|
+
this._nodeEntriesTreeExpandedStatus.next(dictValue);
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Resets the empty fields/slides counters
|
|
793
|
+
*/
|
|
794
|
+
resetEmptyCounters() {
|
|
795
|
+
this._emptyFieldCounter = 1;
|
|
796
|
+
this._emptySlideCounter = 1;
|
|
797
|
+
}
|
|
705
798
|
/**
|
|
706
799
|
* Searches the form nodes for field nodes with choicesOriginRef corresponding
|
|
707
800
|
* to an edited choicesOrigin and updates it with the new name.
|
|
@@ -861,6 +954,7 @@ class AjfFormBuilderService {
|
|
|
861
954
|
}
|
|
862
955
|
if (isField(node)) {
|
|
863
956
|
node.hint = properties.hint;
|
|
957
|
+
node.editable = !properties.readonlyField;
|
|
864
958
|
node.description = properties.description;
|
|
865
959
|
node.defaultValue = getDefaultValue(properties.defaultValue, node);
|
|
866
960
|
node.formula =
|
|
@@ -984,6 +1078,7 @@ class AjfFormBuilderService {
|
|
|
984
1078
|
this._deleteNodeEntryEvent
|
|
985
1079
|
.pipe(map((nodeEntry) => {
|
|
986
1080
|
this._beforeNodesUpdate.emit();
|
|
1081
|
+
this.removeExpandedStatus(nodeEntry.node.name);
|
|
987
1082
|
return (nodes) => {
|
|
988
1083
|
const node = nodeEntry.node;
|
|
989
1084
|
let cn = getNodeContainer({ nodes }, node);
|
|
@@ -1083,7 +1178,7 @@ class AjfFbChoicesOriginEditorDialog {
|
|
|
1083
1178
|
}
|
|
1084
1179
|
}
|
|
1085
1180
|
AjfFbChoicesOriginEditorDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbChoicesOriginEditorDialog, deps: [{ token: AjfFormBuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1086
|
-
AjfFbChoicesOriginEditorDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbChoicesOriginEditorDialog, selector: "ajf-fb-choices-origin-editor-dialog", viewQueries: [{ propertyName: "editor", first: true, predicate: AjfFbChoicesOriginEditor, descendants: true }], ngImport: i0, template: "<h3 matDialogTitle>{{'Edit choices origin'|transloco}}</h3>\n<mat-dialog-content>\n <ajf-fb-choices-origin-editor\n *ngIf=\"choicesOrigin|async as co\"\n [choicesOrigin]=\"co!\"\n ></ajf-fb-choices-origin-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveChoicesOrigin()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"cancelChoicesOriginEdit()\">\n {{'Close'|transloco}}\n </button>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: AjfFbChoicesOriginEditor, selector: "ajf-fb-choices-origin-editor", inputs: ["choicesOrigin"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$
|
|
1181
|
+
AjfFbChoicesOriginEditorDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbChoicesOriginEditorDialog, selector: "ajf-fb-choices-origin-editor-dialog", viewQueries: [{ propertyName: "editor", first: true, predicate: AjfFbChoicesOriginEditor, descendants: true }], ngImport: i0, template: "<h3 matDialogTitle>{{'Edit choices origin'|transloco}}</h3>\n<mat-dialog-content>\n <ajf-fb-choices-origin-editor\n *ngIf=\"choicesOrigin|async as co\"\n [choicesOrigin]=\"co!\"\n ></ajf-fb-choices-origin-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveChoicesOrigin()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"cancelChoicesOriginEdit()\">\n {{'Close'|transloco}}\n </button>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: AjfFbChoicesOriginEditor, selector: "ajf-fb-choices-origin-editor", inputs: ["choicesOrigin"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1087
1182
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbChoicesOriginEditorDialog, decorators: [{
|
|
1088
1183
|
type: Component,
|
|
1089
1184
|
args: [{ selector: 'ajf-fb-choices-origin-editor-dialog', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<h3 matDialogTitle>{{'Edit choices origin'|transloco}}</h3>\n<mat-dialog-content>\n <ajf-fb-choices-origin-editor\n *ngIf=\"choicesOrigin|async as co\"\n [choicesOrigin]=\"co!\"\n ></ajf-fb-choices-origin-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveChoicesOrigin()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"cancelChoicesOriginEdit()\">\n {{'Close'|transloco}}\n </button>\n</mat-dialog-actions>\n" }]
|
|
@@ -1114,7 +1209,7 @@ class AjfFbConditionEditor {
|
|
|
1114
1209
|
}
|
|
1115
1210
|
}
|
|
1116
1211
|
AjfFbConditionEditor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbConditionEditor, deps: [{ token: i1.AjfValidationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1117
|
-
AjfFbConditionEditor.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbConditionEditor, selector: "ajf-condition-editor", inputs: { fields: "fields", condition: "condition" }, ngImport: i0, template: "<div class=\"ajf-editor\">\n <mat-form-field class=\"ajf-formula-editor\">\n <code><input matInput type=\"text\" [formControl]=\"formulaEditorControl\" /></code>\n </mat-form-field>\n</div>\n<div class=\"ajf-editor-panel\">\n <ng-container *ngIf=\"fields as curFields\">\n <mat-nav-list dense *ngIf=\"curFields!.length > 0\">\n <a\n mat-list-item\n (click)=\"insertVariable(field.name)\"\n [matTooltip]=\"field.label\"\n *ngFor=\"let field of curFields!\"\n >\n <ajf-node-icon [node]=\"field\"></ajf-node-icon>\n {{ field.name }}\n </a>\n </mat-nav-list>\n </ng-container>\n</div>\n", styles: ["ajf-condition-editor{display:flex;flex-direction:row;align-items:stretch;max-height:512px}ajf-condition-editor .ajf-editor{flex:.75 0 auto;display:flex;flex-direction:row;align-items:stretch}ajf-condition-editor .ajf-editor-panel{flex:.25 0 auto;overflow-y:auto}ajf-condition-editor .ajf-editor-panel .mat-mdc-nav-list{max-height:30vh;overflow-y:auto}ajf-condition-editor .ajf-formula-editor{min-width:40vw}\n"], dependencies: [{ kind: "component", type: i2$1.AjfNodeIcon, selector: "ajf-node-icon" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type:
|
|
1212
|
+
AjfFbConditionEditor.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbConditionEditor, selector: "ajf-condition-editor", inputs: { fields: "fields", condition: "condition" }, ngImport: i0, template: "<div class=\"ajf-editor\">\n <mat-form-field class=\"ajf-formula-editor\">\n <code><input matInput type=\"text\" [formControl]=\"formulaEditorControl\" /></code>\n </mat-form-field>\n</div>\n<div class=\"ajf-editor-panel\">\n <ng-container *ngIf=\"fields as curFields\">\n <mat-nav-list dense *ngIf=\"curFields!.length > 0\">\n <a\n mat-list-item\n (click)=\"insertVariable(field.name)\"\n [matTooltip]=\"field.label\"\n *ngFor=\"let field of curFields!\"\n >\n <ajf-node-icon [node]=\"field\"></ajf-node-icon>\n {{ field.name }}\n </a>\n </mat-nav-list>\n </ng-container>\n</div>\n", styles: ["ajf-condition-editor{display:flex;flex-direction:row;align-items:stretch;max-height:512px}ajf-condition-editor .ajf-editor{flex:.75 0 auto;display:flex;flex-direction:row;align-items:stretch}ajf-condition-editor .ajf-editor-panel{flex:.25 0 auto;overflow-y:auto}ajf-condition-editor .ajf-editor-panel .mat-mdc-nav-list{max-height:30vh;overflow-y:auto}ajf-condition-editor .ajf-formula-editor{min-width:40vw}\n"], dependencies: [{ kind: "component", type: i2$1.AjfNodeIcon, selector: "ajf-node-icon" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7$1.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i7$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1118
1213
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbConditionEditor, decorators: [{
|
|
1119
1214
|
type: Component,
|
|
1120
1215
|
args: [{ selector: 'ajf-condition-editor', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ajf-editor\">\n <mat-form-field class=\"ajf-formula-editor\">\n <code><input matInput type=\"text\" [formControl]=\"formulaEditorControl\" /></code>\n </mat-form-field>\n</div>\n<div class=\"ajf-editor-panel\">\n <ng-container *ngIf=\"fields as curFields\">\n <mat-nav-list dense *ngIf=\"curFields!.length > 0\">\n <a\n mat-list-item\n (click)=\"insertVariable(field.name)\"\n [matTooltip]=\"field.label\"\n *ngFor=\"let field of curFields!\"\n >\n <ajf-node-icon [node]=\"field\"></ajf-node-icon>\n {{ field.name }}\n </a>\n </mat-nav-list>\n </ng-container>\n</div>\n", styles: ["ajf-condition-editor{display:flex;flex-direction:row;align-items:stretch;max-height:512px}ajf-condition-editor .ajf-editor{flex:.75 0 auto;display:flex;flex-direction:row;align-items:stretch}ajf-condition-editor .ajf-editor-panel{flex:.25 0 auto;overflow-y:auto}ajf-condition-editor .ajf-editor-panel .mat-mdc-nav-list{max-height:30vh;overflow-y:auto}ajf-condition-editor .ajf-formula-editor{min-width:40vw}\n"] }]
|
|
@@ -1145,7 +1240,7 @@ class AjfFbConditionEditorDialog {
|
|
|
1145
1240
|
}
|
|
1146
1241
|
}
|
|
1147
1242
|
AjfFbConditionEditorDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbConditionEditorDialog, deps: [{ token: AjfFormBuilderService }, { token: i2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1148
|
-
AjfFbConditionEditorDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbConditionEditorDialog, selector: "ajf-condition-editor-dialog", viewQueries: [{ propertyName: "editor", first: true, predicate: AjfFbConditionEditor, descendants: true }], ngImport: i0, template: "<h3 matDialogTitle>{{'Edit condition'|transloco}}</h3>\n<mat-dialog-content>\n <ajf-condition-editor\n *ngIf=\"fields|async as curFields\"\n [fields]=\"curFields!\"\n [condition]=\"condition\"\n ></ajf-condition-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveCondition()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"closeDialog()\">{{'Close'|transloco}}</button>\n</mat-dialog-actions>\n", styles: ["ajf-condition-editor-dialog .mat-mdc-dialog-content{overflow:visible}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: AjfFbConditionEditor, selector: "ajf-condition-editor", inputs: ["fields", "condition"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$
|
|
1243
|
+
AjfFbConditionEditorDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbConditionEditorDialog, selector: "ajf-condition-editor-dialog", viewQueries: [{ propertyName: "editor", first: true, predicate: AjfFbConditionEditor, descendants: true }], ngImport: i0, template: "<h3 matDialogTitle>{{'Edit condition'|transloco}}</h3>\n<mat-dialog-content>\n <ajf-condition-editor\n *ngIf=\"fields|async as curFields\"\n [fields]=\"curFields!\"\n [condition]=\"condition\"\n ></ajf-condition-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveCondition()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"closeDialog()\">{{'Close'|transloco}}</button>\n</mat-dialog-actions>\n", styles: ["ajf-condition-editor-dialog .mat-mdc-dialog-content{overflow:visible}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: AjfFbConditionEditor, selector: "ajf-condition-editor", inputs: ["fields", "condition"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1149
1244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbConditionEditorDialog, decorators: [{
|
|
1150
1245
|
type: Component,
|
|
1151
1246
|
args: [{ selector: 'ajf-condition-editor-dialog', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<h3 matDialogTitle>{{'Edit condition'|transloco}}</h3>\n<mat-dialog-content>\n <ajf-condition-editor\n *ngIf=\"fields|async as curFields\"\n [fields]=\"curFields!\"\n [condition]=\"condition\"\n ></ajf-condition-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveCondition()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"closeDialog()\">{{'Close'|transloco}}</button>\n</mat-dialog-actions>\n", styles: ["ajf-condition-editor-dialog .mat-mdc-dialog-content{overflow:visible}\n"] }]
|
|
@@ -1270,7 +1365,7 @@ class AjfFbStringIdentifierDialogComponent {
|
|
|
1270
1365
|
}
|
|
1271
1366
|
}
|
|
1272
1367
|
AjfFbStringIdentifierDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbStringIdentifierDialogComponent, deps: [{ token: AjfFormBuilderService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1273
|
-
AjfFbStringIdentifierDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbStringIdentifierDialogComponent, selector: "ajf-fb-string-identifier-dialog", ngImport: i0, template: "<h3 matDialogTitle>{{'Edit identifier'|transloco}}</h3>\n<mat-dialog-content>\n <button (click)=\"addRow()\" mat-button>\n <mat-icon>add</mat-icon>\n <span>{{'Add value'|transloco}}</span>\n </button>\n <mat-table [dataSource]=\"dataSource\">\n <ng-container matColumnDef=\"label\">\n <mat-header-cell *matHeaderCellDef>{{'Label'|transloco}}</mat-header-cell>\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-form-field>\n <input\n matInput\n [placeholder]=\"'Label'|transloco\"\n autofocus\n [(ngModel)]=\"row.label\"\n />\n </mat-form-field>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"value\">\n <mat-header-cell *matHeaderCellDef>{{'Value'|transloco}}</mat-header-cell>\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-form-field>\n <mat-chip-grid #chipList>\n <mat-chip-row\n *ngFor=\"let field of row.value\"\n (removed)=\"removeValue(row, field)\"\n >\n {{ field }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip-row>\n </mat-chip-grid>\n <input\n #valueInput\n [ngModel]=\"row.value\"\n [matAutocomplete]=\"valueAc\"\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"addValue(row, $event, valueInput)\"\n [placeholder]=\"'Value'|transloco\"\n />\n <mat-autocomplete\n #valueAc=\"matAutocomplete\"\n (optionSelected)=\"selected(row, $event)\"\n >\n <mat-option *ngFor=\"let field of fields$ | async\" [value]=\"field\"\n >{{field}}</mat-option\n >\n </mat-autocomplete>\n </mat-form-field>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"show\">\n <mat-header-cell *matHeaderCellDef>{{'Show'|transloco}}</mat-header-cell>\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-form-field>\n <mat-select matNativeControl [(ngModel)]=\"row.show\">\n <mat-option value=\"all\">{{'All'|transloco}}</mat-option>\n <mat-option value=\"first\">{{'First'|transloco}}</mat-option>\n <mat-option value=\"last\">{{'Last'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"delete\">\n <mat-header-cell *matHeaderCellDef\n >{{'Delete'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-icon (click)=\"deleteRow(idx)\">delete</mat-icon>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>\n </mat-table>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button matDialogClose (click)=\"saveStringIdentifier()\">\n {{'Save'|transloco}}\n </button>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5$
|
|
1368
|
+
AjfFbStringIdentifierDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbStringIdentifierDialogComponent, selector: "ajf-fb-string-identifier-dialog", ngImport: i0, template: "<h3 matDialogTitle>{{'Edit identifier'|transloco}}</h3>\n<mat-dialog-content>\n <button (click)=\"addRow()\" mat-button>\n <mat-icon>add</mat-icon>\n <span>{{'Add value'|transloco}}</span>\n </button>\n <mat-table [dataSource]=\"dataSource\">\n <ng-container matColumnDef=\"label\">\n <mat-header-cell *matHeaderCellDef>{{'Label'|transloco}}</mat-header-cell>\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-form-field>\n <input\n matInput\n [placeholder]=\"'Label'|transloco\"\n autofocus\n [(ngModel)]=\"row.label\"\n />\n </mat-form-field>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"value\">\n <mat-header-cell *matHeaderCellDef>{{'Value'|transloco}}</mat-header-cell>\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-form-field>\n <mat-chip-grid #chipList>\n <mat-chip-row\n *ngFor=\"let field of row.value\"\n (removed)=\"removeValue(row, field)\"\n >\n {{ field }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip-row>\n </mat-chip-grid>\n <input\n #valueInput\n [ngModel]=\"row.value\"\n [matAutocomplete]=\"valueAc\"\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"addValue(row, $event, valueInput)\"\n [placeholder]=\"'Value'|transloco\"\n />\n <mat-autocomplete\n #valueAc=\"matAutocomplete\"\n (optionSelected)=\"selected(row, $event)\"\n >\n <mat-option *ngFor=\"let field of fields$ | async\" [value]=\"field\"\n >{{field}}</mat-option\n >\n </mat-autocomplete>\n </mat-form-field>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"show\">\n <mat-header-cell *matHeaderCellDef>{{'Show'|transloco}}</mat-header-cell>\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-form-field>\n <mat-select matNativeControl [(ngModel)]=\"row.show\">\n <mat-option value=\"all\">{{'All'|transloco}}</mat-option>\n <mat-option value=\"first\">{{'First'|transloco}}</mat-option>\n <mat-option value=\"last\">{{'Last'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"delete\">\n <mat-header-cell *matHeaderCellDef\n >{{'Delete'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-icon (click)=\"deleteRow(idx)\">delete</mat-icon>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>\n </mat-table>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button matDialogClose (click)=\"saveStringIdentifier()\">\n {{'Save'|transloco}}\n </button>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7$2.MatChipRow, selector: "mat-chip-row, mat-basic-chip-row", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "directive", type: i2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1274
1369
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbStringIdentifierDialogComponent, decorators: [{
|
|
1275
1370
|
type: Component,
|
|
1276
1371
|
args: [{ selector: 'ajf-fb-string-identifier-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<h3 matDialogTitle>{{'Edit identifier'|transloco}}</h3>\n<mat-dialog-content>\n <button (click)=\"addRow()\" mat-button>\n <mat-icon>add</mat-icon>\n <span>{{'Add value'|transloco}}</span>\n </button>\n <mat-table [dataSource]=\"dataSource\">\n <ng-container matColumnDef=\"label\">\n <mat-header-cell *matHeaderCellDef>{{'Label'|transloco}}</mat-header-cell>\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-form-field>\n <input\n matInput\n [placeholder]=\"'Label'|transloco\"\n autofocus\n [(ngModel)]=\"row.label\"\n />\n </mat-form-field>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"value\">\n <mat-header-cell *matHeaderCellDef>{{'Value'|transloco}}</mat-header-cell>\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-form-field>\n <mat-chip-grid #chipList>\n <mat-chip-row\n *ngFor=\"let field of row.value\"\n (removed)=\"removeValue(row, field)\"\n >\n {{ field }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip-row>\n </mat-chip-grid>\n <input\n #valueInput\n [ngModel]=\"row.value\"\n [matAutocomplete]=\"valueAc\"\n [matChipInputFor]=\"chipList\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"addValue(row, $event, valueInput)\"\n [placeholder]=\"'Value'|transloco\"\n />\n <mat-autocomplete\n #valueAc=\"matAutocomplete\"\n (optionSelected)=\"selected(row, $event)\"\n >\n <mat-option *ngFor=\"let field of fields$ | async\" [value]=\"field\"\n >{{field}}</mat-option\n >\n </mat-autocomplete>\n </mat-form-field>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"show\">\n <mat-header-cell *matHeaderCellDef>{{'Show'|transloco}}</mat-header-cell>\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-form-field>\n <mat-select matNativeControl [(ngModel)]=\"row.show\">\n <mat-option value=\"all\">{{'All'|transloco}}</mat-option>\n <mat-option value=\"first\">{{'First'|transloco}}</mat-option>\n <mat-option value=\"last\">{{'Last'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n </mat-cell>\n </ng-container>\n <ng-container matColumnDef=\"delete\">\n <mat-header-cell *matHeaderCellDef\n >{{'Delete'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <mat-icon (click)=\"deleteRow(idx)\">delete</mat-icon>\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\"></mat-row>\n </mat-table>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button matDialogClose (click)=\"saveStringIdentifier()\">\n {{'Save'|transloco}}\n </button>\n</mat-dialog-actions>\n" }]
|
|
@@ -1310,7 +1405,6 @@ class AjfFbNodeEntry {
|
|
|
1310
1405
|
this._hasContent = false;
|
|
1311
1406
|
this._isFirst = false;
|
|
1312
1407
|
this._isNodeEntry = false;
|
|
1313
|
-
this._isExpanded = false;
|
|
1314
1408
|
this._level = 0;
|
|
1315
1409
|
this._isDraggable = true;
|
|
1316
1410
|
this._branchColors = branchColors.slice(0);
|
|
@@ -1335,13 +1429,6 @@ class AjfFbNodeEntry {
|
|
|
1335
1429
|
get isNodeEntry() {
|
|
1336
1430
|
return this._isNodeEntry;
|
|
1337
1431
|
}
|
|
1338
|
-
get isExpanded() {
|
|
1339
|
-
return this._isExpanded;
|
|
1340
|
-
}
|
|
1341
|
-
set isExpanded(exp) {
|
|
1342
|
-
this._isExpanded = exp;
|
|
1343
|
-
setTimeout(() => this._updateBranchHeights(), 400);
|
|
1344
|
-
}
|
|
1345
1432
|
get nodeEntry() {
|
|
1346
1433
|
return this._nodeEntry;
|
|
1347
1434
|
}
|
|
@@ -1422,6 +1509,7 @@ class AjfFbNodeEntry {
|
|
|
1422
1509
|
if (this.nodeEntry == null || !this.isNodeEntry) {
|
|
1423
1510
|
return;
|
|
1424
1511
|
}
|
|
1512
|
+
this._service.cancelNodeEntryEdit();
|
|
1425
1513
|
this._service.deleteNodeEntry(this.nodeEntry);
|
|
1426
1514
|
}
|
|
1427
1515
|
isLastNode() {
|
|
@@ -1433,10 +1521,16 @@ class AjfFbNodeEntry {
|
|
|
1433
1521
|
isSlide(node) {
|
|
1434
1522
|
return isSlidesNode(node);
|
|
1435
1523
|
}
|
|
1524
|
+
isExpanded() {
|
|
1525
|
+
if (this._nodeEntry && 'node' in this._nodeEntry) {
|
|
1526
|
+
return this._service.getExpandedStatus(this._nodeEntry.node.name);
|
|
1527
|
+
}
|
|
1528
|
+
return of(false);
|
|
1529
|
+
}
|
|
1436
1530
|
ngAfterViewInit() {
|
|
1437
|
-
|
|
1531
|
+
this.updateBranchHeights();
|
|
1438
1532
|
this._childEntriesSubscription = this.childEntries.changes.subscribe(() => {
|
|
1439
|
-
this.
|
|
1533
|
+
this.updateBranchHeights();
|
|
1440
1534
|
});
|
|
1441
1535
|
}
|
|
1442
1536
|
ngOnDestroy() {
|
|
@@ -1475,31 +1569,39 @@ class AjfFbNodeEntry {
|
|
|
1475
1569
|
return item.data.isSlide || false;
|
|
1476
1570
|
};
|
|
1477
1571
|
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1572
|
+
updateBranchHeights(delay = 0) {
|
|
1573
|
+
setTimeout(() => {
|
|
1574
|
+
if (this.nodeEntry == null ||
|
|
1575
|
+
!this.isNodeEntry ||
|
|
1576
|
+
this.branchLines == null ||
|
|
1577
|
+
this.childEntries == null) {
|
|
1578
|
+
return;
|
|
1579
|
+
}
|
|
1580
|
+
const nodeEntry = this.nodeEntry;
|
|
1581
|
+
const branchLines = this.branchLines.toArray();
|
|
1582
|
+
const sliceIdx = nodeEntry.content != null ? nodeEntry.content.length : 0;
|
|
1583
|
+
const childEntries = this.childEntries.toArray().slice(sliceIdx);
|
|
1584
|
+
if (branchLines.length != childEntries.length) {
|
|
1585
|
+
return;
|
|
1586
|
+
}
|
|
1587
|
+
branchLines.forEach((bl, idx) => {
|
|
1588
|
+
const ce = childEntries[idx];
|
|
1589
|
+
bl.height = ce.nativeElement.offsetTop;
|
|
1590
|
+
});
|
|
1591
|
+
}, delay);
|
|
1592
|
+
}
|
|
1593
|
+
updateExpandedStatus(expanded) {
|
|
1594
|
+
if (this._nodeEntry && 'node' in this._nodeEntry) {
|
|
1595
|
+
this._service.updateExpandedStatus(this._nodeEntry.node.name, expanded);
|
|
1596
|
+
this.updateBranchHeights(400);
|
|
1491
1597
|
}
|
|
1492
|
-
branchLines.forEach((bl, idx) => {
|
|
1493
|
-
const ce = childEntries[idx];
|
|
1494
|
-
bl.height = ce.nativeElement.offsetTop;
|
|
1495
|
-
});
|
|
1496
1598
|
}
|
|
1497
1599
|
}
|
|
1498
1600
|
AjfFbNodeEntry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbNodeEntry, deps: [{ token: AjfFormBuilderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1499
|
-
AjfFbNodeEntry.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: { isFirst: "isFirst", isExpanded: "isExpanded", nodeEntry: "nodeEntry", level: "level", isDraggable: "isDraggable", originOffset: "originOffset", firstBranchColor: "firstBranchColor" }, host: { listeners: { "window.resize": "onResize()" } }, viewQueries: [{ propertyName: "branchLines", predicate: AjfFbBranchLine, descendants: true }, { propertyName: "childEntries", predicate: AjfFbNodeEntry, descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlight]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card appearance=\"outlined\" cdkDrag [cdkDragData]=\"realNodeEntry\" class=\"ajf-draggable-box\">\n <ng-container\n *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\"\n >\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded\"\n (opened)=\"isExpanded = true\"\n (closed)=\"isExpanded = false\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button\n [disabled]=\"(currentEditedNode|async) === null\"\n (click)=\"delete($event)\"\n mat-icon-button\n >\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n [isExpanded]=\"isExpanded\"\n ></ajf-fb-node-entry>\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n *ngIf=\"realNodeEntry.content.length === 0\"\n cdkDropList\n [id]=\"assignId(true)\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ><mat-card-title>Drop your fields here</mat-card-title></mat-card\n >\n </div>\n </ng-template>\n </ng-template>\n </div>\n\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n >\n <ajf-fb-node-entry\n *ngIf=\"!isLastNode()\"\n [level]=\"level\"\n [originOffset]=\"idx\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"childNodeEntry\"\n [isExpanded]=\"isExpanded\"\n ></ajf-fb-node-entry>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #rootEmpty>\n <div class=\"mat-card-container\">\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n cdkDropList\n [cdkDropListEnterPredicate]=\"emptyAreaDropPredicate()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n ><mat-card-title>Drop your slides here</mat-card-title>\n </mat-card>\n </div>\n</ng-template>\n", styles: ["ajf-fb-node-entry{display:block;position:relative}ajf-fb-node-entry .mat-card-container{position:relative}ajf-fb-node-entry .mat-card-container .ajf-origin-line{position:absolute;top:0;left:25px;width:25px;height:25px;border-bottom:2px solid;border-left:2px solid;border-bottom-left-radius:.5em}ajf-fb-node-entry .mat-card-container .mat-mdc-card{margin-left:50px;padding:.5em 1em;margin-top:.2em;margin-bottom:.2em;background-color:#fff}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:#999}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:0 0 auto;white-space:nowrap}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-empty{line-height:36px;border:2px dashed;box-shadow:none;box-sizing:border-box;text-align:center;color:#ccc}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:20px 10px;border-bottom:solid 1px #ccc;border-right:solid 1px #ccc;color:#000000de;box-sizing:border-box;cursor:move;background:white;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlight>mat-card{background-color:#fff9c4}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:white;border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:0;min-height:60px}ajf-fb-node-entry .ajf-fields-list.cdk-drop-list-dragging .ajf-draggable-box:not(.cdk-drag-placeholder),ajf-fb-node-entry .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: i2$1.AjfNodeIcon, selector: "ajf-node-icon" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6$3.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i8$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "component", type: AjfFbBranchLine, selector: "ajf-fb-branch-line", inputs: ["offset", "color", "height"] }, { kind: "component", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: ["isFirst", "isExpanded", "nodeEntry", "level", "isDraggable", "originOffset", "firstBranchColor"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$2.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1601
|
+
AjfFbNodeEntry.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: { isFirst: "isFirst", nodeEntry: "nodeEntry", level: "level", isDraggable: "isDraggable", originOffset: "originOffset", firstBranchColor: "firstBranchColor" }, host: { listeners: { "window.resize": "onResize()" } }, viewQueries: [{ propertyName: "branchLines", predicate: AjfFbBranchLine, descendants: true }, { propertyName: "childEntries", predicate: AjfFbNodeEntry, descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlighted-formbuilder-node]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card\n appearance=\"outlined\"\n cdkDrag\n [cdkDragData]=\"realNodeEntry\"\n class=\"ajf-draggable-box\"\n >\n <ng-container *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\">\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded()|async\"\n (opened)=\"updateExpandedStatus(true)\"\n (closed)=\"updateExpandedStatus(false)\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button (click)=\"delete($event)\" mat-icon-button>\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ></ajf-fb-node-entry>\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n *ngIf=\"realNodeEntry.content.length === 0\"\n cdkDropList\n [id]=\"assignId(true)\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ><mat-card-title>Drop your fields here</mat-card-title></mat-card\n >\n </div>\n </ng-template>\n </ng-template>\n </div>\n\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\">\n <ajf-fb-node-entry\n *ngIf=\"!isLastNode()\"\n [level]=\"level\"\n [originOffset]=\"idx\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"childNodeEntry\"\n ></ajf-fb-node-entry>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #rootEmpty>\n <div class=\"mat-card-container\">\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n cdkDropList\n [cdkDropListEnterPredicate]=\"emptyAreaDropPredicate()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n ><mat-card-title>Drop your slides here</mat-card-title>\n </mat-card>\n </div>\n</ng-template>\n", styles: ["ajf-fb-node-entry{display:block;position:relative}ajf-fb-node-entry .mat-card-container{position:relative}ajf-fb-node-entry .mat-card-container .ajf-origin-line{position:absolute;top:0;left:25px;width:25px;height:25px;border-bottom:2px solid;border-left:2px solid;border-bottom-left-radius:.5em}ajf-fb-node-entry .mat-card-container .mat-mdc-card{margin-left:50px;padding:.5em 1em;background-color:#fff}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:#999}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:0 0 auto;white-space:nowrap}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-empty{line-height:36px;border:2px dashed;box-shadow:none;box-sizing:border-box;text-align:center;color:#ccc}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px #ccc;border-right:solid 1px #ccc;color:#000000de;box-sizing:border-box;cursor:move;background:white;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>mat-card{background-color:#fff9c4!important}ajf-fb-node-entry .ajf-highlighted-formbuilder-node .mat-mdc-card .mat-expansion-panel .mat-expansion-panel-header{background-color:#fff9c4!important}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:white;border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid #ccc;border-radius:4px;background-color:#fff9c4}ajf-fb-node-entry .ajf-fields-list.cdk-drop-list-dragging .ajf-draggable-box:not(.cdk-drag-placeholder),ajf-fb-node-entry .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: i2$1.AjfNodeIcon, selector: "ajf-node-icon" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i8$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "component", type: AjfFbBranchLine, selector: "ajf-fb-branch-line", inputs: ["offset", "color", "height"] }, { kind: "component", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: ["isFirst", "nodeEntry", "level", "isDraggable", "originOffset", "firstBranchColor"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1500
1602
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbNodeEntry, decorators: [{
|
|
1501
1603
|
type: Component,
|
|
1502
|
-
args: [{ selector: 'ajf-fb-node-entry', host: { '(window.resize)': 'onResize()' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-
|
|
1604
|
+
args: [{ selector: 'ajf-fb-node-entry', host: { '(window.resize)': 'onResize()' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlighted-formbuilder-node]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card\n appearance=\"outlined\"\n cdkDrag\n [cdkDragData]=\"realNodeEntry\"\n class=\"ajf-draggable-box\"\n >\n <ng-container *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\">\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded()|async\"\n (opened)=\"updateExpandedStatus(true)\"\n (closed)=\"updateExpandedStatus(false)\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button (click)=\"delete($event)\" mat-icon-button>\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ></ajf-fb-node-entry>\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n *ngIf=\"realNodeEntry.content.length === 0\"\n cdkDropList\n [id]=\"assignId(true)\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ><mat-card-title>Drop your fields here</mat-card-title></mat-card\n >\n </div>\n </ng-template>\n </ng-template>\n </div>\n\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\">\n <ajf-fb-node-entry\n *ngIf=\"!isLastNode()\"\n [level]=\"level\"\n [originOffset]=\"idx\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"childNodeEntry\"\n ></ajf-fb-node-entry>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #rootEmpty>\n <div class=\"mat-card-container\">\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n cdkDropList\n [cdkDropListEnterPredicate]=\"emptyAreaDropPredicate()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n ><mat-card-title>Drop your slides here</mat-card-title>\n </mat-card>\n </div>\n</ng-template>\n", styles: ["ajf-fb-node-entry{display:block;position:relative}ajf-fb-node-entry .mat-card-container{position:relative}ajf-fb-node-entry .mat-card-container .ajf-origin-line{position:absolute;top:0;left:25px;width:25px;height:25px;border-bottom:2px solid;border-left:2px solid;border-bottom-left-radius:.5em}ajf-fb-node-entry .mat-card-container .mat-mdc-card{margin-left:50px;padding:.5em 1em;background-color:#fff}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:#999}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:0 0 auto;white-space:nowrap}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-empty{line-height:36px;border:2px dashed;box-shadow:none;box-sizing:border-box;text-align:center;color:#ccc}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px #ccc;border-right:solid 1px #ccc;color:#000000de;box-sizing:border-box;cursor:move;background:white;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>mat-card{background-color:#fff9c4!important}ajf-fb-node-entry .ajf-highlighted-formbuilder-node .mat-mdc-card .mat-expansion-panel .mat-expansion-panel-header{background-color:#fff9c4!important}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:white;border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid #ccc;border-radius:4px;background-color:#fff9c4}ajf-fb-node-entry .ajf-fields-list.cdk-drop-list-dragging .ajf-draggable-box:not(.cdk-drag-placeholder),ajf-fb-node-entry .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
|
|
1503
1605
|
}], ctorParameters: function () { return [{ type: AjfFormBuilderService }]; }, propDecorators: { branchLines: [{
|
|
1504
1606
|
type: ViewChildren,
|
|
1505
1607
|
args: [AjfFbBranchLine]
|
|
@@ -1508,8 +1610,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1508
1610
|
args: [AjfFbNodeEntry, { read: ElementRef }]
|
|
1509
1611
|
}], isFirst: [{
|
|
1510
1612
|
type: Input
|
|
1511
|
-
}], isExpanded: [{
|
|
1512
|
-
type: Input
|
|
1513
1613
|
}], nodeEntry: [{
|
|
1514
1614
|
type: Input
|
|
1515
1615
|
}], level: [{
|
|
@@ -1544,7 +1644,7 @@ class AjfFbValidationConditionEditorDialog {
|
|
|
1544
1644
|
}
|
|
1545
1645
|
}
|
|
1546
1646
|
AjfFbValidationConditionEditorDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbValidationConditionEditorDialog, deps: [{ token: AjfFormBuilderService }, { token: i2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1547
|
-
AjfFbValidationConditionEditorDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbValidationConditionEditorDialog, selector: "ajf-fb-validation-condition-editor-dialog", viewQueries: [{ propertyName: "editor", first: true, predicate: AjfFbConditionEditor, descendants: true }], ngImport: i0, template: "<h3 matDialogTitle>{{'Edit condition'|transloco}}</h3>\n<mat-dialog-content>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"errorMessage\"\n [placeholder]=\"'Error message'|transloco\"\n />\n </mat-form-field>\n <ajf-condition-editor\n *ngIf=\"fields|async as curFields\"\n [fields]=\"curFields!\"\n [condition]=\"condition\"\n ></ajf-condition-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveCondition()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"closeDialog()\">{{'Close'|transloco}}</button>\n</mat-dialog-actions>\n", styles: ["ajf-fb-validation-condition-editor-dialog .mat-mdc-dialog-content{overflow:visible}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type:
|
|
1647
|
+
AjfFbValidationConditionEditorDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbValidationConditionEditorDialog, selector: "ajf-fb-validation-condition-editor-dialog", viewQueries: [{ propertyName: "editor", first: true, predicate: AjfFbConditionEditor, descendants: true }], ngImport: i0, template: "<h3 matDialogTitle>{{'Edit condition'|transloco}}</h3>\n<mat-dialog-content>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"errorMessage\"\n [placeholder]=\"'Error message'|transloco\"\n />\n </mat-form-field>\n <ajf-condition-editor\n *ngIf=\"fields|async as curFields\"\n [fields]=\"curFields!\"\n [condition]=\"condition\"\n ></ajf-condition-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveCondition()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"closeDialog()\">{{'Close'|transloco}}</button>\n</mat-dialog-actions>\n", styles: ["ajf-fb-validation-condition-editor-dialog .mat-mdc-dialog-content{overflow:visible}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: AjfFbConditionEditor, selector: "ajf-condition-editor", inputs: ["fields", "condition"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1548
1648
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbValidationConditionEditorDialog, decorators: [{
|
|
1549
1649
|
type: Component,
|
|
1550
1650
|
args: [{ selector: 'ajf-fb-validation-condition-editor-dialog', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<h3 matDialogTitle>{{'Edit condition'|transloco}}</h3>\n<mat-dialog-content>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"errorMessage\"\n [placeholder]=\"'Error message'|transloco\"\n />\n </mat-form-field>\n <ajf-condition-editor\n *ngIf=\"fields|async as curFields\"\n [fields]=\"curFields!\"\n [condition]=\"condition\"\n ></ajf-condition-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveCondition()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"closeDialog()\">{{'Close'|transloco}}</button>\n</mat-dialog-actions>\n", styles: ["ajf-fb-validation-condition-editor-dialog .mat-mdc-dialog-content{overflow:visible}\n"] }]
|
|
@@ -1575,7 +1675,7 @@ class AjfFbWarningConditionEditorDialog {
|
|
|
1575
1675
|
}
|
|
1576
1676
|
}
|
|
1577
1677
|
AjfFbWarningConditionEditorDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbWarningConditionEditorDialog, deps: [{ token: AjfFormBuilderService }, { token: i2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1578
|
-
AjfFbWarningConditionEditorDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbWarningConditionEditorDialog, selector: "ajf-fb-warning-condition-editor-dialog", viewQueries: [{ propertyName: "editor", first: true, predicate: AjfFbConditionEditor, descendants: true }], ngImport: i0, template: "<h3 matDialogTitle>{{'Edit condition'|transloco}}</h3>\n<mat-dialog-content>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"warningMessage\"\n [placeholder]=\"'Warning message' | transloco\"\n />\n </mat-form-field>\n <ajf-condition-editor\n *ngIf=\"fields|async as curFields\"\n [fields]=\"curFields!\"\n [condition]=\"condition\"\n ></ajf-condition-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveCondition()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"closeDialog()\">{{'Close'|transloco}}</button>\n</mat-dialog-actions>\n", styles: ["ajf-fb-warning-condition-editor-dialog .mat-mdc-dialog-content{overflow:visible}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type:
|
|
1678
|
+
AjfFbWarningConditionEditorDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbWarningConditionEditorDialog, selector: "ajf-fb-warning-condition-editor-dialog", viewQueries: [{ propertyName: "editor", first: true, predicate: AjfFbConditionEditor, descendants: true }], ngImport: i0, template: "<h3 matDialogTitle>{{'Edit condition'|transloco}}</h3>\n<mat-dialog-content>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"warningMessage\"\n [placeholder]=\"'Warning message' | transloco\"\n />\n </mat-form-field>\n <ajf-condition-editor\n *ngIf=\"fields|async as curFields\"\n [fields]=\"curFields!\"\n [condition]=\"condition\"\n ></ajf-condition-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveCondition()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"closeDialog()\">{{'Close'|transloco}}</button>\n</mat-dialog-actions>\n", styles: ["ajf-fb-warning-condition-editor-dialog .mat-mdc-dialog-content{overflow:visible}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: AjfFbConditionEditor, selector: "ajf-condition-editor", inputs: ["fields", "condition"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1579
1679
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbWarningConditionEditorDialog, decorators: [{
|
|
1580
1680
|
type: Component,
|
|
1581
1681
|
args: [{ selector: 'ajf-fb-warning-condition-editor-dialog', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<h3 matDialogTitle>{{'Edit condition'|transloco}}</h3>\n<mat-dialog-content>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"warningMessage\"\n [placeholder]=\"'Warning message' | transloco\"\n />\n </mat-form-field>\n <ajf-condition-editor\n *ngIf=\"fields|async as curFields\"\n [fields]=\"curFields!\"\n [condition]=\"condition\"\n ></ajf-condition-editor>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button (click)=\"saveCondition()\">{{'Save'|transloco}}</button>\n <button mat-button (click)=\"closeDialog()\">{{'Close'|transloco}}</button>\n</mat-dialog-actions>\n", styles: ["ajf-fb-warning-condition-editor-dialog .mat-mdc-dialog-content{overflow:visible}\n"] }]
|
|
@@ -1584,6 +1684,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1584
1684
|
args: [AjfFbConditionEditor, { static: false }]
|
|
1585
1685
|
}] } });
|
|
1586
1686
|
|
|
1687
|
+
/**
|
|
1688
|
+
* @license
|
|
1689
|
+
* Copyright (C) Gnucoop soc. coop.
|
|
1690
|
+
*
|
|
1691
|
+
* This file is part of the Advanced JSON forms (ajf).
|
|
1692
|
+
*
|
|
1693
|
+
* Advanced JSON forms (ajf) is free software: you can redistribute it and/or
|
|
1694
|
+
* modify it under the terms of the GNU Affero General Public License as
|
|
1695
|
+
* published by the Free Software Foundation, either version 3 of the License,
|
|
1696
|
+
* or (at your option) any later version.
|
|
1697
|
+
*
|
|
1698
|
+
* Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
|
|
1699
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
1700
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
|
|
1701
|
+
* General Public License for more details.
|
|
1702
|
+
*
|
|
1703
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
1704
|
+
* along with Advanced JSON forms (ajf).
|
|
1705
|
+
* If not, see http://www.gnu.org/licenses/.
|
|
1706
|
+
*
|
|
1707
|
+
*/
|
|
1708
|
+
/**
|
|
1709
|
+
* Custom validator service that checks for an already existing
|
|
1710
|
+
* Node with the given name.
|
|
1711
|
+
*/
|
|
1712
|
+
class AjfNodePropertiesNameMatchValidator {
|
|
1713
|
+
constructor(_fbs) {
|
|
1714
|
+
this._fbs = _fbs;
|
|
1715
|
+
}
|
|
1716
|
+
/**
|
|
1717
|
+
* Custom async validator method.
|
|
1718
|
+
* Checks if a Node with the same Name exists, in order to
|
|
1719
|
+
* validate the Node Entry properties form.
|
|
1720
|
+
* @param cdr The editor changeDetectionRef
|
|
1721
|
+
* @param currentId The current node entry id
|
|
1722
|
+
*/
|
|
1723
|
+
sameValueCheck(cdr, currentId) {
|
|
1724
|
+
return (control) => {
|
|
1725
|
+
if (!this._fbs.flatNodes)
|
|
1726
|
+
return of(null);
|
|
1727
|
+
return this._fbs.flatNodes.pipe(debounceTime(300), map(nodes => {
|
|
1728
|
+
const sameNameNode = nodes.find(n => n.name.toLowerCase() === control.value.toLowerCase() && n.id != currentId);
|
|
1729
|
+
if (sameNameNode) {
|
|
1730
|
+
return { 'name_exists': true };
|
|
1731
|
+
}
|
|
1732
|
+
return null;
|
|
1733
|
+
}), finalize(() => {
|
|
1734
|
+
control.markAsTouched();
|
|
1735
|
+
cdr.detectChanges();
|
|
1736
|
+
}), take(1));
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
AjfNodePropertiesNameMatchValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfNodePropertiesNameMatchValidator, deps: [{ token: AjfFormBuilderService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1741
|
+
AjfNodePropertiesNameMatchValidator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfNodePropertiesNameMatchValidator });
|
|
1742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfNodePropertiesNameMatchValidator, decorators: [{
|
|
1743
|
+
type: Injectable
|
|
1744
|
+
}], ctorParameters: function () { return [{ type: AjfFormBuilderService }]; } });
|
|
1745
|
+
|
|
1587
1746
|
/**
|
|
1588
1747
|
* @license
|
|
1589
1748
|
* Copyright (C) Gnucoop soc. coop.
|
|
@@ -1637,11 +1796,12 @@ function checkRangeValidity(c) {
|
|
|
1637
1796
|
return null;
|
|
1638
1797
|
}
|
|
1639
1798
|
class AjfFbNodeProperties {
|
|
1640
|
-
constructor(_cdr, _service, _dialog, _fb) {
|
|
1799
|
+
constructor(_cdr, _service, _dialog, _fb, _nodeNameValidator) {
|
|
1641
1800
|
this._cdr = _cdr;
|
|
1642
1801
|
this._service = _service;
|
|
1643
1802
|
this._dialog = _dialog;
|
|
1644
1803
|
this._fb = _fb;
|
|
1804
|
+
this._nodeNameValidator = _nodeNameValidator;
|
|
1645
1805
|
this._fieldSizes = [
|
|
1646
1806
|
{ label: 'Normal', value: 'normal' },
|
|
1647
1807
|
{ label: 'Small', value: 'small' },
|
|
@@ -1874,13 +2034,33 @@ class AjfFbNodeProperties {
|
|
|
1874
2034
|
isTableField(node) {
|
|
1875
2035
|
return isField(node) && isTableField(node);
|
|
1876
2036
|
}
|
|
2037
|
+
forceCheckbox(checked, checkbox) {
|
|
2038
|
+
if (!checked || !checkbox) {
|
|
2039
|
+
return;
|
|
2040
|
+
}
|
|
2041
|
+
if (checkbox.checked) {
|
|
2042
|
+
checkbox.toggle();
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
1877
2045
|
save() {
|
|
1878
2046
|
this._saveEvt.emit();
|
|
1879
2047
|
}
|
|
1880
2048
|
cancel() {
|
|
1881
2049
|
this._service.cancelNodeEntryEdit();
|
|
1882
2050
|
}
|
|
2051
|
+
fieldErrorMessage(formControl, fieldName) {
|
|
2052
|
+
if (!formControl || !fieldName)
|
|
2053
|
+
return null;
|
|
2054
|
+
if (formControl.hasError('required')) {
|
|
2055
|
+
return `You must enter a value for ${fieldName}`;
|
|
2056
|
+
}
|
|
2057
|
+
if (formControl.hasError('name_exists')) {
|
|
2058
|
+
return `This ${fieldName} has already been used`;
|
|
2059
|
+
}
|
|
2060
|
+
return null;
|
|
2061
|
+
}
|
|
1883
2062
|
ngOnDestroy() {
|
|
2063
|
+
this.cancel();
|
|
1884
2064
|
this._choicesOriginsSub.unsubscribe();
|
|
1885
2065
|
this._visibilityOptSub.unsubscribe();
|
|
1886
2066
|
this._visibilitySub.unsubscribe();
|
|
@@ -1939,8 +2119,12 @@ class AjfFbNodeProperties {
|
|
|
1939
2119
|
const visibility = n.node.visibility != null ? n.node.visibility.condition : null;
|
|
1940
2120
|
const visibilityOpt = n.node.visibility != null ? this._guessVisibilityOpt(n.node.visibility) : null;
|
|
1941
2121
|
let controls = {
|
|
1942
|
-
name: [
|
|
1943
|
-
|
|
2122
|
+
name: [
|
|
2123
|
+
n.node.name,
|
|
2124
|
+
Validators.required,
|
|
2125
|
+
this._nodeNameValidator.sameValueCheck(this._cdr, n.node.id),
|
|
2126
|
+
],
|
|
2127
|
+
label: [n.node.label, Validators.required],
|
|
1944
2128
|
visibilityOpt: [visibilityOpt, Validators.required],
|
|
1945
2129
|
visibility: [visibility, Validators.required],
|
|
1946
2130
|
conditionalBranchesNum: n.node.conditionalBranches.length,
|
|
@@ -1987,6 +2171,7 @@ class AjfFbNodeProperties {
|
|
|
1987
2171
|
controls.notEmpty = notEmpty;
|
|
1988
2172
|
controls.validationConditions = [validationConditions, []];
|
|
1989
2173
|
controls.notEmptyWarning = notEmptyW;
|
|
2174
|
+
controls.readonlyField = node.editable != null ? !node.editable : false;
|
|
1990
2175
|
controls.warningConditions = [warningConditions, []];
|
|
1991
2176
|
controls.nextSlideCondition = [node.nextSlideCondition];
|
|
1992
2177
|
this._curForceValue = forceValue;
|
|
@@ -2556,12 +2741,12 @@ class AjfFbNodeProperties {
|
|
|
2556
2741
|
return 'condition';
|
|
2557
2742
|
}
|
|
2558
2743
|
}
|
|
2559
|
-
AjfFbNodeProperties.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbNodeProperties, deps: [{ token: i0.ChangeDetectorRef }, { token: AjfFormBuilderService }, { token: i2.MatDialog }, { token: i3$1.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2560
|
-
AjfFbNodeProperties.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbNodeProperties, selector: "ajf-fb-node-properties", ngImport: i0, template: "<div [style.display]=\"(enabled|async) ? 'none' : 'block'\" class=\"ajf-disabled-overlay\"></div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <button\n *ngIf=\"isFieldWithChoices(ne.node) && (hasChoicesOriginRef()|async) === false; else readysavebtn\"\n mat-icon-button\n color=\"warn\"\n [matTooltip]=\"'Please select a Choice Origin for this field'\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <ng-template #readysavebtn\n ><button mat-icon-button (click)=\"save()\">\n <mat-icon>save</mat-icon>\n </button></ng-template\n >\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button>\n </div>\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"name\" [placeholder]=\"'Name' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"label\" [placeholder]=\"'Label' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select formControlName=\"visibilityOpt\" [placeholder]=\"'Visible' | transloco\">\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\">{{'Condition...'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n <button\n (click)=\"editVisibility()\"\n [disabled]=\"pf!.value.visibilityOpt !== 'condition'\"\n mat-raised-button\n [matTooltip]=\"curVisibility || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curVisibility }}</code></span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb formControlName=\"conditionalBranchesNum\"\n /></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button (click)=\"editConditionalBranch(idx)\" mat-raised-button [matTooltip]=\"branch\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ branch }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingContainerNode(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Repetitions'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editFormulaReps()\"\n mat-raised-button\n [matTooltip]=\"curFormulaReps || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormulaReps }}</code></span>\n </div>\n </button>\n </div>\n <div><label>{{'Min repetitions'|transloco}}</label></div>\n <div>\n <mat-slider formControlName=\"minReps\" discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb\n /></mat-slider>\n </div>\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider formControlName=\"maxReps\" discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb\n /></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select formControlName=\"size\" [placeholder]=\"'Size' | transloco\">\n <mat-option *ngFor=\"let fieldSize of fieldSizes\" [value]=\"fieldSize.value\">\n {{ fieldSize.label|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"hint\" [placeholder]=\"'Hint' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"description\"\n [placeholder]=\"'Description' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"defaultValue\"\n [placeholder]=\"'Default value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Formula'|transloco}}</label></div>\n <div>\n <button (click)=\"editFormula()\" mat-raised-button [matTooltip]=\"curFormula || ''\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormula }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <!-- <div class=\"ajf-prop\">\n <div><label>{{'Force value'|translco}}</label></div>\n <div>\n <button (click)=\"editForceValue()\" mat-raised-button [matTooltip]=\"curForceValue\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curForceValue }}</span>\n </div>\n </button>\n </div>\n </div> -->\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmpty\">{{'Not empty'|transloco}}</mat-checkbox>\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"minValue\" [placeholder]=\"'Min value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"maxValue\" [placeholder]=\"'Max value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"validationConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No conditions'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let validationCondition of validationConditions; let idx = index\"\n >\n <button\n (click)=\"editValidationCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"validationCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ validationCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeValidationCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmptyWarning\"\n >{{'Not empty warning'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Warnings'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addWarningCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"warningConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No warnings'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let warningCondition of warningConditions; let idx = index\"\n >\n <button\n (click)=\"editWarningCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"warningCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ warningCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeWarningCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Go to next slide condition'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editNextSlideCondition()\"\n mat-raised-button\n [matTooltip]=\"nextSlideCondition || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ nextSlideCondition }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isFieldWithChoices(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Choices origins'|transloco}}</mat-label>\n <mat-select formControlName=\"choicesOriginRef\" [placeholder]=\"'Choices' | transloco\">\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curChoicesFilter }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceExpanded\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceNarrow\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"!triggerConditions || triggerConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\n {{'No trigger condition'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let triggerCondition of triggerConditions; let idx = index\"\n >\n <button\n (click)=\"editTriggerCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"triggerCondition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ triggerCondition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"pointer\" (click)=\"removeTriggerCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"isTableField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"hideEmptyRows\"\n >{{'Hide empty rows'|transloco}}</mat-checkbox\n >\n <mat-form-field>\n <textarea\n matInput\n type=\"number\"\n formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n </ng-container>\n </ng-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:1em;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;inset:0;opacity:.4;background-color:#fff}ajf-fb-node-properties .ajf-emph{font-style:italic}ajf-fb-node-properties [mat-raised-button]{margin:.5em 0}ajf-fb-node-properties [mat-raised-button].ajf-pointer{cursor:pointer}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont{display:flex;flex-direction:row;align-items:center;position:relative;max-width:200px}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;margin:auto;position:relative;max-height:30px;max-width:80%}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i5$2.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7$3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i12$1.MatSlider, selector: "mat-slider", inputs: ["color", "disableRipple", "disabled", "discrete", "showTickMarks", "min", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i12$1.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$2.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2744
|
+
AjfFbNodeProperties.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbNodeProperties, deps: [{ token: i0.ChangeDetectorRef }, { token: AjfFormBuilderService }, { token: i2.MatDialog }, { token: i3$1.UntypedFormBuilder }, { token: AjfNodePropertiesNameMatchValidator }], target: i0.ɵɵFactoryTarget.Component });
|
|
2745
|
+
AjfFbNodeProperties.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFbNodeProperties, selector: "ajf-fb-node-properties", ngImport: i0, template: "<div [style.display]=\"(enabled|async) ? 'none' : 'block'\" class=\"ajf-disabled-overlay\"></div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <button\n *ngIf=\"isFieldWithChoices(ne.node) && (hasChoicesOriginRef()|async) === false; else readysavebtn\"\n mat-icon-button\n color=\"warn\"\n [matTooltip]=\"'Please select a Choice Origin for this field'\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <ng-template #readysavebtn>\n <button\n mat-icon-button\n [disabled]=\"pf.get('name')?.invalid || pf.get('label')?.invalid\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n </button></ng-template\n >\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button>\n </div>\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"name\" [placeholder]=\"'Name' | transloco\" />\n <mat-error *ngIf=\"pf.get('name')?.invalid\">\n {{fieldErrorMessage(pf.get('name'), 'Name')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"label\" [placeholder]=\"'Label' | transloco\" />\n <mat-error *ngIf=\"pf.get('label')?.invalid\">\n {{fieldErrorMessage(pf.get('label'), 'Label')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select formControlName=\"visibilityOpt\" [placeholder]=\"'Visible' | transloco\">\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\">{{'Condition...'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n <button\n (click)=\"editVisibility()\"\n [disabled]=\"pf!.value.visibilityOpt !== 'condition'\"\n mat-raised-button\n [matTooltip]=\"curVisibility || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curVisibility }}</code></span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb formControlName=\"conditionalBranchesNum\"\n /></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button (click)=\"editConditionalBranch(idx)\" mat-raised-button [matTooltip]=\"branch\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ branch }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingContainerNode(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Repetitions'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editFormulaReps()\"\n mat-raised-button\n [matTooltip]=\"curFormulaReps || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormulaReps }}</code></span>\n </div>\n </button>\n </div>\n <div><label>{{'Min repetitions'|transloco}}</label></div>\n <div>\n <mat-slider formControlName=\"minReps\" discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb\n /></mat-slider>\n </div>\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider formControlName=\"maxReps\" discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb\n /></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"readonlyField\">{{'Readonly'|transloco}}</mat-checkbox>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select formControlName=\"size\" [placeholder]=\"'Size' | transloco\">\n <mat-option *ngFor=\"let fieldSize of fieldSizes\" [value]=\"fieldSize.value\">\n {{ fieldSize.label|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"hint\" [placeholder]=\"'Hint' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"description\"\n [placeholder]=\"'Description' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"defaultValue\"\n [placeholder]=\"'Default value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Formula'|transloco}}</label></div>\n <div>\n <button (click)=\"editFormula()\" mat-raised-button [matTooltip]=\"curFormula || ''\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormula }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <!-- <div class=\"ajf-prop\">\n <div><label>{{'Force value'|translco}}</label></div>\n <div>\n <button (click)=\"editForceValue()\" mat-raised-button [matTooltip]=\"curForceValue\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curForceValue }}</span>\n </div>\n </button>\n </div>\n </div> -->\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmpty\">{{'Not empty'|transloco}}</mat-checkbox>\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"minValue\" [placeholder]=\"'Min value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"maxValue\" [placeholder]=\"'Max value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"validationConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No conditions'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let validationCondition of validationConditions; let idx = index\"\n >\n <button\n (click)=\"editValidationCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"validationCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ validationCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeValidationCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmptyWarning\"\n >{{'Not empty warning'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Warnings'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addWarningCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"warningConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No warnings'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let warningCondition of warningConditions; let idx = index\"\n >\n <button\n (click)=\"editWarningCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"warningCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ warningCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeWarningCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Go to next slide condition'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editNextSlideCondition()\"\n mat-raised-button\n [matTooltip]=\"nextSlideCondition || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ nextSlideCondition }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isFieldWithChoices(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Choices origins'|transloco}}</mat-label>\n <mat-select formControlName=\"choicesOriginRef\" [placeholder]=\"'Choices' | transloco\">\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curChoicesFilter }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceExpanded\"\n #forceExpanded\n (change)=\"forceCheckbox($event.checked, forceNarrow)\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceNarrow\"\n #forceNarrow\n (change)=\"forceCheckbox($event.checked, forceExpanded)\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"!triggerConditions || triggerConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\n {{'No trigger condition'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let triggerCondition of triggerConditions; let idx = index\"\n >\n <button\n (click)=\"editTriggerCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"triggerCondition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ triggerCondition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"pointer\" (click)=\"removeTriggerCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"isTableField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"hideEmptyRows\"\n >{{'Hide empty rows'|transloco}}</mat-checkbox\n >\n <mat-form-field>\n <textarea\n matInput\n type=\"number\"\n formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n </ng-container>\n </ng-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:2px 2px 2px 5px;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;inset:0;opacity:.4;background-color:#fff}ajf-fb-node-properties .ajf-emph{font-style:italic}ajf-fb-node-properties [mat-raised-button]{margin:.5em 0}ajf-fb-node-properties [mat-raised-button].ajf-pointer{cursor:pointer}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont{display:flex;flex-direction:row;align-items:center;position:relative}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;margin:auto;position:relative;max-height:30px;max-width:100%}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i5$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i13.MatSlider, selector: "mat-slider", inputs: ["color", "disableRipple", "disabled", "discrete", "showTickMarks", "min", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i13.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2561
2746
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFbNodeProperties, decorators: [{
|
|
2562
2747
|
type: Component,
|
|
2563
|
-
args: [{ selector: 'ajf-fb-node-properties', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.display]=\"(enabled|async) ? 'none' : 'block'\" class=\"ajf-disabled-overlay\"></div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <button\n *ngIf=\"isFieldWithChoices(ne.node) && (hasChoicesOriginRef()|async) === false; else readysavebtn\"\n mat-icon-button\n color=\"warn\"\n [matTooltip]=\"'Please select a Choice Origin for this field'\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <ng-template #readysavebtn\n ><button mat-icon-button (click)=\"save()\">\n <mat-icon>save</mat-icon>\n </button></ng-template\n >\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button>\n </div>\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"name\" [placeholder]=\"'Name' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"label\" [placeholder]=\"'Label' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select formControlName=\"visibilityOpt\" [placeholder]=\"'Visible' | transloco\">\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\">{{'Condition...'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n <button\n (click)=\"editVisibility()\"\n [disabled]=\"pf!.value.visibilityOpt !== 'condition'\"\n mat-raised-button\n [matTooltip]=\"curVisibility || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curVisibility }}</code></span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb formControlName=\"conditionalBranchesNum\"\n /></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button (click)=\"editConditionalBranch(idx)\" mat-raised-button [matTooltip]=\"branch\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ branch }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingContainerNode(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Repetitions'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editFormulaReps()\"\n mat-raised-button\n [matTooltip]=\"curFormulaReps || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormulaReps }}</code></span>\n </div>\n </button>\n </div>\n <div><label>{{'Min repetitions'|transloco}}</label></div>\n <div>\n <mat-slider formControlName=\"minReps\" discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb\n /></mat-slider>\n </div>\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider formControlName=\"maxReps\" discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb\n /></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select formControlName=\"size\" [placeholder]=\"'Size' | transloco\">\n <mat-option *ngFor=\"let fieldSize of fieldSizes\" [value]=\"fieldSize.value\">\n {{ fieldSize.label|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"hint\" [placeholder]=\"'Hint' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"description\"\n [placeholder]=\"'Description' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"defaultValue\"\n [placeholder]=\"'Default value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Formula'|transloco}}</label></div>\n <div>\n <button (click)=\"editFormula()\" mat-raised-button [matTooltip]=\"curFormula || ''\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormula }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <!-- <div class=\"ajf-prop\">\n <div><label>{{'Force value'|translco}}</label></div>\n <div>\n <button (click)=\"editForceValue()\" mat-raised-button [matTooltip]=\"curForceValue\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curForceValue }}</span>\n </div>\n </button>\n </div>\n </div> -->\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmpty\">{{'Not empty'|transloco}}</mat-checkbox>\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"minValue\" [placeholder]=\"'Min value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"maxValue\" [placeholder]=\"'Max value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"validationConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No conditions'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let validationCondition of validationConditions; let idx = index\"\n >\n <button\n (click)=\"editValidationCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"validationCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ validationCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeValidationCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmptyWarning\"\n >{{'Not empty warning'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Warnings'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addWarningCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"warningConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No warnings'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let warningCondition of warningConditions; let idx = index\"\n >\n <button\n (click)=\"editWarningCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"warningCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ warningCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeWarningCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Go to next slide condition'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editNextSlideCondition()\"\n mat-raised-button\n [matTooltip]=\"nextSlideCondition || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ nextSlideCondition }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isFieldWithChoices(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Choices origins'|transloco}}</mat-label>\n <mat-select formControlName=\"choicesOriginRef\" [placeholder]=\"'Choices' | transloco\">\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curChoicesFilter }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceExpanded\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceNarrow\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"!triggerConditions || triggerConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\n {{'No trigger condition'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let triggerCondition of triggerConditions; let idx = index\"\n >\n <button\n (click)=\"editTriggerCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"triggerCondition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ triggerCondition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"pointer\" (click)=\"removeTriggerCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"isTableField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"hideEmptyRows\"\n >{{'Hide empty rows'|transloco}}</mat-checkbox\n >\n <mat-form-field>\n <textarea\n matInput\n type=\"number\"\n formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n </ng-container>\n </ng-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:1em;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;inset:0;opacity:.4;background-color:#fff}ajf-fb-node-properties .ajf-emph{font-style:italic}ajf-fb-node-properties [mat-raised-button]{margin:.5em 0}ajf-fb-node-properties [mat-raised-button].ajf-pointer{cursor:pointer}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont{display:flex;flex-direction:row;align-items:center;position:relative;max-width:200px}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;margin:auto;position:relative;max-height:30px;max-width:80%}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"] }]
|
|
2564
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: AjfFormBuilderService }, { type: i2.MatDialog }, { type: i3$1.UntypedFormBuilder }]; } });
|
|
2748
|
+
args: [{ selector: 'ajf-fb-node-properties', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.display]=\"(enabled|async) ? 'none' : 'block'\" class=\"ajf-disabled-overlay\"></div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <button\n *ngIf=\"isFieldWithChoices(ne.node) && (hasChoicesOriginRef()|async) === false; else readysavebtn\"\n mat-icon-button\n color=\"warn\"\n [matTooltip]=\"'Please select a Choice Origin for this field'\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <ng-template #readysavebtn>\n <button\n mat-icon-button\n [disabled]=\"pf.get('name')?.invalid || pf.get('label')?.invalid\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n </button></ng-template\n >\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button>\n </div>\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"name\" [placeholder]=\"'Name' | transloco\" />\n <mat-error *ngIf=\"pf.get('name')?.invalid\">\n {{fieldErrorMessage(pf.get('name'), 'Name')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"label\" [placeholder]=\"'Label' | transloco\" />\n <mat-error *ngIf=\"pf.get('label')?.invalid\">\n {{fieldErrorMessage(pf.get('label'), 'Label')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select formControlName=\"visibilityOpt\" [placeholder]=\"'Visible' | transloco\">\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\">{{'Condition...'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n <button\n (click)=\"editVisibility()\"\n [disabled]=\"pf!.value.visibilityOpt !== 'condition'\"\n mat-raised-button\n [matTooltip]=\"curVisibility || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curVisibility }}</code></span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb formControlName=\"conditionalBranchesNum\"\n /></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button (click)=\"editConditionalBranch(idx)\" mat-raised-button [matTooltip]=\"branch\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ branch }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingContainerNode(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Repetitions'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editFormulaReps()\"\n mat-raised-button\n [matTooltip]=\"curFormulaReps || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormulaReps }}</code></span>\n </div>\n </button>\n </div>\n <div><label>{{'Min repetitions'|transloco}}</label></div>\n <div>\n <mat-slider formControlName=\"minReps\" discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb\n /></mat-slider>\n </div>\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider formControlName=\"maxReps\" discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb\n /></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"readonlyField\">{{'Readonly'|transloco}}</mat-checkbox>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select formControlName=\"size\" [placeholder]=\"'Size' | transloco\">\n <mat-option *ngFor=\"let fieldSize of fieldSizes\" [value]=\"fieldSize.value\">\n {{ fieldSize.label|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"hint\" [placeholder]=\"'Hint' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"description\"\n [placeholder]=\"'Description' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"defaultValue\"\n [placeholder]=\"'Default value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Formula'|transloco}}</label></div>\n <div>\n <button (click)=\"editFormula()\" mat-raised-button [matTooltip]=\"curFormula || ''\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormula }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <!-- <div class=\"ajf-prop\">\n <div><label>{{'Force value'|translco}}</label></div>\n <div>\n <button (click)=\"editForceValue()\" mat-raised-button [matTooltip]=\"curForceValue\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curForceValue }}</span>\n </div>\n </button>\n </div>\n </div> -->\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmpty\">{{'Not empty'|transloco}}</mat-checkbox>\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"minValue\" [placeholder]=\"'Min value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"maxValue\" [placeholder]=\"'Max value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"validationConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No conditions'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let validationCondition of validationConditions; let idx = index\"\n >\n <button\n (click)=\"editValidationCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"validationCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ validationCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeValidationCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmptyWarning\"\n >{{'Not empty warning'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Warnings'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addWarningCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"warningConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No warnings'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let warningCondition of warningConditions; let idx = index\"\n >\n <button\n (click)=\"editWarningCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"warningCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ warningCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeWarningCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Go to next slide condition'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editNextSlideCondition()\"\n mat-raised-button\n [matTooltip]=\"nextSlideCondition || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ nextSlideCondition }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isFieldWithChoices(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Choices origins'|transloco}}</mat-label>\n <mat-select formControlName=\"choicesOriginRef\" [placeholder]=\"'Choices' | transloco\">\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curChoicesFilter }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceExpanded\"\n #forceExpanded\n (change)=\"forceCheckbox($event.checked, forceNarrow)\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceNarrow\"\n #forceNarrow\n (change)=\"forceCheckbox($event.checked, forceExpanded)\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"!triggerConditions || triggerConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\n {{'No trigger condition'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let triggerCondition of triggerConditions; let idx = index\"\n >\n <button\n (click)=\"editTriggerCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"triggerCondition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ triggerCondition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"pointer\" (click)=\"removeTriggerCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"isTableField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"hideEmptyRows\"\n >{{'Hide empty rows'|transloco}}</mat-checkbox\n >\n <mat-form-field>\n <textarea\n matInput\n type=\"number\"\n formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n </ng-container>\n </ng-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:2px 2px 2px 5px;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;inset:0;opacity:.4;background-color:#fff}ajf-fb-node-properties .ajf-emph{font-style:italic}ajf-fb-node-properties [mat-raised-button]{margin:.5em 0}ajf-fb-node-properties [mat-raised-button].ajf-pointer{cursor:pointer}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont{display:flex;flex-direction:row;align-items:center;position:relative}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;margin:auto;position:relative;max-height:30px;max-width:100%}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"] }]
|
|
2749
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: AjfFormBuilderService }, { type: i2.MatDialog }, { type: i3$1.UntypedFormBuilder }, { type: AjfNodePropertiesNameMatchValidator }]; } });
|
|
2565
2750
|
|
|
2566
2751
|
/**
|
|
2567
2752
|
* @license
|
|
@@ -2612,7 +2797,6 @@ class AjfFormBuilder {
|
|
|
2612
2797
|
constructor(_service, _dialog) {
|
|
2613
2798
|
this._service = _service;
|
|
2614
2799
|
this._dialog = _dialog;
|
|
2615
|
-
this._globalExpanded = false;
|
|
2616
2800
|
/**
|
|
2617
2801
|
* The list of the ids of all the dropLists connected to the formbuilder source list.
|
|
2618
2802
|
*/
|
|
@@ -2686,9 +2870,6 @@ class AjfFormBuilder {
|
|
|
2686
2870
|
get choicesOrigins() {
|
|
2687
2871
|
return this._choicesOrigins;
|
|
2688
2872
|
}
|
|
2689
|
-
get isGlobalExpanded() {
|
|
2690
|
-
return this._globalExpanded;
|
|
2691
|
-
}
|
|
2692
2873
|
get connectedDropLists() {
|
|
2693
2874
|
return this._connectedDropLists;
|
|
2694
2875
|
}
|
|
@@ -2705,6 +2886,8 @@ class AjfFormBuilder {
|
|
|
2705
2886
|
this._editChoicesOriginSub.unsubscribe();
|
|
2706
2887
|
this._stringIdentifierSub.unsubscribe();
|
|
2707
2888
|
this._service.setForm(null);
|
|
2889
|
+
this._service.resetNodeEntriesTreeExpandedStatus();
|
|
2890
|
+
this._service.resetEmptyCounters();
|
|
2708
2891
|
}
|
|
2709
2892
|
createChoicesOrigin() {
|
|
2710
2893
|
this._service.createChoicesOrigin();
|
|
@@ -2738,10 +2921,10 @@ class AjfFormBuilder {
|
|
|
2738
2921
|
});
|
|
2739
2922
|
}
|
|
2740
2923
|
expandAll() {
|
|
2741
|
-
this.
|
|
2924
|
+
this._service.expandAll();
|
|
2742
2925
|
}
|
|
2743
2926
|
collapseAll() {
|
|
2744
|
-
this.
|
|
2927
|
+
this._service.collapseAll();
|
|
2745
2928
|
}
|
|
2746
2929
|
expandToggle(evt) {
|
|
2747
2930
|
if (evt.checked) {
|
|
@@ -2759,10 +2942,10 @@ class AjfFormBuilder {
|
|
|
2759
2942
|
}
|
|
2760
2943
|
}
|
|
2761
2944
|
AjfFormBuilder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFormBuilder, deps: [{ token: AjfFormBuilderService }, { token: i2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
2762
|
-
AjfFormBuilder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFormBuilder, selector: "ajf-form-builder", inputs: { form: "form" }, viewQueries: [{ propertyName: "designerCont", first: true, predicate: ["designer"], descendants: true, static: true }], ngImport: i0, template: "<mat-toolbar>\n <button mat-icon-button (click)=\"leftSidenav.toggle()\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\"
|
|
2945
|
+
AjfFormBuilder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AjfFormBuilder, selector: "ajf-form-builder", inputs: { form: "form" }, viewQueries: [{ propertyName: "designerCont", first: true, predicate: ["designer"], descendants: true, static: true }], ngImport: i0, template: "<mat-toolbar class=\"ajf-formbuilder-toolbar\">\n <button mat-icon-button (click)=\"leftSidenav.toggle()\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\">{{'Choices'|transloco}}</button>\n <button mat-button (click)=\"editStringIdentifier()\">{{'Identifier'|transloco}}</button>\n <button mat-icon-button aria-label=\"Collapsed\" matTooltip=\"Keep slides collapsed\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <mat-slide-toggle color=\"primary\" (change)=\"expandToggle($event)\"></mat-slide-toggle>\n <button mat-icon-button aria-label=\"Expanded\" matTooltip=\"Keep slides expanded\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <mat-menu #choicesMenu>\n <button (click)=\"createChoicesOrigin()\" mat-menu-item>{{'New..'|transloco}}</button>\n <ng-container *ngIf=\"choicesOrigins|async as cos\">\n <button\n *ngFor=\"let choicesOrigin of cos\"\n (click)=\"editChoicesOrigin(choicesOrigin)\"\n mat-menu-item\n >\n {{ (choicesOrigin.label || choicesOrigin.name)| transloco }}\n </button>\n </ng-container>\n </mat-menu>\n <span class=\"ajf-spacer\"></span>\n</mat-toolbar>\n<div class=\"ajf-formtree-container\">\n <mat-drawer-container cdkDropListGroup class=\"ajf-formtree-drawer-container\">\n <mat-drawer #leftSidenav position=\"start\" mode=\"over\">\n <div\n #sourceDropList\n cdkDropList\n [cdkDropListConnectedTo]=\"(connectedDropLists|async)!\"\n [cdkDropListEnterPredicate]=\"disableDrop\"\n [cdkDropListData]=\"nodeTypes\"\n >\n <ajf-fb-node-type-entry\n *ngFor=\"let nodeType of nodeTypes\"\n cdkDrag\n [cdkDragData]=\"nodeType\"\n (cdkDragStarted)=\"leftSidenav.close()\"\n [nodeType]=\"nodeType\"\n ></ajf-fb-node-type-entry>\n </div>\n </mat-drawer>\n <div #designer class=\"ajf-designer\">\n <ajf-fb-node-entry\n id=\"slides-list\"\n cdkDropList\n (cdkDropListDropped)=\"onDrop($event)\"\n [cdkDropListEnterPredicate]=\"disableFieldDrop\"\n *ngFor=\"let nodeEntry of (nodeEntriesTree|async); let isFirst = first\"\n [isFirst]=\"isFirst\"\n [nodeEntry]=\"nodeEntry\"\n ></ajf-fb-node-entry>\n </div>\n </mat-drawer-container>\n <div class=\"ajf-formtree-properties\" #rightSidenav position=\"end\" mode=\"side\">\n <ajf-fb-node-properties></ajf-fb-node-properties>\n </div>\n</div>\n", styles: ["ajf-form-builder{display:flex;position:relative;min-height:300px;flex-direction:column;align-items:stretch;overflow-y:auto}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{position:sticky;top:0;z-index:2;padding:2px 0}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-button]{flex:1 0 auto}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-icon-button]{flex:0 0 auto}ajf-form-builder .ajf-formtree-container{display:flex;flex-flow:row;align-items:start;justify-content:space-between}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{flex:1 0 auto;min-height:50vh}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container mat-drawer{max-width:20%}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{padding:2}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .mat-expansion-panel-body{padding:10px}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{flex:0 1 auto;max-width:20%}ajf-form-builder mat-toolbar .ajf-spacer{flex:1 1 auto}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i10.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7$3.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i7$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i7$3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i8$3.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i8$3.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i9$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i11.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "component", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: ["isFirst", "nodeEntry", "level", "isDraggable", "originOffset", "firstBranchColor"] }, { kind: "component", type: AjfFbNodeProperties, selector: "ajf-fb-node-properties" }, { kind: "component", type: AjfFbNodeTypeEntry, selector: "ajf-fb-node-type-entry", inputs: ["nodeType"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2763
2946
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFormBuilder, decorators: [{
|
|
2764
2947
|
type: Component,
|
|
2765
|
-
args: [{ selector: 'ajf-form-builder', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<mat-toolbar>\n <button mat-icon-button (click)=\"leftSidenav.toggle()\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\"
|
|
2948
|
+
args: [{ selector: 'ajf-form-builder', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<mat-toolbar class=\"ajf-formbuilder-toolbar\">\n <button mat-icon-button (click)=\"leftSidenav.toggle()\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\">{{'Choices'|transloco}}</button>\n <button mat-button (click)=\"editStringIdentifier()\">{{'Identifier'|transloco}}</button>\n <button mat-icon-button aria-label=\"Collapsed\" matTooltip=\"Keep slides collapsed\">\n <mat-icon>unfold_less</mat-icon>\n </button>\n <mat-slide-toggle color=\"primary\" (change)=\"expandToggle($event)\"></mat-slide-toggle>\n <button mat-icon-button aria-label=\"Expanded\" matTooltip=\"Keep slides expanded\">\n <mat-icon>unfold_more</mat-icon>\n </button>\n <mat-menu #choicesMenu>\n <button (click)=\"createChoicesOrigin()\" mat-menu-item>{{'New..'|transloco}}</button>\n <ng-container *ngIf=\"choicesOrigins|async as cos\">\n <button\n *ngFor=\"let choicesOrigin of cos\"\n (click)=\"editChoicesOrigin(choicesOrigin)\"\n mat-menu-item\n >\n {{ (choicesOrigin.label || choicesOrigin.name)| transloco }}\n </button>\n </ng-container>\n </mat-menu>\n <span class=\"ajf-spacer\"></span>\n</mat-toolbar>\n<div class=\"ajf-formtree-container\">\n <mat-drawer-container cdkDropListGroup class=\"ajf-formtree-drawer-container\">\n <mat-drawer #leftSidenav position=\"start\" mode=\"over\">\n <div\n #sourceDropList\n cdkDropList\n [cdkDropListConnectedTo]=\"(connectedDropLists|async)!\"\n [cdkDropListEnterPredicate]=\"disableDrop\"\n [cdkDropListData]=\"nodeTypes\"\n >\n <ajf-fb-node-type-entry\n *ngFor=\"let nodeType of nodeTypes\"\n cdkDrag\n [cdkDragData]=\"nodeType\"\n (cdkDragStarted)=\"leftSidenav.close()\"\n [nodeType]=\"nodeType\"\n ></ajf-fb-node-type-entry>\n </div>\n </mat-drawer>\n <div #designer class=\"ajf-designer\">\n <ajf-fb-node-entry\n id=\"slides-list\"\n cdkDropList\n (cdkDropListDropped)=\"onDrop($event)\"\n [cdkDropListEnterPredicate]=\"disableFieldDrop\"\n *ngFor=\"let nodeEntry of (nodeEntriesTree|async); let isFirst = first\"\n [isFirst]=\"isFirst\"\n [nodeEntry]=\"nodeEntry\"\n ></ajf-fb-node-entry>\n </div>\n </mat-drawer-container>\n <div class=\"ajf-formtree-properties\" #rightSidenav position=\"end\" mode=\"side\">\n <ajf-fb-node-properties></ajf-fb-node-properties>\n </div>\n</div>\n", styles: ["ajf-form-builder{display:flex;position:relative;min-height:300px;flex-direction:column;align-items:stretch;overflow-y:auto}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{position:sticky;top:0;z-index:2;padding:2px 0}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-button]{flex:1 0 auto}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar mat-menu div[mat-menu-item]>button[mat-icon-button]{flex:0 0 auto}ajf-form-builder .ajf-formtree-container{display:flex;flex-flow:row;align-items:start;justify-content:space-between}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{flex:1 0 auto;min-height:50vh}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container mat-drawer{max-width:20%}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{padding:2}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .mat-expansion-panel-body{padding:10px}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{flex:0 1 auto;max-width:20%}ajf-form-builder mat-toolbar .ajf-spacer{flex:1 1 auto}\n"] }]
|
|
2766
2949
|
}], ctorParameters: function () { return [{ type: AjfFormBuilderService }, { type: i2.MatDialog }]; }, propDecorators: { designerCont: [{
|
|
2767
2950
|
type: ViewChild,
|
|
2768
2951
|
args: ['designer', { static: true }]
|
|
@@ -2830,7 +3013,7 @@ AjfFormBuilderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
|
|
|
2830
3013
|
AjfTranslocoModule,
|
|
2831
3014
|
MatExpansionModule,
|
|
2832
3015
|
MatSlideToggleModule], exports: [AjfFormBuilder] });
|
|
2833
|
-
AjfFormBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFormBuilderModule, providers: [AjfFormBuilderService], imports: [AjfNodeIconModule,
|
|
3016
|
+
AjfFormBuilderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AjfFormBuilderModule, providers: [AjfFormBuilderService, AjfNodePropertiesNameMatchValidator], imports: [AjfNodeIconModule,
|
|
2834
3017
|
CommonModule,
|
|
2835
3018
|
DragDropModule,
|
|
2836
3019
|
FormsModule,
|
|
@@ -2900,7 +3083,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
2900
3083
|
AjfFormBuilder,
|
|
2901
3084
|
],
|
|
2902
3085
|
exports: [AjfFormBuilder],
|
|
2903
|
-
providers: [AjfFormBuilderService],
|
|
3086
|
+
providers: [AjfFormBuilderService, AjfNodePropertiesNameMatchValidator],
|
|
2904
3087
|
}]
|
|
2905
3088
|
}] });
|
|
2906
3089
|
|