@zykj2024/much-library 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +35 -0
  3. package/dist/McCascader/city.js +909 -0
  4. package/dist/McCascader/index.css +60 -0
  5. package/dist/McCascader/index.d.ts +19 -0
  6. package/dist/McCascader/index.js +221 -0
  7. package/dist/McContainer/demo/actionBar.d.ts +8 -0
  8. package/dist/McContainer/demo/actionBar.js +70 -0
  9. package/dist/McContainer/demo/base.d.ts +8 -0
  10. package/dist/McContainer/demo/base.js +80 -0
  11. package/dist/McContainer/demo/batch.d.ts +8 -0
  12. package/dist/McContainer/demo/batch.js +89 -0
  13. package/dist/McContainer/demo/collapse.d.ts +8 -0
  14. package/dist/McContainer/demo/collapse.js +76 -0
  15. package/dist/McContainer/demo/expand.d.ts +8 -0
  16. package/dist/McContainer/demo/expand.js +90 -0
  17. package/dist/McContainer/demo/pagination.d.ts +7 -0
  18. package/dist/McContainer/demo/pagination.js +93 -0
  19. package/dist/McContainer/demo/search.d.ts +7 -0
  20. package/dist/McContainer/demo/search.js +101 -0
  21. package/dist/McContainer/demo/standard.d.ts +7 -0
  22. package/dist/McContainer/demo/standard.js +168 -0
  23. package/dist/McContainer/index.css +123 -0
  24. package/dist/McContainer/index.d.ts +49 -0
  25. package/dist/McContainer/index.js +407 -0
  26. package/dist/McDateRange/demo/base.d.ts +6 -0
  27. package/dist/McDateRange/demo/base.js +22 -0
  28. package/dist/McDateRange/demo/cancelPresets.d.ts +6 -0
  29. package/dist/McDateRange/demo/cancelPresets.js +23 -0
  30. package/dist/McDateRange/demo/overlap.d.ts +2 -0
  31. package/dist/McDateRange/demo/overlap.js +32 -0
  32. package/dist/McDateRange/index.css +31 -0
  33. package/dist/McDateRange/index.d.ts +28 -0
  34. package/dist/McDateRange/index.js +167 -0
  35. package/dist/McFonts/index.d.ts +7 -0
  36. package/dist/McFonts/index.js +10 -0
  37. package/dist/McFonts/public/FF DIN Pro Bold.otf +0 -0
  38. package/dist/McFonts/public/SourceHanSansCN-Bold.otf +0 -0
  39. package/dist/McFonts/public/SourceHanSansCN-Light.otf +0 -0
  40. package/dist/McFonts/public/SourceHanSansCN-Medium.otf +0 -0
  41. package/dist/McFonts/public/SourceHanSansCN-Regular.otf +0 -0
  42. package/dist/McGroupPanel/comps/SelectedItem/index.d.ts +4 -0
  43. package/dist/McGroupPanel/comps/SelectedItem/index.js +76 -0
  44. package/dist/McGroupPanel/index.css +162 -0
  45. package/dist/McGroupPanel/index.d.ts +29 -0
  46. package/dist/McGroupPanel/index.js +411 -0
  47. package/dist/McIconFont/iconfont.js +1 -0
  48. package/dist/McIconFont/index.d.ts +5 -0
  49. package/dist/McIconFont/index.js +8 -0
  50. package/dist/McIcons/business.json +137 -0
  51. package/dist/McInput/Input.d.ts +19 -0
  52. package/dist/McInput/Input.js +48 -0
  53. package/dist/McInput/Search.d.ts +39 -0
  54. package/dist/McInput/Search.js +81 -0
  55. package/dist/McInput/TextArea.d.ts +11 -0
  56. package/dist/McInput/TextArea.js +37 -0
  57. package/dist/McInput/demo/Input/addonBefore.d.ts +3 -0
  58. package/dist/McInput/demo/Input/addonBefore.js +67 -0
  59. package/dist/McInput/demo/Input/base.d.ts +2 -0
  60. package/dist/McInput/demo/Input/base.js +31 -0
  61. package/dist/McInput/demo/Input/isTrim.d.ts +2 -0
  62. package/dist/McInput/demo/Input/isTrim.js +22 -0
  63. package/dist/McInput/demo/Input/label.d.ts +2 -0
  64. package/dist/McInput/demo/Input/label.js +26 -0
  65. package/dist/McInput/demo/Input/ref.d.ts +3 -0
  66. package/dist/McInput/demo/Input/ref.js +53 -0
  67. package/dist/McInput/demo/Input/status.d.ts +2 -0
  68. package/dist/McInput/demo/Input/status.js +23 -0
  69. package/dist/McInput/demo/Search/search-base.d.ts +2 -0
  70. package/dist/McInput/demo/Search/search-base.js +38 -0
  71. package/dist/McInput/demo/TextArea/text-area-base.d.ts +2 -0
  72. package/dist/McInput/demo/TextArea/text-area-base.js +38 -0
  73. package/dist/McInput/index.css +44 -0
  74. package/dist/McInput/index.d.ts +13 -0
  75. package/dist/McInput/index.js +7 -0
  76. package/dist/McInputNumber/demo/index.d.ts +2 -0
  77. package/dist/McInputNumber/demo/index.js +28 -0
  78. package/dist/McInputNumber/demo/label.d.ts +2 -0
  79. package/dist/McInputNumber/demo/label.js +26 -0
  80. package/dist/McInputNumber/demo/precision.d.ts +2 -0
  81. package/dist/McInputNumber/demo/precision.js +20 -0
  82. package/dist/McInputNumber/index.css +9 -0
  83. package/dist/McInputNumber/index.d.ts +13 -0
  84. package/dist/McInputNumber/index.js +43 -0
  85. package/dist/McModalProvider/index.d.ts +174 -0
  86. package/dist/McModalProvider/index.js +498 -0
  87. package/dist/McPeriodSelect/demo/base.d.ts +6 -0
  88. package/dist/McPeriodSelect/demo/base.js +19 -0
  89. package/dist/McPeriodSelect/demo/half.d.ts +6 -0
  90. package/dist/McPeriodSelect/demo/half.js +20 -0
  91. package/dist/McPeriodSelect/index.css +189 -0
  92. package/dist/McPeriodSelect/index.d.ts +13 -0
  93. package/dist/McPeriodSelect/index.js +305 -0
  94. package/dist/McPopoverButton/index.d.ts +14 -0
  95. package/dist/McPopoverButton/index.js +52 -0
  96. package/dist/McPopoverForm/index.d.ts +14 -0
  97. package/dist/McPopoverForm/index.js +95 -0
  98. package/dist/McResult/default.d.ts +1 -0
  99. package/dist/McResult/default.js +84 -0
  100. package/dist/McResult/demo/403.d.ts +6 -0
  101. package/dist/McResult/demo/403.js +17 -0
  102. package/dist/McResult/demo/404.d.ts +6 -0
  103. package/dist/McResult/demo/404.js +17 -0
  104. package/dist/McResult/demo/500.d.ts +6 -0
  105. package/dist/McResult/demo/500.js +17 -0
  106. package/dist/McResult/demo/building.d.ts +6 -0
  107. package/dist/McResult/demo/building.js +12 -0
  108. package/dist/McResult/demo/empty.d.ts +2 -0
  109. package/dist/McResult/demo/empty.js +11 -0
  110. package/dist/McResult/demo/noFunction.d.ts +2 -0
  111. package/dist/McResult/demo/noFunction.js +11 -0
  112. package/dist/McResult/demo/noUser.d.ts +6 -0
  113. package/dist/McResult/demo/noUser.js +12 -0
  114. package/dist/McResult/demo/preview.d.ts +2 -0
  115. package/dist/McResult/demo/preview.js +14 -0
  116. package/dist/McResult/icon.d.ts +25 -0
  117. package/dist/McResult/icon.js +946 -0
  118. package/dist/McResult/index.css +20 -0
  119. package/dist/McResult/index.d.ts +27 -0
  120. package/dist/McResult/index.js +103 -0
  121. package/dist/McResult/public/403.svg +164 -0
  122. package/dist/McResult/public/404.svg +123 -0
  123. package/dist/McResult/public/500.svg +129 -0
  124. package/dist/McResult/public/building.svg +127 -0
  125. package/dist/McResult/public/code403.svg +7 -0
  126. package/dist/McResult/public/code404.svg +5 -0
  127. package/dist/McResult/public/code500.svg +5 -0
  128. package/dist/McResult/public/empty.svg +1 -0
  129. package/dist/McResult/public/noFunction.svg +1 -0
  130. package/dist/McResult/public/noUser.svg +90 -0
  131. package/dist/McSelect/demo/base.d.ts +2 -0
  132. package/dist/McSelect/demo/base.js +63 -0
  133. package/dist/McSelect/demo/changeOnHidden.d.ts +2 -0
  134. package/dist/McSelect/demo/changeOnHidden.js +43 -0
  135. package/dist/McSelect/demo/dropdownRender.d.ts +7 -0
  136. package/dist/McSelect/demo/dropdownRender.js +78 -0
  137. package/dist/McSelect/demo/fetchOptions.d.ts +7 -0
  138. package/dist/McSelect/demo/fetchOptions.js +210 -0
  139. package/dist/McSelect/demo/inexistent.d.ts +2 -0
  140. package/dist/McSelect/demo/inexistent.js +79 -0
  141. package/dist/McSelect/demo/labelInValue.d.ts +2 -0
  142. package/dist/McSelect/demo/labelInValue.js +72 -0
  143. package/dist/McSelect/demo/maxTagCount.d.ts +3 -0
  144. package/dist/McSelect/demo/maxTagCount.js +51 -0
  145. package/dist/McSelect/demo/multiple.d.ts +2 -0
  146. package/dist/McSelect/demo/multiple.js +46 -0
  147. package/dist/McSelect/demo/optionRender.d.ts +3 -0
  148. package/dist/McSelect/demo/optionRender.js +51 -0
  149. package/dist/McSelect/demo/tagRender.d.ts +3 -0
  150. package/dist/McSelect/demo/tagRender.js +51 -0
  151. package/dist/McSelect/index.css +60 -0
  152. package/dist/McSelect/index.d.ts +40 -0
  153. package/dist/McSelect/index.js +350 -0
  154. package/dist/McThemeConfig/customToken.json +38 -0
  155. package/dist/McThemeConfig/demo/button.d.ts +2 -0
  156. package/dist/McThemeConfig/demo/button.js +226 -0
  157. package/dist/McThemeConfig/demo/drawer.d.ts +2 -0
  158. package/dist/McThemeConfig/demo/drawer.js +59 -0
  159. package/dist/McThemeConfig/demo/modal.d.ts +2 -0
  160. package/dist/McThemeConfig/demo/modal.js +78 -0
  161. package/dist/McThemeConfig/demo/radio.d.ts +2 -0
  162. package/dist/McThemeConfig/demo/radio.js +97 -0
  163. package/dist/McThemeConfig/demo/switch.d.ts +2 -0
  164. package/dist/McThemeConfig/demo/switch.js +96 -0
  165. package/dist/McThemeConfig/demo/tabs.d.ts +2 -0
  166. package/dist/McThemeConfig/demo/tabs.js +35 -0
  167. package/dist/McThemeConfig/globalStyle.d.ts +2 -0
  168. package/dist/McThemeConfig/globalStyle.js +172 -0
  169. package/dist/McThemeConfig/index.d.ts +9 -0
  170. package/dist/McThemeConfig/index.js +16 -0
  171. package/dist/McThemeConfig/layoutStyle.d.ts +2 -0
  172. package/dist/McThemeConfig/layoutStyle.js +1 -0
  173. package/dist/McThemeConfig/provider.d.ts +7 -0
  174. package/dist/McThemeConfig/provider.js +19 -0
  175. package/dist/McThemeConfig/themeToken.json +149 -0
  176. package/dist/McTreePanel/SelectedItem.d.ts +4 -0
  177. package/dist/McTreePanel/SelectedItem.js +75 -0
  178. package/dist/McTreePanel/demo/base.d.ts +6 -0
  179. package/dist/McTreePanel/demo/base.js +45 -0
  180. package/dist/McTreePanel/demo/fieldNames.d.ts +6 -0
  181. package/dist/McTreePanel/demo/fieldNames.js +37 -0
  182. package/dist/McTreePanel/demo/inexistent.d.ts +6 -0
  183. package/dist/McTreePanel/demo/inexistent.js +56 -0
  184. package/dist/McTreePanel/demo/labelInValue.d.ts +6 -0
  185. package/dist/McTreePanel/demo/labelInValue.js +56 -0
  186. package/dist/McTreePanel/demo/sortable.d.ts +6 -0
  187. package/dist/McTreePanel/demo/sortable.js +34 -0
  188. package/dist/McTreePanel/index.css +110 -0
  189. package/dist/McTreePanel/index.d.ts +27 -0
  190. package/dist/McTreePanel/index.js +315 -0
  191. package/dist/McTreeSelect/demo/base.d.ts +5 -0
  192. package/dist/McTreeSelect/demo/base.js +58 -0
  193. package/dist/McTreeSelect/demo/inexistent.d.ts +5 -0
  194. package/dist/McTreeSelect/demo/inexistent.js +63 -0
  195. package/dist/McTreeSelect/demo/label.d.ts +5 -0
  196. package/dist/McTreeSelect/demo/label.js +60 -0
  197. package/dist/McTreeSelect/demo/multiple.d.ts +5 -0
  198. package/dist/McTreeSelect/demo/multiple.js +71 -0
  199. package/dist/McTreeSelect/index.css +60 -0
  200. package/dist/McTreeSelect/index.d.ts +13 -0
  201. package/dist/McTreeSelect/index.js +182 -0
  202. package/dist/Utils/index.d.ts +4 -0
  203. package/dist/Utils/index.js +26 -0
  204. package/dist/index.d.ts +19 -0
  205. package/dist/index.js +19 -0
  206. package/dist/typings.d.ts +20 -0
  207. package/package.json +82 -0
@@ -0,0 +1,182 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
+ var _excluded = ["style", "className", "label", "inexistent", "value", "onChange", "options", "multiple", "disabled", "fieldNames", "maxTagCount", "treeCheckable"];
6
+ import { Popover, TreeSelect } from 'antd';
7
+ import { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
8
+ import "./index.css";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ var McTreeSelect = /*#__PURE__*/forwardRef(function (props, ref) {
12
+ var style = props.style,
13
+ className = props.className,
14
+ label = props.label,
15
+ _props$inexistent = props.inexistent,
16
+ inexistent = _props$inexistent === void 0 ? true : _props$inexistent,
17
+ value = props.value,
18
+ onChange = props.onChange,
19
+ options = props.options,
20
+ multiple = props.multiple,
21
+ disabled = props.disabled,
22
+ _props$fieldNames = props.fieldNames,
23
+ fieldNames = _props$fieldNames === void 0 ? {
24
+ label: 'label',
25
+ value: 'value',
26
+ children: 'children'
27
+ } : _props$fieldNames,
28
+ maxTagCount = props.maxTagCount,
29
+ treeCheckable = props.treeCheckable,
30
+ rest = _objectWithoutProperties(props, _excluded);
31
+ var _maxTagCount = useMemo(function () {
32
+ return props.hasOwnProperty('maxTagCount') ? maxTagCount : 1;
33
+ }, [maxTagCount]);
34
+ var _multiple = useMemo(function () {
35
+ return multiple || treeCheckable;
36
+ }, [treeCheckable, multiple]);
37
+
38
+ /* 获取label宽度 */
39
+ var labelRef = useRef();
40
+ var _useState = useState(11),
41
+ _useState2 = _slicedToArray(_useState, 2),
42
+ paddingLeft = _useState2[0],
43
+ setPaddingLeft = _useState2[1];
44
+ var labelResizeObserver = new ResizeObserver(function (entries) {
45
+ setPaddingLeft(entries[0].contentRect.width + 11);
46
+ });
47
+ useEffect(function () {
48
+ if (labelRef.current) {
49
+ labelResizeObserver.observe(labelRef.current);
50
+ }
51
+ return function () {
52
+ return labelResizeObserver.disconnect();
53
+ };
54
+ }, []);
55
+
56
+ /* 判断value值是否存在于options中 */
57
+ var _useState3 = useState(),
58
+ _useState4 = _slicedToArray(_useState3, 2),
59
+ _value = _useState4[0],
60
+ set_value = _useState4[1];
61
+ // 获取所有备选项的值列表
62
+ var _values = useMemo(function () {
63
+ var v = fieldNames.value,
64
+ c = fieldNames.children;
65
+ var values = [];
66
+ var loopFn = function loopFn(children, parents) {
67
+ children === null || children === void 0 || children.forEach(function (item) {
68
+ values.push([].concat(_toConsumableArray(parents), [item[v]]).join(':'));
69
+ if (item[c]) {
70
+ loopFn(item[c], [].concat(_toConsumableArray(parents), [item[v]]));
71
+ }
72
+ });
73
+ };
74
+ loopFn(options || [], []);
75
+ return values;
76
+ }, [options, fieldNames]);
77
+
78
+ /* 将树形数据扁平化 */
79
+ var flattenDeep = function flattenDeep() {
80
+ var _options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
81
+ var children = fieldNames.children;
82
+ return _options.reduce(function (pre, item) {
83
+ var _item$children;
84
+ pre.push(item);
85
+ if ((item === null || item === void 0 || (_item$children = item[children]) === null || _item$children === void 0 ? void 0 : _item$children.length) > 0) {
86
+ return [].concat(_toConsumableArray(pre), _toConsumableArray(flattenDeep(item[children])));
87
+ } else {
88
+ return pre;
89
+ }
90
+ }, []);
91
+ };
92
+
93
+ // 监听值和值列表的变化(执行不存在值的判断逻辑)
94
+ useEffect(function () {
95
+ var _v = value;
96
+ /* 若inexistent为true,判断不存在情况并重置值 */
97
+ if (inexistent) {
98
+ var _value2 = fieldNames.value;
99
+ var _options = flattenDeep(options);
100
+ if (_multiple) {
101
+ var _v2;
102
+ _v = ((_v2 = _v) === null || _v2 === void 0 ? void 0 : _v2.map(function (i) {
103
+ return _options !== null && _options !== void 0 && _options.some(function (item) {
104
+ return item[_value2] === i;
105
+ }) ? i : i + '(不存在)';
106
+ })) || [];
107
+ } else {
108
+ _v = _v || _v === 0 || _v === false ? _options !== null && _options !== void 0 && _options.some(function (item) {
109
+ return item[_value2] === _v;
110
+ }) ? _v : _v + '(不存在)' : undefined;
111
+ }
112
+ }
113
+ set_value(_v);
114
+ }, [value, _values, inexistent, _multiple, JSON.stringify(options)]);
115
+ // 组件change事件
116
+ var change = function change(v, labelList, e) {
117
+ var _v = v;
118
+ // 若inexistent为true,当重新触发change事件时,将不存在的项移除(仅多选时需处理)
119
+ if (inexistent && _multiple) {
120
+ _v = v.filter(function (item) {
121
+ return !(('' + item).indexOf('(不存在)') !== -1);
122
+ });
123
+ }
124
+ if (!props.hasOwnProperty('value')) {
125
+ set_value(_v);
126
+ }
127
+ onChange === null || onChange === void 0 || onChange(_v, labelList, e);
128
+ };
129
+ return /*#__PURE__*/_jsxs("div", {
130
+ style: _objectSpread({
131
+ position: label ? 'relative' : 'static',
132
+ height: _multiple ? 'auto' : 32,
133
+ '--selector-pl': "".concat(paddingLeft, "px")
134
+ }, style),
135
+ className: "mc-tree-select ".concat(_multiple && _maxTagCount === 1 && 'mc-tree-select--inline', " ").concat(className),
136
+ children: [label && /*#__PURE__*/_jsx("span", {
137
+ ref: labelRef,
138
+ className: "mc-tree-select__label ".concat(disabled && 'mc-tree-select--disabled'),
139
+ children: label
140
+ }), /*#__PURE__*/_jsx(TreeSelect, _objectSpread({
141
+ ref: ref,
142
+ className: "mc-tree-select__content",
143
+ value: _value,
144
+ onChange: change,
145
+ treeData: options,
146
+ multiple: multiple,
147
+ treeCheckable: treeCheckable,
148
+ disabled: disabled,
149
+ fieldNames: fieldNames,
150
+ placeholder: "\u8BF7\u9009\u62E9",
151
+ showSearch: true,
152
+ allowClear: true,
153
+ maxTagCount: _maxTagCount,
154
+ maxTagPlaceholder: function maxTagPlaceholder(v) {
155
+ return /*#__PURE__*/_jsx(Popover, {
156
+ overlayStyle: {
157
+ maxWidth: 300
158
+ },
159
+ content: v.map(function (_ref, index) {
160
+ var _ref2;
161
+ var value = _ref.value,
162
+ label = _ref.label;
163
+ return /*#__PURE__*/_jsxs("span", {
164
+ children: [index !== 0 && /*#__PURE__*/_jsx("span", {
165
+ children: ", "
166
+ }), /*#__PURE__*/_jsx("span", {
167
+ style: {
168
+ color: ((_ref2 = '' + value) === null || _ref2 === void 0 ? void 0 : _ref2.indexOf('(不存在)')) === -1 ? 'rgba(0, 0, 0, 0.88)' : '#ff4d4f'
169
+ },
170
+ children: label
171
+ })]
172
+ }, value);
173
+ }),
174
+ children: /*#__PURE__*/_jsx("span", {
175
+ children: '+' + v.length
176
+ })
177
+ });
178
+ }
179
+ }, rest))]
180
+ });
181
+ });
182
+ export default McTreeSelect;
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ debounce: (fn: (...args: any[]) => any, wait: number) => (...args: any[]) => void;
3
+ };
4
+ export default _default;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 防抖函数
3
+ * @param fn 回调函数
4
+ * @param wait 间隔时间
5
+ * @returns {void}
6
+ */
7
+ var debounce = function debounce(fn, wait) {
8
+ var timer = null;
9
+ return function () {
10
+ var _this = this;
11
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
12
+ args[_key] = arguments[_key];
13
+ }
14
+ if (timer) {
15
+ clearInterval(timer);
16
+ }
17
+ timer = setTimeout(function () {
18
+ fn.call(_this, args);
19
+ clearInterval(timer);
20
+ timer = null;
21
+ }, wait);
22
+ };
23
+ };
24
+ export default {
25
+ debounce: debounce
26
+ };
@@ -0,0 +1,19 @@
1
+ import McCascader from './McCascader';
2
+ import McContainer from './McContainer';
3
+ import McDateRange from './McDateRange';
4
+ import McFonts from './McFonts';
5
+ import McGroupPanel from './McGroupPanel';
6
+ import McIconFont from './McIconFont';
7
+ import McInput from './McInput';
8
+ import McInputNumber from './McInputNumber';
9
+ import McModalProvider from './McModalProvider';
10
+ import McPeriodSelect from './McPeriodSelect';
11
+ import McPopoverButton from './McPopoverButton';
12
+ import McPopoverForm from './McPopoverForm';
13
+ import McResult from './McResult';
14
+ import McSelect from './McSelect';
15
+ import McThemeConfig from './McThemeConfig';
16
+ import McTreePanel from './McTreePanel';
17
+ import McTreeSelect from './McTreeSelect';
18
+ import Utils from './Utils';
19
+ export { McCascader, McContainer, McDateRange, McFonts, McGroupPanel, McIconFont, McInput, McInputNumber, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McResult, McSelect, McThemeConfig, McTreePanel, McTreeSelect, Utils, };
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ import McCascader from "./McCascader";
2
+ import McContainer from "./McContainer";
3
+ import McDateRange from "./McDateRange";
4
+ import McFonts from "./McFonts";
5
+ import McGroupPanel from "./McGroupPanel";
6
+ import McIconFont from "./McIconFont";
7
+ import McInput from "./McInput";
8
+ import McInputNumber from "./McInputNumber";
9
+ import McModalProvider from "./McModalProvider";
10
+ import McPeriodSelect from "./McPeriodSelect";
11
+ import McPopoverButton from "./McPopoverButton";
12
+ import McPopoverForm from "./McPopoverForm";
13
+ import McResult from "./McResult";
14
+ import McSelect from "./McSelect";
15
+ import McThemeConfig from "./McThemeConfig";
16
+ import McTreePanel from "./McTreePanel";
17
+ import McTreeSelect from "./McTreeSelect";
18
+ import Utils from "./Utils";
19
+ export { McCascader, McContainer, McDateRange, McFonts, McGroupPanel, McIconFont, McInput, McInputNumber, McModalProvider, McPeriodSelect, McPopoverButton, McPopoverForm, McResult, McSelect, McThemeConfig, McTreePanel, McTreeSelect, Utils };
@@ -0,0 +1,20 @@
1
+ declare module 'slash2';
2
+ declare module '*.css';
3
+ declare module '*.less';
4
+ declare module '*.scss';
5
+ declare module '*.sass';
6
+ declare module '*.svg';
7
+ declare module '*.png';
8
+ declare module '*.jpg';
9
+ declare module '*.jpeg';
10
+ declare module '*.gif';
11
+ declare module '*.bmp';
12
+ declare module '*.tiff';
13
+ declare module '*.json';
14
+ declare module '*.otf';
15
+ declare module 'omit.js';
16
+ declare module 'numeral';
17
+ declare module '@antv/data-set';
18
+ declare module 'react-fittext';
19
+ declare module 'bizcharts-plugin-slider';
20
+ declare module 'much-library';
package/package.json ADDED
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "@zykj2024/much-library",
3
+ "version": "1.0.9",
4
+ "description": "react library",
5
+ "license": "MIT",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "father build",
13
+ "build:watch": "father dev",
14
+ "dev": "dumi dev",
15
+ "docs:build": "dumi build",
16
+ "doctor": "father doctor",
17
+ "lint": "npm run lint:es && npm run lint:css",
18
+ "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
19
+ "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
20
+ "prepare": "husky install && dumi setup",
21
+ "prepublishOnly": "father doctor && npm run build",
22
+ "start": "npm run dev"
23
+ },
24
+ "commitlint": {
25
+ "extends": [
26
+ "@commitlint/config-conventional"
27
+ ]
28
+ },
29
+ "lint-staged": {
30
+ "*.{md,json}": [
31
+ "prettier --write --no-error-on-unmatched-pattern"
32
+ ],
33
+ "*.{css,less}": [
34
+ "stylelint --fix",
35
+ "prettier --write"
36
+ ],
37
+ "*.{js,jsx}": [
38
+ "eslint --fix",
39
+ "prettier --write"
40
+ ],
41
+ "*.{ts,tsx}": [
42
+ "eslint --fix",
43
+ "prettier --parser=typescript --write"
44
+ ]
45
+ },
46
+ "dependencies": {
47
+ "@babel/runtime": "^7.25.6",
48
+ "@dnd-kit/core": "^6.1.0",
49
+ "@dnd-kit/sortable": "^8.0.0",
50
+ "antd": "^5.16.2",
51
+ "antd-style": "^3.6.2",
52
+ "dayjs": "^1.11.12",
53
+ "much-icons": "1.0.5",
54
+ "postcss-import": "^16.1.0",
55
+ "postcss-less": "^6.0.0",
56
+ "typescript-react-svg-icon-generator": "^1.1.9"
57
+ },
58
+ "devDependencies": {
59
+ "@commitlint/cli": "^17.1.2",
60
+ "@commitlint/config-conventional": "^17.1.0",
61
+ "@types/react": "^18.0.0",
62
+ "@types/react-dom": "^18.0.0",
63
+ "@umijs/lint": "^4.0.0",
64
+ "dumi": "^2.4.4",
65
+ "eslint": "^8.23.0",
66
+ "father": "^4.1.0",
67
+ "husky": "^8.0.1",
68
+ "lint-staged": "^13.0.3",
69
+ "prettier": "^2.7.1",
70
+ "prettier-plugin-organize-imports": "^3.0.0",
71
+ "prettier-plugin-packagejson": "^2.2.18",
72
+ "stylelint": "^14.9.1"
73
+ },
74
+ "peerDependencies": {
75
+ "react": ">=16.9.0",
76
+ "react-dom": ">=16.9.0"
77
+ },
78
+ "publishConfig": {
79
+ "access": "public"
80
+ },
81
+ "authors": []
82
+ }