@synerise/ds-manageable-list 1.7.11 → 1.7.13

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.
Files changed (82) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/AddBlankItem/AddBlankItem.d.ts +2 -2
  3. package/dist/AddBlankItem/AddBlankItem.js +19 -22
  4. package/dist/AddBlankItem/AddBlankItem.styles.d.ts +2 -2
  5. package/dist/AddBlankItem/AddBlankItem.styles.js +9 -5
  6. package/dist/AddBlankItem/AddBlankItem.types.d.ts +1 -1
  7. package/dist/AddBlankItem/AddBlankItem.types.js +1 -1
  8. package/dist/AddItem/AddItem.d.ts +3 -3
  9. package/dist/AddItem/AddItem.js +14 -18
  10. package/dist/AddItem/AddItem.styles.d.ts +1 -1
  11. package/dist/AddItem/AddItem.styles.js +6 -3
  12. package/dist/AddItem/AddItem.types.d.ts +1 -1
  13. package/dist/AddItem/AddItem.types.js +1 -1
  14. package/dist/AddItemWithName/AddItemWithName.d.ts +2 -2
  15. package/dist/AddItemWithName/AddItemWithName.js +30 -43
  16. package/dist/AddItemWithName/AddItemWithName.styles.d.ts +2 -2
  17. package/dist/AddItemWithName/AddItemWithName.styles.js +9 -5
  18. package/dist/AddItemWithName/AddItemWithName.types.d.ts +1 -1
  19. package/dist/AddItemWithName/AddItemWithName.types.js +1 -1
  20. package/dist/Item/BlankItem/BlankItem.d.ts +2 -2
  21. package/dist/Item/BlankItem/BlankItem.js +43 -61
  22. package/dist/Item/BlankItem/BlankItem.styles.d.ts +4 -4
  23. package/dist/Item/BlankItem/BlankItem.styles.js +26 -21
  24. package/dist/Item/BlankItem/BlankItem.types.d.ts +3 -3
  25. package/dist/Item/BlankItem/BlankItem.types.js +1 -1
  26. package/dist/Item/ContentItem/ContentItem.d.ts +43 -43
  27. package/dist/Item/ContentItem/ContentItem.js +58 -99
  28. package/dist/Item/ContentItem/ContentItem.styles.d.ts +45 -45
  29. package/dist/Item/ContentItem/ContentItem.styles.js +76 -85
  30. package/dist/Item/ContentItem/ContentItem.types.d.ts +4 -4
  31. package/dist/Item/ContentItem/ContentItem.types.js +1 -1
  32. package/dist/Item/ContentItem/ContentItemHeader.d.ts +2 -2
  33. package/dist/Item/ContentItem/ContentItemHeader.js +88 -134
  34. package/dist/Item/DraggableItem.d.ts +2 -2
  35. package/dist/Item/DraggableItem.js +26 -27
  36. package/dist/Item/FilterItem/FilterItem.d.ts +43 -43
  37. package/dist/Item/FilterItem/FilterItem.js +74 -140
  38. package/dist/Item/FilterItem/FilterItem.styles.d.ts +3 -3
  39. package/dist/Item/FilterItem/FilterItem.styles.js +17 -27
  40. package/dist/Item/FilterItem/FilterItem.types.d.ts +2 -2
  41. package/dist/Item/FilterItem/FilterItem.types.js +1 -1
  42. package/dist/Item/Item.d.ts +2 -2
  43. package/dist/Item/Item.js +39 -90
  44. package/dist/Item/Item.styles.d.ts +9 -9
  45. package/dist/Item/Item.styles.js +50 -48
  46. package/dist/Item/Item.types.d.ts +1 -1
  47. package/dist/Item/Item.types.js +1 -1
  48. package/dist/Item/ItemActions/ItemActions.d.ts +2 -2
  49. package/dist/Item/ItemActions/ItemActions.js +41 -43
  50. package/dist/Item/ItemActions/ItemActions.styles.d.ts +1 -1
  51. package/dist/Item/ItemActions/ItemActions.styles.js +9 -7
  52. package/dist/Item/ItemActions/ItemActions.types.d.ts +2 -2
  53. package/dist/Item/ItemActions/ItemActions.types.js +1 -1
  54. package/dist/Item/ItemMeta/ItemMeta.d.ts +2 -2
  55. package/dist/Item/ItemMeta/ItemMeta.js +27 -22
  56. package/dist/Item/ItemMeta/ItemMeta.styles.d.ts +2 -2
  57. package/dist/Item/ItemMeta/ItemMeta.styles.js +9 -7
  58. package/dist/Item/ItemMeta/ItemMeta.types.js +1 -1
  59. package/dist/Item/ItemName/ItemName.d.ts +2 -2
  60. package/dist/Item/ItemName/ItemName.js +36 -55
  61. package/dist/Item/ItemName/ItemName.types.d.ts +2 -2
  62. package/dist/Item/ItemName/ItemName.types.js +1 -1
  63. package/dist/Item/ItemNameLarge/ItemNameLarge.d.ts +2 -2
  64. package/dist/Item/ItemNameLarge/ItemNameLarge.js +17 -13
  65. package/dist/Item/ItemNameLarge/ItemNameLarge.types.d.ts +1 -1
  66. package/dist/Item/ItemNameLarge/ItemNameLarge.types.js +1 -1
  67. package/dist/Item/SimpleItem/SimpleItem.d.ts +7 -7
  68. package/dist/Item/SimpleItem/SimpleItem.js +34 -56
  69. package/dist/Item/SimpleItem/SimpleItem.types.d.ts +2 -2
  70. package/dist/Item/SimpleItem/SimpleItem.types.js +1 -1
  71. package/dist/ManageableList.d.ts +4 -4
  72. package/dist/ManageableList.js +106 -164
  73. package/dist/ManageableList.styles.d.ts +2 -2
  74. package/dist/ManageableList.styles.js +12 -11
  75. package/dist/ManageableList.types.d.ts +2 -2
  76. package/dist/ManageableList.types.js +18 -14
  77. package/dist/hooks/useTexts.d.ts +1 -1
  78. package/dist/hooks/useTexts.js +31 -89
  79. package/dist/index.js +12 -5
  80. package/dist/modules.d.js +1 -1
  81. package/dist/modules.d.ts +0 -0
  82. package/package.json +21 -21
@@ -1,14 +1,14 @@
1
- export declare const ItemLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
2
- export declare const ItemTagList: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const ItemLabelWrapper: import("styled-components").StyledComponent<"div", any, {
1
+ export declare const ItemLabel: import('styled-components').StyledComponent<"span", any, {}, never>;
2
+ export declare const ItemTagList: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const ItemLabelWrapper: import('styled-components').StyledComponent<"div", any, {
4
4
  largeSize?: boolean;
5
5
  }, never>;
6
- export declare const ItemContainer: import("styled-components").StyledComponent<"div", any, {
6
+ export declare const ItemContainer: import('styled-components').StyledComponent<"div", any, {
7
7
  isSelected: boolean;
8
8
  isDisabled: boolean;
9
9
  }, never>;
10
- export declare const DescriptionIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@synerise/ds-icon").BaseIconProps & Omit<import("react").HTMLAttributes<HTMLDivElement>, keyof import("@synerise/ds-icon").BaseIconProps> & import("@synerise/ds-utils").DataAttributes & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
11
- export declare const ItemLabelWithIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
12
- export declare const ItemDescription: import("styled-components").StyledComponent<"div", any, {}, never>;
13
- export declare const ItemUniqueKey: import("styled-components").StyledComponent<"div", any, {}, never>;
14
- export declare const ItemLabelTop: import("styled-components").StyledComponent<"div", any, {}, never>;
10
+ export declare const DescriptionIcon: import('styled-components').StyledComponent<import('react').ForwardRefExoticComponent<import('@synerise/ds-icon').BaseIconProps & Omit<import('react').HTMLAttributes<HTMLDivElement>, keyof import('@synerise/ds-icon').BaseIconProps> & import('@synerise/ds-utils').DataAttributes & import('react').RefAttributes<HTMLDivElement>>, any, {}, never>;
11
+ export declare const ItemLabelWithIcon: import('styled-components').StyledComponent<"span", any, {}, never>;
12
+ export declare const ItemDescription: import('styled-components').StyledComponent<"div", any, {}, never>;
13
+ export declare const ItemUniqueKey: import('styled-components').StyledComponent<"div", any, {}, never>;
14
+ export declare const ItemLabelTop: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,71 +1,73 @@
1
- import styled, { css } from 'styled-components';
2
- import Icon from '@synerise/ds-icon';
3
- import { macro } from '@synerise/ds-typography';
4
- import { ItemActionsWrapper } from './ItemActions/ItemActions.styles';
5
- export var ItemLabel = styled.span.withConfig({
1
+ import styled, { css } from "styled-components";
2
+ import Icon from "@synerise/ds-icon";
3
+ import { macro } from "@synerise/ds-typography";
4
+ import { ItemActionsWrapper } from "./ItemActions/ItemActions.styles.js";
5
+ const ItemLabel = /* @__PURE__ */ styled.span.withConfig({
6
6
  displayName: "Itemstyles__ItemLabel",
7
7
  componentId: "sc-1an9szf-0"
8
- })(["", ";color:", ";height:24px;display:inline-block;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:24px;user-select:none;flex-shrink:0;max-width:100%;&.full-width{max-width:unset;}.search-highlight{font-weight:500;color:", ";}"], macro.h300, function (_ref) {
9
- var theme = _ref.theme;
10
- return theme.palette['grey-600'];
11
- }, function (props) {
12
- return props.theme.palette['grey-800'];
13
- });
14
- export var ItemTagList = styled.div.withConfig({
8
+ })(["", ";color:", ";height:24px;display:inline-block;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:24px;user-select:none;flex-shrink:0;max-width:100%;&.full-width{max-width:unset;}.search-highlight{font-weight:500;color:", ";}"], macro.h300, ({
9
+ theme
10
+ }) => theme.palette["grey-600"], (props) => props.theme.palette["grey-800"]);
11
+ const ItemTagList = /* @__PURE__ */ styled.div.withConfig({
15
12
  displayName: "Itemstyles__ItemTagList",
16
13
  componentId: "sc-1an9szf-1"
17
14
  })(["margin-left:8px;max-width:100%;overflow:hidden;position:relative;flex-grow:1;&:after{content:'';position:absolute;right:0;top:0;bottom:0;width:20px;background:linear-gradient( 90deg,rgba(0,0,0,0) 0%,rgba(255,255,255,1) 100% );}"]);
18
- export var ItemLabelWrapper = styled.div.withConfig({
15
+ const ItemLabelWrapper = /* @__PURE__ */ styled.div.withConfig({
19
16
  displayName: "Itemstyles__ItemLabelWrapper",
20
17
  componentId: "sc-1an9szf-2"
21
- })(["flex:1;display:flex;flex-grow:1;min-width:0;.ant-tooltip-inner{max-width:164px;padding:16px 16px 19px;}", ""], function (props) {
22
- return props.largeSize ? css(["flex-direction:column;gap:10px;overflow-y:visible;", "{margin-left:24px;}"], ItemTagList) : css(["flex-direction:row;align-items:center;overflow:hidden;height:24px;justify-content:flex-start;"]);
23
- });
24
- export var ItemContainer = styled.div.withConfig({
18
+ })(["flex:1;display:flex;flex-grow:1;min-width:0;.ant-tooltip-inner{max-width:164px;padding:16px 16px 19px;}", ""], (props) => props.largeSize ? css(["flex-direction:column;gap:10px;overflow-y:visible;", "{margin-left:24px;}"], ItemTagList) : css(["flex-direction:row;align-items:center;overflow:hidden;height:24px;justify-content:flex-start;"]));
19
+ const ItemContainer = /* @__PURE__ */ styled.div.withConfig({
25
20
  displayName: "Itemstyles__ItemContainer",
26
21
  componentId: "sc-1an9szf-3"
27
- })(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:stretch;", " background-color:", ";li{width:100%;.title{color:", ";}& > div{height:24px;&:nth-child(2){overflow:hidden;}}}.ds-manageable-list-item-icon{svg{color:", ";fill:", ";}}&:hover{", "{display:flex;}.ds-manageable-list-item-icon{svg{color:", ";fill:", ";}}}"], function (props) {
28
- return props.isDisabled && "\n opacity: 0.4;\n cursor: default;\n pointer-events: none;\n ";
29
- }, function (_ref2) {
30
- var theme = _ref2.theme,
31
- isSelected = _ref2.isSelected;
32
- return isSelected ? theme.palette['blue-050'] : theme.palette.white;
33
- }, function (_ref3) {
34
- var theme = _ref3.theme,
35
- isSelected = _ref3.isSelected;
36
- return isSelected ? theme.palette['blue-600'] : theme.palette['grey-600'];
37
- }, function (_ref4) {
38
- var theme = _ref4.theme,
39
- isSelected = _ref4.isSelected;
40
- return isSelected ? theme.palette['blue-600'] : theme.palette['grey-600'];
41
- }, function (_ref5) {
42
- var theme = _ref5.theme,
43
- isSelected = _ref5.isSelected;
44
- return isSelected ? theme.palette['blue-600'] : theme.palette['grey-600'];
45
- }, ItemActionsWrapper, function (_ref6) {
46
- var theme = _ref6.theme;
47
- return theme.palette['blue-600'];
48
- }, function (_ref7) {
49
- var theme = _ref7.theme;
50
- return theme.palette['blue-600'];
51
- });
52
- export var DescriptionIcon = styled(Icon).withConfig({
22
+ })(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:stretch;", " background-color:", ";li{width:100%;.title{color:", ";}& > div{height:24px;&:nth-child(2){overflow:hidden;}}}.ds-manageable-list-item-icon{svg{color:", ";fill:", ";}}&:hover{", "{display:flex;}.ds-manageable-list-item-icon{svg{color:", ";fill:", ";}}}"], (props) => props.isDisabled && `
23
+ opacity: 0.4;
24
+ cursor: default;
25
+ pointer-events: none;
26
+ `, ({
27
+ theme,
28
+ isSelected
29
+ }) => isSelected ? theme.palette["blue-050"] : theme.palette.white, ({
30
+ theme,
31
+ isSelected
32
+ }) => isSelected ? theme.palette["blue-600"] : theme.palette["grey-600"], ({
33
+ theme,
34
+ isSelected
35
+ }) => isSelected ? theme.palette["blue-600"] : theme.palette["grey-600"], ({
36
+ theme,
37
+ isSelected
38
+ }) => isSelected ? theme.palette["blue-600"] : theme.palette["grey-600"], ItemActionsWrapper, ({
39
+ theme
40
+ }) => theme.palette["blue-600"], ({
41
+ theme
42
+ }) => theme.palette["blue-600"]);
43
+ const DescriptionIcon = /* @__PURE__ */ styled(Icon).withConfig({
53
44
  displayName: "Itemstyles__DescriptionIcon",
54
45
  componentId: "sc-1an9szf-4"
55
46
  })(["margin-left:2px;"]);
56
- export var ItemLabelWithIcon = styled.span.withConfig({
47
+ const ItemLabelWithIcon = /* @__PURE__ */ styled.span.withConfig({
57
48
  displayName: "Itemstyles__ItemLabelWithIcon",
58
49
  componentId: "sc-1an9szf-5"
59
50
  })(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex-grow:1;"]);
60
- export var ItemDescription = styled.div.withConfig({
51
+ const ItemDescription = /* @__PURE__ */ styled.div.withConfig({
61
52
  displayName: "Itemstyles__ItemDescription",
62
53
  componentId: "sc-1an9szf-6"
63
54
  })(["overflow-wrap:break-word;min-width:0;"]);
64
- export var ItemUniqueKey = styled.div.withConfig({
55
+ const ItemUniqueKey = /* @__PURE__ */ styled.div.withConfig({
65
56
  displayName: "Itemstyles__ItemUniqueKey",
66
57
  componentId: "sc-1an9szf-7"
67
58
  })([""]);
68
- export var ItemLabelTop = styled.div.withConfig({
59
+ const ItemLabelTop = /* @__PURE__ */ styled.div.withConfig({
69
60
  displayName: "Itemstyles__ItemLabelTop",
70
61
  componentId: "sc-1an9szf-8"
71
- })(["display:flex;line-height:12px;height:12px;align-items:center;gap:8px;"]);
62
+ })(["display:flex;line-height:12px;height:12px;align-items:center;gap:8px;"]);
63
+ export {
64
+ DescriptionIcon,
65
+ ItemContainer,
66
+ ItemDescription,
67
+ ItemLabel,
68
+ ItemLabelTop,
69
+ ItemLabelWithIcon,
70
+ ItemLabelWrapper,
71
+ ItemTagList,
72
+ ItemUniqueKey
73
+ };
@@ -1,3 +1,3 @@
1
- import type { ManageableListItemProps } from '../ManageableList.types';
1
+ import { ManageableListItemProps } from '../ManageableList.types';
2
2
  /** @deprecated - import ManageableListItemProps from package index instead */
3
3
  export type Props = ManageableListItemProps;
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type ItemActionsProps } from './ItemActions.types';
1
+ import { default as React } from 'react';
2
+ import { ItemActionsProps } from './ItemActions.types';
3
3
  declare const ItemActions: React.FC<ItemActionsProps>;
4
4
  export default ItemActions;
@@ -1,57 +1,55 @@
1
- import React from 'react';
2
- import { theme } from '@synerise/ds-core';
3
- import Icon, { CloseS, DuplicateS, EditS } from '@synerise/ds-icon';
4
- import Tooltip from '@synerise/ds-tooltip';
5
- import * as S from './ItemActions.styles';
6
- var DEFAULT_COLOR = theme.palette['grey-500'];
7
- var ItemActions = function ItemActions(_ref) {
8
- var item = _ref.item,
9
- duplicateAction = _ref.duplicateAction,
10
- duplicateActionTooltip = _ref.duplicateActionTooltip,
11
- editAction = _ref.editAction,
12
- editActionTooltip = _ref.editActionTooltip,
13
- removeAction = _ref.removeAction,
14
- removeActionTooltip = _ref.removeActionTooltip,
15
- additionalActions = _ref.additionalActions;
16
- var handleDuplicate = React.useCallback(function (event) {
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { theme } from "@synerise/ds-core";
4
+ import Icon, { EditS, DuplicateS, CloseS } from "@synerise/ds-icon";
5
+ import Tooltip from "@synerise/ds-tooltip";
6
+ import { ItemActionsWrapper } from "./ItemActions.styles.js";
7
+ const DEFAULT_COLOR = theme.palette["grey-500"];
8
+ const ItemActions = ({
9
+ item,
10
+ duplicateAction,
11
+ duplicateActionTooltip,
12
+ editAction,
13
+ editActionTooltip,
14
+ removeAction,
15
+ removeActionTooltip,
16
+ additionalActions
17
+ }) => {
18
+ const handleDuplicate = React.useCallback((event) => {
17
19
  event.stopPropagation();
18
- var id = item.id;
20
+ const {
21
+ id
22
+ } = item;
19
23
  duplicateAction && duplicateAction({
20
- id: id
24
+ id
21
25
  });
22
26
  }, [item, duplicateAction]);
23
- var handleRemove = React.useCallback(function (event) {
27
+ const handleRemove = React.useCallback((event) => {
24
28
  event.stopPropagation();
25
- var id = item.id;
29
+ const {
30
+ id
31
+ } = item;
26
32
  removeAction && removeAction({
27
- id: id
33
+ id
28
34
  });
29
35
  }, [item, removeAction]);
30
- var handleEdit = React.useCallback(function (event) {
36
+ const handleEdit = React.useCallback((event) => {
31
37
  event.stopPropagation();
32
38
  editAction && editAction();
33
39
  }, [editAction]);
34
- var renderIcon = React.useCallback(function (condition, icon, color, handleClick, testId, tooltip) {
35
- return condition && /*#__PURE__*/React.createElement(Tooltip, {
36
- type: "default",
37
- trigger: "hover",
38
- title: tooltip
39
- }, /*#__PURE__*/React.createElement("div", {
40
- "data-testid": testId
41
- }, /*#__PURE__*/React.createElement(Icon, {
42
- component: icon,
43
- size: 24,
44
- color: color,
45
- onClick: handleClick
46
- })));
40
+ const renderIcon = React.useCallback((condition, icon, color, handleClick, testId, tooltip) => {
41
+ return condition && /* @__PURE__ */ jsx(Tooltip, { type: "default", trigger: "hover", title: tooltip, children: /* @__PURE__ */ jsx("div", { "data-testid": testId, children: /* @__PURE__ */ jsx(Icon, { component: icon, size: 24, color, onClick: handleClick }) }) });
47
42
  }, []);
48
- var renderAdditionalActions = React.useMemo(function () {
49
- return additionalActions && additionalActions.map(function (action, index) {
50
- return renderIcon(true, action.icon, action.color || DEFAULT_COLOR, function () {
51
- return action.onClick(item);
52
- }, "additional-action-" + index, action.tooltip);
53
- });
43
+ const renderAdditionalActions = React.useMemo(() => {
44
+ return additionalActions && additionalActions.map((action, index) => renderIcon(true, action.icon, action.color || DEFAULT_COLOR, () => action.onClick(item), `additional-action-${index}`, action.tooltip));
54
45
  }, [additionalActions, item, renderIcon]);
55
- return /*#__PURE__*/React.createElement(S.ItemActionsWrapper, null, additionalActions && renderAdditionalActions, renderIcon(Boolean(item.canUpdate), /*#__PURE__*/React.createElement(EditS, null), DEFAULT_COLOR, handleEdit, 'list-item-edit', editActionTooltip), renderIcon(Boolean(item.canDuplicate), /*#__PURE__*/React.createElement(DuplicateS, null), DEFAULT_COLOR, handleDuplicate, 'list-item-duplicate', duplicateActionTooltip), renderIcon(Boolean(item.canDelete), /*#__PURE__*/React.createElement(CloseS, null), theme.palette['red-600'], handleRemove, 'list-item-remove', removeActionTooltip));
46
+ return /* @__PURE__ */ jsxs(ItemActionsWrapper, { children: [
47
+ additionalActions && renderAdditionalActions,
48
+ renderIcon(Boolean(item.canUpdate), /* @__PURE__ */ jsx(EditS, {}), DEFAULT_COLOR, handleEdit, "list-item-edit", editActionTooltip),
49
+ renderIcon(Boolean(item.canDuplicate), /* @__PURE__ */ jsx(DuplicateS, {}), DEFAULT_COLOR, handleDuplicate, "list-item-duplicate", duplicateActionTooltip),
50
+ renderIcon(Boolean(item.canDelete), /* @__PURE__ */ jsx(CloseS, {}), theme.palette["red-600"], handleRemove, "list-item-remove", removeActionTooltip)
51
+ ] });
52
+ };
53
+ export {
54
+ ItemActions as default
56
55
  };
57
- export default ItemActions;
@@ -1 +1 @@
1
- export declare const ItemActionsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const ItemActionsWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,9 +1,11 @@
1
- import styled from 'styled-components';
2
- import { IconContainer } from '@synerise/ds-icon';
3
- export var ItemActionsWrapper = styled.div.withConfig({
1
+ import styled from "styled-components";
2
+ import { IconContainer } from "@synerise/ds-icon";
3
+ const ItemActionsWrapper = /* @__PURE__ */ styled.div.withConfig({
4
4
  displayName: "ItemActionsstyles__ItemActionsWrapper",
5
5
  componentId: "sc-1n2bgbl-0"
6
- })(["display:none;flex-direction:row;align-items:center;justify-content:flex-end;span{margin:0 0 0 8px;}", ":hover{svg{fill:", ";}}"], IconContainer, function (_ref) {
7
- var theme = _ref.theme;
8
- return theme.palette['blue-600'];
9
- });
6
+ })(["display:none;flex-direction:row;align-items:center;justify-content:flex-end;span{margin:0 0 0 8px;}", ":hover{svg{fill:", ";}}"], IconContainer, ({
7
+ theme
8
+ }) => theme.palette["blue-600"]);
9
+ export {
10
+ ItemActionsWrapper
11
+ };
@@ -1,5 +1,5 @@
1
- import type React from 'react';
2
- import { type AdditionalAction, type ItemProps } from '../../ManageableList.types';
1
+ import { default as React } from 'react';
2
+ import { AdditionalAction, ItemProps } from '../../ManageableList.types';
3
3
  export type ItemActionsProps = {
4
4
  item: ItemProps;
5
5
  removeAction?: (removeParams: {
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type Props } from './ItemMeta.types';
1
+ import { default as React } from 'react';
2
+ import { Props } from './ItemMeta.types';
3
3
  export declare const ItemMeta: React.FC<Props>;
4
4
  export default ItemMeta;
@@ -1,24 +1,29 @@
1
- import moment from 'moment';
2
- import React from 'react';
3
- import { UserAvatar } from '@synerise/ds-avatar';
4
- import * as S from './ItemMeta.styles';
5
- export var ItemMeta = function ItemMeta(_ref) {
6
- var user = _ref.user,
7
- created = _ref.created;
8
- var _ref2 = user || {},
9
- firstName = _ref2.firstname,
10
- lastName = _ref2.lastname,
11
- avatar = _ref2.avatar_url,
12
- email = _ref2.email;
13
- var userData = {
14
- firstName: firstName,
15
- lastName: lastName,
16
- avatar: avatar,
17
- email: email
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import moment from "moment";
3
+ import { UserAvatar } from "@synerise/ds-avatar";
4
+ import { ItemMeta as ItemMeta$1, ItemMetaCreated } from "./ItemMeta.styles.js";
5
+ const ItemMeta = ({
6
+ user,
7
+ created
8
+ }) => {
9
+ const {
10
+ firstname: firstName,
11
+ lastname: lastName,
12
+ avatar_url: avatar,
13
+ email
14
+ } = user || {};
15
+ const userData = {
16
+ firstName,
17
+ lastName,
18
+ avatar,
19
+ email
18
20
  };
19
- return /*#__PURE__*/React.createElement(S.ItemMeta, null, created && /*#__PURE__*/React.createElement(S.ItemMetaCreated, null, moment.utc(created).fromNow()), user && /*#__PURE__*/React.createElement(UserAvatar, {
20
- size: "small",
21
- user: userData
22
- }));
21
+ return /* @__PURE__ */ jsxs(ItemMeta$1, { children: [
22
+ created && /* @__PURE__ */ jsx(ItemMetaCreated, { children: moment.utc(created).fromNow() }),
23
+ user && /* @__PURE__ */ jsx(UserAvatar, { size: "small", user: userData })
24
+ ] });
25
+ };
26
+ export {
27
+ ItemMeta,
28
+ ItemMeta as default
23
29
  };
24
- export default ItemMeta;
@@ -1,2 +1,2 @@
1
- export declare const ItemMetaCreated: import("styled-components").StyledComponent<"span", any, {}, never>;
2
- export declare const ItemMeta: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const ItemMetaCreated: import('styled-components').StyledComponent<"span", any, {}, never>;
2
+ export declare const ItemMeta: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,11 +1,13 @@
1
- import styled from 'styled-components';
2
- export var ItemMetaCreated = styled.span.withConfig({
1
+ import styled from "styled-components";
2
+ const ItemMetaCreated = /* @__PURE__ */ styled.span.withConfig({
3
3
  displayName: "ItemMetastyles__ItemMetaCreated",
4
4
  componentId: "sc-1jx08et-0"
5
- })(["color:", ";font-size:13px;line-height:18px;"], function (props) {
6
- return props.theme.palette['grey-500'];
7
- });
8
- export var ItemMeta = styled.div.withConfig({
5
+ })(["color:", ";font-size:13px;line-height:18px;"], (props) => props.theme.palette["grey-500"]);
6
+ const ItemMeta = /* @__PURE__ */ styled.div.withConfig({
9
7
  displayName: "ItemMetastyles__ItemMeta",
10
8
  componentId: "sc-1jx08et-1"
11
- })(["display:flex;flex-direction:row;align-items:center;justify-content:flex-end;height:100%;padding-left:16px;.ds-avatar{margin-left:12px;}"]);
9
+ })(["display:flex;flex-direction:row;align-items:center;justify-content:flex-end;height:100%;padding-left:16px;.ds-avatar{margin-left:12px;}"]);
10
+ export {
11
+ ItemMeta,
12
+ ItemMetaCreated
13
+ };
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type ItemLabelProps } from './ItemName.types';
1
+ import { default as React } from 'react';
2
+ import { ItemLabelProps } from './ItemName.types';
3
3
  declare const ItemName: ({ item, onUpdate, editMode, searchQuery, }: ItemLabelProps) => React.JSX.Element;
4
4
  export default ItemName;
@@ -1,78 +1,59 @@
1
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
- import { InfoFillS } from '@synerise/ds-icon';
3
- import InlineEdit from '@synerise/ds-inline-edit/dist/InlineEdit';
4
- import Tooltip from '@synerise/ds-tooltip';
5
- import { escapeRegEx } from '@synerise/ds-utils';
6
- import * as S from '../Item.styles';
7
- var ItemName = function ItemName(_ref) {
8
- var _item$nameWrapperClas;
9
- var item = _ref.item,
10
- onUpdate = _ref.onUpdate,
11
- editMode = _ref.editMode,
12
- searchQuery = _ref.searchQuery;
13
- var _useState = useState(item.name),
14
- editedName = _useState[0],
15
- setEditedName = _useState[1];
16
- var updateName = useCallback(function () {
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useState, useCallback, useEffect, useMemo } from "react";
3
+ import { InfoFillS } from "@synerise/ds-icon";
4
+ import InlineEdit from "@synerise/ds-inline-edit/dist/InlineEdit";
5
+ import Tooltip from "@synerise/ds-tooltip";
6
+ import { escapeRegEx } from "@synerise/ds-utils";
7
+ import { ItemLabelWrapper, ItemLabelWithIcon, ItemLabel, DescriptionIcon, ItemTagList } from "../Item.styles.js";
8
+ const ItemName = ({
9
+ item,
10
+ onUpdate,
11
+ editMode,
12
+ searchQuery
13
+ }) => {
14
+ const [editedName, setEditedName] = useState(item.name);
15
+ const updateName = useCallback(() => {
17
16
  onUpdate && onUpdate({
18
17
  id: item.id,
19
18
  name: editedName
20
19
  });
21
20
  }, [editedName, onUpdate, item.id]);
22
- var editName = useCallback(function (event) {
21
+ const editName = useCallback((event) => {
23
22
  setEditedName(event.target.value);
24
23
  }, []);
25
- useEffect(function () {
24
+ useEffect(() => {
26
25
  if (item.name !== editedName) {
27
26
  setEditedName(item.name);
28
27
  }
29
- // eslint-disable-next-line react-hooks/exhaustive-deps
30
28
  }, [editMode]);
31
- var inputProps = useMemo(function () {
29
+ const inputProps = useMemo(() => {
32
30
  return {
33
- name: 'list-item-name-input',
31
+ name: "list-item-name-input",
34
32
  value: editedName,
35
33
  onBlur: updateName,
36
34
  onChange: editName
37
35
  };
38
36
  }, [editedName, updateName, editName]);
39
- var name = useMemo(function () {
37
+ const name = useMemo(() => {
40
38
  if (searchQuery) {
41
- var escapedQuery = escapeRegEx(searchQuery);
42
- var startOfQuery = item.name.toLowerCase().search(escapedQuery.toLowerCase());
43
- var endOfQuery = startOfQuery + searchQuery.length;
44
- var resultArray = [item.name.substring(0, startOfQuery), /*#__PURE__*/React.createElement("span", {
45
- key: item.id,
46
- className: "search-highlight"
47
- }, item.name.substring(startOfQuery, endOfQuery)), item.name.substring(endOfQuery, item.name.length)];
39
+ const escapedQuery = escapeRegEx(searchQuery);
40
+ const startOfQuery = item.name.toLowerCase().search(escapedQuery.toLowerCase());
41
+ const endOfQuery = startOfQuery + searchQuery.length;
42
+ const resultArray = [item.name.substring(0, startOfQuery), /* @__PURE__ */ jsx("span", { className: "search-highlight", children: item.name.substring(startOfQuery, endOfQuery) }, item.id), item.name.substring(endOfQuery, item.name.length)];
48
43
  return resultArray;
49
44
  }
50
45
  return item.name;
51
46
  }, [item.id, item.name, searchQuery]);
52
- var classes = (_item$nameWrapperClas = item.nameWrapperClassNames) != null && _item$nameWrapperClas.length ? ['title'].concat(item.nameWrapperClassNames) : ['title'];
53
- return /*#__PURE__*/React.createElement(S.ItemLabelWrapper, {
54
- "data-testid": item.description && 'item-description-icon'
55
- }, editMode ? /*#__PURE__*/React.createElement(InlineEdit, {
56
- size: "small",
57
- hideIcon: true,
58
- style: {
59
- maxWidth: '100%',
60
- lineHeight: '24px'
61
- },
62
- input: inputProps,
63
- "data-testid": "list-item-name-input",
64
- autoFocus: true
65
- }) : /*#__PURE__*/React.createElement(S.ItemLabelWithIcon, null, /*#__PURE__*/React.createElement(S.ItemLabel, {
66
- "data-testid": "list-item-name",
67
- className: classes.join(' ')
68
- }, name), item.description && /*#__PURE__*/React.createElement(Tooltip, {
69
- description: item.description,
70
- placement: "top",
71
- trigger: "hover",
72
- type: "largeSimple"
73
- }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(S.DescriptionIcon, {
74
- component: /*#__PURE__*/React.createElement(InfoFillS, null),
75
- color: "#b5bdc3"
76
- }))), item.tags && /*#__PURE__*/React.createElement(S.ItemTagList, null, item.tags)));
47
+ const classes = item.nameWrapperClassNames?.length ? ["title", ...item.nameWrapperClassNames] : ["title"];
48
+ return /* @__PURE__ */ jsx(ItemLabelWrapper, { "data-testid": item.description && "item-description-icon", children: editMode ? /* @__PURE__ */ jsx(InlineEdit, { size: "small", hideIcon: true, style: {
49
+ maxWidth: "100%",
50
+ lineHeight: "24px"
51
+ }, input: inputProps, "data-testid": "list-item-name-input", autoFocus: true }) : /* @__PURE__ */ jsxs(ItemLabelWithIcon, { children: [
52
+ /* @__PURE__ */ jsx(ItemLabel, { "data-testid": "list-item-name", className: classes.join(" "), children: name }),
53
+ item.description && /* @__PURE__ */ jsx(Tooltip, { description: item.description, placement: "top", trigger: "hover", type: "largeSimple", children: /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(DescriptionIcon, { component: /* @__PURE__ */ jsx(InfoFillS, {}), color: "#b5bdc3" }) }) }),
54
+ item.tags && /* @__PURE__ */ jsx(ItemTagList, { children: item.tags })
55
+ ] }) });
56
+ };
57
+ export {
58
+ ItemName as default
77
59
  };
78
- export default ItemName;
@@ -1,5 +1,5 @@
1
- import type React from 'react';
2
- import { type ItemProps } from '../../ManageableList.types';
1
+ import { default as React } from 'react';
2
+ import { ItemProps } from '../../ManageableList.types';
3
3
  export type ItemLabelProps = {
4
4
  item: ItemProps;
5
5
  onUpdate?: (updateParams: {
@@ -1 +1 @@
1
- export {};
1
+
@@ -1,4 +1,4 @@
1
- import React from 'react';
2
- import { type ItemNameLargeProps } from './ItemNameLarge.types';
1
+ import { default as React } from 'react';
2
+ import { ItemNameLargeProps } from './ItemNameLarge.types';
3
3
  declare const ItemNameLarge: ({ item }: ItemNameLargeProps) => React.JSX.Element;
4
4
  export default ItemNameLarge;
@@ -1,14 +1,18 @@
1
- import React from 'react';
2
- import * as S from '../Item.styles';
3
- var ItemNameLarge = function ItemNameLarge(_ref) {
4
- var _item$nameWrapperClas;
5
- var item = _ref.item;
6
- var classes = (_item$nameWrapperClas = item.nameWrapperClassNames) != null && _item$nameWrapperClas.length ? ['title'].concat(item.nameWrapperClassNames) : ['title'];
7
- return /*#__PURE__*/React.createElement(S.ItemLabelWrapper, {
8
- largeSize: true
9
- }, /*#__PURE__*/React.createElement(S.ItemLabelTop, null, /*#__PURE__*/React.createElement(S.ItemLabel, {
10
- "data-testid": "list-item-name",
11
- className: classes.join(' ')
12
- }, item.name), item.uniqueKey && /*#__PURE__*/React.createElement(S.ItemUniqueKey, null, item.uniqueKey), item.tags && /*#__PURE__*/React.createElement(S.ItemTagList, null, item.tags)), item.description && /*#__PURE__*/React.createElement(S.ItemDescription, null, item.description));
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { ItemLabelWrapper, ItemLabelTop, ItemLabel, ItemUniqueKey, ItemTagList, ItemDescription } from "../Item.styles.js";
3
+ const ItemNameLarge = ({
4
+ item
5
+ }) => {
6
+ const classes = item.nameWrapperClassNames?.length ? ["title", ...item.nameWrapperClassNames] : ["title"];
7
+ return /* @__PURE__ */ jsxs(ItemLabelWrapper, { largeSize: true, children: [
8
+ /* @__PURE__ */ jsxs(ItemLabelTop, { children: [
9
+ /* @__PURE__ */ jsx(ItemLabel, { "data-testid": "list-item-name", className: classes.join(" "), children: item.name }),
10
+ item.uniqueKey && /* @__PURE__ */ jsx(ItemUniqueKey, { children: item.uniqueKey }),
11
+ item.tags && /* @__PURE__ */ jsx(ItemTagList, { children: item.tags })
12
+ ] }),
13
+ item.description && /* @__PURE__ */ jsx(ItemDescription, { children: item.description })
14
+ ] });
15
+ };
16
+ export {
17
+ ItemNameLarge as default
13
18
  };
14
- export default ItemNameLarge;
@@ -1,4 +1,4 @@
1
- import type { ItemProps } from '../../ManageableList.types';
1
+ import { ItemProps } from '../../ManageableList.types';
2
2
  export type ItemNameLargeProps = {
3
3
  item: ItemProps;
4
4
  };
@@ -1 +1 @@
1
- export {};
1
+