@kmkf-fe-packages/services-components 0.7.14-alpha.4 → 0.7.14-alpha.9

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.
@@ -18,6 +18,8 @@ var OperationLog = function OperationLog(_ref) {
18
18
  componentDtoList = _ref.componentDtoList;
19
19
  if (!content) return null;
20
20
  try {
21
+ //todo过滤一些固定字段 展示不确定
22
+ var filterList = ["COMPLETED_DATETIME", "COMPLETED_USER_INPUT"];
21
23
  if (/^TRANSFER/.test(operation)) {
22
24
  if (/^\[.*?\]-->>\[.*?\]$/.test(content)) {
23
25
  var _content$split = content.split("-->>"),
@@ -71,7 +73,7 @@ var OperationLog = function OperationLog(_ref) {
71
73
  }, {});
72
74
  var currentNeedContentId = Object.keys(currentContent);
73
75
  var newTemplateColumns = componentDtoList === null || componentDtoList === void 0 ? void 0 : componentDtoList.filter(function (item) {
74
- return currentNeedContentId.findIndex(function (id) {
76
+ return !filterList.includes(item.workOrderComponentType) && currentNeedContentId.findIndex(function (id) {
75
77
  return id === null || id === void 0 ? void 0 : id.startsWith(item === null || item === void 0 ? void 0 : item.uniqueKey);
76
78
  }) > -1;
77
79
  });
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  declare type getFormItemProps = {
3
3
  name: string;
4
4
  title: string;
@@ -6,13 +6,13 @@ declare type getFormItemProps = {
6
6
  required: boolean;
7
7
  component: JSX.Element | string | null;
8
8
  };
9
- export declare const getFormItem: ({ name, title, rules, required, component }: getFormItemProps) => React.JSX.Element;
9
+ export declare const getFormItem: ({ name, title, rules, required, component }: getFormItemProps) => JSX.Element;
10
10
  export declare const showImage: ({ item, type, index }: {
11
11
  item: any;
12
12
  type: string;
13
13
  index: number;
14
- }) => React.JSX.Element;
15
- export declare const ShowTotalImage: ({ total, allImage, type }: any) => React.JSX.Element;
16
- export declare const GoodImage: ({ list, type }: any) => React.JSX.Element | null;
14
+ }) => JSX.Element;
15
+ export declare const ShowTotalImage: ({ total, allImage, type }: any) => JSX.Element;
16
+ export declare const GoodImage: ({ list, type }: any) => JSX.Element | null;
17
17
  export declare const JstGoodImage: ({ list, type }: any) => any;
18
18
  export {};
@@ -1,5 +1,5 @@
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
  /**
4
4
  * 针对完成时间、创建时间、修改时间定义了3中类型
5
5
  */
@@ -14,8 +14,8 @@ declare class CommonDataTime implements ComponentInterface {
14
14
  formField: string;
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
- dataType: ComponentInterface['dataType'];
18
- format: ComponentInterface['format'];
17
+ dataType: ComponentInterface["dataType"];
18
+ format: ComponentInterface["format"];
19
19
  constructor(options: PickOption);
20
20
  getValue: (value: string) => string;
21
21
  renderClient: (record: any) => React.JSX.Element | null;
@@ -5,10 +5,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
5
5
  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; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  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); }
8
- import React from 'react';
9
- import moment from 'moment';
8
+ import React from "react";
9
+ import moment from "moment";
10
10
  import ItemView from "../../commonComponents/ItemView";
11
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
11
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
12
12
  import { SYMBOL } from "../../constant";
13
13
 
14
14
  /**
@@ -30,18 +30,18 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
30
30
  _defineProperty(this, "dataType", void 0);
31
31
  _defineProperty(this, "format", void 0);
32
32
  _defineProperty(this, "getValue", function (value) {
33
- return moment(value).format('YYYY-MM-DD HH:mm:ss');
33
+ return moment(value).format("YYYY-MM-DD HH:mm:ss");
34
34
  });
35
35
  _defineProperty(this, "renderClient", function (record) {
36
36
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
37
37
  id: _this.id,
38
38
  label: _this.name,
39
- value: _this.getValue(record === null || record === void 0 ? void 0 : record[_this.id]) || ''
39
+ value: _this.getValue(record === null || record === void 0 ? void 0 : record[_this.id]) || ""
40
40
  }) : null;
41
41
  });
42
42
  _defineProperty(this, "renderPc", function (value, record) {
43
43
  var _record;
44
- return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
44
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
45
45
  // if (record?.[`${this.id}`] === undefined) {
46
46
  // return <span>--</span>;
47
47
  // }
@@ -60,9 +60,9 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
60
60
  });
61
61
  _defineProperty(this, "renderExport", function (value, record) {
62
62
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
63
- return '--';
63
+ return "--";
64
64
  }
65
- return moment(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]).format('YYYY-MM-DD HH:mm:ss');
65
+ return moment(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]).format("YYYY-MM-DD HH:mm:ss");
66
66
  });
67
67
  _defineProperty(this, "editRender", function () {
68
68
  return null;
@@ -75,17 +75,17 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
75
75
  // 过滤组件id
76
76
  name: item.name,
77
77
  // 过滤组件名称
78
- filterComponentType: 'Date',
78
+ filterComponentType: "Date",
79
79
  filterFn: function filterFn(value) {
80
80
  return function (i) {
81
- var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, '');
81
+ var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, "");
82
82
  return _filterFn.filterDateFn(value, recordDateTime);
83
83
  };
84
84
  },
85
85
  formatFilterValue: function formatFilterValue(val) {
86
86
  if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
87
87
  return val === null || val === void 0 ? void 0 : val.map(function (v) {
88
- return moment(v).startOf('second').valueOf();
88
+ return moment(v).startOf("second").valueOf();
89
89
  });
90
90
  }
91
91
  }
@@ -101,7 +101,7 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
101
101
  this.isCombinationComponent = false;
102
102
  this.canSort = true;
103
103
  this.children = [];
104
- this.dataType = 'string';
105
- this.format = 'dateTime';
104
+ this.dataType = "string";
105
+ this.format = "dateTime";
106
106
  });
107
107
  export default CommonDataTime;
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  declare const DateType: ['DATE', 'DATE_TIME', 'DATE_RANGE', 'DATE_TIME_RANGE'];
3
3
  export declare type ButtonType = typeof DateType[number];
4
4
  export interface ApaasDate {
5
5
  dateType?: ButtonType;
6
6
  [propName: string]: any;
7
7
  }
8
- declare const Date: (props: ApaasDate) => React.JSX.Element;
8
+ declare const Date: (props: ApaasDate) => JSX.Element;
9
9
  export default Date;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- declare const ItemEncode: (props: JSX.IntrinsicAttributes & any) => React.JSX.Element;
1
+ /// <reference types="react" />
2
+ declare const ItemEncode: (props: JSX.IntrinsicAttributes & any) => JSX.Element;
3
3
  export default ItemEncode;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { GoodsProps } from '@kmkf-fe-packages/basic-components/dist/common/Goods';
3
- declare const ItemId: (props: JSX.IntrinsicAttributes & GoodsProps) => React.JSX.Element;
3
+ declare const ItemId: (props: JSX.IntrinsicAttributes & GoodsProps) => JSX.Element;
4
4
  export default ItemId;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { GoodsProps } from '@kmkf-fe-packages/basic-components/dist/common/Goods';
3
- declare const ItemSelect: (props: JSX.IntrinsicAttributes & GoodsProps) => React.JSX.Element;
3
+ declare const ItemSelect: (props: JSX.IntrinsicAttributes & GoodsProps) => JSX.Element;
4
4
  export default ItemSelect;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- declare const ExpressCompany: (props: any) => React.JSX.Element;
1
+ /// <reference types="react" />
2
+ declare const ExpressCompany: (props: any) => JSX.Element;
3
3
  export default ExpressCompany;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- declare const Popover: ({ Overlay, ShowComponent }: any) => React.JSX.Element;
1
+ /// <reference types="react" />
2
+ declare const Popover: ({ Overlay, ShowComponent }: any) => JSX.Element;
3
3
  export default Popover;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { GoodsProps } from '@kmkf-fe-packages/basic-components/dist/common/Goods';
3
- declare const ItemEncode: (props: JSX.IntrinsicAttributes & GoodsProps) => React.JSX.Element;
3
+ declare const ItemEncode: (props: JSX.IntrinsicAttributes & GoodsProps) => JSX.Element;
4
4
  export default ItemEncode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.7.14-alpha.4",
3
+ "version": "0.7.14-alpha.9",
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.7.14-alpha.4",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.7.14-alpha.4"
29
+ "@kmkf-fe-packages/basic-components": "^0.7.14-alpha.9",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.7.14-alpha.9"
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": "9b66275d0c72aee6e5dd0b925844b4911b5fe3c0"
43
+ "gitHead": "daccf9b0ddd0d8845c8033088e15ad7252058265"
44
44
  }