@pisell/materials 6.4.13 → 6.4.14

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 (74) hide show
  1. package/build/lowcode/index.js +1 -1
  2. package/build/lowcode/meta.js +1 -1
  3. package/build/lowcode/preview.js +9 -9
  4. package/build/lowcode/render/default/view.js +23 -23
  5. package/build/lowcode/view.js +24 -24
  6. package/es/components/cardPro/index.d.ts +4 -0
  7. package/es/components/cardPro/index.js +3 -10
  8. package/es/components/dataSourceComponents/dataSourceForm/utils.js +31 -5
  9. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -1
  10. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +4 -2
  11. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -3
  12. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +70 -28
  13. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +2 -2
  14. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +24 -2
  15. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +8 -2
  16. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +45 -13
  17. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +3 -2
  18. package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +76 -8
  19. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  20. package/es/components/dataSourceComponents/fields/index.d.ts +19 -19
  21. package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -1
  22. package/es/components/dataSourceComponents/hooks/usePlatform.js +9 -1
  23. package/es/components/drag-sort-tree/TreeItem/index.d.ts +1 -0
  24. package/es/components/filter/types.d.ts +2 -1
  25. package/es/components/iconfont/index.d.ts +8 -0
  26. package/es/components/iconfont/index.js +1 -1
  27. package/es/components/table/Actions/index.d.ts +1 -0
  28. package/es/components/table/Actions/index.js +4 -1
  29. package/es/components/table/Table/fields/index.d.ts +2 -2
  30. package/es/components/table/Table/utils.d.ts +1 -1
  31. package/es/components/table/hooks/useTableSetting.js +2 -2
  32. package/es/components/virtual-keyboard/Amount/index.d.ts +1 -0
  33. package/es/locales/en-US.d.ts +297 -0
  34. package/es/locales/en-US.js +1 -16
  35. package/es/locales/zh-CN.d.ts +292 -0
  36. package/es/locales/zh-CN.js +1 -16
  37. package/es/locales/zh-TW.d.ts +292 -0
  38. package/es/locales/zh-TW.js +1 -16
  39. package/lib/components/cardPro/index.d.ts +4 -0
  40. package/lib/components/cardPro/index.js +2 -3
  41. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +26 -2
  42. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -1
  43. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +4 -2
  44. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -3
  45. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +67 -18
  46. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +2 -2
  47. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +29 -7
  48. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +8 -2
  49. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +41 -9
  50. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +3 -2
  51. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +53 -11
  52. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  53. package/lib/components/dataSourceComponents/fields/index.d.ts +19 -19
  54. package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -1
  55. package/lib/components/dataSourceComponents/hooks/usePlatform.js +12 -0
  56. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +1 -0
  57. package/lib/components/filter/types.d.ts +2 -1
  58. package/lib/components/iconfont/index.d.ts +8 -0
  59. package/lib/components/iconfont/index.js +1 -1
  60. package/lib/components/table/Actions/index.d.ts +1 -0
  61. package/lib/components/table/Actions/index.js +4 -1
  62. package/lib/components/table/Table/fields/index.d.ts +2 -2
  63. package/lib/components/table/Table/utils.d.ts +1 -1
  64. package/lib/components/table/hooks/useTableSetting.js +2 -2
  65. package/lib/components/virtual-keyboard/Amount/index.d.ts +1 -0
  66. package/lib/locales/en-US.d.ts +297 -0
  67. package/lib/locales/en-US.js +1 -12
  68. package/lib/locales/zh-CN.d.ts +292 -0
  69. package/lib/locales/zh-CN.js +1 -12
  70. package/lib/locales/zh-TW.d.ts +292 -0
  71. package/lib/locales/zh-TW.js +1 -12
  72. package/lowcode/form-item-input.mobile/meta.ts +22 -0
  73. package/lowcode/form-item-input.phone/meta.ts +22 -0
  74. package/package.json +1 -1
@@ -1,4 +1,7 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["appHelper"];
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
2
5
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -7,10 +10,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
10
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
11
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
9
12
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
10
- import { useEffect, useMemo } from "react";
13
+ import { useEffect, useMemo } from 'react';
11
14
  import { useRequest } from 'ahooks';
12
15
  import { request } from "../../../table/utils";
13
- import { useIsShop } from "../../hooks/usePlatform";
16
+ import { useIsShop, useIsH5, useIsPc } from "../../hooks/usePlatform";
14
17
  import useEngineContext from "../../../../hooks/useEngineContext";
15
18
 
16
19
  /**
@@ -27,7 +30,7 @@ export var getCountryDataList = /*#__PURE__*/function () {
27
30
  isNocobase: true,
28
31
  fullResult: true,
29
32
  headers: {
30
- "x-data-source": "pisell2"
33
+ 'x-data-source': 'pisell2'
31
34
  }
32
35
  });
33
36
  case 2:
@@ -48,10 +51,41 @@ export var getCountryDataList = /*#__PURE__*/function () {
48
51
  return _ref.apply(this, arguments);
49
52
  };
50
53
  }();
54
+ export var getShopCountryDataList = /*#__PURE__*/function () {
55
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(locale) {
56
+ var _yield$request$getReq2, data;
57
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
58
+ while (1) switch (_context2.prev = _context2.next) {
59
+ case 0:
60
+ _context2.next = 2;
61
+ return request.getRequest().get('/shop/area/country', {
62
+ 'translate-locale': locale || 'en'
63
+ });
64
+ case 2:
65
+ _yield$request$getReq2 = _context2.sent;
66
+ data = _yield$request$getReq2.data;
67
+ return _context2.abrupt("return", data.map(function (item) {
68
+ return _objectSpread(_objectSpread({}, item), {}, {
69
+ prefix: "+".concat(item.calling_code)
70
+ });
71
+ }));
72
+ case 5:
73
+ case "end":
74
+ return _context2.stop();
75
+ }
76
+ }, _callee2);
77
+ }));
78
+ return function getShopCountryDataList(_x) {
79
+ return _ref2.apply(this, arguments);
80
+ };
81
+ }();
51
82
  export var useCountries = function useCountries() {
52
83
  var isShop = useIsShop();
84
+ var isH5 = useIsH5();
85
+ var isPc = useIsPc();
53
86
  var _useEngineContext = useEngineContext(),
54
- appHelper = _useEngineContext.appHelper;
87
+ appHelper = _useEngineContext.appHelper,
88
+ others = _objectWithoutProperties(_useEngineContext, _excluded);
55
89
  var _useRequest = useRequest(getCountryDataList, {
56
90
  cacheKey: 'phone-countries',
57
91
  staleTime: 1000 * 60 * 5,
@@ -62,15 +96,39 @@ export var useCountries = function useCountries() {
62
96
  }),
63
97
  data = _useRequest.data,
64
98
  run = _useRequest.run;
99
+ var _useRequest2 = useRequest(getShopCountryDataList, {
100
+ cacheKey: 'phone-shop-countries',
101
+ staleTime: 1000 * 60 * 5,
102
+ // 5分钟后数据过期
103
+ cacheTime: 1000 * 60 * 60,
104
+ // 1小时后清除缓存
105
+ manual: true
106
+ }),
107
+ shopData = _useRequest2.data,
108
+ runShop = _useRequest2.run;
65
109
  useEffect(function () {
66
- if (!isShop) {
110
+ if (!isShop && !isPc && !isH5) {
67
111
  run();
68
112
  }
69
113
  }, [isShop]);
114
+ useEffect(function () {
115
+ var _appHelper$utils;
116
+ if (isShop && !(appHelper !== null && appHelper !== void 0 && (_appHelper$utils = appHelper.utils) !== null && _appHelper$utils !== void 0 && (_appHelper$utils = _appHelper$utils.store) !== null && _appHelper$utils !== void 0 && (_appHelper$utils = _appHelper$utils.getState()) !== null && _appHelper$utils !== void 0 && (_appHelper$utils = _appHelper$utils.global) !== null && _appHelper$utils !== void 0 && (_appHelper$utils = _appHelper$utils.codeList) !== null && _appHelper$utils !== void 0 && _appHelper$utils.length)) {
117
+ var _others$engine;
118
+ runShop(others === null || others === void 0 || (_others$engine = others.engine) === null || _others$engine === void 0 || (_others$engine = _others$engine.props) === null || _others$engine === void 0 ? void 0 : _others$engine.locale);
119
+ }
120
+ }, [isShop]);
70
121
  var currentData = useMemo(function () {
71
122
  if (isShop) {
72
- var _appHelper$utils;
73
- var codeList = appHelper === null || appHelper === void 0 || (_appHelper$utils = appHelper.utils) === null || _appHelper$utils === void 0 || (_appHelper$utils = _appHelper$utils.store) === null || _appHelper$utils === void 0 || (_appHelper$utils = _appHelper$utils.getState()) === null || _appHelper$utils === void 0 || (_appHelper$utils = _appHelper$utils.global) === null || _appHelper$utils === void 0 ? void 0 : _appHelper$utils.codeList;
123
+ var _appHelper$utils2;
124
+ return ((appHelper === null || appHelper === void 0 || (_appHelper$utils2 = appHelper.utils) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.store) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.getState()) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.global) === null || _appHelper$utils2 === void 0 ? void 0 : _appHelper$utils2.codeList) || shopData).map(function (item) {
125
+ return _objectSpread(_objectSpread({}, item), {}, {
126
+ prefix: "+".concat(item.calling_code)
127
+ });
128
+ });
129
+ } else if (isPc) {
130
+ var _appHelper$utils3;
131
+ var codeList = appHelper === null || appHelper === void 0 || (_appHelper$utils3 = appHelper.utils) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.store) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.getState()) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.country) === null || _appHelper$utils3 === void 0 ? void 0 : _appHelper$utils3.country;
74
132
  if (codeList) {
75
133
  return codeList.map(function (item) {
76
134
  return _objectSpread(_objectSpread({}, item), {}, {
@@ -78,9 +136,19 @@ export var useCountries = function useCountries() {
78
136
  });
79
137
  });
80
138
  }
139
+ } else if (isH5) {
140
+ var _appHelper$utils4;
141
+ var _codeList = appHelper === null || appHelper === void 0 || (_appHelper$utils4 = appHelper.utils) === null || _appHelper$utils4 === void 0 || (_appHelper$utils4 = _appHelper$utils4.getStore()) === null || _appHelper$utils4 === void 0 || (_appHelper$utils4 = _appHelper$utils4.getState()) === null || _appHelper$utils4 === void 0 || (_appHelper$utils4 = _appHelper$utils4.country) === null || _appHelper$utils4 === void 0 ? void 0 : _appHelper$utils4.country;
142
+ if (_codeList) {
143
+ return _codeList.map(function (item) {
144
+ return _objectSpread(_objectSpread({}, item), {}, {
145
+ prefix: "+".concat(item.calling_code)
146
+ });
147
+ });
148
+ }
81
149
  }
82
150
  return data;
83
- }, [isShop, data]);
151
+ }, [isShop, data, shopData]);
84
152
  return {
85
153
  data: currentData
86
154
  };
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  declare const Subdomain: React.FC<import("antd").InputProps & {
3
3
  onChange: (value: string) => void;
4
4
  onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
5
- rootDomain: "custom" | "saas" | "xzero";
5
+ rootDomain: "custom" | "xzero" | "saas";
6
6
  customDomain?: string | undefined;
7
7
  value?: string | undefined;
8
8
  tenantId: string;
@@ -20,7 +20,7 @@ declare const formFieldMap: {
20
20
  Subdomain: import("react").FC<import("antd").InputProps & {
21
21
  onChange: (value: string) => void;
22
22
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
23
- rootDomain: "custom" | "saas" | "xzero";
23
+ rootDomain: "custom" | "xzero" | "saas";
24
24
  customDomain?: string | undefined;
25
25
  value?: string | undefined;
26
26
  tenantId: string;
@@ -60,7 +60,21 @@ declare const formFieldMap: {
60
60
  FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
61
61
  FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
62
62
  };
63
- declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
63
+ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<any> | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
64
+ options?: any;
65
+ optionSourceType?: "default" | "custom" | "api" | undefined;
66
+ labelField: string;
67
+ valueField: string;
68
+ extraParams?: Record<string, any> | undefined;
69
+ } & {
70
+ dataSource?: any;
71
+ }) => JSX.Element) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
72
+ Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
73
+ } & {
74
+ Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
75
+ }) | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
76
+ onChange: (value: string) => void;
77
+ } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
64
78
  JSON: import("react").FC<any>;
65
79
  Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
66
80
  TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
@@ -73,30 +87,16 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
73
87
  Subdomain: import("react").FC<import("antd").InputProps & {
74
88
  onChange: (value: string) => void;
75
89
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
76
- rootDomain: "custom" | "saas" | "xzero";
90
+ rootDomain: "custom" | "xzero" | "saas";
77
91
  customDomain?: string | undefined;
78
92
  value?: string | undefined;
79
93
  tenantId: string;
80
94
  name?: string | undefined;
81
95
  fieldKey?: string | undefined;
82
96
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
83
- }) | (import("react").FC<{}> & {
97
+ }) | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
84
98
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
85
99
  } & {
86
100
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
87
- }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
88
- Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
89
- } & {
90
- Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
91
- }) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
92
- options?: any;
93
- optionSourceType?: "default" | "custom" | "api" | undefined;
94
- labelField: string;
95
- valueField: string;
96
- extraParams?: Record<string, any> | undefined;
97
- } & {
98
- dataSource?: any;
99
- }) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
100
- onChange: (value: string) => void;
101
- } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
101
+ });
102
102
  export { getFieldComponent, formFieldMap };
@@ -1,3 +1,5 @@
1
1
  declare const usePlatform: () => any;
2
2
  declare const useIsShop: () => boolean;
3
- export { usePlatform, useIsShop };
3
+ declare const useIsH5: () => boolean;
4
+ declare const useIsPc: () => boolean;
5
+ export { usePlatform, useIsShop, useIsH5, useIsPc };
@@ -9,4 +9,12 @@ var useIsShop = function useIsShop() {
9
9
  var platform = usePlatform();
10
10
  return platform === 'shop';
11
11
  };
12
- export { usePlatform, useIsShop };
12
+ var useIsH5 = function useIsH5() {
13
+ var platform = usePlatform();
14
+ return platform === 'h5';
15
+ };
16
+ var useIsPc = function useIsPc() {
17
+ var platform = usePlatform();
18
+ return platform === 'pc';
19
+ };
20
+ export { usePlatform, useIsShop, useIsH5, useIsPc };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  import { ValueProps, SortType } from '../types';
3
4
  declare type IdType = string | number;
@@ -10,11 +10,12 @@ export declare type FilterType = {
10
10
  /** 筛选列表 */
11
11
  list: FilterItemProps[];
12
12
  items?: string[];
13
- __items: string[];
14
13
  /** 快速筛选最大长度 */
15
14
  quickFilterMaxLength: number;
16
15
  /** 配置存储模式 */
17
16
  storageMode: "" | "localStorage";
17
+ /** 筛选列表项dom */
18
+ dom?: any;
18
19
  };
19
20
  /**
20
21
  * 筛选列表项配置
@@ -0,0 +1,8 @@
1
+ import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
2
+ import React from 'react';
3
+ interface IconFontProps extends IconComponentProps {
4
+ type: string;
5
+ onClick?: React.MouseEventHandler<HTMLSpanElement>;
6
+ }
7
+ declare const IconFont: React.FC<IconFontProps>;
8
+ export default IconFont;
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
  import { createFromIconfontCN } from '@ant-design/icons';
3
3
  import React from 'react';
4
4
  var MyIcon = createFromIconfontCN({
5
- scriptUrl: 'https://static.pisellcdn.com/pisell2iconfont1.16.js' // 在 iconfont.cn 上生成
5
+ scriptUrl: 'https://static.pisellcdn.com/pisell2iconfont1.14.js' // 在 iconfont.cn 上生成
6
6
  });
7
7
  var IconFont = function IconFont(props) {
8
8
  return /*#__PURE__*/React.createElement(MyIcon, _extends({}, props, {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FilterType } from "../../filter/types";
2
3
  import { ColumnSettingType, DataSourceGroupType, ExportImportType, GallerySettingType, GridViewType, SortType } from "../types";
3
4
  import "./index.less";
@@ -28,7 +28,7 @@ var Actions = function Actions(_ref) {
28
28
  preserve: true
29
29
  });
30
30
  var showActions = useMemo(function () {
31
- if ( /*#__PURE__*/React.isValidElement(filter)) {
31
+ if ( /*#__PURE__*/React.isValidElement(filter) || /*#__PURE__*/React.isValidElement(filter === null || filter === void 0 ? void 0 : filter.dom)) {
32
32
  return true;
33
33
  }
34
34
  return (filter === null || filter === void 0 ? void 0 : filter.show) || (sort === null || sort === void 0 ? void 0 : sort.show) || (columnSetting === null || columnSetting === void 0 ? void 0 : columnSetting.show) || (dataSourceGroup === null || dataSourceGroup === void 0 ? void 0 : dataSourceGroup.show) || view.multiple || (exportImport === null || exportImport === void 0 ? void 0 : exportImport.show);
@@ -37,6 +37,9 @@ var Actions = function Actions(_ref) {
37
37
  if ( /*#__PURE__*/React.isValidElement(filter)) {
38
38
  return filter;
39
39
  }
40
+ if ( /*#__PURE__*/React.isValidElement(filter === null || filter === void 0 ? void 0 : filter.dom)) {
41
+ return filter.dom;
42
+ }
40
43
  return /*#__PURE__*/React.createElement(Filter, {
41
44
  filter: filter,
42
45
  isRenderFormContent: false,
@@ -198,12 +198,12 @@ export declare const fieldList: ({
198
198
  field_icon: string;
199
199
  field_name: string;
200
200
  field_type: string;
201
- default_value: boolean;
201
+ default_value: string;
202
202
  } | {
203
203
  field_icon: string;
204
204
  field_name: string;
205
205
  field_type: string;
206
- default_value: string;
206
+ default_value: boolean;
207
207
  } | {
208
208
  field_icon: string;
209
209
  field_name: string;
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filters" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "view_mode" | "gallery_setting")[];
158
+ }) => ("filters" | "filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -231,8 +231,8 @@ var useTableSetting = function useTableSetting(params) {
231
231
  }
232
232
  } else {
233
233
  var names = new Set();
234
- if ( /*#__PURE__*/React.isValidElement(filter)) {
235
- names = new Set(((filter === null || filter === void 0 ? void 0 : filter.__items) || []).filter(function (item) {
234
+ if ( /*#__PURE__*/React.isValidElement(filter) || /*#__PURE__*/React.isValidElement(filter === null || filter === void 0 ? void 0 : filter.dom)) {
235
+ names = new Set(((filter === null || filter === void 0 ? void 0 : filter.items) || []).filter(function (item) {
236
236
  return !item.isHidden;
237
237
  }).map(function (item) {
238
238
  var rawName = item === null || item === void 0 ? void 0 : item.value;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { AmountProps, RightItemsStyleProps } from './types';
2
3
  import './index.less';
3
4
  export type { AmountProps, RightItemsStyleProps };