@atlaskit/link-datasource 1.0.17 → 1.0.19

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/analytics/constants.js +7 -2
  3. package/dist/cjs/analytics/types.js +30 -0
  4. package/dist/cjs/analytics/utils.js +4 -3
  5. package/dist/cjs/ui/assets-modal/modal/index.js +1 -1
  6. package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +2 -5
  7. package/dist/cjs/ui/jira-issues-modal/initial-state-view/assets/initial-state-svg.js +241 -0
  8. package/dist/cjs/ui/jira-issues-modal/initial-state-view/index.js +47 -0
  9. package/dist/cjs/ui/jira-issues-modal/initial-state-view/messages.js +25 -0
  10. package/dist/cjs/ui/jira-issues-modal/modal/index.js +103 -25
  11. package/dist/es2019/analytics/constants.js +5 -1
  12. package/dist/es2019/analytics/types.js +21 -0
  13. package/dist/es2019/analytics/utils.js +4 -3
  14. package/dist/es2019/ui/assets-modal/modal/index.js +1 -1
  15. package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +2 -5
  16. package/dist/es2019/ui/jira-issues-modal/initial-state-view/assets/initial-state-svg.js +231 -0
  17. package/dist/es2019/ui/jira-issues-modal/initial-state-view/index.js +41 -0
  18. package/dist/es2019/ui/jira-issues-modal/initial-state-view/messages.js +18 -0
  19. package/dist/es2019/ui/jira-issues-modal/modal/index.js +98 -20
  20. package/dist/esm/analytics/constants.js +5 -1
  21. package/dist/esm/analytics/types.js +21 -0
  22. package/dist/esm/analytics/utils.js +4 -3
  23. package/dist/esm/ui/assets-modal/modal/index.js +1 -1
  24. package/dist/esm/ui/datasource-table-view/datasourceTableView.js +2 -5
  25. package/dist/esm/ui/jira-issues-modal/initial-state-view/assets/initial-state-svg.js +233 -0
  26. package/dist/esm/ui/jira-issues-modal/initial-state-view/index.js +40 -0
  27. package/dist/esm/ui/jira-issues-modal/initial-state-view/messages.js +18 -0
  28. package/dist/esm/ui/jira-issues-modal/modal/index.js +103 -26
  29. package/dist/types/analytics/constants.d.ts +2 -0
  30. package/dist/types/analytics/generated/analytics.types.d.ts +6 -1
  31. package/dist/types/analytics/types.d.ts +18 -0
  32. package/dist/types/analytics/utils.d.ts +2 -1
  33. package/dist/types/ui/jira-issues-modal/initial-state-view/assets/initial-state-svg.d.ts +2 -0
  34. package/dist/types/ui/jira-issues-modal/initial-state-view/index.d.ts +3 -0
  35. package/dist/types/ui/jira-issues-modal/initial-state-view/messages.d.ts +17 -0
  36. package/dist/types/ui/jira-issues-modal/modal/index.d.ts +6 -0
  37. package/dist/types-ts4.5/analytics/constants.d.ts +2 -0
  38. package/dist/types-ts4.5/analytics/generated/analytics.types.d.ts +6 -1
  39. package/dist/types-ts4.5/analytics/types.d.ts +18 -0
  40. package/dist/types-ts4.5/analytics/utils.d.ts +2 -1
  41. package/dist/types-ts4.5/ui/jira-issues-modal/initial-state-view/assets/initial-state-svg.d.ts +2 -0
  42. package/dist/types-ts4.5/ui/jira-issues-modal/initial-state-view/index.d.ts +3 -0
  43. package/dist/types-ts4.5/ui/jira-issues-modal/initial-state-view/messages.d.ts +17 -0
  44. package/dist/types-ts4.5/ui/jira-issues-modal/modal/index.d.ts +6 -0
  45. package/package.json +6 -6
@@ -7,7 +7,10 @@ import { withAnalyticsContext } from '@atlaskit/analytics-next';
7
7
  import Button from '@atlaskit/button/standard-button';
8
8
  import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
9
9
  import { B400, N0, N40, N800 } from '@atlaskit/theme/colors';
10
- import { useDatasourceAnalyticsEvents } from '../../../analytics';
10
+ import { EVENT_CHANNEL, useDatasourceAnalyticsEvents } from '../../../analytics';
11
+ import { packageMetaData } from '../../../analytics/constants';
12
+ import { DatasourceAction, DatasourceDisplay } from '../../../analytics/types';
13
+ import { mapSearchMethod } from '../../../analytics/utils';
11
14
  import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
12
15
  import { getAvailableJiraSites } from '../../../services/getAvailableJiraSites';
13
16
  import { AccessRequired } from '../../common/error-state/access-required';
@@ -15,7 +18,8 @@ import { ModalLoadingError } from '../../common/error-state/modal-loading-error'
15
18
  import { NoResults } from '../../common/error-state/no-results';
16
19
  import { EmptyState, IssueLikeDataTableView } from '../../issue-like-table';
17
20
  import LinkRenderType from '../../issue-like-table/render-type/link';
18
- import { getInitialSearchMethod, JiraSearchContainer } from '../jira-search-container';
21
+ import { InitialStateView } from '../initial-state-view';
22
+ import { JiraSearchContainer } from '../jira-search-container';
19
23
  import { ModeSwitcher } from '../mode-switcher';
20
24
  import { JiraSiteSelector } from '../site-selector';
21
25
  import { modalMessages } from './messages';
@@ -44,6 +48,28 @@ const issueCountStyles = css({
44
48
  const smartLinkContainerStyles = css({
45
49
  paddingLeft: '1px'
46
50
  });
51
+ const getDisplayValue = (currentViewMode, itemCount) => {
52
+ if (currentViewMode === 'count') {
53
+ return DatasourceDisplay.DATASOURCE_INLINE;
54
+ }
55
+ return itemCount > 1 ? DatasourceDisplay.DATASOURCE_TABLE : DatasourceDisplay.INLINE;
56
+ };
57
+
58
+ /**
59
+ * This method should be called when one atomic action is performed on columns: adding new item, removing one item, changing items order.
60
+ * The assumption is that since only one action is changed at each time, we don't have to verify the actual contents of the lists.
61
+ */
62
+ export const getColumnAction = (oldVisibleColumnKeys, newVisibleColumnKeys) => {
63
+ const newColumnSize = newVisibleColumnKeys.length;
64
+ const oldColumnSize = oldVisibleColumnKeys.length;
65
+ if (newColumnSize > oldColumnSize) {
66
+ return DatasourceAction.COLUMN_ADDED;
67
+ } else if (newColumnSize < oldColumnSize) {
68
+ return DatasourceAction.COLUMN_REMOVED;
69
+ } else {
70
+ return DatasourceAction.COLUMN_REORDERED;
71
+ }
72
+ };
47
73
  export const PlainJiraIssuesConfigModal = props => {
48
74
  const {
49
75
  datasourceId,
@@ -56,12 +82,17 @@ export const PlainJiraIssuesConfigModal = props => {
56
82
  const [currentViewMode, setCurrentViewMode] = useState('issue');
57
83
  const [cloudId, setCloudId] = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.cloudId);
58
84
  const [jql, setJql] = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.jql);
59
- const isParametersSet = !!(jql && cloudId);
85
+ const [visibleColumnKeys, setVisibleColumnKeys] = useState(initialVisibleColumnKeys);
86
+
87
+ // analytics related parameters
88
+ const searchCount = useRef(0);
89
+ const userInteractionActions = useRef(new Set());
90
+ const lastSearchMethodRef = useRef(null);
60
91
  const parameters = useMemo(() => !!cloudId ? {
61
92
  cloudId,
62
93
  jql: jql || ''
63
94
  } : undefined, [cloudId, jql]);
64
- const [visibleColumnKeys, setVisibleColumnKeys] = useState(initialVisibleColumnKeys);
95
+ const isParametersSet = !!(jql && cloudId);
65
96
  const {
66
97
  reset,
67
98
  status,
@@ -71,13 +102,14 @@ export const PlainJiraIssuesConfigModal = props => {
71
102
  columns,
72
103
  defaultVisibleColumnKeys,
73
104
  loadDatasourceDetails,
74
- totalCount
105
+ totalCount,
106
+ extensionKey = null,
107
+ destinationObjectTypes
75
108
  } = useDatasourceTableState({
76
109
  datasourceId,
77
110
  parameters: isParametersSet ? parameters : undefined,
78
111
  fieldKeys: visibleColumnKeys
79
112
  });
80
- const lastSearchMethodRef = useRef(getInitialSearchMethod(parameters === null || parameters === void 0 ? void 0 : parameters.jql));
81
113
  const {
82
114
  formatMessage
83
115
  } = useIntl();
@@ -85,6 +117,13 @@ export const PlainJiraIssuesConfigModal = props => {
85
117
  fireEvent
86
118
  } = useDatasourceAnalyticsEvents();
87
119
  const selectedJiraSite = useMemo(() => availableSites.find(jiraSite => jiraSite.cloudId === cloudId) || availableSites[0], [availableSites, cloudId]);
120
+ const buttonClickedAnalyticsPayload = useMemo(() => {
121
+ return {
122
+ extensionKey: extensionKey,
123
+ destinationObjectTypes: destinationObjectTypes,
124
+ actions: userInteractionActions.current
125
+ };
126
+ }, [destinationObjectTypes, extensionKey]);
88
127
  const resolvedWithNoResults = status === 'resolved' && !responseItems.length;
89
128
  const jqlUrl = selectedJiraSite && jql && `${selectedJiraSite.url}/issues/?jql=${encodeURI(jql)}`;
90
129
  const isInsertDisabled = !isParametersSet || status === 'rejected' || status === 'unauthorized' || status === 'loading' || resolvedWithNoResults;
@@ -112,13 +151,29 @@ export const PlainJiraIssuesConfigModal = props => {
112
151
  }
113
152
  }, [cloudId, selectedJiraSite]);
114
153
  const onSearch = useCallback((newParameters, searchMethod) => {
154
+ searchCount.current++;
115
155
  lastSearchMethodRef.current = searchMethod;
156
+ if (jql !== newParameters.jql) {
157
+ userInteractionActions.current.add(DatasourceAction.QUERY_UPDATED);
158
+ }
116
159
  setJql(newParameters.jql);
117
160
  reset({
118
161
  shouldForceRequest: true
119
162
  });
120
- }, [reset]);
163
+ }, [jql, reset]);
164
+ const onCancelClick = useCallback((e, analyticEvent) => {
165
+ analyticEvent.update({
166
+ eventType: 'ui',
167
+ actionSubjectId: 'cancel',
168
+ attributes: {
169
+ ...buttonClickedAnalyticsPayload,
170
+ searchCount: searchCount.current
171
+ }
172
+ }).fire(EVENT_CHANNEL);
173
+ onCancel();
174
+ }, [buttonClickedAnalyticsPayload, onCancel]);
121
175
  const onSiteSelection = useCallback(site => {
176
+ userInteractionActions.current.add(DatasourceAction.INSTANCE_UPDATED);
122
177
  setCloudId(site.cloudId);
123
178
  reset({
124
179
  shouldForceRequest: true
@@ -127,13 +182,26 @@ export const PlainJiraIssuesConfigModal = props => {
127
182
  const retrieveUrlForSmartCardRender = useCallback(() => {
128
183
  var _data$key, _data$key$data;
129
184
  const [data] = responseItems;
130
- // agrement with BE that we will use `key` for rendering smartlink
185
+ // agreement with BE that we will use `key` for rendering smartlink
131
186
  return data === null || data === void 0 ? void 0 : (_data$key = data.key) === null || _data$key === void 0 ? void 0 : (_data$key$data = _data$key.data) === null || _data$key$data === void 0 ? void 0 : _data$key$data.url;
132
187
  }, [responseItems]);
133
- const onInsertPressed = useCallback(() => {
188
+ const onInsertPressed = useCallback((e, analyticEvent) => {
134
189
  if (!isParametersSet || !jql || !selectedJiraSite) {
135
190
  return;
136
191
  }
192
+ const insertButtonClickedEvent = analyticEvent.update({
193
+ actionSubjectId: 'insert',
194
+ attributes: {
195
+ ...buttonClickedAnalyticsPayload,
196
+ totalItemCount: totalCount || 0,
197
+ displayedColumnCount: (visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0,
198
+ display: getDisplayValue(currentViewMode, totalCount || 0),
199
+ searchCount: searchCount.current,
200
+ searchMethod: mapSearchMethod(lastSearchMethodRef.current)
201
+ },
202
+ eventType: 'ui'
203
+ });
204
+ insertButtonClickedEvent.fire(EVENT_CHANNEL);
137
205
  const firstIssueUrl = retrieveUrlForSmartCardRender();
138
206
  if (currentViewMode === 'count') {
139
207
  onInsert({
@@ -173,10 +241,20 @@ export const PlainJiraIssuesConfigModal = props => {
173
241
  }
174
242
  });
175
243
  }
176
- }, [isParametersSet, jql, jqlUrl, selectedJiraSite, retrieveUrlForSmartCardRender, currentViewMode, responseItems.length, onInsert, datasourceId, cloudId, visibleColumnKeys]);
244
+ }, [isParametersSet, jql, selectedJiraSite, buttonClickedAnalyticsPayload, totalCount, visibleColumnKeys, currentViewMode, retrieveUrlForSmartCardRender, responseItems.length, onInsert, jqlUrl, datasourceId, cloudId]);
177
245
  const handleViewModeChange = selectedMode => {
246
+ userInteractionActions.current.add(DatasourceAction.DISPLAY_VIEW_CHANGED);
178
247
  setCurrentViewMode(selectedMode);
179
248
  };
249
+ const handleOnNextPage = useCallback(() => {
250
+ userInteractionActions.current.add(DatasourceAction.NEXT_PAGE_SCROLLED);
251
+ onNextPage();
252
+ }, [onNextPage]);
253
+ const handleVisibleColumnKeysChange = useCallback((newVisibleColumnKeys = []) => {
254
+ const columnAction = getColumnAction(visibleColumnKeys || [], newVisibleColumnKeys);
255
+ userInteractionActions.current.add(columnAction);
256
+ setVisibleColumnKeys(newVisibleColumnKeys);
257
+ }, [visibleColumnKeys]);
180
258
  const issueLikeDataTableView = useMemo(() => jsx("div", {
181
259
  css: contentContainerStyles
182
260
  }, jsx(IssueLikeDataTableView, {
@@ -186,10 +264,10 @@ export const PlainJiraIssuesConfigModal = props => {
186
264
  items: responseItems,
187
265
  hasNextPage: hasNextPage,
188
266
  visibleColumnKeys: visibleColumnKeys || defaultVisibleColumnKeys,
189
- onNextPage: onNextPage,
267
+ onNextPage: handleOnNextPage,
190
268
  onLoadDatasourceDetails: loadDatasourceDetails,
191
- onVisibleColumnKeysChange: setVisibleColumnKeys
192
- })), [columns, defaultVisibleColumnKeys, hasNextPage, loadDatasourceDetails, onNextPage, responseItems, status, visibleColumnKeys]);
269
+ onVisibleColumnKeysChange: handleVisibleColumnKeysChange
270
+ })), [columns, defaultVisibleColumnKeys, hasNextPage, handleVisibleColumnKeysChange, loadDatasourceDetails, handleOnNextPage, responseItems, status, visibleColumnKeys]);
193
271
  const renderCountModeContent = useCallback(() => {
194
272
  const url = selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.url;
195
273
  if (status === 'unauthorized') {
@@ -227,9 +305,10 @@ export const PlainJiraIssuesConfigModal = props => {
227
305
  // persist the empty state when making the initial /data request which contains the columns
228
306
  return jsx("div", {
229
307
  css: contentContainerStyles
230
- }, jsx(EmptyState, {
231
- testId: `jira-jql-datasource-modal--empty-state`
232
- }));
308
+ }, !!jql ? jsx(EmptyState, {
309
+ testId: `jira-jql-datasource-modal--empty-state`,
310
+ isLoading: true
311
+ }) : jsx(InitialStateView, null));
233
312
  }
234
313
  const firstIssueUrl = retrieveUrlForSmartCardRender();
235
314
  if (responseItems.length === 1 && firstIssueUrl) {
@@ -240,7 +319,7 @@ export const PlainJiraIssuesConfigModal = props => {
240
319
  }));
241
320
  }
242
321
  return issueLikeDataTableView;
243
- }, [status, columns.length, resolvedWithNoResults, jqlUrl, retrieveUrlForSmartCardRender, responseItems.length, issueLikeDataTableView, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.displayName]);
322
+ }, [status, jqlUrl, resolvedWithNoResults, columns.length, retrieveUrlForSmartCardRender, responseItems.length, issueLikeDataTableView, selectedJiraSite === null || selectedJiraSite === void 0 ? void 0 : selectedJiraSite.displayName, jql]);
244
323
  return jsx(ModalTransition, null, jsx(Modal, {
245
324
  testId: 'jira-jql-datasource-modal',
246
325
  onClose: onCancel,
@@ -283,7 +362,7 @@ export const PlainJiraIssuesConfigModal = props => {
283
362
  }
284
363
  }))), jsx(Button, {
285
364
  appearance: "default",
286
- onClick: onCancel
365
+ onClick: onCancelClick
287
366
  }, jsx(FormattedMessage, modalMessages.cancelButtonText)), jsx(Button, {
288
367
  appearance: "primary",
289
368
  onClick: onInsertPressed,
@@ -295,8 +374,7 @@ const analyticsContextAttributes = {
295
374
  dataProvider: 'jira-issues'
296
375
  };
297
376
  const analyticsContextData = {
298
- packageName: "@atlaskit/link-datasource",
299
- packageVersion: "1.0.17",
377
+ ...packageMetaData,
300
378
  source: 'datasourceConfigModal'
301
379
  };
302
380
  const contextData = {
@@ -1 +1,5 @@
1
- export var EVENT_CHANNEL = 'media';
1
+ export var EVENT_CHANNEL = 'media';
2
+ export var packageMetaData = {
3
+ packageName: "@atlaskit/link-datasource",
4
+ packageVersion: "1.0.19"
5
+ };
@@ -0,0 +1,21 @@
1
+ export var DatasourceAction = /*#__PURE__*/function (DatasourceAction) {
2
+ DatasourceAction["COLUMN_ADDED"] = "column added";
3
+ DatasourceAction["COLUMN_REMOVED"] = "column removed";
4
+ DatasourceAction["COLUMN_REORDERED"] = "column reordered";
5
+ DatasourceAction["INSTANCE_UPDATED"] = "instance updated";
6
+ DatasourceAction["QUERY_UPDATED"] = "query updated";
7
+ DatasourceAction["DISPLAY_VIEW_CHANGED"] = "display view changed";
8
+ DatasourceAction["NEXT_PAGE_SCROLLED"] = "next page scrolled";
9
+ return DatasourceAction;
10
+ }({});
11
+ export var DatasourceDisplay = /*#__PURE__*/function (DatasourceDisplay) {
12
+ DatasourceDisplay["DATASOURCE_TABLE"] = "datasource_table";
13
+ DatasourceDisplay["DATASOURCE_INLINE"] = "datasource_inline";
14
+ DatasourceDisplay["INLINE"] = "inline";
15
+ return DatasourceDisplay;
16
+ }({});
17
+ export var DatasourceSearchMethod = /*#__PURE__*/function (DatasourceSearchMethod) {
18
+ DatasourceSearchMethod["DATASOURCE_BASIC_FILTER"] = "datasource_basic_filter";
19
+ DatasourceSearchMethod["DATASOURCE_SEARCH_QUERY"] = "datasource_search_query";
20
+ return DatasourceSearchMethod;
21
+ }({});
@@ -1,10 +1,11 @@
1
+ import { DatasourceSearchMethod } from './types';
1
2
  export var mapSearchMethod = function mapSearchMethod(searchMethod) {
2
3
  switch (searchMethod) {
3
4
  case 'basic':
4
- return 'datasource_basic_filter';
5
+ return DatasourceSearchMethod.DATASOURCE_BASIC_FILTER;
5
6
  case 'jql':
6
- return 'datasource_search_query';
7
+ return DatasourceSearchMethod.DATASOURCE_SEARCH_QUERY;
7
8
  default:
8
- return 'unknown';
9
+ return null;
9
10
  }
10
11
  };
@@ -222,7 +222,7 @@ var analyticsContextAttributes = {
222
222
  };
223
223
  var analyticsContextData = {
224
224
  packageName: "@atlaskit/link-datasource",
225
- packageVersion: "1.0.17",
225
+ packageVersion: "1.0.19",
226
226
  source: 'datasourceConfigModal'
227
227
  };
228
228
  var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
@@ -3,6 +3,7 @@ import { useCallback, useEffect, useRef } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import { withAnalyticsContext } from '@atlaskit/analytics-next';
5
5
  import { useDatasourceAnalyticsEvents } from '../../analytics';
6
+ import { packageMetaData } from '../../analytics/constants';
6
7
  import { useDatasourceTableState } from '../../hooks/useDatasourceTableState';
7
8
  import { AccessRequired } from '../common/error-state/access-required';
8
9
  import { LoadingError } from '../common/error-state/loading-error';
@@ -100,8 +101,4 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
100
101
  }))
101
102
  );
102
103
  };
103
- var analyticsContextData = {
104
- packageName: "@atlaskit/link-datasource",
105
- packageVersion: "1.0.17"
106
- };
107
- export var DatasourceTableView = withAnalyticsContext(analyticsContextData)(DatasourceTableViewWithoutAnalytics);
104
+ export var DatasourceTableView = withAnalyticsContext(packageMetaData)(DatasourceTableViewWithoutAnalytics);
@@ -0,0 +1,233 @@
1
+ import React from 'react';
2
+ export var InitialStateSVG = function InitialStateSVG() {
3
+ return /*#__PURE__*/React.createElement("svg", {
4
+ width: "188",
5
+ height: "112",
6
+ viewBox: "0 0 188 112",
7
+ fill: "none",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ }, /*#__PURE__*/React.createElement("rect", {
10
+ x: "25.5",
11
+ y: "1",
12
+ width: "127",
13
+ height: "97",
14
+ rx: "4",
15
+ fill: "white",
16
+ stroke: "#B7BDC8",
17
+ strokeWidth: "2"
18
+ }), /*#__PURE__*/React.createElement("line", {
19
+ x1: "24.5",
20
+ y1: "10",
21
+ x2: "152.5",
22
+ y2: "10",
23
+ stroke: "#B7BDC8",
24
+ strokeWidth: "2"
25
+ }), /*#__PURE__*/React.createElement("line", {
26
+ x1: "24.5",
27
+ y1: "32",
28
+ x2: "152.5",
29
+ y2: "32",
30
+ stroke: "#B7BDC8",
31
+ strokeWidth: "2"
32
+ }), /*#__PURE__*/React.createElement("line", {
33
+ x1: "24.5",
34
+ y1: "54",
35
+ x2: "152.5",
36
+ y2: "54",
37
+ stroke: "#B7BDC8",
38
+ strokeWidth: "2"
39
+ }), /*#__PURE__*/React.createElement("line", {
40
+ x1: "49.5",
41
+ y1: "1",
42
+ x2: "49.5",
43
+ y2: "99",
44
+ stroke: "#B7BDC8",
45
+ strokeWidth: "2"
46
+ }), /*#__PURE__*/React.createElement("rect", {
47
+ x: "53.5",
48
+ y: "18",
49
+ width: "93",
50
+ height: "5",
51
+ rx: "2.5",
52
+ fill: "#C1C7D0",
53
+ fillOpacity: "0.4"
54
+ }), /*#__PURE__*/React.createElement("rect", {
55
+ x: "53.5",
56
+ y: "41",
57
+ width: "93",
58
+ height: "5",
59
+ rx: "2.5",
60
+ fill: "#C1C7D0",
61
+ fillOpacity: "0.4"
62
+ }), /*#__PURE__*/React.createElement("rect", {
63
+ x: "53.5",
64
+ y: "84",
65
+ width: "93",
66
+ height: "5",
67
+ rx: "2.5",
68
+ fill: "#C1C7D0",
69
+ fillOpacity: "0.4"
70
+ }), /*#__PURE__*/React.createElement("rect", {
71
+ x: "53.5",
72
+ y: "62",
73
+ width: "93",
74
+ height: "5",
75
+ rx: "2.5",
76
+ fill: "#C1C7D0",
77
+ fillOpacity: "0.4"
78
+ }), /*#__PURE__*/React.createElement("g", {
79
+ clipPath: "url(#clip0_2088_74131)"
80
+ }, /*#__PURE__*/React.createElement("rect", {
81
+ width: "12",
82
+ height: "12",
83
+ transform: "translate(31.5 15)",
84
+ fill: "white",
85
+ fillOpacity: "0.01"
86
+ }), /*#__PURE__*/React.createElement("path", {
87
+ fillRule: "evenodd",
88
+ clipRule: "evenodd",
89
+ d: "M42 15C42.8284 15 43.5 15.6716 43.5 16.5V25.5C43.5 26.3284 42.8284 27 42 27H33C32.1716 27 31.5 26.3284 31.5 25.5V16.5C31.5 15.6716 32.1716 15 33 15H42ZM37.875 17.25C37.7625 17.25 37.665 17.3018 37.596 17.3798L34.6118 21.1088C34.6095 21.111 34.5847 21.1425 34.5847 21.1425C34.5352 21.2092 34.5 21.2865 34.5 21.375C34.5 21.582 34.668 21.75 34.875 21.75C34.896 21.75 34.9133 21.7537 34.9328 21.75H36.75V24.375C36.75 24.582 36.918 24.75 37.125 24.75C37.218 24.75 37.3005 24.7125 37.3658 24.657C37.3658 24.657 37.4123 24.6068 37.4295 24.582L40.38 20.8972C40.3943 20.8837 40.4033 20.868 40.4153 20.8522L40.4355 20.8275C40.4722 20.7667 40.5 20.7 40.5 20.625C40.5 20.418 40.332 20.25 40.125 20.25H38.25V17.625C38.25 17.418 38.082 17.25 37.875 17.25Z",
90
+ fill: "#6554C0",
91
+ fillOpacity: "0.5"
92
+ })), /*#__PURE__*/React.createElement("g", {
93
+ clipPath: "url(#clip1_2088_74131)"
94
+ }, /*#__PURE__*/React.createElement("rect", {
95
+ width: "12",
96
+ height: "12",
97
+ transform: "translate(31.5 37)",
98
+ fill: "white",
99
+ fillOpacity: "0.01"
100
+ }), /*#__PURE__*/React.createElement("path", {
101
+ fillRule: "evenodd",
102
+ clipRule: "evenodd",
103
+ d: "M33 37H42C42.3978 37 42.7794 37.158 43.0607 37.4393C43.342 37.7206 43.5 38.1022 43.5 38.5V47.5C43.5 47.8978 43.342 48.2794 43.0607 48.5607C42.7794 48.842 42.3978 49 42 49H33C32.6022 49 32.2206 48.842 31.9393 48.5607C31.658 48.2794 31.5 47.8978 31.5 47.5V38.5C31.5 38.1022 31.658 37.7206 31.9393 37.4393C32.2206 37.158 32.6022 37 33 37V37ZM37.5 45.25L35.3528 46.6165C35.0378 46.9015 34.5 46.6998 34.5 46.2963V40.1537C34.5 39.655 34.947 39.25 35.4998 39.25H39.5002C40.0522 39.25 40.5 39.6542 40.5 40.1545V46.297C40.5 46.6997 39.9608 46.9015 39.6458 46.6165L37.5 45.25ZM37.5 43.4717L39 44.4272V40.75H36V44.4265L37.5 43.4725V43.4717Z",
104
+ fill: "#36B37E",
105
+ fillOpacity: "0.5"
106
+ })), /*#__PURE__*/React.createElement("g", {
107
+ clipPath: "url(#clip2_2088_74131)"
108
+ }, /*#__PURE__*/React.createElement("rect", {
109
+ width: "12",
110
+ height: "12",
111
+ transform: "translate(31.5 59)",
112
+ fill: "white",
113
+ fillOpacity: "0.01"
114
+ }), /*#__PURE__*/React.createElement("path", {
115
+ fillRule: "evenodd",
116
+ clipRule: "evenodd",
117
+ d: "M33 59H42C42.3978 59 42.7794 59.158 43.0607 59.4393C43.342 59.7206 43.5 60.1022 43.5 60.5V69.5C43.5 69.8978 43.342 70.2794 43.0607 70.5607C42.7794 70.842 42.3978 71 42 71H33C32.6022 71 32.2206 70.842 31.9393 70.5607C31.658 70.2794 31.5 69.8978 31.5 69.5V60.5C31.5 60.1022 31.658 59.7206 31.9393 59.4393C32.2206 59.158 32.6022 59 33 59V59ZM37.5 68C38.2956 68 39.0587 67.6839 39.6213 67.1213C40.1839 66.5587 40.5 65.7956 40.5 65C40.5 64.2044 40.1839 63.4413 39.6213 62.8787C39.0587 62.3161 38.2956 62 37.5 62C36.7044 62 35.9413 62.3161 35.3787 62.8787C34.8161 63.4413 34.5 64.2044 34.5 65C34.5 65.7956 34.8161 66.5587 35.3787 67.1213C35.9413 67.6839 36.7044 68 37.5 68V68Z",
118
+ fill: "#FF5630",
119
+ fillOpacity: "0.5"
120
+ })), /*#__PURE__*/React.createElement("line", {
121
+ x1: "24.5",
122
+ y1: "76",
123
+ x2: "152.5",
124
+ y2: "76",
125
+ stroke: "#B7BDC8",
126
+ strokeWidth: "2"
127
+ }), /*#__PURE__*/React.createElement("g", {
128
+ clipPath: "url(#clip3_2088_74131)"
129
+ }, /*#__PURE__*/React.createElement("rect", {
130
+ width: "12",
131
+ height: "12",
132
+ transform: "translate(31.5 80)",
133
+ fill: "white",
134
+ fillOpacity: "0.01"
135
+ }), /*#__PURE__*/React.createElement("path", {
136
+ fillRule: "evenodd",
137
+ clipRule: "evenodd",
138
+ d: "M31.5 81.4955C31.5 80.6698 32.1712 80 32.9955 80H42.0045C42.8302 80 43.5 80.6712 43.5 81.4955V90.5045C43.4998 90.9011 43.3422 91.2813 43.0618 91.5618C42.7813 91.8422 42.4011 91.9998 42.0045 92H32.9955C32.5989 91.9998 32.2187 91.8422 31.9382 91.5618C31.6578 91.2813 31.5002 90.9011 31.5 90.5045V81.4955ZM35.0002 82.25C34.3102 82.25 33.75 82.8095 33.75 83.5002V88.4998C33.75 89.1898 34.3095 89.75 35.0002 89.75H39.9998C40.6898 89.75 41.25 89.1905 41.25 88.4998V83.5002C41.25 82.8102 40.6905 82.25 39.9998 82.25H35.0002ZM35.25 83.75V88.25H39.75V83.75H35.25Z",
139
+ fill: "#2684FF",
140
+ fillOpacity: "0.5"
141
+ })), /*#__PURE__*/React.createElement("g", {
142
+ clipPath: "url(#clip4_2088_74131)"
143
+ }, /*#__PURE__*/React.createElement("rect", {
144
+ width: "72",
145
+ height: "72",
146
+ transform: "translate(100.5 40)",
147
+ fill: "white",
148
+ fillOpacity: "0.01"
149
+ }), /*#__PURE__*/React.createElement("path", {
150
+ d: "M146.011 90.5863L142.602 87.2258L147.303 82.5068L150.713 85.8673C151.581 86.7191 152.678 87.3026 153.872 87.5476C155.062 87.8209 156.155 88.4144 157.03 89.2635L170.885 102.884C171.892 103.879 172.464 105.229 172.477 106.641C172.491 108.053 171.944 109.414 170.956 110.427V110.427C169.953 111.425 168.595 111.989 167.177 111.996C165.759 112.002 164.396 111.452 163.383 110.463L149.529 96.8425C148.659 95.9783 148.049 94.8884 147.77 93.6965V93.6965C147.512 92.507 146.899 91.4229 146.011 90.5863Z",
151
+ fill: "#CFD4DB"
152
+ }), /*#__PURE__*/React.createElement("path", {
153
+ d: "M146.01 90.5855L144.97 89.5488C144.658 89.2428 144.411 88.8782 144.242 88.4762C144.073 88.0743 143.986 87.6429 143.986 87.2072C143.986 86.7714 144.073 86.3401 144.242 85.9381C144.411 85.5361 144.658 85.1715 144.97 84.8656V84.8656C145.274 84.553 145.639 84.3039 146.041 84.1327C146.443 83.9615 146.876 83.8716 147.313 83.8683C147.751 83.8649 148.184 83.9482 148.589 84.1133C148.994 84.2784 149.362 84.5219 149.672 84.8298L150.712 85.8665C151.58 86.7183 152.677 87.3019 153.871 87.5468C155.062 87.8201 156.154 88.4137 157.029 89.2628L170.884 102.883C171.891 103.878 172.463 105.228 172.477 106.64C172.49 108.053 171.943 109.413 170.956 110.427V110.427C169.952 111.425 168.594 111.988 167.176 111.995C165.758 112.002 164.395 111.451 163.382 110.462L149.528 96.8417C148.658 95.9776 148.048 94.8876 147.769 93.6957V93.6957C147.511 92.5062 146.898 91.4222 146.01 90.5855Z",
154
+ fill: "#8270DB"
155
+ }), /*#__PURE__*/React.createElement("path", {
156
+ opacity: "0.2",
157
+ d: "M147.733 93.5885C147.457 92.4447 146.86 91.4029 146.01 90.5855L144.97 89.5488C144.658 89.2428 144.411 88.8782 144.242 88.4763C144.073 88.0743 143.986 87.6429 143.986 87.2072C143.986 86.7714 144.073 86.3401 144.242 85.9381C144.411 85.5361 144.658 85.1715 144.97 84.8656V84.8656C145.274 84.553 145.639 84.3039 146.041 84.1327C146.443 83.9615 146.876 83.8716 147.313 83.8683C147.751 83.8649 148.184 83.9482 148.589 84.1133C148.994 84.2784 149.362 84.5219 149.672 84.8298L150.712 85.8666C151.538 86.6912 152.585 87.262 153.727 87.511C152.887 88.672 151.963 89.7712 150.964 90.8C149.955 91.8046 148.875 92.7364 147.733 93.5885V93.5885Z",
158
+ fill: "#403294"
159
+ }), /*#__PURE__*/React.createElement("path", {
160
+ d: "M156.312 67.5988C156.268 62.1045 154.591 56.7462 151.493 52.2002C148.394 47.6541 144.014 44.1239 138.903 42.0549C133.793 39.986 128.182 39.471 122.778 40.5751C117.374 41.6791 112.419 44.3526 108.539 48.2582C105.958 50.8489 103.918 53.9239 102.538 57.3051C101.158 60.6863 100.465 64.3066 100.499 67.9563V67.9563C100.514 71.6053 101.255 75.2152 102.678 78.5777C104.101 81.9402 106.178 84.9887 108.79 87.5472C112.72 91.4035 117.709 94.014 123.127 95.0492C128.545 96.0845 134.149 95.4981 139.233 93.3641C144.316 91.2301 148.652 87.6441 151.691 83.0586C154.731 78.4731 156.339 73.0936 156.312 67.5988V67.5988Z",
161
+ fill: "#66A3FF"
162
+ }), /*#__PURE__*/React.createElement("path", {
163
+ d: "M114.679 51.6187C110.936 54.7775 108.408 59.1308 107.526 63.9372C106.643 68.7436 107.461 73.7062 109.839 77.9798C112.217 82.2535 116.008 85.5741 120.568 87.3763C125.128 89.1785 130.174 89.3508 134.847 87.864C139.52 86.3771 143.531 83.323 146.197 79.2217C148.864 75.1203 150.021 70.2252 149.471 65.3699C148.921 60.5145 146.699 55.999 143.182 52.5922C139.665 49.1855 135.072 47.098 130.184 46.6852C127.4 46.4462 124.597 46.7592 121.935 47.606C119.274 48.4528 116.808 49.8166 114.679 51.6187V51.6187Z",
164
+ fill: "white"
165
+ }), /*#__PURE__*/React.createElement("mask", {
166
+ id: "mask0_2088_74131",
167
+ maskUnits: "userSpaceOnUse",
168
+ x: "107",
169
+ y: "46",
170
+ width: "43",
171
+ height: "43"
172
+ }, /*#__PURE__*/React.createElement("path", {
173
+ d: "M114.659 51.7779C110.927 54.9499 108.415 59.3119 107.549 64.1214C106.684 68.9309 107.518 73.8906 109.911 78.1559C112.304 82.4212 116.108 85.7285 120.674 87.5147C125.24 89.3009 130.286 89.4555 134.954 87.9523C139.622 86.4492 143.622 83.381 146.274 79.2703C148.926 75.1597 150.066 70.2606 149.499 65.4072C148.932 60.5537 146.694 56.0461 143.166 52.6516C139.637 49.2572 135.037 47.1858 130.147 46.7902C127.363 46.5609 124.56 46.8837 121.902 47.7398C119.243 48.5959 116.782 49.9684 114.659 51.7779V51.7779Z",
174
+ fill: "white"
175
+ })), /*#__PURE__*/React.createElement("g", {
176
+ mask: "url(#mask0_2088_74131)"
177
+ }, /*#__PURE__*/React.createElement("rect", {
178
+ x: "-9.11719",
179
+ y: "60.6504",
180
+ width: "152.638",
181
+ height: "10.2857",
182
+ rx: "5.14286",
183
+ transform: "rotate(-0.200699 -9.11719 60.6504)",
184
+ fill: "#C1C7D0",
185
+ fillOpacity: "0.4"
186
+ }), /*#__PURE__*/React.createElement("path", {
187
+ d: "M68.3867 50.8848L151.463 50.5938",
188
+ stroke: "#B7BDC8",
189
+ strokeWidth: "4"
190
+ }), /*#__PURE__*/React.createElement("line", {
191
+ x1: "68.4852",
192
+ y1: "78.9502",
193
+ x2: "151.562",
194
+ y2: "78.6592",
195
+ stroke: "#B7BDC8",
196
+ strokeWidth: "4"
197
+ }))), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
198
+ id: "clip0_2088_74131"
199
+ }, /*#__PURE__*/React.createElement("rect", {
200
+ width: "12",
201
+ height: "12",
202
+ fill: "white",
203
+ transform: "translate(31.5 15)"
204
+ })), /*#__PURE__*/React.createElement("clipPath", {
205
+ id: "clip1_2088_74131"
206
+ }, /*#__PURE__*/React.createElement("rect", {
207
+ width: "12",
208
+ height: "12",
209
+ fill: "white",
210
+ transform: "translate(31.5 37)"
211
+ })), /*#__PURE__*/React.createElement("clipPath", {
212
+ id: "clip2_2088_74131"
213
+ }, /*#__PURE__*/React.createElement("rect", {
214
+ width: "12",
215
+ height: "12",
216
+ fill: "white",
217
+ transform: "translate(31.5 59)"
218
+ })), /*#__PURE__*/React.createElement("clipPath", {
219
+ id: "clip3_2088_74131"
220
+ }, /*#__PURE__*/React.createElement("rect", {
221
+ width: "12",
222
+ height: "12",
223
+ fill: "white",
224
+ transform: "translate(31.5 80)"
225
+ })), /*#__PURE__*/React.createElement("clipPath", {
226
+ id: "clip4_2088_74131"
227
+ }, /*#__PURE__*/React.createElement("rect", {
228
+ width: "72",
229
+ height: "72",
230
+ fill: "white",
231
+ transform: "translate(100.5 40)"
232
+ }))));
233
+ };
@@ -0,0 +1,40 @@
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
4
+ import { useIntl } from 'react-intl-next';
5
+ import { InitialStateSVG } from './assets/initial-state-svg';
6
+ import { initialStateViewMessages } from './messages';
7
+ var initialStateViewContainerStyles = css({
8
+ display: 'flex',
9
+ justifyContent: 'center',
10
+ height: '100%'
11
+ });
12
+ var svgAndTextsWrapperStyles = css({
13
+ textAlign: 'center',
14
+ alignSelf: 'center',
15
+ paddingTop: "var(--ds-space-600, 48px)",
16
+ paddingBottom: "var(--ds-space-600, 48px)"
17
+ });
18
+ var searchTitleStyles = css({
19
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
20
+ fontSize: "var(--ds-font-size-200, 16px)",
21
+ lineHeight: "var(--ds-font-lineHeight-300, 24px)",
22
+ paddingTop: "var(--ds-space-200, 16px)",
23
+ paddingBottom: "var(--ds-space-100, 8px)"
24
+ });
25
+ var jqlSupportDocumentLink = 'https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/';
26
+ export var InitialStateView = function InitialStateView() {
27
+ var _useIntl = useIntl(),
28
+ formatMessage = _useIntl.formatMessage;
29
+ return jsx("div", {
30
+ css: initialStateViewContainerStyles,
31
+ "data-testid": "jlol-datasource-modal--initial-state-view"
32
+ }, jsx("div", {
33
+ css: svgAndTextsWrapperStyles
34
+ }, jsx(InitialStateSVG, null), jsx("div", {
35
+ css: searchTitleStyles
36
+ }, formatMessage(initialStateViewMessages.searchTitle)), jsx("div", null, formatMessage(initialStateViewMessages.searchDescription)), jsx("a", {
37
+ href: jqlSupportDocumentLink,
38
+ target: "_blank"
39
+ }, formatMessage(initialStateViewMessages.learnMoreLink))));
40
+ };
@@ -0,0 +1,18 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var initialStateViewMessages = defineMessages({
3
+ searchTitle: {
4
+ id: 'linkDataSource.modal-initial-state.searchTitle',
5
+ description: 'The initial modal search state title that gives the user some idea about how to get information',
6
+ defaultMessage: 'Search for Jira issues'
7
+ },
8
+ searchDescription: {
9
+ id: 'linkDataSource.modal-initial-state.searchDescription',
10
+ description: 'The initial modal search state helper message displayed under the search title',
11
+ defaultMessage: 'Start typing or use JQL to search.'
12
+ },
13
+ learnMoreLink: {
14
+ id: 'linkDataSource.modal-initial-state.learnMoreLink',
15
+ description: 'The link that displays under the search description to help people know more about JQL',
16
+ defaultMessage: 'Learn more about searching with JQL.'
17
+ }
18
+ });