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.js
CHANGED
|
@@ -391,7 +391,7 @@ const defaultStopTypes = [
|
|
|
391
391
|
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);
|
|
392
392
|
return [
|
|
393
393
|
...META_FIELDS$1,
|
|
394
|
-
...objFields
|
|
394
|
+
...objFields.filter(fieldFilterFunc).map((field) => field.name)
|
|
395
395
|
].forEach((field) => {
|
|
396
396
|
obj[field] && (filteredObj[field] = obj[field]);
|
|
397
397
|
}), filteredObj;
|
|
@@ -1252,7 +1252,7 @@ async function publishTranslations(documentIds, client) {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
), publishedDocumentIds;
|
|
1254
1254
|
}
|
|
1255
|
-
const getLocales = async (
|
|
1255
|
+
const getLocales = async (_secrets) => pluginConfig.getLocales().map((locale) => ({
|
|
1256
1256
|
localeId: locale,
|
|
1257
1257
|
description: gt.getLocaleProperties(locale).name,
|
|
1258
1258
|
enabled: !0
|
|
@@ -1584,7 +1584,7 @@ const getLocales = async (secrets) => pluginConfig.getLocales().map((locale) =>
|
|
|
1584
1584
|
downloadStatusRef.current,
|
|
1585
1585
|
secrets
|
|
1586
1586
|
);
|
|
1587
|
-
setTranslationStatuses((
|
|
1587
|
+
setTranslationStatuses(() => {
|
|
1588
1588
|
const newStatuses = /* @__PURE__ */ new Map();
|
|
1589
1589
|
for (const doc of documents)
|
|
1590
1590
|
for (const localeId of availableLocaleIds) {
|