@para-ui/core 3.0.56 → 3.0.59

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 (56) hide show
  1. package/DynamicMultiBox/index.js +62 -16
  2. package/DynamicMultiBox/lang/en_US.d.ts +7 -0
  3. package/DynamicMultiBox/lang/index.d.ts +15 -0
  4. package/DynamicMultiBox/lang/zh_CN.d.ts +7 -0
  5. package/Form/index.js +1 -1
  6. package/FormItem/index.js +1 -1
  7. package/GlobalContext/index.js +1 -2
  8. package/GlobalContext/intl.d.ts +4 -3
  9. package/InputLang/index.js +11 -5
  10. package/ParauiProvider/index.js +1 -1
  11. package/README.md +18 -0
  12. package/Selector/index.js +1 -1
  13. package/TextField/index.js +1 -1
  14. package/_verture/intl-aef57980.js +80 -0
  15. package/index.js +7 -7
  16. package/package.json +1 -1
  17. package/umd/Breadcrumbs.js +5 -5
  18. package/umd/Button.js +5 -5
  19. package/umd/ButtonGroup.js +5 -5
  20. package/umd/Cascader.js +3 -3
  21. package/umd/ComboSelect.js +5 -5
  22. package/umd/DatePicker.js +5 -5
  23. package/umd/Desktop.js +5 -5
  24. package/umd/DragVerify.js +2 -2
  25. package/umd/Drawer.js +5 -5
  26. package/umd/DynamicMultiBox.js +6 -6
  27. package/umd/Empty.js +1 -15
  28. package/umd/Form.js +4 -4
  29. package/umd/FormItem.js +5 -5
  30. package/umd/FunctionModal.js +5 -5
  31. package/umd/GlobalContext.js +1 -1
  32. package/umd/InputLang.js +5 -5
  33. package/umd/Modal.js +5 -5
  34. package/umd/MultiBox.js +5 -5
  35. package/umd/OperateBtn.js +3 -3
  36. package/umd/PageHeader.js +5 -5
  37. package/umd/Pagination.js +6 -6
  38. package/umd/ParauiProvider.js +1 -15
  39. package/umd/PopConfirm.js +5 -5
  40. package/umd/Querying.js +1 -15
  41. package/umd/Search.js +6 -6
  42. package/umd/Select.js +5 -5
  43. package/umd/SelectInput.js +7 -7
  44. package/umd/Selector.js +5 -5
  45. package/umd/SelectorPicker.js +4 -4
  46. package/umd/SingleBox.js +7 -7
  47. package/umd/Table.js +5 -5
  48. package/umd/Tabs.js +5 -5
  49. package/umd/TextField.js +5 -5
  50. package/umd/TimePicker.js +3 -3
  51. package/umd/ToggleButton.js +5 -5
  52. package/umd/Transfer.js +6 -6
  53. package/umd/Tree.js +7 -7
  54. package/umd/Upload.js +5 -5
  55. package/_verture/intl-5cbb940c.js +0 -57
  56. /package/_verture/{index-d03136d4.js → index-3ad33217.js} +0 -0
@@ -1,57 +0,0 @@
1
- import { _ as _typeof } from './typeof-498dd2b1.js';
2
- import { jsx } from 'react/jsx-runtime';
3
- import React__default from 'react';
4
-
5
- /**
6
- * 替换字符串模版变量
7
- * @param str
8
- * @param params
9
- */
10
- var replaceStrTemplateVars = function replaceStrTemplateVars(str, vars) {
11
- if (!vars) return str;
12
- var jsx$1 = false; // 当替换的vars变量内存在jsx对象,则返回也是jsx数据,否则返回字符串
13
- str = str.replace(/\"/g, '\\"');
14
- var strTemplate = str.replace(/\{(.*?)\}/ig, function (s, v) {
15
- if (_typeof(vars[v]) === 'object') jsx$1 = true;
16
- return "\",vars.".concat(v, ",\"");
17
- });
18
- if (jsx$1) return new Function('vars', "return [\"".concat(strTemplate, "\"];"))(vars).map(function (item) {
19
- return jsx(React__default.Fragment, {
20
- children: item
21
- }, Math.random());
22
- });else return new Function('vars', "return [\"".concat(strTemplate, "\"].join('');"))(vars);
23
- };
24
- /**
25
- * 国际化获取方法
26
- * @param ops 国际化取值key参数
27
- * @param i18nData 国际化数据对象
28
- * @param params 国际化字符变量对象
29
- * @param lang 指定国际化语言
30
- * @param defI18nData 默认国际化数据对象
31
- */
32
- var i18nIntl = function i18nIntl(props) {
33
- var _a, _b;
34
- var ops = props.ops,
35
- i18nData = props.i18nData,
36
- lang = props.lang,
37
- params = props.params,
38
- defI18nData = props.defI18nData;
39
- var text, key;
40
- if (typeof ops === 'string') {
41
- key = ops;
42
- } else if (_typeof(ops) === 'object') {
43
- if (typeof ops.id !== 'string') return 'i18n intl object "id" is missing';
44
- key = ops.id;
45
- }
46
- if (key !== undefined) {
47
- text = (_a = i18nData[lang]) === null || _a === void 0 ? void 0 : _a[key];
48
- if (text === undefined && defI18nData) {
49
- // 尝试从默认国际化数据获取
50
- text = (_b = defI18nData[lang]) === null || _b === void 0 ? void 0 : _b[key];
51
- }
52
- }
53
- if (typeof text !== 'string') return "{".concat(key, "}");
54
- return replaceStrTemplateVars(text, params);
55
- };
56
-
57
- export { i18nIntl as i };