@zykj2024/much-library 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/McCascader/city.js +909 -0
- package/dist/McCascader/index.css +60 -0
- package/dist/McCascader/index.d.ts +19 -0
- package/dist/McCascader/index.js +221 -0
- package/dist/McContainer/demo/actionBar.d.ts +8 -0
- package/dist/McContainer/demo/actionBar.js +70 -0
- package/dist/McContainer/demo/base.d.ts +8 -0
- package/dist/McContainer/demo/base.js +80 -0
- package/dist/McContainer/demo/batch.d.ts +8 -0
- package/dist/McContainer/demo/batch.js +89 -0
- package/dist/McContainer/demo/collapse.d.ts +8 -0
- package/dist/McContainer/demo/collapse.js +76 -0
- package/dist/McContainer/demo/expand.d.ts +8 -0
- package/dist/McContainer/demo/expand.js +90 -0
- package/dist/McContainer/demo/pagination.d.ts +7 -0
- package/dist/McContainer/demo/pagination.js +93 -0
- package/dist/McContainer/demo/search.d.ts +7 -0
- package/dist/McContainer/demo/search.js +101 -0
- package/dist/McContainer/demo/standard.d.ts +7 -0
- package/dist/McContainer/demo/standard.js +168 -0
- package/dist/McContainer/index.css +123 -0
- package/dist/McContainer/index.d.ts +49 -0
- package/dist/McContainer/index.js +407 -0
- package/dist/McDateRange/demo/base.d.ts +6 -0
- package/dist/McDateRange/demo/base.js +22 -0
- package/dist/McDateRange/demo/cancelPresets.d.ts +6 -0
- package/dist/McDateRange/demo/cancelPresets.js +23 -0
- package/dist/McDateRange/demo/overlap.d.ts +2 -0
- package/dist/McDateRange/demo/overlap.js +32 -0
- package/dist/McDateRange/index.css +31 -0
- package/dist/McDateRange/index.d.ts +28 -0
- package/dist/McDateRange/index.js +167 -0
- package/dist/McFonts/index.d.ts +7 -0
- package/dist/McFonts/index.js +10 -0
- package/dist/McFonts/public/FF DIN Pro Bold.otf +0 -0
- package/dist/McFonts/public/SourceHanSansCN-Bold.otf +0 -0
- package/dist/McFonts/public/SourceHanSansCN-Light.otf +0 -0
- package/dist/McFonts/public/SourceHanSansCN-Medium.otf +0 -0
- package/dist/McFonts/public/SourceHanSansCN-Regular.otf +0 -0
- package/dist/McGroupPanel/comps/SelectedItem/index.d.ts +4 -0
- package/dist/McGroupPanel/comps/SelectedItem/index.js +76 -0
- package/dist/McGroupPanel/index.css +162 -0
- package/dist/McGroupPanel/index.d.ts +29 -0
- package/dist/McGroupPanel/index.js +411 -0
- package/dist/McIconFont/iconfont.js +1 -0
- package/dist/McIconFont/index.d.ts +5 -0
- package/dist/McIconFont/index.js +8 -0
- package/dist/McIcons/business.json +137 -0
- package/dist/McInput/Input.d.ts +19 -0
- package/dist/McInput/Input.js +48 -0
- package/dist/McInput/Search.d.ts +39 -0
- package/dist/McInput/Search.js +81 -0
- package/dist/McInput/TextArea.d.ts +11 -0
- package/dist/McInput/TextArea.js +37 -0
- package/dist/McInput/demo/Input/addonBefore.d.ts +3 -0
- package/dist/McInput/demo/Input/addonBefore.js +67 -0
- package/dist/McInput/demo/Input/base.d.ts +2 -0
- package/dist/McInput/demo/Input/base.js +31 -0
- package/dist/McInput/demo/Input/isTrim.d.ts +2 -0
- package/dist/McInput/demo/Input/isTrim.js +22 -0
- package/dist/McInput/demo/Input/label.d.ts +2 -0
- package/dist/McInput/demo/Input/label.js +26 -0
- package/dist/McInput/demo/Input/ref.d.ts +3 -0
- package/dist/McInput/demo/Input/ref.js +53 -0
- package/dist/McInput/demo/Input/status.d.ts +2 -0
- package/dist/McInput/demo/Input/status.js +23 -0
- package/dist/McInput/demo/Search/search-base.d.ts +2 -0
- package/dist/McInput/demo/Search/search-base.js +38 -0
- package/dist/McInput/demo/TextArea/text-area-base.d.ts +2 -0
- package/dist/McInput/demo/TextArea/text-area-base.js +38 -0
- package/dist/McInput/index.css +44 -0
- package/dist/McInput/index.d.ts +13 -0
- package/dist/McInput/index.js +7 -0
- package/dist/McInputNumber/demo/index.d.ts +2 -0
- package/dist/McInputNumber/demo/index.js +28 -0
- package/dist/McInputNumber/demo/label.d.ts +2 -0
- package/dist/McInputNumber/demo/label.js +26 -0
- package/dist/McInputNumber/demo/precision.d.ts +2 -0
- package/dist/McInputNumber/demo/precision.js +20 -0
- package/dist/McInputNumber/index.css +9 -0
- package/dist/McInputNumber/index.d.ts +13 -0
- package/dist/McInputNumber/index.js +43 -0
- package/dist/McModalProvider/index.d.ts +174 -0
- package/dist/McModalProvider/index.js +498 -0
- package/dist/McPeriodSelect/demo/base.d.ts +6 -0
- package/dist/McPeriodSelect/demo/base.js +19 -0
- package/dist/McPeriodSelect/demo/half.d.ts +6 -0
- package/dist/McPeriodSelect/demo/half.js +20 -0
- package/dist/McPeriodSelect/index.css +189 -0
- package/dist/McPeriodSelect/index.d.ts +13 -0
- package/dist/McPeriodSelect/index.js +305 -0
- package/dist/McPopoverButton/index.d.ts +14 -0
- package/dist/McPopoverButton/index.js +52 -0
- package/dist/McPopoverForm/index.d.ts +14 -0
- package/dist/McPopoverForm/index.js +95 -0
- package/dist/McResult/default.d.ts +1 -0
- package/dist/McResult/default.js +84 -0
- package/dist/McResult/demo/403.d.ts +6 -0
- package/dist/McResult/demo/403.js +17 -0
- package/dist/McResult/demo/404.d.ts +6 -0
- package/dist/McResult/demo/404.js +17 -0
- package/dist/McResult/demo/500.d.ts +6 -0
- package/dist/McResult/demo/500.js +17 -0
- package/dist/McResult/demo/building.d.ts +6 -0
- package/dist/McResult/demo/building.js +12 -0
- package/dist/McResult/demo/empty.d.ts +2 -0
- package/dist/McResult/demo/empty.js +11 -0
- package/dist/McResult/demo/noFunction.d.ts +2 -0
- package/dist/McResult/demo/noFunction.js +11 -0
- package/dist/McResult/demo/noUser.d.ts +6 -0
- package/dist/McResult/demo/noUser.js +12 -0
- package/dist/McResult/demo/preview.d.ts +2 -0
- package/dist/McResult/demo/preview.js +14 -0
- package/dist/McResult/icon.d.ts +25 -0
- package/dist/McResult/icon.js +946 -0
- package/dist/McResult/index.css +20 -0
- package/dist/McResult/index.d.ts +27 -0
- package/dist/McResult/index.js +103 -0
- package/dist/McResult/public/403.svg +164 -0
- package/dist/McResult/public/404.svg +123 -0
- package/dist/McResult/public/500.svg +129 -0
- package/dist/McResult/public/building.svg +127 -0
- package/dist/McResult/public/code403.svg +7 -0
- package/dist/McResult/public/code404.svg +5 -0
- package/dist/McResult/public/code500.svg +5 -0
- package/dist/McResult/public/empty.svg +1 -0
- package/dist/McResult/public/noFunction.svg +1 -0
- package/dist/McResult/public/noUser.svg +90 -0
- package/dist/McSelect/demo/base.d.ts +2 -0
- package/dist/McSelect/demo/base.js +63 -0
- package/dist/McSelect/demo/changeOnHidden.d.ts +2 -0
- package/dist/McSelect/demo/changeOnHidden.js +43 -0
- package/dist/McSelect/demo/dropdownRender.d.ts +7 -0
- package/dist/McSelect/demo/dropdownRender.js +78 -0
- package/dist/McSelect/demo/fetchOptions.d.ts +7 -0
- package/dist/McSelect/demo/fetchOptions.js +210 -0
- package/dist/McSelect/demo/inexistent.d.ts +2 -0
- package/dist/McSelect/demo/inexistent.js +79 -0
- package/dist/McSelect/demo/labelInValue.d.ts +2 -0
- package/dist/McSelect/demo/labelInValue.js +72 -0
- package/dist/McSelect/demo/maxTagCount.d.ts +3 -0
- package/dist/McSelect/demo/maxTagCount.js +51 -0
- package/dist/McSelect/demo/multiple.d.ts +2 -0
- package/dist/McSelect/demo/multiple.js +46 -0
- package/dist/McSelect/demo/optionRender.d.ts +3 -0
- package/dist/McSelect/demo/optionRender.js +51 -0
- package/dist/McSelect/demo/tagRender.d.ts +3 -0
- package/dist/McSelect/demo/tagRender.js +51 -0
- package/dist/McSelect/index.css +60 -0
- package/dist/McSelect/index.d.ts +40 -0
- package/dist/McSelect/index.js +350 -0
- package/dist/McThemeConfig/customToken.json +38 -0
- package/dist/McThemeConfig/demo/button.d.ts +2 -0
- package/dist/McThemeConfig/demo/button.js +226 -0
- package/dist/McThemeConfig/demo/drawer.d.ts +2 -0
- package/dist/McThemeConfig/demo/drawer.js +59 -0
- package/dist/McThemeConfig/demo/modal.d.ts +2 -0
- package/dist/McThemeConfig/demo/modal.js +78 -0
- package/dist/McThemeConfig/demo/radio.d.ts +2 -0
- package/dist/McThemeConfig/demo/radio.js +97 -0
- package/dist/McThemeConfig/demo/switch.d.ts +2 -0
- package/dist/McThemeConfig/demo/switch.js +96 -0
- package/dist/McThemeConfig/demo/tabs.d.ts +2 -0
- package/dist/McThemeConfig/demo/tabs.js +35 -0
- package/dist/McThemeConfig/globalStyle.d.ts +2 -0
- package/dist/McThemeConfig/globalStyle.js +172 -0
- package/dist/McThemeConfig/index.d.ts +9 -0
- package/dist/McThemeConfig/index.js +16 -0
- package/dist/McThemeConfig/layoutStyle.d.ts +2 -0
- package/dist/McThemeConfig/layoutStyle.js +1 -0
- package/dist/McThemeConfig/provider.d.ts +7 -0
- package/dist/McThemeConfig/provider.js +19 -0
- package/dist/McThemeConfig/themeToken.json +149 -0
- package/dist/McTreePanel/SelectedItem.d.ts +4 -0
- package/dist/McTreePanel/SelectedItem.js +75 -0
- package/dist/McTreePanel/demo/base.d.ts +6 -0
- package/dist/McTreePanel/demo/base.js +45 -0
- package/dist/McTreePanel/demo/fieldNames.d.ts +6 -0
- package/dist/McTreePanel/demo/fieldNames.js +37 -0
- package/dist/McTreePanel/demo/inexistent.d.ts +6 -0
- package/dist/McTreePanel/demo/inexistent.js +56 -0
- package/dist/McTreePanel/demo/labelInValue.d.ts +6 -0
- package/dist/McTreePanel/demo/labelInValue.js +56 -0
- package/dist/McTreePanel/demo/sortable.d.ts +6 -0
- package/dist/McTreePanel/demo/sortable.js +34 -0
- package/dist/McTreePanel/index.css +110 -0
- package/dist/McTreePanel/index.d.ts +27 -0
- package/dist/McTreePanel/index.js +315 -0
- package/dist/McTreeSelect/demo/base.d.ts +5 -0
- package/dist/McTreeSelect/demo/base.js +58 -0
- package/dist/McTreeSelect/demo/inexistent.d.ts +5 -0
- package/dist/McTreeSelect/demo/inexistent.js +63 -0
- package/dist/McTreeSelect/demo/label.d.ts +5 -0
- package/dist/McTreeSelect/demo/label.js +60 -0
- package/dist/McTreeSelect/demo/multiple.d.ts +5 -0
- package/dist/McTreeSelect/demo/multiple.js +71 -0
- package/dist/McTreeSelect/index.css +60 -0
- package/dist/McTreeSelect/index.d.ts +13 -0
- package/dist/McTreeSelect/index.js +182 -0
- package/dist/Utils/index.d.ts +4 -0
- package/dist/Utils/index.js +26 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +19 -0
- package/dist/typings.d.ts +20 -0
- 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,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
|
+
};
|
package/dist/index.d.ts
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, };
|
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
|
+
}
|