@sanity/document-internationalization 2.0.0-studio-v3-plugin-v2.6 → 2.0.0-studio-v3-plugin-v2.8
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 +6 -3
- package/lib/index.esm.js +407 -156
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +405 -154
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/BulkPublish/DocumentCheck.tsx +39 -16
- package/src/components/BulkPublish/index.tsx +86 -55
- package/src/components/LanguageManage.tsx +1 -2
- package/src/components/LanguageOption.tsx +78 -28
- package/src/components/LanguagePatch.tsx +16 -8
- package/src/components/MenuButton.tsx +76 -43
- package/src/components/OptimisticallyStrengthen/ReferencePatcher.tsx +49 -0
- package/src/components/OptimisticallyStrengthen/index.tsx +34 -0
- package/src/plugin.tsx +195 -147
- package/src/schema/translation/metadata.ts +1 -1
- package/src/types.ts +9 -7
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @sanity/document-internationalization
|
|
1
|
+
# @sanity/document-internationalization
|
|
2
2
|
|
|
3
3
|
- This is a completely new, **Sanity Studio v3 exclusive version** of @sanity/document-internationalization released as v2.0.0 which contains new features and requires content migrations to upgrade from previous versions. There is an example code below.
|
|
4
4
|
|
|
@@ -113,7 +113,10 @@ Fortunately, the Sanity GraphQL API contains a similar filter for document refer
|
|
|
113
113
|
```graphql
|
|
114
114
|
# In this example we retrieve a lesson by its `slug.current` field value
|
|
115
115
|
query GetLesson($language: String!, $slug: String!) {
|
|
116
|
-
allLesson(
|
|
116
|
+
allLesson(
|
|
117
|
+
limit: 1
|
|
118
|
+
where: {language: {eq: $language}, slug: {current: {eq: $slug}}}
|
|
119
|
+
) {
|
|
117
120
|
_id
|
|
118
121
|
title
|
|
119
122
|
language
|
|
@@ -150,7 +153,7 @@ There are two scripts in the `./migrations` folder of this repository. They cont
|
|
|
150
153
|
|
|
151
154
|
## Roadmap
|
|
152
155
|
|
|
153
|
-
- [
|
|
156
|
+
- [x] Stabilize bulk publishing feature
|
|
154
157
|
- [x] Asynchronous language plugin config option
|
|
155
158
|
- [ ] Export a validator to allow the same slug on connected translations
|
|
156
159
|
- [ ] Guidance to copy/paste changes between documents
|