@atlaskit/link-datasource 1.25.2 → 1.25.3
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 +6 -0
- package/dist/cjs/ui/common/modal/basic-search-input/index.js +9 -4
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +1 -3
- package/dist/es2019/ui/common/modal/basic-search-input/index.js +10 -2
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +1 -3
- package/dist/esm/ui/common/modal/basic-search-input/index.js +9 -4
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +1 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.25.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#88297](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/88297) [`0b8748a0e0fc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0b8748a0e0fc) - Add search action analytics events for confluence datasource modal.
|
|
8
|
+
|
|
3
9
|
## 1.25.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ var _button = require("@atlaskit/button");
|
|
|
12
12
|
var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/search"));
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
14
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
15
|
+
var _analytics = require("../../../../analytics");
|
|
15
16
|
var _messages = require("./messages");
|
|
16
17
|
/** @jsx jsx */
|
|
17
18
|
|
|
@@ -36,9 +37,15 @@ var BasicSearchInput = exports.BasicSearchInput = function BasicSearchInput(_ref
|
|
|
36
37
|
placeholder = _ref.placeholder;
|
|
37
38
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
38
39
|
formatMessage = _useIntl.formatMessage;
|
|
40
|
+
var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
|
|
41
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
42
|
+
var handleSearchWithAnalytics = function handleSearchWithAnalytics() {
|
|
43
|
+
fireEvent('ui.form.submitted.basicSearch', {});
|
|
44
|
+
onSearch(searchTerm);
|
|
45
|
+
};
|
|
39
46
|
var handleFormSubmit = function handleFormSubmit(e) {
|
|
40
47
|
e.preventDefault();
|
|
41
|
-
|
|
48
|
+
handleSearchWithAnalytics();
|
|
42
49
|
};
|
|
43
50
|
var showBasicFilters = (0, _react.useMemo)(function () {
|
|
44
51
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.datasource.show-jlol-basic-filters')) {
|
|
@@ -60,9 +67,7 @@ var BasicSearchInput = exports.BasicSearchInput = function BasicSearchInput(_ref
|
|
|
60
67
|
}),
|
|
61
68
|
isDisabled: isDisabled,
|
|
62
69
|
isLoading: isSearching,
|
|
63
|
-
onClick:
|
|
64
|
-
return onSearch(searchTerm);
|
|
65
|
-
},
|
|
70
|
+
onClick: handleSearchWithAnalytics,
|
|
66
71
|
spacing: "none",
|
|
67
72
|
testId: "".concat(testId, "--basic-search-button")
|
|
68
73
|
}),
|
|
@@ -152,9 +152,7 @@ var JiraSearchContainer = exports.JiraSearchContainer = function JiraSearchConta
|
|
|
152
152
|
basicFilterSelections: filterSelections,
|
|
153
153
|
isQueryComplex: isCurrentQueryComplex
|
|
154
154
|
});
|
|
155
|
-
if (currentSearchMethod === '
|
|
156
|
-
fireEvent('ui.form.submitted.basicSearch', {});
|
|
157
|
-
} else if (currentSearchMethod === 'jql') {
|
|
155
|
+
if (currentSearchMethod === 'jql') {
|
|
158
156
|
fireEvent('ui.jqlEditor.searched', {
|
|
159
157
|
isQueryComplex: isCurrentQueryComplex
|
|
160
158
|
});
|
|
@@ -6,6 +6,7 @@ import { LoadingButton } from '@atlaskit/button';
|
|
|
6
6
|
import SearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
7
7
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import Textfield from '@atlaskit/textfield';
|
|
9
|
+
import { useDatasourceAnalyticsEvents } from '../../../../analytics';
|
|
9
10
|
import { basicSearchInputMessages } from './messages';
|
|
10
11
|
const searchButtonStyles = css({
|
|
11
12
|
marginRight: "var(--ds-space-075, 6px)"
|
|
@@ -30,9 +31,16 @@ export const BasicSearchInput = ({
|
|
|
30
31
|
const {
|
|
31
32
|
formatMessage
|
|
32
33
|
} = useIntl();
|
|
34
|
+
const {
|
|
35
|
+
fireEvent
|
|
36
|
+
} = useDatasourceAnalyticsEvents();
|
|
37
|
+
const handleSearchWithAnalytics = () => {
|
|
38
|
+
fireEvent('ui.form.submitted.basicSearch', {});
|
|
39
|
+
onSearch(searchTerm);
|
|
40
|
+
};
|
|
33
41
|
const handleFormSubmit = e => {
|
|
34
42
|
e.preventDefault();
|
|
35
|
-
|
|
43
|
+
handleSearchWithAnalytics();
|
|
36
44
|
};
|
|
37
45
|
const showBasicFilters = useMemo(() => {
|
|
38
46
|
if (getBooleanFF('platform.linking-platform.datasource.show-jlol-basic-filters')) {
|
|
@@ -54,7 +62,7 @@ export const BasicSearchInput = ({
|
|
|
54
62
|
}),
|
|
55
63
|
isDisabled: isDisabled,
|
|
56
64
|
isLoading: isSearching,
|
|
57
|
-
onClick:
|
|
65
|
+
onClick: handleSearchWithAnalytics,
|
|
58
66
|
spacing: "none",
|
|
59
67
|
testId: `${testId}--basic-search-button`
|
|
60
68
|
}),
|
|
@@ -115,9 +115,7 @@ export const JiraSearchContainer = props => {
|
|
|
115
115
|
basicFilterSelections: filterSelections,
|
|
116
116
|
isQueryComplex: isCurrentQueryComplex
|
|
117
117
|
});
|
|
118
|
-
if (currentSearchMethod === '
|
|
119
|
-
fireEvent('ui.form.submitted.basicSearch', {});
|
|
120
|
-
} else if (currentSearchMethod === 'jql') {
|
|
118
|
+
if (currentSearchMethod === 'jql') {
|
|
121
119
|
fireEvent('ui.jqlEditor.searched', {
|
|
122
120
|
isQueryComplex: isCurrentQueryComplex
|
|
123
121
|
});
|
|
@@ -6,6 +6,7 @@ import { LoadingButton } from '@atlaskit/button';
|
|
|
6
6
|
import SearchIcon from '@atlaskit/icon/glyph/editor/search';
|
|
7
7
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import Textfield from '@atlaskit/textfield';
|
|
9
|
+
import { useDatasourceAnalyticsEvents } from '../../../../analytics';
|
|
9
10
|
import { basicSearchInputMessages } from './messages';
|
|
10
11
|
var searchButtonStyles = css({
|
|
11
12
|
marginRight: "var(--ds-space-075, 6px)"
|
|
@@ -28,9 +29,15 @@ export var BasicSearchInput = function BasicSearchInput(_ref) {
|
|
|
28
29
|
placeholder = _ref.placeholder;
|
|
29
30
|
var _useIntl = useIntl(),
|
|
30
31
|
formatMessage = _useIntl.formatMessage;
|
|
32
|
+
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
33
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
34
|
+
var handleSearchWithAnalytics = function handleSearchWithAnalytics() {
|
|
35
|
+
fireEvent('ui.form.submitted.basicSearch', {});
|
|
36
|
+
onSearch(searchTerm);
|
|
37
|
+
};
|
|
31
38
|
var handleFormSubmit = function handleFormSubmit(e) {
|
|
32
39
|
e.preventDefault();
|
|
33
|
-
|
|
40
|
+
handleSearchWithAnalytics();
|
|
34
41
|
};
|
|
35
42
|
var showBasicFilters = useMemo(function () {
|
|
36
43
|
if (getBooleanFF('platform.linking-platform.datasource.show-jlol-basic-filters')) {
|
|
@@ -52,9 +59,7 @@ export var BasicSearchInput = function BasicSearchInput(_ref) {
|
|
|
52
59
|
}),
|
|
53
60
|
isDisabled: isDisabled,
|
|
54
61
|
isLoading: isSearching,
|
|
55
|
-
onClick:
|
|
56
|
-
return onSearch(searchTerm);
|
|
57
|
-
},
|
|
62
|
+
onClick: handleSearchWithAnalytics,
|
|
58
63
|
spacing: "none",
|
|
59
64
|
testId: "".concat(testId, "--basic-search-button")
|
|
60
65
|
}),
|
|
@@ -143,9 +143,7 @@ export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
|
143
143
|
basicFilterSelections: filterSelections,
|
|
144
144
|
isQueryComplex: isCurrentQueryComplex
|
|
145
145
|
});
|
|
146
|
-
if (currentSearchMethod === '
|
|
147
|
-
fireEvent('ui.form.submitted.basicSearch', {});
|
|
148
|
-
} else if (currentSearchMethod === 'jql') {
|
|
146
|
+
if (currentSearchMethod === 'jql') {
|
|
149
147
|
fireEvent('ui.jqlEditor.searched', {
|
|
150
148
|
isQueryComplex: isCurrentQueryComplex
|
|
151
149
|
});
|