@para-ui/core 4.0.0-rc.3 → 4.0.0-rc.5
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.
- package/AutoBox/index.js +72 -85
- package/AutoTips/index.js +72 -95
- package/Badge/index.js +18 -17
- package/Breadcrumbs/index.js +57 -73
- package/Button/index.js +89 -117
- package/ButtonGroup/index.js +30 -33
- package/Carousel/index.js +29 -33
- package/Cascader/index.js +7 -9
- package/Checkbox/index.js +28 -35
- package/CheckboxGroup/index.js +43 -58
- package/Collapse/index.js +52 -49
- package/CollapseBox/index.js +65 -70
- package/CollapseLayout/index.js +106 -101
- package/ColorPicker/index.js +3 -3
- package/ComboSelect/index.js +242 -330
- package/ComboSelect/utils.d.ts +0 -5
- package/Container/index.js +17 -21
- package/CopyText/index.js +50 -83
- package/DatePicker/index.js +22 -27
- package/Descriptions/index.js +50 -59
- package/Desktop/index.js +161 -180
- package/DragVerify/index.js +77 -113
- package/Drawer/index.js +82 -97
- package/Dropdown/index.js +3 -3
- package/DynamicMultiBox/index.js +219 -224
- package/DynamicMultiBox/interface.d.ts +7 -0
- package/Empty/index.js +26 -28
- package/Form/index.js +66 -74
- package/FormItem/index.js +14 -15
- package/FunctionModal/index.js +7 -14
- package/GlobalContext/index.js +17 -20
- package/Help/index.js +9 -12
- package/HelperText/index.js +11 -11
- package/InputLang/index.js +104 -124
- package/InputNumber/index.js +62 -81
- package/Label/index.js +19 -21
- package/Loading/index.js +11 -10
- package/Menu/index.js +302 -371
- package/Message/index.js +105 -114
- package/Modal/index.js +122 -148
- package/MultiBox/index.d.ts +5 -0
- package/MultiBox/index.js +111 -115
- package/Notification/index.js +105 -103
- package/OperateBtn/index.d.ts +3 -0
- package/OperateBtn/index.js +77 -107
- package/PageHeader/index.js +327 -406
- package/Pagination/index.js +107 -137
- package/ParauiProvider/index.js +20 -22
- package/PasswordRules/index.js +36 -40
- package/PopConfirm/index.js +62 -79
- package/Popover/index.js +12 -12
- package/Progress/index.js +72 -74
- package/Querying/index.js +52 -59
- package/README.md +2 -0
- package/Radio/index.js +27 -34
- package/RadioGroup/index.js +38 -52
- package/Search/index.js +35 -44
- package/Select/index.js +323 -364
- package/SelectInput/index.js +8 -13
- package/Selector/index.js +905 -796
- package/SelectorPicker/index.js +111 -133
- package/SingleBox/index.d.ts +5 -0
- package/SingleBox/index.js +92 -88
- package/Slider/index.js +46 -57
- package/Status/index.js +14 -13
- package/Stepper/index.js +25 -26
- package/Styles/theme.scss +9 -9
- package/Switch/index.js +32 -35
- package/Table/index.js +767 -963
- package/Tabs/index.js +102 -102
- package/Tag/index.js +115 -162
- package/TextEditor/index.js +81 -103
- package/TextField/index.js +142 -183
- package/TimePicker/index.js +27 -28
- package/Timeline/index.js +67 -58
- package/Title/index.js +32 -34
- package/ToggleButton/index.js +53 -52
- package/Tooltip/index.js +79 -82
- package/Transfer/index.js +160 -203
- package/Tree/index.js +7 -12
- package/Upload/index.js +527 -759
- package/Upload/interface.d.ts +5 -0
- package/_verture/{constant-0d9802f7.js → constant-5317fc89.js} +2 -2
- package/_verture/{index-f48d5ce6.js → index-0ced30f7.js} +1128 -1080
- package/_verture/{index-024bbc9b.js → index-775ad32d.js} +29 -25
- package/_verture/{index-05f7bf11.js → index-c568f272.js} +2 -2
- package/_verture/index-da9097d3.js +239 -0
- package/_verture/{index-56601c94.js → index-ef1235fb.js} +125 -134
- package/_verture/{index-de8f4428.js → index-f186b5e8.js} +315 -399
- package/_verture/intl-f2f27722.js +69 -0
- package/_verture/{modalContext-736ff215.js → modalContext-5df08980.js} +36 -64
- package/_verture/{slicedToArray-a8206399.js → slicedToArray-8223a2ef.js} +15 -2
- package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-eb13cf56.js} +5 -4
- package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-1e416658.js} +4 -3
- package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-635f66f4.js} +16 -15
- package/_verture/{util-7e1fb1e2.js → util-82646c4f.js} +5 -4
- package/_verture/{utils-06d86594.js → utils-46e99c9a.js} +34 -26
- package/index.js +21 -22
- package/locale/index.js +10 -10
- package/package.json +1 -1
- package/umd/AutoBox.js +9 -8
- package/umd/AutoTips.js +9 -8
- package/umd/Badge.js +1 -1
- package/umd/Breadcrumbs.js +9 -8
- package/umd/Button.js +9 -8
- package/umd/ButtonGroup.js +9 -8
- package/umd/Carousel.js +5 -5
- package/umd/Cascader.js +9 -8
- package/umd/Checkbox.js +9 -8
- package/umd/CheckboxGroup.js +9 -8
- package/umd/Collapse.js +8 -7
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +9 -8
- package/umd/Container.js +1 -1
- package/umd/CopyText.js +9 -8
- package/umd/DatePicker.js +9 -8
- package/umd/Descriptions.js +9 -8
- package/umd/Desktop.js +9 -8
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +9 -8
- package/umd/Dropdown.js +6 -5
- package/umd/DynamicMultiBox.js +11 -10
- package/umd/Empty.js +1 -1
- package/umd/Form.js +9 -8
- package/umd/FormItem.js +9 -8
- package/umd/FunctionModal.js +9 -8
- package/umd/GlobalContext.js +1 -1
- package/umd/Help.js +9 -8
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +9 -8
- package/umd/InputNumber.js +9 -8
- package/umd/Label.js +9 -8
- package/umd/Loading.js +4 -4
- package/umd/Menu.js +4 -4
- package/umd/Message.js +4 -4
- package/umd/Modal.js +9 -8
- package/umd/MultiBox.js +9 -8
- package/umd/Notification.js +8 -7
- package/umd/OperateBtn.js +9 -8
- package/umd/PageHeader.js +9 -8
- package/umd/Pagination.js +9 -8
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +9 -8
- package/umd/Popover.js +9 -8
- package/umd/Progress.js +5 -5
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +9 -8
- package/umd/RadioGroup.js +9 -8
- package/umd/Search.js +9 -8
- package/umd/Select.js +9 -8
- package/umd/SelectInput.js +9 -8
- package/umd/Selector.js +9 -8
- package/umd/SelectorPicker.js +9 -8
- package/umd/SingleBox.js +9 -8
- package/umd/Slider.js +6 -5
- package/umd/Status.js +4 -4
- package/umd/Stepper.js +9 -8
- package/umd/Switch.js +9 -8
- package/umd/Table.js +9 -8
- package/umd/Tabs.js +9 -8
- package/umd/Tag.js +9 -8
- package/umd/TextEditor.js +22 -21
- package/umd/TextField.js +9 -8
- package/umd/TimePicker.js +9 -8
- package/umd/Timeline.js +1 -1
- package/umd/Title.js +9 -8
- package/umd/ToggleButton.js +9 -8
- package/umd/Tooltip.js +9 -8
- package/umd/Transfer.js +10 -9
- package/umd/Tree.js +9 -8
- package/umd/Upload.js +10 -9
- package/umd/locale.js +1 -1
- package/_verture/index-232d890b.js +0 -327
- package/_verture/index-e9007d6a.js +0 -236
- package/_verture/intl-5c1ec055.js +0 -81
- package/_verture/toConsumableArray-8f4c9589.js +0 -19
- package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { _ as _typeof } from './typeof-adeedc13.js';
|
|
2
|
-
|
|
3
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
4
|
-
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); }
|
|
5
|
-
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; }
|
|
6
|
-
// 实现 get 方法
|
|
7
|
-
// 支持对象和数组/支持默认值/支持路径/支持字符串模版变量/支持jsx/支持.运算符和[]运算符
|
|
8
|
-
var get = function get(obj, path, defaultValue) {
|
|
9
|
-
var pathArr = path.replace(/\[(\d+)\]/g, '.$1').split('.');
|
|
10
|
-
var result = obj;
|
|
11
|
-
var _iterator = _createForOfIteratorHelper(pathArr),
|
|
12
|
-
_step;
|
|
13
|
-
try {
|
|
14
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
15
|
-
var p = _step.value;
|
|
16
|
-
result = Object(result)[p];
|
|
17
|
-
if (result === undefined) {
|
|
18
|
-
return defaultValue;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
} catch (err) {
|
|
22
|
-
_iterator.e(err);
|
|
23
|
-
} finally {
|
|
24
|
-
_iterator.f();
|
|
25
|
-
}
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* 替换字符串模版变量
|
|
30
|
-
* @param str
|
|
31
|
-
* @param vars
|
|
32
|
-
*/
|
|
33
|
-
var replaceStrTemplateVars = function replaceStrTemplateVars(str, vars) {
|
|
34
|
-
if (!vars) return str;
|
|
35
|
-
str = str.replace(/\"/g, '\\"');
|
|
36
|
-
// 模版字符串正则
|
|
37
|
-
var strTemplateReg = /({[^{}]+})/g;
|
|
38
|
-
var parts = str.split(strTemplateReg);
|
|
39
|
-
return parts.map(function (part) {
|
|
40
|
-
if (part.match(strTemplateReg)) {
|
|
41
|
-
var key = part.replace(/({|})/g, '');
|
|
42
|
-
var val = get(vars, key);
|
|
43
|
-
return val === undefined ? key : val;
|
|
44
|
-
}
|
|
45
|
-
return part;
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* 国际化获取方法
|
|
50
|
-
* @param ops 国际化取值key参数
|
|
51
|
-
* @param i18nData 国际化数据对象
|
|
52
|
-
* @param params 国际化字符变量对象
|
|
53
|
-
* @param lang 指定国际化语言
|
|
54
|
-
* @param defI18nData 默认国际化数据对象
|
|
55
|
-
*/
|
|
56
|
-
var i18nIntl = function i18nIntl(props) {
|
|
57
|
-
var _a, _b;
|
|
58
|
-
var ops = props.ops,
|
|
59
|
-
i18nData = props.i18nData,
|
|
60
|
-
lang = props.lang,
|
|
61
|
-
params = props.params,
|
|
62
|
-
defI18nData = props.defI18nData;
|
|
63
|
-
var text, key;
|
|
64
|
-
if (typeof ops === 'string') {
|
|
65
|
-
key = ops;
|
|
66
|
-
} else if (_typeof(ops) === 'object') {
|
|
67
|
-
if (typeof ops.id !== 'string') return 'i18n intl object "id" is missing';
|
|
68
|
-
key = ops.id;
|
|
69
|
-
}
|
|
70
|
-
if (key !== undefined) {
|
|
71
|
-
text = (_a = i18nData[lang]) === null || _a === void 0 ? void 0 : _a[key];
|
|
72
|
-
if (text === undefined && defI18nData) {
|
|
73
|
-
// 尝试从默认国际化数据获取
|
|
74
|
-
text = (_b = defI18nData[lang]) === null || _b === void 0 ? void 0 : _b[key];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (typeof text !== 'string') return "{".concat(key, "}");
|
|
78
|
-
return replaceStrTemplateVars(text, params);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export { i18nIntl as i };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { a as _arrayLikeToArray, _ as _unsupportedIterableToArray } from './unsupportedIterableToArray-cb478f24.js';
|
|
2
|
-
|
|
3
|
-
function _arrayWithoutHoles(arr) {
|
|
4
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function _iterableToArray(iter) {
|
|
8
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
function _nonIterableSpread() {
|
|
12
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function _toConsumableArray(arr) {
|
|
16
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { _toConsumableArray as _, _iterableToArray as a };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
function _arrayLikeToArray(arr, len) {
|
|
2
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
4
|
-
return arr2;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
8
|
-
if (!o) return;
|
|
9
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
10
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
11
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
12
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { _unsupportedIterableToArray as _, _arrayLikeToArray as a };
|