@atlaskit/link-datasource 4.33.10 → 4.33.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 +15 -0
- package/dist/cjs/ui/common/modal/insert-button/index.js +3 -7
- package/dist/cjs/ui/common/modal/popup-select/formatOptionLabel.js +1 -2
- package/dist/cjs/ui/issue-like-table/edit-type/status/index.js +2 -2
- package/dist/cjs/ui/issue-like-table/render-type/status/index.js +1 -2
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +1 -4
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +4 -6
- package/dist/es2019/ui/common/modal/insert-button/index.js +3 -7
- package/dist/es2019/ui/common/modal/popup-select/formatOptionLabel.js +1 -2
- package/dist/es2019/ui/issue-like-table/edit-type/status/index.js +2 -2
- package/dist/es2019/ui/issue-like-table/render-type/status/index.js +1 -2
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +1 -4
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +4 -6
- package/dist/esm/ui/common/modal/insert-button/index.js +3 -7
- package/dist/esm/ui/common/modal/popup-select/formatOptionLabel.js +1 -2
- package/dist/esm/ui/issue-like-table/edit-type/status/index.js +2 -2
- package/dist/esm/ui/issue-like-table/render-type/status/index.js +1 -2
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +1 -4
- package/dist/esm/ui/jira-issues-modal/modal/index.js +4 -6
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 4.33.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8a319950932e8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8a319950932e8) -
|
|
8
|
+
Remove platform-component-visual-refresh-true feature flag from lozenges.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.33.11
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`92fc3a4a68be6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/92fc3a4a68be6) -
|
|
16
|
+
Cleaning up navx-1345-issues-modal-jql-submit-fix in Jira issues modal component
|
|
17
|
+
|
|
3
18
|
## 4.33.10
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -9,7 +9,6 @@ exports.InsertButton = void 0;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
12
|
var _analytics = require("../../../../analytics");
|
|
14
13
|
var _types = require("../../../../analytics/types");
|
|
15
14
|
var _schemaUtils = require("../../../../common/utils/schema-utils");
|
|
@@ -41,16 +40,13 @@ var InsertButton = exports.InsertButton = function InsertButton(_ref) {
|
|
|
41
40
|
var userInteractions = (0, _userInteractions.useUserInteractions)();
|
|
42
41
|
var _useViewModeContext = (0, _useViewModeContext2.useViewModeContext)(),
|
|
43
42
|
currentViewMode = _useViewModeContext.currentViewMode;
|
|
44
|
-
var
|
|
45
|
-
var isInsertDisabled = (isJqlSubmitFixEnabled ? hasErrors : false) || !isValidParameters(parameters) || status === 'rejected' || status === 'unauthorized' || status === 'loading';
|
|
43
|
+
var isInsertDisabled = hasErrors || !isValidParameters(parameters) || status === 'rejected' || status === 'unauthorized' || status === 'loading';
|
|
46
44
|
var onInsertPressed = (0, _react.useCallback)(function (_e, analyticsEvent) {
|
|
47
45
|
var _insertButtonClickedE;
|
|
48
46
|
if (!parameters || !isValidParameters(parameters) || !url) {
|
|
49
47
|
return;
|
|
50
48
|
}
|
|
51
|
-
|
|
52
|
-
onBeforeInsert === null || onBeforeInsert === void 0 || onBeforeInsert(parameters);
|
|
53
|
-
}
|
|
49
|
+
onBeforeInsert === null || onBeforeInsert === void 0 || onBeforeInsert(parameters);
|
|
54
50
|
var insertButtonClickedEvent = analyticsEvent.update({
|
|
55
51
|
actionSubjectId: 'insert',
|
|
56
52
|
attributes: _objectSpread({
|
|
@@ -93,7 +89,7 @@ var InsertButton = exports.InsertButton = function InsertButton(_ref) {
|
|
|
93
89
|
}]
|
|
94
90
|
}, url), consumerEvent);
|
|
95
91
|
}
|
|
96
|
-
}, [columnCustomSizes, currentViewMode, datasourceId, getAnalyticsPayload, isValidParameters, onInsert, parameters, totalCount, url, userInteractions, visibleColumnCount, visibleColumnKeys, wrappedColumnKeys,
|
|
92
|
+
}, [columnCustomSizes, currentViewMode, datasourceId, getAnalyticsPayload, isValidParameters, onInsert, parameters, totalCount, url, userInteractions, visibleColumnCount, visibleColumnKeys, wrappedColumnKeys, onBeforeInsert]);
|
|
97
93
|
return /*#__PURE__*/_react.default.createElement(_standardButton.default, {
|
|
98
94
|
appearance: "primary",
|
|
99
95
|
onClick: onInsertPressed,
|
|
@@ -13,7 +13,6 @@ var _avatar = _interopRequireDefault(require("@atlaskit/avatar"));
|
|
|
13
13
|
var _css = require("@atlaskit/css");
|
|
14
14
|
var _peopleGroup = _interopRequireDefault(require("@atlaskit/icon/core/people-group"));
|
|
15
15
|
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
17
|
var styles = {
|
|
19
18
|
commonLabelStyles: "_1reo15vq _18m915vq _1bto1l2s",
|
|
@@ -41,7 +40,7 @@ var LozengeOptionLabel = function LozengeOptionLabel(_ref2) {
|
|
|
41
40
|
var data = _ref2.data;
|
|
42
41
|
return /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
43
42
|
appearance: data.appearance,
|
|
44
|
-
isBold:
|
|
43
|
+
isBold: true,
|
|
45
44
|
testId: "basic-filter-popup-select-option--lozenge"
|
|
46
45
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
47
46
|
xcss: styles.commonLabelStyles
|
|
@@ -63,13 +63,13 @@ var StatusEditType = function StatusEditType(props) {
|
|
|
63
63
|
value: currentValue === null || currentValue === void 0 || (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
|
|
64
64
|
labelId: labelId,
|
|
65
65
|
formatOptionLabel: function formatOptionLabel(option) {
|
|
66
|
-
var _option$style
|
|
66
|
+
var _option$style;
|
|
67
67
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
68
68
|
content: option.text
|
|
69
69
|
}, /*#__PURE__*/_react.default.createElement(_lozenge.default, (0, _extends2.default)({
|
|
70
70
|
testId: "inline-edit-status-option-".concat(option.text)
|
|
71
71
|
}, option.style, {
|
|
72
|
-
isBold: (
|
|
72
|
+
isBold: ((_option$style = option.style) === null || _option$style === void 0 ? void 0 : _option$style.isBold) !== false
|
|
73
73
|
}), option.text));
|
|
74
74
|
},
|
|
75
75
|
getOptionLabel: function getOptionLabel(option) {
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.STATUS_TYPE_TEST_ID = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var STATUS_TYPE_TEST_ID = exports.STATUS_TYPE_TEST_ID = 'link-datasource-render-type--status';
|
|
12
11
|
var StatusRenderType = function StatusRenderType(_ref) {
|
|
13
12
|
var text = _ref.text,
|
|
@@ -19,7 +18,7 @@ var StatusRenderType = function StatusRenderType(_ref) {
|
|
|
19
18
|
}
|
|
20
19
|
return /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
21
20
|
appearance: style === null || style === void 0 ? void 0 : style.appearance,
|
|
22
|
-
isBold: (
|
|
21
|
+
isBold: (style === null || style === void 0 ? void 0 : style.isBold) !== false,
|
|
23
22
|
testId: testId
|
|
24
23
|
}, text);
|
|
25
24
|
};
|
|
@@ -15,7 +15,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
16
|
var _reactIntlNext = require("react-intl-next");
|
|
17
17
|
var _useDebounce = require("use-debounce");
|
|
18
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
18
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
19
|
var _analytics = require("../../../analytics");
|
|
21
20
|
var _basicSearchInput = require("../../common/modal/basic-search-input");
|
|
@@ -122,9 +121,7 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
122
121
|
}, [setSearchBarJql, filterSelections, orderDirection, orderKey]);
|
|
123
122
|
var onQueryChange = (0, _react.useCallback)(function (query, jast) {
|
|
124
123
|
var _query$split$map$filt, _fragments$at, _fragments$at2, _fragments$at3;
|
|
125
|
-
|
|
126
|
-
setHasJqlSyntaxErrors === null || setHasJqlSyntaxErrors === void 0 || setHasJqlSyntaxErrors(jast.errors.length > 0);
|
|
127
|
-
}
|
|
124
|
+
setHasJqlSyntaxErrors === null || setHasJqlSyntaxErrors === void 0 || setHasJqlSyntaxErrors(jast.errors.length > 0);
|
|
128
125
|
// determine if order keys have been set so they can be saved and persisted when changes occur in basic search
|
|
129
126
|
var fragments = (_query$split$map$filt = query === null || query === void 0 ? void 0 : query.split(/(^| )(order by)( |$)/i).map(function (item) {
|
|
130
127
|
return item.trim();
|
|
@@ -100,7 +100,6 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
100
100
|
var _useState = (0, _react.useState)(jql),
|
|
101
101
|
_useState2 = (0, _slicedToArray2.default)(_useState, 1),
|
|
102
102
|
initialJql = _useState2[0];
|
|
103
|
-
var isJqlSubmitFixEnabled = (0, _platformFeatureFlags.fg)('navx-1345-issues-modal-jql-submit-fix');
|
|
104
103
|
var _useState3 = (0, _react.useState)(false),
|
|
105
104
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
106
105
|
hasJqlSyntaxErrors = _useState4[0],
|
|
@@ -411,7 +410,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
411
410
|
}))))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, !hasNoJiraSites ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_jiraSearchContainer.JiraSearchContainer, {
|
|
412
411
|
setSearchBarJql: setSearchBarJql,
|
|
413
412
|
searchBarJql: searchBarJql,
|
|
414
|
-
setHasJqlSyntaxErrors:
|
|
413
|
+
setHasJqlSyntaxErrors: setHasJqlSyntaxErrors,
|
|
415
414
|
isSearching: status === 'loading',
|
|
416
415
|
parameters: parameters,
|
|
417
416
|
onSearch: onSearch,
|
|
@@ -435,14 +434,13 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
435
434
|
onCancel: onCancel,
|
|
436
435
|
getAnalyticsPayload: getCancelButtonAnalyticsPayload,
|
|
437
436
|
testId: "jira-datasource-modal--cancel-button"
|
|
438
|
-
}), !hasNoJiraSites && /*#__PURE__*/_react.default.createElement(_insertButton.InsertButton,
|
|
437
|
+
}), !hasNoJiraSites && /*#__PURE__*/_react.default.createElement(_insertButton.InsertButton, {
|
|
439
438
|
testId: "jira-datasource-modal--insert-button",
|
|
440
439
|
url: urlToInsert,
|
|
441
|
-
getAnalyticsPayload: getInsertButtonAnalyticsPayload
|
|
442
|
-
}, isJqlSubmitFixEnabled ? {
|
|
440
|
+
getAnalyticsPayload: getInsertButtonAnalyticsPayload,
|
|
443
441
|
onBeforeInsert: updateParametersJql,
|
|
444
442
|
hasErrors: hasJqlSyntaxErrors
|
|
445
|
-
}
|
|
443
|
+
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages3.modalMessages.insertIssuesButtonTextIssueTermSllv))))));
|
|
446
444
|
};
|
|
447
445
|
var ConnectedJiraIssueConfigModal = (0, _createDatasourceModal.createDatasourceModal)({
|
|
448
446
|
isValidParameters: isValidParameters,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import Button from '@atlaskit/button/standard-button';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { EVENT_CHANNEL } from '../../../../analytics';
|
|
5
4
|
import { DatasourceDisplay, DatasourceSearchMethod } from '../../../../analytics/types';
|
|
6
5
|
import { buildDatasourceAdf } from '../../../../common/utils/schema-utils';
|
|
@@ -33,16 +32,13 @@ export const InsertButton = ({
|
|
|
33
32
|
const {
|
|
34
33
|
currentViewMode
|
|
35
34
|
} = useViewModeContext();
|
|
36
|
-
const
|
|
37
|
-
const isInsertDisabled = (isJqlSubmitFixEnabled ? hasErrors : false) || !isValidParameters(parameters) || status === 'rejected' || status === 'unauthorized' || status === 'loading';
|
|
35
|
+
const isInsertDisabled = hasErrors || !isValidParameters(parameters) || status === 'rejected' || status === 'unauthorized' || status === 'loading';
|
|
38
36
|
const onInsertPressed = useCallback((_e, analyticsEvent) => {
|
|
39
37
|
var _insertButtonClickedE;
|
|
40
38
|
if (!parameters || !isValidParameters(parameters) || !url) {
|
|
41
39
|
return;
|
|
42
40
|
}
|
|
43
|
-
|
|
44
|
-
onBeforeInsert === null || onBeforeInsert === void 0 ? void 0 : onBeforeInsert(parameters);
|
|
45
|
-
}
|
|
41
|
+
onBeforeInsert === null || onBeforeInsert === void 0 ? void 0 : onBeforeInsert(parameters);
|
|
46
42
|
const insertButtonClickedEvent = analyticsEvent.update({
|
|
47
43
|
actionSubjectId: 'insert',
|
|
48
44
|
attributes: {
|
|
@@ -88,7 +84,7 @@ export const InsertButton = ({
|
|
|
88
84
|
}]
|
|
89
85
|
}, url), consumerEvent);
|
|
90
86
|
}
|
|
91
|
-
}, [columnCustomSizes, currentViewMode, datasourceId, getAnalyticsPayload, isValidParameters, onInsert, parameters, totalCount, url, userInteractions, visibleColumnCount, visibleColumnKeys, wrappedColumnKeys,
|
|
87
|
+
}, [columnCustomSizes, currentViewMode, datasourceId, getAnalyticsPayload, isValidParameters, onInsert, parameters, totalCount, url, userInteractions, visibleColumnCount, visibleColumnKeys, wrappedColumnKeys, onBeforeInsert]);
|
|
92
88
|
return /*#__PURE__*/React.createElement(Button, {
|
|
93
89
|
appearance: "primary",
|
|
94
90
|
onClick: onInsertPressed,
|
|
@@ -6,7 +6,6 @@ import Avatar from '@atlaskit/avatar';
|
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
7
|
import PeopleGroupIcon from '@atlaskit/icon/core/people-group';
|
|
8
8
|
import Lozenge from '@atlaskit/lozenge';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box, Flex } from '@atlaskit/primitives/compiled';
|
|
11
10
|
const styles = {
|
|
12
11
|
commonLabelStyles: "_1reo15vq _18m915vq _1bto1l2s",
|
|
@@ -38,7 +37,7 @@ const LozengeOptionLabel = ({
|
|
|
38
37
|
}) => {
|
|
39
38
|
return /*#__PURE__*/React.createElement(Lozenge, {
|
|
40
39
|
appearance: data.appearance,
|
|
41
|
-
isBold:
|
|
40
|
+
isBold: true,
|
|
42
41
|
testId: "basic-filter-popup-select-option--lozenge"
|
|
43
42
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
44
43
|
xcss: styles.commonLabelStyles
|
|
@@ -55,13 +55,13 @@ const StatusEditType = props => {
|
|
|
55
55
|
value: currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
|
|
56
56
|
labelId: labelId,
|
|
57
57
|
formatOptionLabel: option => {
|
|
58
|
-
var _option$style
|
|
58
|
+
var _option$style;
|
|
59
59
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
60
60
|
content: option.text
|
|
61
61
|
}, /*#__PURE__*/React.createElement(Lozenge, _extends({
|
|
62
62
|
testId: `inline-edit-status-option-${option.text}`
|
|
63
63
|
}, option.style, {
|
|
64
|
-
isBold:
|
|
64
|
+
isBold: ((_option$style = option.style) === null || _option$style === void 0 ? void 0 : _option$style.isBold) !== false
|
|
65
65
|
}), option.text));
|
|
66
66
|
},
|
|
67
67
|
getOptionLabel: option => option.text,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Lozenge from '@atlaskit/lozenge';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
export const STATUS_TYPE_TEST_ID = 'link-datasource-render-type--status';
|
|
5
4
|
const StatusRenderType = ({
|
|
6
5
|
text,
|
|
@@ -12,7 +11,7 @@ const StatusRenderType = ({
|
|
|
12
11
|
}
|
|
13
12
|
return /*#__PURE__*/React.createElement(Lozenge, {
|
|
14
13
|
appearance: style === null || style === void 0 ? void 0 : style.appearance,
|
|
15
|
-
isBold:
|
|
14
|
+
isBold: (style === null || style === void 0 ? void 0 : style.isBold) !== false,
|
|
16
15
|
testId: testId
|
|
17
16
|
}, text);
|
|
18
17
|
};
|
|
@@ -4,7 +4,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
6
|
import { useDebouncedCallback } from 'use-debounce';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { Box, Flex, Text } from '@atlaskit/primitives/compiled';
|
|
9
8
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
10
9
|
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
@@ -87,9 +86,7 @@ export const JiraSearchContainer = props => {
|
|
|
87
86
|
}, [setSearchBarJql, filterSelections, orderDirection, orderKey]);
|
|
88
87
|
const onQueryChange = useCallback((query, jast) => {
|
|
89
88
|
var _query$split$map$filt, _fragments$at, _fragments$at2, _fragments$at3;
|
|
90
|
-
|
|
91
|
-
setHasJqlSyntaxErrors === null || setHasJqlSyntaxErrors === void 0 ? void 0 : setHasJqlSyntaxErrors(jast.errors.length > 0);
|
|
92
|
-
}
|
|
89
|
+
setHasJqlSyntaxErrors === null || setHasJqlSyntaxErrors === void 0 ? void 0 : setHasJqlSyntaxErrors(jast.errors.length > 0);
|
|
93
90
|
// determine if order keys have been set so they can be saved and persisted when changes occur in basic search
|
|
94
91
|
const fragments = (_query$split$map$filt = query === null || query === void 0 ? void 0 : query.split(/(^| )(order by)( |$)/i).map(item => item.trim()).filter(Boolean)) !== null && _query$split$map$filt !== void 0 ? _query$split$map$filt : [];
|
|
95
92
|
const hasOrder = ((_fragments$at = fragments.at(-2)) === null || _fragments$at === void 0 ? void 0 : _fragments$at.toLowerCase()) === 'order by';
|
|
@@ -89,7 +89,6 @@ const PlainJiraIssuesConfigModal = props => {
|
|
|
89
89
|
jql
|
|
90
90
|
} = parameters !== null && parameters !== void 0 ? parameters : {};
|
|
91
91
|
const [initialJql] = useState(jql);
|
|
92
|
-
const isJqlSubmitFixEnabled = fg('navx-1345-issues-modal-jql-submit-fix');
|
|
93
92
|
const [hasJqlSyntaxErrors, setHasJqlSyntaxErrors] = useState(false); // Tracks if current jql input has syntax errors
|
|
94
93
|
|
|
95
94
|
const {
|
|
@@ -394,7 +393,7 @@ const PlainJiraIssuesConfigModal = props => {
|
|
|
394
393
|
}))))), /*#__PURE__*/React.createElement(ModalBody, null, !hasNoJiraSites ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(JiraSearchContainer, {
|
|
395
394
|
setSearchBarJql: setSearchBarJql,
|
|
396
395
|
searchBarJql: searchBarJql,
|
|
397
|
-
setHasJqlSyntaxErrors:
|
|
396
|
+
setHasJqlSyntaxErrors: setHasJqlSyntaxErrors,
|
|
398
397
|
isSearching: status === 'loading',
|
|
399
398
|
parameters: parameters,
|
|
400
399
|
onSearch: onSearch,
|
|
@@ -418,14 +417,13 @@ const PlainJiraIssuesConfigModal = props => {
|
|
|
418
417
|
onCancel: onCancel,
|
|
419
418
|
getAnalyticsPayload: getCancelButtonAnalyticsPayload,
|
|
420
419
|
testId: "jira-datasource-modal--cancel-button"
|
|
421
|
-
}), !hasNoJiraSites && /*#__PURE__*/React.createElement(InsertButton,
|
|
420
|
+
}), !hasNoJiraSites && /*#__PURE__*/React.createElement(InsertButton, {
|
|
422
421
|
testId: "jira-datasource-modal--insert-button",
|
|
423
422
|
url: urlToInsert,
|
|
424
|
-
getAnalyticsPayload: getInsertButtonAnalyticsPayload
|
|
425
|
-
}, isJqlSubmitFixEnabled ? {
|
|
423
|
+
getAnalyticsPayload: getInsertButtonAnalyticsPayload,
|
|
426
424
|
onBeforeInsert: updateParametersJql,
|
|
427
425
|
hasErrors: hasJqlSyntaxErrors
|
|
428
|
-
}
|
|
426
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, modalMessages.insertIssuesButtonTextIssueTermSllv))))));
|
|
429
427
|
};
|
|
430
428
|
const ConnectedJiraIssueConfigModal = createDatasourceModal({
|
|
431
429
|
isValidParameters,
|
|
@@ -3,7 +3,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import Button from '@atlaskit/button/standard-button';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { EVENT_CHANNEL } from '../../../../analytics';
|
|
8
7
|
import { DatasourceDisplay, DatasourceSearchMethod } from '../../../../analytics/types';
|
|
9
8
|
import { buildDatasourceAdf } from '../../../../common/utils/schema-utils';
|
|
@@ -32,16 +31,13 @@ export var InsertButton = function InsertButton(_ref) {
|
|
|
32
31
|
var userInteractions = useUserInteractions();
|
|
33
32
|
var _useViewModeContext = useViewModeContext(),
|
|
34
33
|
currentViewMode = _useViewModeContext.currentViewMode;
|
|
35
|
-
var
|
|
36
|
-
var isInsertDisabled = (isJqlSubmitFixEnabled ? hasErrors : false) || !isValidParameters(parameters) || status === 'rejected' || status === 'unauthorized' || status === 'loading';
|
|
34
|
+
var isInsertDisabled = hasErrors || !isValidParameters(parameters) || status === 'rejected' || status === 'unauthorized' || status === 'loading';
|
|
37
35
|
var onInsertPressed = useCallback(function (_e, analyticsEvent) {
|
|
38
36
|
var _insertButtonClickedE;
|
|
39
37
|
if (!parameters || !isValidParameters(parameters) || !url) {
|
|
40
38
|
return;
|
|
41
39
|
}
|
|
42
|
-
|
|
43
|
-
onBeforeInsert === null || onBeforeInsert === void 0 || onBeforeInsert(parameters);
|
|
44
|
-
}
|
|
40
|
+
onBeforeInsert === null || onBeforeInsert === void 0 || onBeforeInsert(parameters);
|
|
45
41
|
var insertButtonClickedEvent = analyticsEvent.update({
|
|
46
42
|
actionSubjectId: 'insert',
|
|
47
43
|
attributes: _objectSpread({
|
|
@@ -84,7 +80,7 @@ export var InsertButton = function InsertButton(_ref) {
|
|
|
84
80
|
}]
|
|
85
81
|
}, url), consumerEvent);
|
|
86
82
|
}
|
|
87
|
-
}, [columnCustomSizes, currentViewMode, datasourceId, getAnalyticsPayload, isValidParameters, onInsert, parameters, totalCount, url, userInteractions, visibleColumnCount, visibleColumnKeys, wrappedColumnKeys,
|
|
83
|
+
}, [columnCustomSizes, currentViewMode, datasourceId, getAnalyticsPayload, isValidParameters, onInsert, parameters, totalCount, url, userInteractions, visibleColumnCount, visibleColumnKeys, wrappedColumnKeys, onBeforeInsert]);
|
|
88
84
|
return /*#__PURE__*/React.createElement(Button, {
|
|
89
85
|
appearance: "primary",
|
|
90
86
|
onClick: onInsertPressed,
|
|
@@ -6,7 +6,6 @@ import Avatar from '@atlaskit/avatar';
|
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
7
|
import PeopleGroupIcon from '@atlaskit/icon/core/people-group';
|
|
8
8
|
import Lozenge from '@atlaskit/lozenge';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box, Flex } from '@atlaskit/primitives/compiled';
|
|
11
10
|
var styles = {
|
|
12
11
|
commonLabelStyles: "_1reo15vq _18m915vq _1bto1l2s",
|
|
@@ -34,7 +33,7 @@ var LozengeOptionLabel = function LozengeOptionLabel(_ref2) {
|
|
|
34
33
|
var data = _ref2.data;
|
|
35
34
|
return /*#__PURE__*/React.createElement(Lozenge, {
|
|
36
35
|
appearance: data.appearance,
|
|
37
|
-
isBold:
|
|
36
|
+
isBold: true,
|
|
38
37
|
testId: "basic-filter-popup-select-option--lozenge"
|
|
39
38
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
40
39
|
xcss: styles.commonLabelStyles
|
|
@@ -54,13 +54,13 @@ var StatusEditType = function StatusEditType(props) {
|
|
|
54
54
|
value: currentValue === null || currentValue === void 0 || (_currentValue$values = currentValue.values) === null || _currentValue$values === void 0 ? void 0 : _currentValue$values[0],
|
|
55
55
|
labelId: labelId,
|
|
56
56
|
formatOptionLabel: function formatOptionLabel(option) {
|
|
57
|
-
var _option$style
|
|
57
|
+
var _option$style;
|
|
58
58
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
59
59
|
content: option.text
|
|
60
60
|
}, /*#__PURE__*/React.createElement(Lozenge, _extends({
|
|
61
61
|
testId: "inline-edit-status-option-".concat(option.text)
|
|
62
62
|
}, option.style, {
|
|
63
|
-
isBold:
|
|
63
|
+
isBold: ((_option$style = option.style) === null || _option$style === void 0 ? void 0 : _option$style.isBold) !== false
|
|
64
64
|
}), option.text));
|
|
65
65
|
},
|
|
66
66
|
getOptionLabel: function getOptionLabel(option) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Lozenge from '@atlaskit/lozenge';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
export var STATUS_TYPE_TEST_ID = 'link-datasource-render-type--status';
|
|
5
4
|
var StatusRenderType = function StatusRenderType(_ref) {
|
|
6
5
|
var text = _ref.text,
|
|
@@ -12,7 +11,7 @@ var StatusRenderType = function StatusRenderType(_ref) {
|
|
|
12
11
|
}
|
|
13
12
|
return /*#__PURE__*/React.createElement(Lozenge, {
|
|
14
13
|
appearance: style === null || style === void 0 ? void 0 : style.appearance,
|
|
15
|
-
isBold:
|
|
14
|
+
isBold: (style === null || style === void 0 ? void 0 : style.isBold) !== false,
|
|
16
15
|
testId: testId
|
|
17
16
|
}, text);
|
|
18
17
|
};
|
|
@@ -10,7 +10,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
10
10
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
11
11
|
import { useIntl } from 'react-intl-next';
|
|
12
12
|
import { useDebouncedCallback } from 'use-debounce';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { Box, Flex, Text } from '@atlaskit/primitives/compiled';
|
|
15
14
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
16
15
|
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
@@ -113,9 +112,7 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
113
112
|
}, [setSearchBarJql, filterSelections, orderDirection, orderKey]);
|
|
114
113
|
var onQueryChange = useCallback(function (query, jast) {
|
|
115
114
|
var _query$split$map$filt, _fragments$at, _fragments$at2, _fragments$at3;
|
|
116
|
-
|
|
117
|
-
setHasJqlSyntaxErrors === null || setHasJqlSyntaxErrors === void 0 || setHasJqlSyntaxErrors(jast.errors.length > 0);
|
|
118
|
-
}
|
|
115
|
+
setHasJqlSyntaxErrors === null || setHasJqlSyntaxErrors === void 0 || setHasJqlSyntaxErrors(jast.errors.length > 0);
|
|
119
116
|
// determine if order keys have been set so they can be saved and persisted when changes occur in basic search
|
|
120
117
|
var fragments = (_query$split$map$filt = query === null || query === void 0 ? void 0 : query.split(/(^| )(order by)( |$)/i).map(function (item) {
|
|
121
118
|
return item.trim();
|
|
@@ -92,7 +92,6 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
92
92
|
var _useState = useState(jql),
|
|
93
93
|
_useState2 = _slicedToArray(_useState, 1),
|
|
94
94
|
initialJql = _useState2[0];
|
|
95
|
-
var isJqlSubmitFixEnabled = fg('navx-1345-issues-modal-jql-submit-fix');
|
|
96
95
|
var _useState3 = useState(false),
|
|
97
96
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
98
97
|
hasJqlSyntaxErrors = _useState4[0],
|
|
@@ -403,7 +402,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
403
402
|
}))))), /*#__PURE__*/React.createElement(ModalBody, null, !hasNoJiraSites ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(JiraSearchContainer, {
|
|
404
403
|
setSearchBarJql: setSearchBarJql,
|
|
405
404
|
searchBarJql: searchBarJql,
|
|
406
|
-
setHasJqlSyntaxErrors:
|
|
405
|
+
setHasJqlSyntaxErrors: setHasJqlSyntaxErrors,
|
|
407
406
|
isSearching: status === 'loading',
|
|
408
407
|
parameters: parameters,
|
|
409
408
|
onSearch: onSearch,
|
|
@@ -427,14 +426,13 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
427
426
|
onCancel: onCancel,
|
|
428
427
|
getAnalyticsPayload: getCancelButtonAnalyticsPayload,
|
|
429
428
|
testId: "jira-datasource-modal--cancel-button"
|
|
430
|
-
}), !hasNoJiraSites && /*#__PURE__*/React.createElement(InsertButton,
|
|
429
|
+
}), !hasNoJiraSites && /*#__PURE__*/React.createElement(InsertButton, {
|
|
431
430
|
testId: "jira-datasource-modal--insert-button",
|
|
432
431
|
url: urlToInsert,
|
|
433
|
-
getAnalyticsPayload: getInsertButtonAnalyticsPayload
|
|
434
|
-
}, isJqlSubmitFixEnabled ? {
|
|
432
|
+
getAnalyticsPayload: getInsertButtonAnalyticsPayload,
|
|
435
433
|
onBeforeInsert: updateParametersJql,
|
|
436
434
|
hasErrors: hasJqlSyntaxErrors
|
|
437
|
-
}
|
|
435
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, modalMessages.insertIssuesButtonTextIssueTermSllv))))));
|
|
438
436
|
};
|
|
439
437
|
var ConnectedJiraIssueConfigModal = createDatasourceModal({
|
|
440
438
|
isValidParameters: isValidParameters,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "4.33.
|
|
3
|
+
"version": "4.33.12",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"ak-postbuild": "ls -d dist/* | xargs -n 1 copyfiles -u 1 -V src/**/*.{svg,png}"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@atlaskit/adf-schema": "^52.
|
|
39
|
+
"@atlaskit/adf-schema": "^52.2.0",
|
|
40
40
|
"@atlaskit/afm-i18n-platform-linking-platform-link-datasource": "2.7.0",
|
|
41
41
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
42
42
|
"@atlaskit/atlassian-context": "^0.6.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@atlaskit/empty-state": "^10.1.0",
|
|
52
52
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
53
53
|
"@atlaskit/flag": "^17.8.0",
|
|
54
|
-
"@atlaskit/form": "^15.
|
|
54
|
+
"@atlaskit/form": "^15.4.0",
|
|
55
55
|
"@atlaskit/heading": "^5.3.0",
|
|
56
56
|
"@atlaskit/icon": "^32.0.0",
|
|
57
57
|
"@atlaskit/icon-object": "^7.4.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@atlaskit/react-select": "^3.13.0",
|
|
82
82
|
"@atlaskit/select": "^21.7.0",
|
|
83
83
|
"@atlaskit/smart-card": "^43.25.0",
|
|
84
|
-
"@atlaskit/smart-user-picker": "^9.
|
|
84
|
+
"@atlaskit/smart-user-picker": "^9.2.0",
|
|
85
85
|
"@atlaskit/spinner": "^19.0.0",
|
|
86
86
|
"@atlaskit/tag": "^14.5.0",
|
|
87
87
|
"@atlaskit/textfield": "^8.2.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@atlaskit/ufo": "^0.4.0",
|
|
92
92
|
"@atlaskit/width-detector": "^5.0.0",
|
|
93
93
|
"@babel/runtime": "^7.0.0",
|
|
94
|
-
"@compiled/react": "^0.
|
|
94
|
+
"@compiled/react": "^0.20.0",
|
|
95
95
|
"@types/dompurify": "^2.2.3",
|
|
96
96
|
"date-fns": "^2.17.0",
|
|
97
97
|
"debounce-promise": "^3.1.2",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@atlaskit/json-ld-types": "^1.4.0",
|
|
114
114
|
"@atlaskit/link-test-helpers": "^9.0.0",
|
|
115
115
|
"@atlaskit/ssr": "workspace:^",
|
|
116
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
116
|
+
"@atlassian/a11y-jest-testing": "^0.10.0",
|
|
117
117
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
118
118
|
"@faker-js/faker": "^7.5.0",
|
|
119
119
|
"@testing-library/dom": "^10.1.0",
|
|
@@ -176,9 +176,6 @@
|
|
|
176
176
|
"navx-1895-new-logo-design": {
|
|
177
177
|
"type": "boolean"
|
|
178
178
|
},
|
|
179
|
-
"navx-1345-issues-modal-jql-submit-fix": {
|
|
180
|
-
"type": "boolean"
|
|
181
|
-
},
|
|
182
179
|
"platform_navx_jira_sllv_rich_text_gate": {
|
|
183
180
|
"type": "boolean"
|
|
184
181
|
},
|