@synerise/ds-manageable-list 1.3.21 → 1.3.22

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,14 @@
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.3.22](https://github.com/Synerise/synerise-design/compare/@synerise/ds-manageable-list@1.3.21...@synerise/ds-manageable-list@1.3.22) (2025-09-16)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-manageable-list
9
+
10
+
11
+
12
+
13
+
6
14
  ## [1.3.21](https://github.com/Synerise/synerise-design/compare/@synerise/ds-manageable-list@1.3.20...@synerise/ds-manageable-list@1.3.21) (2025-09-05)
7
15
 
8
16
 
@@ -1,7 +1,6 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
2
  import type { WithHTMLAttributes } from '@synerise/ds-utils';
3
- import type { Texts } from '../../ManageableList.types';
4
- import type { ItemProps } from '../Item.types';
3
+ import type { ItemProps, Texts } from '../../ManageableList.types';
5
4
  export type BlankItemBaseProps<T extends object> = Pick<ItemProps<T>, 'id' | 'name'>;
6
5
  export type BaseBlankItemProps<T extends object> = {
7
6
  texts?: Partial<Texts>;
@@ -1,7 +1,6 @@
1
1
  import { type HTMLAttributes, type ReactNode, type ReactText } from 'react';
2
2
  import type { WithHTMLAttributes } from '@synerise/ds-utils';
3
- import { type Texts } from '../../ManageableList.types';
4
- import { type ItemProps } from '../Item.types';
3
+ import { type ItemProps, type Texts } from '../../ManageableList.types';
5
4
  type BaseContentItemProps = Omit<ContentItemHeaderProps, 'texts' | 'isExpanded' | 'setIsExpanded'> & {
6
5
  dashed?: boolean;
7
6
  expanded?: boolean;
@@ -1,6 +1,6 @@
1
1
  import type React from 'react';
2
- import { type ItemProps } from '../Item.types';
3
- export interface FilterItemProps {
2
+ import { type ItemProps } from '../../ManageableList.types';
3
+ export type FilterItemProps = {
4
4
  item: ItemProps;
5
5
  greyBackground?: boolean;
6
6
  onRemove?: (removeParams: {
@@ -25,4 +25,4 @@ export interface FilterItemProps {
25
25
  };
26
26
  searchQuery?: string;
27
27
  style?: React.CSSProperties;
28
- }
28
+ };
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { type Props } from './Item.types';
3
- declare const Item: ({ item, onRemove, onSelect, onUpdate, listType, onDuplicate, greyBackground, draggable, changeOrderDisabled, selected, texts, searchQuery, hideExpander, expanded, onExpand, onMoveBottom, onMoveTop, isFirst, isLast, additionalActions, isDragPlaceholder, isDragOverlay, dragHandleProps, renderItem, }: Props) => React.JSX.Element;
2
+ import { type ManageableListItemProps } from '../ManageableList.types';
3
+ declare const Item: ({ item, onRemove, onSelect, onUpdate, listType, onDuplicate, greyBackground, draggable, changeOrderDisabled, selected, texts, searchQuery, hideExpander, expanded, onExpand, onMoveBottom, onMoveTop, isFirst, isLast, additionalActions, isDragPlaceholder, isDragOverlay, dragHandleProps, renderItem, }: ManageableListItemProps) => React.JSX.Element;
4
4
  export default Item;
@@ -1,86 +1,3 @@
1
- import type { HTMLAttributes, ReactElement, ReactNode, ReactText } from 'react';
2
- import type { AdditionalAction, Texts } from '../ManageableList.types';
3
- export type Props = {
4
- item: ItemProps;
5
- isFirst?: boolean;
6
- isLast?: boolean;
7
- renderItem: (item: ItemProps) => ReactNode;
8
- onMoveTop?: (item: ItemProps) => void;
9
- onMoveBottom?: (item: ItemProps) => void;
10
- onRemove?: (removeParams: {
11
- id: ReactText;
12
- }) => void;
13
- onSelect: (selectParams: {
14
- id: ReactText;
15
- }) => void;
16
- onUpdate?: (updateParams: {
17
- id: ReactText;
18
- name: string;
19
- }) => void;
20
- onDuplicate?: (duplicateParams: {
21
- id: ReactText;
22
- }) => void;
23
- draggable?: boolean;
24
- changeOrderDisabled?: boolean;
25
- greyBackground?: boolean;
26
- listType: string;
27
- selected: boolean;
28
- searchQuery?: string;
29
- texts: Texts;
30
- onExpand?: (id: ReactText, isExpanded: boolean) => void;
31
- hideExpander?: boolean;
32
- expanded?: boolean;
33
- additionalActions?: AdditionalAction[];
34
- isDragPlaceholder?: boolean;
35
- isDragOverlay?: boolean;
36
- dragHandleProps?: HTMLAttributes<HTMLDivElement>;
37
- };
38
- export type ItemProps<T extends object = object> = T & {
39
- id: ReactText;
40
- canUpdate?: boolean;
41
- canDelete?: boolean;
42
- canDuplicate?: boolean;
43
- name: string;
44
- nameWrapperClassNames?: string[];
45
- description?: string;
46
- /**
47
- * @description render a tag as item prefix
48
- */
49
- tag?: ReactElement;
50
- /**
51
- * @description render an icon as item prefix
52
- */
53
- icon?: ReactNode;
54
- /**
55
- * @description rendered only in content-large item type
56
- */
57
- tags?: ReactNode;
58
- /**
59
- * @description rendered only in content-large item type
60
- */
61
- headerPrefix?: ReactNode;
62
- content?: ReactNode;
63
- uniqueKey?: ReactNode;
64
- changeOrderDisabled?: boolean;
65
- user?: {
66
- avatar_url?: string;
67
- firstname?: string;
68
- lastname?: string;
69
- email?: string;
70
- };
71
- created?: string;
72
- dropdown?: ReactElement;
73
- /**
74
- * @description disables expanding item on click - will always show entire content without expanding
75
- */
76
- disableExpanding?: boolean;
77
- /**
78
- * @description disables header click to expand/collapse item
79
- */
80
- disableHeaderClick?: boolean;
81
- expanded?: boolean;
82
- disabled?: boolean;
83
- headerSuffix?: ReactNode;
84
- hideHeaderSuffixOnHover?: boolean;
85
- additionalSuffix?: ReactNode;
86
- };
1
+ import type { ManageableListItemProps } from '../ManageableList.types';
2
+ /** @deprecated - import ManageableListItemProps from package index instead */
3
+ export type Props = ManageableListItemProps;
@@ -1,6 +1,5 @@
1
1
  import type React from 'react';
2
- import { type AdditionalAction } from '../../ManageableList.types';
3
- import { type ItemProps } from '../Item.types';
2
+ import { type AdditionalAction, type ItemProps } from '../../ManageableList.types';
4
3
  export type ItemActionsProps = {
5
4
  item: ItemProps;
6
5
  removeAction?: (removeParams: {
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
- import { type ItemProps } from '../Item.types';
2
+ import { type ItemProps } from '../../ManageableList.types';
3
3
  export type ItemLabelProps = {
4
4
  item: ItemProps;
5
5
  onUpdate?: (updateParams: {
@@ -1,4 +1,4 @@
1
- import type { ItemProps } from '../Item.types';
1
+ import type { ItemProps } from '../../ManageableList.types';
2
2
  export type ItemNameLargeProps = {
3
3
  item: ItemProps;
4
4
  };
@@ -1,6 +1,5 @@
1
1
  import type { ReactText } from 'react';
2
- import { type AdditionalAction, type Texts } from '../../ManageableList.types';
3
- import { type ItemProps } from '../Item.types';
2
+ import { type AdditionalAction, type ItemProps, type Texts } from '../../ManageableList.types';
4
3
  export type Props = {
5
4
  item: ItemProps;
6
5
  onRemove?: (removeParams: {
@@ -1,6 +1,5 @@
1
- import type { CSSProperties, ReactNode, ReactText } from 'react';
1
+ import type { CSSProperties, HTMLAttributes, ReactElement, ReactNode, ReactText } from 'react';
2
2
  import type { ExactlyOne } from '@synerise/ds-utils';
3
- import type { ItemProps } from './Item/Item.types';
4
3
  export declare enum ExpansionBehaviour {
5
4
  DEFAULT = "default",
6
5
  ACCORDION = "accordion",
@@ -93,3 +92,87 @@ export type Texts = {
93
92
  moveToTopTooltip: ReactNode;
94
93
  moveToBottomTooltip: ReactNode;
95
94
  };
95
+ export type ManageableListItemProps = {
96
+ item: ItemProps;
97
+ isFirst?: boolean;
98
+ isLast?: boolean;
99
+ renderItem: (item: ItemProps) => ReactNode;
100
+ onMoveTop?: (item: ItemProps) => void;
101
+ onMoveBottom?: (item: ItemProps) => void;
102
+ onRemove?: (removeParams: {
103
+ id: ReactText;
104
+ }) => void;
105
+ onSelect: (selectParams: {
106
+ id: ReactText;
107
+ }) => void;
108
+ onUpdate?: (updateParams: {
109
+ id: ReactText;
110
+ name: string;
111
+ }) => void;
112
+ onDuplicate?: (duplicateParams: {
113
+ id: ReactText;
114
+ }) => void;
115
+ draggable?: boolean;
116
+ changeOrderDisabled?: boolean;
117
+ greyBackground?: boolean;
118
+ listType: string;
119
+ selected: boolean;
120
+ searchQuery?: string;
121
+ texts: Texts;
122
+ onExpand?: (id: ReactText, isExpanded: boolean) => void;
123
+ hideExpander?: boolean;
124
+ expanded?: boolean;
125
+ additionalActions?: AdditionalAction[];
126
+ isDragPlaceholder?: boolean;
127
+ isDragOverlay?: boolean;
128
+ dragHandleProps?: HTMLAttributes<HTMLDivElement>;
129
+ };
130
+ export type ItemProps<T extends object = object> = T & {
131
+ id: ReactText;
132
+ canUpdate?: boolean;
133
+ canDelete?: boolean;
134
+ canDuplicate?: boolean;
135
+ name: string;
136
+ nameWrapperClassNames?: string[];
137
+ description?: string;
138
+ /**
139
+ * @description render a tag as item prefix
140
+ */
141
+ tag?: ReactElement;
142
+ /**
143
+ * @description render an icon as item prefix
144
+ */
145
+ icon?: ReactNode;
146
+ /**
147
+ * @description rendered only in content-large item type
148
+ */
149
+ tags?: ReactNode;
150
+ /**
151
+ * @description rendered only in content-large item type
152
+ */
153
+ headerPrefix?: ReactNode;
154
+ content?: ReactNode;
155
+ uniqueKey?: ReactNode;
156
+ changeOrderDisabled?: boolean;
157
+ user?: {
158
+ avatar_url?: string;
159
+ firstname?: string;
160
+ lastname?: string;
161
+ email?: string;
162
+ };
163
+ created?: string;
164
+ dropdown?: ReactElement;
165
+ /**
166
+ * @description disables expanding item on click - will always show entire content without expanding
167
+ */
168
+ disableExpanding?: boolean;
169
+ /**
170
+ * @description disables header click to expand/collapse item
171
+ */
172
+ disableHeaderClick?: boolean;
173
+ expanded?: boolean;
174
+ disabled?: boolean;
175
+ headerSuffix?: ReactNode;
176
+ hideHeaderSuffixOnHover?: boolean;
177
+ additionalSuffix?: ReactNode;
178
+ };
package/dist/index.d.ts CHANGED
@@ -3,6 +3,5 @@ export { default as ContentItem } from './Item/ContentItem/ContentItem';
3
3
  export { default as FilterItem } from './Item/FilterItem/FilterItem';
4
4
  export { default as SimpleItem } from './Item/SimpleItem/SimpleItem';
5
5
  export { default as AddItem } from './AddItem/AddItem';
6
- export type { ItemProps } from './Item/Item.types';
7
- export type { ManageableListProps } from './ManageableList.types';
6
+ export type { ManageableListProps, ItemProps, ManageableListItemProps, } from './ManageableList.types';
8
7
  export type { AddItemProps } from './AddItem/AddItem.types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-manageable-list",
3
- "version": "1.3.21",
3
+ "version": "1.3.22",
4
4
  "description": "ManageableList UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -26,6 +26,7 @@
26
26
  "test": "jest",
27
27
  "test:watch": "npm run test -- --watchAll",
28
28
  "types": "tsc --noEmit",
29
+ "check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
29
30
  "upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
30
31
  },
31
32
  "sideEffects": [
@@ -34,23 +35,23 @@
34
35
  ],
35
36
  "types": "dist/index.d.ts",
36
37
  "dependencies": {
37
- "@synerise/ds-avatar": "^1.0.20",
38
- "@synerise/ds-button": "^1.4.9",
39
- "@synerise/ds-divider": "^1.0.19",
40
- "@synerise/ds-dropdown": "^1.0.21",
41
- "@synerise/ds-icon": "^1.7.1",
42
- "@synerise/ds-inline-edit": "^1.0.25",
43
- "@synerise/ds-input": "^1.3.8",
44
- "@synerise/ds-list": "^1.0.20",
45
- "@synerise/ds-menu": "^1.0.21",
46
- "@synerise/ds-modal": "^1.2.9",
47
- "@synerise/ds-popconfirm": "^1.0.21",
48
- "@synerise/ds-result": "^1.0.22",
49
- "@synerise/ds-sortable": "^1.3.4",
50
- "@synerise/ds-tag": "^1.1.17",
51
- "@synerise/ds-tooltip": "^1.1.17",
52
- "@synerise/ds-typography": "^1.0.19",
53
- "@synerise/ds-utils": "^1.4.1",
38
+ "@synerise/ds-avatar": "^1.0.21",
39
+ "@synerise/ds-button": "^1.4.10",
40
+ "@synerise/ds-divider": "^1.0.20",
41
+ "@synerise/ds-dropdown": "^1.0.22",
42
+ "@synerise/ds-icon": "^1.7.2",
43
+ "@synerise/ds-inline-edit": "^1.0.26",
44
+ "@synerise/ds-input": "^1.3.9",
45
+ "@synerise/ds-list": "^1.0.21",
46
+ "@synerise/ds-menu": "^1.0.22",
47
+ "@synerise/ds-modal": "^1.2.10",
48
+ "@synerise/ds-popconfirm": "^1.0.22",
49
+ "@synerise/ds-result": "^1.0.23",
50
+ "@synerise/ds-sortable": "^1.3.5",
51
+ "@synerise/ds-tag": "^1.1.18",
52
+ "@synerise/ds-tooltip": "^1.1.18",
53
+ "@synerise/ds-typography": "^1.0.20",
54
+ "@synerise/ds-utils": "^1.4.2",
54
55
  "moment": "^2.30.1",
55
56
  "react-animate-height": "^2.0.23"
56
57
  },
@@ -61,5 +62,5 @@
61
62
  "react-intl": ">=3.12.0 <= 6.8",
62
63
  "styled-components": "^5.3.3"
63
64
  },
64
- "gitHead": "7f119fa17e645f1d800aea95c313fe22f348439c"
65
+ "gitHead": "5beb6ab5f2d77b9e98e04caab7dff20b8436078b"
65
66
  }