@kmkf-fe-packages/services-components 0.13.0-alpha.9 → 0.13.0-beta.10

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 (34) hide show
  1. package/dist/esm/components/Cascader/index.d.ts +3 -5
  2. package/dist/esm/components/Cascader/index.js +12 -16
  3. package/dist/esm/components/CommonMultiStatus/index.d.ts +9 -2
  4. package/dist/esm/components/CommonMultiStatus/index.js +16 -9
  5. package/dist/esm/components/GetFormItem/index.d.ts +1 -1
  6. package/dist/esm/components/GetFormItem/index.js +2 -4
  7. package/dist/esm/components/Input/index.d.ts +4 -5
  8. package/dist/esm/components/Input/index.js +9 -63
  9. package/dist/esm/factory.d.ts +3 -3
  10. package/dist/esm/factory.js +98 -98
  11. package/dist/esm/index.d.ts +0 -2
  12. package/dist/esm/index.js +0 -2
  13. package/dist/esm/type.d.ts +1 -2
  14. package/package.json +4 -4
  15. package/dist/esm/components/BS/BsPosting/components/City/index.d.ts +0 -29
  16. package/dist/esm/components/BS/BsPosting/components/City/index.js +0 -72
  17. package/dist/esm/components/BS/BsPosting/components/Detail/index.d.ts +0 -27
  18. package/dist/esm/components/BS/BsPosting/components/Detail/index.js +0 -70
  19. package/dist/esm/components/BS/BsPosting/components/District/index.d.ts +0 -29
  20. package/dist/esm/components/BS/BsPosting/components/District/index.js +0 -72
  21. package/dist/esm/components/BS/BsPosting/components/Province/index.d.ts +0 -29
  22. package/dist/esm/components/BS/BsPosting/components/Province/index.js +0 -72
  23. package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.d.ts +0 -27
  24. package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.js +0 -70
  25. package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.d.ts +0 -27
  26. package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.js +0 -70
  27. package/dist/esm/components/BS/BsPosting/index.d.ts +0 -43
  28. package/dist/esm/components/BS/BsPosting/index.js +0 -106
  29. package/dist/esm/components/FlowTag/index.d.ts +0 -38
  30. package/dist/esm/components/FlowTag/index.js +0 -126
  31. package/dist/esm/service/api.d.ts +0 -1
  32. package/dist/esm/service/api.js +0 -9
  33. package/dist/esm/service/request.d.ts +0 -17
  34. package/dist/esm/service/request.js +0 -56
@@ -6,7 +6,7 @@ declare class BasicCascader implements ComponentInterface {
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface['componentConfig'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
10
  isCombinationComponent: boolean;
11
11
  formField: string;
12
12
  canSort: boolean;
@@ -27,15 +27,13 @@ declare class BasicCascader implements ComponentInterface {
27
27
  renderExport: (value: any, record: Record) => string;
28
28
  editRender: (p: any) => React.JSX.Element;
29
29
  filterConfig: (item: ColumnConfig) => {
30
- searchDefaultConditions: "in";
30
+ searchDefaultConditions: "eq";
31
31
  type: string;
32
32
  id: string;
33
33
  name: string;
34
34
  filterComponentType: "Cascader";
35
35
  props: {
36
36
  options: any;
37
- multiple: boolean;
38
- maxTagCount: string;
39
37
  fieldNames: {
40
38
  label: string;
41
39
  value: string;
@@ -43,7 +41,7 @@ declare class BasicCascader implements ComponentInterface {
43
41
  };
44
42
  };
45
43
  filterFn: (value: string) => (i: Record) => boolean;
46
- formatFilterValue: (val: Array<string>) => (string | undefined)[] | undefined;
44
+ formatFilterValue: (val: Array<string>) => string | undefined;
47
45
  };
48
46
  }
49
47
  export default BasicCascader;
@@ -95,7 +95,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
95
95
  var _item$config;
96
96
  var options = transMultSelectOptions((item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || []);
97
97
  return {
98
- searchDefaultConditions: SYMBOL.in,
98
+ searchDefaultConditions: SYMBOL.eq,
99
99
  type: item.type,
100
100
  id: "".concat(item.id, "_multSelect"),
101
101
  // 过滤组件id
@@ -104,8 +104,6 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
104
104
  filterComponentType: 'Cascader',
105
105
  props: {
106
106
  options: options,
107
- multiple: true,
108
- maxTagCount: 'responsive',
109
107
  fieldNames: {
110
108
  label: 'label',
111
109
  value: 'actived',
@@ -119,17 +117,15 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
119
117
  },
120
118
  formatFilterValue: function formatFilterValue(val) {
121
119
  if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
122
- return val.map(function (item) {
123
- var node = tree.findNodeByValue(options, 'actived', item[item.length - 1]);
124
- if (node) {
125
- var label = node.label,
126
- actived = node.actived;
127
- return JSON.stringify({
128
- label: label,
129
- actived: actived
130
- });
131
- }
132
- });
120
+ var node = tree.findNodeByValue(options, 'actived', val[val.length - 1]);
121
+ if (node) {
122
+ var label = node.label,
123
+ actived = node.actived;
124
+ return JSON.stringify({
125
+ label: label,
126
+ actived: actived
127
+ });
128
+ }
133
129
  }
134
130
  }
135
131
  };
@@ -150,8 +146,8 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
150
146
 
151
147
  /**
152
148
  * 通过值计算展示内容
153
- * @param value
154
- * @returns
149
+ * @param value
150
+ * @returns
155
151
  */);
156
152
 
157
153
  export default BasicCascader;
@@ -21,11 +21,18 @@ declare class CommonMultiStatus implements ComponentInterface {
21
21
  renderExport: (value: any, record: any) => any;
22
22
  editRender: (p: any) => React.JSX.Element;
23
23
  filterConfig: (item: ColumnConfig) => {
24
- searchDefaultConditions: "like";
24
+ searchDefaultConditions: "like" | "in";
25
25
  type: string;
26
26
  id: string;
27
27
  name: string;
28
- filterComponentType: "Input";
28
+ filterComponentType: "MultipleSelect" | "Input";
29
+ props: {
30
+ options: any[] | undefined;
31
+ fieldNames: {
32
+ label: string;
33
+ value: string;
34
+ };
35
+ };
29
36
  filterFn: (value: string) => (i: Record) => boolean;
30
37
  };
31
38
  }
@@ -45,8 +45,8 @@ var typeMap = {
45
45
  label: '失败',
46
46
  color: '#ff4d4f'
47
47
  }],
48
- key: 'bsExchangeReason',
49
- code: 'bsExchangeStatusValue',
48
+ key: 'exchangeReason',
49
+ code: 'exchangeStatusValue',
50
50
  name: '退货状态',
51
51
  type: 1,
52
52
  valueKey: 'status',
@@ -55,15 +55,15 @@ var typeMap = {
55
55
  },
56
56
  WAREHOUSING_STATUS: {
57
57
  options: [{
58
- value: 2,
58
+ value: '2',
59
59
  label: '已入库',
60
60
  color: '#52c41a'
61
61
  }, {
62
- value: 1,
62
+ value: '1',
63
63
  label: '部分入库',
64
64
  color: '#e7780f'
65
65
  }, {
66
- value: 0,
66
+ value: '0',
67
67
  label: '未入库',
68
68
  color: '#ff4d4f'
69
69
  }],
@@ -144,7 +144,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
144
144
  var _typeMap$_this$type14;
145
145
  return item[(_typeMap$_this$type14 = typeMap[_this.type]) === null || _typeMap$_this$type14 === void 0 ? void 0 : _typeMap$_this$type14.valueKey] === option.value;
146
146
  });
147
- return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.idKey], ":").concat(currentOption ? currentOption.label : item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey]);
147
+ return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || '' : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.valueKey]) || '');
148
148
  }).join(',');
149
149
  });
150
150
  _defineProperty(this, "editRender", function (p) {
@@ -162,13 +162,20 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
162
162
  });
163
163
  });
164
164
  _defineProperty(this, "filterConfig", function (item) {
165
- var _typeMap$_this$type18;
165
+ var _typeMap$_this$type18, _item$templateConfig;
166
166
  return {
167
- searchDefaultConditions: SYMBOL.like,
167
+ searchDefaultConditions: _this.type === 'WAREHOUSING_STATUS' ? SYMBOL.in : SYMBOL.like,
168
168
  type: item.type,
169
169
  id: "".concat(item.id, "_").concat((_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.code),
170
170
  name: "".concat(_this.name),
171
- filterComponentType: 'Input',
171
+ filterComponentType: _this.type === 'WAREHOUSING_STATUS' ? 'MultipleSelect' : "Input",
172
+ props: {
173
+ options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
174
+ fieldNames: {
175
+ label: "label",
176
+ value: "value"
177
+ }
178
+ },
172
179
  filterFn: function filterFn(value) {
173
180
  return function (i) {
174
181
  var _typeMap$_this$type19;
@@ -9,5 +9,5 @@ declare type GetFormItemProps = {
9
9
  style?: CSSProperties | undefined;
10
10
  [prop: string]: any;
11
11
  };
12
- declare const GetFormItem: ({ rules, required, title, component, name, hidden, style, validateTrigger }: GetFormItemProps) => React.JSX.Element | null;
12
+ declare const GetFormItem: ({ rules, required, title, component, name, hidden, style, }: GetFormItemProps) => React.JSX.Element | null;
13
13
  export default GetFormItem;
@@ -14,8 +14,7 @@ var GetFormItem = function GetFormItem(_ref) {
14
14
  name = _ref.name,
15
15
  _ref$hidden = _ref.hidden,
16
16
  hidden = _ref$hidden === void 0 ? false : _ref$hidden,
17
- style = _ref.style,
18
- validateTrigger = _ref.validateTrigger;
17
+ style = _ref.style;
19
18
  var newRules = rules;
20
19
  if (required) {
21
20
  newRules = rules.concat({
@@ -34,8 +33,7 @@ var GetFormItem = function GetFormItem(_ref) {
34
33
  name: name,
35
34
  label: title,
36
35
  rules: newRules,
37
- className: "form-item-label--index",
38
- validateTrigger: validateTrigger
36
+ className: "form-item-label--index"
39
37
  // hidden={hidden}
40
38
  }, component));
41
39
  };
@@ -1,18 +1,17 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
3
  declare class BasicInput implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface['componentConfig'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
10
  isCombinationComponent: boolean;
11
11
  formField: string;
12
12
  canSort: boolean;
13
13
  children: ComponentInterface[];
14
- dataType: ComponentInterface['dataType'];
15
- templateId?: string;
14
+ dataType: ComponentInterface["dataType"];
16
15
  constructor(options: PickOption);
17
16
  renderPc: (value: any, record: Record) => React.JSX.Element;
18
17
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -1,7 +1,4 @@
1
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
- 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; }
3
- 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); } }
4
- 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); }); }; }
5
2
  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); }
6
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); } }
7
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; }
@@ -9,13 +6,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
9
6
  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; }
10
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
11
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
12
- import React from 'react';
13
- import { ApaasInput } from '@kmkf-fe-packages/basic-components';
9
+ import React from "react";
10
+ import { ApaasInput } from "@kmkf-fe-packages/basic-components";
14
11
  import GetFormItem from "../GetFormItem";
15
12
  import ItemView from "../../commonComponents/ItemView";
16
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
17
14
  import { SYMBOL } from "../../constant";
18
- import { replaceCheck } from "../../service/api";
19
15
  var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
20
16
  var _this = this,
21
17
  _options$componentCon;
@@ -31,10 +27,9 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
31
27
  _defineProperty(this, "canSort", void 0);
32
28
  _defineProperty(this, "children", void 0);
33
29
  _defineProperty(this, "dataType", void 0);
34
- _defineProperty(this, "templateId", void 0);
35
30
  _defineProperty(this, "renderPc", function (value, record) {
36
31
  var _record;
37
- return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record !== void 0 ? _record : '--');
32
+ return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record !== void 0 ? _record : "--");
38
33
  });
39
34
  _defineProperty(this, "renderLog", function (r) {
40
35
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_input")])) return null;
@@ -45,7 +40,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
45
40
  });
46
41
  _defineProperty(this, "renderExport", function (value, record) {
47
42
  var _record2;
48
- return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record2 !== void 0 ? _record2 : '--';
43
+ return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record2 !== void 0 ? _record2 : "--";
49
44
  });
50
45
  _defineProperty(this, "renderClient", function (record) {
51
46
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -61,7 +56,6 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
61
56
  name: _this.id,
62
57
  rules: _this.rules,
63
58
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
64
- validateTrigger: ['onBlur', 'onChange'],
65
59
  required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
66
60
  component: /*#__PURE__*/React.createElement(ApaasInput, _extends({}, _this.componentConfig, {
67
61
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
@@ -76,10 +70,10 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
76
70
  // 过滤组件id
77
71
  name: item.name,
78
72
  // 过滤组件名称
79
- filterComponentType: 'Input',
73
+ filterComponentType: "Input",
80
74
  filterFn: function filterFn(value) {
81
75
  return function (i) {
82
- return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'input')).includes(value);
76
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "input")).includes(value);
83
77
  };
84
78
  }
85
79
  };
@@ -89,7 +83,6 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
89
83
  this.sortField = "".concat(options.id, "_input");
90
84
  this.formField = "".concat(options.id, "_input");
91
85
  this.type = options.type;
92
- this.templateId = options.templateId;
93
86
  this.componentConfig = options.componentConfig;
94
87
  this.rules = [{
95
88
  validator: function validator(_, value) {
@@ -108,7 +101,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
108
101
  return item.test(value);
109
102
  });
110
103
  if (testList.length && !isTest) {
111
- return Promise.reject(new Error('请填写正确的格式'));
104
+ return Promise.reject(new Error("请填写正确的格式"));
112
105
  }
113
106
  if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && (_this$componentConfig7 = _this$componentConfig6.rulesOptions) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.length) {
114
107
  var _this$componentConfig8;
@@ -133,57 +126,10 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
133
126
  }
134
127
  return Promise.resolve();
135
128
  }
136
- }, {
137
- validateTrigger: 'onBlur',
138
- validator: function () {
139
- var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
140
- var _this$componentConfig10;
141
- var _resultList$, params, _yield$replaceCheck, resultList;
142
- return _regeneratorRuntime().wrap(function _callee$(_context) {
143
- while (1) switch (_context.prev = _context.next) {
144
- case 0:
145
- if (value) {
146
- _context.next = 2;
147
- break;
148
- }
149
- return _context.abrupt("return", Promise.resolve());
150
- case 2:
151
- if (!((_this$componentConfig10 = _this.componentConfig) !== null && _this$componentConfig10 !== void 0 && _this$componentConfig10.replaceWarn)) {
152
- _context.next = 10;
153
- break;
154
- }
155
- params = {
156
- templateId: _this.templateId,
157
- needCheckComponentList: [{
158
- componentKey: _this.formField,
159
- componentValue: value
160
- }]
161
- };
162
- _context.next = 6;
163
- return replaceCheck(params);
164
- case 6:
165
- _yield$replaceCheck = _context.sent;
166
- resultList = _yield$replaceCheck.data.resultList;
167
- if (!((resultList === null || resultList === void 0 ? void 0 : (_resultList$ = resultList[0]) === null || _resultList$ === void 0 ? void 0 : _resultList$.repeatCount) > 0)) {
168
- _context.next = 10;
169
- break;
170
- }
171
- return _context.abrupt("return", Promise.reject(new Error('内容已存在,不能重复提交')));
172
- case 10:
173
- case "end":
174
- return _context.stop();
175
- }
176
- }, _callee);
177
- }));
178
- function validator(_x, _x2) {
179
- return _validator.apply(this, arguments);
180
- }
181
- return validator;
182
- }()
183
129
  }];
184
130
  this.isCombinationComponent = false;
185
131
  this.canSort = true;
186
132
  this.children = [];
187
- this.dataType = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.isNumber ? 'number' : 'string';
133
+ this.dataType = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.isNumber ? "number" : "string";
188
134
  });
189
135
  export default BasicInput;
@@ -1,3 +1,3 @@
1
- import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting } from "./index";
2
- import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsPosting | BasicCascader | FlowTag | BasicInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | CommonTradeId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods } from './index';
2
+ import { PickOption } from './type';
3
+ export declare const factory: (type: string, options: PickOption) => BsExchange | BsReissue | BsSystemOrder | CommonMultiStatus | ERemark | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods;