@lark-apaas/client-toolkit-lite 1.1.1-beta.0 → 1.1.1-beta.1
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/index.cjs +107 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +102 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -34,9 +34,11 @@ __export(index_exports, {
|
|
|
34
34
|
ActiveLink: () => ActiveLink,
|
|
35
35
|
AppContainer: () => AppContainer_default,
|
|
36
36
|
NavLink: () => NavLink2,
|
|
37
|
+
PagePlaceholder: () => PagePlaceholder_default,
|
|
37
38
|
QueryProvider: () => QueryProvider_default,
|
|
38
39
|
TrackKey: () => TrackKey,
|
|
39
40
|
UniversalLink: () => UniversalLink,
|
|
41
|
+
Welcome: () => Welcome_default,
|
|
40
42
|
avatarImages: () => avatar_exports,
|
|
41
43
|
axiosForBackend: () => axiosForBackend,
|
|
42
44
|
bannerImages: () => banner_exports,
|
|
@@ -559,11 +561,11 @@ var messages = {
|
|
|
559
561
|
},
|
|
560
562
|
"safety.cover.pc": {
|
|
561
563
|
zh: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover.png",
|
|
562
|
-
en: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-
|
|
564
|
+
en: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-weben.png"
|
|
563
565
|
},
|
|
564
566
|
"safety.cover.mobile": {
|
|
565
567
|
zh: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-mobile.png",
|
|
566
|
-
en: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-
|
|
568
|
+
en: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-mobileen.png"
|
|
567
569
|
}
|
|
568
570
|
};
|
|
569
571
|
var messages_default = messages;
|
|
@@ -1235,13 +1237,100 @@ var AppContainer = /* @__PURE__ */ __name(({ children }) => {
|
|
|
1235
1237
|
}, "AppContainer");
|
|
1236
1238
|
var AppContainer_default = AppContainer;
|
|
1237
1239
|
|
|
1238
|
-
// src/
|
|
1240
|
+
// src/components/Welcome/index.tsx
|
|
1239
1241
|
var import_react8 = __toESM(require("react"), 1);
|
|
1242
|
+
var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1", description = "\u9875\u9762\u6682\u672A\u5F00\u53D1\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..." }) => {
|
|
1243
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1244
|
+
style: {
|
|
1245
|
+
display: "flex",
|
|
1246
|
+
flexDirection: "column",
|
|
1247
|
+
alignItems: "center",
|
|
1248
|
+
justifyContent: "center",
|
|
1249
|
+
width: "100%",
|
|
1250
|
+
height: "calc(100vh - 64px)",
|
|
1251
|
+
padding: "0 24px",
|
|
1252
|
+
textAlign: "center"
|
|
1253
|
+
}
|
|
1254
|
+
}, /* @__PURE__ */ import_react8.default.createElement("img", {
|
|
1255
|
+
style: {
|
|
1256
|
+
borderRadius: 6,
|
|
1257
|
+
marginBottom: 24
|
|
1258
|
+
},
|
|
1259
|
+
width: "320",
|
|
1260
|
+
height: "200",
|
|
1261
|
+
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/welcome.svg",
|
|
1262
|
+
alt: "Welcome"
|
|
1263
|
+
}), /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1264
|
+
style: {
|
|
1265
|
+
fontSize: 16,
|
|
1266
|
+
fontWeight: 500,
|
|
1267
|
+
lineHeight: "24px",
|
|
1268
|
+
marginBottom: 4,
|
|
1269
|
+
color: "#1f2329"
|
|
1270
|
+
}
|
|
1271
|
+
}, title), /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1272
|
+
style: {
|
|
1273
|
+
fontSize: 16,
|
|
1274
|
+
lineHeight: "24px",
|
|
1275
|
+
color: "#8f959e",
|
|
1276
|
+
maxWidth: 480
|
|
1277
|
+
}
|
|
1278
|
+
}, description));
|
|
1279
|
+
}, "Welcome");
|
|
1280
|
+
var Welcome_default = Welcome;
|
|
1281
|
+
|
|
1282
|
+
// src/components/PagePlaceholder/index.tsx
|
|
1283
|
+
var import_react9 = __toESM(require("react"), 1);
|
|
1284
|
+
var PagePlaceholder = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1", description = "\u9875\u9762\u6682\u672A\u5F00\u53D1\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..." }) => {
|
|
1285
|
+
return /* @__PURE__ */ import_react9.default.createElement("div", {
|
|
1286
|
+
style: {
|
|
1287
|
+
display: "flex",
|
|
1288
|
+
flexDirection: "column",
|
|
1289
|
+
alignItems: "center",
|
|
1290
|
+
justifyContent: "center",
|
|
1291
|
+
padding: "0 24px",
|
|
1292
|
+
width: "100%",
|
|
1293
|
+
height: "calc(100vh - 64px)",
|
|
1294
|
+
textAlign: "center"
|
|
1295
|
+
}
|
|
1296
|
+
}, /* @__PURE__ */ import_react9.default.createElement("img", {
|
|
1297
|
+
style: {
|
|
1298
|
+
borderRadius: "6px",
|
|
1299
|
+
marginBottom: "24px"
|
|
1300
|
+
},
|
|
1301
|
+
width: "320",
|
|
1302
|
+
height: "200",
|
|
1303
|
+
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/welcome.svg",
|
|
1304
|
+
alt: "Welcome"
|
|
1305
|
+
}), /* @__PURE__ */ import_react9.default.createElement("div", {
|
|
1306
|
+
style: {
|
|
1307
|
+
fontSize: "16px",
|
|
1308
|
+
fontWeight: 500,
|
|
1309
|
+
marginBottom: "4px",
|
|
1310
|
+
lineHeight: "24px"
|
|
1311
|
+
}
|
|
1312
|
+
}, title), /* @__PURE__ */ import_react9.default.createElement("div", {
|
|
1313
|
+
style: {
|
|
1314
|
+
color: "#6b7280",
|
|
1315
|
+
fontSize: "16px",
|
|
1316
|
+
lineHeight: "24px",
|
|
1317
|
+
maxWidth: "480px",
|
|
1318
|
+
overflow: "hidden",
|
|
1319
|
+
display: "-webkit-box",
|
|
1320
|
+
WebkitLineClamp: 2,
|
|
1321
|
+
WebkitBoxOrient: "vertical"
|
|
1322
|
+
}
|
|
1323
|
+
}, description));
|
|
1324
|
+
}, "PagePlaceholder");
|
|
1325
|
+
var PagePlaceholder_default = PagePlaceholder;
|
|
1326
|
+
|
|
1327
|
+
// src/route-components/ActiveLink.tsx
|
|
1328
|
+
var import_react10 = __toESM(require("react"), 1);
|
|
1240
1329
|
var import_react_router_dom = require("react-router-dom");
|
|
1241
|
-
var ActiveLink = /* @__PURE__ */ (0,
|
|
1242
|
-
const [currentHash, setCurrentHash] = (0,
|
|
1330
|
+
var ActiveLink = /* @__PURE__ */ (0, import_react10.forwardRef)(({ to, onClick, className, style, children, ...rest }, ref) => {
|
|
1331
|
+
const [currentHash, setCurrentHash] = (0, import_react10.useState)(() => typeof window !== "undefined" ? window.location.hash : "");
|
|
1243
1332
|
const isHashRoute = typeof to === "string" && to.startsWith("#");
|
|
1244
|
-
(0,
|
|
1333
|
+
(0, import_react10.useEffect)(() => {
|
|
1245
1334
|
if (!isHashRoute) return;
|
|
1246
1335
|
const handleHashChange = /* @__PURE__ */ __name(() => {
|
|
1247
1336
|
setCurrentHash(window.location.hash);
|
|
@@ -1253,7 +1342,7 @@ var ActiveLink = /* @__PURE__ */ (0, import_react8.forwardRef)(({ to, onClick, c
|
|
|
1253
1342
|
]);
|
|
1254
1343
|
const isActive = isHashRoute && currentHash === to;
|
|
1255
1344
|
if (!isHashRoute) {
|
|
1256
|
-
return /* @__PURE__ */
|
|
1345
|
+
return /* @__PURE__ */ import_react10.default.createElement(import_react_router_dom.NavLink, {
|
|
1257
1346
|
ref,
|
|
1258
1347
|
to,
|
|
1259
1348
|
onClick,
|
|
@@ -1294,7 +1383,7 @@ var ActiveLink = /* @__PURE__ */ (0, import_react8.forwardRef)(({ to, onClick, c
|
|
|
1294
1383
|
isPending: false,
|
|
1295
1384
|
isTransitioning: false
|
|
1296
1385
|
}) : children;
|
|
1297
|
-
return /* @__PURE__ */
|
|
1386
|
+
return /* @__PURE__ */ import_react10.default.createElement("a", {
|
|
1298
1387
|
ref,
|
|
1299
1388
|
href: to,
|
|
1300
1389
|
onClick: handleHashClick,
|
|
@@ -1306,9 +1395,9 @@ var ActiveLink = /* @__PURE__ */ (0, import_react8.forwardRef)(({ to, onClick, c
|
|
|
1306
1395
|
ActiveLink.displayName = "ActiveLink";
|
|
1307
1396
|
|
|
1308
1397
|
// src/route-components/NavLink.tsx
|
|
1309
|
-
var
|
|
1398
|
+
var React8 = __toESM(require("react"), 1);
|
|
1310
1399
|
var import_react_router_dom2 = require("react-router-dom");
|
|
1311
|
-
var NavLink2 = /* @__PURE__ */
|
|
1400
|
+
var NavLink2 = /* @__PURE__ */ React8.forwardRef(({ to, children, className, style, ...props }, ref) => {
|
|
1312
1401
|
const isHashLink = typeof to === "string" && to.startsWith("#");
|
|
1313
1402
|
const location = (0, import_react_router_dom2.useLocation)();
|
|
1314
1403
|
const navigate = (0, import_react_router_dom2.useNavigate)();
|
|
@@ -1332,7 +1421,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1332
1421
|
const resolvedClassName = typeof className === "function" ? className(renderProps) : className;
|
|
1333
1422
|
const resolvedStyle = typeof style === "function" ? style(renderProps) : style;
|
|
1334
1423
|
const { caseSensitive, end, replace, state, preventScrollReset, relative, viewTransition, ...restProps } = props;
|
|
1335
|
-
return /* @__PURE__ */
|
|
1424
|
+
return /* @__PURE__ */ React8.createElement("a", {
|
|
1336
1425
|
href: to,
|
|
1337
1426
|
onClick: handleClick,
|
|
1338
1427
|
ref,
|
|
@@ -1341,7 +1430,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1341
1430
|
...restProps
|
|
1342
1431
|
}, typeof children === "function" ? children(renderProps) : children);
|
|
1343
1432
|
}
|
|
1344
|
-
return /* @__PURE__ */
|
|
1433
|
+
return /* @__PURE__ */ React8.createElement(import_react_router_dom2.NavLink, {
|
|
1345
1434
|
to,
|
|
1346
1435
|
ref,
|
|
1347
1436
|
className,
|
|
@@ -1356,7 +1445,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1356
1445
|
NavLink2.displayName = "NavLink";
|
|
1357
1446
|
|
|
1358
1447
|
// src/route-components/UniversalLink.tsx
|
|
1359
|
-
var
|
|
1448
|
+
var import_react11 = __toESM(require("react"), 1);
|
|
1360
1449
|
var import_react_router_dom3 = require("react-router-dom");
|
|
1361
1450
|
function isInternalRoute(to) {
|
|
1362
1451
|
return !to.startsWith("#") && !to.startsWith("http://") && !to.startsWith("https://") && !to.startsWith("//");
|
|
@@ -1366,15 +1455,15 @@ function isExternalLink(to) {
|
|
|
1366
1455
|
return to.startsWith("http://") || to.startsWith("https://") || to.startsWith("//");
|
|
1367
1456
|
}
|
|
1368
1457
|
__name(isExternalLink, "isExternalLink");
|
|
1369
|
-
var UniversalLink = /* @__PURE__ */
|
|
1458
|
+
var UniversalLink = /* @__PURE__ */ import_react11.default.forwardRef(/* @__PURE__ */ __name(function UniversalLink2({ to, ...props }, ref) {
|
|
1370
1459
|
if (isInternalRoute(to)) {
|
|
1371
|
-
return /* @__PURE__ */
|
|
1460
|
+
return /* @__PURE__ */ import_react11.default.createElement(import_react_router_dom3.Link, {
|
|
1372
1461
|
to,
|
|
1373
1462
|
ref,
|
|
1374
1463
|
...props
|
|
1375
1464
|
});
|
|
1376
1465
|
}
|
|
1377
|
-
return /* @__PURE__ */
|
|
1466
|
+
return /* @__PURE__ */ import_react11.default.createElement("a", {
|
|
1378
1467
|
href: to,
|
|
1379
1468
|
ref,
|
|
1380
1469
|
...props,
|
|
@@ -1799,9 +1888,11 @@ var abstractArt3dRenderingCoverImg6 = "https://lf3-static.bytednsdoc.com/obj/ede
|
|
|
1799
1888
|
ActiveLink,
|
|
1800
1889
|
AppContainer,
|
|
1801
1890
|
NavLink,
|
|
1891
|
+
PagePlaceholder,
|
|
1802
1892
|
QueryProvider,
|
|
1803
1893
|
TrackKey,
|
|
1804
1894
|
UniversalLink,
|
|
1895
|
+
Welcome,
|
|
1805
1896
|
avatarImages,
|
|
1806
1897
|
axiosForBackend,
|
|
1807
1898
|
bannerImages,
|