@atlaskit/link-picker 1.32.0 → 1.33.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 +12 -0
- package/dist/cjs/ui/index.js +1 -1
- package/dist/cjs/ui/link-picker/form-footer/index.js +1 -1
- package/dist/cjs/ui/link-picker/index.js +5 -2
- package/dist/es2019/ui/index.js +1 -1
- package/dist/es2019/ui/link-picker/form-footer/index.js +1 -1
- package/dist/es2019/ui/link-picker/index.js +5 -2
- package/dist/esm/ui/index.js +1 -1
- package/dist/esm/ui/link-picker/form-footer/index.js +1 -1
- package/dist/esm/ui/link-picker/index.js +5 -2
- package/dist/types/ui/link-picker/index.d.ts +5 -2
- package/dist/types-ts4.5/ui/link-picker/index.d.ts +5 -2
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 1.33.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#69577](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/69577) [`fcd935281ee6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fcd935281ee6) - Updates onCancel prop to be optional. When not provided, cancel button is not displayed.
|
|
8
|
+
|
|
9
|
+
## 1.32.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#66404](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66404) [`61ac6afc1d89`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/61ac6afc1d89) - EDM-9025 Add onSubmitCapture behind feature flag
|
|
14
|
+
|
|
3
15
|
## 1.32.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var testIds = exports.testIds = {
|
|
|
26
26
|
};
|
|
27
27
|
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
28
28
|
packageName: "@atlaskit/link-picker" || '',
|
|
29
|
-
packageVersion: "1.
|
|
29
|
+
packageVersion: "1.33.0" || '',
|
|
30
30
|
componentName: _constants.COMPONENT_NAME,
|
|
31
31
|
source: _constants.COMPONENT_NAME
|
|
32
32
|
};
|
|
@@ -101,7 +101,7 @@ var FormFooter = exports.FormFooter = /*#__PURE__*/(0, _react.memo)(function (_r
|
|
|
101
101
|
css: _styled.formFooterActionStyles
|
|
102
102
|
}, createFeatureDiscovery ? (0, _react2.jsx)(_featureDiscovery.default, {
|
|
103
103
|
testId: testIds.actionButtonDiscovery
|
|
104
|
-
}, createButton(action)) : createButton(action)), (0, _react2.jsx)(_button.ButtonGroup, null, (0, _react2.jsx)(_button.default, {
|
|
104
|
+
}, createButton(action)) : createButton(action)), (0, _react2.jsx)(_button.ButtonGroup, null, onCancel && (0, _react2.jsx)(_button.default, {
|
|
105
105
|
appearance: "subtle",
|
|
106
106
|
onClick: onCancel,
|
|
107
107
|
testId: testIds.cancelButton,
|
|
@@ -305,8 +305,11 @@ var LinkPicker = exports.LinkPicker = (0, _analytics.withLinkPickerAnalyticsCont
|
|
|
305
305
|
var screenReaderText = (0, _userAgent.browser)().safari && (0, _utils.getScreenReaderText)(items !== null && items !== void 0 ? items : [], selectedIndex, intl);
|
|
306
306
|
return (0, _react2.jsx)("form", {
|
|
307
307
|
"data-testid": testIds.linkPicker,
|
|
308
|
-
css: _styled.rootContainerStyles
|
|
309
|
-
onSubmit
|
|
308
|
+
css: _styled.rootContainerStyles
|
|
309
|
+
// Use onSubmitCapture instead of onSubmit when FF enabled so that any possible parent form isn't submitted
|
|
310
|
+
,
|
|
311
|
+
onSubmit: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.use-onsubmitcapture') ? undefined : handleSubmit,
|
|
312
|
+
onSubmitCapture: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-picker.use-onsubmitcapture') ? handleSubmit : undefined
|
|
310
313
|
}, (0, _react2.jsx)(_trackMount.TrackMount, null), screenReaderText && (0, _react2.jsx)(_announcer.Announcer, {
|
|
311
314
|
ariaLive: "assertive",
|
|
312
315
|
text: screenReaderText,
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -84,7 +84,7 @@ export const FormFooter = /*#__PURE__*/memo(({
|
|
|
84
84
|
css: formFooterActionStyles
|
|
85
85
|
}, createFeatureDiscovery ? jsx(FeatureDiscovery, {
|
|
86
86
|
testId: testIds.actionButtonDiscovery
|
|
87
|
-
}, createButton(action)) : createButton(action)), jsx(ButtonGroup, null, jsx(Button, {
|
|
87
|
+
}, createButton(action)) : createButton(action)), jsx(ButtonGroup, null, onCancel && jsx(Button, {
|
|
88
88
|
appearance: "subtle",
|
|
89
89
|
onClick: onCancel,
|
|
90
90
|
testId: testIds.cancelButton,
|
|
@@ -305,8 +305,11 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
|
|
|
305
305
|
const screenReaderText = browser().safari && getScreenReaderText(items !== null && items !== void 0 ? items : [], selectedIndex, intl);
|
|
306
306
|
return jsx("form", {
|
|
307
307
|
"data-testid": testIds.linkPicker,
|
|
308
|
-
css: rootContainerStyles
|
|
309
|
-
onSubmit
|
|
308
|
+
css: rootContainerStyles
|
|
309
|
+
// Use onSubmitCapture instead of onSubmit when FF enabled so that any possible parent form isn't submitted
|
|
310
|
+
,
|
|
311
|
+
onSubmit: getBooleanFF('platform.linking-platform.link-picker.use-onsubmitcapture') ? undefined : handleSubmit,
|
|
312
|
+
onSubmitCapture: getBooleanFF('platform.linking-platform.link-picker.use-onsubmitcapture') ? handleSubmit : undefined
|
|
310
313
|
}, jsx(TrackMount, null), screenReaderText && jsx(Announcer, {
|
|
311
314
|
ariaLive: "assertive",
|
|
312
315
|
text: screenReaderText,
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -91,7 +91,7 @@ export var FormFooter = /*#__PURE__*/memo(function (_ref) {
|
|
|
91
91
|
css: formFooterActionStyles
|
|
92
92
|
}, createFeatureDiscovery ? jsx(FeatureDiscovery, {
|
|
93
93
|
testId: testIds.actionButtonDiscovery
|
|
94
|
-
}, createButton(action)) : createButton(action)), jsx(ButtonGroup, null, jsx(Button, {
|
|
94
|
+
}, createButton(action)) : createButton(action)), jsx(ButtonGroup, null, onCancel && jsx(Button, {
|
|
95
95
|
appearance: "subtle",
|
|
96
96
|
onClick: onCancel,
|
|
97
97
|
testId: testIds.cancelButton,
|
|
@@ -299,8 +299,11 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
|
|
|
299
299
|
var screenReaderText = browser().safari && getScreenReaderText(items !== null && items !== void 0 ? items : [], selectedIndex, intl);
|
|
300
300
|
return jsx("form", {
|
|
301
301
|
"data-testid": testIds.linkPicker,
|
|
302
|
-
css: rootContainerStyles
|
|
303
|
-
onSubmit
|
|
302
|
+
css: rootContainerStyles
|
|
303
|
+
// Use onSubmitCapture instead of onSubmit when FF enabled so that any possible parent form isn't submitted
|
|
304
|
+
,
|
|
305
|
+
onSubmit: getBooleanFF('platform.linking-platform.link-picker.use-onsubmitcapture') ? undefined : handleSubmit,
|
|
306
|
+
onSubmitCapture: getBooleanFF('platform.linking-platform.link-picker.use-onsubmitcapture') ? handleSubmit : undefined
|
|
304
307
|
}, jsx(TrackMount, null), screenReaderText && jsx(Announcer, {
|
|
305
308
|
ariaLive: "assertive",
|
|
306
309
|
text: screenReaderText,
|
|
@@ -51,8 +51,11 @@ export interface LinkPickerProps {
|
|
|
51
51
|
* Callback to fire on form submission.
|
|
52
52
|
*/
|
|
53
53
|
onSubmit: (arg: OnSubmitParameter, analytic?: UIAnalyticsEvent | null) => void;
|
|
54
|
-
/**
|
|
55
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Callback to fire when the cancel button is clicked.
|
|
56
|
+
* If not provided, cancel button is not displayed.
|
|
57
|
+
*/
|
|
58
|
+
onCancel?: () => void;
|
|
56
59
|
/** Callback to fire when content is changed inside the link picker e.g. items, when loading, tabs */
|
|
57
60
|
onContentResize?: () => void;
|
|
58
61
|
/** The url of the linked resource for editing. */
|
|
@@ -51,8 +51,11 @@ export interface LinkPickerProps {
|
|
|
51
51
|
* Callback to fire on form submission.
|
|
52
52
|
*/
|
|
53
53
|
onSubmit: (arg: OnSubmitParameter, analytic?: UIAnalyticsEvent | null) => void;
|
|
54
|
-
/**
|
|
55
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Callback to fire when the cancel button is clicked.
|
|
56
|
+
* If not provided, cancel button is not displayed.
|
|
57
|
+
*/
|
|
58
|
+
onCancel?: () => void;
|
|
56
59
|
/** Callback to fire when content is changed inside the link picker e.g. items, when loading, tabs */
|
|
57
60
|
onContentResize?: () => void;
|
|
58
61
|
/** The url of the linked resource for editing. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.0",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"name": "Link Picker"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
22
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
23
23
|
"main": "dist/cjs/index.js",
|
|
24
24
|
"module": "dist/esm/index.js",
|
|
25
25
|
"module:es2019": "dist/es2019/index.js",
|
|
@@ -49,6 +49,9 @@
|
|
|
49
49
|
},
|
|
50
50
|
"platform.linking-platform.link-picker.enable-jira-create": {
|
|
51
51
|
"type": "boolean"
|
|
52
|
+
},
|
|
53
|
+
"platform.linking-platform.link-picker.use-onsubmitcapture": {
|
|
54
|
+
"type": "boolean"
|
|
52
55
|
}
|
|
53
56
|
},
|
|
54
57
|
"scripts": {
|
|
@@ -70,7 +73,7 @@
|
|
|
70
73
|
"@atlaskit/tabs": "^14.0.0",
|
|
71
74
|
"@atlaskit/textfield": "^6.0.0",
|
|
72
75
|
"@atlaskit/theme": "^12.6.0",
|
|
73
|
-
"@atlaskit/tokens": "^1.
|
|
76
|
+
"@atlaskit/tokens": "^1.35.0",
|
|
74
77
|
"@atlaskit/tooltip": "^18.1.0",
|
|
75
78
|
"@atlaskit/ufo": "^0.2.0",
|
|
76
79
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
@@ -90,10 +93,10 @@
|
|
|
90
93
|
"@af/analytics-codegen": "^0.1.0",
|
|
91
94
|
"@af/integration-testing": "*",
|
|
92
95
|
"@af/visual-regression": "*",
|
|
93
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
94
|
-
"@atlaskit/link-provider": "^1.
|
|
96
|
+
"@atlaskit/dropdown-menu": "^12.2.0",
|
|
97
|
+
"@atlaskit/link-provider": "^1.7.0",
|
|
95
98
|
"@atlaskit/link-test-helpers": "^6.2.0",
|
|
96
|
-
"@atlaskit/primitives": "^
|
|
99
|
+
"@atlaskit/primitives": "^2.0.0",
|
|
97
100
|
"@atlaskit/visual-regression": "*",
|
|
98
101
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
99
102
|
"@atlassian/feature-flags-test-utils": "*",
|