@commercetools-uikit/data-table-manager 20.4.0 → 20.6.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/LICENSE +21 -0
- package/README.md +3 -3
- package/column-settings-manager/dist/commercetools-uikit-data-table-manager-column-settings-manager.cjs.dev.js +2 -2
- package/column-settings-manager/dist/commercetools-uikit-data-table-manager-column-settings-manager.cjs.prod.js +2 -2
- package/column-settings-manager/dist/commercetools-uikit-data-table-manager-column-settings-manager.esm.js +2 -2
- package/dist/{column-settings-manager-b4e2fd60.esm.js → column-settings-manager-31b1dd69.esm.js} +15 -20
- package/dist/{column-settings-manager-07b065fc.cjs.dev.js → column-settings-manager-938c2be8.cjs.dev.js} +16 -21
- package/dist/{column-settings-manager-8ec9b25f.cjs.prod.js → column-settings-manager-a337dea0.cjs.prod.js} +16 -21
- package/dist/commercetools-uikit-data-table-manager.cjs.dev.js +27 -32
- package/dist/commercetools-uikit-data-table-manager.cjs.prod.js +26 -31
- package/dist/commercetools-uikit-data-table-manager.esm.js +27 -33
- package/package.json +43 -28
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 commercetools GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -->
|
|
2
|
-
<!-- This file is created by the `
|
|
2
|
+
<!-- This file is created by the `pnpm generate-readme` script. -->
|
|
3
3
|
|
|
4
4
|
# DataTableManager
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ This component will render a triggering element (icon button) above the `<DataTa
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
|
|
20
|
+
pnpm add @commercetools-uikit/data-table-manager
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
```
|
|
@@ -27,7 +27,7 @@ npm --save install @commercetools-uikit/data-table-manager
|
|
|
27
27
|
Additionally install the peer dependencies (if not present)
|
|
28
28
|
|
|
29
29
|
```
|
|
30
|
-
|
|
30
|
+
pnpm add react react-dom react-intl
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var columnSettingsManager = require('../../dist/column-settings-manager-
|
|
5
|
+
var columnSettingsManager = require('../../dist/column-settings-manager-938c2be8.cjs.dev.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
7
7
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
8
8
|
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
@@ -10,6 +10,7 @@ require('@emotion/styled/base');
|
|
|
10
10
|
require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
11
11
|
require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
12
12
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
13
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
13
14
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
14
15
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
15
16
|
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
@@ -35,7 +36,6 @@ require('@commercetools-uikit/collapsible-motion');
|
|
|
35
36
|
require('@commercetools-uikit/card');
|
|
36
37
|
require('@commercetools-uikit/text');
|
|
37
38
|
require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
38
|
-
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
39
39
|
require('@commercetools-uikit/tag');
|
|
40
40
|
|
|
41
41
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var columnSettingsManager = require('../../dist/column-settings-manager-
|
|
5
|
+
var columnSettingsManager = require('../../dist/column-settings-manager-a337dea0.cjs.prod.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
7
7
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
8
8
|
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
@@ -10,6 +10,7 @@ require('@emotion/styled/base');
|
|
|
10
10
|
require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
11
11
|
require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
12
12
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
13
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
13
14
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
14
15
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
15
16
|
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
@@ -35,7 +36,6 @@ require('@commercetools-uikit/collapsible-motion');
|
|
|
35
36
|
require('@commercetools-uikit/card');
|
|
36
37
|
require('@commercetools-uikit/text');
|
|
37
38
|
require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
38
|
-
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
39
39
|
require('@commercetools-uikit/tag');
|
|
40
40
|
|
|
41
41
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ColumnSettingsManager } from '../../dist/column-settings-manager-
|
|
1
|
+
export { C as ColumnSettingsManager } from '../../dist/column-settings-manager-31b1dd69.esm.js';
|
|
2
2
|
import '@babel/runtime-corejs3/helpers/defineProperty';
|
|
3
3
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
4
4
|
import '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
@@ -6,6 +6,7 @@ import '@emotion/styled/base';
|
|
|
6
6
|
import '@babel/runtime-corejs3/core-js-stable/promise';
|
|
7
7
|
import '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
8
8
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
9
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
9
10
|
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
10
11
|
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
11
12
|
import '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
@@ -31,5 +32,4 @@ import '@commercetools-uikit/collapsible-motion';
|
|
|
31
32
|
import '@commercetools-uikit/card';
|
|
32
33
|
import '@commercetools-uikit/text';
|
|
33
34
|
import '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
34
|
-
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
35
35
|
import '@commercetools-uikit/tag';
|
package/dist/{column-settings-manager-b4e2fd60.esm.js → column-settings-manager-31b1dd69.esm.js}
RENAMED
|
@@ -5,6 +5,7 @@ import _styled from '@emotion/styled/base';
|
|
|
5
5
|
import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
|
|
6
6
|
import _sliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
7
7
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
8
|
+
import _bindInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
8
9
|
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
9
10
|
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
10
11
|
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
@@ -30,7 +31,6 @@ import CollapsibleMotion from '@commercetools-uikit/collapsible-motion';
|
|
|
30
31
|
import Card from '@commercetools-uikit/card';
|
|
31
32
|
import Text from '@commercetools-uikit/text';
|
|
32
33
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
33
|
-
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
34
34
|
import Tag from '@commercetools-uikit/tag';
|
|
35
35
|
|
|
36
36
|
const _excluded$1 = ["containerTheme"];
|
|
@@ -141,10 +141,7 @@ const DraggableTagWrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV ===
|
|
|
141
141
|
label: "DraggableTagWrapper"
|
|
142
142
|
})("padding:", designTokens.spacing10, " 0;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyYWdnYWJsZS10YWcudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1Cc0MiLCJmaWxlIjoiZHJhZ2dhYmxlLXRhZy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFJlYWN0Tm9kZSB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IERyYWdnYWJsZSB9IGZyb20gJ0BoZWxsby1wYW5nZWEvZG5kJztcbmltcG9ydCB7IGRlc2lnblRva2VucyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLXVpa2l0L2Rlc2lnbi1zeXN0ZW0nO1xuaW1wb3J0IFRhZyBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC90YWcnO1xuaW1wb3J0IERyYWdnaW5nQ29udGFpbmVyIGZyb20gJy4vZHJhZ2dhYmxlLXRhZy5zdHlsZXMnO1xuXG5leHBvcnQgdHlwZSBUQ29sdW1uRGF0YSA9IHtcbiAga2V5OiBzdHJpbmc7XG4gIGxhYmVsOiBSZWFjdE5vZGU7XG59O1xuXG5leHBvcnQgdHlwZSBURHJhZ2dhYmxlVGFnUHJvcHMgPSB7XG4gIGNvbHVtbjogVENvbHVtbkRhdGE7XG4gIGluZGV4OiBudW1iZXI7XG4gIGlzRGlzYWJsZWQ/OiBib29sZWFuO1xuICBvblJlbW92ZT86IChpbmRleDogbnVtYmVyKSA9PiB2b2lkO1xufTtcblxuY29uc3QgRHJhZ2dhYmxlVGFnV3JhcHBlciA9IHN0eWxlZC5kaXZgXG4gIHBhZGRpbmc6ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmcxMH0gMDtcbmA7XG5cbmNvbnN0IERyYWdnYWJsZVRhZyA9IChwcm9wczogVERyYWdnYWJsZVRhZ1Byb3BzKSA9PiB7XG4gIGNvbnN0IGhhbmRsZVJlbW92ZUNvbHVtbiA9ICgpID0+IHByb3BzLm9uUmVtb3ZlPy4ocHJvcHMuaW5kZXgpO1xuXG4gIHJldHVybiAoXG4gICAgPERyYWdnYWJsZVxuICAgICAgZHJhZ2dhYmxlSWQ9e3Byb3BzLmNvbHVtbi5rZXl9XG4gICAgICBpbmRleD17cHJvcHMuaW5kZXh9XG4gICAgICBpc0RyYWdEaXNhYmxlZD17cHJvcHMuaXNEaXNhYmxlZH1cbiAgICA+XG4gICAgICB7KHByb3ZpZGVkKSA9PiB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgPERyYWdnYWJsZVRhZ1dyYXBwZXI+XG4gICAgICAgICAgICA8RHJhZ2dpbmdDb250YWluZXJcbiAgICAgICAgICAgICAgcmVmPXtwcm92aWRlZC5pbm5lclJlZn1cbiAgICAgICAgICAgICAgey4uLnByb3ZpZGVkLmRyYWdnYWJsZVByb3BzfVxuICAgICAgICAgICAgICB7Li4ucHJvdmlkZWQuZHJhZ0hhbmRsZVByb3BzfVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8VGFnXG4gICAgICAgICAgICAgICAgb25SZW1vdmU9e3Byb3BzLm9uUmVtb3ZlID8gaGFuZGxlUmVtb3ZlQ29sdW1uIDogdW5kZWZpbmVkfVxuICAgICAgICAgICAgICAgIGlzRGlzYWJsZWQ9e3Byb3BzLmlzRGlzYWJsZWR9XG4gICAgICAgICAgICAgICAgaXNEcmFnZ2FibGVcbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIHtwcm9wcy5jb2x1bW4ubGFiZWx9XG4gICAgICAgICAgICAgIDwvVGFnPlxuICAgICAgICAgICAgPC9EcmFnZ2luZ0NvbnRhaW5lcj5cbiAgICAgICAgICA8L0RyYWdnYWJsZVRhZ1dyYXBwZXI+XG4gICAgICAgICk7XG4gICAgICB9fVxuICAgIDwvRHJhZ2dhYmxlPlxuICApO1xufTtcblxuRHJhZ2dhYmxlVGFnLmRpc3BsYXlOYW1lID0gJ0RyYWdnYWJsZVRhZyc7XG5cbmV4cG9ydCBkZWZhdWx0IERyYWdnYWJsZVRhZztcbiJdfQ== */"));
|
|
143
143
|
const DraggableTag = props => {
|
|
144
|
-
const handleRemoveColumn = () =>
|
|
145
|
-
var _props$onRemove;
|
|
146
|
-
return (_props$onRemove = props.onRemove) === null || _props$onRemove === void 0 ? void 0 : _props$onRemove.call(props, props.index);
|
|
147
|
-
};
|
|
144
|
+
const handleRemoveColumn = () => props.onRemove?.(props.index);
|
|
148
145
|
return jsx(Draggable, {
|
|
149
146
|
draggableId: props.column.key,
|
|
150
147
|
index: props.index,
|
|
@@ -201,18 +198,15 @@ const DroppablePanel = props => {
|
|
|
201
198
|
children: props.noColumnsText
|
|
202
199
|
})
|
|
203
200
|
}) : jsxs(Fragment, {
|
|
204
|
-
children: [_mapInstanceProperty(_context = props.columns).call(_context, (column, index) => {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
isDisabled: props.isDisabled
|
|
214
|
-
}, _concatInstanceProperty(_context2 = "".concat(column.key, "-")).call(_context2, index));
|
|
215
|
-
}), props.isSearchable && jsx(Spacings.Inset, {
|
|
201
|
+
children: [_mapInstanceProperty(_context = props.columns).call(_context, (column, index) => jsx(DraggableTag$1, {
|
|
202
|
+
column: column,
|
|
203
|
+
index: index,
|
|
204
|
+
onRemove: props.onRemove ? () => {
|
|
205
|
+
var _context2, _context3;
|
|
206
|
+
return props.onRemove([..._sliceInstanceProperty(_context2 = props.columns).call(_context2, 0, index), ..._sliceInstanceProperty(_context3 = props.columns).call(_context3, index + 1)]);
|
|
207
|
+
} : undefined,
|
|
208
|
+
isDisabled: props.isDisabled
|
|
209
|
+
}, `${column.key}-${index}`)), props.isSearchable && jsx(Spacings.Inset, {
|
|
216
210
|
scale: "xs",
|
|
217
211
|
children: jsx(Text.Detail, {
|
|
218
212
|
tone: "secondary",
|
|
@@ -277,7 +271,7 @@ const SELECTED_COLUMNS_PANEL = 'selected-columns-panel';
|
|
|
277
271
|
|
|
278
272
|
const _excluded = ["availableColumns"];
|
|
279
273
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
280
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
274
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
281
275
|
const noSearch = () => _Promise.resolve([]);
|
|
282
276
|
// 'onChange' prop in AsyncSelectInput is required but not needed here
|
|
283
277
|
const voidChangeHandler = () => undefined;
|
|
@@ -295,6 +289,7 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
|
|
|
295
289
|
if (dragResult.source.droppableId === HIDDEN_COLUMNS_PANEL) return;
|
|
296
290
|
onUpdateColumns([..._sliceInstanceProperty(selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty(selectedColumns).call(selectedColumns, dragResult.source.index + 1)]);
|
|
297
291
|
} else {
|
|
292
|
+
var _context, _context2;
|
|
298
293
|
// the destination is the selected columns panel
|
|
299
294
|
|
|
300
295
|
// it's a swap when the source and the destination are the same
|
|
@@ -304,7 +299,7 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
|
|
|
304
299
|
// the hidden section (it is a swap)
|
|
305
300
|
[..._sliceInstanceProperty(selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty(selectedColumns).call(selectedColumns, dragResult.source.index + 1)] : selectedColumns;
|
|
306
301
|
const columns = isSwap ? selectedColumns : availableColumns;
|
|
307
|
-
const draggedColumn =
|
|
302
|
+
const draggedColumn = ((_context = columns) == null ? void 0 : _bindInstanceProperty(_context2 = Function.call).call(_context2, _findInstanceProperty(_context), _context))?.(col => col.key === dragResult.draggableId);
|
|
308
303
|
|
|
309
304
|
// push the column in the new position if draggedColumn is found
|
|
310
305
|
if (draggedColumn) {
|
|
@@ -344,7 +339,7 @@ const ColumnSettingsManager = _ref => {
|
|
|
344
339
|
};
|
|
345
340
|
const hiddenColumns = useMemo(() => differenceWith(availableColumns, props.selectedColumns, (a, b) => a.key === b.key), [availableColumns, props.selectedColumns]);
|
|
346
341
|
const handleDragEnd = useCallback(dragResult => handleColumnsUpdate(dragResult, props.onUpdateColumns, props.selectedColumns, availableColumns, setIsDragging), [props.onUpdateColumns, props.selectedColumns, availableColumns]);
|
|
347
|
-
const debouncedSearchHiddenColumns = useMemo(() => debounce(searchHiddenColumns
|
|
342
|
+
const debouncedSearchHiddenColumns = useMemo(() => debounce(searchHiddenColumns ?? noSearch, 300), [searchHiddenColumns]);
|
|
348
343
|
const handleInputChange = useCallback(inputValue => debouncedSearchHiddenColumns(inputValue), [debouncedSearchHiddenColumns]);
|
|
349
344
|
return jsx(SettingsContainer$1, {
|
|
350
345
|
customSettingsTitle: props.title,
|
|
@@ -7,6 +7,7 @@ var _styled = require('@emotion/styled/base');
|
|
|
7
7
|
var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
8
8
|
var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
9
9
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
10
|
+
var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
10
11
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
11
12
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
12
13
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
@@ -32,7 +33,6 @@ var CollapsibleMotion = require('@commercetools-uikit/collapsible-motion');
|
|
|
32
33
|
var Card = require('@commercetools-uikit/card');
|
|
33
34
|
var Text = require('@commercetools-uikit/text');
|
|
34
35
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
35
|
-
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
36
36
|
var Tag = require('@commercetools-uikit/tag');
|
|
37
37
|
|
|
38
38
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -41,6 +41,7 @@ var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
|
41
41
|
var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
|
|
42
42
|
var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
|
|
43
43
|
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
44
|
+
var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
|
|
44
45
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
45
46
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
46
47
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
@@ -59,7 +60,6 @@ var CollapsibleMotion__default = /*#__PURE__*/_interopDefault(CollapsibleMotion)
|
|
|
59
60
|
var Card__default = /*#__PURE__*/_interopDefault(Card);
|
|
60
61
|
var Text__default = /*#__PURE__*/_interopDefault(Text);
|
|
61
62
|
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
62
|
-
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
63
63
|
var Tag__default = /*#__PURE__*/_interopDefault(Tag);
|
|
64
64
|
|
|
65
65
|
const _excluded$1 = ["containerTheme"];
|
|
@@ -170,10 +170,7 @@ const DraggableTagWrapper = /*#__PURE__*/_styled__default["default"]("div", proc
|
|
|
170
170
|
label: "DraggableTagWrapper"
|
|
171
171
|
})("padding:", designSystem.designTokens.spacing10, " 0;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyYWdnYWJsZS10YWcudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1Cc0MiLCJmaWxlIjoiZHJhZ2dhYmxlLXRhZy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFJlYWN0Tm9kZSB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IERyYWdnYWJsZSB9IGZyb20gJ0BoZWxsby1wYW5nZWEvZG5kJztcbmltcG9ydCB7IGRlc2lnblRva2VucyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLXVpa2l0L2Rlc2lnbi1zeXN0ZW0nO1xuaW1wb3J0IFRhZyBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC90YWcnO1xuaW1wb3J0IERyYWdnaW5nQ29udGFpbmVyIGZyb20gJy4vZHJhZ2dhYmxlLXRhZy5zdHlsZXMnO1xuXG5leHBvcnQgdHlwZSBUQ29sdW1uRGF0YSA9IHtcbiAga2V5OiBzdHJpbmc7XG4gIGxhYmVsOiBSZWFjdE5vZGU7XG59O1xuXG5leHBvcnQgdHlwZSBURHJhZ2dhYmxlVGFnUHJvcHMgPSB7XG4gIGNvbHVtbjogVENvbHVtbkRhdGE7XG4gIGluZGV4OiBudW1iZXI7XG4gIGlzRGlzYWJsZWQ/OiBib29sZWFuO1xuICBvblJlbW92ZT86IChpbmRleDogbnVtYmVyKSA9PiB2b2lkO1xufTtcblxuY29uc3QgRHJhZ2dhYmxlVGFnV3JhcHBlciA9IHN0eWxlZC5kaXZgXG4gIHBhZGRpbmc6ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmcxMH0gMDtcbmA7XG5cbmNvbnN0IERyYWdnYWJsZVRhZyA9IChwcm9wczogVERyYWdnYWJsZVRhZ1Byb3BzKSA9PiB7XG4gIGNvbnN0IGhhbmRsZVJlbW92ZUNvbHVtbiA9ICgpID0+IHByb3BzLm9uUmVtb3ZlPy4ocHJvcHMuaW5kZXgpO1xuXG4gIHJldHVybiAoXG4gICAgPERyYWdnYWJsZVxuICAgICAgZHJhZ2dhYmxlSWQ9e3Byb3BzLmNvbHVtbi5rZXl9XG4gICAgICBpbmRleD17cHJvcHMuaW5kZXh9XG4gICAgICBpc0RyYWdEaXNhYmxlZD17cHJvcHMuaXNEaXNhYmxlZH1cbiAgICA+XG4gICAgICB7KHByb3ZpZGVkKSA9PiB7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgPERyYWdnYWJsZVRhZ1dyYXBwZXI+XG4gICAgICAgICAgICA8RHJhZ2dpbmdDb250YWluZXJcbiAgICAgICAgICAgICAgcmVmPXtwcm92aWRlZC5pbm5lclJlZn1cbiAgICAgICAgICAgICAgey4uLnByb3ZpZGVkLmRyYWdnYWJsZVByb3BzfVxuICAgICAgICAgICAgICB7Li4ucHJvdmlkZWQuZHJhZ0hhbmRsZVByb3BzfVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8VGFnXG4gICAgICAgICAgICAgICAgb25SZW1vdmU9e3Byb3BzLm9uUmVtb3ZlID8gaGFuZGxlUmVtb3ZlQ29sdW1uIDogdW5kZWZpbmVkfVxuICAgICAgICAgICAgICAgIGlzRGlzYWJsZWQ9e3Byb3BzLmlzRGlzYWJsZWR9XG4gICAgICAgICAgICAgICAgaXNEcmFnZ2FibGVcbiAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIHtwcm9wcy5jb2x1bW4ubGFiZWx9XG4gICAgICAgICAgICAgIDwvVGFnPlxuICAgICAgICAgICAgPC9EcmFnZ2luZ0NvbnRhaW5lcj5cbiAgICAgICAgICA8L0RyYWdnYWJsZVRhZ1dyYXBwZXI+XG4gICAgICAgICk7XG4gICAgICB9fVxuICAgIDwvRHJhZ2dhYmxlPlxuICApO1xufTtcblxuRHJhZ2dhYmxlVGFnLmRpc3BsYXlOYW1lID0gJ0RyYWdnYWJsZVRhZyc7XG5cbmV4cG9ydCBkZWZhdWx0IERyYWdnYWJsZVRhZztcbiJdfQ== */"));
|
|
172
172
|
const DraggableTag = props => {
|
|
173
|
-
const handleRemoveColumn = () =>
|
|
174
|
-
var _props$onRemove;
|
|
175
|
-
return (_props$onRemove = props.onRemove) === null || _props$onRemove === void 0 ? void 0 : _props$onRemove.call(props, props.index);
|
|
176
|
-
};
|
|
173
|
+
const handleRemoveColumn = () => props.onRemove?.(props.index);
|
|
177
174
|
return jsxRuntime.jsx(dnd.Draggable, {
|
|
178
175
|
draggableId: props.column.key,
|
|
179
176
|
index: props.index,
|
|
@@ -230,18 +227,15 @@ const DroppablePanel = props => {
|
|
|
230
227
|
children: props.noColumnsText
|
|
231
228
|
})
|
|
232
229
|
}) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
233
|
-
children: [_mapInstanceProperty__default["default"](_context = props.columns).call(_context, (column, index) => {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
isDisabled: props.isDisabled
|
|
243
|
-
}, _concatInstanceProperty__default["default"](_context2 = "".concat(column.key, "-")).call(_context2, index));
|
|
244
|
-
}), props.isSearchable && jsxRuntime.jsx(Spacings__default["default"].Inset, {
|
|
230
|
+
children: [_mapInstanceProperty__default["default"](_context = props.columns).call(_context, (column, index) => jsxRuntime.jsx(DraggableTag$1, {
|
|
231
|
+
column: column,
|
|
232
|
+
index: index,
|
|
233
|
+
onRemove: props.onRemove ? () => {
|
|
234
|
+
var _context2, _context3;
|
|
235
|
+
return props.onRemove([..._sliceInstanceProperty__default["default"](_context2 = props.columns).call(_context2, 0, index), ..._sliceInstanceProperty__default["default"](_context3 = props.columns).call(_context3, index + 1)]);
|
|
236
|
+
} : undefined,
|
|
237
|
+
isDisabled: props.isDisabled
|
|
238
|
+
}, `${column.key}-${index}`)), props.isSearchable && jsxRuntime.jsx(Spacings__default["default"].Inset, {
|
|
245
239
|
scale: "xs",
|
|
246
240
|
children: jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
247
241
|
tone: "secondary",
|
|
@@ -306,7 +300,7 @@ const SELECTED_COLUMNS_PANEL = 'selected-columns-panel';
|
|
|
306
300
|
|
|
307
301
|
const _excluded = ["availableColumns"];
|
|
308
302
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
309
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
303
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
310
304
|
const noSearch = () => _Promise__default["default"].resolve([]);
|
|
311
305
|
// 'onChange' prop in AsyncSelectInput is required but not needed here
|
|
312
306
|
const voidChangeHandler = () => undefined;
|
|
@@ -324,6 +318,7 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
|
|
|
324
318
|
if (dragResult.source.droppableId === HIDDEN_COLUMNS_PANEL) return;
|
|
325
319
|
onUpdateColumns([..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, dragResult.source.index + 1)]);
|
|
326
320
|
} else {
|
|
321
|
+
var _context, _context2;
|
|
327
322
|
// the destination is the selected columns panel
|
|
328
323
|
|
|
329
324
|
// it's a swap when the source and the destination are the same
|
|
@@ -333,7 +328,7 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
|
|
|
333
328
|
// the hidden section (it is a swap)
|
|
334
329
|
[..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, dragResult.source.index + 1)] : selectedColumns;
|
|
335
330
|
const columns = isSwap ? selectedColumns : availableColumns;
|
|
336
|
-
const draggedColumn =
|
|
331
|
+
const draggedColumn = ((_context = columns) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _findInstanceProperty__default["default"](_context), _context))?.(col => col.key === dragResult.draggableId);
|
|
337
332
|
|
|
338
333
|
// push the column in the new position if draggedColumn is found
|
|
339
334
|
if (draggedColumn) {
|
|
@@ -373,7 +368,7 @@ const ColumnSettingsManager = _ref => {
|
|
|
373
368
|
};
|
|
374
369
|
const hiddenColumns = react.useMemo(() => differenceWith__default["default"](availableColumns, props.selectedColumns, (a, b) => a.key === b.key), [availableColumns, props.selectedColumns]);
|
|
375
370
|
const handleDragEnd = react.useCallback(dragResult => handleColumnsUpdate(dragResult, props.onUpdateColumns, props.selectedColumns, availableColumns, setIsDragging), [props.onUpdateColumns, props.selectedColumns, availableColumns]);
|
|
376
|
-
const debouncedSearchHiddenColumns = react.useMemo(() => debounce__default["default"](searchHiddenColumns
|
|
371
|
+
const debouncedSearchHiddenColumns = react.useMemo(() => debounce__default["default"](searchHiddenColumns ?? noSearch, 300), [searchHiddenColumns]);
|
|
377
372
|
const handleInputChange = react.useCallback(inputValue => debouncedSearchHiddenColumns(inputValue), [debouncedSearchHiddenColumns]);
|
|
378
373
|
return jsxRuntime.jsx(SettingsContainer$1, {
|
|
379
374
|
customSettingsTitle: props.title,
|
|
@@ -7,6 +7,7 @@ var _styled = require('@emotion/styled/base');
|
|
|
7
7
|
var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
8
8
|
var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
9
9
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
10
|
+
var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
10
11
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
11
12
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
12
13
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
@@ -32,7 +33,6 @@ var CollapsibleMotion = require('@commercetools-uikit/collapsible-motion');
|
|
|
32
33
|
var Card = require('@commercetools-uikit/card');
|
|
33
34
|
var Text = require('@commercetools-uikit/text');
|
|
34
35
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
35
|
-
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
36
36
|
var Tag = require('@commercetools-uikit/tag');
|
|
37
37
|
|
|
38
38
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -41,6 +41,7 @@ var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
|
41
41
|
var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
|
|
42
42
|
var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
|
|
43
43
|
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
44
|
+
var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
|
|
44
45
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
45
46
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
46
47
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
@@ -59,7 +60,6 @@ var CollapsibleMotion__default = /*#__PURE__*/_interopDefault(CollapsibleMotion)
|
|
|
59
60
|
var Card__default = /*#__PURE__*/_interopDefault(Card);
|
|
60
61
|
var Text__default = /*#__PURE__*/_interopDefault(Text);
|
|
61
62
|
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
62
|
-
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
63
63
|
var Tag__default = /*#__PURE__*/_interopDefault(Tag);
|
|
64
64
|
|
|
65
65
|
const _excluded$1 = ["containerTheme"];
|
|
@@ -145,10 +145,7 @@ const DraggableTagWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
|
145
145
|
target: "emzjy4n0"
|
|
146
146
|
} )("padding:", designSystem.designTokens.spacing10, " 0;" + ("" ));
|
|
147
147
|
const DraggableTag = props => {
|
|
148
|
-
const handleRemoveColumn = () =>
|
|
149
|
-
var _props$onRemove;
|
|
150
|
-
return (_props$onRemove = props.onRemove) === null || _props$onRemove === void 0 ? void 0 : _props$onRemove.call(props, props.index);
|
|
151
|
-
};
|
|
148
|
+
const handleRemoveColumn = () => props.onRemove?.(props.index);
|
|
152
149
|
return jsxRuntime.jsx(dnd.Draggable, {
|
|
153
150
|
draggableId: props.column.key,
|
|
154
151
|
index: props.index,
|
|
@@ -202,18 +199,15 @@ const DroppablePanel = props => {
|
|
|
202
199
|
children: props.noColumnsText
|
|
203
200
|
})
|
|
204
201
|
}) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
205
|
-
children: [_mapInstanceProperty__default["default"](_context = props.columns).call(_context, (column, index) => {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
isDisabled: props.isDisabled
|
|
215
|
-
}, _concatInstanceProperty__default["default"](_context2 = "".concat(column.key, "-")).call(_context2, index));
|
|
216
|
-
}), props.isSearchable && jsxRuntime.jsx(Spacings__default["default"].Inset, {
|
|
202
|
+
children: [_mapInstanceProperty__default["default"](_context = props.columns).call(_context, (column, index) => jsxRuntime.jsx(DraggableTag$1, {
|
|
203
|
+
column: column,
|
|
204
|
+
index: index,
|
|
205
|
+
onRemove: props.onRemove ? () => {
|
|
206
|
+
var _context2, _context3;
|
|
207
|
+
return props.onRemove([..._sliceInstanceProperty__default["default"](_context2 = props.columns).call(_context2, 0, index), ..._sliceInstanceProperty__default["default"](_context3 = props.columns).call(_context3, index + 1)]);
|
|
208
|
+
} : undefined,
|
|
209
|
+
isDisabled: props.isDisabled
|
|
210
|
+
}, `${column.key}-${index}`)), props.isSearchable && jsxRuntime.jsx(Spacings__default["default"].Inset, {
|
|
217
211
|
scale: "xs",
|
|
218
212
|
children: jsxRuntime.jsx(Text__default["default"].Detail, {
|
|
219
213
|
tone: "secondary",
|
|
@@ -278,7 +272,7 @@ const SELECTED_COLUMNS_PANEL = 'selected-columns-panel';
|
|
|
278
272
|
|
|
279
273
|
const _excluded = ["availableColumns"];
|
|
280
274
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
281
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
275
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
282
276
|
const noSearch = () => _Promise__default["default"].resolve([]);
|
|
283
277
|
// 'onChange' prop in AsyncSelectInput is required but not needed here
|
|
284
278
|
const voidChangeHandler = () => undefined;
|
|
@@ -293,6 +287,7 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
|
|
|
293
287
|
if (dragResult.source.droppableId === HIDDEN_COLUMNS_PANEL) return;
|
|
294
288
|
onUpdateColumns([..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, dragResult.source.index + 1)]);
|
|
295
289
|
} else {
|
|
290
|
+
var _context, _context2;
|
|
296
291
|
// the destination is the selected columns panel
|
|
297
292
|
|
|
298
293
|
// it's a swap when the source and the destination are the same
|
|
@@ -302,7 +297,7 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
|
|
|
302
297
|
// the hidden section (it is a swap)
|
|
303
298
|
[..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, dragResult.source.index + 1)] : selectedColumns;
|
|
304
299
|
const columns = isSwap ? selectedColumns : availableColumns;
|
|
305
|
-
const draggedColumn =
|
|
300
|
+
const draggedColumn = ((_context = columns) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _findInstanceProperty__default["default"](_context), _context))?.(col => col.key === dragResult.draggableId);
|
|
306
301
|
|
|
307
302
|
// push the column in the new position if draggedColumn is found
|
|
308
303
|
if (draggedColumn) {
|
|
@@ -340,7 +335,7 @@ const ColumnSettingsManager = _ref => {
|
|
|
340
335
|
};
|
|
341
336
|
const hiddenColumns = react.useMemo(() => differenceWith__default["default"](availableColumns, props.selectedColumns, (a, b) => a.key === b.key), [availableColumns, props.selectedColumns]);
|
|
342
337
|
const handleDragEnd = react.useCallback(dragResult => handleColumnsUpdate(dragResult, props.onUpdateColumns, props.selectedColumns, availableColumns, setIsDragging), [props.onUpdateColumns, props.selectedColumns, availableColumns]);
|
|
343
|
-
const debouncedSearchHiddenColumns = react.useMemo(() => debounce__default["default"](searchHiddenColumns
|
|
338
|
+
const debouncedSearchHiddenColumns = react.useMemo(() => debounce__default["default"](searchHiddenColumns ?? noSearch, 300), [searchHiddenColumns]);
|
|
344
339
|
const handleInputChange = react.useCallback(inputValue => debouncedSearchHiddenColumns(inputValue), [debouncedSearchHiddenColumns]);
|
|
345
340
|
return jsxRuntime.jsx(SettingsContainer$1, {
|
|
346
341
|
customSettingsTitle: props.title,
|
|
@@ -20,6 +20,7 @@ var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
|
20
20
|
var _styled = require('@emotion/styled/base');
|
|
21
21
|
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
22
22
|
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
23
|
+
var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
23
24
|
var utils = require('@commercetools-uikit/utils');
|
|
24
25
|
var reactIntl = require('react-intl');
|
|
25
26
|
var icons = require('@commercetools-uikit/icons');
|
|
@@ -32,7 +33,7 @@ var Grid = require('@commercetools-uikit/grid');
|
|
|
32
33
|
var RadioInput = require('@commercetools-uikit/radio-input');
|
|
33
34
|
var AccessibleHidden = require('@commercetools-uikit/accessible-hidden');
|
|
34
35
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
35
|
-
var columnSettingsManager = require('./column-settings-manager-
|
|
36
|
+
var columnSettingsManager = require('./column-settings-manager-938c2be8.cjs.dev.js');
|
|
36
37
|
var hooks = require('@commercetools-uikit/hooks');
|
|
37
38
|
var dataTableManagerProvider = require('./data-table-manager-provider-fc238633.cjs.dev.js');
|
|
38
39
|
require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
@@ -46,7 +47,6 @@ require('@commercetools-uikit/accessible-button');
|
|
|
46
47
|
require('@commercetools-uikit/collapsible-motion');
|
|
47
48
|
require('@commercetools-uikit/card');
|
|
48
49
|
require('@commercetools-uikit/text');
|
|
49
|
-
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
50
50
|
require('@commercetools-uikit/tag');
|
|
51
51
|
|
|
52
52
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -64,6 +64,7 @@ var Spacings__default = /*#__PURE__*/_interopDefault(Spacings);
|
|
|
64
64
|
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
65
65
|
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
66
66
|
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
67
|
+
var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
|
|
67
68
|
var DropdownMenu__default = /*#__PURE__*/_interopDefault(DropdownMenu);
|
|
68
69
|
var IconButton__default = /*#__PURE__*/_interopDefault(IconButton);
|
|
69
70
|
var Tooltip__default = /*#__PURE__*/_interopDefault(Tooltip);
|
|
@@ -277,7 +278,7 @@ var messages = reactIntl.defineMessages({
|
|
|
277
278
|
});
|
|
278
279
|
|
|
279
280
|
function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
280
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
281
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$1(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$1(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
281
282
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
282
283
|
const TopBarContainer = /*#__PURE__*/_styled__default["default"]("div", process.env.NODE_ENV === "production" ? {
|
|
283
284
|
target: "e3i1gnv0"
|
|
@@ -334,7 +335,7 @@ const getSelectedColumns = function (mappedColumns) {
|
|
|
334
335
|
return _mapInstanceProperty__default["default"](visibleColumnsKeys).call(visibleColumnsKeys, columnKey => mappedColumns[columnKey]);
|
|
335
336
|
};
|
|
336
337
|
const DataTableSettings = props => {
|
|
337
|
-
var
|
|
338
|
+
var _context3, _context4, _context5;
|
|
338
339
|
const getEnabledDisplaySettings = () => {
|
|
339
340
|
if (!props.displaySettings || _Object$keys__default["default"](props.displaySettings).length < 0) return undefined;
|
|
340
341
|
return Boolean(props.displaySettings && !props.displaySettings.disableDisplaySettings);
|
|
@@ -345,8 +346,8 @@ const DataTableSettings = props => {
|
|
|
345
346
|
};
|
|
346
347
|
const areDisplaySettingsEnabled = getEnabledDisplaySettings();
|
|
347
348
|
const areColumnSettingsEnabled = getEnabledColumnSettings();
|
|
348
|
-
const areCustomColumnSettingsEnabled = Boolean(props.customColumnManager && !
|
|
349
|
-
process.env.NODE_ENV !== "production" ? utils.warning(areDisplaySettingsEnabled || areColumnSettingsEnabled ? typeof props.onSettingsChange === 'function' : true,
|
|
349
|
+
const areCustomColumnSettingsEnabled = Boolean(props.customColumnManager && !props.customColumnManager?.disableCustomColumnManager);
|
|
350
|
+
process.env.NODE_ENV !== "production" ? utils.warning(areDisplaySettingsEnabled || areColumnSettingsEnabled ? typeof props.onSettingsChange === 'function' : true, `ui-kit/DataTableManager: the prop "onSettingsChange" is required when either the display settings or the column settings are enabled.`) : void 0;
|
|
350
351
|
const intl = reactIntl.useIntl();
|
|
351
352
|
const _useState = react.useState(null),
|
|
352
353
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -357,8 +358,8 @@ const DataTableSettings = props => {
|
|
|
357
358
|
areDisplaySettingsEnabled,
|
|
358
359
|
areColumnSettingsEnabled,
|
|
359
360
|
customSettings: props.customSettings,
|
|
360
|
-
columnManagerLabel:
|
|
361
|
-
displaySettingsLabel:
|
|
361
|
+
columnManagerLabel: props.columnManager?.columnManagerLabel,
|
|
362
|
+
displaySettingsLabel: props.displaySettings?.displaySettingsLabel,
|
|
362
363
|
formatMessage: intl.formatMessage
|
|
363
364
|
});
|
|
364
365
|
const mappedColumns = getMappedColumns(areColumnSettingsEnabled ? props.columnManager.hideableColumns : undefined);
|
|
@@ -382,40 +383,36 @@ const DataTableSettings = props => {
|
|
|
382
383
|
menuHorizontalConstraint: 'auto',
|
|
383
384
|
menuPosition: "right",
|
|
384
385
|
menuType: "list",
|
|
385
|
-
children:
|
|
386
|
+
children: ((_context3 = dropdownOptions) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _mapInstanceProperty__default["default"](_context3), _context3))?.(option => jsxRuntime.jsx(DropdownMenu__default["default"].ListMenuItem, {
|
|
386
387
|
onClick: () => {
|
|
387
|
-
setOpenedPanelId(option
|
|
388
|
+
setOpenedPanelId(option?.value);
|
|
388
389
|
},
|
|
389
|
-
isDisabled: option
|
|
390
|
-
children: option
|
|
391
|
-
}, option
|
|
390
|
+
isDisabled: option?.isDisabled,
|
|
391
|
+
children: option?.label
|
|
392
|
+
}, option?.label))
|
|
392
393
|
})
|
|
393
394
|
})]
|
|
394
395
|
}), openedPanelId === DISPLAY_SETTINGS && jsxRuntime.jsx(DisplaySettingsManager, _objectSpread$1(_objectSpread$1({}, props.displaySettings || {}), {}, {
|
|
395
|
-
title:
|
|
396
|
+
title: props.displaySettings?.displaySettingsLabel,
|
|
396
397
|
onClose: handleSettingsPanelChange,
|
|
397
398
|
onDensityDisplayChange: event => {
|
|
398
|
-
|
|
399
|
-
(_props$onSettingsChan = props.onSettingsChange) === null || _props$onSettingsChan === void 0 || _props$onSettingsChan.call(props, UPDATE_ACTIONS.IS_TABLE_CONDENSED_UPDATE, event.target.value === DENSITY_COMPACT);
|
|
399
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.IS_TABLE_CONDENSED_UPDATE, event.target.value === DENSITY_COMPACT);
|
|
400
400
|
},
|
|
401
401
|
onTextWrappingChange: event => {
|
|
402
|
-
|
|
403
|
-
(_props$onSettingsChan2 = props.onSettingsChange) === null || _props$onSettingsChan2 === void 0 || _props$onSettingsChan2.call(props, UPDATE_ACTIONS.IS_TABLE_WRAPPING_TEXT_UPDATE, event.target.value === SHOW_HIDE_ON_DEMAND);
|
|
402
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.IS_TABLE_WRAPPING_TEXT_UPDATE, event.target.value === SHOW_HIDE_ON_DEMAND);
|
|
404
403
|
},
|
|
405
404
|
managerTheme: props.managerTheme
|
|
406
405
|
})), openedPanelId === COLUMN_MANAGER && jsxRuntime.jsx(columnSettingsManager.ColumnSettingsManager, _objectSpread$1(_objectSpread$1({}, props.columnManager || {}), {}, {
|
|
407
|
-
title:
|
|
408
|
-
availableColumns:
|
|
406
|
+
title: props.columnManager?.columnManagerLabel,
|
|
407
|
+
availableColumns: props.columnManager?.hideableColumns ?? [],
|
|
409
408
|
selectedColumns: selectedColumns,
|
|
410
409
|
onClose: handleSettingsPanelChange,
|
|
411
410
|
onUpdateColumns: nextVisibleColumns => {
|
|
412
|
-
var _props$onSettingsChan3;
|
|
413
411
|
const keysOfVisibleColumns = _mapInstanceProperty__default["default"](nextVisibleColumns).call(nextVisibleColumns, visibleColumn => visibleColumn.key);
|
|
414
|
-
|
|
412
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.COLUMNS_UPDATE, keysOfVisibleColumns);
|
|
415
413
|
},
|
|
416
414
|
managerTheme: props.managerTheme
|
|
417
|
-
})), props.customSettings && _mapInstanceProperty__default["default"](
|
|
418
|
-
var _props$customColumnMa2;
|
|
415
|
+
})), props.customSettings && _mapInstanceProperty__default["default"](_context5 = _Object$entries__default["default"](props.customSettings)).call(_context5, _ref4 => {
|
|
419
416
|
let _ref5 = _slicedToArray(_ref4, 2),
|
|
420
417
|
key = _ref5[0],
|
|
421
418
|
customSetting = _ref5[1];
|
|
@@ -429,19 +426,17 @@ const DataTableSettings = props => {
|
|
|
429
426
|
onClose: handleSettingsPanelChange,
|
|
430
427
|
managerTheme: props.managerTheme,
|
|
431
428
|
selectedColumns: props.selectedColumns,
|
|
432
|
-
availableColumns:
|
|
429
|
+
availableColumns: props.customColumnManager ?? undefined,
|
|
433
430
|
onUpdateColumns: (nextVisibleColumns, key) => {
|
|
434
|
-
var _props$onSettingsChan4;
|
|
435
431
|
const keysOfVisibleColumns = _mapInstanceProperty__default["default"](nextVisibleColumns).call(nextVisibleColumns, visibleColumn => visibleColumn.key);
|
|
436
|
-
|
|
432
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.CUSTOM_COLUMNS_UPDATE, keysOfVisibleColumns, key);
|
|
437
433
|
}
|
|
438
434
|
})) : jsxRuntime.jsx(CustomSettingsManager$1, _objectSpread$1(_objectSpread$1({}, customSetting || {}), {}, {
|
|
439
435
|
onClose: handleSettingsPanelChange,
|
|
440
436
|
managerTheme: props.managerTheme,
|
|
441
437
|
children: CustomComponent && jsxRuntime.jsx(CustomComponent, {
|
|
442
438
|
updateCustomSettings: settings => {
|
|
443
|
-
|
|
444
|
-
(_props$onSettingsChan5 = props.onSettingsChange) === null || _props$onSettingsChan5 === void 0 || _props$onSettingsChan5.call(props, UPDATE_ACTIONS.CUSTOM_SETTINGS_UPDATE, settings);
|
|
439
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.CUSTOM_SETTINGS_UPDATE, settings);
|
|
445
440
|
},
|
|
446
441
|
additionalSettings: _objectSpread$1(_objectSpread$1({}, customSetting), props.additionalSettings)
|
|
447
442
|
})
|
|
@@ -495,8 +490,8 @@ const DataTableManager = props => {
|
|
|
495
490
|
managerTheme: "light",
|
|
496
491
|
additionalSettings: additionalCustomSetting,
|
|
497
492
|
updateCustomSettings: settings => updateCustomSettings(settings),
|
|
498
|
-
selectedColumns: selectedColumns
|
|
499
|
-
customColumnManager: customColumnManager
|
|
493
|
+
selectedColumns: selectedColumns ?? [],
|
|
494
|
+
customColumnManager: customColumnManager ?? undefined
|
|
500
495
|
}), props.children ? /*#__PURE__*/react.cloneElement(props.children, {
|
|
501
496
|
columns,
|
|
502
497
|
customColumns,
|
|
@@ -508,7 +503,7 @@ DataTableManager.displayName = 'DataTableManager';
|
|
|
508
503
|
var DataTableManager$1 = DataTableManager;
|
|
509
504
|
|
|
510
505
|
// NOTE: This string will be replaced on build time with the package version.
|
|
511
|
-
var version = "20.
|
|
506
|
+
var version = "20.6.0";
|
|
512
507
|
|
|
513
508
|
exports.ColumnSettingsManager = columnSettingsManager.ColumnSettingsManager;
|
|
514
509
|
Object.defineProperty(exports, 'useRowSelection', {
|
|
@@ -20,6 +20,7 @@ var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
|
20
20
|
var _styled = require('@emotion/styled/base');
|
|
21
21
|
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
22
22
|
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
23
|
+
var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
23
24
|
require('@commercetools-uikit/utils');
|
|
24
25
|
var reactIntl = require('react-intl');
|
|
25
26
|
var icons = require('@commercetools-uikit/icons');
|
|
@@ -32,7 +33,7 @@ var Grid = require('@commercetools-uikit/grid');
|
|
|
32
33
|
var RadioInput = require('@commercetools-uikit/radio-input');
|
|
33
34
|
var AccessibleHidden = require('@commercetools-uikit/accessible-hidden');
|
|
34
35
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
35
|
-
var columnSettingsManager = require('./column-settings-manager-
|
|
36
|
+
var columnSettingsManager = require('./column-settings-manager-a337dea0.cjs.prod.js');
|
|
36
37
|
var hooks = require('@commercetools-uikit/hooks');
|
|
37
38
|
var dataTableManagerProvider = require('./data-table-manager-provider-c64c81aa.cjs.prod.js');
|
|
38
39
|
require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
@@ -46,7 +47,6 @@ require('@commercetools-uikit/accessible-button');
|
|
|
46
47
|
require('@commercetools-uikit/collapsible-motion');
|
|
47
48
|
require('@commercetools-uikit/card');
|
|
48
49
|
require('@commercetools-uikit/text');
|
|
49
|
-
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
50
50
|
require('@commercetools-uikit/tag');
|
|
51
51
|
|
|
52
52
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -64,6 +64,7 @@ var Spacings__default = /*#__PURE__*/_interopDefault(Spacings);
|
|
|
64
64
|
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
65
65
|
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
66
66
|
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
67
|
+
var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
|
|
67
68
|
var DropdownMenu__default = /*#__PURE__*/_interopDefault(DropdownMenu);
|
|
68
69
|
var IconButton__default = /*#__PURE__*/_interopDefault(IconButton);
|
|
69
70
|
var Tooltip__default = /*#__PURE__*/_interopDefault(Tooltip);
|
|
@@ -277,7 +278,7 @@ var messages = reactIntl.defineMessages({
|
|
|
277
278
|
});
|
|
278
279
|
|
|
279
280
|
function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
280
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
281
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$1(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$1(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
281
282
|
const TopBarContainer = /*#__PURE__*/_styled__default["default"]("div", {
|
|
282
283
|
target: "e3i1gnv0"
|
|
283
284
|
} )({
|
|
@@ -326,7 +327,7 @@ const getSelectedColumns = function (mappedColumns) {
|
|
|
326
327
|
return _mapInstanceProperty__default["default"](visibleColumnsKeys).call(visibleColumnsKeys, columnKey => mappedColumns[columnKey]);
|
|
327
328
|
};
|
|
328
329
|
const DataTableSettings = props => {
|
|
329
|
-
var
|
|
330
|
+
var _context3, _context4, _context5;
|
|
330
331
|
const getEnabledDisplaySettings = () => {
|
|
331
332
|
if (!props.displaySettings || _Object$keys__default["default"](props.displaySettings).length < 0) return undefined;
|
|
332
333
|
return Boolean(props.displaySettings && !props.displaySettings.disableDisplaySettings);
|
|
@@ -337,7 +338,7 @@ const DataTableSettings = props => {
|
|
|
337
338
|
};
|
|
338
339
|
const areDisplaySettingsEnabled = getEnabledDisplaySettings();
|
|
339
340
|
const areColumnSettingsEnabled = getEnabledColumnSettings();
|
|
340
|
-
const areCustomColumnSettingsEnabled = Boolean(props.customColumnManager && !
|
|
341
|
+
const areCustomColumnSettingsEnabled = Boolean(props.customColumnManager && !props.customColumnManager?.disableCustomColumnManager);
|
|
341
342
|
const intl = reactIntl.useIntl();
|
|
342
343
|
const _useState = react.useState(null),
|
|
343
344
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -348,8 +349,8 @@ const DataTableSettings = props => {
|
|
|
348
349
|
areDisplaySettingsEnabled,
|
|
349
350
|
areColumnSettingsEnabled,
|
|
350
351
|
customSettings: props.customSettings,
|
|
351
|
-
columnManagerLabel:
|
|
352
|
-
displaySettingsLabel:
|
|
352
|
+
columnManagerLabel: props.columnManager?.columnManagerLabel,
|
|
353
|
+
displaySettingsLabel: props.displaySettings?.displaySettingsLabel,
|
|
353
354
|
formatMessage: intl.formatMessage
|
|
354
355
|
});
|
|
355
356
|
const mappedColumns = getMappedColumns(areColumnSettingsEnabled ? props.columnManager.hideableColumns : undefined);
|
|
@@ -373,40 +374,36 @@ const DataTableSettings = props => {
|
|
|
373
374
|
menuHorizontalConstraint: 'auto',
|
|
374
375
|
menuPosition: "right",
|
|
375
376
|
menuType: "list",
|
|
376
|
-
children:
|
|
377
|
+
children: ((_context3 = dropdownOptions) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _mapInstanceProperty__default["default"](_context3), _context3))?.(option => jsxRuntime.jsx(DropdownMenu__default["default"].ListMenuItem, {
|
|
377
378
|
onClick: () => {
|
|
378
|
-
setOpenedPanelId(option
|
|
379
|
+
setOpenedPanelId(option?.value);
|
|
379
380
|
},
|
|
380
|
-
isDisabled: option
|
|
381
|
-
children: option
|
|
382
|
-
}, option
|
|
381
|
+
isDisabled: option?.isDisabled,
|
|
382
|
+
children: option?.label
|
|
383
|
+
}, option?.label))
|
|
383
384
|
})
|
|
384
385
|
})]
|
|
385
386
|
}), openedPanelId === DISPLAY_SETTINGS && jsxRuntime.jsx(DisplaySettingsManager, _objectSpread$1(_objectSpread$1({}, props.displaySettings || {}), {}, {
|
|
386
|
-
title:
|
|
387
|
+
title: props.displaySettings?.displaySettingsLabel,
|
|
387
388
|
onClose: handleSettingsPanelChange,
|
|
388
389
|
onDensityDisplayChange: event => {
|
|
389
|
-
|
|
390
|
-
(_props$onSettingsChan = props.onSettingsChange) === null || _props$onSettingsChan === void 0 || _props$onSettingsChan.call(props, UPDATE_ACTIONS.IS_TABLE_CONDENSED_UPDATE, event.target.value === DENSITY_COMPACT);
|
|
390
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.IS_TABLE_CONDENSED_UPDATE, event.target.value === DENSITY_COMPACT);
|
|
391
391
|
},
|
|
392
392
|
onTextWrappingChange: event => {
|
|
393
|
-
|
|
394
|
-
(_props$onSettingsChan2 = props.onSettingsChange) === null || _props$onSettingsChan2 === void 0 || _props$onSettingsChan2.call(props, UPDATE_ACTIONS.IS_TABLE_WRAPPING_TEXT_UPDATE, event.target.value === SHOW_HIDE_ON_DEMAND);
|
|
393
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.IS_TABLE_WRAPPING_TEXT_UPDATE, event.target.value === SHOW_HIDE_ON_DEMAND);
|
|
395
394
|
},
|
|
396
395
|
managerTheme: props.managerTheme
|
|
397
396
|
})), openedPanelId === COLUMN_MANAGER && jsxRuntime.jsx(columnSettingsManager.ColumnSettingsManager, _objectSpread$1(_objectSpread$1({}, props.columnManager || {}), {}, {
|
|
398
|
-
title:
|
|
399
|
-
availableColumns:
|
|
397
|
+
title: props.columnManager?.columnManagerLabel,
|
|
398
|
+
availableColumns: props.columnManager?.hideableColumns ?? [],
|
|
400
399
|
selectedColumns: selectedColumns,
|
|
401
400
|
onClose: handleSettingsPanelChange,
|
|
402
401
|
onUpdateColumns: nextVisibleColumns => {
|
|
403
|
-
var _props$onSettingsChan3;
|
|
404
402
|
const keysOfVisibleColumns = _mapInstanceProperty__default["default"](nextVisibleColumns).call(nextVisibleColumns, visibleColumn => visibleColumn.key);
|
|
405
|
-
|
|
403
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.COLUMNS_UPDATE, keysOfVisibleColumns);
|
|
406
404
|
},
|
|
407
405
|
managerTheme: props.managerTheme
|
|
408
|
-
})), props.customSettings && _mapInstanceProperty__default["default"](
|
|
409
|
-
var _props$customColumnMa2;
|
|
406
|
+
})), props.customSettings && _mapInstanceProperty__default["default"](_context5 = _Object$entries__default["default"](props.customSettings)).call(_context5, _ref4 => {
|
|
410
407
|
let _ref5 = _slicedToArray(_ref4, 2),
|
|
411
408
|
key = _ref5[0],
|
|
412
409
|
customSetting = _ref5[1];
|
|
@@ -420,19 +417,17 @@ const DataTableSettings = props => {
|
|
|
420
417
|
onClose: handleSettingsPanelChange,
|
|
421
418
|
managerTheme: props.managerTheme,
|
|
422
419
|
selectedColumns: props.selectedColumns,
|
|
423
|
-
availableColumns:
|
|
420
|
+
availableColumns: props.customColumnManager ?? undefined,
|
|
424
421
|
onUpdateColumns: (nextVisibleColumns, key) => {
|
|
425
|
-
var _props$onSettingsChan4;
|
|
426
422
|
const keysOfVisibleColumns = _mapInstanceProperty__default["default"](nextVisibleColumns).call(nextVisibleColumns, visibleColumn => visibleColumn.key);
|
|
427
|
-
|
|
423
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.CUSTOM_COLUMNS_UPDATE, keysOfVisibleColumns, key);
|
|
428
424
|
}
|
|
429
425
|
})) : jsxRuntime.jsx(CustomSettingsManager$1, _objectSpread$1(_objectSpread$1({}, customSetting || {}), {}, {
|
|
430
426
|
onClose: handleSettingsPanelChange,
|
|
431
427
|
managerTheme: props.managerTheme,
|
|
432
428
|
children: CustomComponent && jsxRuntime.jsx(CustomComponent, {
|
|
433
429
|
updateCustomSettings: settings => {
|
|
434
|
-
|
|
435
|
-
(_props$onSettingsChan5 = props.onSettingsChange) === null || _props$onSettingsChan5 === void 0 || _props$onSettingsChan5.call(props, UPDATE_ACTIONS.CUSTOM_SETTINGS_UPDATE, settings);
|
|
430
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.CUSTOM_SETTINGS_UPDATE, settings);
|
|
436
431
|
},
|
|
437
432
|
additionalSettings: _objectSpread$1(_objectSpread$1({}, customSetting), props.additionalSettings)
|
|
438
433
|
})
|
|
@@ -486,8 +481,8 @@ const DataTableManager = props => {
|
|
|
486
481
|
managerTheme: "light",
|
|
487
482
|
additionalSettings: additionalCustomSetting,
|
|
488
483
|
updateCustomSettings: settings => updateCustomSettings(settings),
|
|
489
|
-
selectedColumns: selectedColumns
|
|
490
|
-
customColumnManager: customColumnManager
|
|
484
|
+
selectedColumns: selectedColumns ?? [],
|
|
485
|
+
customColumnManager: customColumnManager ?? undefined
|
|
491
486
|
}), props.children ? /*#__PURE__*/react.cloneElement(props.children, {
|
|
492
487
|
columns,
|
|
493
488
|
customColumns,
|
|
@@ -499,7 +494,7 @@ DataTableManager.displayName = 'DataTableManager';
|
|
|
499
494
|
var DataTableManager$1 = DataTableManager;
|
|
500
495
|
|
|
501
496
|
// NOTE: This string will be replaced on build time with the package version.
|
|
502
|
-
var version = "20.
|
|
497
|
+
var version = "20.6.0";
|
|
503
498
|
|
|
504
499
|
exports.ColumnSettingsManager = columnSettingsManager.ColumnSettingsManager;
|
|
505
500
|
Object.defineProperty(exports, 'useRowSelection', {
|
|
@@ -16,6 +16,7 @@ import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
|
16
16
|
import _styled from '@emotion/styled/base';
|
|
17
17
|
import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
18
18
|
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
19
|
+
import _bindInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
19
20
|
import { warning } from '@commercetools-uikit/utils';
|
|
20
21
|
import { defineMessages, useIntl } from 'react-intl';
|
|
21
22
|
import { ColumnsIcon } from '@commercetools-uikit/icons';
|
|
@@ -28,8 +29,8 @@ import Grid from '@commercetools-uikit/grid';
|
|
|
28
29
|
import RadioInput from '@commercetools-uikit/radio-input';
|
|
29
30
|
import AccessibleHidden from '@commercetools-uikit/accessible-hidden';
|
|
30
31
|
import { designTokens } from '@commercetools-uikit/design-system';
|
|
31
|
-
import { S as SettingsContainer, C as ColumnSettingsManager } from './column-settings-manager-
|
|
32
|
-
export { C as ColumnSettingsManager } from './column-settings-manager-
|
|
32
|
+
import { S as SettingsContainer, C as ColumnSettingsManager } from './column-settings-manager-31b1dd69.esm.js';
|
|
33
|
+
export { C as ColumnSettingsManager } from './column-settings-manager-31b1dd69.esm.js';
|
|
33
34
|
export { useRowSelection, useSorting } from '@commercetools-uikit/hooks';
|
|
34
35
|
export { D as DataTableManagerProvider, u as useDataTableManagerContext } from './data-table-manager-provider-32eb58dd.esm.js';
|
|
35
36
|
import '@babel/runtime-corejs3/core-js-stable/promise';
|
|
@@ -43,7 +44,6 @@ import '@commercetools-uikit/accessible-button';
|
|
|
43
44
|
import '@commercetools-uikit/collapsible-motion';
|
|
44
45
|
import '@commercetools-uikit/card';
|
|
45
46
|
import '@commercetools-uikit/text';
|
|
46
|
-
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
47
47
|
import '@commercetools-uikit/tag';
|
|
48
48
|
|
|
49
49
|
const UPDATE_ACTIONS = {
|
|
@@ -251,7 +251,7 @@ var messages = defineMessages({
|
|
|
251
251
|
});
|
|
252
252
|
|
|
253
253
|
function ownKeys$1(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
254
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
254
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context6 = ownKeys$1(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context7 = ownKeys$1(Object(t))).call(_context7, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
255
255
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
256
256
|
const TopBarContainer = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
257
257
|
target: "e3i1gnv0"
|
|
@@ -308,7 +308,7 @@ const getSelectedColumns = function (mappedColumns) {
|
|
|
308
308
|
return _mapInstanceProperty(visibleColumnsKeys).call(visibleColumnsKeys, columnKey => mappedColumns[columnKey]);
|
|
309
309
|
};
|
|
310
310
|
const DataTableSettings = props => {
|
|
311
|
-
var
|
|
311
|
+
var _context3, _context4, _context5;
|
|
312
312
|
const getEnabledDisplaySettings = () => {
|
|
313
313
|
if (!props.displaySettings || _Object$keys(props.displaySettings).length < 0) return undefined;
|
|
314
314
|
return Boolean(props.displaySettings && !props.displaySettings.disableDisplaySettings);
|
|
@@ -319,8 +319,8 @@ const DataTableSettings = props => {
|
|
|
319
319
|
};
|
|
320
320
|
const areDisplaySettingsEnabled = getEnabledDisplaySettings();
|
|
321
321
|
const areColumnSettingsEnabled = getEnabledColumnSettings();
|
|
322
|
-
const areCustomColumnSettingsEnabled = Boolean(props.customColumnManager && !
|
|
323
|
-
process.env.NODE_ENV !== "production" ? warning(areDisplaySettingsEnabled || areColumnSettingsEnabled ? typeof props.onSettingsChange === 'function' : true,
|
|
322
|
+
const areCustomColumnSettingsEnabled = Boolean(props.customColumnManager && !props.customColumnManager?.disableCustomColumnManager);
|
|
323
|
+
process.env.NODE_ENV !== "production" ? warning(areDisplaySettingsEnabled || areColumnSettingsEnabled ? typeof props.onSettingsChange === 'function' : true, `ui-kit/DataTableManager: the prop "onSettingsChange" is required when either the display settings or the column settings are enabled.`) : void 0;
|
|
324
324
|
const intl = useIntl();
|
|
325
325
|
const _useState = useState(null),
|
|
326
326
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -331,8 +331,8 @@ const DataTableSettings = props => {
|
|
|
331
331
|
areDisplaySettingsEnabled,
|
|
332
332
|
areColumnSettingsEnabled,
|
|
333
333
|
customSettings: props.customSettings,
|
|
334
|
-
columnManagerLabel:
|
|
335
|
-
displaySettingsLabel:
|
|
334
|
+
columnManagerLabel: props.columnManager?.columnManagerLabel,
|
|
335
|
+
displaySettingsLabel: props.displaySettings?.displaySettingsLabel,
|
|
336
336
|
formatMessage: intl.formatMessage
|
|
337
337
|
});
|
|
338
338
|
const mappedColumns = getMappedColumns(areColumnSettingsEnabled ? props.columnManager.hideableColumns : undefined);
|
|
@@ -356,40 +356,36 @@ const DataTableSettings = props => {
|
|
|
356
356
|
menuHorizontalConstraint: 'auto',
|
|
357
357
|
menuPosition: "right",
|
|
358
358
|
menuType: "list",
|
|
359
|
-
children:
|
|
359
|
+
children: ((_context3 = dropdownOptions) == null ? void 0 : _bindInstanceProperty(_context4 = Function.call).call(_context4, _mapInstanceProperty(_context3), _context3))?.(option => jsx(DropdownMenu.ListMenuItem, {
|
|
360
360
|
onClick: () => {
|
|
361
|
-
setOpenedPanelId(option
|
|
361
|
+
setOpenedPanelId(option?.value);
|
|
362
362
|
},
|
|
363
|
-
isDisabled: option
|
|
364
|
-
children: option
|
|
365
|
-
}, option
|
|
363
|
+
isDisabled: option?.isDisabled,
|
|
364
|
+
children: option?.label
|
|
365
|
+
}, option?.label))
|
|
366
366
|
})
|
|
367
367
|
})]
|
|
368
368
|
}), openedPanelId === DISPLAY_SETTINGS && jsx(DisplaySettingsManager, _objectSpread$1(_objectSpread$1({}, props.displaySettings || {}), {}, {
|
|
369
|
-
title:
|
|
369
|
+
title: props.displaySettings?.displaySettingsLabel,
|
|
370
370
|
onClose: handleSettingsPanelChange,
|
|
371
371
|
onDensityDisplayChange: event => {
|
|
372
|
-
|
|
373
|
-
(_props$onSettingsChan = props.onSettingsChange) === null || _props$onSettingsChan === void 0 || _props$onSettingsChan.call(props, UPDATE_ACTIONS.IS_TABLE_CONDENSED_UPDATE, event.target.value === DENSITY_COMPACT);
|
|
372
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.IS_TABLE_CONDENSED_UPDATE, event.target.value === DENSITY_COMPACT);
|
|
374
373
|
},
|
|
375
374
|
onTextWrappingChange: event => {
|
|
376
|
-
|
|
377
|
-
(_props$onSettingsChan2 = props.onSettingsChange) === null || _props$onSettingsChan2 === void 0 || _props$onSettingsChan2.call(props, UPDATE_ACTIONS.IS_TABLE_WRAPPING_TEXT_UPDATE, event.target.value === SHOW_HIDE_ON_DEMAND);
|
|
375
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.IS_TABLE_WRAPPING_TEXT_UPDATE, event.target.value === SHOW_HIDE_ON_DEMAND);
|
|
378
376
|
},
|
|
379
377
|
managerTheme: props.managerTheme
|
|
380
378
|
})), openedPanelId === COLUMN_MANAGER && jsx(ColumnSettingsManager, _objectSpread$1(_objectSpread$1({}, props.columnManager || {}), {}, {
|
|
381
|
-
title:
|
|
382
|
-
availableColumns:
|
|
379
|
+
title: props.columnManager?.columnManagerLabel,
|
|
380
|
+
availableColumns: props.columnManager?.hideableColumns ?? [],
|
|
383
381
|
selectedColumns: selectedColumns,
|
|
384
382
|
onClose: handleSettingsPanelChange,
|
|
385
383
|
onUpdateColumns: nextVisibleColumns => {
|
|
386
|
-
var _props$onSettingsChan3;
|
|
387
384
|
const keysOfVisibleColumns = _mapInstanceProperty(nextVisibleColumns).call(nextVisibleColumns, visibleColumn => visibleColumn.key);
|
|
388
|
-
|
|
385
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.COLUMNS_UPDATE, keysOfVisibleColumns);
|
|
389
386
|
},
|
|
390
387
|
managerTheme: props.managerTheme
|
|
391
|
-
})), props.customSettings && _mapInstanceProperty(
|
|
392
|
-
var _props$customColumnMa2;
|
|
388
|
+
})), props.customSettings && _mapInstanceProperty(_context5 = _Object$entries(props.customSettings)).call(_context5, _ref4 => {
|
|
393
389
|
let _ref5 = _slicedToArray(_ref4, 2),
|
|
394
390
|
key = _ref5[0],
|
|
395
391
|
customSetting = _ref5[1];
|
|
@@ -403,19 +399,17 @@ const DataTableSettings = props => {
|
|
|
403
399
|
onClose: handleSettingsPanelChange,
|
|
404
400
|
managerTheme: props.managerTheme,
|
|
405
401
|
selectedColumns: props.selectedColumns,
|
|
406
|
-
availableColumns:
|
|
402
|
+
availableColumns: props.customColumnManager ?? undefined,
|
|
407
403
|
onUpdateColumns: (nextVisibleColumns, key) => {
|
|
408
|
-
var _props$onSettingsChan4;
|
|
409
404
|
const keysOfVisibleColumns = _mapInstanceProperty(nextVisibleColumns).call(nextVisibleColumns, visibleColumn => visibleColumn.key);
|
|
410
|
-
|
|
405
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.CUSTOM_COLUMNS_UPDATE, keysOfVisibleColumns, key);
|
|
411
406
|
}
|
|
412
407
|
})) : jsx(CustomSettingsManager$1, _objectSpread$1(_objectSpread$1({}, customSetting || {}), {}, {
|
|
413
408
|
onClose: handleSettingsPanelChange,
|
|
414
409
|
managerTheme: props.managerTheme,
|
|
415
410
|
children: CustomComponent && jsx(CustomComponent, {
|
|
416
411
|
updateCustomSettings: settings => {
|
|
417
|
-
|
|
418
|
-
(_props$onSettingsChan5 = props.onSettingsChange) === null || _props$onSettingsChan5 === void 0 || _props$onSettingsChan5.call(props, UPDATE_ACTIONS.CUSTOM_SETTINGS_UPDATE, settings);
|
|
412
|
+
props.onSettingsChange?.(UPDATE_ACTIONS.CUSTOM_SETTINGS_UPDATE, settings);
|
|
419
413
|
},
|
|
420
414
|
additionalSettings: _objectSpread$1(_objectSpread$1({}, customSetting), props.additionalSettings)
|
|
421
415
|
})
|
|
@@ -469,8 +463,8 @@ const DataTableManager = props => {
|
|
|
469
463
|
managerTheme: "light",
|
|
470
464
|
additionalSettings: additionalCustomSetting,
|
|
471
465
|
updateCustomSettings: settings => updateCustomSettings(settings),
|
|
472
|
-
selectedColumns: selectedColumns
|
|
473
|
-
customColumnManager: customColumnManager
|
|
466
|
+
selectedColumns: selectedColumns ?? [],
|
|
467
|
+
customColumnManager: customColumnManager ?? undefined
|
|
474
468
|
}), props.children ? /*#__PURE__*/cloneElement(props.children, {
|
|
475
469
|
columns,
|
|
476
470
|
customColumns,
|
|
@@ -482,6 +476,6 @@ DataTableManager.displayName = 'DataTableManager';
|
|
|
482
476
|
var DataTableManager$1 = DataTableManager;
|
|
483
477
|
|
|
484
478
|
// NOTE: This string will be replaced on build time with the package version.
|
|
485
|
-
var version = "20.
|
|
479
|
+
var version = "20.6.0";
|
|
486
480
|
|
|
487
481
|
export { UPDATE_ACTIONS, DataTableManager$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/data-table-manager",
|
|
3
3
|
"description": "This component enhances the DataTable component and additionally provides a UI and state management to handle configuration of the table such as column manager.",
|
|
4
|
-
"version": "20.
|
|
4
|
+
"version": "20.6.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -9,7 +9,13 @@
|
|
|
9
9
|
"directory": "packages/components/data-table-manager"
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://uikit.commercetools.com",
|
|
12
|
-
"keywords": [
|
|
12
|
+
"keywords": [
|
|
13
|
+
"javascript",
|
|
14
|
+
"typescript",
|
|
15
|
+
"design-system",
|
|
16
|
+
"react",
|
|
17
|
+
"uikit"
|
|
18
|
+
],
|
|
13
19
|
"license": "MIT",
|
|
14
20
|
"publishConfig": {
|
|
15
21
|
"access": "public"
|
|
@@ -24,48 +30,57 @@
|
|
|
24
30
|
"column-settings-manager/index.ts"
|
|
25
31
|
]
|
|
26
32
|
},
|
|
27
|
-
"files": [
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"data-table-manager-provider",
|
|
36
|
+
"column-settings-manager"
|
|
37
|
+
],
|
|
28
38
|
"dependencies": {
|
|
29
39
|
"@babel/runtime": "^7.20.13",
|
|
30
40
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
31
|
-
"@commercetools-uikit/accessible-button": "20.4.0",
|
|
32
|
-
"@commercetools-uikit/accessible-hidden": "20.4.0",
|
|
33
|
-
"@commercetools-uikit/async-select-input": "20.4.0",
|
|
34
|
-
"@commercetools-uikit/card": "20.4.0",
|
|
35
|
-
"@commercetools-uikit/collapsible-motion": "20.4.0",
|
|
36
|
-
"@commercetools-uikit/design-system": "20.4.0",
|
|
37
|
-
"@commercetools-uikit/dropdown-menu": "20.4.0",
|
|
38
|
-
"@commercetools-uikit/field-label": "20.4.0",
|
|
39
|
-
"@commercetools-uikit/grid": "20.4.0",
|
|
40
|
-
"@commercetools-uikit/hooks": "20.4.0",
|
|
41
|
-
"@commercetools-uikit/icon-button": "20.4.0",
|
|
42
|
-
"@commercetools-uikit/icons": "20.4.0",
|
|
43
|
-
"@commercetools-uikit/primary-button": "20.4.0",
|
|
44
|
-
"@commercetools-uikit/radio-input": "20.4.0",
|
|
45
|
-
"@commercetools-uikit/secondary-button": "20.4.0",
|
|
46
|
-
"@commercetools-uikit/secondary-icon-button": "20.4.0",
|
|
47
|
-
"@commercetools-uikit/select-input": "20.4.0",
|
|
48
|
-
"@commercetools-uikit/spacings": "20.4.0",
|
|
49
|
-
"@commercetools-uikit/tag": "20.4.0",
|
|
50
|
-
"@commercetools-uikit/text": "20.4.0",
|
|
51
|
-
"@commercetools-uikit/tooltip": "20.4.0",
|
|
52
|
-
"@commercetools-uikit/utils": "20.4.0",
|
|
53
41
|
"@emotion/react": "^11.10.5",
|
|
54
42
|
"@emotion/styled": "^11.10.5",
|
|
55
43
|
"@hello-pangea/dnd": "^18.0.0",
|
|
56
44
|
"@types/debounce-promise": "^3.1.6",
|
|
57
45
|
"debounce-promise": "^3.1.2",
|
|
58
|
-
"lodash": "4.
|
|
46
|
+
"lodash": "4.18.1",
|
|
47
|
+
"@commercetools-uikit/accessible-button": "^20.6.0",
|
|
48
|
+
"@commercetools-uikit/accessible-hidden": "^20.6.0",
|
|
49
|
+
"@commercetools-uikit/async-select-input": "^20.6.0",
|
|
50
|
+
"@commercetools-uikit/card": "^20.6.0",
|
|
51
|
+
"@commercetools-uikit/collapsible-motion": "^20.6.0",
|
|
52
|
+
"@commercetools-uikit/data-table-manager": "^20.6.0",
|
|
53
|
+
"@commercetools-uikit/design-system": "^20.6.0",
|
|
54
|
+
"@commercetools-uikit/dropdown-menu": "^20.6.0",
|
|
55
|
+
"@commercetools-uikit/field-label": "^20.6.0",
|
|
56
|
+
"@commercetools-uikit/grid": "^20.6.0",
|
|
57
|
+
"@commercetools-uikit/hooks": "^20.6.0",
|
|
58
|
+
"@commercetools-uikit/icon-button": "^20.6.0",
|
|
59
|
+
"@commercetools-uikit/icons": "^20.6.0",
|
|
60
|
+
"@commercetools-uikit/primary-button": "^20.6.0",
|
|
61
|
+
"@commercetools-uikit/radio-input": "^20.6.0",
|
|
62
|
+
"@commercetools-uikit/secondary-button": "^20.6.0",
|
|
63
|
+
"@commercetools-uikit/secondary-icon-button": "^20.6.0",
|
|
64
|
+
"@commercetools-uikit/select-input": "^20.6.0",
|
|
65
|
+
"@commercetools-uikit/spacings": "^20.6.0",
|
|
66
|
+
"@commercetools-uikit/tag": "^20.6.0",
|
|
67
|
+
"@commercetools-uikit/text": "^20.6.0",
|
|
68
|
+
"@commercetools-uikit/tooltip": "^20.6.0",
|
|
69
|
+
"@commercetools-uikit/utils": "^20.6.0"
|
|
59
70
|
},
|
|
60
71
|
"devDependencies": {
|
|
61
72
|
"formik": "^2.4.6",
|
|
62
73
|
"react": "19.2.0",
|
|
63
74
|
"react-dom": "19.2.0",
|
|
64
|
-
"react-intl": "^7.1.4"
|
|
75
|
+
"react-intl": "^7.1.4",
|
|
76
|
+
"@commercetools-uikit/checkbox-input": "^20.6.0",
|
|
77
|
+
"@commercetools-uikit/constraints": "^20.6.0",
|
|
78
|
+
"@commercetools-uikit/search-text-input": "^20.6.0",
|
|
79
|
+
"@commercetools-uikit/toggle-input": "^20.6.0"
|
|
65
80
|
},
|
|
66
81
|
"peerDependencies": {
|
|
67
82
|
"react": "19.x",
|
|
68
83
|
"react-dom": "19.x",
|
|
69
84
|
"react-intl": "7.x"
|
|
70
85
|
}
|
|
71
|
-
}
|
|
86
|
+
}
|