@kmkf-fe-packages/services-components 1.0.10-beta.14 → 1.0.10-beta.16

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,17 +1,17 @@
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 SubForm 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"];
14
+ dataType: ComponentInterface['dataType'];
15
15
  templateId?: string;
16
16
  workOrderUniqueKey?: string;
17
17
  constructor(options: PickOption);
@@ -28,6 +28,6 @@ declare class SubForm implements ComponentInterface {
28
28
  id: string;
29
29
  name: string;
30
30
  filterComponentType: "Input";
31
- };
31
+ }[];
32
32
  }
33
33
  export default SubForm;
@@ -13,14 +13,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
13
13
  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; }
14
14
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
15
  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); }
16
- import React from "react";
17
- import { Table } from "antd";
18
- import { SubForm as SubFormComponent } from "@kmkf-fe-packages/basic-components";
16
+ import React from 'react';
17
+ import { Table } from 'antd';
18
+ import { SubForm as SubFormComponent } from '@kmkf-fe-packages/basic-components';
19
19
  import Input from "../Input";
20
20
  import TextArea from "../TextArea";
21
+ import BsHeaderChild from "../BS/common/BsHeaderChild";
21
22
  import GetFormItem from "../GetFormItem";
22
23
  import ItemView from "../../commonComponents/ItemView";
23
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
24
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
24
25
  import { SYMBOL } from "../../constant";
25
26
  var WidgetMap = {
26
27
  INPUT: Input,
@@ -48,9 +49,9 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
48
49
  _defineProperty(this, "renderTabel", function (list) {
49
50
  var _ref, _ref$filter, _this$componentConfig, _this$componentConfig2;
50
51
  var columns = [{
51
- dataIndex: "",
52
- title: "序号",
53
- align: "center",
52
+ dataIndex: '',
53
+ title: '序号',
54
+ align: 'center',
54
55
  ellipsis: true,
55
56
  width: 50,
56
57
  render: function render(val, record, index) {
@@ -62,7 +63,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
62
63
  return {
63
64
  dataIndex: item.key,
64
65
  title: item.name,
65
- align: "center",
66
+ align: 'center',
66
67
  ellipsis: true,
67
68
  width: 200,
68
69
  render: function render(val) {
@@ -73,14 +74,14 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
73
74
  return /*#__PURE__*/React.createElement(Table, {
74
75
  columns: columns,
75
76
  dataSource: list,
76
- rowKey: "uuid",
77
+ rowKey: 'uuid',
77
78
  size: "small",
78
79
  pagination: false,
79
80
  scroll: {
80
- x: "100%"
81
+ x: '100%'
81
82
  },
82
83
  locale: {
83
- emptyText: "暂无数据"
84
+ emptyText: '暂无数据'
84
85
  }
85
86
  });
86
87
  });
@@ -117,15 +118,15 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
117
118
  });
118
119
  });
119
120
  _defineProperty(this, "filterConfig", function (item) {
120
- return {
121
+ return [{
121
122
  searchDefaultConditions: SYMBOL.in,
122
123
  type: item.type,
123
124
  id: "".concat(item.id, "_productList"),
124
125
  // 过滤组件id
125
126
  name: item.name,
126
127
  // 过滤组件名称
127
- filterComponentType: "Input"
128
- };
128
+ filterComponentType: 'Input'
129
+ }];
129
130
  });
130
131
  this.name = options.name;
131
132
  this.id = options.id;
@@ -152,7 +153,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
152
153
  }
153
154
  });
154
155
  return prv;
155
- }, "");
156
+ }, '');
156
157
  if (msg) {
157
158
  return Promise.reject(new Error(msg));
158
159
  }
@@ -162,11 +163,11 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
162
163
  this.isCombinationComponent = true;
163
164
  this.canSort = false;
164
165
  this.children = (((_this$componentConfig9 = this.componentConfig) === null || _this$componentConfig9 === void 0 ? void 0 : (_this$componentConfig10 = _this$componentConfig9.subConfig) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.config) || []).map(function (item) {
165
- return new WidgetMap[item.workOrderComponentType](_objectSpread(_objectSpread({}, options), {}, {
166
+ return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
166
167
  name: item.name,
167
- id: item.key
168
+ id: "".concat(options.id, "_productList_").concat(item.key)
168
169
  }));
169
170
  });
170
- this.dataType = "object";
171
+ this.dataType = 'object';
171
172
  });
172
173
  export default SubForm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.0.10-beta.14",
3
+ "version": "1.0.10-beta.16",
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.0.10-beta.14",
25
- "@kmkf-fe-packages/kmkf-utils": "1.0.10-beta.13"
24
+ "@kmkf-fe-packages/basic-components": "1.0.10-beta.16",
25
+ "@kmkf-fe-packages/kmkf-utils": "1.0.10-beta.15"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@typescript-eslint/eslint-plugin": "^5.59.2",
@@ -38,7 +38,7 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "0dc20831e301e639e27083524f394fb63f745090",
41
+ "gitHead": "8ae15fe2d1ec963b5da2602cf4ffd08d902bda6a",
42
42
  "gitHooks": {
43
43
  "pre-commit": "lint-staged"
44
44
  }