@plasmicpkgs/plasmic-cms 0.0.232 → 0.0.233

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.
@@ -435,37 +435,6 @@ function _objectWithoutPropertiesLoose(source, excluded) {
435
435
  }
436
436
  return target;
437
437
  }
438
- function _unsupportedIterableToArray(o, minLen) {
439
- if (!o) return;
440
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
441
- var n = Object.prototype.toString.call(o).slice(8, -1);
442
- if (n === "Object" && o.constructor) n = o.constructor.name;
443
- if (n === "Map" || n === "Set") return Array.from(o);
444
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
445
- }
446
- function _arrayLikeToArray(arr, len) {
447
- if (len == null || len > arr.length) len = arr.length;
448
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
449
- return arr2;
450
- }
451
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
452
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
453
- if (it) return (it = it.call(o)).next.bind(it);
454
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
455
- if (it) o = it;
456
- var i = 0;
457
- return function () {
458
- if (i >= o.length) return {
459
- done: true
460
- };
461
- return {
462
- done: false,
463
- value: o[i++]
464
- };
465
- };
466
- }
467
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
468
- }
469
438
 
470
439
  function queryParamsToApi(params) {
471
440
  return {
@@ -826,26 +795,6 @@ function mkTableOptions(tables) {
826
795
  };
827
796
  });
828
797
  }
829
- function addNestedFieldOptions(fields, prefix) {
830
- if (prefix === void 0) {
831
- prefix = "";
832
- }
833
- var options = [];
834
- fields.forEach(function (field) {
835
- var fieldPath = prefix + field.identifier;
836
- if (field.type !== "object") {
837
- options.push({
838
- value: fieldPath,
839
- label: field.name || fieldPath
840
- });
841
- }
842
- if (field.type === "object" && field.fields) {
843
- var nestedOptions = addNestedFieldOptions(field.fields, fieldPath + ".");
844
- options.push.apply(options, nestedOptions);
845
- }
846
- });
847
- return options;
848
- }
849
798
  function mkFieldOptions(tables, tableIdentifier, types) {
850
799
  if (!tables) {
851
800
  return [];
@@ -862,7 +811,12 @@ function mkFieldOptions(tables, tableIdentifier, types) {
862
811
  return types.includes(f.type);
863
812
  });
864
813
  }
865
- var options = addNestedFieldOptions(fields);
814
+ var options = fields.map(function (f) {
815
+ return {
816
+ value: f.identifier,
817
+ label: f.name || f.identifier
818
+ };
819
+ });
866
820
  if (!options.some(function (option) {
867
821
  return option.value === "_id";
868
822
  })) {
@@ -1058,7 +1012,7 @@ var cmsQueryRepeaterMeta = {
1058
1012
  options: function options(_ref4, ctx) {
1059
1013
  var _ctx$table;
1060
1014
  var table = _ref4.table;
1061
- return mkFieldOptions(ctx == null ? void 0 : ctx.tables, (_ctx$table = ctx == null ? void 0 : ctx.table) != null ? _ctx$table : table, ["number", "boolean", "text", "long-text", "ref", "object"]);
1015
+ return mkFieldOptions(ctx == null ? void 0 : ctx.tables, (_ctx$table = ctx == null ? void 0 : ctx.table) != null ? _ctx$table : table, ["number", "boolean", "text", "long-text", "ref"]);
1062
1016
  }
1063
1017
  },
1064
1018
  filterValue: {
@@ -1291,19 +1245,24 @@ var cmsRowFieldMeta = {
1291
1245
  }
1292
1246
  },
1293
1247
  field: {
1294
- type: "dataSelector",
1295
- data: function data(_, ctx) {
1296
- var _ctx$data;
1297
- return (_ctx$data = ctx == null ? void 0 : ctx.data) != null ? _ctx$data : {};
1298
- },
1248
+ type: "choice",
1299
1249
  displayName: "Field",
1300
- description: "Field to be displayed."
1250
+ description: "Field (from model schema) to use.",
1251
+ options: function options(_ref7, ctx) {
1252
+ var _ctx$table2;
1253
+ var table = _ref7.table;
1254
+ return mkFieldOptions(ctx == null ? void 0 : ctx.tables, (_ctx$table2 = ctx == null ? void 0 : ctx.table) != null ? _ctx$table2 : table, ["number", "boolean", "text", "long-text", "date-time", "rich-text", "image", "file"]);
1255
+ },
1256
+ defaultValueHint: function defaultValueHint(_, ctx) {
1257
+ var _ctx$fieldMeta, _ctx$fieldMeta2;
1258
+ return (ctx == null || (_ctx$fieldMeta = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta.name) || (ctx == null || (_ctx$fieldMeta2 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta2.identifier);
1259
+ }
1301
1260
  },
1302
1261
  dateFormat: {
1303
1262
  type: "choice",
1304
1263
  displayName: "Date Format",
1305
- hidden: function hidden(_ref7, ctx) {
1306
- var field = _ref7.field;
1264
+ hidden: function hidden(_ref8, ctx) {
1265
+ var field = _ref8.field;
1307
1266
  if (!ctx) {
1308
1267
  return true;
1309
1268
  }
@@ -1369,13 +1328,14 @@ var cmsRowFieldMeta = {
1369
1328
  objectFit: "cover"
1370
1329
  }
1371
1330
  };
1372
- function CmsRowField(_ref8) {
1373
- var className = _ref8.className,
1374
- table = _ref8.table,
1375
- field = _ref8.field,
1376
- dateFormat = _ref8.dateFormat,
1377
- setControlContextData = _ref8.setControlContextData,
1378
- rest = _objectWithoutPropertiesLoose(_ref8, _excluded);
1331
+ function CmsRowField(_ref9) {
1332
+ var _res$row$data;
1333
+ var className = _ref9.className,
1334
+ table = _ref9.table,
1335
+ field = _ref9.field,
1336
+ dateFormat = _ref9.dateFormat,
1337
+ setControlContextData = _ref9.setControlContextData,
1338
+ rest = _objectWithoutPropertiesLoose(_ref9, _excluded);
1379
1339
  var tables = useTablesWithDataLoaded("rows");
1380
1340
  var res = useRow(tables, table);
1381
1341
  var unknown = React.createElement("div", Object.assign({
@@ -1387,16 +1347,14 @@ function CmsRowField(_ref8) {
1387
1347
  field: field,
1388
1348
  typeFilters: ["text", "long-text", "rich-text"]
1389
1349
  }) : undefined;
1390
- var filteredFields = res && tables ? filterFieldsByType(res.table, tables, ["number", "boolean", "text", "long-text", "date-time", "rich-text", "image", "file", "object"]) : undefined;
1391
1350
  if (tables) {
1392
1351
  // TODO: Only include table if __plasmic_cms_row_{table} exists.
1393
1352
  setControlContextData == null || setControlContextData(_extends({
1394
1353
  tables: tables
1395
- }, res && res.row && res.row.data ? {
1354
+ }, res && res.row ? {
1396
1355
  table: res.table,
1397
1356
  row: res.row,
1398
- fieldMeta: fieldMeta,
1399
- data: extractFields(res.row.data, filteredFields)
1357
+ fieldMeta: fieldMeta
1400
1358
  } : {}));
1401
1359
  }
1402
1360
  if (!res) {
@@ -1410,30 +1368,11 @@ function CmsRowField(_ref8) {
1410
1368
  if (!fieldMeta) {
1411
1369
  return unknown;
1412
1370
  }
1413
- if (!field) {
1414
- return React.createElement("div", null, "Please specify a valid path or select a field.");
1415
- }
1416
- var data = res.row.data;
1417
- if (data !== null && typeof data !== 'string' && fieldMeta.path) {
1418
- var pathParts = fieldMeta.path.split(".");
1419
- for (var _iterator = _createForOfIteratorHelperLoose(pathParts), _step; !(_step = _iterator()).done;) {
1420
- var part = _step.value;
1421
- if (data && typeof data === 'object' && data.hasOwnProperty(part)) {
1422
- data = data[part];
1423
- } else {
1424
- data = null;
1425
- break;
1426
- }
1427
- }
1428
- } else if (data !== null) {
1429
- data = data[fieldMeta.identifier];
1430
- } else {
1431
- data = null;
1432
- }
1371
+ var data = (_res$row$data = res.row.data) == null ? void 0 : _res$row$data[fieldMeta.identifier];
1433
1372
  if (!data) {
1434
1373
  return null;
1435
1374
  }
1436
- if (fieldMeta.type === "date-time" && dateFormat && typeof data === 'string') {
1375
+ if (fieldMeta.type === "date-time" && dateFormat) {
1437
1376
  data = dayjs(data).format(dateFormat);
1438
1377
  }
1439
1378
  return data ? renderValue(data, fieldMeta.type, _extends({
@@ -1464,10 +1403,10 @@ var cmsCountFieldMeta = {
1464
1403
  }
1465
1404
  }
1466
1405
  };
1467
- function CmsCount(_ref9) {
1468
- var className = _ref9.className,
1469
- table = _ref9.table,
1470
- rest = _objectWithoutPropertiesLoose(_ref9, _excluded2);
1406
+ function CmsCount(_ref10) {
1407
+ var className = _ref10.className,
1408
+ table = _ref10.table,
1409
+ rest = _objectWithoutPropertiesLoose(_ref10, _excluded2);
1471
1410
  var tables = useTablesWithDataLoaded("count");
1472
1411
  var res = useCount(tables, table);
1473
1412
  var unknown = React.createElement("div", Object.assign({
@@ -1495,84 +1434,12 @@ function deriveInferredTableField(opts) {
1495
1434
  var schema = tables == null || (_tables$find = tables.find(function (t) {
1496
1435
  return t.identifier === table;
1497
1436
  })) == null ? void 0 : _tables$find.schema;
1498
- function findFieldInSchema(schema, fieldIdentifier) {
1499
- return schema == null ? void 0 : schema.fields.find(function (f) {
1500
- return f.identifier === fieldIdentifier;
1501
- });
1502
- }
1503
- if (Array.isArray(field)) {
1504
- if (field.length === 1) {
1505
- return findFieldInSchema(schema, field[0]);
1506
- } else if (field.length === 2) {
1507
- var topLevelField = findFieldInSchema(schema, field[0]);
1508
- if (topLevelField && topLevelField.type === "object" && topLevelField.fields) {
1509
- var nestedField = topLevelField == null ? void 0 : topLevelField.fields.find(function (f) {
1510
- return f.identifier === field[1];
1511
- });
1512
- return nestedField ? _extends({}, nestedField, {
1513
- path: field[0] + "." + field[1]
1514
- }) : undefined;
1515
- }
1516
- }
1517
- } else if (typeof field === "string") {
1518
- return findFieldInSchema(schema, field);
1519
- } else {
1520
- return schema == null ? void 0 : schema.fields.find(function (f) {
1521
- return (typeFilters != null ? typeFilters : DEFAULT_TYPE_FILTERS).includes(f.type);
1522
- });
1523
- }
1524
- }
1525
- function filterFieldsByType(table, tables, types) {
1526
- var _tables$find2;
1527
- if (!table || !tables) return undefined;
1528
- var schema = (_tables$find2 = tables.find(function (t) {
1529
- return t.identifier === table;
1530
- })) == null ? void 0 : _tables$find2.schema;
1531
- if (!schema || !schema.fields) return [];
1532
- var filteredFields = [];
1533
- for (var _iterator2 = _createForOfIteratorHelperLoose(schema.fields), _step2; !(_step2 = _iterator2()).done;) {
1534
- var field = _step2.value;
1535
- if (types.includes(field.type)) {
1536
- var modifiedField = deepClone(field);
1537
- if (field.type === "object" && field.fields) {
1538
- modifiedField.fields = field.fields.filter(function (f) {
1539
- return types.includes(f.type);
1540
- });
1541
- }
1542
- filteredFields.push(modifiedField);
1543
- }
1544
- }
1545
- return filteredFields;
1546
- }
1547
- function extractFields(data, schema) {
1548
- var result = {};
1549
- schema.forEach(function (field) {
1550
- var fieldName = field.identifier;
1551
- var fieldType = field.type;
1552
- if (fieldType === "object" && data[fieldName] && field.fields) {
1553
- result[fieldName] = extractFields(_extends({}, data[fieldName]), field.fields || []);
1554
- } else if (data[fieldName] !== undefined) {
1555
- result[fieldName] = data[fieldName];
1556
- }
1437
+ var fieldMeta = field ? schema == null ? void 0 : schema.fields.find(function (f) {
1438
+ return f.identifier === field;
1439
+ }) : schema == null ? void 0 : schema.fields.find(function (f) {
1440
+ return (typeFilters != null ? typeFilters : DEFAULT_TYPE_FILTERS).includes(f.type);
1557
1441
  });
1558
- return result;
1559
- }
1560
- function deepClone(obj) {
1561
- if (obj === null || typeof obj !== "object") {
1562
- return obj;
1563
- }
1564
- if (Array.isArray(obj)) {
1565
- return obj.map(function (item) {
1566
- return deepClone(item);
1567
- });
1568
- }
1569
- var clonedObj = {};
1570
- for (var key in obj) {
1571
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
1572
- clonedObj[key] = deepClone(obj[key]);
1573
- }
1574
- }
1575
- return clonedObj;
1442
+ return fieldMeta;
1576
1443
  }
1577
1444
  function assertNever(_) {
1578
1445
  throw new Error("unexpected branch taken");
@@ -1584,7 +1451,6 @@ function renderValue(value, type, props) {
1584
1451
  case "text":
1585
1452
  case "long-text":
1586
1453
  case "date-time":
1587
- case "object":
1588
1454
  case "ref":
1589
1455
  return React.createElement("div", Object.assign({}, props), value);
1590
1456
  case "rich-text":
@@ -1651,14 +1517,14 @@ var cmsRowLinkMeta = {
1651
1517
  type: "choice",
1652
1518
  displayName: "Field",
1653
1519
  description: "Field (from model schema) to use.",
1654
- options: function options(_ref10, ctx) {
1655
- var _ctx$table2;
1656
- var table = _ref10.table;
1657
- return mkFieldOptions(ctx == null ? void 0 : ctx.tables, (_ctx$table2 = ctx == null ? void 0 : ctx.table) != null ? _ctx$table2 : table);
1520
+ options: function options(_ref11, ctx) {
1521
+ var _ctx$table3;
1522
+ var table = _ref11.table;
1523
+ return mkFieldOptions(ctx == null ? void 0 : ctx.tables, (_ctx$table3 = ctx == null ? void 0 : ctx.table) != null ? _ctx$table3 : table);
1658
1524
  },
1659
1525
  defaultValueHint: function defaultValueHint(_, ctx) {
1660
- var _ctx$fieldMeta, _ctx$fieldMeta2;
1661
- return (ctx == null || (_ctx$fieldMeta = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta.name) || (ctx == null || (_ctx$fieldMeta2 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta2.identifier);
1526
+ var _ctx$fieldMeta3, _ctx$fieldMeta4;
1527
+ return (ctx == null || (_ctx$fieldMeta3 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta3.name) || (ctx == null || (_ctx$fieldMeta4 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta4.identifier);
1662
1528
  }
1663
1529
  },
1664
1530
  hrefProp: {
@@ -1672,8 +1538,8 @@ var cmsRowLinkMeta = {
1672
1538
  displayName: "Optional prefix",
1673
1539
  description: "Prefix to prepend to prop value.",
1674
1540
  hidden: function hidden(_, ctx) {
1675
- var _ctx$fieldMeta3;
1676
- return (ctx == null || (_ctx$fieldMeta3 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta3.type) === "file";
1541
+ var _ctx$fieldMeta5;
1542
+ return (ctx == null || (_ctx$fieldMeta5 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta5.type) === "file";
1677
1543
  }
1678
1544
  },
1679
1545
  suffix: {
@@ -1681,21 +1547,21 @@ var cmsRowLinkMeta = {
1681
1547
  displayName: "Optional suffix",
1682
1548
  description: "Suffix to append to prop value.",
1683
1549
  hidden: function hidden(_, ctx) {
1684
- var _ctx$fieldMeta4;
1685
- return (ctx == null || (_ctx$fieldMeta4 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta4.type) === "file";
1550
+ var _ctx$fieldMeta6;
1551
+ return (ctx == null || (_ctx$fieldMeta6 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta6.type) === "file";
1686
1552
  }
1687
1553
  }
1688
1554
  }
1689
1555
  };
1690
- function CmsRowLink(_ref11) {
1691
- var _res$row$data;
1692
- var table = _ref11.table,
1693
- field = _ref11.field,
1694
- hrefProp = _ref11.hrefProp,
1695
- children = _ref11.children,
1696
- setControlContextData = _ref11.setControlContextData,
1697
- prefix = _ref11.prefix,
1698
- suffix = _ref11.suffix;
1556
+ function CmsRowLink(_ref12) {
1557
+ var _res$row$data2;
1558
+ var table = _ref12.table,
1559
+ field = _ref12.field,
1560
+ hrefProp = _ref12.hrefProp,
1561
+ children = _ref12.children,
1562
+ setControlContextData = _ref12.setControlContextData,
1563
+ prefix = _ref12.prefix,
1564
+ suffix = _ref12.suffix;
1699
1565
  var tables = useTablesWithDataLoaded("rows");
1700
1566
  var res = useRow(tables, table);
1701
1567
  if (!res || !res.row) {
@@ -1722,7 +1588,7 @@ function CmsRowLink(_ref11) {
1722
1588
  if (!children) {
1723
1589
  return null;
1724
1590
  }
1725
- var value = ((_res$row$data = res.row.data) == null ? void 0 : _res$row$data[fieldMeta.identifier]) || "";
1591
+ var value = ((_res$row$data2 = res.row.data) == null ? void 0 : _res$row$data2[fieldMeta.identifier]) || "";
1726
1592
  var childrenWithProps = React.Children.map(children, function (child) {
1727
1593
  if (React.isValidElement(child)) {
1728
1594
  var _React$cloneElement;
@@ -1765,14 +1631,14 @@ var cmsRowImageMeta = {
1765
1631
  type: "choice",
1766
1632
  displayName: "Field",
1767
1633
  description: "Field (from model schema) to use.",
1768
- options: function options(_ref12, ctx) {
1769
- var _ctx$table3;
1770
- var table = _ref12.table;
1771
- return mkFieldOptions(ctx == null ? void 0 : ctx.tables, (_ctx$table3 = ctx == null ? void 0 : ctx.table) != null ? _ctx$table3 : table, ["image"]);
1634
+ options: function options(_ref13, ctx) {
1635
+ var _ctx$table4;
1636
+ var table = _ref13.table;
1637
+ return mkFieldOptions(ctx == null ? void 0 : ctx.tables, (_ctx$table4 = ctx == null ? void 0 : ctx.table) != null ? _ctx$table4 : table, ["image"]);
1772
1638
  },
1773
1639
  defaultValueHint: function defaultValueHint(_, ctx) {
1774
- var _ctx$fieldMeta5, _ctx$fieldMeta6;
1775
- return (ctx == null || (_ctx$fieldMeta5 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta5.name) || (ctx == null || (_ctx$fieldMeta6 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta6.identifier);
1640
+ var _ctx$fieldMeta7, _ctx$fieldMeta8;
1641
+ return (ctx == null || (_ctx$fieldMeta7 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta7.name) || (ctx == null || (_ctx$fieldMeta8 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta8.identifier);
1776
1642
  }
1777
1643
  },
1778
1644
  srcProp: {
@@ -1783,13 +1649,13 @@ var cmsRowImageMeta = {
1783
1649
  }
1784
1650
  }
1785
1651
  };
1786
- function CmsRowImage(_ref13) {
1787
- var _res$row$data2;
1788
- var table = _ref13.table,
1789
- field = _ref13.field,
1790
- srcProp = _ref13.srcProp,
1791
- children = _ref13.children,
1792
- setControlContextData = _ref13.setControlContextData;
1652
+ function CmsRowImage(_ref14) {
1653
+ var _res$row$data3;
1654
+ var table = _ref14.table,
1655
+ field = _ref14.field,
1656
+ srcProp = _ref14.srcProp,
1657
+ children = _ref14.children,
1658
+ setControlContextData = _ref14.setControlContextData;
1793
1659
  var tables = useTablesWithDataLoaded("rows");
1794
1660
  var res = useRow(tables, table);
1795
1661
  if (!res || !res.row) {
@@ -1813,7 +1679,7 @@ function CmsRowImage(_ref13) {
1813
1679
  if (!fieldMeta) {
1814
1680
  return React.createElement(React.Fragment, null, children);
1815
1681
  }
1816
- var value = ((_res$row$data2 = res.row.data) == null ? void 0 : _res$row$data2[fieldMeta.identifier]) || "";
1682
+ var value = ((_res$row$data3 = res.row.data) == null ? void 0 : _res$row$data3[fieldMeta.identifier]) || "";
1817
1683
  var childrenWithProps = React.Children.map(children, function (child) {
1818
1684
  if (React.isValidElement(child) && value) {
1819
1685
  var _React$cloneElement3;
@@ -1860,14 +1726,14 @@ var cmsRowFieldValueMeta = {
1860
1726
  type: "choice",
1861
1727
  displayName: "Field",
1862
1728
  description: "Field (from model schema) to use.",
1863
- options: function options(_ref14, ctx) {
1864
- var _ctx$table4;
1865
- var table = _ref14.table;
1866
- return mkFieldOptions(ctx == null ? void 0 : ctx.tables, (_ctx$table4 = ctx == null ? void 0 : ctx.table) != null ? _ctx$table4 : table);
1729
+ options: function options(_ref15, ctx) {
1730
+ var _ctx$table5;
1731
+ var table = _ref15.table;
1732
+ return mkFieldOptions(ctx == null ? void 0 : ctx.tables, (_ctx$table5 = ctx == null ? void 0 : ctx.table) != null ? _ctx$table5 : table);
1867
1733
  },
1868
1734
  defaultValueHint: function defaultValueHint(_, ctx) {
1869
- var _ctx$fieldMeta7, _ctx$fieldMeta8;
1870
- return (ctx == null || (_ctx$fieldMeta7 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta7.name) || (ctx == null || (_ctx$fieldMeta8 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta8.identifier);
1735
+ var _ctx$fieldMeta9, _ctx$fieldMeta10;
1736
+ return (ctx == null || (_ctx$fieldMeta9 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta9.name) || (ctx == null || (_ctx$fieldMeta10 = ctx.fieldMeta) == null ? void 0 : _ctx$fieldMeta10.identifier);
1871
1737
  }
1872
1738
  },
1873
1739
  valueProp: {
@@ -1878,14 +1744,14 @@ var cmsRowFieldValueMeta = {
1878
1744
  }
1879
1745
  }
1880
1746
  };
1881
- function CmsRowFieldValue(_ref15) {
1882
- var _res$row$data3;
1883
- var table = _ref15.table,
1884
- field = _ref15.field,
1885
- valueProp = _ref15.valueProp,
1886
- children = _ref15.children,
1887
- setControlContextData = _ref15.setControlContextData,
1888
- rest = _objectWithoutPropertiesLoose(_ref15, _excluded3);
1747
+ function CmsRowFieldValue(_ref16) {
1748
+ var _res$row$data4;
1749
+ var table = _ref16.table,
1750
+ field = _ref16.field,
1751
+ valueProp = _ref16.valueProp,
1752
+ children = _ref16.children,
1753
+ setControlContextData = _ref16.setControlContextData,
1754
+ rest = _objectWithoutPropertiesLoose(_ref16, _excluded3);
1889
1755
  var tables = useTablesWithDataLoaded("rows");
1890
1756
  var res = useRow(tables, table);
1891
1757
  if (!res || !res.row) {
@@ -1909,7 +1775,7 @@ function CmsRowFieldValue(_ref15) {
1909
1775
  if (!fieldMeta) {
1910
1776
  return React.createElement(React.Fragment, null, children);
1911
1777
  }
1912
- var value = ((_res$row$data3 = res.row.data) == null ? void 0 : _res$row$data3[fieldMeta.identifier]) || "";
1778
+ var value = ((_res$row$data4 = res.row.data) == null ? void 0 : _res$row$data4[fieldMeta.identifier]) || "";
1913
1779
  var childrenWithProps = React.Children.map(children, function (child) {
1914
1780
  if (React.isValidElement(child)) {
1915
1781
  var _extends2;