echarts-for-react 3.0.4 → 3.0.6
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/esm/core.d.ts +9 -1
- package/esm/core.js +25 -20
- package/esm/core.js.map +1 -1
- package/esm/helper/pick.d.ts +1 -1
- package/esm/helper/pick.js.map +1 -1
- package/esm/types.d.ts +2 -10
- package/esm/types.js.map +1 -1
- package/lib/core.d.ts +9 -1
- package/lib/core.js +24 -19
- package/lib/core.js.map +1 -1
- package/lib/helper/pick.d.ts +1 -1
- package/lib/helper/pick.js.map +1 -1
- package/lib/types.d.ts +2 -10
- package/lib/types.js.map +1 -1
- package/package.json +1 -1
- package/src/.umi/core/devScripts.ts +53 -0
- package/src/.umi/core/history.ts +21 -0
- package/src/.umi/core/plugin.ts +8 -0
- package/src/.umi/core/pluginConfig.d.ts +300 -0
- package/src/.umi/core/pluginRegister.ts +5 -0
- package/src/.umi/core/polyfill.ts +4 -0
- package/src/.umi/core/routes.ts +389 -0
- package/src/.umi/core/umiExports.ts +3 -0
- package/src/.umi/dumi/apis.json +1 -0
- package/src/.umi/dumi/config.json +129 -0
- package/src/.umi/dumi/demos/index.ts +5469 -0
- package/src/.umi/dumi/layout.tsx +8 -0
- package/src/.umi/umi.ts +58 -0
- package/src/.umi-production/core/history.ts +21 -0
- package/src/.umi-production/core/plugin.ts +8 -0
- package/src/.umi-production/core/pluginConfig.d.ts +300 -0
- package/src/.umi-production/core/pluginRegister.ts +5 -0
- package/src/.umi-production/core/polyfill.ts +4 -0
- package/src/.umi-production/core/routes.ts +389 -0
- package/src/.umi-production/core/umiExports.ts +3 -0
- package/src/.umi-production/dumi/apis.json +1 -0
- package/src/.umi-production/dumi/config.json +129 -0
- package/src/.umi-production/dumi/demos/index.ts +5469 -0
- package/src/.umi-production/dumi/layout.tsx +8 -0
- package/src/.umi-production/umi.ts +58 -0
- package/src/core.tsx +48 -20
- package/src/helper/pick.ts +2 -2
- package/src/types.ts +1 -10
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import config from '@@/dumi/config';
|
|
4
|
+
import demos from '@@/dumi/demos';
|
|
5
|
+
import apis from '@@/dumi/apis';
|
|
6
|
+
import Layout from '/Users/xiaowei/Documents/code/antv/echarts-for-react/node_modules/_@umijs_preset-dumi@1.1.54@@umijs/preset-dumi/lib/theme/layout';
|
|
7
|
+
|
|
8
|
+
export default (props) => <Layout {...props} config={config} demos={demos} apis={apis} />;
|
package/src/.umi/umi.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import './core/polyfill';
|
|
3
|
+
import '@@/core/devScripts';
|
|
4
|
+
import { plugin } from './core/plugin';
|
|
5
|
+
import './core/pluginRegister';
|
|
6
|
+
import { createHistory } from './core/history';
|
|
7
|
+
import { ApplyPluginsType } from '/Users/xiaowei/Documents/code/antv/echarts-for-react/node_modules/_@umijs_runtime@3.5.43@@umijs/runtime';
|
|
8
|
+
import { renderClient } from '/Users/xiaowei/Documents/code/antv/echarts-for-react/node_modules/_@umijs_renderer-react@3.5.43@@umijs/renderer-react/dist/index.js';
|
|
9
|
+
import { getRoutes } from './core/routes';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
const getClientRender = (args: { hot?: boolean; routes?: any[] } = {}) => plugin.applyPlugins({
|
|
15
|
+
key: 'render',
|
|
16
|
+
type: ApplyPluginsType.compose,
|
|
17
|
+
initialValue: () => {
|
|
18
|
+
const opts = plugin.applyPlugins({
|
|
19
|
+
key: 'modifyClientRenderOpts',
|
|
20
|
+
type: ApplyPluginsType.modify,
|
|
21
|
+
initialValue: {
|
|
22
|
+
routes: args.routes || getRoutes(),
|
|
23
|
+
plugin,
|
|
24
|
+
history: createHistory(args.hot),
|
|
25
|
+
isServer: process.env.__IS_SERVER,
|
|
26
|
+
rootElement: 'root',
|
|
27
|
+
defaultTitle: ``,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
return renderClient(opts);
|
|
31
|
+
},
|
|
32
|
+
args,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const clientRender = getClientRender();
|
|
36
|
+
export default clientRender();
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
window.g_umi = {
|
|
40
|
+
version: '3.5.43',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
// hot module replacement
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
if (module.hot) {
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
module.hot.accept('./core/routes', () => {
|
|
49
|
+
const ret = require('./core/routes');
|
|
50
|
+
if (ret.then) {
|
|
51
|
+
ret.then(({ getRoutes }) => {
|
|
52
|
+
getClientRender({ hot: true, routes: getRoutes() })();
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
getClientRender({ hot: true, routes: ret.getRoutes() })();
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { createBrowserHistory, History } from '/Users/xiaowei/Documents/code/antv/echarts-for-react/node_modules/_@umijs_runtime@3.5.43@@umijs/runtime';
|
|
3
|
+
|
|
4
|
+
let options = {
|
|
5
|
+
"basename": "/echarts-for-react/"
|
|
6
|
+
};
|
|
7
|
+
if ((<any>window).routerBase) {
|
|
8
|
+
options.basename = (<any>window).routerBase;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// remove initial history because of ssr
|
|
12
|
+
let history: History = process.env.__IS_SERVER ? null : createBrowserHistory(options);
|
|
13
|
+
export const createHistory = (hotReload = false) => {
|
|
14
|
+
if (!hotReload) {
|
|
15
|
+
history = createBrowserHistory(options);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return history;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { history };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { Plugin } from '/Users/xiaowei/Documents/code/antv/echarts-for-react/node_modules/_@umijs_runtime@3.5.43@@umijs/runtime';
|
|
3
|
+
|
|
4
|
+
const plugin = new Plugin({
|
|
5
|
+
validKeys: ['modifyClientRenderOpts','patchRoutes','rootContainer','render','onRouteChange','__mfsu',],
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export { plugin };
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
// Created by Umi Plugin
|
|
2
|
+
|
|
3
|
+
export interface IConfigFromPlugins {
|
|
4
|
+
"404"?: boolean
|
|
5
|
+
routes?: {
|
|
6
|
+
/**
|
|
7
|
+
* Any valid URL path
|
|
8
|
+
*/
|
|
9
|
+
path?: string
|
|
10
|
+
/**
|
|
11
|
+
* A React component to render only when the location matches.
|
|
12
|
+
*/
|
|
13
|
+
component?: (string | (() => any))
|
|
14
|
+
wrappers?: string[]
|
|
15
|
+
/**
|
|
16
|
+
* navigate to a new location
|
|
17
|
+
*/
|
|
18
|
+
redirect?: string
|
|
19
|
+
/**
|
|
20
|
+
* When true, the active class/style will only be applied if the location is matched exactly.
|
|
21
|
+
*/
|
|
22
|
+
exact?: boolean
|
|
23
|
+
routes?: any[]
|
|
24
|
+
[k: string]: any
|
|
25
|
+
}[]
|
|
26
|
+
history?: {
|
|
27
|
+
type?: ("browser" | "hash" | "memory")
|
|
28
|
+
options?: {
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
polyfill?: {
|
|
33
|
+
imports?: string[]
|
|
34
|
+
}
|
|
35
|
+
alias?: {
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
analyze?: {
|
|
39
|
+
analyzerMode?: ("server" | "static" | "disabled")
|
|
40
|
+
analyzerHost?: string
|
|
41
|
+
analyzerPort?: any
|
|
42
|
+
openAnalyzer?: boolean
|
|
43
|
+
generateStatsFile?: boolean
|
|
44
|
+
statsFilename?: string
|
|
45
|
+
logLevel?: ("info" | "warn" | "error" | "silent")
|
|
46
|
+
defaultSizes?: ("stat" | "parsed" | "gzip")
|
|
47
|
+
[k: string]: any
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* postcss autoprefixer, default flexbox: no-2009
|
|
51
|
+
*/
|
|
52
|
+
autoprefixer?: {
|
|
53
|
+
|
|
54
|
+
}
|
|
55
|
+
base?: string
|
|
56
|
+
chainWebpack?: (() => any)
|
|
57
|
+
chunks?: string[]
|
|
58
|
+
/**
|
|
59
|
+
* more css-loader options see https://webpack.js.org/loaders/css-loader/#options
|
|
60
|
+
*/
|
|
61
|
+
cssLoader?: {
|
|
62
|
+
url?: (boolean | (() => any))
|
|
63
|
+
import?: (boolean | (() => any))
|
|
64
|
+
modules?: (boolean | string | {
|
|
65
|
+
|
|
66
|
+
})
|
|
67
|
+
sourceMap?: boolean
|
|
68
|
+
importLoaders?: number
|
|
69
|
+
onlyLocals?: boolean
|
|
70
|
+
esModule?: boolean
|
|
71
|
+
localsConvention?: ("asIs" | "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly")
|
|
72
|
+
}
|
|
73
|
+
cssModulesTypescriptLoader?: {
|
|
74
|
+
mode?: ("emit" | "verify")
|
|
75
|
+
}
|
|
76
|
+
cssnano?: {
|
|
77
|
+
|
|
78
|
+
}
|
|
79
|
+
copy?: any[]
|
|
80
|
+
define?: {
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
devScripts?: {
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* devServer configs
|
|
88
|
+
*/
|
|
89
|
+
devServer?: {
|
|
90
|
+
/**
|
|
91
|
+
* devServer port, default 8000
|
|
92
|
+
*/
|
|
93
|
+
port?: number
|
|
94
|
+
host?: string
|
|
95
|
+
https?: ({
|
|
96
|
+
key?: string
|
|
97
|
+
cert?: string
|
|
98
|
+
http2?: boolean
|
|
99
|
+
[k: string]: any
|
|
100
|
+
} | boolean)
|
|
101
|
+
headers?: {
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
writeToDisk?: (boolean | (() => any))
|
|
105
|
+
[k: string]: any
|
|
106
|
+
}
|
|
107
|
+
devtool?: string
|
|
108
|
+
/**
|
|
109
|
+
* Code splitting for performance optimization
|
|
110
|
+
*/
|
|
111
|
+
dynamicImport?: {
|
|
112
|
+
/**
|
|
113
|
+
* loading the component before loaded
|
|
114
|
+
*/
|
|
115
|
+
loading?: string
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Code splitting for import statement syntax
|
|
119
|
+
*/
|
|
120
|
+
dynamicImportSyntax?: {
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
exportStatic?: {
|
|
124
|
+
htmlSuffix?: boolean
|
|
125
|
+
dynamicRoot?: boolean
|
|
126
|
+
supportWin?: boolean
|
|
127
|
+
/**
|
|
128
|
+
* extra render paths only enable in ssr
|
|
129
|
+
*/
|
|
130
|
+
extraRoutePaths?: (() => any)
|
|
131
|
+
}
|
|
132
|
+
externals?: ({
|
|
133
|
+
|
|
134
|
+
} | string | (() => any))
|
|
135
|
+
extraBabelIncludes?: any[]
|
|
136
|
+
extraBabelPlugins?: any[]
|
|
137
|
+
extraBabelPresets?: any[]
|
|
138
|
+
extraPostCSSPlugins?: any[]
|
|
139
|
+
/**
|
|
140
|
+
* fork-ts-checker-webpack-plugin options see https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#options
|
|
141
|
+
*/
|
|
142
|
+
forkTSChecker?: {
|
|
143
|
+
async?: boolean
|
|
144
|
+
typescript?: (boolean | {
|
|
145
|
+
|
|
146
|
+
})
|
|
147
|
+
eslint?: {
|
|
148
|
+
|
|
149
|
+
}
|
|
150
|
+
issue?: {
|
|
151
|
+
|
|
152
|
+
}
|
|
153
|
+
formatter?: (string | {
|
|
154
|
+
|
|
155
|
+
})
|
|
156
|
+
logger?: {
|
|
157
|
+
|
|
158
|
+
}
|
|
159
|
+
[k: string]: any
|
|
160
|
+
}
|
|
161
|
+
fastRefresh?: {
|
|
162
|
+
|
|
163
|
+
}
|
|
164
|
+
hash?: boolean
|
|
165
|
+
ignoreMomentLocale?: boolean
|
|
166
|
+
inlineLimit?: number
|
|
167
|
+
lessLoader?: {
|
|
168
|
+
|
|
169
|
+
}
|
|
170
|
+
manifest?: {
|
|
171
|
+
fileName?: string
|
|
172
|
+
publicPath?: ""
|
|
173
|
+
basePath?: string
|
|
174
|
+
writeToFileEmit?: boolean
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* open mfsu feature
|
|
178
|
+
*/
|
|
179
|
+
mfsu?: {
|
|
180
|
+
development?: {
|
|
181
|
+
output?: string
|
|
182
|
+
}
|
|
183
|
+
production?: {
|
|
184
|
+
output?: string
|
|
185
|
+
}
|
|
186
|
+
mfName?: string
|
|
187
|
+
exportAllMembers?: {
|
|
188
|
+
|
|
189
|
+
}
|
|
190
|
+
chunks?: string[]
|
|
191
|
+
ignoreNodeBuiltInModules?: boolean
|
|
192
|
+
}
|
|
193
|
+
mountElementId?: ""
|
|
194
|
+
mpa?: {
|
|
195
|
+
|
|
196
|
+
}
|
|
197
|
+
nodeModulesTransform?: {
|
|
198
|
+
type?: ("all" | "none")
|
|
199
|
+
exclude?: string[]
|
|
200
|
+
}
|
|
201
|
+
outputPath?: ""
|
|
202
|
+
plugins?: string[]
|
|
203
|
+
postcssLoader?: {
|
|
204
|
+
|
|
205
|
+
}
|
|
206
|
+
presets?: string[]
|
|
207
|
+
proxy?: {
|
|
208
|
+
|
|
209
|
+
}
|
|
210
|
+
publicPath?: string
|
|
211
|
+
runtimePublicPath?: boolean
|
|
212
|
+
ssr?: {
|
|
213
|
+
/**
|
|
214
|
+
* force execing Page getInitialProps functions
|
|
215
|
+
*/
|
|
216
|
+
forceInitial?: boolean
|
|
217
|
+
/**
|
|
218
|
+
* remove window.g_initialProps in html
|
|
219
|
+
*/
|
|
220
|
+
removeWindowInitialProps?: boolean
|
|
221
|
+
/**
|
|
222
|
+
* disable serve-side render in umi dev mode.
|
|
223
|
+
*/
|
|
224
|
+
devServerRender?: boolean
|
|
225
|
+
mode?: ("stream" | "string")
|
|
226
|
+
/**
|
|
227
|
+
* static markup in static site
|
|
228
|
+
*/
|
|
229
|
+
staticMarkup?: boolean
|
|
230
|
+
}
|
|
231
|
+
singular?: boolean
|
|
232
|
+
styleLoader?: {
|
|
233
|
+
|
|
234
|
+
}
|
|
235
|
+
targets?: {
|
|
236
|
+
|
|
237
|
+
}
|
|
238
|
+
terserOptions?: {
|
|
239
|
+
|
|
240
|
+
}
|
|
241
|
+
theme?: {
|
|
242
|
+
|
|
243
|
+
}
|
|
244
|
+
runtimeHistory?: {
|
|
245
|
+
|
|
246
|
+
}
|
|
247
|
+
webpack5?: {
|
|
248
|
+
lazyCompilation?: {
|
|
249
|
+
entries?: boolean
|
|
250
|
+
imports?: boolean
|
|
251
|
+
test?: any
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
workerLoader?: {
|
|
255
|
+
|
|
256
|
+
}
|
|
257
|
+
favicon?: string
|
|
258
|
+
headScripts?: any[]
|
|
259
|
+
links?: any[]
|
|
260
|
+
metas?: any[]
|
|
261
|
+
scripts?: any[]
|
|
262
|
+
styles?: any[]
|
|
263
|
+
title?: string
|
|
264
|
+
mock?: {
|
|
265
|
+
exclude?: string[]
|
|
266
|
+
}
|
|
267
|
+
themeConfig?: {
|
|
268
|
+
|
|
269
|
+
}
|
|
270
|
+
logo?: (string | boolean)
|
|
271
|
+
mode?: any
|
|
272
|
+
description?: string
|
|
273
|
+
locales?: string[][]
|
|
274
|
+
resolve?: {
|
|
275
|
+
|
|
276
|
+
}
|
|
277
|
+
menus?: {
|
|
278
|
+
|
|
279
|
+
}
|
|
280
|
+
navs?: (any[] | {
|
|
281
|
+
|
|
282
|
+
})
|
|
283
|
+
algolia?: {
|
|
284
|
+
appId?: string
|
|
285
|
+
apiKey?: string
|
|
286
|
+
indexName?: string
|
|
287
|
+
debug?: boolean
|
|
288
|
+
}
|
|
289
|
+
sitemap?: {
|
|
290
|
+
hostname?: string
|
|
291
|
+
excludes?: string[]
|
|
292
|
+
}
|
|
293
|
+
apiParser?: {
|
|
294
|
+
|
|
295
|
+
}
|
|
296
|
+
analytics?: {
|
|
297
|
+
|
|
298
|
+
}
|
|
299
|
+
[k: string]: any
|
|
300
|
+
}
|