@antscorp/antsomi-ui 1.3.5-beta.827 → 1.3.5-beta.828

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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
2
3
  export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
3
4
  type DisplayFormatProps = {
@@ -37,7 +37,7 @@ export const AccountSetting = memo(forwardRef((props, ref) => {
37
37
  const [logo, setLogo] = useState({ url: '' });
38
38
  const [logoManual, setLogoManual] = useState({ url: '' });
39
39
  const [openChangeEmail, setOpenChangeEmail] = useState(null);
40
- const [apiEndpoint] = useState(`${iamDomain}api/account/index/${accountId}?_token=${token}&_user_id=${accountId}&_account_id=${accountId}`);
40
+ const [apiEndpoint] = useState(`${iamDomain}/api/account/index/${accountId}?_token=${token}&_user_id=${accountId}&_account_id=${accountId}`);
41
41
  const saveRef = useRef(false);
42
42
  const tempAccountRef = useRef({});
43
43
  const readyCheckRef = useRef(false);
@@ -64,6 +64,7 @@ export const AccountSharing = props => {
64
64
  const debounceSearch = useDebounce(accountSearch, 500);
65
65
  const [, setCookie] = useCookies();
66
66
  const domain = iamDomain.charAt(iamDomain.length - 1) === '/' ? iamDomain : `${iamDomain}/`;
67
+ const formatDomain = iamDomain.endsWith('/') ? iamDomain.slice(0, -1) : iamDomain;
67
68
  const translateLang = useMemo(() => translate(translateData, serverTranslateData, language), [serverTranslateData, language, translateData]);
68
69
  const getInfoAccount = () => {
69
70
  const params = {
@@ -519,5 +520,5 @@ export const AccountSharing = props => {
519
520
  backgroundColor: THEME.token?.blue1_2,
520
521
  padding: '20px 15px',
521
522
  width: '400px',
522
- }, children: _jsxs(TriggerPopoverStyled, { children: [_jsx("div", { className: "brand-logo", children: currentNetwork?.logo ? _jsx("img", { src: currentNetwork.logo, alt: "" }) : null }), _jsx("div", { className: "avatar", children: infoAccount ? _jsx("img", { src: infoAccount.avatar, alt: "" }) : null })] }) }), _jsx(AccountProfile, { accountId: accountId, iamDomain: domain, token: token, isDisabledEdit: false, open: openAccountProfile, onClose: () => setOpenAccountProfile(false) })] }));
523
+ }, children: _jsxs(TriggerPopoverStyled, { children: [_jsx("div", { className: "brand-logo", children: currentNetwork?.logo ? _jsx("img", { src: currentNetwork.logo, alt: "" }) : null }), _jsx("div", { className: "avatar", children: infoAccount ? _jsx("img", { src: infoAccount.avatar, alt: "" }) : null })] }) }), _jsx(AccountProfile, { accountId: accountId, iamDomain: formatDomain, token: token, isDisabledEdit: false, open: openAccountProfile, onClose: () => setOpenAccountProfile(false) })] }));
523
524
  };
@@ -3,4 +3,5 @@
3
3
  * Asynchronously loads the component for TemplateListing
4
4
  *
5
5
  */
6
+ /// <reference types="react" />
6
7
  export declare const TemplateListing: (props: import("./types").TemplateListingProps<{}>) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.827",
3
+ "version": "1.3.5-beta.828",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",