@antscorp/antsomi-ui 1.3.5-beta.355 → 1.3.5-beta.357

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.
@@ -37,7 +37,7 @@ export const HeaderV2 = memo(props => {
37
37
  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 || {};
38
38
  const { currentAccount, inputStyle = 'select', onSelectAccount } = accountSelection, accountSelectionProps = __rest(accountSelection, ["currentAccount", "inputStyle", "onSelectAccount"]);
39
39
  const urlParams = useMemo(() => new URLSearchParams(search), [search]);
40
- const oidParam = urlParams.get('oid') || 'all';
40
+ const oidParam = urlParams.get('oid') || currentAccount || 'all';
41
41
  const [selectedAccount, setSelectedAccount] = useState(`${useURLParam ? oidParam : `${(_a = currentAccount !== null && currentAccount !== void 0 ? currentAccount : userId) !== null && _a !== void 0 ? _a : 'all'}`}`);
42
42
  useLayoutEffect(() => {
43
43
  if (useURLParam)
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import React, { useEffect, useMemo, useState } from 'react';
11
- import { Avatar, Select } from 'antd';
11
+ import { Avatar, AutoComplete } from 'antd';
12
12
  import { useDebounce } from '@antscorp/antsomi-ui/es/hooks/useDebounceV2';
13
13
  import { StyledSearchUserRoot, StyledSelectItem } from './styled';
14
14
  import { isEmail } from '@antscorp/antsomi-ui/es/utils';
@@ -16,6 +16,7 @@ import { useShareAccess } from '../../hooks';
16
16
  import produce from 'immer';
17
17
  import { ACCESS_PROPERTIES_BY_ROLE, ROLE_MAPPING } from '../../constants';
18
18
  import { updateObjAccessInfo } from '../../actions';
19
+ import { Spin } from '@antscorp/antsomi-ui/es/components/atoms';
19
20
  export const SearchUser = (props) => {
20
21
  const { getUserInfo, placeholder } = props;
21
22
  const { state, dispatch } = useShareAccess();
@@ -71,7 +72,13 @@ export const SearchUser = (props) => {
71
72
  if (!allowEdit)
72
73
  return null;
73
74
  return (React.createElement(StyledSearchUserRoot, null,
74
- React.createElement(Select, { showSearch: true, placeholder: placeholder || 'Add people and groups', value: [], searchValue: searchTerm, defaultActiveFirstOption: false, suffixIcon: null, filterOption: false, onSearch: v => setSearchTerm(v), notFoundContent: null, loading: isFetching, options: (excludedUsers || []).map(user => ({
75
+ React.createElement(AutoComplete, { placeholder: placeholder || 'Add people and groups', value: searchTerm, onSearch: v => setSearchTerm(v), notFoundContent: isFetching ? (React.createElement(Spin, { style: {
76
+ width: '100%',
77
+ height: '40px',
78
+ display: 'flex',
79
+ alignItems: 'center',
80
+ justifyContent: 'center',
81
+ }, indicatorSize: 28 })) : null, options: (excludedUsers || []).map(user => ({
75
82
  value: user.user_id,
76
83
  label: (React.createElement(StyledSelectItem, { onClick: () => handleAddUser(user) },
77
84
  React.createElement(Avatar, { src: user.avatar }),
@@ -13,7 +13,7 @@ import axios from 'axios';
13
13
  import React, { useEffect, useMemo, useRef, useState } from 'react';
14
14
  import { CookiesProvider, useCookies } from 'react-cookie';
15
15
  // Icons
16
- import { Button, Flex, Popover, Spin } from '../../atoms';
16
+ import { Button, Flex, Popover, Spin, Text, Typography } from '../../atoms';
17
17
  import CloseIcon from './icons/close';
18
18
  import SearchIcon from './icons/search';
19
19
  import { InnerCardStyled, InputSearchStyled, PackageSharingStyled, TriggerPopoverStyled, } from './styled';
@@ -24,10 +24,10 @@ import Icon from '@antscorp/icons';
24
24
  import { useDebounce } from '@antscorp/antsomi-ui/es/hooks/useDebounceV2';
25
25
  import { DEFAULT_TRANSLATE_DATA } from './constant';
26
26
  import { THEME } from '@antscorp/antsomi-ui/es/constants';
27
- const STEP = {
28
- SWITCH_ACCOUNT: 'SWITCH_ACCOUNT',
29
- SELECT_NETWORK: 'SELECT_NETWORK',
30
- };
27
+ // const STEP = {
28
+ // SWITCH_ACCOUNT: 'SWITCH_ACCOUNT',
29
+ // SELECT_NETWORK: 'SELECT_NETWORK',
30
+ // };
31
31
  const InputSearch = props => {
32
32
  const { value, onChange, className, onClickRemove } = props;
33
33
  return (React.createElement(InputSearchStyled, { className: className || '' },
@@ -38,7 +38,7 @@ export const AccountSharing = props => {
38
38
  var _a;
39
39
  const { permissionDomain = '', iamDomain = '', token = '', accountId = 0, networkId = 0, appCode = '', lang = 'en', translateData = DEFAULT_TRANSLATE_DATA, urlEditProfile = '', callbackGetInfoAccount, urlLogout = '', isShowSharing = false, isShareAccountAccess = false, u_ogs = '', callbackLogout, } = props;
40
40
  const selectedNetworkRef = useRef();
41
- const [isShowSearchAccount, setIsShowSearchAccount] = useState(false);
41
+ // const [isShowSearchAccount, setIsShowSearchAccount] = useState(false);
42
42
  const [infoAccount, setInfoAccount] = useState({});
43
43
  const [listAccountSharing, setListAccountSharing] = useState([]);
44
44
  const [listAccountRecent, setListAccountRecent] = useState([]);
@@ -46,7 +46,7 @@ export const AccountSharing = props => {
46
46
  const [isShowLoading, setIsShowLoading] = useState(false);
47
47
  const [accountSearch, setAccountSearch] = useState('');
48
48
  const [portalSearch, setPortalSearch] = useState('');
49
- const [step, setStep] = useState(STEP.SWITCH_ACCOUNT);
49
+ const [tab, setTab] = useState('account');
50
50
  const [listNetworks, setListNetworks] = useState([]);
51
51
  const [currentNetwork, setCurrentNetwork] = useState();
52
52
  const [serverTranslateData, setServerTranslateData] = useState({});
@@ -200,10 +200,7 @@ export const AccountSharing = props => {
200
200
  });
201
201
  }
202
202
  }, [limitAccount]);
203
- const filterListNetwork = useMemo(() => {
204
- const draftListNetwork = [...listNetworks];
205
- return draftListNetwork.filter((netWork) => netWork.networkName.toLocaleLowerCase().indexOf(portalSearch.toLocaleLowerCase()) !== -1);
206
- }, [listNetworks, portalSearch]);
203
+ const filterListNetwork = useMemo(() => listNetworks.filter((netWork) => netWork.networkName.toLocaleLowerCase().indexOf(portalSearch.toLocaleLowerCase()) !== -1), [listNetworks, portalSearch]);
207
204
  const logAccountSwitch = (switchAccountId) => __awaiter(void 0, void 0, void 0, function* () {
208
205
  // setIsShowLoading(true)
209
206
  if (switchAccountId && isShareAccountAccess) {
@@ -231,9 +228,6 @@ export const AccountSharing = props => {
231
228
  window.location.href = urlLogout;
232
229
  }, 300);
233
230
  };
234
- const switchStep = toStep => {
235
- setStep(toStep);
236
- };
237
231
  function urlDomain(data) {
238
232
  const a = document.createElement('a');
239
233
  a.href = data;
@@ -377,24 +371,23 @@ export const AccountSharing = props => {
377
371
  // }
378
372
  setLimitAccount(limitAccount + 1);
379
373
  });
380
- const renderAccounts = (listAccountsRender, customStyle = {}) => (React.createElement("ul", { style: Object.assign(Object.assign({}, customStyle), { opacity: `${isShowLoading ? 0.2 : 1}` }) }, (listAccountsRender === null || listAccountsRender === void 0 ? void 0 : listAccountsRender.length) ? (listAccountsRender.map((account) => (React.createElement("li", { key: account.user_id, onClick: () => handleSwitchAccount(account) },
381
- React.createElement("span", { className: "account-name" }, account.full_name),
382
- React.createElement("span", { className: "account-number" }, formatUserId(account.user_id)))))) : (React.createElement("div", null, translateLang('KEY_NO_ACCOUNTS')))));
374
+ const renderAccounts = (listAccountsRender) => listAccountsRender === null || listAccountsRender === void 0 ? void 0 : listAccountsRender.map((account) => (React.createElement("li", { key: account.user_id, onClick: () => handleSwitchAccount(account) },
375
+ React.createElement(Typography.Text, { className: "account-name", ellipsis: { tooltip: true } }, account.full_name),
376
+ React.createElement(Text, { className: "account-number" }, formatUserId(account.user_id)))));
383
377
  return (React.createElement(CookiesProvider, null,
384
378
  React.createElement(Popover, { content: React.createElement(PackageSharingStyled, null,
385
- React.createElement("div", { className: "div-info-account" }, infoAccount ? (React.createElement(React.Fragment, null,
386
- React.createElement("div", { className: "div-info-left" },
379
+ React.createElement("div", { className: "info-account" }, infoAccount ? (React.createElement(React.Fragment, null,
380
+ React.createElement("div", { className: "current-account-avatar" },
387
381
  React.createElement("img", { src: infoAccount.avatar, alt: "" }),
388
382
  React.createElement("a", { className: "edit-profile", href: urlEditProfile, target: "_blank", rel: "noreferrer" },
389
383
  React.createElement(Icon, { type: "icon-ants-edit-2", style: { color: '#aaa' } }))),
390
- React.createElement("div", { className: "div-info-right" },
391
- React.createElement("p", { style: { fontWeight: 600 } }, infoAccount.full_name),
392
- React.createElement("p", { style: { color: '#aaa', marginTop: 2 } }, infoAccount.email)))) : (React.createElement("div", null,
384
+ React.createElement("p", { style: { fontWeight: 600 } }, infoAccount.full_name),
385
+ React.createElement("p", { style: { color: '#aaa', marginTop: 2 } }, infoAccount.email))) : (React.createElement("div", null,
393
386
  translateLang('KEY_LOADING'),
394
387
  "..."))),
395
388
  React.createElement(InnerCardStyled, null,
396
- React.createElement("div", { className: "network-block" }, step === STEP.SWITCH_ACCOUNT ? (React.createElement("div", { className: "current-network" },
397
- currentNetwork && currentNetwork.logo ? (React.createElement("div", null,
389
+ React.createElement("div", { className: "network-block" }, tab === 'account' ? (React.createElement("div", { className: "current-network" },
390
+ (currentNetwork === null || currentNetwork === void 0 ? void 0 : currentNetwork.logo) ? (React.createElement("div", null,
398
391
  React.createElement("img", { src: currentNetwork.logo, style: {
399
392
  maxHeight: 28,
400
393
  maxWidth: 200,
@@ -402,43 +395,37 @@ export const AccountSharing = props => {
402
395
  border: 'none',
403
396
  boxShadow: 'none',
404
397
  }, alt: "network-logo" }))) : null,
405
- React.createElement(Button, { type: "text", className: "change-network-btn", onClick: () => switchStep(STEP.SELECT_NETWORK), icon: React.createElement(Icon, { type: "icon-ants-angle-right", style: { fontSize: '12px' } }) }, translateLang('KEY_CHANGE_PORTAL')))) : (React.createElement("div", { className: "network-select-wrapper" },
398
+ React.createElement(Button, { type: "text", className: "change-network-btn", onClick: () => setTab('network'), icon: React.createElement(Icon, { type: "icon-ants-angle-right", style: { fontSize: '12px' } }) }, translateLang('KEY_CHANGE_PORTAL')))) : (React.createElement(React.Fragment, null,
406
399
  React.createElement(Flex, { gap: 10 },
407
- React.createElement(Button, { type: "text", onClick: () => switchStep(STEP.SWITCH_ACCOUNT), icon: React.createElement(Icon, { type: "icon-ants-angle-left", style: { fontSize: '12px' } }) }, translateLang('KEY_BACK')),
408
- React.createElement(InputSearch, { className: "--portal", translateLang: translateLang, value: portalSearch, onChange: value => setPortalSearch(value), onClickRemove: () => setPortalSearch('') })),
409
- filterListNetwork && filterListNetwork.length ? (React.createElement("div", { className: "network-select" }, filterListNetwork.map((network) => (React.createElement("div", { key: network.networkId, className: `network-item ${networkId === +network.networkId ? 'disabled' : ''}`, onClick: () => selectNetwork(network) },
400
+ React.createElement(Button, { type: "text", onClick: () => setTab('account'), icon: React.createElement(Icon, { type: "icon-ants-angle-left", style: { fontSize: '12px' } }) }, translateLang('KEY_BACK')),
401
+ React.createElement(InputSearch, { className: "--portal", value: portalSearch, onChange: value => setPortalSearch(value), onClickRemove: () => setPortalSearch('') })),
402
+ React.createElement("div", { className: "network-select" }, filterListNetwork === null || filterListNetwork === void 0 ? void 0 : filterListNetwork.map((network) => (React.createElement("div", { key: network.networkId, className: `network-item ${networkId === +network.networkId ? 'disabled' : ''}`, onClick: () => selectNetwork(network) },
410
403
  React.createElement("div", { className: "image-wrapper" },
411
404
  React.createElement("img", { src: network.logo, style: {
412
- // maxWidth: 55,
413
- // maxHeight: 55,
414
405
  borderRadius: 0,
415
406
  border: 'none',
416
407
  boxShadow: 'none',
417
408
  }, alt: "logo" })),
418
- React.createElement("p", { className: "network-name" }, network.networkName)))))) : (React.createElement("div", { style: {
419
- display: 'flex',
420
- justifyContent: 'center',
421
- alignItems: 'center',
422
- } },
423
- React.createElement("p", { style: { fontSize: 12, color: '#aaa', margin: 0 } }, "No networks")))))),
424
- step === STEP.SWITCH_ACCOUNT ? (isShowSharing ? (React.createElement("div", { className: "div-account-sharing mt-10" },
425
- React.createElement("div", { className: "div-cover-account" },
426
- isShowLoading ? React.createElement(Spin, null) : null,
427
- isShowSearchAccount || !(listAccountRecent === null || listAccountRecent === void 0 ? void 0 : listAccountRecent.length) ? (React.createElement(InputSearch, { value: accountSearch, onChange: value => setAccountSearch(value), onClickRemove: () => {
428
- setAccountSearch('');
429
- setIsShowSearchAccount(false);
430
- } })) : (React.createElement(React.Fragment, null,
431
- React.createElement("div", { className: "div-recent-account" },
432
- React.createElement("span", { className: "recent-title" }, "Recent accounts"),
433
- React.createElement(SearchIcon, { onClick: () => setIsShowSearchAccount(true), className: "search-icon" })),
434
- renderAccounts(listAccountRecent, {
435
- minHeight: 32,
436
- maxHeight: 162,
437
- padding: '0 10px',
438
- }))),
409
+ React.createElement("p", { className: "network-name" }, network.networkName))))),
410
+ React.createElement("div", { className: "no-network-title" },
411
+ React.createElement("span", null, "No networks"))))),
412
+ tab === 'account' ? (isShowSharing ? (React.createElement("div", { className: "div-cover-account" },
413
+ isShowLoading ? React.createElement(Spin, null) : null,
414
+ React.createElement(InputSearch, { value: accountSearch, onChange: value => setAccountSearch(value), onClickRemove: () => {
415
+ setAccountSearch('');
416
+ } }),
417
+ React.createElement("span", { className: "recent-title" }, "Recent accounts"),
418
+ isShowLoading ? null : (React.createElement("div", { className: "no-account-title" },
419
+ React.createElement("span", null, translateLang('KEY_NO_ACCOUNTS')))),
420
+ React.createElement("ul", { style: { opacity: `${isShowLoading ? 0.2 : 1}` } },
421
+ renderAccounts(listAccountRecent),
439
422
  renderAccounts(listAccountSharing)))) : (React.createElement("hr", { style: { margin: '10px 0 20px', background: '#E3EEF1' } }))) : null),
440
423
  React.createElement(Flex, { align: "center", justify: "center" },
441
- React.createElement(Button, { onClick: () => onClickButtonLogout(), icon: React.createElement(Icon, { type: "icon-ants-exit" }) }, translateLang('KEY_LOGOUT')))), arrow: false, trigger: ['click'], placement: "bottomRight", overlayInnerStyle: { backgroundColor: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.blue1_2, padding: '20px 15px' } },
424
+ React.createElement(Button, { onClick: () => onClickButtonLogout(), icon: React.createElement(Icon, { type: "icon-ants-logout" }) }, translateLang('KEY_LOGOUT')))), arrow: false, trigger: ['click'], placement: "bottomRight", overlayInnerStyle: {
425
+ backgroundColor: (_a = THEME.token) === null || _a === void 0 ? void 0 : _a.blue1_2,
426
+ padding: '20px 15px',
427
+ width: '400px',
428
+ } },
442
429
  React.createElement(TriggerPopoverStyled, null,
443
430
  React.createElement("div", { className: "brand-logo" }, (currentNetwork === null || currentNetwork === void 0 ? void 0 : currentNetwork.logo) ? React.createElement("img", { src: currentNetwork.logo, alt: "" }) : null),
444
431
  React.createElement("div", { className: "avatar" }, infoAccount ? React.createElement("img", { src: infoAccount.avatar, alt: "" }) : null)))));
@@ -1,4 +1,4 @@
1
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
2
2
  import styled from 'styled-components';
3
3
  import { THEME } from '@antscorp/antsomi-ui/es/constants';
4
4
  export const InputSearchStyled = styled.div `
@@ -57,6 +57,8 @@ export const InputSearchStyled = styled.div `
57
57
 
58
58
  &.remove-icon {
59
59
  /* right: 5px; */
60
+ width: 16px;
61
+ height: 16px;
60
62
  cursor: pointer;
61
63
  /* width: 12px; */
62
64
  }
@@ -108,12 +110,18 @@ export const PackageSharingStyled = styled.div `
108
110
  min-width: 400px;
109
111
  max-width: 400px;
110
112
 
111
- .div-info-account {
113
+ .info-account {
112
114
  display: flex;
113
115
  flex-direction: column;
114
116
  align-items: center;
115
117
  text-align: center;
116
- .div-info-left {
118
+ width: 370px;
119
+ margin-bottom: 15px;
120
+ p {
121
+ margin: 0;
122
+ }
123
+
124
+ .current-account-avatar {
117
125
  position: relative;
118
126
  margin-bottom: 10px;
119
127
 
@@ -126,6 +134,7 @@ export const PackageSharingStyled = styled.div `
126
134
  }
127
135
 
128
136
  .edit-profile {
137
+ text-decoration: none;
129
138
  background-color: white;
130
139
  border-radius: 100px;
131
140
  position: absolute;
@@ -140,97 +149,91 @@ export const PackageSharingStyled = styled.div `
140
149
  cursor: pointer;
141
150
  }
142
151
  }
143
- .div-info-right {
144
- margin-bottom: 15px;
145
- p {
146
- margin: 0;
147
- }
148
- & > p:first-child {
149
- line-height: 18px;
150
- }
151
- & > p:last-child {
152
- line-height: 13px;
153
- }
152
+
153
+ p:first-child {
154
+ line-height: 18px;
155
+ }
156
+ p:last-child {
157
+ line-height: 13px;
154
158
  }
155
159
  }
156
- .div-account-sharing {
160
+ .div-cover-account {
157
161
  margin-top: 10px;
162
+ min-height: 185px;
163
+ position: relative;
158
164
 
159
- .title-account-sharing {
165
+ .antsomi-spin {
166
+ position: absolute;
167
+ top: 50px;
168
+ width: 100%;
169
+ height: calc(100% - 50px);
170
+ display: flex;
171
+ justify-content: center;
172
+ align-items: center;
173
+ }
174
+ .recent-title {
175
+ display: none;
176
+ font-size: 11px;
160
177
  color: #999;
161
- font-size: 12px;
162
- margin-bottom: 10px;
178
+ padding: 10px 5px 0;
163
179
  }
164
- .div-cover-account {
165
- min-height: 185px;
166
- position: relative;
167
180
 
168
- .antsomi-spin {
169
- position: absolute;
170
- top: 50px;
171
- width: 100%;
172
- height: calc(100% - 50px);
173
- display: flex;
174
- justify-content: center;
175
- align-items: center;
176
- }
177
- .div-recent-account {
178
- padding: 10px 15px;
181
+ &:has(li) .recent-title {
182
+ display: block;
183
+ }
184
+
185
+ .no-account-title {
186
+ position: absolute;
187
+ height: calc(100% - 30px);
188
+ width: 100%;
189
+ display: flex;
190
+ justify-content: center;
191
+ align-items: center;
192
+ }
193
+ &:has(li) .no-account-title {
194
+ display: none;
195
+ }
196
+
197
+ ul {
198
+ overflow-y: auto;
199
+ max-height: 143px;
200
+ list-style: none;
201
+ padding: 0;
202
+ margin: 0;
203
+ li {
204
+ cursor: pointer;
205
+ padding: 8px 5px;
206
+ border-radius: ${(_c = THEME.token) === null || _c === void 0 ? void 0 : _c.borderRadius}px;
179
207
  display: flex;
180
- align-items: center;
181
208
  justify-content: space-between;
182
- position: relative;
209
+ align-items: center;
210
+ gap: 10px;
183
211
 
184
- .recent-title {
185
- font-size: 11px;
186
- color: #999;
212
+ &:hover {
213
+ background-color: ${(_d = THEME.token) === null || _d === void 0 ? void 0 : _d.blue};
187
214
  }
188
215
 
189
- /* .search-icon {
190
- fill: #666;
191
- width: 18px;
192
- cursor: pointer;
193
- } */
194
- }
195
- ul {
196
- overflow-y: auto;
197
- max-height: 143px;
198
- min-height: 108px;
199
- list-style: none;
200
- padding: 0;
201
- margin: 10px 0 0 0;
202
- li {
203
- padding: 8px 5px;
204
- border-radius: 10px;
205
- cursor: pointer;
206
- display: block;
216
+ .account-name {
217
+ color: #666;
218
+ font-size: 13px;
219
+ font-size: 13px;
220
+ font-weight: normal;
207
221
  overflow: hidden;
222
+ white-space: nowrap;
208
223
  text-overflow: ellipsis;
224
+ line-height: 1.4;
225
+ font-size: 13px;
226
+ font-weight: normal;
227
+ overflow: hidden;
209
228
  white-space: nowrap;
210
- position: relative;
211
- &:hover {
212
- background-color: ${(_c = THEME.token) === null || _c === void 0 ? void 0 : _c.blue};
213
- }
229
+ text-overflow: ellipsis;
230
+ line-height: 1.4;
231
+ }
214
232
 
215
- .account-name {
216
- color: #666;
217
- cursor: pointer;
218
- display: block;
219
- font-size: 13px;
220
- font-weight: normal;
221
- overflow: hidden;
222
- white-space: nowrap;
223
- text-overflow: ellipsis;
224
- line-height: 1.4;
225
- }
226
- .account-number {
227
- color: #aaa;
228
- cursor: default;
229
- font-size: 12px;
230
- position: absolute;
231
- right: 5px;
232
- top: 8px;
233
- }
233
+ .account-number {
234
+ color: #aaa;
235
+ font-size: 12px;
236
+ flex-shrink: 0;
234
237
  }
235
238
  }
236
239
  }
@@ -254,7 +257,7 @@ export const PackageSharingStyled = styled.div `
254
257
  height: 42px;
255
258
  padding: 10px;
256
259
  border-radius: 10px;
257
- border: 1px solid ${(_d = THEME.token) === null || _d === void 0 ? void 0 : _d.bw4};
260
+ border: 1px solid ${(_e = THEME.token) === null || _e === void 0 ? void 0 : _e.bw4};
258
261
 
259
262
  & img {
260
263
  width: 100%;
@@ -278,16 +281,15 @@ export const PackageSharingStyled = styled.div `
278
281
  cursor: pointer;
279
282
  &:hover {
280
283
  .image-wrapper {
281
- /* box-shadow: 1px 1px 2px 0 #aaa; */
282
- background-color: ${(_e = THEME.token) === null || _e === void 0 ? void 0 : _e.blue};
283
- border-color: ${(_f = THEME.token) === null || _f === void 0 ? void 0 : _f.blue3};
284
+ background-color: ${(_f = THEME.token) === null || _f === void 0 ? void 0 : _f.blue};
285
+ border-color: ${(_g = THEME.token) === null || _g === void 0 ? void 0 : _g.blue3};
284
286
  }
285
287
  }
286
288
  &.disabled {
287
289
  cursor: default;
288
290
  .image-wrapper {
289
- background: ${(_g = THEME.token) === null || _g === void 0 ? void 0 : _g.blue1_1};
290
- border-color: ${(_h = THEME.token) === null || _h === void 0 ? void 0 : _h.blue7};
291
+ background: ${(_h = THEME.token) === null || _h === void 0 ? void 0 : _h.blue1_1};
292
+ border-color: ${(_j = THEME.token) === null || _j === void 0 ? void 0 : _j.blue7};
291
293
  img {
292
294
  cursor: default;
293
295
  }
@@ -296,24 +298,20 @@ export const PackageSharingStyled = styled.div `
296
298
  .image-wrapper {
297
299
  border: 1px solid #ddd;
298
300
  padding: 10px;
299
- border-radius: ${(_j = THEME.token) === null || _j === void 0 ? void 0 : _j.borderRadius}px;
301
+ border-radius: ${(_k = THEME.token) === null || _k === void 0 ? void 0 : _k.borderRadius}px;
300
302
  transition: all 0.2s ease-in-out;
301
- width: 108px;
302
- height: 45px;
303
+ /* width: 108px;
304
+ height: 45px; */
303
305
  img {
304
306
  max-width: 100%;
305
307
  }
306
308
  }
307
309
  .network-name {
308
- color: ${(_k = THEME.token) === null || _k === void 0 ? void 0 : _k.bw8};
310
+ color: ${(_l = THEME.token) === null || _l === void 0 ? void 0 : _l.bw8};
309
311
  font-size: 11px;
310
312
  margin-top: 5px;
311
313
  margin-bottom: 0;
312
314
  text-align: center;
313
- /* margin: 10px 0 0;
314
- padding: 0 5px;
315
- max-height: 28px;
316
- line-height: 1.27; */
317
315
  overflow: hidden;
318
316
  text-overflow: ellipsis;
319
317
  display: -webkit-box;
@@ -323,11 +321,23 @@ export const PackageSharingStyled = styled.div `
323
321
  }
324
322
  }
325
323
  }
324
+
325
+ .no-network-title {
326
+ height: 158px;
327
+ display: flex;
328
+ justify-content: center;
329
+ align-items: center;
330
+ }
331
+
332
+ .network-select:has(> div.network-item) + .no-network-title {
333
+ display: none;
334
+ }
326
335
  }
327
336
  `;
328
337
  export const InnerCardStyled = styled.div `
338
+ width: 370px;
329
339
  background-color: white;
330
- border-radius: ${(_l = THEME.token) === null || _l === void 0 ? void 0 : _l.borderRadius}px;
340
+ border-radius: ${(_m = THEME.token) === null || _m === void 0 ? void 0 : _m.borderRadius}px;
331
341
  padding: 10px;
332
342
  margin-bottom: 15px;
333
343
  `;
@@ -49,7 +49,6 @@ export const Layout = memo(props => {
49
49
  // Hooks
50
50
  useMutationObserver(() => {
51
51
  if (notificationWrapperRef.current) {
52
- console.log('dfjdsoifjdsoijoi');
53
52
  const child = notificationWrapperRef.current.querySelector('div');
54
53
  setNoSpaceTopContent(!!child);
55
54
  }
@@ -103,7 +102,7 @@ export const Layout = memo(props => {
103
102
  p_f_longdatetime: "dd MMMM 'at' HH:mm:ss",
104
103
  embeddedData: {},
105
104
  INSIGHT_U_OGS: 'uogs',
106
- } }) }), accountSharingConfig: Object.assign(Object.assign({}, headerProps === null || headerProps === void 0 ? void 0 : headerProps.accountSharingConfig), { u_ogs: 'uogs', appCode: 'APP_CUSTOMER_360' }), accountSelection: Object.assign(Object.assign({}, headerProps === null || headerProps === void 0 ? void 0 : headerProps.accountSelection), { show: !!((_b = headerProps === null || headerProps === void 0 ? void 0 : headerProps.accountSelection) === null || _b === void 0 ? void 0 : _b.show) && showAccountSelection }) }));
105
+ } }) }), accountSharingConfig: Object.assign(Object.assign({}, headerProps === null || headerProps === void 0 ? void 0 : headerProps.accountSharingConfig), { u_ogs: 'uogs', appCode: 'APP_CUSTOMER_360' }), accountSelection: Object.assign(Object.assign({}, headerProps === null || headerProps === void 0 ? void 0 : headerProps.accountSelection), { currentAccount: auth === null || auth === void 0 ? void 0 : auth.accountId, show: !!((_b = headerProps === null || headerProps === void 0 ? void 0 : headerProps.accountSelection) === null || _b === void 0 ? void 0 : _b.show) && showAccountSelection }) }));
107
106
  }, [headerProps, iamDomain, permissionDomain, showAccountSelection]);
108
107
  const mergeHeaderProps = useDeepCompareMemo(() => merge(cloneDeep(initialHeaderProps), header), [initialHeaderProps, header]);
109
108
  const _c = useDeepCompareMemo(() => merge(cloneDeep(contentWrapperProps), cloneDeep(contentWrapper)), [contentWrapperProps, contentWrapper]), { noPadding } = _c, mergeContentWrapperProps = __rest(_c, ["noPadding"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.355",
3
+ "version": "1.3.5-beta.357",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",
@@ -59,7 +59,7 @@
59
59
  "not op_mini all"
60
60
  ],
61
61
  "dependencies": {
62
- "@antscorp/icons": "0.27.29",
62
+ "@antscorp/icons": "0.27.30",
63
63
  "@antscorp/image-editor": "1.0.2",
64
64
  "@antscorp/processing-notification": "^1.0.3",
65
65
  "@dnd-kit/core": "^6.1.0",