@kmkf-fe-packages/services-components 1.21.11-beta.1 → 1.21.11-beta.3
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.
|
@@ -162,13 +162,14 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
162
162
|
if (!value || !value.length) {
|
|
163
163
|
return Promise.reject(new Error("请选择宝贝"));
|
|
164
164
|
}
|
|
165
|
-
//
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
// PS: 必填不再校验商品编码
|
|
166
|
+
// // 如果配置了商品编码不可见,则跳过商品编码校验
|
|
167
|
+
// const hasNotId =
|
|
168
|
+
// this.showHeader.includes("outerId") &&
|
|
169
|
+
// (value || []).some((item: { outerId: any }) => !item.outerId);
|
|
170
|
+
// if (hasNotId) {
|
|
171
|
+
// return Promise.reject(new Error("请输入商品编码"));
|
|
172
|
+
// }
|
|
172
173
|
return Promise.resolve();
|
|
173
174
|
}
|
|
174
175
|
}] : [];
|
|
@@ -115,7 +115,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
115
115
|
return Promise.resolve();
|
|
116
116
|
}
|
|
117
117
|
var number = /^(\-|\+)?\d+(\.\d+)?$/;
|
|
118
|
-
var mail = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9
|
|
118
|
+
var mail = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9]+(\.[a-zA-Z0-9-]+)*\.([a-zA-Z]{2,})$/;
|
|
119
119
|
var phone = /^1\d{10}$/;
|
|
120
120
|
var testList = [];
|
|
121
121
|
((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.isNumber) && testList.push(number);
|
|
@@ -13,6 +13,7 @@ declare class BasicPicture implements ComponentInterface {
|
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
dataType: ComponentInterface["dataType"];
|
|
16
|
+
currenEnv: ComponentInterface['platform'];
|
|
16
17
|
constructor(options: PickOption);
|
|
17
18
|
formatPictures: (pictures: string) => string[];
|
|
18
19
|
render: (value: Value) => React.JSX.Element | null;
|
|
@@ -15,7 +15,8 @@ import ItemView from "../../commonComponents/ItemView";
|
|
|
15
15
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
var hostUrl = "https://kefu.kuaimai.com";
|
|
17
17
|
var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
18
|
-
var _this = this
|
|
18
|
+
var _this = this,
|
|
19
|
+
_options$effects;
|
|
19
20
|
_classCallCheck(this, BasicPicture);
|
|
20
21
|
_defineProperty(this, "name", void 0);
|
|
21
22
|
_defineProperty(this, "id", void 0);
|
|
@@ -28,16 +29,22 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
28
29
|
_defineProperty(this, "canSort", void 0);
|
|
29
30
|
_defineProperty(this, "children", void 0);
|
|
30
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
+
_defineProperty(this, "currenEnv", void 0);
|
|
31
33
|
_defineProperty(this, "formatPictures", function (pictures) {
|
|
32
34
|
pictures = pictures.replace(/[\[\]]/g, "");
|
|
33
35
|
pictures = pictures.replace(/\s/g, "");
|
|
34
36
|
return pictures ? pictures.split(",") : [];
|
|
35
37
|
});
|
|
36
38
|
_defineProperty(this, "render", function (value) {
|
|
39
|
+
var _document;
|
|
37
40
|
if (!(value !== null && value !== void 0 && value.length)) {
|
|
38
41
|
return null;
|
|
39
42
|
}
|
|
40
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Image.PreviewGroup,
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Image.PreviewGroup, {
|
|
44
|
+
preview: _this.currenEnv === 'ks' ? {
|
|
45
|
+
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById('root')
|
|
46
|
+
} : false
|
|
47
|
+
}, value === null || value === void 0 ? void 0 : value.map(function (pic) {
|
|
41
48
|
return /*#__PURE__*/React.createElement("div", {
|
|
42
49
|
style: {
|
|
43
50
|
marginRight: "5px",
|
|
@@ -103,7 +110,8 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
103
110
|
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
104
111
|
component: (_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.isSingleShop ? /*#__PURE__*/React.createElement(ApaasUpload, _this.componentConfig) : /*#__PURE__*/React.createElement(ApaasUploadAsync, _extends({}, _this.componentConfig, {
|
|
105
112
|
uniqueKey: _this.id,
|
|
106
|
-
hostUrl: hostUrl
|
|
113
|
+
hostUrl: hostUrl,
|
|
114
|
+
platform: _this.currenEnv
|
|
107
115
|
}))
|
|
108
116
|
});
|
|
109
117
|
});
|
|
@@ -124,5 +132,6 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
124
132
|
this.canSort = true;
|
|
125
133
|
this.children = [];
|
|
126
134
|
this.dataType = "string";
|
|
135
|
+
this.currenEnv = options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.env;
|
|
127
136
|
});
|
|
128
137
|
export default BasicPicture;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, 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, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, KmErpSendGood, AfterSalesOrderId, BsE3Goods, BsE3Reissue } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ActualPayment | BsLogistics | BsSystemOrder | BsE3Reissue | BasicCascader | JstSendGood | KmErpSendGood | BasicPicture | BasicSelect | BasicInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicRadio | BasicTextArea | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSupply | BsGoods | BsE3Goods | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | AfterSalesOrderId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.21.11-beta.
|
|
3
|
+
"version": "1.21.11-beta.3",
|
|
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.21.11-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.21.11-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.21.11-beta.3",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.21.11-beta.3",
|
|
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": "5faae9ed27f5017709625d643c5cf449fa9ba288",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|