@antscorp/antsomi-ui 2.0.19 → 2.0.26

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 (268) hide show
  1. package/es/components/atoms/Image/Image.d.ts +2 -0
  2. package/es/components/atoms/Image/Image.js +1 -0
  3. package/es/components/atoms/Image/index.d.ts +1 -0
  4. package/es/components/atoms/Image/index.js +1 -0
  5. package/es/components/atoms/Tag/Tag.d.ts +10 -1
  6. package/es/components/atoms/Tag/Tag.js +41 -1
  7. package/es/components/atoms/index.d.ts +2 -0
  8. package/es/components/atoms/index.js +1 -0
  9. package/es/components/icons/IdentityGraphIcon.d.ts +3 -0
  10. package/es/components/icons/IdentityGraphIcon.js +7 -0
  11. package/es/components/icons/LazyIcon/LazyIcon.d.ts +2 -0
  12. package/es/components/icons/LazyIcon/LazyIcon.js +2 -0
  13. package/es/components/icons/VisitorInformationIcon.d.ts +3 -0
  14. package/es/components/icons/VisitorInformationIcon.js +7 -0
  15. package/es/components/icons/document/IconGallery.js +11 -10
  16. package/es/components/icons/index.d.ts +2 -0
  17. package/es/components/icons/index.js +2 -0
  18. package/es/components/molecules/CalendarSelection/components/RangePicker/RangePicker.d.ts +1 -1
  19. package/es/components/molecules/CalendarSelection/utils.d.ts +1 -1
  20. package/es/components/molecules/CalendarSelection/utils.js +6 -1
  21. package/es/components/molecules/FontFamilySelect/index.js +0 -2
  22. package/es/components/molecules/IconSelection/components/Icon/index.js +1 -1
  23. package/es/components/molecules/MatchAnySelect/utils.js +16 -0
  24. package/es/components/molecules/SearchPopover/SearchPopover.js +2 -1
  25. package/es/components/molecules/Select/styled.d.ts +4 -1
  26. package/es/components/molecules/SelectMulti/index.js +2 -1
  27. package/es/components/molecules/SelectMulti/styled.js +1 -1
  28. package/es/components/molecules/ShareAccess/constants.d.ts +1 -1
  29. package/es/components/molecules/ShareAccess/constants.js +1 -1
  30. package/es/components/molecules/TagifyInput/constants.js +1 -1
  31. package/es/components/molecules/TreeSelect/TreeSelect.d.ts +1 -1
  32. package/es/components/molecules/index.d.ts +1 -0
  33. package/es/components/organism/AccountProfile/components/AccountSetting/AccountSetting.js +8 -8
  34. package/es/components/organism/AccountSharing/AccountSharing.js +2 -1
  35. package/es/components/organism/ActivityTimeline/ActivityTimeline.d.ts +2 -0
  36. package/es/components/organism/ActivityTimeline/ActivityTimeline.js +99 -0
  37. package/es/components/organism/ActivityTimeline/__mocks__/event_tracking.json +1556 -0
  38. package/es/components/organism/ActivityTimeline/__mocks__/timeline.json +2876 -0
  39. package/es/components/organism/ActivityTimeline/components/ActionHistory/ActionHistory.d.ts +7 -0
  40. package/es/components/organism/ActivityTimeline/components/ActionHistory/ActionHistory.js +8 -0
  41. package/es/components/organism/ActivityTimeline/components/ActionHistory/index.d.ts +1 -0
  42. package/es/components/organism/ActivityTimeline/components/ActionHistory/index.js +1 -0
  43. package/es/components/organism/ActivityTimeline/components/ActionHistory/styled.d.ts +5 -0
  44. package/es/components/organism/ActivityTimeline/components/ActionHistory/styled.js +36 -0
  45. package/es/components/organism/ActivityTimeline/components/CardMember/CardMember.d.ts +5 -0
  46. package/es/components/organism/ActivityTimeline/components/CardMember/CardMember.js +29 -0
  47. package/es/components/organism/ActivityTimeline/components/CardMember/index.d.ts +1 -0
  48. package/es/components/organism/ActivityTimeline/components/CardMember/index.js +1 -0
  49. package/es/components/organism/ActivityTimeline/components/CardMember/styled.d.ts +4 -0
  50. package/es/components/organism/ActivityTimeline/components/CardMember/styled.js +65 -0
  51. package/es/components/organism/ActivityTimeline/components/Icon/Icon.d.ts +5 -0
  52. package/es/components/organism/ActivityTimeline/components/Icon/Icon.js +21 -0
  53. package/es/components/organism/ActivityTimeline/components/Icon/index.d.ts +1 -0
  54. package/es/components/organism/ActivityTimeline/components/Icon/index.js +1 -0
  55. package/es/components/organism/ActivityTimeline/components/ItemEvent/ItemEvent.d.ts +10 -0
  56. package/es/components/organism/ActivityTimeline/components/ItemEvent/ItemEvent.js +32 -0
  57. package/es/components/organism/ActivityTimeline/components/ItemEvent/index.d.ts +1 -0
  58. package/es/components/organism/ActivityTimeline/components/ItemEvent/index.js +1 -0
  59. package/es/components/organism/ActivityTimeline/components/ItemGroupEvent/ItemGroupEvent.d.ts +13 -0
  60. package/es/components/organism/ActivityTimeline/components/ItemGroupEvent/ItemGroupEvent.js +63 -0
  61. package/es/components/organism/ActivityTimeline/components/ItemGroupEvent/index.d.ts +1 -0
  62. package/es/components/organism/ActivityTimeline/components/ItemGroupEvent/index.js +1 -0
  63. package/es/components/organism/ActivityTimeline/components/ItemGroupEvent/styled.d.ts +1 -0
  64. package/es/components/organism/ActivityTimeline/components/ItemGroupEvent/styled.js +6 -0
  65. package/es/components/organism/ActivityTimeline/components/List/List.d.ts +12 -0
  66. package/es/components/organism/ActivityTimeline/components/List/List.js +29 -0
  67. package/es/components/organism/ActivityTimeline/components/List/index.d.ts +1 -0
  68. package/es/components/organism/ActivityTimeline/components/List/index.js +1 -0
  69. package/es/components/organism/ActivityTimeline/components/List/styled.d.ts +14 -0
  70. package/es/components/organism/ActivityTimeline/components/List/styled.js +105 -0
  71. package/es/components/organism/ActivityTimeline/components/ListItem/ListItem.d.ts +7 -0
  72. package/es/components/organism/ActivityTimeline/components/ListItem/ListItem.js +6 -0
  73. package/es/components/organism/ActivityTimeline/components/ListItem/index.d.ts +2 -0
  74. package/es/components/organism/ActivityTimeline/components/ListItem/index.js +2 -0
  75. package/es/components/organism/ActivityTimeline/components/ListItem/styled.d.ts +8 -0
  76. package/es/components/organism/ActivityTimeline/components/ListItem/styled.js +53 -0
  77. package/es/components/organism/ActivityTimeline/components/ProductCard/ProductCard.d.ts +10 -0
  78. package/es/components/organism/ActivityTimeline/components/ProductCard/ProductCard.js +8 -0
  79. package/es/components/organism/ActivityTimeline/components/ProductCard/index.d.ts +1 -0
  80. package/es/components/organism/ActivityTimeline/components/ProductCard/index.js +1 -0
  81. package/es/components/organism/ActivityTimeline/components/ProductCard/styled.d.ts +6 -0
  82. package/es/components/organism/ActivityTimeline/components/ProductCard/styled.js +98 -0
  83. package/es/components/organism/ActivityTimeline/components/Redeem/Redeem.d.ts +6 -0
  84. package/es/components/organism/ActivityTimeline/components/Redeem/Redeem.js +10 -0
  85. package/es/components/organism/ActivityTimeline/components/Redeem/index.d.ts +1 -0
  86. package/es/components/organism/ActivityTimeline/components/Redeem/index.js +1 -0
  87. package/es/components/organism/ActivityTimeline/components/Redeem/styled.d.ts +2 -0
  88. package/es/components/organism/ActivityTimeline/components/Redeem/styled.js +10 -0
  89. package/es/components/organism/ActivityTimeline/components/Slide/Slide.d.ts +8 -0
  90. package/es/components/organism/ActivityTimeline/components/Slide/Slide.js +19 -0
  91. package/es/components/organism/ActivityTimeline/components/Slide/index.d.ts +1 -0
  92. package/es/components/organism/ActivityTimeline/components/Slide/index.js +1 -0
  93. package/es/components/organism/ActivityTimeline/components/Slide/styled.d.ts +97 -0
  94. package/es/components/organism/ActivityTimeline/components/Slide/styled.js +25 -0
  95. package/es/components/organism/ActivityTimeline/components/TimeLineTitle/TimelineTitle.d.ts +7 -0
  96. package/es/components/organism/ActivityTimeline/components/TimeLineTitle/TimelineTitle.js +19 -0
  97. package/es/components/organism/ActivityTimeline/components/TimeLineTitle/index.d.ts +1 -0
  98. package/es/components/organism/ActivityTimeline/components/TimeLineTitle/index.js +1 -0
  99. package/es/components/organism/ActivityTimeline/components/TimeLineTitle/styled.d.ts +3 -0
  100. package/es/components/organism/ActivityTimeline/components/TimeLineTitle/styled.js +11 -0
  101. package/es/components/organism/ActivityTimeline/components/TimelineSection/TimelineSection.d.ts +10 -0
  102. package/es/components/organism/ActivityTimeline/components/TimelineSection/TimelineSection.js +7 -0
  103. package/es/components/organism/ActivityTimeline/components/TimelineSection/index.d.ts +0 -0
  104. package/es/components/organism/ActivityTimeline/components/TimelineSection/index.js +1 -0
  105. package/es/components/organism/ActivityTimeline/components/TimelineSection/styled.d.ts +14 -0
  106. package/es/components/organism/ActivityTimeline/components/TimelineSection/styled.js +82 -0
  107. package/es/components/organism/ActivityTimeline/components/index.d.ts +9 -0
  108. package/es/components/organism/ActivityTimeline/components/index.js +9 -0
  109. package/es/components/organism/ActivityTimeline/constants.d.ts +1571 -0
  110. package/es/components/organism/ActivityTimeline/constants.js +566 -0
  111. package/es/components/organism/ActivityTimeline/index.d.ts +2 -0
  112. package/es/components/organism/ActivityTimeline/index.js +1 -0
  113. package/es/components/organism/ActivityTimeline/styled.d.ts +7 -0
  114. package/es/components/organism/ActivityTimeline/styled.js +46 -0
  115. package/es/components/organism/ActivityTimeline/types.d.ts +20 -0
  116. package/es/components/organism/ActivityTimeline/utils.d.ts +16 -0
  117. package/es/components/organism/ActivityTimeline/utils.js +393 -0
  118. package/es/components/organism/AlgorithmsSetting/index.d.ts +1 -0
  119. package/es/components/organism/AlgorithmsSetting/index.js +2 -2
  120. package/es/components/organism/ContentSources/Content.d.ts +2 -0
  121. package/es/components/organism/ContentSources/Content.js +4 -3
  122. package/es/components/organism/ContentSources/Group.d.ts +2 -0
  123. package/es/components/organism/ContentSources/Group.js +5 -4
  124. package/es/components/organism/ContentSources/Settings.d.ts +2 -0
  125. package/es/components/organism/ContentSources/Settings.js +12 -12
  126. package/es/components/organism/ContentSources/components/LevelSetting/index.js +4 -1
  127. package/es/components/organism/ContentSources/index.d.ts +2 -0
  128. package/es/components/organism/ContentSources/index.js +4 -3
  129. package/es/components/organism/DataTable/components/Toolbar/index.js +11 -20
  130. package/es/components/organism/DataTable/components/index.d.ts +0 -1
  131. package/es/components/organism/DataTable/components/index.js +0 -1
  132. package/es/components/organism/DataTable/hooks/index.d.ts +0 -1
  133. package/es/components/organism/DataTable/hooks/index.js +0 -1
  134. package/es/components/organism/DataTable/hooks/useDataTableListing/constants.d.ts +1 -1
  135. package/es/components/organism/DataTable/hooks/useDataTableListing/constants.js +1 -1
  136. package/es/components/organism/DataTable/hooks/useDataTableListing/types.d.ts +2 -1
  137. package/es/components/organism/DataTable/hooks/useDataTableListing/useDataTableListing.d.ts +2 -1
  138. package/es/components/organism/DataTable/index.d.ts +2 -1
  139. package/es/components/organism/DataTable/types/index.d.ts +1 -2
  140. package/es/components/organism/DataTable/types/index.js +0 -1
  141. package/es/components/organism/DataTable/utils/filter.d.ts +1 -2
  142. package/es/components/organism/Filter/Filter.d.ts +4 -0
  143. package/es/components/organism/Filter/Filter.js +32 -0
  144. package/es/components/organism/{DataTable/components/Filter → Filter/components}/AddFilterButton.js +2 -2
  145. package/es/components/organism/{DataTable/components/Filter → Filter/components}/FilterActionButton.js +8 -9
  146. package/es/components/organism/{DataTable/components/Filter → Filter/components}/FilterCondition/index.d.ts +1 -1
  147. package/es/components/organism/{DataTable/components/Filter → Filter/components}/FilterCondition/index.js +2 -2
  148. package/es/components/organism/{DataTable/components/Filter → Filter/components}/FilterConditionList.js +4 -5
  149. package/es/components/organism/{DataTable/components/Filter → Filter/components}/FilterItem.js +1 -1
  150. package/es/components/organism/{DataTable/components/Filter → Filter/components}/SaveFilterPopover.js +1 -1
  151. package/es/components/organism/{DataTable/components/Filter → Filter/components}/SavedFilterAndMetrics.js +5 -6
  152. package/es/components/organism/Filter/components/index.d.ts +6 -0
  153. package/es/components/organism/Filter/components/index.js +6 -0
  154. package/es/components/organism/Filter/constants/index.d.ts +40 -0
  155. package/es/components/organism/Filter/constants/index.js +63 -0
  156. package/es/components/organism/Filter/contexts/FilterContext.d.ts +4 -0
  157. package/es/components/organism/Filter/contexts/FilterContext.js +3 -0
  158. package/es/components/organism/Filter/contexts/index.d.ts +1 -0
  159. package/es/components/organism/Filter/contexts/index.js +1 -0
  160. package/es/components/organism/Filter/hooks/index.d.ts +2 -0
  161. package/es/components/organism/Filter/hooks/index.js +2 -0
  162. package/es/components/organism/{DataTable/hooks/useAddFilterButton.js → Filter/hooks/useAddFilterCondition.js} +3 -3
  163. package/es/components/organism/Filter/hooks/useFilterContext.d.ts +2 -0
  164. package/es/components/organism/Filter/hooks/useFilterContext.js +16 -0
  165. package/es/components/organism/Filter/index.d.ts +2 -0
  166. package/es/components/organism/Filter/index.js +1 -0
  167. package/es/components/organism/Filter/providers/AntdFilterConfigProvider.d.ts +6 -0
  168. package/es/components/organism/Filter/providers/AntdFilterConfigProvider.js +8 -0
  169. package/es/components/organism/Filter/providers/FilterProvider.d.ts +6 -0
  170. package/es/components/organism/Filter/providers/FilterProvider.js +22 -0
  171. package/es/components/organism/Filter/providers/index.d.ts +1 -0
  172. package/es/components/organism/Filter/providers/index.js +1 -0
  173. package/es/components/organism/Filter/store/FilterStore.d.ts +2 -0
  174. package/es/components/organism/Filter/store/FilterStore.js +10 -0
  175. package/es/components/organism/Filter/store/index.d.ts +1 -0
  176. package/es/components/organism/Filter/store/index.js +1 -0
  177. package/es/components/organism/{DataTable/components/Filter → Filter}/styled.d.ts +6 -1
  178. package/es/components/organism/{DataTable/components/Filter → Filter}/styled.js +49 -1
  179. package/es/components/organism/{DataTable/types/filter.d.ts → Filter/types/index.d.ts} +10 -2
  180. package/es/components/organism/Filter/types/index.js +1 -0
  181. package/es/components/organism/Filter/utils/index.d.ts +95 -0
  182. package/es/components/organism/Filter/utils/index.js +242 -0
  183. package/es/components/organism/FilterSetting/components/common/InputOrSelect/index.d.ts +1 -1
  184. package/es/components/organism/Login/components/VerifyAccount/styled.d.ts +1 -1
  185. package/es/components/organism/Login/styled.d.ts +1 -1
  186. package/es/components/organism/index.d.ts +2 -0
  187. package/es/components/organism/index.js +2 -0
  188. package/es/constants/api.d.ts +7 -0
  189. package/es/constants/api.js +10 -3
  190. package/es/constants/condition.d.ts +8 -8
  191. package/es/constants/datetime.d.ts +65 -0
  192. package/es/constants/datetime.js +65 -0
  193. package/es/constants/index.d.ts +1 -0
  194. package/es/constants/index.js +1 -0
  195. package/es/constants/portal.d.ts +12 -0
  196. package/es/constants/portal.js +12 -0
  197. package/es/constants/queries.d.ts +1 -0
  198. package/es/constants/queries.js +2 -0
  199. package/es/constants/theme.js +8 -3
  200. package/es/constants/variables.d.ts +26 -0
  201. package/es/constants/variables.js +23 -0
  202. package/es/hooks/index.d.ts +1 -0
  203. package/es/hooks/index.js +1 -0
  204. package/es/index.d.ts +3 -1
  205. package/es/index.js +3 -1
  206. package/es/locales/en/google-sheet.json +2686 -0
  207. package/es/locales/i18n.d.ts +8046 -0
  208. package/es/locales/i18n.js +17 -4
  209. package/es/locales/index.d.ts +2 -0
  210. package/es/locales/index.js +2 -0
  211. package/es/locales/ja/google-sheet.json +2673 -2619
  212. package/es/locales/translations.d.ts +1 -686
  213. package/es/locales/translations.js +0 -10
  214. package/es/locales/types.d.ts +1 -1
  215. package/es/locales/vi/google-sheet.json +2685 -2631
  216. package/es/models/Attribute.d.ts +28 -0
  217. package/es/models/Attribute.js +1 -0
  218. package/es/models/LoggedUser.d.ts +12 -0
  219. package/es/models/LoggedUser.js +1 -0
  220. package/es/providers/AppConfigProvider/contexts/index.js +13 -2
  221. package/es/providers/ConfigProvider/ConfigProvider.js +11 -13
  222. package/es/providers/ConfigProvider/GlobalStyle.js +12 -0
  223. package/es/queries/User/index.d.ts +8 -0
  224. package/es/queries/User/index.js +20 -0
  225. package/es/queries/User/userGetUserInfo.d.ts +5 -0
  226. package/es/queries/User/userGetUserInfo.js +30 -0
  227. package/es/queries/index.d.ts +1 -0
  228. package/es/queries/index.js +1 -0
  229. package/es/services/MediaTemplateDesign/BusinessObject/index.d.ts +1 -0
  230. package/es/services/MediaTemplateDesign/BusinessObject/index.js +4 -1
  231. package/es/services/User/getUserInfo.d.ts +8 -0
  232. package/es/services/User/getUserInfo.js +22 -0
  233. package/es/services/User/index.d.ts +9 -0
  234. package/es/services/User/index.js +27 -0
  235. package/es/styled/common.d.ts +4 -0
  236. package/es/styled/common.js +35 -0
  237. package/es/test.js +2 -2
  238. package/es/tests/FilterTest.d.ts +5 -0
  239. package/es/tests/FilterTest.js +6 -0
  240. package/es/tests/index.d.ts +1 -0
  241. package/es/tests/index.js +1 -0
  242. package/es/types/date.d.ts +9 -0
  243. package/es/types/date.js +1 -0
  244. package/es/types/index.d.ts +1 -0
  245. package/es/types/index.js +1 -0
  246. package/es/utils/attribute.d.ts +21 -0
  247. package/es/utils/attribute.js +100 -0
  248. package/es/utils/common.d.ts +7 -1
  249. package/es/utils/common.js +77 -0
  250. package/es/utils/date.d.ts +12 -0
  251. package/es/utils/date.js +69 -0
  252. package/es/utils/index.d.ts +2 -0
  253. package/es/utils/index.js +2 -0
  254. package/es/utils/portal.d.ts +87 -0
  255. package/es/utils/portal.js +242 -0
  256. package/package.json +9 -5
  257. package/es/components/organism/DataTable/components/Filter/index.d.ts +0 -5
  258. package/es/components/organism/DataTable/components/Filter/index.js +0 -11
  259. /package/es/components/organism/{DataTable/types/filter.js → ActivityTimeline/types.js} +0 -0
  260. /package/es/components/organism/{DataTable/components/Filter → Filter/components}/AddFilterButton.d.ts +0 -0
  261. /package/es/components/organism/{DataTable/components/Filter → Filter/components}/FilterActionButton.d.ts +0 -0
  262. /package/es/components/organism/{DataTable/components/Filter → Filter/components}/FilterCondition/styled.d.ts +0 -0
  263. /package/es/components/organism/{DataTable/components/Filter → Filter/components}/FilterCondition/styled.js +0 -0
  264. /package/es/components/organism/{DataTable/components/Filter → Filter/components}/FilterConditionList.d.ts +0 -0
  265. /package/es/components/organism/{DataTable/components/Filter → Filter/components}/FilterItem.d.ts +0 -0
  266. /package/es/components/organism/{DataTable/components/Filter → Filter/components}/SaveFilterPopover.d.ts +0 -0
  267. /package/es/components/organism/{DataTable/components/Filter → Filter/components}/SavedFilterAndMetrics.d.ts +0 -0
  268. /package/es/components/organism/{DataTable/hooks/useAddFilterButton.d.ts → Filter/hooks/useAddFilterCondition.d.ts} +0 -0
@@ -0,0 +1,2 @@
1
+ export { Image } from 'antd';
2
+ export type { ImageProps } from 'antd';
@@ -0,0 +1 @@
1
+ export { Image } from 'antd';
@@ -0,0 +1 @@
1
+ export * from './Image';
@@ -0,0 +1 @@
1
+ export * from './Image';
@@ -1,2 +1,11 @@
1
+ import React from 'react';
2
+ import { TagProps } from 'antd';
1
3
  import { TagType } from 'antd/lib';
2
- export declare const Tag: TagType;
4
+ export interface TagListProps {
5
+ tags: string[];
6
+ tagProps?: TagProps;
7
+ limit?: number;
8
+ }
9
+ export declare const Tag: TagType & {
10
+ List: React.FC<TagListProps>;
11
+ };
@@ -1,10 +1,23 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /* eslint-disable react/no-array-index-key */
3
+ // Libraries
4
+ import { useMemo, useState } from 'react';
2
5
  import { Tag as AntdTag } from 'antd';
3
6
  import styled from 'styled-components';
4
7
  // Icons
5
8
  import { CloseIcon } from '../../icons';
9
+ // Components
10
+ import { Flex } from '../Flex';
11
+ import { Button } from '../Button';
12
+ import { Typography } from '../Typography';
13
+ import { SearchPopover } from '../../molecules';
6
14
  // Constants
7
15
  import { globalToken } from '@antscorp/antsomi-ui/es/constants';
16
+ import { translate, translations } from '@antscorp/antsomi-ui/es/locales';
17
+ // Utils
18
+ import { searchStringQuery } from '@antscorp/antsomi-ui/es/utils';
19
+ import { Scrollbars } from '../Scrollbars';
20
+ const { Text } = Typography;
8
21
  const CloseBtn = styled.div `
9
22
  display: flex;
10
23
  align-items: center;
@@ -14,9 +27,36 @@ const CloseBtn = styled.div `
14
27
  background-color: #fff;
15
28
  border-radius: 100%;
16
29
  `;
30
+ const AllTagsContainer = styled(Flex) `
31
+ padding: 10px;
32
+ `;
17
33
  const OriginTag = props => {
18
34
  const { closable = false, closeIcon = (_jsx(CloseBtn, { children: _jsx(CloseIcon, { size: 14, color: globalToken?.colorPrimary }) })), ...restOfProps } = props;
19
35
  return _jsx(AntdTag, { ...restOfProps, closable: closable, closeIcon: closable ? closeIcon : null });
20
36
  };
37
+ const TagList = props => {
38
+ const { tags, tagProps, limit = 2 } = props;
39
+ const [state, setState] = useState({
40
+ open: false,
41
+ searchValue: '',
42
+ selected: [],
43
+ });
44
+ const { searchValue } = state;
45
+ const filteredTags = useMemo(() => tags.filter(tag => searchStringQuery(tag, searchValue)), [tags, searchValue]);
46
+ const renderTags = () => tags.slice(0, limit).map((tag, index) => (_jsx(OriginTag, { ...tagProps, children: _jsx(Text, { ellipsis: { tooltip: true }, children: tag }) }, index)));
47
+ const renderAllTags = () => (_jsx(Scrollbars, { autoHeight: true, autoHeightMax: 300, children: _jsx(AllTagsContainer, { gap: "8px 0px", wrap: "wrap", children: filteredTags.map((tag, index) => (_jsx(OriginTag, { ...tagProps, children: _jsx(Text, { ellipsis: { tooltip: true }, children: tag }) }, index))) }) }));
48
+ const renderShowMoreTags = () => {
49
+ if (tags.length > limit) {
50
+ return (_jsx(SearchPopover, { content: renderAllTags(), overlayInnerStyle: { width: 300 }, inputSearchProps: {
51
+ onAfterChange(value) {
52
+ setState(prev => ({ ...prev, searchValue: value }));
53
+ },
54
+ }, children: _jsx(Button, { type: "text", children: translate(translations.viewAll) }) }));
55
+ }
56
+ return null;
57
+ };
58
+ return (_jsxs(Flex, { children: [renderTags(), " ", renderShowMoreTags()] }));
59
+ };
21
60
  export const Tag = OriginTag;
22
61
  Tag.CheckableTag = AntdTag.CheckableTag;
62
+ Tag.List = TagList;
@@ -30,6 +30,7 @@ export { Rate } from './Rate';
30
30
  export { SliderV2 } from './SliderV2';
31
31
  export { InputDynamic } from './InputDynamic';
32
32
  export { ContentEditable } from './ContentEditable';
33
+ export { Image } from './Image';
33
34
  export * from './Flex';
34
35
  export * from './PreviewTabs';
35
36
  export * from './MobileFrame';
@@ -46,3 +47,4 @@ export * from './Avatar';
46
47
  export type { SliderProps } from './Slider';
47
48
  export type { PaginationProps } from './Pagination';
48
49
  export type { InputDynamicProps } from './InputDynamic';
50
+ export type { ImageProps } from './Image';
@@ -30,6 +30,7 @@ export { Rate } from './Rate';
30
30
  export { SliderV2 } from './SliderV2';
31
31
  export { InputDynamic } from './InputDynamic';
32
32
  export { ContentEditable } from './ContentEditable';
33
+ export { Image } from './Image';
33
34
  export * from './Flex';
34
35
  export * from './PreviewTabs';
35
36
  export * from './MobileFrame';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './types';
3
+ export declare const IdentityGraphIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { useIcon } from './hooks/useIcon';
4
+ export const IdentityGraphIcon = forwardRef((props, ref) => {
5
+ const { width, height } = useIcon(props);
6
+ return (_jsxs("svg", { viewBox: "0 0 30 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, ref: ref, width: width, height: height, children: [_jsx("path", { d: "M12.5 8.5C14.1569 8.5 15.5 7.15685 15.5 5.5C15.5 3.84315 14.1569 2.5 12.5 2.5C10.8431 2.5 9.5 3.84315 9.5 5.5C9.5 7.15685 10.8431 8.5 12.5 8.5Z", fill: "#595959" }), _jsx("path", { d: "M7.5 13C8.88071 13 10 11.8807 10 10.5C10 9.11929 8.88071 8 7.5 8C6.11929 8 5 9.11929 5 10.5C5 11.8807 6.11929 13 7.5 13Z", stroke: "#585858" }), _jsx("path", { d: "M20.5 21C21.8807 21 23 19.8807 23 18.5C23 17.1193 21.8807 16 20.5 16C19.1193 16 18 17.1193 18 18.5C18 19.8807 19.1193 21 20.5 21Z", stroke: "#585858" }), _jsx("path", { d: "M20.5 6C21.8807 6 23 4.88071 23 3.5C23 2.11929 21.8807 1 20.5 1C19.1193 1 18 2.11929 18 3.5C18 4.88071 19.1193 6 20.5 6Z", stroke: "#585858" }), _jsx("path", { d: "M15.5 14.5C17.1569 14.5 18.5 13.1569 18.5 11.5C18.5 9.84315 17.1569 8.5 15.5 8.5C13.8431 8.5 12.5 9.84315 12.5 11.5C12.5 13.1569 13.8431 14.5 15.5 14.5Z", fill: "#595959" }), _jsx("path", { d: "M22.5 14.5C24.1569 14.5 25.5 13.1569 25.5 11.5C25.5 9.84315 24.1569 8.5 22.5 8.5C20.8431 8.5 19.5 9.84315 19.5 11.5C19.5 13.1569 20.8431 14.5 22.5 14.5Z", fill: "#595959" }), _jsx("path", { d: "M11.5 20.5C13.1569 20.5 14.5 19.1569 14.5 17.5C14.5 15.8431 13.1569 14.5 11.5 14.5C9.84315 14.5 8.5 15.8431 8.5 17.5C8.5 19.1569 9.84315 20.5 11.5 20.5Z", fill: "#595959" }), _jsx("path", { d: "M16 12L13 6", stroke: "#595959", strokeLinecap: "round" }), _jsx("path", { d: "M15.5883 11.5738L10.5 11.2578", stroke: "#595959", strokeLinecap: "round" }), _jsx("path", { d: "M16 12L11 17", stroke: "#595959", strokeLinecap: "round" }), _jsx("path", { d: "M18.9301 6.03716L16.6643 9.61607", stroke: "#595959", strokeLinecap: "round" }), _jsx("path", { d: "M16.5 13.5005L18.5 16.5006", stroke: "#595959", strokeLinecap: "round" }), _jsx("path", { d: "M16 12H23", stroke: "#595959", strokeLinecap: "round" })] }));
7
+ });
@@ -196,6 +196,7 @@ export declare const LazyIcon: {
196
196
  HomeIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
197
197
  HowToRegIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
198
198
  IdeaIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
199
+ IdentityGraphIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
199
200
  ImageIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
200
201
  InactiveIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
201
202
  InactiveVariantIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
@@ -362,6 +363,7 @@ export declare const LazyIcon: {
362
363
  VisibilityOffEyeIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
363
364
  Visitor30Icon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
364
365
  VisitorIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
366
+ VisitorInformationIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
365
367
  WarningIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
366
368
  WebAssetIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
367
369
  WebIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
@@ -202,6 +202,7 @@ export const LazyIcon = {
202
202
  HomeIcon: lazy(() => import('../HomeIcon').then(m => ({ default: m.HomeIcon }))),
203
203
  HowToRegIcon: lazy(() => import('../HowToRegIcon').then(m => ({ default: m.HowToRegIcon }))),
204
204
  IdeaIcon: lazy(() => import('../IdeaIcon').then(m => ({ default: m.IdeaIcon }))),
205
+ IdentityGraphIcon: lazy(() => import('../IdentityGraphIcon').then(m => ({ default: m.IdentityGraphIcon }))),
205
206
  ImageIcon: lazy(() => import('../ImageIcon').then(m => ({ default: m.ImageIcon }))),
206
207
  InactiveIcon: lazy(() => import('../InactiveIcon').then(m => ({ default: m.InactiveIcon }))),
207
208
  InactiveVariantIcon: lazy(() => import('../InactiveVariantIcon').then(m => ({ default: m.InactiveVariantIcon }))),
@@ -368,6 +369,7 @@ export const LazyIcon = {
368
369
  VisibilityOffEyeIcon: lazy(() => import('../VisibilityOffEyeIcon').then(m => ({ default: m.VisibilityOffEyeIcon }))),
369
370
  Visitor30Icon: lazy(() => import('../Visitor30Icon').then(m => ({ default: m.Visitor30Icon }))),
370
371
  VisitorIcon: lazy(() => import('../VisitorIcon').then(m => ({ default: m.VisitorIcon }))),
372
+ VisitorInformationIcon: lazy(() => import('../VisitorInformationIcon').then(m => ({ default: m.VisitorInformationIcon }))),
371
373
  WarningIcon: lazy(() => import('../WarningIcon').then(m => ({ default: m.WarningIcon }))),
372
374
  WebAssetIcon: lazy(() => import('../WebAssetIcon').then(m => ({ default: m.WebAssetIcon }))),
373
375
  WebIcon: lazy(() => import('../WebIcon').then(m => ({ default: m.WebIcon }))),
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './types';
3
+ export declare const VisitorInformationIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { useIcon } from './hooks/useIcon';
4
+ export const VisitorInformationIcon = forwardRef((props, ref) => {
5
+ const { width, height } = useIcon(props);
6
+ return (_jsxs("svg", { viewBox: "0 0 30 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, ref: ref, width: width, height: height, children: [_jsx("path", { d: "M1.5 14.5V13.8782C1.53256 13.8236 1.58165 13.7466 1.64916 13.654C1.79858 13.4491 2.03697 13.1699 2.38474 12.8889C3.07347 12.3324 4.21363 11.75 6 11.75C7.78637 11.75 8.92653 12.3324 9.61526 12.8889C9.96303 13.1699 10.2014 13.4491 10.3508 13.654C10.4184 13.7466 10.4674 13.8236 10.5 13.8782V14.5H1.5ZM4 7.5C4 7.10444 4.1173 6.71777 4.33706 6.38887C4.55683 6.05996 4.86917 5.80362 5.23462 5.65225C5.60007 5.50087 6.00223 5.46126 6.39019 5.53843C6.77814 5.6156 7.1345 5.80608 7.41421 6.08579C7.69392 6.3655 7.8844 6.72186 7.96157 7.10981C8.03874 7.49777 7.99913 7.89993 7.84775 8.26539C7.69638 8.63083 7.44004 8.94317 7.11113 9.16294C6.78223 9.3827 6.39556 9.5 6 9.5C5.46957 9.5 4.96087 9.28928 4.58579 8.91421C4.21072 8.53913 4 8.03043 4 7.5Z", stroke: "#005EB8" }), _jsx("rect", { x: "14", y: "5", width: "5", height: "2", fill: "#595959" }), _jsx("rect", { x: "21", y: "5", width: "7", height: "2", fill: "#005EB8" }), _jsx("rect", { x: "14", y: "9", width: "5", height: "2", fill: "#595959" }), _jsx("rect", { x: "21", y: "9", width: "8", height: "2", fill: "#005EB8" }), _jsx("rect", { x: "14", y: "13", width: "5", height: "2", fill: "#595959" }), _jsx("rect", { x: "21", y: "13", width: "6", height: "2", fill: "#005EB8" })] }));
7
+ });
@@ -6,6 +6,7 @@ import { message } from 'antd';
6
6
  import { useMemo, useState } from 'react';
7
7
  import { Flex, Input, Typography } from '../../index';
8
8
  import { IconGalleryStyled } from './styled';
9
+ import { queryClientAntsomiUI, QueryClientProviderAntsomiUI, } from '@antscorp/antsomi-ui/es/queries';
9
10
  const REGEX_DATA_SEARCH = /(?<=\/\/ search tag: ).*/g;
10
11
  const requireContext = require.context('../', false, /\.tsx$/);
11
12
  const icons = requireContext
@@ -34,14 +35,14 @@ export const IconGallery = () => {
34
35
  }),
35
36
  // eslint-disable-next-line react-hooks/exhaustive-deps
36
37
  []);
37
- return (_jsx(ConfigProvider, { children: _jsxs(IconGalleryStyled, { children: [invalidIcons.length > 0 ? (_jsxs("div", { children: [_jsx("h4", { children: "These components below are invalid (check name and file name is correct?)" }), invalidIcons.map(item => (_jsx("strong", { style: { color: 'red' }, children: _jsx("pre", { children: item.name }) }, item.name)))] })) : null, _jsx(Input, { placeholder: "Search Icon", value: search, onChange: e => setSearch(e.target.value), style: { fontSize: '16px' } }), _jsx(Flex, { className: "grid-container", gap: 16, children: validIcons
38
- .filter(item => searchMatchAny([item.name, ...item.dataSearch], debounceSearchValue))
39
- .map(item => {
40
- const { Component, name } = item;
41
- return (_jsxs("div", { className: "grid-item", onClick: () => {
42
- const copiedText = `<${name} />`;
43
- navigator.clipboard.writeText(copiedText);
44
- message.success(`${copiedText} copied to clipboard 🚀`);
45
- }, children: [_jsx(Component, {}), _jsx(Typography.Text, { ellipsis: { tooltip: true }, children: name })] }, name));
46
- }) })] }) }));
38
+ return (_jsx(QueryClientProviderAntsomiUI, { client: queryClientAntsomiUI, children: _jsx(ConfigProvider, { children: _jsxs(IconGalleryStyled, { children: [invalidIcons.length > 0 ? (_jsxs("div", { children: [_jsx("h4", { children: "These components below are invalid (check name and file name is correct?)" }), invalidIcons.map(item => (_jsx("strong", { style: { color: 'red' }, children: _jsx("pre", { children: item.name }) }, item.name)))] })) : null, _jsx(Input, { placeholder: "Search Icon", value: search, onChange: e => setSearch(e.target.value), style: { fontSize: '16px' } }), _jsx(Flex, { className: "grid-container", gap: 16, children: validIcons
39
+ .filter(item => searchMatchAny([item.name, ...item.dataSearch], debounceSearchValue))
40
+ .map(item => {
41
+ const { Component, name } = item;
42
+ return (_jsxs("div", { className: "grid-item", onClick: () => {
43
+ const copiedText = `<${name} />`;
44
+ navigator.clipboard.writeText(copiedText);
45
+ message.success(`${copiedText} copied to clipboard 🚀`);
46
+ }, children: [_jsx(Component, {}), _jsx(Typography.Text, { ellipsis: { tooltip: true }, children: name })] }, name));
47
+ }) })] }) }) }));
47
48
  };
@@ -194,6 +194,7 @@ export { HomeHouse30Icon } from './HomeHouse30Icon';
194
194
  export { HomeIcon } from './HomeIcon';
195
195
  export { HowToRegIcon } from './HowToRegIcon';
196
196
  export { IdeaIcon } from './IdeaIcon';
197
+ export { IdentityGraphIcon } from './IdentityGraphIcon';
197
198
  export { ImageIcon } from './ImageIcon';
198
199
  export { InactiveIcon } from './InactiveIcon';
199
200
  export { InactiveVariantIcon } from './InactiveVariantIcon';
@@ -358,6 +359,7 @@ export { ViewDetailsInformationIcon } from './ViewDetailsInformationIcon';
358
359
  export { VisibilityOffEyeIcon } from './VisibilityOffEyeIcon';
359
360
  export { Visitor30Icon } from './Visitor30Icon';
360
361
  export { VisitorIcon } from './VisitorIcon';
362
+ export { VisitorInformationIcon } from './VisitorInformationIcon';
361
363
  export { WarningIcon } from './WarningIcon';
362
364
  export { WebAssetIcon } from './WebAssetIcon';
363
365
  export { WebIcon } from './WebIcon';
@@ -194,6 +194,7 @@ export { HomeHouse30Icon } from './HomeHouse30Icon';
194
194
  export { HomeIcon } from './HomeIcon';
195
195
  export { HowToRegIcon } from './HowToRegIcon';
196
196
  export { IdeaIcon } from './IdeaIcon';
197
+ export { IdentityGraphIcon } from './IdentityGraphIcon';
197
198
  export { ImageIcon } from './ImageIcon';
198
199
  export { InactiveIcon } from './InactiveIcon';
199
200
  export { InactiveVariantIcon } from './InactiveVariantIcon';
@@ -358,6 +359,7 @@ export { ViewDetailsInformationIcon } from './ViewDetailsInformationIcon';
358
359
  export { VisibilityOffEyeIcon } from './VisibilityOffEyeIcon';
359
360
  export { Visitor30Icon } from './Visitor30Icon';
360
361
  export { VisitorIcon } from './VisitorIcon';
362
+ export { VisitorInformationIcon } from './VisitorInformationIcon';
361
363
  export { WarningIcon } from './WarningIcon';
362
364
  export { WebAssetIcon } from './WebAssetIcon';
363
365
  export { WebIcon } from './WebIcon';
@@ -1,4 +1,4 @@
1
- import { DatePicker } from 'src/components/molecules';
1
+ import { DatePicker } from '@antscorp/antsomi-ui/es/components/molecules';
2
2
  import React, { ComponentProps } from 'react';
3
3
  type RangePickerProps = {} & ComponentProps<typeof DatePicker.RangePicker>;
4
4
  export declare const RangePicker: React.FC<RangePickerProps>;
@@ -28,7 +28,7 @@ export declare const getDefaultDate: () => {
28
28
  };
29
29
  export declare const getRangeValue: ({ rangeInfo, currentRangeValue, limitNumOfDays, }: {
30
30
  rangeInfo: RangeInfo;
31
- currentRangeValue: RangeValue[];
31
+ currentRangeValue?: RangeValue[];
32
32
  limitNumOfDays?: number;
33
33
  }) => RangeValue[];
34
34
  export declare const getRangeValueSelctedTitle: (rangeValue: RangeValue[], options?: {
@@ -120,7 +120,12 @@ export const getDefaultDate = () => {
120
120
  yesterdayUptoCount: (val) => toDayTz.subtract(Math.round(val - 1) + 1, 'd').toISOString(),
121
121
  };
122
122
  };
123
- export const getRangeValue = ({ rangeInfo, currentRangeValue, limitNumOfDays = RANGE_LIMIT, }) => {
123
+ export const getRangeValue = ({ rangeInfo, currentRangeValue = [
124
+ {
125
+ start: dayjs(getDefaultDate().last7Days).toISOString(),
126
+ end: dayjs(getDefaultDate().yesterday).toISOString(),
127
+ },
128
+ ], limitNumOfDays = RANGE_LIMIT, }) => {
124
129
  const defaultDates = getDefaultDate();
125
130
  const result = currentRangeValue.map(rangeValue => {
126
131
  const temp = {
@@ -6,7 +6,6 @@ import { Select } from '../Select';
6
6
  import { SettingWrapper } from '../SettingWrapper';
7
7
  // Constants
8
8
  import { OPTION_FONT_FAMILY } from './constants';
9
- import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
10
9
  /**
11
10
  * Renders a select input for font family options.
12
11
  *
@@ -19,7 +18,6 @@ export const FontFamilySelect = (props) => {
19
18
  useEffect(() => {
20
19
  setSelected(value);
21
20
  }, [value]);
22
- const { t } = i18nInstance;
23
21
  const filteredFontFamilyOptions = useMemo(() => {
24
22
  let filteredOptions = [...OPTION_FONT_FAMILY];
25
23
  if (showOptions?.length) {
@@ -6,7 +6,7 @@ export const IconSelectionRenderer = forwardRef((props, ref) => {
6
6
  const { iconType } = props;
7
7
  if (iconType === ICON_TYPE.FONT_AWESOME) {
8
8
  const { iconName, iconType, ...rest } = props;
9
- return _jsx(FontAwesomeIcon, { ref: ref, ...rest, icon: iconName.split(' ') });
9
+ return (_jsx(FontAwesomeIcon, { ref: ref, ...rest, icon: iconName.split(' ') }));
10
10
  }
11
11
  if (iconType === ICON_TYPE.CUSTOM) {
12
12
  const { iconName, iconType, ...rest } = props;
@@ -3,6 +3,22 @@ import deepmerge from 'deepmerge';
3
3
  import { isEmpty, unionBy } from 'lodash';
4
4
  // Utils
5
5
  import { flatTree } from '@antscorp/antsomi-ui/es/utils';
6
+ /**
7
+ * Creates a custom merge function for tree data structures.
8
+ *
9
+ * @param {string} key - The property name used to identify unique items in the tree.
10
+ * @returns {Function} A function that merges two arrays of MatchesAnyItem objects.
11
+ *
12
+ * @description
13
+ * This function returns a merge strategy for deepmerge that:
14
+ * 1. Merges items from the target and source arrays based on the specified key.
15
+ * 2. Recursively merges nested children using the same strategy.
16
+ * 3. Adds new items from the source that don't exist in the target.
17
+ *
18
+ * @example
19
+ * const mergeStrategy = customMergeTreeData('id');
20
+ * const mergedData = deepmerge(targetArray, sourceArray, { arrayMerge: mergeStrategy });
21
+ */
6
22
  const customMergeTreeData = (key) => (target, source) => {
7
23
  const merged = target.map(item => {
8
24
  const found = source.find(s => s[key] === item[key]);
@@ -4,8 +4,9 @@ import { Icon } from '../../atoms';
4
4
  import './styles.scss';
5
5
  import clsx from 'clsx';
6
6
  import { StyledInput } from './styled';
7
+ import { translate, translations } from '@antscorp/antsomi-ui/es/locales';
7
8
  export const SearchPopover = (props) => {
8
9
  const { inputSearchProps = {}, ...popoverProps } = props;
9
10
  const { overlayClassName, arrow = false, children, content, trigger = ['click'], ...restPopoverProps } = popoverProps;
10
- return (_jsx(Popover, { trigger: trigger, arrow: arrow, destroyTooltipOnHide: true, ...restPopoverProps, overlayClassName: clsx('search-popover-overlay', overlayClassName), overlay: true, content: _jsxs(_Fragment, { children: [_jsx(StyledInput, { placeholder: inputSearchProps?.placeholder || 'Search...', bordered: false, ...inputSearchProps, addonAfter: _jsx(Icon, { type: "icon-ants-search-2" }), withWrapper: false }), content] }), children: children }));
11
+ return (_jsx(Popover, { trigger: trigger, arrow: arrow, destroyTooltipOnHide: true, ...restPopoverProps, overlayClassName: clsx('search-popover-overlay', overlayClassName), overlay: true, content: _jsxs(_Fragment, { children: [_jsx(StyledInput, { placeholder: inputSearchProps?.placeholder || `${translate(translations.global.search)}`, bordered: false, ...inputSearchProps, addonAfter: _jsx(Icon, { type: "icon-ants-search-2" }), withWrapper: false }), content] }), children: children }));
11
12
  };
@@ -1,4 +1,7 @@
1
- export declare const StyledTag: import("styled-components").StyledComponent<import("antd/lib").TagType, any, {}, never>;
1
+ /// <reference types="react" />
2
+ export declare const StyledTag: import("styled-components").StyledComponent<import("antd/lib").TagType & {
3
+ List: import("react").FC<import("../../atoms/Tag/Tag").TagListProps>;
4
+ }, any, {}, never>;
2
5
  export declare const TagCloseBtn: import("styled-components").StyledComponent<"div", any, {
3
6
  borderColor?: string | undefined;
4
7
  }, never>;
@@ -5,9 +5,10 @@ import { Select as AntdSelect } from 'antd';
5
5
  import { Text, Checkbox, Icon } from '../../atoms';
6
6
  // Styled
7
7
  import { StyledSelect, SelectWrapper as SelectMultiWrapper } from './styled';
8
+ import { ExpandMoreIcon } from '../../icons';
8
9
  export const SelectMulti = props => {
9
10
  const { label, children, ...restOf } = props;
10
- return (_jsxs(SelectMultiWrapper, { children: [label && (_jsx(Text, { style: { marginBottom: 5 }, color: "#666666", children: label })), _jsx(StyledSelect, { ...restOf, children: children }), _jsx(Icon, { type: "icon-antsomi-expand-more", className: "icon-arrow-down" })] }));
11
+ return (_jsxs(SelectMultiWrapper, { children: [label && (_jsx(Text, { style: { marginBottom: 5 }, color: "#666666", children: label })), _jsx(StyledSelect, { ...restOf, children: children }), _jsx(ExpandMoreIcon, { className: "icon-arrow-down", width: 20, height: 20 })] }));
11
12
  };
12
13
  export const SelectMultiOption = AntdSelect.Option;
13
14
  export const SelectMultOptGroup = AntdSelect.OptGroup;
@@ -12,7 +12,7 @@ export const SelectWrapper = styled.div `
12
12
  .icon-arrow-down {
13
13
  position: absolute;
14
14
  bottom: 4px;
15
- right: 8px;
15
+ right: 4px;
16
16
  }
17
17
  `;
18
18
  export const StyledSelect = styled(AntdSelect) `
@@ -39,7 +39,7 @@ export declare const PEOPLE_ACTIONS: {
39
39
  readonly key: "to_owner";
40
40
  };
41
41
  readonly remove_acess: {
42
- readonly label: "Remove Access";
42
+ readonly label: "Remove access";
43
43
  readonly key: "remove_acess";
44
44
  };
45
45
  };
@@ -57,7 +57,7 @@ export const PEOPLE_ACTIONS = {
57
57
  key: PEOPLE_ACTION_KEYS.TO_OWNER,
58
58
  },
59
59
  [PEOPLE_ACTION_KEYS.REMOVE_ACCESS]: {
60
- label: 'Remove Access',
60
+ label: 'Remove access',
61
61
  key: PEOPLE_ACTION_KEYS.REMOVE_ACCESS,
62
62
  },
63
63
  };
@@ -13,7 +13,7 @@ export const { READONLY_TAG, INVALID_TAG } = TAG_CUSTOM_ATTRIBUTES;
13
13
  export const defaultCssVariables = {
14
14
  '--input-color': globalToken?.colorText,
15
15
  '--input-font-size': `${globalToken?.fontSize}px`,
16
- '--tag--max-width': '230px',
16
+ '--tag--max-width': '170px',
17
17
  '--tag-border-radius': '999px',
18
18
  '--tag-bg': 'transparent',
19
19
  '--tag-hover': 'transparent',
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const TreeSelect: (<ValueType = any, OptionType extends import("rc-tree-select/lib/TreeSelect").BaseOptionType | import("rc-tree-select/lib/TreeSelect").DefaultOptionType = import("rc-tree-select/lib/TreeSelect").DefaultOptionType>(props: import("antd").TreeSelectProps<ValueType, OptionType> & {
2
+ export declare const TreeSelect: (<ValueType = any, OptionType extends import("rc-tree-select/lib/TreeSelect").DefaultOptionType | import("rc-tree-select/lib/TreeSelect").BaseOptionType = import("rc-tree-select/lib/TreeSelect").DefaultOptionType>(props: import("antd").TreeSelectProps<ValueType, OptionType> & {
3
3
  children?: import("react").ReactNode;
4
4
  } & import("react").RefAttributes<import("antd").RefSelectProps>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
5
5
  displayName?: string | undefined;
@@ -84,3 +84,4 @@ export type { SearchPopoverProps, PopoverAddFieldProps } from './SearchPopover';
84
84
  export type { InputDropdownProps } from './Dropdown';
85
85
  export type { SelectProps } from './Select';
86
86
  export type { EditorTabItem } from './EditorTab';
87
+ export type { CalendarSelectionValue } from './CalendarSelection';
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // Libraries
3
3
  import axios from 'axios';
4
4
  import clsx from 'clsx';
@@ -37,7 +37,7 @@ export const AccountSetting = memo(forwardRef((props, ref) => {
37
37
  const [logo, setLogo] = useState({ url: '' });
38
38
  const [logoManual, setLogoManual] = useState({ url: '' });
39
39
  const [openChangeEmail, setOpenChangeEmail] = useState(null);
40
- const [apiEndpoint] = useState(`${iamDomain}api/account/index/${accountId}?_token=${token}&_user_id=${accountId}&_account_id=${accountId}`);
40
+ const [apiEndpoint] = useState(`${iamDomain}/api/account/index/${accountId}?_token=${token}&_user_id=${accountId}&_account_id=${accountId}`);
41
41
  const saveRef = useRef(false);
42
42
  const tempAccountRef = useRef({});
43
43
  const readyCheckRef = useRef(false);
@@ -860,15 +860,15 @@ export const AccountSetting = memo(forwardRef((props, ref) => {
860
860
  (logoManual && logoManual.url) ||
861
861
  (!loading ? Image : '');
862
862
  try {
863
- return (_jsxs(Spin, { spinning: loading, children: [_jsxs(AccountDetail, { className: "wrap-table", children: [_jsxs("div", { className: "form-profile", children: [_jsxs("div", { className: "left-profile", children: [logo && _jsx("img", { src: avatarUrl, alt: "" }), _jsxs("div", { className: "preview mt-10", children: [isDisabledEdit || isPreview ? null : (_jsxs(_Fragment, { children: [_jsx("div", { className: "block-choose-input-file", children: _jsx(UploadAvatar
863
+ return (_jsxs(Spin, { spinning: loading, children: [_jsxs(AccountDetail, { className: "wrap-table", children: [_jsxs("div", { className: "form-profile", children: [_jsxs("div", { className: "left-profile", children: [logo && _jsx("img", { src: avatarUrl, alt: "" }), _jsxs("div", { className: "preview mt-10", children: [isDisabledEdit || isPreview ? null : (_jsxs("div", { className: "block-choose-input-file", children: [_jsx(UploadAvatar
864
+ // ref={input => {
865
+ // this.fileInput = input;
866
+ // }}
867
+ , {
864
868
  // ref={input => {
865
869
  // this.fileInput = input;
866
870
  // }}
867
- , {
868
- // ref={input => {
869
- // this.fileInput = input;
870
- // }}
871
- onFileUploading: onFileUploading, onFileUploaded: handleChangeLogo, callbackFileError: showFileError, dimensions: { width: 5000, height: 5000 }, extensions: ['png', 'jpg', 'PNG', 'JPG'], maxFileSize: 3072, iamDomain: iamDomain, authStr: `?_token=${token}&_user_id=${accountId}&_account_id=${accountId}`, setLoading: setLoading }) }), _jsx("span", { className: "choose-file-text", children: "Change avatar" })] })), errors.avatar ? (_jsxs("div", { className: "error", style: {
871
+ onFileUploading: onFileUploading, onFileUploaded: handleChangeLogo, callbackFileError: showFileError, dimensions: { width: 5000, height: 5000 }, extensions: ['png', 'jpg', 'PNG', 'JPG'], maxFileSize: 3072, iamDomain: iamDomain, authStr: `?_token=${token}&_user_id=${accountId}&_account_id=${accountId}`, setLoading: setLoading }), _jsx("span", { className: "choose-file-text", children: "Change avatar" })] })), errors.avatar ? (_jsxs("div", { className: "error", style: {
872
872
  width: 'fit-content',
873
873
  textAlign: 'left',
874
874
  margin: '0 auto',
@@ -64,6 +64,7 @@ export const AccountSharing = props => {
64
64
  const debounceSearch = useDebounce(accountSearch, 500);
65
65
  const [, setCookie] = useCookies();
66
66
  const domain = iamDomain.charAt(iamDomain.length - 1) === '/' ? iamDomain : `${iamDomain}/`;
67
+ const formatDomain = iamDomain.endsWith('/') ? iamDomain.slice(0, -1) : iamDomain;
67
68
  const translateLang = useMemo(() => translate(translateData, serverTranslateData, language), [serverTranslateData, language, translateData]);
68
69
  const getInfoAccount = () => {
69
70
  const params = {
@@ -519,5 +520,5 @@ export const AccountSharing = props => {
519
520
  backgroundColor: THEME.token?.blue1_2,
520
521
  padding: '20px 15px',
521
522
  width: '400px',
522
- }, children: _jsxs(TriggerPopoverStyled, { children: [_jsx("div", { className: "brand-logo", children: currentNetwork?.logo ? _jsx("img", { src: currentNetwork.logo, alt: "" }) : null }), _jsx("div", { className: "avatar", children: infoAccount ? _jsx("img", { src: infoAccount.avatar, alt: "" }) : null })] }) }), _jsx(AccountProfile, { accountId: accountId, iamDomain: domain, token: token, isDisabledEdit: false, open: openAccountProfile, onClose: () => setOpenAccountProfile(false) })] }));
523
+ }, children: _jsxs(TriggerPopoverStyled, { children: [_jsx("div", { className: "brand-logo", children: currentNetwork?.logo ? _jsx("img", { src: currentNetwork.logo, alt: "" }) : null }), _jsx("div", { className: "avatar", children: infoAccount ? _jsx("img", { src: infoAccount.avatar, alt: "" }) : null })] }) }), _jsx(AccountProfile, { accountId: accountId, iamDomain: formatDomain, token: token, isDisabledEdit: false, open: openAccountProfile, onClose: () => setOpenAccountProfile(false) })] }));
523
524
  };
@@ -0,0 +1,2 @@
1
+ import { ActivityTimeLineProps } from './types';
2
+ export declare const ActivityTimeline: (props: ActivityTimeLineProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,99 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /* eslint-disable no-underscore-dangle */
3
+ import { useMemo } from 'react';
4
+ import { StyledNoData, StyldTitle, StyledRoot, TimelineBottom } from './styled';
5
+ import { Flex, Spin } from '../../atoms';
6
+ import { ItemEvent, TimeLineTitle, ItemGroupEvent } from './components';
7
+ import { useInView } from 'react-intersection-observer';
8
+ import { translate, translations } from '@antscorp/antsomi-locales';
9
+ import { isEmpty } from 'lodash';
10
+ import { differenceInMonths, formatDateTZ, startOfMonth, subMonths, } from '@antscorp/antsomi-ui/es/utils/date';
11
+ import { EmptyData } from '../../molecules';
12
+ export const ActivityTimeline = (props) => {
13
+ const { timelines = [], isLoading = false, title = translate(translations._BLOCK_TIMELINE_CUS), timezone = Intl.DateTimeFormat().resolvedOptions().timeZone, objectName = '_THIS_PERSON_UPPERCASE', onFetchMore, eventTracking: eventTrackingProp = [], header, className, } = props;
14
+ let { timelineAvailable } = props;
15
+ timelineAvailable = (timelines.length > 0 && !!timelineAvailable) || false;
16
+ const eventTracking = useMemo(() => {
17
+ const list = [...eventTrackingProp];
18
+ const map = Object.fromEntries(list.map(item => [`${item.eventCategoryId}@@${item.eventActionId}`, item]));
19
+ return { list, map };
20
+ }, [eventTrackingProp]);
21
+ const [bottomRef] = useInView({
22
+ threshold: 0.7,
23
+ onChange: inView => {
24
+ if (!inView || isLoading || !timelineAvailable || !onFetchMore)
25
+ return;
26
+ onFetchMore();
27
+ },
28
+ });
29
+ const showBottomComponent = () => {
30
+ if (isEmpty(timelines) || isLoading)
31
+ return null;
32
+ return (_jsx(TimelineBottom, { align: "center", justify: "center", children: timelineAvailable && onFetchMore ? (_jsx(Flex, { ref: bottomRef, children: _jsx(Spin, { indicatorSize: 24 }) })) : (translate(translations._INFO_NO_MORE_ACTIVITY, 'No more activities!')) }));
33
+ };
34
+ const showMainContent = (timelines, customerName) => {
35
+ const result = [];
36
+ if (timelines.length > 0) {
37
+ const startDate = startOfMonth(new Date()).getTime();
38
+ let firstDateEvent = startOfMonth(new Date(formatDateTZ(timelines[0].trackedDateTimeUTC, 'MM/DD/YYYY', timezone))).getTime();
39
+ let diffTempt = differenceInMonths(new Date(startDate), new Date(firstDateEvent));
40
+ if (diffTempt === 0) {
41
+ result.push(_jsx(TimeLineTitle, { type: "label", data: { date: firstDateEvent } }, `time-heading--${startDate}`));
42
+ }
43
+ else if (diffTempt === 1) {
44
+ result.push(_jsx(TimeLineTitle, { type: "nodata-single", data: { date: startDate } }, `time-heading--${startDate}`));
45
+ result.push(_jsx(TimeLineTitle, { type: "label", data: { date: firstDateEvent } }, `time-heading--v2-${firstDateEvent}`));
46
+ }
47
+ else {
48
+ const dateNextMonthEvent = startOfMonth(subMonths(new Date(firstDateEvent), -1)).getTime();
49
+ result.push(_jsx(TimeLineTitle, { type: "nodata-multi", data: { startDate, endDate: dateNextMonthEvent } }, `time-heading--${startDate}`));
50
+ result.push(_jsx(TimeLineTitle, { type: "label", data: { date: firstDateEvent } }, `time-heading--v2-${firstDateEvent}`));
51
+ }
52
+ timelines.forEach((item, index) => {
53
+ const firstDateEventTempt = startOfMonth(new Date(formatDateTZ(item.trackedDateTimeUTC, 'MM/DD/YYYY', timezone))).getTime();
54
+ if (firstDateEvent !== firstDateEventTempt) {
55
+ diffTempt = differenceInMonths(new Date(firstDateEvent), new Date(firstDateEventTempt));
56
+ if (diffTempt === 0) {
57
+ result.push(_jsx(TimeLineTitle, { type: "label", data: { date: firstDateEventTempt } }, `time-heading--${item.timestamp}`));
58
+ }
59
+ else if (diffTempt === 1) {
60
+ result.push(_jsx(TimeLineTitle, { type: "label", data: { date: firstDateEventTempt } }, `time-heading--${item.timestamp}`));
61
+ }
62
+ else if (diffTempt === 2) {
63
+ const dateNextMonthEvent = startOfMonth(subMonths(new Date(firstDateEventTempt), -1)).getTime();
64
+ result.push(_jsx(TimeLineTitle, { type: "nodata-single", data: { date: dateNextMonthEvent } }, `time-heading--${item.timestamp}`));
65
+ result.push(_jsx(TimeLineTitle, { type: "label", data: { date: firstDateEventTempt } }, `time-heading-v2-${item.timestamp}`));
66
+ }
67
+ else {
68
+ const datePrevMonthEvent = startOfMonth(subMonths(new Date(firstDateEvent), 1)).getTime();
69
+ const dateNextMonthEvent = startOfMonth(subMonths(new Date(firstDateEventTempt), -1)).getTime();
70
+ result.push(_jsx(TimeLineTitle, { type: "nodata-multi", data: {
71
+ startDate: datePrevMonthEvent,
72
+ endDate: dateNextMonthEvent,
73
+ } }, `time-heading--${item.timestamp}`));
74
+ result.push(_jsx(TimeLineTitle, { type: "label", data: { date: firstDateEventTempt } }, `time-heading-v2-${item.timestamp}`));
75
+ }
76
+ firstDateEvent = firstDateEventTempt;
77
+ }
78
+ const key = `${item.etype}-${item.timestamp}-${item.sectionKey}-${index}`;
79
+ if (item.data.totalActivityCount === 1) {
80
+ result.push(_jsx(ItemEvent, { keyItem: key, item: item, objectName: customerName, eventTracking: eventTracking }, key));
81
+ }
82
+ else if (item.data.totalActivityCount > 1) {
83
+ result.push(_jsx(ItemGroupEvent, { keyItem: key, item: item, objectName: customerName, eventTracking: eventTracking }, key));
84
+ }
85
+ });
86
+ }
87
+ return result;
88
+ };
89
+ const renderContent = () => {
90
+ if (isLoading) {
91
+ return (_jsxs(_Fragment, { children: [header, _jsx(Flex, { style: { height: 240 }, align: "center", justify: "center", children: _jsx(Spin, { indicatorSize: 24 }) })] }));
92
+ }
93
+ if (!timelines.length) {
94
+ return (_jsxs(_Fragment, { children: [header, _jsx(StyledNoData, { align: "center", justify: "center", children: _jsx(EmptyData, { showIcon: false, title: translate(translations._PROFILES_NO_DATA), description: translate(translations._PROFILES_MESSAGE_NO_DATA_TIMELINE).toString() }) })] }));
95
+ }
96
+ return (_jsxs(_Fragment, { children: [header, showMainContent(timelines, objectName), showBottomComponent()] }));
97
+ };
98
+ return (_jsxs(StyledRoot, { className: className, children: [_jsx(StyldTitle, { children: title }), renderContent()] }));
99
+ };