@antscorp/antsomi-ui 1.3.5-beta.867 → 1.3.5-beta.869

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.
@@ -1,13 +1,10 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef, useState } from 'react';
3
3
  import { Button, Flex, TextArea, Typography } from '@antscorp/antsomi-ui/es/components';
4
+ import { translate as t, translations } from '@antscorp/antsomi-locales';
4
5
  // Styled
5
6
  import { RequestAccessStyled } from './styled';
6
- // Translate
7
- import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
8
- import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
9
7
  import { BlockIcon } from '../../icons';
10
- const { t } = i18nInstance;
11
8
  export const RequestAccess = props => {
12
9
  const { className, placeholder = t(translations.requestAccess.placeholder), deniedTitle = t(translations.requestAccess.deniedTitle), deniedSubTitle = t(translations.requestAccess.deniedSubTitle), sentTitle = t(translations.requestAccess.sentTitle), sentSubTitle = t(translations.requestAccess.sentSubTitle), requestText = t(translations.requestAccess.requestText), switchAccountText = t(translations.requestAccess.switchAccountText), onRequest, onSwitchAccount, } = props;
13
10
  const [isSentRequest, setIsSentRequest] = useState(false);
@@ -363,5 +363,5 @@ export const Layout = memo(props => {
363
363
  ...mergeLeftMenuProps.customization,
364
364
  // If user has access denied, disable expandable
365
365
  showButtonExpand: !isAccessDenied && mergeLeftMenuProps.customization?.showButtonExpand,
366
- }, appConfig: leftMenuAppConfig, onActiveMenuCodeChange: onActiveMenuCodeChange }), _jsx(ContentWrapper, { "$noPadding": noPadding, "$noSpaceTopContent": noSpaceTopContent, "$showOnlyContent": showOnlyContent, ...mergeContentWrapperProps, children: activeMenu?.menu_item_code === HOME_MENU_ITEMS.RECOMMENDATION ? (_jsx("div", { className: "layout-body__content", children: _jsx(RecommendationWorkspace, {}) })) : (_jsx("div", { className: `layout-body__content ${workspaceProps?.className || ''}`, ...mergeWorkSpaceProps, children: isLoadingLayout ? (_jsx(LayoutLoading, { spinning: true })) : (_jsxs(_Fragment, { children: [_jsx(NotificationWrapper, { className: "process-notification", ref: notificationWrapperRef, children: showNotification && (_jsx(AntsProcessingNotification, { ...antsProcessingNotificationConfig, callback: handleCallbackNotify })) }), _jsx(ChildrenWrapper, { ...workspaceContentProps, children: isAccessDenied ? (_jsx(AccessDenied, { onClickRequestAccess: onClickRequestAccess, onClickSwitchAccount: onClickSwitchAccount })) : isIpDenied ? (_jsx(RequestAccess, { sentTitle: translate(translationsLocales._USER_GUIDE_IP_RESTRICTION_REQUEST_SENT), sentSubTitle: translate(translationsLocales._USER_GUIDE_IP_RESTRICTION_REQUEST_SENT_INFO), deniedTitle: "IP Address Denied", onRequest: handleRequestAccessIP, onSwitchAccount: onClickSwitchAccount })) : (_jsx("div", { children: children })) })] })) })) })] })] }));
366
+ }, appConfig: leftMenuAppConfig, onActiveMenuCodeChange: onActiveMenuCodeChange }), _jsx(ContentWrapper, { "$noPadding": noPadding, "$noSpaceTopContent": noSpaceTopContent, "$showOnlyContent": showOnlyContent, ...mergeContentWrapperProps, children: activeMenu?.menu_item_code === HOME_MENU_ITEMS.RECOMMENDATION ? (_jsx("div", { className: "layout-body__content", children: _jsx(RecommendationWorkspace, {}) })) : (_jsx("div", { className: `layout-body__content ${workspaceProps?.className || ''}`, ...mergeWorkSpaceProps, children: isLoadingLayout ? (_jsx(LayoutLoading, { spinning: true })) : (_jsxs(_Fragment, { children: [_jsx(NotificationWrapper, { className: "process-notification", ref: notificationWrapperRef, children: showNotification && (_jsx(AntsProcessingNotification, { ...antsProcessingNotificationConfig, callback: handleCallbackNotify })) }), _jsx(ChildrenWrapper, { ...workspaceContentProps, children: isAccessDenied ? (_jsx(AccessDenied, { onClickRequestAccess: onClickRequestAccess, onClickSwitchAccount: onClickSwitchAccount })) : isIpDenied ? (_jsx(RequestAccess, { sentTitle: translate(translationsLocales._USER_GUIDE_IP_RESTRICTION_REQUEST_SENT), sentSubTitle: translate(translationsLocales._USER_GUIDE_IP_RESTRICTION_REQUEST_SENT_INFO), deniedTitle: translate(translationsLocales._USER_GUIDE_IP_ADDRESS_DENIED), onRequest: handleRequestAccessIP, onSwitchAccount: onClickSwitchAccount })) : (_jsx("div", { children: children })) })] })) })) })] })] }));
367
367
  }, (prevProps, nextProps) => isEqual(prevProps, nextProps));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.867",
3
+ "version": "1.3.5-beta.869",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -20,7 +20,7 @@
20
20
  "types": "es/index.d.ts",
21
21
  "scripts": {
22
22
  "prepublishOnly": "yarn && yarn build:es",
23
- "build:es": "npm run translate:init && npm run clean && npm run copy-files && npm run ts-compile",
23
+ "build:es": "npm run clean && npm run copy-files && npm run ts-compile",
24
24
  "clean": "rimraf dist lib es",
25
25
  "dev": "vite",
26
26
  "build:dist": "webpack --config webpack.build.js",
@@ -61,7 +61,7 @@
61
61
  "not op_mini all"
62
62
  ],
63
63
  "dependencies": {
64
- "@antscorp/antsomi-locales": "^1.0.7",
64
+ "@antscorp/antsomi-locales": "^1.0.11",
65
65
  "@antscorp/icons": "0.27.54",
66
66
  "@antscorp/image-editor": "1.0.2",
67
67
  "@antscorp/processing-notification": "^1.0.3",