andoncloud-sdk 1.7.5 → 1.7.7
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.
- package/dist/andoncloud-sdk.js +25 -25
- package/dist/andoncloud-sdk.js.map +1 -1
- package/dist/app/components/Header/Header.d.ts +3 -0
- package/dist/app/components/Header/Header.test.d.ts +1 -0
- package/dist/app/components/Header/index.d.ts +1 -0
- package/dist/app/components/Header/styles.d.ts +11 -0
- package/dist/app/components/Header/types.d.ts +53 -0
- package/dist/app/components/header.d.ts +3 -1
- package/dist/app/hooks/useHeaderContentEvent.d.ts +3 -0
- package/dist/app/hooks/useHeaderContentEvent.test.d.ts +1 -0
- package/dist/app/utils/display.d.ts +2 -0
- package/dist/assets/index.d.ts +1 -0
- package/dist/assets/index.ts +1 -0
- package/dist/assets/logo.svg.d.ts +2 -0
- package/dist/index.d.ts +11 -0
- package/dist/version.d.ts +1 -1
- package/package.json +17 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Header } from './Header';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
import { HeaderStylesOverride, StyleMap } from './types';
|
|
3
|
+
interface StylesInput {
|
|
4
|
+
styles?: HeaderStylesOverride;
|
|
5
|
+
titleStyles?: SxProps<Theme>;
|
|
6
|
+
contentStyles?: SxProps<Theme>;
|
|
7
|
+
menuStyles?: SxProps<Theme>;
|
|
8
|
+
menuDropdownStyles?: SxProps<Theme>;
|
|
9
|
+
}
|
|
10
|
+
declare const useStyles: ({ styles, titleStyles, contentStyles, menuStyles, menuDropdownStyles }: StylesInput) => StyleMap;
|
|
11
|
+
export default useStyles;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
export interface NavItem {
|
|
4
|
+
label: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
action?: () => void;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface NavProps {
|
|
10
|
+
items?: NavItem[];
|
|
11
|
+
}
|
|
12
|
+
export interface UserProps {
|
|
13
|
+
show?: boolean;
|
|
14
|
+
showCompanyLogo?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface HeaderMenuProps {
|
|
17
|
+
items?: NavItem[];
|
|
18
|
+
buttonColor?: string;
|
|
19
|
+
dropdownStyles?: SxProps<Theme>;
|
|
20
|
+
styles?: SxProps<Theme>;
|
|
21
|
+
}
|
|
22
|
+
export interface IframeContent {
|
|
23
|
+
component: string;
|
|
24
|
+
props: Record<string, unknown>;
|
|
25
|
+
}
|
|
26
|
+
export interface IframeSource {
|
|
27
|
+
source: Window;
|
|
28
|
+
origin: string;
|
|
29
|
+
}
|
|
30
|
+
export interface HeaderStylesOverride {
|
|
31
|
+
background?: string;
|
|
32
|
+
[key: string]: unknown;
|
|
33
|
+
}
|
|
34
|
+
export type StyleMap = Record<string, Record<string, unknown>>;
|
|
35
|
+
export interface HeaderProps {
|
|
36
|
+
position?: 'absolute' | 'fixed' | 'relative' | 'static' | 'sticky';
|
|
37
|
+
scrolled?: boolean;
|
|
38
|
+
showAcLogo?: boolean;
|
|
39
|
+
leadingText?: string;
|
|
40
|
+
title?: string;
|
|
41
|
+
titleStyles?: SxProps<Theme>;
|
|
42
|
+
content?: React.ReactNode;
|
|
43
|
+
contentComponents?: Record<string, React.ComponentType<any>>;
|
|
44
|
+
contentStyles?: SxProps<Theme>;
|
|
45
|
+
navProps?: NavProps;
|
|
46
|
+
userProps?: UserProps;
|
|
47
|
+
menuProps?: HeaderMenuProps;
|
|
48
|
+
sidebarEnabled?: boolean;
|
|
49
|
+
sidebarOpen?: boolean;
|
|
50
|
+
onSidebarToggle?: () => void;
|
|
51
|
+
styles?: HeaderStylesOverride;
|
|
52
|
+
'data-testid'?: string;
|
|
53
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
({ position, scrolled, showAcLogo, leadingText, title, titleStyles, content, contentStyles, navProps, userProps, menuProps, sidebarEnabled, sidebarOpen, onSidebarToggle, styles, "data-testid": dataTestID, }: {
|
|
2
|
+
({ position, scrolled, showAcLogo, leadingText, title, titleStyles, content, contentComponents, contentStyles, navProps, userProps, menuProps, sidebarEnabled, sidebarOpen, onSidebarToggle, styles, "data-testid": dataTestID, }: {
|
|
3
3
|
position: any;
|
|
4
4
|
scrolled: any;
|
|
5
5
|
showAcLogo: any;
|
|
@@ -7,6 +7,7 @@ declare const _default: {
|
|
|
7
7
|
title: any;
|
|
8
8
|
titleStyles: any;
|
|
9
9
|
content: any;
|
|
10
|
+
contentComponents: any;
|
|
10
11
|
contentStyles: any;
|
|
11
12
|
navProps: any;
|
|
12
13
|
userProps: any;
|
|
@@ -25,6 +26,7 @@ declare const _default: {
|
|
|
25
26
|
title: any;
|
|
26
27
|
titleStyles: any;
|
|
27
28
|
content: any;
|
|
29
|
+
contentComponents: any;
|
|
28
30
|
contentStyles: any;
|
|
29
31
|
navProps: any;
|
|
30
32
|
userProps: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,3 +9,5 @@ export function updateParentHeaderStyles({ target, styles }: {
|
|
|
9
9
|
styles: any;
|
|
10
10
|
}): void;
|
|
11
11
|
export function resetParentHeaderStyles(target: any): void;
|
|
12
|
+
export function updateParentHeaderContent(descriptor: any): void;
|
|
13
|
+
export function resetParentHeaderContent(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as acLogo } from './logo.svg';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as acLogo } from './logo.svg';
|
package/dist/index.d.ts
CHANGED
|
@@ -90,6 +90,13 @@ declare module 'andoncloud-sdk' {
|
|
|
90
90
|
export const updateParentHeaderStyles: ({ target, styles }: UpdateParentHeaderStylesArgs) => void;
|
|
91
91
|
export const resetParentHeaderStyles: (target?: string) => void;
|
|
92
92
|
|
|
93
|
+
interface ContentDescriptor {
|
|
94
|
+
component: string;
|
|
95
|
+
props?: Record<string, any>;
|
|
96
|
+
}
|
|
97
|
+
export const updateParentHeaderContent: (descriptor: ContentDescriptor) => void;
|
|
98
|
+
export const resetParentHeaderContent: () => void;
|
|
99
|
+
|
|
93
100
|
interface AppProps {
|
|
94
101
|
children: React.ReactNode;
|
|
95
102
|
baseUrl: string;
|
|
@@ -125,6 +132,7 @@ declare module 'andoncloud-sdk' {
|
|
|
125
132
|
title?: string;
|
|
126
133
|
titleStyles?: SxProps<Theme>;
|
|
127
134
|
content?: React.ReactNode;
|
|
135
|
+
contentComponents?: Record<string, React.ComponentType<any>>;
|
|
128
136
|
contentStyles?: SxProps<Theme>;
|
|
129
137
|
navProps?: NavProps;
|
|
130
138
|
userProps?: UserProps;
|
|
@@ -300,6 +308,9 @@ declare module 'andoncloud-sdk' {
|
|
|
300
308
|
|
|
301
309
|
export const useAccess: (features?: string[], options?: UseAccessOptions) => UseAccessResult;
|
|
302
310
|
|
|
311
|
+
type ContentEventHandler = (event: string, payload?: unknown) => void;
|
|
312
|
+
export const useHeaderContentEvent: (handler: ContentEventHandler) => void;
|
|
313
|
+
|
|
303
314
|
export interface FeatureRequestPayload {
|
|
304
315
|
featureKey: string;
|
|
305
316
|
requestType: AccessRequestType;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIBRARY_VERSION = "1.7.
|
|
1
|
+
export declare const LIBRARY_VERSION = "1.7.7";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "andoncloud-sdk",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "src/index.js",
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"main": "dist/andoncloud-sdk.js",
|
|
9
9
|
"module": "dist/andoncloud-sdk.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@sentry/react": "^10.
|
|
11
|
+
"@sentry/react": "^10.40.0",
|
|
12
12
|
"@sentry/tracing": "^7.120.4",
|
|
13
13
|
"classnames": "^2.5.1",
|
|
14
14
|
"dayjs": "^1.11.19",
|
|
15
15
|
"history": "^5.3.0",
|
|
16
|
-
"i18next-browser-languagedetector": "^8.2.
|
|
16
|
+
"i18next-browser-languagedetector": "^8.2.1",
|
|
17
17
|
"inter-ui": "^4.1.1",
|
|
18
18
|
"js-cookie": "^3.0.5",
|
|
19
19
|
"onscan.js": "^1.5.2",
|
|
@@ -51,27 +51,27 @@
|
|
|
51
51
|
"@babel/eslint-parser": "^7.28.6",
|
|
52
52
|
"@emotion/react": "^11.14.0",
|
|
53
53
|
"@emotion/styled": "^11.14.1",
|
|
54
|
-
"@mui/icons-material": "^7.3.
|
|
55
|
-
"@mui/lab": "^7.0.1-beta.
|
|
56
|
-
"@mui/material": "^7.3.
|
|
57
|
-
"@mui/x-date-pickers": "^8.27.
|
|
54
|
+
"@mui/icons-material": "^7.3.8",
|
|
55
|
+
"@mui/lab": "^7.0.1-beta.22",
|
|
56
|
+
"@mui/material": "^7.3.8",
|
|
57
|
+
"@mui/x-date-pickers": "^8.27.2",
|
|
58
58
|
"@testing-library/dom": "^10.4.1",
|
|
59
59
|
"@testing-library/jest-dom": "^6.9.1",
|
|
60
60
|
"@testing-library/react": "^16.3.2",
|
|
61
|
-
"@types/react": "^19.2.
|
|
61
|
+
"@types/react": "^19.2.14",
|
|
62
62
|
"@types/react-dom": "^19.2.3",
|
|
63
63
|
"@types/react-gtm-module": "^2.0.4",
|
|
64
|
-
"andoncloud-library-scripts": "^1.0.
|
|
64
|
+
"andoncloud-library-scripts": "^1.0.16",
|
|
65
65
|
"babel-preset-react-app": "^10.1.0",
|
|
66
66
|
"copyfiles": "^2.4.1",
|
|
67
67
|
"cross-env": "^10.1.0",
|
|
68
68
|
"eslint": "8.57.1",
|
|
69
69
|
"eslint-config-andoncloud": "^1.0.0",
|
|
70
70
|
"husky": "^9.1.7",
|
|
71
|
-
"i18next": "^25.8.
|
|
71
|
+
"i18next": "^25.8.13",
|
|
72
72
|
"mobx": "^6.15.0",
|
|
73
73
|
"mobx-react-lite": "^4.1.1",
|
|
74
|
-
"npm-check-updates": "^19.3
|
|
74
|
+
"npm-check-updates": "^19.6.3",
|
|
75
75
|
"npm-run-all": "^4.1.5",
|
|
76
76
|
"react": "^19.2.4",
|
|
77
77
|
"react-dom": "^19.2.4",
|
|
@@ -94,6 +94,12 @@
|
|
|
94
94
|
"react-is": "^18.0.0",
|
|
95
95
|
"react-router-dom": "^6.0.0"
|
|
96
96
|
},
|
|
97
|
+
"jest": {
|
|
98
|
+
"moduleNameMapper": {
|
|
99
|
+
"^@/(.*)$": "<rootDir>/src/app/$1",
|
|
100
|
+
"^@assets$": "<rootDir>/src/assets/index.ts"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
97
103
|
"files": [
|
|
98
104
|
"dist"
|
|
99
105
|
]
|