sanity-plugin-internationalized-array 5.1.5 → 5.1.6
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.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LanguageFilterConfig } from "@sanity/language-filter";
|
|
2
|
-
import * as _$sanity from "sanity";
|
|
3
2
|
import { FieldDefinition, FieldMember, FieldsetState, ObjectSchemaType, Rule, RuleTypeConstraint, SanityClient } from "sanity";
|
|
4
3
|
type Language = {
|
|
5
4
|
id: Intl.UnicodeBCP47LocaleIdentifier;
|
|
@@ -188,7 +187,7 @@ declare const clear: () => void;
|
|
|
188
187
|
* ```
|
|
189
188
|
*/
|
|
190
189
|
declare const LANGUAGE_FIELD_NAME: "language";
|
|
191
|
-
declare const internationalizedArray:
|
|
190
|
+
declare const internationalizedArray: import("sanity").Plugin<PluginConfig>;
|
|
192
191
|
/**
|
|
193
192
|
* Default filter function for the internationalized array field.
|
|
194
193
|
* It filter the field base on the `language` value of the object.
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/cache.ts","../src/constants.ts","../src/plugin.tsx","../src/utils/internationalizedArrayLanguageFilter.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/cache.ts","../src/constants.ts","../src/plugin.tsx","../src/utils/internationalizedArrayLanguageFilter.ts"],"mappings":";;KAEY,QAAA;EACV,EAAA,EAAI,IAAA,CAAK,4BAA4B;EACrC,KAAA;AAAA;AAAA,KAGU,WAAA;AAAA,KAEA,WAAA;EACV,IAAA;EACA,IAAA,EAAM,WAAA;EACN,SAAA,EAAW,QAAA;EACX,KAAA;EACA,KAAA;EACA,MAAA;EACA,QAAA;EACA,UAAA,GAAa,IAAA,GAAO,IAAA;EACpB,KAAA;IAAA,CAAU,GAAA;IAAuB,O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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$sanity_migrate0 from "sanity/migrate";
|
|
2
1
|
/**
|
|
3
2
|
* Creates a migration that automatically finds all internationalized array
|
|
4
3
|
* item objects and moves language identifiers from `_key` to the dedicated
|
|
@@ -13,17 +12,17 @@ declare function migrateToLanguageField(documentTypes: string[]): {
|
|
|
13
12
|
title: string;
|
|
14
13
|
documentTypes: string[];
|
|
15
14
|
migrate: {
|
|
16
|
-
object<Node extends
|
|
15
|
+
object<Node extends import("sanity/migrate").JsonObject>(node: Node): import("sanity/migrate").SetOp<Node & {
|
|
17
16
|
readonly _key: undefined;
|
|
18
17
|
readonly language: string | (string & {
|
|
19
|
-
[x: string]:
|
|
18
|
+
[x: string]: import("sanity/migrate").JsonValue;
|
|
20
19
|
} & {
|
|
21
|
-
[x: string]:
|
|
22
|
-
}) | (string &
|
|
23
|
-
[x: string]:
|
|
20
|
+
[x: string]: import("sanity/migrate").JsonValue | undefined;
|
|
21
|
+
}) | (string & import("sanity/migrate").JsonValue[]) | (string & readonly import("sanity/migrate").JsonValue[]) | ({
|
|
22
|
+
[x: string]: import("sanity/migrate").JsonValue;
|
|
24
23
|
} & {
|
|
25
|
-
[x: string]:
|
|
26
|
-
} & string) | (
|
|
24
|
+
[x: string]: import("sanity/migrate").JsonValue | undefined;
|
|
25
|
+
} & string) | (import("sanity/migrate").JsonValue[] & string) | (readonly import("sanity/migrate").JsonValue[] & string);
|
|
27
26
|
}> | undefined;
|
|
28
27
|
};
|
|
29
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../migrations/migrateToLanguageField.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../migrations/migrateToLanguageField.ts"],"mappings":"AA2BA;;;;;;;;;;AAAA,iBAAgB,sBAAA,CAAuB,aAAA;;;;mEAAD,IAAA,kCAAA,IAAA;MAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sanity-plugin-internationalized-array",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.6",
|
|
4
4
|
"description": "Store localized fields in an array to save on attributes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"lodash-es": "^4.17.23"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@sanity/pkg-utils": "^10.5.
|
|
37
|
+
"@sanity/pkg-utils": "^10.5.4",
|
|
38
38
|
"@testing-library/jest-dom": "^6.9.1",
|
|
39
39
|
"@testing-library/react": "^16.3.2",
|
|
40
40
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"styled-components": "^6.4.2",
|
|
50
50
|
"@repo/package.config": "0.0.0",
|
|
51
51
|
"@repo/tsconfig": "0.0.0",
|
|
52
|
-
"@sanity/language-filter": "^5.0.
|
|
52
|
+
"@sanity/language-filter": "^5.0.4"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@sanity/assist": "^6.0.2",
|