@atlaskit/link-datasource 4.18.2 → 4.19.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 +15 -0
- package/dist/cjs/ui/assets-modal/search-container/aql-search-input/index.js +2 -3
- package/dist/cjs/ui/common/modal/datasource-modal/index.js +4 -2
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +4 -2
- package/dist/es2019/ui/assets-modal/search-container/aql-search-input/index.js +2 -3
- package/dist/es2019/ui/common/modal/datasource-modal/index.js +3 -2
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +4 -2
- package/dist/esm/ui/assets-modal/search-container/aql-search-input/index.js +2 -3
- package/dist/esm/ui/common/modal/datasource-modal/index.js +4 -2
- package/dist/esm/ui/jira-issues-modal/modal/index.js +4 -2
- package/dist/types/common/types.d.ts +8 -0
- package/dist/types/ui/common/modal/datasource-modal/index.d.ts +2 -2
- package/dist/types-ts4.5/common/types.d.ts +8 -0
- package/dist/types-ts4.5/ui/common/modal/datasource-modal/index.d.ts +2 -2
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 4.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#195804](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/195804)
|
|
8
|
+
[`3145c64a9e71a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3145c64a9e71a) -
|
|
9
|
+
NAVX-1180 updating datasource modal return focus to specific element if ref is provided
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#195926](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/195926)
|
|
14
|
+
[`3aa517526ff72`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3aa517526ff72) -
|
|
15
|
+
NAVX-1285 cleaning up fix_a11y_issues_inline_edit
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 4.18.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -158,9 +158,8 @@ var AqlSearchInput = exports.AqlSearchInput = function AqlSearchInput(_ref2) {
|
|
|
158
158
|
className: (0, _runtime.ax)(["_2hwx12x7"])
|
|
159
159
|
})),
|
|
160
160
|
placeholder: formatMessage(_messages.searchInputMessages.placeholder),
|
|
161
|
-
testId: testId
|
|
162
|
-
|
|
163
|
-
'aria-label': formatMessage(_messages.searchInputMessages.placeholder)
|
|
161
|
+
testId: testId,
|
|
162
|
+
"aria-label": formatMessage(_messages.searchInputMessages.placeholder)
|
|
164
163
|
})), lastValidationResult.type === 'invalid' && lastValidationResult.error && /*#__PURE__*/React.createElement(_form.ErrorMessage, null, lastValidationResult.error));
|
|
165
164
|
}));
|
|
166
165
|
};
|
|
@@ -22,12 +22,14 @@ var ScreenEvent = function ScreenEvent() {
|
|
|
22
22
|
var DatasourceModal = exports.DatasourceModal = function DatasourceModal(_ref) {
|
|
23
23
|
var testId = _ref.testId,
|
|
24
24
|
onClose = _ref.onClose,
|
|
25
|
-
children = _ref.children
|
|
25
|
+
children = _ref.children,
|
|
26
|
+
_ref$shouldReturnFocu = _ref.shouldReturnFocus,
|
|
27
|
+
shouldReturnFocus = _ref$shouldReturnFocu === void 0 ? false : _ref$shouldReturnFocu;
|
|
26
28
|
return /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
|
|
27
29
|
testId: testId,
|
|
28
30
|
onClose: onClose,
|
|
29
31
|
width: "calc(100% - 80px)",
|
|
30
32
|
shouldScrollInViewport: true,
|
|
31
|
-
shouldReturnFocus: (0, _platformFeatureFlags.fg)('navx-1180-sllv-return-focus-on-escape') ?
|
|
33
|
+
shouldReturnFocus: (0, _platformFeatureFlags.fg)('navx-1180-sllv-return-focus-on-escape') ? shouldReturnFocus : false
|
|
32
34
|
}, /*#__PURE__*/_react.default.createElement(ScreenEvent, null), children);
|
|
33
35
|
};
|
|
@@ -68,7 +68,8 @@ var isValidParameters = function isValidParameters(parameters) {
|
|
|
68
68
|
};
|
|
69
69
|
var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
70
70
|
var onCancel = props.onCancel,
|
|
71
|
-
urlBeingEdited = props.url
|
|
71
|
+
urlBeingEdited = props.url,
|
|
72
|
+
shouldReturnFocus = props.shouldReturnFocus;
|
|
72
73
|
var _useDatasourceContext = (0, _datasourceContext.useDatasourceContext)(),
|
|
73
74
|
visibleColumnCount = _useDatasourceContext.visibleColumnCount,
|
|
74
75
|
visibleColumnKeys = _useDatasourceContext.visibleColumnKeys,
|
|
@@ -368,7 +369,8 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
368
369
|
loaderFn: _fetchMessagesForLocale.fetchMessagesForLocale
|
|
369
370
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, /*#__PURE__*/_react.default.createElement(_datasourceModal.DatasourceModal, {
|
|
370
371
|
testId: "jira-datasource-modal",
|
|
371
|
-
onClose: onCancel
|
|
372
|
+
onClose: onCancel,
|
|
373
|
+
shouldReturnFocus: shouldReturnFocus
|
|
372
374
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, null, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, null, /*#__PURE__*/_react.default.createElement(_siteSelector.SiteSelector, {
|
|
373
375
|
availableSites: availableSites,
|
|
374
376
|
onSiteSelection: onSiteSelection,
|
|
@@ -149,8 +149,7 @@ export const AqlSearchInput = ({
|
|
|
149
149
|
className: ax(["_2hwx12x7"])
|
|
150
150
|
})),
|
|
151
151
|
placeholder: formatMessage(searchInputMessages.placeholder),
|
|
152
|
-
testId: testId
|
|
153
|
-
|
|
154
|
-
'aria-label': formatMessage(searchInputMessages.placeholder)
|
|
152
|
+
testId: testId,
|
|
153
|
+
"aria-label": formatMessage(searchInputMessages.placeholder)
|
|
155
154
|
})), lastValidationResult.type === 'invalid' && lastValidationResult.error && /*#__PURE__*/React.createElement(ErrorMessage, null, lastValidationResult.error))));
|
|
156
155
|
};
|
|
@@ -14,13 +14,14 @@ const ScreenEvent = () => {
|
|
|
14
14
|
export const DatasourceModal = ({
|
|
15
15
|
testId,
|
|
16
16
|
onClose,
|
|
17
|
-
children
|
|
17
|
+
children,
|
|
18
|
+
shouldReturnFocus = false
|
|
18
19
|
}) => {
|
|
19
20
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
20
21
|
testId: testId,
|
|
21
22
|
onClose: onClose,
|
|
22
23
|
width: "calc(100% - 80px)",
|
|
23
24
|
shouldScrollInViewport: true,
|
|
24
|
-
shouldReturnFocus: fg('navx-1180-sllv-return-focus-on-escape') ?
|
|
25
|
+
shouldReturnFocus: fg('navx-1180-sllv-return-focus-on-escape') ? shouldReturnFocus : false
|
|
25
26
|
}, /*#__PURE__*/React.createElement(ScreenEvent, null), children);
|
|
26
27
|
};
|
|
@@ -56,7 +56,8 @@ const isValidParameters = parameters => typeof (parameters === null || parameter
|
|
|
56
56
|
const PlainJiraIssuesConfigModal = props => {
|
|
57
57
|
const {
|
|
58
58
|
onCancel,
|
|
59
|
-
url: urlBeingEdited
|
|
59
|
+
url: urlBeingEdited,
|
|
60
|
+
shouldReturnFocus
|
|
60
61
|
} = props;
|
|
61
62
|
const {
|
|
62
63
|
visibleColumnCount,
|
|
@@ -355,7 +356,8 @@ const PlainJiraIssuesConfigModal = props => {
|
|
|
355
356
|
loaderFn: fetchMessagesForLocale
|
|
356
357
|
}, /*#__PURE__*/React.createElement(ModalTransition, null, /*#__PURE__*/React.createElement(DatasourceModal, {
|
|
357
358
|
testId: "jira-datasource-modal",
|
|
358
|
-
onClose: onCancel
|
|
359
|
+
onClose: onCancel,
|
|
360
|
+
shouldReturnFocus: shouldReturnFocus
|
|
359
361
|
}, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, null, /*#__PURE__*/React.createElement(SiteSelector, {
|
|
360
362
|
availableSites: availableSites,
|
|
361
363
|
onSiteSelection: onSiteSelection,
|
|
@@ -151,9 +151,8 @@ export var AqlSearchInput = function AqlSearchInput(_ref2) {
|
|
|
151
151
|
className: ax(["_2hwx12x7"])
|
|
152
152
|
})),
|
|
153
153
|
placeholder: formatMessage(searchInputMessages.placeholder),
|
|
154
|
-
testId: testId
|
|
155
|
-
|
|
156
|
-
'aria-label': formatMessage(searchInputMessages.placeholder)
|
|
154
|
+
testId: testId,
|
|
155
|
+
"aria-label": formatMessage(searchInputMessages.placeholder)
|
|
157
156
|
})), lastValidationResult.type === 'invalid' && lastValidationResult.error && /*#__PURE__*/React.createElement(ErrorMessage, null, lastValidationResult.error));
|
|
158
157
|
}));
|
|
159
158
|
};
|
|
@@ -13,12 +13,14 @@ var ScreenEvent = function ScreenEvent() {
|
|
|
13
13
|
export var DatasourceModal = function DatasourceModal(_ref) {
|
|
14
14
|
var testId = _ref.testId,
|
|
15
15
|
onClose = _ref.onClose,
|
|
16
|
-
children = _ref.children
|
|
16
|
+
children = _ref.children,
|
|
17
|
+
_ref$shouldReturnFocu = _ref.shouldReturnFocus,
|
|
18
|
+
shouldReturnFocus = _ref$shouldReturnFocu === void 0 ? false : _ref$shouldReturnFocu;
|
|
17
19
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
18
20
|
testId: testId,
|
|
19
21
|
onClose: onClose,
|
|
20
22
|
width: "calc(100% - 80px)",
|
|
21
23
|
shouldScrollInViewport: true,
|
|
22
|
-
shouldReturnFocus: fg('navx-1180-sllv-return-focus-on-escape') ?
|
|
24
|
+
shouldReturnFocus: fg('navx-1180-sllv-return-focus-on-escape') ? shouldReturnFocus : false
|
|
23
25
|
}, /*#__PURE__*/React.createElement(ScreenEvent, null), children);
|
|
24
26
|
};
|
|
@@ -61,7 +61,8 @@ var isValidParameters = function isValidParameters(parameters) {
|
|
|
61
61
|
};
|
|
62
62
|
var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
63
63
|
var onCancel = props.onCancel,
|
|
64
|
-
urlBeingEdited = props.url
|
|
64
|
+
urlBeingEdited = props.url,
|
|
65
|
+
shouldReturnFocus = props.shouldReturnFocus;
|
|
65
66
|
var _useDatasourceContext = useDatasourceContext(),
|
|
66
67
|
visibleColumnCount = _useDatasourceContext.visibleColumnCount,
|
|
67
68
|
visibleColumnKeys = _useDatasourceContext.visibleColumnKeys,
|
|
@@ -361,7 +362,8 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
361
362
|
loaderFn: fetchMessagesForLocale
|
|
362
363
|
}, /*#__PURE__*/React.createElement(ModalTransition, null, /*#__PURE__*/React.createElement(DatasourceModal, {
|
|
363
364
|
testId: "jira-datasource-modal",
|
|
364
|
-
onClose: onCancel
|
|
365
|
+
onClose: onCancel,
|
|
366
|
+
shouldReturnFocus: shouldReturnFocus
|
|
365
367
|
}, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(ModalTitle, null, /*#__PURE__*/React.createElement(SiteSelector, {
|
|
366
368
|
availableSites: availableSites,
|
|
367
369
|
onSiteSelection: onSiteSelection,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
1
2
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
3
|
import { type IssueLikeDataTableViewProps } from '../ui/issue-like-table/types';
|
|
3
4
|
export type JiraSearchMethod = 'basic' | 'jql';
|
|
@@ -7,6 +8,7 @@ export interface Site {
|
|
|
7
8
|
url: string;
|
|
8
9
|
}
|
|
9
10
|
export type DisplayViewModes = 'table' | 'inline';
|
|
11
|
+
type ShouldReturnFocus = boolean | RefObject<HTMLElement>;
|
|
10
12
|
export type OnInsertFunction<ADF> = (adf: ADF, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
11
13
|
export type ConfigModalProps<ADF, Parameters> = {
|
|
12
14
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
@@ -27,4 +29,10 @@ export type ConfigModalProps<ADF, Parameters> = {
|
|
|
27
29
|
viewMode?: DisplayViewModes;
|
|
28
30
|
/** Disable the view mode display dropdown */
|
|
29
31
|
disableDisplayDropdown?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Set the focus to return to the element that had focus before focus lock was activated or pass through a specific ref element
|
|
34
|
+
* Defaults to false, meaning focus remains where it was when the FocusLock was deactivated
|
|
35
|
+
*/
|
|
36
|
+
shouldReturnFocus?: ShouldReturnFocus;
|
|
30
37
|
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'wrappedColumnKeys' | 'columnCustomSizes'>>;
|
|
38
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ModalDialogProps } from '@atlaskit/modal-dialog';
|
|
3
|
-
type DatasourceModalProps = Pick<ModalDialogProps, 'testId' | 'onClose' | 'children'>;
|
|
4
|
-
export declare const DatasourceModal: ({ testId, onClose, children }: DatasourceModalProps) => React.JSX.Element;
|
|
3
|
+
type DatasourceModalProps = Pick<ModalDialogProps, 'testId' | 'onClose' | 'children' | 'shouldReturnFocus'>;
|
|
4
|
+
export declare const DatasourceModal: ({ testId, onClose, children, shouldReturnFocus }: DatasourceModalProps) => React.JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
1
2
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
3
|
import { type IssueLikeDataTableViewProps } from '../ui/issue-like-table/types';
|
|
3
4
|
export type JiraSearchMethod = 'basic' | 'jql';
|
|
@@ -7,6 +8,7 @@ export interface Site {
|
|
|
7
8
|
url: string;
|
|
8
9
|
}
|
|
9
10
|
export type DisplayViewModes = 'table' | 'inline';
|
|
11
|
+
type ShouldReturnFocus = boolean | RefObject<HTMLElement>;
|
|
10
12
|
export type OnInsertFunction<ADF> = (adf: ADF, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
11
13
|
export type ConfigModalProps<ADF, Parameters> = {
|
|
12
14
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
@@ -27,4 +29,10 @@ export type ConfigModalProps<ADF, Parameters> = {
|
|
|
27
29
|
viewMode?: DisplayViewModes;
|
|
28
30
|
/** Disable the view mode display dropdown */
|
|
29
31
|
disableDisplayDropdown?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Set the focus to return to the element that had focus before focus lock was activated or pass through a specific ref element
|
|
34
|
+
* Defaults to false, meaning focus remains where it was when the FocusLock was deactivated
|
|
35
|
+
*/
|
|
36
|
+
shouldReturnFocus?: ShouldReturnFocus;
|
|
30
37
|
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'wrappedColumnKeys' | 'columnCustomSizes'>>;
|
|
38
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ModalDialogProps } from '@atlaskit/modal-dialog';
|
|
3
|
-
type DatasourceModalProps = Pick<ModalDialogProps, 'testId' | 'onClose' | 'children'>;
|
|
4
|
-
export declare const DatasourceModal: ({ testId, onClose, children }: DatasourceModalProps) => React.JSX.Element;
|
|
3
|
+
type DatasourceModalProps = Pick<ModalDialogProps, 'testId' | 'onClose' | 'children' | 'shouldReturnFocus'>;
|
|
4
|
+
export declare const DatasourceModal: ({ testId, onClose, children, shouldReturnFocus }: DatasourceModalProps) => React.JSX.Element;
|
|
5
5
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.0",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/form": "^12.0.0",
|
|
53
53
|
"@atlaskit/heading": "^5.2.0",
|
|
54
54
|
"@atlaskit/icon": "^27.9.0",
|
|
55
|
-
"@atlaskit/icon-object": "^7.
|
|
55
|
+
"@atlaskit/icon-object": "^7.2.0",
|
|
56
56
|
"@atlaskit/image": "^3.0.0",
|
|
57
57
|
"@atlaskit/inline-edit": "^15.3.0",
|
|
58
58
|
"@atlaskit/intl-messages-provider": "^2.0.0",
|
|
@@ -178,9 +178,6 @@
|
|
|
178
178
|
"dst-a11y__replace-anchor-with-link__linking-platfo": {
|
|
179
179
|
"type": "boolean"
|
|
180
180
|
},
|
|
181
|
-
"fix_a11y_issues_inline_edit": {
|
|
182
|
-
"type": "boolean"
|
|
183
|
-
},
|
|
184
181
|
"should-render-to-parent-should-be-true-linking-pla": {
|
|
185
182
|
"type": "boolean"
|
|
186
183
|
},
|