@kmkf-fe-packages/services-components 0.8.18-alpha.15 → 0.8.18-alpha.21

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,11 @@ 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", {
58
+ onClick: function onClick(e) {
59
+ return e.stopPropagation();
60
+ }
61
+ }, (mark === null || mark === void 0 ? void 0 : mark.label) || "--"));
58
62
  });
59
63
  _defineProperty(this, "renderLog", function (r) {
60
64
  var mark = _this.workOrderMark.find(function (item) {
@@ -71,23 +75,23 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
71
75
  });
72
76
  _defineProperty(this, "renderExport", function (value, record) {
73
77
  var MARK_MAP = {
74
- 1: '白色',
75
- 2: '红色',
76
- 3: '黄色',
77
- 4: '蓝色',
78
- 5: '绿色',
79
- 6: '紫色'
78
+ 1: "白色",
79
+ 2: "红色",
80
+ 3: "黄色",
81
+ 4: "蓝色",
82
+ 5: "绿色",
83
+ 6: "紫色"
80
84
  };
81
85
  var mark = _this.workOrderMark.find(function (item) {
82
86
  return item.value === (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
83
87
  });
84
- return mark ? MARK_MAP[mark === null || mark === void 0 ? void 0 : mark.value] : '--';
88
+ return mark ? MARK_MAP[mark === null || mark === void 0 ? void 0 : mark.value] : "--";
85
89
  });
86
90
  _defineProperty(this, "renderClient", function (record) {
87
91
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
88
92
  id: _this.id,
89
93
  label: _this.name,
90
- value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ''
94
+ value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ""
91
95
  }) : null;
92
96
  });
93
97
  _defineProperty(this, "editRender", function (p) {
@@ -111,41 +115,41 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
111
115
  // 过滤组件id
112
116
  name: item.name,
113
117
  // 过滤组件名称
114
- filterComponentType: 'MultipleSelect',
118
+ filterComponentType: "MultipleSelect",
115
119
  props: {
116
120
  //不使用workOrderMark的数据,筛选会深拷贝
117
121
  options: [{
118
- label: '空白',
119
- value: '1'
122
+ label: "空白",
123
+ value: "1"
120
124
  }, {
121
- label: '红色',
122
- value: '2'
125
+ label: "红色",
126
+ value: "2"
123
127
  }, {
124
- label: '黄色',
125
- value: '3'
128
+ label: "黄色",
129
+ value: "3"
126
130
  }, {
127
- label: '蓝色',
128
- value: '4'
131
+ label: "蓝色",
132
+ value: "4"
129
133
  }, {
130
- label: '绿色',
131
- value: '5'
134
+ label: "绿色",
135
+ value: "5"
132
136
  }, {
133
- label: '紫色',
134
- value: '6'
137
+ label: "紫色",
138
+ value: "6"
135
139
  }]
136
140
  },
137
141
  filterFn: function filterFn(value) {
138
142
  return function (i) {
139
- return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
143
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ""));
140
144
  };
141
145
  }
142
146
  };
143
147
  });
144
- this.name = '标记';
145
- this.id = 'markFlag';
146
- this.sortField = 'markFlag';
147
- this.formField = 'markFlag';
148
- this.type = 'FLOW_MARK_SELECT';
148
+ this.name = "标记";
149
+ this.id = "markFlag";
150
+ this.sortField = "markFlag";
151
+ this.formField = "markFlag";
152
+ this.type = "FLOW_MARK_SELECT";
149
153
  this.effects = options.effects;
150
154
  this.rules = [];
151
155
  this.isCombinationComponent = false;
@@ -155,51 +159,51 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
155
159
  label: /*#__PURE__*/React.createElement("span", {
156
160
  className: "iconfont icon-xingxing"
157
161
  }),
158
- value: '1'
162
+ value: "1"
159
163
  }, {
160
164
  label: /*#__PURE__*/React.createElement("span", {
161
165
  className: "iconfont icon-xingxing1",
162
166
  style: {
163
- color: '#ff0000'
167
+ color: "#ff0000"
164
168
  }
165
169
  }),
166
- value: '2'
170
+ value: "2"
167
171
  }, {
168
172
  label: /*#__PURE__*/React.createElement("span", {
169
173
  className: "iconfont icon-xingxing1",
170
174
  style: {
171
- color: '#f6b343'
175
+ color: "#f6b343"
172
176
  }
173
177
  }),
174
- value: '3'
178
+ value: "3"
175
179
  }, {
176
180
  label: /*#__PURE__*/React.createElement("span", {
177
181
  className: "iconfont icon-xingxing1",
178
182
  style: {
179
- color: '#4d90f7'
183
+ color: "#4d90f7"
180
184
  }
181
185
  }),
182
- value: '4'
186
+ value: "4"
183
187
  }, {
184
188
  label: /*#__PURE__*/React.createElement("span", {
185
189
  className: "iconfont icon-xingxing1",
186
190
  style: {
187
- color: '#6ed86c'
191
+ color: "#6ed86c"
188
192
  }
189
193
  }),
190
- value: '5'
194
+ value: "5"
191
195
  }, {
192
196
  label: /*#__PURE__*/React.createElement("span", {
193
197
  className: "iconfont icon-xingxing1",
194
198
  style: {
195
- color: '#be4ed1'
199
+ color: "#be4ed1"
196
200
  }
197
201
  }),
198
- value: '6'
202
+ value: "6"
199
203
  }];
200
204
  this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
201
205
  options: this.workOrderMark
202
206
  });
203
- this.dataType = 'string';
207
+ this.dataType = "string";
204
208
  });
205
209
  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.15",
3
+ "version": "0.8.18-alpha.21",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -26,8 +26,8 @@
26
26
  "father": "^4.1.7"
27
27
  },
28
28
  "dependencies": {
29
- "@kmkf-fe-packages/basic-components": "^0.8.18-alpha.15",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.8.18-alpha.15"
29
+ "@kmkf-fe-packages/basic-components": "^0.8.18-alpha.21",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.8.18-alpha.21"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@ant-design/icons": "^4.7.0",
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "d291fa6a399c900dd1dae0dd8a10d7834346580e"
43
+ "gitHead": "2290448095c3f16e677f70bee4612c78282f891c"
44
44
  }