tinacms 1.5.3 → 1.5.5

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.es.js CHANGED
@@ -3164,13 +3164,13 @@ const GetCollection = ({
3164
3164
  const navigate = useNavigate();
3165
3165
  const { collection, loading, error, reFetchCollection, collectionExtra } = useGetCollection(cms, collectionName, includeDocuments, folder, startCursor || "", sortKey, filterArgs) || {};
3166
3166
  useEffect(() => {
3167
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
3167
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
3168
3168
  if (loading)
3169
3169
  return;
3170
3170
  const collectionDefinition = cms.api.tina.schema.getCollection(collection.name);
3171
3171
  const allowCreate = (_c = (_b = (_a = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _a.allowedActions) == null ? void 0 : _b.create) != null ? _c : true;
3172
3172
  const allowDelete = (_f = (_e = (_d = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _d.allowedActions) == null ? void 0 : _e.delete) != null ? _f : true;
3173
- if (!allowCreate && !allowDelete && ((_h = (_g = collection.documents) == null ? void 0 : _g.edges) == null ? void 0 : _h.length) === 1 && ((_j = (_i = collection.documents) == null ? void 0 : _i.edges[0]) == null ? void 0 : _j.node.__typename) === "Document") {
3173
+ if (!allowCreate && !allowDelete && ((_h = (_g = collection.documents) == null ? void 0 : _g.edges) == null ? void 0 : _h.length) === 1 && ((_k = (_j = (_i = collection.documents) == null ? void 0 : _i.edges[0]) == null ? void 0 : _j.node) == null ? void 0 : _k.__typename) !== "Folder") {
3174
3174
  const doc = collection.documents.edges[0].node;
3175
3175
  handleNavigate(navigate, cms, collection, collectionDefinition, doc);
3176
3176
  }
package/dist/index.js CHANGED
@@ -3179,13 +3179,13 @@ This will work when developing locally but NOT when deployed to production.
3179
3179
  const navigate = reactRouterDom.useNavigate();
3180
3180
  const { collection, loading, error, reFetchCollection, collectionExtra } = useGetCollection(cms, collectionName, includeDocuments, folder, startCursor || "", sortKey, filterArgs) || {};
3181
3181
  React.useEffect(() => {
3182
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
3182
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
3183
3183
  if (loading)
3184
3184
  return;
3185
3185
  const collectionDefinition = cms.api.tina.schema.getCollection(collection.name);
3186
3186
  const allowCreate = (_c = (_b = (_a = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _a.allowedActions) == null ? void 0 : _b.create) != null ? _c : true;
3187
3187
  const allowDelete = (_f = (_e = (_d = collectionDefinition == null ? void 0 : collectionDefinition.ui) == null ? void 0 : _d.allowedActions) == null ? void 0 : _e.delete) != null ? _f : true;
3188
- if (!allowCreate && !allowDelete && ((_h = (_g = collection.documents) == null ? void 0 : _g.edges) == null ? void 0 : _h.length) === 1 && ((_j = (_i = collection.documents) == null ? void 0 : _i.edges[0]) == null ? void 0 : _j.node.__typename) === "Document") {
3188
+ if (!allowCreate && !allowDelete && ((_h = (_g = collection.documents) == null ? void 0 : _g.edges) == null ? void 0 : _h.length) === 1 && ((_k = (_j = (_i = collection.documents) == null ? void 0 : _i.edges[0]) == null ? void 0 : _j.node) == null ? void 0 : _k.__typename) !== "Folder") {
3189
3189
  const doc = collection.documents.edges[0].node;
3190
3190
  handleNavigate(navigate, cms, collection, collectionDefinition, doc);
3191
3191
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinacms",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "exports": {
@@ -56,7 +56,7 @@
56
56
  "@headlessui/react": "^1.5.0",
57
57
  "@heroicons/react": "^1.0.4",
58
58
  "@react-hook/window-size": "^3.0.7",
59
- "@tinacms/schema-tools": "1.4.3",
59
+ "@tinacms/schema-tools": "1.4.4",
60
60
  "@tinacms/sharedctx": "1.0.1",
61
61
  "@tinacms/toolkit": "1.7.1",
62
62
  "crypto-js": "^4.0.0",