@lark-apaas/client-toolkit-lite 1.1.3 → 1.1.4
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 +61 -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 +57 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -61,6 +61,11 @@ declare const Welcome: React__default.FC<{
|
|
|
61
61
|
description?: string;
|
|
62
62
|
}>;
|
|
63
63
|
|
|
64
|
+
declare const PagePlaceholder: React__default.FC<{
|
|
65
|
+
title?: string;
|
|
66
|
+
description?: string;
|
|
67
|
+
}>;
|
|
68
|
+
|
|
64
69
|
interface ActiveLinkProps extends Omit<NavLinkProps, 'to'> {
|
|
65
70
|
to: string;
|
|
66
71
|
}
|
|
@@ -427,4 +432,4 @@ declare namespace cover {
|
|
|
427
432
|
export { cover_abstractArt3dRenderingCoverImg1 as abstractArt3dRenderingCoverImg1, cover_abstractArt3dRenderingCoverImg2 as abstractArt3dRenderingCoverImg2, cover_abstractArt3dRenderingCoverImg3 as abstractArt3dRenderingCoverImg3, cover_abstractArt3dRenderingCoverImg4 as abstractArt3dRenderingCoverImg4, cover_abstractArt3dRenderingCoverImg5 as abstractArt3dRenderingCoverImg5, cover_abstractArt3dRenderingCoverImg6 as abstractArt3dRenderingCoverImg6, cover_appealClothingCoverImg1 as appealClothingCoverImg1, cover_appealClothingCoverImg2 as appealClothingCoverImg2, cover_appealClothingCoverImg3 as appealClothingCoverImg3, cover_appealClothingCoverImg4 as appealClothingCoverImg4, cover_appealClothingCoverImg5 as appealClothingCoverImg5, cover_appealClothingCoverImg6 as appealClothingCoverImg6, cover_architectureCoverImg1 as architectureCoverImg1, cover_architectureCoverImg2 as architectureCoverImg2, cover_architectureCoverImg3 as architectureCoverImg3, cover_architectureCoverImg4 as architectureCoverImg4, cover_architectureCoverImg5 as architectureCoverImg5, cover_architectureCoverImg6 as architectureCoverImg6, cover_officeCoverImg1 as officeCoverImg1, cover_officeCoverImg2 as officeCoverImg2, cover_officeCoverImg3 as officeCoverImg3, cover_officeCoverImg4 as officeCoverImg4, cover_officeCoverImg5 as officeCoverImg5, cover_officeCoverImg6 as officeCoverImg6, cover_sceneryCoverImg1 as sceneryCoverImg1, cover_sceneryCoverImg2 as sceneryCoverImg2, cover_sceneryCoverImg3 as sceneryCoverImg3, cover_sceneryCoverImg4 as sceneryCoverImg4, cover_sceneryCoverImg5 as sceneryCoverImg5, cover_sceneryCoverImg6 as sceneryCoverImg6, cover_technologyInternetCoverImg1 as technologyInternetCoverImg1, cover_technologyInternetCoverImg2 as technologyInternetCoverImg2, cover_technologyInternetCoverImg3 as technologyInternetCoverImg3, cover_technologyInternetCoverImg4 as technologyInternetCoverImg4, cover_technologyInternetCoverImg5 as technologyInternetCoverImg5, cover_technologyInternetCoverImg6 as technologyInternetCoverImg6 };
|
|
428
433
|
}
|
|
429
434
|
|
|
430
|
-
export { ActiveLink, AppContainer, type AppInfoPayload, type IFileAttachment, type IJson, type IUserProfile, NavLink, QueryProvider, TrackKey, type TrackParams, UniversalLink, Welcome, avatar as avatarImages, axiosForBackend, banner as bannerImages, clsxWithTw, copyToClipboard, cover as coverImages, getAppId, getAppInfo, getAxiosForBackend, getCsrfToken, getCurrentUserProfile, getDataloom, getEnvPath, getWsPath, initAxiosConfig, isIOS, isIpad, isMobile, isPreview, normalizeBasePath, reportTeaEvent, resolveAppUrl, safeStringify, scopedStorage, useAppInfo, useCurrentUserProfile, useIsMobile, useLogout };
|
|
435
|
+
export { ActiveLink, AppContainer, type AppInfoPayload, type IFileAttachment, type IJson, type IUserProfile, NavLink, PagePlaceholder, QueryProvider, TrackKey, type TrackParams, UniversalLink, Welcome, avatar as avatarImages, axiosForBackend, banner as bannerImages, clsxWithTw, copyToClipboard, cover as coverImages, getAppId, getAppInfo, getAxiosForBackend, getCsrfToken, getCurrentUserProfile, getDataloom, getEnvPath, getWsPath, initAxiosConfig, isIOS, isIpad, isMobile, isPreview, normalizeBasePath, reportTeaEvent, resolveAppUrl, safeStringify, scopedStorage, useAppInfo, useCurrentUserProfile, useIsMobile, useLogout };
|
package/dist/index.d.ts
CHANGED
|
@@ -61,6 +61,11 @@ declare const Welcome: React__default.FC<{
|
|
|
61
61
|
description?: string;
|
|
62
62
|
}>;
|
|
63
63
|
|
|
64
|
+
declare const PagePlaceholder: React__default.FC<{
|
|
65
|
+
title?: string;
|
|
66
|
+
description?: string;
|
|
67
|
+
}>;
|
|
68
|
+
|
|
64
69
|
interface ActiveLinkProps extends Omit<NavLinkProps, 'to'> {
|
|
65
70
|
to: string;
|
|
66
71
|
}
|
|
@@ -427,4 +432,4 @@ declare namespace cover {
|
|
|
427
432
|
export { cover_abstractArt3dRenderingCoverImg1 as abstractArt3dRenderingCoverImg1, cover_abstractArt3dRenderingCoverImg2 as abstractArt3dRenderingCoverImg2, cover_abstractArt3dRenderingCoverImg3 as abstractArt3dRenderingCoverImg3, cover_abstractArt3dRenderingCoverImg4 as abstractArt3dRenderingCoverImg4, cover_abstractArt3dRenderingCoverImg5 as abstractArt3dRenderingCoverImg5, cover_abstractArt3dRenderingCoverImg6 as abstractArt3dRenderingCoverImg6, cover_appealClothingCoverImg1 as appealClothingCoverImg1, cover_appealClothingCoverImg2 as appealClothingCoverImg2, cover_appealClothingCoverImg3 as appealClothingCoverImg3, cover_appealClothingCoverImg4 as appealClothingCoverImg4, cover_appealClothingCoverImg5 as appealClothingCoverImg5, cover_appealClothingCoverImg6 as appealClothingCoverImg6, cover_architectureCoverImg1 as architectureCoverImg1, cover_architectureCoverImg2 as architectureCoverImg2, cover_architectureCoverImg3 as architectureCoverImg3, cover_architectureCoverImg4 as architectureCoverImg4, cover_architectureCoverImg5 as architectureCoverImg5, cover_architectureCoverImg6 as architectureCoverImg6, cover_officeCoverImg1 as officeCoverImg1, cover_officeCoverImg2 as officeCoverImg2, cover_officeCoverImg3 as officeCoverImg3, cover_officeCoverImg4 as officeCoverImg4, cover_officeCoverImg5 as officeCoverImg5, cover_officeCoverImg6 as officeCoverImg6, cover_sceneryCoverImg1 as sceneryCoverImg1, cover_sceneryCoverImg2 as sceneryCoverImg2, cover_sceneryCoverImg3 as sceneryCoverImg3, cover_sceneryCoverImg4 as sceneryCoverImg4, cover_sceneryCoverImg5 as sceneryCoverImg5, cover_sceneryCoverImg6 as sceneryCoverImg6, cover_technologyInternetCoverImg1 as technologyInternetCoverImg1, cover_technologyInternetCoverImg2 as technologyInternetCoverImg2, cover_technologyInternetCoverImg3 as technologyInternetCoverImg3, cover_technologyInternetCoverImg4 as technologyInternetCoverImg4, cover_technologyInternetCoverImg5 as technologyInternetCoverImg5, cover_technologyInternetCoverImg6 as technologyInternetCoverImg6 };
|
|
428
433
|
}
|
|
429
434
|
|
|
430
|
-
export { ActiveLink, AppContainer, type AppInfoPayload, type IFileAttachment, type IJson, type IUserProfile, NavLink, QueryProvider, TrackKey, type TrackParams, UniversalLink, Welcome, avatar as avatarImages, axiosForBackend, banner as bannerImages, clsxWithTw, copyToClipboard, cover as coverImages, getAppId, getAppInfo, getAxiosForBackend, getCsrfToken, getCurrentUserProfile, getDataloom, getEnvPath, getWsPath, initAxiosConfig, isIOS, isIpad, isMobile, isPreview, normalizeBasePath, reportTeaEvent, resolveAppUrl, safeStringify, scopedStorage, useAppInfo, useCurrentUserProfile, useIsMobile, useLogout };
|
|
435
|
+
export { ActiveLink, AppContainer, type AppInfoPayload, type IFileAttachment, type IJson, type IUserProfile, NavLink, PagePlaceholder, QueryProvider, TrackKey, type TrackParams, UniversalLink, Welcome, avatar as avatarImages, axiosForBackend, banner as bannerImages, clsxWithTw, copyToClipboard, cover as coverImages, getAppId, getAppInfo, getAxiosForBackend, getCsrfToken, getCurrentUserProfile, getDataloom, getEnvPath, getWsPath, initAxiosConfig, isIOS, isIpad, isMobile, isPreview, normalizeBasePath, reportTeaEvent, resolveAppUrl, safeStringify, scopedStorage, useAppInfo, useCurrentUserProfile, useIsMobile, useLogout };
|
package/dist/index.js
CHANGED
|
@@ -1214,8 +1214,53 @@ var Welcome = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1"
|
|
|
1214
1214
|
}, "Welcome");
|
|
1215
1215
|
var Welcome_default = Welcome;
|
|
1216
1216
|
|
|
1217
|
+
// src/components/PagePlaceholder/index.tsx
|
|
1218
|
+
import React6 from "react";
|
|
1219
|
+
var PagePlaceholder = /* @__PURE__ */ __name(({ title = "\u9875\u9762\u5F85\u5F00\u53D1", description = "\u9875\u9762\u6682\u672A\u5F00\u53D1\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..." }) => {
|
|
1220
|
+
return /* @__PURE__ */ React6.createElement("div", {
|
|
1221
|
+
style: {
|
|
1222
|
+
display: "flex",
|
|
1223
|
+
flexDirection: "column",
|
|
1224
|
+
alignItems: "center",
|
|
1225
|
+
justifyContent: "center",
|
|
1226
|
+
padding: "0 24px",
|
|
1227
|
+
width: "100%",
|
|
1228
|
+
height: "calc(100vh - 64px)",
|
|
1229
|
+
textAlign: "center"
|
|
1230
|
+
}
|
|
1231
|
+
}, /* @__PURE__ */ React6.createElement("img", {
|
|
1232
|
+
style: {
|
|
1233
|
+
borderRadius: "6px",
|
|
1234
|
+
marginBottom: "24px"
|
|
1235
|
+
},
|
|
1236
|
+
width: "320",
|
|
1237
|
+
height: "200",
|
|
1238
|
+
src: "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miao/welcome.svg",
|
|
1239
|
+
alt: "Welcome"
|
|
1240
|
+
}), /* @__PURE__ */ React6.createElement("div", {
|
|
1241
|
+
style: {
|
|
1242
|
+
fontSize: "16px",
|
|
1243
|
+
fontWeight: 500,
|
|
1244
|
+
marginBottom: "4px",
|
|
1245
|
+
lineHeight: "24px"
|
|
1246
|
+
}
|
|
1247
|
+
}, title), /* @__PURE__ */ React6.createElement("div", {
|
|
1248
|
+
style: {
|
|
1249
|
+
color: "#6b7280",
|
|
1250
|
+
fontSize: "16px",
|
|
1251
|
+
lineHeight: "24px",
|
|
1252
|
+
maxWidth: "480px",
|
|
1253
|
+
overflow: "hidden",
|
|
1254
|
+
display: "-webkit-box",
|
|
1255
|
+
WebkitLineClamp: 2,
|
|
1256
|
+
WebkitBoxOrient: "vertical"
|
|
1257
|
+
}
|
|
1258
|
+
}, description));
|
|
1259
|
+
}, "PagePlaceholder");
|
|
1260
|
+
var PagePlaceholder_default = PagePlaceholder;
|
|
1261
|
+
|
|
1217
1262
|
// src/route-components/ActiveLink.tsx
|
|
1218
|
-
import
|
|
1263
|
+
import React7, { forwardRef, useEffect as useEffect5, useState as useState5 } from "react";
|
|
1219
1264
|
import { NavLink } from "react-router-dom";
|
|
1220
1265
|
var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, children, ...rest }, ref) => {
|
|
1221
1266
|
const [currentHash, setCurrentHash] = useState5(() => typeof window !== "undefined" ? window.location.hash : "");
|
|
@@ -1232,7 +1277,7 @@ var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, ch
|
|
|
1232
1277
|
]);
|
|
1233
1278
|
const isActive = isHashRoute && currentHash === to;
|
|
1234
1279
|
if (!isHashRoute) {
|
|
1235
|
-
return /* @__PURE__ */
|
|
1280
|
+
return /* @__PURE__ */ React7.createElement(NavLink, {
|
|
1236
1281
|
ref,
|
|
1237
1282
|
to,
|
|
1238
1283
|
onClick,
|
|
@@ -1273,7 +1318,7 @@ var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, ch
|
|
|
1273
1318
|
isPending: false,
|
|
1274
1319
|
isTransitioning: false
|
|
1275
1320
|
}) : children;
|
|
1276
|
-
return /* @__PURE__ */
|
|
1321
|
+
return /* @__PURE__ */ React7.createElement("a", {
|
|
1277
1322
|
ref,
|
|
1278
1323
|
href: to,
|
|
1279
1324
|
onClick: handleHashClick,
|
|
@@ -1285,9 +1330,9 @@ var ActiveLink = /* @__PURE__ */ forwardRef(({ to, onClick, className, style, ch
|
|
|
1285
1330
|
ActiveLink.displayName = "ActiveLink";
|
|
1286
1331
|
|
|
1287
1332
|
// src/route-components/NavLink.tsx
|
|
1288
|
-
import * as
|
|
1333
|
+
import * as React8 from "react";
|
|
1289
1334
|
import { NavLink as OriginalNavLink, useLocation, useNavigate } from "react-router-dom";
|
|
1290
|
-
var NavLink2 = /* @__PURE__ */
|
|
1335
|
+
var NavLink2 = /* @__PURE__ */ React8.forwardRef(({ to, children, className, style, ...props }, ref) => {
|
|
1291
1336
|
const isHashLink = typeof to === "string" && to.startsWith("#");
|
|
1292
1337
|
const location = useLocation();
|
|
1293
1338
|
const navigate = useNavigate();
|
|
@@ -1311,7 +1356,7 @@ var NavLink2 = /* @__PURE__ */ React7.forwardRef(({ to, children, className, sty
|
|
|
1311
1356
|
const resolvedClassName = typeof className === "function" ? className(renderProps) : className;
|
|
1312
1357
|
const resolvedStyle = typeof style === "function" ? style(renderProps) : style;
|
|
1313
1358
|
const { caseSensitive, end, replace, state, preventScrollReset, relative, viewTransition, ...restProps } = props;
|
|
1314
|
-
return /* @__PURE__ */
|
|
1359
|
+
return /* @__PURE__ */ React8.createElement("a", {
|
|
1315
1360
|
href: to,
|
|
1316
1361
|
onClick: handleClick,
|
|
1317
1362
|
ref,
|
|
@@ -1320,7 +1365,7 @@ var NavLink2 = /* @__PURE__ */ React7.forwardRef(({ to, children, className, sty
|
|
|
1320
1365
|
...restProps
|
|
1321
1366
|
}, typeof children === "function" ? children(renderProps) : children);
|
|
1322
1367
|
}
|
|
1323
|
-
return /* @__PURE__ */
|
|
1368
|
+
return /* @__PURE__ */ React8.createElement(OriginalNavLink, {
|
|
1324
1369
|
to,
|
|
1325
1370
|
ref,
|
|
1326
1371
|
className,
|
|
@@ -1335,7 +1380,7 @@ var NavLink2 = /* @__PURE__ */ React7.forwardRef(({ to, children, className, sty
|
|
|
1335
1380
|
NavLink2.displayName = "NavLink";
|
|
1336
1381
|
|
|
1337
1382
|
// src/route-components/UniversalLink.tsx
|
|
1338
|
-
import
|
|
1383
|
+
import React9 from "react";
|
|
1339
1384
|
import { Link as RouterLink } from "react-router-dom";
|
|
1340
1385
|
function isInternalRoute(to) {
|
|
1341
1386
|
return !to.startsWith("#") && !to.startsWith("http://") && !to.startsWith("https://") && !to.startsWith("//");
|
|
@@ -1345,15 +1390,15 @@ function isExternalLink(to) {
|
|
|
1345
1390
|
return to.startsWith("http://") || to.startsWith("https://") || to.startsWith("//");
|
|
1346
1391
|
}
|
|
1347
1392
|
__name(isExternalLink, "isExternalLink");
|
|
1348
|
-
var UniversalLink = /* @__PURE__ */
|
|
1393
|
+
var UniversalLink = /* @__PURE__ */ React9.forwardRef(/* @__PURE__ */ __name(function UniversalLink2({ to, ...props }, ref) {
|
|
1349
1394
|
if (isInternalRoute(to)) {
|
|
1350
|
-
return /* @__PURE__ */
|
|
1395
|
+
return /* @__PURE__ */ React9.createElement(RouterLink, {
|
|
1351
1396
|
to,
|
|
1352
1397
|
ref,
|
|
1353
1398
|
...props
|
|
1354
1399
|
});
|
|
1355
1400
|
}
|
|
1356
|
-
return /* @__PURE__ */
|
|
1401
|
+
return /* @__PURE__ */ React9.createElement("a", {
|
|
1357
1402
|
href: to,
|
|
1358
1403
|
ref,
|
|
1359
1404
|
...props,
|
|
@@ -1777,6 +1822,7 @@ export {
|
|
|
1777
1822
|
ActiveLink,
|
|
1778
1823
|
AppContainer_default as AppContainer,
|
|
1779
1824
|
NavLink2 as NavLink,
|
|
1825
|
+
PagePlaceholder_default as PagePlaceholder,
|
|
1780
1826
|
QueryProvider_default as QueryProvider,
|
|
1781
1827
|
TrackKey,
|
|
1782
1828
|
UniversalLink,
|