gt-sanity 2.0.13 → 2.0.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.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -11
- package/src/adapter/createTask.ts +3 -3
- package/src/adapter/getLocales.ts +1 -1
- package/src/components/TranslationsProvider.tsx +1 -1
- package/src/components/page/TranslationsTool.tsx +0 -1
- package/src/configuration/baseDocumentLevelConfig/helpers/createI18nDocAndPatchMetadata.ts +1 -1
- package/src/configuration/baseDocumentLevelConfig/helpers/patchI18nDoc.ts +1 -3
- package/src/configuration/baseFieldLevelConfig.ts +1 -8
- package/src/sanity-api/resolveRefs.ts +0 -10
- package/src/serialization/BaseSerializationConfig.ts +1 -1
- package/src/serialization/__tests__/BaseDocumentSerializer/documentInlineMarks.test.ts +3 -8
- package/src/serialization/__tests__/README +1 -1
- package/src/serialization/__tests__/__fixtures__/inlineSchema.ts +1 -1
- package/src/serialization/__tests__/__fixtures__/messy-html.html +5 -1
- package/src/serialization/__tests__/__fixtures__/schema.ts +1 -1
- package/src/serialization/serialize/fieldFilters.ts +1 -1
- package/src/serialization/types.ts +1 -1
- package/src/translation/downloadTranslations.ts +1 -1
- package/src/translation/initProject.ts +2 -0
package/dist/index.mjs
CHANGED
|
@@ -402,7 +402,7 @@ const defaultStopTypes = [
|
|
|
402
402
|
const filteredObj = { _type: obj._type }, fieldFilterFunc = (field) => field.localize === !1 ? !1 : field.type === "string" || field.type === "text" || Array.isArray(obj[field.name]) ? !0 : !stopTypes.includes(field.type);
|
|
403
403
|
return [
|
|
404
404
|
...META_FIELDS$1,
|
|
405
|
-
...objFields
|
|
405
|
+
...objFields.filter(fieldFilterFunc).map((field) => field.name)
|
|
406
406
|
].forEach((field) => {
|
|
407
407
|
obj[field] && (filteredObj[field] = obj[field]);
|
|
408
408
|
}), filteredObj;
|
|
@@ -1263,7 +1263,7 @@ async function publishTranslations(documentIds, client) {
|
|
|
1263
1263
|
}
|
|
1264
1264
|
), publishedDocumentIds;
|
|
1265
1265
|
}
|
|
1266
|
-
const getLocales = async (
|
|
1266
|
+
const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) => ({
|
|
1267
1267
|
localeId: locale,
|
|
1268
1268
|
description: gt.getLocaleProperties(locale).name,
|
|
1269
1269
|
enabled: !0
|
|
@@ -1595,7 +1595,7 @@ const getLocales = async (secrets) => pluginConfig.getLocales().map((locale) =>
|
|
|
1595
1595
|
downloadStatusRef.current,
|
|
1596
1596
|
secrets
|
|
1597
1597
|
);
|
|
1598
|
-
setTranslationStatuses((
|
|
1598
|
+
setTranslationStatuses(() => {
|
|
1599
1599
|
const newStatuses = /* @__PURE__ */ new Map();
|
|
1600
1600
|
for (const doc of documents)
|
|
1601
1601
|
for (const localeId of availableLocaleIds) {
|