tinacms 0.69.1 → 0.69.2
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 +9 -8
- package/dist/index.js +9 -8
- package/package.json +4 -4
package/dist/index.es.js
CHANGED
|
@@ -3857,9 +3857,9 @@ const useDocumentCreatorPlugin = (args) => {
|
|
|
3857
3857
|
}
|
|
3858
3858
|
return true;
|
|
3859
3859
|
}
|
|
3860
|
-
const isValid = /^[_a-zA-
|
|
3860
|
+
const isValid = /^[_a-zA-Z0-9][\-_a-zA-Z0-9]*$/.test(value);
|
|
3861
3861
|
if (value && !isValid) {
|
|
3862
|
-
return "Must begin with a-z, A-Z, or _ and contain only a-z, A-Z, 0-9, - or _";
|
|
3862
|
+
return "Must begin with a-z, A-Z, 0-9, or _ and contain only a-z, A-Z, 0-9, - or _";
|
|
3863
3863
|
}
|
|
3864
3864
|
}
|
|
3865
3865
|
}
|
|
@@ -4750,9 +4750,10 @@ const useGetCollection = (cms, collectionName, includeDocuments = true, after =
|
|
|
4750
4750
|
const [resetState, setResetSate] = useState(0);
|
|
4751
4751
|
useEffect(() => {
|
|
4752
4752
|
const fetchCollection = async () => {
|
|
4753
|
+
var _a;
|
|
4753
4754
|
if (await api.isAuthenticated()) {
|
|
4754
4755
|
const { name, order } = JSON.parse(sortKey || "{}");
|
|
4755
|
-
const validSortKey = collectionExtra.fields.map((x) => x.name).includes(name) ? name : void 0;
|
|
4756
|
+
const validSortKey = ((_a = collectionExtra.fields) == null ? void 0 : _a.map((x) => x.name).includes(name)) ? name : void 0;
|
|
4756
4757
|
try {
|
|
4757
4758
|
const collection2 = await api.fetchCollection(collectionName, includeDocuments, after, validSortKey, order);
|
|
4758
4759
|
setCollection(collection2);
|
|
@@ -4860,12 +4861,12 @@ const CollectionListPage = () => {
|
|
|
4860
4861
|
startCursor: endCursor,
|
|
4861
4862
|
sortKey
|
|
4862
4863
|
}, (collection, _loading, reFetchCollection, collectionExtra) => {
|
|
4863
|
-
var _a, _b;
|
|
4864
|
+
var _a, _b, _c;
|
|
4864
4865
|
const totalCount = collection.documents.totalCount;
|
|
4865
4866
|
const documents = collection.documents.edges;
|
|
4866
4867
|
const admin = cms.api.admin;
|
|
4867
4868
|
const pageInfo = collection.documents.pageInfo;
|
|
4868
|
-
const fields = collectionExtra.fields.filter((x) => ["string", "number", "datetime"].includes(x.type));
|
|
4869
|
+
const fields = (_a = collectionExtra.fields) == null ? void 0 : _a.filter((x) => ["string", "number", "datetime"].includes(x.type));
|
|
4869
4870
|
return /* @__PURE__ */ React.createElement(PageWrapper, null, /* @__PURE__ */ React.createElement(React.Fragment, null, open && /* @__PURE__ */ React.createElement(DeleteModal, {
|
|
4870
4871
|
filename: vars.relativePath,
|
|
4871
4872
|
deleteFunc: async () => {
|
|
@@ -4881,7 +4882,7 @@ const CollectionListPage = () => {
|
|
|
4881
4882
|
},
|
|
4882
4883
|
close: () => setOpen(false)
|
|
4883
4884
|
}), /* @__PURE__ */ React.createElement(PageHeader, {
|
|
4884
|
-
isLocalMode: (
|
|
4885
|
+
isLocalMode: (_c = (_b = cms == null ? void 0 : cms.api) == null ? void 0 : _b.tina) == null ? void 0 : _c.isLocalMode
|
|
4885
4886
|
}, /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
|
|
4886
4887
|
className: "flex flex-col gap-4"
|
|
4887
4888
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
@@ -5133,9 +5134,9 @@ const RenderForm$1 = ({ cms, collection, templateName, mutationInfo }) => {
|
|
|
5133
5134
|
}
|
|
5134
5135
|
return true;
|
|
5135
5136
|
}
|
|
5136
|
-
const isValid = /^[_a-zA-
|
|
5137
|
+
const isValid = /^[_a-zA-Z0-9][\.\-_\/a-zA-Z0-9]*$/.test(value);
|
|
5137
5138
|
if (value && !isValid) {
|
|
5138
|
-
return "Must begin with a-z, A-Z, or _ and contain only a-z, A-Z, 0-9, -, _, ., or /.";
|
|
5139
|
+
return "Must begin with a-z, A-Z, 0-9, or _ and contain only a-z, A-Z, 0-9, -, _, ., or /.";
|
|
5139
5140
|
}
|
|
5140
5141
|
}
|
|
5141
5142
|
},
|
package/dist/index.js
CHANGED
|
@@ -3875,9 +3875,9 @@ mutation addPendingDocumentMutation(
|
|
|
3875
3875
|
}
|
|
3876
3876
|
return true;
|
|
3877
3877
|
}
|
|
3878
|
-
const isValid = /^[_a-zA-
|
|
3878
|
+
const isValid = /^[_a-zA-Z0-9][\-_a-zA-Z0-9]*$/.test(value);
|
|
3879
3879
|
if (value && !isValid) {
|
|
3880
|
-
return "Must begin with a-z, A-Z, or _ and contain only a-z, A-Z, 0-9, - or _";
|
|
3880
|
+
return "Must begin with a-z, A-Z, 0-9, or _ and contain only a-z, A-Z, 0-9, - or _";
|
|
3881
3881
|
}
|
|
3882
3882
|
}
|
|
3883
3883
|
}
|
|
@@ -4768,9 +4768,10 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
4768
4768
|
const [resetState, setResetSate] = React.useState(0);
|
|
4769
4769
|
React.useEffect(() => {
|
|
4770
4770
|
const fetchCollection = async () => {
|
|
4771
|
+
var _a;
|
|
4771
4772
|
if (await api.isAuthenticated()) {
|
|
4772
4773
|
const { name, order } = JSON.parse(sortKey || "{}");
|
|
4773
|
-
const validSortKey = collectionExtra.fields.map((x) => x.name).includes(name) ? name : void 0;
|
|
4774
|
+
const validSortKey = ((_a = collectionExtra.fields) == null ? void 0 : _a.map((x) => x.name).includes(name)) ? name : void 0;
|
|
4774
4775
|
try {
|
|
4775
4776
|
const collection2 = await api.fetchCollection(collectionName, includeDocuments, after, validSortKey, order);
|
|
4776
4777
|
setCollection(collection2);
|
|
@@ -4878,12 +4879,12 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
4878
4879
|
startCursor: endCursor,
|
|
4879
4880
|
sortKey
|
|
4880
4881
|
}, (collection, _loading, reFetchCollection, collectionExtra) => {
|
|
4881
|
-
var _a, _b;
|
|
4882
|
+
var _a, _b, _c;
|
|
4882
4883
|
const totalCount = collection.documents.totalCount;
|
|
4883
4884
|
const documents = collection.documents.edges;
|
|
4884
4885
|
const admin = cms.api.admin;
|
|
4885
4886
|
const pageInfo = collection.documents.pageInfo;
|
|
4886
|
-
const fields = collectionExtra.fields.filter((x) => ["string", "number", "datetime"].includes(x.type));
|
|
4887
|
+
const fields = (_a = collectionExtra.fields) == null ? void 0 : _a.filter((x) => ["string", "number", "datetime"].includes(x.type));
|
|
4887
4888
|
return /* @__PURE__ */ React__default["default"].createElement(PageWrapper, null, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, open && /* @__PURE__ */ React__default["default"].createElement(DeleteModal, {
|
|
4888
4889
|
filename: vars.relativePath,
|
|
4889
4890
|
deleteFunc: async () => {
|
|
@@ -4899,7 +4900,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
4899
4900
|
},
|
|
4900
4901
|
close: () => setOpen(false)
|
|
4901
4902
|
}), /* @__PURE__ */ React__default["default"].createElement(PageHeader, {
|
|
4902
|
-
isLocalMode: (
|
|
4903
|
+
isLocalMode: (_c = (_b = cms == null ? void 0 : cms.api) == null ? void 0 : _b.tina) == null ? void 0 : _c.isLocalMode
|
|
4903
4904
|
}, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
4904
4905
|
className: "flex flex-col gap-4"
|
|
4905
4906
|
}, /* @__PURE__ */ React__default["default"].createElement("h3", {
|
|
@@ -5151,9 +5152,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
5151
5152
|
}
|
|
5152
5153
|
return true;
|
|
5153
5154
|
}
|
|
5154
|
-
const isValid = /^[_a-zA-
|
|
5155
|
+
const isValid = /^[_a-zA-Z0-9][\.\-_\/a-zA-Z0-9]*$/.test(value);
|
|
5155
5156
|
if (value && !isValid) {
|
|
5156
|
-
return "Must begin with a-z, A-Z, or _ and contain only a-z, A-Z, 0-9, -, _, ., or /.";
|
|
5157
|
+
return "Must begin with a-z, A-Z, 0-9, or _ and contain only a-z, A-Z, 0-9, -, _, ., or /.";
|
|
5157
5158
|
}
|
|
5158
5159
|
}
|
|
5159
5160
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "0.69.
|
|
3
|
+
"version": "0.69.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"exports": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@react-hook/window-size": "^3.0.7",
|
|
51
51
|
"@tinacms/schema-tools": "0.1.0",
|
|
52
52
|
"@tinacms/sharedctx": "0.1.2",
|
|
53
|
-
"@tinacms/toolkit": "0.57.
|
|
53
|
+
"@tinacms/toolkit": "0.57.1",
|
|
54
54
|
"crypto-js": "^4.0.0",
|
|
55
55
|
"fetch-ponyfill": "^7.1.0",
|
|
56
56
|
"final-form": "4.20.1",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@testing-library/react": "^12.0.0",
|
|
71
71
|
"@testing-library/react-hooks": "^7.0.2",
|
|
72
72
|
"@testing-library/user-event": "^12.7.0",
|
|
73
|
-
"@tinacms/scripts": "0.51.
|
|
73
|
+
"@tinacms/scripts": "0.51.1",
|
|
74
74
|
"@types/jest": "^27.0.1",
|
|
75
75
|
"@types/lodash": "^4.14.169",
|
|
76
76
|
"@types/node": "^14.0.13",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"isomorphic-fetch": "^3.0.0",
|
|
81
81
|
"jest": "^27.0.6",
|
|
82
82
|
"jest-file-snapshot": "^0.5.0",
|
|
83
|
-
"next": "
|
|
83
|
+
"next": "12.2.4",
|
|
84
84
|
"react": "17.0.2",
|
|
85
85
|
"react-dom": "17.0.2",
|
|
86
86
|
"react-is": "^17.0.2",
|