@atlaskit/link-datasource 2.3.4 → 2.3.6
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 +1205 -1196
- package/LICENSE.md +6 -8
- package/dist/cjs/contexts/user-interactions/index.js +42 -0
- package/dist/cjs/hooks/useDatasourceTableState.js +3 -3
- package/dist/cjs/hooks/useValidateAqlText.js +3 -3
- package/dist/cjs/i18n/cs.js +15 -8
- package/dist/cjs/i18n/da.js +15 -8
- package/dist/cjs/i18n/de.js +15 -8
- package/dist/cjs/i18n/en.js +15 -8
- package/dist/cjs/i18n/en_GB.js +15 -8
- package/dist/cjs/i18n/en_ZZ.js +15 -8
- package/dist/cjs/i18n/es.js +15 -8
- package/dist/cjs/i18n/fi.js +15 -8
- package/dist/cjs/i18n/fr.js +15 -8
- package/dist/cjs/i18n/hu.js +15 -8
- package/dist/cjs/i18n/it.js +15 -8
- package/dist/cjs/i18n/ja.js +15 -8
- package/dist/cjs/i18n/ko.js +15 -8
- package/dist/cjs/i18n/nb.js +15 -8
- package/dist/cjs/i18n/nl.js +15 -8
- package/dist/cjs/i18n/pl.js +15 -8
- package/dist/cjs/i18n/pt_BR.js +15 -8
- package/dist/cjs/i18n/ru.js +15 -8
- package/dist/cjs/i18n/sv.js +15 -8
- package/dist/cjs/i18n/th.js +15 -8
- package/dist/cjs/i18n/tr.js +15 -8
- package/dist/cjs/i18n/uk.js +15 -8
- package/dist/cjs/i18n/vi.js +15 -8
- package/dist/cjs/i18n/zh.js +15 -8
- package/dist/cjs/i18n/zh_TW.js +15 -8
- package/dist/cjs/ui/assets-modal/modal/index.js +30 -17
- package/dist/cjs/ui/assets-modal/search-container/aql-search-input/index.js +1 -0
- package/dist/cjs/ui/common/modal/popup-select/index.js +4 -4
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +4 -1
- package/dist/cjs/ui/confluence-search-modal/modal/confluence-search-initial-state-svg.js +3 -1
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +17 -16
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +3 -3
- package/dist/cjs/ui/issue-like-table/column-picker/concatenated-menu-list.js +3 -1
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +1 -0
- package/dist/cjs/ui/issue-like-table/empty-state/index.js +19 -13
- package/dist/cjs/ui/issue-like-table/index.js +15 -5
- package/dist/cjs/ui/issue-like-table/render-type/date-time/index.js +4 -4
- package/dist/cjs/ui/issue-like-table/render-type/icon/index.js +3 -1
- package/dist/cjs/ui/issue-like-table/render-type/link/index.js +3 -1
- package/dist/cjs/ui/issue-like-table/styled.js +7 -7
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +18 -17
- package/dist/cjs/ui/table-footer/index.js +1 -0
- package/dist/cjs/ui/table-footer/powered-by-jsm-assets/index.js +2 -0
- package/dist/es2019/contexts/user-interactions/index.js +33 -0
- package/dist/es2019/hooks/useDatasourceTableState.js +3 -3
- package/dist/es2019/hooks/useValidateAqlText.js +3 -3
- package/dist/es2019/i18n/cs.js +15 -8
- package/dist/es2019/i18n/da.js +15 -8
- package/dist/es2019/i18n/de.js +15 -8
- package/dist/es2019/i18n/en.js +15 -8
- package/dist/es2019/i18n/en_GB.js +15 -8
- package/dist/es2019/i18n/en_ZZ.js +15 -8
- package/dist/es2019/i18n/es.js +15 -8
- package/dist/es2019/i18n/fi.js +15 -8
- package/dist/es2019/i18n/fr.js +15 -8
- package/dist/es2019/i18n/hu.js +15 -8
- package/dist/es2019/i18n/it.js +15 -8
- package/dist/es2019/i18n/ja.js +15 -8
- package/dist/es2019/i18n/ko.js +15 -8
- package/dist/es2019/i18n/nb.js +15 -8
- package/dist/es2019/i18n/nl.js +15 -8
- package/dist/es2019/i18n/pl.js +15 -8
- package/dist/es2019/i18n/pt_BR.js +15 -8
- package/dist/es2019/i18n/ru.js +15 -8
- package/dist/es2019/i18n/sv.js +15 -8
- package/dist/es2019/i18n/th.js +15 -8
- package/dist/es2019/i18n/tr.js +15 -8
- package/dist/es2019/i18n/uk.js +15 -8
- package/dist/es2019/i18n/vi.js +15 -8
- package/dist/es2019/i18n/zh.js +15 -8
- package/dist/es2019/i18n/zh_TW.js +15 -8
- package/dist/es2019/ui/assets-modal/modal/index.js +30 -15
- package/dist/es2019/ui/assets-modal/search-container/aql-search-input/index.js +1 -0
- package/dist/es2019/ui/common/modal/popup-select/index.js +4 -4
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +4 -1
- package/dist/es2019/ui/confluence-search-modal/modal/confluence-search-initial-state-svg.js +3 -1
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +17 -16
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +3 -3
- package/dist/es2019/ui/issue-like-table/column-picker/concatenated-menu-list.js +3 -1
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +2 -0
- package/dist/es2019/ui/issue-like-table/empty-state/index.js +6 -1
- package/dist/es2019/ui/issue-like-table/index.js +15 -5
- package/dist/es2019/ui/issue-like-table/render-type/date-time/index.js +4 -4
- package/dist/es2019/ui/issue-like-table/render-type/icon/index.js +3 -1
- package/dist/es2019/ui/issue-like-table/render-type/link/index.js +3 -1
- package/dist/es2019/ui/issue-like-table/styled.js +7 -7
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +18 -17
- package/dist/es2019/ui/table-footer/index.js +1 -0
- package/dist/es2019/ui/table-footer/powered-by-jsm-assets/index.js +2 -0
- package/dist/esm/contexts/user-interactions/index.js +34 -0
- package/dist/esm/hooks/useDatasourceTableState.js +3 -3
- package/dist/esm/hooks/useValidateAqlText.js +3 -3
- package/dist/esm/i18n/cs.js +15 -8
- package/dist/esm/i18n/da.js +15 -8
- package/dist/esm/i18n/de.js +15 -8
- package/dist/esm/i18n/en.js +15 -8
- package/dist/esm/i18n/en_GB.js +15 -8
- package/dist/esm/i18n/en_ZZ.js +15 -8
- package/dist/esm/i18n/es.js +15 -8
- package/dist/esm/i18n/fi.js +15 -8
- package/dist/esm/i18n/fr.js +15 -8
- package/dist/esm/i18n/hu.js +15 -8
- package/dist/esm/i18n/it.js +15 -8
- package/dist/esm/i18n/ja.js +15 -8
- package/dist/esm/i18n/ko.js +15 -8
- package/dist/esm/i18n/nb.js +15 -8
- package/dist/esm/i18n/nl.js +15 -8
- package/dist/esm/i18n/pl.js +15 -8
- package/dist/esm/i18n/pt_BR.js +15 -8
- package/dist/esm/i18n/ru.js +15 -8
- package/dist/esm/i18n/sv.js +15 -8
- package/dist/esm/i18n/th.js +15 -8
- package/dist/esm/i18n/tr.js +15 -8
- package/dist/esm/i18n/uk.js +15 -8
- package/dist/esm/i18n/vi.js +15 -8
- package/dist/esm/i18n/zh.js +15 -8
- package/dist/esm/i18n/zh_TW.js +15 -8
- package/dist/esm/ui/assets-modal/modal/index.js +30 -17
- package/dist/esm/ui/assets-modal/search-container/aql-search-input/index.js +1 -0
- package/dist/esm/ui/common/modal/popup-select/index.js +4 -4
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +4 -1
- package/dist/esm/ui/confluence-search-modal/modal/confluence-search-initial-state-svg.js +3 -1
- package/dist/esm/ui/confluence-search-modal/modal/index.js +17 -16
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +3 -3
- package/dist/esm/ui/issue-like-table/column-picker/concatenated-menu-list.js +3 -1
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +1 -0
- package/dist/esm/ui/issue-like-table/empty-state/index.js +19 -13
- package/dist/esm/ui/issue-like-table/index.js +15 -5
- package/dist/esm/ui/issue-like-table/render-type/date-time/index.js +4 -4
- package/dist/esm/ui/issue-like-table/render-type/icon/index.js +3 -1
- package/dist/esm/ui/issue-like-table/render-type/link/index.js +3 -1
- package/dist/esm/ui/issue-like-table/styled.js +7 -7
- package/dist/esm/ui/jira-issues-modal/modal/index.js +18 -17
- package/dist/esm/ui/table-footer/index.js +1 -0
- package/dist/esm/ui/table-footer/powered-by-jsm-assets/index.js +2 -0
- package/dist/types/contexts/datasource-experience-id/index.d.ts +1 -1
- package/dist/types/contexts/user-interactions/index.d.ts +15 -0
- package/dist/types/i18n/cs.d.ts +15 -8
- package/dist/types/i18n/da.d.ts +15 -8
- package/dist/types/i18n/de.d.ts +15 -8
- package/dist/types/i18n/en.d.ts +15 -8
- package/dist/types/i18n/en_GB.d.ts +15 -8
- package/dist/types/i18n/en_ZZ.d.ts +15 -8
- package/dist/types/i18n/es.d.ts +15 -8
- package/dist/types/i18n/fi.d.ts +15 -8
- package/dist/types/i18n/fr.d.ts +15 -8
- package/dist/types/i18n/hu.d.ts +15 -8
- package/dist/types/i18n/it.d.ts +15 -8
- package/dist/types/i18n/ja.d.ts +15 -8
- package/dist/types/i18n/ko.d.ts +15 -8
- package/dist/types/i18n/nb.d.ts +15 -8
- package/dist/types/i18n/nl.d.ts +15 -8
- package/dist/types/i18n/pl.d.ts +15 -8
- package/dist/types/i18n/pt_BR.d.ts +15 -8
- package/dist/types/i18n/ru.d.ts +15 -8
- package/dist/types/i18n/sv.d.ts +15 -8
- package/dist/types/i18n/th.d.ts +15 -8
- package/dist/types/i18n/tr.d.ts +15 -8
- package/dist/types/i18n/uk.d.ts +15 -8
- package/dist/types/i18n/vi.d.ts +15 -8
- package/dist/types/i18n/zh.d.ts +15 -8
- package/dist/types/i18n/zh_TW.d.ts +15 -8
- package/dist/types/index.d.ts +1 -1
- package/dist/types/services/useBasicFilterAGG.d.ts +1 -1
- package/dist/types/ui/assets-modal/search-container/loading-state.d.ts +1 -1
- package/dist/types/ui/assets-modal/types.d.ts +1 -0
- package/dist/types/ui/common/error-state/no-instances.d.ts +1 -1
- package/dist/types/ui/common/modal/cancel-button/index.d.ts +1 -1
- package/dist/types/ui/common/modal/content-container/index.d.ts +1 -1
- package/dist/types/ui/common/modal/display-view-dropdown/display-view-drop-down.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/footer.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/menu-list/errorMessage.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/menu-list/loadingMessage.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/menu-list/selectMessage.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/render-type/boolean/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/render-type/icon/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/render-type/link/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/render-type/number/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/render-type/status/index.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/utils/transformers.d.ts +2 -2
- package/dist/types-ts4.5/contexts/datasource-experience-id/index.d.ts +1 -1
- package/dist/types-ts4.5/contexts/user-interactions/index.d.ts +15 -0
- package/dist/types-ts4.5/i18n/cs.d.ts +15 -8
- package/dist/types-ts4.5/i18n/da.d.ts +15 -8
- package/dist/types-ts4.5/i18n/de.d.ts +15 -8
- package/dist/types-ts4.5/i18n/en.d.ts +15 -8
- package/dist/types-ts4.5/i18n/en_GB.d.ts +15 -8
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +15 -8
- package/dist/types-ts4.5/i18n/es.d.ts +15 -8
- package/dist/types-ts4.5/i18n/fi.d.ts +15 -8
- package/dist/types-ts4.5/i18n/fr.d.ts +15 -8
- package/dist/types-ts4.5/i18n/hu.d.ts +15 -8
- package/dist/types-ts4.5/i18n/it.d.ts +15 -8
- package/dist/types-ts4.5/i18n/ja.d.ts +15 -8
- package/dist/types-ts4.5/i18n/ko.d.ts +15 -8
- package/dist/types-ts4.5/i18n/nb.d.ts +15 -8
- package/dist/types-ts4.5/i18n/nl.d.ts +15 -8
- package/dist/types-ts4.5/i18n/pl.d.ts +15 -8
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +15 -8
- package/dist/types-ts4.5/i18n/ru.d.ts +15 -8
- package/dist/types-ts4.5/i18n/sv.d.ts +15 -8
- package/dist/types-ts4.5/i18n/th.d.ts +15 -8
- package/dist/types-ts4.5/i18n/tr.d.ts +15 -8
- package/dist/types-ts4.5/i18n/uk.d.ts +15 -8
- package/dist/types-ts4.5/i18n/vi.d.ts +15 -8
- package/dist/types-ts4.5/i18n/zh.d.ts +15 -8
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +15 -8
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/services/useBasicFilterAGG.d.ts +1 -1
- package/dist/types-ts4.5/ui/assets-modal/search-container/loading-state.d.ts +1 -1
- package/dist/types-ts4.5/ui/assets-modal/types.d.ts +1 -0
- package/dist/types-ts4.5/ui/common/error-state/no-instances.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/cancel-button/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/content-container/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/display-view-dropdown/display-view-drop-down.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/footer.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/menu-list/errorMessage.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/menu-list/loadingMessage.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/menu-list/selectMessage.d.ts +1 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/render-type/boolean/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/render-type/icon/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/render-type/link/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/render-type/number/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/render-type/status/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/utils/transformers.d.ts +2 -2
- package/examples-helpers/buildAssetsIssuesTable.tsx +44 -44
- package/examples-helpers/buildConfluenceSearchTable.tsx +49 -51
- package/examples-helpers/buildIssueLikeTable.tsx +82 -92
- package/examples-helpers/buildJiraIssuesTable.tsx +50 -50
- package/examples-helpers/hoverableContainer.tsx +12 -14
- package/examples-helpers/mockJqlSmartLinkData.ts +64 -66
- package/examples-helpers/mockSmartLinkData.ts +154 -154
- package/examples-helpers/smartLinkCustomClient.ts +32 -32
- package/examples-helpers/useAssetsTableProps.tsx +46 -46
- package/examples-helpers/useCommonTableProps.tsx +23 -25
- package/package.json +13 -12
- package/report.api.md +94 -106
|
@@ -11,6 +11,7 @@ import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
11
11
|
import Button from '@atlaskit/button/standard-button';
|
|
12
12
|
import { IntlMessagesProvider } from '@atlaskit/intl-messages-provider';
|
|
13
13
|
import { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
|
|
14
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
import { EVENT_CHANNEL, useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
15
16
|
import { componentMetadata } from '../../../analytics/constants';
|
|
16
17
|
import { DatasourceAction, DatasourceDisplay, DatasourceSearchMethod } from '../../../analytics/types';
|
|
@@ -20,6 +21,7 @@ import { useDataRenderedUfoExperience } from '../../../analytics/ufoExperiences/
|
|
|
20
21
|
import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
21
22
|
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
22
23
|
import { DatasourceExperienceIdProvider, useDatasourceExperienceId } from '../../../contexts/datasource-experience-id';
|
|
24
|
+
import { UserInteractionsProvider, useUserInteractions } from '../../../contexts/user-interactions';
|
|
23
25
|
import { useAssetsClient } from '../../../hooks/useAssetsClient';
|
|
24
26
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
25
27
|
import i18nEN from '../../../i18n/en';
|
|
@@ -32,6 +34,7 @@ import { AssetsSearchContainer } from '../search-container';
|
|
|
32
34
|
import { AssetsSearchContainerLoading } from '../search-container/loading-state';
|
|
33
35
|
import { modalMessages } from './messages';
|
|
34
36
|
import { MODAL_HEIGHT, RenderAssetsContent } from './render-assets-content';
|
|
37
|
+
var VERSION_TWO = '2';
|
|
35
38
|
var modalBodyErrorWrapperStyles = css({
|
|
36
39
|
alignItems: 'center',
|
|
37
40
|
display: 'grid',
|
|
@@ -53,7 +56,8 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
53
56
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
54
57
|
schemaId = _useState4[0],
|
|
55
58
|
setSchemaId = _useState4[1];
|
|
56
|
-
var
|
|
59
|
+
var apiVersion = initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.version;
|
|
60
|
+
var _useState5 = useState(getBooleanFF('platform.linking-platform.datasource-assets_add_version_parameter') && apiVersion !== VERSION_TWO ? [] : initialVisibleColumnKeys),
|
|
57
61
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
58
62
|
visibleColumnKeys = _useState6[0],
|
|
59
63
|
setVisibleColumnKeys = _useState6[1];
|
|
@@ -108,11 +112,13 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
108
112
|
/* ------------------------------ END PERMISSIONS ------------------------------ */
|
|
109
113
|
|
|
110
114
|
var parameters = useMemo(function () {
|
|
111
|
-
return {
|
|
115
|
+
return _objectSpread({
|
|
112
116
|
aql: aql || '',
|
|
113
117
|
schemaId: schemaId || '',
|
|
114
118
|
workspaceId: workspaceId || ''
|
|
115
|
-
}
|
|
119
|
+
}, getBooleanFF('platform.linking-platform.datasource-assets_add_version_parameter') ? {
|
|
120
|
+
version: VERSION_TWO
|
|
121
|
+
} : {});
|
|
116
122
|
}, [aql, schemaId, workspaceId]);
|
|
117
123
|
var isParametersSet = !!(aql && workspaceId && schemaId);
|
|
118
124
|
var _useDatasourceTableSt = useDatasourceTableState({
|
|
@@ -135,7 +141,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
135
141
|
|
|
136
142
|
/* ------------------------------ OBSERVABILITY ------------------------------ */
|
|
137
143
|
var searchCount = useRef(0);
|
|
138
|
-
var
|
|
144
|
+
var userInteractions = useUserInteractions();
|
|
139
145
|
var visibleColumnCount = useRef((visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0);
|
|
140
146
|
var isDataReady = (visibleColumnKeys || []).length > 0;
|
|
141
147
|
var analyticsPayload = useMemo(function () {
|
|
@@ -194,9 +200,14 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
194
200
|
setIsNewSearch(false);
|
|
195
201
|
}, []);
|
|
196
202
|
useEffect(function () {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
203
|
+
if (getBooleanFF('platform.linking-platform.datasource-assets_add_version_parameter')) {
|
|
204
|
+
var newVisibleColumnKeys = initialVisibleColumnKeys && initialVisibleColumnKeys.length > 0 && apiVersion === VERSION_TWO ? initialVisibleColumnKeys : defaultVisibleColumnKeys;
|
|
205
|
+
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
206
|
+
} else {
|
|
207
|
+
var _newVisibleColumnKeys = !initialVisibleColumnKeys || (initialVisibleColumnKeys || []).length === 0 ? defaultVisibleColumnKeys : initialVisibleColumnKeys;
|
|
208
|
+
setVisibleColumnKeys(_newVisibleColumnKeys);
|
|
209
|
+
}
|
|
210
|
+
}, [initialVisibleColumnKeys, defaultVisibleColumnKeys, apiVersion]);
|
|
200
211
|
useEffect(function () {
|
|
201
212
|
if (isNewSearch) {
|
|
202
213
|
setVisibleColumnKeys(defaultVisibleColumnKeys);
|
|
@@ -227,7 +238,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
227
238
|
display: DatasourceDisplay.DATASOURCE_TABLE,
|
|
228
239
|
searchCount: searchCount.current,
|
|
229
240
|
searchMethod: DatasourceSearchMethod.DATASOURCE_SEARCH_QUERY,
|
|
230
|
-
actions:
|
|
241
|
+
actions: userInteractions.get()
|
|
231
242
|
}),
|
|
232
243
|
eventType: 'ui'
|
|
233
244
|
});
|
|
@@ -244,11 +255,13 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
244
255
|
} else {
|
|
245
256
|
onInsert(buildDatasourceAdf({
|
|
246
257
|
id: datasourceId,
|
|
247
|
-
parameters: {
|
|
258
|
+
parameters: _objectSpread({
|
|
248
259
|
workspaceId: workspaceId,
|
|
249
260
|
aql: aql,
|
|
250
261
|
schemaId: schemaId
|
|
251
|
-
},
|
|
262
|
+
}, getBooleanFF('platform.linking-platform.datasource-assets_add_version_parameter') ? {
|
|
263
|
+
version: VERSION_TWO
|
|
264
|
+
} : {}),
|
|
252
265
|
views: [{
|
|
253
266
|
type: 'table',
|
|
254
267
|
properties: {
|
|
@@ -261,15 +274,15 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
261
274
|
}]
|
|
262
275
|
}), consumerEvent);
|
|
263
276
|
}
|
|
264
|
-
}, [aql, schemaId, workspaceId, analyticsPayload, totalCount, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, visibleColumnKeys]);
|
|
277
|
+
}, [aql, schemaId, workspaceId, analyticsPayload, totalCount, userInteractions, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, visibleColumnKeys]);
|
|
265
278
|
var handleOnSearch = useCallback(function (searchAql, searchSchemaId) {
|
|
266
279
|
if (schemaId !== searchSchemaId || aql !== searchAql || status === 'rejected') {
|
|
267
280
|
searchCount.current++;
|
|
268
281
|
if (schemaId !== searchSchemaId) {
|
|
269
|
-
|
|
282
|
+
userInteractions.add(DatasourceAction.SCHEMA_UPDATED);
|
|
270
283
|
}
|
|
271
284
|
if (aql !== searchAql) {
|
|
272
|
-
|
|
285
|
+
userInteractions.add(DatasourceAction.QUERY_UPDATED);
|
|
273
286
|
}
|
|
274
287
|
setAql(searchAql);
|
|
275
288
|
setSchemaId(searchSchemaId);
|
|
@@ -280,7 +293,7 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
280
293
|
shouldResetColumns: true
|
|
281
294
|
});
|
|
282
295
|
}
|
|
283
|
-
}, [aql, reset, schemaId, status]);
|
|
296
|
+
}, [aql, reset, schemaId, status, userInteractions]);
|
|
284
297
|
var renderErrorState = useCallback(function () {
|
|
285
298
|
if (errorState) {
|
|
286
299
|
switch (errorState) {
|
|
@@ -318,9 +331,9 @@ var PlainAssetsConfigModal = function PlainAssetsConfigModal(props) {
|
|
|
318
331
|
var getCancelButtonAnalyticsPayload = useCallback(function () {
|
|
319
332
|
return _objectSpread(_objectSpread({}, analyticsPayload), {}, {
|
|
320
333
|
searchCount: searchCount.current,
|
|
321
|
-
actions:
|
|
334
|
+
actions: userInteractions.get()
|
|
322
335
|
});
|
|
323
|
-
}, [analyticsPayload]);
|
|
336
|
+
}, [analyticsPayload, userInteractions]);
|
|
324
337
|
return jsx(IntlMessagesProvider, {
|
|
325
338
|
defaultMessages: i18nEN,
|
|
326
339
|
loaderFn: fetchMessagesForLocale
|
|
@@ -369,5 +382,5 @@ var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
|
369
382
|
attributes: _objectSpread({}, analyticsContextAttributes)
|
|
370
383
|
});
|
|
371
384
|
export var AssetsConfigModal = withAnalyticsContext(contextData)(function (props) {
|
|
372
|
-
return jsx(DatasourceExperienceIdProvider, null, jsx(PlainAssetsConfigModal, props));
|
|
385
|
+
return jsx(DatasourceExperienceIdProvider, null, jsx(UserInteractionsProvider, null, jsx(PlainAssetsConfigModal, props)));
|
|
373
386
|
});
|
|
@@ -78,6 +78,7 @@ export var AqlSearchInput = function AqlSearchInput(_ref) {
|
|
|
78
78
|
var fieldProps = _ref2.fieldProps;
|
|
79
79
|
return jsx(Fragment, null, jsx(Textfield, _extends({}, fieldProps, {
|
|
80
80
|
elemBeforeInput: jsx("span", {
|
|
81
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
81
82
|
style: {
|
|
82
83
|
paddingLeft: "var(--ds-space-075, 6px)",
|
|
83
84
|
width: 24
|
|
@@ -164,10 +164,10 @@ export var FilterPopupSelect = function FilterPopupSelect(_ref) {
|
|
|
164
164
|
testId: "".concat(filterName, "-popup-select"),
|
|
165
165
|
inputId: "".concat(filterName, "-popup-select--input")
|
|
166
166
|
/*
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
167
|
+
this threshold controls the display of the search control (input field for search)
|
|
168
|
+
if this threshold is less than 0, when typing a search string that returns no results it will not remove the search control
|
|
169
|
+
if this threshold is 0 or higher, it will remove the search control when there are no results, the user will be unable to clear the search to see more results
|
|
170
|
+
*/,
|
|
171
171
|
searchThreshold: -1,
|
|
172
172
|
inputValue: searchTerm,
|
|
173
173
|
closeMenuOnSelect: false,
|
package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js
CHANGED
|
@@ -12,7 +12,10 @@ export var PopupTrigger = function PopupTrigger(_ref) {
|
|
|
12
12
|
testId: 'confluence-search-modal--date-range-button',
|
|
13
13
|
onClick: onClick,
|
|
14
14
|
isSelected: isSelected,
|
|
15
|
-
iconAfter:
|
|
15
|
+
iconAfter:
|
|
16
|
+
/*#__PURE__*/
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
18
|
+
React.createElement("span", {
|
|
16
19
|
style: {
|
|
17
20
|
display: 'flex',
|
|
18
21
|
alignItems: 'center'
|
|
@@ -100,7 +100,9 @@ export var ConfluenceSearchInitialStateSVG = function ConfluenceSearchInitialSta
|
|
|
100
100
|
d: "M114.678 51.6186C110.935 54.7774 108.407 59.1306 107.525 63.9371C106.643 68.7435 107.46 73.706 109.838 77.9797C112.216 82.2534 116.008 85.574 120.567 87.3761C125.127 89.1783 130.173 89.3507 134.846 87.8638C139.519 86.377 143.53 83.3229 146.197 79.2215C148.863 75.1202 150.02 70.2251 149.47 65.3697C148.92 60.5144 146.698 55.9989 143.181 52.5921C139.665 49.1853 135.071 47.0979 130.183 46.6851C127.4 46.4461 124.596 46.7591 121.935 47.6059C119.273 48.4527 116.807 49.8165 114.678 51.6186Z",
|
|
101
101
|
fill: "white"
|
|
102
102
|
}), /*#__PURE__*/React.createElement("mask", {
|
|
103
|
-
id: "mask0_1_10772"
|
|
103
|
+
id: "mask0_1_10772"
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
105
|
+
,
|
|
104
106
|
style: {
|
|
105
107
|
maskType: 'alpha'
|
|
106
108
|
},
|
|
@@ -21,6 +21,7 @@ import { DatasourceAction, DatasourceDisplay, DatasourceSearchMethod } from '../
|
|
|
21
21
|
import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
22
22
|
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
23
23
|
import { DatasourceExperienceIdProvider } from '../../../contexts/datasource-experience-id';
|
|
24
|
+
import { UserInteractionsProvider, useUserInteractions } from '../../../contexts/user-interactions';
|
|
24
25
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
25
26
|
import i18nEN from '../../../i18n/en';
|
|
26
27
|
import { useAvailableSites } from '../../../services/useAvailableSites';
|
|
@@ -99,7 +100,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
99
100
|
|
|
100
101
|
// analytics related parameters
|
|
101
102
|
var searchCount = useRef(0);
|
|
102
|
-
var
|
|
103
|
+
var userInteractions = useUserInteractions();
|
|
103
104
|
var visibleColumnCount = useRef((visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0);
|
|
104
105
|
var parameters = useMemo(function () {
|
|
105
106
|
return _objectSpread(_objectSpread({}, initialParameters), {}, {
|
|
@@ -162,7 +163,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
162
163
|
// TODO: further refactoring in EDM-9573
|
|
163
164
|
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6829171
|
|
164
165
|
var onSiteSelection = useCallback(function (site) {
|
|
165
|
-
|
|
166
|
+
userInteractions.add(DatasourceAction.INSTANCE_UPDATED);
|
|
166
167
|
setSearchString(undefined);
|
|
167
168
|
setLastModified(undefined);
|
|
168
169
|
setContributorAccountIds([]);
|
|
@@ -170,7 +171,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
170
171
|
reset({
|
|
171
172
|
shouldForceRequest: true
|
|
172
173
|
});
|
|
173
|
-
}, [reset]);
|
|
174
|
+
}, [reset, userInteractions]);
|
|
174
175
|
useEffect(function () {
|
|
175
176
|
var newVisibleColumnKeys = !initialVisibleColumnKeys || (initialVisibleColumnKeys || []).length === 0 ? defaultVisibleColumnKeys : initialVisibleColumnKeys;
|
|
176
177
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
@@ -188,10 +189,10 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
188
189
|
var handleVisibleColumnKeysChange = useCallback(function () {
|
|
189
190
|
var newVisibleColumnKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
190
191
|
var columnAction = getColumnAction(visibleColumnKeys || [], newVisibleColumnKeys);
|
|
191
|
-
|
|
192
|
+
userInteractions.add(columnAction);
|
|
192
193
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
193
194
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
194
|
-
}, [visibleColumnKeys]);
|
|
195
|
+
}, [visibleColumnKeys, userInteractions]);
|
|
195
196
|
|
|
196
197
|
// TODO: further refactoring in EDM-9573
|
|
197
198
|
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6798258
|
|
@@ -244,9 +245,9 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
244
245
|
extensionKey: extensionKey,
|
|
245
246
|
destinationObjectTypes: destinationObjectTypes,
|
|
246
247
|
searchCount: searchCount.current,
|
|
247
|
-
actions:
|
|
248
|
+
actions: userInteractions.get()
|
|
248
249
|
};
|
|
249
|
-
}, [destinationObjectTypes, extensionKey]);
|
|
250
|
+
}, [destinationObjectTypes, extensionKey, userInteractions]);
|
|
250
251
|
var isDataReady = (visibleColumnKeys || []).length > 0;
|
|
251
252
|
var fireInlineViewedEvent = useCallback(function () {
|
|
252
253
|
fireEvent('ui.link.viewed.count', _objectSpread(_objectSpread({}, analyticsPayload), {}, {
|
|
@@ -329,7 +330,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
329
330
|
display: currentViewMode === 'inline' ? DatasourceDisplay.DATASOURCE_INLINE : DatasourceDisplay.DATASOURCE_TABLE,
|
|
330
331
|
searchCount: searchCount.current,
|
|
331
332
|
searchMethod: DatasourceSearchMethod.DATASOURCE_SEARCH_QUERY,
|
|
332
|
-
actions:
|
|
333
|
+
actions: userInteractions.get()
|
|
333
334
|
}),
|
|
334
335
|
eventType: 'ui'
|
|
335
336
|
});
|
|
@@ -366,14 +367,14 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
366
367
|
}]
|
|
367
368
|
}, confluenceSearchUrl), consumerEvent);
|
|
368
369
|
}
|
|
369
|
-
}, [isParametersSet, cloudId, analyticsPayload, totalCount, currentViewMode, onInsert, confluenceSearchUrl, datasourceId, parametersToSend, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
|
|
370
|
+
}, [isParametersSet, cloudId, analyticsPayload, totalCount, currentViewMode, onInsert, confluenceSearchUrl, datasourceId, parametersToSend, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys, userInteractions]);
|
|
370
371
|
var handleViewModeChange = function handleViewModeChange(selectedMode) {
|
|
371
|
-
|
|
372
|
+
userInteractions.add(DatasourceAction.DISPLAY_VIEW_CHANGED);
|
|
372
373
|
setCurrentViewMode(selectedMode);
|
|
373
374
|
};
|
|
374
375
|
var onSearch = useCallback(function (newSearchString, filters) {
|
|
375
376
|
searchCount.current++;
|
|
376
|
-
|
|
377
|
+
userInteractions.add(DatasourceAction.QUERY_UPDATED);
|
|
377
378
|
if (filters) {
|
|
378
379
|
var editedOrCreatedBy = filters.editedOrCreatedBy,
|
|
379
380
|
lastModifiedList = filters.lastModified;
|
|
@@ -400,16 +401,16 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
400
401
|
reset({
|
|
401
402
|
shouldForceRequest: true
|
|
402
403
|
});
|
|
403
|
-
}, [reset]);
|
|
404
|
+
}, [reset, userInteractions]);
|
|
404
405
|
var isInsertDisabled = !isParametersSet || status === 'rejected' || status === 'unauthorized' || status === 'loading';
|
|
405
406
|
var getCancelButtonAnalyticsPayload = useCallback(function () {
|
|
406
407
|
return {
|
|
407
408
|
extensionKey: extensionKey,
|
|
408
409
|
destinationObjectTypes: destinationObjectTypes,
|
|
409
410
|
searchCount: searchCount.current,
|
|
410
|
-
actions:
|
|
411
|
+
actions: userInteractions.get()
|
|
411
412
|
};
|
|
412
|
-
}, [destinationObjectTypes, extensionKey]);
|
|
413
|
+
}, [destinationObjectTypes, extensionKey, userInteractions]);
|
|
413
414
|
return jsx(IntlMessagesProvider, {
|
|
414
415
|
defaultMessages: i18nEN,
|
|
415
416
|
loaderFn: fetchMessagesForLocale
|
|
@@ -442,7 +443,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
442
443
|
href: confluenceSearchUrl,
|
|
443
444
|
target: "_blank",
|
|
444
445
|
testId: "item-count-url"
|
|
445
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
446
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
446
447
|
,
|
|
447
448
|
style: {
|
|
448
449
|
color: "var(--ds-text-accent-gray, ".concat(N800, ")")
|
|
@@ -474,5 +475,5 @@ var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
|
474
475
|
attributes: _objectSpread({}, analyticsContextAttributes)
|
|
475
476
|
});
|
|
476
477
|
export var ConfluenceSearchConfigModal = withAnalyticsContext(contextData)(function (props) {
|
|
477
|
-
return jsx(DatasourceExperienceIdProvider, null, jsx(PlainConfluenceSearchConfigModal, props));
|
|
478
|
+
return jsx(DatasourceExperienceIdProvider, null, jsx(UserInteractionsProvider, null, jsx(PlainConfluenceSearchConfigModal, props)));
|
|
478
479
|
});
|
|
@@ -58,9 +58,9 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
58
58
|
var visibleColumnCount = useRef((visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0);
|
|
59
59
|
|
|
60
60
|
/* Need this to make sure that the datasource in the editor gets updated new info if any edits are made in the modal
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
But we don't want to call it on initial load. This screws up useDatasourceTableState's internal
|
|
62
|
+
mechanism of initial loading. Use of ref here makes it basically work as a `componentDidUpdate` but not `componentDidMount`
|
|
63
|
+
*/
|
|
64
64
|
var isInitialRender = useRef(true);
|
|
65
65
|
var hasColumns = !!columns.length;
|
|
66
66
|
var isDataReady = hasColumns && responseItems.length > 0 && totalCount && totalCount > 0;
|
|
@@ -24,7 +24,9 @@ export var ConcatenatedMenuList = function ConcatenatedMenuList(_ref) {
|
|
|
24
24
|
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-200, 16px)"),
|
|
25
25
|
height: 'auto'
|
|
26
26
|
};
|
|
27
|
-
var maximumLimitReachedMessage =
|
|
27
|
+
var maximumLimitReachedMessage =
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
29
|
+
jsx("div", {
|
|
28
30
|
css: messageStyles,
|
|
29
31
|
style: optionStyle
|
|
30
32
|
}, jsx(FormattedMessage, _extends({
|
|
@@ -328,6 +328,7 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref) {
|
|
|
328
328
|
ref: mainHeaderCellRef,
|
|
329
329
|
"data-testid": "".concat(id, "-column-heading"),
|
|
330
330
|
style: _objectSpread({
|
|
331
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
331
332
|
cursor: 'grab'
|
|
332
333
|
}, getWidthCss({
|
|
333
334
|
shouldUseWidth: resizeIsEnabled,
|
|
@@ -103,8 +103,11 @@ export default (function (_ref4) {
|
|
|
103
103
|
style: {
|
|
104
104
|
// the IssueLikeDataTableView wraps the table in a container with the styling below while modal doesn't
|
|
105
105
|
// this maxHeight comes from scrollableContainerHeight
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
106
107
|
maxHeight: ScrollableContainerHeight,
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
107
109
|
padding: "var(--ds-space-0, 0px)",
|
|
110
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
108
111
|
boxSizing: 'border-box'
|
|
109
112
|
}
|
|
110
113
|
}, jsx("table", {
|
|
@@ -117,19 +120,22 @@ export default (function (_ref4) {
|
|
|
117
120
|
}, jsx("tr", null, columnsToRender.map(function (_ref5) {
|
|
118
121
|
var key = _ref5.key,
|
|
119
122
|
width = _ref5.width;
|
|
120
|
-
return
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
123
|
+
return (
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
125
|
+
jsx(TableHeading, {
|
|
126
|
+
key: key,
|
|
127
|
+
style: {
|
|
128
|
+
width: width,
|
|
129
|
+
padding: padding
|
|
130
|
+
}
|
|
131
|
+
}, jsx(Skeleton, {
|
|
132
|
+
appearance: "darkGray",
|
|
133
|
+
borderRadius: 8,
|
|
134
|
+
testId: "empty-state-skeleton",
|
|
135
|
+
height: 12,
|
|
136
|
+
width: width
|
|
137
|
+
}))
|
|
138
|
+
);
|
|
133
139
|
}))), jsx("tbody", {
|
|
134
140
|
css: tableBodyStyles
|
|
135
141
|
}, rows.map(function (row) {
|
|
@@ -577,7 +577,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
|
|
|
577
577
|
*/
|
|
578
578
|
contentEditable: false,
|
|
579
579
|
ref: containerRef,
|
|
580
|
-
css: [tableContainerStyles, scrollableContainerHeight && scrollableContainerStyles]
|
|
580
|
+
css: [tableContainerStyles, scrollableContainerHeight && scrollableContainerStyles]
|
|
581
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
582
|
+
,
|
|
581
583
|
style: scrollableContainerHeight ? {
|
|
582
584
|
maxHeight: "".concat(scrollableContainerHeight, "px")
|
|
583
585
|
} : undefined,
|
|
@@ -586,13 +588,17 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
|
|
|
586
588
|
setWidth: debounce(setTableContainerWidth, 100)
|
|
587
589
|
}), jsx(Table, {
|
|
588
590
|
css: tableStyles,
|
|
589
|
-
"data-testid": testId
|
|
591
|
+
"data-testid": testId
|
|
592
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
593
|
+
,
|
|
590
594
|
style: shouldUseWidth ? {
|
|
591
595
|
tableLayout: 'fixed'
|
|
592
596
|
} : {}
|
|
593
597
|
}, jsx("thead", {
|
|
594
598
|
"data-testid": testId && "".concat(testId, "--head"),
|
|
595
|
-
css: [noDefaultBorderStyles, tableHeadStyles]
|
|
599
|
+
css: [noDefaultBorderStyles, tableHeadStyles]
|
|
600
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
601
|
+
,
|
|
596
602
|
className: !!onVisibleColumnKeysChange ? 'has-column-picker' : ''
|
|
597
603
|
}, jsx("tr", {
|
|
598
604
|
ref: tableHeaderRowRef
|
|
@@ -645,7 +651,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
|
|
|
645
651
|
} else {
|
|
646
652
|
return jsx(TableHeading, {
|
|
647
653
|
key: key,
|
|
648
|
-
"data-testid": "".concat(key, "-column-heading")
|
|
654
|
+
"data-testid": "".concat(key, "-column-heading")
|
|
655
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
656
|
+
,
|
|
649
657
|
style: getWidthCss({
|
|
650
658
|
shouldUseWidth: shouldUseWidth,
|
|
651
659
|
width: width
|
|
@@ -686,7 +694,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref5) {
|
|
|
686
694
|
return jsx(TableCell, {
|
|
687
695
|
key: cellKey,
|
|
688
696
|
"data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
|
|
689
|
-
colSpan: isEditable && isLastCell ? 2 : undefined
|
|
697
|
+
colSpan: isEditable && isLastCell ? 2 : undefined
|
|
698
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
699
|
+
,
|
|
690
700
|
style: loadingRowStyle,
|
|
691
701
|
css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
|
|
692
702
|
}, content);
|
|
@@ -25,10 +25,10 @@ export function getFormattedDate(value) {
|
|
|
25
25
|
var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'datetime';
|
|
26
26
|
var formatDate = arguments.length > 2 ? arguments[2] : undefined;
|
|
27
27
|
/* In some cases we get a value of `2023-12-20` which when parsed by JS assumes meantime timezone, causing the date
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
to be one day off in some timezones. We want it to display the date without converting timezones and a solution
|
|
29
|
+
is to replace the hyphens with slashes. So it should be 20th Dec regardless of the timezone in this case.
|
|
30
|
+
See https://stackoverflow.com/a/31732581
|
|
31
|
+
*/
|
|
32
32
|
var dateValue = /^\d{4}-\d{2}-\d{2}$/.exec(value) ? value.replace(/-/g, '/') : value;
|
|
33
33
|
var date = new Date(dateValue);
|
|
34
34
|
if (!value || isNaN(date.getTime())) {
|
|
@@ -16,7 +16,9 @@ var IconRenderType = function IconRenderType(_ref) {
|
|
|
16
16
|
return /*#__PURE__*/React.createElement(IconWrapper, null, /*#__PURE__*/React.createElement(Image, {
|
|
17
17
|
src: source,
|
|
18
18
|
alt: label,
|
|
19
|
-
"data-testid": testId
|
|
19
|
+
"data-testid": testId
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
21
|
+
,
|
|
20
22
|
style: {
|
|
21
23
|
minWidth: '20px',
|
|
22
24
|
maxWidth: '20px'
|
|
@@ -29,7 +29,9 @@ var LinkRenderType = function LinkRenderType(_ref) {
|
|
|
29
29
|
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
30
30
|
url: url
|
|
31
31
|
}, /*#__PURE__*/React.createElement(LinkUrl, {
|
|
32
|
-
href: url
|
|
32
|
+
href: url
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
34
|
+
,
|
|
33
35
|
style: _objectSpread(_objectSpread({}, linkStyle), {}, {
|
|
34
36
|
fontSize: fieldTextFontSize
|
|
35
37
|
}),
|
|
@@ -37,12 +37,12 @@ export var TableHeading = styled.th((_styled$th = {}, _defineProperty(_styled$th
|
|
|
37
37
|
borderRight: "0.5px solid ".concat("var(--ds-border, ".concat(N40, ")")),
|
|
38
38
|
borderBottom: "2px solid ".concat("var(--ds-border, ".concat(N40, ")")),
|
|
39
39
|
/*
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
lineHeight * 2 -> Max height of two lined header
|
|
41
|
+
verticalPadding * 2 -> padding for this component itself
|
|
42
|
+
verticalPadding * 2 -> padding inside span (--container)
|
|
43
|
+
2px -> Bottom border
|
|
44
|
+
Last two terms are needed because of border-box box sizing.
|
|
45
|
+
*/
|
|
46
46
|
height: "calc(".concat(lineHeight, " * 2 + ").concat(verticalPadding, " * 4 + 2px)"),
|
|
47
47
|
verticalAlign: 'bottom',
|
|
48
48
|
backgroundColor: "var(--ds-elevation-surface-current, #FFF)"
|
|
@@ -55,7 +55,7 @@ export var TableHeading = styled.th((_styled$th = {}, _defineProperty(_styled$th
|
|
|
55
55
|
}), _defineProperty(_styled$th, "& [data-testid='datasource-header-content--container']", {
|
|
56
56
|
width: '100%',
|
|
57
57
|
/* With Button now being a parent for this component it adds its lineHeight value and spoils
|
|
58
|
-
|
|
58
|
+
`height` calculation above. */
|
|
59
59
|
lineHeight: lineHeight,
|
|
60
60
|
padding: "".concat(verticalPadding, " ", "var(--ds-space-050, 4px)"),
|
|
61
61
|
display: '-webkit-box',
|
|
@@ -24,6 +24,7 @@ import { mapSearchMethod } from '../../../analytics/utils';
|
|
|
24
24
|
import { buildDatasourceAdf } from '../../../common/utils/adf';
|
|
25
25
|
import { fetchMessagesForLocale } from '../../../common/utils/locale/fetch-messages-for-locale';
|
|
26
26
|
import { DatasourceExperienceIdProvider, useDatasourceExperienceId } from '../../../contexts/datasource-experience-id';
|
|
27
|
+
import { UserInteractionsProvider, useUserInteractions } from '../../../contexts/user-interactions';
|
|
27
28
|
import { useDatasourceTableState } from '../../../hooks/useDatasourceTableState';
|
|
28
29
|
import i18nEN from '../../../i18n/en';
|
|
29
30
|
import { useAvailableSites } from '../../../services/useAvailableSites';
|
|
@@ -97,7 +98,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
97
98
|
|
|
98
99
|
// analytics related parameters
|
|
99
100
|
var searchCount = useRef(0);
|
|
100
|
-
var
|
|
101
|
+
var userInteractions = useUserInteractions();
|
|
101
102
|
var initialSearchMethod = getBooleanFF('platform.linking-platform.datasource.show-jlol-basic-filters') && !isQueryTooComplex((initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.jql) || '') ? 'basic' : 'jql';
|
|
102
103
|
var _useState11 = useState(initialSearchMethod),
|
|
103
104
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
@@ -238,21 +239,21 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
238
239
|
basicFilterSelectionsSearchedWith.current = basicFilterSelections;
|
|
239
240
|
isSearchedWithComplexQuery.current = isQueryComplex;
|
|
240
241
|
if (jql !== newParameters.jql) {
|
|
241
|
-
|
|
242
|
+
userInteractions.add(DatasourceAction.QUERY_UPDATED);
|
|
242
243
|
}
|
|
243
244
|
setJql(newParameters.jql);
|
|
244
245
|
reset({
|
|
245
246
|
shouldForceRequest: true
|
|
246
247
|
});
|
|
247
|
-
}, [jql, reset]);
|
|
248
|
+
}, [jql, reset, userInteractions]);
|
|
248
249
|
var onSiteSelection = useCallback(function (site) {
|
|
249
|
-
|
|
250
|
+
userInteractions.add(DatasourceAction.INSTANCE_UPDATED);
|
|
250
251
|
setJql('');
|
|
251
252
|
setCloudId(site.cloudId);
|
|
252
253
|
reset({
|
|
253
254
|
shouldForceRequest: true
|
|
254
255
|
});
|
|
255
|
-
}, [reset]);
|
|
256
|
+
}, [reset, userInteractions]);
|
|
256
257
|
var retrieveUrlForSmartCardRender = useCallback(function () {
|
|
257
258
|
var _data$key;
|
|
258
259
|
var _responseItems = _slicedToArray(responseItems, 1),
|
|
@@ -282,7 +283,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
282
283
|
display: getDisplayValue(currentViewMode, totalCount || 0),
|
|
283
284
|
searchCount: searchCount.current,
|
|
284
285
|
searchMethod: mapSearchMethod(searchMethodSearchedWith.current),
|
|
285
|
-
actions:
|
|
286
|
+
actions: userInteractions.get(),
|
|
286
287
|
isQueryComplex: isSearchedWithComplexQuery.current
|
|
287
288
|
}, searchMethodSearchedWith.current === 'basic' ? _objectSpread({}, filterSelectionCount) : {}),
|
|
288
289
|
eventType: 'ui'
|
|
@@ -301,7 +302,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
301
302
|
display: getDisplayValue(currentViewMode, totalCount || 0),
|
|
302
303
|
searchCount: searchCount.current,
|
|
303
304
|
searchMethod: mapSearchMethod(searchMethodSearchedWith.current),
|
|
304
|
-
actions:
|
|
305
|
+
actions: userInteractions.get()
|
|
305
306
|
})
|
|
306
307
|
});
|
|
307
308
|
var consumerEvent = (_insertButtonClickedE = insertButtonClickedEvent.clone()) !== null && _insertButtonClickedE !== void 0 ? _insertButtonClickedE : undefined;
|
|
@@ -341,23 +342,23 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
341
342
|
}]
|
|
342
343
|
}, upToDateJqlUrl), consumerEvent);
|
|
343
344
|
}
|
|
344
|
-
}, [isParametersSet, jql, selectedJiraSite, searchBarJql, analyticsPayload, totalCount, currentViewMode, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, cloudId, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
|
|
345
|
+
}, [isParametersSet, jql, selectedJiraSite, searchBarJql, analyticsPayload, totalCount, currentViewMode, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, cloudId, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys, userInteractions]);
|
|
345
346
|
var handleViewModeChange = function handleViewModeChange(selectedMode) {
|
|
346
|
-
|
|
347
|
+
userInteractions.add(DatasourceAction.DISPLAY_VIEW_CHANGED);
|
|
347
348
|
setCurrentViewMode(selectedMode);
|
|
348
349
|
};
|
|
349
350
|
var handleOnNextPage = useCallback(function () {
|
|
350
351
|
var onNextPageProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
351
|
-
|
|
352
|
+
userInteractions.add(DatasourceAction.NEXT_PAGE_SCROLLED);
|
|
352
353
|
onNextPage(onNextPageProps);
|
|
353
|
-
}, [onNextPage]);
|
|
354
|
+
}, [onNextPage, userInteractions]);
|
|
354
355
|
var handleVisibleColumnKeysChange = useCallback(function () {
|
|
355
356
|
var newVisibleColumnKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
356
357
|
var columnAction = getColumnAction(visibleColumnKeys || [], newVisibleColumnKeys);
|
|
357
|
-
|
|
358
|
+
userInteractions.add(columnAction);
|
|
358
359
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
359
360
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
360
|
-
}, [visibleColumnKeys]);
|
|
361
|
+
}, [visibleColumnKeys, userInteractions]);
|
|
361
362
|
var issueLikeDataTableView = useMemo(function () {
|
|
362
363
|
return jsx(ContentContainer, {
|
|
363
364
|
withTableBorder: true
|
|
@@ -443,9 +444,9 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
443
444
|
var getCancelButtonAnalyticsPayload = useCallback(function () {
|
|
444
445
|
return _objectSpread(_objectSpread({}, analyticsPayload), {}, {
|
|
445
446
|
searchCount: searchCount.current,
|
|
446
|
-
actions:
|
|
447
|
+
actions: userInteractions.get()
|
|
447
448
|
});
|
|
448
|
-
}, [analyticsPayload]);
|
|
449
|
+
}, [analyticsPayload, userInteractions]);
|
|
449
450
|
return jsx(IntlMessagesProvider, {
|
|
450
451
|
defaultMessages: i18nEN,
|
|
451
452
|
loaderFn: fetchMessagesForLocale
|
|
@@ -481,7 +482,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
481
482
|
href: jqlUrl,
|
|
482
483
|
target: "_blank",
|
|
483
484
|
testId: "item-count-url"
|
|
484
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
485
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
485
486
|
,
|
|
486
487
|
style: {
|
|
487
488
|
color: "var(--ds-text-accent-gray, ".concat(N800, ")")
|
|
@@ -513,5 +514,5 @@ var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
|
513
514
|
attributes: _objectSpread({}, analyticsContextAttributes)
|
|
514
515
|
});
|
|
515
516
|
export var JiraIssuesConfigModal = withAnalyticsContext(contextData)(function (props) {
|
|
516
|
-
return jsx(DatasourceExperienceIdProvider, null, jsx(PlainJiraIssuesConfigModal, props));
|
|
517
|
+
return jsx(DatasourceExperienceIdProvider, null, jsx(UserInteractionsProvider, null, jsx(PlainJiraIssuesConfigModal, props)));
|
|
517
518
|
});
|