plain-design 1.0.0-beta.109 → 1.0.0-beta.110
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/plain-design.commonjs.min.js +2 -2
- package/dist/plain-design.min.js +2 -2
- package/dist/report.html +2 -2
- package/package.json +3 -3
- package/src/packages/components/$address/createAddressService.tsx +6 -1
- package/src/packages/components/$configuration/index.tsx +2 -2
- package/src/packages/components/ImagePreviewer/image-previewer.utils.tsx +2 -2
- package/src/packages/components/useDialog/dialog.service.utils.tsx +3 -3
- package/src/packages/components/useLoading/loading.service.utils.tsx +2 -2
- package/src/packages/components/useMessage/message.service.utils.tsx +2 -2
- package/src/packages/components/useNotice/noitice.service.utils.tsx +2 -2
- package/src/packages/i18n/i18n.utils.ts +3 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "plain-design",
|
3
|
-
"version": "1.0.0-beta.
|
3
|
+
"version": "1.0.0-beta.110",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/plain-design.min.js",
|
6
6
|
"module": "dist/plain-design.commonjs.min.js",
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"author": "",
|
20
20
|
"license": "ISC",
|
21
21
|
"peerDependencies": {
|
22
|
-
"@peryl/react-compose": "0.0.
|
22
|
+
"@peryl/react-compose": "0.0.202",
|
23
23
|
"exceljs": "^4.2.1",
|
24
24
|
"file-saver": "^2.0.5",
|
25
25
|
"react": "^18.0.1",
|
@@ -45,7 +45,7 @@
|
|
45
45
|
"@babel/preset-env": "7.23.7",
|
46
46
|
"@babel/preset-react": "7.23.3",
|
47
47
|
"@babel/preset-typescript": "7.23.3",
|
48
|
-
"@peryl/react-compose": "0.0.
|
48
|
+
"@peryl/react-compose": "0.0.203",
|
49
49
|
"@types/classnames": "^2.2.11",
|
50
50
|
"@types/react": "18.2.4",
|
51
51
|
"@types/react-dom": "18.2.4",
|
@@ -2,6 +2,7 @@ import {eAddressTypeEnum, iAddressLazyMeta, iAddressSyncMeta} from "./address.ut
|
|
2
2
|
import {defer, DFD} from "@peryl/utils/defer";
|
3
3
|
import {reactive} from "@peryl/react-compose";
|
4
4
|
import i18n from "../i18n";
|
5
|
+
import {createEffects} from "@peryl/utils/createEffects";
|
5
6
|
|
6
7
|
export function createAddressService(
|
7
8
|
config: {
|
@@ -35,6 +36,7 @@ export function createAddressService(
|
|
35
36
|
}
|
36
37
|
) {
|
37
38
|
|
39
|
+
const { effects } = createEffects();
|
38
40
|
/**
|
39
41
|
* 带缓存地通过code查询地址信息
|
40
42
|
* @author 韦胜健
|
@@ -187,7 +189,9 @@ export function createAddressService(
|
|
187
189
|
* @author 韦胜健
|
188
190
|
* @date 2024.6.18 15:35
|
189
191
|
*/
|
190
|
-
|
192
|
+
effects.push(
|
193
|
+
i18n.hooks.onChangeLang.use(() => clear())
|
194
|
+
);
|
191
195
|
|
192
196
|
return {
|
193
197
|
config,
|
@@ -197,6 +201,7 @@ export function createAddressService(
|
|
197
201
|
getAddress,
|
198
202
|
getAddressByCodesComputed,
|
199
203
|
clear,
|
204
|
+
dispose: effects.clear,
|
200
205
|
};
|
201
206
|
}
|
202
207
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {createHooks, inject} from "@peryl/react-compose";
|
1
|
+
import {anonymousEffects, createHooks, inject} from "@peryl/react-compose";
|
2
2
|
import {iUploadService} from "../$upload/createUploadService";
|
3
3
|
import {iHttp} from "../createHttp";
|
4
4
|
import {iAddressService} from "../$address/createAddressService";
|
@@ -22,7 +22,7 @@ export interface iConfiguration {
|
|
22
22
|
* @author 韦胜健
|
23
23
|
* @date 2022/7/13 10:56
|
24
24
|
*/
|
25
|
-
export const onInitializeConfigurationHook = createHooks<(configuration: iConfiguration) => void>();
|
25
|
+
export const onInitializeConfigurationHook = createHooks<(configuration: iConfiguration) => void>(anonymousEffects);
|
26
26
|
|
27
27
|
export const $configuration = (() => {
|
28
28
|
let _configuration: iConfiguration;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import {PartialFields} from "../../utils/type";
|
2
|
-
import {createHooks} from "@peryl/react-compose";
|
2
|
+
import {anonymousEffects, createHooks} from "@peryl/react-compose";
|
3
3
|
import {createCounter} from '@peryl/utils/createCounter';
|
4
4
|
import {notNull} from "@peryl/utils/notNull";
|
5
5
|
|
@@ -43,7 +43,7 @@ export type iImagePreviewerParamOption = string | string[] | iImagePreviewerOpti
|
|
43
43
|
|
44
44
|
export const ImagePreviewerHooks = {
|
45
45
|
/*PreviewerComponent挂载完毕事件*/
|
46
|
-
onImagePreviewerReady: createHooks<(data: { option: iImagePreviewerOption }) => void>()
|
46
|
+
onImagePreviewerReady: createHooks<(data: { option: iImagePreviewerOption }) => void>(anonymousEffects)
|
47
47
|
};
|
48
48
|
|
49
49
|
const nextOptionId = createCounter('image_previewer');
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {createEnum} from "@peryl/utils/createEnum";
|
2
2
|
import {Dialog} from "../Dialog";
|
3
3
|
import {ThemeStatus} from "../../uses/useStyle";
|
4
|
-
import {createHooks, RenderNode} from "@peryl/react-compose";
|
4
|
+
import {anonymousEffects, createHooks, RenderNode} from "@peryl/react-compose";
|
5
5
|
import {createCounter} from "@peryl/utils/createCounter";
|
6
6
|
|
7
7
|
/**
|
@@ -16,14 +16,14 @@ export const nextDialogId = createCounter('dialog-service');
|
|
16
16
|
* @author 韦胜健
|
17
17
|
* @date 2022.5.4 21:45
|
18
18
|
*/
|
19
|
-
export const closeDialogServiceHook = createHooks<(id?: string) => void>();
|
19
|
+
export const closeDialogServiceHook = createHooks<(id?: string) => void>(anonymousEffects);
|
20
20
|
|
21
21
|
/**
|
22
22
|
* 销毁dialog观察者对象
|
23
23
|
* @author 韦胜健
|
24
24
|
* @date 2022.5.4 21:45
|
25
25
|
*/
|
26
|
-
export const destroyDialogServiceHook = createHooks<(option: any) => void>();
|
26
|
+
export const destroyDialogServiceHook = createHooks<(option: any) => void>(anonymousEffects);
|
27
27
|
|
28
28
|
/**
|
29
29
|
* 弹框服务编辑框类型
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import {ThemeStatus} from "../../uses/useStyle";
|
2
|
-
import {createHooks} from "@peryl/react-compose";
|
2
|
+
import {anonymousEffects, createHooks} from "@peryl/react-compose";
|
3
3
|
|
4
4
|
export interface iLoadingServiceOption {
|
5
5
|
id?: string,
|
@@ -10,4 +10,4 @@ export interface iLoadingServiceOption {
|
|
10
10
|
onClose?: () => void,
|
11
11
|
}
|
12
12
|
|
13
|
-
export const closeLoadingServiceHook = createHooks<(id?: string) => void>();
|
13
|
+
export const closeLoadingServiceHook = createHooks<(id?: string) => void>(anonymousEffects);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import {createEnum} from "@peryl/utils/createEnum";
|
2
2
|
import {ThemeStatus} from "../../uses/useStyle";
|
3
|
-
import {createHooks, iMouseEvent, RenderNode} from "@peryl/react-compose";
|
3
|
+
import {anonymousEffects, createHooks, iMouseEvent, RenderNode} from "@peryl/react-compose";
|
4
4
|
import {createCounter} from "@peryl/utils/createCounter";
|
5
5
|
|
6
6
|
/**
|
@@ -22,7 +22,7 @@ export const nextMessageId = createCounter('message-service');
|
|
22
22
|
* @author 韦胜健
|
23
23
|
* @date 2022.5.4 22:32
|
24
24
|
*/
|
25
|
-
export const closeMessageServiceHook = createHooks<(id: string) => void>();
|
25
|
+
export const closeMessageServiceHook = createHooks<(id: string) => void>(anonymousEffects);
|
26
26
|
|
27
27
|
/**
|
28
28
|
* 消息提示服务对象参数类型
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import {createEnum} from "@peryl/utils/createEnum";
|
2
2
|
import {ThemeStatus} from "../../uses/useStyle";
|
3
|
-
import {createHooks, RenderNode, SimpleFunction} from "@peryl/react-compose";
|
3
|
+
import {anonymousEffects, createHooks, RenderNode, SimpleFunction} from "@peryl/react-compose";
|
4
4
|
import {createCounter} from "@peryl/utils/createCounter";
|
5
5
|
|
6
6
|
/**
|
@@ -22,7 +22,7 @@ export const nextNoticeId = createCounter('notice-service');
|
|
22
22
|
* @author 韦胜健
|
23
23
|
* @date 2022.5.6 18:53
|
24
24
|
*/
|
25
|
-
export const closeNoticeServiceHook = createHooks<(id?: null | string) => void>();
|
25
|
+
export const closeNoticeServiceHook = createHooks<(id?: null | string) => void>(anonymousEffects);
|
26
26
|
|
27
27
|
/**
|
28
28
|
* 消息通知服务配置对象类型
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import {anonymousEffects, createHooks, reactive} from "@peryl/react-compose";
|
2
2
|
import {ZhCnLocale} from './lang/zh-cn';
|
3
3
|
import {deepmerge} from "../components/PageThemeUtils/deepmerge";
|
4
4
|
import {PlainObject} from "@peryl/utils/event";
|
@@ -51,8 +51,8 @@ export const i18n = (() => {
|
|
51
51
|
});
|
52
52
|
|
53
53
|
const hooks = {
|
54
|
-
onChangeLang:
|
55
|
-
onUpdateLangs:
|
54
|
+
onChangeLang: createHooks<() => void>(anonymousEffects),
|
55
|
+
onUpdateLangs: createHooks<() => void>(anonymousEffects)
|
56
56
|
};
|
57
57
|
|
58
58
|
/**
|