@atlaskit/editor-plugin-table 30.0.11 → 30.0.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 +9 -0
- package/dist/cjs/ui/quick-insert/TableQuickInsertMenuItem.js +3 -1
- package/dist/cjs/ui/quick-insert/getTableQuickInsertComponents.js +6 -1
- package/dist/es2019/ui/quick-insert/TableQuickInsertMenuItem.js +3 -1
- package/dist/es2019/ui/quick-insert/getTableQuickInsertComponents.js +6 -1
- package/dist/esm/ui/quick-insert/TableQuickInsertMenuItem.js +3 -1
- package/dist/esm/ui/quick-insert/getTableQuickInsertComponents.js +6 -1
- package/dist/types/ui/quick-insert/TableQuickInsertMenuItem.d.ts +3 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 30.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`88fb7a8d4013a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88fb7a8d4013a) -
|
|
8
|
+
[ux] Add optional light and dark preview URLs to slash-command menu items and pass theme-aware
|
|
9
|
+
previews to supported commands when the `platform_editor_slash_command` experiment is enabled.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 30.0.11
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -17,7 +17,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
17
17
|
var TableQuickInsertMenuItem = exports.TableQuickInsertMenuItem = function TableQuickInsertMenuItem(_ref) {
|
|
18
18
|
var api = _ref.api,
|
|
19
19
|
isTableSelectorEnabled = _ref.isTableSelectorEnabled,
|
|
20
|
-
options = _ref.options
|
|
20
|
+
options = _ref.options,
|
|
21
|
+
previewImageUrls = _ref.previewImageUrls;
|
|
21
22
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
22
23
|
formatMessage = _useIntl.formatMessage;
|
|
23
24
|
var onSelect = (0, _react.useCallback)(function (_ref2) {
|
|
@@ -38,6 +39,7 @@ var TableQuickInsertMenuItem = exports.TableQuickInsertMenuItem = function Table
|
|
|
38
39
|
label: ""
|
|
39
40
|
}),
|
|
40
41
|
onSelect: onSelect,
|
|
42
|
+
previewImageUrls: previewImageUrls,
|
|
41
43
|
shortcut: (0, _keymaps.tooltip)(_keymaps.toggleTable),
|
|
42
44
|
title: formatMessage(_messages.toolbarInsertBlockMessages.table)
|
|
43
45
|
});
|
|
@@ -15,6 +15,10 @@ var _rank = require("@atlaskit/editor-common/quick-insert/rank");
|
|
|
15
15
|
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
|
+
var previewImageUrls = {
|
|
19
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/c4685o2hdf8w8hx14734ys157w642avq.png',
|
|
20
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/322886by55wu3q48pshv25v2b0568y4y.png'
|
|
21
|
+
};
|
|
18
22
|
var getTableQuickInsertComponents = exports.getTableQuickInsertComponents = function getTableQuickInsertComponents(_ref) {
|
|
19
23
|
var api = _ref.api,
|
|
20
24
|
isTableSelectorEnabled = _ref.isTableSelectorEnabled,
|
|
@@ -36,7 +40,8 @@ var getTableQuickInsertComponents = exports.getTableQuickInsertComponents = func
|
|
|
36
40
|
return /*#__PURE__*/_react.default.createElement(_TableQuickInsertMenuItem.TableQuickInsertMenuItem, {
|
|
37
41
|
api: api,
|
|
38
42
|
isTableSelectorEnabled: isTableSelectorEnabled,
|
|
39
|
-
options: options
|
|
43
|
+
options: options,
|
|
44
|
+
previewImageUrls: previewImageUrls
|
|
40
45
|
});
|
|
41
46
|
}
|
|
42
47
|
})];
|
|
@@ -8,7 +8,8 @@ import { insertTableFromQuickInsert } from './insertTableFromQuickInsert';
|
|
|
8
8
|
export const TableQuickInsertMenuItem = ({
|
|
9
9
|
api,
|
|
10
10
|
isTableSelectorEnabled,
|
|
11
|
-
options
|
|
11
|
+
options,
|
|
12
|
+
previewImageUrls
|
|
12
13
|
}) => {
|
|
13
14
|
const {
|
|
14
15
|
formatMessage
|
|
@@ -30,6 +31,7 @@ export const TableQuickInsertMenuItem = ({
|
|
|
30
31
|
label: ""
|
|
31
32
|
}),
|
|
32
33
|
onSelect: onSelect,
|
|
34
|
+
previewImageUrls: previewImageUrls,
|
|
33
35
|
shortcut: tooltip(toggleTable),
|
|
34
36
|
title: formatMessage(messages.table)
|
|
35
37
|
});
|
|
@@ -5,6 +5,10 @@ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/c
|
|
|
5
5
|
import { STRUCTURE_SECTION, TABLE_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
|
|
6
6
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
7
7
|
import { TableQuickInsertMenuItem } from './TableQuickInsertMenuItem';
|
|
8
|
+
const previewImageUrls = {
|
|
9
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/c4685o2hdf8w8hx14734ys157w642avq.png',
|
|
10
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/322886by55wu3q48pshv25v2b0568y4y.png'
|
|
11
|
+
};
|
|
8
12
|
export const getTableQuickInsertComponents = ({
|
|
9
13
|
api,
|
|
10
14
|
isTableSelectorEnabled,
|
|
@@ -26,6 +30,7 @@ export const getTableQuickInsertComponents = ({
|
|
|
26
30
|
component: () => /*#__PURE__*/React.createElement(TableQuickInsertMenuItem, {
|
|
27
31
|
api: api,
|
|
28
32
|
isTableSelectorEnabled: isTableSelectorEnabled,
|
|
29
|
-
options: options
|
|
33
|
+
options: options,
|
|
34
|
+
previewImageUrls: previewImageUrls
|
|
30
35
|
})
|
|
31
36
|
}];
|
|
@@ -8,7 +8,8 @@ import { insertTableFromQuickInsert } from './insertTableFromQuickInsert';
|
|
|
8
8
|
export var TableQuickInsertMenuItem = function TableQuickInsertMenuItem(_ref) {
|
|
9
9
|
var api = _ref.api,
|
|
10
10
|
isTableSelectorEnabled = _ref.isTableSelectorEnabled,
|
|
11
|
-
options = _ref.options
|
|
11
|
+
options = _ref.options,
|
|
12
|
+
previewImageUrls = _ref.previewImageUrls;
|
|
12
13
|
var _useIntl = useIntl(),
|
|
13
14
|
formatMessage = _useIntl.formatMessage;
|
|
14
15
|
var onSelect = useCallback(function (_ref2) {
|
|
@@ -29,6 +30,7 @@ export var TableQuickInsertMenuItem = function TableQuickInsertMenuItem(_ref) {
|
|
|
29
30
|
label: ""
|
|
30
31
|
}),
|
|
31
32
|
onSelect: onSelect,
|
|
33
|
+
previewImageUrls: previewImageUrls,
|
|
32
34
|
shortcut: tooltip(toggleTable),
|
|
33
35
|
title: formatMessage(messages.table)
|
|
34
36
|
});
|
|
@@ -8,6 +8,10 @@ import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/c
|
|
|
8
8
|
import { STRUCTURE_SECTION, TABLE_MENU_ITEM } from '@atlaskit/editor-common/quick-insert/keys';
|
|
9
9
|
import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
10
10
|
import { TableQuickInsertMenuItem } from './TableQuickInsertMenuItem';
|
|
11
|
+
var previewImageUrls = {
|
|
12
|
+
light: 'https://dam-cdn.atl.orangelogic.com/AssetLink/c4685o2hdf8w8hx14734ys157w642avq.png',
|
|
13
|
+
dark: 'https://dam-cdn.atl.orangelogic.com/AssetLink/322886by55wu3q48pshv25v2b0568y4y.png'
|
|
14
|
+
};
|
|
11
15
|
export var getTableQuickInsertComponents = function getTableQuickInsertComponents(_ref) {
|
|
12
16
|
var api = _ref.api,
|
|
13
17
|
isTableSelectorEnabled = _ref.isTableSelectorEnabled,
|
|
@@ -29,7 +33,8 @@ export var getTableQuickInsertComponents = function getTableQuickInsertComponent
|
|
|
29
33
|
return /*#__PURE__*/React.createElement(TableQuickInsertMenuItem, {
|
|
30
34
|
api: api,
|
|
31
35
|
isTableSelectorEnabled: isTableSelectorEnabled,
|
|
32
|
-
options: options
|
|
36
|
+
options: options,
|
|
37
|
+
previewImageUrls: previewImageUrls
|
|
33
38
|
});
|
|
34
39
|
}
|
|
35
40
|
})];
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type QuickInsertMenuItemProps } from '@atlaskit/editor-common/quick-insert/menu-item';
|
|
2
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { TablePlugin, TablePluginOptions } from '../../tablePluginType';
|
|
4
5
|
type Props = {
|
|
5
6
|
api: ExtractInjectionAPI<TablePlugin> | undefined;
|
|
6
7
|
isTableSelectorEnabled: boolean | undefined;
|
|
7
8
|
options: TablePluginOptions;
|
|
9
|
+
previewImageUrls?: QuickInsertMenuItemProps['previewImageUrls'];
|
|
8
10
|
};
|
|
9
|
-
export declare const TableQuickInsertMenuItem: ({ api, isTableSelectorEnabled, options, }: Props) => React.JSX.Element;
|
|
11
|
+
export declare const TableQuickInsertMenuItem: ({ api, isTableSelectorEnabled, options, previewImageUrls, }: Props) => React.JSX.Element;
|
|
10
12
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "30.0.
|
|
3
|
+
"version": "30.0.12",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^18.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-content-insertion": "^18.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-editor-viewmode": "^20.0.0",
|
|
32
|
-
"@atlaskit/editor-plugin-extension": "21.1.
|
|
32
|
+
"@atlaskit/editor-plugin-extension": "21.1.6",
|
|
33
33
|
"@atlaskit/editor-plugin-guideline": "^18.0.0",
|
|
34
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
34
|
+
"@atlaskit/editor-plugin-interaction": "^31.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-limited-mode": "^15.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-selection": "^18.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-toolbar": "^15.0.0",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.2.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^2.2.0",
|
|
55
55
|
"@atlaskit/primitives": "^22.5.0",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^199.0.0",
|
|
57
57
|
"@atlaskit/toggle": "^17.3.0",
|
|
58
|
-
"@atlaskit/tokens": "^
|
|
58
|
+
"@atlaskit/tokens": "^18.0.0",
|
|
59
59
|
"@atlaskit/tooltip": "^24.3.0",
|
|
60
60
|
"@babel/runtime": "^7.0.0",
|
|
61
61
|
"@compiled/react": "^1.0.2",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"uuid": "^11.1.1"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@atlaskit/editor-common": "^122.
|
|
71
|
+
"@atlaskit/editor-common": "^122.11.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"
|