@antscorp/antsomi-ui 1.3.5-beta.274 → 1.3.5-beta.275

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.
@@ -93,4 +93,5 @@ OriginInput.defaultProps = {
93
93
  export const Input = OriginInput;
94
94
  Input.TextArea = StyledInput.TextArea;
95
95
  Input.DefaultInput = AntdInput;
96
+ Input.Password = AntdInput.Password;
96
97
  export const { TextArea } = StyledInput;
@@ -8,6 +8,7 @@ export interface AccountListingProps {
8
8
  portalId?: number;
9
9
  languageCode?: string;
10
10
  appCode?: string;
11
+ menuCode?: string;
11
12
  };
12
13
  showAllAccount?: boolean;
13
14
  currentAccount?: string | 'all';
@@ -8,7 +8,7 @@ import { searchStringQuery } from '@antscorp/antsomi-ui/es/utils';
8
8
  import { useGetAccountList, useGetPermissionAccountList, useGetRecentAccount } from '../../..';
9
9
  export const AccountListing = props => {
10
10
  const { className, apiConfig, showAllAccount = true, currentAccount = '', onChange } = props;
11
- const { domain, token, userId, appCode, portalId } = apiConfig;
11
+ const { domain, token, userId, appCode, menuCode, portalId } = apiConfig;
12
12
  // States
13
13
  const [searchValue, setSearchValue] = useState('');
14
14
  // Queries
@@ -27,7 +27,7 @@ export const AccountListing = props => {
27
27
  domain,
28
28
  appCode: appCode || '',
29
29
  fullParent: true,
30
- menuCode: appCode || '',
30
+ menuCode: menuCode || appCode || '',
31
31
  },
32
32
  options: {
33
33
  enabled: portalId === PORTALS_IDS.SANDBOX_76753,
@@ -29,6 +29,7 @@ export interface HeaderV2Props {
29
29
  portalId?: number;
30
30
  token?: string;
31
31
  appCode?: string;
32
+ menuCode?: string;
32
33
  permissionDomain?: string;
33
34
  iamDomain?: string;
34
35
  };
@@ -20,15 +20,16 @@ import { AccountSharing, Help, Notification, } from '../../organism';
20
20
  import { APP_CODES, APP_PERMISSION_DOMAIN, CDP_API, IAM_API, ISSUE_API, PERMISSION_API, PLATFORM_API, PORTALS_IDS, SOCKET_API, } from '@antscorp/antsomi-ui/es/constants';
21
21
  import { useContextSelector } from 'use-context-selector';
22
22
  import { AppConfigContext } from '../../..';
23
+ const { DATAFLOWS, APP_ANTALYSER } = APP_CODES;
23
24
  export const HeaderV2 = memo(props => {
24
25
  var _a, _b;
25
- const { auth, env: envContext, languageCode = 'en', appCode, urlLogout: urlLogoutProvider = '', } = useContextSelector(AppConfigContext, state => state);
26
+ const { auth, env: envContext, languageCode = 'en', appCode: contextAppCode, urlLogout: urlLogoutProvider = '', menuCode: contextMenuCode, } = useContextSelector(AppConfigContext, state => state);
26
27
  const { search } = useLocation();
27
28
  const history = useHistory();
28
29
  /** Prefer to use Header in AppConfigContext */
29
30
  const { className, style, pageTitle = '', accountSelection = {}, helpConfig, notificationConfig = {}, accountSharingConfig, useURLParam, config, } = props;
30
31
  /** General config for children component */
31
- const { env = envContext, language = languageCode, userId = isNaN(Number(auth === null || auth === void 0 ? void 0 : auth.userId)) ? 0 : Number(auth === null || auth === void 0 ? void 0 : auth.userId), portalId = auth === null || auth === void 0 ? void 0 : auth.portalId, token = auth === null || auth === void 0 ? void 0 : auth.token, permissionDomain = PERMISSION_API, iamDomain = IAM_API, } = config || {};
32
+ const { env = envContext, language = languageCode, userId = isNaN(Number(auth === null || auth === void 0 ? void 0 : auth.userId)) ? 0 : Number(auth === null || auth === void 0 ? void 0 : auth.userId), portalId = auth === null || auth === void 0 ? void 0 : auth.portalId, token = auth === null || auth === void 0 ? void 0 : auth.token, permissionDomain = PERMISSION_API, iamDomain = IAM_API, appCode = contextAppCode, menuCode = contextMenuCode, } = config || {};
32
33
  const { currentAccount, inputStyle = 'select', onSelectAccount } = accountSelection, accountSelectionProps = __rest(accountSelection, ["currentAccount", "inputStyle", "onSelectAccount"]);
33
34
  const urlParams = useMemo(() => new URLSearchParams(search), [search]);
34
35
  const oidParam = (_a = urlParams.get('oid')) !== null && _a !== void 0 ? _a : '';
@@ -40,7 +41,8 @@ export const HeaderV2 = memo(props => {
40
41
  if (portalId !== PORTALS_IDS.SANDBOX_76753)
41
42
  return CDP_API[env || 'development'];
42
43
  switch (appCode) {
43
- case APP_CODES.DATAFLOWS:
44
+ case DATAFLOWS:
45
+ case APP_ANTALYSER:
44
46
  return (_a = APP_PERMISSION_DOMAIN[appCode || '']) === null || _a === void 0 ? void 0 : _a[env || ''];
45
47
  default:
46
48
  return CDP_API[env || 'development'];
@@ -58,6 +60,7 @@ export const HeaderV2 = memo(props => {
58
60
  portalId,
59
61
  token,
60
62
  appCode,
63
+ menuCode,
61
64
  };
62
65
  const helpConfigProps = Object.assign(Object.assign({}, configs), { portalId: portalId.toString(), userId: userId.toString(), token, domain: CDP_API[env], domainTicket: ISSUE_API[env], domainPlatform: PLATFORM_API, config: Object.assign(Object.assign({}, configs.config), { user_language: language }) });
63
66
  const notificationConfigProps = {
@@ -46,7 +46,7 @@ export * from './SelectMulti';
46
46
  export * from './SelectEventAttribute';
47
47
  export * from './DatePickerV2';
48
48
  export { ModalSelect } from './ModalSelect';
49
- export { EmptyData, EmptyDataProps } from './EmptyData';
49
+ export * from './EmptyData';
50
50
  export * from './PreviewModal';
51
51
  export * from './Drawer';
52
52
  export * from './DrawerDetail';
@@ -46,7 +46,7 @@ export * from './SelectMulti';
46
46
  export * from './SelectEventAttribute';
47
47
  export * from './DatePickerV2';
48
48
  export { ModalSelect } from './ModalSelect';
49
- export { EmptyData } from './EmptyData';
49
+ export * from './EmptyData';
50
50
  export * from './PreviewModal';
51
51
  export * from './Drawer';
52
52
  export * from './DrawerDetail';
@@ -30,7 +30,7 @@ import '@antscorp/processing-notification/dist/index.css';
30
30
  import { useLayoutStore } from './stores';
31
31
  // Utils
32
32
  import { checkingRoleScope } from './utils';
33
- const { DATAFLOWS } = APP_CODES;
33
+ const { DATAFLOWS, APP_ANTALYSER } = APP_CODES;
34
34
  export const Layout = memo(props => {
35
35
  const { leftMenuProps, headerProps = {}, workspaceProps, processingNotificationProps, children, onActiveMenuChange, } = props;
36
36
  const _a = leftMenuProps || {}, { className = '' } = _a, restOfLeftMenuProps = __rest(_a, ["className"]);
@@ -52,6 +52,7 @@ export const Layout = memo(props => {
52
52
  return PERMISSION_API;
53
53
  switch (appCode) {
54
54
  case DATAFLOWS:
55
+ case APP_ANTALYSER:
55
56
  return ((_a = APP_PERMISSION_DOMAIN[appCode]) === null || _a === void 0 ? void 0 : _a[env || 'development']) || PERMISSION_API;
56
57
  default:
57
58
  return PERMISSION_API;
@@ -67,6 +68,7 @@ export const Layout = memo(props => {
67
68
  return IAM_API;
68
69
  switch (appCode) {
69
70
  case DATAFLOWS:
71
+ case APP_ANTALYSER:
70
72
  return ((_a = APP_IAM_DOMAIN[appCode]) === null || _a === void 0 ? void 0 : _a[env || 'development']) || IAM_API;
71
73
  default:
72
74
  return IAM_API;
@@ -1,7 +1,7 @@
1
1
  // Constants
2
2
  import { ENV } from '../config';
3
3
  import { APP_CODES } from './variables';
4
- const { DATAFLOWS } = APP_CODES;
4
+ const { DATAFLOWS, APP_ANTALYSER } = APP_CODES;
5
5
  export const TINYMCE_API_KEY = 'scyw71pj8619analvxs56ppc2w2fj2kpy5vnmflhhc300y35';
6
6
  export const CDP_API = {
7
7
  [ENV.DEV]: 'https://sandbox-app.cdp.asia',
@@ -23,6 +23,11 @@ export const APP_PERMISSION_DOMAIN = {
23
23
  [ENV.SANDBOX]: 'https://sandbox-permission.ants.vn',
24
24
  [ENV.PROD]: 'https://permission.antsomi.com',
25
25
  },
26
+ [APP_ANTALYSER]: {
27
+ [ENV.DEV]: 'https://sandbox-permission.ants.vn',
28
+ [ENV.SANDBOX]: 'https://sandbox-permission.ants.vn',
29
+ [ENV.PROD]: 'https://permission.antsomi.com',
30
+ },
26
31
  };
27
32
  export const APP_IAM_DOMAIN = {
28
33
  [DATAFLOWS]: {
@@ -30,4 +35,9 @@ export const APP_IAM_DOMAIN = {
30
35
  [ENV.SANDBOX]: 'https://sandbox-aacm.ants.vn',
31
36
  [ENV.PROD]: 'https://iam.ants.tech',
32
37
  },
38
+ [APP_ANTALYSER]: {
39
+ [ENV.DEV]: 'https://sandbox-aacm.ants.vn',
40
+ [ENV.SANDBOX]: 'https://sandbox-aacm.ants.vn',
41
+ [ENV.PROD]: 'https://iam.ants.tech',
42
+ },
33
43
  };
@@ -19,6 +19,7 @@ export declare const GET_LIST_TYPE: {
19
19
  };
20
20
  export declare const APP_CODES: {
21
21
  DATAFLOWS: string;
22
+ APP_ANTALYSER: string;
22
23
  };
23
24
  export declare const PORTALS_IDS: {
24
25
  SANDBOX: number;
@@ -20,6 +20,7 @@ export const GET_LIST_TYPE = {
20
20
  /* APP_CODES */
21
21
  export const APP_CODES = {
22
22
  DATAFLOWS: 'DATAFLOWS',
23
+ APP_ANTALYSER: 'APP_ANTALYSER',
23
24
  };
24
25
  export const PORTALS_IDS = {
25
26
  SANDBOX: 33167,
@@ -5,6 +5,7 @@ export interface AppConfigProps {
5
5
  env?: envType;
6
6
  auth?: Omit<PayloadInfo, 'url'>;
7
7
  appCode?: string;
8
+ menuCode?: string;
8
9
  languageCode?: string;
9
10
  urlLogout?: string;
10
11
  setAppConfig: React.Dispatch<React.SetStateAction<AppConfigProviderProps>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.274",
3
+ "version": "1.3.5-beta.275",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",