@para-ui/core 4.0.8 → 4.0.10

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 (49) hide show
  1. package/GlobalContext/confirmLocale.d.ts +2 -4
  2. package/GlobalContext/index.js +5 -4
  3. package/ParauiProvider/index.js +1 -1
  4. package/README.md +8 -0
  5. package/package.json +2 -2
  6. package/umd/Breadcrumbs.js +7 -7
  7. package/umd/Button.js +7 -7
  8. package/umd/ButtonGroup.js +4 -4
  9. package/umd/Cascader.js +1 -1
  10. package/umd/ComboSelect.js +5 -5
  11. package/umd/CopyText.js +7 -7
  12. package/umd/CycleSelector.js +1 -1
  13. package/umd/DatePicker.js +4 -4
  14. package/umd/Descriptions.js +1 -1
  15. package/umd/Desktop.js +1 -1
  16. package/umd/DragVerify.js +4 -4
  17. package/umd/Drawer.js +4 -4
  18. package/umd/DynamicMultiBox.js +4 -4
  19. package/umd/Empty.js +1 -1
  20. package/umd/Form.js +1 -1
  21. package/umd/FormItem.js +1 -1
  22. package/umd/FunctionModal.js +7 -7
  23. package/umd/GlobalContext.js +1 -1
  24. package/umd/InputLang.js +4 -4
  25. package/umd/Modal.js +7 -7
  26. package/umd/MultiBox.js +5 -5
  27. package/umd/OperateBtn.js +4 -4
  28. package/umd/PageHeader.js +4 -4
  29. package/umd/Pagination.js +7 -7
  30. package/umd/ParauiProvider.js +1 -1
  31. package/umd/PopConfirm.js +5 -5
  32. package/umd/Querying.js +1 -1
  33. package/umd/QuickReply.js +1 -1
  34. package/umd/Search.js +1 -1
  35. package/umd/Select.js +4 -4
  36. package/umd/SelectInput.js +1 -1
  37. package/umd/Selector.js +4 -4
  38. package/umd/SelectorPicker.js +1 -1
  39. package/umd/SingleBox.js +4 -4
  40. package/umd/Switch.js +4 -4
  41. package/umd/Table.js +5 -5
  42. package/umd/Tabs.js +4 -4
  43. package/umd/TextEditor.js +2 -2
  44. package/umd/TextField.js +7 -7
  45. package/umd/TimePicker.js +1 -1
  46. package/umd/ToggleButton.js +1 -1
  47. package/umd/Transfer.js +8 -8
  48. package/umd/Tree.js +4 -4
  49. package/umd/Upload.js +7 -7
@@ -1,6 +1,4 @@
1
1
  export declare const changeConfirmLocale: (newLocale: {
2
2
  [name: string]: any;
3
- }) => void;
4
- export declare const getConfirmLocale: () => {
5
- [key: string]: string;
6
- };
3
+ }, lang?: string) => void;
4
+ export declare const getConfirmLocale: () => Record<string, string>;
@@ -5,17 +5,18 @@ import { d as defaultModalLocale } from '../_verture/index-c568f272.js';
5
5
 
6
6
  //confirm 默认中文
7
7
  let confirmRuntimeLocale = Object.assign({}, defaultModalLocale['zh']);
8
- const changeConfirmLocale = newLocale => {
8
+ const changeConfirmLocale = (newLocale, lang) => {
9
9
  const confirmLocale = newLocale['Confirm'];
10
10
  if (confirmLocale) {
11
11
  confirmRuntimeLocale = Object.assign(Object.assign({}, confirmRuntimeLocale), confirmLocale);
12
12
  } else {
13
- confirmRuntimeLocale = Object.assign({}, defaultModalLocale['zh']);
13
+ if (!lang) lang = GetLanguage();
14
+ const curLang = (defaultModalLocale === null || defaultModalLocale === void 0 ? void 0 : defaultModalLocale[lang]) || defaultModalLocale['zh'] || {};
15
+ confirmRuntimeLocale = Object.assign({}, curLang);
14
16
  }
15
17
  };
16
18
  const getConfirmLocale = () => {
17
- const lang = GetLanguage();
18
- return (defaultModalLocale === null || defaultModalLocale === void 0 ? void 0 : defaultModalLocale[lang]) || defaultModalLocale['zh'];
19
+ return confirmRuntimeLocale;
19
20
  };
20
21
 
21
22
  const GlobalContext = /*#__PURE__*/React__default.createContext({
@@ -35,7 +35,7 @@ const ParauiProvider = props => {
35
35
  const lang = props.language || GetLanguage();
36
36
  const locale = props.locale || {};
37
37
  const i18nData = locale[lang] || {};
38
- changeConfirmLocale === null || changeConfirmLocale === void 0 ? void 0 : changeConfirmLocale(i18nData);
38
+ changeConfirmLocale === null || changeConfirmLocale === void 0 ? void 0 : changeConfirmLocale(i18nData, lang);
39
39
  }, [props.language, props.locale]);
40
40
  return jsx(GlobalContext.Provider, Object.assign({
41
41
  value: Object.assign(Object.assign({}, props), {
package/README.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 版本: 4.0.10
2
+ para-ui/core@4.0.10 发布
3
+ 【ParauiProvider】修复confirm国际化问题
4
+
5
+ ## 版本: 4.0.9
6
+ para-ui/core@4.0.9 发布
7
+ 【confirmLocale】支持国际化语言传入
8
+
1
9
  ## 版本: 4.0.8
2
10
  para-ui/core@4.0.8 发布
3
11
  【分体按钮-SplitButton】修复样式问题
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@para-ui/core",
3
3
  "private": false,
4
- "version": "4.0.8",
4
+ "version": "4.0.10",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "@monaco-editor/react": "^4.6.0",
31
31
  "monaco-editor": "^0.44.0",
32
- "@para-ui/core": "4.0.0-alpha",
32
+ "@para-ui/core": "4.0.9",
33
33
  "@paraview/lib": "^2.0.3",
34
34
  "@wangeditor/editor": "^5.1.15",
35
35
  "@wangeditor/editor-for-react": "^1.0.5",