ls-pro-common 3.0.92 → 3.0.94

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.
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
  import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
8
8
  import { httpGet } from '../http';
9
- import { getCache, setCache, treeEach, isSaasVersion } from '../utils';
9
+ import { getCache, setCache, treeEach, isSaasVersion, toGatewayUrl } from '../utils';
10
10
  var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
11
  var _useState = useState([]),
12
12
  _useState2 = _slicedToArray(_useState, 2),
@@ -35,7 +35,7 @@ var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
35
35
  case 4:
36
36
  api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
37
37
  if (isSaasVersion()) {
38
- api = '/lesoon/tenant-lesoon-mdm-center-api/sysAdministrativeDivision/allByTree';
38
+ api = toGatewayUrl('/tenant-mdm-api/sysAdministrativeDivision/allByTree');
39
39
  }
40
40
  _context.next = 8;
41
41
  return httpGet(api, {}, false);
@@ -11,6 +11,7 @@ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
11
11
  import { httpGet } from '../http';
12
12
  import { getCache, setCache, treeEach, isSaasVersion } from '../utils';
13
13
  import './common.less';
14
+ import { toGatewayUrl } from 'ls-pro-table';
14
15
  var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
15
16
  var propsConfig = _objectSpread({
16
17
  getPopupContainer: function getPopupContainer(triggerNode) {
@@ -94,7 +95,7 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
94
95
  case 3:
95
96
  api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
96
97
  if (isSaasVersion()) {
97
- api = '/lesoon/tenant-lesoon-mdm-center-api/sysAdministrativeDivision/allByTree';
98
+ api = toGatewayUrl('/tenant-mdm-api/sysAdministrativeDivision/allByTree');
98
99
  }
99
100
  _context.next = 7;
100
101
  return httpGet(api, {}, false);
@@ -368,7 +368,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
368
368
  handleClear();
369
369
  if (onSelectChange) {
370
370
  try {
371
- onSelectChange(null, formRef);
371
+ onSelectChange(multiple ? [] : {}, formRef);
372
372
  } catch (error) {}
373
373
  }
374
374
  }
package/es/http/index.js CHANGED
@@ -284,7 +284,7 @@ export function getDict(dictCode) {
284
284
  var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
285
285
  var api = '/lesoon-integration/sysDictDtl/listByProperties';
286
286
  if (isSaasVersion()) {
287
- api = '/tenant-lesoon-integration-api/sysDictDtl/listByProperties';
287
+ api = '/tenant-integration-api/sysDictDtl/listByProperties';
288
288
  }
289
289
  var param = {
290
290
  dictCode: dictCode
package/es/utils/index.js CHANGED
@@ -917,5 +917,5 @@ export var downloadFile = function downloadFile(url, fileName) {
917
917
  document.body.removeChild(a);
918
918
  };
919
919
  export var isSaasVersion = function isSaasVersion() {
920
- return (getCache('poi-center-api') || '').includes('/tenant-lesoon-basic-api/');
920
+ return (getCache('TENANT') || '') === '1';
921
921
  };
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
  import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
8
8
  import { httpGet } from '../http';
9
- import { getCache, setCache, treeEach, isSaasVersion } from '../utils';
9
+ import { getCache, setCache, treeEach, isSaasVersion, toGatewayUrl } from '../utils';
10
10
  var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
11
  var _useState = useState([]),
12
12
  _useState2 = _slicedToArray(_useState, 2),
@@ -35,7 +35,7 @@ var AreaCascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
35
35
  case 4:
36
36
  api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
37
37
  if (isSaasVersion()) {
38
- api = '/lesoon/tenant-lesoon-mdm-center-api/sysAdministrativeDivision/allByTree';
38
+ api = toGatewayUrl('/tenant-mdm-api/sysAdministrativeDivision/allByTree');
39
39
  }
40
40
  _context.next = 8;
41
41
  return httpGet(api, {}, false);
@@ -11,6 +11,7 @@ import React, { useRef, useState, useEffect, useImperativeHandle } from 'react';
11
11
  import { httpGet } from '../http';
12
12
  import { getCache, setCache, treeEach, isSaasVersion } from '../utils';
13
13
  import './common.less';
14
+ import { toGatewayUrl } from 'ls-pro-table';
14
15
  var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
15
16
  var propsConfig = _objectSpread({
16
17
  getPopupContainer: function getPopupContainer(triggerNode) {
@@ -94,7 +95,7 @@ var AreaPicker = /*#__PURE__*/React.forwardRef(function (props, ref) {
94
95
  case 3:
95
96
  api = '/petrel/petrel-location-center-api/sysAdministrativeDivision/allByTree';
96
97
  if (isSaasVersion()) {
97
- api = '/lesoon/tenant-lesoon-mdm-center-api/sysAdministrativeDivision/allByTree';
98
+ api = toGatewayUrl('/tenant-mdm-api/sysAdministrativeDivision/allByTree');
98
99
  }
99
100
  _context.next = 7;
100
101
  return httpGet(api, {}, false);
@@ -368,7 +368,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
368
368
  handleClear();
369
369
  if (onSelectChange) {
370
370
  try {
371
- onSelectChange(null, formRef);
371
+ onSelectChange(multiple ? [] : {}, formRef);
372
372
  } catch (error) {}
373
373
  }
374
374
  }
package/lib/http/index.js CHANGED
@@ -284,7 +284,7 @@ export function getDict(dictCode) {
284
284
  var timeout = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 60000;
285
285
  var api = '/lesoon-integration/sysDictDtl/listByProperties';
286
286
  if (isSaasVersion()) {
287
- api = '/tenant-lesoon-integration-api/sysDictDtl/listByProperties';
287
+ api = '/tenant-integration-api/sysDictDtl/listByProperties';
288
288
  }
289
289
  var param = {
290
290
  dictCode: dictCode
@@ -917,5 +917,5 @@ export var downloadFile = function downloadFile(url, fileName) {
917
917
  document.body.removeChild(a);
918
918
  };
919
919
  export var isSaasVersion = function isSaasVersion() {
920
- return (getCache('poi-center-api') || '').includes('/tenant-lesoon-basic-api/');
920
+ return (getCache('TENANT') || '') === '1';
921
921
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-pro-common",
3
- "version": "3.0.92",
3
+ "version": "3.0.94",
4
4
  "description": "ls-pro-common",
5
5
  "license": "MIT",
6
6
  "sideEffects": [