@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
|
@@ -25,6 +25,7 @@ var _types = require("../../../analytics/types");
|
|
|
25
25
|
var _adf = require("../../../common/utils/adf");
|
|
26
26
|
var _fetchMessagesForLocale = require("../../../common/utils/locale/fetch-messages-for-locale");
|
|
27
27
|
var _datasourceExperienceId = require("../../../contexts/datasource-experience-id");
|
|
28
|
+
var _userInteractions = require("../../../contexts/user-interactions");
|
|
28
29
|
var _useDatasourceTableState = require("../../../hooks/useDatasourceTableState");
|
|
29
30
|
var _en = _interopRequireDefault(require("../../../i18n/en"));
|
|
30
31
|
var _useAvailableSites2 = require("../../../services/useAvailableSites");
|
|
@@ -105,7 +106,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
105
106
|
|
|
106
107
|
// analytics related parameters
|
|
107
108
|
var searchCount = (0, _react.useRef)(0);
|
|
108
|
-
var
|
|
109
|
+
var userInteractions = (0, _userInteractions.useUserInteractions)();
|
|
109
110
|
var visibleColumnCount = (0, _react.useRef)((visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0);
|
|
110
111
|
var parameters = (0, _react.useMemo)(function () {
|
|
111
112
|
return _objectSpread(_objectSpread({}, initialParameters), {}, {
|
|
@@ -168,7 +169,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
168
169
|
// TODO: further refactoring in EDM-9573
|
|
169
170
|
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6829171
|
|
170
171
|
var onSiteSelection = (0, _react.useCallback)(function (site) {
|
|
171
|
-
|
|
172
|
+
userInteractions.add(_types.DatasourceAction.INSTANCE_UPDATED);
|
|
172
173
|
setSearchString(undefined);
|
|
173
174
|
setLastModified(undefined);
|
|
174
175
|
setContributorAccountIds([]);
|
|
@@ -176,7 +177,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
176
177
|
reset({
|
|
177
178
|
shouldForceRequest: true
|
|
178
179
|
});
|
|
179
|
-
}, [reset]);
|
|
180
|
+
}, [reset, userInteractions]);
|
|
180
181
|
(0, _react.useEffect)(function () {
|
|
181
182
|
var newVisibleColumnKeys = !initialVisibleColumnKeys || (initialVisibleColumnKeys || []).length === 0 ? defaultVisibleColumnKeys : initialVisibleColumnKeys;
|
|
182
183
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
@@ -194,10 +195,10 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
194
195
|
var handleVisibleColumnKeysChange = (0, _react.useCallback)(function () {
|
|
195
196
|
var newVisibleColumnKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
196
197
|
var columnAction = (0, _utils.getColumnAction)(visibleColumnKeys || [], newVisibleColumnKeys);
|
|
197
|
-
|
|
198
|
+
userInteractions.add(columnAction);
|
|
198
199
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
199
200
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
200
|
-
}, [visibleColumnKeys]);
|
|
201
|
+
}, [visibleColumnKeys, userInteractions]);
|
|
201
202
|
|
|
202
203
|
// TODO: further refactoring in EDM-9573
|
|
203
204
|
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6798258
|
|
@@ -250,9 +251,9 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
250
251
|
extensionKey: extensionKey,
|
|
251
252
|
destinationObjectTypes: destinationObjectTypes,
|
|
252
253
|
searchCount: searchCount.current,
|
|
253
|
-
actions:
|
|
254
|
+
actions: userInteractions.get()
|
|
254
255
|
};
|
|
255
|
-
}, [destinationObjectTypes, extensionKey]);
|
|
256
|
+
}, [destinationObjectTypes, extensionKey, userInteractions]);
|
|
256
257
|
var isDataReady = (visibleColumnKeys || []).length > 0;
|
|
257
258
|
var fireInlineViewedEvent = (0, _react.useCallback)(function () {
|
|
258
259
|
fireEvent('ui.link.viewed.count', _objectSpread(_objectSpread({}, analyticsPayload), {}, {
|
|
@@ -335,7 +336,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
335
336
|
display: currentViewMode === 'inline' ? _types.DatasourceDisplay.DATASOURCE_INLINE : _types.DatasourceDisplay.DATASOURCE_TABLE,
|
|
336
337
|
searchCount: searchCount.current,
|
|
337
338
|
searchMethod: _types.DatasourceSearchMethod.DATASOURCE_SEARCH_QUERY,
|
|
338
|
-
actions:
|
|
339
|
+
actions: userInteractions.get()
|
|
339
340
|
}),
|
|
340
341
|
eventType: 'ui'
|
|
341
342
|
});
|
|
@@ -372,14 +373,14 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
372
373
|
}]
|
|
373
374
|
}, confluenceSearchUrl), consumerEvent);
|
|
374
375
|
}
|
|
375
|
-
}, [isParametersSet, cloudId, analyticsPayload, totalCount, currentViewMode, onInsert, confluenceSearchUrl, datasourceId, parametersToSend, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
|
|
376
|
+
}, [isParametersSet, cloudId, analyticsPayload, totalCount, currentViewMode, onInsert, confluenceSearchUrl, datasourceId, parametersToSend, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys, userInteractions]);
|
|
376
377
|
var handleViewModeChange = function handleViewModeChange(selectedMode) {
|
|
377
|
-
|
|
378
|
+
userInteractions.add(_types.DatasourceAction.DISPLAY_VIEW_CHANGED);
|
|
378
379
|
setCurrentViewMode(selectedMode);
|
|
379
380
|
};
|
|
380
381
|
var onSearch = (0, _react.useCallback)(function (newSearchString, filters) {
|
|
381
382
|
searchCount.current++;
|
|
382
|
-
|
|
383
|
+
userInteractions.add(_types.DatasourceAction.QUERY_UPDATED);
|
|
383
384
|
if (filters) {
|
|
384
385
|
var editedOrCreatedBy = filters.editedOrCreatedBy,
|
|
385
386
|
lastModifiedList = filters.lastModified;
|
|
@@ -406,16 +407,16 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
406
407
|
reset({
|
|
407
408
|
shouldForceRequest: true
|
|
408
409
|
});
|
|
409
|
-
}, [reset]);
|
|
410
|
+
}, [reset, userInteractions]);
|
|
410
411
|
var isInsertDisabled = !isParametersSet || status === 'rejected' || status === 'unauthorized' || status === 'loading';
|
|
411
412
|
var getCancelButtonAnalyticsPayload = (0, _react.useCallback)(function () {
|
|
412
413
|
return {
|
|
413
414
|
extensionKey: extensionKey,
|
|
414
415
|
destinationObjectTypes: destinationObjectTypes,
|
|
415
416
|
searchCount: searchCount.current,
|
|
416
|
-
actions:
|
|
417
|
+
actions: userInteractions.get()
|
|
417
418
|
};
|
|
418
|
-
}, [destinationObjectTypes, extensionKey]);
|
|
419
|
+
}, [destinationObjectTypes, extensionKey, userInteractions]);
|
|
419
420
|
return (0, _react2.jsx)(_intlMessagesProvider.IntlMessagesProvider, {
|
|
420
421
|
defaultMessages: _en.default,
|
|
421
422
|
loaderFn: _fetchMessagesForLocale.fetchMessagesForLocale
|
|
@@ -448,7 +449,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
|
|
|
448
449
|
href: confluenceSearchUrl,
|
|
449
450
|
target: "_blank",
|
|
450
451
|
testId: "item-count-url"
|
|
451
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
452
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
452
453
|
,
|
|
453
454
|
style: {
|
|
454
455
|
color: "var(--ds-text-accent-gray, ".concat(_colors.N800, ")")
|
|
@@ -480,5 +481,5 @@ var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
|
480
481
|
attributes: _objectSpread({}, analyticsContextAttributes)
|
|
481
482
|
});
|
|
482
483
|
var ConfluenceSearchConfigModal = exports.ConfluenceSearchConfigModal = (0, _analyticsNext.withAnalyticsContext)(contextData)(function (props) {
|
|
483
|
-
return (0, _react2.jsx)(_datasourceExperienceId.DatasourceExperienceIdProvider, null, (0, _react2.jsx)(PlainConfluenceSearchConfigModal, props));
|
|
484
|
+
return (0, _react2.jsx)(_datasourceExperienceId.DatasourceExperienceIdProvider, null, (0, _react2.jsx)(_userInteractions.UserInteractionsProvider, null, (0, _react2.jsx)(PlainConfluenceSearchConfigModal, props)));
|
|
484
485
|
});
|
|
@@ -66,9 +66,9 @@ var DatasourceTableViewWithoutAnalytics = function DatasourceTableViewWithoutAna
|
|
|
66
66
|
var visibleColumnCount = (0, _react.useRef)((visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.length) || 0);
|
|
67
67
|
|
|
68
68
|
/* Need this to make sure that the datasource in the editor gets updated new info if any edits are made in the modal
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
But we don't want to call it on initial load. This screws up useDatasourceTableState's internal
|
|
70
|
+
mechanism of initial loading. Use of ref here makes it basically work as a `componentDidUpdate` but not `componentDidMount`
|
|
71
|
+
*/
|
|
72
72
|
var isInitialRender = (0, _react.useRef)(true);
|
|
73
73
|
var hasColumns = !!columns.length;
|
|
74
74
|
var isDataReady = hasColumns && responseItems.length > 0 && totalCount && totalCount > 0;
|
|
@@ -31,7 +31,9 @@ var ConcatenatedMenuList = exports.ConcatenatedMenuList = function ConcatenatedM
|
|
|
31
31
|
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-200, 16px)"),
|
|
32
32
|
height: 'auto'
|
|
33
33
|
};
|
|
34
|
-
var maximumLimitReachedMessage =
|
|
34
|
+
var maximumLimitReachedMessage =
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
36
|
+
(0, _react.jsx)("div", {
|
|
35
37
|
css: messageStyles,
|
|
36
38
|
style: optionStyle
|
|
37
39
|
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({
|
|
@@ -338,6 +338,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
338
338
|
ref: mainHeaderCellRef,
|
|
339
339
|
"data-testid": "".concat(id, "-column-heading"),
|
|
340
340
|
style: _objectSpread({
|
|
341
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
341
342
|
cursor: 'grab'
|
|
342
343
|
}, (0, _utils.getWidthCss)({
|
|
343
344
|
shouldUseWidth: resizeIsEnabled,
|
|
@@ -110,8 +110,11 @@ var _default = exports.default = function _default(_ref4) {
|
|
|
110
110
|
style: {
|
|
111
111
|
// the IssueLikeDataTableView wraps the table in a container with the styling below while modal doesn't
|
|
112
112
|
// this maxHeight comes from scrollableContainerHeight
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
113
114
|
maxHeight: _styled.ScrollableContainerHeight,
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
114
116
|
padding: "var(--ds-space-0, 0px)",
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
115
118
|
boxSizing: 'border-box'
|
|
116
119
|
}
|
|
117
120
|
}, (0, _react.jsx)("table", {
|
|
@@ -124,19 +127,22 @@ var _default = exports.default = function _default(_ref4) {
|
|
|
124
127
|
}, (0, _react.jsx)("tr", null, columnsToRender.map(function (_ref5) {
|
|
125
128
|
var key = _ref5.key,
|
|
126
129
|
width = _ref5.width;
|
|
127
|
-
return (
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
130
|
+
return (
|
|
131
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
132
|
+
(0, _react.jsx)(_styled.TableHeading, {
|
|
133
|
+
key: key,
|
|
134
|
+
style: {
|
|
135
|
+
width: width,
|
|
136
|
+
padding: padding
|
|
137
|
+
}
|
|
138
|
+
}, (0, _react.jsx)(_linkingCommon.Skeleton, {
|
|
139
|
+
appearance: "darkGray",
|
|
140
|
+
borderRadius: 8,
|
|
141
|
+
testId: "empty-state-skeleton",
|
|
142
|
+
height: 12,
|
|
143
|
+
width: width
|
|
144
|
+
}))
|
|
145
|
+
);
|
|
140
146
|
}))), (0, _react.jsx)("tbody", {
|
|
141
147
|
css: tableBodyStyles
|
|
142
148
|
}, rows.map(function (row) {
|
|
@@ -584,7 +584,9 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
584
584
|
*/
|
|
585
585
|
contentEditable: false,
|
|
586
586
|
ref: containerRef,
|
|
587
|
-
css: [tableContainerStyles, scrollableContainerHeight && scrollableContainerStyles]
|
|
587
|
+
css: [tableContainerStyles, scrollableContainerHeight && scrollableContainerStyles]
|
|
588
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
589
|
+
,
|
|
588
590
|
style: scrollableContainerHeight ? {
|
|
589
591
|
maxHeight: "".concat(scrollableContainerHeight, "px")
|
|
590
592
|
} : undefined,
|
|
@@ -593,13 +595,17 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
593
595
|
setWidth: (0, _debounce.default)(setTableContainerWidth, 100)
|
|
594
596
|
}), (0, _react2.jsx)(_styled2.Table, {
|
|
595
597
|
css: tableStyles,
|
|
596
|
-
"data-testid": testId
|
|
598
|
+
"data-testid": testId
|
|
599
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
600
|
+
,
|
|
597
601
|
style: shouldUseWidth ? {
|
|
598
602
|
tableLayout: 'fixed'
|
|
599
603
|
} : {}
|
|
600
604
|
}, (0, _react2.jsx)("thead", {
|
|
601
605
|
"data-testid": testId && "".concat(testId, "--head"),
|
|
602
|
-
css: [noDefaultBorderStyles, tableHeadStyles]
|
|
606
|
+
css: [noDefaultBorderStyles, tableHeadStyles]
|
|
607
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
608
|
+
,
|
|
603
609
|
className: !!onVisibleColumnKeysChange ? 'has-column-picker' : ''
|
|
604
610
|
}, (0, _react2.jsx)("tr", {
|
|
605
611
|
ref: tableHeaderRowRef
|
|
@@ -652,7 +658,9 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
652
658
|
} else {
|
|
653
659
|
return (0, _react2.jsx)(_styled2.TableHeading, {
|
|
654
660
|
key: key,
|
|
655
|
-
"data-testid": "".concat(key, "-column-heading")
|
|
661
|
+
"data-testid": "".concat(key, "-column-heading")
|
|
662
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
663
|
+
,
|
|
656
664
|
style: (0, _utils.getWidthCss)({
|
|
657
665
|
shouldUseWidth: shouldUseWidth,
|
|
658
666
|
width: width
|
|
@@ -693,7 +701,9 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
693
701
|
return (0, _react2.jsx)(TableCell, {
|
|
694
702
|
key: cellKey,
|
|
695
703
|
"data-testid": testId && "".concat(testId, "--cell-").concat(cellIndex),
|
|
696
|
-
colSpan: isEditable && isLastCell ? 2 : undefined
|
|
704
|
+
colSpan: isEditable && isLastCell ? 2 : undefined
|
|
705
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
706
|
+
,
|
|
697
707
|
style: loadingRowStyle,
|
|
698
708
|
css: [wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 && wrappedColumnKeys.includes(cellKey) ? null : truncateStyles]
|
|
699
709
|
}, content);
|
|
@@ -33,10 +33,10 @@ function getFormattedDate(value) {
|
|
|
33
33
|
var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'datetime';
|
|
34
34
|
var formatDate = arguments.length > 2 ? arguments[2] : undefined;
|
|
35
35
|
/* In some cases we get a value of `2023-12-20` which when parsed by JS assumes meantime timezone, causing the date
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
to be one day off in some timezones. We want it to display the date without converting timezones and a solution
|
|
37
|
+
is to replace the hyphens with slashes. So it should be 20th Dec regardless of the timezone in this case.
|
|
38
|
+
See https://stackoverflow.com/a/31732581
|
|
39
|
+
*/
|
|
40
40
|
var dateValue = /^\d{4}-\d{2}-\d{2}$/.exec(value) ? value.replace(/-/g, '/') : value;
|
|
41
41
|
var date = new Date(dateValue);
|
|
42
42
|
if (!value || isNaN(date.getTime())) {
|
|
@@ -23,7 +23,9 @@ var IconRenderType = function IconRenderType(_ref) {
|
|
|
23
23
|
return /*#__PURE__*/_react.default.createElement(IconWrapper, null, /*#__PURE__*/_react.default.createElement(_image.default, {
|
|
24
24
|
src: source,
|
|
25
25
|
alt: label,
|
|
26
|
-
"data-testid": testId
|
|
26
|
+
"data-testid": testId
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
28
|
+
,
|
|
27
29
|
style: {
|
|
28
30
|
minWidth: '20px',
|
|
29
31
|
maxWidth: '20px'
|
|
@@ -39,7 +39,9 @@ var LinkRenderType = function LinkRenderType(_ref) {
|
|
|
39
39
|
return /*#__PURE__*/_react.default.createElement(_hoverCard.HoverCard, {
|
|
40
40
|
url: url
|
|
41
41
|
}, /*#__PURE__*/_react.default.createElement(_linkUrl.default, {
|
|
42
|
-
href: url
|
|
42
|
+
href: url
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
44
|
+
,
|
|
43
45
|
style: _objectSpread(_objectSpread({}, linkStyle), {}, {
|
|
44
46
|
fontSize: _styled.fieldTextFontSize
|
|
45
47
|
}),
|
|
@@ -44,12 +44,12 @@ var TableHeading = exports.TableHeading = _styled.default.th((_styled$th = {}, (
|
|
|
44
44
|
borderRight: "0.5px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
45
45
|
borderBottom: "2px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
46
46
|
/*
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
lineHeight * 2 -> Max height of two lined header
|
|
48
|
+
verticalPadding * 2 -> padding for this component itself
|
|
49
|
+
verticalPadding * 2 -> padding inside span (--container)
|
|
50
|
+
2px -> Bottom border
|
|
51
|
+
Last two terms are needed because of border-box box sizing.
|
|
52
|
+
*/
|
|
53
53
|
height: "calc(".concat(lineHeight, " * 2 + ").concat(verticalPadding, " * 4 + 2px)"),
|
|
54
54
|
verticalAlign: 'bottom',
|
|
55
55
|
backgroundColor: "var(--ds-elevation-surface-current, #FFF)"
|
|
@@ -62,7 +62,7 @@ var TableHeading = exports.TableHeading = _styled.default.th((_styled$th = {}, (
|
|
|
62
62
|
}), (0, _defineProperty2.default)(_styled$th, "& [data-testid='datasource-header-content--container']", {
|
|
63
63
|
width: '100%',
|
|
64
64
|
/* With Button now being a parent for this component it adds its lineHeight value and spoils
|
|
65
|
-
|
|
65
|
+
`height` calculation above. */
|
|
66
66
|
lineHeight: lineHeight,
|
|
67
67
|
padding: "".concat(verticalPadding, " ", "var(--ds-space-050, 4px)"),
|
|
68
68
|
display: '-webkit-box',
|
|
@@ -28,6 +28,7 @@ var _utils = require("../../../analytics/utils");
|
|
|
28
28
|
var _adf = require("../../../common/utils/adf");
|
|
29
29
|
var _fetchMessagesForLocale = require("../../../common/utils/locale/fetch-messages-for-locale");
|
|
30
30
|
var _datasourceExperienceId = require("../../../contexts/datasource-experience-id");
|
|
31
|
+
var _userInteractions = require("../../../contexts/user-interactions");
|
|
31
32
|
var _useDatasourceTableState = require("../../../hooks/useDatasourceTableState");
|
|
32
33
|
var _en = _interopRequireDefault(require("../../../i18n/en"));
|
|
33
34
|
var _useAvailableSites2 = require("../../../services/useAvailableSites");
|
|
@@ -103,7 +104,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
103
104
|
|
|
104
105
|
// analytics related parameters
|
|
105
106
|
var searchCount = (0, _react.useRef)(0);
|
|
106
|
-
var
|
|
107
|
+
var userInteractions = (0, _userInteractions.useUserInteractions)();
|
|
107
108
|
var initialSearchMethod = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.datasource.show-jlol-basic-filters') && !(0, _isQueryTooComplex.isQueryTooComplex)((initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.jql) || '') ? 'basic' : 'jql';
|
|
108
109
|
var _useState11 = (0, _react.useState)(initialSearchMethod),
|
|
109
110
|
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
@@ -244,21 +245,21 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
244
245
|
basicFilterSelectionsSearchedWith.current = basicFilterSelections;
|
|
245
246
|
isSearchedWithComplexQuery.current = isQueryComplex;
|
|
246
247
|
if (jql !== newParameters.jql) {
|
|
247
|
-
|
|
248
|
+
userInteractions.add(_types.DatasourceAction.QUERY_UPDATED);
|
|
248
249
|
}
|
|
249
250
|
setJql(newParameters.jql);
|
|
250
251
|
reset({
|
|
251
252
|
shouldForceRequest: true
|
|
252
253
|
});
|
|
253
|
-
}, [jql, reset]);
|
|
254
|
+
}, [jql, reset, userInteractions]);
|
|
254
255
|
var onSiteSelection = (0, _react.useCallback)(function (site) {
|
|
255
|
-
|
|
256
|
+
userInteractions.add(_types.DatasourceAction.INSTANCE_UPDATED);
|
|
256
257
|
setJql('');
|
|
257
258
|
setCloudId(site.cloudId);
|
|
258
259
|
reset({
|
|
259
260
|
shouldForceRequest: true
|
|
260
261
|
});
|
|
261
|
-
}, [reset]);
|
|
262
|
+
}, [reset, userInteractions]);
|
|
262
263
|
var retrieveUrlForSmartCardRender = (0, _react.useCallback)(function () {
|
|
263
264
|
var _data$key;
|
|
264
265
|
var _responseItems = (0, _slicedToArray2.default)(responseItems, 1),
|
|
@@ -288,7 +289,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
288
289
|
display: getDisplayValue(currentViewMode, totalCount || 0),
|
|
289
290
|
searchCount: searchCount.current,
|
|
290
291
|
searchMethod: (0, _utils.mapSearchMethod)(searchMethodSearchedWith.current),
|
|
291
|
-
actions:
|
|
292
|
+
actions: userInteractions.get(),
|
|
292
293
|
isQueryComplex: isSearchedWithComplexQuery.current
|
|
293
294
|
}, searchMethodSearchedWith.current === 'basic' ? _objectSpread({}, filterSelectionCount) : {}),
|
|
294
295
|
eventType: 'ui'
|
|
@@ -307,7 +308,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
307
308
|
display: getDisplayValue(currentViewMode, totalCount || 0),
|
|
308
309
|
searchCount: searchCount.current,
|
|
309
310
|
searchMethod: (0, _utils.mapSearchMethod)(searchMethodSearchedWith.current),
|
|
310
|
-
actions:
|
|
311
|
+
actions: userInteractions.get()
|
|
311
312
|
})
|
|
312
313
|
});
|
|
313
314
|
var consumerEvent = (_insertButtonClickedE = insertButtonClickedEvent.clone()) !== null && _insertButtonClickedE !== void 0 ? _insertButtonClickedE : undefined;
|
|
@@ -347,23 +348,23 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
347
348
|
}]
|
|
348
349
|
}, upToDateJqlUrl), consumerEvent);
|
|
349
350
|
}
|
|
350
|
-
}, [isParametersSet, jql, selectedJiraSite, searchBarJql, analyticsPayload, totalCount, currentViewMode, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, cloudId, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
|
|
351
|
+
}, [isParametersSet, jql, selectedJiraSite, searchBarJql, analyticsPayload, totalCount, currentViewMode, retrieveUrlForSmartCardRender, responseItems.length, onInsert, datasourceId, cloudId, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys, userInteractions]);
|
|
351
352
|
var handleViewModeChange = function handleViewModeChange(selectedMode) {
|
|
352
|
-
|
|
353
|
+
userInteractions.add(_types.DatasourceAction.DISPLAY_VIEW_CHANGED);
|
|
353
354
|
setCurrentViewMode(selectedMode);
|
|
354
355
|
};
|
|
355
356
|
var handleOnNextPage = (0, _react.useCallback)(function () {
|
|
356
357
|
var onNextPageProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
357
|
-
|
|
358
|
+
userInteractions.add(_types.DatasourceAction.NEXT_PAGE_SCROLLED);
|
|
358
359
|
onNextPage(onNextPageProps);
|
|
359
|
-
}, [onNextPage]);
|
|
360
|
+
}, [onNextPage, userInteractions]);
|
|
360
361
|
var handleVisibleColumnKeysChange = (0, _react.useCallback)(function () {
|
|
361
362
|
var newVisibleColumnKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
362
363
|
var columnAction = (0, _utils2.getColumnAction)(visibleColumnKeys || [], newVisibleColumnKeys);
|
|
363
|
-
|
|
364
|
+
userInteractions.add(columnAction);
|
|
364
365
|
visibleColumnCount.current = newVisibleColumnKeys.length;
|
|
365
366
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
366
|
-
}, [visibleColumnKeys]);
|
|
367
|
+
}, [visibleColumnKeys, userInteractions]);
|
|
367
368
|
var issueLikeDataTableView = (0, _react.useMemo)(function () {
|
|
368
369
|
return (0, _react2.jsx)(_contentContainer.ContentContainer, {
|
|
369
370
|
withTableBorder: true
|
|
@@ -449,9 +450,9 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
449
450
|
var getCancelButtonAnalyticsPayload = (0, _react.useCallback)(function () {
|
|
450
451
|
return _objectSpread(_objectSpread({}, analyticsPayload), {}, {
|
|
451
452
|
searchCount: searchCount.current,
|
|
452
|
-
actions:
|
|
453
|
+
actions: userInteractions.get()
|
|
453
454
|
});
|
|
454
|
-
}, [analyticsPayload]);
|
|
455
|
+
}, [analyticsPayload, userInteractions]);
|
|
455
456
|
return (0, _react2.jsx)(_intlMessagesProvider.IntlMessagesProvider, {
|
|
456
457
|
defaultMessages: _en.default,
|
|
457
458
|
loaderFn: _fetchMessagesForLocale.fetchMessagesForLocale
|
|
@@ -487,7 +488,7 @@ var PlainJiraIssuesConfigModal = function PlainJiraIssuesConfigModal(props) {
|
|
|
487
488
|
href: jqlUrl,
|
|
488
489
|
target: "_blank",
|
|
489
490
|
testId: "item-count-url"
|
|
490
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
491
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
491
492
|
,
|
|
492
493
|
style: {
|
|
493
494
|
color: "var(--ds-text-accent-gray, ".concat(_colors.N800, ")")
|
|
@@ -519,5 +520,5 @@ var contextData = _objectSpread(_objectSpread({}, analyticsContextData), {}, {
|
|
|
519
520
|
attributes: _objectSpread({}, analyticsContextAttributes)
|
|
520
521
|
});
|
|
521
522
|
var JiraIssuesConfigModal = exports.JiraIssuesConfigModal = (0, _analyticsNext.withAnalyticsContext)(contextData)(function (props) {
|
|
522
|
-
return (0, _react2.jsx)(_datasourceExperienceId.DatasourceExperienceIdProvider, null, (0, _react2.jsx)(PlainJiraIssuesConfigModal, props));
|
|
523
|
+
return (0, _react2.jsx)(_datasourceExperienceId.DatasourceExperienceIdProvider, null, (0, _react2.jsx)(_userInteractions.UserInteractionsProvider, null, (0, _react2.jsx)(PlainJiraIssuesConfigModal, props)));
|
|
523
524
|
});
|
|
@@ -88,6 +88,7 @@ var TableFooter = exports.TableFooter = function TableFooter(_ref) {
|
|
|
88
88
|
target: "_blank",
|
|
89
89
|
testId: "item-count-url",
|
|
90
90
|
style: {
|
|
91
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
91
92
|
color: "var(--ds-text-accent-gray, ".concat(_colors.N800, ")"),
|
|
92
93
|
textDecoration: !url ? 'none' : ''
|
|
93
94
|
}
|
|
@@ -40,7 +40,9 @@ var PoweredByJSMAssets = exports.PoweredByJSMAssets = function PoweredByJSMAsset
|
|
|
40
40
|
rel: "noreferrer",
|
|
41
41
|
target: "_blank",
|
|
42
42
|
style: {
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
43
44
|
display: 'inline-flex',
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
44
46
|
alignItems: 'center'
|
|
45
47
|
}
|
|
46
48
|
}, /*#__PURE__*/_react.default.createElement(_logo.JiraServiceManagementIcon, {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { useContext, useMemo, useRef } from 'react';
|
|
2
|
+
const UserInteractionsContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
const UserInteractionsProvider = ({
|
|
4
|
+
children
|
|
5
|
+
}) => {
|
|
6
|
+
const userInteractionActions = useRef(new Set());
|
|
7
|
+
const providerValue = useMemo(() => {
|
|
8
|
+
return {
|
|
9
|
+
add: action => {
|
|
10
|
+
userInteractionActions.current.add(action);
|
|
11
|
+
},
|
|
12
|
+
get: () => Array.from(userInteractionActions.current)
|
|
13
|
+
};
|
|
14
|
+
}, []);
|
|
15
|
+
return /*#__PURE__*/React.createElement(UserInteractionsContext.Provider, {
|
|
16
|
+
value: providerValue
|
|
17
|
+
}, children);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Use this hook to track user activities. This is mainly used to populate analytic events with
|
|
22
|
+
* a trail of user activities.
|
|
23
|
+
*
|
|
24
|
+
* @returns an object that can track datasource actions and retrieve the actions that have been tracked.
|
|
25
|
+
*/
|
|
26
|
+
const useUserInteractions = () => {
|
|
27
|
+
const context = useContext(UserInteractionsContext);
|
|
28
|
+
if (!context) {
|
|
29
|
+
throw new Error('useUserInteractions() must be wrapped in <UserInteractionsProvider>');
|
|
30
|
+
}
|
|
31
|
+
return context;
|
|
32
|
+
};
|
|
33
|
+
export { UserInteractionsProvider, useUserInteractions };
|
|
@@ -92,9 +92,9 @@ export const useDatasourceTableState = ({
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/*Jira adds identifier fields like id and key to all data responses
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
Since defaultProperties already send back the keyField, we are accounting only
|
|
96
|
+
for the idField when we are using defaultProperties
|
|
97
|
+
*/
|
|
98
98
|
if (properties.length > fieldKeys.length + idFieldCount + keyFieldCount && properties.length > defaultProperties.length + idFieldCount) {
|
|
99
99
|
setFullSchema(schema);
|
|
100
100
|
}
|
|
@@ -51,9 +51,9 @@ export const useValidateAqlText = (workspaceId, initialValue) => {
|
|
|
51
51
|
}, [workspaceId, fireEvent]);
|
|
52
52
|
|
|
53
53
|
/* Debounce async validation for input, validation is also called on every field change
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
in a form so we need to also memoize. The async validate function is expected to either:
|
|
55
|
+
Immediately return a promise (which is then collected into an array, every single time validation is run),
|
|
56
|
+
or immediately return either undefined or an error message */
|
|
57
57
|
const debouncedValidation = value => new Promise(resolve => {
|
|
58
58
|
if (timeout.current) {
|
|
59
59
|
timeout.current();
|
package/dist/es2019/i18n/cs.js
CHANGED
|
@@ -33,24 +33,31 @@ export default {
|
|
|
33
33
|
'linkDataSource.basic-filter.status.label': 'Stav',
|
|
34
34
|
'linkDataSource.basic-filter.type.label': 'Typ',
|
|
35
35
|
'linkDataSource.checkConnection': 'Zkontrolujte připojení a obnovte stránku nebo to zkuste znovu později.',
|
|
36
|
+
'linkDataSource.clol-basic-filter.editedOrCreatedBy.label': 'Upraveno nebo vytvořeno uživatelem',
|
|
36
37
|
'linkDataSource.column-picker.no-all-items-shown-message.line-1': 'Vaše vyhledávání vrátilo příliš mnoho výsledků.',
|
|
37
38
|
'linkDataSource.column-picker.no-all-items-shown-message.line-2': 'Zkuste to znovu s konkrétnějšími klíčovými slovy.',
|
|
38
39
|
'linkDataSource.column-picker.search': 'Vyhledat pole',
|
|
39
40
|
'linkDataSource.column-picker.tooltip': 'Konfigurovat sloupce',
|
|
40
41
|
'linkDataSource.configmodal.basicTextSearchPlaceholder': 'Vyhledat požadavky pomocí klíčového slova',
|
|
41
42
|
'linkDataSource.configmodal.cancelButtonText': 'Zrušit',
|
|
42
|
-
'linkDataSource.configmodal.inlineLinkViewModeDescription': 'Zobrazit počet výsledků vyhledávání nebo jako vložený chytrý odkaz',
|
|
43
|
-
'linkDataSource.configmodal.inlineLinkViewModeLabel': 'Vložený odkaz',
|
|
44
|
-
'linkDataSource.configmodal.tableViewModeDescription': 'Zobrazit výsledky vyhledávání jako tabulku',
|
|
45
|
-
'linkDataSource.configmodal.tableViewModeLabel': 'Tabulka',
|
|
46
43
|
'linkDataSource.confluence-search.configmodal.cancelButtonText': 'Zrušit',
|
|
44
|
+
'linkDataSource.confluence-search.configmodal.date.range.after.label': 'po {date}',
|
|
47
45
|
'linkDataSource.confluence-search.configmodal.date.range.any.time': 'Kdykoliv',
|
|
46
|
+
'linkDataSource.confluence-search.configmodal.date.range.before.label': 'před {date}',
|
|
48
47
|
'linkDataSource.confluence-search.configmodal.date.range.custom': 'Vlastní',
|
|
48
|
+
'linkDataSource.confluence-search.configmodal.date.range.custom.invalid.after.end': 'Datum Od musí být před datem Do.',
|
|
49
|
+
'linkDataSource.confluence-search.configmodal.date.range.custom.invalid.after.today': 'Datum Od nesmí být v budoucnosti.',
|
|
50
|
+
'linkDataSource.confluence-search.configmodal.date.range.custom.invalid.to.after.today': 'Datum Do nesmí být v budoucnosti.',
|
|
51
|
+
'linkDataSource.confluence-search.configmodal.date.range.from': 'Od',
|
|
52
|
+
'linkDataSource.confluence-search.configmodal.date.range.input.placeholder': 'Vyberte datum.',
|
|
49
53
|
'linkDataSource.confluence-search.configmodal.date.range.last.month': 'Posledních 30 dní',
|
|
50
54
|
'linkDataSource.confluence-search.configmodal.date.range.last.week': 'Posledních 7 dní',
|
|
51
55
|
'linkDataSource.confluence-search.configmodal.date.range.last.year': 'Poslední rok',
|
|
52
56
|
'linkDataSource.confluence-search.configmodal.date.range.title': 'Naposledy aktualizováno',
|
|
57
|
+
'linkDataSource.confluence-search.configmodal.date.range.to': 'Do',
|
|
58
|
+
'linkDataSource.confluence-search.configmodal.date.range.to.Label': 'do',
|
|
53
59
|
'linkDataSource.confluence-search.configmodal.date.range.today': 'Dnes',
|
|
60
|
+
'linkDataSource.confluence-search.configmodal.date.range.update.button': 'Aktualizovat',
|
|
54
61
|
'linkDataSource.confluence-search.configmodal.date.range.yesterday': 'Včera',
|
|
55
62
|
'linkDataSource.confluence-search.configmodal.insertConfluenceTitle': 'Vložit seznam Confluence',
|
|
56
63
|
'linkDataSource.confluence-search.configmodal.insertConfluenceTitleManySites': 'Vložit seznam Confluence z:',
|
|
@@ -75,14 +82,14 @@ export default {
|
|
|
75
82
|
'linkDataSource.jira-issues.configmodal.basicModeText': 'Základní',
|
|
76
83
|
'linkDataSource.jira-issues.configmodal.basicTextSearchPlaceholder': 'Vyhledat požadavky pomocí klíčového slova',
|
|
77
84
|
'linkDataSource.jira-issues.configmodal.chooseSite': 'Vyberte web.',
|
|
78
|
-
'linkDataSource.jira-issues.configmodal.inlineLinkViewModeDescription': 'Zobrazit počet výsledků vyhledávání nebo jako vložený chytrý odkaz',
|
|
79
|
-
'linkDataSource.jira-issues.configmodal.inlineLinkViewModeLabel': 'Vložený odkaz',
|
|
80
85
|
'linkDataSource.jira-issues.configmodal.insertIssuesButtonText': 'Vložit požadavky',
|
|
81
86
|
'linkDataSource.jira-issues.configmodal.insertIssuesTitle': 'Vložit požadavky Jira',
|
|
82
87
|
'linkDataSource.jira-issues.configmodal.insertIssuesTitleManySites': 'Vložit požadavky Jira z:',
|
|
83
88
|
'linkDataSource.jira-issues.configmodal.issue': '{totalCount, plural, one {požadavek} few {požadavky} many {požadavku} other {požadavků}}',
|
|
84
|
-
'linkDataSource.jira-issues.configmodal.
|
|
85
|
-
'linkDataSource.jira-issues.configmodal.
|
|
89
|
+
'linkDataSource.jira-issues.configmodal.viewModeInlineLinkDescription': 'Zobrazit počet výsledků vyhledávání jako vložený chytrý odkaz',
|
|
90
|
+
'linkDataSource.jira-issues.configmodal.viewModeInlineLinkLabel': 'Vložený odkaz',
|
|
91
|
+
'linkDataSource.jira-issues.configmodal.viewModeListDescription': 'Zobrazit výsledky vyhledávání jako seznam',
|
|
92
|
+
'linkDataSource.jira-issues.configmodal.viewModeListLabel': 'Sloupec',
|
|
86
93
|
'linkDataSource.jira-issues.learnMoreLink': 'Jak vyhledávat pomocí JQL',
|
|
87
94
|
'linkDataSource.jira-issues.no.jira.sites.access.description': 'Chcete-li požádat o přístup, obraťte se na správce.',
|
|
88
95
|
'linkDataSource.jira-issues.no.jira.sites.access.title': 'Nemáte přístup k žádným webům Jira',
|