@ajf/material 13.1.1 → 13.1.2
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/checkbox-group/checkbox-group-item.d.ts +2 -2
- package/checkbox-group/checkbox-group-module.d.ts +3 -3
- 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/report.mjs +3 -3
- package/esm2020/reports/widget.mjs +5 -5
- 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 +25 -4
- package/fesm2015/ajf-material-reports.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 +25 -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/report.d.ts +2 -2
- 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';
|
|
@@ -639,12 +639,13 @@ class AjfFormBuilderService {
|
|
|
639
639
|
this.choicesOrigins,
|
|
640
640
|
this.stringIdentifier,
|
|
641
641
|
]).pipe(filter(([form]) => form != null), map(([form, nodes, attachmentsOrigins, choicesOrigins, stringIdentifier]) => {
|
|
642
|
+
const supplementaryInformations = (form || {}).supplementaryInformations;
|
|
642
643
|
return createForm({
|
|
643
|
-
choicesOrigins: choicesOrigins
|
|
644
|
-
attachmentsOrigins: attachmentsOrigins
|
|
645
|
-
stringIdentifier: (stringIdentifier || [])
|
|
646
|
-
nodes: nodes
|
|
647
|
-
supplementaryInformations
|
|
644
|
+
choicesOrigins: [...choicesOrigins],
|
|
645
|
+
attachmentsOrigins: [...attachmentsOrigins],
|
|
646
|
+
stringIdentifier: [...(stringIdentifier || [])],
|
|
647
|
+
nodes: [...nodes],
|
|
648
|
+
supplementaryInformations,
|
|
648
649
|
});
|
|
649
650
|
}));
|
|
650
651
|
}
|
|
@@ -749,22 +750,22 @@ class AjfFormBuilderService {
|
|
|
749
750
|
_initChoicesOriginsStreams() {
|
|
750
751
|
this._choicesOrigins = (this._choicesOriginsUpdates).pipe(scan((choicesOrigins, op) => {
|
|
751
752
|
return op(choicesOrigins);
|
|
752
|
-
}, []),
|
|
753
|
+
}, []), shareReplay(1));
|
|
753
754
|
}
|
|
754
755
|
_initAttachmentsOriginsStreams() {
|
|
755
756
|
this._attachmentsOrigins = this._attachmentsOriginsUpdates.pipe(scan((attachmentsOrigins, op) => {
|
|
756
757
|
return op(attachmentsOrigins);
|
|
757
|
-
}, []),
|
|
758
|
+
}, []), shareReplay(1));
|
|
758
759
|
}
|
|
759
760
|
_initStringIdentifierStreams() {
|
|
760
761
|
this._stringIdentifier = this._stringIdentifierUpdates.pipe(scan((stringIdentifier, op) => {
|
|
761
762
|
return op(stringIdentifier);
|
|
762
|
-
}, []),
|
|
763
|
+
}, []), shareReplay(1));
|
|
763
764
|
}
|
|
764
765
|
_initNodesStreams() {
|
|
765
766
|
this._nodes = this._nodesUpdates.pipe(scan((nodes, op) => {
|
|
766
767
|
return op(nodes);
|
|
767
|
-
}, []),
|
|
768
|
+
}, []), shareReplay(1));
|
|
768
769
|
this._nodesWithoutChoiceOrigins = this._nodes.pipe(map(slides => slides.map(slide => {
|
|
769
770
|
slide.nodes = slide.nodes.map((node) => {
|
|
770
771
|
if (isFieldWithChoices(node)) {
|
|
@@ -781,9 +782,9 @@ class AjfFormBuilderService {
|
|
|
781
782
|
});
|
|
782
783
|
return slide;
|
|
783
784
|
})));
|
|
784
|
-
this._flatNodes = this._nodes.pipe(map((nodes) => flattenNodes(nodes)),
|
|
785
|
-
this._flatFields = this._flatNodes.pipe(map((nodes) => nodes.filter(n => !isContainerNode(n))),
|
|
786
|
-
this._nodeEntriesTree = this._nodes.pipe(map(nodes => this._buildFormBuilderNodesTree(nodes)),
|
|
785
|
+
this._flatNodes = this._nodes.pipe(map((nodes) => flattenNodes(nodes)), shareReplay(1));
|
|
786
|
+
this._flatFields = this._flatNodes.pipe(map((nodes) => nodes.filter(n => !isContainerNode(n))), shareReplay(1));
|
|
787
|
+
this._nodeEntriesTree = this._nodes.pipe(map(nodes => this._buildFormBuilderNodesTree(nodes)), shareReplay(1));
|
|
787
788
|
}
|
|
788
789
|
_initSaveNode() {
|
|
789
790
|
this._saveNodeEntryEvent
|
|
@@ -806,19 +807,17 @@ class AjfFormBuilderService {
|
|
|
806
807
|
: [alwaysCondition()];
|
|
807
808
|
const newConditionalBranches = node.conditionalBranches.length;
|
|
808
809
|
if (isRepeatingContainerNode(node)) {
|
|
809
|
-
|
|
810
|
-
repNode.formulaReps =
|
|
810
|
+
node.formulaReps =
|
|
811
811
|
properties.formulaReps != null
|
|
812
812
|
? createFormula({ formula: properties.formulaReps })
|
|
813
813
|
: undefined;
|
|
814
|
-
|
|
815
|
-
|
|
814
|
+
node.minReps = properties.minReps;
|
|
815
|
+
node.maxReps = properties.maxReps;
|
|
816
816
|
}
|
|
817
817
|
if (isField(node)) {
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
field.formula =
|
|
818
|
+
node.description = properties.description;
|
|
819
|
+
node.defaultValue = properties.defaultValue;
|
|
820
|
+
node.formula =
|
|
822
821
|
properties.formula != null ? createFormula({ formula: properties.formula }) : undefined;
|
|
823
822
|
const forceValue = properties.value;
|
|
824
823
|
const notEmpty = properties.notEmpty;
|
|
@@ -846,7 +845,7 @@ class AjfFormBuilderService {
|
|
|
846
845
|
maxValue != null ||
|
|
847
846
|
minDigits != null ||
|
|
848
847
|
maxDigits != null) {
|
|
849
|
-
const validation =
|
|
848
|
+
const validation = node.validation || createValidationGroup({});
|
|
850
849
|
validation.forceValue = forceValue;
|
|
851
850
|
validation.notEmpty = notEmpty ? notEmptyValidation() : undefined;
|
|
852
851
|
validation.minValue = minValue != null ? minValidation(minValue) : undefined;
|
|
@@ -857,44 +856,50 @@ class AjfFormBuilderService {
|
|
|
857
856
|
condition: c.condition,
|
|
858
857
|
errorMessage: c.errorMessage,
|
|
859
858
|
}));
|
|
860
|
-
|
|
859
|
+
node.validation = validation;
|
|
861
860
|
}
|
|
862
861
|
else {
|
|
863
|
-
|
|
862
|
+
node.validation = undefined;
|
|
864
863
|
}
|
|
865
864
|
const notEmptyWarn = properties.notEmptyWarning;
|
|
866
865
|
const warningConditions = properties.warningConditions;
|
|
867
866
|
if (notEmptyWarn != null ||
|
|
868
867
|
(warningConditions != null && warningConditions.length > 0)) {
|
|
869
|
-
const warning =
|
|
868
|
+
const warning = node.warning || createWarningGroup({});
|
|
870
869
|
warning.notEmpty = notEmptyWarn ? notEmptyWarning() : undefined;
|
|
871
870
|
warning.conditions = (warningConditions || []).map((w) => createWarning({
|
|
872
871
|
condition: w.condition,
|
|
873
872
|
warningMessage: w.warningMessage,
|
|
874
873
|
}));
|
|
875
|
-
|
|
874
|
+
node.warning = warning;
|
|
876
875
|
}
|
|
877
876
|
else {
|
|
878
|
-
|
|
877
|
+
node.warning = undefined;
|
|
879
878
|
}
|
|
880
|
-
|
|
879
|
+
node.nextSlideCondition =
|
|
881
880
|
properties.nextSlideCondition != null
|
|
882
881
|
? createCondition({ condition: properties.nextSlideCondition })
|
|
883
882
|
: undefined;
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
if (isFieldWithChoices(
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
883
|
+
node.size = properties.size;
|
|
884
|
+
node.defaultValue = properties.defaultValue;
|
|
885
|
+
if (isFieldWithChoices(node)) {
|
|
886
|
+
node.choicesOriginRef = properties.choicesOriginRef;
|
|
887
|
+
node.forceExpanded = properties.forceExpanded;
|
|
888
|
+
node.forceNarrow = properties.forceNarrow;
|
|
889
|
+
node.triggerConditions = (properties.triggerConditions || []).map((t) => createCondition({ condition: t }));
|
|
890
|
+
}
|
|
891
|
+
if (isRangeField(node)) {
|
|
892
|
+
node.start = properties.start;
|
|
893
|
+
node.end = properties.end;
|
|
894
|
+
node.step = properties.step;
|
|
892
895
|
}
|
|
893
|
-
if (
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
896
|
+
if (isTableField(node)) {
|
|
897
|
+
let { columnTypes, rows, columnLabels, rowLabels } = JSON.parse(properties.tableDef);
|
|
898
|
+
node.columnTypes = columnTypes || [];
|
|
899
|
+
node.rows = rows || [];
|
|
900
|
+
node.columnLabels = columnLabels || [];
|
|
901
|
+
node.rowLabels = rowLabels || [];
|
|
902
|
+
node.hideEmptyRows = properties.hideEmptyRows;
|
|
898
903
|
}
|
|
899
904
|
}
|
|
900
905
|
this._editedNodeEntry.next(null);
|
|
@@ -1000,12 +1005,8 @@ class AjfFormBuilderService {
|
|
|
1000
1005
|
let currentNode = nodesList[idx];
|
|
1001
1006
|
currentNode.id = contId * 1000 + idx + 1;
|
|
1002
1007
|
currentNode.parent = idx == 0 ? contId : contId * 1000 + idx;
|
|
1003
|
-
if (currentNode
|
|
1004
|
-
currentNode.
|
|
1005
|
-
const currentSlide = currentNode;
|
|
1006
|
-
if (currentSlide.nodes) {
|
|
1007
|
-
this._updateNodesList(currentSlide.id, currentSlide.nodes);
|
|
1008
|
-
}
|
|
1008
|
+
if (isSlidesNode(currentNode)) {
|
|
1009
|
+
this._updateNodesList(currentNode.id, currentNode.nodes);
|
|
1009
1010
|
}
|
|
1010
1011
|
}
|
|
1011
1012
|
return nodesList;
|
|
@@ -1714,6 +1715,9 @@ class AjfFbNodeProperties {
|
|
|
1714
1715
|
isRangeField(node) {
|
|
1715
1716
|
return isField(node) && isRangeField(node);
|
|
1716
1717
|
}
|
|
1718
|
+
isTableField(node) {
|
|
1719
|
+
return isField(node) && isTableField(node);
|
|
1720
|
+
}
|
|
1717
1721
|
save() {
|
|
1718
1722
|
this._saveEvt.emit();
|
|
1719
1723
|
}
|
|
@@ -1773,7 +1777,9 @@ class AjfFbNodeProperties {
|
|
|
1773
1777
|
if (this._conditionalBranchesSub != null) {
|
|
1774
1778
|
this._conditionalBranchesSub.unsubscribe();
|
|
1775
1779
|
}
|
|
1776
|
-
n
|
|
1780
|
+
if (n == null) {
|
|
1781
|
+
return this._fb.group({});
|
|
1782
|
+
}
|
|
1777
1783
|
const visibility = n.node.visibility != null ? n.node.visibility.condition : null;
|
|
1778
1784
|
const visibilityOpt = n.node.visibility != null ? this._guessVisibilityOpt(n.node.visibility) : null;
|
|
1779
1785
|
let controls = {
|
|
@@ -1793,63 +1799,62 @@ class AjfFbNodeProperties {
|
|
|
1793
1799
|
this._curFormulaReps = formulaReps;
|
|
1794
1800
|
validators.push(checkRepsValidity);
|
|
1795
1801
|
}
|
|
1796
|
-
|
|
1797
|
-
|
|
1802
|
+
const { node } = n;
|
|
1803
|
+
if (isField(node)) {
|
|
1798
1804
|
let forceValue = null;
|
|
1799
1805
|
let notEmpty = false;
|
|
1800
1806
|
let validationConditions = [];
|
|
1801
|
-
if (
|
|
1802
|
-
if (
|
|
1803
|
-
forceValue =
|
|
1807
|
+
if (node.validation != null) {
|
|
1808
|
+
if (node.validation.forceValue != null) {
|
|
1809
|
+
forceValue = node.validation.forceValue.condition;
|
|
1804
1810
|
}
|
|
1805
|
-
notEmpty =
|
|
1806
|
-
validationConditions = (
|
|
1811
|
+
notEmpty = node.validation.notEmpty != null;
|
|
1812
|
+
validationConditions = (node.validation.conditions || []).map(c => {
|
|
1807
1813
|
return { condition: c.condition, errorMessage: c.errorMessage };
|
|
1808
1814
|
});
|
|
1809
1815
|
}
|
|
1810
1816
|
let notEmptyW = false;
|
|
1811
1817
|
let warningConditions = [];
|
|
1812
|
-
if (
|
|
1813
|
-
notEmptyW =
|
|
1814
|
-
warningConditions = (
|
|
1818
|
+
if (node.warning != null) {
|
|
1819
|
+
notEmptyW = node.warning.notEmpty != null;
|
|
1820
|
+
warningConditions = (node.warning.conditions || []).map(w => {
|
|
1815
1821
|
return { condition: w.condition, warningMessage: w.warningMessage };
|
|
1816
1822
|
});
|
|
1817
1823
|
}
|
|
1818
|
-
const formula =
|
|
1819
|
-
controls.description =
|
|
1820
|
-
controls.defaultValue =
|
|
1821
|
-
controls.hint =
|
|
1822
|
-
controls.size =
|
|
1824
|
+
const formula = node.formula != null ? node.formula.formula : null;
|
|
1825
|
+
controls.description = node.description;
|
|
1826
|
+
controls.defaultValue = node.defaultValue;
|
|
1827
|
+
controls.hint = node.hint;
|
|
1828
|
+
controls.size = node.size;
|
|
1823
1829
|
controls.formula = formula;
|
|
1824
1830
|
controls.forceValue = forceValue;
|
|
1825
1831
|
controls.notEmpty = notEmpty;
|
|
1826
1832
|
controls.validationConditions = [validationConditions, []];
|
|
1827
1833
|
controls.notEmptyWarning = notEmptyW;
|
|
1828
1834
|
controls.warningConditions = [warningConditions, []];
|
|
1829
|
-
controls.nextSlideCondition = [
|
|
1835
|
+
controls.nextSlideCondition = [node.nextSlideCondition];
|
|
1830
1836
|
this._curForceValue = forceValue;
|
|
1831
1837
|
this._curFormula = formula;
|
|
1832
1838
|
this._validationConditions = validationConditions;
|
|
1833
1839
|
this._warningConditions = warningConditions;
|
|
1834
1840
|
}
|
|
1835
|
-
if (this.isNumericField(
|
|
1836
|
-
const numField = n.node;
|
|
1841
|
+
if (this.isNumericField(node)) {
|
|
1837
1842
|
let minValue;
|
|
1838
1843
|
let maxValue;
|
|
1839
1844
|
let minDigits;
|
|
1840
1845
|
let maxDigits;
|
|
1841
|
-
if (
|
|
1842
|
-
if (
|
|
1843
|
-
minValue = (
|
|
1846
|
+
if (node.validation != null) {
|
|
1847
|
+
if (node.validation.minValue != null) {
|
|
1848
|
+
minValue = (node.validation.minValue.condition || '').replace('$value >= ', '');
|
|
1844
1849
|
}
|
|
1845
|
-
if (
|
|
1846
|
-
maxValue = (
|
|
1850
|
+
if (node.validation.maxValue != null) {
|
|
1851
|
+
maxValue = (node.validation.maxValue.condition || '').replace('$value <= ', '');
|
|
1847
1852
|
}
|
|
1848
|
-
if (
|
|
1849
|
-
minDigits = (
|
|
1853
|
+
if (node.validation.minDigits != null) {
|
|
1854
|
+
minDigits = (node.validation.minDigits.condition || '').replace('$value.toString().length >= ', '');
|
|
1850
1855
|
}
|
|
1851
|
-
if (
|
|
1852
|
-
maxDigits = (
|
|
1856
|
+
if (node.validation.maxDigits != null) {
|
|
1857
|
+
maxDigits = (node.validation.maxDigits.condition || '').replace('$value.toString().length <= ', '');
|
|
1853
1858
|
}
|
|
1854
1859
|
}
|
|
1855
1860
|
controls.minValue = minValue;
|
|
@@ -1859,25 +1864,28 @@ class AjfFbNodeProperties {
|
|
|
1859
1864
|
validators.push(checkValueLimitsValidity);
|
|
1860
1865
|
validators.push(checkDigitsValidity);
|
|
1861
1866
|
}
|
|
1862
|
-
if (this.isRangeField(
|
|
1863
|
-
const
|
|
1864
|
-
const { start, end, step } = rangeField;
|
|
1867
|
+
if (this.isRangeField(node)) {
|
|
1868
|
+
const { start, end, step } = node;
|
|
1865
1869
|
controls.start = start;
|
|
1866
1870
|
controls.end = end;
|
|
1867
1871
|
controls.step = step;
|
|
1868
1872
|
validators.push(checkRangeValidity);
|
|
1869
1873
|
}
|
|
1870
|
-
if (this.isFieldWithChoices(
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
controls.
|
|
1874
|
-
controls.
|
|
1875
|
-
|
|
1876
|
-
controls.forceExpanded = fieldWithChoices.forceExpanded;
|
|
1877
|
-
controls.forceNarrow = fieldWithChoices.forceNarrow;
|
|
1874
|
+
if (this.isFieldWithChoices(node)) {
|
|
1875
|
+
let triggerConditions = (node.triggerConditions || []).map(c => c.condition);
|
|
1876
|
+
controls.choicesOriginRef = node.choicesOriginRef;
|
|
1877
|
+
controls.choicesFilter = node.choicesFilter != null ? node.choicesFilter.formula : null;
|
|
1878
|
+
controls.forceExpanded = node.forceExpanded;
|
|
1879
|
+
controls.forceNarrow = node.forceNarrow;
|
|
1878
1880
|
controls.triggerConditions = triggerConditions;
|
|
1879
1881
|
this._triggerConditions = triggerConditions;
|
|
1880
1882
|
}
|
|
1883
|
+
if (this.isTableField(node)) {
|
|
1884
|
+
const { columnTypes, rows, columnLabels, rowLabels } = node;
|
|
1885
|
+
const tableDef = { columnTypes, rows, columnLabels, rowLabels };
|
|
1886
|
+
controls.tableDef = JSON.stringify(tableDef, undefined, 2);
|
|
1887
|
+
controls.hideEmptyRows = node.hideEmptyRows;
|
|
1888
|
+
}
|
|
1881
1889
|
const fg = this._fb.group(controls);
|
|
1882
1890
|
fg.setValidators(validators);
|
|
1883
1891
|
this._conditionalBranches = n.node.conditionalBranches.map(c => c.condition);
|
|
@@ -1893,7 +1901,7 @@ class AjfFbNodeProperties {
|
|
|
1893
1901
|
this._handleNextSlideConditionChange(fg);
|
|
1894
1902
|
this._handleTriggerCondtionsChange(fg);
|
|
1895
1903
|
return fg;
|
|
1896
|
-
}),
|
|
1904
|
+
}), shareReplay(1));
|
|
1897
1905
|
}
|
|
1898
1906
|
_destroyConditionDialog() {
|
|
1899
1907
|
if (this._editConditionDialogSub != null) {
|
|
@@ -2388,10 +2396,10 @@ class AjfFbNodeProperties {
|
|
|
2388
2396
|
}
|
|
2389
2397
|
}
|
|
2390
2398
|
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 });
|
|
2391
|
-
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 });
|
|
2399
|
+
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 });
|
|
2392
2400
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: AjfFbNodeProperties, decorators: [{
|
|
2393
2401
|
type: Component,
|
|
2394
|
-
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"] }]
|
|
2402
|
+
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"] }]
|
|
2395
2403
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: AjfFormBuilderService }, { type: i2$1.MatDialog }, { type: i3$1.FormBuilder }]; } });
|
|
2396
2404
|
|
|
2397
2405
|
/**
|