@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/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 };
@@ -1 +1,2 @@
1
1
  export { AuthGuard } from './auth-guard/auth-guard';
2
+ export { AuthGuardHooks } from './auth-guard-hooks';
@@ -1,3 +1,4 @@
1
1
  export { AuthGuard } from './auth-guard/auth-guard.mjs';
2
+ export { AuthGuardHooks } from './auth-guard-hooks.mjs';
2
3
 
3
4
  "use strict";
@@ -1 +1,2 @@
1
1
  export { runApp } from './main';
2
+ export { AuthGuardHooks } from './guard';
@@ -1,3 +1,5 @@
1
1
  export { runApp } from './main.mjs';
2
+ import './guard/index.mjs';
3
+ export { AuthGuardHooks } from './guard/auth-guard-hooks.mjs';
2
4
 
3
5
  "use strict";
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;
@@ -1,7 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var authGuard = require('./auth-guard/auth-guard.cjs');
4
+ var authGuardHooks = require('./auth-guard-hooks.cjs');
4
5
 
5
6
  "use strict";
6
7
 
7
8
  exports.AuthGuard = authGuard.AuthGuard;
9
+ exports.AuthGuardHooks = authGuardHooks.AuthGuardHooks;
@@ -1,7 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var main = require('./main.cjs');
4
+ require('./guard/index.cjs');
5
+ var authGuardHooks = require('./guard/auth-guard-hooks.cjs');
4
6
 
5
7
  "use strict";
6
8
 
7
9
  exports.runApp = main.runApp;
10
+ exports.AuthGuardHooks = authGuardHooks.AuthGuardHooks;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/mob-vue3-components",
3
- "version": "0.0.15",
3
+ "version": "0.0.16-dev.0",
4
4
  "description": "使用 rollup 编译 vue 组件或者 jsx",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",