@antscorp/antsomi-ui 2.0.2 → 2.0.4

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 (69) hide show
  1. package/es/components/icons/ArticleIcon.d.ts +3 -0
  2. package/es/components/icons/ArticleIcon.js +10 -0
  3. package/es/components/icons/CustomerInformationIcon.d.ts +3 -0
  4. package/es/components/icons/CustomerInformationIcon.js +13 -0
  5. package/es/components/icons/EditFilledIcon.d.ts +3 -0
  6. package/es/components/icons/EditFilledIcon.js +8 -0
  7. package/es/components/icons/ItemRecommendationIcon.d.ts +3 -0
  8. package/es/components/icons/ItemRecommendationIcon.js +10 -0
  9. package/es/components/icons/LazyIcon/LazyIcon.d.ts +6 -0
  10. package/es/components/icons/LazyIcon/LazyIcon.js +6 -0
  11. package/es/components/icons/LongerIcon.d.ts +3 -0
  12. package/es/components/icons/LongerIcon.js +7 -0
  13. package/es/components/icons/UserActivityIcon.d.ts +3 -0
  14. package/es/components/icons/UserActivityIcon.js +16 -0
  15. package/es/components/icons/index.d.ts +6 -0
  16. package/es/components/icons/index.js +6 -0
  17. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +23 -0
  18. package/es/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.js +50 -26
  19. package/es/components/molecules/EditableName/EditableName.d.ts +1 -0
  20. package/es/components/molecules/EditableName/EditableName.js +5 -6
  21. package/es/components/molecules/EditorTab/EditorTab.js +46 -39
  22. package/es/components/molecules/EditorTab/styled.js +23 -14
  23. package/es/components/molecules/EmptyData/styled.js +2 -1
  24. package/es/components/molecules/MatchAnySelect/MatchesAnySelect.d.ts +2 -2
  25. package/es/components/molecules/MatchAnySelect/MatchesAnySelect.js +155 -112
  26. package/es/components/molecules/MatchAnySelect/constants.d.ts +19 -0
  27. package/es/components/molecules/MatchAnySelect/constants.js +81 -20
  28. package/es/components/molecules/MatchAnySelect/mock.d.ts +21 -0
  29. package/es/components/molecules/MatchAnySelect/mock.js +3309 -0
  30. package/es/components/molecules/MatchAnySelect/styled.d.ts +12 -0
  31. package/es/components/molecules/MatchAnySelect/styled.js +69 -4
  32. package/es/components/molecules/MatchAnySelect/types.d.ts +44 -22
  33. package/es/components/molecules/MatchAnySelect/utils.d.ts +2 -0
  34. package/es/components/molecules/MatchAnySelect/utils.js +42 -0
  35. package/es/components/molecules/SearchPopover/SearchPopover.js +1 -1
  36. package/es/components/molecules/SearchPopover/components/PopoverAddField/PopoverAddField.js +10 -7
  37. package/es/components/molecules/SearchPopover/components/PopoverSelect/PopoverSelect.js +22 -18
  38. package/es/components/molecules/SearchPopover/components/PopoverSelect/styled.d.ts +2 -2
  39. package/es/components/molecules/SearchPopover/components/PopoverSelect/styled.js +2 -3
  40. package/es/components/molecules/SearchPopover/types.d.ts +1 -1
  41. package/es/components/molecules/Tabs/index.d.ts +1 -0
  42. package/es/components/molecules/Tree/Tree.d.ts +18 -2
  43. package/es/components/molecules/Tree/Tree.js +29 -1
  44. package/es/components/molecules/Tree/index.d.ts +1 -0
  45. package/es/components/molecules/Tree/index.js +1 -0
  46. package/es/components/molecules/Tree/styled.d.ts +16 -0
  47. package/es/components/molecules/Tree/styled.js +43 -0
  48. package/es/components/molecules/Tree/utils.d.ts +10 -0
  49. package/es/components/molecules/Tree/utils.js +17 -0
  50. package/es/components/molecules/UploadImage/index.js +1 -1
  51. package/es/components/molecules/index.d.ts +1 -1
  52. package/es/components/molecules/index.js +1 -1
  53. package/es/components/organism/AlgorithmsSetting/styled.d.ts +1 -1
  54. package/es/components/organism/DataTable/hooks/useAddFilterButton.d.ts +1 -1
  55. package/es/components/organism/Help/Help.js +27 -33
  56. package/es/components/organism/Help/styled.d.ts +0 -5
  57. package/es/components/organism/Help/styled.js +27 -38
  58. package/es/components/organism/PreviewTemplateModal/components/SimilarTemplate/index.js +3 -3
  59. package/es/components/organism/PreviewTemplateModal/components/ThumbnailSlider/index.js +4 -2
  60. package/es/components/template/TemplateListing/index.js +5 -3
  61. package/es/constants/theme.js +16 -12
  62. package/es/index.d.ts +3 -1
  63. package/es/index.js +2 -1
  64. package/es/providers/ConfigProvider/GlobalStyle.js +18 -2
  65. package/es/test.js +5 -6
  66. package/es/tests/MatchesAnySelect.js +70 -4
  67. package/es/utils/common.d.ts +11 -0
  68. package/es/utils/common.js +29 -1
  69. package/package.json +2 -1
@@ -311,7 +311,7 @@ export const UploadImage = props => {
311
311
  React.createElement(Input, { label: mode === 'video' ? 'Video URL' : 'Image URL', required: required, placeholder: placeholder, value: selectedMedia.url ? selectedMedia.url : '', focused: focused, onAfterChange: value => handleSelectMedia({
312
312
  url: value,
313
313
  }) }))))),
314
- React.createElement(Modal, { title: labelModalDelete, visible: isOpenConfirmDelete, onOk: () => handleRemoveUploadedMedia(deleteMediaRef.current, false), onCancel: () => setOpenConfirmDelete(prev => !prev), okText: "OK", cancelText: "Cancel", destroyOnClose: true },
314
+ React.createElement(Modal, { title: labelModalDelete, open: isOpenConfirmDelete, onOk: () => handleRemoveUploadedMedia(deleteMediaRef.current, false), onCancel: () => setOpenConfirmDelete(prev => !prev), okText: "OK", cancelText: "Cancel", destroyOnClose: true },
315
315
  React.createElement("p", null,
316
316
  "Are you sure you want to delete ", (_d = deleteMediaRef.current) === null || _d === void 0 ? void 0 :
317
317
  _d.name,
@@ -7,7 +7,6 @@ export { SelectV2 } from './SelectV2';
7
7
  export { DatePicker } from './DatePicker';
8
8
  export { ChatBox, ChatBoxInsight } from './ChatBox';
9
9
  export { PopupDraggable } from './PopupDraggable';
10
- export { Tabs } from './Tabs';
11
10
  export { CaptureScreen } from './CaptureScreen';
12
11
  export { SettingWrapper } from './SettingWrapper';
13
12
  export { ColorPicker } from './ColorPicker';
@@ -60,6 +59,7 @@ export * from './Tree';
60
59
  export * from './MatchAnySelect';
61
60
  export * from './ApplyPopupContent';
62
61
  export * from './AccessDenied';
62
+ export * from './Tabs';
63
63
  export { EditorScript } from './EditorScript';
64
64
  export { EditorTab } from './EditorTab';
65
65
  export { SelectAccount } from './SelectAccount';
@@ -7,7 +7,6 @@ export { SelectV2 } from './SelectV2';
7
7
  export { DatePicker } from './DatePicker';
8
8
  export { ChatBox, ChatBoxInsight } from './ChatBox';
9
9
  export { PopupDraggable } from './PopupDraggable';
10
- export { Tabs } from './Tabs';
11
10
  export { CaptureScreen } from './CaptureScreen';
12
11
  export { SettingWrapper } from './SettingWrapper';
13
12
  export { ColorPicker } from './ColorPicker';
@@ -60,6 +59,7 @@ export * from './Tree';
60
59
  export * from './MatchAnySelect';
61
60
  export * from './ApplyPopupContent';
62
61
  export * from './AccessDenied';
62
+ export * from './Tabs';
63
63
  export { EditorScript } from './EditorScript';
64
64
  export { EditorTab } from './EditorTab';
65
65
  export { SelectAccount } from './SelectAccount';
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { ContentSourceModeView } from '../ContentSources/types';
3
3
  export declare const AlgorithmsSettingWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const StyledTabs: import("styled-components").StyledComponent<import("react").FC<import("antd").TabsProps> & {
4
+ export declare const StyledTabs: import("styled-components").StyledComponent<import("react").FC<import("antd/es/tabs").TabsProps> & {
5
5
  TabPane: import("react").FC<import("antd").TabPaneProps>;
6
6
  }, any, {
7
7
  shadow?: boolean | undefined;
@@ -13,7 +13,7 @@ type OnApplyFilterMetricConditionValue = {
13
13
  export declare const useAddFilterCondition: () => {
14
14
  filters: import("../types").FilterItem[] | undefined;
15
15
  matchesAny: {
16
- list?: import("../../..").MatchesAnyItem[] | undefined;
16
+ list?: any[] | undefined;
17
17
  isLoading?: boolean | undefined;
18
18
  } | undefined;
19
19
  setState: import("react").Dispatch<import("react").SetStateAction<TState>>;
@@ -34,11 +34,11 @@ import { LoadingOutlined } from '@ant-design/icons';
34
34
  import Icon from '@antscorp/icons';
35
35
  import { Editor } from '@tinymce/tinymce-react';
36
36
  import { Button, Spin } from 'antd';
37
- import { ButtonFeedback, ControlGroup, ControlLabel, DropDown, EditorWrapper, ErrorMessage, FlexCenter, Header, HiddenBlock, IconButtonStyled, IframeHelp, Image, Label, LabelTitle, Link, Overlay, PreviewBox, SendFeedback, Span, Text, TitleSearch, TreeContent, Video, Wrapper, WrapperBody, WrapperContentHelp, WrapperFooter, WrapperFooterSpace, WrapperHeader, WrapperIconEditor, WrapperImage, WrapperInputFile, WrapperLinkFiles, WrapperLinkItemFiles, WrapperLoading, WrapperSearch, } from './styled';
37
+ import { ButtonFeedback, ControlGroup, ControlLabel, EditorWrapper, ErrorMessage, FlexCenter, Header, HiddenBlock, IconButtonStyled, IframeHelp, Image, Label, LabelTitle, Link, Overlay, PreviewBox, SendFeedback, Span, Text, TitleSearch, TreeContent, Video, Wrapper, WrapperBody, WrapperContentHelp, WrapperFooter, WrapperFooterSpace, WrapperHeader, WrapperIconEditor, WrapperImage, WrapperInputFile, WrapperLinkFiles, WrapperLinkItemFiles, WrapperLoading, WrapperSearch, } from './styled';
38
38
  // Atoms
39
39
  import { Input } from '@antscorp/antsomi-ui/es/components/atoms';
40
40
  // Molecules
41
- import { CaptureScreen, ChatBox, PopupDraggable, Select, } from '@antscorp/antsomi-ui/es/components/molecules';
41
+ import { CaptureScreen, ChatBox, PopupDraggable, Select, Dropdown, } from '@antscorp/antsomi-ui/es/components/molecules';
42
42
  // Constants
43
43
  import { THEME, TINYMCE_API_KEY } from '@antscorp/antsomi-ui/es/constants';
44
44
  import { ATTACH_CAPTURE_TYPES, ATTACH_KEYS, DEFAULT_POSITIONS, MENU_KEYS, MESSAGE_TYPE, PORTALS_ANTSOMI_PACKAGE_UI_KEY, PORTALS_ANTSOMI_PACKAGE_UI_KEY_POPUP, REPORT_TYPES, TICKET_CUSTOM_MESSAGE_KEY, } from './constants';
@@ -110,21 +110,15 @@ const Help = props => {
110
110
  var _a;
111
111
  return [
112
112
  {
113
- label: (React.createElement("a", { href: "https://docs.antsomi.com/cdp-365-user-guide-en/release-note/2023", target: "_blank", rel: "noreferrer" },
113
+ label: (React.createElement("a", { href: "https://docs.antsomi.com/cdp-365-user-guide-en/release-note/2023", target: "_blank", rel: "noreferrer", style: { textDecoration: 'none' } },
114
114
  React.createElement(Label, { style: {
115
- position: 'relative',
116
115
  display: 'flex',
117
116
  alignItems: 'center',
118
117
  gap: 33,
119
118
  width: '100%',
120
- marginTop: 8,
121
119
  } },
122
120
  "New features & announcements",
123
- React.createElement(OpenUrlIcon, { style: {
124
- fill: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorIcon,
125
- maxWidth: 24,
126
- maxHeight: 24,
127
- } })))),
121
+ React.createElement(OpenUrlIcon, { size: 20, color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorIcon })))),
128
122
  key: MENU_KEYS.FEATURE_ANNOUNCEMENT,
129
123
  },
130
124
  {
@@ -132,11 +126,11 @@ const Help = props => {
132
126
  key: MENU_KEYS.FEEDBACK,
133
127
  },
134
128
  {
135
- label: React.createElement(Label, null, "Get Help"),
129
+ label: React.createElement(Label, null, "Get help"),
136
130
  key: MENU_KEYS.HELP,
137
131
  },
138
132
  {
139
- label: React.createElement(Label, null, "Get ideas with ChatGPT"),
133
+ label: React.createElement(Label, null, "Get ideas with Antsomi Intelligence"),
140
134
  key: MENU_KEYS.CHAT,
141
135
  },
142
136
  {
@@ -156,6 +150,25 @@ const Help = props => {
156
150
  }
157
151
  return domain;
158
152
  }, [domain]);
153
+ const fetchDataListHelp = () => {
154
+ setIsLoadingHelp(true);
155
+ TicketService.help.callApi
156
+ .getList({ appCode, role: '1' }, domainPlatform, token, config, userId)
157
+ .then(res => {
158
+ if (res && res.data.code === 200 && res.data) {
159
+ const { data } = res.data;
160
+ setDataListHelp(data);
161
+ setIsLoadingHelp(false);
162
+ setExpandedKeys(expendDefault(data));
163
+ }
164
+ else {
165
+ setIsLoadingHelp(true);
166
+ }
167
+ })
168
+ .catch(err => {
169
+ // console.log('err ===>', err)
170
+ });
171
+ };
159
172
  // const handleCancel = () => {
160
173
  // setOpen(false);
161
174
  // };
@@ -308,25 +321,6 @@ const Help = props => {
308
321
  }
309
322
  }
310
323
  }, []);
311
- const fetchDataListHelp = () => {
312
- setIsLoadingHelp(true);
313
- TicketService.help.callApi
314
- .getList({ appCode, role: '1' }, domainPlatform, token, config, userId)
315
- .then(res => {
316
- if (res && res.data.code === 200 && res.data) {
317
- const { data } = res.data;
318
- setDataListHelp(data);
319
- setIsLoadingHelp(false);
320
- setExpandedKeys(expendDefault(data));
321
- }
322
- else {
323
- setIsLoadingHelp(true);
324
- }
325
- })
326
- .catch(err => {
327
- // console.log('err ===>', err)
328
- });
329
- };
330
324
  const handleCreateRecorder = () => __awaiter(void 0, void 0, void 0, function* () {
331
325
  try {
332
326
  let controller;
@@ -729,7 +723,7 @@ const Help = props => {
729
723
  const renderIcon = (name, style) => ({
730
724
  'icon-ants-capture': React.createElement(ScreenshotMonitorIcon, { style: style }),
731
725
  'icon-ants-camera': React.createElement(CameraIcon, { style: style }),
732
- }[name]);
726
+ })[name];
733
727
  const treeData = useMemo(() => {
734
728
  const loop = (data) => data.map(item => {
735
729
  const strTitle = item.title;
@@ -978,7 +972,7 @@ const Help = props => {
978
972
  } }))))));
979
973
  };
980
974
  return (React.createElement(React.Fragment, null,
981
- React.createElement(DropDown, { menu: {
975
+ React.createElement(Dropdown, { menu: {
982
976
  style: { minWidth: 250, padding: 0 },
983
977
  items: items,
984
978
  onClick: info => handleClick(info),
@@ -1,9 +1,4 @@
1
1
  /// <reference types="react" />
2
- export declare const DropDown: import("styled-components").StyledComponent<import("react").FC<import("antd").DropDownProps> & {
3
- _InternalPanelDoNotUseOrYouWillBeFired: import("react").FC<import("antd").DropDownProps>;
4
- } & {
5
- Button: import("react").FC<import("antd/es/dropdown").DropdownButtonProps>;
6
- }, any, {}, never>;
7
2
  export declare const ButtonFeedback: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>> & {
8
3
  Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
9
4
  }, any, {
@@ -1,6 +1,6 @@
1
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
1
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
2
2
  // Libraries
3
- import { Dropdown, /* Button, */ Space, Typography, Tree, Input } from 'antd';
3
+ import { Space, Typography, Tree, Input } from 'antd';
4
4
  import styled, { css } from 'styled-components';
5
5
  import { Button } from '../../atoms';
6
6
  // Constants
@@ -8,13 +8,6 @@ import { THEME } from '@antscorp/antsomi-ui/es/constants';
8
8
  // Components
9
9
  const { Text: AntText } = Typography;
10
10
  const { Search } = Input;
11
- export const DropDown = styled(Dropdown) `
12
- .verify-support span {
13
- font-size: ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.fontSize}px;
14
- color: ${(_b = THEME.token) === null || _b === void 0 ? void 0 : _b.colorPrimary};
15
- font-weight: medium;
16
- }
17
- `;
18
11
  export const ButtonFeedback = styled(Button) `
19
12
  width: 200px;
20
13
  height: ${props => (props.height ? props.height : 36)}px !important;
@@ -24,7 +17,7 @@ export const PreviewBox = styled.div `
24
17
  position: relative;
25
18
  width: 200px;
26
19
  height: 125px;
27
- background-color: ${(_c = THEME.token) === null || _c === void 0 ? void 0 : _c.bw0};
20
+ background-color: ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.bw0};
28
21
  cursor: pointer;
29
22
  overflow: hidden;
30
23
 
@@ -45,16 +38,12 @@ export const Overlay = styled.div `
45
38
  `;
46
39
  export const Text = styled.span `
47
40
  font-weight: normal !important;
48
- color: ${(_d = THEME.token) === null || _d === void 0 ? void 0 : _d.colorText} !important;
49
- font-size: ${(_e = THEME.token) === null || _e === void 0 ? void 0 : _e.fontSize}px !important;
41
+ color: ${(_b = THEME.token) === null || _b === void 0 ? void 0 : _b.colorText} !important;
42
+ font-size: ${(_c = THEME.token) === null || _c === void 0 ? void 0 : _c.fontSize}px !important;
50
43
  `;
51
44
  export const Label = styled.span `
52
45
  &.verify-support {
53
- display: inline-block;
54
- padding: 5px 0;
55
- color: ${(_f = THEME.token) === null || _f === void 0 ? void 0 : _f.colorPrimary};
56
- font-size: ${(_g = THEME.token) === null || _g === void 0 ? void 0 : _g.fontSize}px;
57
- font-weight: 500;
46
+ color: ${(_d = THEME.token) === null || _d === void 0 ? void 0 : _d.colorPrimary};
58
47
  }
59
48
  `;
60
49
  export const SendFeedback = styled.div `
@@ -64,8 +53,8 @@ export const ControlGroup = styled(Space) `
64
53
  width: 100%;
65
54
  `;
66
55
  export const ControlLabel = styled(AntText) `
67
- font-size: ${(_h = THEME.token) === null || _h === void 0 ? void 0 : _h.fontSize}px !important;
68
- color: ${(_j = THEME.token) === null || _j === void 0 ? void 0 : _j.bw8} !important;
56
+ font-size: ${(_e = THEME.token) === null || _e === void 0 ? void 0 : _e.fontSize}px !important;
57
+ color: ${(_f = THEME.token) === null || _f === void 0 ? void 0 : _f.bw8} !important;
69
58
  `;
70
59
  export const FlexCenter = styled.div `
71
60
  display: flex;
@@ -83,7 +72,7 @@ export const HiddenBlock = styled.div `
83
72
  right: 0;
84
73
  width: 17px;
85
74
  height: 50px;
86
- background-color: ${(_k = THEME.token) === null || _k === void 0 ? void 0 : _k.bw0};
75
+ background-color: ${(_g = THEME.token) === null || _g === void 0 ? void 0 : _g.bw0};
87
76
  `;
88
77
  export const WrapperImage = styled.div `
89
78
  position: relative;
@@ -107,7 +96,7 @@ export const Video = styled.video `
107
96
  export const WrapperHeader = styled.strong `
108
97
  display: block;
109
98
  height: 50px;
110
- border-bottom: 1px solid ${(_l = THEME.token) === null || _l === void 0 ? void 0 : _l.bw3};
99
+ border-bottom: 1px solid ${(_h = THEME.token) === null || _h === void 0 ? void 0 : _h.bw3};
111
100
  line-height: 50px;
112
101
  padding-left: 15px;
113
102
  box-sizing: border-box;
@@ -118,7 +107,7 @@ export const WrapperHeader = styled.strong `
118
107
  `;
119
108
  export const Header = styled(AntText) `
120
109
  font-size: 16px !important;
121
- color: ${(_m = THEME.token) === null || _m === void 0 ? void 0 : _m.colorText} !important;
110
+ color: ${(_j = THEME.token) === null || _j === void 0 ? void 0 : _j.colorText} !important;
122
111
  font-weight: normal !important;
123
112
  `;
124
113
  export const WrapperBody = styled.div `
@@ -134,8 +123,8 @@ export const WrapperFooter = styled.div `
134
123
  left: 0;
135
124
  width: 100%;
136
125
  max-height: 58px;
137
- border-top: 1px solid ${(_o = THEME.token) === null || _o === void 0 ? void 0 : _o.bw3};
138
- background-color: ${(_p = THEME.token) === null || _p === void 0 ? void 0 : _p.bw0};
126
+ border-top: 1px solid ${(_k = THEME.token) === null || _k === void 0 ? void 0 : _k.bw3};
127
+ background-color: ${(_l = THEME.token) === null || _l === void 0 ? void 0 : _l.bw0};
139
128
  padding: 15px;
140
129
  box-sizing: border-box;
141
130
  z-index: 10;
@@ -146,8 +135,8 @@ export const WrapperFooterSpace = styled.div `
146
135
  left: 0;
147
136
  width: 100%;
148
137
  max-height: 58px;
149
- border-top: 1px solid ${(_q = THEME.token) === null || _q === void 0 ? void 0 : _q.bw3};
150
- background-color: ${(_r = THEME.token) === null || _r === void 0 ? void 0 : _r.bw0};
138
+ border-top: 1px solid ${(_m = THEME.token) === null || _m === void 0 ? void 0 : _m.bw3};
139
+ background-color: ${(_o = THEME.token) === null || _o === void 0 ? void 0 : _o.bw0};
151
140
  padding: 15px;
152
141
  box-sizing: border-box;
153
142
  z-index: 10;
@@ -157,28 +146,28 @@ export const WrapperFooterSpace = styled.div `
157
146
  `;
158
147
  export const EditorWrapper = styled.div `
159
148
  .tox-tinymce {
160
- border: 1px solid ${(_s = THEME.token) === null || _s === void 0 ? void 0 : _s.bw3_5};
149
+ border: 1px solid ${(_p = THEME.token) === null || _p === void 0 ? void 0 : _p.bw3_5};
161
150
  border-top-left-radius: 2px;
162
151
  border-top-right-radius: 2px;
163
152
  }
164
153
  `;
165
154
  export const WrapperLinkFiles = styled.div `
166
- border-right: 1px solid ${(_t = THEME.token) === null || _t === void 0 ? void 0 : _t.bw3_5};
167
- border-left: 1px solid ${(_u = THEME.token) === null || _u === void 0 ? void 0 : _u.bw3_5};
155
+ border-right: 1px solid ${(_q = THEME.token) === null || _q === void 0 ? void 0 : _q.bw3_5};
156
+ border-left: 1px solid ${(_r = THEME.token) === null || _r === void 0 ? void 0 : _r.bw3_5};
168
157
  display: flex;
169
158
  flex-direction: column;
170
159
  padding: 8px;
171
160
  gap: 4px;
172
161
  `;
173
162
  export const WrapperLinkItemFiles = styled.div `
174
- color: ${(_v = THEME.token) === null || _v === void 0 ? void 0 : _v.bw10};
163
+ color: ${(_s = THEME.token) === null || _s === void 0 ? void 0 : _s.bw10};
175
164
  display: flex;
176
165
  align-items: center;
177
166
  justify-content: space-between;
178
167
  `;
179
168
  export const WrapperIconEditor = styled.div `
180
169
  height: 44px;
181
- border: 1px solid ${(_w = THEME.token) === null || _w === void 0 ? void 0 : _w.bw3_5};
170
+ border: 1px solid ${(_t = THEME.token) === null || _t === void 0 ? void 0 : _t.bw3_5};
182
171
  border-top: ${props => { var _a; return (props.borderTop ? `1px solid ${(_a = THEME.token) === null || _a === void 0 ? void 0 : _a.bw3_5}` : 'none'); }};
183
172
  display: flex;
184
173
  align-items: center;
@@ -207,15 +196,15 @@ export const WrapperBodyModal = styled.div `
207
196
  `;
208
197
  export const ErrorMessage = styled.div `
209
198
  display: ${props => (props.isShow ? 'block' : 'none')};
210
- color: ${(_x = THEME.token) === null || _x === void 0 ? void 0 : _x.red8};
199
+ color: ${(_u = THEME.token) === null || _u === void 0 ? void 0 : _u.red8};
211
200
  font-size: 11px;
212
201
  line-height: 24px;
213
- font-family: ${(_y = THEME.token) === null || _y === void 0 ? void 0 : _y.fontFamily};
202
+ font-family: ${(_v = THEME.token) === null || _v === void 0 ? void 0 : _v.fontFamily};
214
203
  `;
215
204
  export const Wrapper = styled.div ``;
216
205
  export const LabelTitle = styled(AntText) `
217
206
  font-size: 13px !important;
218
- color: ${(_z = THEME.token) === null || _z === void 0 ? void 0 : _z.colorText} !important;
207
+ color: ${(_w = THEME.token) === null || _w === void 0 ? void 0 : _w.colorText} !important;
219
208
  font-weight: bold;
220
209
  `;
221
210
  export const WrapperContentHelp = styled.div `
@@ -229,7 +218,7 @@ export const Link = styled.a `
229
218
  font-size: 12px;
230
219
  text-decoration: none;
231
220
  color: #005fb8;
232
- font-family: ${(_0 = THEME.token) === null || _0 === void 0 ? void 0 : _0.fontFamily};
221
+ font-family: ${(_x = THEME.token) === null || _x === void 0 ? void 0 : _x.fontFamily};
233
222
  font-weight: bold;
234
223
  `;
235
224
  export const IframeHelp = styled.iframe `
@@ -271,8 +260,8 @@ export const IconButtonStyled = styled(Button) `
271
260
 
272
261
  &.antsomi-dropdown-open,
273
262
  &.antsomi-popover-open {
274
- color: ${(_1 = THEME.token) === null || _1 === void 0 ? void 0 : _1.blue7} !important;
275
- background-color: ${(_2 = THEME.token) === null || _2 === void 0 ? void 0 : _2.blue1_1} !important;
276
- border: 1px solid ${(_3 = THEME.token) === null || _3 === void 0 ? void 0 : _3.blue7} !important;
263
+ color: ${(_y = THEME.token) === null || _y === void 0 ? void 0 : _y.blue7} !important;
264
+ background-color: ${(_z = THEME.token) === null || _z === void 0 ? void 0 : _z.blue1_1} !important;
265
+ border: 1px solid ${(_0 = THEME.token) === null || _0 === void 0 ? void 0 : _0.blue7} !important;
277
266
  }
278
267
  `;
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  // Libraries
13
- import React, { memo, useMemo } from 'react';
13
+ import React, { memo } from 'react';
14
14
  import { isEmpty } from 'lodash';
15
15
  // Components
16
16
  import { ThumbnailCard } from '../../../../molecules';
@@ -24,11 +24,11 @@ export const SimilarTemplate = memo(props => {
24
24
  const { show = true, similarTemplates = [], similarCardProps } = props;
25
25
  const _b = similarCardProps || {}, { width = SIMILAR_CARD_WIDTH_DEFAULT, height = SIMILAR_CARD_HEIGHT_DEFAULT } = _b, restOfSimilarCardProps = __rest(_b, ["width", "height"]);
26
26
  // Memo
27
- const thumbnailCacheValue = useMemo(() => new Date().getTime(), []);
27
+ // const thumbnailCacheValue = useMemo(() => new Date().getTime(), []);
28
28
  return show && !isEmpty(similarTemplates) ? (React.createElement(SimilarTemplateWrapper, { gap: 15, vertical: true },
29
29
  React.createElement("div", { className: "title" }, "Similar templates"),
30
30
  React.createElement(TemplateListWrapper, { templateQuantity: MAX_QUANTITY_TEMPLATES }, (_a = similarTemplates.slice(0, MAX_QUANTITY_TEMPLATES)) === null || _a === void 0 ? void 0 : _a.map((item, idx) => {
31
31
  const { id, name, thumbnail } = item || {};
32
- return (React.createElement(ThumbnailCard, Object.assign({ key: id, id: id || idx, name: name, width: width, height: height, thumbnail: thumbnail, actionAvailable: false, className: "thumbnail-card", thumbnailCacheValue: thumbnailCacheValue }, restOfSimilarCardProps)));
32
+ return (React.createElement(ThumbnailCard, Object.assign({ key: id, id: id || idx, name: name, width: width, height: height, thumbnail: thumbnail, actionAvailable: false, className: "thumbnail-card" }, restOfSimilarCardProps)));
33
33
  })))) : null;
34
34
  });
@@ -44,7 +44,7 @@ export const ThumbnailSlider = memo(props => {
44
44
  const calculate = ((thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.length) || 0) * thumbnailWrapperWidth;
45
45
  return calculate > WRAPPER_WIDTH;
46
46
  }, [thumbnails === null || thumbnails === void 0 ? void 0 : thumbnails.length, thumbnailWrapperWidth]);
47
- const thumbnailCacheValue = useMemo(() => new Date().getTime(), []);
47
+ // const thumbnailCacheValue = useMemo(() => new Date().getTime(), []);
48
48
  // Renders
49
49
  const renderThumbnail = (args) => {
50
50
  const { thumbnail, index } = args;
@@ -52,7 +52,9 @@ export const ThumbnailSlider = memo(props => {
52
52
  return (React.createElement(Flex, { gap: GAP_X },
53
53
  !!index && (React.createElement(Flex, { align: "center" },
54
54
  React.createElement(Icon, { type: "icon-ants-expand-more", style: { fontSize: ICON_SIZE, transform: 'rotate(270deg)' } }))),
55
- React.createElement(ThumbnailCard, Object.assign({ key: id, id: id, width: width, height: height, thumbnail: url, thumbnailCacheValue: thumbnailCacheValue, style: { flexShrink: 0 }, className: "thumbnail-animation", actionAvailable: false, onClickWrapper: () => onClickThumbnail === null || onClickThumbnail === void 0 ? void 0 : onClickThumbnail(thumbnail) }, restOfThumbnailProps))));
55
+ React.createElement(ThumbnailCard, Object.assign({ key: id, id: id, width: width, height: height, thumbnail: url,
56
+ // thumbnailCacheValue={thumbnailCacheValue}
57
+ style: { flexShrink: 0 }, className: "thumbnail-animation", actionAvailable: false, onClickWrapper: () => onClickThumbnail === null || onClickThumbnail === void 0 ? void 0 : onClickThumbnail(thumbnail) }, restOfThumbnailProps))));
56
58
  };
57
59
  return thumbnails && !isEmpty(thumbnails) ? (React.createElement(ThumbnailSliderWrapper, null, isShowSwiper ? (React.createElement(React.Fragment, null,
58
60
  React.createElement(Swiper, { slidesPerView: Math.floor(WRAPPER_WIDTH / thumbnailWrapperWidth), spaceBetween: GAP_X, modules: [Navigation, A11y, Thumbs], navigation: {
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  /* eslint-disable react/function-component-definition */
13
13
  // Libraries
14
- import React, { memo, useMemo, useState } from 'react';
14
+ import React, { memo, useState } from 'react';
15
15
  // Components
16
16
  import { CategoryListing, BlankTemplate } from './components';
17
17
  import { Scrollbars, Spin } from '@antscorp/antsomi-ui/es/components/atoms';
@@ -35,7 +35,7 @@ export const TemplateListing = memo(props => {
35
35
  const { onClick: onClickPreview } = previewBtnProps || {};
36
36
  const isHasData = items.length > 0;
37
37
  // Memo
38
- const thumbnailCacheValue = useMemo(() => new Date().getTime(), []);
38
+ // const thumbnailCacheValue = useMemo(() => new Date().getTime(), []);
39
39
  // Hooks
40
40
  const { ref: containerRef, itemPerRow, ratio, gap: listingGap, } = useListingItemResize({
41
41
  gap,
@@ -76,7 +76,9 @@ export const TemplateListing = memo(props => {
76
76
  const loading = typeof (item === null || item === void 0 ? void 0 : item.name) === 'undefined';
77
77
  return (React.createElement("div", { key: id },
78
78
  index === items.length - 2 && React.createElement(LoadMoreBlock, { ref: loadMoreRef }),
79
- React.createElement(ThumbnailCard, Object.assign({ id: id || 0, name: name || 'Untitled', loading: loading, width: width * ratio, height: height * ratio, thumbnail: thumbnail, className: `${templateItemProps.className}`, thumbnailCacheValue: thumbnailCacheValue, previewBtnProps: Object.assign(Object.assign({}, previewBtnProps), { onClick: handleClickThumbnailPreview }) }, restOfTemplateItemProps))));
79
+ React.createElement(ThumbnailCard, Object.assign({ id: id || 0, name: name || 'Untitled', loading: loading, width: width * ratio, height: height * ratio, thumbnail: thumbnail, className: `${templateItemProps.className}`,
80
+ // thumbnailCacheValue={thumbnailCacheValue}
81
+ previewBtnProps: Object.assign(Object.assign({}, previewBtnProps), { onClick: handleClickThumbnailPreview }) }, restOfTemplateItemProps))));
80
82
  }))),
81
83
  !loading && !blankTemplateProps.show && !isHasData && (React.createElement(EmptyData, { icon: emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.icon, title: emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.description })))));
82
84
  return (React.createElement(TemplateListingWrapper, null,
@@ -1,4 +1,4 @@
1
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
1
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
2
2
  // Types
3
3
  import { theme } from 'antd';
4
4
  // Variables
@@ -177,9 +177,13 @@ THEME.components = {
177
177
  borderRadiusSM: 5,
178
178
  },
179
179
  Tree: {
180
+ // Directory token
181
+ directoryNodeSelectedBg: (_w = THEME.token) === null || _w === void 0 ? void 0 : _w.blue1_1,
182
+ directoryNodeSelectedColor: (_x = THEME.token) === null || _x === void 0 ? void 0 : _x.colorText,
180
183
  controlInteractiveSize: 18,
181
- colorBorder: (_w = THEME.token) === null || _w === void 0 ? void 0 : _w.colorPrimary,
182
- nodeHoverBg: 'transparent',
184
+ colorBorder: (_y = THEME.token) === null || _y === void 0 ? void 0 : _y.colorPrimary,
185
+ nodeHoverBg: (_z = THEME.token) === null || _z === void 0 ? void 0 : _z.blue,
186
+ nodeSelectedBg: (_0 = THEME.token) === null || _0 === void 0 ? void 0 : _0.blue1_1,
183
187
  lineWidth: 2,
184
188
  borderRadiusSM: 5,
185
189
  // titleHeight: 12,
@@ -196,7 +200,7 @@ THEME.components = {
196
200
  paddingMD: 0,
197
201
  },
198
202
  Tabs: {
199
- itemColor: (_x = THEME.token) === null || _x === void 0 ? void 0 : _x.bw8,
203
+ itemColor: (_1 = THEME.token) === null || _1 === void 0 ? void 0 : _1.bw8,
200
204
  horizontalItemPadding: '17px 30px',
201
205
  horizontalItemGutter: 0,
202
206
  lineWidthBold: 3,
@@ -208,7 +212,7 @@ THEME.components = {
208
212
  lineHeight: 1.143,
209
213
  lineHeightLG: 1.143,
210
214
  lineHeightSM: 1.143,
211
- itemHoverColor: (_y = THEME.token) === null || _y === void 0 ? void 0 : _y.colorPrimary,
215
+ itemHoverColor: (_2 = THEME.token) === null || _2 === void 0 ? void 0 : _2.colorPrimary,
212
216
  },
213
217
  Collapse: {
214
218
  headerBg: '#FFF',
@@ -216,13 +220,13 @@ THEME.components = {
216
220
  headerPadding: '15px 10px',
217
221
  },
218
222
  Switch: {
219
- colorTextQuaternary: (_z = THEME.token) === null || _z === void 0 ? void 0 : _z.bw0,
220
- colorTextTertiary: (_0 = THEME.token) === null || _0 === void 0 ? void 0 : _0.bw0,
223
+ colorTextQuaternary: (_3 = THEME.token) === null || _3 === void 0 ? void 0 : _3.bw0,
224
+ colorTextTertiary: (_4 = THEME.token) === null || _4 === void 0 ? void 0 : _4.bw0,
221
225
  handleSize: 8,
222
226
  handleSizeSM: 7,
223
227
  trackMinWidth: 27,
224
228
  trackHeight: 16,
225
- handleBg: (_1 = THEME.token) === null || _1 === void 0 ? void 0 : _1.colorPrimary,
229
+ handleBg: (_5 = THEME.token) === null || _5 === void 0 ? void 0 : _5.colorPrimary,
226
230
  },
227
231
  Popover: {
228
232
  borderRadiusLG: 10,
@@ -234,11 +238,11 @@ THEME.components = {
234
238
  paddingXXS: 8,
235
239
  controlItemBgHover: '#F2F9FF',
236
240
  controlItemBgActive: '#DEEFFE',
237
- colorPrimary: (_2 = THEME.token) === null || _2 === void 0 ? void 0 : _2.colorText,
241
+ colorPrimary: (_6 = THEME.token) === null || _6 === void 0 ? void 0 : _6.colorText,
238
242
  controlItemBgActiveHover: '#DEEFFE',
239
243
  },
240
244
  Tooltip: {
241
- colorBgSpotlight: (_3 = THEME.token) === null || _3 === void 0 ? void 0 : _3.bw8,
245
+ colorBgSpotlight: (_7 = THEME.token) === null || _7 === void 0 ? void 0 : _7.bw8,
242
246
  fontSize: 11,
243
247
  },
244
248
  Menu: {
@@ -248,8 +252,8 @@ THEME.components = {
248
252
  itemMarginBlock: 5,
249
253
  itemBorderRadius: 5,
250
254
  subMenuItemBg: 'transparent',
251
- itemDisabledColor: (_4 = THEME.token) === null || _4 === void 0 ? void 0 : _4.colorTextDisabled,
252
- itemActiveBg: (_5 = THEME.token) === null || _5 === void 0 ? void 0 : _5.blue1_1,
255
+ itemDisabledColor: (_8 = THEME.token) === null || _8 === void 0 ? void 0 : _8.colorTextDisabled,
256
+ itemActiveBg: (_9 = THEME.token) === null || _9 === void 0 ? void 0 : _9.blue1_1,
253
257
  },
254
258
  Form: {
255
259
  itemMarginBottom: 15,
package/es/index.d.ts CHANGED
@@ -2,6 +2,8 @@ export * from './components';
2
2
  export * from './types';
3
3
  export * from './queries';
4
4
  export * from './providers';
5
- export { QUERY_KEYS, POST_MESSAGE_TYPES } from './constants';
5
+ export { QUERY_KEYS, POST_MESSAGE_TYPES, CDP_API } from './constants';
6
6
  export { snakeCaseToCamelCase, camelCaseToSnakeCase, getCategoriesFromObjectTemplate, } from './utils';
7
7
  export * from './hooks';
8
+ export { ConfigProvider as AntdConfigProvider } from 'antd';
9
+ export type { ThemeConfig as AntdThemeConfig } from 'antd';
package/es/index.js CHANGED
@@ -2,7 +2,8 @@ export * from './components';
2
2
  export * from './types';
3
3
  export * from './queries';
4
4
  export * from './providers';
5
- export { QUERY_KEYS, POST_MESSAGE_TYPES } from './constants';
5
+ export { QUERY_KEYS, POST_MESSAGE_TYPES, CDP_API } from './constants';
6
6
  export { snakeCaseToCamelCase, camelCaseToSnakeCase, getCategoriesFromObjectTemplate, } from './utils';
7
7
  // Hooks
8
8
  export * from './hooks';
9
+ export { ConfigProvider as AntdConfigProvider } from 'antd';
@@ -50,18 +50,26 @@ export const GlobalStyle = () => {
50
50
 
51
51
  /* width */
52
52
  ::-webkit-scrollbar {
53
+ background: transparent !important;
53
54
  width: ${scrollBarSize} !important;
54
55
  height: ${scrollBarSize} !important;
55
56
  }
56
57
 
57
58
  /* Track */
58
59
  ::-webkit-scrollbar-track {
59
- background: #fff !important;
60
+ background: transparent !important;
60
61
  }
61
62
 
62
63
  /* Handle */
63
64
  ::-webkit-scrollbar-thumb {
64
- background: ${gray5};
65
+ background-color: transparent;
66
+ border-radius: 4px;
67
+ }
68
+
69
+ *:hover {
70
+ &::-webkit-scrollbar-thumb {
71
+ background-color: ${gray5} !important;
72
+ }
65
73
  }
66
74
 
67
75
  .rc-virtual-list {
@@ -1044,6 +1052,14 @@ export const GlobalStyle = () => {
1044
1052
  margin: 3px 0px;
1045
1053
  }
1046
1054
  }
1055
+
1056
+ > .antsomi-tree-list-scrollbar-vertical {
1057
+ width: ${scrollBarSize} !important;
1058
+
1059
+ > .antsomi-tree-list-scrollbar-thumb {
1060
+ background: ${accent7} !important;
1061
+ }
1062
+ }
1047
1063
  }
1048
1064
 
1049
1065
  /* Checkbox */
package/es/test.js CHANGED
@@ -6,7 +6,7 @@ import { Button, RequiredLabel, Login, } from './components';
6
6
  // Queries configs
7
7
  import { queryClientAntsomiUI, QueryClientProviderAntsomiUI } from './queries';
8
8
  import { ConfigProvider } from './providers';
9
- import { BrowserRouter } from 'react-router-dom';
9
+ import { MatchesAnySelectTest } from './tests';
10
10
  export const BACKGROUND_COLOR_STYLE = {
11
11
  SOLID: {
12
12
  value: 'color',
@@ -154,7 +154,7 @@ export const App = () => {
154
154
  /* Login */
155
155
  return React.createElement(Login, Object.assign({}, d));
156
156
  /* MatchesAnySelect */
157
- // return <MatchesAnySelectTest />;
157
+ return React.createElement(MatchesAnySelectTest, null);
158
158
  /* Data Table */
159
159
  return (React.createElement("div", null,
160
160
  React.createElement(RequiredLabel, null, "this is Required"),
@@ -436,7 +436,6 @@ export const App = () => {
436
436
  };
437
437
  const container = document.getElementById('root');
438
438
  const root = createRoot(container);
439
- root.render(React.createElement(ConfigProvider, { locale: "en", appConfig: appConfig },
440
- React.createElement(QueryClientProviderAntsomiUI, { client: queryClientAntsomiUI },
441
- React.createElement(BrowserRouter, null,
442
- React.createElement(App, null)))));
439
+ root.render(React.createElement(QueryClientProviderAntsomiUI, { client: queryClientAntsomiUI },
440
+ React.createElement(ConfigProvider, { locale: "en" },
441
+ React.createElement(App, null))));