@icos-desktop/react-components 2.1.0 → 2.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.
@@ -1267,6 +1267,10 @@ interface SenseViewProps {
1267
1267
  * 时间、空间、最近邻、时空
1268
1268
  */
1269
1269
  searchMode?: ('time' | 'space' | 'knn' | 'time-space')[];
1270
+ /**
1271
+ * 触发搜索
1272
+ */
1273
+ onSearch?: (value: any) => void;
1270
1274
  /**
1271
1275
  * 地图开始绘制
1272
1276
  */
@@ -123,6 +123,7 @@ function bind(fn, thisArg) {
123
123
 
124
124
  const {toString} = Object.prototype;
125
125
  const {getPrototypeOf} = Object;
126
+ const {iterator, toStringTag} = Symbol;
126
127
 
127
128
  const kindOf = (cache => thing => {
128
129
  const str = toString.call(thing);
@@ -249,7 +250,7 @@ const isPlainObject = (val) => {
249
250
  }
250
251
 
251
252
  const prototype = getPrototypeOf(val);
252
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
253
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
253
254
  };
254
255
 
255
256
  /**
@@ -600,13 +601,13 @@ const isTypedArray = (TypedArray => {
600
601
  * @returns {void}
601
602
  */
602
603
  const forEachEntry = (obj, fn) => {
603
- const generator = obj && obj[Symbol.iterator];
604
+ const generator = obj && obj[iterator];
604
605
 
605
- const iterator = generator.call(obj);
606
+ const _iterator = generator.call(obj);
606
607
 
607
608
  let result;
608
609
 
609
- while ((result = iterator.next()) && !result.done) {
610
+ while ((result = _iterator.next()) && !result.done) {
610
611
  const pair = result.value;
611
612
  fn.call(obj, pair[0], pair[1]);
612
613
  }
@@ -719,26 +720,6 @@ const toFiniteNumber = (value, defaultValue) => {
719
720
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
720
721
  };
721
722
 
722
- const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
723
-
724
- const DIGIT = '0123456789';
725
-
726
- const ALPHABET = {
727
- DIGIT,
728
- ALPHA,
729
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
730
- };
731
-
732
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
733
- let str = '';
734
- const {length} = alphabet;
735
- while (size--) {
736
- str += alphabet[Math.random() * length|0];
737
- }
738
-
739
- return str;
740
- };
741
-
742
723
  /**
743
724
  * If the thing is a FormData object, return true, otherwise return false.
744
725
  *
@@ -747,7 +728,7 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
747
728
  * @returns {boolean}
748
729
  */
749
730
  function isSpecCompliantForm(thing) {
750
- return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
731
+ return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
751
732
  }
752
733
 
753
734
  const toJSONObject = (obj) => {
@@ -816,6 +797,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
816
797
 
817
798
  // *********************
818
799
 
800
+
801
+ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
802
+
803
+
819
804
  var utils$1 = {
820
805
  isArray,
821
806
  isArrayBuffer,
@@ -866,14 +851,13 @@ var utils$1 = {
866
851
  findKey,
867
852
  global: _global,
868
853
  isContextDefined,
869
- ALPHABET,
870
- generateString,
871
854
  isSpecCompliantForm,
872
855
  toJSONObject,
873
856
  isAsyncFn,
874
857
  isThenable,
875
858
  setImmediate: _setImmediate,
876
- asap
859
+ asap,
860
+ isIterable
877
861
  };
878
862
 
879
863
  /**
@@ -1854,10 +1838,18 @@ let AxiosHeaders$1 = class AxiosHeaders {
1854
1838
  setHeaders(header, valueOrRewrite);
1855
1839
  } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1856
1840
  setHeaders(parseHeaders(header), valueOrRewrite);
1857
- } else if (utils$1.isHeaders(header)) {
1858
- for (const [key, value] of header.entries()) {
1859
- setHeader(value, key, rewrite);
1841
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
1842
+ let obj = {}, dest, key;
1843
+ for (const entry of header) {
1844
+ if (!utils$1.isArray(entry)) {
1845
+ throw TypeError('Object iterator must return a key-value pair');
1846
+ }
1847
+
1848
+ obj[key = entry[0]] = (dest = obj[key]) ?
1849
+ (utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
1860
1850
  }
1851
+
1852
+ setHeaders(obj, valueOrRewrite);
1861
1853
  } else {
1862
1854
  header != null && setHeader(valueOrRewrite, header, rewrite);
1863
1855
  }
@@ -1999,6 +1991,10 @@ let AxiosHeaders$1 = class AxiosHeaders {
1999
1991
  return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
2000
1992
  }
2001
1993
 
1994
+ getSetCookie() {
1995
+ return this.get("set-cookie") || [];
1996
+ }
1997
+
2002
1998
  get [Symbol.toStringTag]() {
2003
1999
  return 'AxiosHeaders';
2004
2000
  }
@@ -2354,8 +2350,9 @@ function combineURLs(baseURL, relativeURL) {
2354
2350
  *
2355
2351
  * @returns {string} The combined full path
2356
2352
  */
2357
- function buildFullPath(baseURL, requestedURL) {
2358
- if (baseURL && !isAbsoluteURL(requestedURL)) {
2353
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
2354
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
2355
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
2359
2356
  return combineURLs(baseURL, requestedURL);
2360
2357
  }
2361
2358
  return requestedURL;
@@ -2470,7 +2467,7 @@ var resolveConfig = (config) => {
2470
2467
 
2471
2468
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
2472
2469
 
2473
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
2470
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
2474
2471
 
2475
2472
  // HTTP basic authentication
2476
2473
  if (auth) {
@@ -3033,7 +3030,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
3033
3030
  } catch (err) {
3034
3031
  unsubscribe && unsubscribe();
3035
3032
 
3036
- if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
3033
+ if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
3037
3034
  throw Object.assign(
3038
3035
  new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
3039
3036
  {
@@ -3193,7 +3190,7 @@ function dispatchRequest(config) {
3193
3190
  });
3194
3191
  }
3195
3192
 
3196
- const VERSION$1 = "1.7.9";
3193
+ const VERSION$1 = "1.9.0";
3197
3194
 
3198
3195
  const validators$1 = {};
3199
3196
 
@@ -3301,7 +3298,7 @@ const validators = validator.validators;
3301
3298
  */
3302
3299
  let Axios$1 = class Axios {
3303
3300
  constructor(instanceConfig) {
3304
- this.defaults = instanceConfig;
3301
+ this.defaults = instanceConfig || {};
3305
3302
  this.interceptors = {
3306
3303
  request: new InterceptorManager(),
3307
3304
  response: new InterceptorManager()
@@ -3378,6 +3375,13 @@ let Axios$1 = class Axios {
3378
3375
  }
3379
3376
  }
3380
3377
 
3378
+ // Set config.allowAbsoluteUrls
3379
+ if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
3380
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
3381
+ } else {
3382
+ config.allowAbsoluteUrls = true;
3383
+ }
3384
+
3381
3385
  validator.assertOptions(config, {
3382
3386
  baseUrl: validators.spelling('baseURL'),
3383
3387
  withXsrfToken: validators.spelling('withXSRFToken')
@@ -3473,7 +3477,7 @@ let Axios$1 = class Axios {
3473
3477
 
3474
3478
  getUri(config) {
3475
3479
  config = mergeConfig$1(this.defaults, config);
3476
- const fullPath = buildFullPath(config.baseURL, config.url);
3480
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
3477
3481
  return buildURL(fullPath, config.params, config.paramsSerializer);
3478
3482
  }
3479
3483
  };
@@ -12910,10 +12914,9 @@ var getLinePolygonGeom = function (line, km) {
12910
12914
  if (km === void 0) { km = 1; }
12911
12915
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
12912
12916
  // @ts-expect-error
12913
- var buffer = turf.buffer({
12914
- type: 'Feature',
12915
- geometry: wkt.parse(line),
12916
- }, km, { units: 'kilometers' });
12917
+ var buffer = turf.buffer({ type: 'Feature', geometry: wkt.parse(line) }, km, {
12918
+ units: 'kilometers',
12919
+ });
12917
12920
  return turf.getGeom(buffer);
12918
12921
  };
12919
12922
  // 合并多个区域
@@ -13745,10 +13748,14 @@ var AdvancedSearch = function (_a) {
13745
13748
  curLines = __spreadArray(__spreadArray([], (lines || []).map(function (item) { return ({
13746
13749
  id: "line__".concat(item.id),
13747
13750
  data: item.data,
13751
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
13752
+ // @ts-expect-error
13748
13753
  polygon: lineRange ? wkt.stringify(getLinePolygonGeom(item.data, lineRange)) : null,
13749
13754
  }); }), true), (selectLines || []).map(function (item) { return ({
13750
13755
  id: "selectLine__".concat(item),
13751
13756
  data: item,
13757
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
13758
+ // @ts-expect-error
13752
13759
  polygon: lineRange ? wkt.stringify(getLinePolygonGeom(item, lineRange)) : null,
13753
13760
  }); }), true);
13754
13761
  curPolygons = __spreadArray(__spreadArray([], (polygons || []).map(function (item) { return ({
@@ -14087,6 +14094,7 @@ var SenseSearch = forwardRef(function (props, ref) {
14087
14094
  timeSpaceParams.searchMode = 'time-space';
14088
14095
  }
14089
14096
  console.log('params', params);
14097
+ console.log('timeSpaceParams', timeSpaceParams);
14090
14098
  form.resetFields();
14091
14099
  handleSetFieldsValue(params);
14092
14100
  if (timeSpaceParams) {
@@ -14095,11 +14103,14 @@ var SenseSearch = forwardRef(function (props, ref) {
14095
14103
  }, 10);
14096
14104
  setTimeout(function () {
14097
14105
  handleSetFieldsValue(timeSpaceParams);
14098
- }, 20);
14106
+ }, 40);
14107
+ setTimeout(function () {
14108
+ handleSetFieldsValue(timeSpaceParams);
14109
+ }, 70);
14099
14110
  }
14100
14111
  setTimeout(function () {
14101
14112
  handleSearch();
14102
- }, 30);
14113
+ }, 100);
14103
14114
  };
14104
14115
  // 修改当前选中的分类
14105
14116
  var handleChangeCategory = function (value) {
@@ -15823,6 +15834,8 @@ var SenseView = forwardRef(function (props, ref) {
15823
15834
  var _a = useState(), searchParams = _a[0], setSearchParams = _a[1];
15824
15835
  // 触发搜索
15825
15836
  var handleSearch = function (params) {
15837
+ var _a;
15838
+ (_a = props.onSearch) === null || _a === void 0 ? void 0 : _a.call(props, params);
15826
15839
  setSearchParams(params);
15827
15840
  };
15828
15841
  useImperativeHandle(ref, function () { return ({
@@ -16493,11 +16506,11 @@ var CcosVideoPlayer = function (props) {
16493
16506
  CcosVideoPlayer.settings = settings$1;
16494
16507
 
16495
16508
  try {
16496
- window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"2.1.0","branch":"release_v2.1.0","buildDate":"2025-05-12 18:13:17"}');
16509
+ window._ICOS_DESKTOP_VERSION_ = JSON.parse('{"version":"2.1.2","branch":"release_v2.1.0","buildDate":"2025-05-13 16:07:07"}');
16497
16510
  }
16498
16511
  catch (err) {
16499
16512
  console.warn(err);
16500
- window._ICOS_DESKTOP_VERSION_ = '{"version":"2.1.0","branch":"release_v2.1.0","buildDate":"2025-05-12 18:13:17"}';
16513
+ window._ICOS_DESKTOP_VERSION_ = '{"version":"2.1.2","branch":"release_v2.1.0","buildDate":"2025-05-13 16:07:07"}';
16501
16514
  }
16502
16515
 
16503
16516
  export { BookDetail, BookGroupImport, BookGroupTable, BookImport, BookInfo, BookSelect, BookTable, CcosBookDetail, CcosImportTable, CcosSenseCreate, CcosSenseDetail, CcosSenseEdit, CcosSenseFullTable, CcosSenseManager, CcosSenseSearch, CcosSenseTree, CcosSenseView, CcosTagConfig, CcosVideoPlayer, EntityClassFilter, EntityClassTreeSelect, ImportTable, Modal, OrgTreeSelect, PersonSelector, ProSearch, ProTable$1 as ProTable, RegionCascader, RegionTreeSelect, RelationGraph, SenseContentTable, SenseCreate, SenseDetail, SenseEdit, SenseForm, SenseFullTable, SenseInfo, SenseManager, SenseSearch, SenseTable, SenseTree, SenseView, TagConfig, TagTreeSelect, VideoControl, VideoPlayer, setCconfig as config };