tinacms 3.8.1 → 3.8.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/README.md +3 -5
- package/dist/index.js +19 -17
- package/dist/toolkit/core/subscribable.d.ts +2 -2
- package/dist/toolkit/forms/field.d.ts +1 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
[](https://www.npmjs.com/package/tinacms)
|
|
3
3
|
[](https://github.com/tinacms/tinacms/actions/workflows/main.yml)
|
|
4
4
|
|
|
5
|
-
# [](https://tina.io)
|
|
6
6
|
|
|
7
|
-
[](https://tina.io/)
|
|
8
8
|
|
|
9
9
|
Tina is a headless content management system with support for **Markdown**, MDX, JSON, YAML, and more.
|
|
10
10
|
|
|
@@ -35,7 +35,7 @@ Visit [Tina's documentation](https://tina.io/docs/) to learn more.
|
|
|
35
35
|
[](https://twitter.com/intent/tweet?url=https%3A%2F%2Ftinacms.org&text=I%20just%20checked%20out%20@tinacms%20on%20GitHub%20and%20it%20is%20sweet%21&hashtags=TinaCMS%2Cjamstack%2Cheadlesscms)
|
|
36
36
|
[](https://github.com/tinacms/tinacms/discussions)
|
|
37
37
|
|
|
38
|
-
Visit the [GitHub Discussions](https://github.com/tinacms/tinacms/discussions) or our [Community Discord](https://discord.com/invite/zumN63Ybpf) to ask questions, or look us up on
|
|
38
|
+
Visit the [GitHub Discussions](https://github.com/tinacms/tinacms/discussions) or our [Community Discord](https://discord.com/invite/zumN63Ybpf) to ask questions, or look us up on Twitter at [@tinacms](https://twitter.com/tinacms).
|
|
39
39
|
|
|
40
40
|
<!-- ## Changelog
|
|
41
41
|
|
|
@@ -75,5 +75,3 @@ Please see our [./CONTRIBUTING.md](https://github.com/tinacms/tinacms/blob/main/
|
|
|
75
75
|
- Adam Cogan ([@adamcogan](https://github.com/adamcogan))
|
|
76
76
|
|
|
77
77
|
View our awesome SSW devs at [ssw.com.au/people](https://www.ssw.com.au/people/?skill=%F0%9F%A6%99-TinaCMS).
|
|
78
|
-
|
|
79
|
-

|
package/dist/index.js
CHANGED
|
@@ -978,7 +978,7 @@ const FieldMeta = ({
|
|
|
978
978
|
onMouseOver: () => setHoveredField({ id: tinaForm.id, fieldName: name2 }),
|
|
979
979
|
onMouseOut: () => setHoveredField({ id: null, fieldName: null }),
|
|
980
980
|
onClick: () => setFocusedField({ id: tinaForm.id, fieldName: name2 }),
|
|
981
|
-
style: { zIndex: index ? 1e3 - index : void 0 },
|
|
981
|
+
style: { zIndex: index != null ? 1e3 - index : void 0 },
|
|
982
982
|
...props
|
|
983
983
|
},
|
|
984
984
|
(label !== false || description) && /* @__PURE__ */ React.createElement(FieldLabel, { name: name2 }, label !== false && /* @__PURE__ */ React.createElement(React.Fragment, null, label || name2), description && /* @__PURE__ */ React.createElement(FieldDescription, null, description)),
|
|
@@ -6150,7 +6150,7 @@ const ListFieldMeta = ({
|
|
|
6150
6150
|
margin,
|
|
6151
6151
|
...hoverEvents,
|
|
6152
6152
|
onClick: () => setFocusedField({ id: tinaForm.id, fieldName: name2 }),
|
|
6153
|
-
style: { zIndex: index ? 1e3 - index : void 0 },
|
|
6153
|
+
style: { zIndex: index != null ? 1e3 - index : void 0 },
|
|
6154
6154
|
...props
|
|
6155
6155
|
},
|
|
6156
6156
|
/* @__PURE__ */ React.createElement(ListHeader, null, /* @__PURE__ */ React.createElement(ListMeta, null, label !== false && /* @__PURE__ */ React.createElement(ListLabel, null, label || name2), description && /* @__PURE__ */ React.createElement(FieldDescription, { className: "whitespace-nowrap text-ellipsis overflow-hidden" }, description)), actions && actions),
|
|
@@ -8279,7 +8279,10 @@ const format$1 = (date, format2) => {
|
|
|
8279
8279
|
return m.format(format2);
|
|
8280
8280
|
};
|
|
8281
8281
|
const DateField = wrapFieldsWithMeta(
|
|
8282
|
-
({
|
|
8282
|
+
({
|
|
8283
|
+
input,
|
|
8284
|
+
field: { dateFormat, timeFormat, onChange, required, ...rest }
|
|
8285
|
+
}) => {
|
|
8283
8286
|
const granularity = timeFormat ? "minute" : "day";
|
|
8284
8287
|
const inputRef = React__default.useRef(null);
|
|
8285
8288
|
React__default.useEffect(() => {
|
|
@@ -8303,14 +8306,16 @@ const DateField = wrapFieldsWithMeta(
|
|
|
8303
8306
|
}
|
|
8304
8307
|
return dateFormat;
|
|
8305
8308
|
}, [dateFormat]);
|
|
8306
|
-
const date = input.value ? new Date(input.value) : /* @__PURE__ */ new Date();
|
|
8309
|
+
const date = input.value ? new Date(input.value) : required === false ? void 0 : /* @__PURE__ */ new Date();
|
|
8307
8310
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
8308
8311
|
DateTimePicker,
|
|
8309
8312
|
{
|
|
8310
8313
|
...rest,
|
|
8311
8314
|
ref: inputRef,
|
|
8312
8315
|
granularity,
|
|
8313
|
-
onChange: (value) => input.onChange(
|
|
8316
|
+
onChange: (value) => input.onChange(
|
|
8317
|
+
value ? value.toISOString() : required !== false ? (/* @__PURE__ */ new Date()).toISOString() : value
|
|
8318
|
+
),
|
|
8314
8319
|
timeFormat: getTimeFormat(),
|
|
8315
8320
|
hourCycle: 12,
|
|
8316
8321
|
dateFormat: getDateFormat(),
|
|
@@ -12775,7 +12780,7 @@ const NavProvider = ({
|
|
|
12775
12780
|
const name = "tinacms";
|
|
12776
12781
|
const type = "module";
|
|
12777
12782
|
const typings = "dist/index.d.ts";
|
|
12778
|
-
const version$1 = "3.8.
|
|
12783
|
+
const version$1 = "3.8.2";
|
|
12779
12784
|
const main = "dist/index.js";
|
|
12780
12785
|
const module = "./dist/index.js";
|
|
12781
12786
|
const exports = {
|
|
@@ -13966,7 +13971,10 @@ const FormsView = ({ loadingPlaceholder } = {}) => {
|
|
|
13966
13971
|
const isEditing = !!activeForm;
|
|
13967
13972
|
const formMetas = cms.plugins.all("form:meta");
|
|
13968
13973
|
if (!isReferencingManyForms) {
|
|
13969
|
-
|
|
13974
|
+
if (!activeForm) {
|
|
13975
|
+
return /* @__PURE__ */ React.createElement(SidebarNoFormsPlaceholder, null);
|
|
13976
|
+
}
|
|
13977
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex-1 flex flex-col flex-nowrap overflow-hidden h-full w-full relative bg-white" }, /* @__PURE__ */ React.createElement(
|
|
13970
13978
|
FormHeader,
|
|
13971
13979
|
{
|
|
13972
13980
|
activeForm,
|
|
@@ -13974,13 +13982,7 @@ const FormsView = ({ loadingPlaceholder } = {}) => {
|
|
|
13974
13982
|
repoProvider: cms.api.admin.api.schema.config.config.repoProvider,
|
|
13975
13983
|
isLocalMode: (_b = (_a = cms.api) == null ? void 0 : _a.tina) == null ? void 0 : _b.isLocalMode
|
|
13976
13984
|
}
|
|
13977
|
-
), formMetas == null ? void 0 : formMetas.map((meta) => /* @__PURE__ */ React.createElement(React.Fragment, { key: meta.name }, /* @__PURE__ */ React.createElement(meta.Component, null))), /* @__PURE__ */ React.createElement(
|
|
13978
|
-
FormBuilder,
|
|
13979
|
-
{
|
|
13980
|
-
form: activeForm,
|
|
13981
|
-
onPristineChange: setFormIsPristine
|
|
13982
|
-
}
|
|
13983
|
-
)));
|
|
13985
|
+
), formMetas == null ? void 0 : formMetas.map((meta) => /* @__PURE__ */ React.createElement(React.Fragment, { key: meta.name }, /* @__PURE__ */ React.createElement(meta.Component, null))), /* @__PURE__ */ React.createElement(FormBuilder, { form: activeForm, onPristineChange: setFormIsPristine }));
|
|
13984
13986
|
}
|
|
13985
13987
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
13986
13988
|
Transition,
|
|
@@ -72989,7 +72991,7 @@ const SearchInput = ({
|
|
|
72989
72991
|
if (e.key === "Enter") {
|
|
72990
72992
|
e.preventDefault();
|
|
72991
72993
|
if (searchInput.trim()) {
|
|
72992
|
-
setSearch(searchInput);
|
|
72994
|
+
setSearch(searchInput.trim());
|
|
72993
72995
|
setSearchLoaded(false);
|
|
72994
72996
|
}
|
|
72995
72997
|
}
|
|
@@ -72997,9 +72999,9 @@ const SearchInput = ({
|
|
|
72997
72999
|
const handleSubmit = (e) => {
|
|
72998
73000
|
e.preventDefault();
|
|
72999
73001
|
if (searchInput.trim()) {
|
|
73000
|
-
setSearch(searchInput);
|
|
73002
|
+
setSearch(searchInput.trim());
|
|
73001
73003
|
captureEvent(CollectionListPageSearchEvent, {
|
|
73002
|
-
searchQuery: searchInput
|
|
73004
|
+
searchQuery: searchInput.trim()
|
|
73003
73005
|
});
|
|
73004
73006
|
setSearchLoaded(false);
|
|
73005
73007
|
}
|
|
@@ -36,7 +36,7 @@ export declare class Subscribable {
|
|
|
36
36
|
/**
|
|
37
37
|
* Removes the given listener from the `Subscribable` object.
|
|
38
38
|
*
|
|
39
|
-
* @param listener The
|
|
39
|
+
* @param listener The function to be removed.
|
|
40
40
|
*/
|
|
41
41
|
unsubscribe(listener: Function): void;
|
|
42
42
|
/**
|
|
@@ -68,5 +68,5 @@ export declare class Subscribable {
|
|
|
68
68
|
* cup.empty() // Logs: false
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
|
-
protected
|
|
71
|
+
protected notifySubscribers(): void;
|
|
72
72
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "tinacms",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"typings": "dist/index.d.ts",
|
|
5
|
-
"version": "3.8.
|
|
5
|
+
"version": "3.8.2",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
8
|
"exports": {
|
|
@@ -111,16 +111,16 @@
|
|
|
111
111
|
"react-dropzone": "14.2.3",
|
|
112
112
|
"react-final-form": "^6.5.9",
|
|
113
113
|
"react-icons": "^5.4.0",
|
|
114
|
-
"react-router-dom": "6.3
|
|
114
|
+
"react-router-dom": "^6.30.3",
|
|
115
115
|
"react-use": "^17.6.0",
|
|
116
116
|
"tailwind-merge": "^2.6.0",
|
|
117
117
|
"webfontloader": "1.6.28",
|
|
118
118
|
"yup": "^1.6.1",
|
|
119
119
|
"zod": "^3.24.2",
|
|
120
|
-
"@tinacms/
|
|
121
|
-
"@tinacms/
|
|
122
|
-
"@tinacms/
|
|
123
|
-
"@tinacms/search": "1.2.
|
|
120
|
+
"@tinacms/bridge": "0.3.0",
|
|
121
|
+
"@tinacms/mdx": "2.1.5",
|
|
122
|
+
"@tinacms/schema-tools": "2.8.0",
|
|
123
|
+
"@tinacms/search": "1.2.16"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@graphql-tools/utils": "^10.8.1",
|