@carbon/ibm-products 2.0.0-rc.10 → 2.0.0-rc.12
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +131 -75
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +2 -2
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +1 -0
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +131 -75
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +2 -2
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +121 -75
- package/css/index.css.map +1 -1
- package/css/index.min.css +2 -2
- package/css/index.min.css.map +1 -1
- package/es/components/AddSelect/AddSelectBody.js +1 -1
- package/es/components/AddSelect/hooks/usePath.js +8 -1
- package/es/components/CreateFullPage/CreateFullPage.js +9 -2
- package/es/components/CreateTearsheet/CreateTearsheet.js +9 -2
- package/es/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +3 -1
- package/es/components/DataSpreadsheet/DataSpreadsheet.js +1 -4
- package/es/components/DataSpreadsheet/utils/handleCellDeletion.js +6 -4
- package/es/components/Datagrid/Datagrid/Datagrid.js +7 -3
- package/es/components/Datagrid/Datagrid/DatagridContent.js +18 -6
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +17 -4
- package/es/components/Datagrid/Datagrid/DatagridRow.js +2 -10
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +22 -4
- package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +29 -8
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +7 -10
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +11 -13
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +28 -27
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/{CustomizeColumnsModal.js → CustomizeColumnsTearsheet.js} +31 -31
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +56 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/index.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +424 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +83 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/constants.js +20 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useInitialStateFromFilters.js +22 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/index.js +7 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/utils.js +38 -0
- package/es/components/Datagrid/index.js +2 -1
- package/es/components/Datagrid/useCustomizeColumns.js +8 -8
- package/es/components/Datagrid/useFiltering.js +90 -0
- package/es/components/Datagrid/useParentDimensions.js +3 -1
- package/es/components/Datagrid/utils/DatagridActions.js +13 -26
- package/es/components/Datagrid/utils/getArgTypes.js +5 -0
- package/es/components/Datagrid/utils/getInlineEditColumns.js +6 -1
- package/es/components/Datagrid/utils/makeData.js +24 -16
- package/es/components/FilterSummary/FilterSummary.js +54 -0
- package/es/components/FilterSummary/index.js +7 -0
- package/es/components/index.js +1 -1
- package/es/global/js/hooks/useCreateComponentFocus.js +38 -10
- package/lib/components/AddSelect/AddSelectBody.js +1 -1
- package/lib/components/AddSelect/hooks/usePath.js +7 -0
- package/lib/components/CreateFullPage/CreateFullPage.js +9 -2
- package/lib/components/CreateTearsheet/CreateTearsheet.js +9 -2
- package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +3 -1
- package/lib/components/DataSpreadsheet/DataSpreadsheet.js +1 -4
- package/lib/components/DataSpreadsheet/utils/handleCellDeletion.js +6 -4
- package/lib/components/Datagrid/Datagrid/Datagrid.js +8 -3
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +17 -6
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +17 -4
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +2 -19
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +24 -3
- package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +31 -8
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +7 -10
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +6 -6
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +30 -28
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/{CustomizeColumnsModal.js → CustomizeColumnsTearsheet.js} +27 -25
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/{ModalWrapper.js → TearsheetWrapper.js} +31 -36
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/index.js +3 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +443 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +104 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +35 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useInitialStateFromFilters.js +33 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/index.js +15 -0
- package/lib/components/Datagrid/Datagrid/addons/Filtering/utils.js +47 -0
- package/lib/components/Datagrid/index.js +9 -1
- package/lib/components/Datagrid/useCustomizeColumns.js +7 -7
- package/lib/components/Datagrid/useFiltering.js +94 -0
- package/lib/components/Datagrid/useParentDimensions.js +3 -1
- package/lib/components/Datagrid/utils/DatagridActions.js +13 -25
- package/lib/components/Datagrid/utils/getArgTypes.js +5 -0
- package/lib/components/Datagrid/utils/getInlineEditColumns.js +6 -1
- package/lib/components/Datagrid/utils/makeData.js +26 -18
- package/lib/components/FilterSummary/FilterSummary.js +72 -0
- package/lib/components/FilterSummary/index.js +15 -0
- package/lib/components/index.js +6 -0
- package/lib/global/js/hooks/useCreateComponentFocus.js +42 -11
- package/package.json +2 -2
- package/scss/components/Datagrid/_datagrid.scss +0 -1
- package/scss/components/Datagrid/_storybook-styles.scss +12 -0
- package/scss/components/Datagrid/styles/_datagrid.scss +23 -0
- package/scss/components/Datagrid/styles/_draggableElement.scss +9 -8
- package/scss/components/Datagrid/styles/_index.scss +8 -8
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +65 -0
- package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +87 -0
- package/scss/components/FilterSummary/_filter-summary.scss +20 -0
- package/scss/components/FilterSummary/_index.scss +10 -0
- package/scss/components/FilterSummary/_storybook-styles.scss +14 -0
- package/scss/components/Tearsheet/_tearsheet.scss +2 -0
- package/scss/components/_index.scss +1 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ModalWrapper.js +0 -63
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsModal.scss +0 -93
@@ -1,13 +1,19 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
4
6
|
value: true
|
5
7
|
});
|
6
8
|
exports.useCreateComponentFocus = void 0;
|
7
9
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
11
|
+
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
13
|
+
|
8
14
|
var _react = require("react");
|
9
15
|
|
10
|
-
var
|
16
|
+
var _wait = _interopRequireDefault(require("../utils/wait"));
|
11
17
|
|
12
18
|
/**
|
13
19
|
* Copyright IBM Corp. 2021, 2021
|
@@ -20,25 +26,50 @@ var useCreateComponentFocus = function useCreateComponentFocus(_ref) {
|
|
20
26
|
var previousState = _ref.previousState,
|
21
27
|
currentStep = _ref.currentStep,
|
22
28
|
blockClass = _ref.blockClass,
|
23
|
-
onMount = _ref.onMount
|
29
|
+
onMount = _ref.onMount,
|
30
|
+
firstFocusElement = _ref.firstFocusElement;
|
24
31
|
(0, _react.useEffect)(function () {
|
25
32
|
if (typeof onMount === 'function') {
|
26
33
|
onMount();
|
27
34
|
}
|
28
35
|
}, [onMount]);
|
29
36
|
(0, _react.useEffect)(function () {
|
37
|
+
// because of how handleStackChange.claimFocus in TearsheetShell works a timeout is required to focus on specific elements
|
38
|
+
var awaitFocus = /*#__PURE__*/function () {
|
39
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(elm) {
|
40
|
+
return _regenerator.default.wrap(function _callee$(_context) {
|
41
|
+
while (1) {
|
42
|
+
switch (_context.prev = _context.next) {
|
43
|
+
case 0:
|
44
|
+
_context.next = 2;
|
45
|
+
return (0, _wait.default)(10);
|
46
|
+
|
47
|
+
case 2:
|
48
|
+
elm.focus();
|
49
|
+
|
50
|
+
case 3:
|
51
|
+
case "end":
|
52
|
+
return _context.stop();
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}, _callee);
|
56
|
+
}));
|
57
|
+
|
58
|
+
return function awaitFocus(_x) {
|
59
|
+
return _ref2.apply(this, arguments);
|
60
|
+
};
|
61
|
+
}();
|
62
|
+
|
30
63
|
if ((previousState === null || previousState === void 0 ? void 0 : previousState.currentStep) !== currentStep && currentStep > 0) {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
var nextButton = document.querySelector(".".concat(blockClass, "__create-button"));
|
38
|
-
nextButton === null || nextButton === void 0 ? void 0 : nextButton.focus();
|
64
|
+
if (firstFocusElement) {
|
65
|
+
var elm = document.querySelector(firstFocusElement);
|
66
|
+
|
67
|
+
if (elm) {
|
68
|
+
awaitFocus(elm);
|
69
|
+
}
|
39
70
|
}
|
40
71
|
}
|
41
|
-
}, [currentStep, previousState, blockClass, onMount]);
|
72
|
+
}, [currentStep, previousState, blockClass, onMount, firstFocusElement]);
|
42
73
|
};
|
43
74
|
|
44
75
|
exports.useCreateComponentFocus = useCreateComponentFocus;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products",
|
3
3
|
"description": "Carbon for IBM Products",
|
4
|
-
"version": "2.0.0-rc.
|
4
|
+
"version": "2.0.0-rc.12",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -94,5 +94,5 @@
|
|
94
94
|
"react": "^16.8.6 || ^17.0.1",
|
95
95
|
"react-dom": "^16.8.6 || ^17.0.1"
|
96
96
|
},
|
97
|
-
"gitHead": "
|
97
|
+
"gitHead": "feb17ff087be1ed1174b0e0cfa44dd1f991e2881"
|
98
98
|
}
|
@@ -102,3 +102,15 @@ $block-class: #{c4p-settings.$pkg-prefix}--datagrid;
|
|
102
102
|
.#{c4p-settings.$carbon-prefix}--dropdown__wrapper {
|
103
103
|
margin-bottom: $spacing-07;
|
104
104
|
}
|
105
|
+
|
106
|
+
.storybook-#{$block-class}__validation-code-snippet {
|
107
|
+
@include type.font-family($name: mono);
|
108
|
+
@include type.type-style('code-01');
|
109
|
+
|
110
|
+
display: inline-block;
|
111
|
+
padding: 0 $spacing-03;
|
112
|
+
border: 2px solid transparent;
|
113
|
+
margin-right: $spacing-03;
|
114
|
+
background-color: $field-01;
|
115
|
+
border-radius: $spacing-02;
|
116
|
+
}
|
@@ -485,6 +485,7 @@
|
|
485
485
|
.#{$block-class}
|
486
486
|
.#{c4p-settings.$carbon-prefix}--data-table--selected:not(.#{$block-class}__active-row)::before {
|
487
487
|
position: absolute;
|
488
|
+
top: 0;
|
488
489
|
left: 0;
|
489
490
|
width: $spacing-02;
|
490
491
|
height: 100%;
|
@@ -541,6 +542,28 @@
|
|
541
542
|
justify-content: center;
|
542
543
|
}
|
543
544
|
|
545
|
+
.#{$block-class}__customize-columns-checkbox-wrapper.#{c4p-settings.$carbon-prefix}--form-item {
|
546
|
+
flex: 0 0 auto;
|
547
|
+
margin-right: $spacing-03;
|
548
|
+
}
|
549
|
+
|
550
|
+
.#{$block-class}__virtual-scrollbar::-webkit-scrollbar {
|
551
|
+
width: 10px;
|
552
|
+
height: 7px;
|
553
|
+
}
|
554
|
+
|
555
|
+
.#{$block-class}__virtual-scrollbar::-webkit-scrollbar-track {
|
556
|
+
background: $layer;
|
557
|
+
}
|
558
|
+
|
559
|
+
.#{$block-class}__virtual-scrollbar::-webkit-scrollbar-thumb {
|
560
|
+
border-radius: 5px;
|
561
|
+
}
|
562
|
+
|
563
|
+
.#{$block-class}__virtualScrollContainer {
|
564
|
+
width: 100%;
|
565
|
+
}
|
566
|
+
|
544
567
|
.#{c4p-settings.$carbon-prefix}--body--with-modal-open
|
545
568
|
.#{$block-class}__grid-container {
|
546
569
|
overflow: hidden;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
7
|
+
|
8
8
|
@use '@carbon/styles/scss/theme' as *;
|
9
9
|
@use '@carbon/styles/scss/spacing' as *;
|
10
10
|
@use './variables';
|
@@ -20,7 +20,7 @@
|
|
20
20
|
pointer-events: none;
|
21
21
|
}
|
22
22
|
|
23
|
-
|
23
|
+
.#{variables.$block-class}__draggable-handleStyle.disabled svg {
|
24
24
|
fill: $icon-disabled;
|
25
25
|
}
|
26
26
|
|
@@ -56,6 +56,7 @@ svg.#{variables.$block-class}__draggable-handleStyle.disable {
|
|
56
56
|
.#{variables.$block-class}__draggable-handleHolder-droppable {
|
57
57
|
display: flex;
|
58
58
|
width: 100%;
|
59
|
+
align-items: center;
|
59
60
|
}
|
60
61
|
|
61
62
|
.#{variables.$block-class}__draggable-handleHolder-grabbed {
|
@@ -1,10 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
*/
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
8
7
|
@use './datagrid';
|
9
8
|
@use './useNestedRows';
|
10
9
|
@use './useNestedTable';
|
@@ -13,8 +12,9 @@
|
|
13
12
|
@use './useColumnCenterAlign';
|
14
13
|
@use './useStickyColumn';
|
15
14
|
@use './useActionsColumn';
|
16
|
-
@use './addons/
|
15
|
+
@use './addons/CustomizeColumnsTearsheet';
|
17
16
|
@use './addons/RowSizeDropdown';
|
17
|
+
@use './addons/FilterFlyout';
|
18
18
|
@use './useSelectAllToggle';
|
19
19
|
@use './useExpandedRow';
|
20
20
|
@use './draggableElement';
|
@@ -0,0 +1,65 @@
|
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
7
|
+
|
8
|
+
@use '@carbon/styles/scss/theme' as *;
|
9
|
+
@use '@carbon/styles/scss/spacing' as *;
|
10
|
+
@use '@carbon/styles/scss/type' as *;
|
11
|
+
@use '@carbon/type/scss/font-family';
|
12
|
+
@use '@carbon/layout' as *;
|
13
|
+
|
14
|
+
@use '../../../../global/styles/project-settings' as c4p-settings;
|
15
|
+
@use '../variables';
|
16
|
+
|
17
|
+
.#{variables.$block-class}__customize-columns-tearsheet {
|
18
|
+
.#{c4p-settings.$pkg-prefix}--tearsheet__content {
|
19
|
+
display: flex;
|
20
|
+
flex-flow: column;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.#{variables.$block-class}__customize-columns-tearsheet--actions
|
25
|
+
input[role='searchbox'] {
|
26
|
+
height: $spacing-09;
|
27
|
+
padding-left: $spacing-09;
|
28
|
+
border-bottom: 1px solid $background-active;
|
29
|
+
}
|
30
|
+
|
31
|
+
.#{variables.$block-class}__customize-columns-checkbox-wrapper {
|
32
|
+
display: flex;
|
33
|
+
justify-content: center;
|
34
|
+
padding-left: $spacing-03;
|
35
|
+
margin-bottom: 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
.#{variables.$block-class}__customize-columns-column-list {
|
39
|
+
position: relative; // needed for the react-dnd, otherwise the drag preview will not work correctly
|
40
|
+
overflow: auto;
|
41
|
+
}
|
42
|
+
|
43
|
+
.#{variables.$block-class}__customize-columns-select-all,
|
44
|
+
.#{variables.$block-class}__customize-columns-select-all--selected {
|
45
|
+
position: sticky;
|
46
|
+
z-index: 1;
|
47
|
+
top: 0;
|
48
|
+
display: flex;
|
49
|
+
height: $spacing-09;
|
50
|
+
padding-left: $spacing-08;
|
51
|
+
border-bottom: 1px solid $layer-active;
|
52
|
+
background-color: $layer;
|
53
|
+
|
54
|
+
.#{c4p-settings.$carbon-prefix}--checkbox-label-text {
|
55
|
+
@include font-family.font-weight('semibold');
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
.#{variables.$block-class}__customize-columns-select-all:hover {
|
60
|
+
background-color: $layer-hover;
|
61
|
+
}
|
62
|
+
|
63
|
+
.#{variables.$block-class}__customize-columns-select-all--selected {
|
64
|
+
background-color: $layer-selected;
|
65
|
+
}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
/*
|
2
|
+
* Licensed Materials - Property of IBM
|
3
|
+
* 5724-Q36
|
4
|
+
* (c) Copyright IBM Corp. 2022
|
5
|
+
* US Government Users Restricted Rights - Use, duplication or disclosure
|
6
|
+
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
7
|
+
*/
|
8
|
+
|
9
|
+
// stylelint-disable carbon/layout-token-use
|
10
|
+
|
11
|
+
@use '@carbon/styles/scss/theme' as *;
|
12
|
+
@use '@carbon/styles/scss/spacing' as *;
|
13
|
+
@use '@carbon/styles/scss/type' as *;
|
14
|
+
@use '@carbon/layout' as *;
|
15
|
+
|
16
|
+
@use '../../../../global/styles/project-settings' as c4p-settings;
|
17
|
+
@use '../variables';
|
18
|
+
|
19
|
+
$action-set-height: rem(64px);
|
20
|
+
|
21
|
+
.#{variables.$block-class}-filter-flyout__container {
|
22
|
+
position: relative;
|
23
|
+
}
|
24
|
+
|
25
|
+
.#{variables.$block-class}-filter-flyout {
|
26
|
+
position: absolute;
|
27
|
+
top: $spacing-09;
|
28
|
+
right: 0;
|
29
|
+
display: none;
|
30
|
+
width: rem(642px);
|
31
|
+
background-color: $layer-02;
|
32
|
+
box-shadow: 0 1px rem(8px) 0 rgba(0, 0, 0, 0.25);
|
33
|
+
}
|
34
|
+
|
35
|
+
.#{variables.$block-class}-filter-flyout--open {
|
36
|
+
display: grid;
|
37
|
+
}
|
38
|
+
|
39
|
+
.#{variables.$block-class}-filter-flyout--batch {
|
40
|
+
min-height: rem(346px);
|
41
|
+
grid-template-rows: 1fr rem(48px);
|
42
|
+
}
|
43
|
+
|
44
|
+
.#{variables.$block-class}-filter-flyout--instant {
|
45
|
+
min-height: rem(282px);
|
46
|
+
grid-template-rows: 1fr;
|
47
|
+
}
|
48
|
+
|
49
|
+
.#{variables.$block-class}-filter-flyout__inner-container {
|
50
|
+
padding: $spacing-05 $spacing-05 $spacing-09 $spacing-05;
|
51
|
+
}
|
52
|
+
|
53
|
+
.#{variables.$block-class}-filter-flyout__inner-container::before {
|
54
|
+
position: absolute;
|
55
|
+
top: rem(-7px);
|
56
|
+
right: 1px;
|
57
|
+
display: block;
|
58
|
+
width: rem(46px);
|
59
|
+
height: rem(15px);
|
60
|
+
background-color: $layer-02;
|
61
|
+
content: '';
|
62
|
+
}
|
63
|
+
|
64
|
+
.#{variables.$block-class}-filter-flyout__title {
|
65
|
+
display: block;
|
66
|
+
@include type-style('heading-compact-01');
|
67
|
+
|
68
|
+
margin-bottom: $spacing-06;
|
69
|
+
}
|
70
|
+
|
71
|
+
.#{variables.$block-class}-filter-flyout__filters {
|
72
|
+
display: grid;
|
73
|
+
gap: rem(16px) rem(32px);
|
74
|
+
grid-template-columns: 1fr 1fr;
|
75
|
+
}
|
76
|
+
|
77
|
+
// Carbon overrides
|
78
|
+
.#{variables.$block-class}-filter-flyout__trigger--open.#{c4p-settings.$carbon-prefix}--btn.#{c4p-settings.$carbon-prefix}--btn--icon-only {
|
79
|
+
position: relative;
|
80
|
+
background-color: $layer-02;
|
81
|
+
box-shadow: 0 1px rem(8px) 0 rgba(0, 0, 0, 0.25);
|
82
|
+
}
|
83
|
+
|
84
|
+
.#{variables.$block-class}-filter-flyout
|
85
|
+
.#{c4p-settings.$carbon-prefix}--fieldset {
|
86
|
+
margin-bottom: 0;
|
87
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
7
|
+
@use '../../global/styles/project-settings' as *;
|
8
|
+
@use '@carbon/styles/scss/spacing' as *;
|
9
|
+
@use '@carbon/styles/scss/theme' as *;
|
10
|
+
|
11
|
+
$block-class: #{$pkg-prefix}--filter-summary;
|
12
|
+
|
13
|
+
.#{$block-class} {
|
14
|
+
display: flex;
|
15
|
+
width: 100%;
|
16
|
+
align-items: center;
|
17
|
+
padding: $spacing-03;
|
18
|
+
border-top: 1px solid $border-subtle-01;
|
19
|
+
background: $layer-01;
|
20
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
7
|
+
|
8
|
+
// An index file is most useful when you have multiple components
|
9
|
+
|
10
|
+
@use './filter-summary';
|
@@ -0,0 +1,14 @@
|
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
7
|
+
#root {
|
8
|
+
width: 100%;
|
9
|
+
}
|
10
|
+
|
11
|
+
.preview-position-fix {
|
12
|
+
max-width: 700px;
|
13
|
+
margin: 0 auto;
|
14
|
+
}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
var _excluded = ["onSaveColumnPrefs", "isModalOpen", "setIsModalOpen", "labels"];
|
4
|
-
// @flow
|
5
|
-
|
6
|
-
/*
|
7
|
-
* Licensed Materials - Property of IBM
|
8
|
-
* 5724-Q36
|
9
|
-
* (c) Copyright IBM Corp. 2021
|
10
|
-
* US Government Users Restricted Rights - Use, duplication or disclosure
|
11
|
-
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
12
|
-
*/
|
13
|
-
import * as React from 'react';
|
14
|
-
import PropTypes from 'prop-types';
|
15
|
-
import CustomizeColumnsModal from './CustomizeColumnsModal';
|
16
|
-
|
17
|
-
var ModalWrapper = function ModalWrapper(_ref) {
|
18
|
-
var instance = _ref.instance;
|
19
|
-
|
20
|
-
var _instance$customizeCo = instance.customizeColumnsProps,
|
21
|
-
_onSaveColumnPrefs = _instance$customizeCo.onSaveColumnPrefs,
|
22
|
-
isModalOpen = _instance$customizeCo.isModalOpen,
|
23
|
-
setIsModalOpen = _instance$customizeCo.setIsModalOpen,
|
24
|
-
labels = _instance$customizeCo.labels,
|
25
|
-
rest = _objectWithoutProperties(_instance$customizeCo, _excluded);
|
26
|
-
|
27
|
-
if (isModalOpen) {
|
28
|
-
return /*#__PURE__*/React.createElement(CustomizeColumnsModal, _extends({}, rest, labels, {
|
29
|
-
isOpen: isModalOpen,
|
30
|
-
setIsModalOpen: setIsModalOpen,
|
31
|
-
columnDefinitions: instance.allColumns,
|
32
|
-
originalColumnDefinitions: instance.columns,
|
33
|
-
onSaveColumnPrefs: function onSaveColumnPrefs(updatedColDefs) {
|
34
|
-
var hiddenIds = updatedColDefs.filter(function (colDef) {
|
35
|
-
return !colDef.isVisible;
|
36
|
-
}).map(function (colDef) {
|
37
|
-
return colDef.id;
|
38
|
-
});
|
39
|
-
instance.setHiddenColumns(hiddenIds);
|
40
|
-
|
41
|
-
if (typeof instance.setColumnOrder === 'function') {
|
42
|
-
instance.setColumnOrder(updatedColDefs.map(function (colDef) {
|
43
|
-
return colDef.id;
|
44
|
-
}));
|
45
|
-
} else {
|
46
|
-
// eslint-disable-next-line no-console
|
47
|
-
console.warn("Column order can not be updated. Did you forget to add 'useColumnOrder' in 'useDatagrid'");
|
48
|
-
}
|
49
|
-
|
50
|
-
if (typeof _onSaveColumnPrefs === 'function') {
|
51
|
-
_onSaveColumnPrefs(updatedColDefs);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}));
|
55
|
-
}
|
56
|
-
|
57
|
-
return null;
|
58
|
-
};
|
59
|
-
|
60
|
-
ModalWrapper.propTypes = {
|
61
|
-
instance: PropTypes.object.isRequired
|
62
|
-
};
|
63
|
-
export default ModalWrapper;
|
@@ -1,93 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Licensed Materials - Property of IBM
|
3
|
-
* 5724-Q36
|
4
|
-
* (c) Copyright IBM Corp. 2021, 2022
|
5
|
-
* US Government Users Restricted Rights - Use, duplication or disclosure
|
6
|
-
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
7
|
-
*/
|
8
|
-
|
9
|
-
@use '@carbon/styles/scss/theme' as *;
|
10
|
-
@use '@carbon/styles/scss/spacing' as *;
|
11
|
-
@use '@carbon/styles/scss/type';
|
12
|
-
@use '../../../../global/styles/project-settings' as c4p-settings;
|
13
|
-
@use '../variables';
|
14
|
-
|
15
|
-
.#{variables.$block-class}__customize-columns-modal {
|
16
|
-
.#{c4p-settings.$carbon-prefix}--modal-content {
|
17
|
-
position: inherit;
|
18
|
-
display: flex;
|
19
|
-
flex-flow: column;
|
20
|
-
padding: 0;
|
21
|
-
margin: 0;
|
22
|
-
}
|
23
|
-
}
|
24
|
-
|
25
|
-
.#{variables.$block-class}__customize-columns-checkbox-wrapper {
|
26
|
-
margin-bottom: 0;
|
27
|
-
}
|
28
|
-
.#{variables.$block-class}__customize-columns-checkbox-wrapper {
|
29
|
-
display: flex;
|
30
|
-
justify-content: center;
|
31
|
-
}
|
32
|
-
|
33
|
-
.#{variables.$block-class}__customize-columns-modal--actions {
|
34
|
-
display: flex;
|
35
|
-
height: $spacing-09;
|
36
|
-
flex-flow: row;
|
37
|
-
background-color: $field-02;
|
38
|
-
}
|
39
|
-
|
40
|
-
.#{variables.$block-class}__customize-columns-modal--actions
|
41
|
-
input[role='searchbox'] {
|
42
|
-
height: $spacing-09;
|
43
|
-
padding-left: $spacing-08;
|
44
|
-
border-bottom: none;
|
45
|
-
}
|
46
|
-
|
47
|
-
.#{variables.$block-class}__customize-columns-modal--actions > button {
|
48
|
-
margin-left: $spacing-05;
|
49
|
-
}
|
50
|
-
|
51
|
-
.#{variables.$block-class}__customize-columns-instructions {
|
52
|
-
padding-left: $spacing-05;
|
53
|
-
margin-bottom: $spacing-06;
|
54
|
-
|
55
|
-
@include type.type-style('body-long-01');
|
56
|
-
|
57
|
-
color: $text-primary;
|
58
|
-
}
|
59
|
-
|
60
|
-
.#{variables.$block-class}__customize-columns-column-list {
|
61
|
-
position: relative; // needed for the react-dnd, otherwise the drag preview will not work correctly
|
62
|
-
overflow: auto;
|
63
|
-
}
|
64
|
-
|
65
|
-
.#{variables.$block-class}__customize-columns-select-all {
|
66
|
-
display: flex;
|
67
|
-
height: $spacing-09;
|
68
|
-
align-items: center;
|
69
|
-
padding-left: $spacing-08;
|
70
|
-
border-bottom: 1px solid $layer-active;
|
71
|
-
background-color: $layer-01;
|
72
|
-
}
|
73
|
-
.#{variables.$block-class}__customize-columns-select-all:hover {
|
74
|
-
background-color: $layer-hover-01;
|
75
|
-
}
|
76
|
-
.#{variables.$block-class}__customize-columns-select-all-selected {
|
77
|
-
display: flex;
|
78
|
-
height: $spacing-09;
|
79
|
-
align-items: center;
|
80
|
-
padding-left: $spacing-08;
|
81
|
-
border-bottom: 1px solid $layer-active;
|
82
|
-
background-color: $layer-selected-01;
|
83
|
-
}
|
84
|
-
|
85
|
-
.#{variables.$block-class}__customize-columns-select-all-selected:hover {
|
86
|
-
background-color: $background-selected-hover;
|
87
|
-
}
|
88
|
-
|
89
|
-
.#{variables.$block-class}
|
90
|
-
.#{variables.$block-class}__customize-columns-modal
|
91
|
-
.#{c4p-settings.$carbon-prefix}--modal-content {
|
92
|
-
margin-bottom: 0;
|
93
|
-
}
|