@ebay/muse-lib-react 1.3.0
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/README.md +19 -0
- package/build/dev/asset-manifest.json +11 -0
- package/build/dev/favicon.png +0 -0
- package/build/dev/lib-manifest.json +3374 -0
- package/build/dev/main.js +75839 -0
- package/build/dev/main.js.map +1 -0
- package/build/dev/muse.d.ts +170 -0
- package/build/dev/static/media/logo.b23b880b0dac2229042c.png +0 -0
- package/build/dev/static/media/subAppLoading2.bf08007b83457287ade1cedb71bc70f7.svg +7 -0
- package/build/dist/asset-manifest.json +11 -0
- package/build/dist/favicon.png +0 -0
- package/build/dist/lib-manifest.json +3603 -0
- package/build/dist/main.js +3 -0
- package/build/dist/main.js.LICENSE.txt +134 -0
- package/build/dist/main.js.map +1 -0
- package/build/dist/muse.d.ts +170 -0
- package/build/dist/static/media/logo.b23b880b0dac2229042c.png +0 -0
- package/build/dist/static/media/subAppLoading2.bf08007b83457287ade1cedb71bc70f7.svg +7 -0
- package/build/test/asset-manifest.json +11 -0
- package/build/test/favicon.png +0 -0
- package/build/test/lib-manifest.json +3587 -0
- package/build/test/main.js +3 -0
- package/build/test/main.js.LICENSE.txt +134 -0
- package/build/test/main.js.map +1 -0
- package/build/test/muse.d.ts +170 -0
- package/build/test/static/media/logo.b23b880b0dac2229042c.png +0 -0
- package/build/test/static/media/subAppLoading2.bf08007b83457287ade1cedb71bc70f7.svg +7 -0
- package/package.json +88 -0
- package/src/Root.js +195 -0
- package/src/common/configStore.js +40 -0
- package/src/common/history.js +25 -0
- package/src/common/rootReducer.js +40 -0
- package/src/common/routeConfig.js +135 -0
- package/src/common/store.js +21 -0
- package/src/features/common/ErrorBoundary.js +24 -0
- package/src/features/common/ErrorBoundary.less +6 -0
- package/src/features/common/Nodes.js +20 -0
- package/src/features/common/PageNotFound.js +3 -0
- package/src/features/common/PageNotFound.less +6 -0
- package/src/features/common/index.js +4 -0
- package/src/features/common/redux/actions.js +0 -0
- package/src/features/common/redux/constants.js +0 -0
- package/src/features/common/redux/initialState.js +12 -0
- package/src/features/common/redux/reducer.js +24 -0
- package/src/features/common/route.js +9 -0
- package/src/features/common/style.less +3 -0
- package/src/features/common/useExtPoint.js +28 -0
- package/src/features/common/utils.js +20 -0
- package/src/features/home/App.js +33 -0
- package/src/features/home/App.less +11 -0
- package/src/features/home/Homepage.js +46 -0
- package/src/features/home/Homepage.less +63 -0
- package/src/features/home/index.js +2 -0
- package/src/features/home/redux/actions.js +0 -0
- package/src/features/home/redux/constants.js +0 -0
- package/src/features/home/redux/initialState.js +4 -0
- package/src/features/home/redux/reducer.js +16 -0
- package/src/features/home/route.js +6 -0
- package/src/features/home/style.less +3 -0
- package/src/features/sub-app/C2SProxyFailed.js +10 -0
- package/src/features/sub-app/C2SProxyFailed.less +19 -0
- package/src/features/sub-app/FixedSubAppContainer.js +142 -0
- package/src/features/sub-app/FixedSubAppContainer.less +12 -0
- package/src/features/sub-app/LoadingSkeleton.js +21 -0
- package/src/features/sub-app/LoadingSkeleton.less +20 -0
- package/src/features/sub-app/SubAppContainer.js +203 -0
- package/src/features/sub-app/SubAppContainer.less +29 -0
- package/src/features/sub-app/SubAppContext.js +4 -0
- package/src/features/sub-app/hooks/useParentRouteChange.js +23 -0
- package/src/features/sub-app/index.js +5 -0
- package/src/features/sub-app/redux/actions.js +1 -0
- package/src/features/sub-app/redux/constants.js +2 -0
- package/src/features/sub-app/redux/hooks.js +1 -0
- package/src/features/sub-app/redux/initialState.js +12 -0
- package/src/features/sub-app/redux/reducer.js +25 -0
- package/src/features/sub-app/redux/setSubAppState.js +43 -0
- package/src/features/sub-app/route.js +43 -0
- package/src/features/sub-app/style.less +5 -0
- package/src/features/sub-app/subAppLoading.svg +7 -0
- package/src/features/sub-app/subAppLoading2.html +83 -0
- package/src/features/sub-app/subAppLoading2.svg +7 -0
- package/src/features/sub-app/subAppLoading3.svg +7 -0
- package/src/features/sub-app/subAppLoading4.svg +7 -0
- package/src/features/sub-app/urlUtils.js +101 -0
- package/src/images/logo.png +0 -0
- package/src/index.css +3 -0
- package/src/index.js +41 -0
- package/src/muse-ext.d.ts +1 -0
- package/src/muse.d.ts +163 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/styles/global.less +9 -0
- package/src/styles/index.less +5 -0
- package/src/styles/mixins.less +0 -0
- package/src/utils.js +26 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// Generated by dts-bundle v0.7.3
|
|
2
|
+
// Dependencies for this module:
|
|
3
|
+
// ../react
|
|
4
|
+
// ../redux
|
|
5
|
+
|
|
6
|
+
import { ComponentType, ReactNode } from 'react';
|
|
7
|
+
import { Reducer, AnyAction } from 'redux';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A component(provider) wraps the root element of the application.
|
|
12
|
+
* For example Redux provider, Router provider, etc.
|
|
13
|
+
*/
|
|
14
|
+
type ProviderType = {
|
|
15
|
+
// The order of the provider, the smaller the number, the higher the priority.
|
|
16
|
+
order: number;
|
|
17
|
+
// The key of the provider.
|
|
18
|
+
key: string;
|
|
19
|
+
// The provider component.
|
|
20
|
+
provider: React.ComponentType<any> | null;
|
|
21
|
+
// The props passed to the provider.
|
|
22
|
+
props?: Record<string, any> | null;
|
|
23
|
+
// How to render the wrapped children.
|
|
24
|
+
renderProvider?: ((children: React.ReactNode) => React.ReactNode) | null;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The interface to process providers.
|
|
29
|
+
*/
|
|
30
|
+
interface ProvidersContextType {
|
|
31
|
+
providers: ProviderType[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @description
|
|
36
|
+
* The `root` extension point type.
|
|
37
|
+
* @museExt
|
|
38
|
+
*/
|
|
39
|
+
export interface RootExtPoints {
|
|
40
|
+
/**
|
|
41
|
+
* Called before the root element is rendered.
|
|
42
|
+
*/
|
|
43
|
+
beforeRender?: Function;
|
|
44
|
+
/**
|
|
45
|
+
* Called after the root element is rendered.
|
|
46
|
+
*/
|
|
47
|
+
afterRender?: Function;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Render a wrapper component to the root element. This is often used to inject providers.
|
|
51
|
+
* But usually you can use getProviders instead.
|
|
52
|
+
*/
|
|
53
|
+
renderChildren?: () => void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Pre-process providers. This is called before providers are collected by getProviders.
|
|
57
|
+
* Sometimes you want to disable some internal providers, just remove it from the context.
|
|
58
|
+
*/
|
|
59
|
+
preProcessProviders?: (context: { providers: ProviderType[] }) => string | boolean;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Get providers, you can return a single provider or an array of providers or nothing.
|
|
63
|
+
*/
|
|
64
|
+
getProviders?: (context: ProvidersContextType) => ProviderType | ProviderType[] | void;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* After all providers from `getProviders` are collected, you can process them here.
|
|
68
|
+
*/
|
|
69
|
+
processProviders?: (context: ProvidersContextType) => string | void;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Called after processProviders, another opportunity to process providers.
|
|
73
|
+
*/
|
|
74
|
+
postProcessProviders?: (context: ProvidersContextType) => void;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @museExt
|
|
79
|
+
*/
|
|
80
|
+
export interface HomeExtPoints {
|
|
81
|
+
/**
|
|
82
|
+
* The main layout of the application. Use this extpoint need to undeploy @ebay/muse-layout-antd.
|
|
83
|
+
*/
|
|
84
|
+
mainLayout?: ComponentType;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The homepage component of the applicaiton. That is, the component under root route "/".
|
|
88
|
+
*/
|
|
89
|
+
homepage?: ComponentType;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @category Ext Points Route
|
|
94
|
+
*/
|
|
95
|
+
export interface MuseRoute {
|
|
96
|
+
id?: string;
|
|
97
|
+
path?: string | Array<string>;
|
|
98
|
+
component?: ComponentType;
|
|
99
|
+
element: ReactNode;
|
|
100
|
+
childRoutes?: MuseRoute[];
|
|
101
|
+
isIndex?: boolean;
|
|
102
|
+
index?: boolean;
|
|
103
|
+
render?: Function;
|
|
104
|
+
parent?: string;
|
|
105
|
+
[key: string]: unknown;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @museExt #root
|
|
110
|
+
*/
|
|
111
|
+
export default interface MuseLibReactExtPoints {
|
|
112
|
+
/**
|
|
113
|
+
* Route definitions
|
|
114
|
+
* ```ts
|
|
115
|
+
* factorial(1)
|
|
116
|
+
* ```
|
|
117
|
+
* @example
|
|
118
|
+
* If there is a code block, then both TypeDoc and VSCode will treat
|
|
119
|
+
* text outside of the code block as regular text.
|
|
120
|
+
* ```ts
|
|
121
|
+
* factorial(1)
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
route?: MuseRoute | MuseRoute[];
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Called after the application is mounted to the DOM (React root elemented rendered)
|
|
128
|
+
*/
|
|
129
|
+
onReady?: Function;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* root extension point
|
|
133
|
+
*/
|
|
134
|
+
root?: RootExtPoints;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Merge additional props passed Router component directly.
|
|
138
|
+
*/
|
|
139
|
+
routerProps?: Record<string, any>;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* home extension point
|
|
143
|
+
*/
|
|
144
|
+
home?: HomeExtPoints;
|
|
145
|
+
|
|
146
|
+
testPoint?: {
|
|
147
|
+
ab: {
|
|
148
|
+
cd: () => {};
|
|
149
|
+
};
|
|
150
|
+
test: string;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* You can render an empty component to the app root after app started.
|
|
155
|
+
* It's mainly used for some initialization logic.
|
|
156
|
+
* NOTE: you should not render any UI content in the component, just return null.
|
|
157
|
+
*/
|
|
158
|
+
rootComponent?: ComponentType;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Redux store extension point, contribute a plugin level reducer.
|
|
162
|
+
*/
|
|
163
|
+
reducer?: Reducer<any, AnyAction>;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Redux store extension point, contribute root level reducers.
|
|
167
|
+
*/
|
|
168
|
+
reducers?: Record<string, Reducer<any, AnyAction>>;
|
|
169
|
+
}
|
|
170
|
+
|
|
Binary file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="200px" height="200px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
3
|
+
<g transform="translate(50 50)"> <g transform="translate(-17 -17) scale(0.5)"> <g>
|
|
4
|
+
<animateTransform attributeName="transform" type="rotate" values="0;45" keyTimes="0;1" dur="0.4545454545454546s" begin="0s" repeatCount="indefinite"></animateTransform><path d="M37.3496987939662 -7 L47.3496987939662 -7 L47.3496987939662 7 L37.3496987939662 7 A38 38 0 0 1 31.359972760794346 21.46047782418268 L31.359972760794346 21.46047782418268 L38.431040572659825 28.531545636048154 L28.531545636048154 38.431040572659825 L21.46047782418268 31.359972760794346 A38 38 0 0 1 7.0000000000000036 37.3496987939662 L7.0000000000000036 37.3496987939662 L7.000000000000004 47.3496987939662 L-6.999999999999999 47.3496987939662 L-7 37.3496987939662 A38 38 0 0 1 -21.46047782418268 31.35997276079435 L-21.46047782418268 31.35997276079435 L-28.531545636048154 38.431040572659825 L-38.43104057265982 28.531545636048158 L-31.359972760794346 21.460477824182682 A38 38 0 0 1 -37.3496987939662 7.000000000000007 L-37.3496987939662 7.000000000000007 L-47.3496987939662 7.000000000000008 L-47.3496987939662 -6.9999999999999964 L-37.3496987939662 -6.999999999999997 A38 38 0 0 1 -31.35997276079435 -21.460477824182675 L-31.35997276079435 -21.460477824182675 L-38.431040572659825 -28.531545636048147 L-28.53154563604818 -38.4310405726598 L-21.4604778241827 -31.35997276079433 A38 38 0 0 1 -6.999999999999992 -37.3496987939662 L-6.999999999999992 -37.3496987939662 L-6.999999999999994 -47.3496987939662 L6.999999999999977 -47.3496987939662 L6.999999999999979 -37.3496987939662 A38 38 0 0 1 21.460477824182686 -31.359972760794342 L21.460477824182686 -31.359972760794342 L28.531545636048158 -38.43104057265982 L38.4310405726598 -28.53154563604818 L31.35997276079433 -21.4604778241827 A38 38 0 0 1 37.3496987939662 -6.999999999999995 M0 -23A23 23 0 1 0 0 23 A23 23 0 1 0 0 -23" fill="#86b817"></path></g></g> <g transform="translate(0 22) scale(0.4)"> <g>
|
|
5
|
+
<animateTransform attributeName="transform" type="rotate" values="45;0" keyTimes="0;1" dur="0.4545454545454546s" begin="-0.2272727272727273s" repeatCount="indefinite"></animateTransform><path d="M37.3496987939662 -7 L47.3496987939662 -7 L47.3496987939662 7 L37.3496987939662 7 A38 38 0 0 1 31.359972760794346 21.46047782418268 L31.359972760794346 21.46047782418268 L38.431040572659825 28.531545636048154 L28.531545636048154 38.431040572659825 L21.46047782418268 31.359972760794346 A38 38 0 0 1 7.0000000000000036 37.3496987939662 L7.0000000000000036 37.3496987939662 L7.000000000000004 47.3496987939662 L-6.999999999999999 47.3496987939662 L-7 37.3496987939662 A38 38 0 0 1 -21.46047782418268 31.35997276079435 L-21.46047782418268 31.35997276079435 L-28.531545636048154 38.431040572659825 L-38.43104057265982 28.531545636048158 L-31.359972760794346 21.460477824182682 A38 38 0 0 1 -37.3496987939662 7.000000000000007 L-37.3496987939662 7.000000000000007 L-47.3496987939662 7.000000000000008 L-47.3496987939662 -6.9999999999999964 L-37.3496987939662 -6.999999999999997 A38 38 0 0 1 -31.35997276079435 -21.460477824182675 L-31.35997276079435 -21.460477824182675 L-38.431040572659825 -28.531545636048147 L-28.53154563604818 -38.4310405726598 L-21.4604778241827 -31.35997276079433 A38 38 0 0 1 -6.999999999999992 -37.3496987939662 L-6.999999999999992 -37.3496987939662 L-6.999999999999994 -47.3496987939662 L6.999999999999977 -47.3496987939662 L6.999999999999979 -37.3496987939662 A38 38 0 0 1 21.460477824182686 -31.359972760794342 L21.460477824182686 -31.359972760794342 L28.531545636048158 -38.43104057265982 L38.4310405726598 -28.53154563604818 L31.35997276079433 -21.4604778241827 A38 38 0 0 1 37.3496987939662 -6.999999999999995 M0 -23A23 23 0 1 0 0 23 A23 23 0 1 0 0 -23" fill="#e53238"></path></g></g> <g transform="translate(28 4) scale(0.3)"> <g>
|
|
6
|
+
<animateTransform attributeName="transform" type="rotate" values="0;45" keyTimes="0;1" dur="0.4545454545454546s" begin="-0.2272727272727273s" repeatCount="indefinite"></animateTransform><path d="M37.3496987939662 -7 L47.3496987939662 -7 L47.3496987939662 7 L37.3496987939662 7 A38 38 0 0 1 31.359972760794346 21.46047782418268 L31.359972760794346 21.46047782418268 L38.431040572659825 28.531545636048154 L28.531545636048154 38.431040572659825 L21.46047782418268 31.359972760794346 A38 38 0 0 1 7.0000000000000036 37.3496987939662 L7.0000000000000036 37.3496987939662 L7.000000000000004 47.3496987939662 L-6.999999999999999 47.3496987939662 L-7 37.3496987939662 A38 38 0 0 1 -21.46047782418268 31.35997276079435 L-21.46047782418268 31.35997276079435 L-28.531545636048154 38.431040572659825 L-38.43104057265982 28.531545636048158 L-31.359972760794346 21.460477824182682 A38 38 0 0 1 -37.3496987939662 7.000000000000007 L-37.3496987939662 7.000000000000007 L-47.3496987939662 7.000000000000008 L-47.3496987939662 -6.9999999999999964 L-37.3496987939662 -6.999999999999997 A38 38 0 0 1 -31.35997276079435 -21.460477824182675 L-31.35997276079435 -21.460477824182675 L-38.431040572659825 -28.531545636048147 L-28.53154563604818 -38.4310405726598 L-21.4604778241827 -31.35997276079433 A38 38 0 0 1 -6.999999999999992 -37.3496987939662 L-6.999999999999992 -37.3496987939662 L-6.999999999999994 -47.3496987939662 L6.999999999999977 -47.3496987939662 L6.999999999999979 -37.3496987939662 A38 38 0 0 1 21.460477824182686 -31.359972760794342 L21.460477824182686 -31.359972760794342 L28.531545636048158 -38.43104057265982 L38.4310405726598 -28.53154563604818 L31.35997276079433 -21.4604778241827 A38 38 0 0 1 37.3496987939662 -6.999999999999995 M0 -23A23 23 0 1 0 0 23 A23 23 0 1 0 0 -23" fill="#f5af02"></path></g></g></g>
|
|
7
|
+
<!-- [ldio] generated by https://loading.io/ --></svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": {
|
|
3
|
+
"main.js": "/main.js",
|
|
4
|
+
"static/media/logo.png": "/static/media/logo.b23b880b0dac2229042c.png",
|
|
5
|
+
"static/media/subAppLoading2.svg": "/static/media/subAppLoading2.bf08007b83457287ade1cedb71bc70f7.svg",
|
|
6
|
+
"main.js.map": "/main.js.map"
|
|
7
|
+
},
|
|
8
|
+
"entrypoints": [
|
|
9
|
+
"main.js"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
Binary file
|