@sanity/document-internationalization 0.1.0 → 0.1.3

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 CHANGED
@@ -1,29 +1,30 @@
1
1
  # CHANGELOG
2
2
 
3
- ## v0.0.1-beta.12
4
- **BREAKING**
5
- **The `getDocumentNodeViewsForSchemaType` function has been removed as it is not required anymore**
6
- * The language selector has been updated to better align with the official language-filter plugin for field level translations. This does mean it is not required to implement `getDefaultDocumentNode` any more as the new UI does not require a custom desk structure but rather integrates with the studio natively.
3
+ ## v0.1.3
4
+ * The plugin will not show the language dropdown anymore for schemas that do not have `i18n` enabled. This version also brings support for the `@sanity/language-filter` plugin for non `i18n` schemas.
7
5
 
8
- ## v0.0.1-beta.11
9
- * [#124](https://github.com/LiamMartens/sanity-plugin-intl-input/issues/124) Updates an internal import to support the minor bump from `@sanity/desk-tool@2.28.0`
6
+ ## v0.1.2
7
+ * Fixed import to `ConfirmDeleteDialog`
10
8
 
11
- ## v0.0.1-beta.10
12
- * Fixed [#27](https://github.com/sanity-io/document-internationalization/issues/27)
9
+ ## v0.1.1
10
+ * [#32](https://github.com/sanity-io/document-internationalization/issues/32) Fixes default and custom flag implementations
13
11
 
14
- ## v0.0.1-beta.9
15
- * Fixed a bug with the `fixBaseLanguageMismatch` method as it was not considering the field name configuration
12
+ ## v0.1.0
13
+ This is the first stable release for the official document internationalization plugin. A few things have changed since the original plugin. For a migration guide please see [this guide](docs/coming-from-sanity-plugin-intl-input.md).
16
14
 
17
- ## v0.0.1-beta.8
18
- * Migrated original plugin code
19
- * Removed object level translations
20
- * Added additional GROQ examples
21
- * Added a slug uniqueness validator for document level translations (`import { isSlugUnique } from '@sanity/document-internationalization/lib/validators`)
22
- * Fixed issue with `fixIdStructureMismatchDocuments` maintenance function
23
- * `delimiter` is now the default ID structure
24
- * Added maintenance function to add base document ref to translated documents
25
- * Removed the option for overriding UI messages
26
- * Updated language configuration to use "id" field instead of "name"
27
- * Updated studio parts to use new plugin name
28
- * Renamed "hard" to "strong" for configuring the reference behavior
29
- * The references from the base document to the translated ones will now receive the language code as their key
15
+ **Breaking Changes**
16
+ - Object level translations are not supported by this plugin anymore. If your project requires this please use the [@sanity/language-filter](https://www.npmjs.com/package/@sanity/language-filter) plugin.
17
+ - `delimiter` is now the default ID structure as opposed to `subpath`. If you are using the legacy plugin with no `idStructure` specified you will need to make sure to configure it explicitly in this version. Coming from the old version you will need to set it to `subpath` to keep your current structure.
18
+ - It is not possible anymore to override the UI messages using plugin configuration.
19
+ - The language configuration has been updated to use an `id` field instead of `name`. This change was made to align with the `@sanity/language-filter` plugin. You will need to update your language configuration if you are coming from the old plugin.
20
+ - The `hard` reference behavior configuration has been renamed to `strong` to be more consistent with Sanity itself.
21
+ - The `__i18n_refs` field will now be a simple array of rerences as opposed to an array of custom objects. They are keyed by their language code for easier querying.
22
+
23
+ **Fixes**
24
+ - Fixed issue with `fixIdStructureMismatchDocuments` maintenance function
25
+ - Fixed a bug with the `fixBaseLanguageMismatch` method as it was not considering the field name configuration
26
+ - [#124](https://github.com/LiamMartens/sanity-plugin-intl-input/issues/124) Updates an internal import to support the minor bump from `@sanity/desk-tool@2.28.0`
27
+
28
+ **Other Changes**
29
+ - Added a slug uniqueness validator for document level translations (`import { isSlugUnique } from '@sanity/document-internationalization/lib/validators`)
30
+ - A maintenance function was created to add base document refs to translated documents
@@ -55,7 +55,6 @@ var languagesLoaderFn__default = /*#__PURE__*/_interopDefaultLegacy(languagesLoa
55
55
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
56
56
  var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
57
57
  var TrashIcon__default = /*#__PURE__*/_interopDefaultLegacy(TrashIcon);
58
- var ConfirmDeleteDialog__default = /*#__PURE__*/_interopDefaultLegacy(ConfirmDeleteDialog);
59
58
  var ContentCopyIcon__default = /*#__PURE__*/_interopDefaultLegacy(ContentCopyIcon);
60
59
 
61
60
  function createCommonjsModule(fn) {
@@ -2289,7 +2288,7 @@ var DeleteWithi18nAction = function DeleteWithi18nAction(_ref) {
2289
2288
  })), [toast, baseDocumentId, baseDocumentEditState.draft, baseDocumentEditState.published, deleteOp, onComplete, config.fieldNames.references]);
2290
2289
  var dialogContent = React__default["default"].useMemo(function () {
2291
2290
  if (isConfirmDialogOpen) {
2292
- return /*#__PURE__*/React__default["default"].createElement(ConfirmDeleteDialog__default["default"], {
2291
+ return /*#__PURE__*/React__default["default"].createElement(ConfirmDeleteDialog.ConfirmDeleteDialog, {
2293
2292
  action: "delete",
2294
2293
  id: id,
2295
2294
  type: type,