@antscorp/antsomi-ui 1.3.5-beta.267 → 1.3.5-beta.269

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 (27) hide show
  1. package/es/components/molecules/{EmptyTemplate/EmptyTemplate.d.ts → EmptyData/EmptyData.d.ts} +4 -2
  2. package/es/components/molecules/EmptyData/EmptyData.js +24 -0
  3. package/es/components/molecules/EmptyData/constants.d.ts +6 -0
  4. package/es/components/molecules/EmptyData/constants.js +12 -0
  5. package/es/components/molecules/EmptyData/index.d.ts +2 -0
  6. package/es/components/molecules/EmptyData/index.js +1 -0
  7. package/es/components/molecules/{EmptyTemplate → EmptyData}/styled.d.ts +3 -1
  8. package/es/components/molecules/{EmptyTemplate → EmptyData}/styled.js +25 -6
  9. package/es/components/molecules/index.d.ts +1 -1
  10. package/es/components/molecules/index.js +1 -1
  11. package/es/components/organism/AlgorithmsSetting/index.d.ts +1 -0
  12. package/es/components/organism/AlgorithmsSetting/index.js +7 -4
  13. package/es/components/organism/ContentSources/Content.d.ts +2 -1
  14. package/es/components/organism/ContentSources/Content.js +2 -2
  15. package/es/components/organism/ContentSources/Group.d.ts +2 -1
  16. package/es/components/organism/ContentSources/Group.js +9 -5
  17. package/es/components/organism/ContentSources/Settings.d.ts +2 -1
  18. package/es/components/organism/ContentSources/Settings.js +2 -2
  19. package/es/components/organism/ContentSources/index.d.ts +2 -1
  20. package/es/components/organism/ContentSources/index.js +8 -3
  21. package/es/components/organism/ContentSources/types.d.ts +5 -0
  22. package/es/constants/variables.d.ts +5 -0
  23. package/es/constants/variables.js +5 -0
  24. package/package.json +1 -1
  25. package/es/components/molecules/EmptyTemplate/EmptyTemplate.js +0 -22
  26. package/es/components/molecules/EmptyTemplate/index.d.ts +0 -2
  27. package/es/components/molecules/EmptyTemplate/index.js +0 -1
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
- export interface EmptyTemplateProps {
2
+ export interface EmptyDataProps {
3
+ size?: TUISize;
3
4
  icon?: React.ReactNode;
4
5
  title?: React.ReactNode;
6
+ subTitle?: React.ReactNode;
5
7
  description?: React.ReactNode;
6
8
  loading?: boolean;
7
9
  className?: string;
@@ -9,4 +11,4 @@ export interface EmptyTemplateProps {
9
11
  imageClassName?: string;
10
12
  imageStyle?: React.CSSProperties;
11
13
  }
12
- export declare const EmptyTemplate: React.FC<React.PropsWithChildren<EmptyTemplateProps>>;
14
+ export declare const EmptyData: React.FC<React.PropsWithChildren<EmptyDataProps>>;
@@ -0,0 +1,24 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ import { LoadingOutlined } from '@ant-design/icons';
4
+ import { isString } from 'lodash';
5
+ // Components
6
+ import { Flex, Spin, Typography } from '@antscorp/antsomi-ui/es/components/atoms';
7
+ // Components
8
+ import { Icon } from '@antscorp/antsomi-ui/es/components';
9
+ // Styled
10
+ import { EmptyIcon, EmptyWrapper, ImageWrapper } from './styled';
11
+ const { Text } = Typography;
12
+ export const EmptyData = props => {
13
+ const { size = 'medium', icon = 'icon-ants-media', title, subTitle, description, loading, className, image, imageClassName, imageStyle, children, } = props;
14
+ return (React.createElement(EmptyWrapper, { className: className },
15
+ React.createElement(Flex, { vertical: true, align: "center", justify: "center", gap: 15 },
16
+ !image && (React.createElement(EmptyIcon, { className: "animate__animated animate__tada", "$size": size }, isString(icon) ? React.createElement(Icon, { type: icon }) : icon)),
17
+ image && (React.createElement(ImageWrapper, { className: imageClassName, style: imageStyle },
18
+ React.createElement("img", { src: image, alt: "" }))),
19
+ loading ? (React.createElement(Spin, { indicator: React.createElement(LoadingOutlined, { style: { fontSize: 24 }, spin: true }) })) : (React.createElement(Flex, { gap: 5, align: "center", justify: "center", vertical: true },
20
+ title && React.createElement(Text, { className: "title animate__animated animate__fadeInUp" }, title),
21
+ subTitle && (React.createElement(Text, { className: "subTitle animate__animated animate__fadeInUp" }, subTitle)),
22
+ description && (React.createElement(Text, { className: "description animate__animated animate__fadeInUp" }, description))))),
23
+ children));
24
+ };
@@ -0,0 +1,6 @@
1
+ export declare const EMPTY_WRAPPER_SIZE: {
2
+ [x: string]: number;
3
+ };
4
+ export declare const EMPTY_ICON_SIZE: {
5
+ [x: string]: number;
6
+ };
@@ -0,0 +1,12 @@
1
+ import { UI_SIZE } from '@antscorp/antsomi-ui/es/constants';
2
+ const { SMALL, MEDIUM, LARGE } = UI_SIZE;
3
+ export const EMPTY_WRAPPER_SIZE = {
4
+ [SMALL]: 60,
5
+ [MEDIUM]: 80,
6
+ [LARGE]: 100,
7
+ };
8
+ export const EMPTY_ICON_SIZE = {
9
+ [SMALL]: 27,
10
+ [MEDIUM]: 48,
11
+ [LARGE]: 60,
12
+ };
@@ -0,0 +1,2 @@
1
+ export { EmptyData } from './EmptyData';
2
+ export type { EmptyDataProps } from './EmptyData';
@@ -0,0 +1 @@
1
+ export { EmptyData } from './EmptyData';
@@ -1,4 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const EmptyWrapper: 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>;
3
- export declare const EmptyIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
3
+ export declare const EmptyIcon: import("styled-components").StyledComponent<"div", any, {
4
+ $size?: TUISize | undefined;
5
+ }, never>;
4
6
  export declare const ImageWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,10 +1,11 @@
1
1
  var _a, _b, _c;
2
2
  // Libraries
3
- import styled from 'styled-components';
3
+ import styled, { css } from 'styled-components';
4
4
  // Components
5
5
  import { Flex } from '@antscorp/antsomi-ui/es/components/atoms';
6
6
  // Constants
7
7
  import { THEME } from '@antscorp/antsomi-ui/es/constants';
8
+ import { EMPTY_ICON_SIZE, EMPTY_WRAPPER_SIZE } from './constants';
8
9
  export const EmptyWrapper = styled(Flex) `
9
10
  width: 100%;
10
11
  height: 100%;
@@ -12,7 +13,14 @@ export const EmptyWrapper = styled(Flex) `
12
13
  .title {
13
14
  font-size: 14px;
14
15
  font-weight: 400;
15
- line-height: 16px;
16
+ line-height: 16.41px;
17
+ color: black;
18
+ }
19
+
20
+ .subTitle {
21
+ font-size: 12px;
22
+ font-weight: 600;
23
+ line-height: 14.06px;
16
24
  color: black;
17
25
  }
18
26
 
@@ -27,19 +35,30 @@ EmptyWrapper.defaultProps = {
27
35
  vertical: true,
28
36
  align: 'center',
29
37
  justify: 'center',
30
- gap: 15,
38
+ gap: 20,
31
39
  };
32
40
  export const EmptyIcon = styled.div `
33
41
  display: flex;
34
42
  align-items: center;
35
43
  justify-content: center;
36
- width: 80px;
37
- height: 80px;
38
44
  border-radius: 100%;
39
45
  background-color: ${(_b = THEME.token) === null || _b === void 0 ? void 0 : _b.bw2};
40
46
 
47
+ /* Handle Size */
48
+ ${({ $size }) => {
49
+ if ($size) {
50
+ return css `
51
+ width: ${EMPTY_WRAPPER_SIZE[$size]}px;
52
+ height: ${EMPTY_WRAPPER_SIZE[$size]}px;
53
+
54
+ i {
55
+ font-size: ${EMPTY_ICON_SIZE[$size]}px;
56
+ }
57
+ `;
58
+ }
59
+ }}
60
+
41
61
  i {
42
- font-size: 40px;
43
62
  color: ${(_c = THEME.token) === null || _c === void 0 ? void 0 : _c.bw6};
44
63
  }
45
64
  `;
@@ -45,8 +45,8 @@ export { InputNumber as InputNumberWithLabel } from './InputNumber';
45
45
  export * from './SelectMulti';
46
46
  export * from './SelectEventAttribute';
47
47
  export * from './DatePickerV2';
48
- export { EmptyTemplate, EmptyTemplateProps } from './EmptyTemplate';
49
48
  export { ModalSelect } from './ModalSelect';
49
+ export { EmptyData, EmptyDataProps } from './EmptyData';
50
50
  export * from './PreviewModal';
51
51
  export * from './Drawer';
52
52
  export * from './DrawerDetail';
@@ -45,8 +45,8 @@ export { InputNumber as InputNumberWithLabel } from './InputNumber';
45
45
  export * from './SelectMulti';
46
46
  export * from './SelectEventAttribute';
47
47
  export * from './DatePickerV2';
48
- export { EmptyTemplate } from './EmptyTemplate';
49
48
  export { ModalSelect } from './ModalSelect';
49
+ export { EmptyData } from './EmptyData';
50
50
  export * from './PreviewModal';
51
51
  export * from './Drawer';
52
52
  export * from './DrawerDetail';
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { TRanking } from '../../atoms/InputDynamic/types';
3
3
  interface AlgorithmsSettingProps {
4
4
  isShowErrorAlert: boolean;
5
+ isHideRanking?: boolean;
5
6
  journeySettings: Record<string, any>;
6
7
  contentSourceGroupId: string;
7
8
  itemTypeId: number;
@@ -73,7 +73,7 @@ const styleGrid = {
73
73
  };
74
74
  export const AlgorithmsSetting = (props) => {
75
75
  var _a;
76
- const { data, itemTypeId, itemTypeName, isShowErrorAlert, journeySettings, onChange } = props;
76
+ const { data, itemTypeId, isHideRanking, itemTypeName, isShowErrorAlert, journeySettings, onChange, } = props;
77
77
  // Translations
78
78
  const { t } = i18nInstance;
79
79
  // Selectors
@@ -757,9 +757,12 @@ export const AlgorithmsSetting = (props) => {
757
757
  });
758
758
  }
759
759
  };
760
- return (React.createElement(AlgorithmsSettingWrapper, null,
761
- React.createElement(SettingWrapper, { containerStyle: isCDP ? { justifyContent: 'flex-start' } : {}, label: t(translations.ranking.title), labelStyle: { fontWeight: isCDP ? 'normal' : 'bold', width: isCDP ? LABEL_WIDTH : 'auto' }, labelColor: isCDP ? (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorText : undefined },
762
- React.createElement(RadioGroup, { options: Object.values(RANKING_TYPE), value: ranking.type, onChange: onChangeType })),
760
+ return (React.createElement(AlgorithmsSettingWrapper, { style: { marginTop: isHideRanking ? -20 : 0 } },
761
+ !isHideRanking && (React.createElement(SettingWrapper, { containerStyle: isCDP ? { justifyContent: 'flex-start' } : {}, label: t(translations.ranking.title), labelStyle: {
762
+ fontWeight: isCDP ? 'normal' : 'bold',
763
+ width: isCDP ? LABEL_WIDTH : 'auto',
764
+ }, labelColor: isCDP ? (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.colorText : undefined },
765
+ React.createElement(RadioGroup, { options: Object.values(RANKING_TYPE), value: ranking.type, onChange: onChangeType }))),
763
766
  ranking.type === RANKING_TYPE.ALGORITHMS.value ? (React.createElement(StyledTabs, { defaultActiveKey: activeTab, activeKey: activeTab, onChange: onChangeTabs, destroyInactiveTabPane: true }, Object.values(ALGORITHM_TABS)
764
767
  .filter(({ value }) => {
765
768
  if (itemTypeId === PRODUCT_ITEM_TYPE_ID || itemTypeName === ITEM_TYPE_NAME.ARTICLE) {
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
- import { TContentSourceGroup, UpdateGroupAction } from './types';
2
+ import { HideOptionTypes, TContentSourceGroup, UpdateGroupAction } from './types';
3
3
  import { FallbackBO } from '@antscorp/antsomi-ui/es/models/FallbackBO';
4
4
  export type TProps = {
5
5
  groups: TContentSourceGroup[];
6
6
  isLoadingListBO: boolean;
7
7
  listBO: any;
8
+ hideOptionTypes?: HideOptionTypes;
8
9
  onChange?: (contentSources: TContentSourceGroup[]) => void;
9
10
  expanded?: string[];
10
11
  onDeleteGroup?: (groupId: string) => void;
@@ -25,7 +25,7 @@ const defaultProps = {
25
25
  };
26
26
  const Content = (props = defaultProps) => {
27
27
  // prettier-ignore
28
- const { groups, isLoadingListBO, listBO, onChangeGroup, onChangeExpand, expanded, isShowErrorAlert, listFallbackBO, journeySettings, onDeleteGroup } = props;
28
+ const { groups, isLoadingListBO, listBO, onChangeGroup, onChangeExpand, expanded, isShowErrorAlert, hideOptionTypes, listFallbackBO, journeySettings, onDeleteGroup } = props;
29
29
  const { t } = i18nInstance;
30
30
  const mode = useSelectModeView();
31
31
  const isCDP = mode === 'CDP';
@@ -69,7 +69,7 @@ const Content = (props = defaultProps) => {
69
69
  }, onClick: (e) => handleOnDeleteGroup(e, group.groupId), type: "icon-ants-outline-delete", size: 20 })));
70
70
  };
71
71
  return (React.createElement(Collapse, { ghost: true, bordered: true, activeKey: expanded, expandIconPosition: "end", onChange: handleOnChangeExpand, destroyInactivePanel: true, rootClassName: "no-border-top" }, groups.map((group, index) => {
72
- const groupNode = (React.createElement(Group, { data: group, groupNames: groupNames, isLoadingSelectBO: isLoadingListBO, listBO: listBO, onChange: onChangeGroup, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, listFallbackBO: listFallbackBO }));
72
+ const groupNode = (React.createElement(Group, { data: group, hideOptionTypes: hideOptionTypes, groupNames: groupNames, isLoadingSelectBO: isLoadingListBO, listBO: listBO, onChange: onChangeGroup, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, listFallbackBO: listFallbackBO }));
73
73
  if (isCDP) {
74
74
  return React.createElement(React.Fragment, { key: group.groupId }, groupNode);
75
75
  }
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- import { TContentSourceGroup, UpdateGroupAction } from './types';
2
+ import { HideOptionTypes, TContentSourceGroup, UpdateGroupAction } from './types';
3
3
  import { FallbackBO } from '@antscorp/antsomi-ui/es/models/FallbackBO';
4
4
  type TProps = {
5
5
  data: TContentSourceGroup;
6
6
  listBO: any[];
7
+ hideOptionTypes?: HideOptionTypes;
7
8
  isLoadingSelectBO: boolean;
8
9
  onChange?: (groupId: string, action: UpdateGroupAction) => void;
9
10
  isShowErrorAlert: boolean;
@@ -31,7 +31,7 @@ const cdpStyle = {
31
31
  };
32
32
  const Group = (props) => {
33
33
  var _a, _b;
34
- const { data, isLoadingSelectBO, listBO, listFallbackBO, isShowErrorAlert, journeySettings, onChange, } = props;
34
+ const { data, isLoadingSelectBO, listBO, listFallbackBO, hideOptionTypes, isShowErrorAlert, journeySettings, onChange, } = props;
35
35
  const { itemTypeId, filters, level, itemTypeName } = data;
36
36
  const mode = useSelectModeView();
37
37
  const isCDP = mode === 'CDP';
@@ -78,6 +78,10 @@ const Group = (props) => {
78
78
  return listFallback;
79
79
  // eslint-disable-next-line react-hooks/exhaustive-deps
80
80
  }, [listFallbackBO, itemTypeName]);
81
+ const isShowLevelSetting = useMemo(() => itemTypeId === PRODUCT_ITEM_TYPE_ID &&
82
+ relationship &&
83
+ !!(relationship === null || relationship === void 0 ? void 0 : relationship.enabled) &&
84
+ !(hideOptionTypes === null || hideOptionTypes === void 0 ? void 0 : hideOptionTypes.level), [hideOptionTypes === null || hideOptionTypes === void 0 ? void 0 : hideOptionTypes.level, itemTypeId, relationship]);
81
85
  useDeepCompareEffect(() => {
82
86
  var _a;
83
87
  if (!isEmpty(relationship)) {
@@ -105,18 +109,18 @@ const Group = (props) => {
105
109
  type: 'BO_TYPE',
106
110
  payload: { itemTypeId: value },
107
111
  }), errorArchive: isCheckBOArchiveDelete(listBO, itemTypeId) }),
108
- itemTypeId === PRODUCT_ITEM_TYPE_ID && relationship && !!(relationship === null || relationship === void 0 ? void 0 : relationship.enabled) && (React.createElement(LevelSetting, { value: level || 'parent', levelOption: relationship.recommendation_level, onChange: e => {
112
+ isShowLevelSetting && (React.createElement(LevelSetting, { value: level || 'parent', levelOption: relationship.recommendation_level, onChange: e => {
109
113
  handleChange({
110
114
  type: 'LEVEL',
111
115
  payload: { level: e.target.value },
112
116
  });
113
117
  } })),
114
118
  itemTypeId && (React.createElement(React.Fragment, null,
115
- React.createElement(FilterSetting, { boId: itemTypeId, filters: filters, onOKChangeFilter: (conditions) => handleChange({
119
+ !(hideOptionTypes === null || hideOptionTypes === void 0 ? void 0 : hideOptionTypes.filter) && (React.createElement(FilterSetting, { boId: itemTypeId, filters: filters, onOKChangeFilter: (conditions) => handleChange({
116
120
  type: 'FILTER',
117
121
  payload: { conditions },
118
- }) }),
119
- React.createElement(AlgorithmsSetting, { journeySettings: journeySettings, contentSourceGroupId: data.groupId, isShowErrorAlert: isShowErrorAlert, itemTypeId: itemTypeId, data: data.ranking, onChange: (value) => handleChange({
122
+ }) })),
123
+ React.createElement(AlgorithmsSetting, { journeySettings: journeySettings, contentSourceGroupId: data.groupId, isHideRanking: hideOptionTypes === null || hideOptionTypes === void 0 ? void 0 : hideOptionTypes.ranking, isShowErrorAlert: isShowErrorAlert, itemTypeId: itemTypeId, data: data.ranking, onChange: (value) => handleChange({
120
124
  type: 'ALGORITHMS',
121
125
  payload: { ranking: value },
122
126
  }), itemTypeName: itemTypeName }),
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { TServiceAuth } from '@antscorp/antsomi-ui/es/types';
3
- import type { ContentSourceModeView, JourneySettings, TContentSourceSettings } from './types';
3
+ import type { ContentSourceModeView, HideOptionTypes, JourneySettings, TContentSourceSettings } from './types';
4
4
  interface SettingsProps {
5
5
  serviceAuth: TServiceAuth;
6
6
  mode: ContentSourceModeView;
7
+ hideOptionTypes?: HideOptionTypes;
7
8
  onChange: (contentSource: TContentSourceSettings) => void;
8
9
  initValue?: TContentSourceSettings;
9
10
  isShowErrorAlert: boolean;
@@ -36,7 +36,7 @@ import { deleteContentSourceGroup, setContentSourceGroup, setContentSourceGroupB
36
36
  import { handleError } from '@antscorp/antsomi-ui/es/utils';
37
37
  const PATH = 'src/components/organism/ContentSources/Settings.tsx';
38
38
  const Settings = (props) => {
39
- const { serviceAuth, mode, isShowErrorAlert, initValue, journeySettings, onChange } = props;
39
+ const { serviceAuth, mode, isShowErrorAlert, initValue, journeySettings, hideOptionTypes, onChange, } = props;
40
40
  const { url = '', userId, token, accountId } = serviceAuth;
41
41
  const { t } = i18nInstance;
42
42
  const boIdByGroupCS = useSelectBoIdByGroupFromCS();
@@ -280,7 +280,7 @@ const Settings = (props) => {
280
280
  }
281
281
  }, [contentSourcesDebounce]);
282
282
  return (React.createElement(ContentContainer, { className: "contentsource-container" },
283
- React.createElement(Content, { isLoadingListBO: isLoadingListBO || isLoadingDataTableBO, listBO: listBO, groups: groups, expanded: expanded, onChangeExpand: expanded => {
283
+ React.createElement(Content, { isLoadingListBO: isLoadingListBO || isLoadingDataTableBO, hideOptionTypes: hideOptionTypes, listBO: listBO, groups: groups, expanded: expanded, onChangeExpand: expanded => {
284
284
  contentSourceDispatch({
285
285
  type: 'EXPANDED',
286
286
  payload: {
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  import { TServiceAuth } from '@antscorp/antsomi-ui/es/types';
3
- import { ContentSourceModeView, JourneySettings, TContentSourceSettings } from './types';
3
+ import { ContentSourceModeView, HideOptionTypes, JourneySettings, TContentSourceSettings } from './types';
4
4
  export interface ContentSourceProps {
5
5
  useQueryClient: boolean;
6
6
  serviceAuth: TServiceAuth;
7
7
  isShowErrorAlert: boolean;
8
+ hideOptionTypes?: HideOptionTypes;
8
9
  mode: ContentSourceModeView;
9
10
  initValue?: TContentSourceSettings;
10
11
  onChange: (contentSource: TContentSourceSettings) => void;
@@ -11,6 +11,11 @@ import { JOURNEY_SETTINGS_DEFAULT } from './constants';
11
11
  const defaultProps = {
12
12
  useQueryClient: true,
13
13
  isShowErrorAlert: false,
14
+ hideOptionTypes: {
15
+ filter: false,
16
+ level: false,
17
+ ranking: false,
18
+ },
14
19
  journeySettings: JOURNEY_SETTINGS_DEFAULT,
15
20
  mode: 'CDP',
16
21
  onChange: () => { },
@@ -22,12 +27,12 @@ const defaultProps = {
22
27
  },
23
28
  };
24
29
  const ContentSource = (props) => {
25
- const { useQueryClient, serviceAuth, mode, isShowErrorAlert, initValue, journeySettings, onChange, } = props;
30
+ const { useQueryClient, serviceAuth, mode, isShowErrorAlert, initValue, hideOptionTypes, journeySettings, onChange, } = props;
26
31
  if (!useQueryClient)
27
- return (React.createElement(Settings, { mode: mode, initValue: initValue, serviceAuth: serviceAuth, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, onChange: onChange }));
32
+ return (React.createElement(Settings, { mode: mode, initValue: initValue, hideOptionTypes: hideOptionTypes, serviceAuth: serviceAuth, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, onChange: onChange }));
28
33
  return (React.createElement(QueryClientProviderAntsomiUI, { client: queryClientAntsomiUI },
29
34
  React.createElement(ContentSourceProvider, null,
30
- React.createElement(Settings, { mode: mode, initValue: initValue, serviceAuth: serviceAuth, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, onChange: onChange }))));
35
+ React.createElement(Settings, { mode: mode, initValue: initValue, hideOptionTypes: hideOptionTypes, serviceAuth: serviceAuth, isShowErrorAlert: isShowErrorAlert, journeySettings: journeySettings, onChange: onChange }))));
31
36
  };
32
37
  ContentSource.defaultProps = defaultProps;
33
38
  export default memo(ContentSource);
@@ -44,6 +44,11 @@ export type TContentSourceSettings = {
44
44
  expanded: string[];
45
45
  isLoadingDataBO: boolean;
46
46
  };
47
+ export interface HideOptionTypes {
48
+ filter?: boolean;
49
+ level?: boolean;
50
+ ranking?: boolean;
51
+ }
47
52
  export type TRelationship = {
48
53
  enabled: 1 | 0;
49
54
  parent_attr: string;
@@ -24,3 +24,8 @@ export declare const PORTALS_IDS: {
24
24
  SANDBOX: number;
25
25
  SANDBOX_76753: number;
26
26
  };
27
+ export declare const UI_SIZE: {
28
+ SMALL: string;
29
+ MEDIUM: string;
30
+ LARGE: string;
31
+ };
@@ -25,3 +25,8 @@ export const PORTALS_IDS = {
25
25
  SANDBOX: 33167,
26
26
  SANDBOX_76753: 76753,
27
27
  };
28
+ export const UI_SIZE = {
29
+ SMALL: 'small',
30
+ MEDIUM: 'medium',
31
+ LARGE: 'large',
32
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.267",
3
+ "version": "1.3.5-beta.269",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -1,22 +0,0 @@
1
- // Libraries
2
- import React from 'react';
3
- import { LoadingOutlined } from '@ant-design/icons';
4
- import { isString } from 'lodash';
5
- // Components
6
- import { Flex, Spin, Typography } from '@antscorp/antsomi-ui/es/components/atoms';
7
- // Components
8
- import { Icon } from '@antscorp/antsomi-ui/es/components';
9
- // Styled
10
- import { EmptyIcon, EmptyWrapper, ImageWrapper } from './styled';
11
- const { Text } = Typography;
12
- export const EmptyTemplate = props => {
13
- const { icon = 'icon-ants-media', title = 'No data', description, loading, className, image, imageClassName, imageStyle, children, } = props;
14
- return (React.createElement(EmptyWrapper, { className: className },
15
- !image && (React.createElement(EmptyIcon, { className: "animate__animated animate__tada" }, isString(icon) ? React.createElement(Icon, { type: icon }) : icon)),
16
- image && (React.createElement(ImageWrapper, { className: imageClassName, style: imageStyle },
17
- React.createElement("img", { src: image, alt: "" }))),
18
- loading ? (React.createElement(Spin, { indicator: React.createElement(LoadingOutlined, { style: { fontSize: 24 }, spin: true }) })) : (React.createElement(Flex, { gap: 5, align: "center", justify: "center", vertical: true },
19
- React.createElement(Text, { className: "title animate__animated animate__fadeInUp" }, title),
20
- description && (React.createElement(Text, { className: "description animate__animated animate__fadeInUp" }, description)))),
21
- children));
22
- };
@@ -1,2 +0,0 @@
1
- export { EmptyTemplate } from './EmptyTemplate';
2
- export type { EmptyTemplateProps } from './EmptyTemplate';
@@ -1 +0,0 @@
1
- export { EmptyTemplate } from './EmptyTemplate';