@lark-apaas/client-toolkit 1.2.51-alpha.0 → 1.2.51-alpha.1

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.
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useRef, useState } from "react";
3
3
  import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover.js";
4
4
  import { getAppId } from "../../utils/getAppId.js";
5
+ import { getEnv } from "../../utils/getParentOrigin.js";
5
6
  import { getCsrfToken } from "../../utils/getCsrfToken.js";
6
7
  import { isNewPathEnabled } from "../../utils/apiPath.js";
7
8
  import { useIsMobile } from "../../hooks/index.js";
@@ -9,10 +10,10 @@ import { X } from "lucide-react";
9
10
  import { Sheet, SheetContent, SheetTrigger } from "../ui/drawer.js";
10
11
  import { t } from "../../locales/index.js";
11
12
  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';
13
+ const REPORT_DOMAIN = {
14
+ BOE: 'tns.feishu-boe.cn',
15
+ PRE: 'tns.feishu-pre.cn',
16
+ ONLINE: 'tns.feishu.cn'
16
17
  };
17
18
  const openReport = ()=>{
18
19
  const params = JSON.stringify({
@@ -21,8 +22,7 @@ const openReport = ()=>{
21
22
  entity_type: 'miaoda_app',
22
23
  extra: ''
23
24
  });
24
- const domain = reportDomainByEnv(process.env.FORCE_FRAMEWORK_ENVIRONMENT);
25
- const url = `https://${domain}/cust/lark_report/?type=common&params=${encodeURIComponent(params)}&lang=zh-CN`;
25
+ const url = `https://${REPORT_DOMAIN[getEnv()]}/cust/lark_report/?type=common&params=${encodeURIComponent(params)}&lang=zh-CN`;
26
26
  window.open(url, '_blank', 'noopener,noreferrer');
27
27
  };
28
28
  const Component = ()=>{
@@ -157,7 +157,7 @@ const Component = ()=>{
157
157
  className: "shrink-0 w-[14px] h-[14px]"
158
158
  }),
159
159
  /*#__PURE__*/ jsx("p", {
160
- className: "shrink-0 m-0! text-[#646A73] text-sm",
160
+ className: "shrink-0 m-0! text-[#646A73] text-sm underline",
161
161
  children: t('safety.report')
162
162
  })
163
163
  ]
@@ -291,7 +291,7 @@ const Component = ()=>{
291
291
  className: "shrink-0 w-[12px] h-[12px]"
292
292
  }),
293
293
  /*#__PURE__*/ jsx("p", {
294
- className: "shrink-0 m-0! text-[#a6a6a6]",
294
+ className: "shrink-0 m-0! text-[#a6a6a6] underline",
295
295
  children: t('safety.report')
296
296
  })
297
297
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/client-toolkit",
3
- "version": "1.2.51-alpha.0",
3
+ "version": "1.2.51-alpha.1",
4
4
  "types": "./lib/index.d.ts",
5
5
  "main": "./lib/index.js",
6
6
  "files": [