@pisell/materials 1.0.481 → 1.0.482

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 (80) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +3 -3
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +13 -13
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +13 -13
  11. package/es/components/dataSourceComponents/dataSourceForm/group/index.js +3 -3
  12. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  13. package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +3 -1
  14. package/es/components/dataSourceComponents/dataSourceTable/filter/index.less +4 -0
  15. package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +2 -1
  16. package/es/components/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
  17. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
  18. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +245 -0
  19. package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +4 -0
  20. package/es/components/dataSourceComponents/fields/Upload/ReadPretty.js +5 -0
  21. package/es/components/dataSourceComponents/fields/Upload/WithMode.d.ts +4 -0
  22. package/es/components/dataSourceComponents/fields/Upload/WithMode.js +9 -0
  23. package/es/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
  24. package/es/components/dataSourceComponents/fields/Upload/index.js +4 -0
  25. package/es/components/dataSourceComponents/fields/Upload/index.less +8 -0
  26. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +25 -0
  27. package/es/components/dataSourceComponents/fields/Upload/type.js +1 -0
  28. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +14 -0
  29. package/es/components/dataSourceComponents/fields/Upload/utils.js +33 -0
  30. package/es/components/dataSourceComponents/fields/index.d.ts +2 -1
  31. package/es/components/dataSourceComponents/fields/index.js +3 -1
  32. package/es/components/pisellUpload/index.d.ts +3 -3
  33. package/es/components/pisellUpload/index.js +4 -4
  34. package/es/components/table/Table/utils.d.ts +1 -1
  35. package/es/index.d.ts +1 -0
  36. package/es/index.js +1 -0
  37. package/es/locales/en-US.d.ts +4 -0
  38. package/es/locales/en-US.js +11 -1
  39. package/es/locales/zh-CN.d.ts +4 -0
  40. package/es/locales/zh-CN.js +11 -1
  41. package/es/locales/zh-TW.d.ts +4 -0
  42. package/es/locales/zh-TW.js +11 -1
  43. package/lib/components/dataSourceComponents/dataSourceForm/group/index.js +9 -2
  44. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  45. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +2 -1
  46. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.less +4 -0
  47. package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +2 -1
  48. package/lib/components/dataSourceComponents/fields/ColorPicker/index.d.ts +1 -1
  49. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
  50. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +206 -0
  51. package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +4 -0
  52. package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.js +39 -0
  53. package/lib/components/dataSourceComponents/fields/Upload/WithMode.d.ts +4 -0
  54. package/lib/components/dataSourceComponents/fields/Upload/WithMode.js +43 -0
  55. package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
  56. package/lib/components/dataSourceComponents/fields/Upload/index.js +38 -0
  57. package/lib/components/dataSourceComponents/fields/Upload/index.less +8 -0
  58. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +25 -0
  59. package/lib/components/dataSourceComponents/fields/Upload/type.js +17 -0
  60. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +14 -0
  61. package/lib/components/dataSourceComponents/fields/Upload/utils.js +62 -0
  62. package/lib/components/dataSourceComponents/fields/index.d.ts +2 -1
  63. package/lib/components/dataSourceComponents/fields/index.js +3 -1
  64. package/lib/components/pisellUpload/index.d.ts +3 -3
  65. package/lib/components/pisellUpload/index.js +4 -1
  66. package/lib/components/table/Table/utils.d.ts +1 -1
  67. package/lib/index.d.ts +1 -0
  68. package/lib/index.js +3 -0
  69. package/lib/locales/en-US.d.ts +4 -0
  70. package/lib/locales/en-US.js +5 -1
  71. package/lib/locales/zh-CN.d.ts +4 -0
  72. package/lib/locales/zh-CN.js +5 -1
  73. package/lib/locales/zh-TW.d.ts +4 -0
  74. package/lib/locales/zh-TW.js +5 -1
  75. package/lowcode/data-source-form/constants.ts +1 -0
  76. package/lowcode/data-source-form/meta.ts +4 -4
  77. package/lowcode/form-item-upload/meta.ts +419 -0
  78. package/lowcode/form-item-upload/snippets.ts +11 -0
  79. package/lowcode/submit-button/meta.ts +5 -1
  80. package/package.json +2 -2
@@ -51,11 +51,11 @@ var FormGroup = function FormGroup(props) {
51
51
  'pisell-lowcode-data-source-form-group-top': groupInfoPosition === 'top',
52
52
  'pisell-lowcode-data-source-form-group-side': groupInfoPosition === 'side'
53
53
  })
54
- }, /*#__PURE__*/React.createElement("div", {
54
+ }, (propsShowTitle && title || propsShowDescription && description) && /*#__PURE__*/React.createElement("div", {
55
55
  className: 'pisell-lowcode-data-source-form-group-info'
56
- }, propsShowTitle && /*#__PURE__*/React.createElement("div", {
56
+ }, propsShowTitle && title && /*#__PURE__*/React.createElement("div", {
57
57
  className: "pisell-lowcode-data-source-form-group-title"
58
- }, title), propsShowDescription && /*#__PURE__*/React.createElement("div", {
58
+ }, title), propsShowDescription && description && /*#__PURE__*/React.createElement("div", {
59
59
  className: "pisell-lowcode-data-source-form-group-description"
60
60
  }, description)), /*#__PURE__*/React.createElement("div", {
61
61
  className: "pisell-lowcode-data-source-form-group-content",
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import './index.less';
2
3
  interface BaseFilterItem {
3
4
  name?: string;
4
5
  value: string;
@@ -22,6 +22,7 @@ import Input from "../../fields/Input";
22
22
  import useDataSource from "../../hooks/useDataSource";
23
23
  import FilterButton from "../../../filter/components/FilterButton";
24
24
  import { genFilterItems, genGetField, field2Cpt, getStoredFilterOrder, saveFilterOrder } from "./utils";
25
+ import "./index.less";
25
26
  var defaultArr = [];
26
27
  var Filter = function Filter(props) {
27
28
  var componentId = props.componentId,
@@ -138,7 +139,8 @@ var Filter = function Filter(props) {
138
139
  renderMode: "edit",
139
140
  prefix: /*#__PURE__*/React.createElement(SearchOutlined, null),
140
141
  style: {
141
- width: 200
142
+ width: 200,
143
+ margin: 0
142
144
  }
143
145
  }) : null;
144
146
  }, [search]);
@@ -0,0 +1,4 @@
1
+ .filter-form-wrapper {
2
+ display: flex;
3
+ gap: 8px;
4
+ }
@@ -39,7 +39,8 @@ var getCptProps = function getCptProps(field, cptType, item) {
39
39
  var _field$uiSchema, _field$uiSchema2, _field$uiSchema3, _field$uiSchema3$enum, _field$uiSchema6, _field$uiSchema8;
40
40
  var props = (field === null || field === void 0 ? void 0 : (_field$uiSchema = field.uiSchema) === null || _field$uiSchema === void 0 ? void 0 : _field$uiSchema['x-component-props']) || {};
41
41
  props.style = _objectSpread(_objectSpread({}, (props === null || props === void 0 ? void 0 : props.style) || {}), {}, {
42
- width: '200px'
42
+ width: '200px',
43
+ margin: 0
43
44
  });
44
45
  props.placeholder = item.label;
45
46
  props.allowClear = true;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const ColorPicker: React.FC<import("antd").ColorPickerProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
2
+ declare const ColorPicker: React.FC<import("./type").ColorPickerProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
3
3
  export default ColorPicker;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { UploadProps } from './type';
3
+ import './index.less';
4
+ declare const BaseUpload: (props: UploadProps) => React.JSX.Element;
5
+ export default BaseUpload;
@@ -0,0 +1,245 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ var _excluded = ["renderMode", "maxSize", "minCount", "maxCount", "multiple", "presetType", "customType", "enablePresetType", "enableCustomType"];
3
+ 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); }
4
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
7
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
+ 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 exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
9
+ 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); } }
10
+ 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); }); }; }
11
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+ 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."); }
13
+ 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); }
14
+ 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; }
15
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
16
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
+ 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; }
18
+ 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; }
19
+ import React, { useState, useMemo } from 'react';
20
+ import { PlusOutlined } from '@ant-design/icons';
21
+ import { message } from 'antd';
22
+ import { useDebounceFn } from 'ahooks';
23
+ import useEngineContext from "../../../../hooks/useEngineContext";
24
+ import { getText } from "../../../../locales";
25
+ import PisellUpload from "../../../pisellUpload";
26
+ import { getPointSuffix, checkFileCount } from "./utils";
27
+ import "./index.less";
28
+ var BaseUpload = function BaseUpload(props) {
29
+ var renderMode = props.renderMode,
30
+ maxSize = props.maxSize,
31
+ minCount = props.minCount,
32
+ maxCount = props.maxCount,
33
+ multiple = props.multiple,
34
+ presetType = props.presetType,
35
+ customType = props.customType,
36
+ enablePresetType = props.enablePresetType,
37
+ enableCustomType = props.enableCustomType,
38
+ restProps = _objectWithoutProperties(props, _excluded);
39
+ var _useState = useState([]),
40
+ _useState2 = _slicedToArray(_useState, 2),
41
+ fileList = _useState2[0],
42
+ setFileList = _useState2[1];
43
+ var _useEngineContext = useEngineContext(),
44
+ appHelper = _useEngineContext.appHelper;
45
+ var _appHelper$constants = appHelper === null || appHelper === void 0 ? void 0 : appHelper.constants,
46
+ mediaUploadUrl = _appHelper$constants.mediaUploadUrl,
47
+ getHeaders = _appHelper$constants.getHeaders;
48
+ var calcMaxCount = useMemo(function () {
49
+ if (multiple) {
50
+ return maxCount || 9;
51
+ }
52
+ return 1;
53
+ }, [maxCount, minCount, multiple]);
54
+ var getMediaMetadata = /*#__PURE__*/function () {
55
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
56
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
57
+ while (1) switch (_context.prev = _context.next) {
58
+ case 0:
59
+ return _context.abrupt("return", new Promise(function (resolve) {
60
+ if (file.type.startsWith('image/')) {
61
+ var img = new Image();
62
+ img.src = URL.createObjectURL(file);
63
+ img.onload = function () {
64
+ URL.revokeObjectURL(img.src);
65
+ resolve({
66
+ width: img.width,
67
+ height: img.height
68
+ });
69
+ };
70
+ } else if (file.type.startsWith('video/')) {
71
+ var video = document.createElement('video');
72
+ video.preload = 'metadata';
73
+ video.src = URL.createObjectURL(file);
74
+ video.onloadedmetadata = function () {
75
+ URL.revokeObjectURL(video.src);
76
+ resolve({
77
+ width: video.videoWidth,
78
+ height: video.videoHeight,
79
+ duration: video.duration,
80
+ bitrate: file.size / video.duration
81
+ });
82
+ };
83
+ } else if (file.type.startsWith('audio/')) {
84
+ var audio = document.createElement('audio');
85
+ audio.preload = 'metadata';
86
+ audio.src = URL.createObjectURL(file);
87
+ audio.onloadedmetadata = function () {
88
+ URL.revokeObjectURL(audio.src);
89
+ resolve({
90
+ duration: audio.duration,
91
+ bitrate: file.size / audio.duration
92
+ });
93
+ };
94
+ } else {
95
+ resolve({});
96
+ }
97
+ }));
98
+ case 1:
99
+ case "end":
100
+ return _context.stop();
101
+ }
102
+ }, _callee);
103
+ }));
104
+ return function getMediaMetadata(_x2) {
105
+ return _ref.apply(this, arguments);
106
+ };
107
+ }();
108
+ var handleChange = /*#__PURE__*/function () {
109
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
110
+ var file, newFileList, metadata, _props$onChange, _file$response;
111
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
112
+ while (1) switch (_context2.prev = _context2.next) {
113
+ case 0:
114
+ file = _ref2.file, newFileList = _ref2.fileList;
115
+ setFileList(newFileList);
116
+ if (!(file.status === 'uploading')) {
117
+ _context2.next = 7;
118
+ break;
119
+ }
120
+ _context2.next = 5;
121
+ return getMediaMetadata(file.originFileObj);
122
+ case 5:
123
+ metadata = _context2.sent;
124
+ file.metadata = metadata;
125
+ case 7:
126
+ if (file.status === 'done') {
127
+ message.success("".concat(file.name, " \u4E0A\u4F20\u6210\u529F"));
128
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, (_file$response = file.response) === null || _file$response === void 0 ? void 0 : _file$response.url);
129
+ } else if (file.status === 'error') {
130
+ message.error("".concat(file.name, " \u4E0A\u4F20\u5931\u8D25"));
131
+ }
132
+ case 8:
133
+ case "end":
134
+ return _context2.stop();
135
+ }
136
+ }, _callee2);
137
+ }));
138
+ return function handleChange(_x3) {
139
+ return _ref3.apply(this, arguments);
140
+ };
141
+ }();
142
+ var countError = useDebounceFn(function (msg) {
143
+ message.error(msg);
144
+ }, {
145
+ wait: 500
146
+ });
147
+ var typeError = useDebounceFn(function (msg) {
148
+ message.error(msg);
149
+ }, {
150
+ wait: 500
151
+ });
152
+ var sizeError = useDebounceFn(function (msg) {
153
+ message.error(msg);
154
+ }, {
155
+ wait: 500
156
+ });
157
+ var uploadButton = /*#__PURE__*/React.createElement("button", {
158
+ className: "pisell-upload-button",
159
+ type: "button"
160
+ }, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("div", {
161
+ className: "pisell-upload-text"
162
+ }, getText('pisell-upload-button')));
163
+ var accept = useMemo(function () {
164
+ var types = [];
165
+ if (enablePresetType) {
166
+ types = _toConsumableArray(presetType || []);
167
+ }
168
+ if (enableCustomType) {
169
+ types = [].concat(_toConsumableArray(types), _toConsumableArray(customType || []));
170
+ }
171
+ return types.join(', ');
172
+ }, [presetType, customType, enableCustomType, enablePresetType]);
173
+ var beforeUpload = /*#__PURE__*/function () {
174
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(file, newFileList) {
175
+ var currentFileCount, pointSuffix, _checkFileCount, success, messageStr;
176
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
177
+ while (1) switch (_context3.prev = _context3.next) {
178
+ case 0:
179
+ currentFileCount = 1;
180
+ newFileList.forEach(function (item, index) {
181
+ if (item.uid === file.uid) {
182
+ currentFileCount = index + 1;
183
+ }
184
+ });
185
+ // 文件大小超出限制
186
+ if (!(file.size > calcMaxCount * 1024 * 1024)) {
187
+ _context3.next = 5;
188
+ break;
189
+ }
190
+ sizeError.run(getText('pisell-upload-setting-size-error')(maxSize));
191
+ return _context3.abrupt("return", false);
192
+ case 5:
193
+ pointSuffix = getPointSuffix(file.name); // 文件类型不符合
194
+ if (!(accept !== '' && !(accept || '').includes(pointSuffix))) {
195
+ _context3.next = 9;
196
+ break;
197
+ }
198
+ typeError.run(getText('pisell-upload-setting-type-error')(pointSuffix));
199
+ return _context3.abrupt("return", false);
200
+ case 9:
201
+ // 文件个数超出限制
202
+ _checkFileCount = checkFileCount({
203
+ minCount: minCount || 0,
204
+ maxCount: maxCount || 9,
205
+ valueLength: fileList.length + currentFileCount,
206
+ multiple: multiple
207
+ }), success = _checkFileCount.success, messageStr = _checkFileCount.message;
208
+ if (success) {
209
+ _context3.next = 13;
210
+ break;
211
+ }
212
+ countError.run(messageStr);
213
+ return _context3.abrupt("return", false);
214
+ case 13:
215
+ return _context3.abrupt("return", file);
216
+ case 14:
217
+ case "end":
218
+ return _context3.stop();
219
+ }
220
+ }, _callee3);
221
+ }));
222
+ return function beforeUpload(_x4, _x5) {
223
+ return _ref4.apply(this, arguments);
224
+ };
225
+ }();
226
+ return /*#__PURE__*/React.createElement(PisellUpload, _extends({}, restProps, {
227
+ uploadType: "custom",
228
+ listType: "picture-card",
229
+ fileList: fileList,
230
+ onChange: handleChange,
231
+ action: mediaUploadUrl,
232
+ method: "post",
233
+ accept: accept,
234
+ name: "file",
235
+ data: function data(file) {
236
+ return {
237
+ group_id: 0,
238
+ metadata: file.metadata ? JSON.stringify(file.metadata) : undefined
239
+ };
240
+ },
241
+ headers: getHeaders(),
242
+ beforeUpload: beforeUpload
243
+ }), fileList.length >= calcMaxCount ? null : uploadButton);
244
+ };
245
+ export default BaseUpload;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { UploadProps } from './type';
3
+ declare const UploadReadPretty: (props: UploadProps) => React.JSX.Element;
4
+ export default UploadReadPretty;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ var UploadReadPretty = function UploadReadPretty(props) {
3
+ return /*#__PURE__*/React.createElement("div", null, "UploadReadPretty");
4
+ };
5
+ export default UploadReadPretty;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { UploadProps } from './type';
3
+ declare const UploadWithMode: React.FC<UploadProps & import("../../dataSourceForm/utils").WithModeProps>;
4
+ export default UploadWithMode;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { withMode } from "../../dataSourceForm/utils";
3
+ import ReadPretty from "./ReadPretty";
4
+ import BaseUpload from "./BaseUpload";
5
+ var Upload = function Upload(props) {
6
+ return /*#__PURE__*/React.createElement(BaseUpload, props);
7
+ };
8
+ var UploadWithMode = withMode(Upload, ReadPretty);
9
+ export default UploadWithMode;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Upload: React.FC<import("./type").UploadProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
3
+ export default Upload;
@@ -0,0 +1,4 @@
1
+ import { withFormItem } from "../../dataSourceForm/utils";
2
+ import UploadWithMode from "./WithMode";
3
+ var Upload = withFormItem(UploadWithMode);
4
+ export default Upload;
@@ -0,0 +1,8 @@
1
+ .pisell-upload-button {
2
+ border: 0;
3
+ background: none;
4
+
5
+ .pisell-upload-text {
6
+ margin-top: 8px;
7
+ }
8
+ }
@@ -0,0 +1,25 @@
1
+ import { UploadFile as AntdUploadFile } from 'antd/es/upload/interface';
2
+ import { PisellUploadProps } from '../../../pisellUpload';
3
+ export interface UploadFile extends AntdUploadFile {
4
+ metadata?: {
5
+ width?: number;
6
+ height?: number;
7
+ duration?: number;
8
+ bitrate?: number;
9
+ };
10
+ }
11
+ export interface UploadProps extends PisellUploadProps {
12
+ renderMode?: 'read' | 'edit';
13
+ value?: string;
14
+ allowMediaLibrary?: boolean;
15
+ allowLocalUpload?: boolean;
16
+ allowPreview?: boolean;
17
+ maxSize?: number;
18
+ minCount?: number;
19
+ maxCount?: number;
20
+ enablePresetType?: boolean;
21
+ presetType?: string[];
22
+ enableCustomType?: boolean;
23
+ customType?: string[];
24
+ multiple: boolean;
25
+ }
@@ -0,0 +1,14 @@
1
+ export declare const getSuffix: (name: string) => string | undefined;
2
+ export declare const getPointSuffix: (name: string) => string;
3
+ export declare const checkFileCount: ({ multiple, minCount, maxCount, valueLength, }: {
4
+ multiple: boolean;
5
+ minCount: number;
6
+ maxCount: number;
7
+ valueLength: number;
8
+ }) => {
9
+ success: boolean;
10
+ message: any;
11
+ } | {
12
+ success: boolean;
13
+ message?: undefined;
14
+ };
@@ -0,0 +1,33 @@
1
+ import { getText } from "../../../../locales";
2
+ export var getSuffix = function getSuffix(name) {
3
+ return name.split('.').pop();
4
+ };
5
+ export var getPointSuffix = function getPointSuffix(name) {
6
+ return ".".concat(getSuffix(name));
7
+ };
8
+
9
+ // 校验文件数量
10
+ export var checkFileCount = function checkFileCount(_ref) {
11
+ var multiple = _ref.multiple,
12
+ minCount = _ref.minCount,
13
+ maxCount = _ref.maxCount,
14
+ valueLength = _ref.valueLength;
15
+ if (multiple) {
16
+ /// 最小值和最大值相等 且 值不等于最小值
17
+ if (minCount === maxCount && valueLength !== minCount) {
18
+ return {
19
+ success: false,
20
+ message: getText('pisell-upload-count-error')(minCount, maxCount)
21
+ };
22
+ // 最小值和最大值不相等 且 值小于最小值 或 值大于最大值
23
+ } else if (minCount !== maxCount && (valueLength < minCount || valueLength > maxCount)) {
24
+ return {
25
+ success: false,
26
+ message: getText('pisell-upload-count-error')(minCount, maxCount)
27
+ };
28
+ }
29
+ }
30
+ return {
31
+ success: true
32
+ };
33
+ };
@@ -37,6 +37,7 @@ declare const formFieldMap: {
37
37
  'Radio.Group': import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
38
38
  'Checkbox.Group': import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
39
39
  DateRangePicker: import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
40
+ Upload: import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
40
41
  };
41
42
  declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<any> | (import("react").FC<{}> & {
42
43
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -60,5 +61,5 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
60
61
  valueField: string;
61
62
  } & {
62
63
  dataSource?: any;
63
- }) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
64
+ }) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & 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("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
64
65
  export { getFieldComponent, formFieldMap };
@@ -7,6 +7,7 @@ import Select from "./Select";
7
7
  import InputNumber from "./InputNumber";
8
8
  import TimePicker from "./TimePicker";
9
9
  import DateRangePicker from "./DateRangePicker";
10
+ import Upload from "./Upload";
10
11
 
11
12
  // 表单字段组件映射 增加时需要同步更新 utils 中的 formFieldFilterFuncMap
12
13
  var formFieldMap = {
@@ -24,7 +25,8 @@ var formFieldMap = {
24
25
  'Input.Password': Input.Password,
25
26
  'Radio.Group': Radio.Group,
26
27
  'Checkbox.Group': Checkbox.Group,
27
- DateRangePicker: DateRangePicker
28
+ DateRangePicker: DateRangePicker,
29
+ Upload: Upload
28
30
  };
29
31
  var getFieldComponent = function getFieldComponent(fieldComponent) {
30
32
  return formFieldMap[fieldComponent];
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import type { UploadProps } from 'antd';
3
3
  import './index.less';
4
- interface pisellUploadProps extends UploadProps {
4
+ export interface PisellUploadProps extends UploadProps {
5
5
  title?: string;
6
6
  text1?: string;
7
7
  text2?: string;
8
- uploadType?: 'button' | 'drop';
8
+ uploadType?: 'button' | 'drop' | 'custom';
9
9
  }
10
- declare const PisellUpload: (props: pisellUploadProps) => React.JSX.Element;
10
+ declare const PisellUpload: (props: PisellUploadProps) => React.JSX.Element;
11
11
  export default PisellUpload;
@@ -6,16 +6,16 @@ import classNames from 'classnames';
6
6
  var Dragger = Upload.Dragger;
7
7
  import "./index.less";
8
8
  var PisellUpload = function PisellUpload(props) {
9
- var name = props.name,
10
- multiple = props.multiple,
11
- onDrop = props.onDrop,
12
- title = props.title,
9
+ var title = props.title,
13
10
  text1 = props.text1,
14
11
  text2 = props.text2,
15
12
  uploadType = props.uploadType;
16
13
  useEffect(function () {
17
14
  document.body.id = 'body';
18
15
  }, []);
16
+ if (uploadType === 'custom') {
17
+ return /*#__PURE__*/React.createElement(Upload, props, props.children);
18
+ }
19
19
  return /*#__PURE__*/React.createElement("div", null, uploadType === 'button' ? /*#__PURE__*/React.createElement(Upload, props, /*#__PURE__*/React.createElement(Button, {
20
20
  icon: /*#__PURE__*/React.createElement(UploadOutlined, null)
21
21
  }, "Upload")) : /*#__PURE__*/React.createElement(Dragger, _extends({}, props, {
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
167
167
  sort?: SortType | undefined;
168
168
  mode: "" | "localStorage" | "remote";
169
169
  currentViewMode: ModeType;
170
- }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
170
+ }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
171
171
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
172
172
  export declare const stringify: (obj: Record<string, any>) => string;
173
173
  export {};
package/es/index.d.ts CHANGED
@@ -135,6 +135,7 @@ export { default as FormItemInputNumber } from './components/dataSourceComponent
135
135
  export { default as FormItemRadio } from './components/dataSourceComponents/fields/Radio';
136
136
  export { default as FormItemSelect } from './components/dataSourceComponents/fields/Select';
137
137
  export { default as FormItemTimePicker } from './components/dataSourceComponents/fields/TimePicker';
138
+ export { default as FormItemUpload } from './components/dataSourceComponents/fields/Upload';
138
139
  export { default as DataSourceTable } from './components/dataSourceComponents/dataSourceTable';
139
140
  export { default as DataSourceWrapper } from './components/dataSourceComponents/dataSourceWrapper';
140
141
  export { default as DataSourceTypography } from './components/dataSourceComponents/dataSourceShow/dataSourceTypography';
package/es/index.js CHANGED
@@ -162,6 +162,7 @@ export { default as FormItemInputNumber } from "./components/dataSourceComponent
162
162
  export { default as FormItemRadio } from "./components/dataSourceComponents/fields/Radio";
163
163
  export { default as FormItemSelect } from "./components/dataSourceComponents/fields/Select";
164
164
  export { default as FormItemTimePicker } from "./components/dataSourceComponents/fields/TimePicker";
165
+ export { default as FormItemUpload } from "./components/dataSourceComponents/fields/Upload";
165
166
  export { default as DataSourceTable } from "./components/dataSourceComponents/dataSourceTable";
166
167
  export { default as DataSourceWrapper } from "./components/dataSourceComponents/dataSourceWrapper";
167
168
  export { default as DataSourceTypography } from "./components/dataSourceComponents/dataSourceShow/dataSourceTypography";
@@ -147,5 +147,9 @@ declare const _default: {
147
147
  'pisell-number-format-billion': string;
148
148
  'walletCard-done': string;
149
149
  'walletCard-qrcode': string;
150
+ 'pisell-upload-button': string;
151
+ 'pisell-upload-setting-size-error': (maxSize: number) => string;
152
+ 'pisell-upload-setting-type-error': (type: string) => string;
153
+ 'pisell-upload-count-error': (count: number) => string;
150
154
  };
151
155
  export default _default;
@@ -185,5 +185,15 @@ export default {
185
185
  'pisell-number-format-billion': 'B',
186
186
  //walletCard 组件
187
187
  'walletCard-done': 'Done',
188
- 'walletCard-qrcode': 'QR code'
188
+ 'walletCard-qrcode': 'QR code',
189
+ 'pisell-upload-button': 'Upload',
190
+ 'pisell-upload-setting-size-error': function pisellUploadSettingSizeError(maxSize) {
191
+ return "Each file should not exceed ".concat(maxSize, "MB in size.");
192
+ },
193
+ 'pisell-upload-setting-type-error': function pisellUploadSettingTypeError(type) {
194
+ return "".concat(type, " file type is not supported for upload.");
195
+ },
196
+ 'pisell-upload-count-error': function pisellUploadCountError(count) {
197
+ return "Please upload ".concat(count, " file");
198
+ }
189
199
  };
@@ -147,5 +147,9 @@ declare const _default: {
147
147
  'pisell-number-format-billion': string;
148
148
  'walletCard-done': string;
149
149
  'walletCard-qrcode': string;
150
+ 'pisell-upload-button': string;
151
+ 'pisell-upload-setting-size-error': (maxSize: number) => string;
152
+ 'pisell-upload-setting-type-error': (type: string) => string;
153
+ 'pisell-upload-count-error': (count: number) => string;
150
154
  };
151
155
  export default _default;