@ajf/material 12.1.3 → 12.1.7
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/bundles/material-barcode.umd.js +3 -7
- package/bundles/material-barcode.umd.js.map +1 -1
- package/bundles/material-calendar.umd.js +5 -17
- package/bundles/material-calendar.umd.js.map +1 -1
- package/bundles/material-checkbox-group.umd.js +4 -14
- package/bundles/material-checkbox-group.umd.js.map +1 -1
- package/bundles/material-form-builder.umd.js +497 -483
- package/bundles/material-form-builder.umd.js.map +1 -1
- package/bundles/material-forms.umd.js +96 -64
- package/bundles/material-forms.umd.js.map +1 -1
- package/bundles/material-image.umd.js +3 -10
- package/bundles/material-image.umd.js.map +1 -1
- package/bundles/material-monaco-editor.umd.js +4 -7
- package/bundles/material-monaco-editor.umd.js.map +1 -1
- package/bundles/material-node-icon.umd.js +3 -10
- package/bundles/material-node-icon.umd.js.map +1 -1
- package/bundles/material-page-slider.umd.js +2 -7
- package/bundles/material-page-slider.umd.js.map +1 -1
- package/bundles/material-reports.umd.js +4 -6
- package/bundles/material-reports.umd.js.map +1 -1
- package/bundles/material-time.umd.js +4 -12
- package/bundles/material-time.umd.js.map +1 -1
- package/calendar/index.metadata.json +1 -1
- package/checkbox-group/index.metadata.json +1 -1
- package/esm2015/barcode/barcode-module.js +3 -7
- package/esm2015/barcode/barcode.js +3 -3
- package/esm2015/calendar/calendar-module.js +4 -14
- package/esm2015/calendar/calendar.js +4 -6
- package/esm2015/checkbox-group/checkbox-group-item.js +3 -3
- package/esm2015/checkbox-group/checkbox-group-module.js +4 -14
- package/esm2015/form-builder/branch-line.js +2 -2
- package/esm2015/form-builder/choices-origin-data-source.js +1 -1
- package/esm2015/form-builder/choices-origin-editor-dialog.js +7 -4
- package/esm2015/form-builder/choices-origin-editor.js +1 -1
- package/esm2015/form-builder/condition-editor-dialog.js +1 -1
- package/esm2015/form-builder/condition-editor.js +9 -8
- package/esm2015/form-builder/form-builder-module.js +29 -14
- package/esm2015/form-builder/form-builder-service.js +126 -125
- package/esm2015/form-builder/form-builder-utils.js +4 -3
- package/esm2015/form-builder/form-builder.js +30 -26
- package/esm2015/form-builder/node-entry.js +7 -5
- package/esm2015/form-builder/node-properties.js +297 -311
- package/esm2015/form-builder/node-type-entry.js +2 -2
- package/esm2015/form-builder/string-identifier-dialog.js +5 -7
- package/esm2015/form-builder/validation-condition-editor-dialog.js +1 -1
- package/esm2015/form-builder/warning-condition-editor-dialog.js +1 -1
- package/esm2015/forms/barcode-field.js +3 -3
- package/esm2015/forms/boolean-field.js +3 -3
- package/esm2015/forms/date-field.js +2 -2
- package/esm2015/forms/date-input-field.js +4 -4
- package/esm2015/forms/empty-field.js +3 -3
- package/esm2015/forms/field-service.js +42 -42
- package/esm2015/forms/field-warning-dialog.js +1 -1
- package/esm2015/forms/field.js +2 -2
- package/esm2015/forms/form.js +2 -2
- package/esm2015/forms/forms-module.js +55 -23
- package/esm2015/forms/input-field.js +2 -2
- package/esm2015/forms/multiple-choice-field.js +3 -3
- package/esm2015/forms/range-field.js +3 -3
- package/esm2015/forms/single-choice-field.js +3 -3
- package/esm2015/forms/table-field.js +3 -3
- package/esm2015/forms/text-field.js +2 -2
- package/esm2015/forms/time-field.js +3 -3
- package/esm2015/forms/video-url-field.js +2 -2
- package/esm2015/forms/warning-alert-service.js +1 -1
- package/esm2015/image/image-module.js +4 -11
- package/esm2015/image/image.js +2 -2
- package/esm2015/monaco-editor/autocomplete-singleton-model.js +3 -2
- package/esm2015/monaco-editor/editor-options-model.js +1 -1
- package/esm2015/monaco-editor/monaco-editor-module.js +3 -7
- package/esm2015/monaco-editor/monaco-editor.js +3 -3
- package/esm2015/node-icon/node-icon-module.js +4 -11
- package/esm2015/node-icon/node-icon.js +1 -1
- package/esm2015/page-slider/page-slider-module.js +3 -8
- package/esm2015/page-slider/page-slider.js +2 -2
- package/esm2015/reports/chart-widget.js +2 -2
- package/esm2015/reports/formula-widget.js +2 -2
- package/esm2015/reports/image-container-widget.js +2 -2
- package/esm2015/reports/image-widget.js +2 -2
- package/esm2015/reports/map-widget.js +2 -2
- package/esm2015/reports/page-break-widget.js +2 -2
- package/esm2015/reports/report.js +2 -2
- package/esm2015/reports/reports-module.js +3 -6
- package/esm2015/reports/table-widget.js +3 -3
- package/esm2015/reports/text-widget.js +2 -2
- package/esm2015/reports/widget.js +3 -2
- package/esm2015/time/time-module.js +4 -12
- package/esm2015/time/time.js +3 -3
- package/fesm2015/barcode.js +3 -7
- package/fesm2015/barcode.js.map +1 -1
- package/fesm2015/calendar.js +5 -17
- package/fesm2015/calendar.js.map +1 -1
- package/fesm2015/checkbox-group.js +4 -14
- package/fesm2015/checkbox-group.js.map +1 -1
- package/fesm2015/form-builder.js +494 -483
- package/fesm2015/form-builder.js.map +1 -1
- package/fesm2015/forms.js +96 -64
- package/fesm2015/forms.js.map +1 -1
- package/fesm2015/image.js +3 -10
- package/fesm2015/image.js.map +1 -1
- package/fesm2015/monaco-editor.js +5 -8
- package/fesm2015/monaco-editor.js.map +1 -1
- package/fesm2015/node-icon.js +3 -10
- package/fesm2015/node-icon.js.map +1 -1
- package/fesm2015/page-slider.js +2 -7
- package/fesm2015/page-slider.js.map +1 -1
- package/fesm2015/reports.js +4 -6
- package/fesm2015/reports.js.map +1 -1
- package/fesm2015/time.js +4 -12
- package/fesm2015/time.js.map +1 -1
- package/form-builder/index.metadata.json +1 -1
- package/forms/index.metadata.json +1 -1
- package/image/index.metadata.json +1 -1
- package/monaco-editor/index.metadata.json +1 -1
- package/node-icon/index.metadata.json +1 -1
- package/package.json +2 -4
- package/page-slider/index.metadata.json +1 -1
- package/reports/index.metadata.json +1 -1
- package/time/index.metadata.json +1 -1
- package/bundles/material-report-builder.umd.js +0 -5814
- package/bundles/material-report-builder.umd.js.map +0 -1
- package/esm2015/report-builder/column.js +0 -97
- package/esm2015/report-builder/condition-editor.js +0 -159
- package/esm2015/report-builder/content.js +0 -255
- package/esm2015/report-builder/custom-widget-dialog.js +0 -51
- package/esm2015/report-builder/custom-widget-toolbar-button.js +0 -70
- package/esm2015/report-builder/custom-widgets-toolbar.js +0 -124
- package/esm2015/report-builder/forms-analyzer-dialog.js +0 -315
- package/esm2015/report-builder/forms-analyzer.js +0 -264
- package/esm2015/report-builder/image-filter.js +0 -32
- package/esm2015/report-builder/image-group.js +0 -106
- package/esm2015/report-builder/index.js +0 -25
- package/esm2015/report-builder/models.js +0 -23
- package/esm2015/report-builder/operations.js +0 -23
- package/esm2015/report-builder/properties.js +0 -765
- package/esm2015/report-builder/public-api.js +0 -26
- package/esm2015/report-builder/quill-editor.js +0 -299
- package/esm2015/report-builder/renderer-widget.js +0 -238
- package/esm2015/report-builder/report-builder-drag-data.js +0 -23
- package/esm2015/report-builder/report-builder-module.js +0 -114
- package/esm2015/report-builder/report-builder-service.js +0 -1685
- package/esm2015/report-builder/report-builder.externs.js +0 -6
- package/esm2015/report-builder/report-builder.js +0 -69
- package/esm2015/report-builder/theme-color-dialog.js +0 -90
- package/esm2015/report-builder/theme-color.js +0 -215
- package/esm2015/report-builder/tokens.js +0 -24
- package/esm2015/report-builder/toolbar-dialog.js +0 -56
- package/esm2015/report-builder/toolbar.js +0 -90
- package/esm2015/report-builder/utils.js +0 -48
- package/esm2015/report-builder/widget-toolbar-button.js +0 -47
- package/esm2015/report-builder/widgets-row-buttons.js +0 -133
- package/esm2015/report-builder/widgets-toolbar.js +0 -79
- package/fesm2015/report-builder.js +0 -5332
- package/fesm2015/report-builder.js.map +0 -1
- package/report-builder/_report-builder.scss +0 -0
- package/report-builder/column.d.ts +0 -63
- package/report-builder/condition-editor.d.ts +0 -67
- package/report-builder/content.d.ts +0 -142
- package/report-builder/custom-widget-dialog.d.ts +0 -31
- package/report-builder/custom-widget-toolbar-button.d.ts +0 -45
- package/report-builder/custom-widgets-toolbar.d.ts +0 -71
- package/report-builder/forms-analyzer-dialog.d.ts +0 -91
- package/report-builder/forms-analyzer.d.ts +0 -102
- package/report-builder/image-filter.d.ts +0 -25
- package/report-builder/image-group.d.ts +0 -69
- package/report-builder/index.d.ts +0 -24
- package/report-builder/index.metadata.json +0 -1
- package/report-builder/models.d.ts +0 -43
- package/report-builder/operations.d.ts +0 -45
- package/report-builder/package.json +0 -9
- package/report-builder/properties.d.ts +0 -365
- package/report-builder/public-api.d.ts +0 -26
- package/report-builder/quill-editor.d.ts +0 -113
- package/report-builder/renderer-widget.d.ts +0 -80
- package/report-builder/report-builder-drag-data.d.ts +0 -32
- package/report-builder/report-builder-module.d.ts +0 -23
- package/report-builder/report-builder-service.d.ts +0 -722
- package/report-builder/report-builder.d.ts +0 -36
- package/report-builder/theme-color-dialog.d.ts +0 -42
- package/report-builder/theme-color.d.ts +0 -108
- package/report-builder/tokens.d.ts +0 -24
- package/report-builder/toolbar-dialog.d.ts +0 -30
- package/report-builder/toolbar.d.ts +0 -48
- package/report-builder/utils.d.ts +0 -29
- package/report-builder/widget-toolbar-button.d.ts +0 -28
- package/report-builder/widgets-row-buttons.d.ts +0 -57
- package/report-builder/widgets-toolbar.d.ts +0 -44
|
@@ -533,7 +533,8 @@
|
|
|
533
533
|
}
|
|
534
534
|
function buildFormBuilderNodesSubtree(nodes, parent, ignoreConditionalBranches) {
|
|
535
535
|
if (ignoreConditionalBranches === void 0) { ignoreConditionalBranches = false; }
|
|
536
|
-
var entries = nodes
|
|
536
|
+
var entries = nodes
|
|
537
|
+
.filter(function (n) { return n.parent === parent.id; })
|
|
537
538
|
.sort(function (n1, n2) { return n1.parentNode - n2.parentNode; })
|
|
538
539
|
.map(function (n) {
|
|
539
540
|
var children = buildFormBuilderNodesSubtree(nodes, n);
|
|
@@ -543,7 +544,7 @@
|
|
|
543
544
|
return {
|
|
544
545
|
node: n,
|
|
545
546
|
children: children,
|
|
546
|
-
content: buildFormBuilderNodesContent(nodes, n)
|
|
547
|
+
content: buildFormBuilderNodesContent(nodes, n),
|
|
547
548
|
};
|
|
548
549
|
});
|
|
549
550
|
if (!ignoreConditionalBranches) {
|
|
@@ -573,9 +574,9 @@
|
|
|
573
574
|
}
|
|
574
575
|
function getDescendants(flatNodes, parentNode, branch) {
|
|
575
576
|
if (branch === void 0) { branch = null; }
|
|
576
|
-
return branch != null
|
|
577
|
-
flatNodes.filter(function (n) { return n.parent === parentNode.id && n.parentNode === branch; })
|
|
578
|
-
flatNodes.filter(function (n) { return n.parent === parentNode.id; });
|
|
577
|
+
return branch != null
|
|
578
|
+
? flatNodes.filter(function (n) { return n.parent === parentNode.id && n.parentNode === branch; })
|
|
579
|
+
: flatNodes.filter(function (n) { return n.parent === parentNode.id; });
|
|
579
580
|
}
|
|
580
581
|
function removeNodes(nodes, ids) {
|
|
581
582
|
var len = nodes.length;
|
|
@@ -608,74 +609,74 @@
|
|
|
608
609
|
label: 'Slide',
|
|
609
610
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-slide' },
|
|
610
611
|
nodeType: { node: forms.AjfNodeType.AjfSlide },
|
|
611
|
-
isSlide: true
|
|
612
|
+
isSlide: true,
|
|
612
613
|
},
|
|
613
614
|
{
|
|
614
615
|
label: 'Repeating slide',
|
|
615
616
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-repeatingslide' },
|
|
616
617
|
nodeType: { node: forms.AjfNodeType.AjfRepeatingSlide },
|
|
617
|
-
isSlide: true
|
|
618
|
+
isSlide: true,
|
|
618
619
|
},
|
|
619
620
|
{
|
|
620
621
|
label: 'String',
|
|
621
622
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-string' },
|
|
622
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.String }
|
|
623
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.String },
|
|
623
624
|
},
|
|
624
625
|
{
|
|
625
626
|
label: 'Text',
|
|
626
627
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-text' },
|
|
627
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Text }
|
|
628
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Text },
|
|
628
629
|
},
|
|
629
630
|
{
|
|
630
631
|
label: 'Number',
|
|
631
632
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-number' },
|
|
632
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Number }
|
|
633
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Number },
|
|
633
634
|
},
|
|
634
635
|
{
|
|
635
636
|
label: 'Boolean',
|
|
636
637
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-boolean' },
|
|
637
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Boolean }
|
|
638
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Boolean },
|
|
638
639
|
},
|
|
639
640
|
{
|
|
640
641
|
label: 'Single choice',
|
|
641
642
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-singlechoice' },
|
|
642
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.SingleChoice }
|
|
643
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.SingleChoice },
|
|
643
644
|
},
|
|
644
645
|
{
|
|
645
646
|
label: 'Multiple choice',
|
|
646
647
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-multiplechoice' },
|
|
647
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.MultipleChoice }
|
|
648
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.MultipleChoice },
|
|
648
649
|
},
|
|
649
650
|
{
|
|
650
651
|
label: 'Formula',
|
|
651
652
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-formula' },
|
|
652
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Formula }
|
|
653
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Formula },
|
|
653
654
|
},
|
|
654
655
|
{
|
|
655
656
|
label: 'Date',
|
|
656
657
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-date' },
|
|
657
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Date }
|
|
658
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Date },
|
|
658
659
|
},
|
|
659
660
|
{
|
|
660
661
|
label: 'Date input',
|
|
661
662
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-dateinput' },
|
|
662
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.DateInput }
|
|
663
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.DateInput },
|
|
663
664
|
},
|
|
664
665
|
{
|
|
665
666
|
label: 'Time',
|
|
666
667
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-time' },
|
|
667
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Time }
|
|
668
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Time },
|
|
668
669
|
},
|
|
669
670
|
{
|
|
670
671
|
label: 'Table',
|
|
671
672
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-table' },
|
|
672
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Table }
|
|
673
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Table },
|
|
673
674
|
},
|
|
674
675
|
{
|
|
675
676
|
label: 'Range',
|
|
676
677
|
icon: { fontSet: 'ajf-icon', fontIcon: 'field-range' },
|
|
677
|
-
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Range }
|
|
678
|
-
}
|
|
678
|
+
nodeType: { node: forms.AjfNodeType.AjfField, field: forms.AjfFieldType.Range },
|
|
679
|
+
},
|
|
679
680
|
];
|
|
680
681
|
this._form = new rxjs.BehaviorSubject(null);
|
|
681
682
|
this._formObs = this._form;
|
|
@@ -684,11 +685,14 @@
|
|
|
684
685
|
*/
|
|
685
686
|
this._connectedDropLists = new rxjs.BehaviorSubject([]);
|
|
686
687
|
this._editedNodeEntry = new rxjs.BehaviorSubject(null);
|
|
687
|
-
this._editedNodeEntryObs = this
|
|
688
|
+
this._editedNodeEntryObs = this
|
|
689
|
+
._editedNodeEntry;
|
|
688
690
|
this._editedCondition = new rxjs.BehaviorSubject(null);
|
|
689
|
-
this._editedConditionObs = this
|
|
691
|
+
this._editedConditionObs = this
|
|
692
|
+
._editedCondition;
|
|
690
693
|
this._editedChoicesOrigin = new rxjs.BehaviorSubject(null);
|
|
691
|
-
this._editedChoicesOriginObs = this
|
|
694
|
+
this._editedChoicesOriginObs = this
|
|
695
|
+
._editedChoicesOrigin;
|
|
692
696
|
this._beforeNodesUpdate = new core.EventEmitter();
|
|
693
697
|
this._beforeNodesUpdateObs = this._beforeNodesUpdate;
|
|
694
698
|
this._afterNodeUpdate = new core.EventEmitter();
|
|
@@ -903,9 +907,9 @@
|
|
|
903
907
|
}
|
|
904
908
|
this._beforeNodesUpdate.emit();
|
|
905
909
|
this._nodesUpdates.next(function (nodes) {
|
|
906
|
-
var cn = forms.isContainerNode(parent) && inContent
|
|
907
|
-
parent
|
|
908
|
-
getNodeContainer({ nodes: nodes }, parent);
|
|
910
|
+
var cn = forms.isContainerNode(parent) && inContent
|
|
911
|
+
? parent
|
|
912
|
+
: getNodeContainer({ nodes: nodes }, parent);
|
|
909
913
|
if (!isFieldNode) {
|
|
910
914
|
var newNodes = nodes.slice(0);
|
|
911
915
|
newNodes.splice(insertInIndex, 0, node);
|
|
@@ -940,10 +944,12 @@
|
|
|
940
944
|
};
|
|
941
945
|
AjfFormBuilderService.prototype.getCurrentForm = function () {
|
|
942
946
|
return rxjs.combineLatest([
|
|
943
|
-
this.form,
|
|
944
|
-
this.
|
|
945
|
-
|
|
946
|
-
.
|
|
947
|
+
this.form,
|
|
948
|
+
this._nodesWithoutChoiceOrigins,
|
|
949
|
+
this.attachmentsOrigins,
|
|
950
|
+
this.choicesOrigins,
|
|
951
|
+
this.stringIdentifier,
|
|
952
|
+
]).pipe(operators.filter(function (_b) {
|
|
947
953
|
var _c = __read(_b, 1), form = _c[0];
|
|
948
954
|
return form != null;
|
|
949
955
|
}), operators.map(function (_b) {
|
|
@@ -1005,7 +1011,7 @@
|
|
|
1005
1011
|
node: rootNode,
|
|
1006
1012
|
container: null,
|
|
1007
1013
|
children: buildFormBuilderNodesSubtree(nodes, rootNode),
|
|
1008
|
-
content: buildFormBuilderNodesContent(nodes, rootNode)
|
|
1014
|
+
content: buildFormBuilderNodesContent(nodes, rootNode),
|
|
1009
1015
|
});
|
|
1010
1016
|
return tree;
|
|
1011
1017
|
}
|
|
@@ -1042,25 +1048,24 @@
|
|
|
1042
1048
|
return form != null && form.nodes != null ? form.nodes.slice(0) : [];
|
|
1043
1049
|
});
|
|
1044
1050
|
_this._attachmentsOriginsUpdates.next(function (_attachmentsOrigins) {
|
|
1045
|
-
return form != null && form.attachmentsOrigins != null
|
|
1046
|
-
form.attachmentsOrigins.slice(0)
|
|
1047
|
-
[];
|
|
1051
|
+
return form != null && form.attachmentsOrigins != null
|
|
1052
|
+
? form.attachmentsOrigins.slice(0)
|
|
1053
|
+
: [];
|
|
1048
1054
|
});
|
|
1049
1055
|
_this._choicesOriginsUpdates.next(function (_choicesOrigins) {
|
|
1050
1056
|
return form != null && form.choicesOrigins != null ? form.choicesOrigins.slice(0) : [];
|
|
1051
1057
|
});
|
|
1052
1058
|
_this._stringIdentifierUpdates.next(function (_) {
|
|
1053
|
-
return form != null && form.stringIdentifier != null
|
|
1054
|
-
|
|
1059
|
+
return form != null && form.stringIdentifier != null
|
|
1060
|
+
? form.stringIdentifier.slice(0)
|
|
1061
|
+
: [];
|
|
1055
1062
|
});
|
|
1056
1063
|
});
|
|
1057
1064
|
};
|
|
1058
1065
|
AjfFormBuilderService.prototype._initChoicesOriginsStreams = function () {
|
|
1059
|
-
this._choicesOrigins =
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
return op(choicesOrigins);
|
|
1063
|
-
}, []), operators.publishReplay(1), operators.refCount());
|
|
1066
|
+
this._choicesOrigins = (this._choicesOriginsUpdates).pipe(operators.scan(function (choicesOrigins, op) {
|
|
1067
|
+
return op(choicesOrigins);
|
|
1068
|
+
}, []), operators.publishReplay(1), operators.refCount());
|
|
1064
1069
|
};
|
|
1065
1070
|
AjfFormBuilderService.prototype._initAttachmentsOriginsStreams = function () {
|
|
1066
1071
|
this._attachmentsOrigins = this._attachmentsOriginsUpdates.pipe(operators.scan(function (attachmentsOrigins, op) {
|
|
@@ -1074,27 +1079,25 @@
|
|
|
1074
1079
|
};
|
|
1075
1080
|
AjfFormBuilderService.prototype._initNodesStreams = function () {
|
|
1076
1081
|
var _this = this;
|
|
1077
|
-
this._nodes = this._nodesUpdates
|
|
1078
|
-
.pipe(operators.scan(function (nodes, op) {
|
|
1082
|
+
this._nodes = this._nodesUpdates.pipe(operators.scan(function (nodes, op) {
|
|
1079
1083
|
return op(nodes);
|
|
1080
1084
|
}, []), operators.publishReplay(1), operators.refCount());
|
|
1081
|
-
this._nodesWithoutChoiceOrigins =
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
delete fwc.choices;
|
|
1088
|
-
}
|
|
1089
|
-
if (fwc && fwc.choicesOrigin) {
|
|
1090
|
-
delete fwc.choicesOrigin;
|
|
1091
|
-
}
|
|
1092
|
-
return fwc;
|
|
1085
|
+
this._nodesWithoutChoiceOrigins = this._nodes.pipe(operators.map(function (slides) { return slides.map(function (slide) {
|
|
1086
|
+
slide.nodes = slide.nodes.map(function (node) {
|
|
1087
|
+
if (forms.isFieldWithChoices(node)) {
|
|
1088
|
+
var fwc = utils.deepCopy(node);
|
|
1089
|
+
if (fwc && fwc.choices) {
|
|
1090
|
+
delete fwc.choices;
|
|
1093
1091
|
}
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1092
|
+
if (fwc && fwc.choicesOrigin) {
|
|
1093
|
+
delete fwc.choicesOrigin;
|
|
1094
|
+
}
|
|
1095
|
+
return fwc;
|
|
1096
|
+
}
|
|
1097
|
+
return node;
|
|
1098
|
+
});
|
|
1099
|
+
return slide;
|
|
1100
|
+
}); }));
|
|
1098
1101
|
this._flatNodes = this._nodes.pipe(operators.map(function (nodes) { return flattenNodes(nodes); }), operators.publishReplay(1), operators.refCount());
|
|
1099
1102
|
this._flatFields = this._flatNodes.pipe(operators.map(function (nodes) { return nodes.filter(function (n) { return !forms.isContainerNode(n); }); }), operators.publishReplay(1), operators.refCount());
|
|
1100
1103
|
this._nodeEntriesTree = this._nodes.pipe(operators.map(function (nodes) { return _this._buildFormBuilderNodesTree(nodes); }), operators.publishReplay(1), operators.refCount());
|
|
@@ -1114,19 +1117,22 @@
|
|
|
1114
1117
|
node.id = nodeEntry.node.id;
|
|
1115
1118
|
node.name = properties.name;
|
|
1116
1119
|
node.label = properties.label;
|
|
1117
|
-
node.visibility =
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
+
node.visibility =
|
|
1121
|
+
properties.visibility != null
|
|
1122
|
+
? models.createCondition({ condition: properties.visibility })
|
|
1123
|
+
: null;
|
|
1120
1124
|
var oldConditionalBranches = node.conditionalBranches.length;
|
|
1121
|
-
node.conditionalBranches =
|
|
1122
|
-
properties.conditionalBranches
|
|
1123
|
-
|
|
1125
|
+
node.conditionalBranches =
|
|
1126
|
+
properties.conditionalBranches != null
|
|
1127
|
+
? properties.conditionalBranches.map(function (condition) { return models.createCondition({ condition: condition }); })
|
|
1128
|
+
: [models.alwaysCondition()];
|
|
1124
1129
|
var newConditionalBranches = node.conditionalBranches.length;
|
|
1125
1130
|
if (forms.isRepeatingContainerNode(node)) {
|
|
1126
1131
|
var repNode = node;
|
|
1127
|
-
repNode.formulaReps =
|
|
1128
|
-
|
|
1129
|
-
|
|
1132
|
+
repNode.formulaReps =
|
|
1133
|
+
properties.formulaReps != null
|
|
1134
|
+
? models.createFormula({ formula: properties.formulaReps })
|
|
1135
|
+
: undefined;
|
|
1130
1136
|
repNode.minReps = properties.minReps;
|
|
1131
1137
|
repNode.maxReps = properties.maxReps;
|
|
1132
1138
|
}
|
|
@@ -1134,9 +1140,8 @@
|
|
|
1134
1140
|
var field = node;
|
|
1135
1141
|
field.description = properties.description;
|
|
1136
1142
|
field.defaultValue = properties.defaultValue;
|
|
1137
|
-
field.formula =
|
|
1138
|
-
models.createFormula({ formula: properties.formula }) :
|
|
1139
|
-
undefined;
|
|
1143
|
+
field.formula =
|
|
1144
|
+
properties.formula != null ? models.createFormula({ formula: properties.formula }) : undefined;
|
|
1140
1145
|
var forceValue = properties.value;
|
|
1141
1146
|
var notEmpty = properties.notEmpty;
|
|
1142
1147
|
var validationConditions = properties.validationConditions;
|
|
@@ -1156,25 +1161,24 @@
|
|
|
1156
1161
|
if (isNaN(maxDigits)) {
|
|
1157
1162
|
maxDigits = null;
|
|
1158
1163
|
}
|
|
1159
|
-
if (forceValue != null ||
|
|
1164
|
+
if (forceValue != null ||
|
|
1165
|
+
notEmpty != null ||
|
|
1160
1166
|
(validationConditions != null && validationConditions.length > 0) ||
|
|
1161
|
-
minValue != null ||
|
|
1167
|
+
minValue != null ||
|
|
1168
|
+
maxValue != null ||
|
|
1169
|
+
minDigits != null ||
|
|
1162
1170
|
maxDigits != null) {
|
|
1163
1171
|
var validation = field.validation || forms.createValidationGroup({});
|
|
1164
1172
|
validation.forceValue = forceValue;
|
|
1165
1173
|
validation.notEmpty = notEmpty ? forms.notEmptyValidation() : undefined;
|
|
1166
1174
|
validation.minValue = minValue != null ? forms.minValidation(minValue) : undefined;
|
|
1167
1175
|
validation.maxValue = maxValue != null ? forms.maxValidation(maxValue) : undefined;
|
|
1168
|
-
validation.minDigits =
|
|
1169
|
-
|
|
1170
|
-
validation.
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
[]).map(function (c) { return forms.createValidation({
|
|
1175
|
-
condition: c.condition,
|
|
1176
|
-
errorMessage: c.errorMessage
|
|
1177
|
-
}); });
|
|
1176
|
+
validation.minDigits = minDigits != null ? forms.minDigitsValidation(minDigits) : undefined;
|
|
1177
|
+
validation.maxDigits = maxDigits != null ? forms.maxDigitsValidation(maxDigits) : undefined;
|
|
1178
|
+
validation.conditions = (validationConditions || []).map(function (c) { return forms.createValidation({
|
|
1179
|
+
condition: c.condition,
|
|
1180
|
+
errorMessage: c.errorMessage,
|
|
1181
|
+
}); });
|
|
1178
1182
|
field.validation = validation;
|
|
1179
1183
|
}
|
|
1180
1184
|
else {
|
|
@@ -1186,20 +1190,19 @@
|
|
|
1186
1190
|
(warningConditions != null && warningConditions.length > 0)) {
|
|
1187
1191
|
var warning = field.warning || forms.createWarningGroup({});
|
|
1188
1192
|
warning.notEmpty = notEmptyWarn ? forms.notEmptyWarning() : undefined;
|
|
1189
|
-
warning.conditions =
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
warningMessage: w.warningMessage
|
|
1194
|
-
}); });
|
|
1193
|
+
warning.conditions = (warningConditions || []).map(function (w) { return forms.createWarning({
|
|
1194
|
+
condition: w.condition,
|
|
1195
|
+
warningMessage: w.warningMessage,
|
|
1196
|
+
}); });
|
|
1195
1197
|
field.warning = warning;
|
|
1196
1198
|
}
|
|
1197
1199
|
else {
|
|
1198
1200
|
field.warning = undefined;
|
|
1199
1201
|
}
|
|
1200
|
-
field.nextSlideCondition =
|
|
1201
|
-
|
|
1202
|
-
|
|
1202
|
+
field.nextSlideCondition =
|
|
1203
|
+
properties.nextSlideCondition != null
|
|
1204
|
+
? models.createCondition({ condition: properties.nextSlideCondition })
|
|
1205
|
+
: undefined;
|
|
1203
1206
|
field.size = properties.size;
|
|
1204
1207
|
field.defaultValue = properties.defaultValue;
|
|
1205
1208
|
if (forms.isFieldWithChoices(field)) {
|
|
@@ -1207,8 +1210,7 @@
|
|
|
1207
1210
|
fwc.choicesOriginRef = properties.choicesOriginRef;
|
|
1208
1211
|
fwc.forceExpanded = properties.forceExpanded;
|
|
1209
1212
|
fwc.forceNarrow = properties.forceNarrow;
|
|
1210
|
-
fwc.triggerConditions = (properties.triggerConditions ||
|
|
1211
|
-
[]).map(function (t) { return models.createCondition({ condition: t }); });
|
|
1213
|
+
fwc.triggerConditions = (properties.triggerConditions || []).map(function (t) { return models.createCondition({ condition: t }); });
|
|
1212
1214
|
}
|
|
1213
1215
|
}
|
|
1214
1216
|
_this._editedNodeEntry.next(null);
|
|
@@ -1276,32 +1278,31 @@
|
|
|
1276
1278
|
AjfFormBuilderService.prototype._initMoveNode = function () {
|
|
1277
1279
|
var _this = this;
|
|
1278
1280
|
this._moveNodeSub.unsubscribe();
|
|
1279
|
-
this._moveNodeSub =
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
nodes = newNodes;
|
|
1296
|
-
}
|
|
1297
|
-
else {
|
|
1298
|
-
nodes = nodes.slice(0);
|
|
1299
|
-
}
|
|
1281
|
+
this._moveNodeSub = this._moveNodeEntryEvent
|
|
1282
|
+
.pipe(operators.map(function (moveEvent) {
|
|
1283
|
+
_this._beforeNodesUpdate.emit();
|
|
1284
|
+
return function (nodes) {
|
|
1285
|
+
var nodeEntry = moveEvent.nodeEntry;
|
|
1286
|
+
var node = nodeEntry.node;
|
|
1287
|
+
var cn = getNodeContainer({ nodes: nodes }, node);
|
|
1288
|
+
var newNodes = nodes;
|
|
1289
|
+
if (cn != null) {
|
|
1290
|
+
var replaceNodes = cn.nodes === nodes;
|
|
1291
|
+
newNodes = cn.nodes;
|
|
1292
|
+
dragDrop.moveItemInArray(newNodes, moveEvent.fromIndex, moveEvent.toIndex);
|
|
1293
|
+
newNodes = _this._updateNodesList(cn.id, newNodes);
|
|
1294
|
+
cn.nodes = newNodes;
|
|
1295
|
+
if (replaceNodes) {
|
|
1296
|
+
nodes = newNodes;
|
|
1300
1297
|
}
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1298
|
+
else {
|
|
1299
|
+
nodes = nodes.slice(0);
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
return nodes;
|
|
1303
|
+
};
|
|
1304
|
+
}))
|
|
1305
|
+
.subscribe(this._nodesUpdates);
|
|
1305
1306
|
};
|
|
1306
1307
|
/**
|
|
1307
1308
|
* Updates the "id" and "parent" fields of a modified or rearranged list of nodes.
|
|
@@ -1315,8 +1316,8 @@
|
|
|
1315
1316
|
var contId = containerId != undefined ? containerId : 0;
|
|
1316
1317
|
for (var idx = 0; idx < nodesList.length; idx++) {
|
|
1317
1318
|
var currentNode = nodesList[idx];
|
|
1318
|
-
currentNode.id =
|
|
1319
|
-
currentNode.parent = idx == 0 ? contId :
|
|
1319
|
+
currentNode.id = contId * 1000 + idx + 1;
|
|
1320
|
+
currentNode.parent = idx == 0 ? contId : contId * 1000 + idx;
|
|
1320
1321
|
if (currentNode.nodeType == forms.AjfNodeType.AjfSlide ||
|
|
1321
1322
|
currentNode.nodeType == forms.AjfNodeType.AjfRepeatingSlide) {
|
|
1322
1323
|
var currentSlide = currentNode;
|
|
@@ -1358,8 +1359,7 @@
|
|
|
1358
1359
|
var AjfFbChoicesOriginEditorDialog = /** @class */ (function () {
|
|
1359
1360
|
function AjfFbChoicesOriginEditorDialog(_service) {
|
|
1360
1361
|
this._service = _service;
|
|
1361
|
-
this._choicesOrigin =
|
|
1362
|
-
this._service.editedChoicesOrigin.pipe(operators.filter(function (c) { return c != null; }), operators.map(function (c) { return c; }));
|
|
1362
|
+
this._choicesOrigin = this._service.editedChoicesOrigin.pipe(operators.filter(function (c) { return c != null; }), operators.map(function (c) { return c; }));
|
|
1363
1363
|
}
|
|
1364
1364
|
Object.defineProperty(AjfFbChoicesOriginEditorDialog.prototype, "choicesOrigin", {
|
|
1365
1365
|
get: function () {
|
|
@@ -1369,7 +1369,11 @@
|
|
|
1369
1369
|
configurable: true
|
|
1370
1370
|
});
|
|
1371
1371
|
AjfFbChoicesOriginEditorDialog.prototype.saveChoicesOrigin = function () {
|
|
1372
|
-
this._service.saveChoicesOrigin({
|
|
1372
|
+
this._service.saveChoicesOrigin({
|
|
1373
|
+
label: this.editor.label,
|
|
1374
|
+
name: this.editor.name,
|
|
1375
|
+
choices: this.editor.choicesArr,
|
|
1376
|
+
});
|
|
1373
1377
|
};
|
|
1374
1378
|
AjfFbChoicesOriginEditorDialog.prototype.cancelChoicesOriginEdit = function () {
|
|
1375
1379
|
this._service.cancelChoicesOriginEdit();
|
|
@@ -1445,12 +1449,15 @@
|
|
|
1445
1449
|
}
|
|
1446
1450
|
};
|
|
1447
1451
|
AjfFbConditionEditor.prototype.onEditorInit = function () {
|
|
1448
|
-
monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
|
|
1452
|
+
monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions({
|
|
1453
|
+
noSemanticValidation: false,
|
|
1454
|
+
noSyntaxValidation: false,
|
|
1455
|
+
});
|
|
1449
1456
|
monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
|
|
1450
1457
|
target: monaco.languages.typescript.ScriptTarget.ES2015,
|
|
1451
1458
|
allowNonTsExtensions: true,
|
|
1452
1459
|
allowJs: true,
|
|
1453
|
-
module: monaco.languages.typescript.ModuleKind.None
|
|
1460
|
+
module: monaco.languages.typescript.ModuleKind.None,
|
|
1454
1461
|
});
|
|
1455
1462
|
try {
|
|
1456
1463
|
monaco.languages.typescript.javascriptDefaults.addExtraLib('', 'condition-editor-variables.d.ts');
|
|
@@ -1482,16 +1489,14 @@
|
|
|
1482
1489
|
})
|
|
1483
1490
|
.join('\n');
|
|
1484
1491
|
}
|
|
1485
|
-
catch (e) {
|
|
1486
|
-
}
|
|
1492
|
+
catch (e) { }
|
|
1487
1493
|
};
|
|
1488
1494
|
AjfFbConditionEditor.prototype._updateFunctions = function () {
|
|
1489
1495
|
try {
|
|
1490
1496
|
monaco.languages.typescript.javascriptDefaults._extraLibs['condition-editor-functions.d.ts'] =
|
|
1491
1497
|
models.AjfExpressionUtils.UTIL_FUNCTIONS;
|
|
1492
1498
|
}
|
|
1493
|
-
catch (e) {
|
|
1494
|
-
}
|
|
1499
|
+
catch (e) { }
|
|
1495
1500
|
};
|
|
1496
1501
|
AjfFbConditionEditor.prototype._fieldVarType = function (fieldType) {
|
|
1497
1502
|
switch (fieldType) {
|
|
@@ -1634,8 +1639,9 @@
|
|
|
1634
1639
|
fbService.insertNode(itemData, null, 0, content, event.currentIndex);
|
|
1635
1640
|
return;
|
|
1636
1641
|
}
|
|
1637
|
-
var emptySlot = content
|
|
1638
|
-
nodeEntry
|
|
1642
|
+
var emptySlot = content
|
|
1643
|
+
? { parent: nodeEntry.node, parentNode: 0 }
|
|
1644
|
+
: nodeEntry;
|
|
1639
1645
|
fbService.insertNode(itemData, emptySlot.parent, emptySlot.parentNode, content, event.currentIndex);
|
|
1640
1646
|
return;
|
|
1641
1647
|
}
|
|
@@ -1673,7 +1679,8 @@
|
|
|
1673
1679
|
this._stringIdentifierSub = _service.stringIdentifier.subscribe(function (identifier) {
|
|
1674
1680
|
_this.dataSource.data = __spreadArray([], __read(identifier));
|
|
1675
1681
|
});
|
|
1676
|
-
this.fields$ = _service.flatFields.pipe(operators.map(function (fields) { return fields
|
|
1682
|
+
this.fields$ = _service.flatFields.pipe(operators.map(function (fields) { return fields
|
|
1683
|
+
.sort(function (f1, f2) { return f1.name.localeCompare(f2.name); })
|
|
1677
1684
|
.map(function (f) { return f.name; })
|
|
1678
1685
|
.filter(function (f) { return f.length > 0; }); }), operators.shareReplay(1));
|
|
1679
1686
|
}
|
|
@@ -1764,28 +1771,28 @@
|
|
|
1764
1771
|
this._nodeTypes = _service.availableNodeTypes;
|
|
1765
1772
|
this._nodeEntriesTree = _service.nodeEntriesTree;
|
|
1766
1773
|
this._choicesOrigins = _service.choicesOrigins;
|
|
1767
|
-
this._editConditionSub =
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
this._editChoicesOriginSub =
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1774
|
+
this._editConditionSub = this._service.editedCondition.subscribe(function (condition) {
|
|
1775
|
+
if (_this._editConditionDialog != null) {
|
|
1776
|
+
_this._editConditionDialog.close();
|
|
1777
|
+
_this._editConditionDialog = null;
|
|
1778
|
+
}
|
|
1779
|
+
if (condition != null) {
|
|
1780
|
+
_this._editConditionDialog = _this._dialog.open(AjfFbConditionEditorDialog, {
|
|
1781
|
+
disableClose: true,
|
|
1782
|
+
});
|
|
1783
|
+
}
|
|
1784
|
+
});
|
|
1785
|
+
this._editChoicesOriginSub = this._service.editedChoicesOrigin.subscribe(function (choicesOrigin) {
|
|
1786
|
+
if (_this._editChoicesOriginDialog != null) {
|
|
1787
|
+
_this._editChoicesOriginDialog.close();
|
|
1788
|
+
_this._editChoicesOriginDialog = null;
|
|
1789
|
+
}
|
|
1790
|
+
if (choicesOrigin != null) {
|
|
1791
|
+
_this._editChoicesOriginDialog = _this._dialog.open(AjfFbChoicesOriginEditorDialog, {
|
|
1792
|
+
disableClose: true,
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
});
|
|
1789
1796
|
this._beforeNodesUpdateSub = this._service.beforeNodesUpdate.subscribe(function () {
|
|
1790
1797
|
if (_this.designerCont == null) {
|
|
1791
1798
|
return;
|
|
@@ -1890,7 +1897,11 @@
|
|
|
1890
1897
|
this._stringIdentifierDialog.close();
|
|
1891
1898
|
this._stringIdentifierDialog = null;
|
|
1892
1899
|
}
|
|
1893
|
-
this._stringIdentifierDialog = this._dialog.open(AjfFbStringIdentifierDialogComponent, {
|
|
1900
|
+
this._stringIdentifierDialog = this._dialog.open(AjfFbStringIdentifierDialogComponent, {
|
|
1901
|
+
disableClose: true,
|
|
1902
|
+
width: '60%',
|
|
1903
|
+
height: '60%',
|
|
1904
|
+
});
|
|
1894
1905
|
};
|
|
1895
1906
|
AjfFormBuilder.prototype.expandAll = function () {
|
|
1896
1907
|
this._globalExpanded = true;
|
|
@@ -2191,7 +2202,9 @@
|
|
|
2191
2202
|
};
|
|
2192
2203
|
};
|
|
2193
2204
|
AjfFbNodeEntry.prototype._updateBranchHeights = function () {
|
|
2194
|
-
if (this.nodeEntry == null ||
|
|
2205
|
+
if (this.nodeEntry == null ||
|
|
2206
|
+
!this.isNodeEntry ||
|
|
2207
|
+
this.branchLines == null ||
|
|
2195
2208
|
this.childEntries == null) {
|
|
2196
2209
|
return;
|
|
2197
2210
|
}
|
|
@@ -2384,9 +2397,11 @@
|
|
|
2384
2397
|
this._dialog = _dialog;
|
|
2385
2398
|
this._fb = _fb;
|
|
2386
2399
|
this._fieldSizes = [
|
|
2387
|
-
{ label: 'Normal', value: 'normal' },
|
|
2388
|
-
{ label: '
|
|
2389
|
-
{ label: '
|
|
2400
|
+
{ label: 'Normal', value: 'normal' },
|
|
2401
|
+
{ label: 'Small', value: 'small' },
|
|
2402
|
+
{ label: 'Smaller', value: 'smaller' },
|
|
2403
|
+
{ label: 'Tiny', value: 'tiny' },
|
|
2404
|
+
{ label: 'Mini', value: 'mini' },
|
|
2390
2405
|
];
|
|
2391
2406
|
this._choicesOrigins = [];
|
|
2392
2407
|
this._conditionalBranches = [];
|
|
@@ -2445,8 +2460,7 @@
|
|
|
2445
2460
|
this._saveEvt = new core.EventEmitter();
|
|
2446
2461
|
this._saveSub = rxjs.Subscription.EMPTY;
|
|
2447
2462
|
this._nodeEntry = _service.editedNodeEntry;
|
|
2448
|
-
this._choicesOriginsSub =
|
|
2449
|
-
_service.choicesOrigins.subscribe(function (c) { return _this._choicesOrigins = c || []; });
|
|
2463
|
+
this._choicesOriginsSub = _service.choicesOrigins.subscribe(function (c) { return (_this._choicesOrigins = c || []); });
|
|
2450
2464
|
this._enabled = this._nodeEntry.pipe(operators.map(function (n) { return n != null; }));
|
|
2451
2465
|
this._initForm();
|
|
2452
2466
|
this._initVisibilityEdit();
|
|
@@ -2727,7 +2741,7 @@
|
|
|
2727
2741
|
label: n.node.label,
|
|
2728
2742
|
visibilityOpt: [visibilityOpt, forms$1.Validators.required],
|
|
2729
2743
|
visibility: [visibility, forms$1.Validators.required],
|
|
2730
|
-
conditionalBranchesNum: n.node.conditionalBranches.length
|
|
2744
|
+
conditionalBranchesNum: n.node.conditionalBranches.length,
|
|
2731
2745
|
};
|
|
2732
2746
|
var validators = [];
|
|
2733
2747
|
if (forms.isRepeatingContainerNode(n.node)) {
|
|
@@ -2792,12 +2806,10 @@
|
|
|
2792
2806
|
maxValue = (numField.validation.maxValue.condition || '').replace('$value <= ', '');
|
|
2793
2807
|
}
|
|
2794
2808
|
if (numField.validation.minDigits != null) {
|
|
2795
|
-
minDigits = (numField.validation.minDigits.condition ||
|
|
2796
|
-
'').replace('$value.toString().length >= ', '');
|
|
2809
|
+
minDigits = (numField.validation.minDigits.condition || '').replace('$value.toString().length >= ', '');
|
|
2797
2810
|
}
|
|
2798
2811
|
if (numField.validation.maxDigits != null) {
|
|
2799
|
-
maxDigits = (numField.validation.maxDigits.condition ||
|
|
2800
|
-
'').replace('$value.toString().length <= ', '');
|
|
2812
|
+
maxDigits = (numField.validation.maxDigits.condition || '').replace('$value.toString().length <= ', '');
|
|
2801
2813
|
}
|
|
2802
2814
|
}
|
|
2803
2815
|
controls.minValue = minValue;
|
|
@@ -2811,9 +2823,8 @@
|
|
|
2811
2823
|
var fieldWithChoices = n.node;
|
|
2812
2824
|
var triggerConditions = (fieldWithChoices.triggerConditions || []).map(function (c) { return c.condition; });
|
|
2813
2825
|
controls.choicesOriginRef = fieldWithChoices.choicesOriginRef;
|
|
2814
|
-
controls.choicesFilter =
|
|
2815
|
-
fieldWithChoices.choicesFilter.formula :
|
|
2816
|
-
null;
|
|
2826
|
+
controls.choicesFilter =
|
|
2827
|
+
fieldWithChoices.choicesFilter != null ? fieldWithChoices.choicesFilter.formula : null;
|
|
2817
2828
|
controls.forceExpanded = fieldWithChoices.forceExpanded;
|
|
2818
2829
|
controls.forceNarrow = fieldWithChoices.forceNarrow;
|
|
2819
2830
|
controls.triggerConditions = triggerConditions;
|
|
@@ -2903,28 +2914,28 @@
|
|
|
2903
2914
|
var _this = this;
|
|
2904
2915
|
this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
2905
2916
|
this._cdr.markForCheck();
|
|
2906
|
-
this._editTriggerConditionSub =
|
|
2907
|
-
this.
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2917
|
+
this._editTriggerConditionSub = this._editTriggerConditionEvt
|
|
2918
|
+
.pipe(operators.withLatestFrom(this._propertiesForm))
|
|
2919
|
+
.subscribe(function (_a) {
|
|
2920
|
+
var _b = __read(_a, 2), vcIdx = _b[0], fg = _b[1];
|
|
2921
|
+
_this._destroyConditionDialog();
|
|
2922
|
+
if (vcIdx < 0 || vcIdx >= _this._triggerConditions.length || fg == null) {
|
|
2923
|
+
return;
|
|
2924
|
+
}
|
|
2925
|
+
_this._editConditionDialog = _this._dialog.open(AjfFbConditionEditorDialog);
|
|
2926
|
+
var cmp = _this._editConditionDialog.componentInstance;
|
|
2927
|
+
cmp.condition = _this._triggerConditions[vcIdx];
|
|
2928
|
+
_this._editConditionDialogSub = _this._editConditionDialog
|
|
2929
|
+
.afterClosed()
|
|
2930
|
+
.subscribe(function (cond) {
|
|
2931
|
+
if (cond !== void 0) {
|
|
2932
|
+
_this._triggerConditions[vcIdx] = cond;
|
|
2914
2933
|
}
|
|
2915
|
-
_this.
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
_this._editConditionDialogSub =
|
|
2919
|
-
_this._editConditionDialog.afterClosed().subscribe(function (cond) {
|
|
2920
|
-
if (cond !== void 0) {
|
|
2921
|
-
_this._triggerConditions[vcIdx] = cond;
|
|
2922
|
-
}
|
|
2923
|
-
_this._editConditionDialogSub.unsubscribe();
|
|
2924
|
-
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
2925
|
-
_this._cdr.markForCheck();
|
|
2926
|
-
});
|
|
2934
|
+
_this._editConditionDialogSub.unsubscribe();
|
|
2935
|
+
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
2936
|
+
_this._cdr.markForCheck();
|
|
2927
2937
|
});
|
|
2938
|
+
});
|
|
2928
2939
|
};
|
|
2929
2940
|
AjfFbNodeProperties.prototype._initRemoveWarningCondition = function () {
|
|
2930
2941
|
this._removeWarningConditionSub = this._removeWarningConditionEvt
|
|
@@ -2961,31 +2972,30 @@
|
|
|
2961
2972
|
};
|
|
2962
2973
|
AjfFbNodeProperties.prototype._initWarningConditionEdit = function () {
|
|
2963
2974
|
var _this = this;
|
|
2964
|
-
this._editWarningConditionSub =
|
|
2965
|
-
this.
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2975
|
+
this._editWarningConditionSub = this._editWarningConditionEvt
|
|
2976
|
+
.pipe(operators.withLatestFrom(this._propertiesForm))
|
|
2977
|
+
.subscribe(function (_a) {
|
|
2978
|
+
var _b = __read(_a, 2), vcIdx = _b[0], fg = _b[1];
|
|
2979
|
+
_this._destroyWarningConditionDialog();
|
|
2980
|
+
if (vcIdx < 0 || vcIdx >= _this._warningConditions.length || fg == null) {
|
|
2981
|
+
return;
|
|
2982
|
+
}
|
|
2983
|
+
_this._editWarningConditionDialog = _this._dialog.open(AjfFbWarningConditionEditorDialog);
|
|
2984
|
+
var cmp = _this._editWarningConditionDialog.componentInstance;
|
|
2985
|
+
var w = _this._warningConditions[vcIdx];
|
|
2986
|
+
cmp.condition = w.condition;
|
|
2987
|
+
cmp.warningMessage = w.warningMessage;
|
|
2988
|
+
_this._editWarningConditionDialogSub = _this._editWarningConditionDialog
|
|
2989
|
+
.afterClosed()
|
|
2990
|
+
.subscribe(function (cond) {
|
|
2991
|
+
if (cond !== void 0) {
|
|
2992
|
+
_this._warningConditions[vcIdx] = cond;
|
|
2972
2993
|
}
|
|
2973
|
-
_this.
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
var w = _this._warningConditions[vcIdx];
|
|
2977
|
-
cmp.condition = w.condition;
|
|
2978
|
-
cmp.warningMessage = w.warningMessage;
|
|
2979
|
-
_this._editWarningConditionDialogSub =
|
|
2980
|
-
_this._editWarningConditionDialog.afterClosed().subscribe(function (cond) {
|
|
2981
|
-
if (cond !== void 0) {
|
|
2982
|
-
_this._warningConditions[vcIdx] = cond;
|
|
2983
|
-
}
|
|
2984
|
-
_this._editWarningConditionDialogSub.unsubscribe();
|
|
2985
|
-
_this._editWarningConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
2986
|
-
_this._cdr.markForCheck();
|
|
2987
|
-
});
|
|
2994
|
+
_this._editWarningConditionDialogSub.unsubscribe();
|
|
2995
|
+
_this._editWarningConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
2996
|
+
_this._cdr.markForCheck();
|
|
2988
2997
|
});
|
|
2998
|
+
});
|
|
2989
2999
|
};
|
|
2990
3000
|
AjfFbNodeProperties.prototype._initRemoveValidationCondition = function () {
|
|
2991
3001
|
this._removeValidationConditionSub = this._removeValidationConditionEvt
|
|
@@ -3022,221 +3032,218 @@
|
|
|
3022
3032
|
};
|
|
3023
3033
|
AjfFbNodeProperties.prototype._initValidationConditionEdit = function () {
|
|
3024
3034
|
var _this = this;
|
|
3025
|
-
this._editValidationConditionSub =
|
|
3026
|
-
this.
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3035
|
+
this._editValidationConditionSub = this._editValidationConditionEvt
|
|
3036
|
+
.pipe(operators.withLatestFrom(this._propertiesForm))
|
|
3037
|
+
.subscribe(function (_a) {
|
|
3038
|
+
var _b = __read(_a, 2), vcIdx = _b[0], fg = _b[1];
|
|
3039
|
+
_this._destroyValidationConditionDialog();
|
|
3040
|
+
if (vcIdx < 0 || vcIdx >= _this._validationConditions.length || fg == null) {
|
|
3041
|
+
return;
|
|
3042
|
+
}
|
|
3043
|
+
_this._editValidationConditionDialog = _this._dialog.open(AjfFbValidationConditionEditorDialog);
|
|
3044
|
+
var cmp = _this._editValidationConditionDialog.componentInstance;
|
|
3045
|
+
var v = _this._validationConditions[vcIdx];
|
|
3046
|
+
cmp.condition = v.condition;
|
|
3047
|
+
cmp.errorMessage = v.errorMessage;
|
|
3048
|
+
_this._editValidationConditionDialogSub = _this._editValidationConditionDialog
|
|
3049
|
+
.afterClosed()
|
|
3050
|
+
.subscribe(function (cond) {
|
|
3051
|
+
if (cond !== void 0) {
|
|
3052
|
+
_this._validationConditions[vcIdx] = cond;
|
|
3033
3053
|
}
|
|
3034
|
-
_this.
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
var v = _this._validationConditions[vcIdx];
|
|
3038
|
-
cmp.condition = v.condition;
|
|
3039
|
-
cmp.errorMessage = v.errorMessage;
|
|
3040
|
-
_this._editValidationConditionDialogSub =
|
|
3041
|
-
_this._editValidationConditionDialog.afterClosed().subscribe(function (cond) {
|
|
3042
|
-
if (cond !== void 0) {
|
|
3043
|
-
_this._validationConditions[vcIdx] = cond;
|
|
3044
|
-
}
|
|
3045
|
-
_this._editValidationConditionDialogSub.unsubscribe();
|
|
3046
|
-
_this._editValidationConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3047
|
-
_this._cdr.markForCheck();
|
|
3048
|
-
});
|
|
3054
|
+
_this._editValidationConditionDialogSub.unsubscribe();
|
|
3055
|
+
_this._editValidationConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3056
|
+
_this._cdr.markForCheck();
|
|
3049
3057
|
});
|
|
3058
|
+
});
|
|
3050
3059
|
};
|
|
3051
3060
|
AjfFbNodeProperties.prototype._initForceValueEdit = function () {
|
|
3052
3061
|
var _this = this;
|
|
3053
|
-
this._editForceValueSub =
|
|
3054
|
-
this.
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3062
|
+
this._editForceValueSub = this._editForceValueEvt
|
|
3063
|
+
.pipe(operators.withLatestFrom(this._propertiesForm))
|
|
3064
|
+
.subscribe(function (_a) {
|
|
3065
|
+
var _b = __read(_a, 2), _ = _b[0], formGroup = _b[1];
|
|
3066
|
+
_this._destroyConditionDialog();
|
|
3067
|
+
if (formGroup == null) {
|
|
3068
|
+
return;
|
|
3069
|
+
}
|
|
3070
|
+
var fg = formGroup;
|
|
3071
|
+
var ctrl = fg.controls['forceValue'];
|
|
3072
|
+
_this._editConditionDialog = _this._dialog.open(AjfFbConditionEditorDialog);
|
|
3073
|
+
_this._editConditionDialog.componentInstance.condition = ctrl.value;
|
|
3074
|
+
_this._editConditionDialogSub = _this._editConditionDialog
|
|
3075
|
+
.afterClosed()
|
|
3076
|
+
.subscribe(function (cond) {
|
|
3077
|
+
if (cond !== void 0) {
|
|
3078
|
+
ctrl.setValue(cond);
|
|
3061
3079
|
}
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
_this.
|
|
3065
|
-
_this._editConditionDialog.componentInstance.condition = ctrl.value;
|
|
3066
|
-
_this._editConditionDialogSub =
|
|
3067
|
-
_this._editConditionDialog.afterClosed().subscribe(function (cond) {
|
|
3068
|
-
if (cond !== void 0) {
|
|
3069
|
-
ctrl.setValue(cond);
|
|
3070
|
-
}
|
|
3071
|
-
_this._editConditionDialogSub.unsubscribe();
|
|
3072
|
-
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3073
|
-
_this._cdr.markForCheck();
|
|
3074
|
-
});
|
|
3080
|
+
_this._editConditionDialogSub.unsubscribe();
|
|
3081
|
+
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3082
|
+
_this._cdr.markForCheck();
|
|
3075
3083
|
});
|
|
3084
|
+
});
|
|
3076
3085
|
};
|
|
3077
3086
|
AjfFbNodeProperties.prototype._initNextSlideConditionEdit = function () {
|
|
3078
3087
|
var _this = this;
|
|
3079
|
-
this._editNextSlideConditionSub =
|
|
3080
|
-
this.
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3088
|
+
this._editNextSlideConditionSub = this._editNextSlideConditionEvt
|
|
3089
|
+
.pipe(operators.withLatestFrom(this._propertiesForm))
|
|
3090
|
+
.subscribe(function (_a) {
|
|
3091
|
+
var _b = __read(_a, 2), _ = _b[0], formGroup = _b[1];
|
|
3092
|
+
_this._destroyConditionDialog();
|
|
3093
|
+
if (formGroup == null) {
|
|
3094
|
+
return;
|
|
3095
|
+
}
|
|
3096
|
+
var fg = formGroup;
|
|
3097
|
+
var ctrl = fg.controls['nextSlideCondition'];
|
|
3098
|
+
_this._editConditionDialog = _this._dialog.open(AjfFbConditionEditorDialog);
|
|
3099
|
+
_this._editConditionDialog.componentInstance.condition = ctrl.value;
|
|
3100
|
+
_this._editConditionDialogSub = _this._editConditionDialog
|
|
3101
|
+
.afterClosed()
|
|
3102
|
+
.subscribe(function (cond) {
|
|
3103
|
+
if (cond !== void 0) {
|
|
3104
|
+
ctrl.setValue(cond);
|
|
3087
3105
|
}
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
_this.
|
|
3091
|
-
_this._editConditionDialog.componentInstance.condition = ctrl.value;
|
|
3092
|
-
_this._editConditionDialogSub =
|
|
3093
|
-
_this._editConditionDialog.afterClosed().subscribe(function (cond) {
|
|
3094
|
-
if (cond !== void 0) {
|
|
3095
|
-
ctrl.setValue(cond);
|
|
3096
|
-
}
|
|
3097
|
-
_this._editConditionDialogSub.unsubscribe();
|
|
3098
|
-
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3099
|
-
_this._cdr.markForCheck();
|
|
3100
|
-
});
|
|
3106
|
+
_this._editConditionDialogSub.unsubscribe();
|
|
3107
|
+
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3108
|
+
_this._cdr.markForCheck();
|
|
3101
3109
|
});
|
|
3110
|
+
});
|
|
3102
3111
|
};
|
|
3103
3112
|
AjfFbNodeProperties.prototype._initFormulaEdit = function () {
|
|
3104
3113
|
var _this = this;
|
|
3105
3114
|
this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3106
3115
|
this._cdr.markForCheck();
|
|
3107
|
-
this._editFormulaSub =
|
|
3108
|
-
this.
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3116
|
+
this._editFormulaSub = this._editFormulaEvt
|
|
3117
|
+
.pipe(operators.withLatestFrom(this._propertiesForm))
|
|
3118
|
+
.subscribe(function (_a) {
|
|
3119
|
+
var _b = __read(_a, 2), _ = _b[0], formGroup = _b[1];
|
|
3120
|
+
_this._destroyConditionDialog();
|
|
3121
|
+
if (formGroup == null) {
|
|
3122
|
+
return;
|
|
3123
|
+
}
|
|
3124
|
+
var fg = formGroup;
|
|
3125
|
+
var ctrl = fg.controls['formula'];
|
|
3126
|
+
_this._editConditionDialog = _this._dialog.open(AjfFbConditionEditorDialog);
|
|
3127
|
+
_this._editConditionDialog.componentInstance.condition = ctrl.value;
|
|
3128
|
+
_this._editConditionDialogSub = _this._editConditionDialog
|
|
3129
|
+
.afterClosed()
|
|
3130
|
+
.subscribe(function (cond) {
|
|
3131
|
+
if (cond !== void 0) {
|
|
3132
|
+
ctrl.setValue(cond);
|
|
3115
3133
|
}
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
_this.
|
|
3119
|
-
_this._editConditionDialog.componentInstance.condition = ctrl.value;
|
|
3120
|
-
_this._editConditionDialogSub =
|
|
3121
|
-
_this._editConditionDialog.afterClosed().subscribe(function (cond) {
|
|
3122
|
-
if (cond !== void 0) {
|
|
3123
|
-
ctrl.setValue(cond);
|
|
3124
|
-
}
|
|
3125
|
-
_this._editConditionDialogSub.unsubscribe();
|
|
3126
|
-
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3127
|
-
_this._cdr.markForCheck();
|
|
3128
|
-
});
|
|
3134
|
+
_this._editConditionDialogSub.unsubscribe();
|
|
3135
|
+
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3136
|
+
_this._cdr.markForCheck();
|
|
3129
3137
|
});
|
|
3138
|
+
});
|
|
3130
3139
|
};
|
|
3131
3140
|
AjfFbNodeProperties.prototype._initFormulaRepsEdit = function () {
|
|
3132
3141
|
var _this = this;
|
|
3133
|
-
this._editFormulaRepsSub =
|
|
3134
|
-
this.
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3142
|
+
this._editFormulaRepsSub = this._editFormulaRepsEvt
|
|
3143
|
+
.pipe(operators.withLatestFrom(this._propertiesForm))
|
|
3144
|
+
.subscribe(function (_a) {
|
|
3145
|
+
var _b = __read(_a, 2), _ = _b[0], formGroup = _b[1];
|
|
3146
|
+
_this._destroyConditionDialog();
|
|
3147
|
+
if (formGroup == null) {
|
|
3148
|
+
return;
|
|
3149
|
+
}
|
|
3150
|
+
var fg = formGroup;
|
|
3151
|
+
var ctrl = fg.controls['formulaReps'];
|
|
3152
|
+
_this._editConditionDialog = _this._dialog.open(AjfFbConditionEditorDialog);
|
|
3153
|
+
_this._editConditionDialog.componentInstance.condition = ctrl.value;
|
|
3154
|
+
_this._editConditionDialogSub = _this._editConditionDialog
|
|
3155
|
+
.afterClosed()
|
|
3156
|
+
.subscribe(function (cond) {
|
|
3157
|
+
if (cond !== void 0) {
|
|
3158
|
+
ctrl.setValue(cond);
|
|
3141
3159
|
}
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
_this.
|
|
3145
|
-
_this._editConditionDialog.componentInstance.condition = ctrl.value;
|
|
3146
|
-
_this._editConditionDialogSub =
|
|
3147
|
-
_this._editConditionDialog.afterClosed().subscribe(function (cond) {
|
|
3148
|
-
if (cond !== void 0) {
|
|
3149
|
-
ctrl.setValue(cond);
|
|
3150
|
-
}
|
|
3151
|
-
_this._editConditionDialogSub.unsubscribe();
|
|
3152
|
-
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3153
|
-
_this._cdr.markForCheck();
|
|
3154
|
-
});
|
|
3160
|
+
_this._editConditionDialogSub.unsubscribe();
|
|
3161
|
+
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3162
|
+
_this._cdr.markForCheck();
|
|
3155
3163
|
});
|
|
3164
|
+
});
|
|
3156
3165
|
};
|
|
3157
3166
|
AjfFbNodeProperties.prototype._initChoicesFilterEdit = function () {
|
|
3158
3167
|
var _this = this;
|
|
3159
|
-
this._editChoicesFilterSub =
|
|
3160
|
-
this.
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3168
|
+
this._editChoicesFilterSub = this._editChoicesFilterEvt
|
|
3169
|
+
.pipe(operators.withLatestFrom(this._propertiesForm))
|
|
3170
|
+
.subscribe(function (_a) {
|
|
3171
|
+
var _b = __read(_a, 2), _ = _b[0], formGroup = _b[1];
|
|
3172
|
+
_this._destroyConditionDialog();
|
|
3173
|
+
if (formGroup == null) {
|
|
3174
|
+
return;
|
|
3175
|
+
}
|
|
3176
|
+
var fg = formGroup;
|
|
3177
|
+
var ctrl = fg.controls['choicesFilter'];
|
|
3178
|
+
_this._editConditionDialog = _this._dialog.open(AjfFbConditionEditorDialog);
|
|
3179
|
+
_this._editConditionDialog.componentInstance.condition = ctrl.value;
|
|
3180
|
+
_this._editConditionDialogSub = _this._editConditionDialog
|
|
3181
|
+
.afterClosed()
|
|
3182
|
+
.subscribe(function (cond) {
|
|
3183
|
+
if (cond !== void 0) {
|
|
3184
|
+
ctrl.setValue(cond);
|
|
3167
3185
|
}
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
_this.
|
|
3171
|
-
_this._editConditionDialog.componentInstance.condition = ctrl.value;
|
|
3172
|
-
_this._editConditionDialogSub =
|
|
3173
|
-
_this._editConditionDialog.afterClosed().subscribe(function (cond) {
|
|
3174
|
-
if (cond !== void 0) {
|
|
3175
|
-
ctrl.setValue(cond);
|
|
3176
|
-
}
|
|
3177
|
-
_this._editConditionDialogSub.unsubscribe();
|
|
3178
|
-
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3179
|
-
_this._cdr.markForCheck();
|
|
3180
|
-
});
|
|
3186
|
+
_this._editConditionDialogSub.unsubscribe();
|
|
3187
|
+
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3188
|
+
_this._cdr.markForCheck();
|
|
3181
3189
|
});
|
|
3190
|
+
});
|
|
3182
3191
|
};
|
|
3183
3192
|
AjfFbNodeProperties.prototype._initConditionalBranchEdit = function () {
|
|
3184
3193
|
var _this = this;
|
|
3185
|
-
this._editConditionalBranchSub =
|
|
3186
|
-
this.
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3194
|
+
this._editConditionalBranchSub = this._editConditionalBranchEvt
|
|
3195
|
+
.pipe(operators.withLatestFrom(this._propertiesForm))
|
|
3196
|
+
.subscribe(function (_a) {
|
|
3197
|
+
var _b = __read(_a, 2), cbIdx = _b[0], fg = _b[1];
|
|
3198
|
+
_this._destroyConditionDialog();
|
|
3199
|
+
if (cbIdx < 0 || cbIdx >= _this._conditionalBranches.length || fg == null) {
|
|
3200
|
+
return;
|
|
3201
|
+
}
|
|
3202
|
+
_this._editConditionDialog = _this._dialog.open(AjfFbConditionEditorDialog);
|
|
3203
|
+
_this._editConditionDialog.componentInstance.condition = _this._conditionalBranches[cbIdx];
|
|
3204
|
+
_this._editConditionDialogSub = _this._editConditionDialog
|
|
3205
|
+
.afterClosed()
|
|
3206
|
+
.subscribe(function (cond) {
|
|
3207
|
+
if (cond !== void 0) {
|
|
3208
|
+
_this._conditionalBranches[cbIdx] = cond;
|
|
3193
3209
|
}
|
|
3194
|
-
_this.
|
|
3195
|
-
_this.
|
|
3196
|
-
|
|
3197
|
-
_this._editConditionDialogSub =
|
|
3198
|
-
_this._editConditionDialog.afterClosed().subscribe(function (cond) {
|
|
3199
|
-
if (cond !== void 0) {
|
|
3200
|
-
_this._conditionalBranches[cbIdx] = cond;
|
|
3201
|
-
}
|
|
3202
|
-
_this._editConditionDialogSub.unsubscribe();
|
|
3203
|
-
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3204
|
-
_this._cdr.markForCheck();
|
|
3205
|
-
});
|
|
3210
|
+
_this._editConditionDialogSub.unsubscribe();
|
|
3211
|
+
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3212
|
+
_this._cdr.markForCheck();
|
|
3206
3213
|
});
|
|
3214
|
+
});
|
|
3207
3215
|
};
|
|
3208
3216
|
AjfFbNodeProperties.prototype._initVisibilityEdit = function () {
|
|
3209
3217
|
var _this = this;
|
|
3210
|
-
this._editVisibilitySub =
|
|
3211
|
-
this.
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
+
this._editVisibilitySub = this._editVisibilityEvt
|
|
3219
|
+
.pipe(operators.withLatestFrom(this._propertiesForm))
|
|
3220
|
+
.subscribe(function (_a) {
|
|
3221
|
+
var _b = __read(_a, 2), _ = _b[0], formGroup = _b[1];
|
|
3222
|
+
_this._destroyConditionDialog();
|
|
3223
|
+
if (formGroup == null) {
|
|
3224
|
+
return;
|
|
3225
|
+
}
|
|
3226
|
+
var fg = formGroup;
|
|
3227
|
+
var ctrl = fg.controls['visibility'];
|
|
3228
|
+
var condition = ctrl.value;
|
|
3229
|
+
_this._editConditionDialog = _this._dialog.open(AjfFbConditionEditorDialog);
|
|
3230
|
+
_this._editConditionDialog.componentInstance.condition = condition;
|
|
3231
|
+
_this._editConditionDialogSub = _this._editConditionDialog
|
|
3232
|
+
.afterClosed()
|
|
3233
|
+
.subscribe(function (cond) {
|
|
3234
|
+
if (cond !== void 0) {
|
|
3235
|
+
ctrl.setValue(cond);
|
|
3218
3236
|
}
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
_this._editConditionDialog = _this._dialog.open(AjfFbConditionEditorDialog);
|
|
3223
|
-
_this._editConditionDialog.componentInstance.condition = condition;
|
|
3224
|
-
_this._editConditionDialogSub =
|
|
3225
|
-
_this._editConditionDialog.afterClosed().subscribe(function (cond) {
|
|
3226
|
-
if (cond !== void 0) {
|
|
3227
|
-
ctrl.setValue(cond);
|
|
3228
|
-
}
|
|
3229
|
-
_this._editConditionDialogSub.unsubscribe();
|
|
3230
|
-
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3231
|
-
_this._cdr.markForCheck();
|
|
3232
|
-
});
|
|
3237
|
+
_this._editConditionDialogSub.unsubscribe();
|
|
3238
|
+
_this._editConditionDialogSub = rxjs.Subscription.EMPTY;
|
|
3239
|
+
_this._cdr.markForCheck();
|
|
3233
3240
|
});
|
|
3241
|
+
});
|
|
3234
3242
|
};
|
|
3235
3243
|
AjfFbNodeProperties.prototype._handleTriggerCondtionsChange = function (fg) {
|
|
3236
3244
|
var _this = this;
|
|
3237
3245
|
this._triggerConditionsSub = fg.valueChanges
|
|
3238
|
-
.pipe(operators.distinctUntilChanged(function (v1, v2) { return JSON.stringify(v1.triggerConditions) ===
|
|
3239
|
-
JSON.stringify(v2.triggerConditions); }))
|
|
3246
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return JSON.stringify(v1.triggerConditions) === JSON.stringify(v2.triggerConditions); }))
|
|
3240
3247
|
.subscribe(function (v) {
|
|
3241
3248
|
_this._triggerConditions = v.triggerConditions;
|
|
3242
3249
|
_this._cdr.markForCheck();
|
|
@@ -3245,8 +3252,7 @@
|
|
|
3245
3252
|
AjfFbNodeProperties.prototype._handleWarningCondtionsChange = function (fg) {
|
|
3246
3253
|
var _this = this;
|
|
3247
3254
|
this._warningConditionsSub = fg.valueChanges
|
|
3248
|
-
.pipe(operators.distinctUntilChanged(function (v1, v2) { return JSON.stringify(v1.warningConditions) ===
|
|
3249
|
-
JSON.stringify(v2.warningConditions); }))
|
|
3255
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return JSON.stringify(v1.warningConditions) === JSON.stringify(v2.warningConditions); }))
|
|
3250
3256
|
.subscribe(function (v) {
|
|
3251
3257
|
_this._warningConditions = v.warningConditions;
|
|
3252
3258
|
_this._cdr.markForCheck();
|
|
@@ -3254,111 +3260,104 @@
|
|
|
3254
3260
|
};
|
|
3255
3261
|
AjfFbNodeProperties.prototype._handleValidationCondtionsChange = function (fg) {
|
|
3256
3262
|
var _this = this;
|
|
3257
|
-
this._validationConditionsSub =
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
_this._cdr.markForCheck();
|
|
3264
|
-
});
|
|
3263
|
+
this._validationConditionsSub = fg.valueChanges
|
|
3264
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return JSON.stringify(v1.validationConditions) === JSON.stringify(v2.validationConditions); }))
|
|
3265
|
+
.subscribe(function (v) {
|
|
3266
|
+
_this._validationConditions = v.validationConditions;
|
|
3267
|
+
_this._cdr.markForCheck();
|
|
3268
|
+
});
|
|
3265
3269
|
};
|
|
3266
3270
|
AjfFbNodeProperties.prototype._handleForceValueChange = function (fg) {
|
|
3267
3271
|
var _this = this;
|
|
3268
|
-
this._forceValueSub =
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3272
|
+
this._forceValueSub = fg.valueChanges
|
|
3273
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return v1.forceValue === v2.forceValue; }))
|
|
3274
|
+
.subscribe(function (v) {
|
|
3275
|
+
_this._curForceValue = v.forceValue;
|
|
3276
|
+
_this._cdr.markForCheck();
|
|
3277
|
+
});
|
|
3274
3278
|
};
|
|
3275
3279
|
AjfFbNodeProperties.prototype._handleNextSlideConditionChange = function (fg) {
|
|
3276
3280
|
var _this = this;
|
|
3277
|
-
this._formulaSub =
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
_this._cdr.markForCheck();
|
|
3290
|
-
});
|
|
3281
|
+
this._formulaSub = fg.valueChanges
|
|
3282
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return v1.nextSlideCondition === v2.nextSlideCondition; }))
|
|
3283
|
+
.subscribe(function (v) {
|
|
3284
|
+
_this._nextSlideCondition = v.nextSlideCondition;
|
|
3285
|
+
_this._cdr.markForCheck();
|
|
3286
|
+
});
|
|
3287
|
+
this._formulaSub = fg.valueChanges
|
|
3288
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return v1.nextSlideCondition === v2.nextSlideCondition; }))
|
|
3289
|
+
.subscribe(function (v) {
|
|
3290
|
+
_this._nextSlideCondition = v.nextSlideCondition;
|
|
3291
|
+
_this._cdr.markForCheck();
|
|
3292
|
+
});
|
|
3291
3293
|
};
|
|
3292
3294
|
AjfFbNodeProperties.prototype._handleFormulaChange = function (fg) {
|
|
3293
3295
|
var _this = this;
|
|
3294
|
-
this._formulaSub =
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3296
|
+
this._formulaSub = fg.valueChanges
|
|
3297
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return v1.formula === v2.formula; }))
|
|
3298
|
+
.subscribe(function (v) {
|
|
3299
|
+
_this._curFormula = v.formula;
|
|
3300
|
+
_this._cdr.markForCheck();
|
|
3301
|
+
});
|
|
3300
3302
|
};
|
|
3301
3303
|
AjfFbNodeProperties.prototype._handleFormulaRepsChange = function (fg) {
|
|
3302
3304
|
var _this = this;
|
|
3303
|
-
this._formulaRepsSub =
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3305
|
+
this._formulaRepsSub = fg.valueChanges
|
|
3306
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return v1.formulaReps === v2.formulaReps; }))
|
|
3307
|
+
.subscribe(function (v) {
|
|
3308
|
+
_this._curFormulaReps = v.formulaReps;
|
|
3309
|
+
_this._cdr.markForCheck();
|
|
3310
|
+
});
|
|
3309
3311
|
};
|
|
3310
3312
|
AjfFbNodeProperties.prototype._handleChoicesFilterChange = function (fg) {
|
|
3311
3313
|
var _this = this;
|
|
3312
|
-
this._choicesFilterSub =
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
});
|
|
3314
|
+
this._choicesFilterSub = fg.valueChanges
|
|
3315
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return v1.choicesFilter === v2.choicesFilter; }))
|
|
3316
|
+
.subscribe(function (v) {
|
|
3317
|
+
_this._curChoicesFilter = v.choicesFilter;
|
|
3318
|
+
_this._cdr.markForCheck();
|
|
3319
|
+
});
|
|
3319
3320
|
};
|
|
3320
3321
|
AjfFbNodeProperties.prototype._handleConditionalBranchesChange = function (fg) {
|
|
3321
3322
|
var _this = this;
|
|
3322
|
-
this._conditionalBranchesSub =
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
newCbs.push(models.alwaysCondition().condition);
|
|
3332
|
-
}
|
|
3333
|
-
_this._conditionalBranches = _this._conditionalBranches.concat(newCbs);
|
|
3334
|
-
}
|
|
3335
|
-
else if (curCbNum > cbNum) {
|
|
3336
|
-
_this._conditionalBranches.splice(0, curCbNum - cbNum);
|
|
3323
|
+
this._conditionalBranchesSub = fg.valueChanges
|
|
3324
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return v1.conditionalBranchesNum === v2.conditionalBranchesNum; }))
|
|
3325
|
+
.subscribe(function (v) {
|
|
3326
|
+
var cbNum = v.conditionalBranchesNum;
|
|
3327
|
+
var curCbNum = _this._conditionalBranches.length;
|
|
3328
|
+
if (curCbNum < cbNum) {
|
|
3329
|
+
var newCbs = [];
|
|
3330
|
+
for (var i = curCbNum; i < cbNum; i++) {
|
|
3331
|
+
newCbs.push(models.alwaysCondition().condition);
|
|
3337
3332
|
}
|
|
3338
|
-
_this.
|
|
3339
|
-
}
|
|
3333
|
+
_this._conditionalBranches = _this._conditionalBranches.concat(newCbs);
|
|
3334
|
+
}
|
|
3335
|
+
else if (curCbNum > cbNum) {
|
|
3336
|
+
_this._conditionalBranches.splice(0, curCbNum - cbNum);
|
|
3337
|
+
}
|
|
3338
|
+
_this._cdr.markForCheck();
|
|
3339
|
+
});
|
|
3340
3340
|
};
|
|
3341
3341
|
AjfFbNodeProperties.prototype._handleVisibilityChange = function (fg) {
|
|
3342
3342
|
var _this = this;
|
|
3343
|
-
this._visibilitySub =
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
});
|
|
3343
|
+
this._visibilitySub = fg.valueChanges
|
|
3344
|
+
.pipe(operators.distinctUntilChanged(function (v1, v2) { return v1.visibilityOpt === v2.visibilityOpt; }))
|
|
3345
|
+
.subscribe(function (v) {
|
|
3346
|
+
var visibilityOpt = v.visibilityOpt;
|
|
3347
|
+
var newCondition;
|
|
3348
|
+
switch (visibilityOpt) {
|
|
3349
|
+
case 'always':
|
|
3350
|
+
newCondition = models.alwaysCondition().condition;
|
|
3351
|
+
break;
|
|
3352
|
+
case 'never':
|
|
3353
|
+
newCondition = models.neverCondition().condition;
|
|
3354
|
+
break;
|
|
3355
|
+
default:
|
|
3356
|
+
newCondition = null;
|
|
3357
|
+
}
|
|
3358
|
+
_this._curVisibility = newCondition;
|
|
3359
|
+
fg.controls['visibility'].setValue(newCondition);
|
|
3360
|
+
});
|
|
3362
3361
|
this._visibilitySub = fg.valueChanges
|
|
3363
3362
|
.pipe(operators.filter(function (v) { return v.visibilityOpt === 'condition'; }), operators.distinctUntilChanged(function (v1, v2) { return v1.visibility === v2.visibility; }))
|
|
3364
3363
|
.subscribe(function (v) {
|
|
@@ -3476,13 +3475,32 @@
|
|
|
3476
3475
|
AjfFormBuilderModule.decorators = [
|
|
3477
3476
|
{ type: core.NgModule, args: [{
|
|
3478
3477
|
imports: [
|
|
3479
|
-
monacoEditor.AjfMonacoEditorModule,
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3478
|
+
monacoEditor.AjfMonacoEditorModule,
|
|
3479
|
+
nodeIcon.AjfNodeIconModule,
|
|
3480
|
+
common.CommonModule,
|
|
3481
|
+
dragDrop.DragDropModule,
|
|
3482
|
+
forms$1.FormsModule,
|
|
3483
|
+
autocomplete.MatAutocompleteModule,
|
|
3484
|
+
button.MatButtonModule,
|
|
3485
|
+
card.MatCardModule,
|
|
3486
|
+
checkbox.MatCheckboxModule,
|
|
3487
|
+
chips.MatChipsModule,
|
|
3488
|
+
dialog.MatDialogModule,
|
|
3489
|
+
formField.MatFormFieldModule,
|
|
3490
|
+
icon.MatIconModule,
|
|
3491
|
+
input.MatInputModule,
|
|
3492
|
+
list.MatListModule,
|
|
3493
|
+
menu.MatMenuModule,
|
|
3494
|
+
select.MatSelectModule,
|
|
3495
|
+
sidenav.MatSidenavModule,
|
|
3496
|
+
slider.MatSliderModule,
|
|
3497
|
+
table.MatTableModule,
|
|
3498
|
+
toolbar.MatToolbarModule,
|
|
3499
|
+
tooltip.MatTooltipModule,
|
|
3500
|
+
forms$1.ReactiveFormsModule,
|
|
3501
|
+
transloco.AjfTranslocoModule,
|
|
3502
|
+
expansion.MatExpansionModule,
|
|
3503
|
+
slideToggle.MatSlideToggleModule,
|
|
3486
3504
|
],
|
|
3487
3505
|
declarations: [
|
|
3488
3506
|
AjfFbBranchLine,
|
|
@@ -3498,12 +3516,8 @@
|
|
|
3498
3516
|
AjfFbWarningConditionEditorDialog,
|
|
3499
3517
|
AjfFormBuilder,
|
|
3500
3518
|
],
|
|
3501
|
-
exports: [
|
|
3502
|
-
|
|
3503
|
-
],
|
|
3504
|
-
providers: [
|
|
3505
|
-
AjfFormBuilderService,
|
|
3506
|
-
],
|
|
3519
|
+
exports: [AjfFormBuilder],
|
|
3520
|
+
providers: [AjfFormBuilderService],
|
|
3507
3521
|
},] }
|
|
3508
3522
|
];
|
|
3509
3523
|
|