df-ae-forms-package 1.0.86 → 1.0.87

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.js CHANGED
@@ -4478,7 +4478,7 @@ formTemplateId, onThresholdActionCompletion, onThresholdIssueRaised, onNotesChan
4478
4478
  whiteSpace: 'nowrap',
4479
4479
  overflow: 'hidden',
4480
4480
  textOverflow: 'ellipsis'
4481
- }, children: component.basic?.label || `Column ${index + 1}` }, `header-${component.id}`))) })), dataEntries.length > 0 ? (dataEntries.map((entry, entryIndex) => (jsxRuntime.jsxs("div", { className: "table-row", style: {
4481
+ }, children: component.basic?.label || `Column ${index + 1}` }, `header-${component.id || index}`))) })), dataEntries.length > 0 ? (dataEntries.map((entry, entryIndex) => (jsxRuntime.jsxs("div", { className: "table-row", style: {
4482
4482
  // Use flex column for column view, grid for row view
4483
4483
  display: columnView ? 'flex' : 'grid',
4484
4484
  flexDirection: columnView ? 'column' : 'row',
@@ -5422,11 +5422,14 @@ onComponentSelect, onComponentDelete, onComponentEdit, onComponentUpdate, select
5422
5422
  // Recurse
5423
5423
  if (comp.children)
5424
5424
  extractNotesAndAttachments(comp.children);
5425
- if (comp.cells)
5426
- comp.cells.forEach((row) => row.forEach((cell) => {
5427
- if (cell.components)
5428
- extractNotesAndAttachments(cell.components);
5429
- }));
5425
+ if (comp.cells && Array.isArray(comp.cells))
5426
+ comp.cells.forEach((row) => {
5427
+ if (Array.isArray(row))
5428
+ row.forEach((cell) => {
5429
+ if (cell && cell.components)
5430
+ extractNotesAndAttachments(cell.components);
5431
+ });
5432
+ });
5430
5433
  if (comp.entries)
5431
5434
  comp.entries.forEach((entry) => {
5432
5435
  if (entry.components)
@@ -5612,13 +5615,13 @@ onComponentSelect, onComponentDelete, onComponentEdit, onComponentUpdate, select
5612
5615
  if (component.name === 'table' && component.cells) {
5613
5616
  return {
5614
5617
  ...component,
5615
- cells: component.cells.map((row) => row.map((cell) => {
5618
+ cells: component.cells.map((row) => Array.isArray(row) ? row.map((cell) => {
5616
5619
  const updatedCell = { ...cell };
5617
5620
  if (updatedCell.components) {
5618
5621
  updatedCell.components = updateComponentValue(updatedCell.components);
5619
5622
  }
5620
5623
  return updatedCell;
5621
- }))
5624
+ }) : row)
5622
5625
  };
5623
5626
  }
5624
5627
  if (component.name === 'datagrid' && component.entries) {
@@ -6222,13 +6225,13 @@ onComponentSelect, onComponentDelete, onComponentEdit, onComponentUpdate, select
6222
6225
  updatedComponent.children = updateComponentValues(updatedComponent.children);
6223
6226
  }
6224
6227
  if (updatedComponent.name === 'table' && updatedComponent.cells) {
6225
- updatedComponent.cells = updatedComponent.cells.map((row) => row.map((cell) => {
6228
+ updatedComponent.cells = updatedComponent.cells.map((row) => Array.isArray(row) ? row.map((cell) => {
6226
6229
  const updatedCell = { ...cell };
6227
6230
  if (updatedCell.components) {
6228
6231
  updatedCell.components = updateComponentValues(updatedCell.components);
6229
6232
  }
6230
6233
  return updatedCell;
6231
- }));
6234
+ }) : row);
6232
6235
  }
6233
6236
  if (updatedComponent.name === 'datagrid' && updatedComponent.entries) {
6234
6237
  updatedComponent.entries = updatedComponent.entries.map((entry) => {
@@ -6409,7 +6412,7 @@ onComponentSelect, onComponentDelete, onComponentEdit, onComponentUpdate, select
6409
6412
  // Handle notes change for table cell components
6410
6413
  const updatedComponents = formComponents.map(comp => {
6411
6414
  if (comp.id === component.id && comp.cells) {
6412
- const updatedCells = comp.cells.map((row) => row.map((cell) => {
6415
+ const updatedCells = comp.cells.map((row) => Array.isArray(row) ? row.map((cell) => {
6413
6416
  if (cell.components) {
6414
6417
  const updatedCellComponents = cell.components.map((cellComp) => {
6415
6418
  if (cellComp.id === componentId) {
@@ -6426,7 +6429,7 @@ onComponentSelect, onComponentDelete, onComponentEdit, onComponentUpdate, select
6426
6429
  return { ...cell, components: updatedCellComponents };
6427
6430
  }
6428
6431
  return cell;
6429
- }));
6432
+ }) : row);
6430
6433
  return { ...comp, cells: updatedCells };
6431
6434
  }
6432
6435
  return comp;
@@ -6436,7 +6439,7 @@ onComponentSelect, onComponentDelete, onComponentEdit, onComponentUpdate, select
6436
6439
  // Handle attachment change for table cell components
6437
6440
  const updatedComponents = formComponents.map(comp => {
6438
6441
  if (comp.id === component.id && comp.cells) {
6439
- const updatedCells = comp.cells.map((row) => row.map((cell) => {
6442
+ const updatedCells = comp.cells.map((row) => Array.isArray(row) ? row.map((cell) => {
6440
6443
  if (cell.components) {
6441
6444
  const updatedCellComponents = cell.components.map((cellComp) => {
6442
6445
  if (cellComp.id === componentId) {
@@ -6453,7 +6456,7 @@ onComponentSelect, onComponentDelete, onComponentEdit, onComponentUpdate, select
6453
6456
  return { ...cell, components: updatedCellComponents };
6454
6457
  }
6455
6458
  return cell;
6456
- }));
6459
+ }) : row);
6457
6460
  return { ...comp, cells: updatedCells };
6458
6461
  }
6459
6462
  return comp;