@sanity/document-internationalization 0.0.1-beta.8 → 0.1.1
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 +22 -13
- package/lib/actions/index.js +264 -17457
- package/lib/actions/index.js.map +1 -1
- package/lib/badges/index.js +1 -17206
- package/lib/badges/index.js.map +1 -1
- package/lib/constants/SupportedEmojiFlagCodes.d.ts +1 -0
- package/lib/constants/UiMessages.d.ts +11 -0
- package/lib/constants/index.d.ts +1 -0
- package/lib/constants/index.js +19 -1
- package/lib/constants/index.js.map +1 -1
- package/lib/language-select/components/LanguageSelect/LanguageSelect.d.ts +9 -0
- package/lib/language-select/components/LanguageSelect/LanguageSelectContext.d.ts +10 -0
- package/lib/language-select/components/LanguageSelect/LanguageSelectLabel.d.ts +2 -0
- package/lib/language-select/components/LanguageSelect/LanguageSelectList.d.ts +9 -0
- package/lib/language-select/components/LanguageSelect/LanguageSelectListItem.d.ts +8 -0
- package/lib/language-select/components/LanguageSelect/index.d.ts +1 -0
- package/lib/{structure/components/LangCultureFlagsBlock → language-select/components/SingleFlag}/SingleFlag.d.ts +2 -1
- package/lib/{structure/components/LangCultureFlagsBlock → language-select/components/SingleFlag}/allEmojiFlagCodes.d.ts +0 -0
- package/lib/language-select/components/SingleFlag/index.d.ts +1 -0
- package/lib/language-select/components/SplitPaneIcon/SplitPaneIcon.d.ts +2 -0
- package/lib/language-select/components/SplitPaneIcon/index.d.ts +1 -0
- package/lib/language-select/components/index.d.ts +2 -0
- package/lib/language-select/hooks/index.d.ts +2 -0
- package/lib/language-select/hooks/useLanguages.d.ts +3 -0
- package/lib/language-select/hooks/useManyEditStates.d.ts +1 -0
- package/lib/language-select/hooks/useManyObservables.d.ts +2 -0
- package/lib/language-select/index.d.ts +7 -0
- package/lib/language-select/index.js +1972 -0
- package/lib/language-select/index.js.map +1 -0
- package/lib/structure/index.d.ts +1 -3
- package/lib/structure/index.js +194 -17951
- package/lib/structure/index.js.map +1 -1
- package/lib/types/IExtendedLanguageObject.d.ts +5 -0
- package/lib/types/ILanguageObject.d.ts +0 -2
- package/lib/types/index.d.ts +1 -0
- package/lib/utils/baseToTop.d.ts +2 -1
- package/lib/utils/getTranslationsForId.d.ts +2 -2
- package/lib/utils/index.js +9 -17212
- package/lib/utils/index.js.map +1 -1
- package/lib/validators/index.js +11 -17211
- package/lib/validators/index.js.map +1 -1
- package/package.json +20 -27
- package/sanity.json +4 -0
- package/lib/structure/components/LangCultureFlagsBlock/LangCultureFlagsBlock.d.ts +0 -8
- package/lib/structure/components/LangCultureFlagsBlock/index.d.ts +0 -1
- package/lib/structure/components/TranslationLink/TranslationLink.d.ts +0 -12
- package/lib/structure/components/TranslationLink/index.d.ts +0 -1
- package/lib/structure/components/TranslationsComponentFactory/TranslationsComponentFactory.d.ts +0 -5
- package/lib/structure/components/TranslationsComponentFactory/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/document-internationalization",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=14"
|
|
@@ -33,12 +33,11 @@
|
|
|
33
33
|
"lint": "npm run eslint -- .",
|
|
34
34
|
"eslint": "eslint --ext=.js,.jsx,.mjs,.ts,.tsx --quiet",
|
|
35
35
|
"lint:fix": "eslint . --quiet --fix",
|
|
36
|
-
"stylelint": "stylelint \"**/*.scss\"",
|
|
37
|
-
"stylelint:fix": "stylelint \"**/*.scss\" --fix",
|
|
38
36
|
"build": "run-p build:*",
|
|
39
37
|
"build:type": "tsc -p .",
|
|
40
38
|
"build:badges": "rollup -c src/badges/rollup.config.js",
|
|
41
39
|
"build:structure": "rollup -c src/structure/rollup.config.js",
|
|
40
|
+
"build:language-select": "rollup -c src/language-select/rollup.config.js",
|
|
42
41
|
"build:actions": "rollup -c src/actions/rollup.config.js",
|
|
43
42
|
"build:constants": "rollup -c src/constants/rollup.config.js",
|
|
44
43
|
"build:utils": "rollup -c src/utils/rollup.config.js",
|
|
@@ -68,15 +67,17 @@
|
|
|
68
67
|
"@sanity/base": "^2.20.0",
|
|
69
68
|
"@sanity/check": "^2.0.9",
|
|
70
69
|
"@sanity/client": "^2.19.0",
|
|
71
|
-
"@sanity/
|
|
70
|
+
"@sanity/color": "^2.0.0",
|
|
71
|
+
"@sanity/desk-tool": "^2.28.0",
|
|
72
72
|
"@sanity/form-builder": "^2.20.0",
|
|
73
|
-
"@sanity/icons": "^1.2.
|
|
73
|
+
"@sanity/icons": "^1.2.5",
|
|
74
74
|
"@sanity/react-hooks": "^2.20.0",
|
|
75
|
+
"@sanity/state-router": "^2.0.0",
|
|
75
76
|
"@sanity/structure": "^2.20.0",
|
|
76
77
|
"@sanity/types": "^2.19.0",
|
|
77
78
|
"@sanity/ui": "^0.36.10",
|
|
78
|
-
"@
|
|
79
|
-
"@types/
|
|
79
|
+
"@sanity/uuid": "^3.0.0",
|
|
80
|
+
"@types/lodash": "^4.14.179",
|
|
80
81
|
"@types/react": "^17.0.0",
|
|
81
82
|
"@types/react-router": "^5.1.11",
|
|
82
83
|
"@types/react-router-dom": "^5.1.7",
|
|
@@ -88,7 +89,6 @@
|
|
|
88
89
|
"eslint": "^8.3.0",
|
|
89
90
|
"eslint-config-prettier": "^8.3.0",
|
|
90
91
|
"eslint-config-sanity": "^5.1.0",
|
|
91
|
-
"eslint-import-resolver-webpack": "^0.13.2",
|
|
92
92
|
"eslint-plugin-cypress": "^2.12.1",
|
|
93
93
|
"eslint-plugin-es5": "^1.5.0",
|
|
94
94
|
"eslint-plugin-import": "^2.25.3",
|
|
@@ -96,12 +96,10 @@
|
|
|
96
96
|
"eslint-plugin-react": "^7.27.1",
|
|
97
97
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
98
98
|
"husky": "^7.0.0",
|
|
99
|
-
"lerna": "^3.22.1",
|
|
100
99
|
"lint-staged": "^12.1.2",
|
|
101
|
-
"
|
|
100
|
+
"lodash": "^4.17.21",
|
|
102
101
|
"npm-run-all": "^4.1.5",
|
|
103
102
|
"postcss": "^8.2.10",
|
|
104
|
-
"postcss-scss": "^4.0.2",
|
|
105
103
|
"prettier": "^2.5.0",
|
|
106
104
|
"react": "^16.0.0",
|
|
107
105
|
"react-router": "^5.1.0",
|
|
@@ -110,46 +108,41 @@
|
|
|
110
108
|
"rollup-plugin-cleaner": "^1.0.0",
|
|
111
109
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
112
110
|
"rollup-plugin-postcss": "^4.0.2",
|
|
113
|
-
"
|
|
111
|
+
"rxjs": "^6.6.0",
|
|
114
112
|
"styled-components": "^5.3.1",
|
|
115
|
-
"stylelint": "^14.1.0",
|
|
116
|
-
"stylelint-config-prettier": "^9.0.3",
|
|
117
|
-
"stylelint-prettier": "^2.0.0",
|
|
118
|
-
"stylelint-scss": "^4.0.0",
|
|
119
113
|
"typescript": "^4.1.3"
|
|
120
114
|
},
|
|
121
115
|
"peerDependencies": {
|
|
122
116
|
"@sanity/base": "^2.0.0",
|
|
123
|
-
"@sanity/desk-tool": "
|
|
117
|
+
"@sanity/desk-tool": ">=2.28.0",
|
|
124
118
|
"@sanity/form-builder": "^2.0.0",
|
|
119
|
+
"@sanity/icons": "^1.2.3",
|
|
125
120
|
"@sanity/react-hooks": "^2.0.0",
|
|
126
121
|
"@sanity/structure": "^2.0.0",
|
|
127
122
|
"@sanity/ui": "^0.36.12",
|
|
128
|
-
"
|
|
123
|
+
"lodash": "^4.0.0",
|
|
129
124
|
"react": "^17.0.0",
|
|
130
125
|
"react-router": "^5.0.0",
|
|
131
126
|
"react-router-dom": "^5.0.0",
|
|
132
|
-
"
|
|
127
|
+
"rxjs": "^6.0.0",
|
|
128
|
+
"styled-components": "^5.0.0",
|
|
129
|
+
"@sanity/color": "^2.0.0",
|
|
130
|
+
"@sanity/state-router": "^2.0.0",
|
|
131
|
+
"@sanity/uuid": "^3.0.0"
|
|
133
132
|
},
|
|
134
133
|
"dependencies": {
|
|
135
134
|
"@babel/runtime": "^7.12.5",
|
|
136
135
|
"@cprecioso/country-flag-emoji": "^1.0.0",
|
|
137
|
-
"a11y-react-emoji": "^1.1.3",
|
|
138
|
-
"classnames": "^2.2.6",
|
|
139
136
|
"just-omit": "^2.0.1",
|
|
140
137
|
"just-safe-get": "^4.0.1",
|
|
141
138
|
"just-split": "^3.0.1",
|
|
142
|
-
"moment": "^2.29.1",
|
|
143
139
|
"pinst": "^2.1.6",
|
|
144
|
-
"
|
|
145
|
-
"
|
|
140
|
+
"react-easy-emoji": "^1.6.1",
|
|
141
|
+
"regenerator-runtime": "^0.13.7"
|
|
146
142
|
},
|
|
147
143
|
"lint-staged": {
|
|
148
144
|
"src/**/*.{ts,tsx}": [
|
|
149
145
|
"eslint . --quiet --fix"
|
|
150
|
-
],
|
|
151
|
-
"src/**/*.scss": [
|
|
152
|
-
"stylelint \"**/*.scss\" --fix"
|
|
153
146
|
]
|
|
154
147
|
}
|
|
155
148
|
}
|
package/sanity.json
CHANGED
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
"implements": "part:@sanity/base/document-actions/resolver",
|
|
13
13
|
"path": "actions/index.js"
|
|
14
14
|
},
|
|
15
|
+
{
|
|
16
|
+
"implements": "part:@sanity/desk-tool/language-select-component",
|
|
17
|
+
"path": "language-select/index.js"
|
|
18
|
+
},
|
|
15
19
|
{
|
|
16
20
|
"name": "part:@sanity/document-internationalization/languages/loader",
|
|
17
21
|
"description": "User implementable languages loader function"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './LangCultureFlagsBlock';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ILanguageObject, Ti18nSchema } from '../../../types';
|
|
3
|
-
interface IProps {
|
|
4
|
-
docId: string;
|
|
5
|
-
index: number;
|
|
6
|
-
schema: Ti18nSchema;
|
|
7
|
-
lang: ILanguageObject;
|
|
8
|
-
isCurrentLanguage: boolean;
|
|
9
|
-
baseDocument?: any;
|
|
10
|
-
}
|
|
11
|
-
export declare const TranslationLink: React.FunctionComponent<IProps>;
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TranslationLink';
|
package/lib/structure/components/TranslationsComponentFactory/TranslationsComponentFactory.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IDefaultDocumentNodeStructureProps } from '../../IDefaultDocumentNodeStructureProps';
|
|
3
|
-
import { Ti18nSchema } from '../../../types';
|
|
4
|
-
export declare const TranslationsComponent: (schema: Ti18nSchema, props: IDefaultDocumentNodeStructureProps) => JSX.Element;
|
|
5
|
-
export declare const TranslationsComponentFactory: (schema: Ti18nSchema) => any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TranslationsComponentFactory';
|