@kmkf-fe-packages/services-components 1.6.0-beta.6 → 1.6.0-beta.7

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.
@@ -15,6 +15,7 @@ declare class SubForm implements ComponentInterface {
15
15
  templateId?: string;
16
16
  workOrderUniqueKey?: string;
17
17
  constructor(options: PickOption);
18
+ getNewTableHeader: () => any;
18
19
  renderTabel: (list: any) => React.JSX.Element;
19
20
  renderPc: () => null;
20
21
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -1,12 +1,12 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
2
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
4
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7
5
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
6
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
9
7
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
8
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
10
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
11
11
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
12
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -29,9 +29,7 @@ var WidgetMap = {
29
29
  };
30
30
  var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
31
31
  var _this = this,
32
- _this$componentConfig7,
33
- _this$componentConfig11,
34
- _this$componentConfig12;
32
+ _this$componentConfig8;
35
33
  _classCallCheck(this, SubForm);
36
34
  _defineProperty(this, "name", void 0);
37
35
  _defineProperty(this, "id", void 0);
@@ -46,8 +44,25 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
46
44
  _defineProperty(this, "dataType", void 0);
47
45
  _defineProperty(this, "templateId", void 0);
48
46
  _defineProperty(this, "workOrderUniqueKey", void 0);
47
+ _defineProperty(this, "getNewTableHeader", function () {
48
+ var _this$componentConfig, _this$componentConfig2;
49
+ return (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : (_this$componentConfig2 = _this$componentConfig.correlationList) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.map(function (item) {
50
+ var _this$componentConfig3;
51
+ var t = ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.tableHeader.find(function (v) {
52
+ return v.key === item.key;
53
+ })) || {
54
+ isShow: true,
55
+ isEdit: false,
56
+ isRequired: false,
57
+ isNumber: false,
58
+ precision: "nolimit",
59
+ width: 150
60
+ };
61
+ return _objectSpread(_objectSpread({}, item), t);
62
+ });
63
+ });
49
64
  _defineProperty(this, "renderTabel", function (list) {
50
- var _ref, _ref$filter, _this$componentConfig, _this$componentConfig2;
65
+ var _ref, _ref$filter;
51
66
  var columns = [{
52
67
  dataIndex: "",
53
68
  title: "序号",
@@ -57,7 +72,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
57
72
  render: function render(val, record, index) {
58
73
  return /*#__PURE__*/React.createElement("span", null, index + 1);
59
74
  }
60
- }].concat(_toConsumableArray(((_ref = ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : (_this$componentConfig2 = _this$componentConfig.subConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.config) || []) === null || _ref === void 0 ? void 0 : (_ref$filter = _ref.filter(function (t) {
75
+ }].concat(_toConsumableArray(((_ref = _this.getNewTableHeader() || []) === null || _ref === void 0 ? void 0 : (_ref$filter = _ref.filter(function (t) {
61
76
  return t.isShow;
62
77
  })) === null || _ref$filter === void 0 ? void 0 : _ref$filter.map(function (item) {
63
78
  return {
@@ -65,7 +80,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
65
80
  title: item.name,
66
81
  align: "center",
67
82
  ellipsis: true,
68
- width: 200,
83
+ width: item.width,
69
84
  render: function render(val) {
70
85
  return /*#__PURE__*/React.createElement("span", null, val);
71
86
  }
@@ -106,15 +121,15 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
106
121
  }) : null;
107
122
  });
108
123
  _defineProperty(this, "editRender", function (p) {
109
- var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$componentConfig6;
124
+ var _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7;
110
125
  return /*#__PURE__*/React.createElement(GetFormItem, {
111
126
  title: _this.name,
112
127
  name: _this.id,
113
128
  rules: _this.rules,
114
129
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
115
130
  display: p === null || p === void 0 ? void 0 : p.display,
116
- required: (_this$componentConfig3 = (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.required) !== null && _this$componentConfig3 !== void 0 ? _this$componentConfig3 : false,
117
- tooltip: (_this$componentConfig5 = (_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.tooltip) !== null && _this$componentConfig5 !== void 0 ? _this$componentConfig5 : "",
131
+ 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,
132
+ tooltip: (_this$componentConfig6 = (_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.tooltip) !== null && _this$componentConfig6 !== void 0 ? _this$componentConfig6 : "",
118
133
  component: /*#__PURE__*/React.createElement(SubFormComponent, _this.componentConfig)
119
134
  });
120
135
  });
@@ -138,10 +153,10 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
138
153
  this.componentConfig = options.componentConfig;
139
154
  this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
140
155
  this.rules = [{
141
- required: (_this$componentConfig7 = this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.required,
156
+ required: (_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.required,
142
157
  validator: function validator(_, value) {
143
- var _this$componentConfig8, _this$componentConfig9, _this$componentConfig10;
144
- var result = (_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : (_this$componentConfig9 = _this$componentConfig8.subConfig) === null || _this$componentConfig9 === void 0 ? void 0 : (_this$componentConfig10 = _this$componentConfig9.config) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.reduce(function (prv, next) {
158
+ var _this$componentConfig9, _this$componentConfig10;
159
+ var result = (_this$componentConfig9 = _this.componentConfig) === null || _this$componentConfig9 === void 0 ? void 0 : (_this$componentConfig10 = _this$componentConfig9.tableHeader) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.reduce(function (prv, next) {
145
160
  if (next.isRequired && next.isShow && !next.isEdit) {
146
161
  prv[next.key] = "".concat(next.name, "\u4E0D\u80FD\u4E3A\u7A7A");
147
162
  }
@@ -163,7 +178,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
163
178
  }];
164
179
  this.isCombinationComponent = true;
165
180
  this.canSort = false;
166
- this.children = (((_this$componentConfig11 = this.componentConfig) === null || _this$componentConfig11 === void 0 ? void 0 : (_this$componentConfig12 = _this$componentConfig11.subConfig) === null || _this$componentConfig12 === void 0 ? void 0 : _this$componentConfig12.config) || []).map(function (item) {
181
+ this.children = (this.getNewTableHeader() || []).map(function (item) {
167
182
  return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
168
183
  name: item.name,
169
184
  id: "".concat(options.id, "_productList_").concat(item.key)
@@ -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 } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => Handler | LogisticsMoreInterception | MsgStatus | BasicInput | BasicTextArea | SubForm | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicPicture | 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 | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | KmErpSendGood | AfterSalesOrderId;
3
+ export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AfterSalesOrderId | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonInput | CommonMultiStatus | CommonSystemOrder | BasicDataTime | ItemEnCode | ItemId | ItemSelect | TradeId | BasicInput | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | PaymentVoucherCode | Label | KmErpSendGood;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { FormInstance } from 'antd';
3
- import { SYMBOL } from './constant';
4
- export declare type DataType = 'string' | 'number' | 'array' | 'dateArray' | 'date' | 'tradeId';
5
- export declare type ALignType = 'left' | 'right' | 'center';
2
+ import type { FormInstance } from "antd";
3
+ import { SYMBOL } from "./constant";
4
+ export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
5
+ export declare type ALignType = "left" | "right" | "center";
6
6
  export declare type QuerySymbol = keyof typeof SYMBOL;
7
7
  export declare type Record = {
8
8
  [props in string]: any;
@@ -27,7 +27,7 @@ export declare type FilterConfigType = {
27
27
  filterFn?: (p: any) => (r: Record) => unknown;
28
28
  formatFilterValue?: (p: any) => any;
29
29
  };
30
- export declare type FilterComponentType = 'MultipleSelect' | 'Input' | 'Date' | 'Cascader' | 'ShopList' | 'Rate' | 'SelectInput';
30
+ export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList" | "Rate" | "SelectInput";
31
31
  export interface ComponentInterface {
32
32
  id: string;
33
33
  sortField: string;
@@ -47,8 +47,8 @@ export interface ComponentInterface {
47
47
  rules?: any[];
48
48
  width?: number;
49
49
  align?: ALignType;
50
- dataType: 'string' | 'number' | 'boolean' | 'array' | 'range' | 'object';
51
- format?: 'dateTime' | 'date' | 'time' | 'cascader' | 'shopInput' | 'staffGroup';
50
+ dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
51
+ format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup";
52
52
  options?: Array<any>;
53
53
  templateId?: string;
54
54
  flowTemplateKey?: string;
@@ -84,7 +84,7 @@ export interface ComponentInterface {
84
84
  /**
85
85
  * @description 显示字段名称
86
86
  */
87
- showField?: 'EXPRESS_COMPANY' | 'EXPRESS_WAYBILL_CODE' | 'EXPRESS_SNAPSHOT' | 'all' | 'bs' | 'workOrder' | 'logisticsCompany' | 'logisticsCode';
87
+ showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder" | "logisticsCompany" | "logisticsCode";
88
88
  /**
89
89
  * @description 是否选择SKU
90
90
  */
@@ -104,7 +104,7 @@ export interface ComponentInterface {
104
104
  /**
105
105
  * @description 备注状态
106
106
  */
107
- associatedType?: 'APPEND';
107
+ associatedType?: "APPEND";
108
108
  isAssociated?: boolean;
109
109
  isShowFlag?: boolean;
110
110
  /**
@@ -145,7 +145,7 @@ export interface ComponentInterface {
145
145
  * @description 时间初始值
146
146
  */
147
147
  dateTime?: string;
148
- dateType?: 'DATE' | 'DATE_TIME' | 'DATE_RANGE' | 'DATE_TIME_RANGE';
148
+ dateType?: "DATE" | "DATE_TIME" | "DATE_RANGE" | "DATE_TIME_RANGE";
149
149
  maxSize?: number;
150
150
  basicGrade?: number;
151
151
  range?: number;
@@ -173,18 +173,13 @@ export interface ComponentInterface {
173
173
  rulesOptions?: Array<any>;
174
174
  selectRules?: Array<string>;
175
175
  logistics?: string;
176
- repeatConfig?: {
177
- repeatRange: string;
178
- repeatComponents: any[];
179
- };
180
- subConfig?: {
181
- config: any;
182
- flowStatus: string[];
183
- flowTemplateKey: any;
184
- nodeId: string;
185
- workOrderTemplateId: string;
186
- };
187
- tooltip?: string;
176
+ flowStatus?: string[];
177
+ flowTemplateKey?: any;
178
+ nodeId?: string;
179
+ workOrderTemplateId?: string;
180
+ needFilterShopByPermission?: boolean;
181
+ tableHeader?: any;
182
+ correlationList?: any;
188
183
  };
189
184
  effects?: {
190
185
  queryWorkOrderDetail?: (r: Record) => void;
@@ -258,13 +253,13 @@ export interface ComponentInterface {
258
253
  getComponentValue: (r: Record) => any;
259
254
  formDataTransform?: (r: any) => any;
260
255
  }
261
- export declare type PickOption = Pick<ComponentInterface, 'name' | 'id' | 'type' | 'componentConfig' | 'effects' | 'columnHeader' | 'templateId' | 'workOrderUniqueKey' | 'platform' | 'parentName' | 'width' | 'flowTemplateKey'>;
256
+ export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width" | "flowTemplateKey">;
262
257
  export declare type ColumnConfig = {
263
258
  id: string;
264
259
  name: string;
265
260
  type: string;
266
261
  subKey?: string;
267
- mode?: 'multiple';
268
- config?: ComponentInterface['componentConfig'];
269
- templateConfig?: ComponentInterface['componentConfig'];
262
+ mode?: "multiple";
263
+ config?: ComponentInterface["componentConfig"];
264
+ templateConfig?: ComponentInterface["componentConfig"];
270
265
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.6.0-beta.6",
3
+ "version": "1.6.0-beta.7",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,7 +21,7 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "1.6.0-beta.0",
24
+ "@kmkf-fe-packages/basic-components": "1.6.0-beta.7",
25
25
  "@kmkf-fe-packages/kmkf-utils": "1.6.0-beta.0"
26
26
  },
27
27
  "devDependencies": {
@@ -38,7 +38,7 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "1772c64c728ed351370f7539d4874e1ae9cf84f1",
41
+ "gitHead": "c38400ef6d80574b913bd0493501c5a2443a3634",
42
42
  "gitHooks": {
43
43
  "pre-commit": "lint-staged"
44
44
  }