@kmkf-fe-packages/services-components 2.10.9-beta.56 → 2.10.9-beta.58
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.
|
@@ -14,7 +14,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
14
14
|
import React from "react";
|
|
15
15
|
import GetFormItem from "../../GetFormItem";
|
|
16
16
|
import { AsyncSelect as BasicAsyncSelect } from "@kmkf-fe-packages/basic-components";
|
|
17
|
-
import {
|
|
17
|
+
import { servers } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import ItemView from "../../../commonComponents/ItemView";
|
|
19
19
|
import { filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
20
20
|
import { SYMBOL } from "../../../constant";
|
|
@@ -30,26 +30,6 @@ var typeMap = {
|
|
|
30
30
|
name: "旺店通标签",
|
|
31
31
|
mode: "multiple",
|
|
32
32
|
api: servers.WDT.getTagsDataAsync,
|
|
33
|
-
//旗舰版暂时限制最多选择一个
|
|
34
|
-
maxSelectCount: function maxSelectCount() {
|
|
35
|
-
var version = "flagship";
|
|
36
|
-
try {
|
|
37
|
-
var userInfo = JSON.parse(localStorage.getItem("reduxData_userInfo") || "{}");
|
|
38
|
-
if (isNull(userInfo)) {
|
|
39
|
-
version = "flagship";
|
|
40
|
-
} else {
|
|
41
|
-
var _userInfo$companyUser, _companyUserConfig, _companyUserConfig$pl, _companyUserConfig$pl2;
|
|
42
|
-
var companyUserConfig = (_userInfo$companyUser = userInfo === null || userInfo === void 0 ? void 0 : userInfo.companyUserConfig) !== null && _userInfo$companyUser !== void 0 ? _userInfo$companyUser : {};
|
|
43
|
-
if (typeof companyUserConfig === "string") {
|
|
44
|
-
companyUserConfig = JSON.parse(companyUserConfig);
|
|
45
|
-
}
|
|
46
|
-
version = ((_companyUserConfig = companyUserConfig) === null || _companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl = _companyUserConfig.plugins) === null || _companyUserConfig$pl === void 0 ? void 0 : (_companyUserConfig$pl2 = _companyUserConfig$pl.wdt) === null || _companyUserConfig$pl2 === void 0 ? void 0 : _companyUserConfig$pl2.version) || "flagship";
|
|
47
|
-
}
|
|
48
|
-
} catch (error) {
|
|
49
|
-
console.error(error);
|
|
50
|
-
}
|
|
51
|
-
if (version === "flagship") return 1;
|
|
52
|
-
},
|
|
53
33
|
handleOptions: function handleOptions(options) {
|
|
54
34
|
var ext = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
55
35
|
var _ext$componentConfig = ext.componentConfig,
|
|
@@ -63,6 +43,27 @@ var typeMap = {
|
|
|
63
43
|
}
|
|
64
44
|
}
|
|
65
45
|
};
|
|
46
|
+
var getWdtVersion = function getWdtVersion() {
|
|
47
|
+
try {
|
|
48
|
+
var _userInfo$companyUser, _companyUserConfig, _companyUserConfig$pl, _companyUserConfig2, _companyUserConfig2$p, _companyUserConfig2$p2;
|
|
49
|
+
var userInfo = JSON.parse(localStorage.getItem("reduxData_userInfo") || "{}");
|
|
50
|
+
var companyUserConfig = (_userInfo$companyUser = userInfo === null || userInfo === void 0 ? void 0 : userInfo.companyUserConfig) !== null && _userInfo$companyUser !== void 0 ? _userInfo$companyUser : {};
|
|
51
|
+
if (typeof companyUserConfig === "string") {
|
|
52
|
+
companyUserConfig = JSON.parse(companyUserConfig);
|
|
53
|
+
}
|
|
54
|
+
console.log("wdt---", (_companyUserConfig = companyUserConfig) === null || _companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl = _companyUserConfig.plugins) === null || _companyUserConfig$pl === void 0 ? void 0 : _companyUserConfig$pl.wdt);
|
|
55
|
+
return ((_companyUserConfig2 = companyUserConfig) === null || _companyUserConfig2 === void 0 ? void 0 : (_companyUserConfig2$p = _companyUserConfig2.plugins) === null || _companyUserConfig2$p === void 0 ? void 0 : (_companyUserConfig2$p2 = _companyUserConfig2$p.wdt) === null || _companyUserConfig2$p2 === void 0 ? void 0 : _companyUserConfig2$p2.version) || "flagship";
|
|
56
|
+
} catch (error) {
|
|
57
|
+
console.error(error);
|
|
58
|
+
return "flagship";
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var getWdtTagsMaxSelectCount = function getWdtTagsMaxSelectCount() {
|
|
62
|
+
var componentConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
63
|
+
if (componentConfig.selectMode === "single") return 1;
|
|
64
|
+
if (componentConfig.selectMode === "multiple") return undefined;
|
|
65
|
+
return getWdtVersion() === "flagship" ? 1 : undefined;
|
|
66
|
+
};
|
|
66
67
|
var AsyncSelect = /*#__PURE__*/function () {
|
|
67
68
|
// options: ComponentInterface["options"];
|
|
68
69
|
|
|
@@ -198,7 +199,7 @@ var AsyncSelect = /*#__PURE__*/function () {
|
|
|
198
199
|
this.rules = [];
|
|
199
200
|
this.align = "left";
|
|
200
201
|
this.mode = (_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.mode;
|
|
201
|
-
this.maxSelectCount = typeof ((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.maxSelectCount) === "function" ? typeMap[options.type].maxSelectCount() : (_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.maxSelectCount;
|
|
202
|
+
this.maxSelectCount = options.type === "WDT_TAGS" ? getWdtTagsMaxSelectCount(this.componentConfig) : typeof ((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.maxSelectCount) === "function" ? typeMap[options.type].maxSelectCount() : (_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.maxSelectCount;
|
|
202
203
|
this.getOptionsAsync().then(function (list) {
|
|
203
204
|
_this.asyncOptions = list;
|
|
204
205
|
});
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, 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, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, DxdShopSelect, KmVideo, BasicTypeInput, SkxIdInputSelect, SkxGoods, BasicSelectOption, OrderSubForm, FlowOverallStatusSelect, ReturnWarehouse, KmExchange } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => CommonMultiStatus | LogisticsInterception | LogisticsMoreInterception | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | 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 | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | DxdShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | ReturnWarehouse | GyGoods | KmExchange | GyReissue | GyReturn |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => CommonMultiStatus | LogisticsInterception | LogisticsMoreInterception | AsyncSelect | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | 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 | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | DxdShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | ReturnWarehouse | GyGoods | KmExchange | GyReissue | GyReturn | SkxIdInputSelect | SkxGoods | OrderSubForm | FlowOverallStatusSelect;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.10.9-beta.
|
|
3
|
+
"version": "2.10.9-beta.58",
|
|
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": "2.10.9-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.10.9-beta.58",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.58",
|
|
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": "11de08d8038366553a81351d0a8fa010678614da",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|