@sanity/document-internationalization 0.0.1-beta.10 → 0.0.1-beta.11
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 +2 -0
- package/lib/actions/index.js +10 -18
- package/lib/actions/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v0.0.1-beta.11
|
|
4
|
+
* [#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`
|
|
3
5
|
## v0.0.1-beta.10
|
|
4
6
|
* Fixed [#27](https://github.com/sanity-io/document-internationalization/issues/27)
|
|
5
7
|
|
package/lib/actions/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var languagesLoaderFn = require('part:@sanity/document-internationalization/lang
|
|
|
17
17
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
18
18
|
require('@sanity/types');
|
|
19
19
|
var TrashIcon = require('part:@sanity/base/trash-icon');
|
|
20
|
-
var
|
|
20
|
+
var ConfirmDeleteDialog = require('@sanity/desk-tool/lib/components/confirmDeleteDialog/ConfirmDeleteDialog');
|
|
21
21
|
var ContentCopyIcon = require('part:@sanity/base/content-copy-icon');
|
|
22
22
|
var uuid = require('@sanity/uuid');
|
|
23
23
|
|
|
@@ -53,7 +53,7 @@ var client__default = /*#__PURE__*/_interopDefaultLegacy(client);
|
|
|
53
53
|
var languagesLoaderFn__default = /*#__PURE__*/_interopDefaultLegacy(languagesLoaderFn);
|
|
54
54
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
55
55
|
var TrashIcon__default = /*#__PURE__*/_interopDefaultLegacy(TrashIcon);
|
|
56
|
-
var
|
|
56
|
+
var ConfirmDeleteDialog__default = /*#__PURE__*/_interopDefaultLegacy(ConfirmDeleteDialog);
|
|
57
57
|
var ContentCopyIcon__default = /*#__PURE__*/_interopDefaultLegacy(ContentCopyIcon);
|
|
58
58
|
|
|
59
59
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -19372,11 +19372,6 @@ var DeleteWithi18nAction = function DeleteWithi18nAction(_ref) {
|
|
|
19372
19372
|
type = _ref.type,
|
|
19373
19373
|
onComplete = _ref.onComplete;
|
|
19374
19374
|
var toast = ui.useToast();
|
|
19375
|
-
var ConfirmDelete = React__default["default"].useMemo(function () {
|
|
19376
|
-
var _ConfirmDeleteModule$;
|
|
19377
|
-
|
|
19378
|
-
return (_ConfirmDeleteModule$ = ConfirmDeleteModule__namespace === null || ConfirmDeleteModule__namespace === void 0 ? void 0 : ConfirmDeleteModule__namespace.ConfirmDelete) !== null && _ConfirmDeleteModule$ !== void 0 ? _ConfirmDeleteModule$ : ConfirmDeleteModule__namespace === null || ConfirmDeleteModule__namespace === void 0 ? void 0 : ConfirmDeleteModule__namespace["default"];
|
|
19379
|
-
}, [ConfirmDeleteModule__namespace]);
|
|
19380
19375
|
var config = React__default["default"].useMemo(function () {
|
|
19381
19376
|
return getConfig(type);
|
|
19382
19377
|
}, [type]);
|
|
@@ -19387,12 +19382,8 @@ var DeleteWithi18nAction = function DeleteWithi18nAction(_ref) {
|
|
|
19387
19382
|
var syncState = reactHooks.useSyncState(id, type);
|
|
19388
19383
|
var baseDocumentSyncState = reactHooks.useSyncState(baseDocumentId, type);
|
|
19389
19384
|
|
|
19390
|
-
var _ref2 = reactHooks.
|
|
19391
|
-
|
|
19392
|
-
published = _ref2.published;
|
|
19393
|
-
|
|
19394
|
-
var _ref3 = reactHooks.useDocumentOperation(id, type),
|
|
19395
|
-
deleteOp = _ref3["delete"];
|
|
19385
|
+
var _ref2 = reactHooks.useDocumentOperation(id, type),
|
|
19386
|
+
deleteOp = _ref2["delete"];
|
|
19396
19387
|
|
|
19397
19388
|
var _React$useState = React__default["default"].useState(false),
|
|
19398
19389
|
_React$useState2 = _slicedToArray__default["default"](_React$useState, 2),
|
|
@@ -19481,19 +19472,20 @@ var DeleteWithi18nAction = function DeleteWithi18nAction(_ref) {
|
|
|
19481
19472
|
}
|
|
19482
19473
|
}
|
|
19483
19474
|
}, _callee, null, [[0, 21, 24, 27]]);
|
|
19484
|
-
})), [baseDocumentId, baseDocumentEditState.draft, baseDocumentEditState.published, deleteOp, onComplete]);
|
|
19475
|
+
})), [toast, baseDocumentId, baseDocumentEditState.draft, baseDocumentEditState.published, deleteOp, onComplete, config.fieldNames.references]);
|
|
19485
19476
|
var dialogContent = React__default["default"].useMemo(function () {
|
|
19486
19477
|
if (isConfirmDialogOpen) {
|
|
19487
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
19488
|
-
|
|
19489
|
-
|
|
19478
|
+
return /*#__PURE__*/React__default["default"].createElement(ConfirmDeleteDialog__default["default"], {
|
|
19479
|
+
action: "delete",
|
|
19480
|
+
id: id,
|
|
19481
|
+
type: type,
|
|
19490
19482
|
onCancel: onDialogCancel,
|
|
19491
19483
|
onConfirm: onDialogConfirm
|
|
19492
19484
|
});
|
|
19493
19485
|
}
|
|
19494
19486
|
|
|
19495
19487
|
return null;
|
|
19496
|
-
}, [
|
|
19488
|
+
}, [id, type, isConfirmDialogOpen, onDialogCancel, onDialogConfirm]);
|
|
19497
19489
|
return {
|
|
19498
19490
|
onHandle: onHandle,
|
|
19499
19491
|
color: 'danger',
|