@atlaskit/editor-plugin-synced-block 6.0.18 → 6.0.20

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,19 @@
1
1
  # @atlaskit/editor-plugin-synced-block
2
2
 
3
+ ## 6.0.20
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0f4a08b633f6e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f4a08b633f6e) -
8
+ Internal changes to remove unnecessary token fallbacks and imports from `@atlaskit/theme`
9
+ - Updated dependencies
10
+
11
+ ## 6.0.19
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 6.0.18
4
18
 
5
19
  ### Patch Changes
@@ -84,22 +84,30 @@ var SyncBlock = exports.SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
84
84
  component: _analytics.ACTION_SUBJECT.SYNCED_BLOCK,
85
85
  dispatchAnalyticsEvent: (_this$api2 = this.api) === null || _this$api2 === void 0 || (_this$api2 = _this$api2.analytics) === null || _this$api2 === void 0 ? void 0 : _this$api2.actions.fireAnalyticsEvent,
86
86
  fallbackComponent: null
87
- }, /*#__PURE__*/_react.default.createElement(_syncBlock.SyncBlockActionsProvider, {
87
+ }, /*#__PURE__*/_react.default.createElement(_syncBlock.SyncBlockActionsProvider
88
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
89
+ , {
88
90
  removeSyncBlock: function removeSyncBlock() {
89
91
  var pos = getPos();
90
92
  if (pos !== undefined) {
91
93
  (0, _editorCommands.removeSyncedBlockAtPos)(_this2.api, pos);
92
94
  }
93
- },
95
+ }
96
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
97
+ ,
94
98
  fetchSyncBlockSourceInfo: function fetchSyncBlockSourceInfo(sourceAri) {
95
99
  return syncBlockStore.referenceManager.fetchSyncBlockSourceInfoBySourceAri(sourceAri);
96
100
  }
97
101
  }, /*#__PURE__*/_react.default.createElement(_SyncBlockRendererWrapper.SyncBlockRendererWrapper, {
98
102
  localId: this.node.attrs.localId,
99
- syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer,
103
+ syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer
104
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
105
+ ,
100
106
  useFetchSyncBlockTitle: function useFetchSyncBlockTitle() {
101
107
  return (0, _editorSyncedBlockProvider.useFetchSyncBlockTitle)(syncBlockStore, _this2.node);
102
- },
108
+ }
109
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
110
+ ,
103
111
  useFetchSyncBlockData: function useFetchSyncBlockData() {
104
112
  var _this2$api;
105
113
  return (0, _editorSyncedBlockProvider.useFetchSyncBlockData)(syncBlockStore, resourceId, localId, (_this2$api = _this2.api) === null || _this2$api === void 0 || (_this2$api = _this2$api.analytics) === null || _this2$api === void 0 || (_this2$api = _this2$api.actions) === null || _this2$api === void 0 ? void 0 : _this2$api.fireAnalyticsEvent);
@@ -134,6 +134,7 @@ var DeleteConfirmationModal = exports.DeleteConfirmationModal = function DeleteC
134
134
  if (bodiedSyncBlockDeletionStatus === 'completed' && isOpen) {
135
135
  var _api$core5;
136
136
  // auto close modal once deletion is successful
137
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
137
138
  setIsOpen(false);
138
139
  api === null || api === void 0 || (_api$core5 = api.core) === null || _api$core5 === void 0 || _api$core5.actions.execute(function (_ref4) {
139
140
  var tr = _ref4.tr;
@@ -204,6 +205,8 @@ var DeleteConfirmationModal = exports.DeleteConfirmationModal = function DeleteC
204
205
  return _ref5.apply(this, arguments);
205
206
  };
206
207
  }();
208
+
209
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
207
210
  fetchReferences();
208
211
  }
209
212
  }, [isOpen, syncBlockIds, syncBlockStoreManager.sourceManager]);
@@ -192,12 +192,16 @@ var SyncedLocationDropdown = exports.SyncedLocationDropdown = function SyncedLoc
192
192
  isOpen = _useState2[0],
193
193
  setIsOpen = _useState2[1];
194
194
  return /*#__PURE__*/React.createElement(_dropdownMenu.default, {
195
- isOpen: isOpen,
195
+ isOpen: isOpen
196
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
197
+ ,
196
198
  onOpenChange: function onOpenChange(_ref5) {
197
199
  var isOpen = _ref5.isOpen;
198
200
  return setIsOpen(isOpen);
199
201
  },
200
- testId: "synced-block-synced-locations-dropdown",
202
+ testId: "synced-block-synced-locations-dropdown"
203
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
204
+ ,
201
205
  trigger: function trigger(_ref6) {
202
206
  var triggerRef = _ref6.triggerRef,
203
207
  triggerProps = (0, _objectWithoutProperties2.default)(_ref6, _excluded);
@@ -314,7 +318,9 @@ var DropdownContent = function DropdownContent(_ref7) {
314
318
  href: reference.url,
315
319
  target: "_blank",
316
320
  key: reference.title,
317
- rel: "noopener noreferrer",
321
+ rel: "noopener noreferrer"
322
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
323
+ ,
318
324
  onClick: function onClick() {
319
325
  return handleLocationClick();
320
326
  }
@@ -88,7 +88,9 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(stat
88
88
  icon: /*#__PURE__*/_react.default.createElement(_linkBroken.default, {
89
89
  label: ""
90
90
  }),
91
- title: formatMessage(_messages.syncBlockMessages.unsyncButton),
91
+ title: formatMessage(_messages.syncBlockMessages.unsyncButton)
92
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
93
+ ,
92
94
  onClick: function onClick() {
93
95
  return (0, _editorCommands.unsync)(syncBlockStore, isBodiedSyncBlock, view);
94
96
  },
@@ -53,18 +53,26 @@ export class SyncBlock extends ReactNodeView {
53
53
  component: ACTION_SUBJECT.SYNCED_BLOCK,
54
54
  dispatchAnalyticsEvent: (_this$api2 = this.api) === null || _this$api2 === void 0 ? void 0 : (_this$api2$analytics = _this$api2.analytics) === null || _this$api2$analytics === void 0 ? void 0 : _this$api2$analytics.actions.fireAnalyticsEvent,
55
55
  fallbackComponent: null
56
- }, /*#__PURE__*/React.createElement(SyncBlockActionsProvider, {
56
+ }, /*#__PURE__*/React.createElement(SyncBlockActionsProvider
57
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
58
+ , {
57
59
  removeSyncBlock: () => {
58
60
  const pos = getPos();
59
61
  if (pos !== undefined) {
60
62
  removeSyncedBlockAtPos(this.api, pos);
61
63
  }
62
- },
64
+ }
65
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
66
+ ,
63
67
  fetchSyncBlockSourceInfo: sourceAri => syncBlockStore.referenceManager.fetchSyncBlockSourceInfoBySourceAri(sourceAri)
64
68
  }, /*#__PURE__*/React.createElement(SyncBlockRendererWrapper, {
65
69
  localId: this.node.attrs.localId,
66
- syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer,
67
- useFetchSyncBlockTitle: () => useFetchSyncBlockTitle(syncBlockStore, this.node),
70
+ syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer
71
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
72
+ ,
73
+ useFetchSyncBlockTitle: () => useFetchSyncBlockTitle(syncBlockStore, this.node)
74
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
75
+ ,
68
76
  useFetchSyncBlockData: () => {
69
77
  var _this$api3, _this$api3$analytics, _this$api3$analytics$;
70
78
  return useFetchSyncBlockData(syncBlockStore, resourceId, localId, (_this$api3 = this.api) === null || _this$api3 === void 0 ? void 0 : (_this$api3$analytics = _this$api3.analytics) === null || _this$api3$analytics === void 0 ? void 0 : (_this$api3$analytics$ = _this$api3$analytics.actions) === null || _this$api3$analytics$ === void 0 ? void 0 : _this$api3$analytics$.fireAnalyticsEvent);
@@ -113,6 +113,7 @@ export const DeleteConfirmationModal = ({
113
113
  if (bodiedSyncBlockDeletionStatus === 'completed' && isOpen) {
114
114
  var _api$core5;
115
115
  // auto close modal once deletion is successful
116
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
116
117
  setIsOpen(false);
117
118
  api === null || api === void 0 ? void 0 : (_api$core5 = api.core) === null || _api$core5 === void 0 ? void 0 : _api$core5.actions.execute(({
118
119
  tr
@@ -143,6 +144,8 @@ export const DeleteConfirmationModal = ({
143
144
  setReferenceCount(0);
144
145
  }
145
146
  };
147
+
148
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
146
149
  fetchReferences();
147
150
  }
148
151
  }, [isOpen, syncBlockIds, syncBlockStoreManager.sourceManager]);
@@ -172,11 +172,15 @@ export const SyncedLocationDropdown = ({
172
172
  const triggerTitle = formatMessage(messages.syncedLocationDropdownTitle);
173
173
  const [isOpen, setIsOpen] = useState(false);
174
174
  return /*#__PURE__*/React.createElement(DropdownMenu, {
175
- isOpen: isOpen,
175
+ isOpen: isOpen
176
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
177
+ ,
176
178
  onOpenChange: ({
177
179
  isOpen
178
180
  }) => setIsOpen(isOpen),
179
- testId: "synced-block-synced-locations-dropdown",
181
+ testId: "synced-block-synced-locations-dropdown"
182
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
183
+ ,
180
184
  trigger: ({
181
185
  triggerRef,
182
186
  ...triggerProps
@@ -268,7 +272,9 @@ const DropdownContent = ({
268
272
  href: reference.url,
269
273
  target: "_blank",
270
274
  key: reference.title,
271
- rel: "noopener noreferrer",
275
+ rel: "noopener noreferrer"
276
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
277
+ ,
272
278
  onClick: () => handleLocationClick()
273
279
  }, /*#__PURE__*/React.createElement(ItemTitle, {
274
280
  title: reference.title || reference.url || '',
@@ -84,7 +84,9 @@ export const getToolbarConfig = (state, intl, api, syncBlockStore) => {
84
84
  icon: /*#__PURE__*/React.createElement(LinkBrokenIcon, {
85
85
  label: ""
86
86
  }),
87
- title: formatMessage(messages.unsyncButton),
87
+ title: formatMessage(messages.unsyncButton)
88
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
89
+ ,
88
90
  onClick: () => unsync(syncBlockStore, isBodiedSyncBlock, view),
89
91
  testId: isBodiedSyncBlock ? SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarSourceUnsync : SYNCED_BLOCK_BUTTON_TEST_ID.syncedBlockToolbarReferenceUnsync
90
92
  });
@@ -77,22 +77,30 @@ export var SyncBlock = /*#__PURE__*/function (_ReactNodeView) {
77
77
  component: ACTION_SUBJECT.SYNCED_BLOCK,
78
78
  dispatchAnalyticsEvent: (_this$api2 = this.api) === null || _this$api2 === void 0 || (_this$api2 = _this$api2.analytics) === null || _this$api2 === void 0 ? void 0 : _this$api2.actions.fireAnalyticsEvent,
79
79
  fallbackComponent: null
80
- }, /*#__PURE__*/React.createElement(SyncBlockActionsProvider, {
80
+ }, /*#__PURE__*/React.createElement(SyncBlockActionsProvider
81
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
82
+ , {
81
83
  removeSyncBlock: function removeSyncBlock() {
82
84
  var pos = getPos();
83
85
  if (pos !== undefined) {
84
86
  removeSyncedBlockAtPos(_this2.api, pos);
85
87
  }
86
- },
88
+ }
89
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
90
+ ,
87
91
  fetchSyncBlockSourceInfo: function fetchSyncBlockSourceInfo(sourceAri) {
88
92
  return syncBlockStore.referenceManager.fetchSyncBlockSourceInfoBySourceAri(sourceAri);
89
93
  }
90
94
  }, /*#__PURE__*/React.createElement(SyncBlockRendererWrapper, {
91
95
  localId: this.node.attrs.localId,
92
- syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer,
96
+ syncedBlockRenderer: (_this$options2 = this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.syncedBlockRenderer
97
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
98
+ ,
93
99
  useFetchSyncBlockTitle: function useFetchSyncBlockTitle() {
94
100
  return _useFetchSyncBlockTitle(syncBlockStore, _this2.node);
95
- },
101
+ }
102
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
103
+ ,
96
104
  useFetchSyncBlockData: function useFetchSyncBlockData() {
97
105
  var _this2$api;
98
106
  return _useFetchSyncBlockData(syncBlockStore, resourceId, localId, (_this2$api = _this2.api) === null || _this2$api === void 0 || (_this2$api = _this2$api.analytics) === null || _this2$api === void 0 || (_this2$api = _this2$api.actions) === null || _this2$api === void 0 ? void 0 : _this2$api.fireAnalyticsEvent);
@@ -125,6 +125,7 @@ export var DeleteConfirmationModal = function DeleteConfirmationModal(_ref) {
125
125
  if (bodiedSyncBlockDeletionStatus === 'completed' && isOpen) {
126
126
  var _api$core5;
127
127
  // auto close modal once deletion is successful
128
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
128
129
  setIsOpen(false);
129
130
  api === null || api === void 0 || (_api$core5 = api.core) === null || _api$core5 === void 0 || _api$core5.actions.execute(function (_ref4) {
130
131
  var tr = _ref4.tr;
@@ -195,6 +196,8 @@ export var DeleteConfirmationModal = function DeleteConfirmationModal(_ref) {
195
196
  return _ref5.apply(this, arguments);
196
197
  };
197
198
  }();
199
+
200
+ // eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
198
201
  fetchReferences();
199
202
  }
200
203
  }, [isOpen, syncBlockIds, syncBlockStoreManager.sourceManager]);
@@ -183,12 +183,16 @@ export var SyncedLocationDropdown = function SyncedLocationDropdown(_ref4) {
183
183
  isOpen = _useState2[0],
184
184
  setIsOpen = _useState2[1];
185
185
  return /*#__PURE__*/React.createElement(DropdownMenu, {
186
- isOpen: isOpen,
186
+ isOpen: isOpen
187
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
188
+ ,
187
189
  onOpenChange: function onOpenChange(_ref5) {
188
190
  var isOpen = _ref5.isOpen;
189
191
  return setIsOpen(isOpen);
190
192
  },
191
- testId: "synced-block-synced-locations-dropdown",
193
+ testId: "synced-block-synced-locations-dropdown"
194
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
195
+ ,
192
196
  trigger: function trigger(_ref6) {
193
197
  var triggerRef = _ref6.triggerRef,
194
198
  triggerProps = _objectWithoutProperties(_ref6, _excluded);
@@ -305,7 +309,9 @@ var DropdownContent = function DropdownContent(_ref7) {
305
309
  href: reference.url,
306
310
  target: "_blank",
307
311
  key: reference.title,
308
- rel: "noopener noreferrer",
312
+ rel: "noopener noreferrer"
313
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
314
+ ,
309
315
  onClick: function onClick() {
310
316
  return handleLocationClick();
311
317
  }
@@ -79,7 +79,9 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
79
79
  icon: /*#__PURE__*/React.createElement(LinkBrokenIcon, {
80
80
  label: ""
81
81
  }),
82
- title: formatMessage(messages.unsyncButton),
82
+ title: formatMessage(messages.unsyncButton)
83
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
84
+ ,
83
85
  onClick: function onClick() {
84
86
  return unsync(syncBlockStore, isBodiedSyncBlock, view);
85
87
  },
package/docs/0-intro.tsx CHANGED
@@ -16,7 +16,7 @@ ${createEditorUseOnlyNotice('Editor Plugin Synced Block', [
16
16
  ${
17
17
  (
18
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
19
- <div style={{ marginTop: token('space.100', '8px') }}>
19
+ <div style={{ marginTop: token('space.100') }}>
20
20
  <AtlassianInternalWarning />
21
21
  </div>
22
22
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-synced-block",
3
- "version": "6.0.18",
3
+ "version": "6.0.20",
4
4
  "description": "SyncedBlock plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -54,7 +54,7 @@
54
54
  "@atlaskit/platform-feature-flags": "^1.1.0",
55
55
  "@atlaskit/primitives": "^18.0.0",
56
56
  "@atlaskit/spinner": "19.0.11",
57
- "@atlaskit/tmp-editor-statsig": "^43.0.0",
57
+ "@atlaskit/tmp-editor-statsig": "^44.0.0",
58
58
  "@atlaskit/tokens": "11.1.1",
59
59
  "@atlaskit/tooltip": "^21.0.0",
60
60
  "@atlaskit/visually-hidden": "^3.0.0",