@kmkf-fe-packages/services-components 1.10.1-beta.5 → 1.11.0

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.
package/README.md CHANGED
@@ -2,6 +2,4 @@
2
2
 
3
3
  - 针对于自定义组件的后缀,在提交的时候是以组件类型的驼峰式来命名的
4
4
 
5
- ---
6
-
7
-
5
+ ---
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryWdtLogisticsCompany" | "queryWdtSendData" | "queryLabel";
2
+ declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryWdtSendData";
3
3
  declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
4
4
  requestList?: RequestType[] | undefined;
5
5
  repeatRequestList?: Record<string, () => Promise<any>> | undefined;
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useEffect, useState } from "react";
17
17
  import { Skeleton, Result, Button } from "antd";
18
- import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryWdtLogisticsCompany, queryWdtSendData, queryAllLogisticsCompany, queryLabel } from "../../service/api";
18
+ import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
19
19
  import { servers } from '@kmkf-fe-packages/kmkf-utils';
20
20
  var Global = function Global(_ref) {
21
21
  var children = _ref.children,
@@ -1,19 +1,19 @@
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 BasicCascader 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
- format: ComponentInterface["format"];
16
- options: ComponentInterface["options"];
14
+ dataType: ComponentInterface['dataType'];
15
+ format: ComponentInterface['format'];
16
+ options: ComponentInterface['options'];
17
17
  constructor(options: PickOption);
18
18
  /**
19
19
  * 通过值计算展示内容
@@ -6,13 +6,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
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; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
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); }
9
- import React from "react";
10
- import { Cascader } from "antd";
11
- import intersection from "lodash/intersection";
9
+ import React from 'react';
10
+ import { Cascader } from 'antd';
11
+ import intersection from 'lodash/intersection';
12
12
  import GetFormItem from "../GetFormItem";
13
- import { findLabelBySelectValue, transMultSelectOptions, tree } from "@kmkf-fe-packages/kmkf-utils";
13
+ import { findLabelBySelectValue, transMultSelectOptions, tree } from '@kmkf-fe-packages/kmkf-utils';
14
14
  import ItemView from "../../commonComponents/ItemView";
15
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
16
16
  import { SYMBOL } from "../../constant";
17
17
  var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
18
18
  var _this = this,
@@ -35,7 +35,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
35
35
  var _findLabelBySelectVal, _findLabelBySelectVal2, _this$componentConfig;
36
36
  return (_findLabelBySelectVal = findLabelBySelectValue(value, (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (i) {
37
37
  return i.label;
38
- })) === null || _findLabelBySelectVal2 === void 0 ? void 0 : _findLabelBySelectVal2.join(",");
38
+ })) === null || _findLabelBySelectVal2 === void 0 ? void 0 : _findLabelBySelectVal2.join(',');
39
39
  });
40
40
  _defineProperty(this, "renderClient", function (record) {
41
41
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -53,7 +53,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
53
53
  return item.actived;
54
54
  }), ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.options) || [])) === null || _findLabelBySelectVal3 === void 0 ? void 0 : (_findLabelBySelectVal4 = _findLabelBySelectVal3.map(function (i) {
55
55
  return i.label;
56
- })) === null || _findLabelBySelectVal4 === void 0 ? void 0 : _findLabelBySelectVal4.join(","));
56
+ })) === null || _findLabelBySelectVal4 === void 0 ? void 0 : _findLabelBySelectVal4.join(','));
57
57
  });
58
58
  _defineProperty(this, "renderLog", function (r) {
59
59
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_multSelect")])) return null;
@@ -65,13 +65,13 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
65
65
  _defineProperty(this, "renderExport", function (value, record) {
66
66
  var _findLabelBySelectVal5, _findLabelBySelectVal6, _ref2, _this$componentConfig3;
67
67
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) === undefined) {
68
- return "--";
68
+ return '--';
69
69
  }
70
70
  return (_findLabelBySelectVal5 = findLabelBySelectValue((_ref2 = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (item) {
71
71
  return item.actived;
72
72
  }), ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.options) || [])) === null || _findLabelBySelectVal5 === void 0 ? void 0 : (_findLabelBySelectVal6 = _findLabelBySelectVal5.map(function (i) {
73
73
  return i.label;
74
- })) === null || _findLabelBySelectVal6 === void 0 ? void 0 : _findLabelBySelectVal6.join(",");
74
+ })) === null || _findLabelBySelectVal6 === void 0 ? void 0 : _findLabelBySelectVal6.join(',');
75
75
  });
76
76
  _defineProperty(this, "editRender", function (p) {
77
77
  var _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7, _this$componentConfig8;
@@ -82,17 +82,16 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
82
82
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
83
83
  required: (_this$componentConfig4 = (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.required) !== null && _this$componentConfig4 !== void 0 ? _this$componentConfig4 : false,
84
84
  display: p === null || p === void 0 ? void 0 : p.display,
85
- tooltip: (_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.showTooltip ? (_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.tooltip : "",
85
+ tooltip: (_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.showTooltip ? (_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.tooltip : '',
86
86
  component: /*#__PURE__*/React.createElement(Cascader, _extends({}, _this.componentConfig, {
87
87
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
88
88
  options: transMultSelectOptions(((_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.options) || []),
89
89
  fieldNames: {
90
- label: "label",
91
- value: "actived",
92
- children: "children"
90
+ label: 'label',
91
+ value: 'actived',
92
+ children: 'children'
93
93
  },
94
- showSearch: true,
95
- onChange: p === null || p === void 0 ? void 0 : p.onChange
94
+ showSearch: true
96
95
  }))
97
96
  });
98
97
  });
@@ -106,26 +105,26 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
106
105
  // 过滤组件id
107
106
  name: item.name,
108
107
  // 过滤组件名称
109
- filterComponentType: "Cascader",
108
+ filterComponentType: 'Cascader',
110
109
  props: {
111
110
  options: options,
112
111
  multiple: true,
113
- maxTagCount: "responsive",
112
+ maxTagCount: 'responsive',
114
113
  fieldNames: {
115
- label: "label",
116
- value: "actived",
117
- children: "children"
114
+ label: 'label',
115
+ value: 'actived',
116
+ children: 'children'
118
117
  }
119
118
  },
120
119
  filterFn: function filterFn(value) {
121
120
  return function (i) {
122
- return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "basicMultSelect")).length > 0;
121
+ return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'basicMultSelect')).length > 0;
123
122
  };
124
123
  },
125
124
  formatFilterValue: function formatFilterValue(val) {
126
125
  if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
127
126
  return val.map(function (item) {
128
- var node = tree.findNodeByValue(options, "actived", item[item.length - 1]);
127
+ var node = tree.findNodeByValue(options, 'actived', item[item.length - 1]);
129
128
  if (node) {
130
129
  var label = node.label,
131
130
  actived = node.actived;
@@ -149,8 +148,8 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
149
148
  this.children = [];
150
149
  this.isCombinationComponent = false;
151
150
  this.canSort = true;
152
- this.dataType = "array";
153
- this.format = "cascader";
151
+ this.dataType = 'array';
152
+ this.format = 'cascader';
154
153
  this.options = ((_this$componentConfig9 = this.componentConfig) === null || _this$componentConfig9 === void 0 ? void 0 : _this$componentConfig9.options) || [];
155
154
  }
156
155
 
@@ -16,10 +16,10 @@ import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Ty
16
16
  import React, { useState, useMemo } from "react";
17
17
  import { ExpressData, WdtSendData } from "@kmkf-fe-packages/kmkf-utils";
18
18
  import { getAlipayBillReceipt } from "../../service/api";
19
- import { CopyToClipboard } from "react-copy-to-clipboard";
20
- import CopyText from "../../commonComponents/CopyText";
19
+ import { CopyToClipboard } from 'react-copy-to-clipboard';
21
20
  import styles from "./index.module.less";
22
21
  import defaultImg from "./img/default-img.png";
22
+ import CopyText from "../../commonComponents/CopyText";
23
23
  var Paragraph = Typography.Paragraph;
24
24
  export var getFormItem = function getFormItem(_ref) {
25
25
  var name = _ref.name,
@@ -141,8 +141,6 @@ export var factory = function factory(type, options) {
141
141
  return new BsPosting(options);
142
142
  case "BS_GOODS":
143
143
  return new BsGoods(options);
144
- case "WDT_GOODS":
145
- return new WdtGoods(options);
146
144
  case "BS_EXCHANGE_GOODS":
147
145
  return new BsExchange(options);
148
146
  case "WDT_EXCHANGE_GOODS":
@@ -207,6 +205,9 @@ export var factory = function factory(type, options) {
207
205
  return new CommonDataTime(options);
208
206
  case "FLOW_UPDATE_DATETIME":
209
207
  return new CommonDataTime(options);
208
+ case "WDT_GOODS":
209
+ // 万里牛商品
210
+ return new WdtGoods(options);
210
211
  case "BUSINESS_ORDER_NO":
211
212
  return new CommonInput(options);
212
213
  case "PAYMENT_VOUCHER_CODE":
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.10.1-beta.5",
3
+ "version": "1.11.0",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "scripts": {
10
+ "sync": "yarn build && yalc push",
10
11
  "build": "yarn run lint && father build",
11
12
  "lint": "eslint '**/*.{ts,tsx}'",
12
- "lint:fix": "eslint --fix '**/*.{ts,tsx}'",
13
- "sync": "yarn build && yalc push"
13
+ "lint:fix": "eslint --fix '**/*.{ts,tsx}'"
14
14
  },
15
15
  "lint-staged": {
16
16
  "*.{js,jsx,less,md,json}": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "1.10.1-beta.4",
25
- "@kmkf-fe-packages/kmkf-utils": "1.10.1-beta.0",
24
+ "@kmkf-fe-packages/basic-components": "1.11.0",
25
+ "@kmkf-fe-packages/kmkf-utils": "1.11.0",
26
26
  "react-pdf-js": "^5.1.0"
27
27
  },
28
28
  "devDependencies": {
@@ -34,13 +34,12 @@
34
34
  "peerDependencies": {
35
35
  "@ant-design/icons": "^4.7.0",
36
36
  "antd": "^4.21.4",
37
- "copy-to-clipboard": "^3.3.3",
38
37
  "react": "^16.8.0"
39
38
  },
40
39
  "publishConfig": {
41
40
  "access": "public"
42
41
  },
43
- "gitHead": "e818bf514c2b6aa3f5142f7b74fb063a4d1f57bb",
42
+ "gitHead": "9c624c5410069e57085e281dbbc194346ac6bf42",
44
43
  "gitHooks": {
45
44
  "pre-commit": "lint-staged"
46
45
  }