@atlaskit/link-datasource 1.1.1 → 1.1.3
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 +27 -0
- 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 +27 -0
- 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 +27 -0
- package/dist/types/analytics/generated/analytics.types.d.ts +3 -1
- 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/analytics/generated/analytics.types.d.ts +3 -1
- 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 +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`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
|
|
8
|
+
|
|
9
|
+
## 1.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`2378739fad6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2378739fad6) - Added link-datasource link viewed ui analytics events
|
|
14
|
+
|
|
3
15
|
## 1.1.1
|
|
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.3",
|
|
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',
|
|
@@ -200,6 +200,33 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
200
200
|
setCloudId(selectedJiraSite.cloudId);
|
|
201
201
|
}
|
|
202
202
|
}, [cloudId, selectedJiraSite]);
|
|
203
|
+
var fireSingleItemViewedEvent = (0, _react.useCallback)(function () {
|
|
204
|
+
fireEvent('ui.link.viewed.singleItem', {
|
|
205
|
+
destinationObjectTypes: destinationObjectTypes,
|
|
206
|
+
searchMethod: (0, _utils.mapSearchMethod)(lastSearchMethodRef.current),
|
|
207
|
+
extensionKey: extensionKey
|
|
208
|
+
});
|
|
209
|
+
}, [extensionKey, fireEvent, destinationObjectTypes]);
|
|
210
|
+
var fireCountViewedEvent = (0, _react.useCallback)(function () {
|
|
211
|
+
fireEvent('ui.link.viewed.count', {
|
|
212
|
+
destinationObjectTypes: destinationObjectTypes,
|
|
213
|
+
searchMethod: (0, _utils.mapSearchMethod)(lastSearchMethodRef.current),
|
|
214
|
+
extensionKey: extensionKey,
|
|
215
|
+
totalItemCount: totalCount || 0
|
|
216
|
+
});
|
|
217
|
+
}, [extensionKey, fireEvent, totalCount, destinationObjectTypes]);
|
|
218
|
+
(0, _react.useEffect)(function () {
|
|
219
|
+
var isResolved = status === 'resolved';
|
|
220
|
+
var isSingleItemViewed = currentViewMode === 'issue' && totalCount === 1;
|
|
221
|
+
var isCountViewed = currentViewMode === 'count';
|
|
222
|
+
if (isResolved) {
|
|
223
|
+
if (isSingleItemViewed) {
|
|
224
|
+
fireSingleItemViewedEvent();
|
|
225
|
+
} else if (isCountViewed && totalCount) {
|
|
226
|
+
fireCountViewedEvent();
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}, [currentViewMode, totalCount, status, fireSingleItemViewedEvent, fireCountViewedEvent]);
|
|
203
230
|
var onSearch = (0, _react.useCallback)(function (newParameters, searchMethod) {
|
|
204
231
|
searchCount.current++;
|
|
205
232
|
lastSearchMethodRef.current = searchMethod;
|
|
@@ -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',
|
|
@@ -150,6 +150,33 @@ export const PlainJiraIssuesConfigModal = props => {
|
|
|
150
150
|
setCloudId(selectedJiraSite.cloudId);
|
|
151
151
|
}
|
|
152
152
|
}, [cloudId, selectedJiraSite]);
|
|
153
|
+
const fireSingleItemViewedEvent = useCallback(() => {
|
|
154
|
+
fireEvent('ui.link.viewed.singleItem', {
|
|
155
|
+
destinationObjectTypes: destinationObjectTypes,
|
|
156
|
+
searchMethod: mapSearchMethod(lastSearchMethodRef.current),
|
|
157
|
+
extensionKey: extensionKey
|
|
158
|
+
});
|
|
159
|
+
}, [extensionKey, fireEvent, destinationObjectTypes]);
|
|
160
|
+
const fireCountViewedEvent = useCallback(() => {
|
|
161
|
+
fireEvent('ui.link.viewed.count', {
|
|
162
|
+
destinationObjectTypes: destinationObjectTypes,
|
|
163
|
+
searchMethod: mapSearchMethod(lastSearchMethodRef.current),
|
|
164
|
+
extensionKey: extensionKey,
|
|
165
|
+
totalItemCount: totalCount || 0
|
|
166
|
+
});
|
|
167
|
+
}, [extensionKey, fireEvent, totalCount, destinationObjectTypes]);
|
|
168
|
+
useEffect(() => {
|
|
169
|
+
const isResolved = status === 'resolved';
|
|
170
|
+
const isSingleItemViewed = currentViewMode === 'issue' && totalCount === 1;
|
|
171
|
+
const isCountViewed = currentViewMode === 'count';
|
|
172
|
+
if (isResolved) {
|
|
173
|
+
if (isSingleItemViewed) {
|
|
174
|
+
fireSingleItemViewedEvent();
|
|
175
|
+
} else if (isCountViewed && totalCount) {
|
|
176
|
+
fireCountViewedEvent();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}, [currentViewMode, totalCount, status, fireSingleItemViewedEvent, fireCountViewedEvent]);
|
|
153
180
|
const onSearch = useCallback((newParameters, searchMethod) => {
|
|
154
181
|
searchCount.current++;
|
|
155
182
|
lastSearchMethodRef.current = searchMethod;
|
|
@@ -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.3",
|
|
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',
|
|
@@ -190,6 +190,33 @@ export var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(prop
|
|
|
190
190
|
setCloudId(selectedJiraSite.cloudId);
|
|
191
191
|
}
|
|
192
192
|
}, [cloudId, selectedJiraSite]);
|
|
193
|
+
var fireSingleItemViewedEvent = useCallback(function () {
|
|
194
|
+
fireEvent('ui.link.viewed.singleItem', {
|
|
195
|
+
destinationObjectTypes: destinationObjectTypes,
|
|
196
|
+
searchMethod: mapSearchMethod(lastSearchMethodRef.current),
|
|
197
|
+
extensionKey: extensionKey
|
|
198
|
+
});
|
|
199
|
+
}, [extensionKey, fireEvent, destinationObjectTypes]);
|
|
200
|
+
var fireCountViewedEvent = useCallback(function () {
|
|
201
|
+
fireEvent('ui.link.viewed.count', {
|
|
202
|
+
destinationObjectTypes: destinationObjectTypes,
|
|
203
|
+
searchMethod: mapSearchMethod(lastSearchMethodRef.current),
|
|
204
|
+
extensionKey: extensionKey,
|
|
205
|
+
totalItemCount: totalCount || 0
|
|
206
|
+
});
|
|
207
|
+
}, [extensionKey, fireEvent, totalCount, destinationObjectTypes]);
|
|
208
|
+
useEffect(function () {
|
|
209
|
+
var isResolved = status === 'resolved';
|
|
210
|
+
var isSingleItemViewed = currentViewMode === 'issue' && totalCount === 1;
|
|
211
|
+
var isCountViewed = currentViewMode === 'count';
|
|
212
|
+
if (isResolved) {
|
|
213
|
+
if (isSingleItemViewed) {
|
|
214
|
+
fireSingleItemViewedEvent();
|
|
215
|
+
} else if (isCountViewed && totalCount) {
|
|
216
|
+
fireCountViewedEvent();
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}, [currentViewMode, totalCount, status, fireSingleItemViewedEvent, fireCountViewedEvent]);
|
|
193
220
|
var onSearch = useCallback(function (newParameters, searchMethod) {
|
|
194
221
|
searchCount.current++;
|
|
195
222
|
lastSearchMethodRef.current = searchMethod;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::bbcd049ca0675b0360080a987c26f6e9>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -72,11 +72,13 @@ export type TableViewedDatasourceAttributesType = {
|
|
|
72
72
|
export type LinkViewedSingleItemAttributesType = {
|
|
73
73
|
destinationObjectTypes: unknown[];
|
|
74
74
|
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
75
|
+
extensionKey: string | null;
|
|
75
76
|
};
|
|
76
77
|
export type LinkViewedCountAttributesType = {
|
|
77
78
|
destinationObjectTypes: unknown[];
|
|
78
79
|
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
79
80
|
totalItemCount: number;
|
|
81
|
+
extensionKey: string | null;
|
|
80
82
|
};
|
|
81
83
|
export type AnalyticsEventAttributes = {
|
|
82
84
|
/**
|
|
@@ -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;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::bbcd049ca0675b0360080a987c26f6e9>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -72,11 +72,13 @@ export type TableViewedDatasourceAttributesType = {
|
|
|
72
72
|
export type LinkViewedSingleItemAttributesType = {
|
|
73
73
|
destinationObjectTypes: unknown[];
|
|
74
74
|
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
75
|
+
extensionKey: string | null;
|
|
75
76
|
};
|
|
76
77
|
export type LinkViewedCountAttributesType = {
|
|
77
78
|
destinationObjectTypes: unknown[];
|
|
78
79
|
searchMethod: 'datasource_search_query' | 'datasource_basic_filter' | 'datasource_saved_filter' | null;
|
|
79
80
|
totalItemCount: number;
|
|
81
|
+
extensionKey: string | null;
|
|
80
82
|
};
|
|
81
83
|
export type AnalyticsEventAttributes = {
|
|
82
84
|
/**
|
|
@@ -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.3",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/image": "^1.1.0",
|
|
45
45
|
"@atlaskit/jql-editor-autocomplete-rest": "^2.0.0",
|
|
46
46
|
"@atlaskit/link-client-extension": "^1.6.0",
|
|
47
|
-
"@atlaskit/linking-common": "^4.
|
|
47
|
+
"@atlaskit/linking-common": "^4.8.0",
|
|
48
48
|
"@atlaskit/linking-types": "^8.3.0",
|
|
49
49
|
"@atlaskit/lozenge": "^11.4.0",
|
|
50
50
|
"@atlaskit/modal-dialog": "^12.6.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll": "^0.6.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-react-indicator": "^0.16.0",
|
|
55
55
|
"@atlaskit/select": "^16.5.0",
|
|
56
|
-
"@atlaskit/smart-card": "^26.
|
|
56
|
+
"@atlaskit/smart-card": "^26.25.0",
|
|
57
57
|
"@atlaskit/spinner": "^15.5.0",
|
|
58
58
|
"@atlaskit/tag": "^11.6.0",
|
|
59
59
|
"@atlaskit/textfield": "5.6.7",
|
|
@@ -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": {
|