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