@ajf/material 13.1.1 → 13.1.4
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/barcode/barcode-module.d.ts +5 -5
- package/checkbox-group/checkbox-group-item.d.ts +2 -2
- package/checkbox-group/checkbox-group-module.d.ts +3 -3
- package/esm2020/barcode/barcode-module.mjs +8 -8
- package/esm2020/barcode/barcode.mjs +4 -4
- package/esm2020/checkbox-group/checkbox-group-item.mjs +3 -3
- package/esm2020/checkbox-group/checkbox-group-module.mjs +6 -6
- package/esm2020/form-builder/form-builder-service.mjs +50 -49
- package/esm2020/form-builder/form-builder-utils.mjs +1 -1
- package/esm2020/form-builder/node-properties.mjs +52 -45
- package/esm2020/forms/field.mjs +5 -5
- package/esm2020/forms/form.mjs +5 -5
- package/esm2020/forms/forms-module.mjs +5 -5
- package/esm2020/forms/table-field.mjs +3 -3
- package/esm2020/image/image.mjs +3 -3
- package/esm2020/node-icon/node-icon.mjs +3 -3
- package/esm2020/page-slider/page-slider-module.mjs +6 -22
- package/esm2020/page-slider/page-slider.mjs +3 -3
- package/esm2020/reports/filter-widget.mjs +22 -1
- package/esm2020/reports/graph-widget.mjs +38 -0
- package/esm2020/reports/report.mjs +3 -3
- package/esm2020/reports/reports-module.mjs +8 -1
- package/esm2020/reports/widget.mjs +7 -5
- package/fesm2015/ajf-material-barcode.mjs +10 -10
- package/fesm2015/ajf-material-barcode.mjs.map +1 -1
- package/fesm2015/ajf-material-checkbox-group.mjs +4 -4
- package/fesm2015/ajf-material-checkbox-group.mjs.map +1 -1
- package/fesm2015/ajf-material-form-builder.mjs +98 -90
- package/fesm2015/ajf-material-form-builder.mjs.map +1 -1
- package/fesm2015/ajf-material-forms.mjs +9 -9
- package/fesm2015/ajf-material-forms.mjs.map +1 -1
- package/fesm2015/ajf-material-image.mjs.map +1 -1
- package/fesm2015/ajf-material-node-icon.mjs.map +1 -1
- package/fesm2015/ajf-material-page-slider.mjs +3 -19
- package/fesm2015/ajf-material-page-slider.mjs.map +1 -1
- package/fesm2015/ajf-material-reports.mjs +66 -4
- package/fesm2015/ajf-material-reports.mjs.map +1 -1
- package/fesm2020/ajf-material-barcode.mjs +10 -10
- package/fesm2020/ajf-material-barcode.mjs.map +1 -1
- package/fesm2020/ajf-material-checkbox-group.mjs +4 -4
- package/fesm2020/ajf-material-checkbox-group.mjs.map +1 -1
- package/fesm2020/ajf-material-form-builder.mjs +98 -90
- package/fesm2020/ajf-material-form-builder.mjs.map +1 -1
- package/fesm2020/ajf-material-forms.mjs +9 -9
- package/fesm2020/ajf-material-forms.mjs.map +1 -1
- package/fesm2020/ajf-material-image.mjs.map +1 -1
- package/fesm2020/ajf-material-node-icon.mjs.map +1 -1
- package/fesm2020/ajf-material-page-slider.mjs +3 -19
- package/fesm2020/ajf-material-page-slider.mjs.map +1 -1
- package/fesm2020/ajf-material-reports.mjs +66 -4
- package/fesm2020/ajf-material-reports.mjs.map +1 -1
- package/form-builder/node-properties.d.ts +5 -4
- package/forms/field.d.ts +2 -2
- package/forms/form.d.ts +2 -2
- package/forms/forms-module.d.ts +7 -7
- package/forms/table-field.d.ts +2 -2
- package/image/image.d.ts +2 -2
- package/node-icon/node-icon.d.ts +2 -2
- package/package.json +2 -2
- package/page-slider/page-slider-module.d.ts +3 -3
- package/page-slider/page-slider.d.ts +2 -2
- package/reports/filter-widget.d.ts +21 -0
- package/reports/graph-widget.d.ts +29 -0
- package/reports/report.d.ts +2 -2
- package/reports/reports-module.d.ts +19 -17
- package/reports/widget.d.ts +2 -2
|
@@ -50,11 +50,11 @@ import { MatToolbarModule } from '@angular/material/toolbar';
|
|
|
50
50
|
import * as i6$2 from '@angular/material/tooltip';
|
|
51
51
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
52
52
|
import * as i1 from '@ajf/core/forms';
|
|
53
|
-
import { isChoicesFixedOrigin, isContainerNode, AjfNodeType, AjfFieldType, createField, createContainerNode, createForm, createChoicesFixedOrigin, isSlidesNode, isFieldWithChoices, isRepeatingContainerNode, isField, createValidationGroup, notEmptyValidation, minValidation, maxValidation, minDigitsValidation, maxDigitsValidation, createValidation, createWarningGroup, notEmptyWarning, createWarning, isRangeField, isNumberField } from '@ajf/core/forms';
|
|
53
|
+
import { isChoicesFixedOrigin, isContainerNode, AjfNodeType, AjfFieldType, createField, createContainerNode, createForm, createChoicesFixedOrigin, isSlidesNode, isFieldWithChoices, isRepeatingContainerNode, isField, createValidationGroup, notEmptyValidation, minValidation, maxValidation, minDigitsValidation, maxDigitsValidation, createValidation, createWarningGroup, notEmptyWarning, createWarning, isRangeField, isTableField, isNumberField } from '@ajf/core/forms';
|
|
54
54
|
import { DataSource } from '@angular/cdk/collections';
|
|
55
55
|
import { BehaviorSubject, of, Subject, Subscription, combineLatest } from 'rxjs';
|
|
56
56
|
import * as i6$1 from '@ngneat/transloco';
|
|
57
|
-
import { filter, map, scan,
|
|
57
|
+
import { filter, map, scan, shareReplay, withLatestFrom, distinctUntilChanged, sample } from 'rxjs/operators';
|
|
58
58
|
import { createCondition, alwaysCondition, createFormula, AjfExpressionUtils, neverCondition } from '@ajf/core/models';
|
|
59
59
|
import { deepCopy } from '@ajf/core/utils';
|
|
60
60
|
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
@@ -638,12 +638,13 @@ class AjfFormBuilderService {
|
|
|
638
638
|
this.choicesOrigins,
|
|
639
639
|
this.stringIdentifier,
|
|
640
640
|
]).pipe(filter(([form]) => form != null), map(([form, nodes, attachmentsOrigins, choicesOrigins, stringIdentifier]) => {
|
|
641
|
+
const supplementaryInformations = (form || {}).supplementaryInformations;
|
|
641
642
|
return createForm({
|
|
642
|
-
choicesOrigins: choicesOrigins
|
|
643
|
-
attachmentsOrigins: attachmentsOrigins
|
|
644
|
-
stringIdentifier: (stringIdentifier || [])
|
|
645
|
-
nodes: nodes
|
|
646
|
-
supplementaryInformations
|
|
643
|
+
choicesOrigins: [...choicesOrigins],
|
|
644
|
+
attachmentsOrigins: [...attachmentsOrigins],
|
|
645
|
+
stringIdentifier: [...(stringIdentifier || [])],
|
|
646
|
+
nodes: [...nodes],
|
|
647
|
+
supplementaryInformations,
|
|
647
648
|
});
|
|
648
649
|
}));
|
|
649
650
|
}
|
|
@@ -748,22 +749,22 @@ class AjfFormBuilderService {
|
|
|
748
749
|
_initChoicesOriginsStreams() {
|
|
749
750
|
this._choicesOrigins = (this._choicesOriginsUpdates).pipe(scan((choicesOrigins, op) => {
|
|
750
751
|
return op(choicesOrigins);
|
|
751
|
-
}, []),
|
|
752
|
+
}, []), shareReplay(1));
|
|
752
753
|
}
|
|
753
754
|
_initAttachmentsOriginsStreams() {
|
|
754
755
|
this._attachmentsOrigins = this._attachmentsOriginsUpdates.pipe(scan((attachmentsOrigins, op) => {
|
|
755
756
|
return op(attachmentsOrigins);
|
|
756
|
-
}, []),
|
|
757
|
+
}, []), shareReplay(1));
|
|
757
758
|
}
|
|
758
759
|
_initStringIdentifierStreams() {
|
|
759
760
|
this._stringIdentifier = this._stringIdentifierUpdates.pipe(scan((stringIdentifier, op) => {
|
|
760
761
|
return op(stringIdentifier);
|
|
761
|
-
}, []),
|
|
762
|
+
}, []), shareReplay(1));
|
|
762
763
|
}
|
|
763
764
|
_initNodesStreams() {
|
|
764
765
|
this._nodes = this._nodesUpdates.pipe(scan((nodes, op) => {
|
|
765
766
|
return op(nodes);
|
|
766
|
-
}, []),
|
|
767
|
+
}, []), shareReplay(1));
|
|
767
768
|
this._nodesWithoutChoiceOrigins = this._nodes.pipe(map(slides => slides.map(slide => {
|
|
768
769
|
slide.nodes = slide.nodes.map((node) => {
|
|
769
770
|
if (isFieldWithChoices(node)) {
|
|
@@ -780,9 +781,9 @@ class AjfFormBuilderService {
|
|
|
780
781
|
});
|
|
781
782
|
return slide;
|
|
782
783
|
})));
|
|
783
|
-
this._flatNodes = this._nodes.pipe(map((nodes) => flattenNodes(nodes)),
|
|
784
|
-
this._flatFields = this._flatNodes.pipe(map((nodes) => nodes.filter(n => !isContainerNode(n))),
|
|
785
|
-
this._nodeEntriesTree = this._nodes.pipe(map(nodes => this._buildFormBuilderNodesTree(nodes)),
|
|
784
|
+
this._flatNodes = this._nodes.pipe(map((nodes) => flattenNodes(nodes)), shareReplay(1));
|
|
785
|
+
this._flatFields = this._flatNodes.pipe(map((nodes) => nodes.filter(n => !isContainerNode(n))), shareReplay(1));
|
|
786
|
+
this._nodeEntriesTree = this._nodes.pipe(map(nodes => this._buildFormBuilderNodesTree(nodes)), shareReplay(1));
|
|
786
787
|
}
|
|
787
788
|
_initSaveNode() {
|
|
788
789
|
this._saveNodeEntryEvent
|
|
@@ -805,19 +806,17 @@ class AjfFormBuilderService {
|
|
|
805
806
|
: [alwaysCondition()];
|
|
806
807
|
const newConditionalBranches = node.conditionalBranches.length;
|
|
807
808
|
if (isRepeatingContainerNode(node)) {
|
|
808
|
-
|
|
809
|
-
repNode.formulaReps =
|
|
809
|
+
node.formulaReps =
|
|
810
810
|
properties.formulaReps != null
|
|
811
811
|
? createFormula({ formula: properties.formulaReps })
|
|
812
812
|
: undefined;
|
|
813
|
-
|
|
814
|
-
|
|
813
|
+
node.minReps = properties.minReps;
|
|
814
|
+
node.maxReps = properties.maxReps;
|
|
815
815
|
}
|
|
816
816
|
if (isField(node)) {
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
field.formula =
|
|
817
|
+
node.description = properties.description;
|
|
818
|
+
node.defaultValue = properties.defaultValue;
|
|
819
|
+
node.formula =
|
|
821
820
|
properties.formula != null ? createFormula({ formula: properties.formula }) : undefined;
|
|
822
821
|
const forceValue = properties.value;
|
|
823
822
|
const notEmpty = properties.notEmpty;
|
|
@@ -845,7 +844,7 @@ class AjfFormBuilderService {
|
|
|
845
844
|
maxValue != null ||
|
|
846
845
|
minDigits != null ||
|
|
847
846
|
maxDigits != null) {
|
|
848
|
-
const validation =
|
|
847
|
+
const validation = node.validation || createValidationGroup({});
|
|
849
848
|
validation.forceValue = forceValue;
|
|
850
849
|
validation.notEmpty = notEmpty ? notEmptyValidation() : undefined;
|
|
851
850
|
validation.minValue = minValue != null ? minValidation(minValue) : undefined;
|
|
@@ -856,44 +855,50 @@ class AjfFormBuilderService {
|
|
|
856
855
|
condition: c.condition,
|
|
857
856
|
errorMessage: c.errorMessage,
|
|
858
857
|
}));
|
|
859
|
-
|
|
858
|
+
node.validation = validation;
|
|
860
859
|
}
|
|
861
860
|
else {
|
|
862
|
-
|
|
861
|
+
node.validation = undefined;
|
|
863
862
|
}
|
|
864
863
|
const notEmptyWarn = properties.notEmptyWarning;
|
|
865
864
|
const warningConditions = properties.warningConditions;
|
|
866
865
|
if (notEmptyWarn != null ||
|
|
867
866
|
(warningConditions != null && warningConditions.length > 0)) {
|
|
868
|
-
const warning =
|
|
867
|
+
const warning = node.warning || createWarningGroup({});
|
|
869
868
|
warning.notEmpty = notEmptyWarn ? notEmptyWarning() : undefined;
|
|
870
869
|
warning.conditions = (warningConditions || []).map((w) => createWarning({
|
|
871
870
|
condition: w.condition,
|
|
872
871
|
warningMessage: w.warningMessage,
|
|
873
872
|
}));
|
|
874
|
-
|
|
873
|
+
node.warning = warning;
|
|
875
874
|
}
|
|
876
875
|
else {
|
|
877
|
-
|
|
876
|
+
node.warning = undefined;
|
|
878
877
|
}
|
|
879
|
-
|
|
878
|
+
node.nextSlideCondition =
|
|
880
879
|
properties.nextSlideCondition != null
|
|
881
880
|
? createCondition({ condition: properties.nextSlideCondition })
|
|
882
881
|
: undefined;
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
if (isFieldWithChoices(
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
882
|
+
node.size = properties.size;
|
|
883
|
+
node.defaultValue = properties.defaultValue;
|
|
884
|
+
if (isFieldWithChoices(node)) {
|
|
885
|
+
node.choicesOriginRef = properties.choicesOriginRef;
|
|
886
|
+
node.forceExpanded = properties.forceExpanded;
|
|
887
|
+
node.forceNarrow = properties.forceNarrow;
|
|
888
|
+
node.triggerConditions = (properties.triggerConditions || []).map((t) => createCondition({ condition: t }));
|
|
889
|
+
}
|
|
890
|
+
if (isRangeField(node)) {
|
|
891
|
+
node.start = properties.start;
|
|
892
|
+
node.end = properties.end;
|
|
893
|
+
node.step = properties.step;
|
|
891
894
|
}
|
|
892
|
-
if (
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
895
|
+
if (isTableField(node)) {
|
|
896
|
+
let { columnTypes, rows, columnLabels, rowLabels } = JSON.parse(properties.tableDef);
|
|
897
|
+
node.columnTypes = columnTypes || [];
|
|
898
|
+
node.rows = rows || [];
|
|
899
|
+
node.columnLabels = columnLabels || [];
|
|
900
|
+
node.rowLabels = rowLabels || [];
|
|
901
|
+
node.hideEmptyRows = properties.hideEmptyRows;
|
|
897
902
|
}
|
|
898
903
|
}
|
|
899
904
|
this._editedNodeEntry.next(null);
|
|
@@ -999,12 +1004,8 @@ class AjfFormBuilderService {
|
|
|
999
1004
|
let currentNode = nodesList[idx];
|
|
1000
1005
|
currentNode.id = contId * 1000 + idx + 1;
|
|
1001
1006
|
currentNode.parent = idx == 0 ? contId : contId * 1000 + idx;
|
|
1002
|
-
if (currentNode
|
|
1003
|
-
currentNode.
|
|
1004
|
-
const currentSlide = currentNode;
|
|
1005
|
-
if (currentSlide.nodes) {
|
|
1006
|
-
this._updateNodesList(currentSlide.id, currentSlide.nodes);
|
|
1007
|
-
}
|
|
1007
|
+
if (isSlidesNode(currentNode)) {
|
|
1008
|
+
this._updateNodesList(currentNode.id, currentNode.nodes);
|
|
1008
1009
|
}
|
|
1009
1010
|
}
|
|
1010
1011
|
return nodesList;
|
|
@@ -1713,6 +1714,9 @@ class AjfFbNodeProperties {
|
|
|
1713
1714
|
isRangeField(node) {
|
|
1714
1715
|
return isField(node) && isRangeField(node);
|
|
1715
1716
|
}
|
|
1717
|
+
isTableField(node) {
|
|
1718
|
+
return isField(node) && isTableField(node);
|
|
1719
|
+
}
|
|
1716
1720
|
save() {
|
|
1717
1721
|
this._saveEvt.emit();
|
|
1718
1722
|
}
|
|
@@ -1772,7 +1776,9 @@ class AjfFbNodeProperties {
|
|
|
1772
1776
|
if (this._conditionalBranchesSub != null) {
|
|
1773
1777
|
this._conditionalBranchesSub.unsubscribe();
|
|
1774
1778
|
}
|
|
1775
|
-
n
|
|
1779
|
+
if (n == null) {
|
|
1780
|
+
return this._fb.group({});
|
|
1781
|
+
}
|
|
1776
1782
|
const visibility = n.node.visibility != null ? n.node.visibility.condition : null;
|
|
1777
1783
|
const visibilityOpt = n.node.visibility != null ? this._guessVisibilityOpt(n.node.visibility) : null;
|
|
1778
1784
|
let controls = {
|
|
@@ -1792,63 +1798,62 @@ class AjfFbNodeProperties {
|
|
|
1792
1798
|
this._curFormulaReps = formulaReps;
|
|
1793
1799
|
validators.push(checkRepsValidity);
|
|
1794
1800
|
}
|
|
1795
|
-
|
|
1796
|
-
|
|
1801
|
+
const { node } = n;
|
|
1802
|
+
if (isField(node)) {
|
|
1797
1803
|
let forceValue = null;
|
|
1798
1804
|
let notEmpty = false;
|
|
1799
1805
|
let validationConditions = [];
|
|
1800
|
-
if (
|
|
1801
|
-
if (
|
|
1802
|
-
forceValue =
|
|
1806
|
+
if (node.validation != null) {
|
|
1807
|
+
if (node.validation.forceValue != null) {
|
|
1808
|
+
forceValue = node.validation.forceValue.condition;
|
|
1803
1809
|
}
|
|
1804
|
-
notEmpty =
|
|
1805
|
-
validationConditions = (
|
|
1810
|
+
notEmpty = node.validation.notEmpty != null;
|
|
1811
|
+
validationConditions = (node.validation.conditions || []).map(c => {
|
|
1806
1812
|
return { condition: c.condition, errorMessage: c.errorMessage };
|
|
1807
1813
|
});
|
|
1808
1814
|
}
|
|
1809
1815
|
let notEmptyW = false;
|
|
1810
1816
|
let warningConditions = [];
|
|
1811
|
-
if (
|
|
1812
|
-
notEmptyW =
|
|
1813
|
-
warningConditions = (
|
|
1817
|
+
if (node.warning != null) {
|
|
1818
|
+
notEmptyW = node.warning.notEmpty != null;
|
|
1819
|
+
warningConditions = (node.warning.conditions || []).map(w => {
|
|
1814
1820
|
return { condition: w.condition, warningMessage: w.warningMessage };
|
|
1815
1821
|
});
|
|
1816
1822
|
}
|
|
1817
|
-
const formula =
|
|
1818
|
-
controls.description =
|
|
1819
|
-
controls.defaultValue =
|
|
1820
|
-
controls.hint =
|
|
1821
|
-
controls.size =
|
|
1823
|
+
const formula = node.formula != null ? node.formula.formula : null;
|
|
1824
|
+
controls.description = node.description;
|
|
1825
|
+
controls.defaultValue = node.defaultValue;
|
|
1826
|
+
controls.hint = node.hint;
|
|
1827
|
+
controls.size = node.size;
|
|
1822
1828
|
controls.formula = formula;
|
|
1823
1829
|
controls.forceValue = forceValue;
|
|
1824
1830
|
controls.notEmpty = notEmpty;
|
|
1825
1831
|
controls.validationConditions = [validationConditions, []];
|
|
1826
1832
|
controls.notEmptyWarning = notEmptyW;
|
|
1827
1833
|
controls.warningConditions = [warningConditions, []];
|
|
1828
|
-
controls.nextSlideCondition = [
|
|
1834
|
+
controls.nextSlideCondition = [node.nextSlideCondition];
|
|
1829
1835
|
this._curForceValue = forceValue;
|
|
1830
1836
|
this._curFormula = formula;
|
|
1831
1837
|
this._validationConditions = validationConditions;
|
|
1832
1838
|
this._warningConditions = warningConditions;
|
|
1833
1839
|
}
|
|
1834
|
-
if (this.isNumericField(
|
|
1835
|
-
const numField = n.node;
|
|
1840
|
+
if (this.isNumericField(node)) {
|
|
1836
1841
|
let minValue;
|
|
1837
1842
|
let maxValue;
|
|
1838
1843
|
let minDigits;
|
|
1839
1844
|
let maxDigits;
|
|
1840
|
-
if (
|
|
1841
|
-
if (
|
|
1842
|
-
minValue = (
|
|
1845
|
+
if (node.validation != null) {
|
|
1846
|
+
if (node.validation.minValue != null) {
|
|
1847
|
+
minValue = (node.validation.minValue.condition || '').replace('$value >= ', '');
|
|
1843
1848
|
}
|
|
1844
|
-
if (
|
|
1845
|
-
maxValue = (
|
|
1849
|
+
if (node.validation.maxValue != null) {
|
|
1850
|
+
maxValue = (node.validation.maxValue.condition || '').replace('$value <= ', '');
|
|
1846
1851
|
}
|
|
1847
|
-
if (
|
|
1848
|
-
minDigits = (
|
|
1852
|
+
if (node.validation.minDigits != null) {
|
|
1853
|
+
minDigits = (node.validation.minDigits.condition || '').replace('$value.toString().length >= ', '');
|
|
1849
1854
|
}
|
|
1850
|
-
if (
|
|
1851
|
-
maxDigits = (
|
|
1855
|
+
if (node.validation.maxDigits != null) {
|
|
1856
|
+
maxDigits = (node.validation.maxDigits.condition || '').replace('$value.toString().length <= ', '');
|
|
1852
1857
|
}
|
|
1853
1858
|
}
|
|
1854
1859
|
controls.minValue = minValue;
|
|
@@ -1858,25 +1863,28 @@ class AjfFbNodeProperties {
|
|
|
1858
1863
|
validators.push(checkValueLimitsValidity);
|
|
1859
1864
|
validators.push(checkDigitsValidity);
|
|
1860
1865
|
}
|
|
1861
|
-
if (this.isRangeField(
|
|
1862
|
-
const
|
|
1863
|
-
const { start, end, step } = rangeField;
|
|
1866
|
+
if (this.isRangeField(node)) {
|
|
1867
|
+
const { start, end, step } = node;
|
|
1864
1868
|
controls.start = start;
|
|
1865
1869
|
controls.end = end;
|
|
1866
1870
|
controls.step = step;
|
|
1867
1871
|
validators.push(checkRangeValidity);
|
|
1868
1872
|
}
|
|
1869
|
-
if (this.isFieldWithChoices(
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
controls.
|
|
1873
|
-
controls.
|
|
1874
|
-
|
|
1875
|
-
controls.forceExpanded = fieldWithChoices.forceExpanded;
|
|
1876
|
-
controls.forceNarrow = fieldWithChoices.forceNarrow;
|
|
1873
|
+
if (this.isFieldWithChoices(node)) {
|
|
1874
|
+
let triggerConditions = (node.triggerConditions || []).map(c => c.condition);
|
|
1875
|
+
controls.choicesOriginRef = node.choicesOriginRef;
|
|
1876
|
+
controls.choicesFilter = node.choicesFilter != null ? node.choicesFilter.formula : null;
|
|
1877
|
+
controls.forceExpanded = node.forceExpanded;
|
|
1878
|
+
controls.forceNarrow = node.forceNarrow;
|
|
1877
1879
|
controls.triggerConditions = triggerConditions;
|
|
1878
1880
|
this._triggerConditions = triggerConditions;
|
|
1879
1881
|
}
|
|
1882
|
+
if (this.isTableField(node)) {
|
|
1883
|
+
const { columnTypes, rows, columnLabels, rowLabels } = node;
|
|
1884
|
+
const tableDef = { columnTypes, rows, columnLabels, rowLabels };
|
|
1885
|
+
controls.tableDef = JSON.stringify(tableDef, undefined, 2);
|
|
1886
|
+
controls.hideEmptyRows = node.hideEmptyRows;
|
|
1887
|
+
}
|
|
1880
1888
|
const fg = this._fb.group(controls);
|
|
1881
1889
|
fg.setValidators(validators);
|
|
1882
1890
|
this._conditionalBranches = n.node.conditionalBranches.map(c => c.condition);
|
|
@@ -1892,7 +1900,7 @@ class AjfFbNodeProperties {
|
|
|
1892
1900
|
this._handleNextSlideConditionChange(fg);
|
|
1893
1901
|
this._handleTriggerCondtionsChange(fg);
|
|
1894
1902
|
return fg;
|
|
1895
|
-
}),
|
|
1903
|
+
}), shareReplay(1));
|
|
1896
1904
|
}
|
|
1897
1905
|
_destroyConditionDialog() {
|
|
1898
1906
|
if (this._editConditionDialogSub != null) {
|
|
@@ -2387,10 +2395,10 @@ class AjfFbNodeProperties {
|
|
|
2387
2395
|
}
|
|
2388
2396
|
}
|
|
2389
2397
|
AjfFbNodeProperties.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfFbNodeProperties, deps: [{ token: i0.ChangeDetectorRef }, { token: AjfFormBuilderService }, { token: i2$1.MatDialog }, { token: i3$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
2390
|
-
AjfFbNodeProperties.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfFbNodeProperties, selector: "ajf-fb-node-properties", ngImport: i0, template: "<div\n [style.display]=\"(enabled|async) ? 'none' : 'block'\"\n class=\"ajf-disabled-overlay\"\n></div>\n<div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <mat-icon (click)=\"save()\">save</mat-icon>\n <mat-icon (click)=\"cancel()\">cancel</mat-icon>\n</div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"name\"\n [placeholder]=\"'Name' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"label\"\n [placeholder]=\"'Label' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select\n formControlName=\"visibilityOpt\"\n [placeholder]=\"'Visible' | transloco\"\n >\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\"\n >{{'Condition...'|transloco}}</mat-option\n >\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>{{ curVisibility }}</span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"conditionalBranchesNum\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button\n (click)=\"editConditionalBranch(idx)\"\n mat-raised-button\n [matTooltip]=\"branch\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ branch }}</span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingContainerNode(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Repetitions'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editFormulaReps()\"\n mat-raised-button\n [matTooltip]=\"curFormulaReps || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curFormulaReps }}</span>\n </div>\n </button>\n </div>\n <div><label>{{'Min repetitions'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"minReps\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"maxReps\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select\n formControlName=\"size\"\n [placeholder]=\"'Size' | transloco\"\n >\n <mat-option\n *ngFor=\"let fieldSize of fieldSizes\"\n [value]=\"fieldSize.value\"\n >\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\n matInput\n formControlName=\"hint\"\n [placeholder]=\"'Hint' | transloco\"\n />\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\n (click)=\"editFormula()\"\n mat-raised-button\n [matTooltip]=\"curFormula || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curFormula }}</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\"\n >{{'Not empty'|transloco}}</mat-checkbox\n >\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minValue\"\n [placeholder]=\"'Min value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxValue\"\n [placeholder]=\"'Max value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"validationConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\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>{{ validationCondition.condition }}</span>\n </div>\n </button>\n <mat-icon\n class=\"ajf-pointer\"\n (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\n *ngIf=\"warningConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\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>{{ warningCondition.condition }}</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>{{ nextSlideCondition }}</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\n formControlName=\"choicesOriginRef\"\n [placeholder]=\"'Choices' | transloco\"\n >\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curChoicesFilter }}</span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceExpanded\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceNarrow\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"triggerConditions.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>{{ triggerCondition }}</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-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:1em;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;top:0;right:0;bottom:0;left: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}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;min-height:36px}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"], components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i9.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i9$1.MatSlider, selector: "mat-slider", inputs: ["disabled", "color", "tabIndex", "invert", "max", "min", "step", "thumbLabel", "tickInterval", "value", "displayWith", "valueText", "vertical"], outputs: ["change", "input", "valueChange"], exportAs: ["matSlider"] }, { type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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"] }, { 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]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i5.MatLabel, selector: "mat-label" }, { type: i6$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "async": i8.AsyncPipe, "transloco": i6$1.TranslocoPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2398
|
+
AjfFbNodeProperties.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: AjfFbNodeProperties, selector: "ajf-fb-node-properties", ngImport: i0, template: "<div\n [style.display]=\"(enabled|async) ? 'none' : 'block'\"\n class=\"ajf-disabled-overlay\"\n></div>\n<div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <mat-icon (click)=\"save()\">save</mat-icon>\n <mat-icon (click)=\"cancel()\">cancel</mat-icon>\n</div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"name\"\n [placeholder]=\"'Name' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"label\"\n [placeholder]=\"'Label' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select\n formControlName=\"visibilityOpt\"\n [placeholder]=\"'Visible' | transloco\"\n >\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\"\n >{{'Condition...'|transloco}}</mat-option\n >\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>{{ curVisibility }}</span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"conditionalBranchesNum\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button\n (click)=\"editConditionalBranch(idx)\"\n mat-raised-button\n [matTooltip]=\"branch\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ branch }}</span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingContainerNode(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Repetitions'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editFormulaReps()\"\n mat-raised-button\n [matTooltip]=\"curFormulaReps || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curFormulaReps }}</span>\n </div>\n </button>\n </div>\n <div><label>{{'Min repetitions'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"minReps\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"maxReps\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select\n formControlName=\"size\"\n [placeholder]=\"'Size' | transloco\"\n >\n <mat-option\n *ngFor=\"let fieldSize of fieldSizes\"\n [value]=\"fieldSize.value\"\n >\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\n matInput\n formControlName=\"hint\"\n [placeholder]=\"'Hint' | transloco\"\n />\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\n (click)=\"editFormula()\"\n mat-raised-button\n [matTooltip]=\"curFormula || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curFormula }}</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\"\n >{{'Not empty'|transloco}}</mat-checkbox\n >\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minValue\"\n [placeholder]=\"'Min value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxValue\"\n [placeholder]=\"'Max value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"validationConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\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>{{ validationCondition.condition }}</span>\n </div>\n </button>\n <mat-icon\n class=\"ajf-pointer\"\n (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\n *ngIf=\"warningConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\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>{{ warningCondition.condition }}</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>{{ nextSlideCondition }}</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\n formControlName=\"choicesOriginRef\"\n [placeholder]=\"'Choices' | transloco\"\n >\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curChoicesFilter }}</span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceExpanded\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceNarrow\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"triggerConditions.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>{{ triggerCondition }}</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\">{{'Hide empty rows'|transloco}}</mat-checkbox>\n <mat-form-field>\n <textarea\n matInput\n type=\"number\"\n formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n </ng-container>\n </ng-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:1em;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;top:0;right:0;bottom:0;left: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}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;min-height:36px}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"], components: [{ type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i9.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i9$1.MatSlider, selector: "mat-slider", inputs: ["disabled", "color", "tabIndex", "invert", "max", "min", "step", "thumbLabel", "tickInterval", "value", "displayWith", "valueText", "vertical"], outputs: ["change", "input", "valueChange"], exportAs: ["matSlider"] }, { type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { 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"] }, { 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]" }, { type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i5.MatLabel, selector: "mat-label" }, { type: i6$2.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "async": i8.AsyncPipe, "transloco": i6$1.TranslocoPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2391
2399
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfFbNodeProperties, decorators: [{
|
|
2392
2400
|
type: Component,
|
|
2393
|
-
args: [{ selector: 'ajf-fb-node-properties', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [style.display]=\"(enabled|async) ? 'none' : 'block'\"\n class=\"ajf-disabled-overlay\"\n></div>\n<div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <mat-icon (click)=\"save()\">save</mat-icon>\n <mat-icon (click)=\"cancel()\">cancel</mat-icon>\n</div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"name\"\n [placeholder]=\"'Name' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"label\"\n [placeholder]=\"'Label' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select\n formControlName=\"visibilityOpt\"\n [placeholder]=\"'Visible' | transloco\"\n >\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\"\n >{{'Condition...'|transloco}}</mat-option\n >\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>{{ curVisibility }}</span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"conditionalBranchesNum\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button\n (click)=\"editConditionalBranch(idx)\"\n mat-raised-button\n [matTooltip]=\"branch\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ branch }}</span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingContainerNode(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Repetitions'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editFormulaReps()\"\n mat-raised-button\n [matTooltip]=\"curFormulaReps || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curFormulaReps }}</span>\n </div>\n </button>\n </div>\n <div><label>{{'Min repetitions'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"minReps\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"maxReps\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select\n formControlName=\"size\"\n [placeholder]=\"'Size' | transloco\"\n >\n <mat-option\n *ngFor=\"let fieldSize of fieldSizes\"\n [value]=\"fieldSize.value\"\n >\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\n matInput\n formControlName=\"hint\"\n [placeholder]=\"'Hint' | transloco\"\n />\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\n (click)=\"editFormula()\"\n mat-raised-button\n [matTooltip]=\"curFormula || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curFormula }}</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\"\n >{{'Not empty'|transloco}}</mat-checkbox\n >\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minValue\"\n [placeholder]=\"'Min value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxValue\"\n [placeholder]=\"'Max value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"validationConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\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>{{ validationCondition.condition }}</span>\n </div>\n </button>\n <mat-icon\n class=\"ajf-pointer\"\n (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\n *ngIf=\"warningConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\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>{{ warningCondition.condition }}</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>{{ nextSlideCondition }}</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\n formControlName=\"choicesOriginRef\"\n [placeholder]=\"'Choices' | transloco\"\n >\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curChoicesFilter }}</span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceExpanded\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceNarrow\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"triggerConditions.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>{{ triggerCondition }}</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-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:1em;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;top:0;right:0;bottom:0;left: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}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;min-height:36px}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"] }]
|
|
2401
|
+
args: [{ selector: 'ajf-fb-node-properties', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [style.display]=\"(enabled|async) ? 'none' : 'block'\"\n class=\"ajf-disabled-overlay\"\n></div>\n<div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <mat-icon (click)=\"save()\">save</mat-icon>\n <mat-icon (click)=\"cancel()\">cancel</mat-icon>\n</div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"name\"\n [placeholder]=\"'Name' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"label\"\n [placeholder]=\"'Label' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select\n formControlName=\"visibilityOpt\"\n [placeholder]=\"'Visible' | transloco\"\n >\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\"\n >{{'Condition...'|transloco}}</mat-option\n >\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>{{ curVisibility }}</span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"conditionalBranchesNum\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button\n (click)=\"editConditionalBranch(idx)\"\n mat-raised-button\n [matTooltip]=\"branch\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ branch }}</span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingContainerNode(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Repetitions'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editFormulaReps()\"\n mat-raised-button\n [matTooltip]=\"curFormulaReps || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curFormulaReps }}</span>\n </div>\n </button>\n </div>\n <div><label>{{'Min repetitions'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"minReps\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider\n formControlName=\"maxReps\"\n thumbLabel\n tickInterval=\"auto\"\n min=\"1\"\n max=\"5\"\n step=\"1\"\n ></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select\n formControlName=\"size\"\n [placeholder]=\"'Size' | transloco\"\n >\n <mat-option\n *ngFor=\"let fieldSize of fieldSizes\"\n [value]=\"fieldSize.value\"\n >\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\n matInput\n formControlName=\"hint\"\n [placeholder]=\"'Hint' | transloco\"\n />\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\n (click)=\"editFormula()\"\n mat-raised-button\n [matTooltip]=\"curFormula || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curFormula }}</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\"\n >{{'Not empty'|transloco}}</mat-checkbox\n >\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minValue\"\n [placeholder]=\"'Min value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxValue\"\n [placeholder]=\"'Max value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"validationConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\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>{{ validationCondition.condition }}</span>\n </div>\n </button>\n <mat-icon\n class=\"ajf-pointer\"\n (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\n *ngIf=\"warningConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\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>{{ warningCondition.condition }}</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>{{ nextSlideCondition }}</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\n formControlName=\"choicesOriginRef\"\n [placeholder]=\"'Choices' | transloco\"\n >\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curChoicesFilter }}</span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceExpanded\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"forceNarrow\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"triggerConditions.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>{{ triggerCondition }}</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\">{{'Hide empty rows'|transloco}}</mat-checkbox>\n <mat-form-field>\n <textarea\n matInput\n type=\"number\"\n formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n </ng-container>\n </ng-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:1em;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;top:0;right:0;bottom:0;left: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}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;min-height:36px}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"] }]
|
|
2394
2402
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: AjfFormBuilderService }, { type: i2$1.MatDialog }, { type: i3$1.FormBuilder }]; } });
|
|
2395
2403
|
|
|
2396
2404
|
/**
|