easy-soft-dva 3.6.6 → 3.6.7
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/es/index.js +1 -1
- package/es/utils/dvaAssist.d.ts +9 -0
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as
|
|
1
|
+
import{_ as e}from"./regeneratorRuntime.js";import{checkStringIsNullOrWhiteSpace as t,displayTextMessage as a,isNumber as r,logWarn as o,toNumber as n,logExecute as c,logError as i,isUndefined as l,isString as s,setCache as u,logDebug as d,isFunction as p}from"easy-soft-utility";import{create as f}from"./dva-core/index.js";export{Provider,connect}from"./dva-core/index.js";import{createLoading as m}from"./dva-loading/index.js";import"invariant";import"react-redux";import"redux";import"redux-saga";import"is-plain-object";import"flatten";import"@reduxjs/toolkit";import"warning";var C="easy-soft-dva";function v(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"".concat(C,"::").concat(e,"::").concat(t(a)?"":a)}var h="stateAssist";function g(){if(!x.defaultCodeSetComplete&&!x.defaultCodePromptSetInformationComplete){var e="".concat(v(h),"logData -> logger display switch default is false, if want to display log, please set it before first log, use setLoggerDisplaySwitch to set it, this message only show once.");a({text:e,color:"#08BBEE",dataDescription:"hint",ancillaryInformation:""});try{throw new Error("please set use setStateDefaultCode")}catch(e){console.error(e)}x.defaultCodePromptSetInformationComplete=!0}return x.defaultCode}var x={defaultCodePromptSetInformationComplete:!1,defaultCodeSetComplete:!1,defaultCode:200};function y(e){r(e)||o("".concat(v(h),"setStateDefaultCode -> code must be number")),x.defaultCode=n(e)}var S={prepareCallback:function(){},setPrepareComplete:!1,prepareExecuteComplete:!1};function D(){S.prepareExecuteComplete||(p(S.prepareCallback)&&S.prepareCallback(),S.prepareExecuteComplete=!0)}function b(e){S.prepareCallback=e}var k,E,w,j;function P(e){return D(),c(v("dvaAssist","createApp")),(k=f(e)).use(m({})),j||e.models.forEach((function(e){return k.model(e)})),j=!0,k.start(),E=k._store,k.getStore=function(){return E},k.use({onError:function(e){i(e)}}),w=E.dispatch,k.dispatch=w,k}var I={reducerData:"reducerData"};function _(t,a,r){D();var o=e(e({},{callback:null,pretreatment:null,alias:null,cacheData:!1}),a),n=o.payload,c=o.alias,i=o.cacheData,p=null;if(l(c)||!s(c)?p=e(e({},t),{},{data:n,fromRemote:!0}):(p=e(e({},t),{},{fromRemote:!0}))[c]=n,i){var f="".concat(r,"_").concat(c||"data"),m=u({key:f,value:n});d("modal ".concat(r," cache data, key is ").concat(r,"_").concat(c||"data",", ").concat(m?"cache success":"cache fail","."))}return p}var A={reducerData:function(e,t,a){return _(e,t,a)}};function R(e){return D(),P({initialState:{},models:e}).getStore()}function B(){return D(),{data:{code:g(),message:"success",dataSuccess:!0,data:{},list:[],extra:{}}}}var L={cacheData:!1},q={callback:null,pretreatment:null};function z(){return D(),k.dispatch}export{P as createApp,g as getDefaultCode,z as getDispatchWrapper,R as getStore,B as getTacitlyState,q as handleDefaultParams,S as preparationWork,A as reducerCollection,_ as reducerDataAssist,L as reducerDefaultParams,I as reducerNameCollection,b as setPrepareCallback,y as setStateDefaultCode,x as stateConfigure};
|
package/es/utils/dvaAssist.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set the open message display monitor
|
|
3
|
+
*/
|
|
4
|
+
export function setPrepareCallback(callback: any): void;
|
|
1
5
|
export function createApp(opt: any): {
|
|
2
6
|
_models: any[];
|
|
3
7
|
_store: null;
|
|
@@ -22,6 +26,11 @@ export function getTacitlyState(): {
|
|
|
22
26
|
};
|
|
23
27
|
};
|
|
24
28
|
export function getDispatchWrapper(): any;
|
|
29
|
+
export namespace preparationWork {
|
|
30
|
+
function prepareCallback(): void;
|
|
31
|
+
const setPrepareComplete: boolean;
|
|
32
|
+
const prepareExecuteComplete: boolean;
|
|
33
|
+
}
|
|
25
34
|
export namespace reducerNameCollection {
|
|
26
35
|
const reducerData: string;
|
|
27
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy-soft-dva",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.7",
|
|
4
4
|
"description": "The core lightweight library for dva, based on redux and redux-saga.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"redux": "4.x"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "fbceddc1b993e3b62d8cce9a3bbea07e3d1e510e"
|
|
95
95
|
}
|