@ajf/material 18.5.0 → 18.5.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/esm2022/form-builder/form-builder-service.mjs +118 -31
- package/esm2022/form-builder/form-builder-utils.mjs +25 -1
- package/esm2022/form-builder/node-entry.mjs +18 -4
- package/esm2022/form-builder/node-properties.mjs +11 -7
- package/esm2022/node-icon/node-icon.mjs +4 -1
- package/esm2022/signature/signature.mjs +2 -2
- package/fesm2022/ajf-material-form-builder.mjs +165 -38
- package/fesm2022/ajf-material-form-builder.mjs.map +1 -1
- package/fesm2022/ajf-material-node-icon.mjs +3 -0
- package/fesm2022/ajf-material-node-icon.mjs.map +1 -1
- package/fesm2022/ajf-material-signature.mjs +2 -2
- package/fesm2022/ajf-material-signature.mjs.map +1 -1
- package/form-builder/form-builder-service.d.ts +23 -0
- package/form-builder/form-builder-utils.d.ts +8 -0
- package/form-builder/node-entry.d.ts +10 -0
- package/form-builder/node-properties.d.ts +5 -1
- package/package.json +2 -2
|
@@ -48,7 +48,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
|
|
|
48
48
|
import * as i9 from 'ngx-mat-select-search';
|
|
49
49
|
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
|
|
50
50
|
import * as i1 from '@ajf/core/forms';
|
|
51
|
-
import { isChoicesFixedOrigin, isContainerNode,
|
|
51
|
+
import { isChoicesFixedOrigin, isContainerNode, AjfNodeType, isSlidesNode, isNodeGroup, isFieldWithChoices, AjfFieldType, createContainerNode, createField, createForm, createChoicesFixedOrigin, isRepeatingSlide, isField, createValidationGroup, notEmptyValidation, minValidation, maxValidation, minDigitsValidation, maxDigitsValidation, createValidation, createWarningGroup, notEmptyWarning, createWarning, isRangeField, isEmptyField, isTableField, isNumberField } from '@ajf/core/forms';
|
|
52
52
|
import { DataSource } from '@angular/cdk/collections';
|
|
53
53
|
import { BehaviorSubject, of, Subject, Subscription, combineLatest, firstValueFrom } from 'rxjs';
|
|
54
54
|
import * as i6$1 from '@ngneat/transloco';
|
|
@@ -306,6 +306,39 @@ function getNodeContainer(c, node) {
|
|
|
306
306
|
}
|
|
307
307
|
return null;
|
|
308
308
|
}
|
|
309
|
+
/**
|
|
310
|
+
* True when the palette entry creates a node group. Groups can be dropped
|
|
311
|
+
* into a slide or a repeating slide, never into another group.
|
|
312
|
+
*/
|
|
313
|
+
function isGroupNodeType(nodeType) {
|
|
314
|
+
return nodeType.nodeType?.node === AjfNodeType.AjfNodeGroup;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* True when the node can be placed among the content of the container: a slide
|
|
318
|
+
* holds fields and groups, a group holds fields only.
|
|
319
|
+
*/
|
|
320
|
+
function canContainNode(container, node) {
|
|
321
|
+
if (isSlidesNode(node)) {
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
return !(isNodeGroup(container) && isNodeGroup(node));
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Returns a copy of the nodes where the fields with choices, at any depth, are
|
|
328
|
+
* stripped of their resolved choices, which are not part of the schema.
|
|
329
|
+
*/
|
|
330
|
+
function removeChoiceOrigins(nodes) {
|
|
331
|
+
return nodes.map(node => {
|
|
332
|
+
if (isContainerNode(node)) {
|
|
333
|
+
return { ...node, nodes: removeChoiceOrigins(node.nodes) };
|
|
334
|
+
}
|
|
335
|
+
if (isFieldWithChoices(node)) {
|
|
336
|
+
const { choices, choicesOrigin, ...fwc } = deepCopy(node);
|
|
337
|
+
return fwc;
|
|
338
|
+
}
|
|
339
|
+
return node;
|
|
340
|
+
});
|
|
341
|
+
}
|
|
309
342
|
function toArray(input) {
|
|
310
343
|
if (!input)
|
|
311
344
|
return [];
|
|
@@ -521,6 +554,11 @@ class AjfFormBuilderService {
|
|
|
521
554
|
isSlide: true,
|
|
522
555
|
category: AjfFormBuilderNodeTypeCategories.structure,
|
|
523
556
|
},
|
|
557
|
+
{
|
|
558
|
+
label: 'Group',
|
|
559
|
+
nodeType: { node: AjfNodeType.AjfNodeGroup },
|
|
560
|
+
category: AjfFormBuilderNodeTypeCategories.structure,
|
|
561
|
+
},
|
|
524
562
|
{
|
|
525
563
|
label: 'String',
|
|
526
564
|
nodeType: { node: AjfNodeType.AjfField, field: AjfFieldType.String },
|
|
@@ -677,6 +715,7 @@ class AjfFormBuilderService {
|
|
|
677
715
|
*/
|
|
678
716
|
this._emptyFieldCounter = 1;
|
|
679
717
|
this._emptySlideCounter = 1;
|
|
718
|
+
this._emptyGroupCounter = 1;
|
|
680
719
|
this._initChoicesOriginsStreams();
|
|
681
720
|
this._initAttachmentsOriginsStreams();
|
|
682
721
|
this._initStringIdentifierStreams();
|
|
@@ -770,10 +809,10 @@ class AjfFormBuilderService {
|
|
|
770
809
|
this._editedChoicesOrigin.next(null);
|
|
771
810
|
}
|
|
772
811
|
assignListId(node, empty = false) {
|
|
773
|
-
if (node
|
|
812
|
+
if (isContainerNode(node)) {
|
|
774
813
|
const listId = empty ? `empty_fields_list_${node.id}` : `fields_list_${node.id}`;
|
|
775
814
|
if (this._connectedDropLists.value.indexOf(listId) == -1) {
|
|
776
|
-
this._connectDropList(listId);
|
|
815
|
+
this._connectDropList(listId, isNodeGroup(node));
|
|
777
816
|
}
|
|
778
817
|
return listId;
|
|
779
818
|
}
|
|
@@ -783,7 +822,20 @@ class AjfFormBuilderService {
|
|
|
783
822
|
let node;
|
|
784
823
|
const id = ++nodeUniqueId;
|
|
785
824
|
const isFieldNode = nodeType.nodeType?.field != null;
|
|
786
|
-
|
|
825
|
+
const isGroupNode = isGroupNodeType(nodeType);
|
|
826
|
+
if (isGroupNode) {
|
|
827
|
+
node = createContainerNode({
|
|
828
|
+
id,
|
|
829
|
+
nodeType: AjfNodeType.AjfNodeGroup,
|
|
830
|
+
parent: parent.id,
|
|
831
|
+
parentNode,
|
|
832
|
+
name: `new_group_${this._emptyGroupCounter}`,
|
|
833
|
+
label: `New Group ${this._emptyGroupCounter}`,
|
|
834
|
+
nodes: [],
|
|
835
|
+
});
|
|
836
|
+
this._emptyGroupCounter++;
|
|
837
|
+
}
|
|
838
|
+
else if (isFieldNode) {
|
|
787
839
|
node = createField({
|
|
788
840
|
id,
|
|
789
841
|
nodeType: AjfNodeType.AjfField,
|
|
@@ -814,13 +866,16 @@ class AjfFormBuilderService {
|
|
|
814
866
|
const cn = isContainerNode(parent) && inContent
|
|
815
867
|
? parent
|
|
816
868
|
: getNodeContainer({ nodes }, parent);
|
|
817
|
-
if (!isFieldNode) {
|
|
869
|
+
if (!isFieldNode && !isGroupNode) {
|
|
818
870
|
let newNodes = nodes.slice(0);
|
|
819
871
|
newNodes.splice(insertInIndex, 0, node);
|
|
820
872
|
newNodes = this._updateNodesList(0, newNodes);
|
|
821
873
|
return newNodes;
|
|
822
874
|
}
|
|
823
875
|
else {
|
|
876
|
+
if (cn == null || !canContainNode(cn, node)) {
|
|
877
|
+
return nodes;
|
|
878
|
+
}
|
|
824
879
|
let newNodes = cn.nodes.slice(0);
|
|
825
880
|
newNodes.splice(insertInIndex, 0, node);
|
|
826
881
|
newNodes = this._updateNodesList(cn.id, newNodes);
|
|
@@ -848,6 +903,39 @@ class AjfFormBuilderService {
|
|
|
848
903
|
this._moveNodeEntryEvent.next(moveEvent);
|
|
849
904
|
this.cancelNodeEntryEdit();
|
|
850
905
|
}
|
|
906
|
+
/**
|
|
907
|
+
* Moves a node into another container, e.g. a field from a slide into a
|
|
908
|
+
* group, or out of it.
|
|
909
|
+
* @param nodeEntry The node to be moved.
|
|
910
|
+
* @param container The container the node is moved into.
|
|
911
|
+
* @param toIndex The position of the node among the content of the container.
|
|
912
|
+
*/
|
|
913
|
+
moveNodeEntryToContainer(nodeEntry, container, toIndex) {
|
|
914
|
+
const node = nodeEntry.node;
|
|
915
|
+
if (!canContainNode(container, node)) {
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
this.cancelNodeEntryEdit();
|
|
919
|
+
this._beforeNodesUpdate.emit();
|
|
920
|
+
this._nodesUpdates.next((nodes) => {
|
|
921
|
+
// Ids are positional: both containers are looked up before anything moves.
|
|
922
|
+
const source = getNodeContainer({ nodes }, node);
|
|
923
|
+
const target = flattenNodes(nodes).find(n => n.id === container.id);
|
|
924
|
+
if (source == null || target == null || !isContainerNode(target)) {
|
|
925
|
+
return nodes;
|
|
926
|
+
}
|
|
927
|
+
const idx = source.nodes.map(n => n.id).indexOf(node.id);
|
|
928
|
+
if (idx < 0) {
|
|
929
|
+
return nodes;
|
|
930
|
+
}
|
|
931
|
+
const [moved] = source.nodes.splice(idx, 1);
|
|
932
|
+
source.nodes = source.nodes.slice(0);
|
|
933
|
+
const newNodes = target.nodes.slice(0);
|
|
934
|
+
newNodes.splice(toIndex, 0, moved);
|
|
935
|
+
target.nodes = newNodes;
|
|
936
|
+
return this._updateNodesList(0, nodes.slice(0));
|
|
937
|
+
});
|
|
938
|
+
}
|
|
851
939
|
getCurrentForm() {
|
|
852
940
|
return combineLatest([
|
|
853
941
|
this.form,
|
|
@@ -971,6 +1059,7 @@ class AjfFormBuilderService {
|
|
|
971
1059
|
resetEmptyCounters() {
|
|
972
1060
|
this._emptyFieldCounter = 1;
|
|
973
1061
|
this._emptySlideCounter = 1;
|
|
1062
|
+
this._emptyGroupCounter = 1;
|
|
974
1063
|
}
|
|
975
1064
|
/**
|
|
976
1065
|
* Searches the form nodes for field nodes with choicesOriginRef corresponding
|
|
@@ -984,17 +1073,10 @@ class AjfFormBuilderService {
|
|
|
984
1073
|
const currentForm = this._form.value;
|
|
985
1074
|
if (!currentForm)
|
|
986
1075
|
return;
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
continue;
|
|
992
|
-
for (let node of slide.nodes) {
|
|
993
|
-
const nodeObj = node;
|
|
994
|
-
if (nodeObj['choicesOriginRef'] && nodeObj['choicesOriginRef'] === previous_name) {
|
|
995
|
-
nodeObj['choicesOriginRef'] = new_name;
|
|
996
|
-
updatedNodes.push(nodeObj);
|
|
997
|
-
}
|
|
1076
|
+
for (let node of flattenNodes(currentForm.nodes)) {
|
|
1077
|
+
const nodeObj = node;
|
|
1078
|
+
if (nodeObj['choicesOriginRef'] && nodeObj['choicesOriginRef'] === previous_name) {
|
|
1079
|
+
nodeObj['choicesOriginRef'] = new_name;
|
|
998
1080
|
}
|
|
999
1081
|
}
|
|
1000
1082
|
this._nodesUpdates.next((_nodes) => {
|
|
@@ -1058,15 +1140,20 @@ class AjfFormBuilderService {
|
|
|
1058
1140
|
/**
|
|
1059
1141
|
* Adds the id of a dropList to be connected with the FormBuilder source list.
|
|
1060
1142
|
* @param listId The id of the list to connect.
|
|
1143
|
+
* @param first True to put the list before the others. The list of a group
|
|
1144
|
+
* lies inside the list of its slide, and the CDK moves a dragged item into
|
|
1145
|
+
* the first connected list under the pointer: the inner list has to come
|
|
1146
|
+
* first, or it could never receive anything.
|
|
1061
1147
|
*/
|
|
1062
|
-
_connectDropList(listId) {
|
|
1148
|
+
_connectDropList(listId, first = false) {
|
|
1063
1149
|
let connectedLists = this._connectedDropLists.value.slice(0);
|
|
1064
|
-
this._connectedDropLists.next([...connectedLists, listId]);
|
|
1150
|
+
this._connectedDropLists.next(first ? [listId, ...connectedLists] : [...connectedLists, listId]);
|
|
1065
1151
|
}
|
|
1066
1152
|
_findMaxNodeId(nodes, _curMaxId = 0) {
|
|
1067
1153
|
let maxId = 0;
|
|
1068
1154
|
let maxNewFieldCounter = 0;
|
|
1069
1155
|
let maxNewSlideCounter = 0;
|
|
1156
|
+
let maxNewGroupCounter = 0;
|
|
1070
1157
|
nodes.forEach(n => {
|
|
1071
1158
|
maxId = Math.max(maxId, n.id);
|
|
1072
1159
|
if (isContainerNode(n)) {
|
|
@@ -1084,9 +1171,16 @@ class AjfFormBuilderService {
|
|
|
1084
1171
|
maxNewSlideCounter = Math.max(maxNewSlideCounter, newSlideNumber);
|
|
1085
1172
|
}
|
|
1086
1173
|
}
|
|
1174
|
+
else if (n.name.startsWith('new_group_')) {
|
|
1175
|
+
const newGroupNumber = this._extractNumberFromName(n.name, 'new_group_');
|
|
1176
|
+
if (newGroupNumber !== null) {
|
|
1177
|
+
maxNewGroupCounter = Math.max(maxNewGroupCounter, newGroupNumber);
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1087
1180
|
});
|
|
1088
1181
|
this._emptyFieldCounter = Math.max(this._emptyFieldCounter, maxNewFieldCounter + 1);
|
|
1089
1182
|
this._emptySlideCounter = Math.max(this._emptySlideCounter, maxNewSlideCounter + 1);
|
|
1183
|
+
this._emptyGroupCounter = Math.max(this._emptyGroupCounter, maxNewGroupCounter + 1);
|
|
1090
1184
|
return maxId;
|
|
1091
1185
|
}
|
|
1092
1186
|
_extractNumberFromName(str, prefix) {
|
|
@@ -1137,16 +1231,7 @@ class AjfFormBuilderService {
|
|
|
1137
1231
|
this._nodes = this._nodesUpdates.pipe(scan((nodes, op) => {
|
|
1138
1232
|
return op(nodes);
|
|
1139
1233
|
}, []), shareReplay(1));
|
|
1140
|
-
this._nodesWithoutChoiceOrigins = this._nodes.pipe(map(
|
|
1141
|
-
slide.nodes = slide.nodes.map((node) => {
|
|
1142
|
-
if (isFieldWithChoices(node)) {
|
|
1143
|
-
const { choices, choicesOrigin, ...fwc } = deepCopy(node);
|
|
1144
|
-
return fwc;
|
|
1145
|
-
}
|
|
1146
|
-
return node;
|
|
1147
|
-
});
|
|
1148
|
-
return slide;
|
|
1149
|
-
})));
|
|
1234
|
+
this._nodesWithoutChoiceOrigins = this._nodes.pipe(map(nodes => removeChoiceOrigins(nodes)));
|
|
1150
1235
|
this._flatNodes = this._nodes.pipe(map((nodes) => flattenNodes(nodes)), shareReplay(1));
|
|
1151
1236
|
this._flatFields = this._flatNodes.pipe(map((nodes) => nodes.filter(n => !isContainerNode(n))), shareReplay(1));
|
|
1152
1237
|
this._nodeEntriesTree = this._nodes.pipe(map(nodes => this._buildFormBuilderNodesTree(nodes)), shareReplay(1));
|
|
@@ -1171,7 +1256,9 @@ class AjfFormBuilderService {
|
|
|
1171
1256
|
? properties.conditionalBranches.map((condition) => createCondition({ condition }))
|
|
1172
1257
|
: [alwaysCondition()];
|
|
1173
1258
|
const newConditionalBranches = node.conditionalBranches.length;
|
|
1174
|
-
|
|
1259
|
+
// A group is only a bracket around its fields: the renderer does not
|
|
1260
|
+
// repeat it, so it has no repetitions to edit.
|
|
1261
|
+
if (isRepeatingSlide(node)) {
|
|
1175
1262
|
node.formulaReps =
|
|
1176
1263
|
properties.formulaReps != null
|
|
1177
1264
|
? createFormula({ formula: properties.formulaReps })
|
|
@@ -1378,7 +1465,7 @@ class AjfFormBuilderService {
|
|
|
1378
1465
|
let currentNode = nodesList[idx];
|
|
1379
1466
|
currentNode.id = contId * 1000 + idx + 1;
|
|
1380
1467
|
currentNode.parent = idx == 0 ? contId : contId * 1000 + idx;
|
|
1381
|
-
if (
|
|
1468
|
+
if (isContainerNode(currentNode)) {
|
|
1382
1469
|
this._updateNodesList(currentNode.id, currentNode.nodes);
|
|
1383
1470
|
}
|
|
1384
1471
|
}
|
|
@@ -1554,8 +1641,30 @@ function onDropProcess(event, fbService, nodeEntry, content = false) {
|
|
|
1554
1641
|
}
|
|
1555
1642
|
const previousIndex = event.previousIndex;
|
|
1556
1643
|
const currentIndex = event.currentIndex;
|
|
1644
|
+
if (event.previousContainer !== event.container) {
|
|
1645
|
+
if (content && nodeEntry != null) {
|
|
1646
|
+
fbService.moveNodeEntryToContainer(itemData, nodeEntry.node, currentIndex);
|
|
1647
|
+
}
|
|
1648
|
+
return;
|
|
1649
|
+
}
|
|
1557
1650
|
fbService.moveNodeEntry(event.item.data, previousIndex, currentIndex);
|
|
1558
1651
|
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Tells whether the dragged item can be dropped among the content of the
|
|
1654
|
+
* container: a slide takes fields and groups, a group takes fields only.
|
|
1655
|
+
* @param item The dragged item, either a palette entry or a node of the form.
|
|
1656
|
+
* @param container The container node owning the drop list.
|
|
1657
|
+
*/
|
|
1658
|
+
function canDropInContainer(item, container) {
|
|
1659
|
+
const data = item.data;
|
|
1660
|
+
if ('node' in data) {
|
|
1661
|
+
return canContainNode(container, data.node);
|
|
1662
|
+
}
|
|
1663
|
+
if (data.isSlide) {
|
|
1664
|
+
return false;
|
|
1665
|
+
}
|
|
1666
|
+
return !isGroupNodeType(data) || !isNodeGroup(container);
|
|
1667
|
+
}
|
|
1559
1668
|
/**
|
|
1560
1669
|
* Disables the drag&drop of Slide items.
|
|
1561
1670
|
* @param item The dragged item.
|
|
@@ -1729,6 +1838,13 @@ class AjfFbNodeEntry {
|
|
|
1729
1838
|
get currentEditedNode() {
|
|
1730
1839
|
return this._currentEditedNode;
|
|
1731
1840
|
}
|
|
1841
|
+
/**
|
|
1842
|
+
* The ids of the drop lists an item dragged from the content of this node can
|
|
1843
|
+
* be moved into, the lists of the groups first.
|
|
1844
|
+
*/
|
|
1845
|
+
get connectedDropLists() {
|
|
1846
|
+
return this._service.connectedDropLists;
|
|
1847
|
+
}
|
|
1732
1848
|
constructor(_service) {
|
|
1733
1849
|
this._service = _service;
|
|
1734
1850
|
this._hasContent = false;
|
|
@@ -1744,6 +1860,13 @@ class AjfFbNodeEntry {
|
|
|
1744
1860
|
this._firstBranchColor = branchColors[0];
|
|
1745
1861
|
this._branchLinesSubscription = Subscription.EMPTY;
|
|
1746
1862
|
this._childEntriesSubscription = Subscription.EMPTY;
|
|
1863
|
+
/**
|
|
1864
|
+
* The enter predicate of the drop lists holding the content of this node.
|
|
1865
|
+
* An arrow function, since the CDK calls it with no `this`.
|
|
1866
|
+
*/
|
|
1867
|
+
this.contentDropPredicate = (item) => {
|
|
1868
|
+
return this.isNodeEntry && canDropInContainer(item, this.realNodeEntry.node);
|
|
1869
|
+
};
|
|
1747
1870
|
this._currentEditedNode = this._service.editedNodeEntry;
|
|
1748
1871
|
}
|
|
1749
1872
|
onResize() { }
|
|
@@ -1850,11 +1973,11 @@ class AjfFbNodeEntry {
|
|
|
1850
1973
|
}
|
|
1851
1974
|
}
|
|
1852
1975
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbNodeEntry, deps: [{ token: AjfFormBuilderService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1853
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: { isFirst: "isFirst", nodeEntry: "nodeEntry", level: "level", isDraggable: "isDraggable", originOffset: "originOffset", firstBranchColor: "firstBranchColor" }, host: { listeners: { "window.resize": "onResize()" } }, viewQueries: [{ propertyName: "branchLines", predicate: AjfFbBranchLine, descendants: true }, { propertyName: "childEntries", predicate: i0.forwardRef(() => AjfFbNodeEntry), descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlighted-formbuilder-node]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card\n appearance=\"outlined\"\n cdkDrag\n [cdkDragData]=\"realNodeEntry\"\n class=\"ajf-draggable-box\"\n >\n <ng-container *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\">\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded()|async\"\n (opened)=\"updateExpandedStatus(true)\"\n (closed)=\"updateExpandedStatus(false)\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\" [ngClass]=\"{ 'ajf-title-row-error': isInvalid(realNodeEntry.node) }\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button (click)=\"delete($event)\" mat-icon-button>\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ></ajf-fb-node-entry>\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n *ngIf=\"realNodeEntry.content.length === 0\"\n cdkDropList\n [id]=\"assignId(true)\"\n [cdkDropListEnterPredicate]=\"disableSlideDrop\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ><mat-card-title>Drop your fields here</mat-card-title></mat-card\n >\n </div>\n </ng-template>\n </ng-template>\n </div>\n\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\">\n <ajf-fb-node-entry\n *ngIf=\"!isLastNode()\"\n [level]=\"level\"\n [originOffset]=\"idx\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"childNodeEntry\"\n ></ajf-fb-node-entry>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #rootEmpty>\n <div class=\"mat-card-container\">\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n cdkDropList\n [cdkDropListEnterPredicate]=\"emptyAreaDropPredicate()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n ><mat-card-title>Drop your slides here</mat-card-title>\n </mat-card>\n </div>\n</ng-template>\n", styles: ["ajf-fb-node-entry{display:block;position:relative}ajf-fb-node-entry .mat-card-container{position:relative}ajf-fb-node-entry .mat-card-container .ajf-origin-line{position:absolute;top:0;left:25px;width:25px;height:25px;border-bottom:2px solid;border-left:2px solid;border-bottom-left-radius:.5em}ajf-fb-node-entry .mat-card-container .mat-mdc-card{margin-left:50px;padding:.5em 1em}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row wrap;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto;max-width:25vw;margin-right:10px}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:color-mix(in srgb,currentColor 60%,transparent);max-height:100px;max-width:25vw;overflow:hidden;text-overflow:ellipsis}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:1 1 auto;display:flex;justify-content:flex-end;white-space:nowrap;justify-self:flex-end}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row-error{color:rgb(var(--palette-warn-500, 198 40 40))}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-empty{line-height:36px;border:2px dashed;box-shadow:none;box-sizing:border-box;text-align:center;color:color-mix(in srgb,currentColor 40%,transparent)}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px color-mix(in srgb,currentColor 12%,transparent);border-right:solid 1px color-mix(in srgb,currentColor 12%,transparent);box-sizing:border-box;cursor:move;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>.mat-mdc-card{outline:2px solid currentColor;outline-offset:-1px}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:color-mix(in srgb,currentColor 4%,transparent);border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:4px;background-color:color-mix(in srgb,currentColor 12%,transparent)}ajf-fb-node-entry .ajf-fields-list.cdk-drop-list-dragging .ajf-draggable-box:not(.cdk-drag-placeholder),ajf-fb-node-entry .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: i2$1.AjfNodeIcon, selector: "ajf-node-icon" }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i8$2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "component", type: AjfFbBranchLine, selector: "ajf-fb-branch-line", inputs: ["offset", "color", "height"] }, { kind: "component", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: ["isFirst", "nodeEntry", "level", "isDraggable", "originOffset", "firstBranchColor"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1976
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: { isFirst: "isFirst", nodeEntry: "nodeEntry", level: "level", isDraggable: "isDraggable", originOffset: "originOffset", firstBranchColor: "firstBranchColor" }, host: { listeners: { "window.resize": "onResize()" } }, viewQueries: [{ propertyName: "branchLines", predicate: AjfFbBranchLine, descendants: true }, { propertyName: "childEntries", predicate: i0.forwardRef(() => AjfFbNodeEntry), descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlighted-formbuilder-node]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card\n appearance=\"outlined\"\n cdkDrag\n [cdkDragData]=\"realNodeEntry\"\n class=\"ajf-draggable-box\"\n >\n <ng-container *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\">\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded()|async\"\n (opened)=\"updateExpandedStatus(true)\"\n (closed)=\"updateExpandedStatus(false)\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\" [ngClass]=\"{ 'ajf-title-row-error': isInvalid(realNodeEntry.node) }\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button (click)=\"delete($event)\" mat-icon-button>\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListConnectedTo]=\"(connectedDropLists | async)!\"\n [cdkDropListEnterPredicate]=\"contentDropPredicate\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ></ajf-fb-node-entry>\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n *ngIf=\"realNodeEntry.content.length === 0\"\n cdkDropList\n [id]=\"assignId(true)\"\n [cdkDropListConnectedTo]=\"(connectedDropLists | async)!\"\n [cdkDropListEnterPredicate]=\"contentDropPredicate\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ><mat-card-title>{{'Drop your fields here'|transloco}}</mat-card-title></mat-card\n >\n </div>\n </ng-template>\n </ng-template>\n </div>\n\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\">\n <ajf-fb-node-entry\n *ngIf=\"!isLastNode()\"\n [level]=\"level\"\n [originOffset]=\"idx\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"childNodeEntry\"\n ></ajf-fb-node-entry>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #rootEmpty>\n <div class=\"mat-card-container\">\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n cdkDropList\n [cdkDropListEnterPredicate]=\"emptyAreaDropPredicate()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n ><mat-card-title>{{'Drop your slides here'|transloco}}</mat-card-title>\n </mat-card>\n </div>\n</ng-template>\n", styles: ["ajf-fb-node-entry{display:block;position:relative}ajf-fb-node-entry .mat-card-container{position:relative}ajf-fb-node-entry .mat-card-container .ajf-origin-line{position:absolute;top:0;left:25px;width:25px;height:25px;border-bottom:2px solid;border-left:2px solid;border-bottom-left-radius:.5em}ajf-fb-node-entry .mat-card-container .mat-mdc-card{margin-left:50px;padding:.5em 1em}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row wrap;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto;max-width:25vw;margin-right:10px}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:color-mix(in srgb,currentColor 60%,transparent);max-height:100px;max-width:25vw;overflow:hidden;text-overflow:ellipsis}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:1 1 auto;display:flex;justify-content:flex-end;white-space:nowrap;justify-self:flex-end}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row-error{color:rgb(var(--palette-warn-500, 198 40 40))}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-empty{line-height:36px;border:2px dashed;box-shadow:none;box-sizing:border-box;text-align:center;color:color-mix(in srgb,currentColor 40%,transparent)}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px color-mix(in srgb,currentColor 12%,transparent);border-right:solid 1px color-mix(in srgb,currentColor 12%,transparent);box-sizing:border-box;cursor:move;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>.mat-mdc-card{outline:2px solid currentColor;outline-offset:-1px}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:color-mix(in srgb,currentColor 4%,transparent);border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:4px;background-color:color-mix(in srgb,currentColor 12%,transparent)}ajf-fb-node-entry .ajf-fields-list.cdk-drop-list-dragging .ajf-draggable-box:not(.cdk-drag-placeholder),ajf-fb-node-entry .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: i2$1.AjfNodeIcon, selector: "ajf-node-icon" }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i6$2.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i8$2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i8$2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "component", type: AjfFbBranchLine, selector: "ajf-fb-branch-line", inputs: ["offset", "color", "height"] }, { kind: "component", type: AjfFbNodeEntry, selector: "ajf-fb-node-entry", inputs: ["isFirst", "nodeEntry", "level", "isDraggable", "originOffset", "firstBranchColor"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1854
1977
|
}
|
|
1855
1978
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbNodeEntry, decorators: [{
|
|
1856
1979
|
type: Component,
|
|
1857
|
-
args: [{ selector: 'ajf-fb-node-entry', host: { '(window.resize)': 'onResize()' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlighted-formbuilder-node]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card\n appearance=\"outlined\"\n cdkDrag\n [cdkDragData]=\"realNodeEntry\"\n class=\"ajf-draggable-box\"\n >\n <ng-container *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\">\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded()|async\"\n (opened)=\"updateExpandedStatus(true)\"\n (closed)=\"updateExpandedStatus(false)\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\" [ngClass]=\"{ 'ajf-title-row-error': isInvalid(realNodeEntry.node) }\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button (click)=\"delete($event)\" mat-icon-button>\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListEnterPredicate]=\"
|
|
1980
|
+
args: [{ selector: 'ajf-fb-node-entry', host: { '(window.resize)': 'onResize()' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"nodeEntry; else rootEmpty\">\n <ng-template [ngIf]=\"isNodeEntry && !isLastNode()\">\n <ajf-fb-branch-line\n *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\"\n [offset]=\"idx\"\n [color]=\"branchColors[idx]\"\n ></ajf-fb-branch-line>\n </ng-template>\n\n <div\n class=\"mat-card-container\"\n [class.ajf-highlighted-formbuilder-node]=\"(currentEditedNode|async) === nodeEntry\"\n >\n <div\n *ngIf=\"!isFirst\"\n class=\"ajf-origin-line\"\n [style.margin-left]=\"originLeftMargin\"\n [style.border-color]=\"firstBranchColor\"\n ></div>\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngIf=\"!isDraggable; else draggable\">\n <mat-card appearance=\"outlined\">\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-card>\n </ng-container>\n\n <ng-template #draggable>\n <mat-card\n appearance=\"outlined\"\n cdkDrag\n [cdkDragData]=\"realNodeEntry\"\n class=\"ajf-draggable-box\"\n >\n <ng-container *ngIf=\"isSlide(realNodeEntry.node); else fieldPanel\">\n <ng-container *ngTemplateOutlet=\"slidePanel\"></ng-container>\n </ng-container>\n </mat-card>\n </ng-template>\n\n <ng-template #slidePanel>\n <mat-expansion-panel\n [expanded]=\"isExpanded()|async\"\n (opened)=\"updateExpandedStatus(true)\"\n (closed)=\"updateExpandedStatus(false)\"\n class=\"mat-elevation-z\"\n >\n <mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </mat-expansion-panel>\n </ng-template>\n\n <ng-template #fieldPanel>\n <ng-container *ngTemplateOutlet=\"cardTitle\"></ng-container>\n <ng-container *ngTemplateOutlet=\"cardContent\"></ng-container>\n </ng-template>\n\n <ng-template #cardTitle>\n <div class=\"ajf-title-row\" [ngClass]=\"{ 'ajf-title-row-error': isInvalid(realNodeEntry.node) }\">\n <ajf-node-icon [node]=\"realNodeEntry.node\"></ajf-node-icon>\n \n <span\n class=\"ajf-title\"\n [innerHTML]=\"(realNodeEntry.node.label || realNodeEntry.node.name) | transloco\"\n ></span>\n <span\n *ngIf=\"realNodeEntry.node.visibility && realNodeEntry.node.visibility?.condition !== 'true'\"\n class=\"ajf-visibility-condition\"\n [innerHTML]=\"'Condition: (' + realNodeEntry.node.visibility.condition + ')'\"\n >\n </span>\n <span class=\"ajf-actions\">\n <button\n [disabled]=\"(currentEditedNode|async) === nodeEntry\"\n (click)=\"edit($event)\"\n mat-icon-button\n >\n <mat-icon>edit</mat-icon>\n </button>\n <button (click)=\"delete($event)\" mat-icon-button>\n <mat-icon>delete</mat-icon>\n </button>\n </span>\n </div>\n </ng-template>\n\n <ng-template #cardContent>\n <div *ngIf=\"hasContent\">\n <ajf-fb-node-entry\n cdkDropList\n class=\"ajf-fields-list\"\n *ngFor=\"let contentEntry of realNodeEntry.content; let isFirstChild = first; let idx = index\"\n [id]=\"assignId()\"\n [level]=\"level + 1\"\n [isFirst]=\"isFirstChild\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"contentEntry\"\n [cdkDropListConnectedTo]=\"(connectedDropLists | async)!\"\n [cdkDropListEnterPredicate]=\"contentDropPredicate\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ></ajf-fb-node-entry>\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n *ngIf=\"realNodeEntry.content.length === 0\"\n cdkDropList\n [id]=\"assignId(true)\"\n [cdkDropListConnectedTo]=\"(connectedDropLists | async)!\"\n [cdkDropListEnterPredicate]=\"contentDropPredicate\"\n (cdkDropListDropped)=\"onDrop($event, true)\"\n ><mat-card-title>{{'Drop your fields here'|transloco}}</mat-card-title></mat-card\n >\n </div>\n </ng-template>\n </ng-template>\n </div>\n\n <ng-template [ngIf]=\"isNodeEntry\">\n <ng-container *ngFor=\"let childNodeEntry of realNodeEntry.children; let idx = index\">\n <ajf-fb-node-entry\n *ngIf=\"!isLastNode()\"\n [level]=\"level\"\n [originOffset]=\"idx\"\n [firstBranchColor]=\"branchColors[idx]\"\n [nodeEntry]=\"childNodeEntry\"\n ></ajf-fb-node-entry>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #rootEmpty>\n <div class=\"mat-card-container\">\n <mat-card\n appearance=\"outlined\"\n class=\"ajf-empty\"\n cdkDropList\n [cdkDropListEnterPredicate]=\"emptyAreaDropPredicate()\"\n (cdkDropListDropped)=\"onDrop($event)\"\n ><mat-card-title>{{'Drop your slides here'|transloco}}</mat-card-title>\n </mat-card>\n </div>\n</ng-template>\n", styles: ["ajf-fb-node-entry{display:block;position:relative}ajf-fb-node-entry .mat-card-container{position:relative}ajf-fb-node-entry .mat-card-container .ajf-origin-line{position:absolute;top:0;left:25px;width:25px;height:25px;border-bottom:2px solid;border-left:2px solid;border-bottom-left-radius:.5em}ajf-fb-node-entry .mat-card-container .mat-mdc-card{margin-left:50px;padding:.5em 1em}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row{display:flex;flex:1 1 auto;flex-direction:row wrap;align-items:center}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-title{flex:1 1 auto;max-width:25vw;margin-right:10px}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-visibility-condition{flex:1 1 auto;font-size:10px;color:color-mix(in srgb,currentColor 60%,transparent);max-height:100px;max-width:25vw;overflow:hidden;text-overflow:ellipsis}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row>.ajf-actions{flex:1 1 auto;display:flex;justify-content:flex-end;white-space:nowrap;justify-self:flex-end}ajf-fb-node-entry .mat-card-container .mat-mdc-card .ajf-title-row-error{color:rgb(var(--palette-warn-500, 198 40 40))}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-empty{line-height:36px;border:2px dashed;box-shadow:none;box-sizing:border-box;text-align:center;color:color-mix(in srgb,currentColor 40%,transparent)}ajf-fb-node-entry .mat-card-container .mat-mdc-card.ajf-draggable-box{padding:5px;border-bottom:solid 1px color-mix(in srgb,currentColor 12%,transparent);border-right:solid 1px color-mix(in srgb,currentColor 12%,transparent);box-sizing:border-box;cursor:move;font-size:14px}ajf-fb-node-entry .mat-card-container.ajf-highlighted-formbuilder-node>.mat-mdc-card{outline:2px solid currentColor;outline-offset:-1px}ajf-fb-node-entry.ajf-fields-list{max-width:80%;min-height:60px;display:block;background:color-mix(in srgb,currentColor 4%,transparent);border-radius:4px;overflow:hidden}ajf-fb-node-entry .cdk-drag-placeholder{opacity:.4;min-height:60px;margin-left:50px;border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:4px;background-color:color-mix(in srgb,currentColor 12%,transparent)}ajf-fb-node-entry .ajf-fields-list.cdk-drop-list-dragging .ajf-draggable-box:not(.cdk-drag-placeholder),ajf-fb-node-entry .cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}\n"] }]
|
|
1858
1981
|
}], ctorParameters: () => [{ type: AjfFormBuilderService }], propDecorators: { branchLines: [{
|
|
1859
1982
|
type: ViewChildren,
|
|
1860
1983
|
args: [AjfFbBranchLine]
|
|
@@ -2119,8 +2242,12 @@ class AjfFbNodeProperties {
|
|
|
2119
2242
|
this._validationConditions = [];
|
|
2120
2243
|
this._warningConditions = [];
|
|
2121
2244
|
this._triggerConditions = [];
|
|
2122
|
-
|
|
2123
|
-
|
|
2245
|
+
/**
|
|
2246
|
+
* True for a repeating slide. A group is a repeating container node too, but
|
|
2247
|
+
* the renderer never repeats it, so it gets no repetitions to edit.
|
|
2248
|
+
*/
|
|
2249
|
+
this.isRepeatingSlide = nodeEntry => {
|
|
2250
|
+
return nodeEntry != null && isRepeatingSlide(nodeEntry.node);
|
|
2124
2251
|
};
|
|
2125
2252
|
this._visibilityOptSub = Subscription.EMPTY;
|
|
2126
2253
|
this._visibilitySub = Subscription.EMPTY;
|
|
@@ -2456,7 +2583,7 @@ class AjfFbNodeProperties {
|
|
|
2456
2583
|
conditionalBranchesNum: n.node.conditionalBranches.length,
|
|
2457
2584
|
};
|
|
2458
2585
|
const validators = [];
|
|
2459
|
-
if (
|
|
2586
|
+
if (isRepeatingSlide(n.node)) {
|
|
2460
2587
|
const rn = n.node;
|
|
2461
2588
|
const formulaReps = rn.formulaReps != null ? rn.formulaReps.formula : null;
|
|
2462
2589
|
controls.formulaReps = [formulaReps];
|
|
@@ -3078,11 +3205,11 @@ class AjfFbNodeProperties {
|
|
|
3078
3205
|
return 'condition';
|
|
3079
3206
|
}
|
|
3080
3207
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbNodeProperties, deps: [{ token: i0.ChangeDetectorRef }, { token: AjfFormBuilderService }, { token: i2.MatDialog }, { token: i3$1.UntypedFormBuilder }, { token: AjfNodePropertiesNameMatchValidator }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3081
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFbNodeProperties, selector: "ajf-fb-node-properties", ngImport: i0, template: "<div [style.display]=\"(enabled|async) ? 'none' : 'block'\" class=\"ajf-disabled-overlay\"></div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <button\n mat-icon-button\n [disabled]=\"pf.status !== 'VALID'\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button> \n </div>\n <mat-error *ngIf=\"pf?.invalid\">\n {{allErrorMessages(pf)}}\n </mat-error>\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"name\" [placeholder]=\"'Name' | transloco\" />\n <mat-error *ngIf=\"pf.get('name')?.invalid\">\n {{fieldErrorMessage(pf.get('name'), 'Name')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"label\" [placeholder]=\"'Label' | transloco\" />\n <mat-error *ngIf=\"pf.get('label')?.invalid\">\n {{fieldErrorMessage(pf.get('label'), 'Label')}}\n </mat-error>\n </mat-form-field>\n </div>\n <ng-template [ngIf]=\"isEmptyField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"HTML\" [placeholder]=\"'HTML' | transloco\" />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select formControlName=\"visibilityOpt\" [placeholder]=\"'Visible' | transloco\">\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\">{{'Condition...'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n <button\n (click)=\"editVisibility()\"\n [disabled]=\"pf!.value.visibilityOpt !== 'condition'\"\n mat-raised-button\n [matTooltip]=\"curVisibility || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curVisibility }}</code></span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb formControlName=\"conditionalBranchesNum\"\n /></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button (click)=\"editConditionalBranch(idx)\" mat-raised-button [matTooltip]=\"branch\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ branch }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingContainerNode(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input formControlName=\"maxReps\" matSliderThumb\n /></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"readonlyField\">{{'Readonly'|transloco}}</mat-checkbox>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select formControlName=\"size\" [placeholder]=\"'Size' | transloco\">\n <mat-option *ngFor=\"let fieldSize of fieldSizes\" [value]=\"fieldSize.value\">\n {{ fieldSize.label|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"hint\" [placeholder]=\"'Hint' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"description\"\n [placeholder]=\"'Description' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"defaultValue\"\n [placeholder]=\"'Default value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Formula'|transloco}}</label></div>\n <div>\n <button (click)=\"editFormula()\" mat-raised-button [matTooltip]=\"curFormula || ''\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormula }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <!-- <div class=\"ajf-prop\">\n <div><label>{{'Force value'|translco}}</label></div>\n <div>\n <button (click)=\"editForceValue()\" mat-raised-button [matTooltip]=\"curForceValue\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curForceValue }}</span>\n </div>\n </button>\n </div>\n </div> -->\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmpty\">{{'Not empty'|transloco}}</mat-checkbox>\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"minValue\" [placeholder]=\"'Min value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"maxValue\" [placeholder]=\"'Max value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-select formControlName=\"appearance\" [placeholder]=\"'Appearance' | transloco\">\n <mat-option [value]=\"null\">{{'Default'|transloco}}</mat-option>\n <mat-option value=\"rating\">{{'Rating'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"validationConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No conditions'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let validationCondition of validationConditions; let idx = index\"\n >\n <button\n (click)=\"editValidationCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"validationCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ validationCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeValidationCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <!-- The warning editor used to sit here: a `notEmptyWarning` checkbox and\n the list of warning conditions. Both are gone from the UI, while the\n component keeps the properties, the form controls and the dialog that\n drove them, so putting the block back is a template-only change. -->\n <div class=\"ajf-prop\">\n <div><label>{{'Go to next slide condition'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editNextSlideCondition()\"\n mat-raised-button\n [matTooltip]=\"nextSlideCondition || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ nextSlideCondition }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isFieldWithChoices(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Choices origins'|transloco}}</mat-label>\n <mat-select formControlName=\"choicesOriginRef\" [placeholder]=\"'Choices' | transloco\">\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"pf.get('choicesOriginRef')?.invalid\">\n {{fieldErrorMessage(pf.get('choicesOriginRef'), 'choicesOriginRef')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curChoicesFilter }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceExpanded\"\n #forceExpanded\n (change)=\"forceCheckbox($event.checked, forceNarrow)\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceNarrow\"\n #forceNarrow\n (change)=\"forceCheckbox($event.checked, forceExpanded)\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"!triggerConditions || triggerConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\n {{'No trigger condition'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let triggerCondition of triggerConditions; let idx = index\"\n >\n <button\n (click)=\"editTriggerCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"triggerCondition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ triggerCondition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"pointer\" (click)=\"removeTriggerCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"isTableField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"hideEmptyRows\"\n >{{'Hide empty rows'|transloco}}</mat-checkbox\n >\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n <mat-error *ngIf=\"pf.get('tableDef')?.invalid\">\n {{fieldErrorMessage(pf.get('tableDef'), 'tableDef')}}\n </mat-error>\n </mat-form-field>\n </div>\n </ng-container>\n </ng-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:2px 2px 2px 5px;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;inset:0;opacity:.4;background-color:currentColor}ajf-fb-node-properties .ajf-emph{font-style:italic}ajf-fb-node-properties [mat-raised-button]{margin:.5em 0}ajf-fb-node-properties [mat-raised-button].ajf-pointer{cursor:pointer}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont{display:flex;flex-direction:row;align-items:center;position:relative}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;margin:auto;position:relative;max-height:30px;max-width:100%}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties .ajf-prop .mdc-button__label{max-width:100%}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8$3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i13.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i13.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3208
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AjfFbNodeProperties, selector: "ajf-fb-node-properties", ngImport: i0, template: "<div [style.display]=\"(enabled|async) ? 'none' : 'block'\" class=\"ajf-disabled-overlay\"></div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <button\n mat-icon-button\n [disabled]=\"pf.status !== 'VALID'\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button> \n </div>\n <mat-error *ngIf=\"pf?.invalid\">\n {{allErrorMessages(pf)}}\n </mat-error>\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"name\" [placeholder]=\"'Name' | transloco\" />\n <mat-error *ngIf=\"pf.get('name')?.invalid\">\n {{fieldErrorMessage(pf.get('name'), 'Name')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"label\" [placeholder]=\"'Label' | transloco\" />\n <mat-error *ngIf=\"pf.get('label')?.invalid\">\n {{fieldErrorMessage(pf.get('label'), 'Label')}}\n </mat-error>\n </mat-form-field>\n </div>\n <ng-template [ngIf]=\"isEmptyField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"HTML\" [placeholder]=\"'HTML' | transloco\" />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select formControlName=\"visibilityOpt\" [placeholder]=\"'Visible' | transloco\">\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\">{{'Condition...'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n <button\n (click)=\"editVisibility()\"\n [disabled]=\"pf!.value.visibilityOpt !== 'condition'\"\n mat-raised-button\n [matTooltip]=\"curVisibility || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curVisibility }}</code></span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb formControlName=\"conditionalBranchesNum\"\n /></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button (click)=\"editConditionalBranch(idx)\" mat-raised-button [matTooltip]=\"branch\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ branch }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingSlide(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input formControlName=\"maxReps\" matSliderThumb\n /></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"readonlyField\">{{'Readonly'|transloco}}</mat-checkbox>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select formControlName=\"size\" [placeholder]=\"'Size' | transloco\">\n <mat-option *ngFor=\"let fieldSize of fieldSizes\" [value]=\"fieldSize.value\">\n {{ fieldSize.label|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"hint\" [placeholder]=\"'Hint' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"description\"\n [placeholder]=\"'Description' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"defaultValue\"\n [placeholder]=\"'Default value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Formula'|transloco}}</label></div>\n <div>\n <button (click)=\"editFormula()\" mat-raised-button [matTooltip]=\"curFormula || ''\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormula }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <!-- <div class=\"ajf-prop\">\n <div><label>{{'Force value'|translco}}</label></div>\n <div>\n <button (click)=\"editForceValue()\" mat-raised-button [matTooltip]=\"curForceValue\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curForceValue }}</span>\n </div>\n </button>\n </div>\n </div> -->\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmpty\">{{'Not empty'|transloco}}</mat-checkbox>\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"minValue\" [placeholder]=\"'Min value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"maxValue\" [placeholder]=\"'Max value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-select formControlName=\"appearance\" [placeholder]=\"'Appearance' | transloco\">\n <mat-option [value]=\"null\">{{'Default'|transloco}}</mat-option>\n <mat-option value=\"rating\">{{'Rating'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"validationConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No conditions'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let validationCondition of validationConditions; let idx = index\"\n >\n <button\n (click)=\"editValidationCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"validationCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ validationCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeValidationCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <!-- The warning editor used to sit here: a `notEmptyWarning` checkbox and\n the list of warning conditions. Both are gone from the UI, while the\n component keeps the properties, the form controls and the dialog that\n drove them, so putting the block back is a template-only change. -->\n <div class=\"ajf-prop\">\n <div><label>{{'Go to next slide condition'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editNextSlideCondition()\"\n mat-raised-button\n [matTooltip]=\"nextSlideCondition || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ nextSlideCondition }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isFieldWithChoices(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Choices origins'|transloco}}</mat-label>\n <mat-select formControlName=\"choicesOriginRef\" [placeholder]=\"'Choices' | transloco\">\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"pf.get('choicesOriginRef')?.invalid\">\n {{fieldErrorMessage(pf.get('choicesOriginRef'), 'choicesOriginRef')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curChoicesFilter }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceExpanded\"\n #forceExpanded\n (change)=\"forceCheckbox($event.checked, forceNarrow)\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceNarrow\"\n #forceNarrow\n (change)=\"forceCheckbox($event.checked, forceExpanded)\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"!triggerConditions || triggerConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\n {{'No trigger condition'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let triggerCondition of triggerConditions; let idx = index\"\n >\n <button\n (click)=\"editTriggerCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"triggerCondition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ triggerCondition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"pointer\" (click)=\"removeTriggerCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"isTableField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"hideEmptyRows\"\n >{{'Hide empty rows'|transloco}}</mat-checkbox\n >\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n <mat-error *ngIf=\"pf.get('tableDef')?.invalid\">\n {{fieldErrorMessage(pf.get('tableDef'), 'tableDef')}}\n </mat-error>\n </mat-form-field>\n </div>\n </ng-container>\n </ng-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:2px 2px 2px 5px;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;inset:0;opacity:.4;background-color:currentColor}ajf-fb-node-properties .ajf-emph{font-style:italic}ajf-fb-node-properties [mat-raised-button]{margin:.5em 0}ajf-fb-node-properties [mat-raised-button].ajf-pointer{cursor:pointer}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont{display:flex;flex-direction:row;align-items:center;position:relative}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;margin:auto;position:relative;max-height:30px;max-width:100%}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties .ajf-prop .mdc-button__label{max-width:100%}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i5.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i8$3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i8$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i13.MatSlider, selector: "mat-slider", inputs: ["disabled", "discrete", "showTickMarks", "min", "color", "disableRipple", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i13.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i6$1.TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3082
3209
|
}
|
|
3083
3210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AjfFbNodeProperties, decorators: [{
|
|
3084
3211
|
type: Component,
|
|
3085
|
-
args: [{ selector: 'ajf-fb-node-properties', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.display]=\"(enabled|async) ? 'none' : 'block'\" class=\"ajf-disabled-overlay\"></div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <button\n mat-icon-button\n [disabled]=\"pf.status !== 'VALID'\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button> \n </div>\n <mat-error *ngIf=\"pf?.invalid\">\n {{allErrorMessages(pf)}}\n </mat-error>\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"name\" [placeholder]=\"'Name' | transloco\" />\n <mat-error *ngIf=\"pf.get('name')?.invalid\">\n {{fieldErrorMessage(pf.get('name'), 'Name')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"label\" [placeholder]=\"'Label' | transloco\" />\n <mat-error *ngIf=\"pf.get('label')?.invalid\">\n {{fieldErrorMessage(pf.get('label'), 'Label')}}\n </mat-error>\n </mat-form-field>\n </div>\n <ng-template [ngIf]=\"isEmptyField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"HTML\" [placeholder]=\"'HTML' | transloco\" />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select formControlName=\"visibilityOpt\" [placeholder]=\"'Visible' | transloco\">\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\">{{'Condition...'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n <button\n (click)=\"editVisibility()\"\n [disabled]=\"pf!.value.visibilityOpt !== 'condition'\"\n mat-raised-button\n [matTooltip]=\"curVisibility || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curVisibility }}</code></span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb formControlName=\"conditionalBranchesNum\"\n /></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button (click)=\"editConditionalBranch(idx)\" mat-raised-button [matTooltip]=\"branch\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ branch }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingContainerNode(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input formControlName=\"maxReps\" matSliderThumb\n /></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"readonlyField\">{{'Readonly'|transloco}}</mat-checkbox>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select formControlName=\"size\" [placeholder]=\"'Size' | transloco\">\n <mat-option *ngFor=\"let fieldSize of fieldSizes\" [value]=\"fieldSize.value\">\n {{ fieldSize.label|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"hint\" [placeholder]=\"'Hint' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"description\"\n [placeholder]=\"'Description' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"defaultValue\"\n [placeholder]=\"'Default value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Formula'|transloco}}</label></div>\n <div>\n <button (click)=\"editFormula()\" mat-raised-button [matTooltip]=\"curFormula || ''\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormula }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <!-- <div class=\"ajf-prop\">\n <div><label>{{'Force value'|translco}}</label></div>\n <div>\n <button (click)=\"editForceValue()\" mat-raised-button [matTooltip]=\"curForceValue\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curForceValue }}</span>\n </div>\n </button>\n </div>\n </div> -->\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmpty\">{{'Not empty'|transloco}}</mat-checkbox>\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"minValue\" [placeholder]=\"'Min value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"maxValue\" [placeholder]=\"'Max value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-select formControlName=\"appearance\" [placeholder]=\"'Appearance' | transloco\">\n <mat-option [value]=\"null\">{{'Default'|transloco}}</mat-option>\n <mat-option value=\"rating\">{{'Rating'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"validationConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No conditions'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let validationCondition of validationConditions; let idx = index\"\n >\n <button\n (click)=\"editValidationCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"validationCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ validationCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeValidationCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <!-- The warning editor used to sit here: a `notEmptyWarning` checkbox and\n the list of warning conditions. Both are gone from the UI, while the\n component keeps the properties, the form controls and the dialog that\n drove them, so putting the block back is a template-only change. -->\n <div class=\"ajf-prop\">\n <div><label>{{'Go to next slide condition'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editNextSlideCondition()\"\n mat-raised-button\n [matTooltip]=\"nextSlideCondition || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ nextSlideCondition }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isFieldWithChoices(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Choices origins'|transloco}}</mat-label>\n <mat-select formControlName=\"choicesOriginRef\" [placeholder]=\"'Choices' | transloco\">\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"pf.get('choicesOriginRef')?.invalid\">\n {{fieldErrorMessage(pf.get('choicesOriginRef'), 'choicesOriginRef')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curChoicesFilter }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceExpanded\"\n #forceExpanded\n (change)=\"forceCheckbox($event.checked, forceNarrow)\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceNarrow\"\n #forceNarrow\n (change)=\"forceCheckbox($event.checked, forceExpanded)\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"!triggerConditions || triggerConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\n {{'No trigger condition'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let triggerCondition of triggerConditions; let idx = index\"\n >\n <button\n (click)=\"editTriggerCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"triggerCondition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ triggerCondition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"pointer\" (click)=\"removeTriggerCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"isTableField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"hideEmptyRows\"\n >{{'Hide empty rows'|transloco}}</mat-checkbox\n >\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n <mat-error *ngIf=\"pf.get('tableDef')?.invalid\">\n {{fieldErrorMessage(pf.get('tableDef'), 'tableDef')}}\n </mat-error>\n </mat-form-field>\n </div>\n </ng-container>\n </ng-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:2px 2px 2px 5px;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;inset:0;opacity:.4;background-color:currentColor}ajf-fb-node-properties .ajf-emph{font-style:italic}ajf-fb-node-properties [mat-raised-button]{margin:.5em 0}ajf-fb-node-properties [mat-raised-button].ajf-pointer{cursor:pointer}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont{display:flex;flex-direction:row;align-items:center;position:relative}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;margin:auto;position:relative;max-height:30px;max-width:100%}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties .ajf-prop .mdc-button__label{max-width:100%}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"] }]
|
|
3212
|
+
args: [{ selector: 'ajf-fb-node-properties', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [style.display]=\"(enabled|async) ? 'none' : 'block'\" class=\"ajf-disabled-overlay\"></div>\n<ng-container *ngIf=\"nodeEntry|async as ne\">\n <ng-container *ngIf=\"propertiesForm|async as pf\">\n <div class=\"ajf-header\">\n <h3>{{'Properties'|transloco}}</h3>\n <button\n mat-icon-button\n [disabled]=\"pf.status !== 'VALID'\"\n (click)=\"save()\"\n >\n <mat-icon>save</mat-icon>\n </button>\n <button mat-icon-button (click)=\"cancel()\">\n <mat-icon>cancel</mat-icon>\n </button> \n </div>\n <mat-error *ngIf=\"pf?.invalid\">\n {{allErrorMessages(pf)}}\n </mat-error>\n <form [formGroup]=\"pf!\" novalidate>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"name\" [placeholder]=\"'Name' | transloco\" />\n <mat-error *ngIf=\"pf.get('name')?.invalid\">\n {{fieldErrorMessage(pf.get('name'), 'Name')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"label\" [placeholder]=\"'Label' | transloco\" />\n <mat-error *ngIf=\"pf.get('label')?.invalid\">\n {{fieldErrorMessage(pf.get('label'), 'Label')}}\n </mat-error>\n </mat-form-field>\n </div>\n <ng-template [ngIf]=\"isEmptyField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"HTML\" [placeholder]=\"'HTML' | transloco\" />\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Visibility'|transloco}}</mat-label>\n <mat-select formControlName=\"visibilityOpt\" [placeholder]=\"'Visible' | transloco\">\n <mat-option value=\"always\">{{'Always'|transloco}}</mat-option>\n <mat-option value=\"never\">{{'Never'|transloco}}</mat-option>\n <mat-option value=\"condition\">{{'Condition...'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n <button\n (click)=\"editVisibility()\"\n [disabled]=\"pf!.value.visibilityOpt !== 'condition'\"\n mat-raised-button\n [matTooltip]=\"curVisibility || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curVisibility }}</code></span>\n </div>\n </button>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Branches'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input matSliderThumb formControlName=\"conditionalBranchesNum\"\n /></mat-slider>\n </div>\n <div *ngFor=\"let branch of conditionalBranches; let idx = index\">\n <button (click)=\"editConditionalBranch(idx)\" mat-raised-button [matTooltip]=\"branch\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ branch }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isRepeatingSlide(ne)\">\n <div class=\"ajf-prop\">\n <div><label>{{'Max repetitions'|transloco}}</label></div>\n <div>\n <mat-slider discrete min=\"1\" max=\"5\" step=\"1\"\n ><input formControlName=\"maxReps\" matSliderThumb\n /></mat-slider>\n </div>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isField(ne)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"readonlyField\">{{'Readonly'|transloco}}</mat-checkbox>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Field size'|transloco}}</mat-label>\n <mat-select formControlName=\"size\" [placeholder]=\"'Size' | transloco\">\n <mat-option *ngFor=\"let fieldSize of fieldSizes\" [value]=\"fieldSize.value\">\n {{ fieldSize.label|transloco }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"hint\" [placeholder]=\"'Hint' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"description\"\n [placeholder]=\"'Description' | transloco\"\n ></textarea>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"defaultValue\"\n [placeholder]=\"'Default value' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Formula'|transloco}}</label></div>\n <div>\n <button (click)=\"editFormula()\" mat-raised-button [matTooltip]=\"curFormula || ''\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curFormula }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <!-- <div class=\"ajf-prop\">\n <div><label>{{'Force value'|translco}}</label></div>\n <div>\n <button (click)=\"editForceValue()\" mat-raised-button [matTooltip]=\"curForceValue\">\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span>{{ curForceValue }}</span>\n </div>\n </button>\n </div>\n </div> -->\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"notEmpty\">{{'Not empty'|transloco}}</mat-checkbox>\n </div>\n <ng-template [ngIf]=\"isNumericField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"minValue\" [placeholder]=\"'Min value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input matInput formControlName=\"maxValue\" [placeholder]=\"'Max value' | transloco\" />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"minDigits\"\n [placeholder]=\"'Min digits' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n formControlName=\"maxDigits\"\n [placeholder]=\"'Max digits' | transloco\"\n />\n </mat-form-field>\n </div>\n </ng-template>\n <ng-template [ngIf]=\"isRangeField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"start\"\n [placeholder]=\"'Start' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"end\"\n [placeholder]=\"'End' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <input\n matInput\n type=\"number\"\n formControlName=\"step\"\n [placeholder]=\"'Step' | transloco\"\n />\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-select formControlName=\"appearance\" [placeholder]=\"'Appearance' | transloco\">\n <mat-option [value]=\"null\">{{'Default'|transloco}}</mat-option>\n <mat-option value=\"rating\">{{'Rating'|transloco}}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-template>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{ 'Validation' | transloco }}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addValidationCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div *ngIf=\"validationConditions.length === 0\" class=\"ajf-validation-row ajf-emph\">\n {{'No conditions'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let validationCondition of validationConditions; let idx = index\"\n >\n <button\n (click)=\"editValidationCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"validationCondition.condition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ validationCondition.condition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"ajf-pointer\" (click)=\"removeValidationCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n <!-- The warning editor used to sit here: a `notEmptyWarning` checkbox and\n the list of warning conditions. Both are gone from the UI, while the\n component keeps the properties, the form controls and the dialog that\n drove them, so putting the block back is a template-only change. -->\n <div class=\"ajf-prop\">\n <div><label>{{'Go to next slide condition'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editNextSlideCondition()\"\n mat-raised-button\n [matTooltip]=\"nextSlideCondition || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ nextSlideCondition }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <ng-template [ngIf]=\"isFieldWithChoices(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-form-field>\n <mat-label>{{'Choices origins'|transloco}}</mat-label>\n <mat-select formControlName=\"choicesOriginRef\" [placeholder]=\"'Choices' | transloco\">\n <mat-option\n *ngFor=\"let choicesOrigin of choicesOrigins\"\n [value]=\"choicesOrigin.name\"\n >\n {{ (choicesOrigin.label || choicesOrigin.name)|transloco }}\n </mat-option>\n </mat-select>\n <mat-error *ngIf=\"pf.get('choicesOriginRef')?.invalid\">\n {{fieldErrorMessage(pf.get('choicesOriginRef'), 'choicesOriginRef')}}\n </mat-error>\n </mat-form-field>\n </div>\n <div class=\"ajf-prop\">\n <div><label>{{'Choices filter'|transloco}}</label></div>\n <div>\n <button\n (click)=\"editChoicesFilter()\"\n mat-raised-button\n [matTooltip]=\"curChoicesFilter || ''\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ curChoicesFilter }}</code></span>\n </div>\n </button>\n </div>\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceExpanded\"\n #forceExpanded\n (change)=\"forceCheckbox($event.checked, forceNarrow)\"\n >{{'Force expanded selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <mat-checkbox\n formControlName=\"forceNarrow\"\n #forceNarrow\n (change)=\"forceCheckbox($event.checked, forceExpanded)\"\n >{{'Force narrow selection'|transloco}}</mat-checkbox\n >\n </div>\n <div class=\"ajf-prop\">\n <div class=\"ajf-header\">\n <label>{{'Trigger selection'|transloco}}</label>\n <mat-icon class=\"ajf-pointer\" (click)=\"addTriggerCondition()\"\n >add_circle_outline</mat-icon\n >\n </div>\n <div\n *ngIf=\"!triggerConditions || triggerConditions.length === 0\"\n class=\"ajf-validation-row ajf-emph\"\n >\n {{'No trigger condition'|transloco}}\n </div>\n <div\n class=\"ajf-validation-row\"\n *ngFor=\"let triggerCondition of triggerConditions; let idx = index\"\n >\n <button\n (click)=\"editTriggerCondition(idx)\"\n mat-raised-button\n [matTooltip]=\"triggerCondition\"\n >\n <div class=\"ajf-icon-cont\">\n <mat-icon>edit</mat-icon>\n <span><code>{{ triggerCondition }}</code></span>\n </div>\n </button>\n <mat-icon class=\"pointer\" (click)=\"removeTriggerCondition(idx)\"\n >remove_circle_outline</mat-icon\n >\n </div>\n </div>\n </ng-template>\n <ng-container *ngIf=\"isTableField(ne!.node)\">\n <div class=\"ajf-prop\">\n <mat-checkbox formControlName=\"hideEmptyRows\"\n >{{'Hide empty rows'|transloco}}</mat-checkbox\n >\n <mat-form-field>\n <textarea\n matInput\n formControlName=\"tableDef\"\n [placeholder]=\"'Table definition' | transloco\"\n ></textarea>\n <mat-error *ngIf=\"pf.get('tableDef')?.invalid\">\n {{fieldErrorMessage(pf.get('tableDef'), 'tableDef')}}\n </mat-error>\n </mat-form-field>\n </div>\n </ng-container>\n </ng-template>\n </form>\n </ng-container>\n</ng-container>\n", styles: ["ajf-fb-node-properties{display:block;padding:2px 2px 2px 5px;position:relative}ajf-fb-node-properties mat-icon{cursor:pointer}ajf-fb-node-properties .ajf-header{display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap}ajf-fb-node-properties .ajf-header>h3,ajf-fb-node-properties .ajf-header>label{flex:1 0 auto;margin-right:.5em}ajf-fb-node-properties .ajf-header>mat-icon{flex:0 0 auto;margin-left:.5em}ajf-fb-node-properties .ajf-disabled-overlay{position:absolute;inset:0;opacity:.4;background-color:currentColor}ajf-fb-node-properties .ajf-emph{font-style:italic}ajf-fb-node-properties [mat-raised-button]{margin:.5em 0}ajf-fb-node-properties [mat-raised-button].ajf-pointer{cursor:pointer}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont{display:flex;flex-direction:row;align-items:center;position:relative}ajf-fb-node-properties [mat-raised-button] .ajf-icon-cont span{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;display:block;margin:auto;position:relative;max-height:30px;max-width:100%}ajf-fb-node-properties .ajf-validation-row{margin:.5em 0;display:flex;flex-direction:row;align-items:center}ajf-fb-node-properties .ajf-validation-row button{flex:1 1 auto}ajf-fb-node-properties .ajf-validation-row mat-icon{flex:0 0 auto}ajf-fb-node-properties .ajf-prop{margin:.5em 0}ajf-fb-node-properties .ajf-prop .mdc-button__label{max-width:100%}ajf-fb-node-properties mat-form-field,ajf-fb-node-properties mat-slider,ajf-fb-node-properties [mat-raised-button]{width:100%}\n"] }]
|
|
3086
3213
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: AjfFormBuilderService }, { type: i2.MatDialog }, { type: i3$1.UntypedFormBuilder }, { type: AjfNodePropertiesNameMatchValidator }] });
|
|
3087
3214
|
|
|
3088
3215
|
/**
|
|
@@ -3651,5 +3778,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3651
3778
|
* Generated bundle index. Do not edit.
|
|
3652
3779
|
*/
|
|
3653
3780
|
|
|
3654
|
-
export { AjfFormBuilder, AjfFormBuilderModule, AjfFormBuilderNodeTypeCategories, AjfFormBuilderService, NodeTypeGroupsPipe, cleanDefaultValue, disableFieldDropPredicate, disableSlideDropPredicate, flattenNodes, onDropProcess };
|
|
3781
|
+
export { AjfFormBuilder, AjfFormBuilderModule, AjfFormBuilderNodeTypeCategories, AjfFormBuilderService, NodeTypeGroupsPipe, canContainNode, canDropInContainer, cleanDefaultValue, disableFieldDropPredicate, disableSlideDropPredicate, flattenNodes, isGroupNodeType, onDropProcess };
|
|
3655
3782
|
//# sourceMappingURL=ajf-material-form-builder.mjs.map
|