@atlaskit/link-datasource 2.3.1 → 2.3.3
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 +23 -0
- package/dist/cjs/ui/assets-modal/search-container/styled.js +6 -0
- package/dist/cjs/ui/common/modal/popup-select/trigger.js +2 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +13 -0
- package/dist/cjs/ui/issue-like-table/drag-column-preview.js +3 -0
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +13 -5
- package/dist/cjs/ui/issue-like-table/empty-state/type.js +1 -0
- package/dist/cjs/ui/issue-like-table/index.js +89 -48
- package/dist/cjs/ui/issue-like-table/render-type/date-time/index.js +2 -0
- package/dist/cjs/ui/issue-like-table/render-type/icon/index.js +1 -0
- package/dist/cjs/ui/issue-like-table/render-type/richtext/index.js +2 -3
- package/dist/cjs/ui/issue-like-table/render-type/text/index.js +2 -0
- package/dist/cjs/ui/issue-like-table/render-type/user/index.js +2 -0
- package/dist/cjs/ui/issue-like-table/styled.js +15 -0
- package/dist/cjs/ui/issue-like-table/utils.js +13 -6
- package/dist/cjs/ui/table-footer/index.js +9 -0
- package/dist/es2019/ui/assets-modal/search-container/styled.js +6 -0
- package/dist/es2019/ui/common/modal/popup-select/trigger.js +2 -0
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +13 -0
- package/dist/es2019/ui/issue-like-table/drag-column-preview.js +3 -0
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +13 -5
- package/dist/es2019/ui/issue-like-table/empty-state/type.js +1 -0
- package/dist/es2019/ui/issue-like-table/index.js +53 -17
- package/dist/es2019/ui/issue-like-table/render-type/date-time/index.js +2 -0
- package/dist/es2019/ui/issue-like-table/render-type/icon/index.js +1 -0
- package/dist/es2019/ui/issue-like-table/render-type/richtext/index.js +2 -3
- package/dist/es2019/ui/issue-like-table/render-type/text/index.js +2 -0
- package/dist/es2019/ui/issue-like-table/render-type/user/index.js +2 -0
- package/dist/es2019/ui/issue-like-table/styled.js +15 -0
- package/dist/es2019/ui/issue-like-table/utils.js +14 -5
- package/dist/es2019/ui/table-footer/index.js +9 -0
- package/dist/esm/ui/assets-modal/search-container/styled.js +6 -0
- package/dist/esm/ui/common/modal/popup-select/trigger.js +2 -0
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js +13 -0
- package/dist/esm/ui/issue-like-table/drag-column-preview.js +3 -0
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +13 -5
- package/dist/esm/ui/issue-like-table/empty-state/type.js +1 -0
- package/dist/esm/ui/issue-like-table/index.js +89 -48
- package/dist/esm/ui/issue-like-table/render-type/date-time/index.js +2 -0
- package/dist/esm/ui/issue-like-table/render-type/icon/index.js +1 -0
- package/dist/esm/ui/issue-like-table/render-type/richtext/index.js +2 -3
- package/dist/esm/ui/issue-like-table/render-type/text/index.js +2 -0
- package/dist/esm/ui/issue-like-table/render-type/user/index.js +2 -0
- package/dist/esm/ui/issue-like-table/styled.js +15 -0
- package/dist/esm/ui/issue-like-table/utils.js +13 -6
- package/dist/esm/ui/table-footer/index.js +9 -0
- package/dist/types/analytics/generated/create-event-payload.d.ts +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/common/utils/adf.d.ts +1 -1
- package/dist/types/common/utils/locale/fetch-messages-for-locale.d.ts +1 -1
- package/dist/types/hooks/useAssetsClient.d.ts +2 -2
- package/dist/types/hooks/useObjectSchemas.d.ts +1 -1
- package/dist/types/services/cmdbService.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/services/mocks.d.ts +2 -2
- package/dist/types/services/useBasicFilterAGG.d.ts +2 -2
- package/dist/types/ui/assets-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/search-container/object-schema-select/index.d.ts +1 -1
- package/dist/types/ui/assets-modal/search-container/object-schema-select/utils.d.ts +1 -1
- package/dist/types/ui/common/error-state/no-instances.d.ts +1 -1
- package/dist/types/ui/common/error-state/provider-auth-required.d.ts +1 -1
- package/dist/types/ui/common/initial-state-view/index.d.ts +1 -1
- package/dist/types/ui/common/modal/basic-search-input/index.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/count-view-smart-link/index.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/control.d.ts +2 -2
- package/dist/types/ui/common/modal/popup-select/dropdownIndicator.d.ts +2 -2
- package/dist/types/ui/common/modal/popup-select/formatOptionLabel.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/index.d.ts +3 -3
- package/dist/types/ui/common/modal/popup-select/menu-list/index.d.ts +2 -2
- package/dist/types/ui/common/modal/popup-select/menu-list/selectMessage.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/trigger.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/types.d.ts +1 -1
- package/dist/types/ui/common/modal/site-selector/index.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.d.ts +2 -2
- package/dist/types/ui/confluence-search-modal/basic-filters/types.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/index.d.ts +1 -1
- package/dist/types/ui/datasource-table-view/datasourceTableView.d.ts +0 -1
- package/dist/types/ui/datasource-table-view/index.d.ts +1 -1
- package/dist/types/ui/datasource-table-view/types.d.ts +1 -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/index.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/draggable-table-heading.d.ts +2 -2
- package/dist/types/ui/issue-like-table/empty-state/priority.d.ts +1 -1
- package/dist/types/ui/issue-like-table/empty-state/type.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-time/index.d.ts +2 -2
- 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/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/utils.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.d.ts +3 -3
- package/dist/types/ui/jira-issues-modal/basic-filters/hooks/useHydrateJqlQuery.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/basic-filters/types.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/index.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/utils/isClauseTooComplex.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/utils/transformers.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/index.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/jira-search-container/buildJQL.d.ts +1 -1
- package/dist/types/ui/jira-issues-modal/jira-search-container/index.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/types.d.ts +3 -3
- package/dist/types-ts4.5/analytics/generated/create-event-payload.d.ts +1 -1
- package/dist/types-ts4.5/analytics/ufoExperiences/hooks/useColumnPickerRenderedFailedUfoExperience.d.ts +1 -1
- package/dist/types-ts4.5/analytics/ufoExperiences/hooks/useDataRenderedUfoExperience.d.ts +1 -1
- package/dist/types-ts4.5/common/types.d.ts +1 -1
- package/dist/types-ts4.5/common/utils/adf.d.ts +1 -1
- package/dist/types-ts4.5/common/utils/locale/fetch-messages-for-locale.d.ts +1 -1
- package/dist/types-ts4.5/hooks/useAssetsClient.d.ts +2 -2
- package/dist/types-ts4.5/hooks/useObjectSchemas.d.ts +1 -1
- package/dist/types-ts4.5/services/cmdbService.d.ts +3 -3
- package/dist/types-ts4.5/services/makeGetJqlAutocompleteData.d.ts +1 -1
- package/dist/types-ts4.5/services/makeGetJqlSuggestionsData.d.ts +1 -1
- package/dist/types-ts4.5/services/mocks.d.ts +2 -2
- package/dist/types-ts4.5/services/useBasicFilterAGG.d.ts +2 -2
- package/dist/types-ts4.5/ui/assets-modal/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/assets-modal/modal/render-assets-content/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/assets-modal/search-container/object-schema-select/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/assets-modal/search-container/object-schema-select/utils.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/error-state/no-instances.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/error-state/provider-auth-required.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/initial-state-view/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/basic-search-input/index.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/count-view-smart-link/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/control.d.ts +2 -2
- package/dist/types-ts4.5/ui/common/modal/popup-select/dropdownIndicator.d.ts +2 -2
- package/dist/types-ts4.5/ui/common/modal/popup-select/formatOptionLabel.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/common/modal/popup-select/menu-list/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/common/modal/popup-select/menu-list/selectMessage.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/trigger.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/site-selector/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.d.ts +1 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.d.ts +2 -2
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/datasource-table-view/datasourceTableView.d.ts +0 -1
- package/dist/types-ts4.5/ui/datasource-table-view/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/datasource-table-view/types.d.ts +1 -2
- package/dist/types-ts4.5/ui/issue-like-table/column-picker/concatenated-menu-list.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/column-picker/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/column-picker/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/custom-icons.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/draggable-table-heading.d.ts +2 -2
- package/dist/types-ts4.5/ui/issue-like-table/empty-state/priority.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/empty-state/type.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/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/date-time/index.d.ts +2 -2
- 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/status/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/render-type/tag/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/render-type/text/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/issue-like-table/render-type/user/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/issue-like-table/utils.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.d.ts +3 -3
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/hooks/useHydrateJqlQuery.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/utils/isClauseTooComplex.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/utils/transformers.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/jira-search-container/buildJQL.d.ts +1 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/jira-search-container/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/types.d.ts +3 -3
- package/examples-helpers/buildAssetsIssuesTable.tsx +2 -2
- package/examples-helpers/buildConfluenceSearchTable.tsx +2 -2
- package/examples-helpers/buildIssueLikeTable.tsx +2 -1
- package/examples-helpers/buildJiraIssuesTable.tsx +2 -2
- 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 +2 -2
- package/package.json +18 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 2.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#102478](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102478)
|
|
8
|
+
[`3378951608b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3378951608b0) -
|
|
9
|
+
[ED-23332] Update adf-schema package to 36.10.1
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 2.3.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#97435](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97435)
|
|
17
|
+
[`74d425408d1e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/74d425408d1e) -
|
|
18
|
+
[ux] Fix a bug where when sum of all column widths is less than container total width the
|
|
19
|
+
resizing is somewhat broken
|
|
20
|
+
- [#99133](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99133)
|
|
21
|
+
[`2de9d30e7ac6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2de9d30e7ac6) -
|
|
22
|
+
Updates docs to include in atlaskit for use of smart link list view and configuration modals and
|
|
23
|
+
respective props and examples.
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 2.3.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.SchemaSelectContainer = exports.FormRowContainer = exports.FormContainer = exports.FieldContainer = void 0;
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
9
10
|
var FormRowContainer = exports.FormRowContainer = _styled.default.div(function (props) {
|
|
10
11
|
return {
|
|
11
12
|
alignItems: 'center',
|
|
@@ -15,6 +16,8 @@ var FormRowContainer = exports.FormRowContainer = _styled.default.div(function (
|
|
|
15
16
|
width: '100%'
|
|
16
17
|
};
|
|
17
18
|
});
|
|
19
|
+
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
18
21
|
var FormContainer = exports.FormContainer = _styled.default.form({
|
|
19
22
|
display: 'grid',
|
|
20
23
|
rowGap: "var(--ds-space-200, 16px)",
|
|
@@ -22,10 +25,13 @@ var FormContainer = exports.FormContainer = _styled.default.form({
|
|
|
22
25
|
});
|
|
23
26
|
|
|
24
27
|
// Override the top margin of fields
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
25
29
|
var FieldContainer = exports.FieldContainer = _styled.default.div({
|
|
26
30
|
flex: 1,
|
|
27
31
|
marginTop: "var(--ds-space-negative-100, -8px)"
|
|
28
32
|
});
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
29
35
|
var SchemaSelectContainer = exports.SchemaSelectContainer = _styled.default.div({
|
|
30
36
|
width: '100%',
|
|
31
37
|
maxWidth: '386px'
|
|
@@ -23,6 +23,8 @@ var triggerButtonLabelStyles = (0, _primitives.xcss)({
|
|
|
23
23
|
var badgeStyles = (0, _primitives.xcss)({
|
|
24
24
|
marginLeft: 'space.050'
|
|
25
25
|
});
|
|
26
|
+
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
26
28
|
var LoadingStateAnimationWrapper = exports.LoadingStateAnimationWrapper = _styled.default.div({
|
|
27
29
|
position: 'relative',
|
|
28
30
|
animation: 'flickerAnimation 2s infinite',
|
package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/styled.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.SelectDateRangeButton = exports.PopupComponentContainer = exports.DateRa
|
|
|
8
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
10
10
|
var _constants = require("@atlaskit/theme/constants");
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
11
12
|
var PopupComponentContainer = exports.PopupComponentContainer = _styled.default.div({
|
|
12
13
|
boxSizing: 'border-box',
|
|
13
14
|
display: 'block',
|
|
@@ -20,6 +21,8 @@ var PopupComponentContainer = exports.PopupComponentContainer = _styled.default.
|
|
|
20
21
|
},
|
|
21
22
|
boxShadow: "var(--ds-shadow-overlay, 0px 0px 1px 0px rgba(9, 30, 66, 0.31), 0px 3px 5px 0px rgba(9, 30, 66, 0.20))"
|
|
22
23
|
});
|
|
24
|
+
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
23
26
|
var CustomDropdown = exports.CustomDropdown = _styled.default.div({
|
|
24
27
|
width: '340px',
|
|
25
28
|
background: "var(--ds-background-input, ".concat(_colors.N0, ")"),
|
|
@@ -27,6 +30,8 @@ var CustomDropdown = exports.CustomDropdown = _styled.default.div({
|
|
|
27
30
|
boxShadow: "var(--ds-shadow-overlay, 0px 0px 1px 0px rgba(9, 30, 66, 0.31), 0px 3px 5px 0px rgba(9, 30, 66, 0.20))",
|
|
28
31
|
zIndex: _constants.layers.modal()
|
|
29
32
|
});
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
30
35
|
var CustomDropdownItem = exports.CustomDropdownItem = _styled.default.div(function (props) {
|
|
31
36
|
return {
|
|
32
37
|
height: '36px',
|
|
@@ -45,16 +50,22 @@ var CustomDropdownItem = exports.CustomDropdownItem = _styled.default.div(functi
|
|
|
45
50
|
}
|
|
46
51
|
};
|
|
47
52
|
});
|
|
53
|
+
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
48
55
|
var CustomDateWrapper = exports.CustomDateWrapper = _styled.default.div({
|
|
49
56
|
padding: "var(--ds-space-150, 12px)",
|
|
50
57
|
boxSizing: 'border-box'
|
|
51
58
|
});
|
|
59
|
+
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
52
61
|
var DatePickersWrapper = exports.DatePickersWrapper = _styled.default.div({
|
|
53
62
|
display: 'flex',
|
|
54
63
|
justifyContent: 'space-between',
|
|
55
64
|
alignItems: 'center',
|
|
56
65
|
width: '100%'
|
|
57
66
|
});
|
|
67
|
+
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
58
69
|
var SelectDateRangeButton = exports.SelectDateRangeButton = _styled.default.button({
|
|
59
70
|
background: "var(--ds-background-accent-gray-subtler, ".concat(_colors.N20, ")"),
|
|
60
71
|
border: 'none',
|
|
@@ -68,6 +79,8 @@ var SelectDateRangeButton = exports.SelectDateRangeButton = _styled.default.butt
|
|
|
68
79
|
cursor: 'pointer'
|
|
69
80
|
}
|
|
70
81
|
});
|
|
82
|
+
|
|
83
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
71
84
|
var DateRangeErrorMessage = exports.DateRangeErrorMessage = _styled.default.div({
|
|
72
85
|
display: 'flex',
|
|
73
86
|
lineHeight: 1.3333,
|
|
@@ -15,6 +15,7 @@ var _styled2 = require("./styled");
|
|
|
15
15
|
|
|
16
16
|
var maxWidth = '200px';
|
|
17
17
|
var firstLastChildOverride = "\n &:first-of-type, &:last-of-type {\n padding-left: ".concat("var(--ds-space-100, 8px)", ";\n padding-right: ", "var(--ds-space-100, 8px)", ";\n }\n");
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
18
19
|
var TablePreviewHeading = (0, _styled.default)(_styled2.TableHeading)({
|
|
19
20
|
overflow: 'hidden',
|
|
20
21
|
textOverflow: 'ellipsis',
|
|
@@ -22,6 +23,8 @@ var TablePreviewHeading = (0, _styled.default)(_styled2.TableHeading)({
|
|
|
22
23
|
background: "var(--ds-background-disabled, #091E4224)",
|
|
23
24
|
maxWidth: maxWidth
|
|
24
25
|
}, firstLastChildOverride);
|
|
26
|
+
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
25
28
|
var TablePreviewCell = _styled.default.td({
|
|
26
29
|
overflow: 'hidden',
|
|
27
30
|
textOverflow: 'ellipsis',
|
|
@@ -38,6 +38,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
38
38
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
39
39
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
40
40
|
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) { (0, _defineProperty2.default)(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; }
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
41
42
|
var DropdownParent = _styled.default.div({
|
|
42
43
|
display: 'flex',
|
|
43
44
|
alignItems: 'center',
|
|
@@ -124,6 +125,11 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
124
125
|
closestEdge = _useState6[0],
|
|
125
126
|
setClosestEdge = _useState6[1];
|
|
126
127
|
var dropTargetRef = (0, _react.useRef)(null);
|
|
128
|
+
/**
|
|
129
|
+
* When width is not set (or callback is not set) we assume not resizing is needed.
|
|
130
|
+
* In our case width won't be set for last cell when table container is bigger than sum of all columns
|
|
131
|
+
*/
|
|
132
|
+
var resizeIsEnabled = !!onWidthChange && !!width;
|
|
127
133
|
(0, _react.useEffect)(function () {
|
|
128
134
|
var cell = mainHeaderCellRef.current;
|
|
129
135
|
(0, _tinyInvariant.default)(cell);
|
|
@@ -231,7 +237,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
231
237
|
|
|
232
238
|
// Handling column resizing
|
|
233
239
|
(0, _react.useEffect)(function () {
|
|
234
|
-
if (!
|
|
240
|
+
if (!resizeIsEnabled) {
|
|
235
241
|
return;
|
|
236
242
|
}
|
|
237
243
|
var resizeHandle = columnResizeHandleRef.current;
|
|
@@ -287,7 +293,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
287
293
|
}
|
|
288
294
|
}
|
|
289
295
|
});
|
|
290
|
-
}, [id, index, onWidthChange, state, tableId, width]);
|
|
296
|
+
}, [id, index, onWidthChange, resizeIsEnabled, state, tableId, width]);
|
|
291
297
|
var _useState7 = (0, _react.useState)(false),
|
|
292
298
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
293
299
|
buttonHovered = _useState8[0],
|
|
@@ -296,7 +302,9 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
296
302
|
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
297
303
|
isDropdownOpen = _useState10[0],
|
|
298
304
|
setIsDropdownOpen = _useState10[1];
|
|
299
|
-
|
|
305
|
+
// Width is not set when it is a last cell in a wide table.
|
|
306
|
+
// We make assumption thus that there is enough width for chevron.
|
|
307
|
+
var isWideEnoughToHaveChevron = !width || width > 76;
|
|
300
308
|
var shouldShowTriggerIcon = (buttonHovered || isDropdownOpen) && isWideEnoughToHaveChevron;
|
|
301
309
|
var triggerIcon = (0, _react.useMemo)(function () {
|
|
302
310
|
return shouldShowTriggerIcon ? isDropdownOpen ? _chevronUp.default : _chevronDown.default : isWideEnoughToHaveChevron ? _customIcons.GlyphPlaceholder : undefined;
|
|
@@ -332,10 +340,10 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
332
340
|
style: _objectSpread({
|
|
333
341
|
cursor: 'grab'
|
|
334
342
|
}, (0, _utils.getWidthCss)({
|
|
335
|
-
shouldUseWidth:
|
|
343
|
+
shouldUseWidth: resizeIsEnabled,
|
|
336
344
|
width: width
|
|
337
345
|
}))
|
|
338
|
-
},
|
|
346
|
+
}, resizeIsEnabled ? (0, _react2.jsx)("div", {
|
|
339
347
|
ref: columnResizeHandleRef,
|
|
340
348
|
css: [resizerStyles, state.type === 'resizing' && resizingStyles],
|
|
341
349
|
style: {
|
|
@@ -13,6 +13,7 @@ var _3 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/epic/16"));
|
|
|
13
13
|
var _4 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/issue/16"));
|
|
14
14
|
var _5 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/story/16"));
|
|
15
15
|
var _6 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/task/16"));
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
16
17
|
var IconWrapper = _styled.default.div({
|
|
17
18
|
display: 'flex',
|
|
18
19
|
alignItems: 'center',
|
|
@@ -14,6 +14,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
14
14
|
var _react = require("react");
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
17
|
+
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
17
18
|
var _reactIntlNext = require("react-intl-next");
|
|
18
19
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
19
20
|
var _linkingCommon = require("@atlaskit/linking-common");
|
|
@@ -25,6 +26,7 @@ var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
|
25
26
|
var _colors = require("@atlaskit/theme/colors");
|
|
26
27
|
var _typography = require("@atlaskit/theme/typography");
|
|
27
28
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
29
|
+
var _widthDetector = require("@atlaskit/width-detector");
|
|
28
30
|
var _ufoExperiences = require("../../analytics/ufoExperiences");
|
|
29
31
|
var _zindex = require("../../common/zindex");
|
|
30
32
|
var _columnPicker = require("./column-picker");
|
|
@@ -35,7 +37,7 @@ var _renderType = require("./render-type");
|
|
|
35
37
|
var _styled2 = require("./styled");
|
|
36
38
|
var _useIsOnScreen = require("./useIsOnScreen");
|
|
37
39
|
var _utils = require("./utils");
|
|
38
|
-
var _styled$
|
|
40
|
+
var _styled$td;
|
|
39
41
|
/** @jsx jsx */
|
|
40
42
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
41
43
|
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) { (0, _defineProperty2.default)(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; }
|
|
@@ -51,27 +53,33 @@ var truncateTextStyles = (0, _react2.css)({
|
|
|
51
53
|
textOverflow: 'ellipsis',
|
|
52
54
|
whiteSpace: 'nowrap'
|
|
53
55
|
});
|
|
54
|
-
var
|
|
55
|
-
|
|
56
|
+
var columnPickerWidth = 80;
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
58
|
+
var ColumnPickerHeader = _styled.default.th((0, _defineProperty2.default)({}, "".concat((0, _styled2.withTablePluginHeaderPrefix)('&:last-of-type')), {
|
|
59
|
+
boxSizing: 'border-box',
|
|
56
60
|
border: 0,
|
|
57
|
-
width:
|
|
61
|
+
width: "".concat(columnPickerWidth, "px"),
|
|
58
62
|
zIndex: 10,
|
|
59
63
|
position: 'sticky',
|
|
60
64
|
right: "calc(-1 * ".concat(tableSidePadding, ")"),
|
|
61
65
|
backgroundColor: "var(--ds-elevation-surface-current, #FFF)",
|
|
66
|
+
/* It is required to have solid (not half-transparent) color because of this gradient business below */
|
|
62
67
|
borderBottom: "2px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
63
|
-
paddingRight:
|
|
68
|
+
paddingRight: tableSidePadding,
|
|
64
69
|
background: "linear-gradient( 90deg, rgba(255, 255, 255, 0) 0%, ".concat("var(--ds-elevation-surface-current, #FFF)", " 10% )"),
|
|
70
|
+
/* Keeps dropdown button in the middle */
|
|
65
71
|
verticalAlign: 'middle',
|
|
72
|
+
/* In case when TH itself is bigger we want to keep picker at the right side */
|
|
66
73
|
textAlign: 'right'
|
|
67
|
-
})
|
|
68
|
-
paddingRight: tableSidePadding
|
|
69
|
-
}), _styled$th));
|
|
74
|
+
}));
|
|
70
75
|
var truncateStyles = (0, _react2.css)({
|
|
71
76
|
textOverflow: 'ellipsis',
|
|
72
77
|
whiteSpace: 'nowrap'
|
|
73
78
|
});
|
|
79
|
+
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
74
81
|
var TableCell = _styled.default.td((_styled$td = {}, (0, _defineProperty2.default)(_styled$td, "".concat((0, _styled2.withTablePluginBodyPrefix)()), {
|
|
82
|
+
/* First section here is to override things editor table plugin css defines */
|
|
75
83
|
font: _styled2.fieldTextFontSize,
|
|
76
84
|
padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-100, 8px)"),
|
|
77
85
|
border: 0,
|
|
@@ -92,7 +100,8 @@ var TableCell = _styled.default.td((_styled$td = {}, (0, _defineProperty2.defaul
|
|
|
92
100
|
var tableContainerStyles = (0, _react2.css)({
|
|
93
101
|
borderRadius: 'inherit',
|
|
94
102
|
borderBottomLeftRadius: 0,
|
|
95
|
-
borderBottomRightRadius: 0
|
|
103
|
+
borderBottomRightRadius: 0,
|
|
104
|
+
position: 'relative'
|
|
96
105
|
});
|
|
97
106
|
|
|
98
107
|
/**
|
|
@@ -189,7 +198,10 @@ var tableStyles = (0, _react2.css)({
|
|
|
189
198
|
// These styles are needed to prevent thead bottom border from scrolling away.
|
|
190
199
|
// This happens because it is sticky. https://stackoverflow.com/questions/50361698/border-style-do-not-work-with-sticky-position-element
|
|
191
200
|
borderCollapse: 'separate',
|
|
192
|
-
borderSpacing: 0
|
|
201
|
+
borderSpacing: 0,
|
|
202
|
+
// There is a strange table:first-of-type rule that sets margin-top to 0 coming from container,
|
|
203
|
+
// but because our table is now not the first child (there is an empty div to measure width) we need to set it manually.
|
|
204
|
+
margin: 0
|
|
193
205
|
});
|
|
194
206
|
|
|
195
207
|
// By default tbody and thead have border-bottom: 2px ...
|
|
@@ -301,6 +313,19 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
301
313
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
302
314
|
orderedColumns = _useState6[0],
|
|
303
315
|
setOrderedColumns = _useState6[1];
|
|
316
|
+
|
|
317
|
+
// Table container width is used to know if sum of all column widths is bigger of container or not.
|
|
318
|
+
// When sum of all columns is less than container size we make last column stretchable (width: undefined)
|
|
319
|
+
var _useState7 = (0, _react.useState)(),
|
|
320
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
321
|
+
tableContainerWidth = _useState8[0],
|
|
322
|
+
setTableContainerWidth = _useState8[1];
|
|
323
|
+
(0, _react.useEffect)(function () {
|
|
324
|
+
var current = containerRef.current;
|
|
325
|
+
if (containerRef && current) {
|
|
326
|
+
setTableContainerWidth(current.getBoundingClientRect().width);
|
|
327
|
+
}
|
|
328
|
+
}, [containerRef]);
|
|
304
329
|
(0, _react.useEffect)(function () {
|
|
305
330
|
if (!hasFullSchema) {
|
|
306
331
|
setOrderedColumns(getOrderedColumns((0, _toConsumableArray2.default)(columns), (0, _toConsumableArray2.default)(visibleColumnKeys)));
|
|
@@ -327,19 +352,33 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
327
352
|
// or some other combination.
|
|
328
353
|
|
|
329
354
|
var identityColumnKey = 'id';
|
|
330
|
-
var
|
|
331
|
-
return (columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]) || getDefaultColumnWidth(key, type);
|
|
332
|
-
}, [columnCustomSizes]);
|
|
333
|
-
var headerColumns = (0, _react.useMemo)(function () {
|
|
355
|
+
var columnsWidthsSum = (0, _react.useMemo)(function () {
|
|
334
356
|
return visibleSortedColumns.map(function (_ref7) {
|
|
335
357
|
var key = _ref7.key,
|
|
336
|
-
title = _ref7.title,
|
|
337
358
|
type = _ref7.type;
|
|
359
|
+
return (columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]) || getDefaultColumnWidth(key, type);
|
|
360
|
+
}).reduce(function (sum, width) {
|
|
361
|
+
return width + sum;
|
|
362
|
+
}, 0) + (onVisibleColumnKeysChange ? columnPickerWidth : 0);
|
|
363
|
+
}, [columnCustomSizes, onVisibleColumnKeysChange, visibleSortedColumns]);
|
|
364
|
+
var shouldUseWidth = !!(onColumnResize || columnCustomSizes);
|
|
365
|
+
var getColumnWidth = (0, _react.useCallback)(function (key, type, isLastCell) {
|
|
366
|
+
if (isLastCell && shouldUseWidth && (!tableContainerWidth || tableContainerWidth > columnsWidthsSum)) {
|
|
367
|
+
return undefined;
|
|
368
|
+
} else {
|
|
369
|
+
return (columnCustomSizes === null || columnCustomSizes === void 0 ? void 0 : columnCustomSizes[key]) || getDefaultColumnWidth(key, type);
|
|
370
|
+
}
|
|
371
|
+
}, [columnCustomSizes, columnsWidthsSum, shouldUseWidth, tableContainerWidth]);
|
|
372
|
+
var headerColumns = (0, _react.useMemo)(function () {
|
|
373
|
+
return visibleSortedColumns.map(function (_ref8, index) {
|
|
374
|
+
var key = _ref8.key,
|
|
375
|
+
title = _ref8.title,
|
|
376
|
+
type = _ref8.type;
|
|
338
377
|
return {
|
|
339
378
|
key: key,
|
|
340
379
|
content: title,
|
|
341
380
|
shouldTruncate: true,
|
|
342
|
-
width: getColumnWidth(key, type)
|
|
381
|
+
width: getColumnWidth(key, type, index === visibleSortedColumns.length - 1)
|
|
343
382
|
};
|
|
344
383
|
});
|
|
345
384
|
}, [getColumnWidth, visibleSortedColumns]);
|
|
@@ -376,9 +415,9 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
376
415
|
return;
|
|
377
416
|
}
|
|
378
417
|
return (0, _combine.combine)((0, _adapter.monitorForElements)({
|
|
379
|
-
onDragStart: function onDragStart(
|
|
380
|
-
var location =
|
|
381
|
-
source =
|
|
418
|
+
onDragStart: function onDragStart(_ref9) {
|
|
419
|
+
var location = _ref9.location,
|
|
420
|
+
source = _ref9.source;
|
|
382
421
|
initialAutoScrollerClientY.current = location.current.input.clientY;
|
|
383
422
|
if (source.data.type === 'table-header') {
|
|
384
423
|
var _containerRef$current;
|
|
@@ -394,9 +433,9 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
394
433
|
});
|
|
395
434
|
}
|
|
396
435
|
},
|
|
397
|
-
onDrag: function onDrag(
|
|
398
|
-
var location =
|
|
399
|
-
source =
|
|
436
|
+
onDrag: function onDrag(_ref10) {
|
|
437
|
+
var location = _ref10.location,
|
|
438
|
+
source = _ref10.source;
|
|
400
439
|
if (source.data.type === 'table-header') {
|
|
401
440
|
var _containerRef$current2;
|
|
402
441
|
_pragmaticDragAndDropReactBeautifulDndAutoscroll.autoScroller.updateInput({
|
|
@@ -406,9 +445,9 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
406
445
|
});
|
|
407
446
|
}
|
|
408
447
|
},
|
|
409
|
-
onDrop: function onDrop(
|
|
410
|
-
var source =
|
|
411
|
-
location =
|
|
448
|
+
onDrop: function onDrop(_ref11) {
|
|
449
|
+
var source = _ref11.source,
|
|
450
|
+
location = _ref11.location;
|
|
412
451
|
_pragmaticDragAndDropReactBeautifulDndAutoscroll.autoScroller.stop();
|
|
413
452
|
if (location.current.dropTargets.length === 0) {
|
|
414
453
|
return;
|
|
@@ -443,10 +482,10 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
443
482
|
return items.map(function (newRowData, rowIndex) {
|
|
444
483
|
return {
|
|
445
484
|
key: "".concat(identityColumnKey && newRowData[identityColumnKey] && newRowData[identityColumnKey].data || rowIndex),
|
|
446
|
-
cells: visibleSortedColumns.map(function (
|
|
485
|
+
cells: visibleSortedColumns.map(function (_ref12, cellIndex) {
|
|
447
486
|
var _newRowData$key;
|
|
448
|
-
var key =
|
|
449
|
-
type =
|
|
487
|
+
var key = _ref12.key,
|
|
488
|
+
type = _ref12.type;
|
|
450
489
|
// Need to make sure we keep falsy values like 0 and '', as well as the boolean false.
|
|
451
490
|
var value = (_newRowData$key = newRowData[key]) === null || _newRowData$key === void 0 ? void 0 : _newRowData$key.data;
|
|
452
491
|
var values = Array.isArray(value) ? value : [value];
|
|
@@ -470,7 +509,7 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
470
509
|
return {
|
|
471
510
|
key: key,
|
|
472
511
|
content: contentComponent,
|
|
473
|
-
width: getColumnWidth(key, type)
|
|
512
|
+
width: getColumnWidth(key, type, cellIndex === visibleSortedColumns.length - 1)
|
|
474
513
|
};
|
|
475
514
|
}),
|
|
476
515
|
ref: rowIndex === items.length - 1 ? function (el) {
|
|
@@ -536,7 +575,6 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
536
575
|
}
|
|
537
576
|
}, _callee, null, [[3, 9]]);
|
|
538
577
|
})), [parentContainerRenderInstanceId, extensionKey, hasFullSchema, onLoadDatasourceDetails]);
|
|
539
|
-
var shouldUseWidth = !!(onColumnResize || columnCustomSizes);
|
|
540
578
|
var isEditable = onVisibleColumnKeysChange && hasData;
|
|
541
579
|
return (0, _react2.jsx)("div", {
|
|
542
580
|
/* There is required contentEditable={true} in editor-card-plugin
|
|
@@ -548,8 +586,11 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
548
586
|
css: [tableContainerStyles, scrollableContainerHeight && scrollableContainerStyles],
|
|
549
587
|
style: scrollableContainerHeight ? {
|
|
550
588
|
maxHeight: "".concat(scrollableContainerHeight, "px")
|
|
551
|
-
} : undefined
|
|
552
|
-
|
|
589
|
+
} : undefined,
|
|
590
|
+
"data-testid": 'issue-like-table-container'
|
|
591
|
+
}, (0, _react2.jsx)(_widthDetector.WidthObserver, {
|
|
592
|
+
setWidth: (0, _debounce.default)(setTableContainerWidth, 100)
|
|
593
|
+
}), (0, _react2.jsx)(_styled2.Table, {
|
|
553
594
|
css: tableStyles,
|
|
554
595
|
"data-testid": testId,
|
|
555
596
|
style: shouldUseWidth ? {
|
|
@@ -561,10 +602,10 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
561
602
|
className: !!onVisibleColumnKeysChange ? 'has-column-picker' : ''
|
|
562
603
|
}, (0, _react2.jsx)("tr", {
|
|
563
604
|
ref: tableHeaderRowRef
|
|
564
|
-
}, headerColumns.map(function (
|
|
565
|
-
var key =
|
|
566
|
-
content =
|
|
567
|
-
width =
|
|
605
|
+
}, headerColumns.map(function (_ref14, cellIndex) {
|
|
606
|
+
var key = _ref14.key,
|
|
607
|
+
content = _ref14.content,
|
|
608
|
+
width = _ref14.width;
|
|
568
609
|
var heading = (0, _react2.jsx)(_tooltip.default, {
|
|
569
610
|
content: content,
|
|
570
611
|
tag: "span",
|
|
@@ -581,10 +622,10 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
581
622
|
}
|
|
582
623
|
if (isEditable) {
|
|
583
624
|
var _containerRef$current3;
|
|
584
|
-
var previewRows = tableRows.map(function (
|
|
585
|
-
var cells =
|
|
586
|
-
var cell = cells.find(function (
|
|
587
|
-
var cellKey =
|
|
625
|
+
var previewRows = tableRows.map(function (_ref15) {
|
|
626
|
+
var cells = _ref15.cells;
|
|
627
|
+
var cell = cells.find(function (_ref16) {
|
|
628
|
+
var cellKey = _ref16.key;
|
|
588
629
|
return cellKey === key;
|
|
589
630
|
});
|
|
590
631
|
if (cell) {
|
|
@@ -626,18 +667,18 @@ var IssueLikeDataTableView = exports.IssueLikeDataTableView = function IssueLike
|
|
|
626
667
|
})))), (0, _react2.jsx)("tbody", {
|
|
627
668
|
css: noDefaultBorderStyles,
|
|
628
669
|
"data-testid": testId && "".concat(testId, "--body")
|
|
629
|
-
}, rows.map(function (
|
|
630
|
-
var key =
|
|
631
|
-
cells =
|
|
632
|
-
ref =
|
|
670
|
+
}, rows.map(function (_ref17) {
|
|
671
|
+
var key = _ref17.key,
|
|
672
|
+
cells = _ref17.cells,
|
|
673
|
+
ref = _ref17.ref;
|
|
633
674
|
return (0, _react2.jsx)("tr", {
|
|
634
675
|
key: key,
|
|
635
676
|
"data-testid": testId && "".concat(testId, "--row-").concat(key),
|
|
636
677
|
ref: ref
|
|
637
|
-
}, cells.map(function (
|
|
638
|
-
var cellKey =
|
|
639
|
-
content =
|
|
640
|
-
width =
|
|
678
|
+
}, cells.map(function (_ref18, cellIndex) {
|
|
679
|
+
var cellKey = _ref18.key,
|
|
680
|
+
content = _ref18.content,
|
|
681
|
+
width = _ref18.width;
|
|
641
682
|
var isLastCell = cellIndex === cells.length - 1;
|
|
642
683
|
var loadingRowStyle = (0, _utils.getWidthCss)({
|
|
643
684
|
shouldUseWidth: shouldUseWidth,
|
|
@@ -24,6 +24,8 @@ var timeOptions = {
|
|
|
24
24
|
hour: '2-digit',
|
|
25
25
|
minute: '2-digit'
|
|
26
26
|
};
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
27
29
|
var DateTimeWrapper = _styled.default.span({
|
|
28
30
|
fontSize: _styled2.fieldTextFontSize
|
|
29
31
|
});
|
|
@@ -8,6 +8,7 @@ exports.default = exports.ICON_TYPE_TEST_ID = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
10
|
var _image = _interopRequireDefault(require("@atlaskit/image"));
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
11
12
|
var IconWrapper = _styled.default.div({
|
|
12
13
|
display: 'flex',
|
|
13
14
|
alignItems: 'center',
|
|
@@ -14,8 +14,7 @@ var _model = require("@atlaskit/editor-prosemirror/model");
|
|
|
14
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
15
|
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) { (0, _defineProperty2.default)(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; } /** @jsx jsx */
|
|
16
16
|
var rootStyles = (0, _react2.css)({
|
|
17
|
-
position: 'relative'
|
|
18
|
-
display: 'block'
|
|
17
|
+
position: 'relative'
|
|
19
18
|
});
|
|
20
19
|
var smartLinkNodeToUrl = function smartLinkNodeToUrl(node) {
|
|
21
20
|
var _node$attrs$url;
|
|
@@ -52,7 +51,7 @@ var RichTextType = function RichTextType(_ref) {
|
|
|
52
51
|
return parseRichText(value);
|
|
53
52
|
}, [value]);
|
|
54
53
|
if (adfPlainText) {
|
|
55
|
-
return (0, _react2.jsx)("
|
|
54
|
+
return (0, _react2.jsx)("span", {
|
|
56
55
|
css: rootStyles,
|
|
57
56
|
"data-testid": "richtext-plaintext"
|
|
58
57
|
}, adfPlainText);
|
|
@@ -9,6 +9,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
10
|
var _styled2 = require("../../styled");
|
|
11
11
|
var TEXT_TYPE_TEST_ID = exports.TEXT_TYPE_TEST_ID = 'link-datasource-render-type--text';
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
12
14
|
var TextWrapper = _styled.default.span({
|
|
13
15
|
fontSize: _styled2.fieldTextFontSize
|
|
14
16
|
});
|
|
@@ -32,6 +32,8 @@ var avatarWrapperStyles = (0, _primitives.xcss)({
|
|
|
32
32
|
var widthObserverWrapperStyles = (0, _primitives.xcss)({
|
|
33
33
|
position: 'relative'
|
|
34
34
|
});
|
|
35
|
+
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
35
37
|
var AvatarGroupWrapperStyles = _styled.default.div({
|
|
36
38
|
ul: {
|
|
37
39
|
paddingLeft: '0px !important'
|
|
@@ -12,6 +12,8 @@ var _typography = require("@atlaskit/theme/typography");
|
|
|
12
12
|
var _styled$th;
|
|
13
13
|
var ScrollableContainerHeight = exports.ScrollableContainerHeight = 590;
|
|
14
14
|
var fieldTextFontSize = exports.fieldTextFontSize = "var(--ds-font-body, ".concat(_typography.fontFallback.body.medium, ")");
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
15
17
|
var Table = exports.Table = _styled.default.table({
|
|
16
18
|
width: '100%'
|
|
17
19
|
});
|
|
@@ -30,14 +32,24 @@ var withTablePluginPrefix = exports.withTablePluginPrefix = function withTablePl
|
|
|
30
32
|
};
|
|
31
33
|
var withTablePluginHeaderPrefix = exports.withTablePluginHeaderPrefix = withTablePluginPrefix.bind(null, 'thead');
|
|
32
34
|
var withTablePluginBodyPrefix = exports.withTablePluginBodyPrefix = withTablePluginPrefix.bind(null, 'tbody');
|
|
35
|
+
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
33
37
|
var TableHeading = exports.TableHeading = _styled.default.th((_styled$th = {}, (0, _defineProperty2.default)(_styled$th, "".concat(withTablePluginHeaderPrefix()), {
|
|
34
38
|
border: 0,
|
|
35
39
|
position: 'relative',
|
|
40
|
+
/* This makes resizing work with out jumping due to padding + changes overall width for same default values. */
|
|
36
41
|
boxSizing: 'border-box',
|
|
37
42
|
lineHeight: lineHeight,
|
|
38
43
|
padding: "".concat(verticalPadding, " ", "var(--ds-space-050, 4px)"),
|
|
39
44
|
borderRight: "0.5px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
40
45
|
borderBottom: "2px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
|
|
46
|
+
/*
|
|
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
|
+
*/
|
|
41
53
|
height: "calc(".concat(lineHeight, " * 2 + ").concat(verticalPadding, " * 4 + 2px)"),
|
|
42
54
|
verticalAlign: 'bottom',
|
|
43
55
|
backgroundColor: "var(--ds-elevation-surface-current, #FFF)"
|
|
@@ -49,6 +61,9 @@ var TableHeading = exports.TableHeading = _styled.default.th((_styled$th = {}, (
|
|
|
49
61
|
borderRight: 0
|
|
50
62
|
}), (0, _defineProperty2.default)(_styled$th, "& [data-testid='datasource-header-content--container']", {
|
|
51
63
|
width: '100%',
|
|
64
|
+
/* With Button now being a parent for this component it adds its lineHeight value and spoils
|
|
65
|
+
`height` calculation above. */
|
|
66
|
+
lineHeight: lineHeight,
|
|
52
67
|
padding: "".concat(verticalPadding, " ", "var(--ds-space-050, 4px)"),
|
|
53
68
|
display: '-webkit-box',
|
|
54
69
|
WebkitLineClamp: 2,
|
|
@@ -14,16 +14,23 @@ var COLUMN_MIN_WIDTH = exports.COLUMN_MIN_WIDTH = COLUMN_BASE_WIDTH * 3;
|
|
|
14
14
|
* or rather default width that should be treated as a maximum width. When table inserted initially
|
|
15
15
|
* and no user custom width defined we set this value to `false`. As soon as user changes any of the
|
|
16
16
|
* column widths we treat all width as custom hardcoded widths.
|
|
17
|
-
* @param width
|
|
17
|
+
* @param width Sometimes set to undefined for last column to make it occupy remainder of the table width
|
|
18
18
|
*/
|
|
19
19
|
var getWidthCss = exports.getWidthCss = function getWidthCss(_ref) {
|
|
20
20
|
var shouldUseWidth = _ref.shouldUseWidth,
|
|
21
21
|
width = _ref.width;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
if (!width) {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
if (shouldUseWidth) {
|
|
26
|
+
return {
|
|
27
|
+
width: width
|
|
28
|
+
};
|
|
29
|
+
} else {
|
|
30
|
+
return {
|
|
31
|
+
maxWidth: width
|
|
32
|
+
};
|
|
33
|
+
}
|
|
27
34
|
};
|
|
28
35
|
|
|
29
36
|
/**
|