@chaoswise/business 0.0.18 → 1.0.1

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 (91) hide show
  1. package/config/babel/index.js +2 -29
  2. package/config/swc.js +5 -0
  3. package/lib/AggregateSearch/CLSPL/SPLStagy.js +17 -7
  4. package/lib/AggregateSearch/CLSPL/index.js +17 -5
  5. package/lib/AggregateSearch/components/CloseAllIcon/index.js +1 -1
  6. package/lib/AggregateSearch/components/DropDown/config.js +54 -0
  7. package/lib/AggregateSearch/components/DropDown/index.js +57 -76
  8. package/lib/AggregateSearch/components/DropDown/index.less +18 -17
  9. package/lib/AggregateSearch/components/SwitchBtn/index.js +9 -7
  10. package/lib/AggregateSearch/index.js +47 -37
  11. package/lib/AggregateSearch/index.less +2 -1
  12. package/lib/AggregateSearch/utils/index.js +1 -1
  13. package/lib/ContentEditableSearch/components/CloseAllIcon/index.js +13 -0
  14. package/lib/ContentEditableSearch/components/CloseAllIcon/index.less +11 -0
  15. package/lib/ContentEditableSearch/index.js +157 -0
  16. package/lib/ContentEditableSearch/index.less +65 -0
  17. package/lib/ContentEditableSearch/utils/index.js +98 -0
  18. package/lib/PropertyControlViewer/components/DoAppIcon/CustomIcon/index.js +1 -1
  19. package/lib/PropertyControlViewer/components/DoCiUnitBitmap.js +1 -1
  20. package/lib/PropertyControlViewer/components/DoCommon.js +20 -17
  21. package/lib/PropertyControlViewer/components/DoQuote/components/QuoteView.js +3 -3
  22. package/lib/PropertyControlViewer/components/DoSelect.js +1 -1
  23. package/lib/PropertyControlViewer/components/DoUser.js +15 -19
  24. package/lib/PropertyControlViewer/components/TagShowMoreList/index.js +8 -3
  25. package/lib/PropertyControlViewer/config/utils.js +58 -59
  26. package/lib/PropertyControlViewer/index.js +83 -15
  27. package/lib/PropertyControlViewer/index.less +1 -0
  28. package/lib/Watermark/index.js +35 -16
  29. package/lib/index.js +2 -1
  30. package/lib/locales/en_US.json +1 -0
  31. package/lib/locales/index.js +42 -0
  32. package/lib/locales/intl.js +75 -0
  33. package/lib/locales/withLocale.js +37 -0
  34. package/lib/locales/zh_CN.json +1 -0
  35. package/lib/locales/zh_TW.json +1 -0
  36. package/package.json +12 -7
  37. package/config/babel/antdComs.js +0 -51
  38. package/config/babel/formily.js +0 -22
  39. package/config/city/citys.js +0 -1964
  40. package/config/theme/CWTheme.js +0 -427
  41. package/config/theme/chart.dark.js +0 -394
  42. package/config/theme/chart.light.js +0 -3
  43. package/config/theme/common.less +0 -161
  44. package/config/theme/dark.js +0 -784
  45. package/config/theme/dark.less +0 -80
  46. package/config/theme/default.js +0 -717
  47. package/config/theme/default.less +0 -144
  48. package/config/theme/style/color/bezierEasing.less +0 -110
  49. package/config/theme/style/color/colorPalette.less +0 -85
  50. package/config/theme/style/color/colors.less +0 -162
  51. package/config/theme/style/color/tinyColor.less +0 -1184
  52. package/config/theme/style/compact.less +0 -4
  53. package/config/theme/style/components.less +0 -65
  54. package/config/theme/style/core/base.less +0 -10
  55. package/config/theme/style/core/global.less +0 -491
  56. package/config/theme/style/core/iconfont.less +0 -22
  57. package/config/theme/style/core/index.less +0 -5
  58. package/config/theme/style/core/motion/fade.less +0 -34
  59. package/config/theme/style/core/motion/move.less +0 -129
  60. package/config/theme/style/core/motion/other.less +0 -51
  61. package/config/theme/style/core/motion/slide.less +0 -129
  62. package/config/theme/style/core/motion/zoom.less +0 -179
  63. package/config/theme/style/core/motion.less +0 -22
  64. package/config/theme/style/css.js +0 -3
  65. package/config/theme/style/dark.less +0 -4
  66. package/config/theme/style/default.css +0 -1784
  67. package/config/theme/style/default.less +0 -4
  68. package/config/theme/style/index-pure.less +0 -2
  69. package/config/theme/style/index.css +0 -1784
  70. package/config/theme/style/index.d.ts +0 -1
  71. package/config/theme/style/index.js +0 -3
  72. package/config/theme/style/index.less +0 -3
  73. package/config/theme/style/mixins/box.less +0 -7
  74. package/config/theme/style/mixins/clearfix.less +0 -16
  75. package/config/theme/style/mixins/compatibility.less +0 -13
  76. package/config/theme/style/mixins/customize.less +0 -181
  77. package/config/theme/style/mixins/iconfont.less +0 -28
  78. package/config/theme/style/mixins/index.less +0 -14
  79. package/config/theme/style/mixins/modal-mask.less +0 -30
  80. package/config/theme/style/mixins/motion.less +0 -33
  81. package/config/theme/style/mixins/operation-unit.less +0 -16
  82. package/config/theme/style/mixins/reset.less +0 -11
  83. package/config/theme/style/mixins/rounded-arrow.less +0 -44
  84. package/config/theme/style/mixins/size.less +0 -10
  85. package/config/theme/style/mixins/typography.less +0 -58
  86. package/config/theme/style/themes/compact.less +0 -295
  87. package/config/theme/style/themes/dark.less +0 -457
  88. package/config/theme/style/themes/default.less +0 -1080
  89. package/config/theme/style/themes/index.less +0 -7
  90. package/config/theme/style/themes/variable.less +0 -1135
  91. package/config/theme/style/variable.less +0 -4
@@ -2,25 +2,24 @@ import _Watermark from "@chaoswise/ui/lib/Watermark";
2
2
  var _excluded = ["type", "fetchWatermark", "densityConfig", "children"];
3
3
  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); }
4
4
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
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; }
6
- 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); } }
7
- 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); }); }; }
8
5
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
6
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
7
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
8
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
9
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ 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; }
12
+ 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); } }
13
+ 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); }); }; }
14
14
  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; }
15
15
  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; }
16
16
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
17
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
18
18
  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); }
19
- import React, { useEffect, useState, useRef, useCallback, useMemo } from "react";
19
+ import React, { useEffect, useState, useRef, useCallback } from "react";
20
20
  import PropTypes from "prop-types";
21
21
  import moment from "moment";
22
22
  import "./index.less";
23
- import { fetchGet } from "@chaoswise/request";
24
23
 
25
24
  // 疏密类型
26
25
  var DENSITY = {
@@ -41,7 +40,27 @@ var WatermarkCom = function WatermarkCom(_ref) {
41
40
  var _ref$type = _ref.type,
42
41
  type = _ref$type === void 0 ? "desktop" : _ref$type,
43
42
  _ref$fetchWatermark = _ref.fetchWatermark,
44
- fetchWatermark = _ref$fetchWatermark === void 0 ? fetchGet("/docp/gateway/douc/api/v1/watermark/query") : _ref$fetchWatermark,
43
+ fetchWatermark = _ref$fetchWatermark === void 0 ? /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
44
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
45
+ while (1) switch (_context.prev = _context.next) {
46
+ case 0:
47
+ return _context.abrupt("return", fetch("/docp/gateway/douc/api/v1/watermark/query").then(function (res) {
48
+ return res.json();
49
+ }).then(function (res) {
50
+ if (res && res.code === 100000) {
51
+ return res.data;
52
+ } else {
53
+ console.error(res);
54
+ }
55
+ })["catch"](function (error) {
56
+ console.error(error);
57
+ }));
58
+ case 1:
59
+ case "end":
60
+ return _context.stop();
61
+ }
62
+ }, _callee);
63
+ })) : _ref$fetchWatermark,
45
64
  _ref$densityConfig = _ref.densityConfig,
46
65
  densityConfig = _ref$densityConfig === void 0 ? {} : _ref$densityConfig,
47
66
  children = _ref.children,
@@ -70,20 +89,20 @@ var WatermarkCom = function WatermarkCom(_ref) {
70
89
  }, [densityConfig, type]);
71
90
  useEffect(function () {
72
91
  var fetchWatermarkFn = /*#__PURE__*/function () {
73
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
92
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
74
93
  var watermarkInfo, status, params, density, size, transparency, rotation, timeStrField, props;
75
- return _regeneratorRuntime().wrap(function _callee$(_context) {
76
- while (1) switch (_context.prev = _context.next) {
94
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
95
+ while (1) switch (_context2.prev = _context2.next) {
77
96
  case 0:
78
- _context.next = 2;
97
+ _context2.next = 2;
79
98
  return fetchWatermark();
80
99
  case 2:
81
- watermarkInfo = _context.sent;
100
+ watermarkInfo = _context2.sent;
82
101
  if (watermarkInfo) {
83
- _context.next = 5;
102
+ _context2.next = 5;
84
103
  break;
85
104
  }
86
- return _context.abrupt("return");
105
+ return _context2.abrupt("return");
87
106
  case 5:
88
107
  status = watermarkInfo.status, params = watermarkInfo.params, density = watermarkInfo.density, size = watermarkInfo.size, transparency = watermarkInfo.transparency, rotation = watermarkInfo.rotation; // 处理时间戳
89
108
  timeStrField = params === null || params === void 0 ? void 0 : params.find(function (filed) {
@@ -109,12 +128,12 @@ var WatermarkCom = function WatermarkCom(_ref) {
109
128
  setWatermarkProps(props);
110
129
  case 11:
111
130
  case "end":
112
- return _context.stop();
131
+ return _context2.stop();
113
132
  }
114
- }, _callee);
133
+ }, _callee2);
115
134
  }));
116
135
  return function fetchWatermarkFn() {
117
- return _ref2.apply(this, arguments);
136
+ return _ref3.apply(this, arguments);
118
137
  };
119
138
  }();
120
139
  fetchWatermarkFn();
package/lib/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as PropertyControlViewer } from "./PropertyControlViewer";
2
2
  export { default as AggregateSearch } from "./AggregateSearch";
3
- export { default as Watermark } from "./Watermark";
3
+ export { default as Watermark } from "./Watermark";
4
+ export { default as ContentEditableSearch } from "./ContentEditableSearch";
@@ -0,0 +1 @@
1
+ {"0ee18787-448b-4f7b-a3f2-5067a38c9a26":"User group:","15444b85-9196-4bb6-97bd-eb5cd4186cb9":"search criteria copied","1cd159c8-2a4d-4208-a170-55a34b91f671":"No data available. Please submit the search to search for keywords.","1e9cc6b2-f761-4aaa-a216-9f842c6f8fce":"Switch to filter mode","229e8f35-ce6c-403a-b52e-05346dd8eb0b":"wildcard: *?","2bf0d704-4106-4359-8488-d0e395f37d34":"Missing {slot1} after {slot0}","2e8bd2b4-57bf-4778-a254-3b577d0241c5":"combination symbols","30a2737a-c786-4f9f-bb22-02ca27a557ff":"End","3190d9a0-41bf-42b3-adf9-9d22a337f65d":"Department","324f8bc5-e6dc-46b5-a18b-8c4e55c7352e":"Group","3431b29b-5fb7-411f-8a1d-8d7676b03264":"Help","354fbc6d-1abb-4510-81a9-9aa2efa6f482":"search history","3f52c2a1-892d-47fe-b296-49a35ff8c4ee":"Syntax error","43395ce9-35f2-4a6d-9e84-8c277369157b":"Username:","4412a02d-d11d-4231-bf91-fd65afd9ea77":"tag search","47e5459f-882c-4395-a8f1-d49e89b0a263":"is not","48b09da1-28bf-497d-a327-0ad6e3ef9af1":"bracket","4ced2ca1-2a3f-49d9-9907-1b404d5a1586":"There is <unknown input>","51b43939-ce6a-4a41-9038-832b8ab4a175":"Loading...","5b412c79-b099-47cd-8745-21264d9212c4":"Name","5faa90fc-6455-499a-a0d5-c7ff9c9867df":"Switch to manual CQL syntax mode","7058c2d9-91f3-4fe6-8a38-2c145a627959":"Less than","719234f9-de71-4fc6-ab3f-59287ff20570":"Greater than","79279aa4-ad27-4082-8093-06122d68c611":"Department:","88d7ad39-7f49-459f-a1fd-48dd4c0ff9d5":"Email:","8b3465a5-e2ca-4f7c-af17-2cb091ef40fe":"{slot0} followed by the expectation {slot1}","905a2fe5-4c8a-467e-813a-963fdb268b10":"Phone","914a6df4-9561-4345-a98c-0559e3f787ff":"Less than or equal to","94f38306-0e2c-4d1c-beff-64d14bd7da20":"Unnecessary input of {tokenName}, expecting {slot0}","b2df07f1-b093-4f56-9ec2-af471999634d":"Location","b59f74be-dff0-4e3e-92db-354b475c3efd":"Username:","bc71d288-1654-454d-8639-5ed225d8d6f6":"User group","bdfe4b04-efd7-4f93-a6ba-3954aca3b0eb":"numeric range","be953f09-653f-4715-a3b9-9e0faef199b3":"full-text search: hello world","cfbba0e5-b133-4bd7-9b8c-3c92368fe049":"Name:","d6f72140-92e1-4214-8bcb-d548fa8ed1ce":"Incomplete statement, missing end","db3f4bef-089e-4144-861d-29f79fa4cd38":"Phone:","df7b8ec5-840a-4fc7-aa8c-806d470ec97c":"is","e28ef3cf-569c-49f8-99b3-533e5013cb9d":"Email ","e633ed68-a12e-4af5-9a7a-d2eb476f4cef":"Greater than or equal to","e7413527-a5ee-4057-b765-3595cd26c09b":"related search: status:(error OR warning) AND NOT service:\"service_a\"","e94234be-e478-4314-bc85-572cc285f5f9":"Description","f2447d25-e81c-4656-9e4c-f66741dd8a52":"matching mode","f307bd91-6737-4667-9e89-daec35b21198":"Description:","fbda5bcb-67b0-4b7c-85fd-fb30068f73a0":"Field name","fc7ca498-ab95-4a4b-9f5f-0d024cc127c3":"The component is not registered yet","ff777cfe-21b4-4eb0-bf80-ebd92081fdf5":"exact match: \"hello world\""}
@@ -0,0 +1,42 @@
1
+ import { useEffect, useContext, useMemo } from "react";
2
+ import intl, { useForceUpdate, TagInitInstance, injectLocale } from "./intl";
3
+ import { intlContext } from '@chaoswise/ui/lib/ConfigProvider/ConfigProvider';
4
+ import withLocale from "./withLocale";
5
+
6
+ // 初始化默认值取消warning
7
+ intl.init({
8
+ currentLocale: 'default',
9
+ locales: {},
10
+ warningHandler: function warningHandler() {
11
+ return null;
12
+ }
13
+ });
14
+
15
+ // 导出TagInitInstance
16
+ export { TagInitInstance, useForceUpdate, withLocale };
17
+ export var useIntl = function useIntl() {
18
+ var _useContext = useContext(intlContext),
19
+ locale = _useContext.locale;
20
+
21
+ // 兼容映射
22
+ var currentLocale = useMemo(function () {
23
+ var map = {
24
+ zh: "zh_CN",
25
+ en: "en_US"
26
+ };
27
+ return map[locale] || locale;
28
+ }, [locale]);
29
+ var forceUpdate = useForceUpdate();
30
+ useEffect(function () {
31
+ // 有组件注册过就不再注册
32
+ if (TagInitInstance.getCurrentLocale() === currentLocale) {
33
+ return;
34
+ }
35
+ injectLocale(currentLocale, function () {
36
+ TagInitInstance.setCurrentLocale(currentLocale);
37
+ forceUpdate();
38
+ });
39
+ }, [currentLocale]);
40
+ return intl;
41
+ };
42
+ export default intl;
@@ -0,0 +1,75 @@
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
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
5
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ 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
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ import { useCallback, useState } from 'react';
15
+ import { ReactIntlUniversal } from 'react-intl-universal';
16
+ var IntlInstance = new ReactIntlUniversal();
17
+ var createNewObject = function createNewObject() {
18
+ return {};
19
+ };
20
+ export function useForceUpdate() {
21
+ var _useState = useState(createNewObject),
22
+ _useState2 = _slicedToArray(_useState, 2),
23
+ setValue = _useState2[1];
24
+ return useCallback(function () {
25
+ setValue(createNewObject());
26
+ }, []);
27
+ }
28
+ // 记录
29
+ var TagInit = /*#__PURE__*/function () {
30
+ function TagInit() {
31
+ _classCallCheck(this, TagInit);
32
+ this.currentLocale = '';
33
+ }
34
+ _createClass(TagInit, [{
35
+ key: "setCurrentLocale",
36
+ value: function setCurrentLocale(currentLocale) {
37
+ this.currentLocale = currentLocale;
38
+ }
39
+ }, {
40
+ key: "getCurrentLocale",
41
+ value: function getCurrentLocale() {
42
+ return this.currentLocale;
43
+ }
44
+ }]);
45
+ return TagInit;
46
+ }();
47
+ export var injectLocale = function injectLocale(currentLocale) {
48
+ var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
49
+ var initFunc = function initFunc(currentLocale, data) {
50
+ IntlInstance.init({
51
+ currentLocale: currentLocale,
52
+ locales: _defineProperty({}, currentLocale, data)
53
+ });
54
+ };
55
+ if (currentLocale === "zh_CN") {
56
+ import("./zh_CN.json").then(function (res) {
57
+ initFunc(currentLocale, res["default"]);
58
+ cb();
59
+ });
60
+ }
61
+ if (currentLocale === "en_US") {
62
+ import("./en_US.json").then(function (res) {
63
+ initFunc(currentLocale, res["default"]);
64
+ cb();
65
+ });
66
+ }
67
+ if (currentLocale === "zh_TW") {
68
+ import("./zh_TW.json").then(function (res) {
69
+ initFunc(currentLocale, res["default"]);
70
+ cb();
71
+ });
72
+ }
73
+ };
74
+ export var TagInitInstance = new TagInit();
75
+ export default IntlInstance;
@@ -0,0 +1,37 @@
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
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
7
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
8
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
9
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
11
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
12
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
14
+ import React from 'react';
15
+ import { injectLocale } from './intl';
16
+ import { intlContext } from '@chaoswise/ui/lib/ConfigProvider/ConfigProvider';
17
+ export default function withLocale(WrappedComponent) {
18
+ var WithLocale = /*#__PURE__*/function (_React$Component) {
19
+ _inherits(WithLocale, _React$Component);
20
+ var _super = _createSuper(WithLocale);
21
+ function WithLocale(props) {
22
+ _classCallCheck(this, WithLocale);
23
+ return _super.call(this, props);
24
+ }
25
+ _createClass(WithLocale, [{
26
+ key: "render",
27
+ value: function render() {
28
+ var _this = this;
29
+ /*#__PURE__*/React.createElement(intlContext.Consumer, null, function (value) {
30
+ return /*#__PURE__*/React.createElement(WrappedComponent, _this.props);
31
+ });
32
+ }
33
+ }]);
34
+ return WithLocale;
35
+ }(React.Component);
36
+ return WithLocale;
37
+ }
@@ -0,0 +1 @@
1
+ {"0ee18787-448b-4f7b-a3f2-5067a38c9a26":"用户组:","15444b85-9196-4bb6-97bd-eb5cd4186cb9":"搜索条件已复制","1cd159c8-2a4d-4208-a170-55a34b91f671":"暂无数据,提交搜索后搜索关键字","1e9cc6b2-f761-4aaa-a216-9f842c6f8fce":"切换为筛选模式","229e8f35-ce6c-403a-b52e-05346dd8eb0b":"通配符:*?","2bf0d704-4106-4359-8488-d0e395f37d34":"在 {slot0} 后缺失 {slot1}","2e8bd2b4-57bf-4778-a254-3b577d0241c5":"组合符号","30a2737a-c786-4f9f-bb22-02ca27a557ff":"结束","3190d9a0-41bf-42b3-adf9-9d22a337f65d":"部门","324f8bc5-e6dc-46b5-a18b-8c4e55c7352e":"分组","3431b29b-5fb7-411f-8a1d-8d7676b03264":"帮助文档","354fbc6d-1abb-4510-81a9-9aa2efa6f482":"搜索历史","3f52c2a1-892d-47fe-b296-49a35ff8c4ee":"语法错误","43395ce9-35f2-4a6d-9e84-8c277369157b":"用户名","4412a02d-d11d-4231-bf91-fd65afd9ea77":"标签搜索","47e5459f-882c-4395-a8f1-d49e89b0a263":"不等于","48b09da1-28bf-497d-a327-0ad6e3ef9af1":"括号","4ced2ca1-2a3f-49d9-9907-1b404d5a1586":"存在 <未知输入>","51b43939-ce6a-4a41-9038-832b8ab4a175":"加载中...","5b412c79-b099-47cd-8745-21264d9212c4":"姓名","5faa90fc-6455-499a-a0d5-c7ff9c9867df":"切换为手写CQL语法模式","7058c2d9-91f3-4fe6-8a38-2c145a627959":"小于","719234f9-de71-4fc6-ab3f-59287ff20570":"大于","79279aa4-ad27-4082-8093-06122d68c611":"部门:","88d7ad39-7f49-459f-a1fd-48dd4c0ff9d5":"邮箱:","8b3465a5-e2ca-4f7c-af17-2cb091ef40fe":"{slot0} 后面,期望 {slot1}","905a2fe5-4c8a-467e-813a-963fdb268b10":"手机","914a6df4-9561-4345-a98c-0559e3f787ff":"小于等于","94f38306-0e2c-4d1c-beff-64d14bd7da20":"不必要输入 {tokenName} ,期望 {slot0}","b2df07f1-b093-4f56-9ec2-af471999634d":"位置","b59f74be-dff0-4e3e-92db-354b475c3efd":"用户名:","bc71d288-1654-454d-8639-5ed225d8d6f6":"用户组","bdfe4b04-efd7-4f93-a6ba-3954aca3b0eb":"数值区间","be953f09-653f-4715-a3b9-9e0faef199b3":"全文检索:hello world","cfbba0e5-b133-4bd7-9b8c-3c92368fe049":"姓名:","d6f72140-92e1-4214-8bcb-d548fa8ed1ce":"语句不完整,缺少结尾","db3f4bef-089e-4144-861d-29f79fa4cd38":"手机:","df7b8ec5-840a-4fc7-aa8c-806d470ec97c":"等于","e28ef3cf-569c-49f8-99b3-533e5013cb9d":"邮箱","e633ed68-a12e-4af5-9a7a-d2eb476f4cef":"大于等于","e7413527-a5ee-4057-b765-3595cd26c09b":"关联搜索:status:(error OR warning) AND NOT service:“service_a”","e94234be-e478-4314-bc85-572cc285f5f9":"描述","f2447d25-e81c-4656-9e4c-f66741dd8a52":"匹配方式","f307bd91-6737-4667-9e89-daec35b21198":"描述:","fbda5bcb-67b0-4b7c-85fd-fb30068f73a0":"字段名称","fc7ca498-ab95-4a4b-9f5f-0d024cc127c3":"暂未注册组件","ff777cfe-21b4-4eb0-bf80-ebd92081fdf5":"完全匹配:\"hello world\""}
@@ -0,0 +1 @@
1
+ {"0ee18787-448b-4f7b-a3f2-5067a38c9a26":"用戶組:","15444b85-9196-4bb6-97bd-eb5cd4186cb9":"搜索條件已複製","1cd159c8-2a4d-4208-a170-55a34b91f671":"暫無數據,提交搜索後搜索關鍵字","1e9cc6b2-f761-4aaa-a216-9f842c6f8fce":"切換為篩選模式","229e8f35-ce6c-403a-b52e-05346dd8eb0b":"通配符:*?","2bf0d704-4106-4359-8488-d0e395f37d34":"在 {slot0} 後缺失 {slot1}","2e8bd2b4-57bf-4778-a254-3b577d0241c5":"組合符號","30a2737a-c786-4f9f-bb22-02ca27a557ff":"結束","3190d9a0-41bf-42b3-adf9-9d22a337f65d":"部門","324f8bc5-e6dc-46b5-a18b-8c4e55c7352e":"分組","3431b29b-5fb7-411f-8a1d-8d7676b03264":"幫助文檔","354fbc6d-1abb-4510-81a9-9aa2efa6f482":"搜索歷史","3f52c2a1-892d-47fe-b296-49a35ff8c4ee":"語法錯誤","43395ce9-35f2-4a6d-9e84-8c277369157b":"用戶名","4412a02d-d11d-4231-bf91-fd65afd9ea77":"標籤搜索","47e5459f-882c-4395-a8f1-d49e89b0a263":"不等於","48b09da1-28bf-497d-a327-0ad6e3ef9af1":"括弧","4ced2ca1-2a3f-49d9-9907-1b404d5a1586":"存在 <未知輸入>","51b43939-ce6a-4a41-9038-832b8ab4a175":"加載中...","5b412c79-b099-47cd-8745-21264d9212c4":"姓名","5faa90fc-6455-499a-a0d5-c7ff9c9867df":"切換為手寫CQL語法模式","7058c2d9-91f3-4fe6-8a38-2c145a627959":"小於","719234f9-de71-4fc6-ab3f-59287ff20570":"大於","79279aa4-ad27-4082-8093-06122d68c611":"部門:","88d7ad39-7f49-459f-a1fd-48dd4c0ff9d5":"郵箱:","8b3465a5-e2ca-4f7c-af17-2cb091ef40fe":"{slot0} 後面,期望 {slot1}","905a2fe5-4c8a-467e-813a-963fdb268b10":"手機","914a6df4-9561-4345-a98c-0559e3f787ff":"小於等於","94f38306-0e2c-4d1c-beff-64d14bd7da20":"不必要輸入 {tokenName} ,期望 {slot0}","b2df07f1-b093-4f56-9ec2-af471999634d":"位置","b59f74be-dff0-4e3e-92db-354b475c3efd":"用戶名:","bc71d288-1654-454d-8639-5ed225d8d6f6":"用戶組","bdfe4b04-efd7-4f93-a6ba-3954aca3b0eb":"數值區間","be953f09-653f-4715-a3b9-9e0faef199b3":"全文檢索:hello world","cfbba0e5-b133-4bd7-9b8c-3c92368fe049":"姓名:","d6f72140-92e1-4214-8bcb-d548fa8ed1ce":"語句不完整,缺少結尾","db3f4bef-089e-4144-861d-29f79fa4cd38":"手機:","df7b8ec5-840a-4fc7-aa8c-806d470ec97c":"等於","e28ef3cf-569c-49f8-99b3-533e5013cb9d":"郵箱","e633ed68-a12e-4af5-9a7a-d2eb476f4cef":"大於等於","e7413527-a5ee-4057-b765-3595cd26c09b":"關聯搜索:status:(error OR warning) AND NOT service:“service_a”","e94234be-e478-4314-bc85-572cc285f5f9":"描述","f2447d25-e81c-4656-9e4c-f66741dd8a52":"匹配方式","f307bd91-6737-4667-9e89-daec35b21198":"描述:","fbda5bcb-67b0-4b7c-85fd-fb30068f73a0":"字段名稱","fc7ca498-ab95-4a4b-9f5f-0d024cc127c3":"暫未註冊組件","ff777cfe-21b4-4eb0-bf80-ebd92081fdf5":"完全匹配:\"hello world\""}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@chaoswise/business",
3
- "version": "0.0.18",
3
+ "packageName": "chaoswiseBusiness",
4
+ "version": "1.0.1",
4
5
  "description": "业务组件库",
5
6
  "keywords": [
6
7
  "ui",
@@ -28,6 +29,8 @@
28
29
  "@babel/preset-env": "^7.16.11",
29
30
  "@babel/preset-typescript": "^7.16.7",
30
31
  "@babel/runtime-corejs3": "^7.11.2",
32
+ "@chaoswise/intl": "^2.1.0",
33
+ "@chaoswise/ui": "2.5.2",
31
34
  "@storybook/addon-actions": "^6.4.22",
32
35
  "@storybook/addon-essentials": "^6.4.22",
33
36
  "@storybook/addon-interactions": "^6.4.22",
@@ -71,12 +74,12 @@
71
74
  "webpack-css-themes-plugin": "0.12.3"
72
75
  },
73
76
  "dependencies": {
74
- "@chaoswise/intl": "^1.2.2",
75
77
  "antlr4": "4.9.2",
76
- "react-copy-to-clipboard": "^5.1.0"
78
+ "react-copy-to-clipboard": "^5.1.0",
79
+ "react-intl-universal": "^2.9.1"
77
80
  },
78
81
  "peerDependencies": {
79
- "@chaoswise/ui": ">=2.0.0"
82
+ "@chaoswise/ui": ">=2.4.0"
80
83
  },
81
84
  "author": "cloudwiser",
82
85
  "homepage": "",
@@ -100,11 +103,13 @@
100
103
  "build-webpack": "webpack --config webpack/webpack.build.js",
101
104
  "analyze": "ANALYZE=1 webpack --config webpack/webpack.build.js",
102
105
  "build": "gulp es --gulpfile ./scripts/gulpfile.js",
103
- "build-tar": "node ./scripts/build-tar.js"
106
+ "build-tar": "node ./scripts/build-tar.js",
107
+ "intl-init": "chaoswise-intl init",
108
+ "intl-collect": "chaoswise-intl collect",
109
+ "intl-update": "chaoswise-intl update"
104
110
  },
105
111
  "publishConfig": {
106
112
  "access": "public"
107
113
  },
108
- "license": "MIT",
109
- "gitHead": "476b0d792a3fd31448820329f14d76a807c31b64"
114
+ "license": "MIT"
110
115
  }
@@ -1,51 +0,0 @@
1
- /*
2
- * @Author: your name
3
- * @Date: 2022-02-21 16:23:43
4
- * @LastEditTime: 2023-05-11 17:35:05
5
- * @LastEditors: andrew.qiao andrew.qiao@cloudwise.com
6
- * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
7
- * @FilePath: /change_02/aops_web_commons/packages/ui/config/babel/antdComs.js
8
- */
9
-
10
- module.exports = [
11
- 'Affix', 'Anchor', 'AutoComplete',
12
- 'Avatar', 'BackTop', 'Breadcrumb',
13
- 'Calendar', 'Card', 'Carousel', 'Col',
14
- 'Comment', 'Descriptions',
15
- 'Divider', 'Drawer', 'Dropdown',
16
- 'Icon',
17
- 'List', 'LocaleProvider', 'Layout', 'Mention',
18
- 'Mentions', 'PageHeader', 'Transfer',
19
- 'Popover',
20
- 'Rate', 'Result', 'Row',
21
- 'Skeleton', 'Spin',
22
- 'Statistic', 'Steps', 'Switch', 'TimePicker','TreeSelect',
23
- 'Select',
24
- 'Typography',
25
- 'version', 'Table', 'Tree',
26
- ];
27
- // 已经被覆盖的组件
28
- /**
29
- * Button
30
- * ConfigProvider
31
- * Modal
32
- * Pagination
33
- * Upload
34
- * Tree
35
- * Table
36
- * Tabs
37
- * Tooltip
38
- * Popconfirm
39
- * Radio
40
- * Checkbox
41
- * message
42
- * Slider
43
- * Input
44
- * Progress
45
- * Badge
46
- * Alert
47
- * Menu
48
- * InputNumber
49
- * Cascader
50
- * notification
51
- */
@@ -1,22 +0,0 @@
1
- const fse = require('fs-extra');
2
- // 项目的根目录
3
- const projectPath = process.cwd();
4
-
5
- const babelConfig = {
6
- "libraryName": "@chaoswise/ui/formily",
7
- "camel2DashComponentName": false,
8
- "customName": name => {
9
- return `@chaoswise/ui/lib/Formily/${name}`
10
- },
11
- "style": name => {
12
- // 判断是否有样式文件
13
- const fileTargetPath = `${projectPath}/node_modules/${name}/index.less`;
14
- const isExist = fse.pathExistsSync(fileTargetPath);
15
- if(!isExist) {
16
- return false
17
- }
18
- return `${name}/index.less`
19
- }
20
- }
21
-
22
- module.exports = babelConfig;