@cloudtower/eagle 0.34.19 → 0.34.21

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.
@@ -8,6 +8,7 @@ import antd5zhCN from 'antd5/lib/locale/zh_CN';
8
8
  import dayjs from 'dayjs';
9
9
  import moment from 'moment';
10
10
  import React__default, { createContext, useContext, useEffect } from 'react';
11
+ import { useAntdPatchEnLocales } from '../../hooks/useAntdPatchEnLocales.js';
11
12
 
12
13
  var __defProp = Object.defineProperty;
13
14
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
@@ -44,6 +45,7 @@ const ConfigProvider = ({
44
45
  i18n.on("languageChanged", adjustDateLocale);
45
46
  adjustDateLocale(i18n.language);
46
47
  }, [i18n]);
48
+ const patchEnLocale = useAntdPatchEnLocales(enUS);
47
49
  return /* @__PURE__ */ React__default.createElement(ConfigProviderContext.Provider, { value: config }, /* @__PURE__ */ React__default.createElement(
48
50
  ConfigProvider$1,
49
51
  __spreadValues({
@@ -54,7 +56,7 @@ const ConfigProvider = ({
54
56
  ConfigProvider$2,
55
57
  __spreadValues({
56
58
  autoInsertSpaceInButton: false,
57
- locale: i18n.language === "zh-CN" ? zhCN : enUS
59
+ locale: i18n.language === "zh-CN" ? zhCN : patchEnLocale
58
60
  }, antd4Configs),
59
61
  children
60
62
  )
@@ -1,5 +1,6 @@
1
1
  import React__default from 'react';
2
2
  import TimePicker from '../../TimePicker/index.js';
3
+ import { ConfigProvider } from '../../ConfigProvider/index.js';
3
4
 
4
5
  var __defProp = Object.defineProperty;
5
6
  var __defProps = Object.defineProperties;
@@ -40,7 +41,7 @@ const FieldsTimePicker = (_a) => {
40
41
  "input",
41
42
  "meta"
42
43
  ]);
43
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
44
+ return /* @__PURE__ */ React__default.createElement(ConfigProvider, null, /* @__PURE__ */ React__default.createElement(
44
45
  TimePicker,
45
46
  __spreadValues(__spreadProps(__spreadValues({}, input), {
46
47
  error: meta.touched && (meta.error || !meta.dirtySinceLastSubmit && meta.submitError)
@@ -54,7 +54,7 @@ function ImmersiveDialog(props) {
54
54
  footer,
55
55
  showCancel = true,
56
56
  showOk = true,
57
- okLoading,
57
+ confirmLoading,
58
58
  okButtonProps,
59
59
  cancelButtonProps,
60
60
  okText,
@@ -80,7 +80,7 @@ function ImmersiveDialog(props) {
80
80
  "footer",
81
81
  "showCancel",
82
82
  "showOk",
83
- "okLoading",
83
+ "confirmLoading",
84
84
  "okButtonProps",
85
85
  "cancelButtonProps",
86
86
  "okText",
@@ -147,25 +147,26 @@ function ImmersiveDialog(props) {
147
147
  onOk == null ? void 0 : onOk(e);
148
148
  },
149
149
  type: "primary",
150
- loading: okLoading
150
+ loading: confirmLoading
151
151
  }, okButtonProps),
152
152
  _confirmText
153
153
  ) : null));
154
154
  }, [
155
+ initializing,
156
+ footer,
155
157
  footerLeftAction,
156
- _confirmText,
158
+ error,
159
+ showFooterErrorIcon,
160
+ showCancel,
157
161
  cancelButtonProps,
158
162
  _cancelText,
159
- error,
160
- footer,
163
+ showOk,
164
+ confirmLoading,
161
165
  okButtonProps,
162
- okLoading,
163
- onCancel,
164
- onOk,
166
+ _confirmText,
165
167
  popModal,
166
- showCancel,
167
- showOk,
168
- initializing
168
+ onCancel,
169
+ onOk
169
170
  ]);
170
171
  return /* @__PURE__ */ React__default.createElement(
171
172
  Modal,
@@ -0,0 +1,29 @@
1
+ import { useMemo } from 'react';
2
+ import merge from 'lodash/merge';
3
+
4
+ const PatchEnLocale = {
5
+ Modal: {
6
+ okText: "OK",
7
+ justOkText: "OK"
8
+ },
9
+ Popconfirm: {
10
+ okText: "OK"
11
+ // ← 需要修改
12
+ },
13
+ DatePicker: {
14
+ lang: {
15
+ ok: "OK"
16
+ // ← 需要修改
17
+ }
18
+ },
19
+ Calendar: {
20
+ lang: {
21
+ ok: "OK"
22
+ }
23
+ }
24
+ };
25
+ const useAntdPatchEnLocales = (enLocale) => {
26
+ return useMemo(() => merge(enLocale, PatchEnLocale), [enLocale]);
27
+ };
28
+
29
+ export { useAntdPatchEnLocales };