@lark-apaas/client-toolkit 1.2.49 → 1.2.51-alpha.0
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.
|
@@ -8,6 +8,23 @@ import { useIsMobile } from "../../hooks/index.js";
|
|
|
8
8
|
import { X } from "lucide-react";
|
|
9
9
|
import { Sheet, SheetContent, SheetTrigger } from "../ui/drawer.js";
|
|
10
10
|
import { t } from "../../locales/index.js";
|
|
11
|
+
const ICON_FEEDBACK_URL = 'https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/miaoda-ui/icon_feedback_outlined.png';
|
|
12
|
+
const reportDomainByEnv = (env)=>{
|
|
13
|
+
if ('boe' === env) return 'tns.feishu-boe.cn';
|
|
14
|
+
if ('pre' === env) return 'tns.feishu-pre.cn';
|
|
15
|
+
return 'tns.feishu.cn';
|
|
16
|
+
};
|
|
17
|
+
const openReport = ()=>{
|
|
18
|
+
const params = JSON.stringify({
|
|
19
|
+
scene: 'miaoda_app_report',
|
|
20
|
+
entity_id: getAppId() ?? '',
|
|
21
|
+
entity_type: 'miaoda_app',
|
|
22
|
+
extra: ''
|
|
23
|
+
});
|
|
24
|
+
const domain = reportDomainByEnv(process.env.FORCE_FRAMEWORK_ENVIRONMENT);
|
|
25
|
+
const url = `https://${domain}/cust/lark_report/?type=common¶ms=${encodeURIComponent(params)}&lang=zh-CN`;
|
|
26
|
+
window.open(url, '_blank', 'noopener,noreferrer');
|
|
27
|
+
};
|
|
11
28
|
const Component = ()=>{
|
|
12
29
|
const HasClosedKey = `miaoda-creatByMiaoda-has-closed-${getAppId()}`;
|
|
13
30
|
const [visible, setVisible] = useState(!window.localStorage?.getItem(HasClosedKey));
|
|
@@ -129,6 +146,21 @@ const Component = ()=>{
|
|
|
129
146
|
children: t('safety.ai.disclaimer')
|
|
130
147
|
})
|
|
131
148
|
]
|
|
149
|
+
}),
|
|
150
|
+
/*#__PURE__*/ jsxs("div", {
|
|
151
|
+
className: "self-stretch shrink-0 flex items-center gap-x-[6px] cursor-pointer",
|
|
152
|
+
"data-custom-element": "safety-report",
|
|
153
|
+
onClick: openReport,
|
|
154
|
+
children: [
|
|
155
|
+
/*#__PURE__*/ jsx("img", {
|
|
156
|
+
src: ICON_FEEDBACK_URL,
|
|
157
|
+
className: "shrink-0 w-[14px] h-[14px]"
|
|
158
|
+
}),
|
|
159
|
+
/*#__PURE__*/ jsx("p", {
|
|
160
|
+
className: "shrink-0 m-0! text-[#646A73] text-sm",
|
|
161
|
+
children: t('safety.report')
|
|
162
|
+
})
|
|
163
|
+
]
|
|
132
164
|
})
|
|
133
165
|
]
|
|
134
166
|
}),
|
|
@@ -248,6 +280,21 @@ const Component = ()=>{
|
|
|
248
280
|
children: t('safety.ai.disclaimer')
|
|
249
281
|
})
|
|
250
282
|
]
|
|
283
|
+
}),
|
|
284
|
+
/*#__PURE__*/ jsxs("div", {
|
|
285
|
+
className: "self-stretch shrink-0 flex items-center gap-x-[6px] cursor-pointer",
|
|
286
|
+
"data-custom-element": "safety-report",
|
|
287
|
+
onClick: openReport,
|
|
288
|
+
children: [
|
|
289
|
+
/*#__PURE__*/ jsx("img", {
|
|
290
|
+
src: ICON_FEEDBACK_URL,
|
|
291
|
+
className: "shrink-0 w-[12px] h-[12px]"
|
|
292
|
+
}),
|
|
293
|
+
/*#__PURE__*/ jsx("p", {
|
|
294
|
+
className: "shrink-0 m-0! text-[#a6a6a6]",
|
|
295
|
+
children: t('safety.report')
|
|
296
|
+
})
|
|
297
|
+
]
|
|
251
298
|
})
|
|
252
299
|
]
|
|
253
300
|
}),
|
package/lib/locales/messages.js
CHANGED
|
@@ -23,6 +23,10 @@ const messages_messages = {
|
|
|
23
23
|
zh: '了解更多',
|
|
24
24
|
en: 'Learn more'
|
|
25
25
|
},
|
|
26
|
+
'safety.report': {
|
|
27
|
+
zh: '投诉与举报',
|
|
28
|
+
en: 'Report'
|
|
29
|
+
},
|
|
26
30
|
'safety.cover.pc': {
|
|
27
31
|
zh: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover.png',
|
|
28
32
|
en: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/LMfspH/ljhwZthlaukjlkulzlp/logo/miaodacover-weben.png'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/client-toolkit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.51-alpha.0",
|
|
4
4
|
"types": "./lib/index.d.ts",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@lark-apaas/aily-web-sdk": "^0.0.11",
|
|
102
102
|
"@lark-apaas/auth-sdk": "^0.1.5",
|
|
103
103
|
"@lark-apaas/client-capability": "^0.1.7",
|
|
104
|
-
"@lark-apaas/dataloom": "^0.1.
|
|
104
|
+
"@lark-apaas/dataloom": "^0.1.3",
|
|
105
105
|
"@lark-apaas/internal-slardar": "^0.0.3",
|
|
106
106
|
"@lark-apaas/miaoda-inspector": "^1.0.23",
|
|
107
107
|
"@lark-apaas/observable-web": "^1.0.6",
|