@lark-apaas/client-toolkit-lite 1.1.15-alpha.2 → 1.1.15-alpha.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 +35 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +35 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1182,6 +1182,29 @@ function getAppId() {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
__name(getAppId, "getAppId");
|
|
1184
1184
|
|
|
1185
|
+
// src/utils/getEnv.ts
|
|
1186
|
+
function getEnv() {
|
|
1187
|
+
switch (globalThis.ENVIRONMENT) {
|
|
1188
|
+
case "staging":
|
|
1189
|
+
return "BOE";
|
|
1190
|
+
case "gray":
|
|
1191
|
+
return "PRE";
|
|
1192
|
+
case "online":
|
|
1193
|
+
return "ONLINE";
|
|
1194
|
+
default:
|
|
1195
|
+
break;
|
|
1196
|
+
}
|
|
1197
|
+
const { origin } = window.location;
|
|
1198
|
+
if (origin.includes("feishuapp.cn") || origin.includes("miaoda.feishuapp.net") || origin.includes("aiforce.cloud") || origin.includes("aiforce.run")) {
|
|
1199
|
+
return "ONLINE";
|
|
1200
|
+
} else if (origin.includes("fsapp.kundou.cn") || origin.includes("miaoda-pre.feishuapp.net") || origin.includes("aiforce-pre.bytedance.net") || origin.includes("aiforce-pre-preview.bytedance.net") || origin.includes("aiforce-pre.cloud") || origin.includes("aiforce-pre.run")) {
|
|
1201
|
+
return "PRE";
|
|
1202
|
+
} else {
|
|
1203
|
+
return "BOE";
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
__name(getEnv, "getEnv");
|
|
1207
|
+
|
|
1185
1208
|
// src/utils/getInitialInfo.ts
|
|
1186
1209
|
async function getAppPublished() {
|
|
1187
1210
|
try {
|
|
@@ -1619,11 +1642,11 @@ var ICON_COMPANY_URL = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljh
|
|
|
1619
1642
|
var ICON_AI_URL = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/icon/icon_efficiency-ai_outlined.svg";
|
|
1620
1643
|
var ICON_FEEDBACK_URL = "https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miaoda-ui/icon_feedback_outlined.png";
|
|
1621
1644
|
var LANDING_URL = "https://miaoda.feishu.cn/landing";
|
|
1622
|
-
var
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
}
|
|
1645
|
+
var REPORT_DOMAIN = {
|
|
1646
|
+
BOE: "tns.feishu-boe.cn",
|
|
1647
|
+
PRE: "tns.feishu-pre.cn",
|
|
1648
|
+
ONLINE: "tns.feishu.cn"
|
|
1649
|
+
};
|
|
1627
1650
|
var openReport = /* @__PURE__ */ __name(() => {
|
|
1628
1651
|
const params = JSON.stringify({
|
|
1629
1652
|
scene: "miaoda_app_report",
|
|
@@ -1631,8 +1654,7 @@ var openReport = /* @__PURE__ */ __name(() => {
|
|
|
1631
1654
|
entity_type: "miaoda_app",
|
|
1632
1655
|
extra: ""
|
|
1633
1656
|
});
|
|
1634
|
-
const
|
|
1635
|
-
const url = `https://${domain}/cust/lark_report/?type=common¶ms=${encodeURIComponent(params)}&lang=zh-CN`;
|
|
1657
|
+
const url = `https://${REPORT_DOMAIN[getEnv()]}/cust/lark_report/?type=common¶ms=${encodeURIComponent(params)}&lang=zh-CN`;
|
|
1636
1658
|
window.open(url, "_blank", "noopener,noreferrer");
|
|
1637
1659
|
}, "openReport");
|
|
1638
1660
|
var badgeBase = {
|
|
@@ -1992,7 +2014,8 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
1992
2014
|
}), /* @__PURE__ */ import_react5.default.createElement("p", {
|
|
1993
2015
|
style: {
|
|
1994
2016
|
...sheetInfoText,
|
|
1995
|
-
cursor: "pointer"
|
|
2017
|
+
cursor: "pointer",
|
|
2018
|
+
textDecoration: "underline"
|
|
1996
2019
|
}
|
|
1997
2020
|
}, t("safety.report")))), /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
1998
2021
|
style: mobileBtnRow
|
|
@@ -2089,7 +2112,8 @@ var Safety = /* @__PURE__ */ __name(() => {
|
|
|
2089
2112
|
}), /* @__PURE__ */ import_react5.default.createElement("p", {
|
|
2090
2113
|
style: {
|
|
2091
2114
|
...infoText,
|
|
2092
|
-
cursor: "pointer"
|
|
2115
|
+
cursor: "pointer",
|
|
2116
|
+
textDecoration: "underline"
|
|
2093
2117
|
}
|
|
2094
2118
|
}, t("safety.report")))), /* @__PURE__ */ import_react5.default.createElement("div", {
|
|
2095
2119
|
style: btnRow
|
|
@@ -2127,7 +2151,7 @@ var POWERED_BY_TEXT = "\u7531\u98DE\u4E66\u5999\u642D\u63D0\u4F9B\u652F\u6301";
|
|
|
2127
2151
|
var FONT_FAMILY2 = "'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif";
|
|
2128
2152
|
var PILL_SHADOW = "0px 8px 32px rgba(0,0,0,0.08), 0px 4px 16px rgba(0,0,0,0.04), 0px 2px 4px rgba(0,0,0,0.02)";
|
|
2129
2153
|
var CARD_SHADOW = "0px 4px 16px rgba(0,0,0,0.03), 0px 4px 10px rgba(0,0,0,0.03), 0px 2px 4px rgba(0,0,0,0.02)";
|
|
2130
|
-
var
|
|
2154
|
+
var reportDomainByEnv = /* @__PURE__ */ __name((env) => {
|
|
2131
2155
|
if (env === "boe") return "tns.feishu-boe.cn";
|
|
2132
2156
|
if (env === "pre") return "tns.feishu-pre.cn";
|
|
2133
2157
|
return "tns.feishu.cn";
|
|
@@ -2139,7 +2163,7 @@ var openDoubaoReport = /* @__PURE__ */ __name(() => {
|
|
|
2139
2163
|
entity_type: "miaoda_app",
|
|
2140
2164
|
extra: ""
|
|
2141
2165
|
});
|
|
2142
|
-
const domain =
|
|
2166
|
+
const domain = reportDomainByEnv(process.env.FORCE_FRAMEWORK_ENVIRONMENT);
|
|
2143
2167
|
const url = `https://${domain}/cust/lark_report/?type=common¶ms=${encodeURIComponent(params)}&lang=zh-CN`;
|
|
2144
2168
|
window.open(url, "_blank", "noopener,noreferrer");
|
|
2145
2169
|
}, "openDoubaoReport");
|
|
@@ -2569,29 +2593,6 @@ var isIOS = /* @__PURE__ */ __name(() => {
|
|
|
2569
2593
|
return false;
|
|
2570
2594
|
}, "isIOS");
|
|
2571
2595
|
|
|
2572
|
-
// src/utils/getEnv.ts
|
|
2573
|
-
function getEnv() {
|
|
2574
|
-
switch (globalThis.ENVIRONMENT) {
|
|
2575
|
-
case "staging":
|
|
2576
|
-
return "BOE";
|
|
2577
|
-
case "gray":
|
|
2578
|
-
return "PRE";
|
|
2579
|
-
case "online":
|
|
2580
|
-
return "ONLINE";
|
|
2581
|
-
default:
|
|
2582
|
-
break;
|
|
2583
|
-
}
|
|
2584
|
-
const { origin } = window.location;
|
|
2585
|
-
if (origin.includes("feishuapp.cn") || origin.includes("miaoda.feishuapp.net") || origin.includes("aiforce.cloud") || origin.includes("aiforce.run")) {
|
|
2586
|
-
return "ONLINE";
|
|
2587
|
-
} else if (origin.includes("fsapp.kundou.cn") || origin.includes("miaoda-pre.feishuapp.net") || origin.includes("aiforce-pre.bytedance.net") || origin.includes("aiforce-pre-preview.bytedance.net") || origin.includes("aiforce-pre.cloud") || origin.includes("aiforce-pre.run")) {
|
|
2588
|
-
return "PRE";
|
|
2589
|
-
} else {
|
|
2590
|
-
return "BOE";
|
|
2591
|
-
}
|
|
2592
|
-
}
|
|
2593
|
-
__name(getEnv, "getEnv");
|
|
2594
|
-
|
|
2595
2596
|
// src/components/AppContainer/utils/getLarkUser.ts
|
|
2596
2597
|
async function getLarkUserInfo() {
|
|
2597
2598
|
const appId = getAppId();
|