@atlaskit/editor-plugin-extension 10.1.7 → 10.1.9
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/dist/cjs/pm-plugins/toolbar.js +13 -2
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +6 -3
- package/dist/es2019/pm-plugins/toolbar.js +14 -3
- package/dist/es2019/ui/ConfigPanel/Fields/UserSelect.js +6 -3
- package/dist/esm/pm-plugins/toolbar.js +14 -3
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +6 -3
- package/example-utils/config-panel/example-manifest-all-fields.ts +2 -2
- package/example-utils/config-panel/example-manifest-individual-fields.ts +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 10.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f3af0f1353dd5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f3af0f1353dd5) -
|
|
8
|
+
Remove legacy icon glyphs and oldName prop support from metadata core.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 10.1.8
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`a4f09d516e927`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a4f09d516e927) -
|
|
16
|
+
[NO-ISSUE] Analytics for onclick for extensions copy
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 10.1.7
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -300,6 +300,17 @@ var createOnClickCopyButton = exports.createOnClickCopyButton = function createO
|
|
|
300
300
|
|
|
301
301
|
// this command copies the text content of the unsupported content extension to the clipboard
|
|
302
302
|
return function (editorState) {
|
|
303
|
+
var _extensionApi$analyti;
|
|
304
|
+
extensionApi === null || extensionApi === void 0 || (_extensionApi$analyti = extensionApi.analytics) === null || _extensionApi$analyti === void 0 || _extensionApi$analyti.actions.fireAnalyticsEvent({
|
|
305
|
+
action: _analytics.ACTION.CLICKED,
|
|
306
|
+
actionSubject: _analytics.ACTION_SUBJECT.COPY_BUTTON,
|
|
307
|
+
actionSubjectId: node.type.name,
|
|
308
|
+
eventType: _analytics.EVENT_TYPE.UI,
|
|
309
|
+
attributes: {
|
|
310
|
+
extensionType: node.attrs.extensionType,
|
|
311
|
+
extensionKey: node.attrs.extensionKey
|
|
312
|
+
}
|
|
313
|
+
});
|
|
303
314
|
(0, _utils3.copyUnsupportedContentToClipboard)({
|
|
304
315
|
locale: locale,
|
|
305
316
|
unsupportedContent: adf,
|
|
@@ -324,14 +335,14 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
324
335
|
extensionApi = _ref2.extensionApi,
|
|
325
336
|
getUnsupportedContent = _ref2.getUnsupportedContent;
|
|
326
337
|
return function (state, intl) {
|
|
327
|
-
var _extensionApi$decorat, _extensionApi$context, _extensionApi$
|
|
338
|
+
var _extensionApi$decorat, _extensionApi$context, _extensionApi$analyti2, _extensionApi$connect;
|
|
328
339
|
var formatMessage = intl.formatMessage,
|
|
329
340
|
locale = intl.locale;
|
|
330
341
|
var extensionState = (0, _pluginFactory.getPluginState)(state);
|
|
331
342
|
var extensionProvider = extensionState.extensionProvider;
|
|
332
343
|
var hoverDecoration = extensionApi === null || extensionApi === void 0 || (_extensionApi$decorat = extensionApi.decorations) === null || _extensionApi$decorat === void 0 ? void 0 : _extensionApi$decorat.actions.hoverDecoration;
|
|
333
344
|
var applyChangeToContextPanel = extensionApi === null || extensionApi === void 0 || (_extensionApi$context = extensionApi.contextPanel) === null || _extensionApi$context === void 0 ? void 0 : _extensionApi$context.actions.applyChange;
|
|
334
|
-
var editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 || (_extensionApi$
|
|
345
|
+
var editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 || (_extensionApi$analyti2 = extensionApi.analytics) === null || _extensionApi$analyti2 === void 0 ? void 0 : _extensionApi$analyti2.actions;
|
|
335
346
|
if (!extensionState || extensionState.showContextPanel || !extensionState.element) {
|
|
336
347
|
return;
|
|
337
348
|
}
|
|
@@ -113,8 +113,11 @@ function SafeSmartUserPicker(_ref) {
|
|
|
113
113
|
_context.next = 2;
|
|
114
114
|
return (0, _smartUserPicker.hydrateDefaultValues)(undefined,
|
|
115
115
|
// no need to override baseUrl
|
|
116
|
-
makeCompat(safeValue), productKey, undefined
|
|
117
|
-
|
|
116
|
+
makeCompat(safeValue), productKey, undefined,
|
|
117
|
+
// no need to override siteId
|
|
118
|
+
{
|
|
119
|
+
tenantId: siteId
|
|
120
|
+
});
|
|
118
121
|
case 2:
|
|
119
122
|
hydrated = _context.sent;
|
|
120
123
|
if (!(cancel || !isOptionData(hydrated))) {
|
|
@@ -136,7 +139,7 @@ function SafeSmartUserPicker(_ref) {
|
|
|
136
139
|
return function () {
|
|
137
140
|
cancel = true;
|
|
138
141
|
};
|
|
139
|
-
}, [safeValue, productKey]);
|
|
142
|
+
}, [safeValue, productKey, siteId]);
|
|
140
143
|
return /*#__PURE__*/_react.default.createElement(_smartUserPicker.default
|
|
141
144
|
// Ignored via go/ees005
|
|
142
145
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { INPUT_METHOD, ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { messages, NATIVE_EMBED_EXTENSION_TYPE } from '@atlaskit/editor-common/extensions';
|
|
4
4
|
import commonMessages from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { BODIED_EXT_MBE_MARGIN_TOP } from '@atlaskit/editor-common/styles';
|
|
@@ -302,6 +302,17 @@ export const createOnClickCopyButton = ({
|
|
|
302
302
|
|
|
303
303
|
// this command copies the text content of the unsupported content extension to the clipboard
|
|
304
304
|
return editorState => {
|
|
305
|
+
var _extensionApi$analyti;
|
|
306
|
+
extensionApi === null || extensionApi === void 0 ? void 0 : (_extensionApi$analyti = extensionApi.analytics) === null || _extensionApi$analyti === void 0 ? void 0 : _extensionApi$analyti.actions.fireAnalyticsEvent({
|
|
307
|
+
action: ACTION.CLICKED,
|
|
308
|
+
actionSubject: ACTION_SUBJECT.COPY_BUTTON,
|
|
309
|
+
actionSubjectId: node.type.name,
|
|
310
|
+
eventType: EVENT_TYPE.UI,
|
|
311
|
+
attributes: {
|
|
312
|
+
extensionType: node.attrs.extensionType,
|
|
313
|
+
extensionKey: node.attrs.extensionKey
|
|
314
|
+
}
|
|
315
|
+
});
|
|
305
316
|
copyUnsupportedContentToClipboard({
|
|
306
317
|
locale,
|
|
307
318
|
unsupportedContent: adf,
|
|
@@ -325,7 +336,7 @@ export const getToolbarConfig = ({
|
|
|
325
336
|
extensionApi,
|
|
326
337
|
getUnsupportedContent
|
|
327
338
|
}) => (state, intl) => {
|
|
328
|
-
var _extensionApi$decorat, _extensionApi$context, _extensionApi$
|
|
339
|
+
var _extensionApi$decorat, _extensionApi$context, _extensionApi$analyti2, _extensionApi$connect, _extensionApi$connect2, _extensionApi$connect3;
|
|
329
340
|
const {
|
|
330
341
|
formatMessage,
|
|
331
342
|
locale
|
|
@@ -336,7 +347,7 @@ export const getToolbarConfig = ({
|
|
|
336
347
|
} = extensionState;
|
|
337
348
|
const hoverDecoration = extensionApi === null || extensionApi === void 0 ? void 0 : (_extensionApi$decorat = extensionApi.decorations) === null || _extensionApi$decorat === void 0 ? void 0 : _extensionApi$decorat.actions.hoverDecoration;
|
|
338
349
|
const applyChangeToContextPanel = extensionApi === null || extensionApi === void 0 ? void 0 : (_extensionApi$context = extensionApi.contextPanel) === null || _extensionApi$context === void 0 ? void 0 : _extensionApi$context.actions.applyChange;
|
|
339
|
-
const editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 ? void 0 : (_extensionApi$
|
|
350
|
+
const editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 ? void 0 : (_extensionApi$analyti2 = extensionApi.analytics) === null || _extensionApi$analyti2 === void 0 ? void 0 : _extensionApi$analyti2.actions;
|
|
340
351
|
if (!extensionState || extensionState.showContextPanel || !extensionState.element) {
|
|
341
352
|
return;
|
|
342
353
|
}
|
|
@@ -79,8 +79,11 @@ function SafeSmartUserPicker({
|
|
|
79
79
|
async function hydrate() {
|
|
80
80
|
const hydrated = await hydrateDefaultValues(undefined,
|
|
81
81
|
// no need to override baseUrl
|
|
82
|
-
makeCompat(safeValue), productKey, undefined
|
|
83
|
-
|
|
82
|
+
makeCompat(safeValue), productKey, undefined,
|
|
83
|
+
// no need to override siteId
|
|
84
|
+
{
|
|
85
|
+
tenantId: siteId
|
|
86
|
+
});
|
|
84
87
|
if (cancel || !isOptionData(hydrated)) {
|
|
85
88
|
return;
|
|
86
89
|
}
|
|
@@ -90,7 +93,7 @@ function SafeSmartUserPicker({
|
|
|
90
93
|
return () => {
|
|
91
94
|
cancel = true;
|
|
92
95
|
};
|
|
93
|
-
}, [safeValue, productKey]);
|
|
96
|
+
}, [safeValue, productKey, siteId]);
|
|
94
97
|
return /*#__PURE__*/React.createElement(SmartUserPicker
|
|
95
98
|
// Ignored via go/ees005
|
|
96
99
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -3,7 +3,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import { INPUT_METHOD, ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { messages, NATIVE_EMBED_EXTENSION_TYPE } from '@atlaskit/editor-common/extensions';
|
|
8
8
|
import commonMessages from '@atlaskit/editor-common/messages';
|
|
9
9
|
import { BODIED_EXT_MBE_MARGIN_TOP } from '@atlaskit/editor-common/styles';
|
|
@@ -294,6 +294,17 @@ export var createOnClickCopyButton = function createOnClickCopyButton(_ref) {
|
|
|
294
294
|
|
|
295
295
|
// this command copies the text content of the unsupported content extension to the clipboard
|
|
296
296
|
return function (editorState) {
|
|
297
|
+
var _extensionApi$analyti;
|
|
298
|
+
extensionApi === null || extensionApi === void 0 || (_extensionApi$analyti = extensionApi.analytics) === null || _extensionApi$analyti === void 0 || _extensionApi$analyti.actions.fireAnalyticsEvent({
|
|
299
|
+
action: ACTION.CLICKED,
|
|
300
|
+
actionSubject: ACTION_SUBJECT.COPY_BUTTON,
|
|
301
|
+
actionSubjectId: node.type.name,
|
|
302
|
+
eventType: EVENT_TYPE.UI,
|
|
303
|
+
attributes: {
|
|
304
|
+
extensionType: node.attrs.extensionType,
|
|
305
|
+
extensionKey: node.attrs.extensionKey
|
|
306
|
+
}
|
|
307
|
+
});
|
|
297
308
|
copyUnsupportedContentToClipboard({
|
|
298
309
|
locale: locale,
|
|
299
310
|
unsupportedContent: adf,
|
|
@@ -318,14 +329,14 @@ export var getToolbarConfig = function getToolbarConfig(_ref2) {
|
|
|
318
329
|
extensionApi = _ref2.extensionApi,
|
|
319
330
|
getUnsupportedContent = _ref2.getUnsupportedContent;
|
|
320
331
|
return function (state, intl) {
|
|
321
|
-
var _extensionApi$decorat, _extensionApi$context, _extensionApi$
|
|
332
|
+
var _extensionApi$decorat, _extensionApi$context, _extensionApi$analyti2, _extensionApi$connect;
|
|
322
333
|
var formatMessage = intl.formatMessage,
|
|
323
334
|
locale = intl.locale;
|
|
324
335
|
var extensionState = getPluginState(state);
|
|
325
336
|
var extensionProvider = extensionState.extensionProvider;
|
|
326
337
|
var hoverDecoration = extensionApi === null || extensionApi === void 0 || (_extensionApi$decorat = extensionApi.decorations) === null || _extensionApi$decorat === void 0 ? void 0 : _extensionApi$decorat.actions.hoverDecoration;
|
|
327
338
|
var applyChangeToContextPanel = extensionApi === null || extensionApi === void 0 || (_extensionApi$context = extensionApi.contextPanel) === null || _extensionApi$context === void 0 ? void 0 : _extensionApi$context.actions.applyChange;
|
|
328
|
-
var editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 || (_extensionApi$
|
|
339
|
+
var editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 || (_extensionApi$analyti2 = extensionApi.analytics) === null || _extensionApi$analyti2 === void 0 ? void 0 : _extensionApi$analyti2.actions;
|
|
329
340
|
if (!extensionState || extensionState.showContextPanel || !extensionState.element) {
|
|
330
341
|
return;
|
|
331
342
|
}
|
|
@@ -104,8 +104,11 @@ function SafeSmartUserPicker(_ref) {
|
|
|
104
104
|
_context.next = 2;
|
|
105
105
|
return hydrateDefaultValues(undefined,
|
|
106
106
|
// no need to override baseUrl
|
|
107
|
-
makeCompat(safeValue), productKey, undefined
|
|
108
|
-
|
|
107
|
+
makeCompat(safeValue), productKey, undefined,
|
|
108
|
+
// no need to override siteId
|
|
109
|
+
{
|
|
110
|
+
tenantId: siteId
|
|
111
|
+
});
|
|
109
112
|
case 2:
|
|
110
113
|
hydrated = _context.sent;
|
|
111
114
|
if (!(cancel || !isOptionData(hydrated))) {
|
|
@@ -127,7 +130,7 @@ function SafeSmartUserPicker(_ref) {
|
|
|
127
130
|
return function () {
|
|
128
131
|
cancel = true;
|
|
129
132
|
};
|
|
130
|
-
}, [safeValue, productKey]);
|
|
133
|
+
}, [safeValue, productKey, siteId]);
|
|
131
134
|
return /*#__PURE__*/React.createElement(SmartUserPicker
|
|
132
135
|
// Ignored via go/ees005
|
|
133
136
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -22,7 +22,7 @@ const quickInsert: ExtensionModule[] = [
|
|
|
22
22
|
title: 'All fields',
|
|
23
23
|
icon: () =>
|
|
24
24
|
import(
|
|
25
|
-
/* webpackChunkName: "@atlaskit-internal_icon-code" */ '@atlaskit/icon/
|
|
25
|
+
/* webpackChunkName: "@atlaskit-internal_icon-code" */ '@atlaskit/icon/core/angle-brackets'
|
|
26
26
|
).then((mod) => mod.default),
|
|
27
27
|
action: {
|
|
28
28
|
type: 'node',
|
|
@@ -48,7 +48,7 @@ const manifest: ExtensionManifest = {
|
|
|
48
48
|
icons: {
|
|
49
49
|
'48': () =>
|
|
50
50
|
import(
|
|
51
|
-
/* webpackChunkName: "@atlaskit-internal_icon-code" */ '@atlaskit/icon/
|
|
51
|
+
/* webpackChunkName: "@atlaskit-internal_icon-code" */ '@atlaskit/icon/core/angle-brackets'
|
|
52
52
|
).then((mod) => mod.default),
|
|
53
53
|
},
|
|
54
54
|
modules: {
|
|
@@ -20,7 +20,7 @@ const quickInsert: ExtensionModule[] = exampleFields.map((field) => ({
|
|
|
20
20
|
description: `type: ${field.type} (${field.name})`,
|
|
21
21
|
icon: () =>
|
|
22
22
|
import(
|
|
23
|
-
/* webpackChunkName: "@atlaskit-internal_icon-code" */ '@atlaskit/icon/
|
|
23
|
+
/* webpackChunkName: "@atlaskit-internal_icon-code" */ '@atlaskit/icon/core/angle-brackets'
|
|
24
24
|
).then((mod) => mod.default),
|
|
25
25
|
action: {
|
|
26
26
|
type: 'node',
|
|
@@ -51,7 +51,7 @@ const manifest: ExtensionManifest = {
|
|
|
51
51
|
icons: {
|
|
52
52
|
'48': () =>
|
|
53
53
|
import(
|
|
54
|
-
/* webpackChunkName: "@atlaskit-internal_icon-code" */ '@atlaskit/icon/
|
|
54
|
+
/* webpackChunkName: "@atlaskit-internal_icon-code" */ '@atlaskit/icon/core/angle-brackets'
|
|
55
55
|
).then((mod) => mod.default),
|
|
56
56
|
},
|
|
57
57
|
modules: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.9",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/empty-state": "^10.1.0",
|
|
45
45
|
"@atlaskit/form": "^15.3.0",
|
|
46
46
|
"@atlaskit/heading": "^5.3.0",
|
|
47
|
-
"@atlaskit/icon": "^
|
|
47
|
+
"@atlaskit/icon": "^32.0.0",
|
|
48
48
|
"@atlaskit/link": "^3.3.0",
|
|
49
49
|
"@atlaskit/mention": "^24.5.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@atlaskit/textarea": "^8.2.0",
|
|
59
59
|
"@atlaskit/textfield": "^8.2.0",
|
|
60
60
|
"@atlaskit/theme": "^21.0.0",
|
|
61
|
-
"@atlaskit/tmp-editor-statsig": "^29.
|
|
61
|
+
"@atlaskit/tmp-editor-statsig": "^29.6.0",
|
|
62
62
|
"@atlaskit/toggle": "^15.2.0",
|
|
63
63
|
"@atlaskit/tokens": "^11.0.0",
|
|
64
64
|
"@atlaskit/tooltip": "^20.14.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^111.
|
|
75
|
+
"@atlaskit/editor-common": "^111.20.0",
|
|
76
76
|
"react": "^18.2.0",
|
|
77
77
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
78
78
|
},
|