@kmkf-fe-packages/services-components 2.2.44-beta.35 → 2.2.44-beta.37

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.
@@ -1,6 +1,6 @@
1
- import { ComponentInterface, PickOption, Record } from '../../type';
2
- import React from 'react';
3
- import './index.less';
1
+ import { ComponentInterface, PickOption, Record } from "../../type";
2
+ import React from "react";
3
+ import "./index.less";
4
4
  declare type Value = {
5
5
  url: string;
6
6
  name: string;
@@ -11,15 +11,22 @@ declare class BasicPicturePro implements ComponentInterface {
11
11
  sortField: string;
12
12
  type: string;
13
13
  rules: any[];
14
- componentConfig: ComponentInterface['componentConfig'];
14
+ componentConfig: ComponentInterface["componentConfig"];
15
15
  isCombinationComponent: boolean;
16
16
  formField: string;
17
17
  canSort: boolean;
18
18
  children: ComponentInterface[];
19
- dataType: ComponentInterface['dataType'];
20
- currenEnv: ComponentInterface['platform'];
19
+ dataType: ComponentInterface["dataType"];
20
+ currenEnv: ComponentInterface["platform"];
21
+ sortChildField: {
22
+ name: string;
23
+ key: string;
24
+ dataType: string;
25
+ [key: string]: any;
26
+ }[];
21
27
  constructor(options: PickOption);
22
28
  formatPictures: (pictures: string) => string[];
29
+ getSortChildFields: () => any;
23
30
  render: (value: Value) => React.JSX.Element | null;
24
31
  renderPc: () => null;
25
32
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -8,17 +8,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  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; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  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); }
11
- import React from 'react';
12
- import { ApaasUploadProAsync } from '@kmkf-fe-packages/basic-components';
11
+ import React from "react";
12
+ import { ApaasUploadProAsync } from "@kmkf-fe-packages/basic-components";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
15
  import PictureName from "./PictureName";
16
16
  import PictureUrl from "./PictureUrl";
17
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
17
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
18
18
  import "./index.less";
19
- import { Image, Tooltip, message } from 'antd';
20
- import { DownloadOutlined, CopyOutlined } from '@ant-design/icons';
21
- import copy from 'copy-to-clipboard';
19
+ import { Image, Tooltip, message } from "antd";
20
+ import { DownloadOutlined, CopyOutlined } from "@ant-design/icons";
21
+ import copy from "copy-to-clipboard";
22
22
  import { hostUrl } from "../../constant";
23
23
  var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options) {
24
24
  var _this = this,
@@ -36,10 +36,22 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
36
36
  _defineProperty(this, "children", void 0);
37
37
  _defineProperty(this, "dataType", void 0);
38
38
  _defineProperty(this, "currenEnv", void 0);
39
+ _defineProperty(this, "sortChildField", void 0);
39
40
  _defineProperty(this, "formatPictures", function (pictures) {
40
- pictures = pictures.replace(/[\[\]]/g, '');
41
- pictures = pictures.replace(/\s/g, '');
42
- return pictures ? pictures.split(',') : [];
41
+ pictures = pictures.replace(/[\[\]]/g, "");
42
+ pictures = pictures.replace(/\s/g, "");
43
+ return pictures ? pictures.split(",") : [];
44
+ });
45
+ _defineProperty(this, "getSortChildFields", function () {
46
+ return [{
47
+ name: "图片名称",
48
+ key: "".concat(_this.id, "_name"),
49
+ dataType: "arrayObject"
50
+ }, {
51
+ name: "图片链接",
52
+ key: "".concat(_this.id, "_url"),
53
+ dataType: "arrayObject"
54
+ }];
43
55
  });
44
56
  _defineProperty(this, "render", function (value) {
45
57
  var _document;
@@ -48,29 +60,29 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
48
60
  }
49
61
  var copyText = value.map(function (item) {
50
62
  return item.name;
51
- }).join(',');
63
+ }).join(",");
52
64
  var onCopy = function onCopy() {
53
65
  copy(copyText);
54
- message.success('图片名称复制成功');
66
+ message.success("图片名称复制成功");
55
67
  };
56
68
  return /*#__PURE__*/React.createElement("div", {
57
69
  className: "pictureProClient"
58
70
  }, /*#__PURE__*/React.createElement(Image.PreviewGroup, {
59
- preview: _this.currenEnv === 'ks' ? {
60
- getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById('root')
71
+ preview: _this.currenEnv === "ks" ? {
72
+ getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById("root")
61
73
  } : true
62
74
  }, value.map(function (item) {
63
75
  var finalImage = "".concat(/^pic\/[\s\S]*$/.test(item.url) ? "".concat(hostUrl, "/").concat(item.url) : item.url, "?x-oss-process=image/resize,h_60,w_60");
64
76
  var showImage = /^pic\/[\s\S]*$/.test(item.url) ? "".concat(hostUrl, "/").concat(item.url) : item.url;
65
77
  var downloadHandle = function downloadHandle() {
66
- if (_this.currenEnv === 'pc') {
78
+ if (_this.currenEnv === "pc") {
67
79
  try {
68
80
  fetch("".concat(hostUrl, "/").concat(item.url)).then(function (res) {
69
81
  return res.blob();
70
82
  }).then(function (blob) {
71
- var a = document.createElement('a');
83
+ var a = document.createElement("a");
72
84
  document.body.appendChild(a);
73
- a.style.display = 'none';
85
+ a.style.display = "none";
74
86
  var url = window.URL.createObjectURL(blob);
75
87
  a.href = url;
76
88
  a.download = item.name;
@@ -83,7 +95,7 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
83
95
  }
84
96
  } else {
85
97
  copy("".concat(hostUrl, "/").concat(item.url));
86
- message.success('图片链接复制成功');
98
+ message.success("图片链接复制成功");
87
99
  }
88
100
  };
89
101
  return /*#__PURE__*/React.createElement("div", {
@@ -96,15 +108,15 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
96
108
  preview: {
97
109
  src: showImage
98
110
  },
99
- width: '100%',
100
- height: '100%'
111
+ width: "100%",
112
+ height: "100%"
101
113
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tooltip, {
102
114
  title: item.name
103
115
  }, /*#__PURE__*/React.createElement("div", {
104
116
  className: "pictureProText"
105
117
  }, item.name)), /*#__PURE__*/React.createElement("div", {
106
118
  className: "pictureProOperate"
107
- }, _this.currenEnv === 'pc' ? /*#__PURE__*/React.createElement(DownloadOutlined, {
119
+ }, _this.currenEnv === "pc" ? /*#__PURE__*/React.createElement(DownloadOutlined, {
108
120
  className: "downloadIcon",
109
121
  onClick: downloadHandle
110
122
  }) : /*#__PURE__*/React.createElement(CopyOutlined, {
@@ -142,9 +154,9 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
142
154
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
143
155
  display: p === null || p === void 0 ? void 0 : p.display,
144
156
  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,
145
- 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 : '',
157
+ 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 : "",
146
158
  component: /*#__PURE__*/React.createElement(ApaasUploadProAsync, _extends({}, _this.componentConfig, {
147
- uniqueKey: 'picturePro',
159
+ uniqueKey: "picturePro",
148
160
  hostUrl: hostUrl,
149
161
  platform: _this.currenEnv
150
162
  }))
@@ -166,15 +178,16 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
166
178
  this.isCombinationComponent = true;
167
179
  this.canSort = true;
168
180
  this.children = [new PictureName(_objectSpread(_objectSpread({}, options), {}, {
169
- name: '图片名称',
181
+ name: "图片名称",
170
182
  id: "".concat(options.id, "_pictureProList_name"),
171
183
  width: 250
172
184
  })), new PictureUrl(_objectSpread(_objectSpread({}, options), {}, {
173
- name: '图片详情',
185
+ name: "图片详情",
174
186
  id: "".concat(options.id, "_pictureProList_url"),
175
187
  width: 200
176
188
  }))];
177
- this.dataType = 'object';
189
+ this.dataType = "object";
178
190
  this.currenEnv = options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.env;
191
+ this.sortChildField = this.getSortChildFields();
179
192
  });
180
193
  export default BasicPicturePro;
@@ -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, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, KmVideo, BasicTypeInput, SkxIdInputSelect, SkxGoods, BasicSelectOption, OrderSubForm, FlowOverallStatusSelect } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder | CommonInput | CommonMultiStatus | BasicInput | JstSendGood | LogisticsMoreInterception | MsgStatus | OrderSubForm | PublicGoods | StatusSelect | SubForm | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | BasicRadio | BasicTextArea | BasicPicture | BasicPicturePro | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsGoods | BsE3Goods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | FlowOverallStatusSelect;
3
+ export declare const factory: (type: string, options: PickOption) => BsSystemOrder | CommonMultiStatus | JstSendGood | MsgStatus | BasicPicturePro | PublicGoods | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicSelectOption | 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 | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsGoods | BsE3Goods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn | AsyncSelect | 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.2.44-beta.35",
3
+ "version": "2.2.44-beta.37",
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.2.44-beta.35",
25
- "@kmkf-fe-packages/kmkf-utils": "2.2.44-beta.32",
24
+ "@kmkf-fe-packages/basic-components": "2.2.44-beta.37",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.2.44-beta.37",
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": "3de0698362d4a2dfc11a536ddefc994f5072f194",
44
+ "gitHead": "00120f1480c48dcc34d68ab0ea0cdb1540b6e4ca",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }