tinacms 0.66.10 → 0.67.0
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/CHANGELOG.md +14 -0
- package/dist/index.es.js +5 -7
- package/dist/index.js +5 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# tinacms
|
|
2
2
|
|
|
3
|
+
## 0.67.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 86651039b: Updates to the way forms are generated in contextual editing. This lays the groundwork for
|
|
8
|
+
future updates but doesn't offer new behavior yet. It does come with a small breaking change:
|
|
9
|
+
|
|
10
|
+
[BREAKING]: The `id` of forms is now the actual document `path`. Previously this was the name of the GraphQL query node (eg. `getPostDocument`).
|
|
11
|
+
If you're using the [`formifyCallback`](https://tina.io/docs/advanced/customizing-forms/#customizing-a-form) prop to create global forms, you'll probably need to update the callback to check for the appropriate id.
|
|
12
|
+
|
|
13
|
+
Eg. `formConfig.id === 'getSiteNavsDocument'` should be something like `formConfig.id === 'content/navs/mynav.md'`
|
|
14
|
+
|
|
15
|
+
If you're experiencing any issues with contextual editing, you can disable this flag for now by specifying `cms.flags.set('use-unstable-formify', false)`.
|
|
16
|
+
|
|
3
17
|
## 0.66.10
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.es.js
CHANGED
|
@@ -417,9 +417,6 @@ function useGraphqlFormsUnstable({
|
|
|
417
417
|
eventList
|
|
418
418
|
}) {
|
|
419
419
|
const cms = useCMS();
|
|
420
|
-
React.useEffect(() => {
|
|
421
|
-
console.log("NOTE: using unstable formify");
|
|
422
|
-
}, []);
|
|
423
420
|
const state = useFormify({
|
|
424
421
|
query,
|
|
425
422
|
cms,
|
|
@@ -495,11 +492,12 @@ function useGraphqlForms({
|
|
|
495
492
|
setIsLoading(false);
|
|
496
493
|
return;
|
|
497
494
|
}
|
|
495
|
+
const useUnstableFormify = (cms == null ? void 0 : cms.flags.get("use-unstable-formify")) === false ? false : true;
|
|
498
496
|
const formIds = [];
|
|
499
497
|
setIsLoading(true);
|
|
500
498
|
cms.api.tina.requestWithForm((gql2) => gql2(query), {
|
|
501
499
|
variables,
|
|
502
|
-
useUnstableFormify
|
|
500
|
+
useUnstableFormify
|
|
503
501
|
}).then((payload) => {
|
|
504
502
|
cms.plugins.remove(new FormMetaPlugin({ name: "tina-admin-link" }));
|
|
505
503
|
setData(payload);
|
|
@@ -3282,10 +3280,10 @@ const TinaDataProvider = ({
|
|
|
3282
3280
|
});
|
|
3283
3281
|
const cms = useCMS();
|
|
3284
3282
|
const useUnstableFormify = React.useMemo(() => {
|
|
3285
|
-
if (cms == null ? void 0 : cms.flags.get("use-unstable-formify")) {
|
|
3286
|
-
return
|
|
3283
|
+
if ((cms == null ? void 0 : cms.flags.get("use-unstable-formify")) === false) {
|
|
3284
|
+
return false;
|
|
3287
3285
|
}
|
|
3288
|
-
return
|
|
3286
|
+
return true;
|
|
3289
3287
|
}, [cms == null ? void 0 : cms.flags]);
|
|
3290
3288
|
return /* @__PURE__ */ React.createElement(TinaDataContext.Provider, {
|
|
3291
3289
|
value: {
|
package/dist/index.js
CHANGED
|
@@ -436,9 +436,6 @@ var __objRest = (source, exclude) => {
|
|
|
436
436
|
eventList
|
|
437
437
|
}) {
|
|
438
438
|
const cms = toolkit.useCMS();
|
|
439
|
-
React__default["default"].useEffect(() => {
|
|
440
|
-
console.log("NOTE: using unstable formify");
|
|
441
|
-
}, []);
|
|
442
439
|
const state = useFormify({
|
|
443
440
|
query,
|
|
444
441
|
cms,
|
|
@@ -514,11 +511,12 @@ var __objRest = (source, exclude) => {
|
|
|
514
511
|
setIsLoading(false);
|
|
515
512
|
return;
|
|
516
513
|
}
|
|
514
|
+
const useUnstableFormify = (cms == null ? void 0 : cms.flags.get("use-unstable-formify")) === false ? false : true;
|
|
517
515
|
const formIds = [];
|
|
518
516
|
setIsLoading(true);
|
|
519
517
|
cms.api.tina.requestWithForm((gql2) => gql2(query), {
|
|
520
518
|
variables,
|
|
521
|
-
useUnstableFormify
|
|
519
|
+
useUnstableFormify
|
|
522
520
|
}).then((payload) => {
|
|
523
521
|
cms.plugins.remove(new toolkit.FormMetaPlugin({ name: "tina-admin-link" }));
|
|
524
522
|
setData(payload);
|
|
@@ -3301,10 +3299,10 @@ mutation addPendingDocumentMutation(
|
|
|
3301
3299
|
});
|
|
3302
3300
|
const cms = toolkit.useCMS();
|
|
3303
3301
|
const useUnstableFormify = React__default["default"].useMemo(() => {
|
|
3304
|
-
if (cms == null ? void 0 : cms.flags.get("use-unstable-formify")) {
|
|
3305
|
-
return
|
|
3302
|
+
if ((cms == null ? void 0 : cms.flags.get("use-unstable-formify")) === false) {
|
|
3303
|
+
return false;
|
|
3306
3304
|
}
|
|
3307
|
-
return
|
|
3305
|
+
return true;
|
|
3308
3306
|
}, [cms == null ? void 0 : cms.flags]);
|
|
3309
3307
|
return /* @__PURE__ */ React__default["default"].createElement(sharedctx.TinaDataContext.Provider, {
|
|
3310
3308
|
value: {
|