ns-base-module 1.0.0

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.
Files changed (148) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +20 -0
  3. package/dist/Button/AntdIconButton.d.ts +11 -0
  4. package/dist/Button/AntdIconButton.d.ts.map +1 -0
  5. package/dist/Button/AntdIconButton.js +22 -0
  6. package/dist/Button/ConfigButton.d.ts +18 -0
  7. package/dist/Button/ConfigButton.d.ts.map +1 -0
  8. package/dist/Button/ConfigButton.js +78 -0
  9. package/dist/Button/index.d.ts +8 -0
  10. package/dist/Button/index.d.ts.map +1 -0
  11. package/dist/Button/index.js +19 -0
  12. package/dist/ClassFilter/index.d.ts +11 -0
  13. package/dist/ClassFilter/index.d.ts.map +1 -0
  14. package/dist/ClassFilter/index.js +119 -0
  15. package/dist/ClassFilter/indexVertical.d.ts +10 -0
  16. package/dist/ClassFilter/indexVertical.d.ts.map +1 -0
  17. package/dist/ClassFilter/indexVertical.js +69 -0
  18. package/dist/ClassFilter/util.d.ts +17 -0
  19. package/dist/ClassFilter/util.d.ts.map +1 -0
  20. package/dist/ClassFilter/util.js +135 -0
  21. package/dist/CopyCol/index.d.ts +4 -0
  22. package/dist/CopyCol/index.d.ts.map +1 -0
  23. package/dist/CopyCol/index.js +57 -0
  24. package/dist/Entry/EntryCriteria.d.ts +17 -0
  25. package/dist/Entry/EntryCriteria.d.ts.map +1 -0
  26. package/dist/Entry/EntryCriteria.js +138 -0
  27. package/dist/Entry/EntryItem.d.ts +34 -0
  28. package/dist/Entry/EntryItem.d.ts.map +1 -0
  29. package/dist/Entry/EntryItem.js +757 -0
  30. package/dist/Entry/components/Checkbox.d.ts +12 -0
  31. package/dist/Entry/components/Checkbox.d.ts.map +1 -0
  32. package/dist/Entry/components/Checkbox.js +15 -0
  33. package/dist/Entry/components/ChooseModalTable.d.ts +15 -0
  34. package/dist/Entry/components/ChooseModalTable.d.ts.map +1 -0
  35. package/dist/Entry/components/ChooseModalTable.js +407 -0
  36. package/dist/Entry/components/Condition.d.ts +9 -0
  37. package/dist/Entry/components/Condition.d.ts.map +1 -0
  38. package/dist/Entry/components/Condition.js +30 -0
  39. package/dist/Entry/components/DatePicker.d.ts +12 -0
  40. package/dist/Entry/components/DatePicker.d.ts.map +1 -0
  41. package/dist/Entry/components/DatePicker.js +12 -0
  42. package/dist/Entry/components/Etable2Modal.d.ts +4 -0
  43. package/dist/Entry/components/Etable2Modal.d.ts.map +1 -0
  44. package/dist/Entry/components/Etable2Modal.js +122 -0
  45. package/dist/Entry/components/Express.d.ts +8 -0
  46. package/dist/Entry/components/Express.d.ts.map +1 -0
  47. package/dist/Entry/components/Express.js +30 -0
  48. package/dist/Entry/components/GroupInput.d.ts +13 -0
  49. package/dist/Entry/components/GroupInput.d.ts.map +1 -0
  50. package/dist/Entry/components/GroupInput.js +77 -0
  51. package/dist/Entry/components/ImageText.d.ts +13 -0
  52. package/dist/Entry/components/ImageText.d.ts.map +1 -0
  53. package/dist/Entry/components/ImageText.js +235 -0
  54. package/dist/Entry/components/Input.d.ts +27 -0
  55. package/dist/Entry/components/Input.d.ts.map +1 -0
  56. package/dist/Entry/components/Input.js +86 -0
  57. package/dist/Entry/components/InputNumber.d.ts +18 -0
  58. package/dist/Entry/components/InputNumber.d.ts.map +1 -0
  59. package/dist/Entry/components/InputNumber.js +111 -0
  60. package/dist/Entry/components/InputNumberRange.d.ts +10 -0
  61. package/dist/Entry/components/InputNumberRange.d.ts.map +1 -0
  62. package/dist/Entry/components/InputNumberRange.js +58 -0
  63. package/dist/Entry/components/ListSelect.d.ts +15 -0
  64. package/dist/Entry/components/ListSelect.d.ts.map +1 -0
  65. package/dist/Entry/components/ListSelect.js +110 -0
  66. package/dist/Entry/components/ObjectSelect.d.ts +14 -0
  67. package/dist/Entry/components/ObjectSelect.d.ts.map +1 -0
  68. package/dist/Entry/components/ObjectSelect.js +91 -0
  69. package/dist/Entry/components/Progress.d.ts +11 -0
  70. package/dist/Entry/components/Progress.d.ts.map +1 -0
  71. package/dist/Entry/components/Progress.js +63 -0
  72. package/dist/Entry/components/Radio.d.ts +15 -0
  73. package/dist/Entry/components/Radio.d.ts.map +1 -0
  74. package/dist/Entry/components/Radio.js +17 -0
  75. package/dist/Entry/components/Select.d.ts +29 -0
  76. package/dist/Entry/components/Select.d.ts.map +1 -0
  77. package/dist/Entry/components/Select.js +113 -0
  78. package/dist/Entry/components/Switch.d.ts +6 -0
  79. package/dist/Entry/components/Switch.d.ts.map +1 -0
  80. package/dist/Entry/components/Switch.js +19 -0
  81. package/dist/Entry/components/TagsDatePicker.d.ts +7 -0
  82. package/dist/Entry/components/TagsDatePicker.d.ts.map +1 -0
  83. package/dist/Entry/components/TagsDatePicker.js +229 -0
  84. package/dist/Entry/components/TimePicker.d.ts +6 -0
  85. package/dist/Entry/components/TimePicker.d.ts.map +1 -0
  86. package/dist/Entry/components/TimePicker.js +6 -0
  87. package/dist/Entry/components/TreeSelect.d.ts +6 -0
  88. package/dist/Entry/components/TreeSelect.d.ts.map +1 -0
  89. package/dist/Entry/components/TreeSelect.js +18 -0
  90. package/dist/Entry/components/index.scss +97 -0
  91. package/dist/Entry/components/utils.d.ts +1 -0
  92. package/dist/Entry/components/utils.d.ts.map +1 -0
  93. package/dist/Entry/components/utils.js +6 -0
  94. package/dist/Entry/data.d.ts +133 -0
  95. package/dist/Entry/index.d.ts +54 -0
  96. package/dist/Entry/index.d.ts.map +1 -0
  97. package/dist/Entry/index.js +45 -0
  98. package/dist/FilterPopover/Filter.d.ts +24 -0
  99. package/dist/FilterPopover/Filter.d.ts.map +1 -0
  100. package/dist/FilterPopover/Filter.js +370 -0
  101. package/dist/FilterPopover/FilterClearIcon.d.ts +8 -0
  102. package/dist/FilterPopover/FilterClearIcon.d.ts.map +1 -0
  103. package/dist/FilterPopover/FilterClearIcon.js +45 -0
  104. package/dist/FilterPopover/index.d.ts +20 -0
  105. package/dist/FilterPopover/index.d.ts.map +1 -0
  106. package/dist/FilterPopover/index.js +136 -0
  107. package/dist/Icon/IconCreate.d.ts +11 -0
  108. package/dist/Icon/IconCreate.d.ts.map +1 -0
  109. package/dist/Icon/IconCreate.js +22 -0
  110. package/dist/Icon/index.d.ts +6 -0
  111. package/dist/Icon/index.d.ts.map +1 -0
  112. package/dist/Icon/index.js +22 -0
  113. package/dist/WidgetConfig/index.d.ts +40 -0
  114. package/dist/WidgetConfig/index.d.ts.map +1 -0
  115. package/dist/WidgetConfig/index.js +129 -0
  116. package/dist/index.d.ts +2 -0
  117. package/dist/index.d.ts.map +1 -0
  118. package/dist/index.js +4 -0
  119. package/dist/test/index.d.ts +4 -0
  120. package/dist/test/index.d.ts.map +1 -0
  121. package/dist/test/index.js +7 -0
  122. package/dist/umd/ns-base-module.min.js +1 -0
  123. package/dist/utils/cache.d.ts +17 -0
  124. package/dist/utils/cache.d.ts.map +1 -0
  125. package/dist/utils/cache.js +127 -0
  126. package/dist/utils/enum.d.ts +22 -0
  127. package/dist/utils/enum.d.ts.map +1 -0
  128. package/dist/utils/enum.js +37 -0
  129. package/dist/utils/language.d.ts +241 -0
  130. package/dist/utils/language.d.ts.map +1 -0
  131. package/dist/utils/language.js +247 -0
  132. package/dist/utils/request.d.ts +15 -0
  133. package/dist/utils/request.d.ts.map +1 -0
  134. package/dist/utils/request.js +180 -0
  135. package/dist/utils/utils.d.ts +113 -0
  136. package/dist/utils/utils.d.ts.map +1 -0
  137. package/dist/utils/utils.js +462 -0
  138. package/package.json +97 -0
  139. package/style/basics.scss +671 -0
  140. package/style/components/ClassFilter.scss +69 -0
  141. package/style/components/FilterPopover.scss +34 -0
  142. package/style/components/index.scss +2 -0
  143. package/style/default.scss +1219 -0
  144. package/style/index.scss +1 -0
  145. package/style/mixins/index.scss +28 -0
  146. package/style/mixins/libs/tint.scss +23 -0
  147. package/style/variables.scss +684 -0
  148. package/types/Action.d.ts +43 -0
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { DatePickerProps } from 'antd';
3
+ import type { RangePickerProps } from 'antd/lib/date-picker';
4
+ declare const TagsDatePicker: ({ onChange, picker, value, ...props }: any) => React.JSX.Element;
5
+ export default TagsDatePicker;
6
+ export type { RangePickerProps, DatePickerProps };
7
+ //# sourceMappingURL=TagsDatePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TagsDatePicker.d.ts","sourceRoot":"","sources":["TagsDatePicker.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAG5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AA8B7D,QAAA,MAAM,cAAc,0CAA2C,GAAG,sBAsKjE,CAAC;AAEF,eAAe,cAAc,CAAC;AAE9B,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,229 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["onChange", "picker", "value"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
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
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
16
+ /*
17
+ * @Date: 2023-06-12 18:56:06
18
+ * @description:
19
+ * @author chenchangfu
20
+ * Copyright (c) 2019, AUTHOR. All rights reserved.
21
+ * AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
22
+ */
23
+ import React, { useCallback, useEffect, useState, useRef } from 'react';
24
+ import { DatePicker, Space, Select, Row, Col, Radio } from 'antd';
25
+ import moment from 'moment';
26
+ import { cloneDeep, find, get, isEmpty } from 'lodash';
27
+ var RangePicker = DatePicker.RangePicker;
28
+ var rangeEnum = {
29
+ date: {
30
+ format: "YYYY-MM-DD",
31
+ label: '日'
32
+ },
33
+ week: {
34
+ // format: `YYYY-wo`,
35
+ format: "GGGG-WW",
36
+ label: '周'
37
+ },
38
+ month: {
39
+ format: "YYYY-MM",
40
+ label: '月'
41
+ },
42
+ quarter: {
43
+ format: 'YYYY-\\QQ',
44
+ label: '季'
45
+ },
46
+ year: {
47
+ format: "YYYY",
48
+ label: '年'
49
+ }
50
+ };
51
+ var TagsDatePicker = function TagsDatePicker(_ref) {
52
+ var _options$current;
53
+ var onChange = _ref.onChange,
54
+ picker = _ref.picker,
55
+ value = _ref.value,
56
+ props = _objectWithoutProperties(_ref, _excluded);
57
+ var initValue = useRef([]);
58
+ var _useState = useState(function () {
59
+ return (value === null || value === void 0 ? void 0 : value.type) || 'date';
60
+ }),
61
+ _useState2 = _slicedToArray(_useState, 2),
62
+ pickerValue = _useState2[0],
63
+ setPicker = _useState2[1];
64
+ var formatValue = function formatValue(val) {
65
+ if (val !== null && val !== void 0 && val.type) {
66
+ return [moment(val === null || val === void 0 ? void 0 : val.value[0], rangeEnum[val === null || val === void 0 ? void 0 : val.type].format), moment(val === null || val === void 0 ? void 0 : val.value[1], rangeEnum[val === null || val === void 0 ? void 0 : val.type].format)];
67
+ }
68
+ };
69
+ var _useState3 = useState(function () {
70
+ if (value !== null && value !== void 0 && value.type) {
71
+ return formatValue(value);
72
+ }
73
+ return undefined;
74
+ }),
75
+ _useState4 = _slicedToArray(_useState3, 2),
76
+ rangeDefaultValue = _useState4[0],
77
+ setRangeDefaultValue = _useState4[1];
78
+ var options = useRef();
79
+
80
+ // 默认值赋值
81
+ var initDate = function initDate(_picker, values) {
82
+ setPicker(_picker);
83
+ var curDate = null;
84
+ if (_picker === 'date' || _picker === 'day') {
85
+ curDate = find(values, function (o) {
86
+ return o.type === 'day' || o.type === 'date';
87
+ });
88
+ } else {
89
+ curDate = find(values, function (o) {
90
+ return o.type === _picker;
91
+ });
92
+ }
93
+ if (curDate) {
94
+ var _formValue = {
95
+ type: _picker,
96
+ value: curDate.defaultValue
97
+ };
98
+ setRangeDefaultValue(formatValue(_formValue));
99
+ onChange(curDate.defaultValue, _formValue);
100
+ }
101
+ };
102
+
103
+ // 年月日切换
104
+ var handleChange = useCallback(function (val) {
105
+ setPicker(val);
106
+ if (!isEmpty(initValue.current)) {
107
+ initDate(val, initValue.current);
108
+ return;
109
+ }
110
+
111
+ // 时间格式转换 提交的数据格式
112
+ if (rangeDefaultValue && rangeDefaultValue.length) {
113
+ var _values = [];
114
+ _values[0] = moment(rangeDefaultValue[0]).format(rangeEnum[val].format);
115
+ _values[1] = moment(rangeDefaultValue[1]).format(rangeEnum[val].format);
116
+ if (val === 'week') {
117
+ _values[0] = _values[0].replace('周', '');
118
+ _values[1] = _values[1].replace('周', '');
119
+ }
120
+ onChange(_values, {
121
+ type: val,
122
+ value: _values
123
+ });
124
+ }
125
+ }, [rangeDefaultValue, value]);
126
+
127
+ // 初始默认值
128
+ useEffect(function () {
129
+ if (value !== null && value !== void 0 && value.type) {
130
+ setPicker(value === null || value === void 0 ? void 0 : value.type);
131
+ var formValue = formatValue(value);
132
+ setRangeDefaultValue(formValue);
133
+ }
134
+ if (Array.isArray(value)) {
135
+ initValue.current = cloneDeep(value);
136
+ initDate(picker, value);
137
+ }
138
+ }, []);
139
+
140
+ // 显示年月日列表
141
+ useEffect(function () {
142
+ var arrayOpen = [];
143
+ if (value && Array.isArray(value)) {
144
+ value.forEach(function (element) {
145
+ if (rangeEnum[element.type]) {
146
+ arrayOpen.push({
147
+ value: element.type,
148
+ label: rangeEnum[element.type].label
149
+ });
150
+ }
151
+ if (element.type === 'day') {
152
+ // 天 字典值和查询值不一样时,后面统一date字段 删除该判的
153
+ arrayOpen.push({
154
+ value: 'date',
155
+ label: rangeEnum['date'].label
156
+ });
157
+ }
158
+ });
159
+ } else {
160
+ for (var key in rangeEnum) {
161
+ arrayOpen.push({
162
+ value: key,
163
+ label: rangeEnum[key].label
164
+ });
165
+ }
166
+ }
167
+ options.current = arrayOpen;
168
+ }, []);
169
+ var rangeOnChange = useCallback(function (date, dataString) {
170
+ var val = [];
171
+ if (pickerValue == 'week') {
172
+ val = dataString.map(function (dateItem, dateIndex) {
173
+ return dateItem.replace('周', '');
174
+ });
175
+ } else {
176
+ val = dataString;
177
+ }
178
+ // console.log('{ type: pickerValue, value: val }', dataString, val, {
179
+ // type: pickerValue,
180
+ // value: val,
181
+ // });
182
+ var _formValue = {
183
+ type: pickerValue,
184
+ value: val
185
+ };
186
+ onChange(val, _objectSpread({}, _formValue));
187
+ setRangeDefaultValue(date);
188
+ }, [pickerValue, value]);
189
+
190
+ // useEffect(() => {
191
+ // // setRangeValue(undefined);
192
+ // }, [pickerValue]);
193
+ return /*#__PURE__*/React.createElement("div", {
194
+ className: "tagsDatePicker"
195
+ }, /*#__PURE__*/React.createElement(Space, {
196
+ wrap: true
197
+ }, /*#__PURE__*/React.createElement(Row, {
198
+ wrap: false
199
+ }, get(props, 'styleType', null) === 'unfold' ? /*#__PURE__*/React.createElement(Col, {
200
+ flex: "".concat(44 * ((_options$current = options.current) === null || _options$current === void 0 ? void 0 : _options$current.length), "px")
201
+ }, /*#__PURE__*/React.createElement(Radio.Group, {
202
+ options: options.current,
203
+ onChange: function onChange(e) {
204
+ return handleChange(e.target.value);
205
+ },
206
+ optionType: "button",
207
+ value: pickerValue
208
+ })) : /*#__PURE__*/React.createElement(Col, {
209
+ flex: '50px'
210
+ }, /*#__PURE__*/React.createElement(Select, {
211
+ defaultValue: pickerValue,
212
+ value: pickerValue,
213
+ style: {
214
+ width: 120
215
+ },
216
+ onChange: handleChange,
217
+ options: options.current
218
+ })), /*#__PURE__*/React.createElement(Col, {
219
+ flex: 'auto'
220
+ }, /*#__PURE__*/React.createElement(RangePicker, {
221
+ picker: pickerValue,
222
+ format: pickerValue === 'week' ? 'YYYY-wo' : rangeEnum[pickerValue].format,
223
+ key: pickerValue,
224
+ defaultValue: rangeDefaultValue,
225
+ value: rangeDefaultValue,
226
+ onChange: rangeOnChange
227
+ })))));
228
+ };
229
+ export default TagsDatePicker;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { TimePickerProps } from 'antd';
3
+ declare const DatePickerWrapper: (props: TimePickerProps) => React.JSX.Element;
4
+ export default DatePickerWrapper;
5
+ export type { TimePickerProps };
6
+ //# sourceMappingURL=TimePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimePicker.d.ts","sourceRoot":"","sources":["TimePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAG5C,QAAA,MAAM,iBAAiB,UAAW,eAAe,sBAEhD,CAAC;AAEF,eAAe,iBAAiB,CAAC;AAEjC,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { TimePicker } from 'antd';
3
+ var DatePickerWrapper = function DatePickerWrapper(props) {
4
+ return /*#__PURE__*/React.createElement(TimePicker, props);
5
+ };
6
+ export default DatePickerWrapper;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { TreeSelectProps } from 'antd';
3
+ import type { DefaultValueType } from 'rc-tree-select/lib/interface';
4
+ declare const index: <T extends DefaultValueType>(props: TreeSelectProps<T, import("rc-tree-select/lib/interface").DataNode>) => React.JSX.Element;
5
+ export default index;
6
+ //# sourceMappingURL=TreeSelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeSelect.d.ts","sourceRoot":"","sources":["TreeSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAE5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE,QAAA,MAAM,KAAK,+HAOV,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,18 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
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
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ import React from 'react';
9
+ import { TreeSelect } from 'antd';
10
+ var index = function index(props) {
11
+ var _style = _objectSpread({
12
+ width: '100%'
13
+ }, props.style);
14
+ return /*#__PURE__*/React.createElement(TreeSelect, _extends({}, props, {
15
+ style: _style
16
+ }));
17
+ };
18
+ export default index;
@@ -0,0 +1,97 @@
1
+ .image-text {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ // flex-direction: row-reverse;
5
+ flex-wrap: wrap-reverse;
6
+ justify-content: flex-start;
7
+ .ant-form-item {
8
+ margin-bottom: 10px;
9
+ }
10
+ .ant-col {
11
+ // &:hover {
12
+ // background-color: #eee;
13
+ // cursor: pointer;
14
+ // }
15
+ // &:first-child {
16
+ // .card-list-item {
17
+ // border-top: 1px solid #cacaca99;
18
+ // }
19
+ // }
20
+ }
21
+
22
+ .card-list-item {
23
+ display: flex;
24
+ width: 230px;
25
+ // border-bottom: 1px solid #cacaca99;
26
+ margin-bottom: 15px;
27
+ margin-left: 24px;
28
+
29
+ .item-img {
30
+ width: 100px;
31
+ min-width: 100px;
32
+ height: 100px;
33
+ margin: auto;
34
+ margin-right: 10px;
35
+ overflow: hidden;
36
+ // background: #eee;
37
+ background-color: #fff;
38
+ background-repeat: no-repeat;
39
+ background-position: center;
40
+ background-size: contain;
41
+ img {
42
+ display: block;
43
+ max-width: 100%;
44
+ max-height: 100%;
45
+ margin: auto;
46
+ }
47
+ }
48
+ .stepsItem {
49
+ margin-top: 20px;
50
+ margin-bottom: 35px;
51
+ padding-left: 34px;
52
+ }
53
+ .item-desc {
54
+ flex: 1;
55
+ margin: auto;
56
+ text-align: left;
57
+
58
+ .item-body {
59
+ display: inline-block;
60
+ align-items: center;
61
+ vertical-align: middle;
62
+ }
63
+ .ant-form-item-label > label {
64
+ height: 20px;
65
+ }
66
+ .ant-form-item-control-input {
67
+ min-height: 20px;
68
+ }
69
+ p {
70
+ width: 100%;
71
+ margin-bottom: 8px;
72
+ overflow: hidden;
73
+ text-overflow: ellipsis;
74
+ overflow-wrap: break-word;
75
+ }
76
+ }
77
+
78
+ &.horizontal {
79
+ display: flex;
80
+ // margin-top: 10px;
81
+ // margin-bottom: 10px;
82
+ // flex: 1;
83
+ .item-desc {
84
+ flex: 1;
85
+ padding: 24px 10px 10px 10px;
86
+ overflow: hidden;
87
+ text-align: left;
88
+ }
89
+ }
90
+ &.vertical {
91
+ margin-left: 0;
92
+ .item-img {
93
+ margin-right: auto;
94
+ }
95
+ }
96
+ }
97
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ /*
2
+ * @description:
3
+ * @author chenchangfu
4
+ * Copyright (c) 2019, AUTHOR. All rights reserved.
5
+ * AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6
+ */
@@ -0,0 +1,133 @@
1
+ // export type EntryType =
2
+ // | 'Input'
3
+ // | 'InputNumber'
4
+ // | 'TableInput'
5
+ // | 'Select'
6
+ // | 'MultSelect'
7
+ // | 'DatePicker'
8
+ // | 'DateTimePicker'
9
+ // | 'RangePicker'
10
+ // | 'RangeTimePicker'
11
+ // | 'Switch'
12
+ // | 'Textarea'
13
+ // | 'TableTextarea'
14
+ // | 'Image'
15
+ // | 'Checkbox'
16
+ // | 'CheckboxGroup'
17
+ // | 'Radio'
18
+ // | 'ImageUpload'
19
+ // | 'FileUpload'
20
+ // | 'TreeSelect';
21
+ import { initLang } from '@/utils/language';
22
+ import { TagConditionEnum } from '@/utils/enum';
23
+
24
+ export enum EntryType {
25
+ Input = 'Input',
26
+ InputNumber = 'InputNumber',
27
+ InputNumberRange = 'InputNumberRange',
28
+ Password = 'Password',
29
+ Search = 'Search',
30
+ AllSearch = 'AllSearch',
31
+ TableInput = 'TableInput',
32
+ TableInputNumber = 'TableInputNumber',
33
+ Select = 'Select',
34
+ ObjectSelect = 'ObjectSelect',
35
+ MultSelect = 'MultSelect',
36
+ DatePicker = 'DatePicker',
37
+ DateTimePicker = 'DateTimePicker',
38
+ RangePicker = 'RangePicker',
39
+ RangeTimePicker = 'RangeTimePicker',
40
+ TimePicker = 'TimePicker',
41
+ SwitchRead = 'SwitchRead',
42
+ Switch = 'Switch',
43
+ Textarea = 'Textarea',
44
+ TableTextarea = 'TableTextarea',
45
+ Image = 'Image',
46
+ Checkbox = 'Checkbox',
47
+ CheckboxGroup = 'CheckboxGroup',
48
+ Radio = 'Radio',
49
+ RadioGroup = 'RadioGroup',
50
+ ImageUpload = 'ImageUpload',
51
+ FileUpload = 'FileUpload',
52
+ TreeSelect = 'TreeSelect',
53
+ Cron = 'Cron', // cron 表达式
54
+ Editor = 'Editor', // 富文本编辑器
55
+ EditorPreview = 'EditorPreview', // 富文本编辑器的预览
56
+ EditorModal = 'EditorModal', // 富文本编辑器弹框
57
+ JsonRead = 'JsonRead', // json预览
58
+ Link = 'Link', // 超链接
59
+ OpenBrowser = 'OpenBrowser', // 打开新浏览器
60
+ Tag = 'Tag', // 标签
61
+ Tags = 'Tags', // 标签组
62
+ FormTable = 'FormTable', // 可操作表格
63
+ Condition = 'Condition', // 条件组件
64
+ ColorPicker = 'ColorPicker', // 颜色选择器
65
+ TagSelect = 'TagSelect', // 可输入的下拉框
66
+ Styles = 'styles', // 配置样式
67
+ TimelineModal = 'TimelineModal', // 时间轴弹窗
68
+ ChooseModal = 'ChooseModal', // 选择弹窗
69
+ ObjectSelect = 'ObjectSelect', // 下拉选择带出整个对象
70
+ TableEditableModal = 'TableEditableModal', //可编辑的表格弹窗
71
+ AceEditor = 'AceEditor', // 代码编辑器
72
+ AceTable = 'AceTable', // 代码表格
73
+ Tree = 'Tree', // 树组件
74
+ Express = 'Express', // 表达式
75
+ Steps = 'Steps', // 步骤条
76
+ QRCode = 'QRCode',
77
+ Barcode = 'Barcode',
78
+ GroupInput = 'GroupInput',
79
+ EditorPreview = 'EditorPreview',
80
+ TagsDatePicker = 'TagsDatePicker',
81
+ ColorPicker = 'ColorPicker',
82
+ ChooseModalTable = 'ChooseModalTable', // 选择弹框,选择结果为表格
83
+ Progress = 'Progress', // 进度条
84
+ ImageText = 'ImageText', //图文组件
85
+ Etable2Modal = 'Etable2Modal', // 单据页的弹框选择,ModalWithConfig封装成的弹框选择
86
+ }
87
+
88
+ export enum TableReadEntryType {
89
+ Image = 'Image',
90
+ SwtichRead = 'SwtichRead',
91
+ }
92
+
93
+ export const tableReadEntryEnum = {
94
+ [TableReadEntryType.Image]: '图片',
95
+ [TableReadEntryType.SwtichRead]: '开关',
96
+ };
97
+
98
+ export enum TableActionEntryType {
99
+ Image = 'Image',
100
+ Swtich = 'Swtich',
101
+ SwtichRead = 'SwtichRead',
102
+ }
103
+
104
+ export const tableActionEntryEnum = {
105
+ [TableActionEntryType.Image]: '图片',
106
+ [TableActionEntryType.Swtich]: '开关',
107
+ [TableActionEntryType.SwtichRead]: '只读开关',
108
+ };
109
+
110
+ export const tagStringEnum = {
111
+ [TagConditionEnum.Equals]: initLang({ id: 'condition.equals' }),
112
+ [TagConditionEnum.NotEqual]: initLang({ id: 'condition.NotEqual' }),
113
+ // [TagConditionEnum.In]: '在……范围内',
114
+ [TagConditionEnum.Contains]: initLang({ id: 'condition.contains' }),
115
+ };
116
+
117
+ export const tagNumberEnum = {
118
+ [TagConditionEnum.Equals]: initLang({ id: 'condition.equals' }),
119
+ [TagConditionEnum.NotEqual]: initLang({ id: 'condition.NotEqual' }),
120
+ [TagConditionEnum.LessThan]: initLang({ id: 'condition.lessThan' }),
121
+ [TagConditionEnum.LessOrEqual]: initLang({ id: 'condition.lessOrEqual' }),
122
+ [TagConditionEnum.GreaterThan]: initLang({ id: 'condition.greaterThan' }),
123
+ [TagConditionEnum.GreaterOrEqual]: initLang({ id: 'condition.greaterOrEqual' }),
124
+ // [TagConditionEnum.In]: '在……范围内',
125
+ // [TagConditionEnum.Between]: '在……之间',
126
+ };
127
+
128
+ export interface ValueEnumType {
129
+ label: string;
130
+ value: any;
131
+ disabled?: boolean;
132
+ // style?: { bgColor?: string; color?: string; fontWeight?: boolean };
133
+ }
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+ import EntryItem from './EntryItem';
3
+ import type ComponentType from './EntryItem';
4
+ import EntryCriteria, { initialValueEunm, entryCriteriaHidden } from './EntryCriteria';
5
+ import Input from './components/Input';
6
+ import InputNumber from './components/InputNumber';
7
+ import Radio from './components/Radio';
8
+ import Select from './components/Select';
9
+ import Switch from './components/Switch';
10
+ import DatePicker from './components/DatePicker';
11
+ import Checkbox from './components/Checkbox';
12
+ import ImageText from './components/ImageText';
13
+ import { EntryType } from './data.d';
14
+ declare const entryTypeMap: {
15
+ Input: string;
16
+ InputNumber: string;
17
+ Select: string;
18
+ MultSelect: string;
19
+ DatePicker: string;
20
+ DateTimePicker: string;
21
+ RangePicker: string;
22
+ RangeTimePicker: string;
23
+ Switch: string;
24
+ Textarea: string;
25
+ Image: string;
26
+ ImageUpload: string;
27
+ FileUpload: string;
28
+ };
29
+ declare const entryTypeEnum: {
30
+ Input: string;
31
+ InputNumber: string;
32
+ Textarea: string;
33
+ TableInput: string;
34
+ TableTextarea: string;
35
+ Select: string;
36
+ MultSelect: string;
37
+ TreeSelect: string;
38
+ DatePicker: string;
39
+ DateTimePicker: string;
40
+ RangePicker: string;
41
+ RangeTimePicker: string;
42
+ SwitchRead: string;
43
+ Switch: string;
44
+ Checkbox: string;
45
+ CheckboxGroup: string;
46
+ Radio: string;
47
+ Image: string;
48
+ ImageUpload: string;
49
+ FileUpload: string;
50
+ };
51
+ export { EntryItem, EntryCriteria, Input, InputNumber, Radio, Select, Switch, DatePicker, Checkbox, initialValueEunm, entryCriteriaHidden, entryTypeMap, entryTypeEnum, EntryType, ComponentType, ImageText, };
52
+ declare const index: () => React.JSX.Element;
53
+ export default index;
54
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,aAAa,MAAM,aAAa,CAAC;AAC7C,OAAO,aAAa,EAAE,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,SAAS,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;CAcjB,CAAC;AAEF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;CAqBlB,CAAC;AAEF,OAAO,EACL,SAAS,EACT,aAAa,EACb,KAAK,EACL,WAAW,EACX,KAAK,EACL,MAAM,EACN,MAAM,EACN,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,SAAS,EACT,aAAa,EACb,SAAS,GACV,CAAC;AAEF,QAAA,MAAM,KAAK,yBAEV,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,45 @@
1
+ var _entryTypeEnum;
2
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
+ 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; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
+ /*
7
+ * @Date: 2023-04-28 13:59:54
8
+ * @description:
9
+ * @author chenchangfu
10
+ * Copyright (c) 2019, AUTHOR. All rights reserved.
11
+ * AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
12
+ */
13
+ import React from 'react';
14
+ import EntryItem from "./EntryItem";
15
+ import EntryCriteria, { initialValueEunm, entryCriteriaHidden } from "./EntryCriteria";
16
+ import Input from "./components/Input";
17
+ import InputNumber from "./components/InputNumber";
18
+ import Radio from "./components/Radio";
19
+ import Select from "./components/Select";
20
+ import Switch from "./components/Switch";
21
+ import DatePicker from "./components/DatePicker";
22
+ import Checkbox from "./components/Checkbox";
23
+ import ImageText from "./components/ImageText";
24
+ import { EntryType } from "./data.d";
25
+ var entryTypeMap = {
26
+ Input: '输入框',
27
+ InputNumber: '数字输入框',
28
+ Select: '单选下拉框',
29
+ MultSelect: '多选下拉框',
30
+ DatePicker: '日期选择框',
31
+ DateTimePicker: '日期时间选择框',
32
+ RangePicker: '日期范围选择框',
33
+ RangeTimePicker: '日期时间范围选择框',
34
+ Switch: '开关选择',
35
+ Textarea: '文本选择',
36
+ Image: '图片',
37
+ ImageUpload: '图片上传',
38
+ FileUpload: '图片上传'
39
+ };
40
+ var entryTypeEnum = (_entryTypeEnum = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_entryTypeEnum, EntryType.Input, '输入'), EntryType.InputNumber, '数字输入'), EntryType.Textarea, '文本输入'), EntryType.TableInput, '表格输入'), EntryType.TableTextarea, '表格文本输入'), EntryType.Select, '下拉单选'), EntryType.MultSelect, '下拉多选'), EntryType.TreeSelect, '树选择'), EntryType.DatePicker, '日期选择'), EntryType.DateTimePicker, '日期时间选择'), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_entryTypeEnum, EntryType.RangePicker, '日期范围选择'), EntryType.RangeTimePicker, '日期时间范围选择'), EntryType.SwitchRead, '只读开关'), EntryType.Switch, '开关'), EntryType.Checkbox, '勾选'), EntryType.CheckboxGroup, '复选'), EntryType.Radio, '单选'), EntryType.Image, '图片'), EntryType.ImageUpload, '图片上传'), EntryType.FileUpload, '文件上传'));
41
+ export { EntryItem, EntryCriteria, Input, InputNumber, Radio, Select, Switch, DatePicker, Checkbox, initialValueEunm, entryCriteriaHidden, entryTypeMap, entryTypeEnum, EntryType, ImageText };
42
+ var index = function index() {
43
+ return /*#__PURE__*/React.createElement("div", null);
44
+ };
45
+ export default index;