@antscorp/antsomi-ui 1.3.3-beta.39 → 1.3.3-beta.40

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 (105) hide show
  1. package/es/components/atoms/InputDynamic/InputDynamic.d.ts +2 -1
  2. package/es/components/atoms/InputDynamic/PopupShortLink.js +20 -7
  3. package/es/components/atoms/InputDynamic/styled.d.ts +1 -1
  4. package/es/components/atoms/Spin/Spin.d.ts +2 -1
  5. package/es/components/atoms/Spin/styled.d.ts +1 -1
  6. package/es/components/atoms/index.d.ts +1 -0
  7. package/es/components/atoms/index.js +1 -0
  8. package/es/components/icons/ArrowGrowIcon.d.ts +2 -1
  9. package/es/components/icons/AudioRecordIcon.d.ts +2 -1
  10. package/es/components/icons/BugIcon.d.ts +2 -1
  11. package/es/components/icons/CameraIcon.d.ts +2 -1
  12. package/es/components/icons/CaptureIcon.d.ts +2 -1
  13. package/es/components/icons/CheckSlimIcon.d.ts +2 -1
  14. package/es/components/icons/CloseIcon.d.ts +2 -1
  15. package/es/components/icons/CommentIcon.d.ts +2 -1
  16. package/es/components/icons/EventIcon.d.ts +2 -1
  17. package/es/components/icons/FreeDrawIcon.d.ts +2 -1
  18. package/es/components/icons/GPTIcon.d.ts +2 -1
  19. package/es/components/icons/GPTIconV2.d.ts +2 -1
  20. package/es/components/icons/GPTIconV3.d.ts +2 -1
  21. package/es/components/icons/HighlightIcon.d.ts +2 -1
  22. package/es/components/icons/IdeaIcon.d.ts +2 -1
  23. package/es/components/icons/InvisibleIcon.d.ts +2 -1
  24. package/es/components/icons/MuteIcon.d.ts +2 -1
  25. package/es/components/icons/OpenUrlIcon.d.ts +2 -1
  26. package/es/components/icons/PauseIcon.d.ts +2 -1
  27. package/es/components/icons/PlaneIcon.d.ts +2 -1
  28. package/es/components/icons/RequestIcon.d.ts +2 -1
  29. package/es/components/icons/StopRecordIcon.d.ts +2 -1
  30. package/es/components/icons/UserIcon.d.ts +2 -1
  31. package/es/components/icons/VerticalDotsIcon.d.ts +2 -1
  32. package/es/components/icons/WarningIcon.d.ts +2 -1
  33. package/es/components/molecules/CaptureScreen/CaptureScreen.d.ts +2 -1
  34. package/es/components/molecules/CaptureScreen/components/CommentBox/CommentBox.d.ts +2 -1
  35. package/es/components/molecules/CaptureScreen/components/Cursor/Cursor.d.ts +2 -1
  36. package/es/components/molecules/Modal/Modal.d.ts +2 -2
  37. package/es/components/molecules/Modal/styled.d.ts +1 -1
  38. package/es/components/molecules/ModalV2/styled.d.ts +1 -1
  39. package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/RichMenuCell/index.d.ts +1 -1
  40. package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/constants.js +1 -1
  41. package/es/components/molecules/{RichMenuChatBar → RichMenu/RichMenuChatBar}/RichMenuChatBar.d.ts +1 -0
  42. package/es/components/molecules/{RichMenuChatBar → RichMenu/RichMenuChatBar}/RichMenuChatBar.js +2 -2
  43. package/es/components/molecules/{RichMenuChatBar → RichMenu/RichMenuChatBar}/styled.d.ts +1 -0
  44. package/es/components/molecules/{RichMenuChatBar → RichMenu/RichMenuChatBar}/styled.js +4 -0
  45. package/es/components/molecules/{RichMenuMobileView → RichMenu/RichMenuMobileView}/RichMenuMobileView.js +2 -2
  46. package/es/components/molecules/RichMenu/index.d.ts +3 -0
  47. package/es/components/molecules/RichMenu/index.js +3 -0
  48. package/es/components/molecules/Select/Select.d.ts +4 -2
  49. package/es/components/molecules/Select/Test.d.ts +2 -1
  50. package/es/components/molecules/TreeSelect/TreeSelect.d.ts +4 -2
  51. package/es/components/molecules/UploadImage/MediaIcon.d.ts +2 -1
  52. package/es/components/molecules/index.d.ts +1 -3
  53. package/es/components/molecules/index.js +1 -3
  54. package/es/components/organism/Help/styled.d.ts +6 -2
  55. package/es/constants/storybook.d.ts +2 -1
  56. package/es/test.d.ts +2 -1
  57. package/package.json +4 -2
  58. package/dist/0173b5993573afa04880.woff +0 -0
  59. package/dist/0dfb9214dfd945cd7290.png +0 -1
  60. package/dist/2883cad25a2b4e87ce5f.eot +0 -0
  61. package/dist/4f54a37971347e3d7122.png +0 -1
  62. package/dist/574b7bee0563a9fe9a29.png +0 -1
  63. package/dist/6b586356e837581204dc.svg +0 -1
  64. package/dist/72eec5c1c786b45a667f.ttf +0 -0
  65. package/dist/bc6bf11c6f5e6743aa4c.png +0 -1
  66. package/dist/dbc405edd6e0806efbc9.svg +0 -1
  67. package/dist/e32f09119052a55cce3c.png +0 -1
  68. package/dist/e3851b9384a984c6fdb5.png +0 -1
  69. package/dist/index.js +0 -2
  70. package/dist/index.js.LICENSE.txt +0 -69
  71. package/dist/main.css +0 -69
  72. package/dist/public/icons/2d496b55d85a9545d7311c073af442bb.png +0 -0
  73. package/dist/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png +0 -0
  74. package/dist/public/icons/725a52bd91a3ce534b10833df510e5fa.png +0 -0
  75. package/dist/public/icons/7d037e0b378e87a82804443636cd0e13.svg +0 -346
  76. package/dist/public/icons/90553767e0a05b9585a54797cfd9ce51.png +0 -0
  77. package/dist/public/icons/bb64e23a1ff390a416d765ee556096ab.svg +0 -87
  78. package/dist/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png +0 -0
  79. package/dist/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png +0 -0
  80. package/dist/public/icons/iphone-top-bar.png +0 -0
  81. package/dist/public/icons/iphone.png +0 -0
  82. package/dist/public/icons/placeholder-image.png +0 -0
  83. package/dist/public/icons/stars_slider.png +0 -0
  84. package/dist/public/icons/transparent.svg +0 -1
  85. /package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/RichMenuBlock.d.ts +0 -0
  86. /package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/RichMenuBlock.js +0 -0
  87. /package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/RichMenuCell/index.js +0 -0
  88. /package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/RichMenuCell/styled.d.ts +0 -0
  89. /package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/RichMenuCell/styled.js +0 -0
  90. /package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/constants.d.ts +0 -0
  91. /package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/index.d.ts +0 -0
  92. /package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/index.js +0 -0
  93. /package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/styled.d.ts +0 -0
  94. /package/es/components/molecules/{RichMenuBlock → RichMenu/RichMenuBlock}/styled.js +0 -0
  95. /package/es/components/molecules/{RichMenuChatBar → RichMenu/RichMenuChatBar}/TypingChat/index.d.ts +0 -0
  96. /package/es/components/molecules/{RichMenuChatBar → RichMenu/RichMenuChatBar}/TypingChat/index.js +0 -0
  97. /package/es/components/molecules/{RichMenuChatBar → RichMenu/RichMenuChatBar}/TypingChat/styled.d.ts +0 -0
  98. /package/es/components/molecules/{RichMenuChatBar → RichMenu/RichMenuChatBar}/TypingChat/styled.js +0 -0
  99. /package/es/components/molecules/{RichMenuChatBar → RichMenu/RichMenuChatBar}/index.d.ts +0 -0
  100. /package/es/components/molecules/{RichMenuChatBar → RichMenu/RichMenuChatBar}/index.js +0 -0
  101. /package/es/components/molecules/{RichMenuMobileView → RichMenu/RichMenuMobileView}/RichMenuMobileView.d.ts +0 -0
  102. /package/es/components/molecules/{RichMenuMobileView → RichMenu/RichMenuMobileView}/index.d.ts +0 -0
  103. /package/es/components/molecules/{RichMenuMobileView → RichMenu/RichMenuMobileView}/index.js +0 -0
  104. /package/es/components/molecules/{RichMenuMobileView → RichMenu/RichMenuMobileView}/styled.d.ts +0 -0
  105. /package/es/components/molecules/{RichMenuMobileView → RichMenu/RichMenuMobileView}/styled.js +0 -0
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { DisableShortLinkTypeProps } from './PopupShortLink';
2
3
  export type KeyTagType = 'shortlink' | 'shortlink_static';
3
4
  export type SelectedPropertiesProps = {
@@ -16,7 +17,7 @@ export type InputDynamicProps = {
16
17
  addMessageToQueue?: Function;
17
18
  };
18
19
  export declare const InputDynamic: {
19
- (props: InputDynamicProps): JSX.Element;
20
+ (props: InputDynamicProps): React.JSX.Element;
20
21
  defaultProps: {
21
22
  value: string;
22
23
  isViewMode: boolean;
@@ -1,6 +1,7 @@
1
1
  // Libraries
2
- import React, { useEffect, useState } from 'react';
2
+ import React, { useEffect } from 'react';
3
3
  import { Col, Row } from 'antd';
4
+ import { useImmer } from 'use-immer';
4
5
  // Molecules
5
6
  import { Modal } from '../../molecules';
6
7
  // Components
@@ -21,7 +22,7 @@ const OPTIONS = [
21
22
  ];
22
23
  export const PopupShortLink = props => {
23
24
  const { open, onClose, onOk, disabledOpts, initSelectedProperties, callback } = props;
24
- const [state, setState] = useState({
25
+ const [state, setState] = useImmer({
25
26
  link: '',
26
27
  type: 'individual',
27
28
  error: '',
@@ -31,23 +32,33 @@ export const PopupShortLink = props => {
31
32
  if (initSelectedProperties && initSelectedProperties.keyTag) {
32
33
  type = initSelectedProperties.keyTag === 'shortlink' ? 'individual' : 'general';
33
34
  }
34
- setState(prev => (Object.assign(Object.assign({}, prev), { link: initSelectedProperties.link, type: type })));
35
+ setState(draft => {
36
+ draft.link = initSelectedProperties.link;
37
+ draft.type = type;
38
+ });
35
39
  }, [initSelectedProperties, setState]);
36
40
  const handleClose = () => {
37
- setState(prev => (Object.assign(Object.assign({}, prev), { link: '', error: '' })));
41
+ setState(draft => {
42
+ draft.link = '';
43
+ draft.error = '';
44
+ });
38
45
  if (onClose)
39
46
  onClose();
40
47
  };
41
48
  const handleValidate = ({ urlString = state.link, afterValidate }) => {
42
49
  const isValid = validateURL(urlString);
43
- setState(prev => (Object.assign(Object.assign({}, prev), { error: isValid ? '' : 'Invalid URL' })));
50
+ setState(draft => {
51
+ draft.error = isValid ? '' : 'Invalid URL';
52
+ });
44
53
  if (typeof afterValidate === 'function')
45
54
  afterValidate(isValid);
46
55
  };
47
56
  const handleOnChange = (value) => {
48
57
  if (state.error)
49
58
  handleValidate({ urlString: value });
50
- setState(prev => (Object.assign(Object.assign({}, prev), { link: value })));
59
+ setState(draft => {
60
+ draft.link = value;
61
+ });
51
62
  };
52
63
  const handleOnOK = () => {
53
64
  handleValidate({
@@ -63,7 +74,9 @@ export const PopupShortLink = props => {
63
74
  });
64
75
  };
65
76
  const onChangeType = (event) => {
66
- setState(prev => (Object.assign(Object.assign({}, prev), { type: event.target.value })));
77
+ setState(draft => {
78
+ draft.type = event.target.value;
79
+ });
67
80
  };
68
81
  return (React.createElement(Modal, { open: open, onCancel: handleClose, title: React.createElement("div", { style: { color: 'rgba(0, 0, 0, 0.87)', fontWeight: 'normal', fontSize: '16px' } }, "Add Short Link"), okText: "OK", cancelText: "Cancel", closable: false, onOk: handleOnOK, okButtonProps: {
69
82
  disabled: !validateURL(state.link),
@@ -4,7 +4,7 @@ export declare const SpanIcon: import("styled-components").StyledComponent<"span
4
4
  isDisabled?: boolean | undefined;
5
5
  }, never>;
6
6
  export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
7
- export declare const InputShortLink: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof JSX.IntrinsicElements, any, import("../Input/Input").InputProps, any>;
7
+ export declare const InputShortLink: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof import("react").JSX.IntrinsicElements, any, import("../Input/Input").InputProps, any>;
8
8
  export declare const TooltipHover: import("styled-components").StyledComponent<"div", any, {
9
9
  top: number;
10
10
  left: number;
@@ -1,9 +1,10 @@
1
+ import React from 'react';
1
2
  import { SpinProps as AntdSpinProps } from 'antd';
2
3
  export interface TSpinProps extends AntdSpinProps {
3
4
  indicatorSize?: number;
4
5
  children?: any;
5
6
  }
6
7
  export declare const Spin: {
7
- (props: TSpinProps): JSX.Element;
8
+ (props: TSpinProps): React.JSX.Element;
8
9
  defaultProps: {};
9
10
  };
@@ -1 +1 @@
1
- export declare const StyledSpin: import("styled-components").StyledComponent<import("antd/es/spin").SpinType, any, {}, never>;
1
+ export declare const StyledSpin: import("styled-components").StyledComponent<import("antd/es/spin").SpinFCType, any, {}, never>;
@@ -35,6 +35,7 @@ export * from './Flex';
35
35
  export * from './RateV2';
36
36
  export { InputDynamic } from './InputDynamic';
37
37
  export * from './PreviewTabs';
38
+ export * from './MobileFrame';
38
39
  export type { SliderProps } from './Slider';
39
40
  export type { PaginationProps } from './Pagination';
40
41
  export type { InputDynamicProps } from './InputDynamic';
@@ -35,3 +35,4 @@ export * from './Flex';
35
35
  export * from './RateV2';
36
36
  export { InputDynamic } from './InputDynamic';
37
37
  export * from './PreviewTabs';
38
+ export * from './MobileFrame';
@@ -1 +1,2 @@
1
- export declare const ArrowGrowIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const ArrowGrowIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const AudioRecordIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const AudioRecordIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const BugIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const BugIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const CameraIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const CameraIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const CaptureIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const CaptureIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const CheckSlimIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const CheckSlimIcon: (props: any) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  export declare const CloseIcon: ({ ...props }: {
2
3
  [x: string]: any;
3
- }) => JSX.Element;
4
+ }) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const CommentIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const CommentIcon: (props: any) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  export declare const EventIcon: ({ ...props }: {
2
3
  [x: string]: any;
3
- }) => JSX.Element;
4
+ }) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const FreeDrawIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const FreeDrawIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const GPTIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const GPTIcon: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const GPTIconV2: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const GPTIconV2: () => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const GPTIconV3: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const GPTIconV3: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const HighlightIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const HighlightIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const IdeaIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const IdeaIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const InvisibleIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const InvisibleIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const MuteIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const MuteIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const OpenUrlIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const OpenUrlIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const PauseIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const PauseIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const PlaneIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const PlaneIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const RequestIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const RequestIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const StopRecordIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const StopRecordIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const UserIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const UserIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const VerticalDotsIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const VerticalDotsIcon: (props: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const WarningIcon: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const WarningIcon: (props: any) => React.JSX.Element;
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  import { IImageEditorProps } from './types';
2
3
  declare const CaptureScreen: {
3
- (props: IImageEditorProps): JSX.Element;
4
+ (props: IImageEditorProps): React.JSX.Element;
4
5
  defaultProps: {
5
6
  isOpen: boolean;
6
7
  src: string;
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  import { CommentBoxProps } from './types';
2
3
  declare const CommentBox: {
3
- (props: CommentBoxProps): JSX.Element;
4
+ (props: CommentBoxProps): React.JSX.Element;
4
5
  defaultProps: {
5
6
  info: {
6
7
  id: string;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { CursorProps } from './types';
2
- declare const Cursor: (props: CursorProps) => JSX.Element | null;
3
+ declare const Cursor: (props: CursorProps) => React.JSX.Element | null;
3
4
  export { Cursor };
@@ -14,10 +14,10 @@ export declare const Modal: string & import("styled-components").StyledComponent
14
14
  useModal: typeof import("antd/es/modal/useModal").default;
15
15
  destroyAll: () => void;
16
16
  config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
17
- _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) => React.JSX.Element;
17
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: any) => React.JSX.Element;
18
18
  }, any, import("./styled").CustomModalProps, never> & import("hoist-non-react-statics").NonReactStatics<React.FC<AntdModalProps> & import("antd/es/modal/confirm").ModalStaticFunctions & {
19
19
  useModal: typeof import("antd/es/modal/useModal").default;
20
20
  destroyAll: () => void;
21
21
  config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
22
- _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) => React.JSX.Element;
22
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: any) => React.JSX.Element;
23
23
  }, {}> & React.FC<ModalProps>;
@@ -10,6 +10,6 @@ export declare const StyledModal: import("styled-components").StyledComponent<im
10
10
  useModal: typeof import("antd/es/modal/useModal").default;
11
11
  destroyAll: () => void;
12
12
  config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
13
- _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) => React.JSX.Element;
13
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: any) => import("react").JSX.Element;
14
14
  }, any, CustomModalProps, never>;
15
15
  export declare const WrapperSpin: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -3,5 +3,5 @@ export declare const StyledModal: import("styled-components").StyledComponent<im
3
3
  useModal: typeof import("antd/es/modal/useModal").default;
4
4
  destroyAll: () => void;
5
5
  config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
6
- _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/modal/PurePanel").PurePanelProps) => React.JSX.Element;
6
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: any) => import("react").JSX.Element;
7
7
  }, any, {}, never>;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { TChildrenCell } from '../../../../types';
2
+ import { TChildrenCell } from '@antscorp/antsomi-ui/es/types';
3
3
  interface RichMenuCellProps {
4
4
  cell: TChildrenCell;
5
5
  context: number;
@@ -721,7 +721,7 @@ export const SAMPLE_RICHMENU = {
721
721
  displayDefault: true,
722
722
  },
723
723
  image: {
724
- imageUrl: 'https://sandbox-st-media-template.antsomi.com/upload/2024/01/04/8d8cf39a-748f-435c-b6c6-b71b5facc739.gif',
724
+ imageUrl: 'https://s.cystack.net/portal/organizations/487b0f9dd9d8543312dc25e32ac71e4f/logo.jpg',
725
725
  imageStyles: {
726
726
  borderTopLeftRadius: '0px',
727
727
  borderTopRightRadius: '0px',
@@ -3,6 +3,7 @@ export interface RichMenuChatBarProps extends React.HtmlHTMLAttributes<HTMLDivEl
3
3
  label?: string;
4
4
  showRichMenu?: boolean;
5
5
  showTypingChat?: boolean;
6
+ disabled?: boolean;
6
7
  onToggleRichMenu?: (toggle: boolean) => void;
7
8
  onToggleTypingChat?: (toggle: boolean) => void;
8
9
  }
@@ -22,8 +22,8 @@ const defaultProps = {
22
22
  showTypingChat: false,
23
23
  };
24
24
  export const RichMenuChatBar = props => {
25
- const { label, showRichMenu, showTypingChat, className, onToggleRichMenu, onToggleTypingChat = () => { } } = props, restOfProps = __rest(props, ["label", "showRichMenu", "showTypingChat", "className", "onToggleRichMenu", "onToggleTypingChat"]);
26
- return (React.createElement(ChatBarWrapper, Object.assign({ "$showRichMenu": showRichMenu, "$showTypingChat": showTypingChat, className: `antsomi-chat-bar ${className}` }, restOfProps), showTypingChat ? (React.createElement(TypingChat, { onClickMenu: () => onToggleTypingChat(!showTypingChat) })) : (React.createElement(React.Fragment, null,
25
+ const { disabled, label, showRichMenu, showTypingChat, className, onToggleRichMenu, onToggleTypingChat = () => { } } = props, restOfProps = __rest(props, ["disabled", "label", "showRichMenu", "showTypingChat", "className", "onToggleRichMenu", "onToggleTypingChat"]);
26
+ return (React.createElement(ChatBarWrapper, Object.assign({ "$showRichMenu": showRichMenu, "$showTypingChat": showTypingChat, "$disabled": disabled, className: `antsomi-chat-bar ${className}` }, restOfProps), showTypingChat ? (React.createElement(TypingChat, { onClickMenu: () => onToggleTypingChat(!showTypingChat) })) : (React.createElement(React.Fragment, null,
27
27
  React.createElement(Icon, { type: "icon-ants-keyboard", className: "icon-keyboard", onClick: () => onToggleTypingChat(!showTypingChat) }),
28
28
  React.createElement(ChatBarMenuBox, { onClick: () => onToggleRichMenu && onToggleRichMenu(!showRichMenu) },
29
29
  React.createElement(Typography.Text, { className: "ants-text-sm" }, label),
@@ -2,6 +2,7 @@
2
2
  interface ChatBarWrapperProps {
3
3
  $showRichMenu?: boolean;
4
4
  $showTypingChat?: boolean;
5
+ $disabled?: boolean;
5
6
  }
6
7
  export declare const ChatBarWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, ChatBarWrapperProps, never>;
7
8
  export declare const ChatBarMenuBox: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -9,6 +9,10 @@ export const ChatBarWrapper = styled(Flex) `
9
9
  background-color: #fff;
10
10
  z-index: 10;
11
11
 
12
+ ${({ $disabled }) => css `
13
+ pointer-events: ${$disabled ? 'none' : 'auto'};
14
+ `}
15
+
12
16
  .icon-caret {
13
17
  transition: all 300ms;
14
18
  ${({ $showRichMenu }) => css `
@@ -14,7 +14,7 @@ import React, { useState } from 'react';
14
14
  // Assets
15
15
  import IphoneTopBar from '@antscorp/antsomi-ui/es/assets/images/iphone-top-bar.png';
16
16
  // Components
17
- import { MobileFrame } from '../../atoms/MobileFrame';
17
+ import { MobileFrame } from '@antscorp/antsomi-ui/es/components/atoms';
18
18
  import { RichMenuChatBar } from '../RichMenuChatBar';
19
19
  import { RichMenuBlock } from '../RichMenuBlock';
20
20
  // Styles
@@ -33,5 +33,5 @@ export const RichMenuMobileView = props => {
33
33
  isPreview && React.createElement(TopBar, { src: IphoneTopBar, width: "100%", height: "auto" }),
34
34
  React.createElement(MobileContent, null,
35
35
  React.createElement(RichMenuWrapper, { "$showRichMenu": showRichMenu && !showTypingChat, "$isPreview": !!isPreview }, richMenu && (React.createElement(RichMenuBlock, { richMenu: richMenu, isPreview: isPreview, onChange: onChangeRichMenu, onClickCell: onClickCell }))),
36
- React.createElement(RichMenuChatBar, { label: richMenu === null || richMenu === void 0 ? void 0 : richMenu.chatBar.label, showRichMenu: showRichMenu, showTypingChat: showTypingChat, onToggleRichMenu: showRichMenu => setState(prevState => (Object.assign(Object.assign({}, prevState), { showRichMenu: !!showRichMenu }))), onToggleTypingChat: showTypingChat => setState(prevState => (Object.assign(Object.assign({}, prevState), { showTypingChat: !!showTypingChat }))) }))));
36
+ React.createElement(RichMenuChatBar, { disabled: !isPreview, label: richMenu === null || richMenu === void 0 ? void 0 : richMenu.chatBar.label, showRichMenu: showRichMenu, showTypingChat: showTypingChat, onToggleRichMenu: showRichMenu => setState(prevState => (Object.assign(Object.assign({}, prevState), { showRichMenu: !!showRichMenu }))), onToggleTypingChat: showTypingChat => setState(prevState => (Object.assign(Object.assign({}, prevState), { showTypingChat: !!showTypingChat }))) }))));
37
37
  };
@@ -0,0 +1,3 @@
1
+ export * from './RichMenuBlock';
2
+ export * from './RichMenuChatBar';
3
+ export * from './RichMenuMobileView';
@@ -0,0 +1,3 @@
1
+ export * from './RichMenuBlock';
2
+ export * from './RichMenuChatBar';
3
+ export * from './RichMenuMobileView';
@@ -7,11 +7,13 @@ export interface SelectProps extends AntdSelectProps {
7
7
  }
8
8
  declare const Select: (<ValueType = any, OptionType extends import("rc-select/lib/Select").DefaultOptionType | import("rc-select/lib/Select").BaseOptionType = import("rc-select/lib/Select").DefaultOptionType>(props: AntdSelectProps<ValueType, OptionType> & {
9
9
  children?: React.ReactNode;
10
- } & React.RefAttributes<import("antd").RefSelectProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
10
+ } & {
11
+ ref?: React.Ref<import("antd").RefSelectProps> | undefined;
12
+ }) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
11
13
  displayName?: string | undefined;
12
14
  SECRET_COMBOBOX_MODE_DO_NOT_USE: string;
13
15
  Option: import("rc-select/lib/Option").OptionFC;
14
16
  OptGroup: import("rc-select/lib/OptGroup").OptionGroupFC;
15
- _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) => React.JSX.Element;
17
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: any) => React.JSX.Element;
16
18
  } & React.FC<SelectProps>;
17
19
  export { Select };
@@ -1,2 +1,3 @@
1
- declare const SelectTest: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const SelectTest: () => React.JSX.Element;
2
3
  export default SelectTest;
@@ -1,11 +1,13 @@
1
1
  /// <reference types="react" />
2
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> & {
3
3
  children?: import("react").ReactNode;
4
- } & import("react").RefAttributes<import("antd").RefSelectProps>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
4
+ } & {
5
+ ref?: import("react").Ref<import("antd").RefSelectProps> | undefined;
6
+ }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
5
7
  displayName?: string | undefined;
6
8
  TreeNode: import("react").FC<import("rc-tree-select/lib/TreeNode").TreeNodeProps>;
7
9
  SHOW_ALL: "SHOW_ALL";
8
10
  SHOW_PARENT: "SHOW_PARENT";
9
11
  SHOW_CHILD: "SHOW_CHILD";
10
- _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) => React.JSX.Element;
12
+ _InternalPanelDoNotUseOrYouWillBeFired: (props: any) => import("react").JSX.Element;
11
13
  };
@@ -1,2 +1,3 @@
1
- declare const MediaIcon: (_props: any) => JSX.Element;
1
+ import React from 'react';
2
+ declare const MediaIcon: (_props: any) => React.JSX.Element;
2
3
  export default MediaIcon;
@@ -33,9 +33,7 @@ export { TextTransformSelect } from './TextTransformSelect';
33
33
  export { FontSetting, FontSettingEdit } from './FontSetting';
34
34
  export { Form } from './Form';
35
35
  export { ResizeGrid } from './ResizeGrid';
36
- export * from './RichMenuChatBar';
37
- export * from './RichMenuBlock';
38
- export * from './RichMenuMobileView';
36
+ export * from './RichMenu';
39
37
  export { ModalV2 } from './ModalV2';
40
38
  export * from './PreviewModal';
41
39
  export type { AdvancedPickerProps, TAdvancedPickerOption, TAdvancedRangePickerTimeRange, } from './DatePicker';
@@ -33,8 +33,6 @@ export { TextTransformSelect } from './TextTransformSelect';
33
33
  export { FontSetting, FontSettingEdit } from './FontSetting';
34
34
  export { Form } from './Form';
35
35
  export { ResizeGrid } from './ResizeGrid';
36
- export * from './RichMenuChatBar';
37
- export * from './RichMenuBlock';
38
- export * from './RichMenuMobileView';
36
+ export * from './RichMenu';
39
37
  export { ModalV2 } from './ModalV2';
40
38
  export * from './PreviewModal';
@@ -58,11 +58,15 @@ export declare const TitleSearch: import("styled-components").StyledComponent<"s
58
58
  export declare const WrapperSearch: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/input").SearchProps & import("react").RefAttributes<import("antd").InputRef>>, any, {}, never>;
59
59
  export declare const TreeContent: import("styled-components").StyledComponent<(<T extends import("rc-tree").BasicDataNode | import("antd").TreeDataNode = import("antd").TreeDataNode>(props: import("antd").TreeProps<T> & {
60
60
  children?: import("react").ReactNode;
61
- } & import("react").RefAttributes<import("rc-tree/lib/Tree").default<import("antd").TreeDataNode>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
61
+ } & {
62
+ ref?: import("react").Ref<import("rc-tree/lib/Tree").default<import("antd").TreeDataNode>> | undefined;
63
+ }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
62
64
  TreeNode: import("react").FC<import("rc-tree").TreeNodeProps<import("antd").TreeDataNode>>;
63
65
  DirectoryTree: (<T_1 extends import("rc-tree").BasicDataNode | import("antd").TreeDataNode = import("antd").TreeDataNode>(props: import("antd/es/tree").DirectoryTreeProps<T_1> & {
64
66
  children?: import("react").ReactNode;
65
- } & import("react").RefAttributes<import("rc-tree/lib/Tree").default<import("antd").TreeDataNode>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
67
+ } & {
68
+ ref?: import("react").Ref<import("rc-tree/lib/Tree").default<import("antd").TreeDataNode>> | undefined;
69
+ }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
66
70
  displayName?: string | undefined;
67
71
  };
68
72
  }, any, {}, never>;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  export declare const TABLE_API_COLUMNS: ({
2
3
  title: string;
3
4
  dataIndex: string;
@@ -7,5 +8,5 @@ export declare const TABLE_API_COLUMNS: ({
7
8
  title: string;
8
9
  dataIndex: string;
9
10
  key: string;
10
- render: (text: any) => JSX.Element;
11
+ render: (text: any) => React.JSX.Element;
11
12
  })[];
package/es/test.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import '@antscorp/icons/main.css';
2
3
  export declare const BACKGROUND_COLOR_STYLE: {
3
4
  SOLID: {
@@ -10,4 +11,4 @@ export declare const BACKGROUND_COLOR_STYLE: {
10
11
  };
11
12
  };
12
13
  export declare const customColors: string[];
13
- export declare const App: () => JSX.Element;
14
+ export declare const App: () => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.3-beta.39",
3
+ "version": "1.3.3-beta.40",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -77,6 +77,7 @@
77
77
  "html2canvas": "^1.4.1",
78
78
  "i18next": "21.6.16",
79
79
  "i18next-browser-languagedetector": "6.1.2",
80
+ "immer": "^10.0.3",
80
81
  "lodash": "^4.17.21",
81
82
  "moment": "2.29.2",
82
83
  "qs": "6.10.3",
@@ -87,7 +88,8 @@
87
88
  "rehype-highlight": "^6.0.0",
88
89
  "remark-gfm": "^3.0.1",
89
90
  "ts-dedent": "^2.2.0",
90
- "tui-image-editor": "^3.15.3"
91
+ "tui-image-editor": "^3.15.3",
92
+ "use-immer": "^0.9.0"
91
93
  },
92
94
  "devDependencies": {
93
95
  "@ant-design/cssinjs": "^1.6.2",
Binary file
@@ -1 +0,0 @@
1
- export default __webpack_public_path__ + "/public/icons/d327b24e9c5d8f486f08d253aab58ce6.png";
Binary file
@@ -1 +0,0 @@
1
- export default __webpack_public_path__ + "/public/icons/725a52bd91a3ce534b10833df510e5fa.png";
@@ -1 +0,0 @@
1
- export default __webpack_public_path__ + "/public/icons/2d496b55d85a9545d7311c073af442bb.png";
@@ -1 +0,0 @@
1
- export default __webpack_public_path__ + "/public/icons/bb64e23a1ff390a416d765ee556096ab.svg";
Binary file
@@ -1 +0,0 @@
1
- export default __webpack_public_path__ + "/public/icons/2fbb4e0927d18e3f8e5c6511ab88d5b3.png";
@@ -1 +0,0 @@
1
- export default __webpack_public_path__ + "/public/icons/7d037e0b378e87a82804443636cd0e13.svg";
@@ -1 +0,0 @@
1
- export default __webpack_public_path__ + "/public/icons/90553767e0a05b9585a54797cfd9ce51.png";
@@ -1 +0,0 @@
1
- export default __webpack_public_path__ + "/public/icons/f1cf266d0a0a53ce07f2dbb859869b7a.png";