@synerise/ds-column-manager 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.2.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-column-manager@1.2.7...@synerise/ds-column-manager@1.2.8) (2025-07-24)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-column-manager
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.2.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-column-manager@1.2.6...@synerise/ds-column-manager@1.2.7) (2025-07-24)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-column-manager
17
+
18
+
19
+
20
+
21
+
6
22
  ## [1.2.6](https://github.com/Synerise/synerise-design/compare/@synerise/ds-column-manager@1.2.5...@synerise/ds-column-manager@1.2.6) (2025-07-17)
7
23
 
8
24
  **Note:** Version bump only for package @synerise/ds-column-manager
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  import Drawer from '@synerise/ds-drawer';
3
2
  export declare const ColumnManager: import("styled-components").StyledComponent<typeof Drawer, any, {}, never>;
4
- export declare const SearchBar: import("styled-components").StyledComponent<({ value, className, onSearchChange, onClearInput, placeholder, iconLeft, autofocus, clearTooltip, disabled, borderRadius, handleInputRef, autofocusDelay, clearTooltipProps, valuePrefix, ...htmlAttributes }: import("@synerise/ds-search-bar").SearchBarProps) => import("react").JSX.Element, any, {}, never>;
3
+ export declare const SearchBar: import("styled-components").StyledComponent<({ value, className, onSearchChange, onClearInput, placeholder, iconLeft, autofocus, clearTooltip, disabled, borderRadius, handleInputRef, autofocusDelay, clearTooltipProps, valuePrefix, ...htmlAttributes }: import("@synerise/ds-search-bar").SearchBarProps) => React.JSX.Element, any, {}, never>;
5
4
  export declare const ColumnManagerListWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,3 @@
1
+ export declare const DEFAULT_ITEM_TYPE = "text";
2
+ export declare const TYPES_WITH_ICONS: string[];
3
+ export declare const ICON_MAP: Record<(typeof TYPES_WITH_ICONS)[number], JSX.Element>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { VarTypeBooleanM, VarTypeDateM, VarTypeListM, VarTypeNumberM, VarTypeStringM } from '@synerise/ds-icon';
3
+ export var DEFAULT_ITEM_TYPE = 'text';
4
+ export var TYPES_WITH_ICONS = ['text', 'number', 'date', 'boolean', 'list'];
5
+ export var ICON_MAP = {
6
+ text: /*#__PURE__*/React.createElement(VarTypeStringM, null),
7
+ number: /*#__PURE__*/React.createElement(VarTypeNumberM, null),
8
+ date: /*#__PURE__*/React.createElement(VarTypeDateM, null),
9
+ "boolean": /*#__PURE__*/React.createElement(VarTypeBooleanM, null),
10
+ list: /*#__PURE__*/React.createElement(VarTypeListM, null)
11
+ };
@@ -3,19 +3,12 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useMemo } from 'react';
5
5
  import { useTheme } from '@synerise/ds-core';
6
- import Icon, { DragHandleM, VarTypeBooleanM, VarTypeDateM, VarTypeListM, VarTypeNumberM, VarTypeStringM } from '@synerise/ds-icon';
6
+ import Icon, { DragHandleM } from '@synerise/ds-icon';
7
7
  import { RawSwitch } from '@synerise/ds-switch';
8
8
  import Tooltip from '@synerise/ds-tooltip';
9
9
  import { escapeRegEx } from '@synerise/ds-utils';
10
+ import { DEFAULT_ITEM_TYPE, ICON_MAP, TYPES_WITH_ICONS } from './ColumnManagerItem.const';
10
11
  import * as S from './ColumnManagerItem.styles';
11
- var DEFAULT_TYPE = 'text';
12
- var typeIcon = {
13
- text: /*#__PURE__*/React.createElement(VarTypeStringM, null),
14
- number: /*#__PURE__*/React.createElement(VarTypeNumberM, null),
15
- date: /*#__PURE__*/React.createElement(VarTypeDateM, null),
16
- "boolean": /*#__PURE__*/React.createElement(VarTypeBooleanM, null),
17
- list: /*#__PURE__*/React.createElement(VarTypeListM, null)
18
- };
19
12
  export var ColumnManagerItem = function ColumnManagerItem(_ref) {
20
13
  var item = _ref.item,
21
14
  switchAction = _ref.switchAction,
@@ -27,6 +20,7 @@ export var ColumnManagerItem = function ColumnManagerItem(_ref) {
27
20
  isDragged = _ref.isDragged,
28
21
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
29
22
  var theme = useTheme();
23
+ var iconComponent = ICON_MAP[item.type && TYPES_WITH_ICONS.includes(item.type) ? item.type : DEFAULT_ITEM_TYPE];
30
24
  var columnName = useMemo(function () {
31
25
  if (searchQuery) {
32
26
  var escapedQuery = escapeRegEx(searchQuery);
@@ -45,7 +39,7 @@ export var ColumnManagerItem = function ColumnManagerItem(_ref) {
45
39
  component: /*#__PURE__*/React.createElement(DragHandleM, null),
46
40
  color: theme.palette['grey-400']
47
41
  }, dragHandleProps == null ? void 0 : dragHandleProps.attributes, dragHandleProps == null ? void 0 : dragHandleProps.listeners)), /*#__PURE__*/React.createElement(Icon, {
48
- component: typeIcon[item.type || DEFAULT_TYPE],
42
+ component: iconComponent,
49
43
  color: theme.palette['grey-600']
50
44
  }), /*#__PURE__*/React.createElement(S.ColumnManagerItemName, {
51
45
  dangerouslySetInnerHTML: {
@@ -1,12 +1,11 @@
1
- /// <reference types="react" />
2
1
  import Menu from '@synerise/ds-menu';
3
- export declare const DragHandler: import("styled-components").StyledComponent<({ name, component, className, ...rest }: import("@synerise/ds-icon").IconProps) => import("react").JSX.Element, any, {}, never>;
2
+ export declare const DragHandler: import("styled-components").StyledComponent<({ name, component, className, ...rest }: import("@synerise/ds-icon").IconProps) => React.JSX.Element, any, {}, never>;
4
3
  export declare const Icons: import("styled-components").StyledComponent<"div", any, {}, never>;
5
4
  export declare const ItemPart: import("styled-components").StyledComponent<"div", any, {
6
5
  align: string;
7
6
  }, never>;
8
7
  export declare const ColumnManagerItem: import("styled-components").StyledComponent<"div", any, {
9
- isDragged?: boolean | undefined;
8
+ isDragged?: boolean;
10
9
  }, never>;
11
10
  export declare const ColumnManagerItemName: import("styled-components").StyledComponent<"span", any, {}, never>;
12
11
  export declare const FixedMenu: import("styled-components").StyledComponent<typeof Menu, any, {}, never>;
@@ -2,6 +2,6 @@ import { FixedSizeList } from 'react-window';
2
2
  export declare const ColumnManagerList: import("styled-components").StyledComponent<"div", any, {}, never>;
3
3
  export declare const ListHeadline: import("styled-components").StyledComponent<"span", any, {}, never>;
4
4
  export declare const List: import("styled-components").StyledComponent<typeof FixedSizeList, any, {
5
- maxHeight?: number | undefined;
6
- isDragging?: boolean | undefined;
5
+ maxHeight?: number;
6
+ isDragging?: boolean;
7
7
  }, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-column-manager",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "ColumnManager UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -31,18 +31,18 @@
31
31
  "sideEffects": false,
32
32
  "types": "dist/index.d.ts",
33
33
  "dependencies": {
34
- "@synerise/ds-button": "^1.4.5",
35
- "@synerise/ds-drawer": "^1.0.6",
36
- "@synerise/ds-icon": "^1.6.1",
37
- "@synerise/ds-menu": "^1.0.17",
38
- "@synerise/ds-result": "^1.0.17",
39
- "@synerise/ds-scrollbar": "^1.1.4",
40
- "@synerise/ds-search-bar": "^1.3.7",
41
- "@synerise/ds-sortable": "^1.3.2",
42
- "@synerise/ds-switch": "^1.1.11",
43
- "@synerise/ds-tooltip": "^1.1.14",
44
- "@synerise/ds-typography": "^1.0.16",
45
- "@synerise/ds-utils": "^1.3.1",
34
+ "@synerise/ds-button": "^1.4.6",
35
+ "@synerise/ds-drawer": "^1.0.7",
36
+ "@synerise/ds-icon": "^1.6.2",
37
+ "@synerise/ds-menu": "^1.0.18",
38
+ "@synerise/ds-result": "^1.0.19",
39
+ "@synerise/ds-scrollbar": "^1.1.5",
40
+ "@synerise/ds-search-bar": "^1.3.8",
41
+ "@synerise/ds-sortable": "^1.3.3",
42
+ "@synerise/ds-switch": "^1.1.12",
43
+ "@synerise/ds-tooltip": "^1.1.15",
44
+ "@synerise/ds-typography": "^1.0.17",
45
+ "@synerise/ds-utils": "^1.4.0",
46
46
  "react-window": "1.8.5"
47
47
  },
48
48
  "peerDependencies": {
@@ -52,5 +52,5 @@
52
52
  "react-intl": ">=3.12.0 <= 6.8",
53
53
  "styled-components": "^5.3.3"
54
54
  },
55
- "gitHead": "4e851d649cb25346f2f8e0575dde91cc50f43bc4"
55
+ "gitHead": "e57b766f264575efe046c96200e81a8ccd0c3128"
56
56
  }