easy-soft-dva 3.9.17 → 3.9.19

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.
@@ -1 +1 @@
1
- export default function checkModel(model: any, existModels: any): void;
1
+ export default function checkModel(model: any, existModels: any): void;
@@ -1 +1 @@
1
- export const NAMESPACE_SEP: "/";
1
+ export const NAMESPACE_SEP: "/";
@@ -1 +1 @@
1
- export default function createPromiseMiddleware(app: any): () => (next: any) => (action: any) => any;
1
+ export default function createPromiseMiddleware(app: any): () => (next: any) => (action: any) => any;
@@ -1,10 +1,10 @@
1
- export default function _default({ reducers, initialState, plugin, sagaMiddleware, promiseMiddleware, createOpts: { setupMiddleWares }, }: {
2
- reducers: any;
3
- initialState: any;
4
- plugin: any;
5
- sagaMiddleware: any;
6
- promiseMiddleware: any;
7
- createOpts: {
8
- setupMiddleWares?: ((m: any) => any) | undefined;
9
- };
10
- }): import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<any, import("redux").AnyAction, any>;
1
+ export default function _default({ reducers, initialState, plugin, sagaMiddleware, promiseMiddleware, createOpts: { setupMiddleWares }, }: {
2
+ reducers: any;
3
+ initialState: any;
4
+ plugin: any;
5
+ sagaMiddleware: any;
6
+ promiseMiddleware: any;
7
+ createOpts: {
8
+ setupMiddleWares?: ((m: any) => any) | undefined;
9
+ };
10
+ }): import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<any, import("redux").AnyAction, any>;
@@ -1 +1 @@
1
- export default function getReducer(reducers: any, state: any, handleActions: any, namespace: any): any;
1
+ export default function getReducer(reducers: any, state: any, handleActions: any, namespace: any): any;
@@ -1,2 +1,2 @@
1
- export default function getSaga(effects: any, model: any, onError: any, onEffect: any, options?: {}): () => Generator<sagaEffects.ForkEffect<void>, void, unknown>;
2
- import * as sagaEffects from "redux-saga/effects";
1
+ export default function getSaga(effects: any, model: any, onError: any, onEffect: any, options?: {}): () => Generator<sagaEffects.ForkEffect<void>, void, unknown>;
2
+ import * as sagaEffects from 'redux-saga/effects';
@@ -1,2 +1,2 @@
1
- export default handleActions;
2
- declare function handleActions(handlers: any, defaultState: any, namespace: any): (state: any, action: any) => any;
1
+ export default handleActions;
2
+ declare function handleActions(handlers: any, defaultState: any, namespace: any): (state: any, action: any) => any;
@@ -1,17 +1,17 @@
1
- /**
2
- * Create dva-core instance.
3
- * @param {Object} hooksAndOptions
4
- * @param {Object} createOptions
5
- */
6
- export function create(hooksAndOptions?: Object, createOptions?: Object): {
7
- _models: any[];
8
- _store: null;
9
- _plugin: Plugin;
10
- use: (plugin: any) => void;
11
- model: (m: Object) => any;
12
- start: () => void;
13
- };
14
- export * as utils from "./utils";
15
- export * as saga from "redux-saga";
16
- import Plugin from "./plugin";
17
- export { connect, Provider } from "react-redux";
1
+ /**
2
+ * Create dva-core instance.
3
+ * @param {Object} hooksAndOptions
4
+ * @param {Object} createOptions
5
+ */
6
+ export function create(hooksAndOptions?: Object, createOptions?: Object): {
7
+ _models: any[];
8
+ _store: null;
9
+ _plugin: Plugin;
10
+ use: (plugin: any) => void;
11
+ model: (m: Object) => any;
12
+ start: () => void;
13
+ };
14
+ export * as utils from "./utils";
15
+ export * as saga from "redux-saga";
16
+ import Plugin from './plugin';
17
+ export { connect, Provider } from "react-redux";
@@ -1,8 +1,8 @@
1
- export function filterHooks(object: any): {};
2
- export default class Plugin {
3
- _handleActions: any;
4
- hooks: {};
5
- use(plugin: any): void;
6
- apply(key: any, defaultHandler: any): (...arguments_: any[]) => void;
7
- get(key: any): any;
8
- }
1
+ export function filterHooks(object: any): {};
2
+ export default class Plugin {
3
+ _handleActions: any;
4
+ hooks: {};
5
+ use(plugin: any): void;
6
+ apply(key: any, defaultHandler: any): (...arguments_: any[]) => void;
7
+ get(key: any): any;
8
+ }
@@ -1 +1 @@
1
- export default function prefixNamespace(model: any): any;
1
+ export default function prefixNamespace(model: any): any;
@@ -1 +1 @@
1
- export default function prefixType(type: any, model: any): any;
1
+ export default function prefixType(type: any, model: any): any;
@@ -1 +1 @@
1
- export default function prefixedDispatch(dispatch: any, model: any): (action: any) => any;
1
+ export default function prefixedDispatch(dispatch: any, model: any): (action: any) => any;
@@ -1,5 +1,5 @@
1
- export function run(subs: any, model: any, app: any, onError: any): {
2
- funcs: any[];
3
- nonFuncs: string[];
4
- };
5
- export function unListen(unListeners: any, namespace: any): void;
1
+ export function run(subs: any, model: any, app: any, onError: any): {
2
+ funcs: any[];
3
+ nonFuncs: string[];
4
+ };
5
+ export function unListen(unListeners: any, namespace: any): void;
@@ -1,6 +1,6 @@
1
- export const isArray: (arg: any) => arg is any[];
2
- export function isFunction(o: any): boolean;
3
- export function returnSelf(m: any): any;
4
- export function noop(): void;
5
- export function findIndex(array: any, predicate: any): number;
6
- export { isPlainObject } from "is-plain-object";
1
+ export const isArray: (arg: any) => arg is any[];
2
+ export function isFunction(o: any): boolean;
3
+ export function returnSelf(m: any): any;
4
+ export function noop(): void;
5
+ export function findIndex(array: any, predicate: any): number;
6
+ export { isPlainObject } from "is-plain-object";
@@ -1,23 +1,23 @@
1
- export function createLoading(options?: {}): {
2
- extraReducers: {
3
- [x: number]: (state: {
4
- global: boolean;
5
- models: {};
6
- effects: {};
7
- } | undefined, { type, payload }: {
8
- type: any;
9
- payload: any;
10
- }) => {
11
- global: boolean;
12
- models: {};
13
- effects: {};
14
- };
15
- };
16
- onEffect: (effect: any, { put }: {
17
- put: any;
18
- }, model: any, actionType: any) => any;
19
- };
20
- /**
21
- * placeholder function
22
- */
23
- export function empty(): Promise<{}>;
1
+ export function createLoading(options?: {}): {
2
+ extraReducers: {
3
+ [x: number]: (state: {
4
+ global: boolean;
5
+ models: {};
6
+ effects: {};
7
+ } | undefined, { type, payload }: {
8
+ type: any;
9
+ payload: any;
10
+ }) => {
11
+ global: boolean;
12
+ models: {};
13
+ effects: {};
14
+ };
15
+ };
16
+ onEffect: (effect: any, { put }: {
17
+ put: any;
18
+ }, model: any, actionType: any) => any;
19
+ };
20
+ /**
21
+ * placeholder function
22
+ */
23
+ export function empty(): Promise<{}>;
package/es/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./utils/dvaAssist";
1
+ export * from "./utils/dvaAssist";
@@ -1,4 +1,4 @@
1
- /**
2
- * Module Package Name
3
- */
4
- export const modulePackageName: "easy-soft-dva";
1
+ /**
2
+ * Module Package Name
3
+ */
4
+ export const modulePackageName: "easy-soft-dva";
@@ -1,90 +1,90 @@
1
- /**
2
- * Set application external config list
3
- * @param {Object|Array} initialConfig application initial config
4
- */
5
- export function setApplicationInitialOption(initialConfig?: Object | any[]): void;
6
- /**
7
- * Initialize application
8
- */
9
- export function initializeApplication(): void;
10
- /**
11
- * Get dva application
12
- */
13
- export function getDvaApplication(): null;
14
- /**
15
- * Get store
16
- */
17
- export function getStore(): any;
18
- /**
19
- * Get dispatch
20
- */
21
- export function getDispatch(): any;
22
- /**
23
- * Dispatch model effect with payload and alias
24
- * @param {Object} option dispatch option
25
- * @param {string} option.type type
26
- * @param {Object} option.payload payload params, default value is {}
27
- * @param {string} option.alias data mount to state with alias key, default value is 'data'
28
- * @param {Function} option.pretreatmentSuccessCallback pretreatment data on success, default value is null
29
- * @param {Function} option.pretreatmentFailCallback pretreatment data on fail, default value is null
30
- */
31
- export function dispatch({ type, payload, alias, pretreatmentSuccessCallback, pretreatmentFailCallback, }: {
32
- type: string;
33
- payload: Object;
34
- alias: string;
35
- pretreatmentSuccessCallback: Function;
36
- pretreatmentFailCallback: Function;
37
- }): any;
38
- /**
39
- * Dispatch model effect with payload and alias
40
- * @param {Object} option dispatch option
41
- * @param {string} option.model model name
42
- * @param {string} option.effect model effect name
43
- * @param {Object} option.payload payload params, default value is {}
44
- * @param {string} option.alias data mount to state with alias key, default value is 'data'
45
- * @param {Function} option.pretreatmentSuccessCallback pretreatment data on success, default value is null
46
- * @param {Function} option.pretreatmentFailCallback pretreatment data on fail, default value is null
47
- */
48
- export function dispatchModel({ model, effect, payload, alias, pretreatmentSuccessCallback, pretreatmentFailCallback, }: {
49
- model: string;
50
- effect: string;
51
- payload: Object;
52
- alias: string;
53
- pretreatmentSuccessCallback: Function;
54
- pretreatmentFailCallback: Function;
55
- }): any;
56
- /**
57
- * Get all models
58
- */
59
- export function getAllModel(): any;
60
- /**
61
- * Get the special model
62
- * @param {string} name model name
63
- */
64
- export function getModel(name: string): any;
65
- /**
66
- * Get the special model state
67
- * @param {string} name model name
68
- */
69
- export function getModelState(name: string): any;
70
- /**
71
- * Get the special model state date, eg "model.state.data" value
72
- * @param {string} name model name
73
- */
74
- export function getModelRemoteData(name: string): any;
75
- export namespace applicationAssist {
76
- const application: null;
77
- namespace initialOption {
78
- const initialState: {};
79
- const models: never[];
80
- }
81
- const initialOptionSetComplete: boolean;
82
- const applicationInitializeComplete: boolean;
83
- }
84
- /**
85
- * Encapsulation dva Provider with store
86
- * @param {Object} properties properties
87
- */
88
- export function ApplicationProvider(properties: Object): React.JSX.Element;
89
- import React from "react";
90
- export { connect, Provider } from "../dva-core";
1
+ /**
2
+ * Set application external config list
3
+ * @param {Object|Array} initialConfig application initial config
4
+ */
5
+ export function setApplicationInitialOption(initialConfig?: Object | any[]): void;
6
+ /**
7
+ * Initialize application
8
+ */
9
+ export function initializeApplication(): void;
10
+ /**
11
+ * Get dva application
12
+ */
13
+ export function getDvaApplication(): null;
14
+ /**
15
+ * Get store
16
+ */
17
+ export function getStore(): any;
18
+ /**
19
+ * Get dispatch
20
+ */
21
+ export function getDispatch(): any;
22
+ /**
23
+ * Dispatch model effect with payload and alias
24
+ * @param {Object} option dispatch option
25
+ * @param {string} option.type type
26
+ * @param {Object} option.payload payload params, default value is {}
27
+ * @param {string} option.alias data mount to state with alias key, default value is 'data'
28
+ * @param {Function} option.pretreatmentSuccessCallback pretreatment data on success, default value is null
29
+ * @param {Function} option.pretreatmentFailCallback pretreatment data on fail, default value is null
30
+ */
31
+ export function dispatch({ type, payload, alias, pretreatmentSuccessCallback, pretreatmentFailCallback, }: {
32
+ type: string;
33
+ payload: Object;
34
+ alias: string;
35
+ pretreatmentSuccessCallback: Function;
36
+ pretreatmentFailCallback: Function;
37
+ }): any;
38
+ /**
39
+ * Dispatch model effect with payload and alias
40
+ * @param {Object} option dispatch option
41
+ * @param {string} option.model model name
42
+ * @param {string} option.effect model effect name
43
+ * @param {Object} option.payload payload params, default value is {}
44
+ * @param {string} option.alias data mount to state with alias key, default value is 'data'
45
+ * @param {Function} option.pretreatmentSuccessCallback pretreatment data on success, default value is null
46
+ * @param {Function} option.pretreatmentFailCallback pretreatment data on fail, default value is null
47
+ */
48
+ export function dispatchModel({ model, effect, payload, alias, pretreatmentSuccessCallback, pretreatmentFailCallback, }: {
49
+ model: string;
50
+ effect: string;
51
+ payload: Object;
52
+ alias: string;
53
+ pretreatmentSuccessCallback: Function;
54
+ pretreatmentFailCallback: Function;
55
+ }): any;
56
+ /**
57
+ * Get all models
58
+ */
59
+ export function getAllModel(): any;
60
+ /**
61
+ * Get the special model
62
+ * @param {string} name model name
63
+ */
64
+ export function getModel(name: string): any;
65
+ /**
66
+ * Get the special model state
67
+ * @param {string} name model name
68
+ */
69
+ export function getModelState(name: string): any;
70
+ /**
71
+ * Get the special model state date, eg "model.state.data" value
72
+ * @param {string} name model name
73
+ */
74
+ export function getModelRemoteData(name: string): any;
75
+ export namespace applicationAssist {
76
+ let application: null;
77
+ namespace initialOption {
78
+ let initialState: {};
79
+ let models: never[];
80
+ }
81
+ let initialOptionSetComplete: boolean;
82
+ let applicationInitializeComplete: boolean;
83
+ }
84
+ /**
85
+ * Encapsulation dva Provider with store
86
+ * @param {Object} properties properties
87
+ */
88
+ export function ApplicationProvider(properties: Object): React.JSX.Element;
89
+ import React from 'react';
90
+ export { connect, Provider } from "../dva-core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-soft-dva",
3
- "version": "3.9.17",
3
+ "version": "3.9.19",
4
4
  "description": "The core lightweight library for dva, based on redux and redux-saga.",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
@@ -47,9 +47,9 @@
47
47
  "z:tsc:build": "echo show tsc version and create declaration file && tsc -v && tsc -p ./tsconfig.types.json && echo declaration file generate complete"
48
48
  },
49
49
  "dependencies": {
50
- "@babel/runtime": "^7.23.1",
50
+ "@babel/runtime": "^7.23.2",
51
51
  "@reduxjs/toolkit": "^1.9.7",
52
- "easy-soft-utility": "^2.7.19",
52
+ "easy-soft-utility": "^2.7.21",
53
53
  "flatten": "^1.0.3",
54
54
  "global": "^4.4.0",
55
55
  "invariant": "^2.2.4",
@@ -62,37 +62,37 @@
62
62
  "warning": "^4.0.3"
63
63
  },
64
64
  "devDependencies": {
65
- "@babel/core": "^7.23.0",
65
+ "@babel/core": "^7.23.2",
66
66
  "@babel/eslint-parser": "^7.22.15",
67
67
  "@babel/plugin-external-helpers": "^7.22.5",
68
- "@babel/plugin-proposal-decorators": "^7.23.0",
68
+ "@babel/plugin-proposal-decorators": "^7.23.2",
69
69
  "@babel/plugin-transform-class-properties": "^7.22.5",
70
- "@babel/plugin-transform-runtime": "^7.22.15",
71
- "@babel/preset-env": "^7.22.20",
70
+ "@babel/plugin-transform-runtime": "^7.23.2",
71
+ "@babel/preset-env": "^7.23.2",
72
72
  "@babel/preset-react": "^7.22.15",
73
- "@babel/runtime": "^7.23.1",
73
+ "@babel/runtime": "^7.23.2",
74
74
  "@changesets/cli": "^2.26.2",
75
- "@commitlint/cli": "^17.7.2",
76
- "@commitlint/config-conventional": "^17.7.0",
77
- "@commitlint/config-pnpm-scopes": "^17.7.0",
78
- "@commitlint/cz-commitlint": "^17.7.2",
75
+ "@commitlint/cli": "^18.0.0",
76
+ "@commitlint/config-conventional": "^18.0.0",
77
+ "@commitlint/config-pnpm-scopes": "^18.0.0",
78
+ "@commitlint/cz-commitlint": "^18.0.0",
79
79
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
80
80
  "@rollup/plugin-alias": "^5.0.1",
81
81
  "@rollup/plugin-babel": "6.0.4",
82
82
  "@rollup/plugin-buble": "^1.0.3",
83
- "@rollup/plugin-commonjs": "^25.0.5",
83
+ "@rollup/plugin-commonjs": "^25.0.7",
84
84
  "@rollup/plugin-json": "^6.0.1",
85
85
  "@rollup/plugin-node-resolve": "^15.2.3",
86
- "@rollup/plugin-replace": "^5.0.3",
86
+ "@rollup/plugin-replace": "^5.0.4",
87
87
  "@rollup/plugin-url": "^8.0.2",
88
88
  "@svgr/rollup": "^8.1.0",
89
- "@types/fs-extra": "^11.0.2",
90
- "@types/jest": "^29.5.5",
91
- "@types/node": "^20.8.4",
92
- "@types/react": "^18.2.28",
93
- "@types/react-dom": "^18.2.13",
94
- "@types/shelljs": "^0.8.13",
95
- "@typescript-eslint/parser": "^6.7.5",
89
+ "@types/fs-extra": "^11.0.3",
90
+ "@types/jest": "^29.5.6",
91
+ "@types/node": "^20.8.8",
92
+ "@types/react": "^18.2.31",
93
+ "@types/react-dom": "^18.2.14",
94
+ "@types/shelljs": "^0.8.14",
95
+ "@typescript-eslint/parser": "^6.9.0",
96
96
  "autoprefixer": "^10.4.16",
97
97
  "babel-jest": "^29.7.0",
98
98
  "commitizen": "^4.3.0",
@@ -100,18 +100,18 @@
100
100
  "cross-env": "^7.0.3",
101
101
  "cssnano": "^6.0.1",
102
102
  "documentation": "^14.0.2",
103
- "easy-soft-develop": "^2.1.41",
104
- "eslint": "^8.51.0",
103
+ "easy-soft-develop": "^2.1.43",
104
+ "eslint": "^8.52.0",
105
105
  "eslint-config-airbnb": "^19.0.4",
106
106
  "eslint-config-airbnb-typescript": "^17.1.0",
107
107
  "eslint-config-prettier": "^9.0.0",
108
108
  "eslint-formatter-pretty": "^5.0.0",
109
109
  "eslint-import-resolver-typescript": "^3.6.1",
110
110
  "eslint-plugin-eslint-comments": "^3.2.0",
111
- "eslint-plugin-import": "^2.28.1",
112
- "eslint-plugin-jest": "^27.4.2",
111
+ "eslint-plugin-import": "^2.29.0",
112
+ "eslint-plugin-jest": "^27.4.3",
113
113
  "eslint-plugin-jsx-a11y": "^6.7.1",
114
- "eslint-plugin-prettier": "^5.0.0",
114
+ "eslint-plugin-prettier": "^5.0.1",
115
115
  "eslint-plugin-promise": "^6.1.1",
116
116
  "eslint-plugin-react": "^7.33.2",
117
117
  "eslint-plugin-react-hooks": "^4.6.0",
@@ -119,13 +119,13 @@
119
119
  "eslint-plugin-unicorn": "^48.0.1",
120
120
  "husky": "^8.0.3",
121
121
  "jest": "^29.7.0",
122
- "lint-staged": "^14.0.1",
122
+ "lint-staged": "^15.0.2",
123
123
  "mm": "^3.3.0",
124
124
  "prettier": "^3.0.3",
125
125
  "prettier-plugin-organize-imports": "^3.2.3",
126
126
  "prettier-plugin-packagejson": "^2.4.6",
127
127
  "rimraf": "^5.0.5",
128
- "rollup": "^4.0.2",
128
+ "rollup": "^4.1.4",
129
129
  "rollup-plugin-copy": "^3.5.0",
130
130
  "rollup-plugin-livereload": "^2.0.5",
131
131
  "rollup-plugin-postcss": "^4.0.2",
@@ -133,7 +133,7 @@
133
133
  "rollup-plugin-terser": "^7.0.2",
134
134
  "rollup-plugin-typescript2": "^0.36.0",
135
135
  "shelljs": "^0.8.5",
136
- "stylelint": "^15.10.3",
136
+ "stylelint": "^15.11.0",
137
137
  "stylelint-config-prettier": "^9.0.5",
138
138
  "stylelint-config-standard": "^34.0.0",
139
139
  "terminal-kit": "^3.0.1"