@kmkf-fe-packages/services-components 0.8.18-alpha.13 → 0.8.18-alpha.14

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,20 +1,20 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
- import React from "react";
3
- import "./icon/iconfont.css";
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
+ import './icon/iconfont.css';
4
4
  declare class FlowMarkSelect implements ComponentInterface {
5
5
  name: string;
6
6
  id: string;
7
7
  sortField: string;
8
8
  type: string;
9
9
  rules: any[];
10
- componentConfig: ComponentInterface["componentConfig"];
11
- effects: ComponentInterface["effects"];
10
+ componentConfig: ComponentInterface['componentConfig'];
11
+ effects: ComponentInterface['effects'];
12
12
  workOrderMark: any[];
13
13
  isCombinationComponent: boolean;
14
14
  formField: string;
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
- dataType: ComponentInterface["dataType"];
17
+ dataType: ComponentInterface['dataType'];
18
18
  constructor(options: PickOption);
19
19
  renderMenu: (record: Record) => React.JSX.Element;
20
20
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -8,11 +8,11 @@ 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 { Dropdown, Menu } from "antd";
11
+ import React from 'react';
12
+ import { Dropdown, Menu } from 'antd';
13
13
  import ItemView from "../../commonComponents/ItemView";
14
- import { ApaasSelect } from "@kmkf-fe-packages/basic-components";
15
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
14
+ import { ApaasSelect } from '@kmkf-fe-packages/basic-components';
15
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
16
16
  import GetFormItem from "../GetFormItem";
17
17
  import { SYMBOL } from "../../constant";
18
18
  import "./icon/iconfont.css";
@@ -39,7 +39,7 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
39
39
  var key = _ref.key,
40
40
  domEvent = _ref.domEvent;
41
41
  domEvent.stopPropagation();
42
- typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.handleChangeSingleWorkOrderMark) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.handleChangeSingleWorkOrderMark(key, record));
42
+ typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.handleChangeSingleWorkOrderMark) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.handleChangeSingleWorkOrderMark(key, record));
43
43
  }
44
44
  }, _this.workOrderMark.map(function (item) {
45
45
  return /*#__PURE__*/React.createElement(Menu.Item, {
@@ -54,7 +54,7 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
54
54
  });
55
55
  return /*#__PURE__*/React.createElement(Dropdown, {
56
56
  overlay: _this.renderMenu(record)
57
- }, /*#__PURE__*/React.createElement("span", null, (mark === null || mark === void 0 ? void 0 : mark.label) || "--"));
57
+ }, /*#__PURE__*/React.createElement("span", null, (mark === null || mark === void 0 ? void 0 : mark.label) || '--'));
58
58
  });
59
59
  _defineProperty(this, "renderLog", function (r) {
60
60
  var mark = _this.workOrderMark.find(function (item) {
@@ -71,23 +71,23 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
71
71
  });
72
72
  _defineProperty(this, "renderExport", function (value, record) {
73
73
  var MARK_MAP = {
74
- 1: "白色",
75
- 2: "红色",
76
- 3: "黄色",
77
- 4: "蓝色",
78
- 5: "绿色",
79
- 6: "紫色"
74
+ 1: '白色',
75
+ 2: '红色',
76
+ 3: '黄色',
77
+ 4: '蓝色',
78
+ 5: '绿色',
79
+ 6: '紫色'
80
80
  };
81
81
  var mark = _this.workOrderMark.find(function (item) {
82
82
  return item.value === (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
83
83
  });
84
- return mark ? MARK_MAP[mark === null || mark === void 0 ? void 0 : mark.value] : "--";
84
+ return mark ? MARK_MAP[mark === null || mark === void 0 ? void 0 : mark.value] : '--';
85
85
  });
86
86
  _defineProperty(this, "renderClient", function (record) {
87
87
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
88
88
  id: _this.id,
89
89
  label: _this.name,
90
- value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ""
90
+ value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ''
91
91
  }) : null;
92
92
  });
93
93
  _defineProperty(this, "editRender", function (p) {
@@ -111,41 +111,41 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
111
111
  // 过滤组件id
112
112
  name: item.name,
113
113
  // 过滤组件名称
114
- filterComponentType: "MultipleSelect",
114
+ filterComponentType: 'MultipleSelect',
115
115
  props: {
116
116
  //不使用workOrderMark的数据,筛选会深拷贝
117
117
  options: [{
118
- label: "空白",
119
- value: "1"
118
+ label: '空白',
119
+ value: '1'
120
120
  }, {
121
- label: "红色",
122
- value: "2"
121
+ label: '红色',
122
+ value: '2'
123
123
  }, {
124
- label: "黄色",
125
- value: "3"
124
+ label: '黄色',
125
+ value: '3'
126
126
  }, {
127
- label: "蓝色",
128
- value: "4"
127
+ label: '蓝色',
128
+ value: '4'
129
129
  }, {
130
- label: "绿色",
131
- value: "5"
130
+ label: '绿色',
131
+ value: '5'
132
132
  }, {
133
- label: "紫色",
134
- value: "6"
133
+ label: '紫色',
134
+ value: '6'
135
135
  }]
136
136
  },
137
137
  filterFn: function filterFn(value) {
138
138
  return function (i) {
139
- return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ""));
139
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
140
140
  };
141
141
  }
142
142
  };
143
143
  });
144
- this.name = "标记";
145
- this.id = "markFlag";
146
- this.sortField = "markFlag";
147
- this.formField = "markFlag";
148
- this.type = "FLOW_MARK_SELECT";
144
+ this.name = '标记';
145
+ this.id = 'markFlag';
146
+ this.sortField = 'markFlag';
147
+ this.formField = 'markFlag';
148
+ this.type = 'FLOW_MARK_SELECT';
149
149
  this.effects = options.effects;
150
150
  this.rules = [];
151
151
  this.isCombinationComponent = false;
@@ -155,51 +155,51 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
155
155
  label: /*#__PURE__*/React.createElement("span", {
156
156
  className: "iconfont icon-xingxing"
157
157
  }),
158
- value: "1"
158
+ value: '1'
159
159
  }, {
160
160
  label: /*#__PURE__*/React.createElement("span", {
161
161
  className: "iconfont icon-xingxing1",
162
162
  style: {
163
- color: "#ff0000"
163
+ color: '#ff0000'
164
164
  }
165
165
  }),
166
- value: "2"
166
+ value: '2'
167
167
  }, {
168
168
  label: /*#__PURE__*/React.createElement("span", {
169
169
  className: "iconfont icon-xingxing1",
170
170
  style: {
171
- color: "#f6b343"
171
+ color: '#f6b343'
172
172
  }
173
173
  }),
174
- value: "3"
174
+ value: '3'
175
175
  }, {
176
176
  label: /*#__PURE__*/React.createElement("span", {
177
177
  className: "iconfont icon-xingxing1",
178
178
  style: {
179
- color: "#4d90f7"
179
+ color: '#4d90f7'
180
180
  }
181
181
  }),
182
- value: "4"
182
+ value: '4'
183
183
  }, {
184
184
  label: /*#__PURE__*/React.createElement("span", {
185
185
  className: "iconfont icon-xingxing1",
186
186
  style: {
187
- color: "#6ed86c"
187
+ color: '#6ed86c'
188
188
  }
189
189
  }),
190
- value: "5"
190
+ value: '5'
191
191
  }, {
192
192
  label: /*#__PURE__*/React.createElement("span", {
193
193
  className: "iconfont icon-xingxing1",
194
194
  style: {
195
- color: "#be4ed1"
195
+ color: '#be4ed1'
196
196
  }
197
197
  }),
198
- value: "6"
198
+ value: '6'
199
199
  }];
200
200
  this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
201
201
  options: this.workOrderMark
202
202
  });
203
- this.dataType = "string";
203
+ this.dataType = 'string';
204
204
  });
205
205
  export default FlowMarkSelect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.8.18-alpha.13",
3
+ "version": "0.8.18-alpha.14",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "6f3efeac8be25bc659a52ae759866a01a1f5b62d"
43
+ "gitHead": "04d89e11271036fbeee2ecd5c2ac4687782d7438"
44
44
  }