@lark-apaas/miaoda-core 0.1.0-alpha.14 → 0.1.0-alpha.15
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/lib/apis/dataloom.d.ts +1 -1
- package/lib/apis/dataloom.js +2 -2
- package/lib/apis/utils/registerChinaMap.js +34 -34
- package/lib/components/AppContainer/IframeBridge.js +62 -96
- package/lib/components/AppContainer/PageHoc.js +1 -1
- package/lib/components/AppContainer/childApi.d.ts +5 -0
- package/lib/components/AppContainer/childApi.js +20 -0
- package/lib/components/ErrorRender/index.js +4 -4
- package/lib/components/NotFoundRender/index.js +3 -3
- package/lib/components/TopNav/BottomNav.js +1 -1
- package/lib/components/TopNav/TitleBar.js +5 -5
- package/lib/components/TopNav/TopNav.js +1 -1
- package/lib/components/User/UserProfile/UserProfileUI.js +4 -4
- package/lib/components/User/UserProfile/utils.js +1 -1
- package/lib/components/User/UserSelect.js +3 -2
- package/lib/components/User/UserWithAvatar.js +1 -1
- package/lib/components/Welcome/index.js +3 -3
- package/lib/components/common/LogoInfo.js +1 -1
- package/lib/components/common/NavItem.js +1 -1
- package/lib/components/common/UserAvatarMenu.js +1 -1
- package/lib/components/theme/constants.js +3 -3
- package/lib/components/theme/util.js +2 -2
- package/lib/hooks/useAppInfo.js +4 -3
- package/lib/hooks/useCurrentUserProfile.js +5 -2
- package/lib/hooks/useLogout.js +7 -5
- package/lib/hooks/useTheme.js +1 -1
- package/lib/integrations/dataloom.d.ts +2 -1
- package/lib/integrations/dataloom.js +11 -6
- package/lib/integrations/generateImage.js +2 -1
- package/lib/integrations/generateTextStream.d.ts +0 -5
- package/lib/integrations/generateTextStream.js +6 -5
- package/lib/integrations/getAppInfo.d.ts +1 -1
- package/lib/integrations/getAppInfo.js +12 -2
- package/lib/types/common.d.ts +0 -7
- package/lib/types/iframe-events.d.ts +9 -1
- package/lib/types/index.d.ts +2 -0
- package/lib/utils/copyToClipboard.js +2 -2
- package/lib/utils/getAppId.d.ts +0 -5
- package/lib/utils/getInitialInfo.d.ts +20 -0
- package/lib/utils/getInitialInfo.js +32 -0
- package/lib/utils/getParentOrigin.js +2 -2
- package/lib/utils/getUserProfile.js +2 -1
- package/lib/utils/utils.d.ts +2 -0
- package/lib/utils/utils.js +4 -1
- package/package.json +21 -19
package/lib/apis/dataloom.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export {
|
1
|
+
export { getDataloom } from '../integrations/dataloom';
|
package/lib/apis/dataloom.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export {
|
1
|
+
import { getDataloom } from "../integrations/dataloom.js";
|
2
|
+
export { getDataloom };
|
@@ -6,7 +6,7 @@ const chinaGeoJson = {
|
|
6
6
|
type: 'Feature',
|
7
7
|
properties: {
|
8
8
|
adcode: 110000,
|
9
|
-
name:
|
9
|
+
name: "\u5317\u4EAC\u5E02",
|
10
10
|
center: [
|
11
11
|
116.405285,
|
12
12
|
39.904989
|
@@ -1011,7 +1011,7 @@ const chinaGeoJson = {
|
|
1011
1011
|
type: 'Feature',
|
1012
1012
|
properties: {
|
1013
1013
|
adcode: 120000,
|
1014
|
-
name:
|
1014
|
+
name: "\u5929\u6D25\u5E02",
|
1015
1015
|
center: [
|
1016
1016
|
117.190182,
|
1017
1017
|
39.125596
|
@@ -2064,7 +2064,7 @@ const chinaGeoJson = {
|
|
2064
2064
|
type: 'Feature',
|
2065
2065
|
properties: {
|
2066
2066
|
adcode: 130000,
|
2067
|
-
name:
|
2067
|
+
name: "\u6CB3\u5317\u7701",
|
2068
2068
|
center: [
|
2069
2069
|
114.502461,
|
2070
2070
|
38.045474
|
@@ -6653,7 +6653,7 @@ const chinaGeoJson = {
|
|
6653
6653
|
type: 'Feature',
|
6654
6654
|
properties: {
|
6655
6655
|
adcode: 140000,
|
6656
|
-
name:
|
6656
|
+
name: "\u5C71\u897F\u7701",
|
6657
6657
|
center: [
|
6658
6658
|
112.549248,
|
6659
6659
|
37.857014
|
@@ -8558,7 +8558,7 @@ const chinaGeoJson = {
|
|
8558
8558
|
type: 'Feature',
|
8559
8559
|
properties: {
|
8560
8560
|
adcode: 150000,
|
8561
|
-
name:
|
8561
|
+
name: "\u5185\u8499\u53E4\u81EA\u6CBB\u533A",
|
8562
8562
|
center: [
|
8563
8563
|
111.670801,
|
8564
8564
|
40.818311
|
@@ -16241,7 +16241,7 @@ const chinaGeoJson = {
|
|
16241
16241
|
type: 'Feature',
|
16242
16242
|
properties: {
|
16243
16243
|
adcode: 210000,
|
16244
|
-
name:
|
16244
|
+
name: "\u8FBD\u5B81\u7701",
|
16245
16245
|
center: [
|
16246
16246
|
123.429096,
|
16247
16247
|
41.796767
|
@@ -19370,7 +19370,7 @@ const chinaGeoJson = {
|
|
19370
19370
|
type: 'Feature',
|
19371
19371
|
properties: {
|
19372
19372
|
adcode: 220000,
|
19373
|
-
name:
|
19373
|
+
name: "\u5409\u6797\u7701",
|
19374
19374
|
center: [
|
19375
19375
|
125.3245,
|
19376
19376
|
43.886841
|
@@ -22867,7 +22867,7 @@ const chinaGeoJson = {
|
|
22867
22867
|
type: 'Feature',
|
22868
22868
|
properties: {
|
22869
22869
|
adcode: 230000,
|
22870
|
-
name:
|
22870
|
+
name: "\u9ED1\u9F99\u6C5F\u7701",
|
22871
22871
|
center: [
|
22872
22872
|
126.642464,
|
22873
22873
|
45.756967
|
@@ -28240,7 +28240,7 @@ const chinaGeoJson = {
|
|
28240
28240
|
type: 'Feature',
|
28241
28241
|
properties: {
|
28242
28242
|
adcode: 310000,
|
28243
|
-
name:
|
28243
|
+
name: "\u4E0A\u6D77\u5E02",
|
28244
28244
|
center: [
|
28245
28245
|
121.472644,
|
28246
28246
|
31.231706
|
@@ -28769,7 +28769,7 @@ const chinaGeoJson = {
|
|
28769
28769
|
type: 'Feature',
|
28770
28770
|
properties: {
|
28771
28771
|
adcode: 320000,
|
28772
|
-
name:
|
28772
|
+
name: "\u6C5F\u82CF\u7701",
|
28773
28773
|
center: [
|
28774
28774
|
118.767413,
|
28775
28775
|
32.041544
|
@@ -30594,7 +30594,7 @@ const chinaGeoJson = {
|
|
30594
30594
|
type: 'Feature',
|
30595
30595
|
properties: {
|
30596
30596
|
adcode: 330000,
|
30597
|
-
name:
|
30597
|
+
name: "\u6D59\u6C5F\u7701",
|
30598
30598
|
center: [
|
30599
30599
|
120.153576,
|
30600
30600
|
30.287459
|
@@ -33439,7 +33439,7 @@ const chinaGeoJson = {
|
|
33439
33439
|
type: 'Feature',
|
33440
33440
|
properties: {
|
33441
33441
|
adcode: 340000,
|
33442
|
-
name:
|
33442
|
+
name: "\u5B89\u5FBD\u7701",
|
33443
33443
|
center: [
|
33444
33444
|
117.283042,
|
33445
33445
|
31.86119
|
@@ -35876,7 +35876,7 @@ const chinaGeoJson = {
|
|
35876
35876
|
type: 'Feature',
|
35877
35877
|
properties: {
|
35878
35878
|
adcode: 350000,
|
35879
|
-
name:
|
35879
|
+
name: "\u798F\u5EFA\u7701",
|
35880
35880
|
center: [
|
35881
35881
|
119.306239,
|
35882
35882
|
26.075302
|
@@ -38501,7 +38501,7 @@ const chinaGeoJson = {
|
|
38501
38501
|
type: 'Feature',
|
38502
38502
|
properties: {
|
38503
38503
|
adcode: 360000,
|
38504
|
-
name:
|
38504
|
+
name: "\u6C5F\u897F\u7701",
|
38505
38505
|
center: [
|
38506
38506
|
115.892151,
|
38507
38507
|
28.676493
|
@@ -40654,7 +40654,7 @@ const chinaGeoJson = {
|
|
40654
40654
|
type: 'Feature',
|
40655
40655
|
properties: {
|
40656
40656
|
adcode: 370000,
|
40657
|
-
name:
|
40657
|
+
name: "\u5C71\u4E1C\u7701",
|
40658
40658
|
center: [
|
40659
40659
|
117.000923,
|
40660
40660
|
36.675807
|
@@ -43351,7 +43351,7 @@ const chinaGeoJson = {
|
|
43351
43351
|
type: 'Feature',
|
43352
43352
|
properties: {
|
43353
43353
|
adcode: 410000,
|
43354
|
-
name:
|
43354
|
+
name: "\u6CB3\u5357\u7701",
|
43355
43355
|
center: [
|
43356
43356
|
113.665412,
|
43357
43357
|
34.757975
|
@@ -45848,7 +45848,7 @@ const chinaGeoJson = {
|
|
45848
45848
|
type: 'Feature',
|
45849
45849
|
properties: {
|
45850
45850
|
adcode: 420000,
|
45851
|
-
name:
|
45851
|
+
name: "\u6E56\u5317\u7701",
|
45852
45852
|
center: [
|
45853
45853
|
114.298572,
|
45854
45854
|
30.584355
|
@@ -48589,7 +48589,7 @@ const chinaGeoJson = {
|
|
48589
48589
|
type: 'Feature',
|
48590
48590
|
properties: {
|
48591
48591
|
adcode: 430000,
|
48592
|
-
name:
|
48592
|
+
name: "\u6E56\u5357\u7701",
|
48593
48593
|
center: [
|
48594
48594
|
112.982279,
|
48595
48595
|
28.19409
|
@@ -51138,7 +51138,7 @@ const chinaGeoJson = {
|
|
51138
51138
|
type: 'Feature',
|
51139
51139
|
properties: {
|
51140
51140
|
adcode: 440000,
|
51141
|
-
name:
|
51141
|
+
name: "\u5E7F\u4E1C\u7701",
|
51142
51142
|
center: [
|
51143
51143
|
113.280637,
|
51144
51144
|
23.125178
|
@@ -54463,7 +54463,7 @@ const chinaGeoJson = {
|
|
54463
54463
|
type: 'Feature',
|
54464
54464
|
properties: {
|
54465
54465
|
adcode: 450000,
|
54466
|
-
name:
|
54466
|
+
name: "\u5E7F\u897F\u58EE\u65CF\u81EA\u6CBB\u533A",
|
54467
54467
|
center: [
|
54468
54468
|
108.320004,
|
54469
54469
|
22.82402
|
@@ -57300,7 +57300,7 @@ const chinaGeoJson = {
|
|
57300
57300
|
type: 'Feature',
|
57301
57301
|
properties: {
|
57302
57302
|
adcode: 460000,
|
57303
|
-
name:
|
57303
|
+
name: "\u6D77\u5357\u7701",
|
57304
57304
|
center: [
|
57305
57305
|
110.33119,
|
57306
57306
|
20.031971
|
@@ -61253,7 +61253,7 @@ const chinaGeoJson = {
|
|
61253
61253
|
type: 'Feature',
|
61254
61254
|
properties: {
|
61255
61255
|
adcode: 500000,
|
61256
|
-
name:
|
61256
|
+
name: "\u91CD\u5E86\u5E02",
|
61257
61257
|
center: [
|
61258
61258
|
106.504962,
|
61259
61259
|
29.533155
|
@@ -63662,7 +63662,7 @@ const chinaGeoJson = {
|
|
63662
63662
|
type: 'Feature',
|
63663
63663
|
properties: {
|
63664
63664
|
adcode: 510000,
|
63665
|
-
name:
|
63665
|
+
name: "\u56DB\u5DDD\u7701",
|
63666
63666
|
center: [
|
63667
63667
|
104.065735,
|
63668
63668
|
30.659462
|
@@ -68455,7 +68455,7 @@ const chinaGeoJson = {
|
|
68455
68455
|
type: 'Feature',
|
68456
68456
|
properties: {
|
68457
68457
|
adcode: 520000,
|
68458
|
-
name:
|
68458
|
+
name: "\u8D35\u5DDE\u7701",
|
68459
68459
|
center: [
|
68460
68460
|
106.713478,
|
68461
68461
|
26.578343
|
@@ -71152,7 +71152,7 @@ const chinaGeoJson = {
|
|
71152
71152
|
type: 'Feature',
|
71153
71153
|
properties: {
|
71154
71154
|
adcode: 530000,
|
71155
|
-
name:
|
71155
|
+
name: "\u4E91\u5357\u7701",
|
71156
71156
|
center: [
|
71157
71157
|
102.712251,
|
71158
71158
|
25.040609
|
@@ -75397,7 +75397,7 @@ const chinaGeoJson = {
|
|
75397
75397
|
type: 'Feature',
|
75398
75398
|
properties: {
|
75399
75399
|
adcode: 540000,
|
75400
|
-
name:
|
75400
|
+
name: "\u897F\u85CF\u81EA\u6CBB\u533A",
|
75401
75401
|
center: [
|
75402
75402
|
91.132212,
|
75403
75403
|
29.660361
|
@@ -80934,7 +80934,7 @@ const chinaGeoJson = {
|
|
80934
80934
|
type: 'Feature',
|
80935
80935
|
properties: {
|
80936
80936
|
adcode: 610000,
|
80937
|
-
name:
|
80937
|
+
name: "\u9655\u897F\u7701",
|
80938
80938
|
center: [
|
80939
80939
|
108.948024,
|
80940
80940
|
34.263161
|
@@ -83983,7 +83983,7 @@ const chinaGeoJson = {
|
|
83983
83983
|
type: 'Feature',
|
83984
83984
|
properties: {
|
83985
83985
|
adcode: 620000,
|
83986
|
-
name:
|
83986
|
+
name: "\u7518\u8083\u7701",
|
83987
83987
|
center: [
|
83988
83988
|
103.823557,
|
83989
83989
|
36.058039
|
@@ -89176,7 +89176,7 @@ const chinaGeoJson = {
|
|
89176
89176
|
type: 'Feature',
|
89177
89177
|
properties: {
|
89178
89178
|
adcode: 630000,
|
89179
|
-
name:
|
89179
|
+
name: "\u9752\u6D77\u7701",
|
89180
89180
|
center: [
|
89181
89181
|
101.778916,
|
89182
89182
|
36.623178
|
@@ -93665,7 +93665,7 @@ const chinaGeoJson = {
|
|
93665
93665
|
type: 'Feature',
|
93666
93666
|
properties: {
|
93667
93667
|
adcode: 640000,
|
93668
|
-
name:
|
93668
|
+
name: "\u5B81\u590F\u56DE\u65CF\u81EA\u6CBB\u533A",
|
93669
93669
|
center: [
|
93670
93670
|
106.278179,
|
93671
93671
|
38.46637
|
@@ -95162,7 +95162,7 @@ const chinaGeoJson = {
|
|
95162
95162
|
type: 'Feature',
|
95163
95163
|
properties: {
|
95164
95164
|
adcode: 650000,
|
95165
|
-
name:
|
95165
|
+
name: "\u65B0\u7586\u7EF4\u543E\u5C14\u81EA\u6CBB\u533A",
|
95166
95166
|
center: [
|
95167
95167
|
87.617733,
|
95168
95168
|
43.792818
|
@@ -100731,7 +100731,7 @@ const chinaGeoJson = {
|
|
100731
100731
|
type: 'Feature',
|
100732
100732
|
properties: {
|
100733
100733
|
adcode: 710000,
|
100734
|
-
name:
|
100734
|
+
name: "\u53F0\u6E7E\u7701",
|
100735
100735
|
center: [
|
100736
100736
|
121.509062,
|
100737
100737
|
25.044332
|
@@ -101512,7 +101512,7 @@ const chinaGeoJson = {
|
|
101512
101512
|
type: 'Feature',
|
101513
101513
|
properties: {
|
101514
101514
|
adcode: 810000,
|
101515
|
-
name:
|
101515
|
+
name: "\u9999\u6E2F\u7279\u522B\u884C\u653F\u533A",
|
101516
101516
|
center: [
|
101517
101517
|
114.173355,
|
101518
101518
|
22.320048
|
@@ -102013,7 +102013,7 @@ const chinaGeoJson = {
|
|
102013
102013
|
type: 'Feature',
|
102014
102014
|
properties: {
|
102015
102015
|
adcode: 820000,
|
102016
|
-
name:
|
102016
|
+
name: "\u6FB3\u95E8\u7279\u522B\u884C\u653F\u533A",
|
102017
102017
|
center: [
|
102018
102018
|
113.54909,
|
102019
102019
|
22.198951
|
@@ -1,102 +1,68 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import {
|
1
|
+
import "react/jsx-runtime";
|
2
|
+
import "react";
|
3
|
+
import "react-router-dom";
|
4
|
+
import { connectToParent } from "penpal";
|
5
|
+
import "../../hooks/useUpdatingRef.js";
|
6
|
+
import { postMessage } from "../../utils/postMessage.js";
|
7
|
+
import { getPreviewParentOrigin } from "../../utils/getParentOrigin.js";
|
8
|
+
import { childApi } from "./childApi.js";
|
7
9
|
import "./LogInterceptor.js";
|
8
|
-
var
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
}
|
17
|
-
function
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
isActive.current = true;
|
25
|
-
}, [
|
26
|
-
navigateRef
|
27
|
-
]);
|
28
|
-
const historyForward = useCallback(()=>{
|
29
|
-
navigateRef.current(1);
|
30
|
-
isActive.current = true;
|
31
|
-
}, [
|
32
|
-
navigateRef
|
33
|
-
]);
|
34
|
-
const operatorMessage = useMemo(()=>({
|
35
|
-
["RouteBack"]: historyBack,
|
36
|
-
["RouteForward"]: historyForward,
|
37
|
-
["RouteChange"]: navigateRef.current
|
38
|
-
}), [
|
39
|
-
historyBack,
|
40
|
-
historyForward,
|
41
|
-
navigateRef
|
42
|
-
]);
|
43
|
-
useEffect(()=>{
|
44
|
-
postMessage({
|
45
|
-
type: 'PreviewReady',
|
46
|
-
data: {}
|
47
|
-
});
|
48
|
-
}, []);
|
49
|
-
useEffect(()=>{
|
50
|
-
if (isActive.current) {
|
51
|
-
isActive.current = false;
|
52
|
-
return;
|
10
|
+
var __webpack_modules__ = {
|
11
|
+
"./src/components/AppContainer/IframeBridge.tsx": function(module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
12
|
+
module = __webpack_require__.hmd(module);
|
13
|
+
var IframeBridge_RouteMessageType = /*#__PURE__*/ function(RouteMessageType) {
|
14
|
+
RouteMessageType["RouteChange"] = "RouteChange";
|
15
|
+
RouteMessageType["RouteBack"] = "RouteBack";
|
16
|
+
RouteMessageType["RouteForward"] = "RouteForward";
|
17
|
+
return RouteMessageType;
|
18
|
+
}(IframeBridge_RouteMessageType || {});
|
19
|
+
function listenHot() {
|
20
|
+
if (module.hot) module.hot.addStatusHandler((status)=>{
|
21
|
+
if ("apply" === status) postMessage({
|
22
|
+
type: 'Hmr',
|
23
|
+
data: {}
|
24
|
+
});
|
25
|
+
});
|
53
26
|
}
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
const handleGetRoutes = useUpdatingRef(async ()=>{
|
62
|
-
let routes = [
|
63
|
-
{
|
64
|
-
path: '/'
|
65
|
-
}
|
66
|
-
];
|
67
|
-
try {
|
68
|
-
const basePath = normalizeBasePath(process.env.CLIENT_BASE_PATH);
|
69
|
-
const res = await fetch(`${basePath}/routes.json`);
|
70
|
-
routes = await res.json();
|
71
|
-
} catch (error) {
|
72
|
-
console.warn('get routes.json error', error);
|
27
|
+
async function connectParent() {
|
28
|
+
connectToParent({
|
29
|
+
parentOrigin: getPreviewParentOrigin(),
|
30
|
+
methods: {
|
31
|
+
...childApi
|
32
|
+
}
|
33
|
+
});
|
73
34
|
}
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
routes
|
78
|
-
}
|
79
|
-
});
|
80
|
-
});
|
81
|
-
const handleMessage = useCallback((event)=>{
|
82
|
-
const { data } = event;
|
83
|
-
if (isRouteMessageType(data?.type)) operatorMessage[data?.type](data?.data);
|
84
|
-
else if (isIncomingMessage(data, 'GetRoutes')) handleGetRoutes.current();
|
85
|
-
}, [
|
86
|
-
operatorMessage
|
87
|
-
]);
|
88
|
-
useEffect(()=>{
|
89
|
-
window.addEventListener('message', handleMessage);
|
90
|
-
return ()=>{
|
91
|
-
window.removeEventListener('message', handleMessage);
|
92
|
-
};
|
93
|
-
}, [
|
94
|
-
handleMessage
|
95
|
-
]);
|
96
|
-
return /*#__PURE__*/ jsx("div", {
|
97
|
-
style: {
|
98
|
-
display: 'none'
|
35
|
+
if ('production' !== process.env.NODE_ENV) {
|
36
|
+
listenHot();
|
37
|
+
connectParent();
|
99
38
|
}
|
100
|
-
}
|
39
|
+
}
|
40
|
+
};
|
41
|
+
var __webpack_module_cache__ = {};
|
42
|
+
function __webpack_require__(moduleId) {
|
43
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
44
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
45
|
+
var module = __webpack_module_cache__[moduleId] = {
|
46
|
+
id: moduleId,
|
47
|
+
loaded: false,
|
48
|
+
exports: {}
|
49
|
+
};
|
50
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
51
|
+
module.loaded = true;
|
52
|
+
return module.exports;
|
101
53
|
}
|
54
|
+
(()=>{
|
55
|
+
__webpack_require__.hmd = (module)=>{
|
56
|
+
module = Object.create(module);
|
57
|
+
if (!module.children) module.children = [];
|
58
|
+
Object.defineProperty(module, 'exports', {
|
59
|
+
enumerable: true,
|
60
|
+
set: ()=>{
|
61
|
+
throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
|
62
|
+
}
|
63
|
+
});
|
64
|
+
return module;
|
65
|
+
};
|
66
|
+
})();
|
67
|
+
__webpack_require__("./src/components/AppContainer/IframeBridge.tsx");
|
102
68
|
export { IframeBridge as default };
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { normalizeBasePath } from "../../utils/utils.js";
|
2
|
+
async function getRoutes() {
|
3
|
+
let routes = [
|
4
|
+
{
|
5
|
+
path: '/'
|
6
|
+
}
|
7
|
+
];
|
8
|
+
try {
|
9
|
+
const basePath = normalizeBasePath(process.env.CLIENT_BASE_PATH);
|
10
|
+
const res = await fetch(`${basePath}/routes.json`);
|
11
|
+
routes = await res.json();
|
12
|
+
} catch (error) {
|
13
|
+
console.warn('get routes.json error', error);
|
14
|
+
}
|
15
|
+
return routes;
|
16
|
+
}
|
17
|
+
const childApi = {
|
18
|
+
getRoutes
|
19
|
+
};
|
20
|
+
export { childApi };
|
@@ -50,11 +50,11 @@ const RenderError = (props)=>{
|
|
50
50
|
}),
|
51
51
|
/*#__PURE__*/ jsx("p", {
|
52
52
|
className: "text-l/[22px] text-[#1F2329] font-medium mb-2",
|
53
|
-
children: "
|
53
|
+
children: "\u54CE\u5440\uFF0C\u5199\u9519\u4EE3\u7801\u4E86"
|
54
54
|
}),
|
55
55
|
/*#__PURE__*/ jsx("p", {
|
56
56
|
className: "text-sm/[22px] text-[#646A73] font-normal mb-2",
|
57
|
-
children: "
|
57
|
+
children: "\u53EF\u590D\u5236\u9519\u8BEF\u4FE1\u606F\uFF0C\u6216\u544A\u8BC9\u5999\u642D\u8FDB\u884C\u4FEE\u590D"
|
58
58
|
}),
|
59
59
|
/*#__PURE__*/ jsxs("div", {
|
60
60
|
className: "flex space-x-4",
|
@@ -62,12 +62,12 @@ const RenderError = (props)=>{
|
|
62
62
|
/*#__PURE__*/ jsx(Button, {
|
63
63
|
className: "bg-white text-gray-600 font-[400] border rounded-[6px] shadow-xs hover:bg-gray-100 active:bg-gray-200 focus:outline-hidden h-[32px] border-[#D0D3D6]",
|
64
64
|
onClick: onClickCopy,
|
65
|
-
children: "
|
65
|
+
children: "\u590D\u5236\u9519\u8BEF\u4FE1\u606F"
|
66
66
|
}),
|
67
67
|
/*#__PURE__*/ jsx(Button, {
|
68
68
|
className: "h-[32px] text-sm font-medium text-white bg-blue-600 border border-transparent rounded-[6px] shadow-xs hover:bg-blue-600 active:bg-blue-700 focus:outline-hidden ",
|
69
69
|
onClick: onClickRepair,
|
70
|
-
children: "
|
70
|
+
children: "\u544A\u8BC9\u5999\u642D\u4FEE\u590D"
|
71
71
|
})
|
72
72
|
]
|
73
73
|
})
|
@@ -30,13 +30,13 @@ const NotFound = ()=>{
|
|
30
30
|
}),
|
31
31
|
/*#__PURE__*/ jsx("p", {
|
32
32
|
className: "text-l/[22px] text-[14px] text-[#1F2329] font-medium",
|
33
|
-
children: 'production' !== process.env.NODE_ENV ?
|
33
|
+
children: 'production' !== process.env.NODE_ENV ? "\u54CE\u5440\uFF0C\u8FD9\u4E2A\u9875\u9762\u5C1A\u672A\u751F\u6210" : '404'
|
34
34
|
}),
|
35
35
|
'production' !== process.env.NODE_ENV ? /*#__PURE__*/ jsxs(Fragment, {
|
36
36
|
children: [
|
37
37
|
/*#__PURE__*/ jsx("p", {
|
38
38
|
className: "text-sm/[22px] text-[14px] text-[#646A73] font-normal mt-1",
|
39
|
-
children: "
|
39
|
+
children: "\u6233\u4E0B\u65B9\u6309\u94AE\uFF0C\u6211\u53EF\u4EE5\u6839\u636E\u4E0A\u4E0B\u6587\u5E2E\u4F60\u751F\u6210\u4E00\u4E2A"
|
40
40
|
}),
|
41
41
|
/*#__PURE__*/ jsxs("button", {
|
42
42
|
className: "h-[32px] text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md shadow-xs hover:bg-blue-600 active:bg-blue-700 focus:outline-hidden focus:ring-2 focus:ring-blue-500 px-3 flex flex-row items-center mt-3",
|
@@ -47,7 +47,7 @@ const NotFound = ()=>{
|
|
47
47
|
alt: "Icon",
|
48
48
|
className: "w-[14px] h-[14px] mr-1"
|
49
49
|
}),
|
50
|
-
"
|
50
|
+
"\u544A\u8BC9\u5999\u642D\u751F\u6210\u4E00\u4E2A"
|
51
51
|
]
|
52
52
|
})
|
53
53
|
]
|
@@ -68,7 +68,7 @@ function BottomNav({ navList = [], className, maxBottomItems = 6 }) {
|
|
68
68
|
hasMoreItems ? /*#__PURE__*/ jsx(MoreNavItem, {
|
69
69
|
direction: "vertical",
|
70
70
|
className: "text-xs",
|
71
|
-
name: "
|
71
|
+
name: "\u66F4\u591A",
|
72
72
|
onClick: toggleExpanded,
|
73
73
|
isExpanded: isExpanded,
|
74
74
|
expandedNavItemsPath: expandedNavItemsPath
|
@@ -2,7 +2,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useState } from "react";
|
3
3
|
import { Link, matchPath, useLocation } from "react-router-dom";
|
4
4
|
import { LogOut, MoreHorizontal, X } from "lucide-react";
|
5
|
-
import { clsxWithTw } from "../../utils/utils.js";
|
5
|
+
import { clsxWithTw, isSanboxMode } from "../../utils/utils.js";
|
6
6
|
import { useAppInfo, useCurrentUserProfile, useLogout } from "../../hooks/index.js";
|
7
7
|
import { DropdownThemeClass, MaskThemeClass, TopHeaderThemeClass } from "../common/index.js";
|
8
8
|
const TitleBar = ({ navList, className })=>{
|
@@ -67,7 +67,7 @@ const TitleBar = ({ navList, className })=>{
|
|
67
67
|
}) : null,
|
68
68
|
/*#__PURE__*/ jsx("span", {
|
69
69
|
className: "text-xl text-center font-medium w-full text-ellipsis overflow-hidden whitespace-nowrap ",
|
70
|
-
children: appName ||
|
70
|
+
children: appName || "\u65B0\u5E94\u7528"
|
71
71
|
}),
|
72
72
|
/*#__PURE__*/ jsx("div", {
|
73
73
|
className: "text-center justify-center text-token-text-title font-medium leading-relaxed"
|
@@ -80,7 +80,7 @@ const TitleBar = ({ navList, className })=>{
|
|
80
80
|
className: "flex items-center justify-between border-gray-200 border-t py-4 ",
|
81
81
|
children: [
|
82
82
|
/*#__PURE__*/ jsx("div", {
|
83
|
-
children: "
|
83
|
+
children: "\u5F53\u524D\u7528\u6237"
|
84
84
|
}),
|
85
85
|
/*#__PURE__*/ jsxs("div", {
|
86
86
|
className: "flex items-center",
|
@@ -91,7 +91,7 @@ const TitleBar = ({ navList, className })=>{
|
|
91
91
|
}),
|
92
92
|
/*#__PURE__*/ jsx("img", {
|
93
93
|
onClick: ()=>{
|
94
|
-
if (
|
94
|
+
if (isSanboxMode()) location.href = '/suda/user?brand=1';
|
95
95
|
},
|
96
96
|
src: userAvatar,
|
97
97
|
alt: "avatar",
|
@@ -109,7 +109,7 @@ const TitleBar = ({ navList, className })=>{
|
|
109
109
|
},
|
110
110
|
children: [
|
111
111
|
/*#__PURE__*/ jsx("div", {
|
112
|
-
children: "
|
112
|
+
children: "\u9000\u51FA\u767B\u5F55"
|
113
113
|
}),
|
114
114
|
/*#__PURE__*/ jsx("div", {
|
115
115
|
className: "flex items-center",
|
@@ -34,7 +34,7 @@ function TopNav({ navList = [], align = 'left', className, activeClassName }) {
|
|
34
34
|
/*#__PURE__*/ jsx("span", {
|
35
35
|
className: "max-w-[240px] font-medium w-full truncate",
|
36
36
|
title: appName,
|
37
|
-
children: appName ||
|
37
|
+
children: appName || "\u65B0\u5E94\u7528"
|
38
38
|
})
|
39
39
|
]
|
40
40
|
})
|
@@ -41,7 +41,7 @@ function UserProfileUI({ user }) {
|
|
41
41
|
style: {
|
42
42
|
marginRight: 0
|
43
43
|
},
|
44
|
-
children: "
|
44
|
+
children: "\u6682\u505C\u4F7F\u7528"
|
45
45
|
})
|
46
46
|
]
|
47
47
|
}),
|
@@ -65,7 +65,7 @@ function UserProfileUI({ user }) {
|
|
65
65
|
href: getChatAppLink(user.feishu_open_id),
|
66
66
|
target: "_blank",
|
67
67
|
rel: "noopener noreferrer",
|
68
|
-
children: "
|
68
|
+
children: "\u6D88\u606F"
|
69
69
|
})
|
70
70
|
}) : null
|
71
71
|
]
|
@@ -78,7 +78,7 @@ function UserProfileUI({ user }) {
|
|
78
78
|
children: [
|
79
79
|
/*#__PURE__*/ jsx("span", {
|
80
80
|
className: "text-sm text-[#646A73] min-w-[74px]",
|
81
|
-
children: "
|
81
|
+
children: "\u90E8\u95E8"
|
82
82
|
}),
|
83
83
|
/*#__PURE__*/ jsx("span", {
|
84
84
|
className: clsxWithTw('text-sm text-[#1F2329] flex-1 break-all', {
|
@@ -93,7 +93,7 @@ function UserProfileUI({ user }) {
|
|
93
93
|
children: [
|
94
94
|
/*#__PURE__*/ jsx("span", {
|
95
95
|
className: "text-sm text-[#646A73] min-w-[74px]",
|
96
|
-
children: "
|
96
|
+
children: "\u90AE\u7BB1"
|
97
97
|
}),
|
98
98
|
user.email ? /*#__PURE__*/ jsx("a", {
|
99
99
|
href: `mailto:${user.email}`,
|