@antscorp/antsomi-ui 1.3.17 → 1.3.19

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 (40) hide show
  1. package/es/components/atoms/Icon/index.d.ts +1 -1
  2. package/es/components/atoms/InputDynamic/styled.d.ts +1 -1
  3. package/es/components/atoms/MobileFrameV2/constants.d.ts +8 -2
  4. package/es/components/atoms/MobileFrameV2/constants.js +8 -2
  5. package/es/components/atoms/MobileFrameV2/styled.js +12 -3
  6. package/es/components/atoms/ScrollBox/index.js +1 -1
  7. package/es/components/atoms/Spin/Spin.js +2 -2
  8. package/es/components/atoms/Steps/Steps.d.ts +1 -1
  9. package/es/components/molecules/AddDynamicContent/styled.d.ts +1 -1
  10. package/es/components/molecules/ColorPicker/ChromePicker/index.d.ts +1 -1
  11. package/es/components/molecules/ColorPicker/ChromePicker/styled.d.ts +1 -1
  12. package/es/components/molecules/ColorPicker/SketchPicker/styled.d.ts +1 -1
  13. package/es/components/molecules/DatePicker/components/AdvancedPicker/styled.d.ts +1 -1
  14. package/es/components/molecules/EditorScript/EditorScript.d.ts +1 -0
  15. package/es/components/molecules/Modal/Modal.js +5 -3
  16. package/es/components/molecules/PreviewModal/styled.d.ts +1 -1
  17. package/es/components/molecules/RichMenu/RichMenuBlock/RichMenuBlock.js +2 -2
  18. package/es/components/molecules/ShareAccess/hooks/useShareAccess.d.ts +3 -3
  19. package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.d.ts +1 -1
  20. package/es/components/molecules/UploadImage/index.js +1 -1
  21. package/es/components/organism/Help/styled.d.ts +2 -2
  22. package/es/components/organism/Menu/Menu.d.ts +1 -2
  23. package/es/components/organism/Menu/Menu.js +2 -2
  24. package/es/components/organism/Menu/index.d.ts +1 -1
  25. package/es/components/organism/Menu/index.js +1 -1
  26. package/es/components/organism/PreviewTemplateModal/styled.d.ts +1 -1
  27. package/es/components/template/TemplateListing/Loadable.d.ts +1 -1
  28. package/es/components/template/TemplateListing/hooks/useTemplateListing.d.ts +2 -2
  29. package/es/queries/BusinessObject/useGetListAttributeBO.d.ts +1 -1
  30. package/es/queries/BusinessObject/useGetListAttributeBO.js +1 -1
  31. package/es/queries/BusinessObject/useGetListBO.d.ts +1 -1
  32. package/es/queries/BusinessObject/useGetListEventAttr.d.ts +1 -1
  33. package/es/queries/BusinessObject/useGetListPromotionCodeAttr.d.ts +1 -1
  34. package/es/queries/CustomFunction/useCustomFunction.d.ts +1 -1
  35. package/es/queries/DynamicContentAttribute/useGetDynamicContentAttr.d.ts +1 -1
  36. package/es/queries/PromotionPool/useGetListPromotionPool.d.ts +1 -1
  37. package/es/queries/TemplateListing/index.js +1 -1
  38. package/es/services/TemplateListing/index.js +8 -8
  39. package/es/utils/handleError.js +1 -1
  40. package/package.json +19 -16
@@ -6,5 +6,5 @@ interface IconProps {
6
6
  color?: string;
7
7
  style?: React.CSSProperties;
8
8
  }
9
- export declare const Icon: import("styled-components").StyledComponent<any, any, object & IconProps, string | number | symbol>;
9
+ export declare const Icon: import("styled-components").StyledComponent<any, any, IconProps, string | number | symbol>;
10
10
  export {};
@@ -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 import("react").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, any, any>;
8
8
  export declare const TooltipHover: import("styled-components").StyledComponent<"div", any, {
9
9
  top: number;
10
10
  left: number;
@@ -1,4 +1,10 @@
1
1
  export declare const MOBILE_VIEWPORT: {
2
- width: number;
3
- height: number;
2
+ MD: {
3
+ width: number;
4
+ height: number;
5
+ };
6
+ LG: {
7
+ width: number;
8
+ height: number;
9
+ };
4
10
  };
@@ -1,4 +1,10 @@
1
1
  export const MOBILE_VIEWPORT = {
2
- width: 352.5,
3
- height: 764.2,
2
+ MD: {
3
+ width: 317,
4
+ height: 686.41,
5
+ },
6
+ LG: {
7
+ width: 352.5,
8
+ height: 764.2,
9
+ },
4
10
  };
@@ -14,9 +14,6 @@ export const MobileWrapper = styled.div `
14
14
  `;
15
15
  export const MobileInner = styled.div `
16
16
  position: relative;
17
- width: ${MOBILE_VIEWPORT.width}px;
18
- max-width: ${MOBILE_VIEWPORT.width}px;
19
- height: ${MOBILE_VIEWPORT.height}px;
20
17
  margin: 18px 21px;
21
18
  border-radius: 50px;
22
19
  overflow: hidden;
@@ -27,6 +24,18 @@ export const MobileInner = styled.div `
27
24
  width: 100%;
28
25
  height: 100%;
29
26
  }
27
+
28
+ @media screen and (max-height: 1000px) {
29
+ width: ${MOBILE_VIEWPORT.MD.width}px;
30
+ max-width: ${MOBILE_VIEWPORT.MD.width}px;
31
+ height: ${MOBILE_VIEWPORT.MD.height}px;
32
+ }
33
+
34
+ @media screen and (min-height: 1001px) {
35
+ width: ${MOBILE_VIEWPORT.LG.width}px;
36
+ max-width: ${MOBILE_VIEWPORT.LG.width}px;
37
+ height: ${MOBILE_VIEWPORT.LG.height}px;
38
+ }
30
39
  `;
31
40
  export const MobileCamera = styled.div `
32
41
  position: absolute;
@@ -38,7 +38,7 @@ export const ScrollBox = props => {
38
38
  };
39
39
  return (
40
40
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
41
- React.createElement(Wrapper, Object.assign({ ref: wrapperRef }, Object.assign(Object.assign({}, restOf), { style: Object.assign(Object.assign(Object.assign(Object.assign({}, style), (height && { height })), (maxHeight && { maxHeight })), { paddingRight: isScroll && isPadding ? 8 : 0 }) }), { onScroll: handleScroll }), children));
41
+ React.createElement(Wrapper, Object.assign({ ref: wrapperRef }, restOf, { style: Object.assign(Object.assign(Object.assign(Object.assign({}, style), (height && { height })), (maxHeight && { maxHeight })), { paddingRight: isScroll && isPadding ? 8 : 0 }), onScroll: handleScroll }), children));
42
42
  };
43
43
  const Wrapper = styled.div `
44
44
  height: 100%;
@@ -20,9 +20,9 @@ import { THEME } from '@antscorp/antsomi-ui/es/constants';
20
20
  export const Spin = (props) => {
21
21
  var _a;
22
22
  const { indicatorSize, children } = props, restOf = __rest(props, ["indicatorSize", "children"]);
23
- return (React.createElement(StyledSpin, Object.assign({}, Object.assign({ indicator: (React.createElement(LoadingOutlined, { style: {
23
+ return (React.createElement(StyledSpin, Object.assign({ indicator: (React.createElement(LoadingOutlined, { style: {
24
24
  fontSize: indicatorSize || 30,
25
25
  color: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorPrimary,
26
- }, spin: true })) }, restOf)), children));
26
+ }, spin: true })) }, restOf), children));
27
27
  };
28
28
  Spin.defaultProps = {};
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Steps: import("react").FC<import("antd").StepsProps> & {
3
- Step: typeof import("rc-steps/lib/Step").default;
3
+ Step: typeof import("rc-steps").Step;
4
4
  };
@@ -6,7 +6,7 @@ export declare const InputSuggestion: import("styled-components").StyledComponen
6
6
  Option: import("rc-select/lib/Option").OptionFC;
7
7
  _InternalPanelDoNotUseOrYouWillBeFired: (props: import("antd/es/_util/type").AnyObject) => import("react").JSX.Element;
8
8
  }, any, {}, never>;
9
- export declare const ModalCustom: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof import("react").JSX.IntrinsicElements, any, import("../Modal/styled").CustomModalProps, any>;
9
+ export declare const ModalCustom: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof import("react").JSX.IntrinsicElements, any, any, any>;
10
10
  export declare const ButtonCustom: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>> & {
11
11
  Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
12
12
  }, any, {}, never>;
@@ -1 +1 @@
1
- export declare const ChromePicker: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
1
+ export declare const ChromePicker: import("styled-components").StyledComponent<any, any, any, any>;
@@ -1 +1 @@
1
- export declare const StyledChromePicker: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
1
+ export declare const StyledChromePicker: import("styled-components").StyledComponent<any, any, any, any>;
@@ -1 +1 @@
1
- export declare const SketchPickerWrapper: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
1
+ export declare const SketchPickerWrapper: import("styled-components").StyledComponent<any, any, any, any>;
@@ -4,7 +4,7 @@ export declare const DropdownHeader: import("styled-components").StyledComponent
4
4
  export declare const DropdownFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
5
5
  export declare const DatePickerHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
6
6
  export declare const DatePickerCustomInput: import("styled-components").StyledComponent<"input", any, {}, never>;
7
- export declare const InputStyled: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof import("react").JSX.IntrinsicElements, any, import("../../../../atoms/Input").InputProps, any>;
7
+ export declare const InputStyled: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof import("react").JSX.IntrinsicElements, any, any, any>;
8
8
  export declare const DatePickerFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
9
9
  export declare const CalendarIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
10
10
  export declare const TimeLabel: import("styled-components").StyledComponent<"div", any, {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react-ace/node_modules/ace-builds/ace-modules" />
1
2
  import React, { ReactNode } from 'react';
2
3
  import { IAceEditorProps } from 'react-ace';
3
4
  import 'ace-builds/webpack-resolver';
@@ -7,10 +7,12 @@ import { StyledModal, WrapperSpin } from './styled';
7
7
  export const OriginalModal = memo(props => {
8
8
  // Props
9
9
  const { loading } = props;
10
- return (React.createElement(StyledModal, Object.assign({}, Object.assign(Object.assign({ closeIcon: React.createElement(Icon, { disabled: loading, type: "icon-ants-remove-slim", size: 15 }), footer: (React.createElement(React.Fragment, null,
10
+ return (React.createElement(StyledModal, Object.assign({ closeIcon: React.createElement(Icon, { disabled: loading, type: "icon-ants-remove-slim", size: 15 }),
11
+ footer: (React.createElement(React.Fragment, null,
11
12
  React.createElement(Button, Object.assign({ type: "primary", onClick: props.onOk }, props.okButtonProps), props.okText ? props.okText : 'OK'),
12
- React.createElement(Button, Object.assign({ onClick: props.onCancel }, props.cancelButtonProps), props.cancelText ? props.cancelText : 'Cancel'))), modalRender: node => loading ? (React.createElement(WrapperSpin, null,
13
- React.createElement(Spin, { spinning: loading }, node))) : (node) }, props), { maskClosable: loading ? false : props.maskClosable })),
13
+ React.createElement(Button, Object.assign({ onClick: props.onCancel }, props.cancelButtonProps), props.cancelText ? props.cancelText : 'Cancel'))),
14
+ modalRender: node => loading ? (React.createElement(WrapperSpin, null,
15
+ React.createElement(Spin, { spinning: loading }, node))) : (node) }, props, { maskClosable: loading ? false : props.maskClosable }),
14
16
  props.header || null,
15
17
  props.children || null));
16
18
  });
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledModal: import("styled-components").StyledComponent<import("react").FC<import("../ModalV2").ModalV2Props>, any, {}, never>;
2
+ export declare const StyledModal: import("styled-components").StyledComponent<import("react").FC<import("@antscorp/antsomi-ui/es/components/molecules/ModalV2/ModalV2").ModalV2Props>, any, {}, never>;
3
3
  export declare const ModalHeader: 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>;
4
4
  export declare const ModalBody: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -45,9 +45,9 @@ export const RichMenuBlock = props => {
45
45
  }
46
46
  }, PATH);
47
47
  const renderCell = (cellInfo, ctx) => (React.createElement(RichMenuCell, { context: ctx, isActionLink: isActionLink, isPreview: isPreview, layerActive: layerActive, cellActiveIdx: cellActiveIdx, cell: cellInfo, isSingleMode: isSingleUploadMode, onClick: handleClickCell }));
48
- return (React.createElement(ResizeGrid, Object.assign({ grid: grid, isPreview: isPreview, containerStyle: imageStyles, isCompact: layoutType === 'compact', renderCell: renderCell, cellActiveStyle: { background: 'rgba(0, 95, 184, 0.5)' }, cellBorder: isSingleUploadMode ? '1px solid rgba(0, 95, 184, 1)' : '1px dotted #000000', onChange: handleGridChange, reCalculateFlag: reCalculateFlag }, Object.assign({}, (isSingleUploadMode && {
48
+ return (React.createElement(ResizeGrid, Object.assign({ grid: grid, isPreview: isPreview, containerStyle: imageStyles, isCompact: layoutType === 'compact', renderCell: renderCell, cellActiveStyle: { background: 'rgba(0, 95, 184, 0.5)' }, cellBorder: isSingleUploadMode ? '1px solid rgba(0, 95, 184, 1)' : '1px dotted #000000', onChange: handleGridChange, reCalculateFlag: reCalculateFlag }, (isSingleUploadMode && {
49
49
  image: imageUrl,
50
50
  imagePosition: imageStyles === null || imageStyles === void 0 ? void 0 : imageStyles.objectPosition,
51
51
  imageSize: imageStyles === null || imageStyles === void 0 ? void 0 : imageStyles.objectFit,
52
- })))));
52
+ }))));
53
53
  };
@@ -3,17 +3,17 @@ export declare const useShareAccess: () => {
3
3
  state: {
4
4
  allowEdit: boolean;
5
5
  allowView: boolean;
6
- accessInfo?: import("../types").ObjectAccessInfo | undefined;
6
+ accessInfo?: import("@antscorp/antsomi-ui/es/components/molecules/ShareAccess/types").ObjectAccessInfo | undefined;
7
7
  accessUserId?: number | undefined;
8
8
  accessUserPermission?: {
9
9
  view: number;
10
10
  edit: number;
11
11
  } | undefined;
12
- excludeUserAccess?: import("../types").ExcludeUserAccess | undefined;
12
+ excludeUserAccess?: import("@antscorp/antsomi-ui/es/components/molecules/ShareAccess/types").ExcludeUserAccess | undefined;
13
13
  modalTransferOwnership: {
14
14
  open: boolean;
15
15
  userToOwnerShipId: number;
16
16
  };
17
17
  };
18
- dispatch: import("react").Dispatch<import("../types").ShareAccessAction> | null;
18
+ dispatch: import("react").Dispatch<import("@antscorp/antsomi-ui/es/components/molecules/ShareAccess/types").ShareAccessAction> | null;
19
19
  };
@@ -64,7 +64,7 @@ export declare const useTemplateSave: (options: TemplateListingOptions) => {
64
64
  form: import("antd").FormInstance<any>;
65
65
  errors: any[] | undefined;
66
66
  refetchCategoryList: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<TemplateCategory[], any>>;
67
- refetchTemplateList: <TPageData_1>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData_1>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@antscorp/antsomi-ui/es/types").ResponseListing<import("../../../../models/ObjectTemplate").ObjectTemplate>>, any>>;
67
+ refetchTemplateList: <TPageData_1>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData_1>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@antscorp/antsomi-ui/es/types").ResponseListing<import("@antscorp/antsomi-ui/es/models/ObjectTemplate").ObjectTemplate>>, any>>;
68
68
  onLoadMore: () => void;
69
69
  onChange: (newValue: Partial<TemplateValueOptions>) => void;
70
70
  };
@@ -176,7 +176,7 @@ export const UploadImage = props => {
176
176
  }
177
177
  setSelectedMedia({ url: '' });
178
178
  };
179
- const handleRemoveUploadedMedia = (media, isConfirm = true) => __awaiter(void 0, void 0, void 0, function* () {
179
+ const handleRemoveUploadedMedia = (media_1, ...args_1) => __awaiter(void 0, [media_1, ...args_1], void 0, function* (media, isConfirm = true) {
180
180
  if (isConfirm) {
181
181
  deleteMediaRef.current = media;
182
182
  setOpenConfirmDelete(true);
@@ -58,11 +58,11 @@ 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
+ } & import("react").RefAttributes<import("rc-tree").default<import("antd").TreeDataNode>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
62
62
  TreeNode: import("react").FC<import("rc-tree").TreeNodeProps<import("antd").TreeDataNode>>;
63
63
  DirectoryTree: (<T_1 extends import("rc-tree").BasicDataNode | import("antd").TreeDataNode = import("antd").TreeDataNode>(props: import("antd/es/tree").DirectoryTreeProps<T_1> & {
64
64
  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>>) & {
65
+ } & import("react").RefAttributes<import("rc-tree").default<import("antd").TreeDataNode>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) & {
66
66
  displayName?: string | undefined;
67
67
  };
68
68
  }, any, {}, never>;
@@ -1,2 +1 @@
1
- import AntdMenu from 'antd/es/menu';
2
- export default AntdMenu;
1
+ export { Menu } from 'antd';
@@ -1,2 +1,2 @@
1
- import AntdMenu from 'antd/es/menu';
2
- export default AntdMenu;
1
+ export { Menu } from 'antd';
2
+ // export default AntdMenu;
@@ -1 +1 @@
1
- export { default as Menu } from './Menu';
1
+ export { Menu } from './Menu';
@@ -1 +1 @@
1
- export { default as Menu } from './Menu';
1
+ export { Menu } from './Menu';
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- export declare const ModalContainer: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof import("react").JSX.IntrinsicElements, any, import("../../molecules/Modal/styled").CustomModalProps, any>;
2
+ export declare const ModalContainer: import("styled-components").StyledComponent<import("react").ComponentType<any> | keyof import("react").JSX.IntrinsicElements, any, any, any>;
3
3
  export declare const ModalWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export declare const ImageWrapper: import("styled-components").StyledComponent<"img", any, {}, never>;
@@ -3,4 +3,4 @@
3
3
  * Asynchronously loads the component for TemplateListing
4
4
  *
5
5
  */
6
- export declare const TemplateListing: (props: import("./types").TemplateListingProps<{}>) => JSX.Element;
6
+ export declare const TemplateListing: (props: import("@antscorp/antsomi-ui/es/components").TemplateListingProps<{}>) => JSX.Element;
@@ -43,7 +43,7 @@ export declare const useTemplateListing: <T = undefined>(options: TemplateListin
43
43
  templateItems: TTemplateItem[];
44
44
  openCategoryKeys: string[];
45
45
  similarTemplates: TTemplateItem[];
46
- templateDetail: import("../../../../models/ObjectTemplate").ObjectTemplate | undefined;
46
+ templateDetail: import("@antscorp/antsomi-ui/es/models/ObjectTemplate").ObjectTemplate | undefined;
47
47
  checkedCategories: TCheckedCategories;
48
48
  selectTemplateAction: TSelectTemplateAction | T | undefined;
49
49
  previewTemplateCategories: TCategoryItem[];
@@ -51,7 +51,7 @@ export declare const useTemplateListing: <T = undefined>(options: TemplateListin
51
51
  isLoadingTemplateList: boolean;
52
52
  isLoadingTemplateDetail: boolean;
53
53
  refetchCategoryList: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<TemplateCategory[], any>>;
54
- refetchTemplateList: <TPageData_1>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData_1>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@antscorp/antsomi-ui/es/types").ResponseListing<import("../../../../models/ObjectTemplate").ObjectTemplate>>, any>>;
54
+ refetchTemplateList: <TPageData_1>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData_1>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<import("@antscorp/antsomi-ui/es/types").ResponseListing<import("@antscorp/antsomi-ui/es/models/ObjectTemplate").ObjectTemplate>>, any>>;
55
55
  onChangeCheckedCategories: (checkedCategories: TCheckedCategories) => void;
56
56
  onChangeOpenCategoryKeys: (openKeys: string[]) => void;
57
57
  onRemoveObjectTemplate: (id: TThumbnailCardId) => void;
@@ -6,7 +6,7 @@ type GetListAttributeBOProps<T> = {
6
6
  itemTypeIds?: number[];
7
7
  options?: Omit<UseQueryOptions<Record<string, any>, any, T, any[]>, OptionHasDefault>;
8
8
  };
9
- export declare const useGetListAttributeBO: <T = Record<string, any>>(apiParams: APIParams, infos: PayloadInfo, props?: GetListAttributeBOProps<T> | undefined) => UseQueryResult<T, unknown>;
9
+ export declare const useGetListAttributeBO: <T = Record<string, any>>(apiParams: APIParams, infos: PayloadInfo, props?: GetListAttributeBOProps<T>) => UseQueryResult<T, unknown>;
10
10
  export declare const getListAttributeBOQuery: ({ itemTypeIds, url, infos, }: {
11
11
  itemTypeIds: (number | null)[];
12
12
  } & {
@@ -24,7 +24,7 @@ export const useGetListAttributeBO = (apiParams, infos, props) => {
24
24
  total: [],
25
25
  } }, options), { enabled: itemTypeIds.filter(Boolean).length > 0 }));
26
26
  };
27
- export const getListAttributeBOQuery = ({ itemTypeIds, url, infos, }) => __awaiter(void 0, void 0, void 0, function* () {
27
+ export const getListAttributeBOQuery = (_a) => __awaiter(void 0, [_a], void 0, function* ({ itemTypeIds, url, infos, }) {
28
28
  try {
29
29
  if (itemTypeIds.filter(itemTypeId => !!itemTypeId).length) {
30
30
  const { rows } = (yield queryClientAntsomiUI.fetchQuery({
@@ -2,5 +2,5 @@ import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { APIParams } from '../../components/molecules/AddDynamicContent';
3
3
  import type { PayloadInfo } from '../../types';
4
4
  type TDataFnQuery = Record<string, any>;
5
- export declare const useGetListBO: <T = TDataFnQuery>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: UseQueryOptions<TDataFnQuery, any, T, import("@tanstack/react-query").QueryKey> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
5
+ export declare const useGetListBO: <T = TDataFnQuery>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: UseQueryOptions<TDataFnQuery, any, T>) => import("@tanstack/react-query").UseQueryResult<T, any>;
6
6
  export {};
@@ -1,4 +1,4 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { APIParams } from '../../components/molecules/AddDynamicContent';
3
3
  import type { PayloadInfo } from '../../types';
4
- export declare const useGetListEventAttr: <T = any[]>(apiConfig: APIParams, infos: PayloadInfo, eventSource: string, sourceId: string, queryOptions?: Omit<UseQueryOptions<any[], any, T, import("@tanstack/react-query").QueryKey>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
4
+ export declare const useGetListEventAttr: <T = any[]>(apiConfig: APIParams, infos: PayloadInfo, eventSource: string, sourceId: string, queryOptions?: Omit<UseQueryOptions<any[], any, T>, 'queryKey' | 'queryFn'>) => import("@tanstack/react-query").UseQueryResult<T, any>;
@@ -2,5 +2,5 @@ import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { APIParams } from '../../components/molecules/AddDynamicContent';
3
3
  import type { PayloadInfo } from '../../types';
4
4
  type TQueryFnData = any[];
5
- export declare const useGetListPromotionCodeAttr: <T = TQueryFnData>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<TQueryFnData, any, T, import("@tanstack/react-query").QueryKey>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
5
+ export declare const useGetListPromotionCodeAttr: <T = TQueryFnData>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<TQueryFnData, any, T>, 'queryKey' | 'queryFn'>) => import("@tanstack/react-query").UseQueryResult<T, any>;
6
6
  export {};
@@ -2,7 +2,7 @@ import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import { MediaJsonCustomFunction } from '../../models/CustomFunction';
3
3
  import type { APIParams } from '../../components/molecules/AddDynamicContent';
4
4
  import type { PayloadInfo } from '../../types';
5
- export declare const useGetCustomFunction: <T = MediaJsonCustomFunction[]>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<MediaJsonCustomFunction[], any, T, import("@tanstack/react-query").QueryKey>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
5
+ export declare const useGetCustomFunction: <T = MediaJsonCustomFunction[]>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<MediaJsonCustomFunction[], any, T>, 'queryKey' | 'queryFn'>) => import("@tanstack/react-query").UseQueryResult<T, any>;
6
6
  export declare const useAddSavedCSFunction: () => import("@tanstack/react-query").UseMutationResult<any, unknown, Partial<any> & {
7
7
  url: string;
8
8
  } & Record<string, any> & {
@@ -6,5 +6,5 @@ interface TData {
6
6
  visitor: DynamicContentAttribute['visitor'];
7
7
  customer: DynamicContentAttribute['customer'];
8
8
  }
9
- export declare const useGetDynamicContentAttr: <T = TData>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<TData, any, T, import("@tanstack/react-query").QueryKey>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
9
+ export declare const useGetDynamicContentAttr: <T = TData>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<TData, any, T>, 'queryKey' | 'queryFn'>) => import("@tanstack/react-query").UseQueryResult<T, any>;
10
10
  export {};
@@ -5,5 +5,5 @@ interface TReturnData {
5
5
  rows: any[];
6
6
  total: number;
7
7
  }
8
- export declare const useGetListPromotionPool: <T = TReturnData>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<TReturnData, any, T, import("@tanstack/react-query").QueryKey>, "queryKey" | "queryFn"> | undefined) => import("@tanstack/react-query").UseQueryResult<T, any>;
8
+ export declare const useGetListPromotionPool: <T = TReturnData>(apiConfig: APIParams, infos: PayloadInfo, queryOptions?: Omit<UseQueryOptions<TReturnData, any, T>, 'queryKey' | 'queryFn'>) => import("@tanstack/react-query").UseQueryResult<T, any>;
9
9
  export {};
@@ -25,7 +25,7 @@ export const useGetSaveAsGalleryPermissionEmails = (params) => {
25
25
  };
26
26
  export const useGetObjectTemplateList = (params) => {
27
27
  const { options, args } = params;
28
- return useInfiniteQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_OBJECT_TEMPLATE_LIST, args.params], queryFn: ({ pageParam = 1 }) => __awaiter(void 0, void 0, void 0, function* () {
28
+ return useInfiniteQuery(Object.assign({ queryKey: [QUERY_KEYS.GET_OBJECT_TEMPLATE_LIST, args.params], queryFn: (_a) => __awaiter(void 0, [_a], void 0, function* ({ pageParam = 1 }) {
29
29
  const res = yield objectTemplate.getList(Object.assign(Object.assign({}, args), { params: Object.assign(Object.assign({}, args.params), { page: pageParam }) }));
30
30
  return res;
31
31
  }), getNextPageParam: lastPage => {
@@ -29,7 +29,7 @@ const TEMPLATE_CATEGORY_ROUTE = 'template-category/index';
29
29
  const OBJECT_TEMPLATE_ROUTE = 'object-template';
30
30
  export const templateListingServices = {
31
31
  category: {
32
- getList: ({ params, auth }) => __awaiter(void 0, void 0, void 0, function* () {
32
+ getList: (_a) => __awaiter(void 0, [_a], void 0, function* ({ params, auth }) {
33
33
  try {
34
34
  const { objectTypes = [], categoryCodes, publicLevel, getListType } = params;
35
35
  const response = yield axios({
@@ -45,7 +45,7 @@ export const templateListingServices = {
45
45
  }),
46
46
  },
47
47
  objectTemplate: {
48
- getList: ({ params, auth, }) => __awaiter(void 0, void 0, void 0, function* () {
48
+ getList: (_b) => __awaiter(void 0, [_b], void 0, function* ({ params, auth, }) {
49
49
  try {
50
50
  const response = yield axios({
51
51
  method: 'GET',
@@ -62,7 +62,7 @@ export const templateListingServices = {
62
62
  return Promise.reject(error);
63
63
  }
64
64
  }),
65
- getDetail: ({ params, auth }) => __awaiter(void 0, void 0, void 0, function* () {
65
+ getDetail: (_c) => __awaiter(void 0, [_c], void 0, function* ({ params, auth }) {
66
66
  try {
67
67
  const { template_id } = params, restOfPrams = __rest(params, ["template_id"]);
68
68
  const response = yield axios({
@@ -76,7 +76,7 @@ export const templateListingServices = {
76
76
  return Promise.reject(error);
77
77
  }
78
78
  }),
79
- create: ({ data, auth }) => __awaiter(void 0, void 0, void 0, function* () {
79
+ create: (_d) => __awaiter(void 0, [_d], void 0, function* ({ data, auth }) {
80
80
  try {
81
81
  const response = yield axios({
82
82
  method: 'POST',
@@ -94,7 +94,7 @@ export const templateListingServices = {
94
94
  return Promise.reject(error);
95
95
  }
96
96
  }),
97
- update: ({ data, auth }) => __awaiter(void 0, void 0, void 0, function* () {
97
+ update: (_e) => __awaiter(void 0, [_e], void 0, function* ({ data, auth }) {
98
98
  try {
99
99
  const { template_id } = data, restOfData = __rest(data, ["template_id"]);
100
100
  const response = yield axios({
@@ -113,7 +113,7 @@ export const templateListingServices = {
113
113
  return Promise.reject(error);
114
114
  }
115
115
  }),
116
- bulkUpdate: ({ params, auth }) => __awaiter(void 0, void 0, void 0, function* () {
116
+ bulkUpdate: (_f) => __awaiter(void 0, [_f], void 0, function* ({ params, auth }) {
117
117
  try {
118
118
  const response = yield axios({
119
119
  method: 'POST',
@@ -132,7 +132,7 @@ export const templateListingServices = {
132
132
  return Promise.reject(error);
133
133
  }
134
134
  }),
135
- validateName: ({ params, auth, }) => __awaiter(void 0, void 0, void 0, function* () {
135
+ validateName: (_g) => __awaiter(void 0, [_g], void 0, function* ({ params, auth, }) {
136
136
  try {
137
137
  const response = yield axios({
138
138
  method: 'POST',
@@ -145,7 +145,7 @@ export const templateListingServices = {
145
145
  return Promise.reject(error);
146
146
  }
147
147
  }),
148
- getSaveAsGalleryPermission: ({ auth, }) => __awaiter(void 0, void 0, void 0, function* () {
148
+ getSaveAsGalleryPermission: (_h) => __awaiter(void 0, [_h], void 0, function* ({ auth, }) {
149
149
  try {
150
150
  const response = yield axios({
151
151
  method: 'GET',
@@ -18,7 +18,7 @@ var __rest = (this && this.__rest) || function (s, e) {
18
18
  }
19
19
  return t;
20
20
  };
21
- export const handleError = (error = {}, configInfo = {}, isShowMessageError = false) => __awaiter(void 0, void 0, void 0, function* () {
21
+ export const handleError = (...args_1) => __awaiter(void 0, [...args_1], void 0, function* (error = {}, configInfo = {}, isShowMessageError = false) {
22
22
  const { response, message } = error;
23
23
  const { name: functionName, path, from, priority = 'low' } = configInfo, restOfConfigInfo = __rest(configInfo, ["name", "path", "from", "priority"]);
24
24
  console.log(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.17",
3
+ "version": "1.3.19",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -28,8 +28,8 @@
28
28
  "eslint": "eslint --ext js,ts,tsx",
29
29
  "lint": "yarn run eslint src",
30
30
  "lint:fix": "yarn run eslint src --fix",
31
- "storybook": "start-storybook -p 6006 -s public",
32
- "build-storybook": "build-storybook",
31
+ "storybook": "storybook dev -p 6006",
32
+ "build-storybook": "storybook build",
33
33
  "serve-storybook": "serve storybook-static",
34
34
  "version": "auto-changelog -p && git add CHANGELOG.md",
35
35
  "test": "jest",
@@ -57,7 +57,7 @@
57
57
  "not op_mini all"
58
58
  ],
59
59
  "dependencies": {
60
- "@antscorp/icons": "0.27.10",
60
+ "@antscorp/icons": "^0.27.10",
61
61
  "@antscorp/image-editor": "1.0.2",
62
62
  "@emotion/react": "^11.11.1",
63
63
  "@fortawesome/fontawesome-svg-core": "6.1.1",
@@ -65,6 +65,7 @@
65
65
  "@fortawesome/free-regular-svg-icons": "6.1.1",
66
66
  "@fortawesome/free-solid-svg-icons": "6.1.1",
67
67
  "@fortawesome/react-fontawesome": "0.2.0",
68
+ "@storybook/test": "8.0.5",
68
69
  "@swiper/core": "^0.0.21",
69
70
  "@tanstack/react-query": "4.20.4",
70
71
  "@tanstack/react-query-devtools": "4.20.4",
@@ -106,7 +107,6 @@
106
107
  "devDependencies": {
107
108
  "@ant-design/cssinjs": "^1.6.2",
108
109
  "@antscorp/eslint-config-antsomi": "1.0.4",
109
- "@antscorp/icons": "0.27.4",
110
110
  "@babel/cli": "^7.23.4",
111
111
  "@babel/core": "^7.21.3",
112
112
  "@babel/plugin-proposal-class-properties": "^7.18.6",
@@ -121,15 +121,17 @@
121
121
  "@babel/preset-typescript": "^7.23.3",
122
122
  "@commitlint/cli": "17.5.0",
123
123
  "@commitlint/config-conventional": "17.4.4",
124
- "@storybook/addon-actions": "^6.5.16",
125
- "@storybook/addon-essentials": "^6.5.16",
126
- "@storybook/addon-interactions": "^6.5.16",
127
- "@storybook/addon-links": "^6.5.16",
128
- "@storybook/addon-postcss": "^2.0.0",
129
- "@storybook/builder-webpack5": "^6.5.16",
130
- "@storybook/manager-webpack5": "^6.5.16",
131
- "@storybook/react": "^6.5.16",
132
- "@storybook/testing-library": "^0.0.13",
124
+ "@storybook/addon-actions": "^8.0.5",
125
+ "@storybook/addon-essentials": "^8.0.5",
126
+ "@storybook/addon-interactions": "^8.0.5",
127
+ "@storybook/addon-links": "^8.0.5",
128
+ "@storybook/addon-styling-webpack": "^1.0.0",
129
+ "@storybook/addon-webpack5-compiler-babel": "3.0.3",
130
+ "@storybook/blocks": "8.0.5",
131
+ "@storybook/manager-api": "^8.0.5",
132
+ "@storybook/react": "^8.0.5",
133
+ "@storybook/react-webpack5": "8.0.5",
134
+ "@storybook/theming": "^8.0.5",
133
135
  "@testing-library/jest-dom": "^5.16.5",
134
136
  "@testing-library/react": "^14.0.0",
135
137
  "@types/jest": "^29.5.0",
@@ -163,7 +165,7 @@
163
165
  "eslint-plugin-prettier": "^4.2.1",
164
166
  "eslint-plugin-react": "^7.32.2",
165
167
  "eslint-plugin-react-hooks": "^4.6.0",
166
- "eslint-plugin-storybook": "^0.6.11",
168
+ "eslint-plugin-storybook": "^0.8.0",
167
169
  "file-loader": "^6.2.0",
168
170
  "husky": "^8.0.3",
169
171
  "jest": "^29.5.0",
@@ -179,6 +181,7 @@
179
181
  "react-i18next": "11.16.7",
180
182
  "sass": "^1.60.0",
181
183
  "sass-loader": "^13.2.2",
184
+ "storybook": "8.0.5",
182
185
  "style-loader": "^3.3.2",
183
186
  "styled-components": "^5.3.9",
184
187
  "terser-webpack-plugin": "^5.3.7",
@@ -186,7 +189,7 @@
186
189
  "ts-loader": "^9.4.2",
187
190
  "ts-node": "^10.9.1",
188
191
  "tsconfig-paths-webpack-plugin": "^4.0.1",
189
- "typescript": "^4.9.4",
192
+ "typescript": "^5.4.3",
190
193
  "vite": "^4.2.1",
191
194
  "vite-plugin-mkcert": "^1.15.0",
192
195
  "webpack": "^5.78.0",