@atlaskit/editor-synced-block-provider 2.7.1 → 2.7.2

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,5 +1,12 @@
1
1
  # @atlaskit/editor-synced-block-provider
2
2
 
3
+ ## 2.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7bb84f91500cf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7bb84f91500cf) -
8
+ [ux] EDITOR-2442 update warning modal on source sync block deletion
9
+
3
10
  ## 2.7.1
4
11
 
5
12
  ### Patch Changes
@@ -214,7 +214,7 @@ var SourceSyncBlockStoreManager = exports.SourceSyncBlockStoreManager = /*#__PUR
214
214
  }
215
215
  this.confirmationTransaction = tr;
216
216
  _context2.next = 4;
217
- return this.confirmationCallback();
217
+ return this.confirmationCallback(syncBlockIds.length);
218
218
  case 4:
219
219
  confirmed = _context2.sent;
220
220
  if (!confirmed) {
@@ -143,7 +143,7 @@ export class SourceSyncBlockStoreManager {
143
143
  async deleteSyncBlocksWithConfirmation(tr, syncBlockIds) {
144
144
  if (this.confirmationCallback) {
145
145
  this.confirmationTransaction = tr;
146
- const confirmed = await this.confirmationCallback();
146
+ const confirmed = await this.confirmationCallback(syncBlockIds.length);
147
147
  if (confirmed) {
148
148
  var _this$editorView;
149
149
  (_this$editorView = this.editorView) === null || _this$editorView === void 0 ? void 0 : _this$editorView.dispatch(this.confirmationTransaction.setMeta('isConfirmedSyncBlockDeletion', true));
@@ -207,7 +207,7 @@ export var SourceSyncBlockStoreManager = /*#__PURE__*/function () {
207
207
  }
208
208
  this.confirmationTransaction = tr;
209
209
  _context2.next = 4;
210
- return this.confirmationCallback();
210
+ return this.confirmationCallback(syncBlockIds.length);
211
211
  case 4:
212
212
  confirmed = _context2.sent;
213
213
  if (!confirmed) {
@@ -3,7 +3,7 @@ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/stat
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { ResourceId, SyncBlockAttrs } from '../common/types';
5
5
  import type { SyncBlockDataProvider } from '../providers/types';
6
- export type ConfirmationCallback = () => Promise<boolean>;
6
+ export type ConfirmationCallback = (syncBlockCount: number) => Promise<boolean>;
7
7
  export type CreationCallback = () => void;
8
8
  export declare class SourceSyncBlockStoreManager {
9
9
  private dataProvider?;
@@ -3,7 +3,7 @@ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/stat
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { ResourceId, SyncBlockAttrs } from '../common/types';
5
5
  import type { SyncBlockDataProvider } from '../providers/types';
6
- export type ConfirmationCallback = () => Promise<boolean>;
6
+ export type ConfirmationCallback = (syncBlockCount: number) => Promise<boolean>;
7
7
  export type CreationCallback = () => void;
8
8
  export declare class SourceSyncBlockStoreManager {
9
9
  private dataProvider?;
package/package.json CHANGED
@@ -82,7 +82,7 @@
82
82
  }
83
83
  },
84
84
  "name": "@atlaskit/editor-synced-block-provider",
85
- "version": "2.7.1",
85
+ "version": "2.7.2",
86
86
  "description": "Synced Block Provider for @atlaskit/editor-plugin-synced-block",
87
87
  "author": "Atlassian Pty Ltd",
88
88
  "license": "Apache-2.0",