@kmkf-fe-packages/services-components 0.8.21-alpha.7 → 0.8.21-alpha.8

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,5 +1,4 @@
1
- import React from 'react';
2
- import './icon/iconfont.css';
1
+ import React from "react";
3
2
  interface SelectMarkProps {
4
3
  value: string;
5
4
  onChange: (val: string) => void;
@@ -1,51 +1,59 @@
1
- import React, { useMemo } from 'react';
2
- import { Menu, Dropdown } from 'antd';
3
- import "./icon/iconfont.css";
1
+ import React, { useMemo } from "react";
2
+ import { Menu, Dropdown } from "antd";
3
+ import xing from "./img/xingxing.png";
4
+ import xingRed from "./img/xingxing-red.png";
5
+ import xingYellow from "./img/xingxing-yellow.png";
6
+ import xingBlue from "./img/xingxing-blue.png";
7
+ import xingGreen from "./img/xingxing-green.png";
8
+ import xingPurple from "./img/xingxing-purple.png";
4
9
  var workOrderMark = [{
5
- label: /*#__PURE__*/React.createElement("span", {
6
- className: "iconfont icon-xingxing"
10
+ label: /*#__PURE__*/React.createElement("img", {
11
+ src: xing,
12
+ style: {
13
+ width: "16px"
14
+ }
7
15
  }),
8
- value: '1'
16
+ value: "1"
9
17
  }, {
10
- label: /*#__PURE__*/React.createElement("span", {
11
- className: "iconfont icon-xingxing1",
18
+ label: /*#__PURE__*/React.createElement("img", {
19
+ src: xingRed,
12
20
  style: {
13
- color: '#ff0000'
21
+ width: "16px"
14
22
  }
15
23
  }),
16
- value: '2'
24
+ value: "2"
17
25
  }, {
18
- label: /*#__PURE__*/React.createElement("span", {
19
- className: "iconfont icon-xingxing1",
26
+ label: /*#__PURE__*/React.createElement("img", {
27
+ src: xingYellow,
20
28
  style: {
21
- color: '#f6b343'
29
+ width: "16px"
22
30
  }
23
31
  }),
24
- value: '3'
32
+ value: "3"
25
33
  }, {
26
- label: /*#__PURE__*/React.createElement("span", {
27
- className: "iconfont icon-xingxing1",
34
+ label: /*#__PURE__*/React.createElement("img", {
35
+ src: xingBlue,
28
36
  style: {
29
- color: '#4d90f7'
37
+ width: "16px"
30
38
  }
31
39
  }),
32
- value: '4'
40
+ value: "4"
33
41
  }, {
34
- label: /*#__PURE__*/React.createElement("span", {
35
- className: "iconfont icon-xingxing1",
42
+ label: /*#__PURE__*/React.createElement("img", {
43
+ src: xingGreen,
36
44
  style: {
37
- color: '#6ed86c'
45
+ width: "16px"
38
46
  }
39
47
  }),
40
- value: '5'
48
+ value: "5"
41
49
  }, {
42
- label: /*#__PURE__*/React.createElement("span", {
43
- className: "iconfont icon-xingxing1",
50
+ label: /*#__PURE__*/React.createElement("img", {
51
+ src: xingPurple,
44
52
  style: {
45
- color: '#be4ed1'
53
+ width: "16px"
46
54
  }
47
55
  }),
48
- value: '6'
56
+ value: "6"
49
57
  }];
50
58
  export default (function (props) {
51
59
  var value = props.value,
@@ -77,5 +85,5 @@ export default (function (props) {
77
85
  onClick: function onClick(e) {
78
86
  return e.stopPropagation();
79
87
  }
80
- }, markLabel || '--'));
88
+ }, markLabel || "--"));
81
89
  });
@@ -1,19 +1,19 @@
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 FlowMarkSelect 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'];
10
- effects: ComponentInterface['effects'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
+ effects: ComponentInterface["effects"];
11
11
  workOrderMark: any[];
12
12
  isCombinationComponent: boolean;
13
13
  formField: string;
14
14
  canSort: boolean;
15
15
  children: ComponentInterface[];
16
- dataType: ComponentInterface['dataType'];
16
+ dataType: ComponentInterface["dataType"];
17
17
  constructor(options: PickOption);
18
18
  renderPc: (value: any, record: Record) => React.JSX.Element;
19
19
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -8,14 +8,13 @@ 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';
11
+ import React from "react";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
13
  import SelectMark from "../../commonComponents/SelectMark";
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
- // import "./icon/iconfont.css";
19
18
  var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options) {
20
19
  var _this = this;
21
20
  _classCallCheck(this, FlowMarkSelect);
@@ -35,7 +34,7 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
35
34
  _defineProperty(this, "renderPc", function (value, record) {
36
35
  var changeMarkHandle = function changeMarkHandle(key) {
37
36
  var _this$effects, _this$effects2;
38
- 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));
37
+ 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));
39
38
  };
40
39
  return /*#__PURE__*/React.createElement(SelectMark, {
41
40
  value: record === null || record === void 0 ? void 0 : record["".concat(_this.id)],
@@ -57,23 +56,23 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
57
56
  });
58
57
  _defineProperty(this, "renderExport", function (value, record) {
59
58
  var MARK_MAP = {
60
- 1: '白色',
61
- 2: '红色',
62
- 3: '黄色',
63
- 4: '蓝色',
64
- 5: '绿色',
65
- 6: '紫色'
59
+ 1: "白色",
60
+ 2: "红色",
61
+ 3: "黄色",
62
+ 4: "蓝色",
63
+ 5: "绿色",
64
+ 6: "紫色"
66
65
  };
67
66
  var mark = _this.workOrderMark.find(function (item) {
68
67
  return item.value === (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
69
68
  });
70
- return mark ? MARK_MAP[mark === null || mark === void 0 ? void 0 : mark.value] : '--';
69
+ return mark ? MARK_MAP[mark === null || mark === void 0 ? void 0 : mark.value] : "--";
71
70
  });
72
71
  _defineProperty(this, "renderClient", function (record) {
73
72
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
74
73
  id: _this.id,
75
74
  label: _this.name,
76
- value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ''
75
+ value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ""
77
76
  }) : null;
78
77
  });
79
78
  _defineProperty(this, "editRender", function (p) {
@@ -97,41 +96,41 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
97
96
  // 过滤组件id
98
97
  name: item.name,
99
98
  // 过滤组件名称
100
- filterComponentType: 'MultipleSelect',
99
+ filterComponentType: "MultipleSelect",
101
100
  props: {
102
101
  //不使用workOrderMark的数据,筛选会深拷贝
103
102
  options: [{
104
- label: '空白',
105
- value: '1'
103
+ label: "空白",
104
+ value: "1"
106
105
  }, {
107
- label: '红色',
108
- value: '2'
106
+ label: "红色",
107
+ value: "2"
109
108
  }, {
110
- label: '黄色',
111
- value: '3'
109
+ label: "黄色",
110
+ value: "3"
112
111
  }, {
113
- label: '蓝色',
114
- value: '4'
112
+ label: "蓝色",
113
+ value: "4"
115
114
  }, {
116
- label: '绿色',
117
- value: '5'
115
+ label: "绿色",
116
+ value: "5"
118
117
  }, {
119
- label: '紫色',
120
- value: '6'
118
+ label: "紫色",
119
+ value: "6"
121
120
  }]
122
121
  },
123
122
  filterFn: function filterFn(value) {
124
123
  return function (i) {
125
- return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
124
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ""));
126
125
  };
127
126
  }
128
127
  };
129
128
  });
130
- this.name = '标记';
131
- this.id = 'markFlag';
132
- this.sortField = 'markFlag';
133
- this.formField = 'markFlag';
134
- this.type = 'FLOW_MARK_SELECT';
129
+ this.name = "标记";
130
+ this.id = "markFlag";
131
+ this.sortField = "markFlag";
132
+ this.formField = "markFlag";
133
+ this.type = "FLOW_MARK_SELECT";
135
134
  this.effects = options.effects;
136
135
  this.rules = [];
137
136
  this.isCombinationComponent = false;
@@ -141,51 +140,51 @@ var FlowMarkSelect = /*#__PURE__*/_createClass(function FlowMarkSelect(options)
141
140
  label: /*#__PURE__*/React.createElement("span", {
142
141
  className: "iconfont icon-xingxing"
143
142
  }),
144
- value: '1'
143
+ value: "1"
145
144
  }, {
146
145
  label: /*#__PURE__*/React.createElement("span", {
147
146
  className: "iconfont icon-xingxing1",
148
147
  style: {
149
- color: '#ff0000'
148
+ color: "#ff0000"
150
149
  }
151
150
  }),
152
- value: '2'
151
+ value: "2"
153
152
  }, {
154
153
  label: /*#__PURE__*/React.createElement("span", {
155
154
  className: "iconfont icon-xingxing1",
156
155
  style: {
157
- color: '#f6b343'
156
+ color: "#f6b343"
158
157
  }
159
158
  }),
160
- value: '3'
159
+ value: "3"
161
160
  }, {
162
161
  label: /*#__PURE__*/React.createElement("span", {
163
162
  className: "iconfont icon-xingxing1",
164
163
  style: {
165
- color: '#4d90f7'
164
+ color: "#4d90f7"
166
165
  }
167
166
  }),
168
- value: '4'
167
+ value: "4"
169
168
  }, {
170
169
  label: /*#__PURE__*/React.createElement("span", {
171
170
  className: "iconfont icon-xingxing1",
172
171
  style: {
173
- color: '#6ed86c'
172
+ color: "#6ed86c"
174
173
  }
175
174
  }),
176
- value: '5'
175
+ value: "5"
177
176
  }, {
178
177
  label: /*#__PURE__*/React.createElement("span", {
179
178
  className: "iconfont icon-xingxing1",
180
179
  style: {
181
- color: '#be4ed1'
180
+ color: "#be4ed1"
182
181
  }
183
182
  }),
184
- value: '6'
183
+ value: "6"
185
184
  }];
186
185
  this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
187
186
  options: this.workOrderMark
188
187
  });
189
- this.dataType = 'string';
188
+ this.dataType = "string";
190
189
  });
191
190
  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.21-alpha.7",
3
+ "version": "0.8.21-alpha.8",
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": "812ab4ed4d1bc5dd36ca0d15f4c0ca12b9d855ee"
43
+ "gitHead": "249bf3b05b8ac4066215db091ac7ac316d7da37e"
44
44
  }