@antscorp/antsomi-ui 1.3.5-beta.212 → 1.3.5-beta.213
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.
|
@@ -4,7 +4,9 @@ import { HeaderV2Props } from '../../molecules';
|
|
|
4
4
|
import '@antscorp/processing-notification/dist/index.css';
|
|
5
5
|
import { ProcessingNotificationProps } from '@antscorp/antsomi-ui/es/types';
|
|
6
6
|
interface LayoutProps {
|
|
7
|
-
headerProps?: Partial<HeaderV2Props
|
|
7
|
+
headerProps?: Partial<Omit<HeaderV2Props, 'helpConfig'> & {
|
|
8
|
+
helpConfig: Partial<HeaderV2Props['helpConfig']>;
|
|
9
|
+
}>;
|
|
8
10
|
leftMenuProps?: LeftMenuProps;
|
|
9
11
|
processingNotificationProps?: Partial<ProcessingNotificationProps>;
|
|
10
12
|
workspaceProps?: React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -40,15 +40,13 @@ export const Layout = memo(props => {
|
|
|
40
40
|
// Memo
|
|
41
41
|
const initialHeaderProps = useMemo(() => {
|
|
42
42
|
var _a, _b;
|
|
43
|
-
return (Object.assign(Object.assign({ className: 'layout-header' }, headerProps), { helpConfig: {
|
|
44
|
-
configs: Object.assign(Object.assign({}, (_a = headerProps === null || headerProps === void 0 ? void 0 : headerProps.helpConfig) === null || _a === void 0 ? void 0 : _a.configs), { appCode: 'SANDBOX_MARKETING', avatar: '//c0-platform.ants.tech/avatar/2021/09/17/0xgbkurioo.png', config: {
|
|
43
|
+
return (Object.assign(Object.assign({ className: 'layout-header' }, headerProps), { helpConfig: Object.assign(Object.assign({}, headerProps === null || headerProps === void 0 ? void 0 : headerProps.helpConfig), { configs: Object.assign(Object.assign({}, (_a = headerProps === null || headerProps === void 0 ? void 0 : headerProps.helpConfig) === null || _a === void 0 ? void 0 : _a.configs), { appCode: 'SANDBOX_MARKETING', avatar: '//c0-platform.ants.tech/avatar/2021/09/17/0xgbkurioo.png', config: {
|
|
45
44
|
p_timezone: 'Asia/Singapore',
|
|
46
45
|
api_pid: 33167,
|
|
47
46
|
p_f_longdatetime: "dd MMMM 'at' HH:mm:ss",
|
|
48
47
|
embeddedData: {},
|
|
49
48
|
INSIGHT_U_OGS: 'uogs',
|
|
50
|
-
} }),
|
|
51
|
-
}, 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 }) }));
|
|
49
|
+
} }) }), 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 }) }));
|
|
52
50
|
}, [headerProps, showAccountSelection]);
|
|
53
51
|
const mergeHeaderProps = useMemo(() => merge(initialHeaderProps, headerStore), [initialHeaderProps, headerStore]);
|
|
54
52
|
const antsProcessingNotificationConfig = useMemo(() => (Object.assign({ permissionDomain: PERMISSION_API, socketDomain: SOCKET_API, token, accountId: userId, userId, lang: languageCode, networkId: portalId }, processingNotificationProps)), [languageCode, portalId, token, userId, processingNotificationProps]);
|