@ajf/material 18.4.0 → 18.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +167 -2
- package/audio/src/audio-module.d.ts +7 -6
- package/esm2022/audio/src/audio-module.mjs +22 -4
- package/esm2022/audio/src/audio.mjs +6 -6
- package/esm2022/barcode/barcode.mjs +3 -3
- package/esm2022/calendar/calendar.mjs +2 -2
- package/esm2022/checkbox-group/checkbox-group-item.mjs +3 -3
- package/esm2022/form-builder/form-builder-module.mjs +9 -2
- package/esm2022/form-builder/form-builder-service.mjs +63 -20
- package/esm2022/form-builder/form-builder.mjs +73 -9
- package/esm2022/form-builder/node-entry.mjs +3 -3
- package/esm2022/form-builder/node-properties.mjs +3 -13
- package/esm2022/form-builder/node-type-entry.mjs +3 -3
- package/esm2022/form-builder/node-type-groups.pipe.mjs +65 -0
- package/esm2022/form-builder/public_api.mjs +2 -1
- package/esm2022/form-builder/string-identifier-dialog.mjs +44 -60
- package/esm2022/forms/boolean-field.mjs +6 -5
- package/esm2022/forms/current-slide.mjs +92 -0
- package/esm2022/forms/date-input-field.mjs +7 -9
- package/esm2022/forms/display-field.mjs +2 -2
- package/esm2022/forms/empty-field.mjs +3 -3
- package/esm2022/forms/field-row.mjs +117 -0
- package/esm2022/forms/field.mjs +2 -2
- package/esm2022/forms/form.mjs +107 -13
- package/esm2022/forms/forms-module.mjs +26 -3
- package/esm2022/forms/input-field.mjs +6 -8
- package/esm2022/forms/multiple-choice-field.mjs +45 -10
- package/esm2022/forms/public_api.mjs +6 -1
- package/esm2022/forms/range-field.mjs +5 -6
- package/esm2022/forms/rep-strip.mjs +61 -0
- package/esm2022/forms/single-choice-field.mjs +26 -11
- package/esm2022/forms/slide-header.mjs +68 -0
- package/esm2022/forms/slide-stats.mjs +148 -0
- package/esm2022/forms/table-field.mjs +2 -2
- package/esm2022/forms/text-field.mjs +2 -2
- package/esm2022/forms/video-url-field.mjs +6 -8
- package/esm2022/geolocation/geolocation.mjs +4 -6
- package/esm2022/page-slider/page-slider.mjs +3 -3
- package/esm2022/signature/signature.mjs +5 -6
- package/esm2022/time/time-module.mjs +22 -4
- package/esm2022/time/time.mjs +4 -4
- package/fesm2022/ajf-material-audio.mjs +27 -9
- package/fesm2022/ajf-material-audio.mjs.map +1 -1
- package/fesm2022/ajf-material-barcode.mjs +2 -2
- package/fesm2022/ajf-material-barcode.mjs.map +1 -1
- package/fesm2022/ajf-material-calendar.mjs +2 -2
- package/fesm2022/ajf-material-calendar.mjs.map +1 -1
- package/fesm2022/ajf-material-checkbox-group.mjs +2 -2
- package/fesm2022/ajf-material-checkbox-group.mjs.map +1 -1
- package/fesm2022/ajf-material-form-builder.mjs +260 -108
- package/fesm2022/ajf-material-form-builder.mjs.map +1 -1
- package/fesm2022/ajf-material-forms.mjs +712 -99
- package/fesm2022/ajf-material-forms.mjs.map +1 -1
- package/fesm2022/ajf-material-geolocation.mjs +5 -7
- package/fesm2022/ajf-material-geolocation.mjs.map +1 -1
- package/fesm2022/ajf-material-page-slider.mjs +2 -2
- package/fesm2022/ajf-material-page-slider.mjs.map +1 -1
- package/fesm2022/ajf-material-signature.mjs +7 -8
- package/fesm2022/ajf-material-signature.mjs.map +1 -1
- package/fesm2022/ajf-material-time.mjs +24 -6
- package/fesm2022/ajf-material-time.mjs.map +1 -1
- package/form-builder/form-builder-module.d.ts +27 -25
- package/form-builder/form-builder-service.d.ts +25 -0
- package/form-builder/form-builder.d.ts +41 -2
- package/form-builder/node-type-groups.pipe.d.ts +45 -0
- package/form-builder/public_api.d.ts +1 -0
- package/form-builder/string-identifier-dialog.d.ts +10 -16
- package/forms/_theming.scss +142 -0
- package/forms/current-slide.d.ts +61 -0
- package/forms/field-row.d.ts +63 -0
- package/forms/form.d.ts +40 -3
- package/forms/forms-module.d.ts +57 -51
- package/forms/multiple-choice-field.d.ts +15 -1
- package/forms/public_api.d.ts +5 -0
- package/forms/rep-strip.d.ts +52 -0
- package/forms/single-choice-field.d.ts +7 -0
- package/forms/slide-header.d.ts +61 -0
- package/forms/slide-stats.d.ts +76 -0
- package/package.json +2 -2
- package/time/time-module.d.ts +4 -3
|
@@ -9,31 +9,29 @@ import * as i0 from '@angular/core';
|
|
|
9
9
|
import { Input, ChangeDetectionStrategy, ViewEncapsulation, Component, EventEmitter, Injectable, ViewChild, ElementRef, forwardRef, ViewChildren, Pipe, Output, NgModule } from '@angular/core';
|
|
10
10
|
import * as i3$1 from '@angular/forms';
|
|
11
11
|
import { FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
12
|
-
import * as i4 from '@angular/material/autocomplete';
|
|
13
12
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
14
13
|
import * as i5 from '@angular/material/button';
|
|
15
14
|
import { MatButtonModule } from '@angular/material/button';
|
|
16
15
|
import * as i6$2 from '@angular/material/card';
|
|
17
16
|
import { MatCardModule } from '@angular/material/card';
|
|
18
|
-
import * as i8$
|
|
17
|
+
import * as i8$3 from '@angular/material/checkbox';
|
|
19
18
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
20
|
-
import * as i7$2 from '@angular/material/chips';
|
|
21
19
|
import { MatChipsModule } from '@angular/material/chips';
|
|
22
20
|
import * as i2 from '@angular/material/dialog';
|
|
23
21
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
24
|
-
import * as i8$
|
|
22
|
+
import * as i8$2 from '@angular/material/expansion';
|
|
25
23
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
26
|
-
import * as
|
|
24
|
+
import * as i7 from '@angular/material/form-field';
|
|
27
25
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
28
|
-
import * as
|
|
26
|
+
import * as i5$1 from '@angular/material/icon';
|
|
29
27
|
import { MatIconModule } from '@angular/material/icon';
|
|
30
28
|
import * as i6 from '@angular/material/input';
|
|
31
29
|
import { MatInputModule } from '@angular/material/input';
|
|
32
|
-
import * as i7$
|
|
30
|
+
import * as i7$2 from '@angular/material/list';
|
|
33
31
|
import { MatListModule } from '@angular/material/list';
|
|
34
|
-
import * as i10
|
|
32
|
+
import * as i10 from '@angular/material/menu';
|
|
35
33
|
import { MatMenuModule } from '@angular/material/menu';
|
|
36
|
-
import * as
|
|
34
|
+
import * as i8$1 from '@angular/material/select';
|
|
37
35
|
import { MatSelectModule } from '@angular/material/select';
|
|
38
36
|
import * as i11 from '@angular/material/sidenav';
|
|
39
37
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
@@ -41,22 +39,24 @@ import * as i14 from '@angular/material/slide-toggle';
|
|
|
41
39
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
42
40
|
import * as i13 from '@angular/material/slider';
|
|
43
41
|
import { MatSliderModule } from '@angular/material/slider';
|
|
44
|
-
import * as i7 from '@angular/material/table';
|
|
45
|
-
import {
|
|
46
|
-
import * as i12
|
|
42
|
+
import * as i7$1 from '@angular/material/table';
|
|
43
|
+
import { MatTableModule } from '@angular/material/table';
|
|
44
|
+
import * as i12 from '@angular/material/toolbar';
|
|
47
45
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
48
46
|
import * as i8 from '@angular/material/tooltip';
|
|
49
47
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
48
|
+
import * as i9 from 'ngx-mat-select-search';
|
|
49
|
+
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
50
50
|
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, isEmptyField, isTableField, isNumberField } from '@ajf/core/forms';
|
|
52
52
|
import { DataSource } from '@angular/cdk/collections';
|
|
53
53
|
import { BehaviorSubject, of, Subject, Subscription, combineLatest, firstValueFrom } from 'rxjs';
|
|
54
54
|
import * as i6$1 from '@ngneat/transloco';
|
|
55
|
-
import { take, filter, map, scan, shareReplay, withLatestFrom,
|
|
55
|
+
import { take, filter, map, scan, shareReplay, withLatestFrom, debounceTime, distinctUntilChanged, startWith, finalize, switchMap, pairwise, sample } from 'rxjs/operators';
|
|
56
56
|
import { createFormula, createCondition, alwaysCondition, neverCondition } from '@ajf/core/models';
|
|
57
57
|
import { deepCopy } from '@ajf/core/utils';
|
|
58
|
-
import {
|
|
59
|
-
import * as
|
|
58
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
59
|
+
import * as i4 from '@angular/material/core';
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* @license
|
|
@@ -245,7 +245,7 @@ class AjfFbChoicesOriginEditor {
|
|
|
245
245
|
this._choices.updateChoices(this._choicesArr);
|
|
246
246
|
}
|
|
247
247
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbChoicesOriginEditor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
248
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFbChoicesOriginEditor, selector: "ajf-fb-choices-origin-editor", inputs: { choicesOrigin: "choicesOrigin", nameDuplicate: "nameDuplicate" }, ngImport: i0, template: "<div>\n <mat-form-field>\n <input matInput [(ngModel)]=\"name\" [placeholder]=\"'Name' | transloco\" required #nameInput=\"ngModel\" />\n <mat-error *ngIf=\"nameInput.invalid && nameInput.touched\">\n {{'Name is required' | transloco}}\n </mat-error>\n </mat-form-field>\n <span class=\"ajf-fb-field-error\" *ngIf=\"nameDuplicate && name.trim()\">\n {{'Name already exists' | transloco}}\n </span>\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=\"value\">\n <mat-header-cell *matHeaderCellDef\n >{{'Name'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <input matInput [(ngModel)]=\"row.value\" type=\"text\"\n [class.ajf-fb-choice-invalid]=\"isChoiceValueInvalid(row.value, idx)\"/>\n </mat-cell>\n </ng-container>\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=\"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-mdc-table{max-height:300px}ajf-fb-choices-origin-editor .mat-mdc-table mat-icon{cursor:pointer}ajf-fb-choices-origin-editor .mat-mdc-input-element{max-width:100%}ajf-fb-choices-origin-editor .ajf-fb-field-error{color:var(--mdc-theme-error, #f44336);font-size:12px;margin-left:1em;vertical-align:middle}ajf-fb-choices-origin-editor .ajf-fb-choice-invalid{border-bottom-color:var(--mdc-theme-error, #f44336)!important;caret-color:var(--mdc-theme-error, #f44336)}\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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] ", exportAs: ["matButton"] }, { kind: "component", type:
|
|
248
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFbChoicesOriginEditor, selector: "ajf-fb-choices-origin-editor", inputs: { choicesOrigin: "choicesOrigin", nameDuplicate: "nameDuplicate" }, ngImport: i0, template: "<div>\n <mat-form-field>\n <input matInput [(ngModel)]=\"name\" [placeholder]=\"'Name' | transloco\" required #nameInput=\"ngModel\" />\n <mat-error *ngIf=\"nameInput.invalid && nameInput.touched\">\n {{'Name is required' | transloco}}\n </mat-error>\n </mat-form-field>\n <span class=\"ajf-fb-field-error\" *ngIf=\"nameDuplicate && name.trim()\">\n {{'Name already exists' | transloco}}\n </span>\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=\"value\">\n <mat-header-cell *matHeaderCellDef\n >{{'Name'|transloco}}</mat-header-cell\n >\n <mat-cell *matCellDef=\"let row; let idx = index\">\n <input matInput [(ngModel)]=\"row.value\" type=\"text\"\n [class.ajf-fb-choice-invalid]=\"isChoiceValueInvalid(row.value, idx)\"/>\n </mat-cell>\n </ng-container>\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=\"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-mdc-table{max-height:300px}ajf-fb-choices-origin-editor .mat-mdc-table mat-icon{cursor:pointer}ajf-fb-choices-origin-editor .mat-mdc-input-element{max-width:100%}ajf-fb-choices-origin-editor .ajf-fb-field-error{color:var(--mdc-theme-error, #f44336);font-size:12px;margin-left:1em;vertical-align:middle}ajf-fb-choices-origin-editor .ajf-fb-choice-invalid{border-bottom-color:var(--mdc-theme-error, #f44336)!important;caret-color:var(--mdc-theme-error, #f44336)}\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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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] ", exportAs: ["matButton"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i5$1.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$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i7$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7$1.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 }); }
|
|
249
249
|
}
|
|
250
250
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbChoicesOriginEditor, decorators: [{
|
|
251
251
|
type: Component,
|
|
@@ -277,6 +277,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
277
277
|
* If not, see http://www.gnu.org/licenses/.
|
|
278
278
|
*
|
|
279
279
|
*/
|
|
280
|
+
/**
|
|
281
|
+
* The categories the entries of the form builder field types palette are
|
|
282
|
+
* grouped into, in display order. The values are translation keys, rendered as
|
|
283
|
+
* the header of each group.
|
|
284
|
+
*/
|
|
285
|
+
const AjfFormBuilderNodeTypeCategories = {
|
|
286
|
+
structure: 'Structure',
|
|
287
|
+
text: 'Text',
|
|
288
|
+
numeric: 'Numeric',
|
|
289
|
+
// Deliberately not 'Choices', which is already used by the choices origins
|
|
290
|
+
// menu of the toolbar and has a different meaning.
|
|
291
|
+
choices: 'Choice fields',
|
|
292
|
+
dateTime: 'Date & time',
|
|
293
|
+
advanced: 'Advanced',
|
|
294
|
+
};
|
|
280
295
|
function getNodeContainer(c, node) {
|
|
281
296
|
if (c.nodes.indexOf(node) > -1 || c.nodes.map(n => n.id).indexOf(node?.id) > -1) {
|
|
282
297
|
return c;
|
|
@@ -488,92 +503,118 @@ class AjfFormBuilderService {
|
|
|
488
503
|
return this._afterNodeUpdateObs;
|
|
489
504
|
}
|
|
490
505
|
constructor() {
|
|
506
|
+
/**
|
|
507
|
+
* The node types available in the palette, listed by category in display
|
|
508
|
+
* order. Entries of the same category are rendered under a common header, see
|
|
509
|
+
* {@link AjfFormBuilderNodeTypeCategories}.
|
|
510
|
+
*/
|
|
491
511
|
this._availableNodeTypes = [
|
|
492
512
|
{
|
|
493
513
|
label: 'Slide',
|
|
494
514
|
nodeType: { node: AjfNodeType.AjfSlide },
|
|
495
515
|
isSlide: true,
|
|
516
|
+
category: AjfFormBuilderNodeTypeCategories.structure,
|
|
496
517
|
},
|
|
497
518
|
{
|
|
498
519
|
label: 'Repeating slide',
|
|
499
520
|
nodeType: { node: AjfNodeType.AjfRepeatingSlide },
|
|
500
521
|
isSlide: true,
|
|
522
|
+
category: AjfFormBuilderNodeTypeCategories.structure,
|
|
501
523
|
},
|
|
502
524
|
{
|
|
503
525
|
label: 'String',
|
|
504
526
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.String },
|
|
527
|
+
category: AjfFormBuilderNodeTypeCategories.text,
|
|
505
528
|
},
|
|
506
529
|
{
|
|
507
530
|
label: 'Text',
|
|
508
531
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Text },
|
|
532
|
+
category: AjfFormBuilderNodeTypeCategories.text,
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
label: 'Note',
|
|
536
|
+
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Empty },
|
|
537
|
+
category: AjfFormBuilderNodeTypeCategories.text,
|
|
509
538
|
},
|
|
510
539
|
{
|
|
511
540
|
label: 'Number',
|
|
512
541
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Number },
|
|
542
|
+
category: AjfFormBuilderNodeTypeCategories.numeric,
|
|
513
543
|
},
|
|
514
544
|
{
|
|
515
545
|
label: 'Boolean',
|
|
516
546
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Boolean },
|
|
547
|
+
category: AjfFormBuilderNodeTypeCategories.choices,
|
|
517
548
|
},
|
|
518
549
|
{
|
|
519
550
|
label: 'Single choice',
|
|
520
551
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.SingleChoice },
|
|
552
|
+
category: AjfFormBuilderNodeTypeCategories.choices,
|
|
521
553
|
},
|
|
522
554
|
{
|
|
523
555
|
label: 'Multiple choice',
|
|
524
556
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.MultipleChoice },
|
|
557
|
+
category: AjfFormBuilderNodeTypeCategories.choices,
|
|
525
558
|
},
|
|
526
559
|
{
|
|
527
|
-
label: '
|
|
528
|
-
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.
|
|
529
|
-
|
|
530
|
-
{
|
|
531
|
-
label: 'Note',
|
|
532
|
-
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Empty },
|
|
560
|
+
label: 'Range',
|
|
561
|
+
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Range },
|
|
562
|
+
category: AjfFormBuilderNodeTypeCategories.choices,
|
|
533
563
|
},
|
|
534
564
|
{
|
|
535
565
|
label: 'Date range',
|
|
536
566
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.DateRange },
|
|
567
|
+
category: AjfFormBuilderNodeTypeCategories.dateTime,
|
|
537
568
|
},
|
|
538
569
|
{
|
|
539
570
|
label: 'Date input',
|
|
540
571
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.DateInput },
|
|
572
|
+
category: AjfFormBuilderNodeTypeCategories.dateTime,
|
|
541
573
|
},
|
|
542
574
|
{
|
|
543
575
|
label: 'Time',
|
|
544
576
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Time },
|
|
545
|
-
|
|
546
|
-
{
|
|
547
|
-
label: 'Table',
|
|
548
|
-
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Table },
|
|
577
|
+
category: AjfFormBuilderNodeTypeCategories.dateTime,
|
|
549
578
|
},
|
|
550
579
|
{
|
|
551
580
|
label: 'Geolocation',
|
|
552
581
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Geolocation },
|
|
582
|
+
category: AjfFormBuilderNodeTypeCategories.advanced,
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
label: 'Image',
|
|
586
|
+
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Image },
|
|
587
|
+
category: AjfFormBuilderNodeTypeCategories.advanced,
|
|
553
588
|
},
|
|
554
589
|
{
|
|
555
590
|
label: 'Barcode',
|
|
556
591
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Barcode },
|
|
592
|
+
category: AjfFormBuilderNodeTypeCategories.advanced,
|
|
557
593
|
},
|
|
558
594
|
{
|
|
559
|
-
label: '
|
|
560
|
-
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.
|
|
595
|
+
label: 'Formula',
|
|
596
|
+
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Formula },
|
|
597
|
+
category: AjfFormBuilderNodeTypeCategories.advanced,
|
|
561
598
|
},
|
|
562
599
|
{
|
|
563
|
-
label: '
|
|
564
|
-
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.
|
|
600
|
+
label: 'Table',
|
|
601
|
+
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Table },
|
|
602
|
+
category: AjfFormBuilderNodeTypeCategories.advanced,
|
|
565
603
|
},
|
|
566
604
|
{
|
|
567
|
-
label: '
|
|
568
|
-
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.
|
|
605
|
+
label: 'File',
|
|
606
|
+
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.File },
|
|
607
|
+
category: AjfFormBuilderNodeTypeCategories.advanced,
|
|
569
608
|
},
|
|
570
609
|
{
|
|
571
|
-
label: '
|
|
572
|
-
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.
|
|
610
|
+
label: 'Signature',
|
|
611
|
+
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Signature },
|
|
612
|
+
category: AjfFormBuilderNodeTypeCategories.advanced,
|
|
573
613
|
},
|
|
574
614
|
{
|
|
575
615
|
label: 'Audio',
|
|
576
616
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.Audio },
|
|
617
|
+
category: AjfFormBuilderNodeTypeCategories.advanced,
|
|
577
618
|
},
|
|
578
619
|
];
|
|
579
620
|
this._form = new BehaviorSubject(null);
|
|
@@ -1135,7 +1176,9 @@ class AjfFormBuilderService {
|
|
|
1135
1176
|
properties.formulaReps != null
|
|
1136
1177
|
? createFormula({ formula: properties.formulaReps })
|
|
1137
1178
|
: undefined;
|
|
1138
|
-
|
|
1179
|
+
// minReps is deliberately left alone: the builder no longer offers it,
|
|
1180
|
+
// and assigning the missing property would wipe the value a schema
|
|
1181
|
+
// authored elsewhere came in with. Absent, it deserialises as 1.
|
|
1139
1182
|
node.maxReps = properties.maxReps;
|
|
1140
1183
|
}
|
|
1141
1184
|
if (isField(node)) {
|
|
@@ -1426,7 +1469,7 @@ class AjfFbConditionEditor {
|
|
|
1426
1469
|
this.formulaEditorControl.setValue(newValue);
|
|
1427
1470
|
}
|
|
1428
1471
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbConditionEditor, deps: [{ token: i1.AjfValidationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1429
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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:
|
|
1472
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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: i7.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$2.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i7$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], 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 }); }
|
|
1430
1473
|
}
|
|
1431
1474
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbConditionEditor, decorators: [{
|
|
1432
1475
|
type: Component,
|
|
@@ -1532,62 +1575,51 @@ function disableFieldDropPredicate(item) {
|
|
|
1532
1575
|
}
|
|
1533
1576
|
|
|
1534
1577
|
class AjfFbStringIdentifierDialogComponent {
|
|
1535
|
-
constructor(_service
|
|
1578
|
+
constructor(_service) {
|
|
1536
1579
|
this._service = _service;
|
|
1537
|
-
this.
|
|
1538
|
-
this.
|
|
1539
|
-
this.
|
|
1540
|
-
this.
|
|
1580
|
+
this.searchFilterCtrl = new FormControl('', { nonNullable: true });
|
|
1581
|
+
this.selectedFieldNames = [];
|
|
1582
|
+
this._fields = [];
|
|
1583
|
+
this._fieldsSub = Subscription.EMPTY;
|
|
1541
1584
|
this._stringIdentifierSub = Subscription.EMPTY;
|
|
1585
|
+
this.fields$ = _service.flatFields.pipe(map(fields => fields
|
|
1586
|
+
.filter(f => f.name.length > 0)
|
|
1587
|
+
.sort((f1, f2) => (f1.label || f1.name).localeCompare(f2.label || f2.name))), shareReplay(1));
|
|
1588
|
+
this._fieldsSub = this.fields$.subscribe(fields => {
|
|
1589
|
+
this._fields = fields;
|
|
1590
|
+
});
|
|
1542
1591
|
this._stringIdentifierSub = _service.stringIdentifier.subscribe(identifier => {
|
|
1543
|
-
this.
|
|
1592
|
+
this.selectedFieldNames = identifier
|
|
1593
|
+
.map(entry => entry.value[0])
|
|
1594
|
+
.filter((name) => name != null);
|
|
1544
1595
|
});
|
|
1545
|
-
this.
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
deleteRow(rowIdx) {
|
|
1554
|
-
this.dataSource.data = [
|
|
1555
|
-
...this.dataSource.data.slice(0, rowIdx),
|
|
1556
|
-
...this.dataSource.data.slice(rowIdx + 1),
|
|
1557
|
-
];
|
|
1558
|
-
}
|
|
1559
|
-
addValue(row, evt, valueInput) {
|
|
1560
|
-
if (evt.value.length === 0) {
|
|
1561
|
-
return;
|
|
1562
|
-
}
|
|
1563
|
-
row.value = [...row.value, evt.value];
|
|
1564
|
-
valueInput.value = '';
|
|
1565
|
-
this._cdr.markForCheck();
|
|
1566
|
-
}
|
|
1567
|
-
removeValue(row, value) {
|
|
1568
|
-
const idx = row.value.indexOf(value);
|
|
1569
|
-
if (idx > -1) {
|
|
1570
|
-
row.value = [...row.value.slice(0, idx), ...row.value.slice(idx + 1)];
|
|
1571
|
-
this._cdr.markForCheck();
|
|
1572
|
-
}
|
|
1596
|
+
this.filteredFields$ = this.searchFilterCtrl.valueChanges.pipe(debounceTime(150), distinctUntilChanged(), startWith(''), map(search => {
|
|
1597
|
+
const fields = this._fields;
|
|
1598
|
+
if (!search) {
|
|
1599
|
+
return fields;
|
|
1600
|
+
}
|
|
1601
|
+
const lowerSearch = search.toLowerCase();
|
|
1602
|
+
return fields.filter(f => (f.label || f.name).toLowerCase().includes(lowerSearch));
|
|
1603
|
+
}));
|
|
1573
1604
|
}
|
|
1574
1605
|
ngOnDestroy() {
|
|
1606
|
+
this._fieldsSub.unsubscribe();
|
|
1575
1607
|
this._stringIdentifierSub.unsubscribe();
|
|
1576
1608
|
}
|
|
1577
1609
|
saveStringIdentifier() {
|
|
1578
|
-
this.
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
this.
|
|
1583
|
-
}
|
|
1584
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbStringIdentifierDialogComponent, deps: [{ token: AjfFormBuilderService }
|
|
1585
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFbStringIdentifierDialogComponent, selector: "ajf-fb-string-identifier-dialog", ngImport: i0, template: "<h3 matDialogTitle>{{'
|
|
1610
|
+
const identifier = this.selectedFieldNames
|
|
1611
|
+
.map(name => this._fields.find(f => f.name === name))
|
|
1612
|
+
.filter((f) => f != null)
|
|
1613
|
+
.map(f => ({ label: f.label || f.name, value: [f.name] }));
|
|
1614
|
+
this._service.saveStringIdentifier(identifier);
|
|
1615
|
+
}
|
|
1616
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbStringIdentifierDialogComponent, deps: [{ token: AjfFormBuilderService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1617
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFbStringIdentifierDialogComponent, selector: "ajf-fb-string-identifier-dialog", ngImport: i0, template: "<h3 matDialogTitle>{{'Default columns'|transloco}}</h3>\n<mat-dialog-content>\n <p>{{'Select the fields that will be shown as columns in the form list page'|transloco}}</p>\n <mat-form-field class=\"ajf-string-identifier-select\">\n <mat-select multiple [(ngModel)]=\"selectedFieldNames\">\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"searchFilterCtrl\"\n [placeholderLabel]=\"'Search'|transloco\"\n [noEntriesFoundLabel]=\"'Nothing found'|transloco\"\n [enableClearOnEscapePressed]=\"true\">\n </ngx-mat-select-search>\n </mat-option>\n <mat-option *ngFor=\"let field of filteredFields$ | async\" [value]=\"field.name\">\n {{field.label || field.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-raised-button color=\"warn\" matDialogClose>\n {{'Close'|transloco}}\n </button>\n <button mat-raised-button color=\"primary\" matDialogClose (click)=\"saveStringIdentifier()\">\n {{'Save'|transloco}}\n </button>\n</mat-dialog-actions>\n", styles: ["ajf-fb-string-identifier-dialog h3,ajf-fb-string-identifier-dialog p{text-align:center}ajf-fb-string-identifier-dialog .ajf-string-identifier-select{display:block;min-width:200px;width:70%;margin:20px auto}ajf-fb-string-identifier-dialog mat-dialog-actions.mat-mdc-dialog-actions{display:flex;justify-content:space-evenly;align-items:center}ajf-fb-string-identifier-dialog mat-dialog-actions.mat-mdc-dialog-actions .mat-mdc-button-base{min-width:100px}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { 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.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "recreateValuesArray"], outputs: ["toggleAll"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1586
1618
|
}
|
|
1587
1619
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbStringIdentifierDialogComponent, decorators: [{
|
|
1588
1620
|
type: Component,
|
|
1589
|
-
args: [{ selector: 'ajf-fb-string-identifier-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<h3 matDialogTitle>{{'
|
|
1590
|
-
}], ctorParameters: () => [{ type: AjfFormBuilderService }
|
|
1621
|
+
args: [{ selector: 'ajf-fb-string-identifier-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<h3 matDialogTitle>{{'Default columns'|transloco}}</h3>\n<mat-dialog-content>\n <p>{{'Select the fields that will be shown as columns in the form list page'|transloco}}</p>\n <mat-form-field class=\"ajf-string-identifier-select\">\n <mat-select multiple [(ngModel)]=\"selectedFieldNames\">\n <mat-option>\n <ngx-mat-select-search\n [formControl]=\"searchFilterCtrl\"\n [placeholderLabel]=\"'Search'|transloco\"\n [noEntriesFoundLabel]=\"'Nothing found'|transloco\"\n [enableClearOnEscapePressed]=\"true\">\n </ngx-mat-select-search>\n </mat-option>\n <mat-option *ngFor=\"let field of filteredFields$ | async\" [value]=\"field.name\">\n {{field.label || field.name}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-raised-button color=\"warn\" matDialogClose>\n {{'Close'|transloco}}\n </button>\n <button mat-raised-button color=\"primary\" matDialogClose (click)=\"saveStringIdentifier()\">\n {{'Save'|transloco}}\n </button>\n</mat-dialog-actions>\n", styles: ["ajf-fb-string-identifier-dialog h3,ajf-fb-string-identifier-dialog p{text-align:center}ajf-fb-string-identifier-dialog .ajf-string-identifier-select{display:block;min-width:200px;width:70%;margin:20px auto}ajf-fb-string-identifier-dialog mat-dialog-actions.mat-mdc-dialog-actions{display:flex;justify-content:space-evenly;align-items:center}ajf-fb-string-identifier-dialog mat-dialog-actions.mat-mdc-dialog-actions .mat-mdc-button-base{min-width:100px}\n"] }]
|
|
1622
|
+
}], ctorParameters: () => [{ type: AjfFormBuilderService }] });
|
|
1591
1623
|
|
|
1592
1624
|
/**
|
|
1593
1625
|
* @license
|
|
@@ -1818,11 +1850,11 @@ class AjfFbNodeEntry {
|
|
|
1818
1850
|
}
|
|
1819
1851
|
}
|
|
1820
1852
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbNodeEntry, deps: [{ token: AjfFormBuilderService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1821
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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: i0.forwardRef(() => 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\" [ngClass]=\"{ 'ajf-title-row-error': isInvalid(realNodeEntry.node) }\">\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}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row wrap;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto;max-width:25vw;margin-right:10px}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;max-height:100px;max-width:25vw;overflow:hidden;text-overflow:ellipsis}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:1 1 auto;display:flex;justify-content:flex-end;white-space:nowrap;justify-self:flex-end}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row-error{color:var(--palette-warn-500, #c62828)}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;box-sizing:border-box;cursor:move;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>mat-card{background-color:var(--palette-primary-100, #fff9c4)!important;color:var(--palette-primary-500)}ajf-fb-node-entry .ajf-highlighted-formbuilder-node .mat-mdc-card .mat-expansion-panel .mat-expansion-panel-header{background-color:var(--palette-primary-100, #fff9c4)!important;color:var(--palette-primary-500)}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:#fff;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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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", "cdkDropListElementContainer"], 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", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", 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: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i8$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { 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 }); }
|
|
1853
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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: i0.forwardRef(() => 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\" [ngClass]=\"{ 'ajf-title-row-error': isInvalid(realNodeEntry.node) }\">\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}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row wrap;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto;max-width:25vw;margin-right:10px}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:color-mix(in srgb,currentColor 60%,transparent);max-height:100px;max-width:25vw;overflow:hidden;text-overflow:ellipsis}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:1 1 auto;display:flex;justify-content:flex-end;white-space:nowrap;justify-self:flex-end}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row-error{color:rgb(var(--palette-warn-500, 198 40 40))}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:color-mix(in srgb,currentColor 40%,transparent)}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px color-mix(in srgb,currentColor 12%,transparent);border-right:solid 1px color-mix(in srgb,currentColor 12%,transparent);box-sizing:border-box;cursor:move;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>.mat-mdc-card{outline:2px solid currentColor;outline-offset:-1px}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:color-mix(in srgb,currentColor 4%,transparent);border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:4px;background-color:color-mix(in srgb,currentColor 12%,transparent)}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.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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", "cdkDropListElementContainer"], 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", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", 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: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i8$2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { 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 }); }
|
|
1822
1854
|
}
|
|
1823
1855
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbNodeEntry, decorators: [{
|
|
1824
1856
|
type: Component,
|
|
1825
|
-
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\" [ngClass]=\"{ 'ajf-title-row-error': isInvalid(realNodeEntry.node) }\">\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}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row wrap;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto;max-width:25vw;margin-right:10px}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color
|
|
1857
|
+
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\" [ngClass]=\"{ 'ajf-title-row-error': isInvalid(realNodeEntry.node) }\">\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}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row wrap;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto;max-width:25vw;margin-right:10px}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:color-mix(in srgb,currentColor 60%,transparent);max-height:100px;max-width:25vw;overflow:hidden;text-overflow:ellipsis}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:1 1 auto;display:flex;justify-content:flex-end;white-space:nowrap;justify-self:flex-end}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row-error{color:rgb(var(--palette-warn-500, 198 40 40))}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:color-mix(in srgb,currentColor 40%,transparent)}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px color-mix(in srgb,currentColor 12%,transparent);border-right:solid 1px color-mix(in srgb,currentColor 12%,transparent);box-sizing:border-box;cursor:move;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>.mat-mdc-card{outline:2px solid currentColor;outline-offset:-1px}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:color-mix(in srgb,currentColor 4%,transparent);border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:4px;background-color:color-mix(in srgb,currentColor 12%,transparent)}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"] }]
|
|
1826
1858
|
}], ctorParameters: () => [{ type: AjfFormBuilderService }], propDecorators: { branchLines: [{
|
|
1827
1859
|
type: ViewChildren,
|
|
1828
1860
|
args: [AjfFbBranchLine]
|
|
@@ -1864,7 +1896,7 @@ class AjfFbValidationConditionEditorDialog {
|
|
|
1864
1896
|
this.dialogRef.close(this.editor.formulaEditorControl.value);
|
|
1865
1897
|
}
|
|
1866
1898
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbValidationConditionEditorDialog, deps: [{ token: AjfFormBuilderService }, { token: i2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1867
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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] ", exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type:
|
|
1899
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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] ", exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i7.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 }); }
|
|
1868
1900
|
}
|
|
1869
1901
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbValidationConditionEditorDialog, decorators: [{
|
|
1870
1902
|
type: Component,
|
|
@@ -1895,7 +1927,7 @@ class AjfFbWarningConditionEditorDialog {
|
|
|
1895
1927
|
this.dialogRef.close(this.editor.formulaEditorControl.value);
|
|
1896
1928
|
}
|
|
1897
1929
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbWarningConditionEditorDialog, deps: [{ token: AjfFormBuilderService }, { token: i2.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1898
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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] ", exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type:
|
|
1930
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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] ", exportAs: ["matButton"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i7.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 }); }
|
|
1899
1931
|
}
|
|
1900
1932
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbWarningConditionEditorDialog, decorators: [{
|
|
1901
1933
|
type: Component,
|
|
@@ -1981,14 +2013,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1981
2013
|
* If not, see http://www.gnu.org/licenses/.
|
|
1982
2014
|
*
|
|
1983
2015
|
*/
|
|
1984
|
-
function checkRepsValidity(c) {
|
|
1985
|
-
const minReps = c.value.minReps;
|
|
1986
|
-
const maxReps = c.value.maxReps;
|
|
1987
|
-
if (minReps && maxReps && minReps > maxReps) {
|
|
1988
|
-
return { reps: 'Min repetions cannot be greater than max repetitions' };
|
|
1989
|
-
}
|
|
1990
|
-
return null;
|
|
1991
|
-
}
|
|
1992
2016
|
function checkValueLimitsValidity(c) {
|
|
1993
2017
|
const minValue = c.value.minValue;
|
|
1994
2018
|
const maxValue = c.value.maxValue;
|
|
@@ -2436,10 +2460,8 @@ class AjfFbNodeProperties {
|
|
|
2436
2460
|
const rn = n.node;
|
|
2437
2461
|
const formulaReps = rn.formulaReps != null ? rn.formulaReps.formula : null;
|
|
2438
2462
|
controls.formulaReps = [formulaReps];
|
|
2439
|
-
controls.minReps = rn.minReps;
|
|
2440
2463
|
controls.maxReps = rn.maxReps;
|
|
2441
2464
|
this._curFormulaReps = formulaReps;
|
|
2442
|
-
validators.push(checkRepsValidity);
|
|
2443
2465
|
}
|
|
2444
2466
|
const { node } = n;
|
|
2445
2467
|
if (isField(node)) {
|
|
@@ -3056,11 +3078,11 @@ class AjfFbNodeProperties {
|
|
|
3056
3078
|
return 'condition';
|
|
3057
3079
|
}
|
|
3058
3080
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbNodeProperties, deps: [{ token: i0.ChangeDetectorRef }, { token: AjfFormBuilderService }, { token: i2.MatDialog }, { token: i3$1.UntypedFormBuilder }, { token: AjfNodePropertiesNameMatchValidator }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3059
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 mat-icon-button\n [disabled]=\"pf.status !== 'VALID'\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button> \n </div>\n <mat-error *ngIf=\"pf?.invalid\">\n {{allErrorMessages(pf)}}\n </mat-error>\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 <ng-template [ngIf]=\"isEmptyField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"HTML\" [placeholder]=\"'HTML' | transloco\" />\n </mat-form-field>\n </div>\n </ng-template>\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>{{'Min repetitions'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input formControlName=\"minReps\" matSliderThumb\n /></mat-slider>\n </div>\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input formControlName=\"maxReps\" 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 <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-select formControlName=\"appearance\" [placeholder]=\"'Appearance' | transloco\">\n <mat-option [value]=\"null\">{{'Default'|transloco}}</mat-option>\n <mat-option value=\"rating\">{{'Rating'|transloco}}</mat-option>\n </mat-select>\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-error *ngIf=\"pf.get('choicesOriginRef')?.invalid\">\n {{fieldErrorMessage(pf.get('choicesOriginRef'), 'choicesOriginRef')}}\n </mat-error>\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 formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n <mat-error *ngIf=\"pf.get('tableDef')?.invalid\">\n {{fieldErrorMessage(pf.get('tableDef'), 'tableDef')}}\n </mat-error>\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 .ajf-prop .mdc-button__label{max-width:100%}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", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], 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: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i13.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "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]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], 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 }); }
|
|
3081
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 mat-icon-button\n [disabled]=\"pf.status !== 'VALID'\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button> \n </div>\n <mat-error *ngIf=\"pf?.invalid\">\n {{allErrorMessages(pf)}}\n </mat-error>\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 <ng-template [ngIf]=\"isEmptyField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"HTML\" [placeholder]=\"'HTML' | transloco\" />\n </mat-form-field>\n </div>\n </ng-template>\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>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input formControlName=\"maxReps\" 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 <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-select formControlName=\"appearance\" [placeholder]=\"'Appearance' | transloco\">\n <mat-option [value]=\"null\">{{'Default'|transloco}}</mat-option>\n <mat-option value=\"rating\">{{'Rating'|transloco}}</mat-option>\n </mat-select>\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 <!-- The warning editor used to sit here: a `notEmptyWarning` checkbox and\n the list of warning conditions. Both are gone from the UI, while the\n component keeps the properties, the form controls and the dialog that\n drove them, so putting the block back is a template-only change. -->\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-error *ngIf=\"pf.get('choicesOriginRef')?.invalid\">\n {{fieldErrorMessage(pf.get('choicesOriginRef'), 'choicesOriginRef')}}\n </mat-error>\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 formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n <mat-error *ngIf=\"pf.get('tableDef')?.invalid\">\n {{fieldErrorMessage(pf.get('tableDef'), 'tableDef')}}\n </mat-error>\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:currentColor}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 .ajf-prop .mdc-button__label{max-width:100%}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: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8$3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i5$1.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: i8$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i13.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "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]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], 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 }); }
|
|
3060
3082
|
}
|
|
3061
3083
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbNodeProperties, decorators: [{
|
|
3062
3084
|
type: Component,
|
|
3063
|
-
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 mat-icon-button\n [disabled]=\"pf.status !== 'VALID'\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button> \n </div>\n <mat-error *ngIf=\"pf?.invalid\">\n {{allErrorMessages(pf)}}\n </mat-error>\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 <ng-template [ngIf]=\"isEmptyField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"HTML\" [placeholder]=\"'HTML' | transloco\" />\n </mat-form-field>\n </div>\n </ng-template>\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>{{'Min repetitions'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input formControlName=\"minReps\" matSliderThumb\n /></mat-slider>\n </div>\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input formControlName=\"maxReps\" 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 <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-select formControlName=\"appearance\" [placeholder]=\"'Appearance' | transloco\">\n <mat-option [value]=\"null\">{{'Default'|transloco}}</mat-option>\n <mat-option value=\"rating\">{{'Rating'|transloco}}</mat-option>\n </mat-select>\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-error *ngIf=\"pf.get('choicesOriginRef')?.invalid\">\n {{fieldErrorMessage(pf.get('choicesOriginRef'), 'choicesOriginRef')}}\n </mat-error>\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 formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n <mat-error *ngIf=\"pf.get('tableDef')?.invalid\">\n {{fieldErrorMessage(pf.get('tableDef'), 'tableDef')}}\n </mat-error>\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 .ajf-prop .mdc-button__label{max-width:100%}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"] }]
|
|
3085
|
+
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 mat-icon-button\n [disabled]=\"pf.status !== 'VALID'\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button> \n </div>\n <mat-error *ngIf=\"pf?.invalid\">\n {{allErrorMessages(pf)}}\n </mat-error>\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 <ng-template [ngIf]=\"isEmptyField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"HTML\" [placeholder]=\"'HTML' | transloco\" />\n </mat-form-field>\n </div>\n </ng-template>\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>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input formControlName=\"maxReps\" 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 <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-select formControlName=\"appearance\" [placeholder]=\"'Appearance' | transloco\">\n <mat-option [value]=\"null\">{{'Default'|transloco}}</mat-option>\n <mat-option value=\"rating\">{{'Rating'|transloco}}</mat-option>\n </mat-select>\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 <!-- The warning editor used to sit here: a `notEmptyWarning` checkbox and\n the list of warning conditions. Both are gone from the UI, while the\n component keeps the properties, the form controls and the dialog that\n drove them, so putting the block back is a template-only change. -->\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-error *ngIf=\"pf.get('choicesOriginRef')?.invalid\">\n {{fieldErrorMessage(pf.get('choicesOriginRef'), 'choicesOriginRef')}}\n </mat-error>\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 formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n <mat-error *ngIf=\"pf.get('tableDef')?.invalid\">\n {{fieldErrorMessage(pf.get('tableDef'), 'tableDef')}}\n </mat-error>\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:currentColor}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 .ajf-prop .mdc-button__label{max-width:100%}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"] }]
|
|
3064
3086
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: AjfFormBuilderService }, { type: i2.MatDialog }, { type: i3$1.UntypedFormBuilder }, { type: AjfNodePropertiesNameMatchValidator }] });
|
|
3065
3087
|
|
|
3066
3088
|
/**
|
|
@@ -3099,11 +3121,11 @@ class AjfFbNodeTypeEntry {
|
|
|
3099
3121
|
this._cdr = _cdr;
|
|
3100
3122
|
}
|
|
3101
3123
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbNodeTypeEntry, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3102
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFbNodeTypeEntry, selector: "ajf-fb-node-type-entry", inputs: { nodeType: "nodeType" }, ngImport: i0, template: "<ng-container *ngIf=\"nodeType\">\n <ajf-node-icon [node]=\"node\"></ajf-node-icon
|
|
3124
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFbNodeTypeEntry, selector: "ajf-fb-node-type-entry", inputs: { nodeType: "nodeType" }, ngImport: i0, template: "<ng-container *ngIf=\"nodeType\">\n <ajf-node-icon [node]=\"node\"></ajf-node-icon><span class=\"ajf-node-type-label\">{{nodeType.label}}</span>\n</ng-container>\n", styles: ["ajf-fb-node-type-entry{display:flex;align-items:center;gap:11px;padding:7px 8px;margin-bottom:2px;border-radius:8px;font-size:13.5px;cursor:pointer}ajf-fb-node-type-entry ajf-node-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:30px;height:30px;border-radius:7px;background:color-mix(in srgb,currentColor 12%,transparent)}ajf-fb-node-type-entry .ajf-node-type-label{min-width:0;line-height:1.25}ajf-fb-node-type-entry mat-icon{vertical-align:middle;font-size:18px;width:18px;height:18px}\n"], dependencies: [{ kind: "component", type: i2$1.AjfNodeIcon, selector: "ajf-node-icon" }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3103
3125
|
}
|
|
3104
3126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbNodeTypeEntry, decorators: [{
|
|
3105
3127
|
type: Component,
|
|
3106
|
-
args: [{ selector: 'ajf-fb-node-type-entry', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"nodeType\">\n <ajf-node-icon [node]=\"node\"></ajf-node-icon
|
|
3128
|
+
args: [{ selector: 'ajf-fb-node-type-entry', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"nodeType\">\n <ajf-node-icon [node]=\"node\"></ajf-node-icon><span class=\"ajf-node-type-label\">{{nodeType.label}}</span>\n</ng-container>\n", styles: ["ajf-fb-node-type-entry{display:flex;align-items:center;gap:11px;padding:7px 8px;margin-bottom:2px;border-radius:8px;font-size:13.5px;cursor:pointer}ajf-fb-node-type-entry ajf-node-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:30px;height:30px;border-radius:7px;background:color-mix(in srgb,currentColor 12%,transparent)}ajf-fb-node-type-entry .ajf-node-type-label{min-width:0;line-height:1.25}ajf-fb-node-type-entry mat-icon{vertical-align:middle;font-size:18px;width:18px;height:18px}\n"] }]
|
|
3107
3129
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { nodeType: [{
|
|
3108
3130
|
type: Input
|
|
3109
3131
|
}] } });
|
|
@@ -3128,6 +3150,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3128
3150
|
}]
|
|
3129
3151
|
}] });
|
|
3130
3152
|
|
|
3153
|
+
/**
|
|
3154
|
+
* @license
|
|
3155
|
+
* Copyright (C) Gnucoop soc. coop.
|
|
3156
|
+
*
|
|
3157
|
+
* This file is part of the Advanced JSON forms (ajf).
|
|
3158
|
+
*
|
|
3159
|
+
* Advanced JSON forms (ajf) is free software: you can redistribute it and/or
|
|
3160
|
+
* modify it under the terms of the GNU Affero General Public License as
|
|
3161
|
+
* published by the Free Software Foundation, either version 3 of the License,
|
|
3162
|
+
* or (at your option) any later version.
|
|
3163
|
+
*
|
|
3164
|
+
* Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
|
|
3165
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
3166
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
|
|
3167
|
+
* General Public License for more details.
|
|
3168
|
+
*
|
|
3169
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
3170
|
+
* along with Advanced JSON forms (ajf).
|
|
3171
|
+
* If not, see http://www.gnu.org/licenses/.
|
|
3172
|
+
*
|
|
3173
|
+
*/
|
|
3174
|
+
/**
|
|
3175
|
+
* Groups the node types of the palette by category, keeping the categories in
|
|
3176
|
+
* the order of their first entry. Applied after the search filter, so that the
|
|
3177
|
+
* categories left without entries produce no header.
|
|
3178
|
+
*/
|
|
3179
|
+
class NodeTypeGroupsPipe {
|
|
3180
|
+
transform(nodeTypes) {
|
|
3181
|
+
if (!nodeTypes) {
|
|
3182
|
+
return [];
|
|
3183
|
+
}
|
|
3184
|
+
const groups = [];
|
|
3185
|
+
const groupsByCategory = new Map();
|
|
3186
|
+
// Entries with no category are collected in a trailing group with no
|
|
3187
|
+
// header, so that the node types added by the host app are never hidden.
|
|
3188
|
+
const uncategorized = [];
|
|
3189
|
+
nodeTypes.forEach(nodeType => {
|
|
3190
|
+
const category = nodeType.category;
|
|
3191
|
+
if (!category) {
|
|
3192
|
+
uncategorized.push(nodeType);
|
|
3193
|
+
return;
|
|
3194
|
+
}
|
|
3195
|
+
let group = groupsByCategory.get(category);
|
|
3196
|
+
if (group == null) {
|
|
3197
|
+
group = { category, nodeTypes: [] };
|
|
3198
|
+
groupsByCategory.set(category, group);
|
|
3199
|
+
groups.push(group);
|
|
3200
|
+
}
|
|
3201
|
+
group.nodeTypes.push(nodeType);
|
|
3202
|
+
});
|
|
3203
|
+
if (uncategorized.length > 0) {
|
|
3204
|
+
groups.push({ category: '', nodeTypes: uncategorized });
|
|
3205
|
+
}
|
|
3206
|
+
return groups;
|
|
3207
|
+
}
|
|
3208
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NodeTypeGroupsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
3209
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: NodeTypeGroupsPipe, name: "nodeTypeGroups" }); }
|
|
3210
|
+
}
|
|
3211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NodeTypeGroupsPipe, decorators: [{
|
|
3212
|
+
type: Pipe,
|
|
3213
|
+
args: [{ name: 'nodeTypeGroups' }]
|
|
3214
|
+
}] });
|
|
3215
|
+
|
|
3131
3216
|
class AjfFormBuilder {
|
|
3132
3217
|
get form() {
|
|
3133
3218
|
return this._form;
|
|
@@ -3140,6 +3225,19 @@ class AjfFormBuilder {
|
|
|
3140
3225
|
}
|
|
3141
3226
|
}
|
|
3142
3227
|
}
|
|
3228
|
+
get expandSlides() {
|
|
3229
|
+
return this._expandSlides;
|
|
3230
|
+
}
|
|
3231
|
+
set expandSlides(expandSlides) {
|
|
3232
|
+
this._setSlidesExpanded(coerceBooleanProperty(expandSlides));
|
|
3233
|
+
}
|
|
3234
|
+
get fillHeight() {
|
|
3235
|
+
return this._fillHeight;
|
|
3236
|
+
}
|
|
3237
|
+
set fillHeight(fillHeight) {
|
|
3238
|
+
this._fillHeight = coerceBooleanProperty(fillHeight);
|
|
3239
|
+
this._cdr.markForCheck();
|
|
3240
|
+
}
|
|
3143
3241
|
get nodeTypes() {
|
|
3144
3242
|
return this._nodeTypes;
|
|
3145
3243
|
}
|
|
@@ -3156,6 +3254,26 @@ class AjfFormBuilder {
|
|
|
3156
3254
|
this._service = _service;
|
|
3157
3255
|
this._dialog = _dialog;
|
|
3158
3256
|
this._cdr = _cdr;
|
|
3257
|
+
/**
|
|
3258
|
+
* True when the slides of the designer are kept expanded. Slides added later
|
|
3259
|
+
* follow this state as well.
|
|
3260
|
+
* It drives the "expand slides" toggle of the toolbar and can be set by the
|
|
3261
|
+
* host, both one-way (`[expandSlides]="true"`) and two-way
|
|
3262
|
+
* (`[(expandSlides)]="expanded"`).
|
|
3263
|
+
*/
|
|
3264
|
+
this._expandSlides = false;
|
|
3265
|
+
/**
|
|
3266
|
+
* Emits whenever the slides expansion state is changed from inside the form
|
|
3267
|
+
* builder, i.e. by the toolbar controls.
|
|
3268
|
+
*/
|
|
3269
|
+
this.expandSlidesChange = new EventEmitter();
|
|
3270
|
+
/**
|
|
3271
|
+
* When true the form builder fills the whole height of its container: the
|
|
3272
|
+
* field types palette, the designer and the properties panel stretch to the
|
|
3273
|
+
* available height and scroll internally, instead of growing with their
|
|
3274
|
+
* content. Requires the container to have a definite height.
|
|
3275
|
+
*/
|
|
3276
|
+
this._fillHeight = false;
|
|
3159
3277
|
/**
|
|
3160
3278
|
* Called to set form builder validation errors
|
|
3161
3279
|
*/
|
|
@@ -3227,6 +3345,10 @@ class AjfFormBuilder {
|
|
|
3227
3345
|
this._vc.emit();
|
|
3228
3346
|
}
|
|
3229
3347
|
ngAfterContentInit() {
|
|
3348
|
+
// The expanded status of the slides lives in the service, which outlives a
|
|
3349
|
+
// single form builder instance: re-apply the current state, so that a newly
|
|
3350
|
+
// created form builder always matches its own expandSlides value.
|
|
3351
|
+
this._setSlidesExpanded(this._expandSlides);
|
|
3230
3352
|
this._setCurrentForm();
|
|
3231
3353
|
this._init = true;
|
|
3232
3354
|
}
|
|
@@ -3266,24 +3388,43 @@ class AjfFormBuilder {
|
|
|
3266
3388
|
this._stringIdentifierDialog = null;
|
|
3267
3389
|
}
|
|
3268
3390
|
this._stringIdentifierDialog = this._dialog.open(AjfFbStringIdentifierDialogComponent, {
|
|
3269
|
-
disableClose: true,
|
|
3270
3391
|
width: '60%',
|
|
3271
3392
|
height: '60%',
|
|
3272
3393
|
});
|
|
3273
3394
|
}
|
|
3395
|
+
/**
|
|
3396
|
+
* Expands all the slides of the designer and keeps the slides added later expanded.
|
|
3397
|
+
*/
|
|
3274
3398
|
expandAll() {
|
|
3275
|
-
this.
|
|
3399
|
+
this._setSlidesExpanded(true, true);
|
|
3276
3400
|
}
|
|
3401
|
+
/**
|
|
3402
|
+
* Collapses all the slides of the designer and keeps the slides added later collapsed.
|
|
3403
|
+
*/
|
|
3277
3404
|
collapseAll() {
|
|
3278
|
-
this.
|
|
3405
|
+
this._setSlidesExpanded(false, true);
|
|
3279
3406
|
}
|
|
3280
3407
|
expandToggle(evt) {
|
|
3281
|
-
|
|
3282
|
-
|
|
3408
|
+
this._setSlidesExpanded(evt.checked, true);
|
|
3409
|
+
}
|
|
3410
|
+
/**
|
|
3411
|
+
* Applies the slides expansion state to the service.
|
|
3412
|
+
* @param expanded True to keep the slides expanded
|
|
3413
|
+
* @param notify True to emit expandSlidesChange when the state changes
|
|
3414
|
+
*/
|
|
3415
|
+
_setSlidesExpanded(expanded, notify = false) {
|
|
3416
|
+
const changed = this._expandSlides !== expanded;
|
|
3417
|
+
this._expandSlides = expanded;
|
|
3418
|
+
if (expanded) {
|
|
3419
|
+
this._service.expandAll();
|
|
3283
3420
|
}
|
|
3284
3421
|
else {
|
|
3285
|
-
this.collapseAll();
|
|
3422
|
+
this._service.collapseAll();
|
|
3286
3423
|
}
|
|
3424
|
+
if (notify && changed) {
|
|
3425
|
+
this.expandSlidesChange.emit(expanded);
|
|
3426
|
+
}
|
|
3427
|
+
this._cdr.markForCheck();
|
|
3287
3428
|
}
|
|
3288
3429
|
async downloadAsXlsform() {
|
|
3289
3430
|
this.xlsformDownloading = true;
|
|
@@ -3323,16 +3464,22 @@ class AjfFormBuilder {
|
|
|
3323
3464
|
this._service.setForm(this._form);
|
|
3324
3465
|
}
|
|
3325
3466
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFormBuilder, deps: [{ token: AjfFormBuilderService }, { token: i2.MatDialog }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3326
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFormBuilder, selector: "ajf-form-builder", inputs: { form: "form" }, outputs: { formBuilderValidation: "formBuilderValidation" }, 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()\" aria-label=\"Toggle side navigation\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\">\n {{ 'Choices' | transloco }}\n </button>\n <button mat-button (click)=\"editStringIdentifier()\">\n {{ 'Identifier' | transloco }}\n </button>\n\n <div class=\"ajf-toolbar-group\">\n <button\n mat-icon-button\n aria-label=\"Collapse all slides\"\n matTooltip=\"Keep slides collapsed\"\n >\n <mat-icon>unfold_less</mat-icon>\n </button>\n\n <mat-slide-toggle\n color=\"primary\"\n (change)=\"expandToggle($event)\"\n aria-label=\"Toggle slide expansion\"\n ></mat-slide-toggle>\n\n <button\n mat-icon-button\n aria-label=\"Expand all slides\"\n matTooltip=\"Keep slides expanded\"\n >\n <mat-icon>unfold_more</mat-icon>\n </button>\n </div>\n\n <span class=\"ajf-spacer\"></span>\n\n <button mat-button (click)=\"downloadAsXlsform()\" [disabled]=\"xlsformDownloading\">\n {{ 'Download as XLSForm' | transloco }}\n </button>\n\n <mat-menu #choicesMenu=\"matMenu\">\n <button mat-menu-item (click)=\"createChoicesOrigin()\">\n {{ 'New..' | transloco }}\n </button>\n <ng-container *ngIf=\"choicesOrigins | async as cos\">\n <button\n mat-menu-item\n *ngFor=\"let choicesOrigin of cos\"\n (click)=\"editChoicesOrigin(choicesOrigin)\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name) | transloco }}\n </button>\n </ng-container>\n </mat-menu>\n</mat-toolbar>\n\n<div class=\"ajf-formtree-container\">\n <mat-drawer-container\n cdkDropListGroup\n class=\"ajf-formtree-drawer-container\"\n >\n <mat-drawer #leftSidenav position=\"start\" mode=\"over\" class=\"ajf-sidenav-modern\">\n <div class=\"ajf-drawer-header\">\n <mat-form-field class=\"ajf-search-field\" floatLabel=\"auto\">\n <mat-icon matPrefix>search</mat-icon>\n <input\n matInput\n type=\"text\"\n [(ngModel)]=\"searchTerm\"\n placeholder=\"{{ 'Search elements...' | transloco }}\"\n />\n <button\n *ngIf=\"searchTerm\"\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"searchTerm=''\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n \n <div\n #sourceDropList\n class=\"ajf-drawer-content\"\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 | nodeTypeFilter: searchTerm\"\n cdkDrag\n [cdkDragData]=\"nodeType\"\n (cdkDragStarted)=\"leftSidenav.close()\"\n [nodeType]=\"nodeType\"\n ></ajf-fb-node-type-entry>\n </div>\n </mat-drawer>\n \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\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;flex-direction:column;align-items:stretch;position:relative;min-height:300px}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{position:sticky;top:0;z-index:3;display:flex;align-items:center;padding:.5rem 1rem;box-shadow:0 2px 6px #00000014;border-bottom:1px solid rgba(0,0,0,.06);gap:.75rem}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar button[mat-icon-button] mat-icon{transition:transform .2s ease,color .2s ease}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar button[mat-icon-button]:hover mat-icon{transform:scale(1.1)}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar .ajf-toolbar-group{display:flex;align-items:center;gap:.5rem;border-radius:100vmax;padding:.25rem .5rem;background-color:#00000008}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar .ajf-spacer{flex:1 1 auto}ajf-form-builder .ajf-formtree-container{display:flex;flex-flow:row;align-items:flex-start;justify-content:space-between;gap:1.25rem;padding:1rem;box-sizing:border-box}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{flex:1 1 auto;min-height:47vh;border-radius:1rem;border:1px solid #ccc;overflow:hidden;transition:box-shadow .25s ease-in-out}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container mat-drawer{max-width:20%;min-width:240px;border-right:1px solid rgba(0,0,0,.08)}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{flex:1;padding:1rem;overflow-y:auto}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .mat-expansion-panel-body{padding:12px}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{flex:0 1 auto;max-width:24%;min-width:260px;max-height:70vh;overflow-y:auto;position:sticky;top:64px;border-radius:1rem;border:1px solid #ccc;padding:1rem;transition:box-shadow .3s ease,transform .3s ease}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties:hover{box-shadow:0 0 14px #0000001a}ajf-form-builder .ajf-sidenav-modern{display:flex;flex-direction:column;max-width:22%;min-width:220px;border-right:1px solid rgba(0,0,0,.08);box-shadow:inset -1px 0 #0000000d}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-header{position:sticky;top:0;z-index:2;padding:.5rem;border-bottom:1px solid rgba(0,0,0,.08)}ajf-form-builder .ajf-sidenav-modern .ajf-search-field{width:100%;margin:0}ajf-form-builder .ajf-sidenav-modern .ajf-search-field input{font-size:.9rem}ajf-form-builder .ajf-sidenav-modern .ajf-search-field mat-icon{color:#0000008a}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content{flex:1 1 auto;overflow-y:auto;padding:.5rem;display:flex;flex-direction:column;gap:.25rem;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.25) transparent}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar{width:6px}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar-thumb{background:#00000040;border-radius:4px}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar-thumb:hover{background:#0006}ajf-form-builder .ajf-sidenav-modern ajf-fb-node-type-entry{border-radius:8px;transition:background-color .15s ease,transform .15s ease;cursor:pointer}ajf-form-builder .ajf-sidenav-modern ajf-fb-node-type-entry:hover{background-color:#0000000d;transform:scale(1.02)}@media (max-height: 700px){ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content{padding:.25rem}}@media (max-width: 900px){ajf-form-builder .ajf-sidenav-modern{max-width:240px;min-width:180px}ajf-form-builder .ajf-sidenav-modern .ajf-search-field input{font-size:.8rem}}@media (max-width: 1024px){ajf-form-builder .ajf-formtree-container{flex-direction:column;gap:1rem}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{min-height:40vh;border-radius:.75rem}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{max-width:100%;position:relative;top:0;border-radius:.75rem}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{flex-wrap:wrap;justify-content:center}}ajf-form-builder *{scroll-behavior:smooth}\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", "cdkDropListElementContainer"], 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", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { 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] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i9.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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: i10$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i10$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i11.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i11.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i12$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i14.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], 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" }, { kind: "pipe", type: NodeTypeFilterPipe, name: "nodeTypeFilter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3467
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFormBuilder, selector: "ajf-form-builder", inputs: { form: "form", expandSlides: "expandSlides", fillHeight: "fillHeight" }, outputs: { expandSlidesChange: "expandSlidesChange", formBuilderValidation: "formBuilderValidation" }, host: { properties: { "class.ajf-form-builder-fill-height": "fillHeight" } }, 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()\" aria-label=\"Toggle side navigation\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\">\n {{ 'Choices' | transloco }}\n </button>\n <button mat-button (click)=\"editStringIdentifier()\">\n {{ 'Default columns' | transloco }}\n </button>\n\n <div class=\"ajf-toolbar-group\">\n <button\n mat-icon-button\n aria-label=\"Collapse all slides\"\n matTooltip=\"Keep slides collapsed\"\n (click)=\"collapseAll()\"\n >\n <mat-icon>unfold_less</mat-icon>\n </button>\n\n <mat-slide-toggle\n color=\"primary\"\n [checked]=\"expandSlides\"\n (change)=\"expandToggle($event)\"\n aria-label=\"Toggle slide expansion\"\n ></mat-slide-toggle>\n\n <button\n mat-icon-button\n aria-label=\"Expand all slides\"\n matTooltip=\"Keep slides expanded\"\n (click)=\"expandAll()\"\n >\n <mat-icon>unfold_more</mat-icon>\n </button>\n </div>\n\n <span class=\"ajf-spacer\"></span>\n\n <button mat-button (click)=\"downloadAsXlsform()\" [disabled]=\"xlsformDownloading\">\n {{ 'Download as XLSForm' | transloco }}\n </button>\n\n <mat-menu #choicesMenu=\"matMenu\">\n <button mat-menu-item (click)=\"createChoicesOrigin()\">\n {{ 'New..' | transloco }}\n </button>\n <ng-container *ngIf=\"choicesOrigins | async as cos\">\n <button\n mat-menu-item\n *ngFor=\"let choicesOrigin of cos\"\n (click)=\"editChoicesOrigin(choicesOrigin)\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name) | transloco }}\n </button>\n </ng-container>\n </mat-menu>\n</mat-toolbar>\n\n<div class=\"ajf-formtree-container\">\n <mat-drawer-container\n cdkDropListGroup\n class=\"ajf-formtree-drawer-container\"\n >\n <mat-drawer #leftSidenav position=\"start\" mode=\"over\" class=\"ajf-sidenav-modern\">\n <div class=\"ajf-drawer-header\">\n <mat-form-field class=\"ajf-search-field\" floatLabel=\"auto\">\n <mat-icon matPrefix>search</mat-icon>\n <input\n matInput\n type=\"text\"\n [(ngModel)]=\"searchTerm\"\n placeholder=\"{{ 'Search elements...' | transloco }}\"\n />\n <button\n *ngIf=\"searchTerm\"\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"searchTerm=''\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n \n <div\n #sourceDropList\n class=\"ajf-drawer-content\"\n cdkDropList\n [cdkDropListConnectedTo]=\"(connectedDropLists | async)!\"\n [cdkDropListEnterPredicate]=\"disableDrop\"\n [cdkDropListData]=\"nodeTypes\"\n >\n <ng-container *ngFor=\"let group of nodeTypes | nodeTypeFilter: searchTerm | nodeTypeGroups\">\n <div class=\"ajf-fb-category-header\" *ngIf=\"group.category\">\n {{ group.category | transloco }}\n </div>\n <ajf-fb-node-type-entry\n *ngFor=\"let nodeType of group.nodeTypes\"\n cdkDrag\n [cdkDragData]=\"nodeType\"\n (cdkDragStarted)=\"leftSidenav.close()\"\n [nodeType]=\"nodeType\"\n ></ajf-fb-node-type-entry>\n </ng-container>\n </div>\n </mat-drawer>\n \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\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;flex-direction:column;align-items:stretch;position:relative;min-height:300px}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{position:sticky;top:0;z-index:3;display:flex;align-items:center;height:48px;min-height:48px;padding:0 1rem;box-shadow:none;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);gap:.75rem}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar button[mat-icon-button] mat-icon{transition:transform .2s ease,color .2s ease}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar button[mat-icon-button]:hover mat-icon{transform:scale(1.1)}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar .ajf-toolbar-group{display:flex;align-items:center;gap:.5rem;border-radius:100vmax;padding:.25rem .5rem;background-color:color-mix(in srgb,currentColor 4%,transparent)}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar .ajf-spacer{flex:1 1 auto}ajf-form-builder .ajf-formtree-container{display:flex;flex-flow:row;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 22px;box-sizing:border-box}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{flex:1 1 auto;min-height:47vh;border:none;border-radius:0;background:transparent;overflow:hidden;transition:box-shadow .25s ease-in-out}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{flex:1;padding:4px 2px;overflow-y:auto}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer .mat-card-container .mat-mdc-card{border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:10px;box-shadow:0 1px 2px #0000000d}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer .mat-expansion-panel-header{background:color-mix(in srgb,currentColor 4%,transparent)}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer .mat-expansion-panel-header:hover{background:color-mix(in srgb,currentColor 6%,transparent)}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer .mat-expansion-panel-header-title{font-size:14.5px;font-weight:600}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .mat-expansion-panel-body{padding:12px}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{flex:0 1 auto;min-width:312px;max-width:312px;max-height:70vh;overflow-y:auto;position:sticky;top:64px;border-radius:10px;border:1px solid color-mix(in srgb,currentColor 12%,transparent);padding:1rem;transition:box-shadow .3s ease,transform .3s ease}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties:hover{box-shadow:0 0 14px #0000001a}ajf-form-builder .ajf-sidenav-modern{display:flex;flex-direction:column;min-width:250px;max-width:250px;border-right:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:10px 0 0 10px}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-header{position:sticky;top:0;z-index:2;padding:.5rem;border-bottom:1px solid color-mix(in srgb,currentColor 8%,transparent)}ajf-form-builder .ajf-sidenav-modern .ajf-search-field{width:100%;margin:0}ajf-form-builder .ajf-sidenav-modern .ajf-search-field input{font-size:.9rem}ajf-form-builder .ajf-sidenav-modern .ajf-search-field mat-icon{color:color-mix(in srgb,currentColor 60%,transparent)}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content{flex:1 1 auto;overflow-y:auto;padding:.5rem;display:flex;flex-direction:column;gap:.25rem;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,currentColor 25%,transparent) transparent}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar{width:6px}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar-thumb{background:color-mix(in srgb,currentColor 25%,transparent);border-radius:4px}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,currentColor 40%,transparent)}ajf-form-builder .ajf-sidenav-modern .ajf-fb-category-header{padding:14px 8px 4px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:color-mix(in srgb,currentColor 60%,transparent);-webkit-user-select:none;user-select:none;pointer-events:none}ajf-form-builder .ajf-sidenav-modern .ajf-fb-category-header:first-child{padding-top:4px}ajf-form-builder .ajf-sidenav-modern ajf-fb-node-type-entry{transition:background-color .15s ease,transform .15s ease}ajf-form-builder .ajf-sidenav-modern ajf-fb-node-type-entry:hover{background-color:color-mix(in srgb,currentColor 6%,transparent);transform:scale(1.02)}@media (max-height: 700px){ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content{padding:.25rem}}@media (max-width: 900px){ajf-form-builder .ajf-sidenav-modern{max-width:240px;min-width:180px}ajf-form-builder .ajf-sidenav-modern .ajf-search-field input{font-size:.8rem}}@media (max-width: 1024px){ajf-form-builder .ajf-formtree-container{flex-direction:column;gap:1rem}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{min-height:40vh}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{min-width:0;max-width:100%;position:relative;top:0}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{flex-wrap:wrap;justify-content:center}}ajf-form-builder.ajf-form-builder-fill-height{flex:1 1 auto;height:100%;min-height:0}ajf-form-builder.ajf-form-builder-fill-height .ajf-formtree-container{flex:1 1 auto;min-height:0;align-items:stretch}ajf-form-builder.ajf-form-builder-fill-height mat-drawer-container.ajf-formtree-drawer-container{min-height:0;height:100%}ajf-form-builder.ajf-form-builder-fill-height mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{height:100%;box-sizing:border-box}ajf-form-builder.ajf-form-builder-fill-height .ajf-formtree-properties{position:static;top:auto;max-height:none}ajf-form-builder *{scroll-behavior:smooth}\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", "cdkDropListElementContainer"], 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", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { 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] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i7.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i5$1.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: i10.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i11.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i11.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i12.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i14.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], 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" }, { kind: "pipe", type: NodeTypeFilterPipe, name: "nodeTypeFilter" }, { kind: "pipe", type: NodeTypeGroupsPipe, name: "nodeTypeGroups" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3327
3468
|
}
|
|
3328
3469
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFormBuilder, decorators: [{
|
|
3329
3470
|
type: Component,
|
|
3330
|
-
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()\" aria-label=\"Toggle side navigation\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\">\n {{ 'Choices' | transloco }}\n </button>\n <button mat-button (click)=\"editStringIdentifier()\">\n {{ 'Identifier' | transloco }}\n </button>\n\n <div class=\"ajf-toolbar-group\">\n <button\n mat-icon-button\n aria-label=\"Collapse all slides\"\n matTooltip=\"Keep slides collapsed\"\n >\n <mat-icon>unfold_less</mat-icon>\n </button>\n\n <mat-slide-toggle\n color=\"primary\"\n (change)=\"expandToggle($event)\"\n aria-label=\"Toggle slide expansion\"\n ></mat-slide-toggle>\n\n <button\n mat-icon-button\n aria-label=\"Expand all slides\"\n matTooltip=\"Keep slides expanded\"\n >\n <mat-icon>unfold_more</mat-icon>\n </button>\n </div>\n\n <span class=\"ajf-spacer\"></span>\n\n <button mat-button (click)=\"downloadAsXlsform()\" [disabled]=\"xlsformDownloading\">\n {{ 'Download as XLSForm' | transloco }}\n </button>\n\n <mat-menu #choicesMenu=\"matMenu\">\n <button mat-menu-item (click)=\"createChoicesOrigin()\">\n {{ 'New..' | transloco }}\n </button>\n <ng-container *ngIf=\"choicesOrigins | async as cos\">\n <button\n mat-menu-item\n *ngFor=\"let choicesOrigin of cos\"\n (click)=\"editChoicesOrigin(choicesOrigin)\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name) | transloco }}\n </button>\n </ng-container>\n </mat-menu>\n</mat-toolbar>\n\n<div class=\"ajf-formtree-container\">\n <mat-drawer-container\n cdkDropListGroup\n class=\"ajf-formtree-drawer-container\"\n >\n <mat-drawer #leftSidenav position=\"start\" mode=\"over\" class=\"ajf-sidenav-modern\">\n <div class=\"ajf-drawer-header\">\n <mat-form-field class=\"ajf-search-field\" floatLabel=\"auto\">\n <mat-icon matPrefix>search</mat-icon>\n <input\n matInput\n type=\"text\"\n [(ngModel)]=\"searchTerm\"\n placeholder=\"{{ 'Search elements...' | transloco }}\"\n />\n <button\n *ngIf=\"searchTerm\"\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"searchTerm=''\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n \n <div\n #sourceDropList\n class=\"ajf-drawer-content\"\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 | nodeTypeFilter: searchTerm\"\n cdkDrag\n [cdkDragData]=\"nodeType\"\n (cdkDragStarted)=\"leftSidenav.close()\"\n [nodeType]=\"nodeType\"\n ></ajf-fb-node-type-entry>\n </div>\n </mat-drawer>\n \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\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;flex-direction:column;align-items:stretch;position:relative;min-height:300px}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{position:sticky;top:0;z-index:3;display:flex;align-items:center;padding:.5rem 1rem;box-shadow:0 2px 6px #00000014;border-bottom:1px solid rgba(0,0,0,.06);gap:.75rem}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar button[mat-icon-button] mat-icon{transition:transform .2s ease,color .2s ease}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar button[mat-icon-button]:hover mat-icon{transform:scale(1.1)}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar .ajf-toolbar-group{display:flex;align-items:center;gap:.5rem;border-radius:100vmax;padding:.25rem .5rem;background-color:#00000008}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar .ajf-spacer{flex:1 1 auto}ajf-form-builder .ajf-formtree-container{display:flex;flex-flow:row;align-items:flex-start;justify-content:space-between;gap:1.25rem;padding:1rem;box-sizing:border-box}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{flex:1 1 auto;min-height:47vh;border-radius:1rem;border:1px solid #ccc;overflow:hidden;transition:box-shadow .25s ease-in-out}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container mat-drawer{max-width:20%;min-width:240px;border-right:1px solid rgba(0,0,0,.08)}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{flex:1;padding:1rem;overflow-y:auto}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .mat-expansion-panel-body{padding:12px}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{flex:0 1 auto;max-width:24%;min-width:260px;max-height:70vh;overflow-y:auto;position:sticky;top:64px;border-radius:1rem;border:1px solid #ccc;padding:1rem;transition:box-shadow .3s ease,transform .3s ease}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties:hover{box-shadow:0 0 14px #0000001a}ajf-form-builder .ajf-sidenav-modern{display:flex;flex-direction:column;max-width:22%;min-width:220px;border-right:1px solid rgba(0,0,0,.08);box-shadow:inset -1px 0 #0000000d}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-header{position:sticky;top:0;z-index:2;padding:.5rem;border-bottom:1px solid rgba(0,0,0,.08)}ajf-form-builder .ajf-sidenav-modern .ajf-search-field{width:100%;margin:0}ajf-form-builder .ajf-sidenav-modern .ajf-search-field input{font-size:.9rem}ajf-form-builder .ajf-sidenav-modern .ajf-search-field mat-icon{color:#0000008a}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content{flex:1 1 auto;overflow-y:auto;padding:.5rem;display:flex;flex-direction:column;gap:.25rem;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.25) transparent}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar{width:6px}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar-thumb{background:#00000040;border-radius:4px}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar-thumb:hover{background:#0006}ajf-form-builder .ajf-sidenav-modern ajf-fb-node-type-entry{border-radius:8px;transition:background-color .15s ease,transform .15s ease;cursor:pointer}ajf-form-builder .ajf-sidenav-modern ajf-fb-node-type-entry:hover{background-color:#0000000d;transform:scale(1.02)}@media (max-height: 700px){ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content{padding:.25rem}}@media (max-width: 900px){ajf-form-builder .ajf-sidenav-modern{max-width:240px;min-width:180px}ajf-form-builder .ajf-sidenav-modern .ajf-search-field input{font-size:.8rem}}@media (max-width: 1024px){ajf-form-builder .ajf-formtree-container{flex-direction:column;gap:1rem}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{min-height:40vh;border-radius:.75rem}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{max-width:100%;position:relative;top:0;border-radius:.75rem}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{flex-wrap:wrap;justify-content:center}}ajf-form-builder *{scroll-behavior:smooth}\n"] }]
|
|
3471
|
+
args: [{ selector: 'ajf-form-builder', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { '[class.ajf-form-builder-fill-height]': 'fillHeight' }, template: "<mat-toolbar class=\"ajf-formbuilder-toolbar\">\n <button mat-icon-button (click)=\"leftSidenav.toggle()\" aria-label=\"Toggle side navigation\">\n <mat-icon>add_box</mat-icon>\n </button>\n <button mat-button [matMenuTriggerFor]=\"choicesMenu\">\n {{ 'Choices' | transloco }}\n </button>\n <button mat-button (click)=\"editStringIdentifier()\">\n {{ 'Default columns' | transloco }}\n </button>\n\n <div class=\"ajf-toolbar-group\">\n <button\n mat-icon-button\n aria-label=\"Collapse all slides\"\n matTooltip=\"Keep slides collapsed\"\n (click)=\"collapseAll()\"\n >\n <mat-icon>unfold_less</mat-icon>\n </button>\n\n <mat-slide-toggle\n color=\"primary\"\n [checked]=\"expandSlides\"\n (change)=\"expandToggle($event)\"\n aria-label=\"Toggle slide expansion\"\n ></mat-slide-toggle>\n\n <button\n mat-icon-button\n aria-label=\"Expand all slides\"\n matTooltip=\"Keep slides expanded\"\n (click)=\"expandAll()\"\n >\n <mat-icon>unfold_more</mat-icon>\n </button>\n </div>\n\n <span class=\"ajf-spacer\"></span>\n\n <button mat-button (click)=\"downloadAsXlsform()\" [disabled]=\"xlsformDownloading\">\n {{ 'Download as XLSForm' | transloco }}\n </button>\n\n <mat-menu #choicesMenu=\"matMenu\">\n <button mat-menu-item (click)=\"createChoicesOrigin()\">\n {{ 'New..' | transloco }}\n </button>\n <ng-container *ngIf=\"choicesOrigins | async as cos\">\n <button\n mat-menu-item\n *ngFor=\"let choicesOrigin of cos\"\n (click)=\"editChoicesOrigin(choicesOrigin)\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name) | transloco }}\n </button>\n </ng-container>\n </mat-menu>\n</mat-toolbar>\n\n<div class=\"ajf-formtree-container\">\n <mat-drawer-container\n cdkDropListGroup\n class=\"ajf-formtree-drawer-container\"\n >\n <mat-drawer #leftSidenav position=\"start\" mode=\"over\" class=\"ajf-sidenav-modern\">\n <div class=\"ajf-drawer-header\">\n <mat-form-field class=\"ajf-search-field\" floatLabel=\"auto\">\n <mat-icon matPrefix>search</mat-icon>\n <input\n matInput\n type=\"text\"\n [(ngModel)]=\"searchTerm\"\n placeholder=\"{{ 'Search elements...' | transloco }}\"\n />\n <button\n *ngIf=\"searchTerm\"\n matSuffix\n mat-icon-button\n aria-label=\"Clear\"\n (click)=\"searchTerm=''\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </div>\n \n <div\n #sourceDropList\n class=\"ajf-drawer-content\"\n cdkDropList\n [cdkDropListConnectedTo]=\"(connectedDropLists | async)!\"\n [cdkDropListEnterPredicate]=\"disableDrop\"\n [cdkDropListData]=\"nodeTypes\"\n >\n <ng-container *ngFor=\"let group of nodeTypes | nodeTypeFilter: searchTerm | nodeTypeGroups\">\n <div class=\"ajf-fb-category-header\" *ngIf=\"group.category\">\n {{ group.category | transloco }}\n </div>\n <ajf-fb-node-type-entry\n *ngFor=\"let nodeType of group.nodeTypes\"\n cdkDrag\n [cdkDragData]=\"nodeType\"\n (cdkDragStarted)=\"leftSidenav.close()\"\n [nodeType]=\"nodeType\"\n ></ajf-fb-node-type-entry>\n </ng-container>\n </div>\n </mat-drawer>\n \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\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;flex-direction:column;align-items:stretch;position:relative;min-height:300px}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{position:sticky;top:0;z-index:3;display:flex;align-items:center;height:48px;min-height:48px;padding:0 1rem;box-shadow:none;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);gap:.75rem}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar button[mat-icon-button] mat-icon{transition:transform .2s ease,color .2s ease}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar button[mat-icon-button]:hover mat-icon{transform:scale(1.1)}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar .ajf-toolbar-group{display:flex;align-items:center;gap:.5rem;border-radius:100vmax;padding:.25rem .5rem;background-color:color-mix(in srgb,currentColor 4%,transparent)}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar .ajf-spacer{flex:1 1 auto}ajf-form-builder .ajf-formtree-container{display:flex;flex-flow:row;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 22px;box-sizing:border-box}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{flex:1 1 auto;min-height:47vh;border:none;border-radius:0;background:transparent;overflow:hidden;transition:box-shadow .25s ease-in-out}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{flex:1;padding:4px 2px;overflow-y:auto}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer .mat-card-container .mat-mdc-card{border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:10px;box-shadow:0 1px 2px #0000000d}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer .mat-expansion-panel-header{background:color-mix(in srgb,currentColor 4%,transparent)}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer .mat-expansion-panel-header:hover{background:color-mix(in srgb,currentColor 6%,transparent)}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .ajf-designer .mat-expansion-panel-header-title{font-size:14.5px;font-weight:600}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container .mat-expansion-panel-body{padding:12px}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{flex:0 1 auto;min-width:312px;max-width:312px;max-height:70vh;overflow-y:auto;position:sticky;top:64px;border-radius:10px;border:1px solid color-mix(in srgb,currentColor 12%,transparent);padding:1rem;transition:box-shadow .3s ease,transform .3s ease}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties:hover{box-shadow:0 0 14px #0000001a}ajf-form-builder .ajf-sidenav-modern{display:flex;flex-direction:column;min-width:250px;max-width:250px;border-right:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:10px 0 0 10px}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-header{position:sticky;top:0;z-index:2;padding:.5rem;border-bottom:1px solid color-mix(in srgb,currentColor 8%,transparent)}ajf-form-builder .ajf-sidenav-modern .ajf-search-field{width:100%;margin:0}ajf-form-builder .ajf-sidenav-modern .ajf-search-field input{font-size:.9rem}ajf-form-builder .ajf-sidenav-modern .ajf-search-field mat-icon{color:color-mix(in srgb,currentColor 60%,transparent)}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content{flex:1 1 auto;overflow-y:auto;padding:.5rem;display:flex;flex-direction:column;gap:.25rem;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,currentColor 25%,transparent) transparent}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar{width:6px}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar-thumb{background:color-mix(in srgb,currentColor 25%,transparent);border-radius:4px}ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,currentColor 40%,transparent)}ajf-form-builder .ajf-sidenav-modern .ajf-fb-category-header{padding:14px 8px 4px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:color-mix(in srgb,currentColor 60%,transparent);-webkit-user-select:none;user-select:none;pointer-events:none}ajf-form-builder .ajf-sidenav-modern .ajf-fb-category-header:first-child{padding-top:4px}ajf-form-builder .ajf-sidenav-modern ajf-fb-node-type-entry{transition:background-color .15s ease,transform .15s ease}ajf-form-builder .ajf-sidenav-modern ajf-fb-node-type-entry:hover{background-color:color-mix(in srgb,currentColor 6%,transparent);transform:scale(1.02)}@media (max-height: 700px){ajf-form-builder .ajf-sidenav-modern .ajf-drawer-content{padding:.25rem}}@media (max-width: 900px){ajf-form-builder .ajf-sidenav-modern{max-width:240px;min-width:180px}ajf-form-builder .ajf-sidenav-modern .ajf-search-field input{font-size:.8rem}}@media (max-width: 1024px){ajf-form-builder .ajf-formtree-container{flex-direction:column;gap:1rem}ajf-form-builder .ajf-formtree-container mat-drawer-container.ajf-formtree-drawer-container{min-height:40vh}ajf-form-builder .ajf-formtree-container .ajf-formtree-properties{min-width:0;max-width:100%;position:relative;top:0}ajf-form-builder mat-toolbar.ajf-formbuilder-toolbar{flex-wrap:wrap;justify-content:center}}ajf-form-builder.ajf-form-builder-fill-height{flex:1 1 auto;height:100%;min-height:0}ajf-form-builder.ajf-form-builder-fill-height .ajf-formtree-container{flex:1 1 auto;min-height:0;align-items:stretch}ajf-form-builder.ajf-form-builder-fill-height mat-drawer-container.ajf-formtree-drawer-container{min-height:0;height:100%}ajf-form-builder.ajf-form-builder-fill-height mat-drawer-container.ajf-formtree-drawer-container .ajf-designer{height:100%;box-sizing:border-box}ajf-form-builder.ajf-form-builder-fill-height .ajf-formtree-properties{position:static;top:auto;max-height:none}ajf-form-builder *{scroll-behavior:smooth}\n"] }]
|
|
3331
3472
|
}], ctorParameters: () => [{ type: AjfFormBuilderService }, { type: i2.MatDialog }, { type: i0.ChangeDetectorRef }], propDecorators: { designerCont: [{
|
|
3332
3473
|
type: ViewChild,
|
|
3333
3474
|
args: ['designer', { static: true }]
|
|
3334
3475
|
}], form: [{
|
|
3335
3476
|
type: Input
|
|
3477
|
+
}], expandSlides: [{
|
|
3478
|
+
type: Input
|
|
3479
|
+
}], expandSlidesChange: [{
|
|
3480
|
+
type: Output
|
|
3481
|
+
}], fillHeight: [{
|
|
3482
|
+
type: Input
|
|
3336
3483
|
}], formBuilderValidation: [{
|
|
3337
3484
|
type: Output
|
|
3338
3485
|
}] } });
|
|
@@ -3372,7 +3519,8 @@ class AjfFormBuilderModule {
|
|
|
3372
3519
|
AjfFbValidationConditionEditorDialog,
|
|
3373
3520
|
AjfFbWarningConditionEditorDialog,
|
|
3374
3521
|
AjfFormBuilder,
|
|
3375
|
-
NodeTypeFilterPipe
|
|
3522
|
+
NodeTypeFilterPipe,
|
|
3523
|
+
NodeTypeGroupsPipe], imports: [AjfNodeIconModule,
|
|
3376
3524
|
CommonModule,
|
|
3377
3525
|
DragDropModule,
|
|
3378
3526
|
FormsModule,
|
|
@@ -3388,6 +3536,7 @@ class AjfFormBuilderModule {
|
|
|
3388
3536
|
MatListModule,
|
|
3389
3537
|
MatMenuModule,
|
|
3390
3538
|
MatSelectModule,
|
|
3539
|
+
NgxMatSelectSearchModule,
|
|
3391
3540
|
MatSidenavModule,
|
|
3392
3541
|
MatSliderModule,
|
|
3393
3542
|
MatTableModule,
|
|
@@ -3413,6 +3562,7 @@ class AjfFormBuilderModule {
|
|
|
3413
3562
|
MatListModule,
|
|
3414
3563
|
MatMenuModule,
|
|
3415
3564
|
MatSelectModule,
|
|
3565
|
+
NgxMatSelectSearchModule,
|
|
3416
3566
|
MatSidenavModule,
|
|
3417
3567
|
MatSliderModule,
|
|
3418
3568
|
MatTableModule,
|
|
@@ -3443,6 +3593,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3443
3593
|
MatListModule,
|
|
3444
3594
|
MatMenuModule,
|
|
3445
3595
|
MatSelectModule,
|
|
3596
|
+
NgxMatSelectSearchModule,
|
|
3446
3597
|
MatSidenavModule,
|
|
3447
3598
|
MatSliderModule,
|
|
3448
3599
|
MatTableModule,
|
|
@@ -3467,6 +3618,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3467
3618
|
AjfFbWarningConditionEditorDialog,
|
|
3468
3619
|
AjfFormBuilder,
|
|
3469
3620
|
NodeTypeFilterPipe,
|
|
3621
|
+
NodeTypeGroupsPipe,
|
|
3470
3622
|
],
|
|
3471
3623
|
exports: [AjfFormBuilder],
|
|
3472
3624
|
providers: [AjfFormBuilderService, AjfNodePropertiesNameMatchValidator],
|
|
@@ -3499,5 +3651,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3499
3651
|
* Generated bundle index. Do not edit.
|
|
3500
3652
|
*/
|
|
3501
3653
|
|
|
3502
|
-
export { AjfFormBuilder, AjfFormBuilderModule, AjfFormBuilderService, cleanDefaultValue, disableFieldDropPredicate, disableSlideDropPredicate, flattenNodes, onDropProcess };
|
|
3654
|
+
export { AjfFormBuilder, AjfFormBuilderModule, AjfFormBuilderNodeTypeCategories, AjfFormBuilderService, NodeTypeGroupsPipe, cleanDefaultValue, disableFieldDropPredicate, disableSlideDropPredicate, flattenNodes, onDropProcess };
|
|
3503
3655
|
//# sourceMappingURL=ajf-material-form-builder.mjs.map
|