@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.
- package/dist/cjs/core/ConfigProvider/index.js +3 -1
- package/dist/cjs/core/Fields/FieldsTimePicker/index.js +4 -3
- package/dist/cjs/core/ImmersiveDialog/index.js +13 -12
- package/dist/cjs/hooks/useAntdPatchEnLocales.js +35 -0
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +3102 -3102
- package/dist/esm/core/ConfigProvider/index.js +3 -1
- package/dist/esm/core/Fields/FieldsTimePicker/index.js +2 -1
- package/dist/esm/core/ImmersiveDialog/index.js +13 -12
- package/dist/esm/hooks/useAntdPatchEnLocales.js +29 -0
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +4197 -4197
- package/dist/src/core/ImmersiveDialog/type.d.ts +0 -2
- package/dist/src/hooks/useAntdPatchEnLocales.d.ts +431 -0
- package/dist/stories/docs/core/ImmersiveDialog.stories.d.ts +0 -1
- package/dist/stories/docs/core/WizardDialog.stories.d.ts +0 -1
- package/dist/style.css +3102 -3102
- package/package.json +4 -4
|
@@ -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 :
|
|
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(
|
|
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
|
-
|
|
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
|
-
"
|
|
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:
|
|
150
|
+
loading: confirmLoading
|
|
151
151
|
}, okButtonProps),
|
|
152
152
|
_confirmText
|
|
153
153
|
) : null));
|
|
154
154
|
}, [
|
|
155
|
+
initializing,
|
|
156
|
+
footer,
|
|
155
157
|
footerLeftAction,
|
|
156
|
-
|
|
158
|
+
error,
|
|
159
|
+
showFooterErrorIcon,
|
|
160
|
+
showCancel,
|
|
157
161
|
cancelButtonProps,
|
|
158
162
|
_cancelText,
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
showOk,
|
|
164
|
+
confirmLoading,
|
|
161
165
|
okButtonProps,
|
|
162
|
-
|
|
163
|
-
onCancel,
|
|
164
|
-
onOk,
|
|
166
|
+
_confirmText,
|
|
165
167
|
popModal,
|
|
166
|
-
|
|
167
|
-
|
|
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 };
|