@lark-apaas/client-toolkit-lite 1.1.7-alpha.26 → 1.1.7-alpha.27
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 +9 -77
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -77
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1473,11 +1473,6 @@ __name(useLogout, "useLogout");
|
|
|
1473
1473
|
|
|
1474
1474
|
// src/locales/messages.ts
|
|
1475
1475
|
var messages = {
|
|
1476
|
-
// ── Index / 通用 ──────────────────────────────────────────────
|
|
1477
|
-
"index.rateLimitError": {
|
|
1478
|
-
zh: "\u5E94\u7528\u989D\u5EA6\u5DF2\u8017\u5C3D\uFF0C\u8BF7\u8054\u7CFB\u5E94\u7528\u5F00\u53D1\u8005",
|
|
1479
|
-
en: "Application quota exhausted, please contact the app developer"
|
|
1480
|
-
},
|
|
1481
1476
|
// ── Safety 组件 ──────────────────────────────────────────────
|
|
1482
1477
|
"safety.badge.label": {
|
|
1483
1478
|
zh: "\u5999\u642D",
|
|
@@ -2846,86 +2841,23 @@ var axiosForBackend = getAxiosForBackend();
|
|
|
2846
2841
|
|
|
2847
2842
|
// src/integrations/capabilityClient.ts
|
|
2848
2843
|
var import_client_capability = require("@lark-apaas/client-capability");
|
|
2849
|
-
|
|
2850
|
-
// src/components/ui/toast.tsx
|
|
2851
|
-
function showToast2(message, duration = 3e3) {
|
|
2852
|
-
return new Promise((resolve) => {
|
|
2853
|
-
const toast = document.createElement("div");
|
|
2854
|
-
const iconSvg = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2855
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 1.333a6.667 6.667 0 1 1 0 13.334A6.667 6.667 0 0 1 8 1.333ZM8 10a.667.667 0 1 0 0 1.333A.667.667 0 0 0 8 10Zm0-5.333a.667.667 0 0 0-.667.666v3.334a.667.667 0 0 0 1.334 0V5.333A.667.667 0 0 0 8 4.667Z" fill="#ff811a"/>
|
|
2856
|
-
</svg>`;
|
|
2857
|
-
const iconWrapper = document.createElement("span");
|
|
2858
|
-
iconWrapper.innerHTML = iconSvg;
|
|
2859
|
-
Object.assign(iconWrapper.style, {
|
|
2860
|
-
display: "flex",
|
|
2861
|
-
alignItems: "center",
|
|
2862
|
-
marginRight: "8px",
|
|
2863
|
-
flexShrink: "0"
|
|
2864
|
-
});
|
|
2865
|
-
const textWrapper = document.createElement("span");
|
|
2866
|
-
textWrapper.textContent = message;
|
|
2867
|
-
toast.appendChild(iconWrapper);
|
|
2868
|
-
toast.appendChild(textWrapper);
|
|
2869
|
-
Object.assign(toast.style, {
|
|
2870
|
-
position: "fixed",
|
|
2871
|
-
top: "32px",
|
|
2872
|
-
left: "50%",
|
|
2873
|
-
transform: "translate(-50%, -50%)",
|
|
2874
|
-
display: "flex",
|
|
2875
|
-
alignItems: "center",
|
|
2876
|
-
padding: "12px 16px",
|
|
2877
|
-
backgroundColor: "#fff",
|
|
2878
|
-
color: "#1f2329",
|
|
2879
|
-
border: "1px solid #dee0e3",
|
|
2880
|
-
borderRadius: "6px",
|
|
2881
|
-
fontSize: "14px",
|
|
2882
|
-
lineHeight: "1.5",
|
|
2883
|
-
zIndex: "99999",
|
|
2884
|
-
maxWidth: "80vw",
|
|
2885
|
-
wordBreak: "break-word",
|
|
2886
|
-
boxShadow: "0 4px 8px rgba(0, 0, 0, 0.03), 0 3px 6px rgba(0, 0, 0, 0.05), 0 6px 18px rgba(0, 0, 0, 0.03)",
|
|
2887
|
-
opacity: "0",
|
|
2888
|
-
transition: "opacity 0.3s ease"
|
|
2889
|
-
});
|
|
2890
|
-
document.body.appendChild(toast);
|
|
2891
|
-
requestAnimationFrame(() => {
|
|
2892
|
-
toast.style.opacity = "1";
|
|
2893
|
-
});
|
|
2894
|
-
setTimeout(() => {
|
|
2895
|
-
toast.style.opacity = "0";
|
|
2896
|
-
setTimeout(() => {
|
|
2897
|
-
document.body.removeChild(toast);
|
|
2898
|
-
resolve();
|
|
2899
|
-
}, 300);
|
|
2900
|
-
}, duration);
|
|
2901
|
-
});
|
|
2902
|
-
}
|
|
2903
|
-
__name(showToast2, "showToast");
|
|
2904
|
-
|
|
2905
|
-
// src/integrations/capabilityClient.ts
|
|
2906
2844
|
var _appId = getAppId();
|
|
2907
|
-
var
|
|
2908
|
-
var
|
|
2845
|
+
var _acquireUploadUrl = isNewPathEnabled() ? `/app/${_appId}/__runtime__/api/v1/studio/plugins/tmp_files/acquire_upload_url` : `/af/api/v1/studio/plugins/tmp_files/acquire_upload_url`;
|
|
2846
|
+
var _acquireDownloadUrl = isNewPathEnabled() ? `/app/${_appId}/__runtime__/api/v1/studio/plugins/tmp_files/acquire_download_url` : `/af/api/v1/studio/plugins/tmp_files/acquire_download_url`;
|
|
2909
2847
|
var capabilityClient = (0, import_client_capability.createClient)({
|
|
2910
2848
|
baseURL: normalizeBasePath(process.env.CLIENT_BASE_PATH ?? "/"),
|
|
2911
|
-
acquireUploadUrl:
|
|
2912
|
-
acquireDownloadUrl:
|
|
2849
|
+
acquireUploadUrl: _acquireUploadUrl,
|
|
2850
|
+
acquireDownloadUrl: _acquireDownloadUrl,
|
|
2913
2851
|
fetchOptions: {
|
|
2914
2852
|
headers: {
|
|
2915
2853
|
"X-Suda-Csrf-Token": window.csrfToken ?? ""
|
|
2916
2854
|
}
|
|
2917
2855
|
},
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
central: {
|
|
2924
|
-
enabled: true,
|
|
2925
|
-
// window.appId 由妙搭沙箱 / 线上环境注入;非妙搭场景下 capability 调用本身不可用
|
|
2926
|
-
appId: _appId ?? ""
|
|
2927
|
-
}
|
|
2928
|
-
} : {}
|
|
2856
|
+
central: {
|
|
2857
|
+
enabled: true,
|
|
2858
|
+
// window.appId 由妙搭沙箱 / 线上环境注入;非妙搭场景下 capability 调用本身不可用
|
|
2859
|
+
appId: _appId ?? ""
|
|
2860
|
+
}
|
|
2929
2861
|
});
|
|
2930
2862
|
|
|
2931
2863
|
// src/constants/img-resources/avatar.ts
|