@commercetools-uikit/data-table-manager 20.2.3 → 20.3.1

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var columnSettingsManager = require('../../dist/column-settings-manager-cb1d164e.cjs.dev.js');
5
+ var columnSettingsManager = require('../../dist/column-settings-manager-07b065fc.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,7 +10,6 @@ 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');
14
13
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
15
14
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
16
15
  require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -36,6 +35,7 @@ require('@commercetools-uikit/collapsible-motion');
36
35
  require('@commercetools-uikit/card');
37
36
  require('@commercetools-uikit/text');
38
37
  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-58769e7c.cjs.prod.js');
5
+ var columnSettingsManager = require('../../dist/column-settings-manager-8ec9b25f.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,7 +10,6 @@ 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');
14
13
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
15
14
  require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
16
15
  require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -36,6 +35,7 @@ require('@commercetools-uikit/collapsible-motion');
36
35
  require('@commercetools-uikit/card');
37
36
  require('@commercetools-uikit/text');
38
37
  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-144dfa13.esm.js';
1
+ export { C as ColumnSettingsManager } from '../../dist/column-settings-manager-b4e2fd60.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,7 +6,6 @@ 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';
10
9
  import '@babel/runtime-corejs3/core-js-stable/object/keys';
11
10
  import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
12
11
  import '@babel/runtime-corejs3/core-js-stable/instance/filter';
@@ -32,4 +31,5 @@ import '@commercetools-uikit/collapsible-motion';
32
31
  import '@commercetools-uikit/card';
33
32
  import '@commercetools-uikit/text';
34
33
  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';
@@ -7,7 +7,6 @@ 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');
11
10
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
12
11
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
13
12
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -33,6 +32,7 @@ var CollapsibleMotion = require('@commercetools-uikit/collapsible-motion');
33
32
  var Card = require('@commercetools-uikit/card');
34
33
  var Text = require('@commercetools-uikit/text');
35
34
  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,7 +41,6 @@ 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);
45
44
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
46
45
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
47
46
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
@@ -60,6 +59,7 @@ var CollapsibleMotion__default = /*#__PURE__*/_interopDefault(CollapsibleMotion)
60
59
  var Card__default = /*#__PURE__*/_interopDefault(Card);
61
60
  var Text__default = /*#__PURE__*/_interopDefault(Text);
62
61
  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,7 +170,10 @@ 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 = () => props.onRemove?.(props.index);
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
+ };
174
177
  return jsxRuntime.jsx(dnd.Draggable, {
175
178
  draggableId: props.column.key,
176
179
  index: props.index,
@@ -204,9 +207,11 @@ var TagContainerEditable$1 = TagContainerEditable;
204
207
 
205
208
  var messages$1 = reactIntl.defineMessages({
206
209
  loadMoreAttributesHint: {
207
- id: 'UIKit.DataTableManager.ColumnManager.DroppablePanel.loadMoreAttributesHint',
208
- description: 'Indicate that the user can use the search input to load more attributes',
209
- defaultMessage: 'Load more attributes by using the search input above'
210
+ id: "UIKit.DataTableManager.ColumnManager.DroppablePanel.loadMoreAttributesHint",
211
+ defaultMessage: [{
212
+ "type": 0,
213
+ "value": "Load more attributes by using the search input above"
214
+ }]
210
215
  }
211
216
  });
212
217
 
@@ -225,15 +230,18 @@ const DroppablePanel = props => {
225
230
  children: props.noColumnsText
226
231
  })
227
232
  }) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
228
- children: [_mapInstanceProperty__default["default"](_context = props.columns).call(_context, (column, index) => jsxRuntime.jsx(DraggableTag$1, {
229
- column: column,
230
- index: index,
231
- onRemove: props.onRemove ? () => {
232
- var _context2, _context3;
233
- return props.onRemove([..._sliceInstanceProperty__default["default"](_context2 = props.columns).call(_context2, 0, index), ..._sliceInstanceProperty__default["default"](_context3 = props.columns).call(_context3, index + 1)]);
234
- } : undefined,
235
- isDisabled: props.isDisabled
236
- }, `${column.key}-${index}`)), props.isSearchable && jsxRuntime.jsx(Spacings__default["default"].Inset, {
233
+ children: [_mapInstanceProperty__default["default"](_context = props.columns).call(_context, (column, index) => {
234
+ var _context2;
235
+ return jsxRuntime.jsx(DraggableTag$1, {
236
+ column: column,
237
+ index: index,
238
+ onRemove: props.onRemove ? () => {
239
+ var _context3, _context4;
240
+ return props.onRemove([..._sliceInstanceProperty__default["default"](_context3 = props.columns).call(_context3, 0, index), ..._sliceInstanceProperty__default["default"](_context4 = props.columns).call(_context4, index + 1)]);
241
+ } : undefined,
242
+ isDisabled: props.isDisabled
243
+ }, _concatInstanceProperty__default["default"](_context2 = "".concat(column.key, "-")).call(_context2, index));
244
+ }), props.isSearchable && jsxRuntime.jsx(Spacings__default["default"].Inset, {
237
245
  scale: "xs",
238
246
  children: jsxRuntime.jsx(Text__default["default"].Detail, {
239
247
  tone: "secondary",
@@ -250,34 +258,46 @@ var DroppablePanel$1 = DroppablePanel;
250
258
 
251
259
  var messages = reactIntl.defineMessages({
252
260
  title: {
253
- id: 'UIKit.DataTableManager.ColumnManager.title',
254
- description: 'Title for the column manager component.',
255
- defaultMessage: 'Column Manager'
261
+ id: "UIKit.DataTableManager.ColumnManager.title",
262
+ defaultMessage: [{
263
+ "type": 0,
264
+ "value": "Column Manager"
265
+ }]
256
266
  },
257
267
  visibleColumns: {
258
- id: 'UIKit.DataTableManager.ColumnSelectorGroups.visible',
259
- description: 'Message for the visible columns section.',
260
- defaultMessage: 'Visible columns'
268
+ id: "UIKit.DataTableManager.ColumnSelectorGroups.visible",
269
+ defaultMessage: [{
270
+ "type": 0,
271
+ "value": "Visible columns"
272
+ }]
261
273
  },
262
274
  hiddenColumns: {
263
- id: 'UIKit.DataTableManager.ColumnManager.hiddenColumns',
264
- description: 'Message for the hidden columns section',
265
- defaultMessage: 'Hidden columns'
275
+ id: "UIKit.DataTableManager.ColumnManager.hiddenColumns",
276
+ defaultMessage: [{
277
+ "type": 0,
278
+ "value": "Hidden columns"
279
+ }]
266
280
  },
267
281
  noSelectedColumnsToShow: {
268
- id: 'UIKit.DataTableManager.ColumnManager.noSelectedColumnsToShow',
269
- description: 'Label when there are no selected columns to show',
270
- defaultMessage: 'There are no selected columns to show.'
282
+ id: "UIKit.DataTableManager.ColumnManager.noSelectedColumnsToShow",
283
+ defaultMessage: [{
284
+ "type": 0,
285
+ "value": "There are no selected columns to show."
286
+ }]
271
287
  },
272
288
  noHiddenColumnsToShow: {
273
- id: 'UIKit.DataTableManager.ColumnManager.noHiddenColumnsToShow',
274
- description: 'Label when there are no hidden columns to show',
275
- defaultMessage: 'There are no hidden columns to show.'
289
+ id: "UIKit.DataTableManager.ColumnManager.noHiddenColumnsToShow",
290
+ defaultMessage: [{
291
+ "type": 0,
292
+ "value": "There are no hidden columns to show."
293
+ }]
276
294
  },
277
295
  closeButtonLabel: {
278
- id: 'UIKit.DataTableManager.ColumnManager.closeButtonLabel',
279
- description: 'Label for density manager close button.',
280
- defaultMessage: 'Close'
296
+ id: "UIKit.DataTableManager.ColumnManager.closeButtonLabel",
297
+ defaultMessage: [{
298
+ "type": 0,
299
+ "value": "Close"
300
+ }]
281
301
  }
282
302
  });
283
303
 
@@ -286,7 +306,7 @@ const SELECTED_COLUMNS_PANEL = 'selected-columns-panel';
286
306
 
287
307
  const _excluded = ["availableColumns"];
288
308
  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; }
289
- 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; }
309
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
290
310
  const noSearch = () => _Promise__default["default"].resolve([]);
291
311
  // 'onChange' prop in AsyncSelectInput is required but not needed here
292
312
  const voidChangeHandler = () => undefined;
@@ -304,7 +324,6 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
304
324
  if (dragResult.source.droppableId === HIDDEN_COLUMNS_PANEL) return;
305
325
  onUpdateColumns([..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, dragResult.source.index + 1)]);
306
326
  } else {
307
- var _context, _context2;
308
327
  // the destination is the selected columns panel
309
328
 
310
329
  // it's a swap when the source and the destination are the same
@@ -314,7 +333,7 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
314
333
  // the hidden section (it is a swap)
315
334
  [..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, dragResult.source.index + 1)] : selectedColumns;
316
335
  const columns = isSwap ? selectedColumns : availableColumns;
317
- 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);
336
+ const draggedColumn = columns === null || columns === void 0 ? void 0 : _findInstanceProperty__default["default"](columns).call(columns, col => col.key === dragResult.draggableId);
318
337
 
319
338
  // push the column in the new position if draggedColumn is found
320
339
  if (draggedColumn) {
@@ -354,7 +373,7 @@ const ColumnSettingsManager = _ref => {
354
373
  };
355
374
  const hiddenColumns = react.useMemo(() => differenceWith__default["default"](availableColumns, props.selectedColumns, (a, b) => a.key === b.key), [availableColumns, props.selectedColumns]);
356
375
  const handleDragEnd = react.useCallback(dragResult => handleColumnsUpdate(dragResult, props.onUpdateColumns, props.selectedColumns, availableColumns, setIsDragging), [props.onUpdateColumns, props.selectedColumns, availableColumns]);
357
- const debouncedSearchHiddenColumns = react.useMemo(() => debounce__default["default"](searchHiddenColumns ?? noSearch, 300), [searchHiddenColumns]);
376
+ const debouncedSearchHiddenColumns = react.useMemo(() => debounce__default["default"](searchHiddenColumns !== null && searchHiddenColumns !== void 0 ? searchHiddenColumns : noSearch, 300), [searchHiddenColumns]);
358
377
  const handleInputChange = react.useCallback(inputValue => debouncedSearchHiddenColumns(inputValue), [debouncedSearchHiddenColumns]);
359
378
  return jsxRuntime.jsx(SettingsContainer$1, {
360
379
  customSettingsTitle: props.title,
@@ -7,7 +7,6 @@ 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');
11
10
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
12
11
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
13
12
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -33,6 +32,7 @@ var CollapsibleMotion = require('@commercetools-uikit/collapsible-motion');
33
32
  var Card = require('@commercetools-uikit/card');
34
33
  var Text = require('@commercetools-uikit/text');
35
34
  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,7 +41,6 @@ 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);
45
44
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
46
45
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
47
46
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
@@ -60,6 +59,7 @@ var CollapsibleMotion__default = /*#__PURE__*/_interopDefault(CollapsibleMotion)
60
59
  var Card__default = /*#__PURE__*/_interopDefault(Card);
61
60
  var Text__default = /*#__PURE__*/_interopDefault(Text);
62
61
  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,7 +145,10 @@ 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 = () => props.onRemove?.(props.index);
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
+ };
149
152
  return jsxRuntime.jsx(dnd.Draggable, {
150
153
  draggableId: props.column.key,
151
154
  index: props.index,
@@ -176,9 +179,11 @@ var TagContainerEditable$1 = TagContainerEditable;
176
179
 
177
180
  var messages$1 = reactIntl.defineMessages({
178
181
  loadMoreAttributesHint: {
179
- id: 'UIKit.DataTableManager.ColumnManager.DroppablePanel.loadMoreAttributesHint',
180
- description: 'Indicate that the user can use the search input to load more attributes',
181
- defaultMessage: 'Load more attributes by using the search input above'
182
+ id: "UIKit.DataTableManager.ColumnManager.DroppablePanel.loadMoreAttributesHint",
183
+ defaultMessage: [{
184
+ "type": 0,
185
+ "value": "Load more attributes by using the search input above"
186
+ }]
182
187
  }
183
188
  });
184
189
 
@@ -197,15 +202,18 @@ const DroppablePanel = props => {
197
202
  children: props.noColumnsText
198
203
  })
199
204
  }) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
200
- children: [_mapInstanceProperty__default["default"](_context = props.columns).call(_context, (column, index) => jsxRuntime.jsx(DraggableTag$1, {
201
- column: column,
202
- index: index,
203
- onRemove: props.onRemove ? () => {
204
- var _context2, _context3;
205
- return props.onRemove([..._sliceInstanceProperty__default["default"](_context2 = props.columns).call(_context2, 0, index), ..._sliceInstanceProperty__default["default"](_context3 = props.columns).call(_context3, index + 1)]);
206
- } : undefined,
207
- isDisabled: props.isDisabled
208
- }, `${column.key}-${index}`)), props.isSearchable && jsxRuntime.jsx(Spacings__default["default"].Inset, {
205
+ children: [_mapInstanceProperty__default["default"](_context = props.columns).call(_context, (column, index) => {
206
+ var _context2;
207
+ return jsxRuntime.jsx(DraggableTag$1, {
208
+ column: column,
209
+ index: index,
210
+ onRemove: props.onRemove ? () => {
211
+ var _context3, _context4;
212
+ return props.onRemove([..._sliceInstanceProperty__default["default"](_context3 = props.columns).call(_context3, 0, index), ..._sliceInstanceProperty__default["default"](_context4 = props.columns).call(_context4, index + 1)]);
213
+ } : undefined,
214
+ isDisabled: props.isDisabled
215
+ }, _concatInstanceProperty__default["default"](_context2 = "".concat(column.key, "-")).call(_context2, index));
216
+ }), props.isSearchable && jsxRuntime.jsx(Spacings__default["default"].Inset, {
209
217
  scale: "xs",
210
218
  children: jsxRuntime.jsx(Text__default["default"].Detail, {
211
219
  tone: "secondary",
@@ -222,34 +230,46 @@ var DroppablePanel$1 = DroppablePanel;
222
230
 
223
231
  var messages = reactIntl.defineMessages({
224
232
  title: {
225
- id: 'UIKit.DataTableManager.ColumnManager.title',
226
- description: 'Title for the column manager component.',
227
- defaultMessage: 'Column Manager'
233
+ id: "UIKit.DataTableManager.ColumnManager.title",
234
+ defaultMessage: [{
235
+ "type": 0,
236
+ "value": "Column Manager"
237
+ }]
228
238
  },
229
239
  visibleColumns: {
230
- id: 'UIKit.DataTableManager.ColumnSelectorGroups.visible',
231
- description: 'Message for the visible columns section.',
232
- defaultMessage: 'Visible columns'
240
+ id: "UIKit.DataTableManager.ColumnSelectorGroups.visible",
241
+ defaultMessage: [{
242
+ "type": 0,
243
+ "value": "Visible columns"
244
+ }]
233
245
  },
234
246
  hiddenColumns: {
235
- id: 'UIKit.DataTableManager.ColumnManager.hiddenColumns',
236
- description: 'Message for the hidden columns section',
237
- defaultMessage: 'Hidden columns'
247
+ id: "UIKit.DataTableManager.ColumnManager.hiddenColumns",
248
+ defaultMessage: [{
249
+ "type": 0,
250
+ "value": "Hidden columns"
251
+ }]
238
252
  },
239
253
  noSelectedColumnsToShow: {
240
- id: 'UIKit.DataTableManager.ColumnManager.noSelectedColumnsToShow',
241
- description: 'Label when there are no selected columns to show',
242
- defaultMessage: 'There are no selected columns to show.'
254
+ id: "UIKit.DataTableManager.ColumnManager.noSelectedColumnsToShow",
255
+ defaultMessage: [{
256
+ "type": 0,
257
+ "value": "There are no selected columns to show."
258
+ }]
243
259
  },
244
260
  noHiddenColumnsToShow: {
245
- id: 'UIKit.DataTableManager.ColumnManager.noHiddenColumnsToShow',
246
- description: 'Label when there are no hidden columns to show',
247
- defaultMessage: 'There are no hidden columns to show.'
261
+ id: "UIKit.DataTableManager.ColumnManager.noHiddenColumnsToShow",
262
+ defaultMessage: [{
263
+ "type": 0,
264
+ "value": "There are no hidden columns to show."
265
+ }]
248
266
  },
249
267
  closeButtonLabel: {
250
- id: 'UIKit.DataTableManager.ColumnManager.closeButtonLabel',
251
- description: 'Label for density manager close button.',
252
- defaultMessage: 'Close'
268
+ id: "UIKit.DataTableManager.ColumnManager.closeButtonLabel",
269
+ defaultMessage: [{
270
+ "type": 0,
271
+ "value": "Close"
272
+ }]
253
273
  }
254
274
  });
255
275
 
@@ -258,7 +278,7 @@ const SELECTED_COLUMNS_PANEL = 'selected-columns-panel';
258
278
 
259
279
  const _excluded = ["availableColumns"];
260
280
  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; }
261
- 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; }
281
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
262
282
  const noSearch = () => _Promise__default["default"].resolve([]);
263
283
  // 'onChange' prop in AsyncSelectInput is required but not needed here
264
284
  const voidChangeHandler = () => undefined;
@@ -273,7 +293,6 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
273
293
  if (dragResult.source.droppableId === HIDDEN_COLUMNS_PANEL) return;
274
294
  onUpdateColumns([..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, dragResult.source.index + 1)]);
275
295
  } else {
276
- var _context, _context2;
277
296
  // the destination is the selected columns panel
278
297
 
279
298
  // it's a swap when the source and the destination are the same
@@ -283,7 +302,7 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
283
302
  // the hidden section (it is a swap)
284
303
  [..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty__default["default"](selectedColumns).call(selectedColumns, dragResult.source.index + 1)] : selectedColumns;
285
304
  const columns = isSwap ? selectedColumns : availableColumns;
286
- 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);
305
+ const draggedColumn = columns === null || columns === void 0 ? void 0 : _findInstanceProperty__default["default"](columns).call(columns, col => col.key === dragResult.draggableId);
287
306
 
288
307
  // push the column in the new position if draggedColumn is found
289
308
  if (draggedColumn) {
@@ -321,7 +340,7 @@ const ColumnSettingsManager = _ref => {
321
340
  };
322
341
  const hiddenColumns = react.useMemo(() => differenceWith__default["default"](availableColumns, props.selectedColumns, (a, b) => a.key === b.key), [availableColumns, props.selectedColumns]);
323
342
  const handleDragEnd = react.useCallback(dragResult => handleColumnsUpdate(dragResult, props.onUpdateColumns, props.selectedColumns, availableColumns, setIsDragging), [props.onUpdateColumns, props.selectedColumns, availableColumns]);
324
- const debouncedSearchHiddenColumns = react.useMemo(() => debounce__default["default"](searchHiddenColumns ?? noSearch, 300), [searchHiddenColumns]);
343
+ const debouncedSearchHiddenColumns = react.useMemo(() => debounce__default["default"](searchHiddenColumns !== null && searchHiddenColumns !== void 0 ? searchHiddenColumns : noSearch, 300), [searchHiddenColumns]);
325
344
  const handleInputChange = react.useCallback(inputValue => debouncedSearchHiddenColumns(inputValue), [debouncedSearchHiddenColumns]);
326
345
  return jsxRuntime.jsx(SettingsContainer$1, {
327
346
  customSettingsTitle: props.title,
@@ -5,7 +5,6 @@ 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';
9
8
  import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
10
9
  import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
11
10
  import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
@@ -31,6 +30,7 @@ import CollapsibleMotion from '@commercetools-uikit/collapsible-motion';
31
30
  import Card from '@commercetools-uikit/card';
32
31
  import Text from '@commercetools-uikit/text';
33
32
  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,7 +141,10 @@ 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 = () => props.onRemove?.(props.index);
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
+ };
145
148
  return jsx(Draggable, {
146
149
  draggableId: props.column.key,
147
150
  index: props.index,
@@ -175,9 +178,11 @@ var TagContainerEditable$1 = TagContainerEditable;
175
178
 
176
179
  var messages$1 = defineMessages({
177
180
  loadMoreAttributesHint: {
178
- id: 'UIKit.DataTableManager.ColumnManager.DroppablePanel.loadMoreAttributesHint',
179
- description: 'Indicate that the user can use the search input to load more attributes',
180
- defaultMessage: 'Load more attributes by using the search input above'
181
+ id: "UIKit.DataTableManager.ColumnManager.DroppablePanel.loadMoreAttributesHint",
182
+ defaultMessage: [{
183
+ "type": 0,
184
+ "value": "Load more attributes by using the search input above"
185
+ }]
181
186
  }
182
187
  });
183
188
 
@@ -196,15 +201,18 @@ const DroppablePanel = props => {
196
201
  children: props.noColumnsText
197
202
  })
198
203
  }) : jsxs(Fragment, {
199
- children: [_mapInstanceProperty(_context = props.columns).call(_context, (column, index) => jsx(DraggableTag$1, {
200
- column: column,
201
- index: index,
202
- onRemove: props.onRemove ? () => {
203
- var _context2, _context3;
204
- return props.onRemove([..._sliceInstanceProperty(_context2 = props.columns).call(_context2, 0, index), ..._sliceInstanceProperty(_context3 = props.columns).call(_context3, index + 1)]);
205
- } : undefined,
206
- isDisabled: props.isDisabled
207
- }, `${column.key}-${index}`)), props.isSearchable && jsx(Spacings.Inset, {
204
+ children: [_mapInstanceProperty(_context = props.columns).call(_context, (column, index) => {
205
+ var _context2;
206
+ return jsx(DraggableTag$1, {
207
+ column: column,
208
+ index: index,
209
+ onRemove: props.onRemove ? () => {
210
+ var _context3, _context4;
211
+ return props.onRemove([..._sliceInstanceProperty(_context3 = props.columns).call(_context3, 0, index), ..._sliceInstanceProperty(_context4 = props.columns).call(_context4, index + 1)]);
212
+ } : undefined,
213
+ isDisabled: props.isDisabled
214
+ }, _concatInstanceProperty(_context2 = "".concat(column.key, "-")).call(_context2, index));
215
+ }), props.isSearchable && jsx(Spacings.Inset, {
208
216
  scale: "xs",
209
217
  children: jsx(Text.Detail, {
210
218
  tone: "secondary",
@@ -221,34 +229,46 @@ var DroppablePanel$1 = DroppablePanel;
221
229
 
222
230
  var messages = defineMessages({
223
231
  title: {
224
- id: 'UIKit.DataTableManager.ColumnManager.title',
225
- description: 'Title for the column manager component.',
226
- defaultMessage: 'Column Manager'
232
+ id: "UIKit.DataTableManager.ColumnManager.title",
233
+ defaultMessage: [{
234
+ "type": 0,
235
+ "value": "Column Manager"
236
+ }]
227
237
  },
228
238
  visibleColumns: {
229
- id: 'UIKit.DataTableManager.ColumnSelectorGroups.visible',
230
- description: 'Message for the visible columns section.',
231
- defaultMessage: 'Visible columns'
239
+ id: "UIKit.DataTableManager.ColumnSelectorGroups.visible",
240
+ defaultMessage: [{
241
+ "type": 0,
242
+ "value": "Visible columns"
243
+ }]
232
244
  },
233
245
  hiddenColumns: {
234
- id: 'UIKit.DataTableManager.ColumnManager.hiddenColumns',
235
- description: 'Message for the hidden columns section',
236
- defaultMessage: 'Hidden columns'
246
+ id: "UIKit.DataTableManager.ColumnManager.hiddenColumns",
247
+ defaultMessage: [{
248
+ "type": 0,
249
+ "value": "Hidden columns"
250
+ }]
237
251
  },
238
252
  noSelectedColumnsToShow: {
239
- id: 'UIKit.DataTableManager.ColumnManager.noSelectedColumnsToShow',
240
- description: 'Label when there are no selected columns to show',
241
- defaultMessage: 'There are no selected columns to show.'
253
+ id: "UIKit.DataTableManager.ColumnManager.noSelectedColumnsToShow",
254
+ defaultMessage: [{
255
+ "type": 0,
256
+ "value": "There are no selected columns to show."
257
+ }]
242
258
  },
243
259
  noHiddenColumnsToShow: {
244
- id: 'UIKit.DataTableManager.ColumnManager.noHiddenColumnsToShow',
245
- description: 'Label when there are no hidden columns to show',
246
- defaultMessage: 'There are no hidden columns to show.'
260
+ id: "UIKit.DataTableManager.ColumnManager.noHiddenColumnsToShow",
261
+ defaultMessage: [{
262
+ "type": 0,
263
+ "value": "There are no hidden columns to show."
264
+ }]
247
265
  },
248
266
  closeButtonLabel: {
249
- id: 'UIKit.DataTableManager.ColumnManager.closeButtonLabel',
250
- description: 'Label for density manager close button.',
251
- defaultMessage: 'Close'
267
+ id: "UIKit.DataTableManager.ColumnManager.closeButtonLabel",
268
+ defaultMessage: [{
269
+ "type": 0,
270
+ "value": "Close"
271
+ }]
252
272
  }
253
273
  });
254
274
 
@@ -257,7 +277,7 @@ const SELECTED_COLUMNS_PANEL = 'selected-columns-panel';
257
277
 
258
278
  const _excluded = ["availableColumns"];
259
279
  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; }
260
- 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; }
280
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
261
281
  const noSearch = () => _Promise.resolve([]);
262
282
  // 'onChange' prop in AsyncSelectInput is required but not needed here
263
283
  const voidChangeHandler = () => undefined;
@@ -275,7 +295,6 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
275
295
  if (dragResult.source.droppableId === HIDDEN_COLUMNS_PANEL) return;
276
296
  onUpdateColumns([..._sliceInstanceProperty(selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty(selectedColumns).call(selectedColumns, dragResult.source.index + 1)]);
277
297
  } else {
278
- var _context, _context2;
279
298
  // the destination is the selected columns panel
280
299
 
281
300
  // it's a swap when the source and the destination are the same
@@ -285,7 +304,7 @@ const handleColumnsUpdate = (dragResult, onUpdateColumns, selectedColumns, avail
285
304
  // the hidden section (it is a swap)
286
305
  [..._sliceInstanceProperty(selectedColumns).call(selectedColumns, 0, dragResult.source.index), ..._sliceInstanceProperty(selectedColumns).call(selectedColumns, dragResult.source.index + 1)] : selectedColumns;
287
306
  const columns = isSwap ? selectedColumns : availableColumns;
288
- const draggedColumn = ((_context = columns) == null ? void 0 : _bindInstanceProperty(_context2 = Function.call).call(_context2, _findInstanceProperty(_context), _context))?.(col => col.key === dragResult.draggableId);
307
+ const draggedColumn = columns === null || columns === void 0 ? void 0 : _findInstanceProperty(columns).call(columns, col => col.key === dragResult.draggableId);
289
308
 
290
309
  // push the column in the new position if draggedColumn is found
291
310
  if (draggedColumn) {
@@ -325,7 +344,7 @@ const ColumnSettingsManager = _ref => {
325
344
  };
326
345
  const hiddenColumns = useMemo(() => differenceWith(availableColumns, props.selectedColumns, (a, b) => a.key === b.key), [availableColumns, props.selectedColumns]);
327
346
  const handleDragEnd = useCallback(dragResult => handleColumnsUpdate(dragResult, props.onUpdateColumns, props.selectedColumns, availableColumns, setIsDragging), [props.onUpdateColumns, props.selectedColumns, availableColumns]);
328
- const debouncedSearchHiddenColumns = useMemo(() => debounce(searchHiddenColumns ?? noSearch, 300), [searchHiddenColumns]);
347
+ const debouncedSearchHiddenColumns = useMemo(() => debounce(searchHiddenColumns !== null && searchHiddenColumns !== void 0 ? searchHiddenColumns : noSearch, 300), [searchHiddenColumns]);
329
348
  const handleInputChange = useCallback(inputValue => debouncedSearchHiddenColumns(inputValue), [debouncedSearchHiddenColumns]);
330
349
  return jsx(SettingsContainer$1, {
331
350
  customSettingsTitle: props.title,