@atlaskit/link-datasource 6.5.0 → 6.7.0
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 +43 -0
- package/dist/cjs/analytics/generated/use-analytics-events.js +2 -2
- package/dist/cjs/analytics/ufoExperiences/index.js +11 -10
- package/dist/cjs/analytics/wrappers/render-failed/datasourceRenderFailedAnalyticsWrapper.js +2 -2
- package/dist/cjs/hooks/useAssetsClient.js +2 -2
- package/dist/cjs/hooks/useDatasourceTableFlag.js +2 -2
- package/dist/cjs/hooks/useLoadOptions.js +2 -2
- package/dist/cjs/services/getAvailableSites.js +2 -2
- package/dist/cjs/ui/assets-modal/modal/index.js +11 -7
- package/dist/cjs/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +1 -1
- package/dist/cjs/ui/assets-modal/search-container/aql-search-input/index.js +13 -11
- package/dist/cjs/ui/assets-modal/search-container/index.js +3 -3
- package/dist/cjs/ui/assets-modal/search-container/object-schema-select/index.js +6 -6
- package/dist/cjs/ui/common/error-state/access-required.js +1 -1
- package/dist/cjs/ui/common/error-state/loading-error.js +1 -1
- package/dist/cjs/ui/common/error-state/modal-loading-error.js +2 -2
- package/dist/cjs/ui/common/error-state/provider-auth-required.js +9 -8
- package/dist/cjs/ui/common/initial-state-view/index.js +2 -2
- package/dist/cjs/ui/common/modal/basic-search-input/index.js +6 -6
- package/dist/cjs/ui/common/modal/datasource-context/index.js +4 -2
- package/dist/cjs/ui/common/modal/datasource-modal/createDatasourceModal.js +2 -2
- package/dist/cjs/ui/common/modal/datasource-modal/index.js +1 -1
- package/dist/cjs/ui/common/modal/datasources-table-in-modal-preview/index.js +5 -1
- package/dist/cjs/ui/common/modal/datasources-table-in-modal-preview/use-column-wrapping/index.js +22 -0
- package/dist/cjs/ui/common/modal/display-view-dropdown/display-view-drop-down.js +9 -9
- package/dist/cjs/ui/common/modal/mode-switcher/index.js +2 -2
- package/dist/cjs/ui/common/modal/popup-select/control.js +2 -2
- package/dist/cjs/ui/common/modal/popup-select/custom-checkbox-option.js +4 -4
- package/dist/cjs/ui/common/modal/popup-select/dropdownIndicator.js +2 -2
- package/dist/cjs/ui/common/modal/popup-select/formatOptionLabel.js +2 -2
- package/dist/cjs/ui/common/modal/popup-select/index.js +2 -2
- package/dist/cjs/ui/common/modal/popup-select/menu-list/index.js +3 -3
- package/dist/cjs/ui/common/modal/popup-select/menu-list/loadingMessage.js +1 -1
- package/dist/cjs/ui/common/modal/popup-select/menu-list/selectMessage.js +1 -1
- package/dist/cjs/ui/common/modal/popup-select/menu-list/showMoreButton.js +2 -2
- package/dist/cjs/ui/common/modal/popup-select/trigger.js +4 -4
- package/dist/cjs/ui/common/modal/search-count/index.js +2 -2
- package/dist/cjs/ui/common/modal/site-selector/index.js +5 -5
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +2 -2
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +2 -2
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +13 -9
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +13 -9
- package/dist/cjs/ui/issue-like-table/column-picker/concatenated-menu-list.js +5 -4
- package/dist/cjs/ui/issue-like-table/column-picker/index.js +20 -6
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +19 -17
- package/dist/cjs/ui/issue-like-table/edit-type/icon/index.js +4 -4
- package/dist/cjs/ui/issue-like-table/edit-type/status/index.js +5 -5
- package/dist/cjs/ui/issue-like-table/edit-type/text/index.js +2 -2
- package/dist/cjs/ui/issue-like-table/edit-type/user/index.js +7 -6
- package/dist/cjs/ui/issue-like-table/index.compiled.css +3 -0
- package/dist/cjs/ui/issue-like-table/index.js +155 -102
- package/dist/cjs/ui/issue-like-table/render-type/status/index.js +1 -1
- package/dist/cjs/ui/issue-like-table/render-type/tag/index.js +2 -2
- package/dist/cjs/ui/issue-like-table/render-type/user/index.js +4 -4
- package/dist/cjs/ui/issue-like-table/shared-components/avatar/index.js +3 -3
- package/dist/cjs/ui/issue-like-table/table-cell-content/index.js +13 -20
- package/dist/cjs/ui/issue-like-table/table-cell-content/inline-edit.js +1 -1
- package/dist/cjs/ui/issue-like-table/table-settings-menu/index.compiled.css +6 -0
- package/dist/cjs/ui/issue-like-table/table-settings-menu/index.js +96 -0
- package/dist/cjs/ui/issue-like-table/table-settings-menu/messages.js +24 -0
- package/dist/cjs/ui/jira-issues-modal/jql-editor/index.js +2 -2
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +15 -10
- package/dist/cjs/ui/table-footer/index.js +2 -2
- package/dist/es2019/analytics/generated/use-analytics-events.js +1 -1
- package/dist/es2019/analytics/ufoExperiences/index.js +2 -1
- package/dist/es2019/analytics/wrappers/render-failed/datasourceRenderFailedAnalyticsWrapper.js +1 -1
- package/dist/es2019/hooks/useAssetsClient.js +1 -1
- package/dist/es2019/hooks/useDatasourceTableFlag.js +1 -1
- package/dist/es2019/hooks/useLoadOptions.js +1 -1
- package/dist/es2019/services/getAvailableSites.js +1 -1
- package/dist/es2019/ui/assets-modal/modal/index.js +6 -2
- package/dist/es2019/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +1 -1
- package/dist/es2019/ui/assets-modal/search-container/aql-search-input/index.js +8 -6
- package/dist/es2019/ui/assets-modal/search-container/index.js +2 -2
- package/dist/es2019/ui/assets-modal/search-container/object-schema-select/index.js +3 -3
- package/dist/es2019/ui/common/error-state/access-required.js +1 -1
- package/dist/es2019/ui/common/error-state/loading-error.js +1 -1
- package/dist/es2019/ui/common/error-state/modal-loading-error.js +1 -1
- package/dist/es2019/ui/common/error-state/provider-auth-required.js +5 -4
- package/dist/es2019/ui/common/initial-state-view/index.js +2 -2
- package/dist/es2019/ui/common/modal/basic-search-input/index.js +3 -3
- package/dist/es2019/ui/common/modal/datasource-context/index.js +4 -2
- package/dist/es2019/ui/common/modal/datasource-modal/createDatasourceModal.js +1 -1
- package/dist/es2019/ui/common/modal/datasource-modal/index.js +1 -1
- package/dist/es2019/ui/common/modal/datasources-table-in-modal-preview/index.js +5 -1
- package/dist/es2019/ui/common/modal/datasources-table-in-modal-preview/use-column-wrapping/index.js +22 -0
- package/dist/es2019/ui/common/modal/display-view-dropdown/display-view-drop-down.js +5 -3
- package/dist/es2019/ui/common/modal/mode-switcher/index.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/control.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/custom-checkbox-option.js +2 -2
- package/dist/es2019/ui/common/modal/popup-select/dropdownIndicator.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/formatOptionLabel.js +2 -2
- package/dist/es2019/ui/common/modal/popup-select/index.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/menu-list/index.js +2 -2
- package/dist/es2019/ui/common/modal/popup-select/menu-list/loadingMessage.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/menu-list/selectMessage.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/menu-list/showMoreButton.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/trigger.js +3 -3
- package/dist/es2019/ui/common/modal/search-count/index.js +1 -1
- package/dist/es2019/ui/common/modal/site-selector/index.js +3 -3
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +1 -1
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +1 -1
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +7 -3
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +7 -3
- package/dist/es2019/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/es2019/ui/issue-like-table/column-picker/index.js +36 -20
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +11 -9
- package/dist/es2019/ui/issue-like-table/edit-type/icon/index.js +2 -2
- package/dist/es2019/ui/issue-like-table/edit-type/status/index.js +3 -3
- package/dist/es2019/ui/issue-like-table/edit-type/text/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/edit-type/user/index.js +4 -3
- package/dist/es2019/ui/issue-like-table/index.compiled.css +3 -0
- package/dist/es2019/ui/issue-like-table/index.js +59 -11
- package/dist/es2019/ui/issue-like-table/render-type/status/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/render-type/tag/index.js +1 -1
- package/dist/es2019/ui/issue-like-table/render-type/user/index.js +3 -3
- package/dist/es2019/ui/issue-like-table/shared-components/avatar/index.js +2 -2
- package/dist/es2019/ui/issue-like-table/table-cell-content/index.js +12 -19
- package/dist/es2019/ui/issue-like-table/table-cell-content/inline-edit.js +1 -1
- package/dist/es2019/ui/issue-like-table/table-settings-menu/index.compiled.css +6 -0
- package/dist/es2019/ui/issue-like-table/table-settings-menu/index.js +76 -0
- package/dist/es2019/ui/issue-like-table/table-settings-menu/messages.js +18 -0
- package/dist/es2019/ui/jira-issues-modal/jql-editor/index.js +1 -1
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +8 -3
- package/dist/es2019/ui/table-footer/index.js +1 -1
- package/dist/esm/analytics/generated/use-analytics-events.js +1 -1
- package/dist/esm/analytics/ufoExperiences/index.js +2 -1
- package/dist/esm/analytics/wrappers/render-failed/datasourceRenderFailedAnalyticsWrapper.js +1 -1
- package/dist/esm/hooks/useAssetsClient.js +1 -1
- package/dist/esm/hooks/useDatasourceTableFlag.js +1 -1
- package/dist/esm/hooks/useLoadOptions.js +1 -1
- package/dist/esm/services/getAvailableSites.js +1 -1
- package/dist/esm/ui/assets-modal/modal/index.js +6 -2
- package/dist/esm/ui/assets-modal/modal/render-assets-content/initial-state-view/index.js +1 -1
- package/dist/esm/ui/assets-modal/search-container/aql-search-input/index.js +8 -6
- package/dist/esm/ui/assets-modal/search-container/index.js +2 -2
- package/dist/esm/ui/assets-modal/search-container/object-schema-select/index.js +3 -3
- package/dist/esm/ui/common/error-state/access-required.js +1 -1
- package/dist/esm/ui/common/error-state/loading-error.js +1 -1
- package/dist/esm/ui/common/error-state/modal-loading-error.js +1 -1
- package/dist/esm/ui/common/error-state/provider-auth-required.js +5 -4
- package/dist/esm/ui/common/initial-state-view/index.js +2 -2
- package/dist/esm/ui/common/modal/basic-search-input/index.js +3 -3
- package/dist/esm/ui/common/modal/datasource-context/index.js +4 -2
- package/dist/esm/ui/common/modal/datasource-modal/createDatasourceModal.js +1 -1
- package/dist/esm/ui/common/modal/datasource-modal/index.js +1 -1
- package/dist/esm/ui/common/modal/datasources-table-in-modal-preview/index.js +5 -1
- package/dist/esm/ui/common/modal/datasources-table-in-modal-preview/use-column-wrapping/index.js +22 -0
- package/dist/esm/ui/common/modal/display-view-dropdown/display-view-drop-down.js +5 -3
- package/dist/esm/ui/common/modal/mode-switcher/index.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/control.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/custom-checkbox-option.js +2 -2
- package/dist/esm/ui/common/modal/popup-select/dropdownIndicator.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/formatOptionLabel.js +2 -2
- package/dist/esm/ui/common/modal/popup-select/index.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/menu-list/index.js +2 -2
- package/dist/esm/ui/common/modal/popup-select/menu-list/loadingMessage.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/menu-list/selectMessage.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/menu-list/showMoreButton.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/trigger.js +3 -3
- package/dist/esm/ui/common/modal/search-count/index.js +1 -1
- package/dist/esm/ui/common/modal/site-selector/index.js +3 -3
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +1 -1
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +1 -1
- package/dist/esm/ui/confluence-search-modal/modal/index.js +7 -3
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +7 -3
- package/dist/esm/ui/issue-like-table/column-picker/concatenated-menu-list.js +2 -1
- package/dist/esm/ui/issue-like-table/column-picker/index.js +17 -3
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +11 -9
- package/dist/esm/ui/issue-like-table/edit-type/icon/index.js +2 -2
- package/dist/esm/ui/issue-like-table/edit-type/status/index.js +3 -3
- package/dist/esm/ui/issue-like-table/edit-type/text/index.js +1 -1
- package/dist/esm/ui/issue-like-table/edit-type/user/index.js +4 -3
- package/dist/esm/ui/issue-like-table/index.compiled.css +3 -0
- package/dist/esm/ui/issue-like-table/index.js +146 -93
- package/dist/esm/ui/issue-like-table/render-type/status/index.js +1 -1
- package/dist/esm/ui/issue-like-table/render-type/tag/index.js +1 -1
- package/dist/esm/ui/issue-like-table/render-type/user/index.js +3 -3
- package/dist/esm/ui/issue-like-table/shared-components/avatar/index.js +2 -2
- package/dist/esm/ui/issue-like-table/table-cell-content/index.js +12 -19
- package/dist/esm/ui/issue-like-table/table-cell-content/inline-edit.js +1 -1
- package/dist/esm/ui/issue-like-table/table-settings-menu/index.compiled.css +6 -0
- package/dist/esm/ui/issue-like-table/table-settings-menu/index.js +87 -0
- package/dist/esm/ui/issue-like-table/table-settings-menu/messages.js +18 -0
- package/dist/esm/ui/jira-issues-modal/jql-editor/index.js +1 -1
- package/dist/esm/ui/jira-issues-modal/modal/index.js +8 -3
- package/dist/esm/ui/table-footer/index.js +1 -1
- package/dist/types/analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience.d.ts +1 -1
- package/dist/types/analytics/ufoExperiences/hooks/useDataRenderedUfoExperience.d.ts +1 -1
- package/dist/types/common/types.d.ts +1 -1
- package/dist/types/hooks/useDatasourceTableFlag.d.ts +1 -1
- package/dist/types/hooks/useDatasourceTableState.d.ts +1 -1
- package/dist/types/hooks/useLoadOptions.d.ts +3 -3
- package/dist/types/services/makeGetJqlAutocompleteData.d.ts +1 -1
- package/dist/types/services/makeGetJqlSuggestionsData.d.ts +1 -1
- package/dist/types/state/actions/index.d.ts +3 -3
- package/dist/types/state/index.d.ts +3 -3
- package/dist/types/ui/assets-modal/modal/index.d.ts +1 -1
- package/dist/types/ui/assets-modal/modal/render-assets-content/index.d.ts +1 -1
- package/dist/types/ui/assets-modal/types.d.ts +1 -1
- package/dist/types/ui/common/error-state/provider-auth-required.d.ts +1 -1
- package/dist/types/ui/common/modal/datasource-context/index.d.ts +1 -1
- package/dist/types/ui/common/modal/datasource-modal/createDatasourceModal.d.ts +1 -1
- package/dist/types/ui/common/modal/datasource-modal/index.d.ts +1 -1
- package/dist/types/ui/common/modal/datasources-table-in-modal-preview/use-column-wrapping/index.d.ts +1 -1
- package/dist/types/ui/common/modal/insert-button/index.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/control.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/custom-checkbox-option.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/dropdownIndicator.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/index.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/menu-list/index.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/basic-filters/filters/date-range-picker/PopupComponent.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/types.d.ts +1 -1
- package/dist/types/ui/datasource-table-view/datasource-column-sort.d.ts +1 -1
- package/dist/types/ui/datasource-table-view/datasourceTableView.d.ts +4 -4
- package/dist/types/ui/datasource-table-view/types.d.ts +2 -2
- package/dist/types/ui/issue-like-table/column-picker/concatenated-menu-list.d.ts +1 -1
- package/dist/types/ui/issue-like-table/column-picker/types.d.ts +1 -1
- package/dist/types/ui/issue-like-table/custom-icons.d.ts +1 -1
- package/dist/types/ui/issue-like-table/edit-type/icon/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/edit-type/index.d.ts +2 -2
- package/dist/types/ui/issue-like-table/edit-type/status/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/edit-type/text/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/edit-type/user/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/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/date-range/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/render-type/date-time/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/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/richtext/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/render-type/status/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/render-type/tag/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/render-type/text/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/render-type/user/index.d.ts +2 -2
- package/dist/types/ui/issue-like-table/table-cell-content/index.d.ts +1 -1
- package/dist/types/ui/issue-like-table/table-cell-content/inline-edit.d.ts +1 -1
- package/dist/types/ui/issue-like-table/table-settings-menu/index.d.ts +8 -0
- package/dist/types/ui/issue-like-table/table-settings-menu/messages.d.ts +17 -0
- package/dist/types/ui/issue-like-table/types.d.ts +7 -1
- package/dist/types/ui/issue-like-table/utils.d.ts +7 -7
- package/dist/types/ui/jira-issues-modal/types.d.ts +1 -1
- package/examples-helpers/buildAssetsIssuesTable.tsx +3 -1
- package/examples-helpers/buildConfluenceSearchTable.tsx +3 -1
- package/examples-helpers/buildIssueLikeTable.tsx +2 -0
- package/examples-helpers/buildJiraIssuesTable.tsx +2 -0
- package/examples-helpers/mockJqlSmartLinkData.ts +1 -1
- package/examples-helpers/mockSmartLinkData.ts +1 -1
- package/examples-helpers/smartLinkCustomClient.ts +1 -1
- package/examples-helpers/useAssetsTableProps.tsx +6 -0
- package/examples-helpers/useCommonTableProps.tsx +5 -2
- package/package.json +47 -43
|
@@ -9,7 +9,8 @@ var _excluded = ["as", "style"],
|
|
|
9
9
|
_excluded2 = ["as", "style"],
|
|
10
10
|
_excluded3 = ["as", "style"],
|
|
11
11
|
_excluded4 = ["as", "style"],
|
|
12
|
-
_excluded5 = ["as", "style"]
|
|
12
|
+
_excluded5 = ["as", "style"],
|
|
13
|
+
_excluded6 = ["as", "style"];
|
|
13
14
|
import "./index.compiled.css";
|
|
14
15
|
import { forwardRef } from 'react';
|
|
15
16
|
import * as React from 'react';
|
|
@@ -22,24 +23,25 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
22
23
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
23
24
|
import { useIntl } from 'react-intl';
|
|
24
25
|
import invariant from 'tiny-invariant';
|
|
25
|
-
import Button from '@atlaskit/button/
|
|
26
|
-
import { FlagsProvider } from '@atlaskit/flag';
|
|
26
|
+
import Button from '@atlaskit/button/default/button';
|
|
27
|
+
import { FlagsProvider } from '@atlaskit/flag/flags-provider';
|
|
27
28
|
import SortAscendingIcon from '@atlaskit/icon/core/sort-ascending';
|
|
28
29
|
import SortDescendingIcon from '@atlaskit/icon/core/sort-descending';
|
|
29
30
|
import { Skeleton } from '@atlaskit/linking-common';
|
|
30
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
31
|
-
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
31
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
32
|
+
import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge/extract-closest-edge';
|
|
32
33
|
import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge';
|
|
33
34
|
import { autoScroller } from '@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-autoscroll';
|
|
34
|
-
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
35
|
-
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
36
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
37
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
35
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
36
|
+
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
37
|
+
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
38
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
38
39
|
import { startUfoExperience, succeedUfoExperience } from '../../analytics/ufoExperiences';
|
|
39
40
|
import { useDatasourceExperienceId } from '../../contexts/datasource-experience-id';
|
|
40
41
|
import { useIsInPDFRender } from '../../hooks/useIsInPDFRender';
|
|
41
42
|
import { NoResults } from '../common/error-state/no-results';
|
|
42
43
|
import { ColumnPicker } from './column-picker';
|
|
44
|
+
import { hasAvailableTableSettings, TableSettingsMenu } from './table-settings-menu';
|
|
43
45
|
import { DragColumnPreview } from './drag-column-preview';
|
|
44
46
|
import { DraggableTableHeading } from './draggable-table-heading';
|
|
45
47
|
import TableEmptyState from './empty-state';
|
|
@@ -51,6 +53,7 @@ import { COLUMN_BASE_WIDTH, getFieldLabelById, getWidthCss } from './utils';
|
|
|
51
53
|
var tableSidePadding = "var(--ds-space-200, 16px)";
|
|
52
54
|
var tableHeadStyles = null;
|
|
53
55
|
var columnPickerWidth = 80;
|
|
56
|
+
var columnPickerWithSettingsWidth = 95;
|
|
54
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
55
58
|
var ColumnPickerHeader = forwardRef(function (_ref, __cmplr) {
|
|
56
59
|
var _ref$as = _ref.as,
|
|
@@ -63,9 +66,24 @@ var ColumnPickerHeader = forwardRef(function (_ref, __cmplr) {
|
|
|
63
66
|
className: ax(["_1bqmidpf _2eacidpf _1rmlidpf _13xs13hi _19xw13hi _ex0g13hi _1rag1uh4 _1ul51uh4 _12ch1uh4 _12ruusvi _1pmsusvi _7okwusvi _mgulys9h _2k51ys9h _efqoys9h _1xzrzo7u _1ejpzo7u _1fmczo7u _77i31if8 _zjk41if8 _7s0n1if8 _3t471vc6 _9g2k1vc6 _1h0z1vc6 _1o59pxbi _1l3vpxbi _gdprpxbi _ml92nkob _1nfwnkob _11ljnkob _1ixkusic _s1peusic _mowjusic", __cmplp.className])
|
|
64
67
|
}));
|
|
65
68
|
});
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
66
70
|
if (process.env.NODE_ENV !== 'production') {
|
|
67
71
|
ColumnPickerHeader.displayName = 'ColumnPickerHeader';
|
|
68
72
|
}
|
|
73
|
+
var ColumnPickerHeaderWithSettings = forwardRef(function (_ref2, __cmplr) {
|
|
74
|
+
var _ref2$as = _ref2.as,
|
|
75
|
+
C = _ref2$as === void 0 ? "th" : _ref2$as,
|
|
76
|
+
__cmpls = _ref2.style,
|
|
77
|
+
__cmplp = _objectWithoutProperties(_ref2, _excluded2);
|
|
78
|
+
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
79
|
+
style: __cmpls,
|
|
80
|
+
ref: __cmplr,
|
|
81
|
+
className: ax(["_1bqmidpf _2eacidpf _1rmlidpf _13xs13hi _19xw13hi _ex0g13hi _1rag1uh4 _1ul51uh4 _12ch1uh4 _12ruusvi _1pmsusvi _7okwusvi _mgul14em _2k5114em _efqo14em _1xzrzo7u _1ejpzo7u _1fmczo7u _77i31if8 _zjk41if8 _7s0n1if8 _3t471vc6 _9g2k1vc6 _1h0z1vc6 _1o59pxbi _1l3vpxbi _gdprpxbi _ml92nkob _1nfwnkob _11ljnkob _1ixkusic _s1peusic _mowjusic", __cmplp.className])
|
|
82
|
+
}));
|
|
83
|
+
});
|
|
84
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
85
|
+
ColumnPickerHeaderWithSettings.displayName = 'ColumnPickerHeaderWithSettings';
|
|
86
|
+
}
|
|
69
87
|
var truncateStyles = null;
|
|
70
88
|
var wrappedStyles = null;
|
|
71
89
|
var richTextCellStyles = null;
|
|
@@ -88,11 +106,11 @@ var getHorizontalScrollParent = function getHorizontalScrollParent(element) {
|
|
|
88
106
|
};
|
|
89
107
|
|
|
90
108
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
|
|
91
|
-
var Table = forwardRef(function (
|
|
92
|
-
var
|
|
93
|
-
C =
|
|
94
|
-
__cmpls =
|
|
95
|
-
__cmplp = _objectWithoutProperties(
|
|
109
|
+
var Table = forwardRef(function (_ref3, __cmplr) {
|
|
110
|
+
var _ref3$as = _ref3.as,
|
|
111
|
+
C = _ref3$as === void 0 ? "table" : _ref3$as,
|
|
112
|
+
__cmpls = _ref3.style,
|
|
113
|
+
__cmplp = _objectWithoutProperties(_ref3, _excluded3);
|
|
96
114
|
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
97
115
|
style: __cmpls,
|
|
98
116
|
ref: __cmplr,
|
|
@@ -104,11 +122,11 @@ var Table = forwardRef(function (_ref2, __cmplr) {
|
|
|
104
122
|
if (process.env.NODE_ENV !== 'production') {
|
|
105
123
|
Table.displayName = 'Table';
|
|
106
124
|
}
|
|
107
|
-
var TableHeading = forwardRef(function (
|
|
108
|
-
var
|
|
109
|
-
C =
|
|
110
|
-
__cmpls =
|
|
111
|
-
__cmplp = _objectWithoutProperties(
|
|
125
|
+
var TableHeading = forwardRef(function (_ref4, __cmplr) {
|
|
126
|
+
var _ref4$as = _ref4.as,
|
|
127
|
+
C = _ref4$as === void 0 ? "th" : _ref4$as,
|
|
128
|
+
__cmpls = _ref4.style,
|
|
129
|
+
__cmplp = _objectWithoutProperties(_ref4, _excluded4);
|
|
112
130
|
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
113
131
|
style: __cmpls,
|
|
114
132
|
ref: __cmplr,
|
|
@@ -120,11 +138,11 @@ var TableHeading = forwardRef(function (_ref3, __cmplr) {
|
|
|
120
138
|
if (process.env.NODE_ENV !== 'production') {
|
|
121
139
|
TableHeading.displayName = 'TableHeading';
|
|
122
140
|
}
|
|
123
|
-
var InlineEditableTableCell = forwardRef(function (
|
|
124
|
-
var
|
|
125
|
-
C =
|
|
126
|
-
__cmpls =
|
|
127
|
-
__cmplp = _objectWithoutProperties(
|
|
141
|
+
var InlineEditableTableCell = forwardRef(function (_ref5, __cmplr) {
|
|
142
|
+
var _ref5$as = _ref5.as,
|
|
143
|
+
C = _ref5$as === void 0 ? "td" : _ref5$as,
|
|
144
|
+
__cmpls = _ref5.style,
|
|
145
|
+
__cmplp = _objectWithoutProperties(_ref5, _excluded5);
|
|
128
146
|
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
129
147
|
style: __cmpls,
|
|
130
148
|
ref: __cmplr,
|
|
@@ -154,11 +172,11 @@ var headerStyles = null;
|
|
|
154
172
|
var headingHoverEffectStyles = null;
|
|
155
173
|
|
|
156
174
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Matches DraggableTableHeading button normalization.
|
|
157
|
-
var SortableHeaderParent = forwardRef(function (
|
|
158
|
-
var
|
|
159
|
-
C =
|
|
160
|
-
__cmpls =
|
|
161
|
-
__cmplp = _objectWithoutProperties(
|
|
175
|
+
var SortableHeaderParent = forwardRef(function (_ref6, __cmplr) {
|
|
176
|
+
var _ref6$as = _ref6.as,
|
|
177
|
+
C = _ref6$as === void 0 ? "div" : _ref6$as,
|
|
178
|
+
__cmpls = _ref6.style,
|
|
179
|
+
__cmplp = _objectWithoutProperties(_ref6, _excluded6);
|
|
162
180
|
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
163
181
|
style: __cmpls,
|
|
164
182
|
ref: __cmplr,
|
|
@@ -214,28 +232,29 @@ function getDefaultColumnWidth(key, type) {
|
|
|
214
232
|
return DEFAULT_WIDTH;
|
|
215
233
|
}
|
|
216
234
|
}
|
|
217
|
-
export var IssueLikeDataTableView = function IssueLikeDataTableView(
|
|
235
|
+
export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref7) {
|
|
218
236
|
var _containerRef$current;
|
|
219
|
-
var testId =
|
|
220
|
-
onNextPage =
|
|
221
|
-
onLoadDatasourceDetails =
|
|
222
|
-
items =
|
|
223
|
-
itemIds =
|
|
224
|
-
columns =
|
|
225
|
-
|
|
226
|
-
renderItem =
|
|
227
|
-
visibleColumnKeys =
|
|
228
|
-
onVisibleColumnKeysChange =
|
|
229
|
-
columnCustomSizes =
|
|
230
|
-
onColumnResize =
|
|
231
|
-
onColumnSort =
|
|
232
|
-
wrappedColumnKeys =
|
|
233
|
-
onWrappedColumnChange =
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
var testId = _ref7.testId,
|
|
238
|
+
onNextPage = _ref7.onNextPage,
|
|
239
|
+
onLoadDatasourceDetails = _ref7.onLoadDatasourceDetails,
|
|
240
|
+
items = _ref7.items,
|
|
241
|
+
itemIds = _ref7.itemIds,
|
|
242
|
+
columns = _ref7.columns,
|
|
243
|
+
_ref7$renderItem = _ref7.renderItem,
|
|
244
|
+
renderItem = _ref7$renderItem === void 0 ? renderType : _ref7$renderItem,
|
|
245
|
+
visibleColumnKeys = _ref7.visibleColumnKeys,
|
|
246
|
+
onVisibleColumnKeysChange = _ref7.onVisibleColumnKeysChange,
|
|
247
|
+
columnCustomSizes = _ref7.columnCustomSizes,
|
|
248
|
+
onColumnResize = _ref7.onColumnResize,
|
|
249
|
+
onColumnSort = _ref7.onColumnSort,
|
|
250
|
+
wrappedColumnKeys = _ref7.wrappedColumnKeys,
|
|
251
|
+
onWrappedColumnChange = _ref7.onWrappedColumnChange,
|
|
252
|
+
onWrappedColumnsChange = _ref7.onWrappedColumnsChange,
|
|
253
|
+
sortState = _ref7.sortState,
|
|
254
|
+
status = _ref7.status,
|
|
255
|
+
hasNextPage = _ref7.hasNextPage,
|
|
256
|
+
scrollableContainerHeight = _ref7.scrollableContainerHeight,
|
|
257
|
+
extensionKey = _ref7.extensionKey;
|
|
239
258
|
var _useIntl = useIntl(),
|
|
240
259
|
formatMessage = _useIntl.formatMessage;
|
|
241
260
|
var tableId = useMemo(function () {
|
|
@@ -274,25 +293,48 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
274
293
|
}, [experienceId, status]);
|
|
275
294
|
var visibleSortedColumns = useMemo(function () {
|
|
276
295
|
return visibleColumnKeys.map(function (visibleKey) {
|
|
277
|
-
return orderedColumns.find(function (
|
|
278
|
-
var key =
|
|
296
|
+
return orderedColumns.find(function (_ref8) {
|
|
297
|
+
var key = _ref8.key;
|
|
279
298
|
return visibleKey === key;
|
|
280
299
|
});
|
|
281
300
|
}).filter(Boolean);
|
|
282
301
|
}, [orderedColumns, visibleColumnKeys]);
|
|
302
|
+
var isWrapTextSettingAvailable = Boolean(onWrappedColumnsChange) && fg('platform_lp_sllv_table_settings_menu');
|
|
303
|
+
var areAllVisibleColumnsWrapped = false;
|
|
304
|
+
if (isWrapTextSettingAvailable) {
|
|
305
|
+
areAllVisibleColumnsWrapped = visibleColumnKeys.length > 0 && visibleColumnKeys.every(function (columnKey) {
|
|
306
|
+
return wrappedColumnKeys === null || wrappedColumnKeys === void 0 ? void 0 : wrappedColumnKeys.includes(columnKey);
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
var handleWrapTextOnAllColumnsChange = useCallback(function () {
|
|
310
|
+
if (!onWrappedColumnsChange) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
var nextWrappedColumnKeys = areAllVisibleColumnsWrapped ? (wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 ? wrappedColumnKeys : []).filter(function (columnKey) {
|
|
314
|
+
return !visibleColumnKeys.includes(columnKey);
|
|
315
|
+
}) : Array.from(new Set([].concat(_toConsumableArray(wrappedColumnKeys !== null && wrappedColumnKeys !== void 0 ? wrappedColumnKeys : []), _toConsumableArray(visibleColumnKeys))));
|
|
316
|
+
onWrappedColumnsChange(nextWrappedColumnKeys);
|
|
317
|
+
}, [areAllVisibleColumnsWrapped, onWrappedColumnsChange, visibleColumnKeys, wrappedColumnKeys]);
|
|
318
|
+
var tableSettingsMenuProps = {
|
|
319
|
+
wrapTextSetting: isWrapTextSettingAvailable ? {
|
|
320
|
+
isChecked: areAllVisibleColumnsWrapped,
|
|
321
|
+
onChange: handleWrapTextOnAllColumnsChange
|
|
322
|
+
} : undefined
|
|
323
|
+
};
|
|
324
|
+
var shouldShowTableSettingsMenu = hasAvailableTableSettings(tableSettingsMenuProps);
|
|
283
325
|
|
|
284
326
|
// TODO seems like this component can't handle some combination of incremental data retrieval.
|
|
285
327
|
// If data comes first, then columns and then visibleColumnKeys it blows up,
|
|
286
328
|
// or some other combination.
|
|
287
329
|
var columnsWidthsSum = useMemo(function () {
|
|
288
|
-
return visibleSortedColumns.map(function (
|
|
289
|
-
var key =
|
|
290
|
-
type =
|
|
330
|
+
return visibleSortedColumns.map(function (_ref9) {
|
|
331
|
+
var key = _ref9.key,
|
|
332
|
+
type = _ref9.type;
|
|
291
333
|
return (columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]) || getDefaultColumnWidth(key, type);
|
|
292
334
|
}).reduce(function (sum, width) {
|
|
293
335
|
return width + sum;
|
|
294
|
-
}, 0) + (onVisibleColumnKeysChange ? columnPickerWidth : 0);
|
|
295
|
-
}, [columnCustomSizes, onVisibleColumnKeysChange, visibleSortedColumns]);
|
|
336
|
+
}, 0) + (onVisibleColumnKeysChange && shouldShowTableSettingsMenu ? columnPickerWithSettingsWidth : onVisibleColumnKeysChange ? columnPickerWidth : 0);
|
|
337
|
+
}, [columnCustomSizes, onVisibleColumnKeysChange, shouldShowTableSettingsMenu, visibleSortedColumns]);
|
|
296
338
|
var shouldUseWidth = !!(onColumnResize || columnCustomSizes);
|
|
297
339
|
var tableContainerWidth = Math.ceil(((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.getBoundingClientRect().width) || 0);
|
|
298
340
|
var getColumnWidth = useCallback(function (key, type, isLastCell) {
|
|
@@ -303,10 +345,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
303
345
|
}
|
|
304
346
|
}, [columnCustomSizes, columnsWidthsSum, shouldUseWidth, tableContainerWidth]);
|
|
305
347
|
var headerColumns = useMemo(function () {
|
|
306
|
-
return visibleSortedColumns.map(function (
|
|
307
|
-
var key =
|
|
308
|
-
title =
|
|
309
|
-
type =
|
|
348
|
+
return visibleSortedColumns.map(function (_ref0, index) {
|
|
349
|
+
var key = _ref0.key,
|
|
350
|
+
title = _ref0.title,
|
|
351
|
+
type = _ref0.type;
|
|
310
352
|
return {
|
|
311
353
|
key: key,
|
|
312
354
|
content: title,
|
|
@@ -389,9 +431,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
389
431
|
return;
|
|
390
432
|
}
|
|
391
433
|
return combine(monitorForElements({
|
|
392
|
-
onDragStart: function onDragStart(
|
|
393
|
-
var location =
|
|
394
|
-
source =
|
|
434
|
+
onDragStart: function onDragStart(_ref1) {
|
|
435
|
+
var location = _ref1.location,
|
|
436
|
+
source = _ref1.source;
|
|
395
437
|
initialAutoScrollerClientY.current = location.current.input.clientY;
|
|
396
438
|
if (source.data.type === 'table-header') {
|
|
397
439
|
var _containerRef$current2;
|
|
@@ -407,9 +449,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
407
449
|
});
|
|
408
450
|
}
|
|
409
451
|
},
|
|
410
|
-
onDrag: function onDrag(
|
|
411
|
-
var location =
|
|
412
|
-
source =
|
|
452
|
+
onDrag: function onDrag(_ref10) {
|
|
453
|
+
var location = _ref10.location,
|
|
454
|
+
source = _ref10.source;
|
|
413
455
|
if (source.data.type === 'table-header') {
|
|
414
456
|
var _containerRef$current3;
|
|
415
457
|
autoScroller.updateInput({
|
|
@@ -419,9 +461,9 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
419
461
|
});
|
|
420
462
|
}
|
|
421
463
|
},
|
|
422
|
-
onDrop: function onDrop(
|
|
423
|
-
var source =
|
|
424
|
-
location =
|
|
464
|
+
onDrop: function onDrop(_ref11) {
|
|
465
|
+
var source = _ref11.source,
|
|
466
|
+
location = _ref11.location;
|
|
425
467
|
autoScroller.stop();
|
|
426
468
|
if (location.current.dropTargets.length === 0) {
|
|
427
469
|
return;
|
|
@@ -456,10 +498,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
456
498
|
return itemIds.map(function (id, rowIndex) {
|
|
457
499
|
return {
|
|
458
500
|
key: id,
|
|
459
|
-
cells: visibleSortedColumns.map(function (
|
|
460
|
-
var key =
|
|
461
|
-
type =
|
|
462
|
-
title =
|
|
501
|
+
cells: visibleSortedColumns.map(function (_ref12, cellIndex) {
|
|
502
|
+
var key = _ref12.key,
|
|
503
|
+
type = _ref12.type,
|
|
504
|
+
title = _ref12.title;
|
|
463
505
|
return {
|
|
464
506
|
key: key,
|
|
465
507
|
columnKey: key,
|
|
@@ -595,10 +637,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
595
637
|
className: ax(["_n7zlidpf", "_bfhkchd4 _kqsw1if8 _154iidpf _1pbyzo7u", !!onVisibleColumnKeysChange ? 'has-column-picker' : ''])
|
|
596
638
|
}, /*#__PURE__*/React.createElement("tr", {
|
|
597
639
|
ref: tableHeaderRowRef
|
|
598
|
-
}, headerColumns.map(function (
|
|
599
|
-
var key =
|
|
600
|
-
content =
|
|
601
|
-
width =
|
|
640
|
+
}, headerColumns.map(function (_ref14, cellIndex) {
|
|
641
|
+
var key = _ref14.key,
|
|
642
|
+
content = _ref14.content,
|
|
643
|
+
width = _ref14.width;
|
|
602
644
|
var heading = /*#__PURE__*/React.createElement(Tooltip, {
|
|
603
645
|
content: content,
|
|
604
646
|
tag: "span",
|
|
@@ -643,10 +685,10 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
643
685
|
}
|
|
644
686
|
if (isEditable) {
|
|
645
687
|
var _containerRef$current4;
|
|
646
|
-
var previewRows = tableRows.map(function (
|
|
647
|
-
var cells =
|
|
648
|
-
var cell = cells.find(function (
|
|
649
|
-
var cellKey =
|
|
688
|
+
var previewRows = tableRows.map(function (_ref15) {
|
|
689
|
+
var cells = _ref15.cells;
|
|
690
|
+
var cell = cells.find(function (_ref16) {
|
|
691
|
+
var cellKey = _ref16.key;
|
|
650
692
|
return cellKey === key;
|
|
651
693
|
});
|
|
652
694
|
if (cell) {
|
|
@@ -683,12 +725,23 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
683
725
|
})
|
|
684
726
|
}), heading);
|
|
685
727
|
}
|
|
686
|
-
}), onVisibleColumnKeysChange && /*#__PURE__*/React.createElement(
|
|
728
|
+
}), onVisibleColumnKeysChange && (shouldShowTableSettingsMenu ? /*#__PURE__*/React.createElement(ColumnPickerHeaderWithSettings, null, /*#__PURE__*/React.createElement(Inline, {
|
|
729
|
+
alignBlock: "center",
|
|
730
|
+
alignInline: "end",
|
|
731
|
+
space: "space.050"
|
|
732
|
+
}, /*#__PURE__*/React.createElement(ColumnPicker, {
|
|
733
|
+
columns: shouldDisplayColumnsInPicker ? orderedColumns : [],
|
|
734
|
+
selectedColumnKeys: shouldDisplayColumnsInPicker ? visibleColumnKeys : [],
|
|
735
|
+
onSelectedColumnKeysChange: onSelectedColumnKeysChange,
|
|
736
|
+
onOpen: handlePickerOpen
|
|
737
|
+
}), /*#__PURE__*/React.createElement(TableSettingsMenu, {
|
|
738
|
+
wrapTextSetting: tableSettingsMenuProps.wrapTextSetting
|
|
739
|
+
}))) : /*#__PURE__*/React.createElement(ColumnPickerHeader, null, /*#__PURE__*/React.createElement(ColumnPicker, {
|
|
687
740
|
columns: shouldDisplayColumnsInPicker ? orderedColumns : [],
|
|
688
741
|
selectedColumnKeys: shouldDisplayColumnsInPicker ? visibleColumnKeys : [],
|
|
689
742
|
onSelectedColumnKeysChange: onSelectedColumnKeysChange,
|
|
690
743
|
onOpen: handlePickerOpen
|
|
691
|
-
})))), /*#__PURE__*/React.createElement("tbody", {
|
|
744
|
+
}))))), /*#__PURE__*/React.createElement("tbody", {
|
|
692
745
|
"data-testid": testId && "".concat(testId, "--body"),
|
|
693
746
|
className: ax(["_n7zlidpf"])
|
|
694
747
|
}, hasNoResults && /*#__PURE__*/React.createElement("tr", {
|
|
@@ -703,19 +756,19 @@ export var IssueLikeDataTableView = function IssueLikeDataTableView(_ref6) {
|
|
|
703
756
|
className: ax(["_kqsw1if8 _1ltvidpf _1e0c1txw _1bah1h6o"])
|
|
704
757
|
}, /*#__PURE__*/React.createElement(NoResults, {
|
|
705
758
|
isCompact: true
|
|
706
|
-
})))), rows.map(function (
|
|
707
|
-
var key =
|
|
708
|
-
cells =
|
|
709
|
-
ref =
|
|
759
|
+
})))), rows.map(function (_ref17) {
|
|
760
|
+
var key = _ref17.key,
|
|
761
|
+
cells = _ref17.cells,
|
|
762
|
+
ref = _ref17.ref;
|
|
710
763
|
return /*#__PURE__*/React.createElement("tr", {
|
|
711
764
|
key: key,
|
|
712
765
|
"data-testid": testId && "".concat(testId, "--row-").concat(key),
|
|
713
766
|
ref: ref
|
|
714
|
-
}, cells.map(function (
|
|
715
|
-
var cellKey =
|
|
716
|
-
cellType =
|
|
717
|
-
content =
|
|
718
|
-
width =
|
|
767
|
+
}, cells.map(function (_ref18, cellIndex) {
|
|
768
|
+
var cellKey = _ref18.key,
|
|
769
|
+
cellType = _ref18.type,
|
|
770
|
+
content = _ref18.content,
|
|
771
|
+
width = _ref18.width;
|
|
719
772
|
var isLastCell = cellIndex === cells.length - 1;
|
|
720
773
|
var loadingRowStyle = getWidthCss({
|
|
721
774
|
shouldUseWidth: shouldUseWidth,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Lozenge from '@atlaskit/lozenge';
|
|
2
|
+
import Lozenge from '@atlaskit/lozenge/lozenge';
|
|
3
3
|
export var STATUS_TYPE_TEST_ID = 'link-datasource-render-type--status';
|
|
4
4
|
var StatusRenderType = function StatusRenderType(_ref) {
|
|
5
5
|
var text = _ref.text,
|
|
@@ -8,10 +8,10 @@ import { forwardRef } from 'react';
|
|
|
8
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
9
9
|
import React, { useState } from 'react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl';
|
|
11
|
-
import Avatar from '@atlaskit/avatar';
|
|
12
|
-
import AvatarGroup from '@atlaskit/avatar-group';
|
|
11
|
+
import Avatar from '@atlaskit/avatar/avatar';
|
|
12
|
+
import AvatarGroup from '@atlaskit/avatar-group/avatar-group';
|
|
13
13
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
14
|
-
import { WidthObserver } from '@atlaskit/width-detector';
|
|
14
|
+
import { WidthObserver } from '@atlaskit/width-detector/width-observer';
|
|
15
15
|
import { userTypeMessages } from './messages';
|
|
16
16
|
var styles = {
|
|
17
17
|
userWrapperStyles: "_11c8fhey _1e0c1txw _4cvr1h6o",
|
|
@@ -3,9 +3,9 @@ import "./index.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
6
|
-
import Avatar from '@atlaskit/avatar';
|
|
6
|
+
import Avatar from '@atlaskit/avatar/avatar';
|
|
7
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
8
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
9
9
|
import { USER_TYPE_TEST_ID } from '../../render-type/user';
|
|
10
10
|
import { userTypeMessages } from '../../render-type/user/messages';
|
|
11
11
|
var styles = {
|
|
@@ -6,7 +6,7 @@ import { useIntl } from 'react-intl';
|
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
9
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
9
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
10
10
|
import { useDatasourceCrossProductAttribution } from '../../../analytics/xpc/useDatasourceCrossProductAttribution';
|
|
11
11
|
import { useDatasourceItem } from '../../../state';
|
|
12
12
|
import { useExecuteAtomicAction } from '../../../state/actions';
|
|
@@ -113,25 +113,18 @@ export var ReadOnlyCell = function ReadOnlyCell(_ref4) {
|
|
|
113
113
|
type: columnType,
|
|
114
114
|
values: values
|
|
115
115
|
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
var issueLinkData = getIssueLinkData(rowData);
|
|
119
|
-
return /*#__PURE__*/React.createElement(TooltipWrapper, {
|
|
120
|
-
columnKey: columnKey,
|
|
121
|
-
datasourceTypeWithValues: datasourceTypeWithValues,
|
|
122
|
-
wrappedColumnKeys: wrappedColumnKeys
|
|
123
|
-
}, isIssueTypeColumn && issueLinkData ? fg('electric_issue_like_table_xpc_url_wrapping') ? /*#__PURE__*/React.createElement(LinkedCellContentWrapped, {
|
|
124
|
-
issueLinkData: issueLinkData
|
|
125
|
-
}, renderItem(datasourceTypeWithValues)) : getLinkedCellContent({
|
|
126
|
-
children: renderItem(datasourceTypeWithValues),
|
|
127
|
-
issueLinkData: issueLinkData
|
|
128
|
-
}) : renderItem(datasourceTypeWithValues));
|
|
129
|
-
}
|
|
116
|
+
var isIssueTypeColumn = isIssueTypeColumnFn(columnKey);
|
|
117
|
+
var issueLinkData = getIssueLinkData(rowData);
|
|
130
118
|
return /*#__PURE__*/React.createElement(TooltipWrapper, {
|
|
131
119
|
columnKey: columnKey,
|
|
132
120
|
datasourceTypeWithValues: datasourceTypeWithValues,
|
|
133
121
|
wrappedColumnKeys: wrappedColumnKeys
|
|
134
|
-
},
|
|
122
|
+
}, isIssueTypeColumn && issueLinkData ? fg('electric_issue_like_table_xpc_url_wrapping') ? /*#__PURE__*/React.createElement(LinkedCellContentWrapped, {
|
|
123
|
+
issueLinkData: issueLinkData
|
|
124
|
+
}, renderItem(datasourceTypeWithValues)) : getLinkedCellContent({
|
|
125
|
+
children: renderItem(datasourceTypeWithValues),
|
|
126
|
+
issueLinkData: issueLinkData
|
|
127
|
+
}) : renderItem(datasourceTypeWithValues));
|
|
135
128
|
};
|
|
136
129
|
var InlineEditableCell = function InlineEditableCell(_ref5) {
|
|
137
130
|
var ari = _ref5.ari,
|
|
@@ -168,12 +161,12 @@ var InlineEditableCell = function InlineEditableCell(_ref5) {
|
|
|
168
161
|
style: {
|
|
169
162
|
minHeight: 'calc(40px - 2px * 2)'
|
|
170
163
|
}
|
|
171
|
-
},
|
|
164
|
+
}, !isEditable && isIssueTypeColumnFn(columnKey) && issueLinkData ? fg('electric_issue_like_table_xpc_url_wrapping') ? /*#__PURE__*/React.createElement(LinkedCellContentWrapped, {
|
|
172
165
|
issueLinkData: issueLinkData
|
|
173
166
|
}, renderItem(values)) : getLinkedCellContent({
|
|
174
167
|
children: renderItem(values),
|
|
175
168
|
issueLinkData: issueLinkData
|
|
176
|
-
}) : renderItem(values)
|
|
169
|
+
}) : renderItem(values)));
|
|
177
170
|
if (!isEditable) {
|
|
178
171
|
return readView;
|
|
179
172
|
}
|
|
@@ -227,7 +220,7 @@ export var TableCellContent = function TableCellContent(_ref7) {
|
|
|
227
220
|
columnTitle: columnTitle,
|
|
228
221
|
renderItem: renderItem,
|
|
229
222
|
integrationKey: integrationKey,
|
|
230
|
-
issueLinkData:
|
|
223
|
+
issueLinkData: getIssueLinkData(rowData),
|
|
231
224
|
values: toDatasourceTypeWithValues({
|
|
232
225
|
rowData: rowData,
|
|
233
226
|
columnKey: columnKey,
|
|
@@ -9,7 +9,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
10
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
11
11
|
import { useIntl } from 'react-intl';
|
|
12
|
-
import AKInlineEdit from '@atlaskit/inline-edit';
|
|
12
|
+
import AKInlineEdit from '@atlaskit/inline-edit/inline-edit';
|
|
13
13
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
14
14
|
import { useSmartLinkReload } from '@atlaskit/smart-card/hooks';
|
|
15
15
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
._1rjcu2gc{padding-block:var(--ds-space-100,8px)}._19bvutpp{padding-left:var(--ds-space-150,9pt)}
|
|
2
|
+
._1bsb1mjv{width:300px}
|
|
3
|
+
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
4
|
+
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
5
|
+
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
6
|
+
._u5f3utpp{padding-right:var(--ds-space-150,9pt)}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { useId, useState } from 'react';
|
|
7
|
+
import { useIntl } from 'react-intl';
|
|
8
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
9
|
+
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
10
|
+
import { Popup } from '@atlaskit/popup/popup';
|
|
11
|
+
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
12
|
+
import { layers } from '@atlaskit/theme/constants';
|
|
13
|
+
import Toggle from '@atlaskit/toggle/toggle';
|
|
14
|
+
import { tableSettingsMenuMessages } from './messages';
|
|
15
|
+
var styles = {
|
|
16
|
+
menu: "_1rjcu2gc _1bsb1mjv",
|
|
17
|
+
setting: "_bfhksm61 _ca0q1b66 _u5f3utpp _n3td1b66 _19bvutpp"
|
|
18
|
+
};
|
|
19
|
+
export var hasAvailableTableSettings = function hasAvailableTableSettings(_ref) {
|
|
20
|
+
var wrapTextSetting = _ref.wrapTextSetting;
|
|
21
|
+
return Boolean(wrapTextSetting);
|
|
22
|
+
};
|
|
23
|
+
export var TableSettingsMenu = function TableSettingsMenu(props) {
|
|
24
|
+
var _useIntl = useIntl(),
|
|
25
|
+
formatMessage = _useIntl.formatMessage;
|
|
26
|
+
var _useState = useState(false),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
isOpen = _useState2[0],
|
|
29
|
+
setIsOpen = _useState2[1];
|
|
30
|
+
var wrapTextToggleId = useId();
|
|
31
|
+
if (!hasAvailableTableSettings(props)) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
var wrapTextSetting = props.wrapTextSetting;
|
|
35
|
+
var wrapTextLabel = formatMessage(tableSettingsMenuMessages.wrapTextOnAllColumns);
|
|
36
|
+
return /*#__PURE__*/React.createElement(Popup, {
|
|
37
|
+
isOpen: isOpen,
|
|
38
|
+
onClose: function onClose() {
|
|
39
|
+
return setIsOpen(false);
|
|
40
|
+
},
|
|
41
|
+
placement: "bottom-end",
|
|
42
|
+
shouldFlip: true,
|
|
43
|
+
testId: "table-settings-menu",
|
|
44
|
+
zIndex: layers.modal(),
|
|
45
|
+
role: "dialog",
|
|
46
|
+
label: formatMessage(tableSettingsMenuMessages.tableSettings),
|
|
47
|
+
trigger: function trigger(triggerProps) {
|
|
48
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
49
|
+
ref: triggerProps.ref,
|
|
50
|
+
"aria-controls": triggerProps['aria-controls'],
|
|
51
|
+
"aria-expanded": triggerProps['aria-expanded'],
|
|
52
|
+
"aria-haspopup": triggerProps['aria-haspopup'],
|
|
53
|
+
icon: ShowMoreHorizontalIcon,
|
|
54
|
+
isSelected: isOpen,
|
|
55
|
+
isTooltipDisabled: false,
|
|
56
|
+
label: formatMessage(tableSettingsMenuMessages.moreActions),
|
|
57
|
+
onClick: function onClick() {
|
|
58
|
+
return setIsOpen(function (currentIsOpen) {
|
|
59
|
+
return !currentIsOpen;
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
spacing: "default"
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
content: function content(_ref2) {
|
|
66
|
+
var setInitialFocusRef = _ref2.setInitialFocusRef;
|
|
67
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
68
|
+
xcss: styles.menu
|
|
69
|
+
}, wrapTextSetting && /*#__PURE__*/React.createElement(Box, {
|
|
70
|
+
xcss: styles.setting
|
|
71
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
72
|
+
alignBlock: "center",
|
|
73
|
+
spread: "space-between"
|
|
74
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
75
|
+
htmlFor: wrapTextToggleId
|
|
76
|
+
}, wrapTextLabel), /*#__PURE__*/React.createElement(Toggle, {
|
|
77
|
+
ref: function ref(element) {
|
|
78
|
+
setInitialFocusRef(element);
|
|
79
|
+
},
|
|
80
|
+
id: wrapTextToggleId,
|
|
81
|
+
isChecked: wrapTextSetting.isChecked,
|
|
82
|
+
onChange: wrapTextSetting.onChange,
|
|
83
|
+
testId: "table-settings-menu-wrap-text-toggle"
|
|
84
|
+
}))));
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
export var tableSettingsMenuMessages = defineMessages({
|
|
3
|
+
moreActions: {
|
|
4
|
+
id: 'link-datasource.issue-like-table.table-settings-menu.moreActions',
|
|
5
|
+
description: 'Tooltip and accessibility label for the table settings meatball menu button',
|
|
6
|
+
defaultMessage: 'More actions'
|
|
7
|
+
},
|
|
8
|
+
tableSettings: {
|
|
9
|
+
id: 'link-datasource.issue-like-table.table-settings-menu.tableSettings',
|
|
10
|
+
description: 'Accessibility label for the table settings popup',
|
|
11
|
+
defaultMessage: 'Table settings'
|
|
12
|
+
},
|
|
13
|
+
wrapTextOnAllColumns: {
|
|
14
|
+
id: 'link-datasource.issue-like-table.table-settings-menu.wrapTextOnAllColumns',
|
|
15
|
+
description: 'Label for the toggle that wraps text in every table column',
|
|
16
|
+
defaultMessage: 'Wrap text in all columns'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import { FormattedMessage } from 'react-intl';
|
|
3
3
|
import { JQLEditor } from '@atlaskit/jql-editor';
|
|
4
|
-
import { useAutocompleteProvider } from '@atlaskit/jql-editor-autocomplete-rest';
|
|
4
|
+
import { useAutocompleteProvider } from '@atlaskit/jql-editor-autocomplete-rest/use-autocomplete-provider';
|
|
5
5
|
import { makeGetJqlAutocompleteData } from '../../../services/makeGetJqlAutocompleteData';
|
|
6
6
|
import { makeGetJqlSuggestionsData } from '../../../services/makeGetJqlSuggestionsData';
|
|
7
7
|
export var JiraJQLEditor = function JiraJQLEditor(_ref) {
|