@ibiz-template/mob-vue3-components 0.0.15 → 0.0.16-dev.0
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/index.min.css +1 -1
- package/dist/index.system.min.js +2 -2
- package/dist/index.system.min.js.map +1 -1
- package/es/index.mjs +1 -0
- package/es/mob-app/guard/auth-guard/auth-guard.mjs +3 -0
- package/es/mob-app/guard/auth-guard-hooks.d.ts +19 -0
- package/es/mob-app/guard/auth-guard-hooks.mjs +29 -0
- package/es/mob-app/guard/index.d.ts +1 -0
- package/es/mob-app/guard/index.mjs +1 -0
- package/es/mob-app/index.d.ts +1 -0
- package/es/mob-app/index.mjs +2 -0
- package/lib/index.cjs +2 -0
- package/lib/mob-app/guard/auth-guard/auth-guard.cjs +3 -0
- package/lib/mob-app/guard/auth-guard-hooks.cjs +31 -0
- package/lib/mob-app/guard/index.cjs +2 -0
- package/lib/mob-app/index.cjs +3 -0
- package/package.json +1 -1
package/es/index.mjs
CHANGED
|
@@ -154,5 +154,6 @@ export { loadingDirective } from './util/directive/loading.mjs';
|
|
|
154
154
|
export { ConfirmUtil } from './util/confirm-util/confirm-util.mjs';
|
|
155
155
|
export { calcUniqueKey, useViewStack } from './util/store/view-stack/view-stack.mjs';
|
|
156
156
|
export { runApp } from './mob-app/main.mjs';
|
|
157
|
+
export { AuthGuardHooks } from './mob-app/guard/auth-guard-hooks.mjs';
|
|
157
158
|
|
|
158
159
|
"use strict";
|
|
@@ -4,6 +4,7 @@ import { ModelHelper } from '@ibiz-template/model-helper';
|
|
|
4
4
|
import { mergeDeepRight } from 'ramda';
|
|
5
5
|
import { AppHooks } from '@ibiz-template/vue3-util';
|
|
6
6
|
import { i18n } from '../../../locale/index.mjs';
|
|
7
|
+
import { AuthGuardHooks } from '../auth-guard-hooks.mjs';
|
|
7
8
|
|
|
8
9
|
"use strict";
|
|
9
10
|
async function loadAppData() {
|
|
@@ -115,10 +116,12 @@ async function initEnvironment() {
|
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
async function appInit() {
|
|
119
|
+
await AuthGuardHooks.beforeAuth.call(null, null);
|
|
118
120
|
if (ibiz.env.isSaaSMode === true) {
|
|
119
121
|
await loadOrgData();
|
|
120
122
|
}
|
|
121
123
|
await loadAppData();
|
|
124
|
+
await AuthGuardHooks.afterAuth.call(null, null);
|
|
122
125
|
await initModel();
|
|
123
126
|
await initEnvironment();
|
|
124
127
|
setRefreshToken();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AsyncSeriesHook } from 'qx-util';
|
|
2
|
+
export declare class AuthGuardHooks {
|
|
3
|
+
/**
|
|
4
|
+
* 认证前
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2024-03-13 14:03:34
|
|
8
|
+
* @type {AsyncSeriesHook<null>}
|
|
9
|
+
*/
|
|
10
|
+
static beforeAuth: AsyncSeriesHook<null>;
|
|
11
|
+
/**
|
|
12
|
+
* 认证后
|
|
13
|
+
*
|
|
14
|
+
* @author chitanda
|
|
15
|
+
* @date 2024-03-13 14:03:52
|
|
16
|
+
* @type {AsyncSeriesHook<null>}
|
|
17
|
+
*/
|
|
18
|
+
static afterAuth: AsyncSeriesHook<null>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AsyncSeriesHook } from 'qx-util';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __publicField = (obj, key, value) => {
|
|
7
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
+
return value;
|
|
9
|
+
};
|
|
10
|
+
class AuthGuardHooks {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 认证前
|
|
14
|
+
*
|
|
15
|
+
* @author chitanda
|
|
16
|
+
* @date 2024-03-13 14:03:34
|
|
17
|
+
* @type {AsyncSeriesHook<null>}
|
|
18
|
+
*/
|
|
19
|
+
__publicField(AuthGuardHooks, "beforeAuth", new AsyncSeriesHook());
|
|
20
|
+
/**
|
|
21
|
+
* 认证后
|
|
22
|
+
*
|
|
23
|
+
* @author chitanda
|
|
24
|
+
* @date 2024-03-13 14:03:52
|
|
25
|
+
* @type {AsyncSeriesHook<null>}
|
|
26
|
+
*/
|
|
27
|
+
__publicField(AuthGuardHooks, "afterAuth", new AsyncSeriesHook());
|
|
28
|
+
|
|
29
|
+
export { AuthGuardHooks };
|
package/es/mob-app/index.d.ts
CHANGED
package/es/mob-app/index.mjs
CHANGED
package/lib/index.cjs
CHANGED
|
@@ -156,6 +156,7 @@ var loading = require('./util/directive/loading.cjs');
|
|
|
156
156
|
var confirmUtil = require('./util/confirm-util/confirm-util.cjs');
|
|
157
157
|
var viewStack = require('./util/store/view-stack/view-stack.cjs');
|
|
158
158
|
var main = require('./mob-app/main.cjs');
|
|
159
|
+
var authGuardHooks = require('./mob-app/guard/auth-guard-hooks.cjs');
|
|
159
160
|
|
|
160
161
|
"use strict";
|
|
161
162
|
|
|
@@ -321,3 +322,4 @@ exports.ConfirmUtil = confirmUtil.ConfirmUtil;
|
|
|
321
322
|
exports.calcUniqueKey = viewStack.calcUniqueKey;
|
|
322
323
|
exports.useViewStack = viewStack.useViewStack;
|
|
323
324
|
exports.runApp = main.runApp;
|
|
325
|
+
exports.AuthGuardHooks = authGuardHooks.AuthGuardHooks;
|
|
@@ -6,6 +6,7 @@ var modelHelper = require('@ibiz-template/model-helper');
|
|
|
6
6
|
var ramda = require('ramda');
|
|
7
7
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
8
8
|
var index = require('../../../locale/index.cjs');
|
|
9
|
+
var authGuardHooks = require('../auth-guard-hooks.cjs');
|
|
9
10
|
|
|
10
11
|
"use strict";
|
|
11
12
|
async function loadAppData() {
|
|
@@ -117,10 +118,12 @@ async function initEnvironment() {
|
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
120
|
async function appInit() {
|
|
121
|
+
await authGuardHooks.AuthGuardHooks.beforeAuth.call(null, null);
|
|
120
122
|
if (ibiz.env.isSaaSMode === true) {
|
|
121
123
|
await loadOrgData();
|
|
122
124
|
}
|
|
123
125
|
await loadAppData();
|
|
126
|
+
await authGuardHooks.AuthGuardHooks.afterAuth.call(null, null);
|
|
124
127
|
await initModel();
|
|
125
128
|
await initEnvironment();
|
|
126
129
|
setRefreshToken();
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var qxUtil = require('qx-util');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
class AuthGuardHooks {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 认证前
|
|
16
|
+
*
|
|
17
|
+
* @author chitanda
|
|
18
|
+
* @date 2024-03-13 14:03:34
|
|
19
|
+
* @type {AsyncSeriesHook<null>}
|
|
20
|
+
*/
|
|
21
|
+
__publicField(AuthGuardHooks, "beforeAuth", new qxUtil.AsyncSeriesHook());
|
|
22
|
+
/**
|
|
23
|
+
* 认证后
|
|
24
|
+
*
|
|
25
|
+
* @author chitanda
|
|
26
|
+
* @date 2024-03-13 14:03:52
|
|
27
|
+
* @type {AsyncSeriesHook<null>}
|
|
28
|
+
*/
|
|
29
|
+
__publicField(AuthGuardHooks, "afterAuth", new qxUtil.AsyncSeriesHook());
|
|
30
|
+
|
|
31
|
+
exports.AuthGuardHooks = AuthGuardHooks;
|
package/lib/mob-app/index.cjs
CHANGED