@atlaskit/editor-plugin-table 33.0.2 → 33.0.4
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 +33 -0
- package/dist/cjs/ui/quick-insert/TableQuickInsertMenuItem.js +11 -1
- package/dist/cjs/ui/quick-insert/getTableQuickInsertComponents.js +2 -2
- package/dist/es2019/ui/quick-insert/TableQuickInsertMenuItem.js +10 -2
- package/dist/es2019/ui/quick-insert/getTableQuickInsertComponents.js +2 -2
- package/dist/esm/ui/quick-insert/TableQuickInsertMenuItem.js +12 -2
- package/dist/esm/ui/quick-insert/getTableQuickInsertComponents.js +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 33.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a034f535638cc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a034f535638cc) -
|
|
8
|
+
Add structured Quick Insert previews with localised title, description and attribution under
|
|
9
|
+
platform_editor_slash_command.
|
|
10
|
+
|
|
11
|
+
Exclude footer and category navigation actions from previews. Left-align attribution, use subtle
|
|
12
|
+
title and attribution text, and default description text.
|
|
13
|
+
|
|
14
|
+
Show text previews even without preview metadata, and reserve a fixed image area while images load
|
|
15
|
+
or when they fail. Keep previews within the viewport, flipping left when needed, with compact
|
|
16
|
+
panel dimensions and typography.
|
|
17
|
+
|
|
18
|
+
Replace baked panel screenshots with image-only assets. Remove image fields from text-only legacy
|
|
19
|
+
previews while preserving their attribution.
|
|
20
|
+
|
|
21
|
+
Let extension providers own their preview images and attribution. Pass preview metadata through
|
|
22
|
+
the Company Hub manifest factory and remove Editor's fallback preview registry.
|
|
23
|
+
|
|
24
|
+
Localize provider attribution names and display Confluence and Jira product icons instead of the
|
|
25
|
+
attribution prefix when an icon is present. Allow the Dropbox manifest to receive the host's
|
|
26
|
+
message formatter.
|
|
27
|
+
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
|
|
30
|
+
## 33.0.3
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies
|
|
35
|
+
|
|
3
36
|
## 33.0.2
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -11,6 +11,7 @@ var _reactIntl = require("react-intl");
|
|
|
11
11
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
|
|
14
|
+
var _messages2 = require("@atlaskit/editor-common/quick-insert/messages");
|
|
14
15
|
var _grid = _interopRequireDefault(require("@atlaskit/icon/core/grid"));
|
|
15
16
|
var _insertTableFromQuickInsert = require("./insertTableFromQuickInsert");
|
|
16
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -21,6 +22,14 @@ var TableQuickInsertMenuItem = exports.TableQuickInsertMenuItem = function Table
|
|
|
21
22
|
previewImageUrls = _ref.previewImageUrls;
|
|
22
23
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
23
24
|
formatMessage = _useIntl.formatMessage;
|
|
25
|
+
var preview = (0, _react.useMemo)(function () {
|
|
26
|
+
return previewImageUrls ? {
|
|
27
|
+
image: previewImageUrls,
|
|
28
|
+
attribution: {
|
|
29
|
+
name: formatMessage(_messages2.messages.previewAttributionAtlassian)
|
|
30
|
+
}
|
|
31
|
+
} : undefined;
|
|
32
|
+
}, [formatMessage, previewImageUrls]);
|
|
24
33
|
var onSelect = (0, _react.useCallback)(function (_ref2) {
|
|
25
34
|
var editorView = _ref2.editorView,
|
|
26
35
|
insert = _ref2.insert,
|
|
@@ -35,11 +44,12 @@ var TableQuickInsertMenuItem = exports.TableQuickInsertMenuItem = function Table
|
|
|
35
44
|
});
|
|
36
45
|
}, [api, isTableSelectorEnabled, options]);
|
|
37
46
|
return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
|
|
47
|
+
description: formatMessage(_messages.toolbarInsertBlockMessages.tableDescription),
|
|
38
48
|
iconBefore: /*#__PURE__*/_react.default.createElement(_grid.default, {
|
|
39
49
|
label: ""
|
|
40
50
|
}),
|
|
41
51
|
onSelect: onSelect,
|
|
42
|
-
|
|
52
|
+
preview: preview,
|
|
43
53
|
shortcut: (0, _keymaps.tooltip)(_keymaps.toggleTable),
|
|
44
54
|
title: formatMessage(_messages.toolbarInsertBlockMessages.table)
|
|
45
55
|
});
|
|
@@ -16,8 +16,8 @@ var _TableQuickInsertMenuItem = require("./TableQuickInsertMenuItem");
|
|
|
16
16
|
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; }
|
|
17
17
|
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) { (0, _defineProperty2.default)(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; }
|
|
18
18
|
var previewImageUrls = {
|
|
19
|
-
light: 'https://dam-cdn.atl.orangelogic.com/
|
|
20
|
-
dark: 'https://dam-cdn.atl.orangelogic.com/
|
|
19
|
+
light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVM3.png',
|
|
20
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVIZ.png'
|
|
21
21
|
};
|
|
22
22
|
var getTableQuickInsertComponents = exports.getTableQuickInsertComponents = function getTableQuickInsertComponents(_ref) {
|
|
23
23
|
var api = _ref.api,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { toggleTable, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
6
|
+
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
6
7
|
import GridIcon from '@atlaskit/icon/core/grid';
|
|
7
8
|
import { insertTableFromQuickInsert } from './insertTableFromQuickInsert';
|
|
8
9
|
export const TableQuickInsertMenuItem = ({
|
|
@@ -14,6 +15,12 @@ export const TableQuickInsertMenuItem = ({
|
|
|
14
15
|
const {
|
|
15
16
|
formatMessage
|
|
16
17
|
} = useIntl();
|
|
18
|
+
const preview = useMemo(() => previewImageUrls ? {
|
|
19
|
+
image: previewImageUrls,
|
|
20
|
+
attribution: {
|
|
21
|
+
name: formatMessage(quickInsertMessages.previewAttributionAtlassian)
|
|
22
|
+
}
|
|
23
|
+
} : undefined, [formatMessage, previewImageUrls]);
|
|
17
24
|
const onSelect = useCallback(({
|
|
18
25
|
editorView,
|
|
19
26
|
insert,
|
|
@@ -27,11 +34,12 @@ export const TableQuickInsertMenuItem = ({
|
|
|
27
34
|
state: editorView.state
|
|
28
35
|
}), [api, isTableSelectorEnabled, options]);
|
|
29
36
|
return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
|
|
37
|
+
description: formatMessage(messages.tableDescription),
|
|
30
38
|
iconBefore: /*#__PURE__*/React.createElement(GridIcon, {
|
|
31
39
|
label: ""
|
|
32
40
|
}),
|
|
33
41
|
onSelect: onSelect,
|
|
34
|
-
|
|
42
|
+
preview: preview,
|
|
35
43
|
shortcut: tooltip(toggleTable),
|
|
36
44
|
title: formatMessage(messages.table)
|
|
37
45
|
});
|
|
@@ -6,8 +6,8 @@ import { STRUCTURE_SECTION, TABLE_MENU_ITEM } from '@atlaskit/editor-common/quic
|
|
|
6
6
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
7
7
|
import { TableQuickInsertMenuItem } from './TableQuickInsertMenuItem';
|
|
8
8
|
const previewImageUrls = {
|
|
9
|
-
light: 'https://dam-cdn.atl.orangelogic.com/
|
|
10
|
-
dark: 'https://dam-cdn.atl.orangelogic.com/
|
|
9
|
+
light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVM3.png',
|
|
10
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVIZ.png'
|
|
11
11
|
};
|
|
12
12
|
export const getTableQuickInsertComponents = ({
|
|
13
13
|
api,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import { toggleTable, tooltip } from '@atlaskit/editor-common/keymaps';
|
|
4
4
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
5
|
import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
6
|
+
import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
|
|
6
7
|
import GridIcon from '@atlaskit/icon/core/grid';
|
|
7
8
|
import { insertTableFromQuickInsert } from './insertTableFromQuickInsert';
|
|
8
9
|
export var TableQuickInsertMenuItem = function TableQuickInsertMenuItem(_ref) {
|
|
@@ -12,6 +13,14 @@ export var TableQuickInsertMenuItem = function TableQuickInsertMenuItem(_ref) {
|
|
|
12
13
|
previewImageUrls = _ref.previewImageUrls;
|
|
13
14
|
var _useIntl = useIntl(),
|
|
14
15
|
formatMessage = _useIntl.formatMessage;
|
|
16
|
+
var preview = useMemo(function () {
|
|
17
|
+
return previewImageUrls ? {
|
|
18
|
+
image: previewImageUrls,
|
|
19
|
+
attribution: {
|
|
20
|
+
name: formatMessage(quickInsertMessages.previewAttributionAtlassian)
|
|
21
|
+
}
|
|
22
|
+
} : undefined;
|
|
23
|
+
}, [formatMessage, previewImageUrls]);
|
|
15
24
|
var onSelect = useCallback(function (_ref2) {
|
|
16
25
|
var editorView = _ref2.editorView,
|
|
17
26
|
insert = _ref2.insert,
|
|
@@ -26,11 +35,12 @@ export var TableQuickInsertMenuItem = function TableQuickInsertMenuItem(_ref) {
|
|
|
26
35
|
});
|
|
27
36
|
}, [api, isTableSelectorEnabled, options]);
|
|
28
37
|
return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
|
|
38
|
+
description: formatMessage(messages.tableDescription),
|
|
29
39
|
iconBefore: /*#__PURE__*/React.createElement(GridIcon, {
|
|
30
40
|
label: ""
|
|
31
41
|
}),
|
|
32
42
|
onSelect: onSelect,
|
|
33
|
-
|
|
43
|
+
preview: preview,
|
|
34
44
|
shortcut: tooltip(toggleTable),
|
|
35
45
|
title: formatMessage(messages.table)
|
|
36
46
|
});
|
|
@@ -9,8 +9,8 @@ import { STRUCTURE_SECTION, TABLE_MENU_ITEM } from '@atlaskit/editor-common/quic
|
|
|
9
9
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
10
10
|
import { TableQuickInsertMenuItem } from './TableQuickInsertMenuItem';
|
|
11
11
|
var previewImageUrls = {
|
|
12
|
-
light: 'https://dam-cdn.atl.orangelogic.com/
|
|
13
|
-
dark: 'https://dam-cdn.atl.orangelogic.com/
|
|
12
|
+
light: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVM3.png',
|
|
13
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/CDNLink/AT12OVIZ.png'
|
|
14
14
|
};
|
|
15
15
|
export var getTableQuickInsertComponents = function getTableQuickInsertComponents(_ref) {
|
|
16
16
|
var api = _ref.api,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "33.0.
|
|
3
|
+
"version": "33.0.4",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^21.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-content-insertion": "^21.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-editor-viewmode": "^23.0.0",
|
|
32
|
-
"@atlaskit/editor-plugin-extension": "24.0.
|
|
32
|
+
"@atlaskit/editor-plugin-extension": "24.0.4",
|
|
33
33
|
"@atlaskit/editor-plugin-guideline": "^21.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-interaction": "^35.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-limited-mode": "^18.0.0",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
44
|
-
"@atlaskit/editor-toolbar": "^2.
|
|
44
|
+
"@atlaskit/editor-toolbar": "^2.8.0",
|
|
45
45
|
"@atlaskit/editor-ui-control-model": "^2.10.0",
|
|
46
46
|
"@atlaskit/icon": "^38.0.0",
|
|
47
|
-
"@atlaskit/icon-lab": "^7.
|
|
47
|
+
"@atlaskit/icon-lab": "^7.10.0",
|
|
48
48
|
"@atlaskit/insm": "^3.0.0",
|
|
49
49
|
"@atlaskit/menu": "^11.0.0",
|
|
50
50
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.2.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^3.0.0",
|
|
55
55
|
"@atlaskit/primitives": "^22.5.0",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^209.0.0",
|
|
57
57
|
"@atlaskit/toggle": "^17.3.0",
|
|
58
58
|
"@atlaskit/tokens": "^20.0.0",
|
|
59
59
|
"@atlaskit/tooltip": "^24.3.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"uuid": "^11.1.1"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@atlaskit/editor-common": "^125.
|
|
71
|
+
"@atlaskit/editor-common": "^125.4.0",
|
|
72
72
|
"react": "^18.2.0 || ^19.2.0",
|
|
73
73
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
74
74
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|