@antscorp/antsomi-ui 1.3.5-beta.871 → 1.3.5-beta.872

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 (109) hide show
  1. package/es/components/atoms/SlideBar/SlideBar.js +3 -1
  2. package/es/components/atoms/Slider/index.js +3 -8
  3. package/es/components/atoms/index.d.ts +0 -1
  4. package/es/components/atoms/index.js +0 -1
  5. package/es/components/icons/LazyIcon/LazyIcon.d.ts +2 -1
  6. package/es/components/icons/LazyIcon/LazyIcon.js +2 -1
  7. package/es/components/icons/NoteNewIcon.d.ts +3 -0
  8. package/es/components/icons/NoteNewIcon.js +7 -0
  9. package/es/components/icons/{IpRestrictionIcon.d.ts → SummarizeIconIcon.d.ts} +1 -1
  10. package/es/components/icons/SummarizeIconIcon.js +7 -0
  11. package/es/components/icons/index.d.ts +2 -1
  12. package/es/components/icons/index.js +2 -1
  13. package/es/components/molecules/AccountSelection/AccountListing.js +1 -1
  14. package/es/components/molecules/AccountSelection/index.d.ts +2 -1
  15. package/es/components/molecules/AddDynamicContent/components/DisplayFormat/DisplayFormat.d.ts +1 -0
  16. package/es/components/molecules/CalendarSelection/CalendarSelection.js +5 -4
  17. package/es/components/molecules/ColorPicker/CustomPicker/index.js +2 -2
  18. package/es/components/molecules/ColorPicker/index.d.ts +0 -1
  19. package/es/components/molecules/ColorPicker/index.js +2 -3
  20. package/es/components/molecules/DrawerDetail/DrawerDetail.js +10 -5
  21. package/es/components/molecules/DrawerDetail/types.d.ts +1 -0
  22. package/es/components/molecules/EditableName/EditableName.js +1 -1
  23. package/es/components/molecules/FontSetting/index.js +2 -2
  24. package/es/components/molecules/MatchAnySelect/MatchesAnySelect.js +2 -6
  25. package/es/components/molecules/RequestAccess/RequestAccess.js +8 -3
  26. package/es/components/molecules/RichMenu/RichMenuBlock/constants.js +1 -1
  27. package/es/components/molecules/SearchPopover/components/PopoverSelect/PopoverSelect.js +2 -4
  28. package/es/components/molecules/SelectAccount/ButtonViewAll.js +6 -14
  29. package/es/components/molecules/SelectAccount/Content.js +2 -3
  30. package/es/components/molecules/SelectAccount/styled.js +0 -4
  31. package/es/components/molecules/SelectAccount/type.d.ts +0 -2
  32. package/es/components/molecules/TagifyInput/TagifyInput.js +224 -369
  33. package/es/components/molecules/TagifyInput/constants.d.ts +2 -21
  34. package/es/components/molecules/TagifyInput/constants.js +2 -21
  35. package/es/components/molecules/TagifyInput/patternHandlers.d.ts +1 -3
  36. package/es/components/molecules/TagifyInput/patternHandlers.js +4 -22
  37. package/es/components/molecules/TagifyInput/styled.js +0 -1
  38. package/es/components/molecules/TagifyInput/types.d.ts +0 -2
  39. package/es/components/molecules/TagifyInput/utils.d.ts +0 -20
  40. package/es/components/molecules/TagifyInput/utils.js +2 -40
  41. package/es/components/molecules/TagifyInput/utils.style.js +1 -64
  42. package/es/components/molecules/TemplateSaveAs/styled.js +1 -1
  43. package/es/components/molecules/ThumbnailCard/ThumbnailCard.js +1 -1
  44. package/es/components/molecules/UploadImage/index.d.ts +0 -1
  45. package/es/components/molecules/UploadImage/index.js +4 -41
  46. package/es/components/molecules/index.d.ts +1 -1
  47. package/es/components/molecules/index.js +1 -1
  48. package/es/components/organism/ContentSources/Settings.d.ts +0 -3
  49. package/es/components/organism/ContentSources/Settings.js +1 -1
  50. package/es/components/organism/ContentSources/index.d.ts +0 -3
  51. package/es/components/organism/ContentSources/index.js +3 -4
  52. package/es/components/organism/DataTable/utils/filter.d.ts +1 -1
  53. package/es/components/organism/LeftMenu/utils/index.js +5 -7
  54. package/es/components/organism/index.d.ts +0 -1
  55. package/es/components/organism/index.js +0 -1
  56. package/es/components/template/Layout/Layout.js +3 -47
  57. package/es/components/template/Layout/constants/menuCode.d.ts +0 -1
  58. package/es/components/template/Layout/constants/menuCode.js +0 -1
  59. package/es/components/template/Layout/constants/permission.d.ts +1 -0
  60. package/es/components/template/Layout/constants/permission.js +1 -1
  61. package/es/components/template/Layout/utils/permission.js +0 -1
  62. package/es/components/template/TemplateListing/Loadable.d.ts +1 -0
  63. package/es/constants/queries.d.ts +0 -1
  64. package/es/constants/queries.js +0 -1
  65. package/es/locales/en/translation.json +1 -1
  66. package/es/locales/ja/google-sheet.json +59 -59
  67. package/es/locales/vi/google-sheet.json +2 -2
  68. package/es/providers/ConfigProvider/GlobalStyle.js +1 -29
  69. package/es/queries/Account/useGetAccountList.js +1 -1
  70. package/es/queries/index.d.ts +0 -1
  71. package/es/queries/index.js +0 -1
  72. package/es/services/Permission/index.d.ts +0 -16
  73. package/es/services/Permission/index.js +0 -35
  74. package/es/stories/assets/code-brackets.svg +1 -0
  75. package/es/test.d.ts +11 -0
  76. package/es/test.js +377 -138
  77. package/package.json +243 -253
  78. package/es/__tests__/fileMock.test.d.ts +0 -2
  79. package/es/__tests__/fileMock.test.js +0 -2
  80. package/es/__tests__/styleMock.test.d.ts +0 -1
  81. package/es/__tests__/styleMock.test.js +0 -2
  82. package/es/assets/images/error-icon.png +0 -0
  83. package/es/components/atoms/NotificationStatus/NotificationStatus.d.ts +0 -12
  84. package/es/components/atoms/NotificationStatus/NotificationStatus.js +0 -27
  85. package/es/components/atoms/NotificationStatus/constants/index.d.ts +0 -15
  86. package/es/components/atoms/NotificationStatus/constants/index.js +0 -15
  87. package/es/components/atoms/NotificationStatus/index.d.ts +0 -1
  88. package/es/components/atoms/NotificationStatus/index.js +0 -1
  89. package/es/components/atoms/NotificationStatus/styled.d.ts +0 -3
  90. package/es/components/atoms/NotificationStatus/styled.js +0 -14
  91. package/es/components/atoms/Popover/styled.d.ts +0 -4
  92. package/es/components/atoms/Popover/styled.js +0 -5
  93. package/es/components/icons/IpRestrictionIcon.js +0 -7
  94. package/es/components/molecules/UploadImage/MediaThumb.d.ts +0 -8
  95. package/es/components/molecules/UploadImage/MediaThumb.js +0 -15
  96. package/es/components/molecules/UploadImage/VideoThumbnail.d.ts +0 -4
  97. package/es/components/molecules/UploadImage/VideoThumbnail.js +0 -40
  98. package/es/components/organism/GenerativeInsights/constants.d.ts +0 -1
  99. package/es/components/organism/GenerativeInsights/constants.js +0 -1
  100. package/es/components/organism/GenerativeInsights/index.d.ts +0 -11
  101. package/es/components/organism/GenerativeInsights/index.js +0 -54
  102. package/es/components/organism/GenerativeInsights/styled.d.ts +0 -12
  103. package/es/components/organism/GenerativeInsights/styled.js +0 -65
  104. package/es/components/organism/GenerativeInsights/utils.d.ts +0 -13
  105. package/es/components/organism/GenerativeInsights/utils.js +0 -49
  106. package/es/queries/Media/index.d.ts +0 -1
  107. package/es/queries/Media/index.js +0 -1
  108. package/es/queries/Media/useGetListingSavedMedia.d.ts +0 -12
  109. package/es/queries/Media/useGetListingSavedMedia.js +0 -15
@@ -270,7 +270,9 @@ export const SlideBar = props => {
270
270
  fontSize: `${BTN_ADD_SIZE}px`,
271
271
  cursor: disabledAdd ? 'not-allowed' : 'pointer',
272
272
  color: disabledAdd ? THEME.token?.colorTextDisabled : THEME.token?.colorPrimary,
273
- }, onClick: (e) => {
273
+ },
274
+ // disabled={disabledAdd}
275
+ onClick: (e) => {
274
276
  e.stopPropagation();
275
277
  if (!disabledAdd) {
276
278
  handleAddSlide();
@@ -10,16 +10,11 @@ export const Slider = memo(props => {
10
10
  const { range, value, min = 0, max = 0, className, tooltipVisible = false } = props;
11
11
  const isNegative = useMemo(() => !!(!range && min < 0), [range, min]);
12
12
  const calculateWidth = useMemo(() => ((value || 0) * 100) / (Math.abs(max) + Math.abs(min) || 1), [min, max, value]);
13
- // const restProps = tooltipVisible === 'default' ? omit(props, ['tooltipVisible']) : props;
14
- const restProps = omit(props, ['tooltipVisible']);
13
+ const restProps = tooltipVisible === 'default' ? omit(props, ['tooltipVisible']) : props;
15
14
  if (isNegative) {
16
- return (_jsx(SliderWrapper, { isNegative: true, width: calculateWidth, className: className, children: _jsx(AntdSlider, { ...omit(restProps, ['marks', 'className']), tooltip: tooltipVisible !== 'default' && {
17
- open: tooltipVisible,
18
- }, marks: {
15
+ return (_jsx(SliderWrapper, { isNegative: true, width: calculateWidth, className: className, children: _jsx(AntdSlider, { ...omit(restProps, ['marks', 'className']), marks: {
19
16
  0: ' ',
20
17
  } }) }));
21
18
  }
22
- return (_jsx(SliderWrapper, { className: className, children: _jsx(AntdSlider, { ...restProps, tooltip: tooltipVisible !== 'default' && {
23
- open: tooltipVisible,
24
- } }) }));
19
+ return (_jsx(SliderWrapper, { className: className, children: _jsx(AntdSlider, { ...restProps }) }));
25
20
  });
@@ -46,7 +46,6 @@ export * from './RateV2';
46
46
  export * from './Popover';
47
47
  export * from './Iframe';
48
48
  export * from './Avatar';
49
- export * from './NotificationStatus';
50
49
  export type { SliderProps } from './Slider';
51
50
  export type { PaginationProps } from './Pagination';
52
51
  export type { InputDynamicProps } from './InputDynamic';
@@ -46,4 +46,3 @@ export * from './RateV2';
46
46
  export * from './Popover';
47
47
  export * from './Iframe';
48
48
  export * from './Avatar';
49
- export * from './NotificationStatus';
@@ -208,7 +208,6 @@ export declare const LazyIcon: {
208
208
  InteractiveIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
209
209
  InvisibleIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
210
210
  InvitePeopleIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
211
- IpRestrictionIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
212
211
  IssueBugIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
213
212
  ItemRecommendationIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
214
213
  JourneyTactic30Icon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
@@ -246,6 +245,7 @@ export declare const LazyIcon: {
246
245
  MoveToIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
247
246
  MuteIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
248
247
  NodeViewIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
248
+ NoteNewIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
249
249
  NotificationIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
250
250
  NotificationSettingIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
251
251
  NotificationsActiveIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
@@ -329,6 +329,7 @@ export declare const LazyIcon: {
329
329
  StoreIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
330
330
  StudioTemplates30Icon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
331
331
  SubtractRadiusIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
332
+ SummarizeIconIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
332
333
  SupportAssistantIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
333
334
  Survey30Icon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
334
335
  SurveyDirectorProfileIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
@@ -214,7 +214,6 @@ export const LazyIcon = {
214
214
  InteractiveIcon: lazy(() => import('../InteractiveIcon').then(m => ({ default: m.InteractiveIcon }))),
215
215
  InvisibleIcon: lazy(() => import('../InvisibleIcon').then(m => ({ default: m.InvisibleIcon }))),
216
216
  InvitePeopleIcon: lazy(() => import('../InvitePeopleIcon').then(m => ({ default: m.InvitePeopleIcon }))),
217
- IpRestrictionIcon: lazy(() => import('../IpRestrictionIcon').then(m => ({ default: m.IpRestrictionIcon }))),
218
217
  IssueBugIcon: lazy(() => import('../IssueBugIcon').then(m => ({ default: m.IssueBugIcon }))),
219
218
  ItemRecommendationIcon: lazy(() => import('../ItemRecommendationIcon').then(m => ({ default: m.ItemRecommendationIcon }))),
220
219
  JourneyTactic30Icon: lazy(() => import('../JourneyTactic30Icon').then(m => ({ default: m.JourneyTactic30Icon }))),
@@ -250,6 +249,7 @@ export const LazyIcon = {
250
249
  MoveToIcon: lazy(() => import('../MoveToIcon').then(m => ({ default: m.MoveToIcon }))),
251
250
  MuteIcon: lazy(() => import('../MuteIcon').then(m => ({ default: m.MuteIcon }))),
252
251
  NodeViewIcon: lazy(() => import('../NodeViewIcon').then(m => ({ default: m.NodeViewIcon }))),
252
+ NoteNewIcon: lazy(() => import('../NoteNewIcon').then(m => ({ default: m.NoteNewIcon }))),
253
253
  NotificationIcon: lazy(() => import('../NotificationIcon').then(m => ({ default: m.NotificationIcon }))),
254
254
  NotificationSettingIcon: lazy(() => import('../NotificationSettingIcon').then(m => ({ default: m.NotificationSettingIcon }))),
255
255
  NotificationsActiveIcon: lazy(() => import('../NotificationsActiveIcon').then(m => ({ default: m.NotificationsActiveIcon }))),
@@ -335,6 +335,7 @@ export const LazyIcon = {
335
335
  StoreIcon: lazy(() => import('../StoreIcon').then(m => ({ default: m.StoreIcon }))),
336
336
  StudioTemplates30Icon: lazy(() => import('../StudioTemplates30Icon').then(m => ({ default: m.StudioTemplates30Icon }))),
337
337
  SubtractRadiusIcon: lazy(() => import('../SubtractRadiusIcon').then(m => ({ default: m.SubtractRadiusIcon }))),
338
+ SummarizeIconIcon: lazy(() => import('../SummarizeIconIcon').then(m => ({ default: m.SummarizeIconIcon }))),
338
339
  SupportAssistantIcon: lazy(() => import('../SupportAssistantIcon').then(m => ({ default: m.SupportAssistantIcon }))),
339
340
  Survey30Icon: lazy(() => import('../Survey30Icon').then(m => ({ default: m.Survey30Icon }))),
340
341
  SurveyDirectorProfileIcon: lazy(() => import('../SurveyDirectorProfileIcon').then(m => ({ default: m.SurveyDirectorProfileIcon }))),
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './types';
3
+ export declare const NoteNewIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { useIcon } from './hooks/useIcon';
4
+ export const NoteNewIcon = forwardRef((props, ref) => {
5
+ const { width, height } = useIcon(props);
6
+ return (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, ref: ref, width: width, height: height, children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.17969 14.0781L16.7188 6.5L17.5 7.28125L9.92188 14.8203H9.17969V14.0781ZM20.3125 1.73438C20.1562 1.57812 19.9219 1.5 19.7266 1.5C19.4922 1.5 19.2969 1.57812 19.1406 1.73438L17.6172 3.25781L20.7422 6.38281L22.2656 4.85938C22.5781 4.54688 22.5781 4 22.2656 3.6875L20.3125 1.73438ZM19.8438 7.28125L16.7188 4.15625L7.5 13.375V16.5H10.625L19.8438 7.28125ZM17.9844 13V19.9844H4.01562V6.01562H11V4H4.01562C2.89062 4 2 4.89062 2 6.01562V19.9844C2 21.1094 2.89062 22 4.01562 22H17.9844C19.1094 22 20 21.1094 20 19.9844V13H17.9844Z", fill: "currentColor" }) }));
7
+ });
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { IconProps } from './types';
3
- export declare const IpRestrictionIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
3
+ export declare const SummarizeIconIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { useIcon } from './hooks/useIcon';
4
+ export const SummarizeIconIcon = forwardRef((props, ref) => {
5
+ const { width, height } = useIcon(props);
6
+ return (_jsx("svg", { viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, ref: ref, width: width, height: height, children: _jsx("path", { d: "M7.5 20C6.97005 19.9984 6.46225 19.7872 6.08752 19.4125C5.71279 19.0377 5.50158 18.5299 5.5 18L5.51001 6C5.51 5.4713 5.71934 4.9641 6.09225 4.58931C6.46517 4.21452 6.9713 4.00264 7.5 4H17.5C18.0299 4.00158 18.5377 4.2128 18.9125 4.58753C19.2872 4.96227 19.4984 5.47005 19.5 6V18C19.4984 18.5299 19.2872 19.0377 18.9125 19.4125C18.5377 19.7872 18.0299 19.9984 17.5 20H7.5ZM7.5 18H17.5V6H7.5V18ZM8.5 16V14H10.5V16H8.5ZM11.5 15V14H15.5V15H11.5ZM8.5 13V11H10.5V13H8.5ZM11.5 12V11H15.5V12H11.5ZM8.5 10V8H10.5V10H8.5ZM11.5 9V8H15.5V9H11.5Z", fill: "currentColor" }) }));
7
+ });
@@ -206,7 +206,6 @@ export { Integration30Icon } from './Integration30Icon';
206
206
  export { InteractiveIcon } from './InteractiveIcon';
207
207
  export { InvisibleIcon } from './InvisibleIcon';
208
208
  export { InvitePeopleIcon } from './InvitePeopleIcon';
209
- export { IpRestrictionIcon } from './IpRestrictionIcon';
210
209
  export { IssueBugIcon } from './IssueBugIcon';
211
210
  export { ItemRecommendationIcon } from './ItemRecommendationIcon';
212
211
  export { JourneyTactic30Icon } from './JourneyTactic30Icon';
@@ -242,6 +241,7 @@ export { MoreInfoIcon } from './MoreInfoIcon';
242
241
  export { MoveToIcon } from './MoveToIcon';
243
242
  export { MuteIcon } from './MuteIcon';
244
243
  export { NodeViewIcon } from './NodeViewIcon';
244
+ export { NoteNewIcon } from './NoteNewIcon';
245
245
  export { NotificationIcon } from './NotificationIcon';
246
246
  export { NotificationSettingIcon } from './NotificationSettingIcon';
247
247
  export { NotificationsActiveIcon } from './NotificationsActiveIcon';
@@ -325,6 +325,7 @@ export { StopRecordIcon } from './StopRecordIcon';
325
325
  export { StoreIcon } from './StoreIcon';
326
326
  export { StudioTemplates30Icon } from './StudioTemplates30Icon';
327
327
  export { SubtractRadiusIcon } from './SubtractRadiusIcon';
328
+ export { SummarizeIconIcon } from './SummarizeIconIcon';
328
329
  export { SupportAssistantIcon } from './SupportAssistantIcon';
329
330
  export { Survey30Icon } from './Survey30Icon';
330
331
  export { SurveyDirectorProfileIcon } from './SurveyDirectorProfileIcon';
@@ -206,7 +206,6 @@ export { Integration30Icon } from './Integration30Icon';
206
206
  export { InteractiveIcon } from './InteractiveIcon';
207
207
  export { InvisibleIcon } from './InvisibleIcon';
208
208
  export { InvitePeopleIcon } from './InvitePeopleIcon';
209
- export { IpRestrictionIcon } from './IpRestrictionIcon';
210
209
  export { IssueBugIcon } from './IssueBugIcon';
211
210
  export { ItemRecommendationIcon } from './ItemRecommendationIcon';
212
211
  export { JourneyTactic30Icon } from './JourneyTactic30Icon';
@@ -242,6 +241,7 @@ export { MoreInfoIcon } from './MoreInfoIcon';
242
241
  export { MoveToIcon } from './MoveToIcon';
243
242
  export { MuteIcon } from './MuteIcon';
244
243
  export { NodeViewIcon } from './NodeViewIcon';
244
+ export { NoteNewIcon } from './NoteNewIcon';
245
245
  export { NotificationIcon } from './NotificationIcon';
246
246
  export { NotificationSettingIcon } from './NotificationSettingIcon';
247
247
  export { NotificationsActiveIcon } from './NotificationsActiveIcon';
@@ -325,6 +325,7 @@ export { StopRecordIcon } from './StopRecordIcon';
325
325
  export { StoreIcon } from './StoreIcon';
326
326
  export { StudioTemplates30Icon } from './StudioTemplates30Icon';
327
327
  export { SubtractRadiusIcon } from './SubtractRadiusIcon';
328
+ export { SummarizeIconIcon } from './SummarizeIconIcon';
328
329
  export { SupportAssistantIcon } from './SupportAssistantIcon';
329
330
  export { Survey30Icon } from './Survey30Icon';
330
331
  export { SurveyDirectorProfileIcon } from './SurveyDirectorProfileIcon';
@@ -33,7 +33,7 @@ export const AccountListing = React.forwardRef((props, ref) => {
33
33
  },
34
34
  // eslint-disable-next-line react-hooks/exhaustive-deps
35
35
  [onChange, recentData]);
36
- return (_jsxs(AccountSelectionStyled, { className: className, children: [_jsx(Input, { placeholder: "Search", suffix: _jsx(Icon, { type: "icon-ants-search-2", style: { fontSize: '24px', color: THEME.token?.bw8 } }), value: searchValue, onChange: event => setSearchValue(event.target.value) }), _jsx("div", { className: "account-list", children: _jsx("ul", { children: _jsxs(Scrollbars, { style: { width: '100%', height: showAllAccount ? '364px' : '410px' }, children: [recentData?.value?.length && recentData?.value?.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(Text, { className: "recent-text", children: "Recent" }), recentData?.value
36
+ return (_jsxs(AccountSelectionStyled, { className: className, children: [_jsx(Input, { placeholder: "Search", suffix: _jsx(Icon, { type: "icon-ants-search-2", style: { fontSize: '24px', color: THEME.token?.bw8 } }), value: searchValue, onChange: event => setSearchValue(event.target.value) }), _jsx("div", { className: "account-list", children: _jsx("ul", { children: _jsxs(Scrollbars, { style: { width: '100%', height: showAllAccount ? '364px' : '410px' }, children: [recentData?.value?.length ? (_jsxs(_Fragment, { children: [_jsx(Text, { className: "recent-text", children: "Recent" }), recentData?.value
37
37
  .map(accountId => accountData?.find(account => account.userId === accountId))
38
38
  .filter((accountId, index, self) => Boolean(accountId) && index === self.indexOf(accountId))
39
39
  .map(account => (_jsx(AccountItem, { userName: account.userName, userId: account.userId, onClick: handleSelectAccount, isSelected: +currentAccount === account.userId }, account.userId))), _jsx(Divider, { style: { margin: '8px 0', color: THEME.token?.bw3 } })] })) : null, accountData
@@ -1,3 +1,4 @@
1
1
  export { AccountSelection, type AccountSelectionProps } from './AccountSelection';
2
- export { AccountListing, type AccountListingHandle } from './AccountListing';
2
+ export { AccountListing } from './AccountListing';
3
+ export type { AccountListingHandle } from './AccountListing';
3
4
  export { useAccountSelection } from './hooks';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
2
3
  export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
3
4
  type DisplayFormatProps = {
@@ -10,15 +10,16 @@ import { LOCAL_TIMEZONE, RANGE_LIMIT } from './constants';
10
10
  import { initState, resetValue } from './actions';
11
11
  import { useTriggerOut } from './hooks/useTriggerOut';
12
12
  export const CalendarSelection = props => {
13
- const initialized = useRef(false);
13
+ const initialed = useRef(false);
14
14
  const { value, rangeLimit = RANGE_LIMIT, timezone = LOCAL_TIMEZONE, timeDisplayProps, popoverProps, rangePickerProps, onChange, } = props;
15
15
  const [state, dispatch] = useReducer(reducer, INITIAL_STATE);
16
16
  useLayoutEffect(() => {
17
- if (!value || initialized.current)
17
+ if (!value)
18
18
  return;
19
- const needTriggerOut = !initialized.current;
19
+ const needTriggerOut = !initialed.current;
20
+ // console.log({ needTriggerOut });
20
21
  dispatch(initState(value, needTriggerOut));
21
- initialized.current = true;
22
+ initialed.current = true;
22
23
  }, [value]);
23
24
  useLayoutEffect(() => {
24
25
  if (!state.open) {
@@ -42,7 +42,7 @@ const styleContainAlpha = {
42
42
  };
43
43
  const CustomPicker = props => {
44
44
  // Props
45
- const { className, style, children, isHideAlpha, onChange, onChangeComplete, presetColors, ...restOf } = props;
45
+ const { className, style, children, onChange, onChangeComplete, presetColors, ...restOf } = props;
46
46
  // State
47
47
  const [isShowRgbaInput, setShowRgbaInput] = useState(true);
48
48
  const onChangeRgbaColor = (key, value) => {
@@ -68,7 +68,7 @@ const CustomPicker = props => {
68
68
  width: '100%',
69
69
  height: 12,
70
70
  marginTop: 10,
71
- }, children: _jsx(Alpha, { ...restOf, pointer: HuePointer, onChange: onChange }) })] })] }), _jsxs("div", { style: { ...wrapperStyling, paddingBottom: 15 }, children: [_jsx(Icon, { type: "icon-ants-unfold-more", style: { cursor: 'pointer', fontSize: '20px' }, onClick: () => setShowRgbaInput(!isShowRgbaInput) }), isShowRgbaInput ? (_jsxs("div", { style: rgbaInputStyling, children: [_jsxs("div", { style: rgbaStyling, children: [_jsx(InputNumberWrapper, { value: props.rgb?.r, controls: false, onChange: value => onChangeRgbaColor('r', value) }), _jsx(Text, { style: { position: 'absolute', bottom: '-20px' }, children: "R" })] }), _jsxs("div", { style: rgbaStyling, children: [_jsx(InputNumberWrapper, { value: props.rgb?.g, controls: false, onChange: value => onChangeRgbaColor('g', value) }), _jsx(Text, { style: { position: 'absolute', bottom: '-20px' }, children: "G" })] }), _jsxs("div", { style: rgbaStyling, children: [_jsx(InputNumberWrapper, { value: props.rgb?.b, controls: false, onChange: value => onChangeRgbaColor('b', value) }), _jsx(Text, { style: { position: 'absolute', bottom: '-20px' }, children: "B" })] }), !isHideAlpha && (_jsxs("div", { style: rgbaStyling, children: [_jsx(InputNumberWrapper, { value: props.rgb?.a, controls: false, onChange: value => onChangeRgbaColor('a', value) }), _jsx(Text, { style: { position: 'absolute', bottom: '-20px' }, children: "A" })] }))] })) : (_jsxs(EditableInputWrapper, { children: [_jsx(EditableInput, { value: props.color, onChange: onChange }), _jsx(Text, { style: { position: 'absolute', bottom: '-20px' }, children: "HEX" })] })), _jsx(Button, { onClick: () => {
71
+ }, children: _jsx(Alpha, { ...restOf, pointer: HuePointer, onChange: onChange }) })] })] }), _jsxs("div", { style: { ...wrapperStyling, paddingBottom: 15 }, children: [_jsx(Icon, { type: "icon-ants-unfold-more", style: { cursor: 'pointer', fontSize: '20px' }, onClick: () => setShowRgbaInput(!isShowRgbaInput) }), isShowRgbaInput ? (_jsxs("div", { style: rgbaInputStyling, children: [_jsxs("div", { style: rgbaStyling, children: [_jsx(InputNumberWrapper, { value: props.rgb?.r, controls: false, onChange: value => onChangeRgbaColor('r', value) }), _jsx(Text, { style: { position: 'absolute', bottom: '-20px' }, children: "R" })] }), _jsxs("div", { style: rgbaStyling, children: [_jsx(InputNumberWrapper, { value: props.rgb?.g, controls: false, onChange: value => onChangeRgbaColor('g', value) }), _jsx(Text, { style: { position: 'absolute', bottom: '-20px' }, children: "G" })] }), _jsxs("div", { style: rgbaStyling, children: [_jsx(InputNumberWrapper, { value: props.rgb?.b, controls: false, onChange: value => onChangeRgbaColor('b', value) }), _jsx(Text, { style: { position: 'absolute', bottom: '-20px' }, children: "B" })] }), _jsxs("div", { style: rgbaStyling, children: [_jsx(InputNumberWrapper, { value: props.rgb?.a, controls: false, onChange: value => onChangeRgbaColor('a', value) }), _jsx(Text, { style: { position: 'absolute', bottom: '-20px' }, children: "A" })] })] })) : (_jsxs(EditableInputWrapper, { children: [_jsx(EditableInput, { value: props.color, onChange: onChange }), _jsx(Text, { style: { position: 'absolute', bottom: '-20px' }, children: "HEX" })] })), _jsx(Button, { onClick: () => {
72
72
  setShowRgbaInput(true);
73
73
  onChange('rgba(0, 0, 0, 0)');
74
74
  }, children: "Clear" })] }), presetColors ? (_jsxs("div", { children: [_jsx(Divider, {}), presetColors] })) : null] }));
@@ -3,7 +3,6 @@ export interface ColorPickerProps {
3
3
  className?: string;
4
4
  color?: string;
5
5
  presetColors?: any[] | ReactNode;
6
- isHideAlpha?: boolean;
7
6
  defaultColor?: string;
8
7
  icon?: React.ReactNode | string;
9
8
  onChange?: (color: string) => void;
@@ -22,7 +22,7 @@ const styleBtnColor = {
22
22
  };
23
23
  export const ColorPicker = props => {
24
24
  // Props
25
- const { className = '', defaultColor = '#000000', presetColors, positionInput = 'left', icon, showInput = true, style = {}, isHideAlpha, } = props;
25
+ const { className = '', defaultColor = '#000000', presetColors, positionInput = 'left', icon, showInput = true, style = {}, } = props;
26
26
  const { onChange = () => { } } = props;
27
27
  // States
28
28
  const [color, setColor] = useState(defaultColor);
@@ -71,7 +71,7 @@ export const ColorPicker = props => {
71
71
  const onPopoverVisibleChange = visible => {
72
72
  setPopoverVisible(visible);
73
73
  };
74
- return (_jsxs(ColorPickerWrapper, { className: `antsomi-color-picker ${className || ''}`, style: style, children: [showInput && positionInput === 'left' && (_jsx(Input, { style: { textTransform: 'uppercase' }, value: color, onChange: onChangeColorInput })), _jsx(Popover, { arrow: true, content: _jsx(CustomPicker, { color: color, presetColors: presetColors, isHideAlpha: isHideAlpha, onChange: onChangeColorPicker, onChangeComplete: onChangeComplete }), trigger: "click", open: popoverVisible, getPopupContainer: triggerNode => triggerNode, onOpenChange: onPopoverVisibleChange, children: _jsx("div", { className: "antsomi-popover-button", style: styleBtnColor, children: iconNode || (_jsx("span", { style: {
74
+ return (_jsxs(ColorPickerWrapper, { className: `antsomi-color-picker ${className || ''}`, style: style, children: [showInput && positionInput === 'left' && (_jsx(Input, { style: { textTransform: 'uppercase' }, value: color, onChange: onChangeColorInput })), _jsx(Popover, { arrow: true, content: _jsx(CustomPicker, { color: color, presetColors: presetColors, onChange: onChangeColorPicker, onChangeComplete: onChangeComplete }), trigger: "click", open: popoverVisible, getPopupContainer: triggerNode => triggerNode, onOpenChange: onPopoverVisibleChange, children: _jsx("div", { className: "antsomi-popover-button", style: styleBtnColor, children: iconNode || (_jsx("span", { style: {
75
75
  backgroundColor: color,
76
76
  display: 'block',
77
77
  width: 20,
@@ -83,7 +83,6 @@ ColorPicker.defaultProps = {
83
83
  className: '',
84
84
  color: '#000000',
85
85
  defaultColor: '#000000',
86
- isHideAlpha: false,
87
86
  onChange: () => { },
88
87
  showInput: true,
89
88
  positionInput: 'left',
@@ -16,7 +16,7 @@ import { safeParseJson } from '@antscorp/antsomi-ui/es/utils';
16
16
  import { POST_MESSAGE_TYPES } from '@antscorp/antsomi-ui/es/constants';
17
17
  export const DrawerDetail = props => {
18
18
  // Props
19
- const { width, fullScreen: fullScreenProp = false, children, menuProps, closeIconProps, maxWidth, minWidth, defaultSize = 'max', headerProps, name, destroyOnClose = true, mask = false, ...restProps } = props;
19
+ const { width, fullScreen: fullScreenProp = false, children, menuProps, closeIconProps, maxWidth, minWidth, defaultSize = 'max', headerProps, name, destroyOnClose = true, onToggleCollapse, ...restProps } = props;
20
20
  const { show: showMenu = true, showExpandButton = true, showClose = true, items, selectedKeys, footer, onClick = () => { }, } = menuProps || {};
21
21
  const { children: headerChildren, ...restOfHeaderProps } = headerProps || {};
22
22
  const { onClose = () => { } } = props;
@@ -47,25 +47,29 @@ export const DrawerDetail = props => {
47
47
  useEffect(() => {
48
48
  if (matchesSmallScreen) {
49
49
  toggleCollapseDrawer(false);
50
+ onToggleCollapse?.(false);
50
51
  }
51
52
  switch (defaultSize) {
52
53
  case 'max':
53
54
  toggleCollapseDrawer(false);
55
+ onToggleCollapse?.(false);
54
56
  break;
55
57
  case 'min':
56
58
  default:
57
59
  toggleCollapseDrawer(true);
60
+ onToggleCollapse?.(true);
58
61
  break;
59
62
  }
60
- }, [matchesSmallScreen, defaultSize, toggleCollapseDrawer]);
63
+ }, [matchesSmallScreen, defaultSize, toggleCollapseDrawer, onToggleCollapse]);
61
64
  // Get cache collapse from local storage
62
65
  useEffect(() => {
63
66
  const localStorageValues = safeParseJson(localStorage.getItem(DRAWER_DETAIL_LOCAL_STORAGE_KEY), {});
64
67
  const cachedCollapse = localStorageValues[name || ''];
65
68
  if (!isNil(cachedCollapse)) {
66
69
  toggleCollapseDrawer(cachedCollapse);
70
+ onToggleCollapse?.(cachedCollapse);
67
71
  }
68
- }, [name, toggleCollapseDrawer]);
72
+ }, [name, toggleCollapseDrawer, onToggleCollapse]);
69
73
  // Memo
70
74
  const drawerWidth = useMemo(() => {
71
75
  if (fullScreen)
@@ -98,6 +102,7 @@ export const DrawerDetail = props => {
98
102
  const handleToggleDrawerSize = () => {
99
103
  const localStorageValues = safeParseJson(localStorage.getItem(DRAWER_DETAIL_LOCAL_STORAGE_KEY), {});
100
104
  toggleCollapseDrawer(!collapseDrawer);
105
+ onToggleCollapse?.(!collapseDrawer);
101
106
  /**
102
107
  * Set local storage last collapsed
103
108
  */
@@ -115,7 +120,7 @@ export const DrawerDetail = props => {
115
120
  motionAppear: false,
116
121
  motionEnter: false,
117
122
  motionLeave: false,
118
- }, mask: mask, classNames: {
123
+ }, classNames: {
119
124
  body: 'drawer-detail-body',
120
125
  }, contentWrapperStyle: {
121
126
  transition: 'none',
@@ -126,5 +131,5 @@ export const DrawerDetail = props => {
126
131
  onClose(e);
127
132
  }, children: _jsx(Icon, { type: "icon-ants-remove-slim", size: 14 }) })), showExpandButton && !fullScreen && (_jsx(ToggleDrawerSizeButton, { style: {
128
133
  ...(!showMenu && { background: '#ffffff' }),
129
- }, onClick: () => handleToggleDrawerSize(), collapse: collapseDrawer })), showMenu && (_jsxs(LeftMenu, { "data-test": "left-menu", className: "animate__animated animate__fadeIn", children: [_jsxs("div", { children: [showClose && (_jsx(CloseBtn, { "data-test": "close-btn", onClick: onClose, children: _jsx(Icon, { type: "icon-ants-remove-slim", size: 14 }) })), _jsx(Flex, { vertical: true, gap: 10, align: "center", justify: "center", children: items?.map((item) => (_jsx(Tooltip, { title: item?.label, mouseEnterDelay: 0.3, placement: "right", children: _jsx(MenuItem, { className: selectedKeys?.includes(item.key) ? 'active' : '', onClick: () => onClick && onClick(item), children: item.icon }, item?.key) }, item?.key))) })] }), _jsx(MenuFooter, { children: footer })] })), _jsxs(Content, { className: "drawer-detail-content", children: [headerProps?.children && (_jsx(DrawerHeader, { align: "center", ...restOfHeaderProps, children: headerChildren })), children] })] }));
134
+ }, onClick: () => handleToggleDrawerSize(), collapse: collapseDrawer })), showMenu && (_jsxs(LeftMenu, { className: "animate__animated animate__fadeIn", children: [_jsxs("div", { children: [showClose && (_jsx(CloseBtn, { onClick: onClose, children: _jsx(Icon, { type: "icon-ants-remove-slim", size: 14 }) })), _jsx(Flex, { vertical: true, gap: 10, align: "center", justify: "center", children: items?.map((item) => (_jsx(Tooltip, { title: item?.label, mouseEnterDelay: 0.3, placement: "right", children: _jsx(MenuItem, { className: selectedKeys?.includes(item.key) ? 'active' : '', onClick: () => onClick && onClick(item), children: item.icon }, item?.key) }, item?.key))) })] }), _jsx(MenuFooter, { children: footer })] })), _jsxs(Content, { className: "drawer-detail-content", children: [headerProps?.children && (_jsx(DrawerHeader, { align: "center", ...restOfHeaderProps, children: headerChildren })), children] })] }));
130
135
  };
@@ -11,6 +11,7 @@ export interface DrawerDetailProps extends Omit<DrawerProps, 'closeIcon' | 'titl
11
11
  headerProps?: DrawerHeaderProps;
12
12
  menuProps?: DrawerDetailMenuProps;
13
13
  closeIconProps?: DrawerDetailCloseIconProps;
14
+ onToggleCollapse?: (collapsed: boolean) => void;
14
15
  }
15
16
  export interface DrawerDetailCloseIconProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
16
17
  show?: boolean;
@@ -52,7 +52,7 @@ export const EditableName = React.forwardRef((props, ref) => {
52
52
  inputRefElement?.input?.removeEventListener('wheel', preventWheel);
53
53
  };
54
54
  }, []);
55
- return (_jsxs(InputWrapperStyled, { "data-test": props['data-test'] || 'editable-name', className: className || '', style: style, ref: componentInViewRef, children: [_jsx(Tooltip, { title: value || internalValue, children: _jsx(Input, { readOnly: readonly, ref: inputRef, style: { width: inputWidth + 2 }, defaultValue: defaultValue.current, value: value, onChange: event => {
55
+ return (_jsxs(InputWrapperStyled, { className: className || '', style: style, ref: componentInViewRef, children: [_jsx(Tooltip, { title: value || internalValue, children: _jsx(Input, { readOnly: readonly, ref: inputRef, style: { width: inputWidth + 2 }, defaultValue: defaultValue.current, value: value, onChange: event => {
56
56
  const newValue = event.target.value;
57
57
  if (spanRef.current)
58
58
  spanRef.current.innerText = newValue;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import React, { useMemo } from 'react';
2
+ import { useMemo } from 'react';
3
3
  /* Components */
4
4
  import { Space } from '@antscorp/antsomi-ui/es/components/atoms/Space';
5
5
  import { Switch } from '@antscorp/antsomi-ui/es/components/atoms/Switch';
@@ -35,7 +35,7 @@ export const FontSettingEdit = ({ settings, styles, showSettings, onChange, }) =
35
35
  [settings]);
36
36
  const filteredSetting = useMemo(() => {
37
37
  if (!showSettings || showSettings?.length === 0) {
38
- return Object.keys(settingMap).map(keySetting => (_jsx(React.Fragment, { children: settingMap[keySetting] }, keySetting)));
38
+ return Object.keys(settingMap).map(keySetting => settingMap[keySetting]);
39
39
  }
40
40
  return showSettings.map(keySetting => settingMap[keySetting]);
41
41
  }, [showSettings, settingMap]);
@@ -54,11 +54,7 @@ export function MatchesAny(props) {
54
54
  threshold: 0,
55
55
  initialIsIntersecting: false,
56
56
  onChange(isIntersecting) {
57
- // Only load more items if the search input is empty and not in external search mode.
58
- // This prevents loading more items when the user is searching for something specific.
59
- const isNoNeedToLoadMore = !!searchValue && !isExternalSearch;
60
- if (isIntersecting && !isNoNeedToLoadMore) {
61
- // Load more items when the user reaches the end of the list.
57
+ if (isIntersecting) {
62
58
  onLoadMore();
63
59
  }
64
60
  },
@@ -383,5 +379,5 @@ export function MatchesAnySelect(props) {
383
379
  ...dropdownStyle,
384
380
  display: 'none',
385
381
  padding: 0,
386
- }, loading: loading, status: props.status || (error ? 'error' : undefined), ...restProps }), !!error && (_jsx(Text, { className: "ant-form-item-explain-error", type: "danger", children: error }))] }) }));
382
+ }, loading: loading, status: props.status || (error ? 'error' : undefined), ...restProps }), !!error && _jsx(Text, { className: 'ant-form-item-explain-error', type: 'danger', children: error })] }) }));
387
383
  }
@@ -1,10 +1,13 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef, useState } from 'react';
3
3
  import { Button, Flex, TextArea, Typography } from '@antscorp/antsomi-ui/es/components';
4
- import { translate as t, translations } from '@antscorp/antsomi-locales';
5
4
  // Styled
6
5
  import { RequestAccessStyled } from './styled';
6
+ // Translate
7
+ import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
8
+ import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
7
9
  import { BlockIcon } from '../../icons';
10
+ const { t } = i18nInstance;
8
11
  export const RequestAccess = props => {
9
12
  const { className, placeholder = t(translations.requestAccess.placeholder), deniedTitle = t(translations.requestAccess.deniedTitle), deniedSubTitle = t(translations.requestAccess.deniedSubTitle), sentTitle = t(translations.requestAccess.sentTitle), sentSubTitle = t(translations.requestAccess.sentSubTitle), requestText = t(translations.requestAccess.requestText), switchAccountText = t(translations.requestAccess.switchAccountText), onRequest, onSwitchAccount, } = props;
10
13
  const [isSentRequest, setIsSentRequest] = useState(false);
@@ -16,8 +19,10 @@ export const RequestAccess = props => {
16
19
  try {
17
20
  setIsLoading(true);
18
21
  onRequest(message)
19
- .then(() => {
20
- setIsSentRequest(true);
22
+ .then(data => {
23
+ if (data) {
24
+ setIsSentRequest(true);
25
+ }
21
26
  })
22
27
  .finally(() => setIsLoading(false));
23
28
  }
@@ -721,7 +721,7 @@ export const SAMPLE_RICHMENU = {
721
721
  displayDefault: true,
722
722
  },
723
723
  image: {
724
- imageUrl: 'https://s.cystack.net/portal/organizations/487b0f9dd9d8543312dc25e32ac71e4f/logo.jpg',
724
+ imageUrl: 'https://sandbox-st-media-template.antsomi.com/upload/2024/01/04/8d8cf39a-748f-435c-b6c6-b71b5facc739.gif',
725
725
  imageStyles: {
726
726
  borderTopLeftRadius: '0px',
727
727
  borderTopRightRadius: '0px',
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useEffect, useMemo, useRef, useState } from 'react';
3
3
  import { SearchPopover } from '../../SearchPopover';
4
4
  import './styles.scss';
5
- import { Button, Checkbox, Typography } from '../../../../atoms';
5
+ import { Button, Checkbox } from '../../../../atoms';
6
6
  import { StyledAction, StyledFooter, StyledListFieldsWrapper } from './styled';
7
7
  import { EmptyData } from '../../../EmptyData';
8
8
  import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
@@ -103,9 +103,7 @@ export const PopoverSelect = (props) => {
103
103
  if (typeof option.label === 'function') {
104
104
  return option.label({ selected: selectedKeys.has(option.key) });
105
105
  }
106
- return (_jsx(Typography.Text, { ellipsis: {
107
- tooltip: option.label,
108
- }, style: { maxWidth: 310 }, children: option.label }));
106
+ return option.label;
109
107
  };
110
108
  const items = filteredOptions.map(opt => ({
111
109
  key: opt.key,
@@ -1,28 +1,20 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // Libraries
3
- import { useContext, useState } from 'react';
3
+ import { useContext } from 'react';
4
4
  // Context
5
5
  import { SelectAccountContext } from './context';
6
6
  // Components
7
7
  import { ButtonViewAllStyled, ViewAllWrapper } from './styled';
8
- import { Icon, Input, Popover } from '../../atoms';
8
+ import { Popover } from '../../atoms';
9
9
  import AccountChip from './AccountChip';
10
- import { searchStringQuery } from '@antscorp/antsomi-ui/es/utils';
11
10
  const ButtonViewAll = () => {
12
11
  const { state, dispatch } = useContext(SelectAccountContext);
13
- const { usersSelected, nameKey, userIdKey, users, styles, showSearchViewAll } = state;
14
- const [search, setSearch] = useState('');
15
- const searchedUsers = showSearchViewAll
16
- ? usersSelected.filter(id => {
17
- const user = users.find(u => u?.[userIdKey] === id);
18
- return searchStringQuery(user?.[nameKey], search);
19
- })
20
- : usersSelected;
12
+ const { usersSelected, nameKey, userIdKey, users, styles } = state;
21
13
  const handleRemove = ({ userId, index }) => {
22
14
  dispatch({ type: 'REMOVE_USER', payload: { userId, index } });
23
15
  };
24
- const contentViewAll = () => (_jsxs(ViewAllWrapper, { children: [showSearchViewAll && (_jsx(Input, { value: search, placeholder: "Search", suffix: _jsx(Icon, { type: "icon-ants-search-2" }), onAfterChange: value => setSearch(value), debounce: 500 })), state.showOwnerDefault && _jsx(AccountChip, { label: "Owner", user: {}, value: "owner", disabled: true }), state.type === 'group'
25
- ? searchedUsers?.map((id, index) => {
16
+ const contentViewAll = () => (_jsxs(ViewAllWrapper, { children: [state.showOwnerDefault && _jsx(AccountChip, { label: "Owner", user: {}, value: "owner", disabled: true }), state.type === 'group'
17
+ ? usersSelected?.map((id, index) => {
26
18
  const group = state.listAccountGroup.find(u => u?.[state?.groupIdKey] === id);
27
19
  if (!group) {
28
20
  const user = users.find(u => u?.[userIdKey] === id);
@@ -32,7 +24,7 @@ const ButtonViewAll = () => {
32
24
  }
33
25
  return (_jsx(AccountChip, { user: group, value: group?.[state.groupIdKey], label: group?.[state?.groupNameKey], onRemove: () => handleRemove({ userId: group?.[state.groupIdKey], index }) }, group?.[state.groupIdKey]));
34
26
  })
35
- : searchedUsers?.map((id, index) => {
27
+ : usersSelected?.map((id, index) => {
36
28
  const user = users.find(u => u?.[userIdKey] === id);
37
29
  return (_jsx(AccountChip, { user: user, value: user?.[userIdKey], label: user?.[nameKey], onRemove: () => handleRemove({ userId: user?.[userIdKey], index }) }, user?.[userIdKey]));
38
30
  })] }));
@@ -10,11 +10,10 @@ import ButtonAdd from './ButtonAdd';
10
10
  import ButtonViewAll from './ButtonViewAll';
11
11
  export const Content = () => {
12
12
  const { state, dispatch } = useContext(SelectAccountContext);
13
- const { usersSelected, nameKey, userIdKey, users, disabled, className, styles, hideAddButton } = state;
13
+ const { usersSelected, nameKey, userIdKey, users, disabled, className, styles } = state;
14
14
  const handleRemove = ({ userId, index }) => {
15
15
  dispatch({ type: 'REMOVE_USER', payload: { userId, index } });
16
16
  };
17
- const isHideAddButton = hideAddButton || state?.isViewMode || (state?.onlyOne && usersSelected?.length);
18
17
  return (_jsxs(Wrapper, { className: `select-account ${className}`, style: { ...(styles?.wrapper || {}) }, disabled: !!disabled, children: [state.showOwnerDefault && _jsx(AccountChip, { label: "Owner", user: {}, value: "owner", disabled: true }), state.type === 'group'
19
18
  ? usersSelected?.map((id, index) => {
20
19
  if (index >= state?.limitShow)
@@ -35,5 +34,5 @@ export const Content = () => {
35
34
  if (!user)
36
35
  return null;
37
36
  return (_jsx(AccountChip, { user: user, value: user?.[userIdKey], label: user?.[nameKey], onRemove: () => handleRemove({ userId: user?.[userIdKey], index }) }, user?.[userIdKey]));
38
- }), state?.usersSelected?.length > state?.limitShow && _jsx(ButtonViewAll, {}), isHideAddButton ? null : _jsx(ButtonAdd, {})] }));
37
+ }), state?.usersSelected?.length > state?.limitShow && _jsx(ButtonViewAll, {}), !state?.isViewMode && (!state?.onlyOne || !usersSelected?.length) && _jsx(ButtonAdd, {})] }));
39
38
  };
@@ -136,10 +136,6 @@ export const ViewAllWrapper = styled.div `
136
136
  flex-wrap: wrap;
137
137
  max-width: 300px;
138
138
  padding: 15px;
139
-
140
- .input__wrapper {
141
- width: 100%;
142
- }
143
139
  `;
144
140
  export const ItemOnlyOne = styled.div `
145
141
  padding: 8px 10px;
@@ -31,8 +31,6 @@ export type SelectAccountProps = {
31
31
  disabledAccount?: any[];
32
32
  limit?: number;
33
33
  limitShow?: number;
34
- hideAddButton?: boolean;
35
- showSearchViewAll?: boolean;
36
34
  className?: string;
37
35
  styles?: {
38
36
  wrapper?: React.CSSProperties;