@xfe-repo/web-components 1.2.7 → 1.5.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.
package/dist/index.js CHANGED
@@ -16,6 +16,10 @@ function _assert_this_initialized(self) {
16
16
  }
17
17
  return self;
18
18
  }
19
+ function _call_super(_this, derived, args) {
20
+ derived = _get_prototype_of(derived);
21
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
22
+ }
19
23
  function _class_call_check(instance, Constructor) {
20
24
  if (!(instance instanceof Constructor)) {
21
25
  throw new TypeError("Cannot call a class as a function");
@@ -141,12 +145,22 @@ function _object_spread_props(target, source) {
141
145
  }
142
146
  function _object_without_properties(source, excluded) {
143
147
  if (source == null) return {};
144
- var target = _object_without_properties_loose(source, excluded);
145
- var key, i;
148
+ var target = {}, sourceKeys, key, i;
149
+ if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
150
+ sourceKeys = Reflect.ownKeys(Object(source));
151
+ for(i = 0; i < sourceKeys.length; i++){
152
+ key = sourceKeys[i];
153
+ if (excluded.indexOf(key) >= 0) continue;
154
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
155
+ target[key] = source[key];
156
+ }
157
+ return target;
158
+ }
159
+ target = _object_without_properties_loose(source, excluded);
146
160
  if (Object.getOwnPropertySymbols) {
147
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
148
- for(i = 0; i < sourceSymbolKeys.length; i++){
149
- key = sourceSymbolKeys[i];
161
+ sourceKeys = Object.getOwnPropertySymbols(source);
162
+ for(i = 0; i < sourceKeys.length; i++){
163
+ key = sourceKeys[i];
150
164
  if (excluded.indexOf(key) >= 0) continue;
151
165
  if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
152
166
  target[key] = source[key];
@@ -156,12 +170,11 @@ function _object_without_properties(source, excluded) {
156
170
  }
157
171
  function _object_without_properties_loose(source, excluded) {
158
172
  if (source == null) return {};
159
- var target = {};
160
- var sourceKeys = Object.keys(source);
161
- var key, i;
173
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
162
174
  for(i = 0; i < sourceKeys.length; i++){
163
175
  key = sourceKeys[i];
164
176
  if (excluded.indexOf(key) >= 0) continue;
177
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
165
178
  target[key] = source[key];
166
179
  }
167
180
  return target;
@@ -198,28 +211,12 @@ function _unsupported_iterable_to_array(o, minLen) {
198
211
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
199
212
  }
200
213
  function _is_native_reflect_construct() {
201
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
202
- if (Reflect.construct.sham) return false;
203
- if (typeof Proxy === "function") return true;
204
214
  try {
205
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
206
- return true;
207
- } catch (e) {
208
- return false;
209
- }
210
- }
211
- function _create_super(Derived) {
212
- var hasNativeReflectConstruct = _is_native_reflect_construct();
213
- return function _createSuperInternal() {
214
- var Super = _get_prototype_of(Derived), result;
215
- if (hasNativeReflectConstruct) {
216
- var NewTarget = _get_prototype_of(this).constructor;
217
- result = Reflect.construct(Super, arguments, NewTarget);
218
- } else {
219
- result = Super.apply(this, arguments);
220
- }
221
- return _possible_constructor_return(this, result);
222
- };
215
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
216
+ } catch (_) {}
217
+ return (_is_native_reflect_construct = function() {
218
+ return !!result;
219
+ })();
223
220
  }
224
221
  var __create = Object.create;
225
222
  var __defProp = Object.defineProperty;
@@ -227,20 +224,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
227
224
  var __getOwnPropNames = Object.getOwnPropertyNames;
228
225
  var __getProtoOf = Object.getPrototypeOf;
229
226
  var __hasOwnProp = Object.prototype.hasOwnProperty;
230
- var __export = function(target, all) {
227
+ var __export = function __export(target, all) {
231
228
  for(var name in all)__defProp(target, name, {
232
229
  get: all[name],
233
230
  enumerable: true
234
231
  });
235
232
  };
236
- var __copyProps = function(to, from, except, desc) {
237
- if (from && typeof from === "object" || typeof from === "function") {
233
+ var __copyProps = function __copyProps(to, from, except, desc) {
234
+ if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
238
235
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
239
236
  try {
240
237
  var _loop = function() {
241
238
  var key = _step.value;
242
239
  if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
243
- get: function() {
240
+ get: function get() {
244
241
  return from[key];
245
242
  },
246
243
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
@@ -264,7 +261,7 @@ var __copyProps = function(to, from, except, desc) {
264
261
  }
265
262
  return to;
266
263
  };
267
- var __toESM = function(mod, isNodeMode, target) {
264
+ var __toESM = function __toESM(mod, isNodeMode, target) {
268
265
  return target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(// If the importer is in node compatibility mode or this is not an ESM
269
266
  // file that has been converted to a CommonJS file using a Babel-
270
267
  // compatible transform (i.e. "__esModule" has not been set), then set
@@ -274,28 +271,28 @@ var __toESM = function(mod, isNodeMode, target) {
274
271
  enumerable: true
275
272
  }) : target, mod);
276
273
  };
277
- var __toCommonJS = function(mod) {
274
+ var __toCommonJS = function __toCommonJS(mod) {
278
275
  return __copyProps(__defProp({}, "__esModule", {
279
276
  value: true
280
277
  }), mod);
281
278
  };
282
279
  // src/index.ts
283
- var src_exports = {};
284
- __export(src_exports, {
285
- Loading: function() {
280
+ var index_exports = {};
281
+ __export(index_exports, {
282
+ Loading: function Loading1() {
286
283
  return Loading;
287
284
  },
288
- MultiWindow: function() {
285
+ MultiWindow: function MultiWindow1() {
289
286
  return MultiWindow;
290
287
  },
291
- MultiWindowContents: function() {
288
+ MultiWindowContents: function MultiWindowContents1() {
292
289
  return MultiWindowContents;
293
290
  },
294
- useMultiWindowContentsRef: function() {
291
+ useMultiWindowContentsRef: function useMultiWindowContentsRef1() {
295
292
  return useMultiWindowContentsRef;
296
293
  }
297
294
  });
298
- module.exports = __toCommonJS(src_exports);
295
+ module.exports = __toCommonJS(index_exports);
299
296
  // src/Loading/index.tsx
300
297
  var import_react = require("react");
301
298
  // src/Loading/index.module.less
@@ -307,10 +304,9 @@ var import_antd = require("antd");
307
304
  var import_jsx_runtime = require("react/jsx-runtime");
308
305
  var Loading = /*#__PURE__*/ function(_import_react_PureComponent) {
309
306
  _inherits(Loading, _import_react_PureComponent);
310
- var _super = _create_super(Loading);
311
307
  function Loading() {
312
308
  _class_call_check(this, Loading);
313
- return _super.apply(this, arguments);
309
+ return _call_super(this, Loading, arguments);
314
310
  }
315
311
  _create_class(Loading, [
316
312
  {
@@ -385,13 +381,13 @@ var MultiWindowSearch = (0, import_react2.memo)(function(props) {
385
381
  children: [
386
382
  shouldShowSearch && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Search, {
387
383
  className: MultiWindow_module_default.input,
388
- placeholder: "标签/单号",
384
+ placeholder: "\u6807\u7B7E/\u5355\u53F7",
389
385
  onSearch: handleSearch,
390
386
  allowClear: true,
391
387
  autoFocus: true
392
388
  }),
393
389
  !shouldShowSearch && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd2.Tooltip, {
394
- title: "搜索标签/单号",
390
+ title: "\u641C\u7D22\u6807\u7B7E/\u5355\u53F7",
395
391
  color: "var(--ant-color-primary)",
396
392
  mouseEnterDelay: 0.5,
397
393
  children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd2.Button, {
@@ -481,7 +477,7 @@ var MultiWindowTabs = (0, import_react3.memo)(function(props) {
481
477
  items: pagePathsHelperData.keys,
482
478
  strategy: import_sortable.horizontalListSortingStrategy,
483
479
  children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DefaultTabBar, _object_spread_props(_object_spread({}, tabBarProps), {
484
- children: function(node) {
480
+ children: function children(node) {
485
481
  return /* @__PURE__ */ (0, import_react4.createElement)(TabItem, _object_spread_props(_object_spread({}, node.props), {
486
482
  key: node.key,
487
483
  data: pagePathsHelperData.map.get(String(node.key)),
@@ -541,7 +537,7 @@ var TabItem = (0, import_react3.memo)(function(props) {
541
537
  popupMatchSelectWidth: false,
542
538
  size: "small",
543
539
  showSearch: true,
544
- placeholder: "请选择"
540
+ placeholder: "\u8BF7\u9009\u62E9"
545
541
  }, data.key);
546
542
  }, [
547
543
  data,
@@ -614,7 +610,7 @@ var MultiWindow = (0, import_react5.memo)(function(props) {
614
610
  });
615
611
  if (!searchResult.length) {
616
612
  var notFoundPagePath = {
617
- label: "未找到匹配的标签",
613
+ label: "\u672A\u627E\u5230\u5339\u914D\u7684\u6807\u7B7E",
618
614
  key: "notFound",
619
615
  fullPath: "/",
620
616
  disabled: true,
@@ -642,7 +638,7 @@ var MultiWindow = (0, import_react5.memo)(function(props) {
642
638
  var _currentStateRef_current = currentStateRef.current, pathKey2 = _currentStateRef_current.pathKey, prev = _currentStateRef_current.pagePaths;
643
639
  var newPagePaths = _to_consumable_array(prev);
644
640
  var newPagePath = {
645
- label: "加载中",
641
+ label: "\u52A0\u8F7D\u4E2D",
646
642
  key: newPathKey,
647
643
  fullPath: fullPath
648
644
  };
@@ -830,7 +826,7 @@ var MultiWindow = (0, import_react5.memo)(function(props) {
830
826
  onSearch: handleUpdateSearchPagePaths
831
827
  }),
832
828
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_antd4.Tooltip, {
833
- title: "刷新当前页面",
829
+ title: "\u5237\u65B0\u5F53\u524D\u9875\u9762",
834
830
  color: "var(--ant-color-primary)",
835
831
  mouseEnterDelay: 0.5,
836
832
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_antd4.Button, {
@@ -840,18 +836,18 @@ var MultiWindow = (0, import_react5.memo)(function(props) {
840
836
  })
841
837
  }),
842
838
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_antd4.Tooltip, {
843
- title: "关闭其他页面",
839
+ title: "\u5173\u95ED\u5176\u4ED6\u9875\u9762",
844
840
  color: "var(--ant-color-primary)",
845
841
  mouseEnterDelay: 0.5,
846
842
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_antd4.Popconfirm, {
847
- title: "关闭其他页面",
843
+ title: "\u5173\u95ED\u5176\u4ED6\u9875\u9762",
848
844
  icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_icons2.QuestionCircleOutlined, {
849
845
  style: {
850
846
  color: "red"
851
847
  }
852
848
  }),
853
- okText: "确定",
854
- cancelText: "取消",
849
+ okText: "\u786E\u5B9A",
850
+ cancelText: "\u53D6\u6D88",
855
851
  onConfirm: handleRemoveOther,
856
852
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_antd4.Button, {
857
853
  icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_icons2.CloseOutlined, {}),
@@ -865,16 +861,16 @@ var MultiWindow = (0, import_react5.memo)(function(props) {
865
861
  })
866
862
  });
867
863
  });
868
- var createSearchCollectionKey = function(search) {
864
+ var createSearchCollectionKey = function createSearchCollectionKey(search) {
869
865
  var queryJson = import_tools.queryString.parse(search);
870
866
  if (queryJson.ts) delete queryJson.ts;
871
867
  return import_tools.queryString.stringify(queryJson, {
872
- sort: function(itemLeft, itemRight) {
868
+ sort: function sort(itemLeft, itemRight) {
873
869
  return itemLeft.localeCompare(itemRight);
874
870
  }
875
871
  });
876
872
  };
877
- var checkCanEnableCollection = function(path) {
873
+ var checkCanEnableCollection = function checkCanEnableCollection(path) {
878
874
  var blackList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
879
875
  var _path_split_pop;
880
876
  var isDetailPage = !!((_path_split_pop = path.split("/").pop()) === null || _path_split_pop === void 0 ? void 0 : _path_split_pop.toLowerCase().includes("detail"));
package/dist/index.mjs CHANGED
@@ -1,4 +1,3 @@
1
- // src/Loading/index.tsx
2
1
  function _array_like_to_array(arr, len) {
3
2
  if (len == null || len > arr.length) len = arr.length;
4
3
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -16,6 +15,10 @@ function _assert_this_initialized(self) {
16
15
  }
17
16
  return self;
18
17
  }
18
+ function _call_super(_this, derived, args) {
19
+ derived = _get_prototype_of(derived);
20
+ return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
21
+ }
19
22
  function _class_call_check(instance, Constructor) {
20
23
  if (!(instance instanceof Constructor)) {
21
24
  throw new TypeError("Cannot call a class as a function");
@@ -141,12 +144,22 @@ function _object_spread_props(target, source) {
141
144
  }
142
145
  function _object_without_properties(source, excluded) {
143
146
  if (source == null) return {};
144
- var target = _object_without_properties_loose(source, excluded);
145
- var key, i;
147
+ var target = {}, sourceKeys, key, i;
148
+ if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
149
+ sourceKeys = Reflect.ownKeys(Object(source));
150
+ for(i = 0; i < sourceKeys.length; i++){
151
+ key = sourceKeys[i];
152
+ if (excluded.indexOf(key) >= 0) continue;
153
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
154
+ target[key] = source[key];
155
+ }
156
+ return target;
157
+ }
158
+ target = _object_without_properties_loose(source, excluded);
146
159
  if (Object.getOwnPropertySymbols) {
147
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
148
- for(i = 0; i < sourceSymbolKeys.length; i++){
149
- key = sourceSymbolKeys[i];
160
+ sourceKeys = Object.getOwnPropertySymbols(source);
161
+ for(i = 0; i < sourceKeys.length; i++){
162
+ key = sourceKeys[i];
150
163
  if (excluded.indexOf(key) >= 0) continue;
151
164
  if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
152
165
  target[key] = source[key];
@@ -156,12 +169,11 @@ function _object_without_properties(source, excluded) {
156
169
  }
157
170
  function _object_without_properties_loose(source, excluded) {
158
171
  if (source == null) return {};
159
- var target = {};
160
- var sourceKeys = Object.keys(source);
161
- var key, i;
172
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
162
173
  for(i = 0; i < sourceKeys.length; i++){
163
174
  key = sourceKeys[i];
164
175
  if (excluded.indexOf(key) >= 0) continue;
176
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
165
177
  target[key] = source[key];
166
178
  }
167
179
  return target;
@@ -198,29 +210,14 @@ function _unsupported_iterable_to_array(o, minLen) {
198
210
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
199
211
  }
200
212
  function _is_native_reflect_construct() {
201
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
202
- if (Reflect.construct.sham) return false;
203
- if (typeof Proxy === "function") return true;
204
213
  try {
205
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
206
- return true;
207
- } catch (e) {
208
- return false;
209
- }
210
- }
211
- function _create_super(Derived) {
212
- var hasNativeReflectConstruct = _is_native_reflect_construct();
213
- return function _createSuperInternal() {
214
- var Super = _get_prototype_of(Derived), result;
215
- if (hasNativeReflectConstruct) {
216
- var NewTarget = _get_prototype_of(this).constructor;
217
- result = Reflect.construct(Super, arguments, NewTarget);
218
- } else {
219
- result = Super.apply(this, arguments);
220
- }
221
- return _possible_constructor_return(this, result);
222
- };
214
+ var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
215
+ } catch (_) {}
216
+ return (_is_native_reflect_construct = function() {
217
+ return !!result;
218
+ })();
223
219
  }
220
+ // src/Loading/index.tsx
224
221
  import { PureComponent } from "react";
225
222
  // src/Loading/index.module.less
226
223
  var index_module_default = {
@@ -232,10 +229,9 @@ import { jsx } from "react/jsx-runtime";
232
229
  var Loading = /*#__PURE__*/ function(PureComponent) {
233
230
  "use strict";
234
231
  _inherits(Loading, PureComponent);
235
- var _super = _create_super(Loading);
236
232
  function Loading() {
237
233
  _class_call_check(this, Loading);
238
- return _super.apply(this, arguments);
234
+ return _call_super(this, Loading, arguments);
239
235
  }
240
236
  _create_class(Loading, [
241
237
  {
@@ -310,13 +306,13 @@ var MultiWindowSearch = memo(function(props) {
310
306
  children: [
311
307
  shouldShowSearch && /* @__PURE__ */ jsx2(Search, {
312
308
  className: MultiWindow_module_default.input,
313
- placeholder: "标签/单号",
309
+ placeholder: "\u6807\u7B7E/\u5355\u53F7",
314
310
  onSearch: handleSearch,
315
311
  allowClear: true,
316
312
  autoFocus: true
317
313
  }),
318
314
  !shouldShowSearch && /* @__PURE__ */ jsx2(Tooltip, {
319
- title: "搜索标签/单号",
315
+ title: "\u641C\u7D22\u6807\u7B7E/\u5355\u53F7",
320
316
  color: "var(--ant-color-primary)",
321
317
  mouseEnterDelay: 0.5,
322
318
  children: /* @__PURE__ */ jsx2(Button, {
@@ -406,7 +402,7 @@ var MultiWindowTabs = memo2(function(props) {
406
402
  items: pagePathsHelperData.keys,
407
403
  strategy: horizontalListSortingStrategy,
408
404
  children: /* @__PURE__ */ jsx3(DefaultTabBar, _object_spread_props(_object_spread({}, tabBarProps), {
409
- children: function(node) {
405
+ children: function children(node) {
410
406
  return /* @__PURE__ */ createElement(TabItem, _object_spread_props(_object_spread({}, node.props), {
411
407
  key: node.key,
412
408
  data: pagePathsHelperData.map.get(String(node.key)),
@@ -466,7 +462,7 @@ var TabItem = memo2(function(props) {
466
462
  popupMatchSelectWidth: false,
467
463
  size: "small",
468
464
  showSearch: true,
469
- placeholder: "请选择"
465
+ placeholder: "\u8BF7\u9009\u62E9"
470
466
  }, data.key);
471
467
  }, [
472
468
  data,
@@ -539,7 +535,7 @@ var MultiWindow = memo3(function(props) {
539
535
  });
540
536
  if (!searchResult.length) {
541
537
  var notFoundPagePath = {
542
- label: "未找到匹配的标签",
538
+ label: "\u672A\u627E\u5230\u5339\u914D\u7684\u6807\u7B7E",
543
539
  key: "notFound",
544
540
  fullPath: "/",
545
541
  disabled: true,
@@ -567,7 +563,7 @@ var MultiWindow = memo3(function(props) {
567
563
  var _currentStateRef_current = currentStateRef.current, pathKey2 = _currentStateRef_current.pathKey, prev = _currentStateRef_current.pagePaths;
568
564
  var newPagePaths = _to_consumable_array(prev);
569
565
  var newPagePath = {
570
- label: "加载中",
566
+ label: "\u52A0\u8F7D\u4E2D",
571
567
  key: newPathKey,
572
568
  fullPath: fullPath
573
569
  };
@@ -755,7 +751,7 @@ var MultiWindow = memo3(function(props) {
755
751
  onSearch: handleUpdateSearchPagePaths
756
752
  }),
757
753
  /* @__PURE__ */ jsx4(Tooltip2, {
758
- title: "刷新当前页面",
754
+ title: "\u5237\u65B0\u5F53\u524D\u9875\u9762",
759
755
  color: "var(--ant-color-primary)",
760
756
  mouseEnterDelay: 0.5,
761
757
  children: /* @__PURE__ */ jsx4(Button2, {
@@ -765,18 +761,18 @@ var MultiWindow = memo3(function(props) {
765
761
  })
766
762
  }),
767
763
  /* @__PURE__ */ jsx4(Tooltip2, {
768
- title: "关闭其他页面",
764
+ title: "\u5173\u95ED\u5176\u4ED6\u9875\u9762",
769
765
  color: "var(--ant-color-primary)",
770
766
  mouseEnterDelay: 0.5,
771
767
  children: /* @__PURE__ */ jsx4(Popconfirm, {
772
- title: "关闭其他页面",
768
+ title: "\u5173\u95ED\u5176\u4ED6\u9875\u9762",
773
769
  icon: /* @__PURE__ */ jsx4(QuestionCircleOutlined, {
774
770
  style: {
775
771
  color: "red"
776
772
  }
777
773
  }),
778
- okText: "确定",
779
- cancelText: "取消",
774
+ okText: "\u786E\u5B9A",
775
+ cancelText: "\u53D6\u6D88",
780
776
  onConfirm: handleRemoveOther,
781
777
  children: /* @__PURE__ */ jsx4(Button2, {
782
778
  icon: /* @__PURE__ */ jsx4(CloseOutlined, {}),
@@ -790,16 +786,16 @@ var MultiWindow = memo3(function(props) {
790
786
  })
791
787
  });
792
788
  });
793
- var createSearchCollectionKey = function(search) {
789
+ var createSearchCollectionKey = function createSearchCollectionKey(search) {
794
790
  var queryJson = queryString.parse(search);
795
791
  if (queryJson.ts) delete queryJson.ts;
796
792
  return queryString.stringify(queryJson, {
797
- sort: function(itemLeft, itemRight) {
793
+ sort: function sort(itemLeft, itemRight) {
798
794
  return itemLeft.localeCompare(itemRight);
799
795
  }
800
796
  });
801
797
  };
802
- var checkCanEnableCollection = function(path) {
798
+ var checkCanEnableCollection = function checkCanEnableCollection(path) {
803
799
  var blackList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
804
800
  var _path_split_pop;
805
801
  var isDetailPage = !!((_path_split_pop = path.split("/").pop()) === null || _path_split_pop === void 0 ? void 0 : _path_split_pop.toLowerCase().includes("detail"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfe-repo/web-components",
3
- "version": "1.2.7",
3
+ "version": "1.5.0",
4
4
  "module": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": [
@@ -32,20 +32,21 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@swc/core": "^1.3.100",
35
- "@types/node": "^20.16.5",
35
+ "@types/node": "^20.17.0",
36
36
  "@types/react": "^18",
37
37
  "esbuild-plugin-less": "^1.3.9",
38
- "@xfe-repo/typescript-config": "0.0.6",
39
- "@xfe-repo/eslint-config": "0.0.5"
38
+ "eslint": "8.57.1",
39
+ "@xfe-repo/eslint-config": "1.5.0",
40
+ "@xfe-repo/typescript-config": "1.5.0"
40
41
  },
41
42
  "peerDependencies": {
42
43
  "@ant-design/icons": "^5.0.0",
43
44
  "antd": "^5.24.5",
44
45
  "react": "18.2.0",
45
46
  "react-dom": "18.2.0",
46
- "@xfe-repo/web-micro": "1.2.5",
47
- "@xfe-repo/web-router": "1.2.6",
48
- "@xfe-repo/web-utils": "1.3.8"
47
+ "@xfe-repo/web-micro": "1.5.0",
48
+ "@xfe-repo/web-router": "1.5.0",
49
+ "@xfe-repo/web-utils": "1.5.0"
49
50
  },
50
51
  "publishConfig": {
51
52
  "registry": "https://registry.npmjs.org/"
@@ -53,7 +54,7 @@
53
54
  "scripts": {
54
55
  "build": "tsup",
55
56
  "dev": "tsup --watch",
56
- "lint": "eslint \"src/**/*.ts*\"",
57
+ "lint": "eslint \"src/**/*.ts*\" --fix",
57
58
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
58
59
  }
59
60
  }