@atlaskit/link-datasource 1.26.1 → 1.26.2
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
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 1.26.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#89277](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/89277) [`9dc291ef49c4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9dc291ef49c4) - Add analytics events for when confluence config modal is viewed and is ready for interaction
|
|
8
|
+
|
|
3
9
|
## 1.26.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -133,6 +133,8 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
133
133
|
_useDatasourceTableSt2 = _useDatasourceTableSt.extensionKey,
|
|
134
134
|
extensionKey = _useDatasourceTableSt2 === void 0 ? null : _useDatasourceTableSt2,
|
|
135
135
|
destinationObjectTypes = _useDatasourceTableSt.destinationObjectTypes;
|
|
136
|
+
var _useDatasourceAnalyti = (0, _analytics.useDatasourceAnalyticsEvents)(),
|
|
137
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
136
138
|
var hasNoConfluenceSites = availableSites && availableSites.length === 0;
|
|
137
139
|
var selectedConfluenceSite = (0, _react.useMemo)(function () {
|
|
138
140
|
if (cloudId) {
|
|
@@ -149,6 +151,9 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
149
151
|
})) || (availableSites === null || availableSites === void 0 ? void 0 : availableSites[0]);
|
|
150
152
|
}
|
|
151
153
|
}, [availableSites, cloudId]);
|
|
154
|
+
(0, _react.useEffect)(function () {
|
|
155
|
+
fireEvent('screen.datasourceModalDialog.viewed', {});
|
|
156
|
+
}, [fireEvent]);
|
|
152
157
|
|
|
153
158
|
// TODO: further refactoring in EDM-9573
|
|
154
159
|
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6828283
|
|
@@ -182,7 +187,11 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
182
187
|
return a.displayName.localeCompare(b.displayName);
|
|
183
188
|
});
|
|
184
189
|
setAvailableSites(sortedAvailableSites);
|
|
185
|
-
|
|
190
|
+
fireEvent('ui.modal.ready.datasource', {
|
|
191
|
+
instancesCount: sortedAvailableSites.length,
|
|
192
|
+
schemasCount: null
|
|
193
|
+
});
|
|
194
|
+
case 6:
|
|
186
195
|
case "end":
|
|
187
196
|
return _context.stop();
|
|
188
197
|
}
|
|
@@ -193,7 +202,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
193
202
|
};
|
|
194
203
|
}();
|
|
195
204
|
void fetchSiteDisplayNames();
|
|
196
|
-
}, []);
|
|
205
|
+
}, [fireEvent]);
|
|
197
206
|
(0, _react.useEffect)(function () {
|
|
198
207
|
var newVisibleColumnKeys = !initialVisibleColumnKeys || (initialVisibleColumnKeys || []).length === 0 ? defaultVisibleColumnKeys : initialVisibleColumnKeys;
|
|
199
208
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
@@ -12,7 +12,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
12
12
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
13
13
|
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
14
14
|
import { N800 } from '@atlaskit/theme/colors';
|
|
15
|
-
import { EVENT_CHANNEL } from '../../../analytics';
|
|
15
|
+
import { EVENT_CHANNEL, useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
16
16
|
import { componentMetadata } from '../../../analytics/constants';
|
|
17
17
|
import { DatasourceAction, DatasourceDisplay, DatasourceSearchMethod } from '../../../analytics/types';
|
|
18
18
|
import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
@@ -103,6 +103,9 @@ export const PlainConfluenceSearchConfigModal = props => {
|
|
|
103
103
|
parameters: isParametersSet ? parameters : undefined,
|
|
104
104
|
fieldKeys: visibleColumnKeys
|
|
105
105
|
});
|
|
106
|
+
const {
|
|
107
|
+
fireEvent
|
|
108
|
+
} = useDatasourceAnalyticsEvents();
|
|
106
109
|
const hasNoConfluenceSites = availableSites && availableSites.length === 0;
|
|
107
110
|
const selectedConfluenceSite = useMemo(() => {
|
|
108
111
|
if (cloudId) {
|
|
@@ -115,6 +118,9 @@ export const PlainConfluenceSearchConfigModal = props => {
|
|
|
115
118
|
return (availableSites === null || availableSites === void 0 ? void 0 : availableSites.find(confluenceSite => confluenceSite.url === currentlyLoggedInSiteUrl)) || (availableSites === null || availableSites === void 0 ? void 0 : availableSites[0]);
|
|
116
119
|
}
|
|
117
120
|
}, [availableSites, cloudId]);
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
fireEvent('screen.datasourceModalDialog.viewed', {});
|
|
123
|
+
}, [fireEvent]);
|
|
118
124
|
|
|
119
125
|
// TODO: further refactoring in EDM-9573
|
|
120
126
|
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6828283
|
|
@@ -138,9 +144,13 @@ export const PlainConfluenceSearchConfigModal = props => {
|
|
|
138
144
|
const confluenceSites = await getAvailableSites('confluence');
|
|
139
145
|
const sortedAvailableSites = [...confluenceSites].sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
140
146
|
setAvailableSites(sortedAvailableSites);
|
|
147
|
+
fireEvent('ui.modal.ready.datasource', {
|
|
148
|
+
instancesCount: sortedAvailableSites.length,
|
|
149
|
+
schemasCount: null
|
|
150
|
+
});
|
|
141
151
|
};
|
|
142
152
|
void fetchSiteDisplayNames();
|
|
143
|
-
}, []);
|
|
153
|
+
}, [fireEvent]);
|
|
144
154
|
useEffect(() => {
|
|
145
155
|
const newVisibleColumnKeys = !initialVisibleColumnKeys || (initialVisibleColumnKeys || []).length === 0 ? defaultVisibleColumnKeys : initialVisibleColumnKeys;
|
|
146
156
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
@@ -19,7 +19,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
19
19
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
20
20
|
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
21
21
|
import { N800 } from '@atlaskit/theme/colors';
|
|
22
|
-
import { EVENT_CHANNEL } from '../../../analytics';
|
|
22
|
+
import { EVENT_CHANNEL, useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
23
23
|
import { componentMetadata } from '../../../analytics/constants';
|
|
24
24
|
import { DatasourceAction, DatasourceDisplay, DatasourceSearchMethod } from '../../../analytics/types';
|
|
25
25
|
import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
@@ -124,6 +124,8 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
124
124
|
_useDatasourceTableSt2 = _useDatasourceTableSt.extensionKey,
|
|
125
125
|
extensionKey = _useDatasourceTableSt2 === void 0 ? null : _useDatasourceTableSt2,
|
|
126
126
|
destinationObjectTypes = _useDatasourceTableSt.destinationObjectTypes;
|
|
127
|
+
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
128
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
127
129
|
var hasNoConfluenceSites = availableSites && availableSites.length === 0;
|
|
128
130
|
var selectedConfluenceSite = useMemo(function () {
|
|
129
131
|
if (cloudId) {
|
|
@@ -140,6 +142,9 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
140
142
|
})) || (availableSites === null || availableSites === void 0 ? void 0 : availableSites[0]);
|
|
141
143
|
}
|
|
142
144
|
}, [availableSites, cloudId]);
|
|
145
|
+
useEffect(function () {
|
|
146
|
+
fireEvent('screen.datasourceModalDialog.viewed', {});
|
|
147
|
+
}, [fireEvent]);
|
|
143
148
|
|
|
144
149
|
// TODO: further refactoring in EDM-9573
|
|
145
150
|
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6828283
|
|
@@ -173,7 +178,11 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
173
178
|
return a.displayName.localeCompare(b.displayName);
|
|
174
179
|
});
|
|
175
180
|
setAvailableSites(sortedAvailableSites);
|
|
176
|
-
|
|
181
|
+
fireEvent('ui.modal.ready.datasource', {
|
|
182
|
+
instancesCount: sortedAvailableSites.length,
|
|
183
|
+
schemasCount: null
|
|
184
|
+
});
|
|
185
|
+
case 6:
|
|
177
186
|
case "end":
|
|
178
187
|
return _context.stop();
|
|
179
188
|
}
|
|
@@ -184,7 +193,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
184
193
|
};
|
|
185
194
|
}();
|
|
186
195
|
void fetchSiteDisplayNames();
|
|
187
|
-
}, []);
|
|
196
|
+
}, [fireEvent]);
|
|
188
197
|
useEffect(function () {
|
|
189
198
|
var newVisibleColumnKeys = !initialVisibleColumnKeys || (initialVisibleColumnKeys || []).length === 0 ? defaultVisibleColumnKeys : initialVisibleColumnKeys;
|
|
190
199
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|