@atlaskit/link-datasource 4.9.3 → 4.10.1
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 +19 -0
- package/dist/cjs/ui/assets-modal/search-container/aql-search-input/index.js +24 -1
- package/dist/cjs/ui/common/error-state/provider-auth-required.js +11 -1
- package/dist/cjs/ui/common/modal/basic-search-input/index.js +25 -1
- package/dist/cjs/ui/table-footer/index.js +13 -1
- package/dist/es2019/ui/assets-modal/search-container/aql-search-input/index.js +22 -1
- package/dist/es2019/ui/common/error-state/provider-auth-required.js +13 -3
- package/dist/es2019/ui/common/modal/basic-search-input/index.js +23 -1
- package/dist/es2019/ui/table-footer/index.js +11 -1
- package/dist/esm/ui/assets-modal/search-container/aql-search-input/index.js +24 -1
- package/dist/esm/ui/common/error-state/provider-auth-required.js +13 -3
- package/dist/esm/ui/common/modal/basic-search-input/index.js +25 -1
- package/dist/esm/ui/table-footer/index.js +13 -1
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 4.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.10.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#152998](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/152998)
|
|
14
|
+
[`1218a87e3f6f4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1218a87e3f6f4) -
|
|
15
|
+
[ux] Behind fg `replace-legacy-button-in-sllv` - replaces legacy Button component with new Button
|
|
16
|
+
component
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 4.9.3
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -15,11 +15,14 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
15
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
16
16
|
var _reactIntlNext = require("react-intl-next");
|
|
17
17
|
var _button = require("@atlaskit/button");
|
|
18
|
+
var _new = require("@atlaskit/button/new");
|
|
18
19
|
var _form = require("@atlaskit/form");
|
|
19
20
|
var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/cross-circle"));
|
|
20
21
|
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/question-circle"));
|
|
21
22
|
var _searchEditorSearch = _interopRequireDefault(require("@atlaskit/icon/core/migration/search--editor-search"));
|
|
22
23
|
var _successCheckCircle = _interopRequireDefault(require("@atlaskit/icon/core/migration/success--check-circle"));
|
|
24
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
23
26
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
24
27
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
25
28
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -48,6 +51,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
48
51
|
var buttonBaseStyles = null;
|
|
49
52
|
var AQLSupportDocumentLink = 'https://support.atlassian.com/jira-service-management-cloud/docs/use-assets-query-language-aql/';
|
|
50
53
|
var searchButtonStyles = null;
|
|
54
|
+
var styles = {
|
|
55
|
+
searchButtonContainer: "_2hwx12x7"
|
|
56
|
+
};
|
|
51
57
|
var renderValidatorIcon = function renderValidatorIcon(lastValidationResult) {
|
|
52
58
|
if (lastValidationResult.type === 'loading') {
|
|
53
59
|
return /*#__PURE__*/React.createElement(_spinner.default, {
|
|
@@ -120,7 +126,24 @@ var AqlSearchInput = exports.AqlSearchInput = function AqlSearchInput(_ref2) {
|
|
|
120
126
|
LEGACY_size: "medium",
|
|
121
127
|
testId: "assets-datasource-modal-help",
|
|
122
128
|
spacing: "spacious"
|
|
123
|
-
}))), /*#__PURE__*/React.createElement(
|
|
129
|
+
}))), (0, _platformFeatureFlags.fg)('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
130
|
+
xcss: styles.searchButtonContainer
|
|
131
|
+
}, /*#__PURE__*/React.createElement(_new.IconButton, {
|
|
132
|
+
appearance: "primary",
|
|
133
|
+
isLoading: isSearching,
|
|
134
|
+
icon: function icon(iconProps) {
|
|
135
|
+
return /*#__PURE__*/React.createElement(_searchEditorSearch.default, (0, _extends2.default)({}, iconProps, {
|
|
136
|
+
LEGACY_size: "medium",
|
|
137
|
+
spacing: "spacious",
|
|
138
|
+
color: "currentColor"
|
|
139
|
+
}));
|
|
140
|
+
},
|
|
141
|
+
spacing: "compact",
|
|
142
|
+
type: "submit",
|
|
143
|
+
label: formatMessage(_messages.searchInputMessages.placeholder),
|
|
144
|
+
isDisabled: lastValidationResult.type !== 'valid',
|
|
145
|
+
testId: "assets-datasource-modal--aql-search-button"
|
|
146
|
+
})) : /*#__PURE__*/React.createElement(_button.LoadingButton, {
|
|
124
147
|
appearance: "primary",
|
|
125
148
|
iconBefore: /*#__PURE__*/React.createElement(_searchEditorSearch.default, {
|
|
126
149
|
label: formatMessage(_messages.searchInputMessages.placeholder),
|
|
@@ -15,8 +15,10 @@ 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 _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
18
|
+
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
18
19
|
var _emptyState = _interopRequireDefault(require("@atlaskit/empty-state"));
|
|
19
20
|
var _outboundAuthFlowClient = require("@atlaskit/outbound-auth-flow-client");
|
|
21
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
22
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
21
23
|
var _analytics = require("../../../analytics");
|
|
22
24
|
var _useErrorLogger2 = _interopRequireDefault(require("../../../hooks/useErrorLogger"));
|
|
@@ -25,6 +27,9 @@ var _providerAuthRequiredSvg = require("./provider-auth-required-svg");
|
|
|
25
27
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
28
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
27
29
|
var buttonStyles = null;
|
|
30
|
+
var styles = {
|
|
31
|
+
buttonContainer: "_19pkpxbi"
|
|
32
|
+
};
|
|
28
33
|
var learnMoreAboutSmartLinksUrl = 'https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-Links-from-Jira-and-other-products';
|
|
29
34
|
var ProviderAuthRequired = exports.ProviderAuthRequired = function ProviderAuthRequired(_ref) {
|
|
30
35
|
var _ref$auth = _ref.auth,
|
|
@@ -95,7 +100,12 @@ var ProviderAuthRequired = exports.ProviderAuthRequired = function ProviderAuthR
|
|
|
95
100
|
}, formatMessage(_messages.loadingErrorMessages.learnMoreAboutSmartLinks)));
|
|
96
101
|
};
|
|
97
102
|
var renderAuthConnectButton = function renderAuthConnectButton() {
|
|
98
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
103
|
+
return (0, _platformFeatureFlags.fg)('replace-legacy-button-in-sllv') ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
104
|
+
xcss: styles.buttonContainer
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
106
|
+
onClick: onAuthRequest,
|
|
107
|
+
appearance: "primary"
|
|
108
|
+
}, formatMessage(_messages.loadingErrorMessages.authConnectButtonText))) : /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
99
109
|
onClick: onAuthRequest,
|
|
100
110
|
appearance: "primary",
|
|
101
111
|
className: (0, _runtime.ax)(["_19pkpxbi"])
|
|
@@ -10,16 +10,22 @@ exports.BasicSearchInput = void 0;
|
|
|
10
10
|
require("./index.compiled.css");
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
14
|
var _reactIntlNext = require("react-intl-next");
|
|
14
15
|
var _button = require("@atlaskit/button");
|
|
16
|
+
var _new = require("@atlaskit/button/new");
|
|
15
17
|
var _searchEditorSearch = _interopRequireDefault(require("@atlaskit/icon/core/migration/search--editor-search"));
|
|
16
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
20
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
18
21
|
var _analytics = require("../../../../analytics");
|
|
19
22
|
var _messages = require("./messages");
|
|
20
23
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
24
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
25
|
var searchButtonStyles = null;
|
|
26
|
+
var styles = {
|
|
27
|
+
searchButtonContainer: "_2hwx12x7"
|
|
28
|
+
};
|
|
23
29
|
var formStyles = null;
|
|
24
30
|
var formWithMaxWidthStylesOld = null;
|
|
25
31
|
var formWithMaxWidthStyles = null;
|
|
@@ -49,7 +55,25 @@ var BasicSearchInput = exports.BasicSearchInput = function BasicSearchInput(_ref
|
|
|
49
55
|
onSubmit: handleFormSubmit,
|
|
50
56
|
className: (0, _runtime.ax)([fullWidth ? "_16jlkb7n _1o9zkb7n _i0dlf1ug" : (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-sllv') ? "_16jlkb7n _1o9zkb7n _i0dlf1ug _p12f1mjv" : "_16jlkb7n _1o9zkb7n _i0dlf1ug _p12fr0r7"])
|
|
51
57
|
}, /*#__PURE__*/React.createElement(_textfield.default, {
|
|
52
|
-
elemAfterInput: /*#__PURE__*/React.createElement(
|
|
58
|
+
elemAfterInput: (0, _platformFeatureFlags.fg)('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
59
|
+
xcss: styles.searchButtonContainer
|
|
60
|
+
}, /*#__PURE__*/React.createElement(_new.IconButton, {
|
|
61
|
+
appearance: "primary",
|
|
62
|
+
isLoading: isSearching,
|
|
63
|
+
icon: function icon(iconProps) {
|
|
64
|
+
return /*#__PURE__*/React.createElement(_searchEditorSearch.default, (0, _extends2.default)({}, iconProps, {
|
|
65
|
+
LEGACY_size: "medium",
|
|
66
|
+
spacing: "spacious",
|
|
67
|
+
color: "currentColor"
|
|
68
|
+
}));
|
|
69
|
+
},
|
|
70
|
+
spacing: "compact",
|
|
71
|
+
type: "submit",
|
|
72
|
+
label: formatMessage((0, _platformFeatureFlags.fg)('confluence-issue-terminology-refresh') ? _messages.basicSearchInputMessages.basicTextSearchLabelIssueTermRefresh : _messages.basicSearchInputMessages.basicTextSearchLabel),
|
|
73
|
+
isDisabled: isDisabled,
|
|
74
|
+
testId: "".concat(testId, "--basic-search-button"),
|
|
75
|
+
onClick: handleSearchWithAnalytics
|
|
76
|
+
})) : /*#__PURE__*/React.createElement(_button.LoadingButton, {
|
|
53
77
|
appearance: "primary",
|
|
54
78
|
iconBefore: /*#__PURE__*/React.createElement(_searchEditorSearch.default, {
|
|
55
79
|
label: formatMessage((0, _platformFeatureFlags.fg)('confluence-issue-terminology-refresh') ? _messages.basicSearchInputMessages.basicTextSearchLabelIssueTermRefresh : _messages.basicSearchInputMessages.basicTextSearchLabel),
|
|
@@ -185,7 +185,19 @@ var TableFooter = exports.TableFooter = function TableFooter(_ref5) {
|
|
|
185
185
|
"data-testid": "sync-text"
|
|
186
186
|
}, isLoading ? /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, _messages.footerMessages.loadingText) : /*#__PURE__*/React.createElement(_syncInfo.SyncInfo, {
|
|
187
187
|
lastSyncTime: lastSyncTime
|
|
188
|
-
})), /*#__PURE__*/React.createElement(
|
|
188
|
+
})), (0, _platformFeatureFlags.fg)('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(_new.IconButton, {
|
|
189
|
+
onClick: onRefresh,
|
|
190
|
+
appearance: "subtle",
|
|
191
|
+
icon: function icon(iconProps) {
|
|
192
|
+
return /*#__PURE__*/React.createElement(_refresh.default, (0, _extends2.default)({}, iconProps, {
|
|
193
|
+
color: "currentColor",
|
|
194
|
+
spacing: "spacious"
|
|
195
|
+
}));
|
|
196
|
+
},
|
|
197
|
+
label: intl.formatMessage(_messages.footerMessages.refreshLabel),
|
|
198
|
+
isDisabled: isLoading,
|
|
199
|
+
testId: "refresh-button"
|
|
200
|
+
}) : /*#__PURE__*/React.createElement(_button.default, {
|
|
189
201
|
onClick: onRefresh,
|
|
190
202
|
appearance: "subtle",
|
|
191
203
|
iconBefore: /*#__PURE__*/React.createElement(_refresh.default, {
|
|
@@ -7,11 +7,14 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
7
7
|
import { Fragment } from 'react';
|
|
8
8
|
import { useIntl } from 'react-intl-next';
|
|
9
9
|
import { LoadingButton } from '@atlaskit/button';
|
|
10
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
10
11
|
import { ErrorMessage, Field } from '@atlaskit/form';
|
|
11
12
|
import CrossCircleIcon from '@atlaskit/icon/core/migration/cross-circle';
|
|
12
13
|
import QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
|
|
13
14
|
import SearchIcon from '@atlaskit/icon/core/migration/search--editor-search';
|
|
14
15
|
import CheckCircleIcon from '@atlaskit/icon/core/migration/success--check-circle';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
15
18
|
import Spinner from '@atlaskit/spinner';
|
|
16
19
|
import Textfield from '@atlaskit/textfield';
|
|
17
20
|
import { G300, N500, R400 } from '@atlaskit/theme/colors';
|
|
@@ -38,6 +41,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
38
41
|
const buttonBaseStyles = null;
|
|
39
42
|
const AQLSupportDocumentLink = 'https://support.atlassian.com/jira-service-management-cloud/docs/use-assets-query-language-aql/';
|
|
40
43
|
const searchButtonStyles = null;
|
|
44
|
+
const styles = {
|
|
45
|
+
searchButtonContainer: "_2hwx12x7"
|
|
46
|
+
};
|
|
41
47
|
const renderValidatorIcon = lastValidationResult => {
|
|
42
48
|
if (lastValidationResult.type === 'loading') {
|
|
43
49
|
return /*#__PURE__*/React.createElement(Spinner, {
|
|
@@ -112,7 +118,22 @@ export const AqlSearchInput = ({
|
|
|
112
118
|
LEGACY_size: "medium",
|
|
113
119
|
testId: "assets-datasource-modal-help",
|
|
114
120
|
spacing: "spacious"
|
|
115
|
-
}))), /*#__PURE__*/React.createElement(
|
|
121
|
+
}))), fg('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(Box, {
|
|
122
|
+
xcss: styles.searchButtonContainer
|
|
123
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
124
|
+
appearance: "primary",
|
|
125
|
+
isLoading: isSearching,
|
|
126
|
+
icon: iconProps => /*#__PURE__*/React.createElement(SearchIcon, _extends({}, iconProps, {
|
|
127
|
+
LEGACY_size: "medium",
|
|
128
|
+
spacing: "spacious",
|
|
129
|
+
color: "currentColor"
|
|
130
|
+
})),
|
|
131
|
+
spacing: "compact",
|
|
132
|
+
type: "submit",
|
|
133
|
+
label: formatMessage(searchInputMessages.placeholder),
|
|
134
|
+
isDisabled: lastValidationResult.type !== 'valid',
|
|
135
|
+
testId: "assets-datasource-modal--aql-search-button"
|
|
136
|
+
})) : /*#__PURE__*/React.createElement(LoadingButton, {
|
|
116
137
|
appearance: "primary",
|
|
117
138
|
iconBefore: /*#__PURE__*/React.createElement(SearchIcon, {
|
|
118
139
|
label: formatMessage(searchInputMessages.placeholder),
|
|
@@ -3,15 +3,20 @@ import "./provider-auth-required.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useEffect } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl-next';
|
|
6
|
-
import
|
|
6
|
+
import ButtonOld from '@atlaskit/button';
|
|
7
|
+
import Button from '@atlaskit/button/new';
|
|
7
8
|
import EmptyState from '@atlaskit/empty-state';
|
|
8
9
|
import { AuthError, auth as outboundAuth } from '@atlaskit/outbound-auth-flow-client';
|
|
9
|
-
import {
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { Anchor, Box } from '@atlaskit/primitives/compiled';
|
|
10
12
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
11
13
|
import useErrorLogger from '../../../hooks/useErrorLogger';
|
|
12
14
|
import { loadingErrorMessages } from './messages';
|
|
13
15
|
import { ProviderAuthRequiredSVG } from './provider-auth-required-svg';
|
|
14
16
|
const buttonStyles = null;
|
|
17
|
+
const styles = {
|
|
18
|
+
buttonContainer: "_19pkpxbi"
|
|
19
|
+
};
|
|
15
20
|
const learnMoreAboutSmartLinksUrl = 'https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-Links-from-Jira-and-other-products';
|
|
16
21
|
export const ProviderAuthRequired = ({
|
|
17
22
|
auth = [],
|
|
@@ -63,7 +68,12 @@ export const ProviderAuthRequired = ({
|
|
|
63
68
|
target: "_blank",
|
|
64
69
|
rel: "noreferrer noopener"
|
|
65
70
|
}, formatMessage(loadingErrorMessages.learnMoreAboutSmartLinks)));
|
|
66
|
-
const renderAuthConnectButton = () => /*#__PURE__*/React.createElement(
|
|
71
|
+
const renderAuthConnectButton = () => fg('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(Box, {
|
|
72
|
+
xcss: styles.buttonContainer
|
|
73
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
74
|
+
onClick: onAuthRequest,
|
|
75
|
+
appearance: "primary"
|
|
76
|
+
}, formatMessage(loadingErrorMessages.authConnectButtonText))) : /*#__PURE__*/React.createElement(ButtonOld, {
|
|
67
77
|
onClick: onAuthRequest,
|
|
68
78
|
appearance: "primary",
|
|
69
79
|
className: ax(["_19pkpxbi"])
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import "./index.compiled.css";
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
6
|
import { useIntl } from 'react-intl-next';
|
|
6
7
|
import { LoadingButton } from '@atlaskit/button';
|
|
8
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
7
9
|
import SearchIcon from '@atlaskit/icon/core/migration/search--editor-search';
|
|
8
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
9
12
|
import Textfield from '@atlaskit/textfield';
|
|
10
13
|
import { useDatasourceAnalyticsEvents } from '../../../../analytics';
|
|
11
14
|
import { basicSearchInputMessages } from './messages';
|
|
12
15
|
const searchButtonStyles = null;
|
|
16
|
+
const styles = {
|
|
17
|
+
searchButtonContainer: "_2hwx12x7"
|
|
18
|
+
};
|
|
13
19
|
const formStyles = null;
|
|
14
20
|
const formWithMaxWidthStylesOld = null;
|
|
15
21
|
const formWithMaxWidthStyles = null;
|
|
@@ -42,7 +48,23 @@ export const BasicSearchInput = ({
|
|
|
42
48
|
onSubmit: handleFormSubmit,
|
|
43
49
|
className: ax([fullWidth ? "_16jlkb7n _1o9zkb7n _i0dlf1ug" : fg('platform-linking-visual-refresh-sllv') ? "_16jlkb7n _1o9zkb7n _i0dlf1ug _p12f1mjv" : "_16jlkb7n _1o9zkb7n _i0dlf1ug _p12fr0r7"])
|
|
44
50
|
}, /*#__PURE__*/React.createElement(Textfield, {
|
|
45
|
-
elemAfterInput: /*#__PURE__*/React.createElement(
|
|
51
|
+
elemAfterInput: fg('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(Box, {
|
|
52
|
+
xcss: styles.searchButtonContainer
|
|
53
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
54
|
+
appearance: "primary",
|
|
55
|
+
isLoading: isSearching,
|
|
56
|
+
icon: iconProps => /*#__PURE__*/React.createElement(SearchIcon, _extends({}, iconProps, {
|
|
57
|
+
LEGACY_size: "medium",
|
|
58
|
+
spacing: "spacious",
|
|
59
|
+
color: "currentColor"
|
|
60
|
+
})),
|
|
61
|
+
spacing: "compact",
|
|
62
|
+
type: "submit",
|
|
63
|
+
label: formatMessage(fg('confluence-issue-terminology-refresh') ? basicSearchInputMessages.basicTextSearchLabelIssueTermRefresh : basicSearchInputMessages.basicTextSearchLabel),
|
|
64
|
+
isDisabled: isDisabled,
|
|
65
|
+
testId: `${testId}--basic-search-button`,
|
|
66
|
+
onClick: handleSearchWithAnalytics
|
|
67
|
+
})) : /*#__PURE__*/React.createElement(LoadingButton, {
|
|
46
68
|
appearance: "primary",
|
|
47
69
|
iconBefore: /*#__PURE__*/React.createElement(SearchIcon, {
|
|
48
70
|
label: formatMessage(fg('confluence-issue-terminology-refresh') ? basicSearchInputMessages.basicTextSearchLabelIssueTermRefresh : basicSearchInputMessages.basicTextSearchLabel),
|
|
@@ -166,7 +166,17 @@ export const TableFooter = ({
|
|
|
166
166
|
"data-testid": "sync-text"
|
|
167
167
|
}, isLoading ? /*#__PURE__*/React.createElement(FormattedMessage, footerMessages.loadingText) : /*#__PURE__*/React.createElement(SyncInfo, {
|
|
168
168
|
lastSyncTime: lastSyncTime
|
|
169
|
-
})), /*#__PURE__*/React.createElement(
|
|
169
|
+
})), fg('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(IconButton, {
|
|
170
|
+
onClick: onRefresh,
|
|
171
|
+
appearance: "subtle",
|
|
172
|
+
icon: iconProps => /*#__PURE__*/React.createElement(RefreshIcon, _extends({}, iconProps, {
|
|
173
|
+
color: "currentColor",
|
|
174
|
+
spacing: "spacious"
|
|
175
|
+
})),
|
|
176
|
+
label: intl.formatMessage(footerMessages.refreshLabel),
|
|
177
|
+
isDisabled: isLoading,
|
|
178
|
+
testId: "refresh-button"
|
|
179
|
+
}) : /*#__PURE__*/React.createElement(Button, {
|
|
170
180
|
onClick: onRefresh,
|
|
171
181
|
appearance: "subtle",
|
|
172
182
|
iconBefore: /*#__PURE__*/React.createElement(RefreshIcon, {
|
|
@@ -9,11 +9,14 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
9
9
|
import { Fragment } from 'react';
|
|
10
10
|
import { useIntl } from 'react-intl-next';
|
|
11
11
|
import { LoadingButton } from '@atlaskit/button';
|
|
12
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
12
13
|
import { ErrorMessage, Field } from '@atlaskit/form';
|
|
13
14
|
import CrossCircleIcon from '@atlaskit/icon/core/migration/cross-circle';
|
|
14
15
|
import QuestionCircleIcon from '@atlaskit/icon/core/migration/question-circle';
|
|
15
16
|
import SearchIcon from '@atlaskit/icon/core/migration/search--editor-search';
|
|
16
17
|
import CheckCircleIcon from '@atlaskit/icon/core/migration/success--check-circle';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
17
20
|
import Spinner from '@atlaskit/spinner';
|
|
18
21
|
import Textfield from '@atlaskit/textfield';
|
|
19
22
|
import { G300, N500, R400 } from '@atlaskit/theme/colors';
|
|
@@ -40,6 +43,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
40
43
|
var buttonBaseStyles = null;
|
|
41
44
|
var AQLSupportDocumentLink = 'https://support.atlassian.com/jira-service-management-cloud/docs/use-assets-query-language-aql/';
|
|
42
45
|
var searchButtonStyles = null;
|
|
46
|
+
var styles = {
|
|
47
|
+
searchButtonContainer: "_2hwx12x7"
|
|
48
|
+
};
|
|
43
49
|
var renderValidatorIcon = function renderValidatorIcon(lastValidationResult) {
|
|
44
50
|
if (lastValidationResult.type === 'loading') {
|
|
45
51
|
return /*#__PURE__*/React.createElement(Spinner, {
|
|
@@ -112,7 +118,24 @@ export var AqlSearchInput = function AqlSearchInput(_ref2) {
|
|
|
112
118
|
LEGACY_size: "medium",
|
|
113
119
|
testId: "assets-datasource-modal-help",
|
|
114
120
|
spacing: "spacious"
|
|
115
|
-
}))), /*#__PURE__*/React.createElement(
|
|
121
|
+
}))), fg('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(Box, {
|
|
122
|
+
xcss: styles.searchButtonContainer
|
|
123
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
124
|
+
appearance: "primary",
|
|
125
|
+
isLoading: isSearching,
|
|
126
|
+
icon: function icon(iconProps) {
|
|
127
|
+
return /*#__PURE__*/React.createElement(SearchIcon, _extends({}, iconProps, {
|
|
128
|
+
LEGACY_size: "medium",
|
|
129
|
+
spacing: "spacious",
|
|
130
|
+
color: "currentColor"
|
|
131
|
+
}));
|
|
132
|
+
},
|
|
133
|
+
spacing: "compact",
|
|
134
|
+
type: "submit",
|
|
135
|
+
label: formatMessage(searchInputMessages.placeholder),
|
|
136
|
+
isDisabled: lastValidationResult.type !== 'valid',
|
|
137
|
+
testId: "assets-datasource-modal--aql-search-button"
|
|
138
|
+
})) : /*#__PURE__*/React.createElement(LoadingButton, {
|
|
116
139
|
appearance: "primary",
|
|
117
140
|
iconBefore: /*#__PURE__*/React.createElement(SearchIcon, {
|
|
118
141
|
label: formatMessage(searchInputMessages.placeholder),
|
|
@@ -6,15 +6,20 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
7
|
import React, { useEffect } from 'react';
|
|
8
8
|
import { useIntl } from 'react-intl-next';
|
|
9
|
-
import
|
|
9
|
+
import ButtonOld from '@atlaskit/button';
|
|
10
|
+
import Button from '@atlaskit/button/new';
|
|
10
11
|
import EmptyState from '@atlaskit/empty-state';
|
|
11
12
|
import { AuthError, auth as outboundAuth } from '@atlaskit/outbound-auth-flow-client';
|
|
12
|
-
import {
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
+
import { Anchor, Box } from '@atlaskit/primitives/compiled';
|
|
13
15
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
14
16
|
import useErrorLogger from '../../../hooks/useErrorLogger';
|
|
15
17
|
import { loadingErrorMessages } from './messages';
|
|
16
18
|
import { ProviderAuthRequiredSVG } from './provider-auth-required-svg';
|
|
17
19
|
var buttonStyles = null;
|
|
20
|
+
var styles = {
|
|
21
|
+
buttonContainer: "_19pkpxbi"
|
|
22
|
+
};
|
|
18
23
|
var learnMoreAboutSmartLinksUrl = 'https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-Links-from-Jira-and-other-products';
|
|
19
24
|
export var ProviderAuthRequired = function ProviderAuthRequired(_ref) {
|
|
20
25
|
var _ref$auth = _ref.auth,
|
|
@@ -85,7 +90,12 @@ export var ProviderAuthRequired = function ProviderAuthRequired(_ref) {
|
|
|
85
90
|
}, formatMessage(loadingErrorMessages.learnMoreAboutSmartLinks)));
|
|
86
91
|
};
|
|
87
92
|
var renderAuthConnectButton = function renderAuthConnectButton() {
|
|
88
|
-
return /*#__PURE__*/React.createElement(
|
|
93
|
+
return fg('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(Box, {
|
|
94
|
+
xcss: styles.buttonContainer
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
96
|
+
onClick: onAuthRequest,
|
|
97
|
+
appearance: "primary"
|
|
98
|
+
}, formatMessage(loadingErrorMessages.authConnectButtonText))) : /*#__PURE__*/React.createElement(ButtonOld, {
|
|
89
99
|
onClick: onAuthRequest,
|
|
90
100
|
appearance: "primary",
|
|
91
101
|
className: ax(["_19pkpxbi"])
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import "./index.compiled.css";
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
6
|
import { useIntl } from 'react-intl-next';
|
|
6
7
|
import { LoadingButton } from '@atlaskit/button';
|
|
8
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
7
9
|
import SearchIcon from '@atlaskit/icon/core/migration/search--editor-search';
|
|
8
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
9
12
|
import Textfield from '@atlaskit/textfield';
|
|
10
13
|
import { useDatasourceAnalyticsEvents } from '../../../../analytics';
|
|
11
14
|
import { basicSearchInputMessages } from './messages';
|
|
12
15
|
var searchButtonStyles = null;
|
|
16
|
+
var styles = {
|
|
17
|
+
searchButtonContainer: "_2hwx12x7"
|
|
18
|
+
};
|
|
13
19
|
var formStyles = null;
|
|
14
20
|
var formWithMaxWidthStylesOld = null;
|
|
15
21
|
var formWithMaxWidthStyles = null;
|
|
@@ -39,7 +45,25 @@ export var BasicSearchInput = function BasicSearchInput(_ref) {
|
|
|
39
45
|
onSubmit: handleFormSubmit,
|
|
40
46
|
className: ax([fullWidth ? "_16jlkb7n _1o9zkb7n _i0dlf1ug" : fg('platform-linking-visual-refresh-sllv') ? "_16jlkb7n _1o9zkb7n _i0dlf1ug _p12f1mjv" : "_16jlkb7n _1o9zkb7n _i0dlf1ug _p12fr0r7"])
|
|
41
47
|
}, /*#__PURE__*/React.createElement(Textfield, {
|
|
42
|
-
elemAfterInput: /*#__PURE__*/React.createElement(
|
|
48
|
+
elemAfterInput: fg('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(Box, {
|
|
49
|
+
xcss: styles.searchButtonContainer
|
|
50
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
51
|
+
appearance: "primary",
|
|
52
|
+
isLoading: isSearching,
|
|
53
|
+
icon: function icon(iconProps) {
|
|
54
|
+
return /*#__PURE__*/React.createElement(SearchIcon, _extends({}, iconProps, {
|
|
55
|
+
LEGACY_size: "medium",
|
|
56
|
+
spacing: "spacious",
|
|
57
|
+
color: "currentColor"
|
|
58
|
+
}));
|
|
59
|
+
},
|
|
60
|
+
spacing: "compact",
|
|
61
|
+
type: "submit",
|
|
62
|
+
label: formatMessage(fg('confluence-issue-terminology-refresh') ? basicSearchInputMessages.basicTextSearchLabelIssueTermRefresh : basicSearchInputMessages.basicTextSearchLabel),
|
|
63
|
+
isDisabled: isDisabled,
|
|
64
|
+
testId: "".concat(testId, "--basic-search-button"),
|
|
65
|
+
onClick: handleSearchWithAnalytics
|
|
66
|
+
})) : /*#__PURE__*/React.createElement(LoadingButton, {
|
|
43
67
|
appearance: "primary",
|
|
44
68
|
iconBefore: /*#__PURE__*/React.createElement(SearchIcon, {
|
|
45
69
|
label: formatMessage(fg('confluence-issue-terminology-refresh') ? basicSearchInputMessages.basicTextSearchLabelIssueTermRefresh : basicSearchInputMessages.basicTextSearchLabel),
|
|
@@ -176,7 +176,19 @@ export var TableFooter = function TableFooter(_ref5) {
|
|
|
176
176
|
"data-testid": "sync-text"
|
|
177
177
|
}, isLoading ? /*#__PURE__*/React.createElement(FormattedMessage, footerMessages.loadingText) : /*#__PURE__*/React.createElement(SyncInfo, {
|
|
178
178
|
lastSyncTime: lastSyncTime
|
|
179
|
-
})), /*#__PURE__*/React.createElement(
|
|
179
|
+
})), fg('replace-legacy-button-in-sllv') ? /*#__PURE__*/React.createElement(IconButton, {
|
|
180
|
+
onClick: onRefresh,
|
|
181
|
+
appearance: "subtle",
|
|
182
|
+
icon: function icon(iconProps) {
|
|
183
|
+
return /*#__PURE__*/React.createElement(RefreshIcon, _extends({}, iconProps, {
|
|
184
|
+
color: "currentColor",
|
|
185
|
+
spacing: "spacious"
|
|
186
|
+
}));
|
|
187
|
+
},
|
|
188
|
+
label: intl.formatMessage(footerMessages.refreshLabel),
|
|
189
|
+
isDisabled: isLoading,
|
|
190
|
+
testId: "refresh-button"
|
|
191
|
+
}) : /*#__PURE__*/React.createElement(Button, {
|
|
180
192
|
onClick: onRefresh,
|
|
181
193
|
appearance: "subtle",
|
|
182
194
|
iconBefore: /*#__PURE__*/React.createElement(RefreshIcon, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.1",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
41
41
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
42
42
|
"@atlaskit/atlassian-context": "^0.2.0",
|
|
43
|
-
"@atlaskit/avatar": "^25.
|
|
43
|
+
"@atlaskit/avatar": "^25.1.0",
|
|
44
44
|
"@atlaskit/avatar-group": "^12.0.0",
|
|
45
45
|
"@atlaskit/badge": "^18.1.0",
|
|
46
46
|
"@atlaskit/button": "^23.0.0",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"@atlaskit/jql-editor-autocomplete-rest": "^3.0.0",
|
|
63
63
|
"@atlaskit/layering": "^2.1.0",
|
|
64
64
|
"@atlaskit/link": "^3.1.0",
|
|
65
|
-
"@atlaskit/link-client-extension": "^
|
|
66
|
-
"@atlaskit/linking-common": "^
|
|
65
|
+
"@atlaskit/link-client-extension": "^5.0.0",
|
|
66
|
+
"@atlaskit/linking-common": "^9.0.0",
|
|
67
67
|
"@atlaskit/linking-types": "^9.10.0",
|
|
68
68
|
"@atlaskit/logo": "^18.0.0",
|
|
69
69
|
"@atlaskit/lozenge": "^12.2.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@atlaskit/primitives": "^14.7.0",
|
|
79
79
|
"@atlaskit/react-select": "^2.4.0",
|
|
80
80
|
"@atlaskit/select": "^20.4.0",
|
|
81
|
-
"@atlaskit/smart-card": "^
|
|
81
|
+
"@atlaskit/smart-card": "^38.0.0",
|
|
82
82
|
"@atlaskit/smart-user-picker": "^8.0.0",
|
|
83
83
|
"@atlaskit/spinner": "^18.0.0",
|
|
84
84
|
"@atlaskit/tag": "^14.0.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"@af/integration-testing": "workspace:^",
|
|
108
108
|
"@af/visual-regression": "workspace:^",
|
|
109
109
|
"@atlaskit/json-ld-types": "^1.2.0",
|
|
110
|
-
"@atlaskit/link-provider": "^
|
|
110
|
+
"@atlaskit/link-provider": "^3.0.0",
|
|
111
111
|
"@atlaskit/link-test-helpers": "^8.0.0",
|
|
112
112
|
"@atlaskit/ssr": "workspace:^",
|
|
113
113
|
"@atlaskit/visual-regression": "workspace:^",
|
|
@@ -188,6 +188,9 @@
|
|
|
188
188
|
},
|
|
189
189
|
"platform-linking-visual-refresh-sllv": {
|
|
190
190
|
"type": "boolean"
|
|
191
|
+
},
|
|
192
|
+
"replace-legacy-button-in-sllv": {
|
|
193
|
+
"type": "boolean"
|
|
191
194
|
}
|
|
192
195
|
}
|
|
193
196
|
}
|