@atlaskit/editor-plugin-card 36.0.13 → 36.0.15
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 +17 -0
- package/dist/cjs/ui/LinkToolbarAppearanceDropdown.js +7 -1
- package/dist/cjs/ui/useFetchDatasourceDataInfo.js +4 -1
- package/dist/es2019/ui/LinkToolbarAppearanceDropdown.js +7 -1
- package/dist/es2019/ui/useFetchDatasourceDataInfo.js +4 -1
- package/dist/esm/ui/LinkToolbarAppearanceDropdown.js +7 -1
- package/dist/esm/ui/useFetchDatasourceDataInfo.js +4 -1
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 36.0.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b78930b7fb23b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b78930b7fb23b) -
|
|
8
|
+
The smart link appearance dropdown now disables unsupported appearances and shows why in a
|
|
9
|
+
tooltip.
|
|
10
|
+
|
|
11
|
+
## 36.0.14
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`4d0e8142c81f3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d0e8142c81f3) -
|
|
16
|
+
Request 100 items per page for Assets datasource tables behind
|
|
17
|
+
`astral_assets_default_page_size_100`.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 36.0.13
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -21,6 +21,7 @@ var _linkItem = _interopRequireDefault(require("@atlaskit/menu/link-item"));
|
|
|
21
21
|
var _menuGroup = _interopRequireDefault(require("@atlaskit/menu/menu-group"));
|
|
22
22
|
var _section = _interopRequireDefault(require("@atlaskit/menu/section"));
|
|
23
23
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
24
|
+
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
24
25
|
var _doc = require("../pm-plugins/doc");
|
|
25
26
|
var _DatasourceDropdownOption = require("./DatasourceDropdownOption");
|
|
26
27
|
var _LinkToolbarAppearance = require("./LinkToolbarAppearance");
|
|
@@ -111,7 +112,7 @@ var LinkAppearanceMenu = exports.LinkAppearanceMenu = function LinkAppearanceMen
|
|
|
111
112
|
// TODO: ED-26961 - packages/editor/editor-plugin-card/src/ui/LinkToolbarAppearance.tsx supports change boarding via pulse
|
|
112
113
|
// this implementation doesn't
|
|
113
114
|
return /*#__PURE__*/_react.default.createElement(_menuGroup.default, null, /*#__PURE__*/_react.default.createElement(_section.default, null, finalOptions.map(function (option) {
|
|
114
|
-
|
|
115
|
+
var item = /*#__PURE__*/_react.default.createElement(_buttonItem.default, {
|
|
115
116
|
key: option.title,
|
|
116
117
|
iconBefore: option.icon
|
|
117
118
|
// eslint-disable-next-line @atlassian/perf-linting/detect-unnecessary-rerenders, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
@@ -120,9 +121,14 @@ var LinkAppearanceMenu = exports.LinkAppearanceMenu = function LinkAppearanceMen
|
|
|
120
121
|
return option.onClick();
|
|
121
122
|
},
|
|
122
123
|
isSelected: option.selected,
|
|
124
|
+
isDisabled: option.disabled,
|
|
123
125
|
description: option.description,
|
|
124
126
|
shouldDescriptionWrap: true
|
|
125
127
|
}, option.title);
|
|
128
|
+
return option.tooltip ? /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
129
|
+
key: option.title,
|
|
130
|
+
content: option.tooltip
|
|
131
|
+
}, item) : item;
|
|
126
132
|
}), /*#__PURE__*/_react.default.createElement(_DatasourceDropdownOption.DatasourceDropdownOption, {
|
|
127
133
|
allowDatasource: allowDatasource,
|
|
128
134
|
intl: intl,
|
|
@@ -10,11 +10,14 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _react = require("react");
|
|
12
12
|
var _useDataSourceClientExtension = require("@atlaskit/link-client-extension/use-data-source-client-extension");
|
|
13
|
+
var _assetsModal = require("@atlaskit/link-datasource/assets-modal");
|
|
14
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
15
|
/**
|
|
14
16
|
* @jsxRuntime classic
|
|
15
17
|
* @jsx jsx
|
|
16
18
|
*/
|
|
17
19
|
|
|
20
|
+
var ASSETS_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
18
21
|
var useFetchDatasourceDataInfo = exports.useFetchDatasourceDataInfo = function useFetchDatasourceDataInfo(_ref) {
|
|
19
22
|
var datasourceId = _ref.datasourceId,
|
|
20
23
|
parameters = _ref.parameters,
|
|
@@ -41,7 +44,7 @@ var useFetchDatasourceDataInfo = exports.useFetchDatasourceDataInfo = function u
|
|
|
41
44
|
case 1:
|
|
42
45
|
datasourceDataRequest = {
|
|
43
46
|
parameters: parameters,
|
|
44
|
-
pageSize: _useDataSourceClientExtension.DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
47
|
+
pageSize: (0, _fg.fg)('astral_assets_default_page_size_100') && datasourceId === _assetsModal.ASSETS_LIST_OF_LINKS_DATASOURCE_ID ? ASSETS_DATASOURCE_DATA_PAGE_SIZE : _useDataSourceClientExtension.DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
45
48
|
pageCursor: undefined,
|
|
46
49
|
fields: visibleColumnKeys,
|
|
47
50
|
includeSchema: true
|
|
@@ -13,6 +13,7 @@ import LinkItem from '@atlaskit/menu/link-item';
|
|
|
13
13
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
14
14
|
import Section from '@atlaskit/menu/section';
|
|
15
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
16
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
16
17
|
import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
17
18
|
import { DatasourceDropdownOption, datasourceDisplayInformation } from './DatasourceDropdownOption';
|
|
18
19
|
import { getUnavailableMessage } from './LinkToolbarAppearance';
|
|
@@ -98,16 +99,21 @@ export const LinkAppearanceMenu = ({
|
|
|
98
99
|
// TODO: ED-26961 - packages/editor/editor-plugin-card/src/ui/LinkToolbarAppearance.tsx supports change boarding via pulse
|
|
99
100
|
// this implementation doesn't
|
|
100
101
|
return /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(Section, null, finalOptions.map(option => {
|
|
101
|
-
|
|
102
|
+
const item = /*#__PURE__*/React.createElement(ButtonItem, {
|
|
102
103
|
key: option.title,
|
|
103
104
|
iconBefore: option.icon
|
|
104
105
|
// eslint-disable-next-line @atlassian/perf-linting/detect-unnecessary-rerenders, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
105
106
|
,
|
|
106
107
|
onClick: () => option.onClick(),
|
|
107
108
|
isSelected: option.selected,
|
|
109
|
+
isDisabled: option.disabled,
|
|
108
110
|
description: option.description,
|
|
109
111
|
shouldDescriptionWrap: true
|
|
110
112
|
}, option.title);
|
|
113
|
+
return option.tooltip ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
114
|
+
key: option.title,
|
|
115
|
+
content: option.tooltip
|
|
116
|
+
}, item) : item;
|
|
111
117
|
}), /*#__PURE__*/React.createElement(DatasourceDropdownOption, {
|
|
112
118
|
allowDatasource: allowDatasource,
|
|
113
119
|
intl: intl,
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
6
|
import { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension } from '@atlaskit/link-client-extension/use-data-source-client-extension';
|
|
7
|
+
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource/assets-modal';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
|
+
const ASSETS_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
7
10
|
export const useFetchDatasourceDataInfo = ({
|
|
8
11
|
datasourceId,
|
|
9
12
|
parameters,
|
|
@@ -21,7 +24,7 @@ export const useFetchDatasourceDataInfo = ({
|
|
|
21
24
|
}
|
|
22
25
|
const datasourceDataRequest = {
|
|
23
26
|
parameters,
|
|
24
|
-
pageSize: DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
27
|
+
pageSize: fg('astral_assets_default_page_size_100') && datasourceId === ASSETS_LIST_OF_LINKS_DATASOURCE_ID ? ASSETS_DATASOURCE_DATA_PAGE_SIZE : DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
25
28
|
pageCursor: undefined,
|
|
26
29
|
fields: visibleColumnKeys,
|
|
27
30
|
includeSchema: true
|
|
@@ -16,6 +16,7 @@ import LinkItem from '@atlaskit/menu/link-item';
|
|
|
16
16
|
import MenuGroup from '@atlaskit/menu/menu-group';
|
|
17
17
|
import Section from '@atlaskit/menu/section';
|
|
18
18
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
19
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
19
20
|
import { changeSelectedCardToLink, setSelectedCardAppearance } from '../pm-plugins/doc';
|
|
20
21
|
import { DatasourceDropdownOption, datasourceDisplayInformation } from './DatasourceDropdownOption';
|
|
21
22
|
import { getUnavailableMessage } from './LinkToolbarAppearance';
|
|
@@ -104,7 +105,7 @@ export var LinkAppearanceMenu = function LinkAppearanceMenu(_ref) {
|
|
|
104
105
|
// TODO: ED-26961 - packages/editor/editor-plugin-card/src/ui/LinkToolbarAppearance.tsx supports change boarding via pulse
|
|
105
106
|
// this implementation doesn't
|
|
106
107
|
return /*#__PURE__*/React.createElement(MenuGroup, null, /*#__PURE__*/React.createElement(Section, null, finalOptions.map(function (option) {
|
|
107
|
-
|
|
108
|
+
var item = /*#__PURE__*/React.createElement(ButtonItem, {
|
|
108
109
|
key: option.title,
|
|
109
110
|
iconBefore: option.icon
|
|
110
111
|
// eslint-disable-next-line @atlassian/perf-linting/detect-unnecessary-rerenders, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
@@ -113,9 +114,14 @@ export var LinkAppearanceMenu = function LinkAppearanceMenu(_ref) {
|
|
|
113
114
|
return option.onClick();
|
|
114
115
|
},
|
|
115
116
|
isSelected: option.selected,
|
|
117
|
+
isDisabled: option.disabled,
|
|
116
118
|
description: option.description,
|
|
117
119
|
shouldDescriptionWrap: true
|
|
118
120
|
}, option.title);
|
|
121
|
+
return option.tooltip ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
122
|
+
key: option.title,
|
|
123
|
+
content: option.tooltip
|
|
124
|
+
}, item) : item;
|
|
119
125
|
}), /*#__PURE__*/React.createElement(DatasourceDropdownOption, {
|
|
120
126
|
allowDatasource: allowDatasource,
|
|
121
127
|
intl: intl,
|
|
@@ -7,6 +7,9 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
7
7
|
*/
|
|
8
8
|
import { useEffect, useState } from 'react';
|
|
9
9
|
import { DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE, useDatasourceClientExtension } from '@atlaskit/link-client-extension/use-data-source-client-extension';
|
|
10
|
+
import { ASSETS_LIST_OF_LINKS_DATASOURCE_ID } from '@atlaskit/link-datasource/assets-modal';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
|
+
var ASSETS_DATASOURCE_DATA_PAGE_SIZE = 100;
|
|
10
13
|
export var useFetchDatasourceDataInfo = function useFetchDatasourceDataInfo(_ref) {
|
|
11
14
|
var datasourceId = _ref.datasourceId,
|
|
12
15
|
parameters = _ref.parameters,
|
|
@@ -33,7 +36,7 @@ export var useFetchDatasourceDataInfo = function useFetchDatasourceDataInfo(_ref
|
|
|
33
36
|
case 1:
|
|
34
37
|
datasourceDataRequest = {
|
|
35
38
|
parameters: parameters,
|
|
36
|
-
pageSize: DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
39
|
+
pageSize: fg('astral_assets_default_page_size_100') && datasourceId === ASSETS_LIST_OF_LINKS_DATASOURCE_ID ? ASSETS_DATASOURCE_DATA_PAGE_SIZE : DEFAULT_GET_DATASOURCE_DATA_PAGE_SIZE,
|
|
37
40
|
pageCursor: undefined,
|
|
38
41
|
fields: visibleColumnKeys,
|
|
39
42
|
includeSchema: true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "36.0.
|
|
3
|
+
"version": "36.0.15",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"@atlaskit/smart-card": "^46.13.0",
|
|
66
66
|
"@atlaskit/tmp-editor-statsig": "^254.0.0",
|
|
67
67
|
"@atlaskit/tokens": "^20.9.0",
|
|
68
|
+
"@atlaskit/tooltip": "^24.4.0",
|
|
68
69
|
"@babel/runtime": "^7.0.0",
|
|
69
70
|
"@emotion/react": "^11.7.1",
|
|
70
71
|
"lodash": "^4.17.21",
|
|
@@ -72,12 +73,15 @@
|
|
|
72
73
|
"uuid": "^11.1.1"
|
|
73
74
|
},
|
|
74
75
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^134.
|
|
76
|
+
"@atlaskit/editor-common": "^134.8.0",
|
|
76
77
|
"@atlaskit/link-provider": "^6.1.0",
|
|
77
78
|
"react": "^18.2.0 || ^19.2.0",
|
|
78
79
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
79
80
|
},
|
|
80
81
|
"platform-feature-flags": {
|
|
82
|
+
"astral_assets_default_page_size_100": {
|
|
83
|
+
"type": "boolean"
|
|
84
|
+
},
|
|
81
85
|
"cc-mui-slides-opted-out": {
|
|
82
86
|
"type": "boolean",
|
|
83
87
|
"referenceOnly": true
|
|
@@ -103,7 +107,7 @@
|
|
|
103
107
|
},
|
|
104
108
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/e6f3220b-0ca2-445a-a4c5-78cff6ca2a34",
|
|
105
109
|
"devDependencies": {
|
|
106
|
-
"@atlaskit/editor-common": "^134.
|
|
110
|
+
"@atlaskit/editor-common": "^134.8.0",
|
|
107
111
|
"@atlaskit/link-provider": "^6.1.0",
|
|
108
112
|
"react": "^19.2.0",
|
|
109
113
|
"react-intl": "^7.0.0"
|