@tntd/reference 1.1.0 → 1.1.2

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.
Files changed (56) hide show
  1. package/.octopus/ar-EG/referenceinfo.d.ts +1 -0
  2. package/.octopus/ar-EG/referenceinfo.js +1 -0
  3. package/.octopus/en-US/referenceinfo.d.ts +1 -0
  4. package/.octopus/en-US/referenceinfo.js +1 -0
  5. package/.octopus/es-ES/referenceinfo.d.ts +1 -0
  6. package/.octopus/es-ES/referenceinfo.js +1 -0
  7. package/.octopus/ko-KR/referenceinfo.d.ts +1 -0
  8. package/.octopus/ko-KR/referenceinfo.js +1 -0
  9. package/.octopus/th-TH/referenceinfo.d.ts +1 -0
  10. package/.octopus/th-TH/referenceinfo.js +1 -0
  11. package/.octopus/zh-CN/referenceinfo.d.ts +1 -0
  12. package/.octopus/zh-CN/referenceinfo.js +1 -0
  13. package/.octopus/zh-TW/referenceinfo.d.ts +1 -0
  14. package/.octopus/zh-TW/referenceinfo.js +1 -0
  15. package/es/AHref/index.js +19 -0
  16. package/es/ReferenceBatchCheck/ReferenceBatchCheck.js +5 -3
  17. package/es/ReferenceDrawer/index.js +10 -2
  18. package/es/ReferenceInfo/index.js +3 -0
  19. package/lib/AHref/index.d.ts.map +1 -1
  20. package/lib/AHref/index.js +85 -50
  21. package/lib/AHref/index.js.map +1 -1
  22. package/lib/I18N.d.ts +8 -0
  23. package/lib/I18N.d.ts.map +1 -1
  24. package/lib/I18N.js +59 -37
  25. package/lib/ReferenceBatchCheck/ReferenceBatchCheck.d.ts +1 -0
  26. package/lib/ReferenceBatchCheck/ReferenceBatchCheck.js +176 -69
  27. package/lib/ReferenceBatchCheck/ReferenceBatchCheck.js.map +1 -1
  28. package/lib/ReferenceBatchCheck/index.js +114 -83
  29. package/lib/ReferenceBatchDrawer/index.d.ts +1 -0
  30. package/lib/ReferenceBatchDrawer/index.js +160 -78
  31. package/lib/ReferenceCheck/ReferenceCheck.d.ts +1 -0
  32. package/lib/ReferenceCheck/ReferenceCheck.js +128 -53
  33. package/lib/ReferenceCheck/index.js +109 -76
  34. package/lib/ReferenceConfigProvider.d.ts +12 -0
  35. package/lib/ReferenceConfigProvider.d.ts.map +1 -0
  36. package/lib/ReferenceConfigProvider.js +121 -0
  37. package/lib/ReferenceConfigProvider.js.map +1 -0
  38. package/lib/ReferenceDrawer/index.d.ts +1 -0
  39. package/lib/ReferenceDrawer/index.js +134 -66
  40. package/lib/ReferenceDrawer/index.js.map +1 -1
  41. package/lib/ReferenceInfo/index.d.ts +1 -0
  42. package/lib/ReferenceInfo/index.js +187 -87
  43. package/lib/ReferenceInfo/index.js.map +1 -1
  44. package/lib/index.js +50 -17
  45. package/lib/locale/ar_EG.js +14 -9
  46. package/lib/locale/en_US.js +14 -9
  47. package/lib/locale/es_ES.js +14 -9
  48. package/lib/locale/ko_KR.js +14 -9
  49. package/lib/locale/th_TH.js +14 -9
  50. package/lib/locale/zh_CN.js +14 -9
  51. package/lib/locale/zh_TW.js +14 -9
  52. package/package.json +1 -1
  53. package/src/AHref/index.js +12 -1
  54. package/src/ReferenceBatchCheck/ReferenceBatchCheck.js +6 -4
  55. package/src/ReferenceDrawer/index.js +38 -26
  56. package/src/ReferenceInfo/index.js +2 -1
@@ -3,6 +3,7 @@ declare namespace _default {
3
3
  const ruoYinYong: string
4
4
  const qiangYinYong: string
5
5
  const zanWuShuJu: string
6
+ const xiangqing: string
6
7
  }
7
8
  }
8
9
  export default _default
@@ -3,5 +3,6 @@ export default {
3
3
  ruoYinYong: 'مرجع ضعيف',
4
4
  qiangYinYong: 'مرجع قوي',
5
5
  zanWuShuJu: 'لا توجد بيانات مؤقتا',
6
+ xiangqing: 'التفاصيل',
6
7
  },
7
8
  };
@@ -3,6 +3,7 @@ declare namespace _default {
3
3
  const ruoYinYong: string
4
4
  const qiangYinYong: string
5
5
  const zanWuShuJu: string
6
+ const xiangqing: string
6
7
  }
7
8
  }
8
9
  export default _default
@@ -3,5 +3,6 @@ export default {
3
3
  ruoYinYong: 'Weak',
4
4
  qiangYinYong: 'Strong',
5
5
  zanWuShuJu: 'No data',
6
+ xiangqing: 'Details',
6
7
  },
7
8
  };
@@ -3,6 +3,7 @@ declare namespace _default {
3
3
  const ruoYinYong: string
4
4
  const qiangYinYong: string
5
5
  const zanWuShuJu: string
6
+ const xiangqing: string
6
7
  }
7
8
  }
8
9
  export default _default
@@ -3,5 +3,6 @@ export default {
3
3
  ruoYinYong: 'Referencia débil',
4
4
  qiangYinYong: 'Referencia fuerte',
5
5
  zanWuShuJu: 'Sin datos por el momento',
6
+ xiangqing: 'Detalles',
6
7
  },
7
8
  };
@@ -3,6 +3,7 @@ declare namespace _default {
3
3
  const ruoYinYong: string
4
4
  const qiangYinYong: string
5
5
  const zanWuShuJu: string
6
+ const xiangqing: string
6
7
  }
7
8
  }
8
9
  export default _default
@@ -3,5 +3,6 @@ export default {
3
3
  ruoYinYong: '약한 참조',
4
4
  qiangYinYong: '강한 참조',
5
5
  zanWuShuJu: '현재 데이터가 없습니다',
6
+ xiangqing: '상세 정보',
6
7
  },
7
8
  };
@@ -3,6 +3,7 @@ declare namespace _default {
3
3
  const ruoYinYong: string
4
4
  const qiangYinYong: string
5
5
  const zanWuShuJu: string
6
+ const xiangqing: string
6
7
  }
7
8
  }
8
9
  export default _default
@@ -3,5 +3,6 @@ export default {
3
3
  ruoYinYong: 'การอ้างอิงที่อ่อนแอ',
4
4
  qiangYinYong: 'การอ้างอิงที่แข็งแรง',
5
5
  zanWuShuJu: 'ไม่มีข้อมูลในขณะนี้',
6
+ xiangqing: 'รายละเอียด',
6
7
  },
7
8
  };
@@ -3,6 +3,7 @@ declare namespace _default {
3
3
  const ruoYinYong: string
4
4
  const qiangYinYong: string
5
5
  const zanWuShuJu: string
6
+ const xiangqing: string
6
7
  }
7
8
  }
8
9
  export default _default
@@ -3,5 +3,6 @@ export default {
3
3
  ruoYinYong: '弱引用',
4
4
  qiangYinYong: '强引用',
5
5
  zanWuShuJu: '暂无数据',
6
+ xiangqing: '详情',
6
7
  },
7
8
  };
@@ -3,6 +3,7 @@ declare namespace _default {
3
3
  const ruoYinYong: string
4
4
  const qiangYinYong: string
5
5
  const zanWuShuJu: string
6
+ const xiangqing: string
6
7
  }
7
8
  }
8
9
  export default _default
@@ -3,5 +3,6 @@ export default {
3
3
  ruoYinYong: '弱引用',
4
4
  qiangYinYong: '強引用',
5
5
  zanWuShuJu: '暫無數據',
6
+ xiangqing: '詳情',
6
7
  },
7
8
  };
package/es/AHref/index.js CHANGED
@@ -4,18 +4,37 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+ var _handleIcon = _interopRequireDefault(require("tntd/lib/handle-icon"));
8
+ var _icon = _interopRequireDefault(require("tntd/lib/icon"));
7
9
  var _react = _interopRequireDefault(require("react"));
8
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
11
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
10
12
  var _default = props => {
11
13
  const {
14
+ record,
15
+ setOtherVisible,
12
16
  children,
13
17
  href,
14
18
  unmountHandle,
15
19
  jumpFun,
16
20
  iframeJump,
21
+ Com,
17
22
  ...rest
18
23
  } = props;
24
+ if (setOtherVisible) {
25
+ return /*#__PURE__*/_react.default.createElement(_handleIcon.default, {
26
+ className: "custom-class",
27
+ num: 2
28
+ }, /*#__PURE__*/_react.default.createElement(_handleIcon.default.Item, {
29
+ title: I18N.referenceinfo.index.xiangqing,
30
+ desc: I18N.referenceinfo.index.xiangqing
31
+ }, /*#__PURE__*/_react.default.createElement(_icon.default, {
32
+ type: "profile",
33
+ onClick: () => {
34
+ setOtherVisible(record);
35
+ }
36
+ })));
37
+ }
19
38
  if (window.__isMultiTab__) {
20
39
  return /*#__PURE__*/_react.default.createElement("a", {
21
40
  onClick: evt => {
@@ -17,6 +17,7 @@ var _ReferenceInfo = _interopRequireDefault(require("../ReferenceInfo"));
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
19
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
20
21
  const {
21
22
  Panel
22
23
  } = _collapse.default;
@@ -41,10 +42,11 @@ var _default = exports.default = (0, _I18N.WrapLocaleReceiver)(props => {
41
42
  emptyType,
42
43
  weakMsg,
43
44
  strongMsg,
44
- jumpFun
45
+ jumpFun,
46
+ ...rest
45
47
  } = props || {};
46
48
  const [visible, setVisible] = (0, _react.useState)(true);
47
- return /*#__PURE__*/_react.default.createElement(_drawer.default, {
49
+ return /*#__PURE__*/_react.default.createElement(_drawer.default, _extends({}, rest || {}, {
48
50
  title: title || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_icon.default, {
49
51
  type: "warning",
50
52
  style: {
@@ -74,7 +76,7 @@ var _default = exports.default = (0, _I18N.WrapLocaleReceiver)(props => {
74
76
  resolve(type);
75
77
  }
76
78
  }, okText || I18N.referencebatchcheck.index.xiaYiBu)] : null
77
- }, /*#__PURE__*/_react.default.createElement("div", {
79
+ }), /*#__PURE__*/_react.default.createElement("div", {
78
80
  className: "reference-online-check-drawer"
79
81
  }, !!type && canNextOpera && /*#__PURE__*/_react.default.createElement("div", {
80
82
  className: "mb16"
@@ -31,6 +31,8 @@ var _default = exports.default = (0, _I18N.WrapLocaleReceiver)(props => {
31
31
  jumpFun,
32
32
  iframeJump,
33
33
  I18N,
34
+ customDrawer,
35
+ onViewOpen,
34
36
  ...rest
35
37
  } = props;
36
38
  const [referenceData, setReferenceData] = (0, _react.useState)(data);
@@ -49,7 +51,12 @@ var _default = exports.default = (0, _I18N.WrapLocaleReceiver)(props => {
49
51
  });
50
52
  }
51
53
  }, [visible, I18N, fetchReference]);
52
- return /*#__PURE__*/_react.default.createElement(_drawer.default, _extends({
54
+ const handleSetOtherVisible = record => {
55
+ if (onViewOpen) {
56
+ onViewOpen(record);
57
+ }
58
+ };
59
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_drawer.default, _extends({
53
60
  className: "reference-drawer",
54
61
  width: 900,
55
62
  title: typeof title === 'string' ? /*#__PURE__*/_react.default.createElement(_ellipsis.default, {
@@ -72,6 +79,7 @@ var _default = exports.default = (0, _I18N.WrapLocaleReceiver)(props => {
72
79
  appList: appList || [],
73
80
  orgMap: orgMap || {},
74
81
  unmountHandle: onClose,
82
+ setOtherVisible: handleSetOtherVisible,
75
83
  showPagination: showPagination
76
- })));
84
+ })), customDrawer));
77
85
  });
@@ -30,6 +30,7 @@ var _default = exports.default = (0, _I18N.WrapLocaleReceiver)(props => {
30
30
  jumpFun,
31
31
  iframeJump,
32
32
  type,
33
+ setOtherVisible,
33
34
  I18N
34
35
  } = props;
35
36
  let paginationInfo = {
@@ -107,6 +108,8 @@ var _default = exports.default = (0, _I18N.WrapLocaleReceiver)(props => {
107
108
  }
108
109
  if (c.dataIndex === goName && record != null && record.goLink) {
109
110
  return /*#__PURE__*/_react.default.createElement(_AHref.default, {
111
+ setOtherVisible: setOtherVisible,
112
+ record: record,
110
113
  jumpFun: jumpFun,
111
114
  iframeJump: iframeJump,
112
115
  href: record == null ? void 0 : record.goLink,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/AHref/index.js"],"names":[],"mappings":"AACe,yDA2Cd"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/AHref/index.js"],"names":[],"mappings":"AAEe,yDAqDd"}
@@ -1,53 +1,88 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- const react_1 = __importDefault(require("react"));
18
- exports.default = (props) => {
19
- const { children, href, unmountHandle, jumpFun, iframeJump } = props, rest = __rest(props, ["children", "href", "unmountHandle", "jumpFun", "iframeJump"]);
20
- if (window.__isMultiTab__) {
21
- return (react_1.default.createElement("a", { onClick: (evt) => {
22
- evt.preventDefault();
23
- if (unmountHandle && typeof unmountHandle === 'function') {
24
- unmountHandle();
25
- }
26
- let pathName = href;
27
- if (href && href.includes('?')) {
28
- pathName = href === null || href === void 0 ? void 0 : href.split('?')[0];
29
- }
30
- if (jumpFun && typeof jumpFun === 'function') {
31
- jumpFun(href);
32
- return;
33
- }
34
- const isInIframe = (window === null || window === void 0 ? void 0 : window.self) !== (window === null || window === void 0 ? void 0 : window.top);
35
- if (iframeJump && isInIframe) {
36
- if (pathName === window.location.pathname) {
37
- window.parent.location.href = href;
38
- }
39
- else {
40
- window.parent.open(href);
41
- }
42
- return;
43
- }
44
- // if (pathName === window.location.pathname) {
45
- window.location.href = href;
46
- // } else {
47
- // window.push(href);
48
- // }
49
- } }, children));
2
+
3
+ var _excluded = ["record", "setOtherVisible", "children", "href", "unmountHandle", "jumpFun", "iframeJump", "Com"];
4
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
5
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports["default"] = void 0;
10
+ var _handleIcon = _interopRequireDefault(require("tntd/lib/handle-icon"));
11
+ var _icon = _interopRequireDefault(require("tntd/lib/icon"));
12
+ var _react = _interopRequireDefault(require("react"));
13
+ function _interopRequireDefault(e) {
14
+ return e && e.__esModule ? e : {
15
+ "default": e
16
+ };
17
+ }
18
+ function _extends() {
19
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
20
+ for (var e = 1; e < arguments.length; e++) {
21
+ var t = arguments[e];
22
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
50
23
  }
51
- return (react_1.default.createElement("a", Object.assign({ href: href }, rest), children));
24
+ return n;
25
+ }, _extends.apply(null, arguments);
26
+ }
27
+ var _default = function _default(props) {
28
+ var record = props.record,
29
+ setOtherVisible = props.setOtherVisible,
30
+ children = props.children,
31
+ href = props.href,
32
+ unmountHandle = props.unmountHandle,
33
+ jumpFun = props.jumpFun,
34
+ iframeJump = props.iframeJump,
35
+ Com = props.Com,
36
+ rest = _objectWithoutProperties(props, _excluded);
37
+ if (setOtherVisible) {
38
+ return /*#__PURE__*/_react["default"].createElement(_handleIcon["default"], {
39
+ className: "custom-class",
40
+ num: 2
41
+ }, /*#__PURE__*/_react["default"].createElement(_handleIcon["default"].Item, {
42
+ title: I18N.referenceinfo.index.xiangqing,
43
+ desc: I18N.referenceinfo.index.xiangqing
44
+ }, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
45
+ type: "profile",
46
+ onClick: function onClick() {
47
+ setOtherVisible(record);
48
+ }
49
+ })));
50
+ }
51
+ if (window.__isMultiTab__) {
52
+ return /*#__PURE__*/_react["default"].createElement("a", {
53
+ onClick: function onClick(evt) {
54
+ var _window, _window2;
55
+ evt.preventDefault();
56
+ if (unmountHandle && typeof unmountHandle === 'function') {
57
+ unmountHandle();
58
+ }
59
+ var pathName = href;
60
+ if (href && href.includes('?')) {
61
+ pathName = href == null ? void 0 : href.split('?')[0];
62
+ }
63
+ if (jumpFun && typeof jumpFun === 'function') {
64
+ jumpFun(href);
65
+ return;
66
+ }
67
+ var isInIframe = ((_window = window) == null ? void 0 : _window.self) !== ((_window2 = window) == null ? void 0 : _window2.top);
68
+ if (iframeJump && isInIframe) {
69
+ if (pathName === window.location.pathname) {
70
+ window.parent.location.href = href;
71
+ } else {
72
+ window.parent.open(href);
73
+ }
74
+ return;
75
+ }
76
+ // if (pathName === window.location.pathname) {
77
+ window.location.href = href;
78
+ // } else {
79
+ // window.push(href);
80
+ // }
81
+ }
82
+ }, children);
83
+ }
84
+ return /*#__PURE__*/_react["default"].createElement("a", _extends({
85
+ href: href
86
+ }, rest), children);
52
87
  };
53
- //# sourceMappingURL=index.js.map
88
+ exports["default"] = _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/AHref/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,kBAAe,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,CAAC,IAEA,QAAQ,CACP,CACL,CAAC;KACH;IACD,OAAO,CACL,mDAAG,IAAI,EAAE,IAAI,IAAM,IAAI,GACpB,QAAQ,CACP,CACL,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nexport default (props) => {\n const { children, href, unmountHandle, jumpFun, iframeJump,...rest } = props;\n if (window.__isMultiTab__) {\n return (\n <a\n onClick={(evt) => {\n evt.preventDefault();\n if (unmountHandle && typeof unmountHandle === 'function') {\n unmountHandle();\n }\n let pathName = href;\n if (href && href.includes('?')) {\n pathName = href?.split('?')[0];\n }\n if(jumpFun && typeof jumpFun==='function'){\n jumpFun(href);\n return\n }\n const isInIframe = window?.self !== window?.top;\n if(iframeJump && isInIframe){\n if (pathName === window.location.pathname) {\n window.parent.location.href = href;\n } else {\n window.parent.open(href);\n }\n return\n }\n // if (pathName === window.location.pathname) {\n window.location.href = href;\n // } else {\n // window.push(href);\n // }\n }}\n >\n {children}\n </a>\n );\n }\n return (\n <a href={href} {...rest}>\n {children}\n </a>\n );\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/AHref/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+BAAuC;AACvC,kBAAe,CAAC,KAAK,EAAE,EAAE;IACvB,MAAM,EAAE,MAAM,EAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAa,KAAK,EAAd,IAAI,UAAK,KAAK,EAAnG,kGAA2F,CAAQ,CAAC;IAC1G,IAAG,eAAe,EAAC;QACjB,OAAO,CACL,8BAAC,iBAAU,IAAC,SAAS,EAAC,cAAc,EAAC,GAAG,EAAE,CAAC;YACzC,8BAAC,iBAAU,CAAC,IAAI,IAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,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R,CAAC,IAEA,QAAQ,CACP,CACL,CAAC;KACH;IACD,OAAO,CACL,mDAAG,IAAI,EAAE,IAAI,IAAM,IAAI,GACpB,QAAQ,CACP,CACL,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { HandleIcon,Icon } from 'tntd';\nexport default (props) => {\n const { record,setOtherVisible, children, href, unmountHandle, jumpFun, iframeJump, Com,...rest } = props;\n if(setOtherVisible){\n return (\n <HandleIcon className=\"custom-class\" num={2}>\n <HandleIcon.Item title={I18N.referenceinfo.index.xiangqing} desc={I18N.referenceinfo.index.xiangqing}>\n <Icon type=\"profile\" onClick={()=>{\n setOtherVisible(record);\n }}></Icon>\n </HandleIcon.Item>\n </HandleIcon>\n )}\n if (window.__isMultiTab__) {\n return (\n <a\n onClick={(evt) => {\n evt.preventDefault();\n if (unmountHandle && typeof unmountHandle === 'function') {\n unmountHandle();\n }\n let pathName = href;\n if (href && href.includes('?')) {\n pathName = href?.split('?')[0];\n }\n if(jumpFun && typeof jumpFun==='function'){\n jumpFun(href);\n return\n }\n const isInIframe = window?.self !== window?.top;\n if(iframeJump && isInIframe){\n if (pathName === window.location.pathname) {\n window.parent.location.href = href;\n } else {\n window.parent.open(href);\n }\n return\n }\n // if (pathName === window.location.pathname) {\n window.location.href = href;\n // } else {\n // window.push(href);\n // }\n }}\n >\n {children}\n </a>\n );\n }\n return (\n <a href={href} {...rest}>\n {children}\n </a>\n );\n};\n"]}
package/lib/I18N.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export function getLang(): any;
2
2
  export function WrapLocaleReceiver(Component: any): (props: any) => React.JSX.Element;
3
3
  export default mapLocale;
4
+ import React from "react";
4
5
  declare const mapLocale: {
5
6
  'zh-cn': typeof zhCN;
6
7
  'zh-tw': typeof zhTW;
@@ -10,4 +11,11 @@ declare const mapLocale: {
10
11
  ko: typeof koKR;
11
12
  es: typeof esES;
12
13
  };
14
+ import zhCN from "../.octopus/zh-CN";
15
+ import zhTW from "../.octopus/zh-TW";
16
+ import enUS from "../.octopus/en-US";
17
+ import thTH from "../.octopus/th-TH";
18
+ import arEG from "../.octopus/ar-EG";
19
+ import koKR from "../.octopus/ko-KR";
20
+ import esES from "../.octopus/es-ES";
13
21
  //# sourceMappingURL=I18N.d.ts.map
package/lib/I18N.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"I18N.d.ts","sourceRoot":"","sources":["../src/I18N.js"],"names":[],"mappings":"AAuBO,+BAGN;AAEM,sFAcN;;AA7BD;;;;;;;;EAQE"}
1
+ {"version":3,"file":"I18N.d.ts","sourceRoot":"","sources":["../src/I18N.js"],"names":[],"mappings":"AAuBO,+BAGN;AAEM,sFAcN;;;AA7BD;;;;;;;;EAQE"}
package/lib/I18N.js CHANGED
@@ -1,43 +1,65 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getLang = exports["default"] = exports.WrapLocaleReceiver = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _LocaleReceiver = _interopRequireDefault(require("antd/es/locale-provider/LocaleReceiver"));
9
+ var _universalCookie = _interopRequireDefault(require("universal-cookie"));
10
+ var _zhCN = _interopRequireDefault(require("../.octopus/zh-CN"));
11
+ var _zhTW = _interopRequireDefault(require("../.octopus/zh-TW"));
12
+ var _enUS = _interopRequireDefault(require("../.octopus/en-US"));
13
+ var _thTH = _interopRequireDefault(require("../.octopus/th-TH"));
14
+ var _arEG = _interopRequireDefault(require("../.octopus/ar-EG"));
15
+ var _koKR = _interopRequireDefault(require("../.octopus/ko-KR"));
16
+ var _esES = _interopRequireDefault(require("../.octopus/es-ES"));
17
+ function _interopRequireDefault(e) {
18
+ return e && e.__esModule ? e : {
19
+ "default": e
20
+ };
21
+ }
22
+ function _extends() {
23
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
24
+ for (var e = 1; e < arguments.length; e++) {
25
+ var t = arguments[e];
26
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
27
+ }
28
+ return n;
29
+ }, _extends.apply(null, arguments);
30
+ }
31
+ var cookies = new _universalCookie["default"]();
32
+ var mapLocale = {
33
+ 'zh-cn': _zhCN["default"],
34
+ 'zh-tw': _zhTW["default"],
35
+ en: _enUS["default"],
36
+ th: _thTH["default"],
37
+ // 泰语
38
+ ar: _arEG["default"],
39
+ // 阿拉伯语(埃及)
40
+ ko: _koKR["default"],
41
+ // 韩语
42
+ es: _esES["default"] // 西班牙语
4
43
  };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.WrapLocaleReceiver = exports.getLang = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const LocaleReceiver_1 = __importDefault(require("antd/es/locale-provider/LocaleReceiver"));
9
- const universal_cookie_1 = __importDefault(require("universal-cookie"));
10
- const zh_CN_1 = __importDefault(require("../.octopus/zh-CN"));
11
- const zh_TW_1 = __importDefault(require("../.octopus/zh-TW"));
12
- const en_US_1 = __importDefault(require("../.octopus/en-US"));
13
- const th_TH_1 = __importDefault(require("../.octopus/th-TH"));
14
- const ar_EG_1 = __importDefault(require("../.octopus/ar-EG"));
15
- const ko_KR_1 = __importDefault(require("../.octopus/ko-KR"));
16
- const es_ES_1 = __importDefault(require("../.octopus/es-ES"));
17
- const cookies = new universal_cookie_1.default();
18
- const mapLocale = {
19
- 'zh-cn': zh_CN_1.default,
20
- 'zh-tw': zh_TW_1.default,
21
- en: en_US_1.default,
22
- th: th_TH_1.default,
23
- ar: ar_EG_1.default,
24
- ko: ko_KR_1.default,
25
- es: es_ES_1.default, // 西班牙语
26
- };
27
- const getLang = () => {
28
- const lang = cookies.get('lang');
29
- return lang !== 'cn' ? lang : 'zh-cn';
44
+ var getLang = function getLang() {
45
+ var lang = cookies.get('lang');
46
+ return lang !== 'cn' ? lang : 'zh-cn';
30
47
  };
31
48
  exports.getLang = getLang;
32
- const WrapLocaleReceiver = (Component) => {
33
- return (props) => (react_1.default.createElement(LocaleReceiver_1.default, { componentName: "TntdNewReference" }, (locale, localeCode) => {
34
- const I18N = !!Object.keys(locale).length
35
- ? locale
36
- : mapLocale[localeCode] || mapLocale[(0, exports.getLang)()];
37
- const transformLocaleCode = localeCode === 'zh-cn' ? 'cn' : localeCode;
38
- return (react_1.default.createElement(Component, Object.assign({ locale: locale, localeCode: transformLocaleCode, I18N: I18N }, props)));
39
- }));
49
+ var WrapLocaleReceiver = function WrapLocaleReceiver(Component) {
50
+ return function (props) {
51
+ return /*#__PURE__*/_react["default"].createElement(_LocaleReceiver["default"], {
52
+ componentName: "TntdNewReference"
53
+ }, function (locale, localeCode) {
54
+ var I18N = !!Object.keys(locale).length ? locale : mapLocale[localeCode] || mapLocale[getLang()];
55
+ var transformLocaleCode = localeCode === 'zh-cn' ? 'cn' : localeCode;
56
+ return /*#__PURE__*/_react["default"].createElement(Component, _extends({
57
+ locale: locale,
58
+ localeCode: transformLocaleCode,
59
+ I18N: I18N
60
+ }, props));
61
+ });
62
+ };
40
63
  };
41
64
  exports.WrapLocaleReceiver = WrapLocaleReceiver;
42
- exports.default = mapLocale;
43
- //# sourceMappingURL=I18N.js.map
65
+ var _default = exports["default"] = mapLocale;
@@ -1,3 +1,4 @@
1
1
  declare var _default: (props: any) => React.JSX.Element;
2
2
  export default _default;
3
+ import React from "react";
3
4
  //# sourceMappingURL=ReferenceBatchCheck.d.ts.map