@kmkf-fe-packages/services-components 1.17.8-beta.3 → 1.17.8-beta.5
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.
|
@@ -110,7 +110,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
110
110
|
this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
|
|
111
111
|
this.rules = [{
|
|
112
112
|
validator: function validator(_, value) {
|
|
113
|
-
var _this$componentConfig6, _this$componentConfig7, _this$componentConfig8, _this$componentConfig9, _this$componentConfig10;
|
|
113
|
+
var _this$componentConfig6, _this$componentConfig7, _this$componentConfig8, _this$componentConfig9, _this$componentConfig10, _this$componentConfig11;
|
|
114
114
|
if (!value) {
|
|
115
115
|
return Promise.resolve();
|
|
116
116
|
}
|
|
@@ -127,11 +127,14 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
127
127
|
if (testList.length && !isTest) {
|
|
128
128
|
return Promise.reject(new Error("请填写正确的格式"));
|
|
129
129
|
}
|
|
130
|
-
if ((_this$componentConfig9 = _this.componentConfig) !== null && _this$componentConfig9 !== void 0 &&
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
if ((_this$componentConfig9 = _this.componentConfig) !== null && _this$componentConfig9 !== void 0 && _this$componentConfig9.isNumber && value > Number.MAX_SAFE_INTEGER) {
|
|
131
|
+
return Promise.reject(new Error("输入数值超出最大数字上限,请使用文本框替代当前数字输入框组件"));
|
|
132
|
+
}
|
|
133
|
+
if ((_this$componentConfig10 = _this.componentConfig) !== null && _this$componentConfig10 !== void 0 && (_this$componentConfig11 = _this$componentConfig10.rulesOptions) !== null && _this$componentConfig11 !== void 0 && _this$componentConfig11.length) {
|
|
134
|
+
var _this$componentConfig12;
|
|
135
|
+
var rulesList = (_this$componentConfig12 = _this.componentConfig) === null || _this$componentConfig12 === void 0 ? void 0 : _this$componentConfig12.rulesOptions.filter(function (item) {
|
|
136
|
+
var _this$componentConfig13;
|
|
137
|
+
return (((_this$componentConfig13 = _this.componentConfig) === null || _this$componentConfig13 === void 0 ? void 0 : _this$componentConfig13.selectRules) || []).includes(item.id);
|
|
135
138
|
});
|
|
136
139
|
if (!rulesList.length) {
|
|
137
140
|
return Promise.resolve();
|
|
@@ -154,8 +157,8 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
154
157
|
validateTrigger: "onBlur",
|
|
155
158
|
validator: function () {
|
|
156
159
|
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
|
|
157
|
-
var _this$
|
|
158
|
-
var _resultList$, params, _yield$replaceCheck, resultList, _this$
|
|
160
|
+
var _this$componentConfig14;
|
|
161
|
+
var _resultList$, params, _yield$replaceCheck, resultList, _this$componentConfig15, _this$componentConfig16, _this$componentConfig17, messageMap;
|
|
159
162
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
160
163
|
while (1) switch (_context.prev = _context.next) {
|
|
161
164
|
case 0:
|
|
@@ -165,7 +168,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
165
168
|
}
|
|
166
169
|
return _context.abrupt("return", Promise.resolve());
|
|
167
170
|
case 2:
|
|
168
|
-
if (!((_this$
|
|
171
|
+
if (!((_this$componentConfig14 = _this.componentConfig) !== null && _this$componentConfig14 !== void 0 && _this$componentConfig14.replaceWarn)) {
|
|
169
172
|
_context.next = 11;
|
|
170
173
|
break;
|
|
171
174
|
}
|
|
@@ -192,7 +195,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
192
195
|
currFlow: "数据已存在本模版中,不能重复提交",
|
|
193
196
|
allWorkOrder: "数据已存在其他模版中,不能重复提交"
|
|
194
197
|
};
|
|
195
|
-
return _context.abrupt("return", Promise.reject(new Error(messageMap[(_this$
|
|
198
|
+
return _context.abrupt("return", Promise.reject(new Error(messageMap[(_this$componentConfig15 = (_this$componentConfig16 = _this.componentConfig) === null || _this$componentConfig16 === void 0 ? void 0 : (_this$componentConfig17 = _this$componentConfig16.repeatConfig) === null || _this$componentConfig17 === void 0 ? void 0 : _this$componentConfig17.repeatRange) !== null && _this$componentConfig15 !== void 0 ? _this$componentConfig15 : ""] || "内容已存在,不能重复提交")));
|
|
196
199
|
case 11:
|
|
197
200
|
case "end":
|
|
198
201
|
return _context.stop();
|
|
@@ -19,6 +19,7 @@ declare class JstSendGood implements ComponentInterface {
|
|
|
19
19
|
canSort: boolean;
|
|
20
20
|
children: ComponentInterface[];
|
|
21
21
|
dataType: ComponentInterface["dataType"];
|
|
22
|
+
format: ComponentInterface["format"];
|
|
22
23
|
constructor(options: PickOption);
|
|
23
24
|
getSortChildFields: (type: string, options: PickOption, fieldType?: string) => any;
|
|
24
25
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
@@ -46,8 +47,5 @@ declare class JstSendGood implements ComponentInterface {
|
|
|
46
47
|
filterFn: (value: string) => (i: Record) => any;
|
|
47
48
|
props?: undefined;
|
|
48
49
|
})[];
|
|
49
|
-
formDataTransform: (v: Array<{
|
|
50
|
-
sendName: string;
|
|
51
|
-
}>) => string[];
|
|
52
50
|
}
|
|
53
51
|
export default JstSendGood;
|
|
@@ -60,6 +60,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
60
60
|
_defineProperty(this, "canSort", void 0);
|
|
61
61
|
_defineProperty(this, "children", void 0);
|
|
62
62
|
_defineProperty(this, "dataType", void 0);
|
|
63
|
+
_defineProperty(this, "format", void 0);
|
|
63
64
|
_defineProperty(this, "getSortChildFields", function (type, options, fieldType) {
|
|
64
65
|
var _typeMap$options$type, _typeMap$options$type2;
|
|
65
66
|
var sendName = {
|
|
@@ -202,14 +203,6 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
202
203
|
}
|
|
203
204
|
}];
|
|
204
205
|
});
|
|
205
|
-
_defineProperty(this, "formDataTransform", function (v) {
|
|
206
|
-
var _v$map;
|
|
207
|
-
return v === null || v === void 0 ? void 0 : (_v$map = v.map(function (item) {
|
|
208
|
-
return item.sendName;
|
|
209
|
-
})) === null || _v$map === void 0 ? void 0 : _v$map.filter(function (item) {
|
|
210
|
-
return !isNull(item);
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
206
|
this.name = _options.name;
|
|
214
207
|
this.id = _options.id;
|
|
215
208
|
this.sortField = "".concat(_options.id, "_").concat((_typeMap$_options$typ = typeMap[_options.type]) === null || _typeMap$_options$typ === void 0 ? void 0 : _typeMap$_options$typ.key);
|
|
@@ -244,5 +237,6 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
|
|
|
244
237
|
this.isCombinationComponent = false;
|
|
245
238
|
this.canSort = false;
|
|
246
239
|
this.children = [];
|
|
240
|
+
this.format = 'object';
|
|
247
241
|
});
|
|
248
242
|
export default JstSendGood;
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface ComponentInterface {
|
|
|
48
48
|
width?: number;
|
|
49
49
|
align?: ALignType;
|
|
50
50
|
dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
|
|
51
|
-
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup";
|
|
51
|
+
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup" | "object";
|
|
52
52
|
options?: Array<any>;
|
|
53
53
|
templateId?: string;
|
|
54
54
|
flowTemplateKey?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.17.8-beta.
|
|
3
|
+
"version": "1.17.8-beta.5",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "1.17.8-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.17.8-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.17.8-beta.4",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.17.8-beta.4",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "c616c0a5e6fcbc8bee77d8cdd17645c951c86aaa",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|