@lark-apaas/client-toolkit-lite 1.1.2 → 1.1.3
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 +58 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +54 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -37,6 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
QueryProvider: () => QueryProvider_default,
|
|
38
38
|
TrackKey: () => TrackKey,
|
|
39
39
|
UniversalLink: () => UniversalLink,
|
|
40
|
+
Welcome: () => Welcome_default,
|
|
40
41
|
avatarImages: () => avatar_exports,
|
|
41
42
|
axiosForBackend: () => axiosForBackend,
|
|
42
43
|
bannerImages: () => banner_exports,
|
|
@@ -1235,13 +1236,55 @@ var AppContainer = /* @__PURE__ */ __name(({ children }) => {
|
|
|
1235
1236
|
}, "AppContainer");
|
|
1236
1237
|
var AppContainer_default = AppContainer;
|
|
1237
1238
|
|
|
1238
|
-
// src/
|
|
1239
|
+
// src/components/Welcome/index.tsx
|
|
1239
1240
|
var import_react8 = __toESM(require("react"), 1);
|
|
1241
|
+
var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1", description = "\u9875\u9762\u6682\u672A\u5F00\u53D1\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..." }) => {
|
|
1242
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1243
|
+
style: {
|
|
1244
|
+
display: "flex",
|
|
1245
|
+
flexDirection: "column",
|
|
1246
|
+
alignItems: "center",
|
|
1247
|
+
justifyContent: "center",
|
|
1248
|
+
width: "100%",
|
|
1249
|
+
height: "calc(100vh - 64px)",
|
|
1250
|
+
padding: "0 24px",
|
|
1251
|
+
textAlign: "center"
|
|
1252
|
+
}
|
|
1253
|
+
}, /* @__PURE__ */ import_react8.default.createElement("img", {
|
|
1254
|
+
style: {
|
|
1255
|
+
borderRadius: 6,
|
|
1256
|
+
marginBottom: 24
|
|
1257
|
+
},
|
|
1258
|
+
width: "320",
|
|
1259
|
+
height: "200",
|
|
1260
|
+
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/welcome.svg",
|
|
1261
|
+
alt: "Welcome"
|
|
1262
|
+
}), /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1263
|
+
style: {
|
|
1264
|
+
fontSize: 16,
|
|
1265
|
+
fontWeight: 500,
|
|
1266
|
+
lineHeight: "24px",
|
|
1267
|
+
marginBottom: 4,
|
|
1268
|
+
color: "#1f2329"
|
|
1269
|
+
}
|
|
1270
|
+
}, title), /* @__PURE__ */ import_react8.default.createElement("div", {
|
|
1271
|
+
style: {
|
|
1272
|
+
fontSize: 16,
|
|
1273
|
+
lineHeight: "24px",
|
|
1274
|
+
color: "#8f959e",
|
|
1275
|
+
maxWidth: 480
|
|
1276
|
+
}
|
|
1277
|
+
}, description));
|
|
1278
|
+
}, "Welcome");
|
|
1279
|
+
var Welcome_default = Welcome;
|
|
1280
|
+
|
|
1281
|
+
// src/route-components/ActiveLink.tsx
|
|
1282
|
+
var import_react9 = __toESM(require("react"), 1);
|
|
1240
1283
|
var import_react_router_dom = require("react-router-dom");
|
|
1241
|
-
var ActiveLink = /* @__PURE__ */ (0,
|
|
1242
|
-
const [currentHash, setCurrentHash] = (0,
|
|
1284
|
+
var ActiveLink = /* @__PURE__ */ (0, import_react9.forwardRef)(({ to, onClick, className, style, children, ...rest }, ref) => {
|
|
1285
|
+
const [currentHash, setCurrentHash] = (0, import_react9.useState)(() => typeof window !== "undefined" ? window.location.hash : "");
|
|
1243
1286
|
const isHashRoute = typeof to === "string" && to.startsWith("#");
|
|
1244
|
-
(0,
|
|
1287
|
+
(0, import_react9.useEffect)(() => {
|
|
1245
1288
|
if (!isHashRoute) return;
|
|
1246
1289
|
const handleHashChange = /* @__PURE__ */ __name(() => {
|
|
1247
1290
|
setCurrentHash(window.location.hash);
|
|
@@ -1253,7 +1296,7 @@ var ActiveLink = /* @__PURE__ */ (0, import_react8.forwardRef)(({ to, onClick, c
|
|
|
1253
1296
|
]);
|
|
1254
1297
|
const isActive = isHashRoute && currentHash === to;
|
|
1255
1298
|
if (!isHashRoute) {
|
|
1256
|
-
return /* @__PURE__ */
|
|
1299
|
+
return /* @__PURE__ */ import_react9.default.createElement(import_react_router_dom.NavLink, {
|
|
1257
1300
|
ref,
|
|
1258
1301
|
to,
|
|
1259
1302
|
onClick,
|
|
@@ -1294,7 +1337,7 @@ var ActiveLink = /* @__PURE__ */ (0, import_react8.forwardRef)(({ to, onClick, c
|
|
|
1294
1337
|
isPending: false,
|
|
1295
1338
|
isTransitioning: false
|
|
1296
1339
|
}) : children;
|
|
1297
|
-
return /* @__PURE__ */
|
|
1340
|
+
return /* @__PURE__ */ import_react9.default.createElement("a", {
|
|
1298
1341
|
ref,
|
|
1299
1342
|
href: to,
|
|
1300
1343
|
onClick: handleHashClick,
|
|
@@ -1306,9 +1349,9 @@ var ActiveLink = /* @__PURE__ */ (0, import_react8.forwardRef)(({ to, onClick, c
|
|
|
1306
1349
|
ActiveLink.displayName = "ActiveLink";
|
|
1307
1350
|
|
|
1308
1351
|
// src/route-components/NavLink.tsx
|
|
1309
|
-
var
|
|
1352
|
+
var React7 = __toESM(require("react"), 1);
|
|
1310
1353
|
var import_react_router_dom2 = require("react-router-dom");
|
|
1311
|
-
var NavLink2 = /* @__PURE__ */
|
|
1354
|
+
var NavLink2 = /* @__PURE__ */ React7.forwardRef(({ to, children, className, style, ...props }, ref) => {
|
|
1312
1355
|
const isHashLink = typeof to === "string" && to.startsWith("#");
|
|
1313
1356
|
const location = (0, import_react_router_dom2.useLocation)();
|
|
1314
1357
|
const navigate = (0, import_react_router_dom2.useNavigate)();
|
|
@@ -1332,7 +1375,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1332
1375
|
const resolvedClassName = typeof className === "function" ? className(renderProps) : className;
|
|
1333
1376
|
const resolvedStyle = typeof style === "function" ? style(renderProps) : style;
|
|
1334
1377
|
const { caseSensitive, end, replace, state, preventScrollReset, relative, viewTransition, ...restProps } = props;
|
|
1335
|
-
return /* @__PURE__ */
|
|
1378
|
+
return /* @__PURE__ */ React7.createElement("a", {
|
|
1336
1379
|
href: to,
|
|
1337
1380
|
onClick: handleClick,
|
|
1338
1381
|
ref,
|
|
@@ -1341,7 +1384,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1341
1384
|
...restProps
|
|
1342
1385
|
}, typeof children === "function" ? children(renderProps) : children);
|
|
1343
1386
|
}
|
|
1344
|
-
return /* @__PURE__ */
|
|
1387
|
+
return /* @__PURE__ */ React7.createElement(import_react_router_dom2.NavLink, {
|
|
1345
1388
|
to,
|
|
1346
1389
|
ref,
|
|
1347
1390
|
className,
|
|
@@ -1356,7 +1399,7 @@ var NavLink2 = /* @__PURE__ */ React6.forwardRef(({ to, children, className, sty
|
|
|
1356
1399
|
NavLink2.displayName = "NavLink";
|
|
1357
1400
|
|
|
1358
1401
|
// src/route-components/UniversalLink.tsx
|
|
1359
|
-
var
|
|
1402
|
+
var import_react10 = __toESM(require("react"), 1);
|
|
1360
1403
|
var import_react_router_dom3 = require("react-router-dom");
|
|
1361
1404
|
function isInternalRoute(to) {
|
|
1362
1405
|
return !to.startsWith("#") && !to.startsWith("http://") && !to.startsWith("https://") && !to.startsWith("//");
|
|
@@ -1366,15 +1409,15 @@ function isExternalLink(to) {
|
|
|
1366
1409
|
return to.startsWith("http://") || to.startsWith("https://") || to.startsWith("//");
|
|
1367
1410
|
}
|
|
1368
1411
|
__name(isExternalLink, "isExternalLink");
|
|
1369
|
-
var UniversalLink = /* @__PURE__ */
|
|
1412
|
+
var UniversalLink = /* @__PURE__ */ import_react10.default.forwardRef(/* @__PURE__ */ __name(function UniversalLink2({ to, ...props }, ref) {
|
|
1370
1413
|
if (isInternalRoute(to)) {
|
|
1371
|
-
return /* @__PURE__ */
|
|
1414
|
+
return /* @__PURE__ */ import_react10.default.createElement(import_react_router_dom3.Link, {
|
|
1372
1415
|
to,
|
|
1373
1416
|
ref,
|
|
1374
1417
|
...props
|
|
1375
1418
|
});
|
|
1376
1419
|
}
|
|
1377
|
-
return /* @__PURE__ */
|
|
1420
|
+
return /* @__PURE__ */ import_react10.default.createElement("a", {
|
|
1378
1421
|
href: to,
|
|
1379
1422
|
ref,
|
|
1380
1423
|
...props,
|
|
@@ -1802,6 +1845,7 @@ var abstractArt3dRenderingCoverImg6 = "https://lf3-static.bytednsdoc.com/obj/ede
|
|
|
1802
1845
|
QueryProvider,
|
|
1803
1846
|
TrackKey,
|
|
1804
1847
|
UniversalLink,
|
|
1848
|
+
Welcome,
|
|
1805
1849
|
avatarImages,
|
|
1806
1850
|
axiosForBackend,
|
|
1807
1851
|
bannerImages,
|