tinacms 0.69.12 → 0.69.14
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 +4 -4
- package/dist/index.js +4 -4
- package/package.json +3 -3
package/dist/index.es.js
CHANGED
|
@@ -5172,9 +5172,9 @@ const RenderForm$1 = ({ cms, collection, templateName, mutationInfo }) => {
|
|
|
5172
5172
|
schema,
|
|
5173
5173
|
template
|
|
5174
5174
|
});
|
|
5175
|
-
let slugFunction = (_b = (_a =
|
|
5175
|
+
let slugFunction = (_b = (_a = template == null ? void 0 : template.ui) == null ? void 0 : _a.filename) == null ? void 0 : _b.slugify;
|
|
5176
5176
|
if (!slugFunction) {
|
|
5177
|
-
const titleField = (_c =
|
|
5177
|
+
const titleField = (_c = template == null ? void 0 : template.fields.find((x) => x.required && x.type === "string" && x.isTitle)) == null ? void 0 : _c.name;
|
|
5178
5178
|
if (titleField) {
|
|
5179
5179
|
slugFunction = (values) => {
|
|
5180
5180
|
var _a2;
|
|
@@ -5189,7 +5189,7 @@ const RenderForm$1 = ({ cms, collection, templateName, mutationInfo }) => {
|
|
|
5189
5189
|
extraSubscribeValues: { active: true, submitting: true, touched: true },
|
|
5190
5190
|
onChange: (values) => {
|
|
5191
5191
|
var _a3;
|
|
5192
|
-
if (slugFunction &&
|
|
5192
|
+
if (slugFunction && (values == null ? void 0 : values.active) !== "filename" && !(values == null ? void 0 : values.submitting) && !((_a3 = values.touched) == null ? void 0 : _a3.filename)) {
|
|
5193
5193
|
const value = slugFunction(values == null ? void 0 : values.values);
|
|
5194
5194
|
form.finalForm.change("filename", value);
|
|
5195
5195
|
}
|
|
@@ -5201,7 +5201,7 @@ const RenderForm$1 = ({ cms, collection, templateName, mutationInfo }) => {
|
|
|
5201
5201
|
name: "filename",
|
|
5202
5202
|
label: "Filename",
|
|
5203
5203
|
component: "text",
|
|
5204
|
-
disabled: (_b2 = (_a2 =
|
|
5204
|
+
disabled: (_b2 = (_a2 = template == null ? void 0 : template.ui) == null ? void 0 : _a2.filename) == null ? void 0 : _b2.disabled,
|
|
5205
5205
|
description: /* @__PURE__ */ React.createElement("span", null, "A unique filename for the content.", /* @__PURE__ */ React.createElement("br", null), "Examples: ", /* @__PURE__ */ React.createElement("code", null, "My_Document"), ", ", /* @__PURE__ */ React.createElement("code", null, "My_Document.en"), ",", " ", /* @__PURE__ */ React.createElement("code", null, "sub-folder/My_Document")),
|
|
5206
5206
|
placeholder: `My_Document`,
|
|
5207
5207
|
validate: (value, allValues, meta) => {
|
package/dist/index.js
CHANGED
|
@@ -5190,9 +5190,9 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
5190
5190
|
schema,
|
|
5191
5191
|
template
|
|
5192
5192
|
});
|
|
5193
|
-
let slugFunction = (_b = (_a =
|
|
5193
|
+
let slugFunction = (_b = (_a = template == null ? void 0 : template.ui) == null ? void 0 : _a.filename) == null ? void 0 : _b.slugify;
|
|
5194
5194
|
if (!slugFunction) {
|
|
5195
|
-
const titleField = (_c =
|
|
5195
|
+
const titleField = (_c = template == null ? void 0 : template.fields.find((x) => x.required && x.type === "string" && x.isTitle)) == null ? void 0 : _c.name;
|
|
5196
5196
|
if (titleField) {
|
|
5197
5197
|
slugFunction = (values) => {
|
|
5198
5198
|
var _a2;
|
|
@@ -5207,7 +5207,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
5207
5207
|
extraSubscribeValues: { active: true, submitting: true, touched: true },
|
|
5208
5208
|
onChange: (values) => {
|
|
5209
5209
|
var _a3;
|
|
5210
|
-
if (slugFunction &&
|
|
5210
|
+
if (slugFunction && (values == null ? void 0 : values.active) !== "filename" && !(values == null ? void 0 : values.submitting) && !((_a3 = values.touched) == null ? void 0 : _a3.filename)) {
|
|
5211
5211
|
const value = slugFunction(values == null ? void 0 : values.values);
|
|
5212
5212
|
form.finalForm.change("filename", value);
|
|
5213
5213
|
}
|
|
@@ -5219,7 +5219,7 @@ This will work when developing locally but NOT when deployed to production.
|
|
|
5219
5219
|
name: "filename",
|
|
5220
5220
|
label: "Filename",
|
|
5221
5221
|
component: "text",
|
|
5222
|
-
disabled: (_b2 = (_a2 =
|
|
5222
|
+
disabled: (_b2 = (_a2 = template == null ? void 0 : template.ui) == null ? void 0 : _a2.filename) == null ? void 0 : _b2.disabled,
|
|
5223
5223
|
description: /* @__PURE__ */ React__default["default"].createElement("span", null, "A unique filename for the content.", /* @__PURE__ */ React__default["default"].createElement("br", null), "Examples: ", /* @__PURE__ */ React__default["default"].createElement("code", null, "My_Document"), ", ", /* @__PURE__ */ React__default["default"].createElement("code", null, "My_Document.en"), ",", " ", /* @__PURE__ */ React__default["default"].createElement("code", null, "sub-folder/My_Document")),
|
|
5224
5224
|
placeholder: `My_Document`,
|
|
5225
5225
|
validate: (value, allValues, meta) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinacms",
|
|
3
|
-
"version": "0.69.
|
|
3
|
+
"version": "0.69.14",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.es.js",
|
|
6
6
|
"exports": {
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@headlessui/react": "^1.5.0",
|
|
55
55
|
"@heroicons/react": "^1.0.4",
|
|
56
56
|
"@react-hook/window-size": "^3.0.7",
|
|
57
|
-
"@tinacms/schema-tools": "0.1.
|
|
57
|
+
"@tinacms/schema-tools": "0.1.6",
|
|
58
58
|
"@tinacms/sharedctx": "0.1.3",
|
|
59
|
-
"@tinacms/toolkit": "0.57.
|
|
59
|
+
"@tinacms/toolkit": "0.57.10",
|
|
60
60
|
"crypto-js": "^4.0.0",
|
|
61
61
|
"fetch-ponyfill": "^7.1.0",
|
|
62
62
|
"final-form": "4.20.1",
|