df-ae-forms-package 1.0.75 → 1.0.77
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/dist/index.esm.js +59 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +59 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -180,7 +180,19 @@ class ConditionalLogicService {
|
|
|
180
180
|
}
|
|
181
181
|
if (comp.name === 'table' && comp.cells) {
|
|
182
182
|
for (const row of comp.cells) {
|
|
183
|
-
|
|
183
|
+
// Check if row is iterable (array)
|
|
184
|
+
if (Array.isArray(row)) {
|
|
185
|
+
for (const cell of row) {
|
|
186
|
+
if (cell.components) {
|
|
187
|
+
const found = this.findComponent(cell.components, componentId);
|
|
188
|
+
if (found)
|
|
189
|
+
return found;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
// Handle case where cells is a 1D array (row is actually a cell)
|
|
195
|
+
const cell = row;
|
|
184
196
|
if (cell.components) {
|
|
185
197
|
const found = this.findComponent(cell.components, componentId);
|
|
186
198
|
if (found)
|
|
@@ -224,7 +236,14 @@ class ConditionalLogicService {
|
|
|
224
236
|
traverse(item.templateComponents);
|
|
225
237
|
if (item.cells) {
|
|
226
238
|
for (const row of item.cells) {
|
|
227
|
-
|
|
239
|
+
if (Array.isArray(row)) {
|
|
240
|
+
for (const cell of row) {
|
|
241
|
+
if (cell.components)
|
|
242
|
+
traverse(cell.components);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
const cell = row;
|
|
228
247
|
if (cell.components)
|
|
229
248
|
traverse(cell.components);
|
|
230
249
|
}
|
|
@@ -6002,14 +6021,22 @@ onComponentSelect, onComponentDelete, onComponentEdit, onComponentUpdate, select
|
|
|
6002
6021
|
}
|
|
6003
6022
|
// Handle nested components in table cells
|
|
6004
6023
|
if (component.cells && Array.isArray(component.cells)) {
|
|
6005
|
-
component.cells.forEach((
|
|
6006
|
-
|
|
6007
|
-
|
|
6024
|
+
component.cells.forEach((rowOrCell, _rowIndex) => {
|
|
6025
|
+
// Handle 2D array (standard)
|
|
6026
|
+
if (Array.isArray(rowOrCell)) {
|
|
6027
|
+
rowOrCell.forEach((cell, _cellIndex) => {
|
|
6008
6028
|
if (cell && cell.components && Array.isArray(cell.components)) {
|
|
6009
6029
|
initializeComponentValues(cell.components, values);
|
|
6010
6030
|
}
|
|
6011
6031
|
});
|
|
6012
6032
|
}
|
|
6033
|
+
// Handle 1D array (flat) structure
|
|
6034
|
+
else if (typeof rowOrCell === 'object' && rowOrCell !== null) {
|
|
6035
|
+
const cell = rowOrCell;
|
|
6036
|
+
if (cell && cell.components && Array.isArray(cell.components)) {
|
|
6037
|
+
initializeComponentValues(cell.components, values);
|
|
6038
|
+
}
|
|
6039
|
+
}
|
|
6013
6040
|
});
|
|
6014
6041
|
}
|
|
6015
6042
|
// Handle nested components in datagrid entries
|
|
@@ -6071,10 +6098,20 @@ onComponentSelect, onComponentDelete, onComponentEdit, onComponentUpdate, select
|
|
|
6071
6098
|
if (comp.children)
|
|
6072
6099
|
extractNotesAndAttachments(comp.children);
|
|
6073
6100
|
if (comp.cells)
|
|
6074
|
-
comp.cells.forEach((row) =>
|
|
6075
|
-
if (
|
|
6076
|
-
|
|
6077
|
-
|
|
6101
|
+
comp.cells.forEach((row) => {
|
|
6102
|
+
if (Array.isArray(row)) {
|
|
6103
|
+
row.forEach((cell) => {
|
|
6104
|
+
if (cell.components)
|
|
6105
|
+
extractNotesAndAttachments(cell.components);
|
|
6106
|
+
});
|
|
6107
|
+
}
|
|
6108
|
+
else {
|
|
6109
|
+
// Handle 1D array structure (row is actually a cell)
|
|
6110
|
+
const cell = row;
|
|
6111
|
+
if (cell.components)
|
|
6112
|
+
extractNotesAndAttachments(cell.components);
|
|
6113
|
+
}
|
|
6114
|
+
});
|
|
6078
6115
|
if (comp.entries)
|
|
6079
6116
|
comp.entries.forEach((entry) => {
|
|
6080
6117
|
if (entry.components)
|
|
@@ -6206,12 +6243,22 @@ onComponentSelect, onComponentDelete, onComponentEdit, onComponentUpdate, select
|
|
|
6206
6243
|
}
|
|
6207
6244
|
// Handle nested components in table cells
|
|
6208
6245
|
if (component.cells && Array.isArray(component.cells)) {
|
|
6209
|
-
component.cells.forEach((
|
|
6210
|
-
|
|
6246
|
+
component.cells.forEach((rowOrCell) => {
|
|
6247
|
+
// Handle 2D array (standard)
|
|
6248
|
+
if (Array.isArray(rowOrCell)) {
|
|
6249
|
+
rowOrCell.forEach((cell) => {
|
|
6250
|
+
if (cell.components && Array.isArray(cell.components)) {
|
|
6251
|
+
evaluateComponentConditionalLogic(cell.components, visibility, currentFormValues, fullSchema);
|
|
6252
|
+
}
|
|
6253
|
+
});
|
|
6254
|
+
}
|
|
6255
|
+
// Handle 1D array (flat) structure
|
|
6256
|
+
else if (typeof rowOrCell === 'object' && rowOrCell !== null) {
|
|
6257
|
+
const cell = rowOrCell;
|
|
6211
6258
|
if (cell.components && Array.isArray(cell.components)) {
|
|
6212
6259
|
evaluateComponentConditionalLogic(cell.components, visibility, currentFormValues, fullSchema);
|
|
6213
6260
|
}
|
|
6214
|
-
}
|
|
6261
|
+
}
|
|
6215
6262
|
});
|
|
6216
6263
|
}
|
|
6217
6264
|
// Handle nested components in datagrid entries
|