@atlaskit/editor-plugin-synced-block 5.1.10 → 5.1.12
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 +16 -0
- package/afm-cc/tsconfig.json +10 -4
- package/afm-jira/tsconfig.json +9 -0
- package/afm-products/tsconfig.json +9 -0
- package/dist/cjs/nodeviews/bodiedSyncedBlock.js +13 -2
- package/dist/cjs/nodeviews/syncedBlock.js +21 -2
- package/dist/cjs/ui/SyncedLocationDropdown.compiled.css +26 -0
- package/dist/cjs/ui/SyncedLocationDropdown.js +302 -0
- package/dist/cjs/ui/floating-toolbar.js +20 -0
- package/dist/es2019/nodeviews/bodiedSyncedBlock.js +13 -2
- package/dist/es2019/nodeviews/syncedBlock.js +19 -4
- package/dist/es2019/ui/SyncedLocationDropdown.compiled.css +26 -0
- package/dist/es2019/ui/SyncedLocationDropdown.js +254 -0
- package/dist/es2019/ui/floating-toolbar.js +21 -0
- package/dist/esm/nodeviews/bodiedSyncedBlock.js +13 -2
- package/dist/esm/nodeviews/syncedBlock.js +21 -2
- package/dist/esm/ui/SyncedLocationDropdown.compiled.css +26 -0
- package/dist/esm/ui/SyncedLocationDropdown.js +293 -0
- package/dist/esm/ui/floating-toolbar.js +20 -0
- package/dist/types/ui/SyncedLocationDropdown.d.ts +12 -0
- package/dist/types-ts4.5/ui/SyncedLocationDropdown.d.ts +12 -0
- package/package.json +7 -3
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/* SyncedLocationDropdown.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
6
|
+
var _excluded = ["triggerRef"];
|
|
7
|
+
import "./SyncedLocationDropdown.compiled.css";
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
10
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
12
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
13
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
14
|
+
import { useState, useEffect } from 'react';
|
|
15
|
+
import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
16
|
+
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
17
|
+
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
18
|
+
import { IconTile } from '@atlaskit/icon';
|
|
19
|
+
import PageLiveDocIcon from '@atlaskit/icon-lab/core/page-live-doc';
|
|
20
|
+
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
21
|
+
import PageIcon from '@atlaskit/icon/core/page';
|
|
22
|
+
import StatusErrorIcon from '@atlaskit/icon/core/status-error';
|
|
23
|
+
import { ConfluenceIcon, JiraIcon } from '@atlaskit/logo';
|
|
24
|
+
import Lozenge from '@atlaskit/lozenge';
|
|
25
|
+
import { Box, Text, Inline, Anchor, Stack } from '@atlaskit/primitives/compiled';
|
|
26
|
+
import Spinner from '@atlaskit/spinner';
|
|
27
|
+
var headingStyles = null;
|
|
28
|
+
var styles = {
|
|
29
|
+
title: "_1reo15vq _18m915vq _syazazsu _1bto1l2s _o5721q9c",
|
|
30
|
+
note: "_syaz1rpy _o5721q9c",
|
|
31
|
+
lozenge: "_ahbq1b66 _1ul91wqb",
|
|
32
|
+
noResultsContainer: "_1bsbo8uj _y3gn1h6o",
|
|
33
|
+
dropdownContent: "_1rjcv77o _1bsb96ou _1tkeqkoa _c71lko4j _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
34
|
+
contentContainer: "_1bsb1osq _1wpz1fhb _18m91wug",
|
|
35
|
+
errorContainer: "_1bsbo8uj _1e0c1txw",
|
|
36
|
+
errorIcon: "_1mour5cr",
|
|
37
|
+
learnMoreLink: "_4bfu1r31 _1hmsglyw _ajmmnqa1"
|
|
38
|
+
};
|
|
39
|
+
var ItemTitle = function ItemTitle(_ref) {
|
|
40
|
+
var title = _ref.title,
|
|
41
|
+
formatMessage = _ref.formatMessage,
|
|
42
|
+
onSamePage = _ref.onSamePage,
|
|
43
|
+
isSource = _ref.isSource;
|
|
44
|
+
return /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement(Box, {
|
|
45
|
+
as: "span",
|
|
46
|
+
xcss: styles.title
|
|
47
|
+
}, title), onSamePage && /*#__PURE__*/React.createElement(Box, {
|
|
48
|
+
as: "span",
|
|
49
|
+
xcss: styles.note
|
|
50
|
+
}, "\xA0- ", formatMessage(messages.syncedLocationDropdownTitleNote)), isSource && /*#__PURE__*/React.createElement(Box, {
|
|
51
|
+
as: "span",
|
|
52
|
+
xcss: styles.lozenge
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Lozenge, null, formatMessage(messages.syncedLocationDropdownSourceLozenge))));
|
|
54
|
+
};
|
|
55
|
+
var Logo = function Logo(_ref2) {
|
|
56
|
+
var product = _ref2.product;
|
|
57
|
+
switch (product) {
|
|
58
|
+
case 'confluence-page':
|
|
59
|
+
return /*#__PURE__*/React.createElement(ConfluenceIcon, {
|
|
60
|
+
size: "xsmall"
|
|
61
|
+
});
|
|
62
|
+
case 'jira-work-item':
|
|
63
|
+
return /*#__PURE__*/React.createElement(JiraIcon, {
|
|
64
|
+
size: "xsmall"
|
|
65
|
+
});
|
|
66
|
+
default:
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var ItemIcon = function ItemIcon(_ref3) {
|
|
71
|
+
var reference = _ref3.reference;
|
|
72
|
+
var hasAccess = reference.hasAccess,
|
|
73
|
+
subType = reference.subType;
|
|
74
|
+
var icon = hasAccess ? subType ? PageLiveDocIcon : PageIcon : function () {
|
|
75
|
+
return /*#__PURE__*/React.createElement(Logo, {
|
|
76
|
+
product: reference.productType
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
return /*#__PURE__*/React.createElement(IconTile, {
|
|
80
|
+
icon: icon,
|
|
81
|
+
label: "",
|
|
82
|
+
appearance: hasAccess ? 'grayBold' : 'gray',
|
|
83
|
+
size: "xsmall"
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
export var processReferenceData = function processReferenceData(referenceData, intl) {
|
|
87
|
+
var formatMessage = intl.formatMessage;
|
|
88
|
+
var sourceInfoMap = new Map();
|
|
89
|
+
referenceData === null || referenceData === void 0 || referenceData.forEach(function (reference) {
|
|
90
|
+
if (!reference) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (sourceInfoMap.has(reference.sourceAri)) {
|
|
94
|
+
var _sourceInfoMap$get;
|
|
95
|
+
(_sourceInfoMap$get = sourceInfoMap.get(reference.sourceAri)) === null || _sourceInfoMap$get === void 0 || _sourceInfoMap$get.push(reference);
|
|
96
|
+
} else {
|
|
97
|
+
sourceInfoMap.set(reference.sourceAri, [reference]);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
var _iterator = _createForOfIteratorHelper(sourceInfoMap.values()),
|
|
101
|
+
_step;
|
|
102
|
+
try {
|
|
103
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
104
|
+
var references = _step.value;
|
|
105
|
+
if (references.length > 1) {
|
|
106
|
+
references.forEach(function (reference, index) {
|
|
107
|
+
return reference.title = "".concat(reference.title, ": ").concat(formatMessage(messages.syncedLocationDropdownTitleBlockIndex, {
|
|
108
|
+
index: index + 1
|
|
109
|
+
}));
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
} catch (err) {
|
|
114
|
+
_iterator.e(err);
|
|
115
|
+
} finally {
|
|
116
|
+
_iterator.f();
|
|
117
|
+
}
|
|
118
|
+
var sortedReferences = Array.from(sourceInfoMap.values()).flat().sort(function (a, b) {
|
|
119
|
+
if (a.isSource !== b.isSource) {
|
|
120
|
+
return b.isSource ? 1 : -1;
|
|
121
|
+
}
|
|
122
|
+
if (a.hasAccess !== b.hasAccess) {
|
|
123
|
+
return a.hasAccess ? -1 : 1;
|
|
124
|
+
}
|
|
125
|
+
return (a.title || '').localeCompare(b.title || '');
|
|
126
|
+
});
|
|
127
|
+
return sortedReferences;
|
|
128
|
+
};
|
|
129
|
+
export var SyncedLocationDropdown = function SyncedLocationDropdown(_ref4) {
|
|
130
|
+
var syncBlockStore = _ref4.syncBlockStore,
|
|
131
|
+
resourceId = _ref4.resourceId,
|
|
132
|
+
intl = _ref4.intl,
|
|
133
|
+
isSource = _ref4.isSource,
|
|
134
|
+
localId = _ref4.localId;
|
|
135
|
+
var formatMessage = intl.formatMessage;
|
|
136
|
+
var triggerTitle = formatMessage(messages.syncedLocationDropdownTitle);
|
|
137
|
+
var _useState = useState(false),
|
|
138
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
139
|
+
isOpen = _useState2[0],
|
|
140
|
+
setIsOpen = _useState2[1];
|
|
141
|
+
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
142
|
+
isOpen: isOpen,
|
|
143
|
+
onOpenChange: function onOpenChange(_ref5) {
|
|
144
|
+
var isOpen = _ref5.isOpen;
|
|
145
|
+
return setIsOpen(isOpen);
|
|
146
|
+
},
|
|
147
|
+
trigger: function trigger(_ref6) {
|
|
148
|
+
var triggerRef = _ref6.triggerRef,
|
|
149
|
+
triggerProps = _objectWithoutProperties(_ref6, _excluded);
|
|
150
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
151
|
+
ref: triggerRef,
|
|
152
|
+
areAnyNewToolbarFlagsEnabled: true,
|
|
153
|
+
iconAfter: /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
154
|
+
color: "currentColor",
|
|
155
|
+
spacing: "spacious",
|
|
156
|
+
label: "",
|
|
157
|
+
size: "small"
|
|
158
|
+
})
|
|
159
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
160
|
+
}, triggerProps), triggerTitle);
|
|
161
|
+
}
|
|
162
|
+
}, isOpen && /*#__PURE__*/React.createElement(DropdownContent, {
|
|
163
|
+
syncBlockStore: syncBlockStore,
|
|
164
|
+
resourceId: resourceId,
|
|
165
|
+
intl: intl,
|
|
166
|
+
isSource: isSource,
|
|
167
|
+
localId: localId
|
|
168
|
+
}));
|
|
169
|
+
};
|
|
170
|
+
var DropdownContent = function DropdownContent(_ref7) {
|
|
171
|
+
var syncBlockStore = _ref7.syncBlockStore,
|
|
172
|
+
resourceId = _ref7.resourceId,
|
|
173
|
+
intl = _ref7.intl,
|
|
174
|
+
isSource = _ref7.isSource,
|
|
175
|
+
localId = _ref7.localId;
|
|
176
|
+
var formatMessage = intl.formatMessage;
|
|
177
|
+
var _useState3 = useState('none'),
|
|
178
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
179
|
+
fetchStatus = _useState4[0],
|
|
180
|
+
setFetchStatus = _useState4[1];
|
|
181
|
+
var _useState5 = useState([]),
|
|
182
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
183
|
+
referenceData = _useState6[0],
|
|
184
|
+
setReferenceData = _useState6[1];
|
|
185
|
+
useEffect(function () {
|
|
186
|
+
setFetchStatus('loading');
|
|
187
|
+
var getReferenceData = /*#__PURE__*/function () {
|
|
188
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
189
|
+
var response;
|
|
190
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
191
|
+
while (1) switch (_context.prev = _context.next) {
|
|
192
|
+
case 0:
|
|
193
|
+
_context.next = 2;
|
|
194
|
+
return syncBlockStore.fetchReferencesSourceInfo(resourceId, localId, isSource);
|
|
195
|
+
case 2:
|
|
196
|
+
response = _context.sent;
|
|
197
|
+
if (!response.error) {
|
|
198
|
+
_context.next = 6;
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
setFetchStatus('error');
|
|
202
|
+
return _context.abrupt("return");
|
|
203
|
+
case 6:
|
|
204
|
+
setReferenceData(processReferenceData(response.references, intl));
|
|
205
|
+
setFetchStatus('success');
|
|
206
|
+
case 8:
|
|
207
|
+
case "end":
|
|
208
|
+
return _context.stop();
|
|
209
|
+
}
|
|
210
|
+
}, _callee);
|
|
211
|
+
}));
|
|
212
|
+
return function getReferenceData() {
|
|
213
|
+
return _ref8.apply(this, arguments);
|
|
214
|
+
};
|
|
215
|
+
}();
|
|
216
|
+
getReferenceData();
|
|
217
|
+
}, [syncBlockStore, intl, isSource, localId, resourceId]);
|
|
218
|
+
var content = function content() {
|
|
219
|
+
switch (fetchStatus) {
|
|
220
|
+
case 'loading':
|
|
221
|
+
return /*#__PURE__*/React.createElement(LoadingScreen, null);
|
|
222
|
+
case 'error':
|
|
223
|
+
return /*#__PURE__*/React.createElement(ErrorScreen, {
|
|
224
|
+
formatMessage: formatMessage
|
|
225
|
+
});
|
|
226
|
+
case 'success':
|
|
227
|
+
if (referenceData.length > 0) {
|
|
228
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
229
|
+
"data-testid": "synced-locations-dropdown-content",
|
|
230
|
+
className: ax([styles.contentContainer, "_ku9g126e _18bk1rpy"])
|
|
231
|
+
}, /*#__PURE__*/React.createElement(DropdownItemGroup, {
|
|
232
|
+
title: formatMessage(messages.syncedLocationDropdownHeading, {
|
|
233
|
+
count: "".concat(referenceData.length > 99 ? '99+' : referenceData.length)
|
|
234
|
+
})
|
|
235
|
+
}, referenceData.map(function (reference) {
|
|
236
|
+
return /*#__PURE__*/React.createElement(DropdownItem, {
|
|
237
|
+
elemBefore: /*#__PURE__*/React.createElement(ItemIcon, {
|
|
238
|
+
reference: reference
|
|
239
|
+
}),
|
|
240
|
+
href: reference.url,
|
|
241
|
+
key: reference.title
|
|
242
|
+
}, /*#__PURE__*/React.createElement(ItemTitle, {
|
|
243
|
+
title: reference.title || reference.url || '',
|
|
244
|
+
formatMessage: formatMessage,
|
|
245
|
+
onSamePage: reference.onSamePage,
|
|
246
|
+
isSource: reference.isSource
|
|
247
|
+
}));
|
|
248
|
+
})));
|
|
249
|
+
} else {
|
|
250
|
+
return /*#__PURE__*/React.createElement(NoResultScreen, {
|
|
251
|
+
formatMessage: formatMessage
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
257
|
+
xcss: styles.dropdownContent
|
|
258
|
+
}, content());
|
|
259
|
+
};
|
|
260
|
+
var LoadingScreen = function LoadingScreen() {
|
|
261
|
+
return /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Spinner, null));
|
|
262
|
+
};
|
|
263
|
+
var ErrorScreen = function ErrorScreen(_ref9) {
|
|
264
|
+
var formatMessage = _ref9.formatMessage;
|
|
265
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
266
|
+
xcss: styles.errorContainer
|
|
267
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
268
|
+
xcss: styles.errorIcon
|
|
269
|
+
}, /*#__PURE__*/React.createElement(StatusErrorIcon, {
|
|
270
|
+
color: "var(--ds-icon-danger, #C9372C)",
|
|
271
|
+
spacing: "spacious",
|
|
272
|
+
label: "",
|
|
273
|
+
size: "small"
|
|
274
|
+
})), /*#__PURE__*/React.createElement(Text, {
|
|
275
|
+
as: "p",
|
|
276
|
+
size: "medium"
|
|
277
|
+
}, formatMessage(messages.syncedLocationDropdownError)));
|
|
278
|
+
};
|
|
279
|
+
var NoResultScreen = function NoResultScreen(_ref0) {
|
|
280
|
+
var formatMessage = _ref0.formatMessage;
|
|
281
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
282
|
+
xcss: styles.noResultsContainer,
|
|
283
|
+
space: "space.100"
|
|
284
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
285
|
+
as: "p"
|
|
286
|
+
}, formatMessage(messages.syncedLocationDropdownNoResults)), /*#__PURE__*/React.createElement(Text, {
|
|
287
|
+
as: "p"
|
|
288
|
+
}, /*#__PURE__*/React.createElement(Anchor, {
|
|
289
|
+
href: "https://hello.atlassian.net/wiki/x/tAtCeAE",
|
|
290
|
+
target: "_blank",
|
|
291
|
+
xcss: styles.learnMoreLink
|
|
292
|
+
}, formatMessage(messages.syncedLocationDropdownLearnMoreLink))));
|
|
293
|
+
};
|
|
@@ -12,6 +12,7 @@ import EditIcon from '@atlaskit/icon/core/edit';
|
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
13
|
import { copySyncedBlockReferenceToClipboard, editSyncedBlockSource, removeSyncedBlock } from '../editor-commands';
|
|
14
14
|
import { findSyncBlockOrBodiedSyncBlock, isBodiedSyncBlockNode } from '../pm-plugins/utils/utils';
|
|
15
|
+
import { SyncedLocationDropdown } from './SyncedLocationDropdown';
|
|
15
16
|
export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBlockStore) {
|
|
16
17
|
var _api$decorations, _api$connectivity;
|
|
17
18
|
var syncBlockObject = findSyncBlockOrBodiedSyncBlock(state.schema, state.selection);
|
|
@@ -22,6 +23,9 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
|
|
|
22
23
|
var isUnsyncedBlock = (syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : syncBlockInstance.error) === SyncBlockError.NotFound;
|
|
23
24
|
var bodiedSyncBlock = state.schema.nodes.bodiedSyncBlock;
|
|
24
25
|
var isBodiedSyncBlock = isBodiedSyncBlockNode(syncBlockObject.node, bodiedSyncBlock);
|
|
26
|
+
var _syncBlockObject$node = syncBlockObject.node.attrs,
|
|
27
|
+
resourceId = _syncBlockObject$node.resourceId,
|
|
28
|
+
localId = _syncBlockObject$node.localId;
|
|
25
29
|
var formatMessage = intl.formatMessage;
|
|
26
30
|
var nodeType = syncBlockObject.node.type;
|
|
27
31
|
var hoverDecoration = api === null || api === void 0 || (_api$decorations = api.decorations) === null || _api$decorations === void 0 ? void 0 : _api$decorations.actions.hoverDecoration;
|
|
@@ -44,6 +48,22 @@ export var getToolbarConfig = function getToolbarConfig(state, intl, api, syncBl
|
|
|
44
48
|
}, hoverDecorationProps(nodeType, akEditorSelectedNodeClassName));
|
|
45
49
|
items.push(deleteButton);
|
|
46
50
|
} else {
|
|
51
|
+
if (fg('platform_synced_block_dogfooding')) {
|
|
52
|
+
var syncedLocation = {
|
|
53
|
+
type: 'custom',
|
|
54
|
+
fallback: [],
|
|
55
|
+
render: function render() {
|
|
56
|
+
return /*#__PURE__*/React.createElement(SyncedLocationDropdown, {
|
|
57
|
+
syncBlockStore: syncBlockStore,
|
|
58
|
+
resourceId: resourceId,
|
|
59
|
+
localId: localId,
|
|
60
|
+
intl: intl,
|
|
61
|
+
isSource: isBodiedSyncBlock
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
items.push(syncedLocation);
|
|
66
|
+
}
|
|
47
67
|
var copyButton = _objectSpread({
|
|
48
68
|
id: 'editor.syncedBlock.copy',
|
|
49
69
|
type: 'button',
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { SyncBlockSourceInfo, SyncBlockStoreManager, ReferencesSourceInfo } from '@atlaskit/editor-synced-block-provider';
|
|
3
|
+
interface Props {
|
|
4
|
+
intl: IntlShape;
|
|
5
|
+
isSource: boolean;
|
|
6
|
+
localId: string;
|
|
7
|
+
resourceId: string;
|
|
8
|
+
syncBlockStore: SyncBlockStoreManager;
|
|
9
|
+
}
|
|
10
|
+
export declare const processReferenceData: (referenceData: ReferencesSourceInfo["references"], intl: IntlShape) => SyncBlockSourceInfo[];
|
|
11
|
+
export declare const SyncedLocationDropdown: ({ syncBlockStore, resourceId, intl, isSource, localId, }: Props) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type IntlShape } from 'react-intl-next';
|
|
2
|
+
import type { SyncBlockSourceInfo, SyncBlockStoreManager, ReferencesSourceInfo } from '@atlaskit/editor-synced-block-provider';
|
|
3
|
+
interface Props {
|
|
4
|
+
intl: IntlShape;
|
|
5
|
+
isSource: boolean;
|
|
6
|
+
localId: string;
|
|
7
|
+
resourceId: string;
|
|
8
|
+
syncBlockStore: SyncBlockStoreManager;
|
|
9
|
+
}
|
|
10
|
+
export declare const processReferenceData: (referenceData: ReferencesSourceInfo["references"], intl: IntlShape) => SyncBlockSourceInfo[];
|
|
11
|
+
export declare const SyncedLocationDropdown: ({ syncBlockStore, resourceId, intl, isSource, localId, }: Props) => JSX.Element;
|
|
12
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.12",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/adf-schema": "^51.5.0",
|
|
32
32
|
"@atlaskit/button": "23.9.3",
|
|
33
|
+
"@atlaskit/dropdown-menu": "16.4.1",
|
|
33
34
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
34
35
|
"@atlaskit/editor-plugin-analytics": "^7.0.0",
|
|
35
36
|
"@atlaskit/editor-plugin-block-menu": "^6.0.0",
|
|
@@ -45,15 +46,18 @@
|
|
|
45
46
|
"@atlaskit/flag": "^17.8.0",
|
|
46
47
|
"@atlaskit/icon": "29.4.1",
|
|
47
48
|
"@atlaskit/icon-lab": "^5.14.0",
|
|
49
|
+
"@atlaskit/logo": "^19.10.0",
|
|
48
50
|
"@atlaskit/lozenge": "^13.3.0",
|
|
49
51
|
"@atlaskit/modal-dialog": "^14.10.0",
|
|
50
52
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
|
-
"@atlaskit/primitives": "^17.
|
|
52
|
-
"@atlaskit/
|
|
53
|
+
"@atlaskit/primitives": "^17.1.0",
|
|
54
|
+
"@atlaskit/spinner": "19.0.8",
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^16.22.0",
|
|
53
56
|
"@atlaskit/tokens": "9.1.2",
|
|
54
57
|
"@atlaskit/tooltip": "^20.14.0",
|
|
55
58
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
56
59
|
"@babel/runtime": "^7.0.0",
|
|
60
|
+
"@compiled/react": "^0.18.6",
|
|
57
61
|
"bind-event-listener": "^3.0.0",
|
|
58
62
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
59
63
|
},
|