@ibiz-template/mob-vue3-components 0.7.41-alpha.8 → 0.7.41-alpha.9

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.
Files changed (32) hide show
  1. package/dist/{index-xh-oAbbH.js → index-m5kpisiW.js} +10 -10
  2. package/dist/index-m5kpisiW.js.map +1 -0
  3. package/dist/index.min.css +9 -9
  4. package/dist/index.system.min.js +1 -1
  5. package/dist/{quill-editor-preview-Afg5ZCWy.js → quill-editor-preview-4GJgBqkz.js} +2 -2
  6. package/dist/{quill-editor-preview-Afg5ZCWy.js.map → quill-editor-preview-4GJgBqkz.js.map} +1 -1
  7. package/dist/{quill-editor-8Y2QTf1T.js → quill-editor-wtClM5Dv.js} +2 -2
  8. package/dist/{quill-editor-8Y2QTf1T.js.map → quill-editor-wtClM5Dv.js.map} +1 -1
  9. package/dist/{quill-sc_3kAlj.js → quill-fQu2PNuh.js} +2 -2
  10. package/dist/{quill-sc_3kAlj.js.map → quill-fQu2PNuh.js.map} +1 -1
  11. package/es/_virtual/index12.mjs +2 -2
  12. package/es/_virtual/index13.mjs +2 -2
  13. package/es/_virtual/index17.mjs +2 -2
  14. package/es/_virtual/index18.mjs +2 -2
  15. package/es/mob-app/guard/auth-guard/auth-guard.mjs +23 -12
  16. package/es/mob-app/util/unauthorized-handler/unauthorized-handler.mjs +3 -0
  17. package/es/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.mjs +1 -1
  18. package/es/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.mjs +1 -1
  19. package/es/node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.mjs +1 -1
  20. package/es/node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.mjs +1 -1
  21. package/lib/_virtual/index12.cjs +2 -2
  22. package/lib/_virtual/index13.cjs +2 -2
  23. package/lib/_virtual/index17.cjs +2 -2
  24. package/lib/_virtual/index18.cjs +2 -2
  25. package/lib/mob-app/guard/auth-guard/auth-guard.cjs +22 -11
  26. package/lib/mob-app/util/unauthorized-handler/unauthorized-handler.cjs +3 -0
  27. package/lib/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/packages/frame-talk-client-pc/index.cjs +1 -1
  28. package/lib/node_modules/.pnpm/dingtalk-jsapi@3.0.38/node_modules/dingtalk-jsapi/lib/sdk/middlewares/index.cjs +1 -1
  29. package/lib/node_modules/.pnpm/lodash.clonedeep@4.5.0/node_modules/lodash.clonedeep/index.cjs +1 -1
  30. package/lib/node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.cjs +1 -1
  31. package/package.json +1 -1
  32. package/dist/index-xh-oAbbH.js.map +0 -1
@@ -1,3 +1,3 @@
1
- var frameTalkClientPc = {exports: {}};
1
+ var middlewares = {};
2
2
 
3
- export { frameTalkClientPc as __module };
3
+ export { middlewares as __exports };
@@ -1,3 +1,3 @@
1
- var middlewares = {};
1
+ var frameTalkClientPc = {exports: {}};
2
2
 
3
- export { middlewares as __exports };
3
+ export { frameTalkClientPc as __module };
@@ -1,3 +1,3 @@
1
- var lodash_isequal = {exports: {}};
1
+ var lodash_clonedeep = {exports: {}};
2
2
 
3
- export { lodash_isequal as __module };
3
+ export { lodash_clonedeep as __module };
@@ -1,3 +1,3 @@
1
- var lodash_clonedeep = {exports: {}};
1
+ var lodash_isequal = {exports: {}};
2
2
 
3
- export { lodash_clonedeep as __module };
3
+ export { lodash_isequal as __module };
@@ -1,4 +1,4 @@
1
- import { HttpError, CoreConst, getAppCookie, RuntimeError } from '@ibiz-template/core';
1
+ import { HttpError, CoreConst, getAppCookie } from '@ibiz-template/core';
2
2
  import { ModelHelper } from '@ibiz-template/model-helper';
3
3
  import { mergeDeepRight } from 'ramda';
4
4
  import { AppHooks } from '@ibiz-template/vue3-util';
@@ -149,6 +149,7 @@ async function anonymousValidate(context) {
149
149
  if (authInfo && !authInfo.isAnonymous) {
150
150
  try {
151
151
  await appInit(context);
152
+ return;
152
153
  } catch (error) {
153
154
  const { status } = error;
154
155
  if (status === 401) {
@@ -172,7 +173,8 @@ async function anonymousValidate(context) {
172
173
  if (status === 401) {
173
174
  const loginResult = await ibiz.auth.anonymousLogin();
174
175
  if (!loginResult) {
175
- throw new RuntimeError(ibiz.i18n.t("mobApp.authGuard.loginFailed"));
176
+ throw401();
177
+ return;
176
178
  }
177
179
  await appInit(context);
178
180
  } else {
@@ -180,7 +182,14 @@ async function anonymousValidate(context) {
180
182
  }
181
183
  }
182
184
  }
183
- await initModel(context, false);
185
+ if (!authInfo || !authInfo.token) {
186
+ const loginResult = await ibiz.auth.anonymousLogin();
187
+ if (!loginResult) {
188
+ throw401();
189
+ return;
190
+ }
191
+ await appInit(context);
192
+ }
184
193
  const urlPaths = window.location.hash.split("/");
185
194
  const viewName = urlPaths[urlPaths.length - 2];
186
195
  let viewModel;
@@ -202,15 +211,7 @@ async function anonymousValidate(context) {
202
211
  }
203
212
  if (viewModel.accUserMode !== 3) {
204
213
  throw401();
205
- return;
206
214
  }
207
- if (!authInfo) {
208
- const loginResult = await ibiz.auth.anonymousLogin();
209
- if (!loginResult) {
210
- throw new RuntimeError(ibiz.i18n.t("mobApp.authGuard.loginFailed"));
211
- }
212
- }
213
- await appInit(context);
214
215
  }
215
216
  async function AuthGuard(appContext, permission = true) {
216
217
  if (permission) {
@@ -228,7 +229,17 @@ async function AuthGuard(appContext, permission = true) {
228
229
  }
229
230
  return result;
230
231
  }
231
- await initModel(appContext, false);
232
+ if (ibiz.env.enableAnonymous) {
233
+ try {
234
+ await anonymousValidate(appContext);
235
+ } catch (error) {
236
+ error.tag = "APPINIT";
237
+ ibiz.util.error.handle(error);
238
+ return false;
239
+ }
240
+ } else {
241
+ await initModel(appContext, false);
242
+ }
232
243
  return true;
233
244
  }
234
245
 
@@ -82,6 +82,9 @@ class UnauthorizedHandler {
82
82
  */
83
83
  async normalLogin() {
84
84
  const ru = window.location.hash.replace("#", "");
85
+ if (ru.startsWith("/login")) {
86
+ return;
87
+ }
85
88
  const targetUrl = `${UrlHelper.routeBase}/login?ru=${encodeURIComponent(
86
89
  ru
87
90
  )}`;
@@ -1,5 +1,5 @@
1
1
  import { commonjsGlobal } from '../../../../../../../../_virtual/_commonjsHelpers.mjs';
2
- import { __module as frameTalkClientPc$1 } from '../../../../../../../../_virtual/index12.mjs';
2
+ import { __module as frameTalkClientPc$1 } from '../../../../../../../../_virtual/index13.mjs';
3
3
 
4
4
  var frameTalkClientPc = frameTalkClientPc$1.exports;
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { commonjsGlobal } from '../../../../../../../../_virtual/_commonjsHelpers.mjs';
2
- import { __exports as middlewares } from '../../../../../../../../_virtual/index13.mjs';
2
+ import { __exports as middlewares } from '../../../../../../../../_virtual/index12.mjs';
3
3
  import '../../../../../../../../_virtual/bridge.mjs';
4
4
  import { __require as requireRetry } from './retry.mjs';
5
5
  import '../../../../../../../../_virtual/dealParamsAndResult.mjs';
@@ -1,5 +1,5 @@
1
1
  import { commonjsGlobal, getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.mjs';
2
- import { __module as lodash_clonedeep$1 } from '../../../../../_virtual/index18.mjs';
2
+ import { __module as lodash_clonedeep$1 } from '../../../../../_virtual/index17.mjs';
3
3
 
4
4
  /**
5
5
  * lodash (Custom Build) <https://lodash.com/>
@@ -1,5 +1,5 @@
1
1
  import { commonjsGlobal, getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.mjs';
2
- import { __module as lodash_isequal$1 } from '../../../../../_virtual/index17.mjs';
2
+ import { __module as lodash_isequal$1 } from '../../../../../_virtual/index18.mjs';
3
3
 
4
4
  /**
5
5
  * Lodash (Custom Build) <https://lodash.com/>
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var frameTalkClientPc = {exports: {}};
3
+ var middlewares = {};
4
4
 
5
- exports.__module = frameTalkClientPc;
5
+ exports.__exports = middlewares;
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var middlewares = {};
3
+ var frameTalkClientPc = {exports: {}};
4
4
 
5
- exports.__exports = middlewares;
5
+ exports.__module = frameTalkClientPc;
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var lodash_isequal = {exports: {}};
3
+ var lodash_clonedeep = {exports: {}};
4
4
 
5
- exports.__module = lodash_isequal;
5
+ exports.__module = lodash_clonedeep;
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var lodash_clonedeep = {exports: {}};
3
+ var lodash_isequal = {exports: {}};
4
4
 
5
- exports.__module = lodash_clonedeep;
5
+ exports.__module = lodash_isequal;
@@ -151,6 +151,7 @@ async function anonymousValidate(context) {
151
151
  if (authInfo && !authInfo.isAnonymous) {
152
152
  try {
153
153
  await appInit(context);
154
+ return;
154
155
  } catch (error) {
155
156
  const { status } = error;
156
157
  if (status === 401) {
@@ -174,7 +175,8 @@ async function anonymousValidate(context) {
174
175
  if (status === 401) {
175
176
  const loginResult = await ibiz.auth.anonymousLogin();
176
177
  if (!loginResult) {
177
- throw new core.RuntimeError(ibiz.i18n.t("mobApp.authGuard.loginFailed"));
178
+ throw401();
179
+ return;
178
180
  }
179
181
  await appInit(context);
180
182
  } else {
@@ -182,7 +184,14 @@ async function anonymousValidate(context) {
182
184
  }
183
185
  }
184
186
  }
185
- await initModel(context, false);
187
+ if (!authInfo || !authInfo.token) {
188
+ const loginResult = await ibiz.auth.anonymousLogin();
189
+ if (!loginResult) {
190
+ throw401();
191
+ return;
192
+ }
193
+ await appInit(context);
194
+ }
186
195
  const urlPaths = window.location.hash.split("/");
187
196
  const viewName = urlPaths[urlPaths.length - 2];
188
197
  let viewModel;
@@ -204,15 +213,7 @@ async function anonymousValidate(context) {
204
213
  }
205
214
  if (viewModel.accUserMode !== 3) {
206
215
  throw401();
207
- return;
208
216
  }
209
- if (!authInfo) {
210
- const loginResult = await ibiz.auth.anonymousLogin();
211
- if (!loginResult) {
212
- throw new core.RuntimeError(ibiz.i18n.t("mobApp.authGuard.loginFailed"));
213
- }
214
- }
215
- await appInit(context);
216
217
  }
217
218
  async function AuthGuard(appContext, permission = true) {
218
219
  if (permission) {
@@ -230,7 +231,17 @@ async function AuthGuard(appContext, permission = true) {
230
231
  }
231
232
  return result;
232
233
  }
233
- await initModel(appContext, false);
234
+ if (ibiz.env.enableAnonymous) {
235
+ try {
236
+ await anonymousValidate(appContext);
237
+ } catch (error) {
238
+ error.tag = "APPINIT";
239
+ ibiz.util.error.handle(error);
240
+ return false;
241
+ }
242
+ } else {
243
+ await initModel(appContext, false);
244
+ }
234
245
  return true;
235
246
  }
236
247
 
@@ -84,6 +84,9 @@ class UnauthorizedHandler {
84
84
  */
85
85
  async normalLogin() {
86
86
  const ru = window.location.hash.replace("#", "");
87
+ if (ru.startsWith("/login")) {
88
+ return;
89
+ }
87
90
  const targetUrl = `${core.UrlHelper.routeBase}/login?ru=${encodeURIComponent(
88
91
  ru
89
92
  )}`;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _commonjsHelpers = require('../../../../../../../../_virtual/_commonjsHelpers.cjs');
4
- var index = require('../../../../../../../../_virtual/index12.cjs');
4
+ var index = require('../../../../../../../../_virtual/index13.cjs');
5
5
 
6
6
  var frameTalkClientPc = index.__module.exports;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _commonjsHelpers = require('../../../../../../../../_virtual/_commonjsHelpers.cjs');
4
- var index = require('../../../../../../../../_virtual/index13.cjs');
4
+ var index = require('../../../../../../../../_virtual/index12.cjs');
5
5
  require('../../../../../../../../_virtual/bridge.cjs');
6
6
  var retry = require('./retry.cjs');
7
7
  require('../../../../../../../../_virtual/dealParamsAndResult.cjs');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _commonjsHelpers = require('../../../../../_virtual/_commonjsHelpers.cjs');
6
- var index$1 = require('../../../../../_virtual/index18.cjs');
6
+ var index$1 = require('../../../../../_virtual/index17.cjs');
7
7
 
8
8
  /**
9
9
  * lodash (Custom Build) <https://lodash.com/>
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _commonjsHelpers = require('../../../../../_virtual/_commonjsHelpers.cjs');
6
- var index$1 = require('../../../../../_virtual/index17.cjs');
6
+ var index$1 = require('../../../../../_virtual/index18.cjs');
7
7
 
8
8
  /**
9
9
  * Lodash (Custom Build) <https://lodash.com/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/mob-vue3-components",
3
- "version": "0.7.41-alpha.8",
3
+ "version": "0.7.41-alpha.9",
4
4
  "description": "移动端组件库(vue3)",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",