@atlaskit/link-datasource 1.1.2 → 1.1.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 +12 -0
- package/dist/cjs/analytics/constants.js +1 -1
- package/dist/cjs/ui/assets-modal/modal/index.js +1 -1
- package/dist/cjs/ui/issue-like-table/column-picker/concatenated-menu-list.js +45 -0
- package/dist/cjs/ui/issue-like-table/column-picker/index.js +6 -1
- package/dist/cjs/ui/issue-like-table/column-picker/messages.js +10 -0
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +13 -4
- package/dist/es2019/analytics/constants.js +1 -1
- package/dist/es2019/ui/assets-modal/modal/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/column-picker/concatenated-menu-list.js +35 -0
- package/dist/es2019/ui/issue-like-table/column-picker/index.js +7 -2
- package/dist/es2019/ui/issue-like-table/column-picker/messages.js +10 -0
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +11 -2
- package/dist/esm/analytics/constants.js +1 -1
- package/dist/esm/ui/assets-modal/modal/index.js +1 -1
- package/dist/esm/ui/issue-like-table/column-picker/concatenated-menu-list.js +36 -0
- package/dist/esm/ui/issue-like-table/column-picker/index.js +7 -2
- package/dist/esm/ui/issue-like-table/column-picker/messages.js +10 -0
- package/dist/esm/ui/jira-issues-modal/modal/index.js +13 -4
- package/dist/types/ui/issue-like-table/column-picker/concatenated-menu-list.d.ts +5 -0
- package/dist/types/ui/issue-like-table/column-picker/messages.d.ts +10 -0
- package/dist/types-ts4.5/ui/issue-like-table/column-picker/concatenated-menu-list.d.ts +5 -0
- package/dist/types-ts4.5/ui/issue-like-table/column-picker/messages.d.ts +10 -0
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`067fe62a1dc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/067fe62a1dc) - [ux] Updated logic for site selector to default to current site
|
|
8
|
+
|
|
9
|
+
## 1.1.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`96c9b7127b1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/96c9b7127b1) - Do not load more then 200 fields in dropdown, instead show message explaining limitation and how to move forward
|
|
14
|
+
|
|
3
15
|
## 1.1.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -231,7 +231,7 @@ var analyticsContextAttributes = {
|
|
|
231
231
|
};
|
|
232
232
|
var analyticsContextData = {
|
|
233
233
|
packageName: "@atlaskit/link-datasource",
|
|
234
|
-
packageVersion: "1.1.
|
|
234
|
+
packageVersion: "1.1.4",
|
|
235
235
|
source: 'datasourceConfigModal'
|
|
236
236
|
};
|
|
237
237
|
var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.SELECT_ITEMS_MAXIMUM_THRESHOLD = exports.ConcatenatedMenuList = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = require("@emotion/react");
|
|
11
|
+
var _reactIntlNext = require("react-intl-next");
|
|
12
|
+
var _select = require("@atlaskit/select");
|
|
13
|
+
var _messages = require("./messages");
|
|
14
|
+
var _excluded = ["children"];
|
|
15
|
+
/** @jsx jsx */
|
|
16
|
+
var SELECT_ITEMS_MAXIMUM_THRESHOLD = 200;
|
|
17
|
+
exports.SELECT_ITEMS_MAXIMUM_THRESHOLD = SELECT_ITEMS_MAXIMUM_THRESHOLD;
|
|
18
|
+
var messageStyles = (0, _react.css)({
|
|
19
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
20
|
+
fontSize: "var(--ds-font-size-050, 11px)",
|
|
21
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
22
|
+
lineHeight: "var(--ds-font-lineHeight-100, 14px)"
|
|
23
|
+
});
|
|
24
|
+
var ConcatenatedMenuList = function ConcatenatedMenuList(_ref) {
|
|
25
|
+
var children = _ref.children,
|
|
26
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
27
|
+
var shouldUseDefaultMenuList = !children || !Array.isArray(children) || children.length <= SELECT_ITEMS_MAXIMUM_THRESHOLD;
|
|
28
|
+
if (shouldUseDefaultMenuList) {
|
|
29
|
+
return (0, _react.jsx)(_select.components.MenuList, props, children);
|
|
30
|
+
}
|
|
31
|
+
var optionStyle = {
|
|
32
|
+
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-200, 16px)"),
|
|
33
|
+
height: 'auto'
|
|
34
|
+
};
|
|
35
|
+
var maximumLimitReachedMessage = (0, _react.jsx)("div", {
|
|
36
|
+
css: messageStyles,
|
|
37
|
+
style: optionStyle
|
|
38
|
+
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({
|
|
39
|
+
tagName: 'div'
|
|
40
|
+
}, _messages.columnPickerMessages.maximumItemsShownLine1)), (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({
|
|
41
|
+
tagName: 'div'
|
|
42
|
+
}, _messages.columnPickerMessages.maximumItemsShownLine2)));
|
|
43
|
+
return (0, _react.jsx)(_select.components.MenuList, props, children.slice(0, SELECT_ITEMS_MAXIMUM_THRESHOLD), maximumLimitReachedMessage);
|
|
44
|
+
};
|
|
45
|
+
exports.ConcatenatedMenuList = ConcatenatedMenuList;
|
|
@@ -16,6 +16,7 @@ var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-
|
|
|
16
16
|
var _board = _interopRequireDefault(require("@atlaskit/icon/glyph/board"));
|
|
17
17
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
18
18
|
var _select = require("@atlaskit/select");
|
|
19
|
+
var _concatenatedMenuList = require("./concatenated-menu-list");
|
|
19
20
|
var _messages = require("./messages");
|
|
20
21
|
var _excluded = ["isOpen"];
|
|
21
22
|
/** @jsx jsx */
|
|
@@ -105,8 +106,12 @@ var ColumnPicker = function ColumnPicker(_ref) {
|
|
|
105
106
|
classNamePrefix: 'column-picker-popup',
|
|
106
107
|
testId: 'column-picker-popup',
|
|
107
108
|
components: {
|
|
108
|
-
Option: _select.CheckboxOption
|
|
109
|
+
Option: _select.CheckboxOption,
|
|
110
|
+
MenuList: _concatenatedMenuList.ConcatenatedMenuList
|
|
109
111
|
},
|
|
112
|
+
filterOption: (0, _select.createFilter)({
|
|
113
|
+
ignoreAccents: false
|
|
114
|
+
}),
|
|
110
115
|
options: allOptions,
|
|
111
116
|
value: selectedOptions,
|
|
112
117
|
onOpen: handleOpen,
|
|
@@ -6,6 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.columnPickerMessages = void 0;
|
|
7
7
|
var _reactIntlNext = require("react-intl-next");
|
|
8
8
|
var columnPickerMessages = (0, _reactIntlNext.defineMessages)({
|
|
9
|
+
maximumItemsShownLine1: {
|
|
10
|
+
id: 'linkDataSource.column-picker.no-all-items-shown-message.line-1',
|
|
11
|
+
description: 'First line of the messages shown at the bottom of column dropdown options explaining why not all available options are shown and how to get to them.',
|
|
12
|
+
defaultMessage: 'Your search returned too many results.'
|
|
13
|
+
},
|
|
14
|
+
maximumItemsShownLine2: {
|
|
15
|
+
id: 'linkDataSource.column-picker.no-all-items-shown-message.line-2',
|
|
16
|
+
description: 'Second line of the messages shown at the bottom of column dropdown options explaining why not all available options are shown and how to get to them.',
|
|
17
|
+
defaultMessage: 'Try again with more specific keywords.'
|
|
18
|
+
},
|
|
9
19
|
search: {
|
|
10
20
|
id: 'linkDataSource.column-picker.search',
|
|
11
21
|
description: 'Search bar message to look for more fields',
|
|
@@ -146,9 +146,18 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
146
146
|
var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
|
|
147
147
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
148
148
|
var selectedJiraSite = (0, _react.useMemo)(function () {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
if (cloudId) {
|
|
150
|
+
// if the cloud id we're editing isn't in available sites then user is likely unauthorized for that site
|
|
151
|
+
// TODO: unauthorized to edit flow https://product-fabric.atlassian.net/browse/EDM-7216
|
|
152
|
+
return availableSites.find(function (jiraSite) {
|
|
153
|
+
return jiraSite.cloudId === cloudId;
|
|
154
|
+
}) || availableSites[0];
|
|
155
|
+
} else {
|
|
156
|
+
var currentlyLoggedInSiteUrl = window.location.origin;
|
|
157
|
+
return availableSites.find(function (jiraSite) {
|
|
158
|
+
return jiraSite.url === currentlyLoggedInSiteUrl;
|
|
159
|
+
}) || availableSites[0];
|
|
160
|
+
}
|
|
152
161
|
}, [availableSites, cloudId]);
|
|
153
162
|
var buttonClickedAnalyticsPayload = (0, _react.useMemo)(function () {
|
|
154
163
|
return {
|
|
@@ -196,7 +205,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
196
205
|
void fetchSiteDisplayNames();
|
|
197
206
|
}, [fireEvent]);
|
|
198
207
|
(0, _react.useEffect)(function () {
|
|
199
|
-
if (!cloudId
|
|
208
|
+
if (selectedJiraSite && (!cloudId || cloudId !== selectedJiraSite.cloudId)) {
|
|
200
209
|
setCloudId(selectedJiraSite.cloudId);
|
|
201
210
|
}
|
|
202
211
|
}, [cloudId, selectedJiraSite]);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
+
import { components } from '@atlaskit/select';
|
|
6
|
+
import { columnPickerMessages } from './messages';
|
|
7
|
+
export const SELECT_ITEMS_MAXIMUM_THRESHOLD = 200;
|
|
8
|
+
const messageStyles = css({
|
|
9
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
10
|
+
fontSize: "var(--ds-font-size-050, 11px)",
|
|
11
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
12
|
+
lineHeight: "var(--ds-font-lineHeight-100, 14px)"
|
|
13
|
+
});
|
|
14
|
+
export const ConcatenatedMenuList = ({
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}) => {
|
|
18
|
+
const shouldUseDefaultMenuList = !children || !Array.isArray(children) || children.length <= SELECT_ITEMS_MAXIMUM_THRESHOLD;
|
|
19
|
+
if (shouldUseDefaultMenuList) {
|
|
20
|
+
return jsx(components.MenuList, props, children);
|
|
21
|
+
}
|
|
22
|
+
const optionStyle = {
|
|
23
|
+
padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-200, 16px)"}`,
|
|
24
|
+
height: 'auto'
|
|
25
|
+
};
|
|
26
|
+
const maximumLimitReachedMessage = jsx("div", {
|
|
27
|
+
css: messageStyles,
|
|
28
|
+
style: optionStyle
|
|
29
|
+
}, jsx(FormattedMessage, _extends({
|
|
30
|
+
tagName: 'div'
|
|
31
|
+
}, columnPickerMessages.maximumItemsShownLine1)), jsx(FormattedMessage, _extends({
|
|
32
|
+
tagName: 'div'
|
|
33
|
+
}, columnPickerMessages.maximumItemsShownLine2)));
|
|
34
|
+
return jsx(components.MenuList, props, children.slice(0, SELECT_ITEMS_MAXIMUM_THRESHOLD), maximumLimitReachedMessage);
|
|
35
|
+
};
|
|
@@ -6,7 +6,8 @@ import { useIntl } from 'react-intl-next';
|
|
|
6
6
|
import Button from '@atlaskit/button/standard-button';
|
|
7
7
|
import BoardIcon from '@atlaskit/icon/glyph/board';
|
|
8
8
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
9
|
-
import { CheckboxOption, PopupSelect } from '@atlaskit/select';
|
|
9
|
+
import { CheckboxOption, createFilter, PopupSelect } from '@atlaskit/select';
|
|
10
|
+
import { ConcatenatedMenuList } from './concatenated-menu-list';
|
|
10
11
|
import { columnPickerMessages } from './messages';
|
|
11
12
|
export const ColumnPicker = ({
|
|
12
13
|
columns,
|
|
@@ -80,8 +81,12 @@ export const ColumnPicker = ({
|
|
|
80
81
|
classNamePrefix: 'column-picker-popup',
|
|
81
82
|
testId: 'column-picker-popup',
|
|
82
83
|
components: {
|
|
83
|
-
Option: CheckboxOption
|
|
84
|
+
Option: CheckboxOption,
|
|
85
|
+
MenuList: ConcatenatedMenuList
|
|
84
86
|
},
|
|
87
|
+
filterOption: createFilter({
|
|
88
|
+
ignoreAccents: false
|
|
89
|
+
}),
|
|
85
90
|
options: allOptions,
|
|
86
91
|
value: selectedOptions,
|
|
87
92
|
onOpen: handleOpen,
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl-next';
|
|
2
2
|
export const columnPickerMessages = defineMessages({
|
|
3
|
+
maximumItemsShownLine1: {
|
|
4
|
+
id: 'linkDataSource.column-picker.no-all-items-shown-message.line-1',
|
|
5
|
+
description: 'First line of the messages shown at the bottom of column dropdown options explaining why not all available options are shown and how to get to them.',
|
|
6
|
+
defaultMessage: 'Your search returned too many results.'
|
|
7
|
+
},
|
|
8
|
+
maximumItemsShownLine2: {
|
|
9
|
+
id: 'linkDataSource.column-picker.no-all-items-shown-message.line-2',
|
|
10
|
+
description: 'Second line of the messages shown at the bottom of column dropdown options explaining why not all available options are shown and how to get to them.',
|
|
11
|
+
defaultMessage: 'Try again with more specific keywords.'
|
|
12
|
+
},
|
|
3
13
|
search: {
|
|
4
14
|
id: 'linkDataSource.column-picker.search',
|
|
5
15
|
description: 'Search bar message to look for more fields',
|
|
@@ -116,7 +116,16 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
116
116
|
const {
|
|
117
117
|
fireEvent
|
|
118
118
|
} = useDatasourceAnalyticsEvents();
|
|
119
|
-
const selectedJiraSite = useMemo(() =>
|
|
119
|
+
const selectedJiraSite = useMemo(() => {
|
|
120
|
+
if (cloudId) {
|
|
121
|
+
// if the cloud id we're editing isn't in available sites then user is likely unauthorized for that site
|
|
122
|
+
// TODO: unauthorized to edit flow https://product-fabric.atlassian.net/browse/EDM-7216
|
|
123
|
+
return availableSites.find(jiraSite => jiraSite.cloudId === cloudId) || availableSites[0];
|
|
124
|
+
} else {
|
|
125
|
+
const currentlyLoggedInSiteUrl = window.location.origin;
|
|
126
|
+
return availableSites.find(jiraSite => jiraSite.url === currentlyLoggedInSiteUrl) || availableSites[0];
|
|
127
|
+
}
|
|
128
|
+
}, [availableSites, cloudId]);
|
|
120
129
|
const buttonClickedAnalyticsPayload = useMemo(() => {
|
|
121
130
|
return {
|
|
122
131
|
extensionKey: extensionKey,
|
|
@@ -146,7 +155,7 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
146
155
|
void fetchSiteDisplayNames();
|
|
147
156
|
}, [fireEvent]);
|
|
148
157
|
useEffect(() => {
|
|
149
|
-
if (!cloudId
|
|
158
|
+
if (selectedJiraSite && (!cloudId || cloudId !== selectedJiraSite.cloudId)) {
|
|
150
159
|
setCloudId(selectedJiraSite.cloudId);
|
|
151
160
|
}
|
|
152
161
|
}, [cloudId, selectedJiraSite]);
|
|
@@ -222,7 +222,7 @@ var analyticsContextAttributes = {
|
|
|
222
222
|
};
|
|
223
223
|
var analyticsContextData = {
|
|
224
224
|
packageName: "@atlaskit/link-datasource",
|
|
225
|
-
packageVersion: "1.1.
|
|
225
|
+
packageVersion: "1.1.4",
|
|
226
226
|
source: 'datasourceConfigModal'
|
|
227
227
|
};
|
|
228
228
|
var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children"];
|
|
4
|
+
/** @jsx jsx */
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
6
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
7
|
+
import { components } from '@atlaskit/select';
|
|
8
|
+
import { columnPickerMessages } from './messages';
|
|
9
|
+
export var SELECT_ITEMS_MAXIMUM_THRESHOLD = 200;
|
|
10
|
+
var messageStyles = css({
|
|
11
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
12
|
+
fontSize: "var(--ds-font-size-050, 11px)",
|
|
13
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
14
|
+
lineHeight: "var(--ds-font-lineHeight-100, 14px)"
|
|
15
|
+
});
|
|
16
|
+
export var ConcatenatedMenuList = function ConcatenatedMenuList(_ref) {
|
|
17
|
+
var children = _ref.children,
|
|
18
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
var shouldUseDefaultMenuList = !children || !Array.isArray(children) || children.length <= SELECT_ITEMS_MAXIMUM_THRESHOLD;
|
|
20
|
+
if (shouldUseDefaultMenuList) {
|
|
21
|
+
return jsx(components.MenuList, props, children);
|
|
22
|
+
}
|
|
23
|
+
var optionStyle = {
|
|
24
|
+
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-200, 16px)"),
|
|
25
|
+
height: 'auto'
|
|
26
|
+
};
|
|
27
|
+
var maximumLimitReachedMessage = jsx("div", {
|
|
28
|
+
css: messageStyles,
|
|
29
|
+
style: optionStyle
|
|
30
|
+
}, jsx(FormattedMessage, _extends({
|
|
31
|
+
tagName: 'div'
|
|
32
|
+
}, columnPickerMessages.maximumItemsShownLine1)), jsx(FormattedMessage, _extends({
|
|
33
|
+
tagName: 'div'
|
|
34
|
+
}, columnPickerMessages.maximumItemsShownLine2)));
|
|
35
|
+
return jsx(components.MenuList, props, children.slice(0, SELECT_ITEMS_MAXIMUM_THRESHOLD), maximumLimitReachedMessage);
|
|
36
|
+
};
|
|
@@ -10,7 +10,8 @@ import { useIntl } from 'react-intl-next';
|
|
|
10
10
|
import Button from '@atlaskit/button/standard-button';
|
|
11
11
|
import BoardIcon from '@atlaskit/icon/glyph/board';
|
|
12
12
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
13
|
-
import { CheckboxOption, PopupSelect } from '@atlaskit/select';
|
|
13
|
+
import { CheckboxOption, createFilter, PopupSelect } from '@atlaskit/select';
|
|
14
|
+
import { ConcatenatedMenuList } from './concatenated-menu-list';
|
|
14
15
|
import { columnPickerMessages } from './messages';
|
|
15
16
|
export var ColumnPicker = function ColumnPicker(_ref) {
|
|
16
17
|
var columns = _ref.columns,
|
|
@@ -98,8 +99,12 @@ export var ColumnPicker = function ColumnPicker(_ref) {
|
|
|
98
99
|
classNamePrefix: 'column-picker-popup',
|
|
99
100
|
testId: 'column-picker-popup',
|
|
100
101
|
components: {
|
|
101
|
-
Option: CheckboxOption
|
|
102
|
+
Option: CheckboxOption,
|
|
103
|
+
MenuList: ConcatenatedMenuList
|
|
102
104
|
},
|
|
105
|
+
filterOption: createFilter({
|
|
106
|
+
ignoreAccents: false
|
|
107
|
+
}),
|
|
103
108
|
options: allOptions,
|
|
104
109
|
value: selectedOptions,
|
|
105
110
|
onOpen: handleOpen,
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl-next';
|
|
2
2
|
export var columnPickerMessages = defineMessages({
|
|
3
|
+
maximumItemsShownLine1: {
|
|
4
|
+
id: 'linkDataSource.column-picker.no-all-items-shown-message.line-1',
|
|
5
|
+
description: 'First line of the messages shown at the bottom of column dropdown options explaining why not all available options are shown and how to get to them.',
|
|
6
|
+
defaultMessage: 'Your search returned too many results.'
|
|
7
|
+
},
|
|
8
|
+
maximumItemsShownLine2: {
|
|
9
|
+
id: 'linkDataSource.column-picker.no-all-items-shown-message.line-2',
|
|
10
|
+
description: 'Second line of the messages shown at the bottom of column dropdown options explaining why not all available options are shown and how to get to them.',
|
|
11
|
+
defaultMessage: 'Try again with more specific keywords.'
|
|
12
|
+
},
|
|
3
13
|
search: {
|
|
4
14
|
id: 'linkDataSource.column-picker.search',
|
|
5
15
|
description: 'Search bar message to look for more fields',
|
|
@@ -136,9 +136,18 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
136
136
|
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
137
137
|
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
138
138
|
var selectedJiraSite = useMemo(function () {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
if (cloudId) {
|
|
140
|
+
// if the cloud id we're editing isn't in available sites then user is likely unauthorized for that site
|
|
141
|
+
// TODO: unauthorized to edit flow https://product-fabric.atlassian.net/browse/EDM-7216
|
|
142
|
+
return availableSites.find(function (jiraSite) {
|
|
143
|
+
return jiraSite.cloudId === cloudId;
|
|
144
|
+
}) || availableSites[0];
|
|
145
|
+
} else {
|
|
146
|
+
var currentlyLoggedInSiteUrl = window.location.origin;
|
|
147
|
+
return availableSites.find(function (jiraSite) {
|
|
148
|
+
return jiraSite.url === currentlyLoggedInSiteUrl;
|
|
149
|
+
}) || availableSites[0];
|
|
150
|
+
}
|
|
142
151
|
}, [availableSites, cloudId]);
|
|
143
152
|
var buttonClickedAnalyticsPayload = useMemo(function () {
|
|
144
153
|
return {
|
|
@@ -186,7 +195,7 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
186
195
|
void fetchSiteDisplayNames();
|
|
187
196
|
}, [fireEvent]);
|
|
188
197
|
useEffect(function () {
|
|
189
|
-
if (!cloudId
|
|
198
|
+
if (selectedJiraSite && (!cloudId || cloudId !== selectedJiraSite.cloudId)) {
|
|
190
199
|
setCloudId(selectedJiraSite.cloudId);
|
|
191
200
|
}
|
|
192
201
|
}, [cloudId, selectedJiraSite]);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { MenuListComponentProps, OptionType } from '@atlaskit/select';
|
|
4
|
+
export declare const SELECT_ITEMS_MAXIMUM_THRESHOLD = 200;
|
|
5
|
+
export declare const ConcatenatedMenuList: ({ children, ...props }: MenuListComponentProps<OptionType, true>) => jsx.JSX.Element;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
export declare const columnPickerMessages: {
|
|
2
|
+
maximumItemsShownLine1: {
|
|
3
|
+
id: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defaultMessage: string;
|
|
6
|
+
};
|
|
7
|
+
maximumItemsShownLine2: {
|
|
8
|
+
id: string;
|
|
9
|
+
description: string;
|
|
10
|
+
defaultMessage: string;
|
|
11
|
+
};
|
|
2
12
|
search: {
|
|
3
13
|
id: string;
|
|
4
14
|
description: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { MenuListComponentProps, OptionType } from '@atlaskit/select';
|
|
4
|
+
export declare const SELECT_ITEMS_MAXIMUM_THRESHOLD = 200;
|
|
5
|
+
export declare const ConcatenatedMenuList: ({ children, ...props }: MenuListComponentProps<OptionType, true>) => jsx.JSX.Element;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
export declare const columnPickerMessages: {
|
|
2
|
+
maximumItemsShownLine1: {
|
|
3
|
+
id: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defaultMessage: string;
|
|
6
|
+
};
|
|
7
|
+
maximumItemsShownLine2: {
|
|
8
|
+
id: string;
|
|
9
|
+
description: string;
|
|
10
|
+
defaultMessage: string;
|
|
11
|
+
};
|
|
2
12
|
search: {
|
|
3
13
|
id: string;
|
|
4
14
|
description: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
"@atlaskit/ssr": "*",
|
|
80
80
|
"@atlaskit/visual-regression": "*",
|
|
81
81
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
82
|
+
"@faker-js/faker": "^7.5.0",
|
|
82
83
|
"@testing-library/dom": "^8.17.1",
|
|
83
84
|
"@testing-library/react": "^12.1.5",
|
|
84
85
|
"@testing-library/react-hooks": "^8.0.1",
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
"jest-fetch-mock": "^3.0.3",
|
|
88
89
|
"json-ld-types": "3.8.0",
|
|
89
90
|
"typescript": "~4.9.5",
|
|
91
|
+
"uuid": "^3.1.0",
|
|
90
92
|
"wait-for-expect": "^1.2.0"
|
|
91
93
|
},
|
|
92
94
|
"techstack": {
|