@plasmicpkgs/plasmic-cms 0.0.158 → 0.0.159

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.
@@ -1080,12 +1080,21 @@ function mkFieldOptions(tables, tableIdentifier, types) {
1080
1080
  return types.includes(f.type);
1081
1081
  });
1082
1082
  }
1083
- return fields.map(function (f) {
1083
+ var options = fields.map(function (f) {
1084
1084
  return {
1085
1085
  value: f.identifier,
1086
1086
  label: f.name || f.identifier
1087
1087
  };
1088
1088
  });
1089
+ if (!options.some(function (option) {
1090
+ return option.value === "_id";
1091
+ })) {
1092
+ options.push({
1093
+ label: "System-assigned ID",
1094
+ value: "_id"
1095
+ });
1096
+ }
1097
+ return options;
1089
1098
  }
1090
1099
 
1091
1100
  var _excluded = ["className", "table", "field", "dateFormat", "setControlContextData"],
@@ -1201,7 +1210,7 @@ function isDatabaseConfigured(config) {
1201
1210
  }
1202
1211
  var cmsQueryRepeaterMeta = {
1203
1212
  name: componentPrefix + "-query-repeater",
1204
- displayName: "CMS Data Loader",
1213
+ displayName: "CMS Data Fetcher",
1205
1214
  description: "Fetches CMS data and repeats content of children once for every row fetched.",
1206
1215
  importName: "CmsQueryRepeater",
1207
1216
  importPath: modulePath,
@@ -1438,7 +1447,12 @@ var cmsRowFieldMeta = {
1438
1447
  table: {
1439
1448
  type: "choice",
1440
1449
  displayName: "Model",
1441
- description: "CMS model (table) to use.",
1450
+ hidden: function hidden(props, ctx) {
1451
+ var _ctx$tables$length, _ctx$tables;
1452
+ return ((_ctx$tables$length = ctx == null ? void 0 : (_ctx$tables = ctx.tables) == null ? void 0 : _ctx$tables.length) != null ? _ctx$tables$length : 0) <= 1 && !props.table;
1453
+ },
1454
+ helpText: "Pick model from a CMS Data Fetcher",
1455
+ description: "Usually not used! Only with multiple CMS Data Loaders, use this to choose which to show. Otherwise, go select the CMS Data Loader if you want to load different data.",
1442
1456
  options: function options(_, ctx) {
1443
1457
  return mkTableOptions(ctx == null ? void 0 : ctx.tables);
1444
1458
  },
@@ -1657,7 +1671,12 @@ var cmsRowLinkMeta = {
1657
1671
  table: {
1658
1672
  type: "choice",
1659
1673
  displayName: "Model",
1660
- description: "CMS model (table) to use.",
1674
+ hidden: function hidden(props, ctx) {
1675
+ var _ctx$tables$length2, _ctx$tables2;
1676
+ return ((_ctx$tables$length2 = ctx == null ? void 0 : (_ctx$tables2 = ctx.tables) == null ? void 0 : _ctx$tables2.length) != null ? _ctx$tables$length2 : 0) <= 1 && !props.table;
1677
+ },
1678
+ helpText: "Pick model from a CMS Data Fetcher",
1679
+ description: "Usually not used! Only with multiple CMS Data Loaders, use this to choose which to show. Otherwise, go select the CMS Data Loader if you want to load different data.",
1661
1680
  options: function options(_, ctx) {
1662
1681
  return mkTableOptions(ctx == null ? void 0 : ctx.tables);
1663
1682
  },
@@ -1766,7 +1785,12 @@ var cmsRowImageMeta = {
1766
1785
  table: {
1767
1786
  type: "choice",
1768
1787
  displayName: "Model",
1769
- description: "CMS model (table) to use.",
1788
+ hidden: function hidden(props, ctx) {
1789
+ var _ctx$tables$length3, _ctx$tables3;
1790
+ return ((_ctx$tables$length3 = ctx == null ? void 0 : (_ctx$tables3 = ctx.tables) == null ? void 0 : _ctx$tables3.length) != null ? _ctx$tables$length3 : 0) <= 1 && !props.table;
1791
+ },
1792
+ helpText: "Pick model from a CMS Data Fetcher",
1793
+ description: "Usually not used! Only with multiple CMS Data Loaders, use this to choose which to show. Otherwise, go select the CMS Data Loader if you want to load different data.",
1770
1794
  options: function options(_, ctx) {
1771
1795
  return mkTableOptions(ctx == null ? void 0 : ctx.tables);
1772
1796
  },
@@ -1856,7 +1880,12 @@ var cmsRowFieldValueMeta = {
1856
1880
  table: {
1857
1881
  type: "choice",
1858
1882
  displayName: "Model",
1859
- description: "CMS model (table) to use.",
1883
+ hidden: function hidden(props, ctx) {
1884
+ var _ctx$tables$length4, _ctx$tables4;
1885
+ return ((_ctx$tables$length4 = ctx == null ? void 0 : (_ctx$tables4 = ctx.tables) == null ? void 0 : _ctx$tables4.length) != null ? _ctx$tables$length4 : 0) <= 1 && !props.table;
1886
+ },
1887
+ helpText: "Pick model from a CMS Data Fetcher",
1888
+ description: "Usually not used! Only with multiple CMS Data Loaders, use this to choose which to show. Otherwise, go select the CMS Data Loader if you want to load different data.",
1860
1889
  options: function options(_, ctx) {
1861
1890
  return mkTableOptions(ctx == null ? void 0 : ctx.tables);
1862
1891
  },