@atlaskit/link-picker 3.7.0 → 3.8.0
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 +8 -0
- package/compass.yml +5 -5
- package/dist/cjs/ui/link-picker/form-footer/index.js +3 -18
- package/dist/cjs/ui/link-picker/form-footer/link-picker-submit-button/index.js +1 -4
- package/dist/cjs/ui/link-picker/search-results/link-search-error/index.js +2 -11
- package/dist/cjs/ui/main.js +1 -1
- package/dist/es2019/ui/link-picker/form-footer/index.js +4 -19
- package/dist/es2019/ui/link-picker/form-footer/link-picker-submit-button/index.js +1 -4
- package/dist/es2019/ui/link-picker/search-results/link-search-error/index.js +3 -12
- package/dist/es2019/ui/main.js +1 -1
- package/dist/esm/ui/link-picker/form-footer/index.js +4 -19
- package/dist/esm/ui/link-picker/form-footer/link-picker-submit-button/index.js +1 -4
- package/dist/esm/ui/link-picker/search-results/link-search-error/index.js +3 -12
- package/dist/esm/ui/main.js +1 -1
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 3.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#187677](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/187677)
|
|
8
|
+
[`0457dab862cc6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0457dab862cc6) -
|
|
9
|
+
NAVX-1132 cleaning up platform link picker remove legacy button fg
|
|
10
|
+
|
|
3
11
|
## 3.7.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/compass.yml
CHANGED
|
@@ -7,7 +7,7 @@ description: >-
|
|
|
7
7
|
and enhancing productivity.
|
|
8
8
|
configVersion: 1
|
|
9
9
|
typeId: CAPABILITY
|
|
10
|
-
ownerId: 'ari:cloud:identity::team/
|
|
10
|
+
ownerId: 'ari:cloud:identity::team/e738fbc3-d778-4660-aa11-5697a458ffa7'
|
|
11
11
|
fields:
|
|
12
12
|
isMonorepoProject: false
|
|
13
13
|
tier: 4
|
|
@@ -18,13 +18,13 @@ links:
|
|
|
18
18
|
url: 'https://atlassian.signalfx.com/#/dashboard/FdExWKXA4AY?groupId=Fcva05QA4AA&configId=FpAl8Y3AwAA&startTime=-31d&endTime=Now'
|
|
19
19
|
- name: ''
|
|
20
20
|
type: PROJECT
|
|
21
|
-
url: 'https://
|
|
21
|
+
url: 'https://hello.jira.atlassian.cloud/jira/software/projects/NAVX/boards/14605'
|
|
22
22
|
- name: ''
|
|
23
23
|
type: CHAT_CHANNEL
|
|
24
|
-
url: 'https://atlassian.enterprise.slack.com/archives/
|
|
24
|
+
url: 'https://atlassian.enterprise.slack.com/archives/C07TNMDEVHC'
|
|
25
25
|
- name: ''
|
|
26
26
|
type: ON_CALL
|
|
27
|
-
url: 'https://
|
|
27
|
+
url: 'https://hello.jira.atlassian.cloud/jira/ops/teams/e738fbc3-d778-4660-aa11-5697a458ffa7/on-call'
|
|
28
28
|
relationships:
|
|
29
29
|
DEPENDS_ON:
|
|
30
30
|
- 'ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/85cec322-aa6f-4e16-800d-8ee284f6195b'
|
|
@@ -45,7 +45,7 @@ customFields:
|
|
|
45
45
|
- 6abcbe4f-1063-4cf7-8b32-58ebd01078da
|
|
46
46
|
- name: Engineering Manager
|
|
47
47
|
type: user
|
|
48
|
-
value: 'ari:cloud:identity::user/712020:
|
|
48
|
+
value: 'ari:cloud:identity::user/712020:3eb290b3-ff87-40f2-a7ef-4ee9d0ae10bd'
|
|
49
49
|
- name: FFP per month
|
|
50
50
|
type: number
|
|
51
51
|
value: null
|
|
@@ -14,11 +14,10 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
14
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
|
-
var _button =
|
|
17
|
+
var _button = require("@atlaskit/button");
|
|
18
18
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
19
19
|
var _add = _interopRequireDefault(require("@atlaskit/icon/core/add"));
|
|
20
20
|
var _add2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/add"));
|
|
21
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
21
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
23
22
|
var _errors = require("../../../common/utils/errors");
|
|
24
23
|
var _linkPickerSubmitButton = require("./link-picker-submit-button");
|
|
@@ -65,7 +64,7 @@ var FormFooter = exports.FormFooter = /*#__PURE__*/(0, _react.memo)(function (_r
|
|
|
65
64
|
return null;
|
|
66
65
|
}
|
|
67
66
|
var createButton = function createButton(pluginAction) {
|
|
68
|
-
return
|
|
67
|
+
return /*#__PURE__*/React.createElement(_new.default, {
|
|
69
68
|
testId: testIds.actionButton,
|
|
70
69
|
onClick: pluginAction.callback,
|
|
71
70
|
appearance: "default",
|
|
@@ -80,22 +79,8 @@ var FormFooter = exports.FormFooter = /*#__PURE__*/(0, _react.memo)(function (_r
|
|
|
80
79
|
},
|
|
81
80
|
isDisabled: isSubmitting,
|
|
82
81
|
"aria-labelledby": isSubmitting ? submitMessageId : undefined
|
|
83
|
-
}, typeof pluginAction.label === 'string' ? pluginAction.label : intl.formatMessage(pluginAction.label)) : /*#__PURE__*/React.createElement(_button.default, {
|
|
84
|
-
testId: testIds.actionButton,
|
|
85
|
-
onClick: pluginAction.callback,
|
|
86
|
-
appearance: "default",
|
|
87
|
-
iconBefore: /*#__PURE__*/React.createElement(_add.default, {
|
|
88
|
-
label: "",
|
|
89
|
-
LEGACY_size: "medium",
|
|
90
|
-
LEGACY_fallbackIcon: _add2.default,
|
|
91
|
-
color: "currentColor",
|
|
92
|
-
size: "small"
|
|
93
|
-
}),
|
|
94
|
-
isDisabled: isSubmitting,
|
|
95
|
-
"aria-labelledby": isSubmitting ? submitMessageId : undefined
|
|
96
82
|
}, typeof pluginAction.label === 'string' ? pluginAction.label : intl.formatMessage(pluginAction.label));
|
|
97
83
|
};
|
|
98
|
-
var ButtonComponent = (0, _platformFeatureFlags.fg)('platform-link-picker-remove-legacy-button') ? _new.default : _button.default;
|
|
99
84
|
return /*#__PURE__*/React.createElement("footer", (0, _extends2.default)({
|
|
100
85
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
101
86
|
className: (0, _runtime.ax)(["_1e0c1txw _1bahesu3 _ca0qpxbi", className])
|
|
@@ -105,7 +90,7 @@ var FormFooter = exports.FormFooter = /*#__PURE__*/(0, _react.memo)(function (_r
|
|
|
105
90
|
testId: testIds.submitStatusA11yIndicator
|
|
106
91
|
}, intl.formatMessage(messages.submittingStatusMessage)), action && /*#__PURE__*/React.createElement("div", {
|
|
107
92
|
className: (0, _runtime.ax)(["_2hwx1wug"])
|
|
108
|
-
}, createButton(action)), /*#__PURE__*/React.createElement(_button.ButtonGroup, null, onCancel && /*#__PURE__*/React.createElement(
|
|
93
|
+
}, createButton(action)), /*#__PURE__*/React.createElement(_button.ButtonGroup, null, onCancel && /*#__PURE__*/React.createElement(_new.default, {
|
|
109
94
|
appearance: "subtle",
|
|
110
95
|
onClick: onCancel,
|
|
111
96
|
testId: testIds.cancelButton,
|
|
@@ -7,9 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.messages = exports.LinkPickerSubmitButton = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
|
-
var _loadingButton = _interopRequireDefault(require("@atlaskit/button/loading-button"));
|
|
11
10
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
12
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
11
|
var _utils = require("./utils");
|
|
14
12
|
var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
15
13
|
saveButton: {
|
|
@@ -37,8 +35,7 @@ var LinkPickerSubmitButton = exports.LinkPickerSubmitButton = function LinkPicke
|
|
|
37
35
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
38
36
|
var insertButtonMsg = isEditing ? messages.saveButton : messages.insertButton;
|
|
39
37
|
var isSubmitDisabled = (0, _utils.checkSubmitDisabled)(isLoading, isSubmitting, error, url, queryState, items);
|
|
40
|
-
|
|
41
|
-
return /*#__PURE__*/_react.default.createElement(ButtonComponent, {
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
42
39
|
type: "submit",
|
|
43
40
|
appearance: "primary",
|
|
44
41
|
testId: testId,
|
|
@@ -9,10 +9,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
11
|
var _atlassianContext = require("@atlaskit/atlassian-context");
|
|
12
|
-
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
13
12
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
14
13
|
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
14
|
var _genericErrorSvg = require("../../../../common/generic-error-svg");
|
|
17
15
|
var _emptyState = require("../../../../common/ui/empty-state");
|
|
18
16
|
var CONTACT_SUPPORT_LINK = exports.CONTACT_SUPPORT_LINK = 'https://support.atlassian.com/contact/';
|
|
@@ -40,20 +38,13 @@ var testIds = exports.testIds = {
|
|
|
40
38
|
var LinkSearchError = exports.LinkSearchError = function LinkSearchError(_ref) {
|
|
41
39
|
var onRetry = _ref.onRetry;
|
|
42
40
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
43
|
-
var ButtonComponent = (0, _platformFeatureFlags.fg)('platform-link-picker-remove-legacy-button') ? _new.default : _button.default;
|
|
44
41
|
return /*#__PURE__*/_react.default.createElement(_emptyState.EmptyState, {
|
|
45
42
|
testId: testIds.searchError,
|
|
46
43
|
header: intl.formatMessage(messages.searchErrorHeader),
|
|
47
44
|
description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, messages.searchErrorDescription, {
|
|
48
45
|
values: {
|
|
49
46
|
a: function a(label) {
|
|
50
|
-
return
|
|
51
|
-
href: (0, _atlassianContext.isFedRamp)() ? CONTACT_SUPPORT_LINK_FEDRAMP : CONTACT_SUPPORT_LINK,
|
|
52
|
-
target: "_blank",
|
|
53
|
-
rel: "noopener noreferrer"
|
|
54
|
-
}, label) : /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
55
|
-
appearance: "link",
|
|
56
|
-
spacing: "none",
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
57
48
|
href: (0, _atlassianContext.isFedRamp)() ? CONTACT_SUPPORT_LINK_FEDRAMP : CONTACT_SUPPORT_LINK,
|
|
58
49
|
target: "_blank",
|
|
59
50
|
rel: "noopener noreferrer"
|
|
@@ -61,7 +52,7 @@ var LinkSearchError = exports.LinkSearchError = function LinkSearchError(_ref) {
|
|
|
61
52
|
}
|
|
62
53
|
}
|
|
63
54
|
})),
|
|
64
|
-
action: onRetry ? /*#__PURE__*/_react.default.createElement(
|
|
55
|
+
action: onRetry ? /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
65
56
|
appearance: "primary",
|
|
66
57
|
onClick: onRetry
|
|
67
58
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, messages.searchErrorAction)) : null,
|
package/dist/cjs/ui/main.js
CHANGED
|
@@ -25,7 +25,7 @@ var testIds = exports.testIds = {
|
|
|
25
25
|
};
|
|
26
26
|
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
27
27
|
packageName: "@atlaskit/link-picker" || '',
|
|
28
|
-
packageVersion: "3.
|
|
28
|
+
packageVersion: "3.7.0" || '',
|
|
29
29
|
componentName: _constants.COMPONENT_NAME,
|
|
30
30
|
source: _constants.COMPONENT_NAME
|
|
31
31
|
};
|
|
@@ -5,11 +5,10 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { memo } from 'react';
|
|
7
7
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import { ButtonGroup } from '@atlaskit/button';
|
|
9
|
+
import Button from '@atlaskit/button/new';
|
|
10
10
|
import EditorAddIcon from '@atlaskit/icon/core/add';
|
|
11
11
|
import EditorAddIconLegacy from '@atlaskit/icon/glyph/editor/add';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
14
13
|
import { UnauthenticatedError } from '../../../common/utils/errors';
|
|
15
14
|
import { LinkPickerSubmitButton } from './link-picker-submit-button';
|
|
@@ -53,7 +52,7 @@ export const FormFooter = /*#__PURE__*/memo(({
|
|
|
53
52
|
if (error && error instanceof UnauthenticatedError) {
|
|
54
53
|
return null;
|
|
55
54
|
}
|
|
56
|
-
const createButton = pluginAction =>
|
|
55
|
+
const createButton = pluginAction => /*#__PURE__*/React.createElement(Button, {
|
|
57
56
|
testId: testIds.actionButton,
|
|
58
57
|
onClick: pluginAction.callback,
|
|
59
58
|
appearance: "default",
|
|
@@ -66,21 +65,7 @@ export const FormFooter = /*#__PURE__*/memo(({
|
|
|
66
65
|
}),
|
|
67
66
|
isDisabled: isSubmitting,
|
|
68
67
|
"aria-labelledby": isSubmitting ? submitMessageId : undefined
|
|
69
|
-
}, typeof pluginAction.label === 'string' ? pluginAction.label : intl.formatMessage(pluginAction.label)) : /*#__PURE__*/React.createElement(Button, {
|
|
70
|
-
testId: testIds.actionButton,
|
|
71
|
-
onClick: pluginAction.callback,
|
|
72
|
-
appearance: "default",
|
|
73
|
-
iconBefore: /*#__PURE__*/React.createElement(EditorAddIcon, {
|
|
74
|
-
label: "",
|
|
75
|
-
LEGACY_size: "medium",
|
|
76
|
-
LEGACY_fallbackIcon: EditorAddIconLegacy,
|
|
77
|
-
color: "currentColor",
|
|
78
|
-
size: "small"
|
|
79
|
-
}),
|
|
80
|
-
isDisabled: isSubmitting,
|
|
81
|
-
"aria-labelledby": isSubmitting ? submitMessageId : undefined
|
|
82
68
|
}, typeof pluginAction.label === 'string' ? pluginAction.label : intl.formatMessage(pluginAction.label));
|
|
83
|
-
const ButtonComponent = fg('platform-link-picker-remove-legacy-button') ? NewButton : Button;
|
|
84
69
|
return /*#__PURE__*/React.createElement("footer", _extends({
|
|
85
70
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
86
71
|
className: ax(["_1e0c1txw _1bahesu3 _ca0qpxbi", className])
|
|
@@ -90,7 +75,7 @@ export const FormFooter = /*#__PURE__*/memo(({
|
|
|
90
75
|
testId: testIds.submitStatusA11yIndicator
|
|
91
76
|
}, intl.formatMessage(messages.submittingStatusMessage)), action && /*#__PURE__*/React.createElement("div", {
|
|
92
77
|
className: ax(["_2hwx1wug"])
|
|
93
|
-
}, createButton(action)), /*#__PURE__*/React.createElement(ButtonGroup, null, onCancel && /*#__PURE__*/React.createElement(
|
|
78
|
+
}, createButton(action)), /*#__PURE__*/React.createElement(ButtonGroup, null, onCancel && /*#__PURE__*/React.createElement(Button, {
|
|
94
79
|
appearance: "subtle",
|
|
95
80
|
onClick: onCancel,
|
|
96
81
|
testId: testIds.cancelButton,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
3
|
-
import LoadingButton from '@atlaskit/button/loading-button';
|
|
4
3
|
import Button from '@atlaskit/button/new';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
4
|
import { checkSubmitDisabled } from './utils';
|
|
7
5
|
export const messages = defineMessages({
|
|
8
6
|
saveButton: {
|
|
@@ -31,8 +29,7 @@ export const LinkPickerSubmitButton = ({
|
|
|
31
29
|
const intl = useIntl();
|
|
32
30
|
const insertButtonMsg = isEditing ? messages.saveButton : messages.insertButton;
|
|
33
31
|
const isSubmitDisabled = checkSubmitDisabled(isLoading, isSubmitting, error, url, queryState, items);
|
|
34
|
-
|
|
35
|
-
return /*#__PURE__*/React.createElement(ButtonComponent, {
|
|
32
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
36
33
|
type: "submit",
|
|
37
34
|
appearance: "primary",
|
|
38
35
|
testId: testId,
|
|
@@ -2,10 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
4
|
import { isFedRamp } from '@atlaskit/atlassian-context';
|
|
5
|
-
import Button from '@atlaskit/button';
|
|
6
|
-
import NewButton from '@atlaskit/button/new';
|
|
5
|
+
import Button from '@atlaskit/button/new';
|
|
7
6
|
import Link from '@atlaskit/link';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
7
|
import { GenericErrorSVG } from '../../../../common/generic-error-svg';
|
|
10
8
|
import { EmptyState } from '../../../../common/ui/empty-state';
|
|
11
9
|
export const CONTACT_SUPPORT_LINK = 'https://support.atlassian.com/contact/';
|
|
@@ -34,26 +32,19 @@ export const LinkSearchError = ({
|
|
|
34
32
|
onRetry
|
|
35
33
|
}) => {
|
|
36
34
|
const intl = useIntl();
|
|
37
|
-
const ButtonComponent = fg('platform-link-picker-remove-legacy-button') ? NewButton : Button;
|
|
38
35
|
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
39
36
|
testId: testIds.searchError,
|
|
40
37
|
header: intl.formatMessage(messages.searchErrorHeader),
|
|
41
38
|
description: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.searchErrorDescription, {
|
|
42
39
|
values: {
|
|
43
|
-
a: label =>
|
|
44
|
-
href: isFedRamp() ? CONTACT_SUPPORT_LINK_FEDRAMP : CONTACT_SUPPORT_LINK,
|
|
45
|
-
target: "_blank",
|
|
46
|
-
rel: "noopener noreferrer"
|
|
47
|
-
}, label) : /*#__PURE__*/React.createElement(Button, {
|
|
48
|
-
appearance: "link",
|
|
49
|
-
spacing: "none",
|
|
40
|
+
a: label => /*#__PURE__*/React.createElement(Link, {
|
|
50
41
|
href: isFedRamp() ? CONTACT_SUPPORT_LINK_FEDRAMP : CONTACT_SUPPORT_LINK,
|
|
51
42
|
target: "_blank",
|
|
52
43
|
rel: "noopener noreferrer"
|
|
53
44
|
}, label)
|
|
54
45
|
}
|
|
55
46
|
})),
|
|
56
|
-
action: onRetry ? /*#__PURE__*/React.createElement(
|
|
47
|
+
action: onRetry ? /*#__PURE__*/React.createElement(Button, {
|
|
57
48
|
appearance: "primary",
|
|
58
49
|
onClick: onRetry
|
|
59
50
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.searchErrorAction)) : null,
|
package/dist/es2019/ui/main.js
CHANGED
|
@@ -7,11 +7,10 @@ import * as React from 'react';
|
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import { memo } from 'react';
|
|
9
9
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import { ButtonGroup } from '@atlaskit/button';
|
|
11
|
+
import Button from '@atlaskit/button/new';
|
|
12
12
|
import EditorAddIcon from '@atlaskit/icon/core/add';
|
|
13
13
|
import EditorAddIconLegacy from '@atlaskit/icon/glyph/editor/add';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
14
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
16
15
|
import { UnauthenticatedError } from '../../../common/utils/errors';
|
|
17
16
|
import { LinkPickerSubmitButton } from './link-picker-submit-button';
|
|
@@ -56,7 +55,7 @@ export var FormFooter = /*#__PURE__*/memo(function (_ref) {
|
|
|
56
55
|
return null;
|
|
57
56
|
}
|
|
58
57
|
var createButton = function createButton(pluginAction) {
|
|
59
|
-
return
|
|
58
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
60
59
|
testId: testIds.actionButton,
|
|
61
60
|
onClick: pluginAction.callback,
|
|
62
61
|
appearance: "default",
|
|
@@ -71,22 +70,8 @@ export var FormFooter = /*#__PURE__*/memo(function (_ref) {
|
|
|
71
70
|
},
|
|
72
71
|
isDisabled: isSubmitting,
|
|
73
72
|
"aria-labelledby": isSubmitting ? submitMessageId : undefined
|
|
74
|
-
}, typeof pluginAction.label === 'string' ? pluginAction.label : intl.formatMessage(pluginAction.label)) : /*#__PURE__*/React.createElement(Button, {
|
|
75
|
-
testId: testIds.actionButton,
|
|
76
|
-
onClick: pluginAction.callback,
|
|
77
|
-
appearance: "default",
|
|
78
|
-
iconBefore: /*#__PURE__*/React.createElement(EditorAddIcon, {
|
|
79
|
-
label: "",
|
|
80
|
-
LEGACY_size: "medium",
|
|
81
|
-
LEGACY_fallbackIcon: EditorAddIconLegacy,
|
|
82
|
-
color: "currentColor",
|
|
83
|
-
size: "small"
|
|
84
|
-
}),
|
|
85
|
-
isDisabled: isSubmitting,
|
|
86
|
-
"aria-labelledby": isSubmitting ? submitMessageId : undefined
|
|
87
73
|
}, typeof pluginAction.label === 'string' ? pluginAction.label : intl.formatMessage(pluginAction.label));
|
|
88
74
|
};
|
|
89
|
-
var ButtonComponent = fg('platform-link-picker-remove-legacy-button') ? NewButton : Button;
|
|
90
75
|
return /*#__PURE__*/React.createElement("footer", _extends({
|
|
91
76
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
92
77
|
className: ax(["_1e0c1txw _1bahesu3 _ca0qpxbi", className])
|
|
@@ -96,7 +81,7 @@ export var FormFooter = /*#__PURE__*/memo(function (_ref) {
|
|
|
96
81
|
testId: testIds.submitStatusA11yIndicator
|
|
97
82
|
}, intl.formatMessage(messages.submittingStatusMessage)), action && /*#__PURE__*/React.createElement("div", {
|
|
98
83
|
className: ax(["_2hwx1wug"])
|
|
99
|
-
}, createButton(action)), /*#__PURE__*/React.createElement(ButtonGroup, null, onCancel && /*#__PURE__*/React.createElement(
|
|
84
|
+
}, createButton(action)), /*#__PURE__*/React.createElement(ButtonGroup, null, onCancel && /*#__PURE__*/React.createElement(Button, {
|
|
100
85
|
appearance: "subtle",
|
|
101
86
|
onClick: onCancel,
|
|
102
87
|
testId: testIds.cancelButton,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
3
|
-
import LoadingButton from '@atlaskit/button/loading-button';
|
|
4
3
|
import Button from '@atlaskit/button/new';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
4
|
import { checkSubmitDisabled } from './utils';
|
|
7
5
|
export var messages = defineMessages({
|
|
8
6
|
saveButton: {
|
|
@@ -30,8 +28,7 @@ export var LinkPickerSubmitButton = function LinkPickerSubmitButton(_ref) {
|
|
|
30
28
|
var intl = useIntl();
|
|
31
29
|
var insertButtonMsg = isEditing ? messages.saveButton : messages.insertButton;
|
|
32
30
|
var isSubmitDisabled = checkSubmitDisabled(isLoading, isSubmitting, error, url, queryState, items);
|
|
33
|
-
|
|
34
|
-
return /*#__PURE__*/React.createElement(ButtonComponent, {
|
|
31
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
35
32
|
type: "submit",
|
|
36
33
|
appearance: "primary",
|
|
37
34
|
testId: testId,
|
|
@@ -2,10 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
4
|
import { isFedRamp } from '@atlaskit/atlassian-context';
|
|
5
|
-
import Button from '@atlaskit/button';
|
|
6
|
-
import NewButton from '@atlaskit/button/new';
|
|
5
|
+
import Button from '@atlaskit/button/new';
|
|
7
6
|
import Link from '@atlaskit/link';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
7
|
import { GenericErrorSVG } from '../../../../common/generic-error-svg';
|
|
10
8
|
import { EmptyState } from '../../../../common/ui/empty-state';
|
|
11
9
|
export var CONTACT_SUPPORT_LINK = 'https://support.atlassian.com/contact/';
|
|
@@ -33,20 +31,13 @@ export var testIds = {
|
|
|
33
31
|
export var LinkSearchError = function LinkSearchError(_ref) {
|
|
34
32
|
var onRetry = _ref.onRetry;
|
|
35
33
|
var intl = useIntl();
|
|
36
|
-
var ButtonComponent = fg('platform-link-picker-remove-legacy-button') ? NewButton : Button;
|
|
37
34
|
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
38
35
|
testId: testIds.searchError,
|
|
39
36
|
header: intl.formatMessage(messages.searchErrorHeader),
|
|
40
37
|
description: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.searchErrorDescription, {
|
|
41
38
|
values: {
|
|
42
39
|
a: function a(label) {
|
|
43
|
-
return
|
|
44
|
-
href: isFedRamp() ? CONTACT_SUPPORT_LINK_FEDRAMP : CONTACT_SUPPORT_LINK,
|
|
45
|
-
target: "_blank",
|
|
46
|
-
rel: "noopener noreferrer"
|
|
47
|
-
}, label) : /*#__PURE__*/React.createElement(Button, {
|
|
48
|
-
appearance: "link",
|
|
49
|
-
spacing: "none",
|
|
40
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
50
41
|
href: isFedRamp() ? CONTACT_SUPPORT_LINK_FEDRAMP : CONTACT_SUPPORT_LINK,
|
|
51
42
|
target: "_blank",
|
|
52
43
|
rel: "noopener noreferrer"
|
|
@@ -54,7 +45,7 @@ export var LinkSearchError = function LinkSearchError(_ref) {
|
|
|
54
45
|
}
|
|
55
46
|
}
|
|
56
47
|
})),
|
|
57
|
-
action: onRetry ? /*#__PURE__*/React.createElement(
|
|
48
|
+
action: onRetry ? /*#__PURE__*/React.createElement(Button, {
|
|
58
49
|
appearance: "primary",
|
|
59
50
|
onClick: onRetry
|
|
60
51
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.searchErrorAction)) : null,
|
package/dist/esm/ui/main.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -48,9 +48,6 @@
|
|
|
48
48
|
"platform_support_live_doc_icons_in_link_picker": {
|
|
49
49
|
"type": "boolean"
|
|
50
50
|
},
|
|
51
|
-
"platform-link-picker-remove-legacy-button": {
|
|
52
|
-
"type": "boolean"
|
|
53
|
-
},
|
|
54
51
|
"jsc_inline_editing_field_refactor": {
|
|
55
52
|
"type": "boolean"
|
|
56
53
|
},
|
|
@@ -72,20 +69,20 @@
|
|
|
72
69
|
"@atlaskit/form": "^12.0.0",
|
|
73
70
|
"@atlaskit/frontend-utilities": "^3.1.0",
|
|
74
71
|
"@atlaskit/heading": "^5.2.0",
|
|
75
|
-
"@atlaskit/icon": "^27.
|
|
72
|
+
"@atlaskit/icon": "^27.5.0",
|
|
76
73
|
"@atlaskit/intl-messages-provider": "^2.0.0",
|
|
77
74
|
"@atlaskit/link": "^3.2.0",
|
|
78
75
|
"@atlaskit/link-provider": "^3.4.0",
|
|
79
|
-
"@atlaskit/linking-common": "^9.
|
|
80
|
-
"@atlaskit/onboarding": "^14.
|
|
76
|
+
"@atlaskit/linking-common": "^9.2.0",
|
|
77
|
+
"@atlaskit/onboarding": "^14.3.0",
|
|
81
78
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
82
79
|
"@atlaskit/primitives": "^14.10.0",
|
|
83
|
-
"@atlaskit/smart-card": "^40.
|
|
80
|
+
"@atlaskit/smart-card": "^40.4.0",
|
|
84
81
|
"@atlaskit/spinner": "^18.0.0",
|
|
85
82
|
"@atlaskit/tabs": "^18.1.0",
|
|
86
83
|
"@atlaskit/textfield": "^8.0.0",
|
|
87
84
|
"@atlaskit/theme": "^19.0.0",
|
|
88
|
-
"@atlaskit/tokens": "^5.
|
|
85
|
+
"@atlaskit/tokens": "^5.6.0",
|
|
89
86
|
"@atlaskit/tooltip": "^20.3.0",
|
|
90
87
|
"@atlaskit/ufo": "^0.4.0",
|
|
91
88
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -106,7 +103,7 @@
|
|
|
106
103
|
"@af/analytics-codegen": "workspace:^",
|
|
107
104
|
"@af/integration-testing": "workspace:^",
|
|
108
105
|
"@af/visual-regression": "workspace:^",
|
|
109
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
106
|
+
"@atlaskit/dropdown-menu": "^16.2.0",
|
|
110
107
|
"@atlaskit/link-test-helpers": "^8.2.0",
|
|
111
108
|
"@atlaskit/visual-regression": "workspace:^",
|
|
112
109
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|