@synerise/ds-manageable-list 0.29.0 → 0.29.2

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,27 @@
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
+ ## [0.29.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-manageable-list@0.29.1...@synerise/ds-manageable-list@0.29.2) (2024-11-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **core:** onError fn types ([c34bdfe](https://github.com/Synerise/synerise-design/commit/c34bdfe9da898d7999c605f9fbcbba4716dfb6d4))
12
+ * **manageable-list:** fixed fallback value ([733868e](https://github.com/Synerise/synerise-design/commit/733868ebcbafee8531d43d39e9d5cb732c0b8874))
13
+ * fixed types with htmlattributes ([7e84ba3](https://github.com/Synerise/synerise-design/commit/7e84ba316db9abee7bf16a46fa6b15ea76337cf4))
14
+
15
+
16
+
17
+
18
+
19
+ ## [0.29.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-manageable-list@0.29.0...@synerise/ds-manageable-list@0.29.1) (2024-11-12)
20
+
21
+ **Note:** Version bump only for package @synerise/ds-manageable-list
22
+
23
+
24
+
25
+
26
+
6
27
  # [0.29.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-manageable-list@0.28.5...@synerise/ds-manageable-list@0.29.0) (2024-11-12)
7
28
 
8
29
 
@@ -11,7 +11,7 @@ declare const ContentItem: React.ForwardRefExoticComponent<{
11
11
  accessKey?: string | undefined;
12
12
  autoFocus?: boolean | undefined;
13
13
  className?: string | undefined;
14
- contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
14
+ contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
15
15
  contextMenu?: string | undefined;
16
16
  dir?: string | undefined;
17
17
  draggable?: boolean | undefined;
@@ -52,7 +52,7 @@ declare const ContentItem: React.ForwardRefExoticComponent<{
52
52
  is?: string | undefined;
53
53
  "aria-activedescendant"?: string | undefined;
54
54
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
55
- "aria-autocomplete"?: "none" | "list" | "inline" | "both" | undefined;
55
+ "aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
56
56
  "aria-busy"?: (boolean | "true" | "false") | undefined;
57
57
  "aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
58
58
  "aria-colcount"?: number | undefined;
@@ -293,22 +293,22 @@ declare const ContentItem: React.ForwardRefExoticComponent<{
293
293
  id: React.ReactText;
294
294
  name: string;
295
295
  }) => void) | undefined;
296
+ changeOrderDisabled?: boolean | undefined;
296
297
  dashed?: boolean | undefined;
297
- onRemove?: ((removeParams: {
298
+ expanded?: boolean | undefined;
299
+ headerPrefix?: React.ReactNode;
300
+ headerSuffix?: React.ReactNode;
301
+ hideExpander?: boolean | undefined;
302
+ onDuplicate?: ((duplicateParams: {
298
303
  id: React.ReactText;
299
304
  }) => void) | undefined;
300
- onDuplicate?: ((duplicateParams: {
305
+ onExpand?: ((id: React.ReactText, isExpanded: boolean) => void) | undefined;
306
+ onRemove?: ((removeParams: {
301
307
  id: React.ReactText;
302
308
  }) => void) | undefined;
303
- changeOrderDisabled?: boolean | undefined;
304
309
  texts?: {
305
310
  [k: string]: React.ReactNode;
306
311
  } | undefined;
307
- hideExpander?: boolean | undefined;
308
- expanded?: boolean | undefined;
309
- onExpand?: ((id: React.ReactText, isExpanded: boolean) => void) | undefined;
310
- headerSuffix?: React.ReactNode;
311
- headerPrefix?: React.ReactNode;
312
312
  contentWithoutPadding?: boolean | undefined;
313
313
  onMoveTop?: ((item: {
314
314
  id: React.ReactText;
@@ -1,6 +1,6 @@
1
1
  var _excluded = ["onRemove", "onUpdate", "onDuplicate", "draggable", "dashed", "item", "greyBackground", "changeOrderDisabled", "theme", "texts", "hideExpander", "expanded", "onExpand", "headerSuffix", "headerPrefix", "contentWithoutPadding", "onMoveTop", "onMoveBottom", "isFirst", "isLast"];
2
2
 
3
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
5
5
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
6
 
@@ -1,28 +1,29 @@
1
- import React from 'react';
2
- import { ItemProps } from '../Item.types';
3
- export type ContentItemProps = {
1
+ import type { ReactText, ReactNode } from 'react';
2
+ import type { WithHTMLAttributes } from '@synerise/ds-utils';
3
+ import type { ItemProps } from '../Item.types';
4
+ export type ContentItemProps = WithHTMLAttributes<HTMLDivElement, {
4
5
  changeOrderDisabled?: boolean;
5
6
  dashed?: boolean;
6
7
  draggable?: boolean;
7
8
  expanded?: boolean;
8
9
  greyBackground?: boolean;
9
- headerPrefix?: React.ReactNode;
10
- headerSuffix?: React.ReactNode;
10
+ headerPrefix?: ReactNode;
11
+ headerSuffix?: ReactNode;
11
12
  hideExpander?: boolean;
12
13
  item: ItemProps;
13
14
  onDuplicate?: (duplicateParams: {
14
- id: React.ReactText;
15
+ id: ReactText;
15
16
  }) => void;
16
- onExpand?: (id: React.ReactText, isExpanded: boolean) => void;
17
+ onExpand?: (id: ReactText, isExpanded: boolean) => void;
17
18
  onRemove?: (removeParams: {
18
- id: React.ReactText;
19
+ id: ReactText;
19
20
  }) => void;
20
21
  onUpdate?: (updateParams: {
21
- id: React.ReactText;
22
+ id: ReactText;
22
23
  name: string;
23
24
  }) => void;
24
25
  texts?: {
25
- [k: string]: string | React.ReactNode;
26
+ [k: string]: ReactNode;
26
27
  };
27
28
  theme: {
28
29
  [k: string]: string;
@@ -32,4 +33,4 @@ export type ContentItemProps = {
32
33
  onMoveBottom?: (item: ItemProps) => void;
33
34
  isFirst?: boolean;
34
35
  isLast?: boolean;
35
- } & React.HTMLAttributes<HTMLDivElement>;
36
+ }>;
@@ -37,10 +37,10 @@ declare const FilterItem: React.ForwardRefExoticComponent<{
37
37
  name: string;
38
38
  }) => void) | undefined;
39
39
  searchQuery?: string | undefined;
40
- onRemove?: ((removeParams: {
40
+ onDuplicate?: ((duplicateParams: {
41
41
  id: React.ReactText;
42
42
  }) => void) | undefined;
43
- onDuplicate?: ((duplicateParams: {
43
+ onRemove?: ((removeParams: {
44
44
  id: React.ReactText;
45
45
  }) => void) | undefined;
46
46
  texts: {
@@ -7,6 +7,6 @@ declare const SimpleItem: (({ item, onRemove, onSelect, onUpdate, texts, additio
7
7
  ItemLabelWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
8
8
  ItemLabelWithIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
9
9
  ItemLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
10
- DescriptionIcon: import("styled-components").StyledComponent<React.FC<import("@synerise/ds-icon").IconProps>, any, {}, never>;
10
+ DescriptionIcon: import("styled-components").StyledComponent<({ name, component, className, ...rest }: import("@synerise/ds-icon").IconProps) => React.JSX.Element, any, {}, never>;
11
11
  };
12
12
  export default SimpleItem;
@@ -4,5 +4,5 @@ export declare const ItemLabelWrapper: import("styled-components").StyledCompone
4
4
  export declare const ItemContainer: import("styled-components").StyledComponent<"div", any, {
5
5
  isSelected: boolean;
6
6
  }, never>;
7
- export declare const DescriptionIcon: import("styled-components").StyledComponent<import("react").FC<import("@synerise/ds-icon").IconProps>, any, {}, never>;
7
+ export declare const DescriptionIcon: import("styled-components").StyledComponent<({ name, component, className, ...rest }: import("@synerise/ds-icon").IconProps) => import("react").JSX.Element, any, {}, never>;
8
8
  export declare const ItemLabelWithIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -1,10 +1,14 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
2
 
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
4
 
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
6
 
7
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+
9
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
10
+
11
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
12
 
9
13
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
10
14
  import List from '@synerise/ds-list';
@@ -34,10 +38,8 @@ var ManageableListComponent = function ManageableListComponent(_ref) {
34
38
  onItemEdit = _ref.onItemEdit,
35
39
  onChangeOrder = _ref.onChangeOrder,
36
40
  items = _ref.items,
37
- _ref$maxToShowItems = _ref.maxToShowItems,
38
- maxToShowItems = _ref$maxToShowItems === void 0 ? INITIALLY_VISIBLE_COUNT : _ref$maxToShowItems,
39
- _ref$visibleItemsLimi = _ref.visibleItemsLimit,
40
- visibleItemsLimit = _ref$visibleItemsLimi === void 0 ? INITIALLY_VISIBLE_COUNT : _ref$visibleItemsLimi,
41
+ maxToShowItems = _ref.maxToShowItems,
42
+ visibleItemsLimit = _ref.visibleItemsLimit,
41
43
  loading = _ref.loading,
42
44
  _ref$type = _ref.type,
43
45
  type = _ref$type === void 0 ? ListType.DEFAULT : _ref$type,
@@ -64,7 +66,7 @@ var ManageableListComponent = function ManageableListComponent(_ref) {
64
66
  allItemsVisible = _useState[0],
65
67
  setAllItemsVisible = _useState[1];
66
68
 
67
- var visibleLimit = visibleItemsLimit || maxToShowItems;
69
+ var visibleLimit = visibleItemsLimit || maxToShowItems || INITIALLY_VISIBLE_COUNT;
68
70
  var getExpandedIds = useCallback(function () {
69
71
  return expandedIds !== undefined ? expandedIds : items.filter(function (item) {
70
72
  return item.expanded;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-manageable-list",
3
- "version": "0.29.0",
3
+ "version": "0.29.2",
4
4
  "description": "ManageableList UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,24 +34,23 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-avatar": "^0.17.19",
38
- "@synerise/ds-button": "^0.21.17",
39
- "@synerise/ds-dropdown": "^0.18.22",
40
- "@synerise/ds-icon": "^0.66.3",
41
- "@synerise/ds-inline-edit": "^0.8.18",
42
- "@synerise/ds-input": "^0.24.12",
43
- "@synerise/ds-list": "^0.7.4",
44
- "@synerise/ds-menu": "^0.20.4",
45
- "@synerise/ds-modal": "^0.17.49",
46
- "@synerise/ds-popconfirm": "^0.10.58",
47
- "@synerise/ds-result": "^0.7.12",
48
- "@synerise/ds-tags": "^0.10.16",
49
- "@synerise/ds-tooltip": "^0.14.47",
50
- "@synerise/ds-typography": "^0.16.4",
51
- "@synerise/ds-utils": "^0.31.0",
37
+ "@synerise/ds-avatar": "^0.17.21",
38
+ "@synerise/ds-button": "^0.21.19",
39
+ "@synerise/ds-dropdown": "^0.18.24",
40
+ "@synerise/ds-icon": "^0.67.0",
41
+ "@synerise/ds-inline-edit": "^0.9.1",
42
+ "@synerise/ds-input": "^0.24.14",
43
+ "@synerise/ds-list": "^0.7.6",
44
+ "@synerise/ds-menu": "^0.20.6",
45
+ "@synerise/ds-modal": "^0.17.51",
46
+ "@synerise/ds-popconfirm": "^0.10.60",
47
+ "@synerise/ds-result": "^0.7.14",
48
+ "@synerise/ds-tags": "^0.10.18",
49
+ "@synerise/ds-tooltip": "^0.14.49",
50
+ "@synerise/ds-typography": "^0.16.6",
51
+ "@synerise/ds-utils": "^0.31.2",
52
52
  "moment": "^2.30.1",
53
53
  "react-animate-height": "^2.0.23",
54
- "react-intl": "6.8.4",
55
54
  "react-sortablejs": "^6.0.0",
56
55
  "sortablejs": "1.15.1"
57
56
  },
@@ -59,7 +58,8 @@
59
58
  "@synerise/ds-core": "*",
60
59
  "antd": "4.7.0",
61
60
  "react": ">=16.9.0 <= 17.0.2",
61
+ "react-intl": ">=3.12.0 <= 6.8",
62
62
  "styled-components": "^5.0.1"
63
63
  },
64
- "gitHead": "1bb66dcc360a650e81b9bd195d5b77aa8ae2d308"
64
+ "gitHead": "05f083c767e2cec3c2f91c9475aee89852a77d6c"
65
65
  }