@ibiz-template/mob-vue3-components 0.7.41-alpha.7 → 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 (142) hide show
  1. package/dist/{index-O-XmMUt3.js → index-JSf84k9b.js} +2 -2
  2. package/dist/index-JSf84k9b.js.map +1 -0
  3. package/dist/{index-NP0RBfWK.js → index-OsiEgFnw.js} +2 -2
  4. package/dist/index-OsiEgFnw.js.map +1 -0
  5. package/dist/index-m5kpisiW.js +76 -0
  6. package/dist/index-m5kpisiW.js.map +1 -0
  7. package/dist/index.min.css +8 -8
  8. package/dist/index.system.min.js +1 -1
  9. package/dist/{quill-editor-preview-Dui7L0ne.js → quill-editor-preview-4GJgBqkz.js} +2 -2
  10. package/dist/{quill-editor-preview-Dui7L0ne.js.map → quill-editor-preview-4GJgBqkz.js.map} +1 -1
  11. package/dist/{quill-editor-BMC0diFC.js → quill-editor-wtClM5Dv.js} +2 -2
  12. package/dist/{quill-editor-BMC0diFC.js.map → quill-editor-wtClM5Dv.js.map} +1 -1
  13. package/dist/{quill-O7hIDmrl.js → quill-fQu2PNuh.js} +2 -2
  14. package/dist/{quill-O7hIDmrl.js.map → quill-fQu2PNuh.js.map} +1 -1
  15. package/es/common/button-list/button-list.d.ts +1 -0
  16. package/es/common/date-range-picker/components/range-picker/range-picker.d.ts +1 -1
  17. package/es/common/date-range-picker/date-range-picker.d.ts +2 -2
  18. package/es/common/emoji-select/components/emoji-list/emoji-list.d.ts +1 -1
  19. package/es/common/emoji-select/icons/search.d.ts +1 -0
  20. package/es/common/index.mjs +2 -1
  21. package/es/common/md-ctrl-setting/md-ctrl-setting.d.ts +3 -3
  22. package/es/control/app-menu/custom-menu-design/custom-menu-design.d.ts +1 -1
  23. package/es/control/dashboard/portlet/portlet-part/portlet-part.state.d.ts +1 -0
  24. package/es/control/dashboard/portlet/portlet-part/portlet-part.state.mjs +1 -0
  25. package/es/control/data-view/data-view.d.ts +2 -2
  26. package/es/control/data-view/data-view.mjs +2 -3
  27. package/es/control/data-view/index.d.ts +2 -2
  28. package/es/control/drbar/drbar.controller.d.ts +1 -0
  29. package/es/control/drbar/drbar.controller.mjs +3 -0
  30. package/es/control/drbar/drbar.d.ts +2 -2
  31. package/es/control/drbar/index.d.ts +2 -2
  32. package/es/control/drtab/drtab.controller.d.ts +1 -0
  33. package/es/control/drtab/drtab.controller.mjs +3 -0
  34. package/es/control/drtab/drtab.d.ts +2 -2
  35. package/es/control/drtab/index.d.ts +2 -2
  36. package/es/control/form/form-detail/form-group-panel/form-group-panel.css +1 -1
  37. package/es/control/form/form-detail/form-item/form-item-container/form-item-container.d.ts +1 -1
  38. package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.d.ts +1 -1
  39. package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.d.ts +3 -3
  40. package/es/control/list/list/index.d.ts +2 -2
  41. package/es/control/list/list/list.d.ts +2 -2
  42. package/es/control/list/list-render-util.d.ts +1 -0
  43. package/es/control/list/md-ctrl/index.d.ts +2 -2
  44. package/es/control/list/md-ctrl/md-ctrl.d.ts +2 -2
  45. package/es/control/pickup-view-panel/pickup-view-panel.controller.d.ts +2 -0
  46. package/es/control/pickup-view-panel/pickup-view-panel.controller.mjs +3 -0
  47. package/es/control/search-bar/filter-tree/filter-tree.d.ts +2 -2
  48. package/es/control/toolbar/index.d.ts +2 -2
  49. package/es/control/toolbar/popper-toolbar/popper-toolbar.d.ts +1 -1
  50. package/es/control/toolbar/toolbar.d.ts +2 -2
  51. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.d.ts +1 -1
  52. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +144 -26
  53. package/es/editor/data-picker/ibiz-picker/ibiz-picker.d.ts +2 -2
  54. package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.d.ts +2 -2
  55. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.d.ts +2 -2
  56. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.d.ts +1 -0
  57. package/es/editor/index.mjs +7 -1
  58. package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.d.ts +1 -1
  59. package/es/editor/text-box/index.d.ts +1 -0
  60. package/es/editor/text-box/index.mjs +1 -0
  61. package/es/editor/text-box/signature/signature.css +1 -0
  62. package/es/editor/text-box/signature/signature.d.ts +104 -0
  63. package/es/editor/text-box/signature/signature.mjs +256 -0
  64. package/es/editor/text-box/text-box-editor.provider.mjs +3 -0
  65. package/es/index.mjs +1 -0
  66. package/es/locale/en/index.d.ts +28 -5
  67. package/es/locale/en/index.mjs +14 -0
  68. package/es/locale/zh-CN/index.d.ts +28 -5
  69. package/es/locale/zh-CN/index.mjs +14 -0
  70. package/es/mob-app/App.mjs +17 -1
  71. package/es/mob-app/guard/auth-guard/auth-guard.mjs +95 -2
  72. package/es/mob-app/util/unauthorized-handler/unauthorized-handler.d.ts +13 -5
  73. package/es/mob-app/util/unauthorized-handler/unauthorized-handler.mjs +50 -15
  74. package/es/panel-component/auth-sso/auth-sso.css +1 -1
  75. package/es/panel-component/auth-sso/auth-sso.d.ts +8 -3
  76. package/es/panel-component/auth-sso/auth-sso.mjs +78 -6
  77. package/es/panel-component/auth-sso/index.d.ts +7 -1
  78. package/es/panel-component/user-message/index.d.ts +1 -1
  79. package/es/panel-component/user-message/user-message.d.ts +1 -1
  80. package/es/util/app-util/app-util.d.ts +59 -1
  81. package/es/util/app-util/app-util.mjs +56 -1
  82. package/es/view-engine/login-view.engine.d.ts +2 -2
  83. package/es/view-engine/login-view.engine.mjs +2 -0
  84. package/es/view-engine/mob-data-view-engine.d.ts +2 -2
  85. package/es/view-engine/mob-data-view-engine.mjs +0 -1
  86. package/es/view-engine/mob-edit-view.engine.d.ts +2 -2
  87. package/es/view-engine/mob-edit-view.engine.mjs +5 -1
  88. package/es/view-engine/mob-md-view-engine.d.ts +2 -2
  89. package/es/view-engine/mob-md-view-engine.mjs +0 -1
  90. package/es/view-engine/mob-mpickup-view-engine.d.ts +20 -14
  91. package/es/view-engine/mob-mpickup-view-engine.mjs +34 -26
  92. package/es/view-engine/mob-opt-view.engine.d.ts +2 -2
  93. package/es/view-engine/mob-pickup-md-view.engine.d.ts +2 -2
  94. package/es/view-engine/mob-pickup-md-view.engine.mjs +0 -1
  95. package/es/view-engine/mob-pickup-view.engine.d.ts +9 -2
  96. package/es/view-engine/mob-pickup-view.engine.mjs +15 -1
  97. package/es/view-engine/mob-tab-search-view.engine.d.ts +2 -2
  98. package/es/view-engine/mob-tab-search-view.engine.mjs +0 -1
  99. package/es/view-engine/mob-wf-dyna-action-view.engine.d.ts +2 -2
  100. package/es/view-engine/mob-wf-dyna-action-view.engine.mjs +0 -1
  101. package/es/view-engine/mob-wf-dyna-edit-view.engine.d.ts +2 -2
  102. package/es/view-engine/mob-wf-dyna-edit-view.engine.mjs +0 -1
  103. package/es/view-engine/mob-wf-dyna-start-view.engine.d.ts +2 -2
  104. package/es/view-engine/mob-wf-dyna-start-view.engine.mjs +0 -1
  105. package/lib/common/index.cjs +1 -0
  106. package/lib/control/dashboard/portlet/portlet-part/portlet-part.state.cjs +1 -0
  107. package/lib/control/data-view/data-view.cjs +2 -3
  108. package/lib/control/drbar/drbar.controller.cjs +3 -0
  109. package/lib/control/drtab/drtab.controller.cjs +3 -0
  110. package/lib/control/form/form-detail/form-group-panel/form-group-panel.css +1 -1
  111. package/lib/control/pickup-view-panel/pickup-view-panel.controller.cjs +3 -0
  112. package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +144 -26
  113. package/lib/editor/index.cjs +7 -0
  114. package/lib/editor/text-box/index.cjs +2 -0
  115. package/lib/editor/text-box/signature/signature.cjs +258 -0
  116. package/lib/editor/text-box/signature/signature.css +1 -0
  117. package/lib/editor/text-box/text-box-editor.provider.cjs +3 -0
  118. package/lib/index.cjs +2 -0
  119. package/lib/locale/en/index.cjs +14 -0
  120. package/lib/locale/zh-CN/index.cjs +14 -0
  121. package/lib/mob-app/App.cjs +16 -0
  122. package/lib/mob-app/guard/auth-guard/auth-guard.cjs +95 -2
  123. package/lib/mob-app/util/unauthorized-handler/unauthorized-handler.cjs +50 -15
  124. package/lib/panel-component/auth-sso/auth-sso.cjs +77 -5
  125. package/lib/panel-component/auth-sso/auth-sso.css +1 -1
  126. package/lib/util/app-util/app-util.cjs +55 -0
  127. package/lib/view-engine/login-view.engine.cjs +2 -0
  128. package/lib/view-engine/mob-data-view-engine.cjs +0 -1
  129. package/lib/view-engine/mob-edit-view.engine.cjs +5 -1
  130. package/lib/view-engine/mob-md-view-engine.cjs +0 -1
  131. package/lib/view-engine/mob-mpickup-view-engine.cjs +34 -26
  132. package/lib/view-engine/mob-pickup-md-view.engine.cjs +0 -1
  133. package/lib/view-engine/mob-pickup-view.engine.cjs +15 -1
  134. package/lib/view-engine/mob-tab-search-view.engine.cjs +0 -1
  135. package/lib/view-engine/mob-wf-dyna-action-view.engine.cjs +0 -1
  136. package/lib/view-engine/mob-wf-dyna-edit-view.engine.cjs +0 -1
  137. package/lib/view-engine/mob-wf-dyna-start-view.engine.cjs +0 -1
  138. package/package.json +6 -6
  139. package/dist/index-NP0RBfWK.js.map +0 -1
  140. package/dist/index-O-XmMUt3.js.map +0 -1
  141. package/dist/index-komJV5bQ.js +0 -76
  142. package/dist/index-komJV5bQ.js.map +0 -1
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var core = require('@ibiz-template/core');
3
4
  var modelHelper = require('@ibiz-template/model-helper');
4
5
  var ramda = require('ramda');
5
6
  var vue3Util = require('@ibiz-template/vue3-util');
@@ -137,18 +138,110 @@ async function appInit(context) {
137
138
  await ibiz.auth.extendLogin(context);
138
139
  await ibiz.hub.notice.init();
139
140
  }
141
+ function throw401() {
142
+ throw new core.HttpError({
143
+ response: {
144
+ status: 401,
145
+ statusText: ibiz.i18n.t("mobApp.authGuard.noPermission")
146
+ }
147
+ });
148
+ }
149
+ async function anonymousValidate(context) {
150
+ const authInfo = ibiz.auth.getAuthInfo();
151
+ if (authInfo && !authInfo.isAnonymous) {
152
+ try {
153
+ await appInit(context);
154
+ return;
155
+ } catch (error) {
156
+ const { status } = error;
157
+ if (status === 401) {
158
+ const refreshToken = core.getAppCookie(core.CoreConst.REFRESH_TOKEN);
159
+ if (refreshToken) {
160
+ await ibiz.auth.refreshToken();
161
+ await appInit(context);
162
+ return;
163
+ }
164
+ ibiz.auth.clearAuthData();
165
+ } else {
166
+ throw error;
167
+ }
168
+ }
169
+ }
170
+ if (authInfo == null ? void 0 : authInfo.token) {
171
+ try {
172
+ await appInit(context);
173
+ } catch (error) {
174
+ const { status } = error;
175
+ if (status === 401) {
176
+ const loginResult = await ibiz.auth.anonymousLogin();
177
+ if (!loginResult) {
178
+ throw401();
179
+ return;
180
+ }
181
+ await appInit(context);
182
+ } else {
183
+ throw error;
184
+ }
185
+ }
186
+ }
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
+ }
195
+ const urlPaths = window.location.hash.split("/");
196
+ const viewName = urlPaths[urlPaths.length - 2];
197
+ let viewModel;
198
+ try {
199
+ if (viewName === "#" && ibiz.hub.defaultPage) {
200
+ viewModel = await ibiz.hub.getAppView(ibiz.hub.defaultPage.id);
201
+ } else {
202
+ viewModel = await ibiz.hub.getAppView(viewName);
203
+ }
204
+ } catch (error) {
205
+ ibiz.log.error(error);
206
+ }
207
+ if (!viewModel) {
208
+ ibiz.log.error(
209
+ `\u627E\u4E0D\u5230\u89C6\u56FE\u6A21\u578B${viewName},\u8BF7\u786E\u4FDD\u8BE5\u89C6\u56FE\u914D\u7F6E\u4E86\u533F\u540D\u8BBF\u95EE\u548C\u7528\u6237\u5F15\u7528`
210
+ );
211
+ throw401();
212
+ return;
213
+ }
214
+ if (viewModel.accUserMode !== 3) {
215
+ throw401();
216
+ }
217
+ }
140
218
  async function AuthGuard(appContext, permission = true) {
141
219
  if (permission) {
142
220
  let result = true;
143
221
  try {
144
- await appInit(appContext);
222
+ if (ibiz.env.enableAnonymous) {
223
+ await anonymousValidate(appContext);
224
+ } else {
225
+ await appInit(appContext);
226
+ }
145
227
  } catch (error) {
146
228
  result = false;
229
+ error.tag = "APPINIT";
147
230
  ibiz.util.error.handle(error);
148
231
  }
149
232
  return result;
150
233
  }
151
- 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
+ }
152
245
  return true;
153
246
  }
154
247
 
@@ -4,7 +4,22 @@ var qs = require('qs');
4
4
  var core = require('@ibiz-template/core');
5
5
 
6
6
  "use strict";
7
+ var __defProp = Object.defineProperty;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __publicField = (obj, key, value) => {
10
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
11
+ return value;
12
+ };
7
13
  class UnauthorizedHandler {
14
+ constructor() {
15
+ /**
16
+ * @description 是否存在403错误未处理
17
+ * @protected
18
+ * @type {boolean}
19
+ * @memberof UnauthorizedHandler
20
+ */
21
+ __publicField(this, "hasPermErrPending", false);
22
+ }
8
23
  match(error) {
9
24
  return error instanceof core.HttpError && (error.status === 401 || error.status === 403);
10
25
  }
@@ -69,6 +84,9 @@ class UnauthorizedHandler {
69
84
  */
70
85
  async normalLogin() {
71
86
  const ru = window.location.hash.replace("#", "");
87
+ if (ru.startsWith("/login")) {
88
+ return;
89
+ }
72
90
  const targetUrl = `${core.UrlHelper.routeBase}/login?ru=${encodeURIComponent(
73
91
  ru
74
92
  )}`;
@@ -77,22 +95,31 @@ class UnauthorizedHandler {
77
95
  window.location.reload();
78
96
  }
79
97
  /**
80
- * 处理403
81
- * @author lxm
82
- * @date 2023-12-06 10:19:12
98
+ * @description 处理403
83
99
  * @protected
84
- * @return {*} {Promise<void>}
100
+ * @param {HttpError} error
101
+ * @returns {*} {Promise<void>}
102
+ * @memberof UnauthorizedHandler
85
103
  */
86
- async handle403() {
87
- const result = await ibiz.modal.confirm({
88
- title: ibiz.i18n.t("mobApp.unauthorizedHandler.prohibitAccessPrompt"),
89
- desc: ibiz.i18n.t("mobApp.unauthorizedHandler.exitPrompt")
90
- });
91
- if (result) {
92
- const bol = await ibiz.auth.logout();
93
- if (bol) {
94
- window.location.reload();
104
+ async handle403(error) {
105
+ if (error.tag === "APPINIT") {
106
+ if (this.hasPermErrPending) {
107
+ return;
108
+ }
109
+ this.hasPermErrPending = true;
110
+ const result = await ibiz.modal.confirm({
111
+ title: ibiz.i18n.t("mobApp.unauthorizedHandler.prohibitAccessPrompt"),
112
+ desc: ibiz.i18n.t("mobApp.unauthorizedHandler.exitPrompt")
113
+ });
114
+ this.hasPermErrPending = false;
115
+ if (result) {
116
+ const bol = await ibiz.auth.logout();
117
+ if (bol) {
118
+ window.location.reload();
119
+ }
95
120
  }
121
+ } else {
122
+ ibiz.mc.error.send(error);
96
123
  }
97
124
  }
98
125
  /**
@@ -105,7 +132,15 @@ class UnauthorizedHandler {
105
132
  handle(error) {
106
133
  if (error instanceof core.HttpError) {
107
134
  if (error.status === 401) {
108
- if (ibiz.env.loginMode === core.LoginMode.CAS) {
135
+ const search = qs.parse(window.location.search.replace("?", ""));
136
+ if ((search.isAnonymous || ibiz.env.enableAnonymous) && // 匿名登录获取视图模型发生异常,走普通登录,防止循环执行
137
+ error.tag !== "APPINIT") {
138
+ ibiz.auth.anonymousLogin().then((bol) => {
139
+ if (bol) {
140
+ window.location.reload();
141
+ }
142
+ });
143
+ } else if (ibiz.env.loginMode === core.LoginMode.CAS) {
109
144
  this.casLogin();
110
145
  } else if (ibiz.env.loginMode === core.LoginMode.OAUTH) {
111
146
  this.oauthLogin();
@@ -115,7 +150,7 @@ class UnauthorizedHandler {
115
150
  return true;
116
151
  }
117
152
  if (error.status === 403) {
118
- this.handle403();
153
+ this.handle403(error);
119
154
  return true;
120
155
  }
121
156
  }
@@ -24,15 +24,30 @@ const AuthSso = /* @__PURE__ */ vue.defineComponent({
24
24
  required: true
25
25
  }
26
26
  },
27
- setup() {
27
+ setup(props) {
28
+ var _a;
28
29
  const ns = vue3Util.useNamespace("auth-sso");
30
+ const model = props.controller.model;
31
+ const rawItemParams = (_a = model.rawItem) == null ? void 0 : _a.rawItemParams;
32
+ const items = rawItemParams == null ? void 0 : rawItemParams.map((item) => {
33
+ const params = item.value ? JSON.parse(item.value) : {};
34
+ return {
35
+ key: item.key,
36
+ sysImage: item.sysImage,
37
+ title: params.title,
38
+ params
39
+ };
40
+ });
29
41
  const dingtalkHandleClick = async () => {
30
42
  ibiz.thirdAuth.auth("DINGTALK", "THIRD");
31
43
  };
32
44
  const wxWorkHandleClick = async () => {
33
45
  ibiz.thirdAuth.auth("WXWORK", "THIRD");
34
46
  };
35
- const handleThridLogin = (type) => {
47
+ const oauthHandleClick = async (params) => {
48
+ ibiz.thirdAuth.auth("OAUTH", "THIRD", params);
49
+ };
50
+ const handleThridLogin = (type, params) => {
36
51
  if (!type)
37
52
  return;
38
53
  switch (type) {
@@ -43,18 +58,75 @@ const AuthSso = /* @__PURE__ */ vue.defineComponent({
43
58
  wxWorkHandleClick();
44
59
  break;
45
60
  default:
46
- console.log(ibiz.i18n.t("panelComponent.authSsO.noSupported", {
47
- type
48
- }));
61
+ oauthHandleClick(params);
49
62
  break;
50
63
  }
51
64
  };
52
65
  return {
53
66
  ns,
67
+ items,
54
68
  handleThridLogin
55
69
  };
56
70
  },
57
71
  render() {
72
+ if (this.items && this.items.length) {
73
+ return vue.createVNode("div", {
74
+ "class": this.ns.b()
75
+ }, [this.items.map((item) => {
76
+ var _a;
77
+ let icon;
78
+ if (item.sysImage) {
79
+ icon = vue.createVNode(vue.resolveComponent("iBizIcon"), {
80
+ "icon": item.sysImage
81
+ }, null);
82
+ } else if (item.key === "DINGDING") {
83
+ icon = vue.createVNode("svg", {
84
+ "class": "icon",
85
+ "viewBox": "0 0 1024 1024",
86
+ "version": "1.1",
87
+ "xmlns": "http://www.w3.org/2000/svg",
88
+ "p-id": "651",
89
+ "width": "48",
90
+ "height": "48"
91
+ }, [vue.createVNode("defs", null, [vue.createVNode("style", {
92
+ "type": "text/css"
93
+ }, null)]), vue.createVNode("path", {
94
+ "d": "M512 2C230.2 2 2 230.2 2 512s228.2 510 510 510 510-228.2 510-510S793.3 2 512 2z m235.9 442c-1 4.6-3.6 10.8-7.2 19.1l-0.5 0.5c-21.6 45.8-77.3 135.5-77.3 135.5l-0.5-0.5-16.5 28.3h78.8L574.3 826.8l34-136h-61.8l21.6-90.2c-17.5 4.1-38.1 9.8-62.3 18 0 0-33 19.1-94.8-37.1 0 0-41.7-37.1-17.5-45.8 10.3-4.1 50-8.8 81.4-12.9 42.2-5.7 68.5-8.8 68.5-8.8s-130.3 2.1-161.2-3.1c-30.9-4.6-70.1-56.7-78.3-102 0 0-12.9-24.7 27.8-12.9 40.2 11.8 209.2 45.8 209.2 45.8S321.4 375 307 358.5c-14.4-16.5-42.8-89.6-39.2-134.5 0 0 1.5-11.3 12.9-8.2 0 0 161.8 74.2 272.5 114.4C664.5 371.4 760.8 392 747.9 444z",
95
+ "fill": "#3296FA",
96
+ "p-id": "652"
97
+ }, null)]);
98
+ } else if (item.key === "WXWORK") {
99
+ icon = vue.createVNode("svg", {
100
+ "class": "icon",
101
+ "width": "200px",
102
+ "height": "200.00px",
103
+ "viewBox": "0 0 1024 1024",
104
+ "version": "1.1",
105
+ "xmlns": "http://www.w3.org/2000/svg"
106
+ }, [vue.createVNode("path", {
107
+ "fill": "#36ab60",
108
+ "d": "M352.814545 385.396364m-33.512727 0a33.512727 33.512727 0 1 0 67.025455 0 33.512727 33.512727 0 1 0-67.025455 0Z"
109
+ }, null), vue.createVNode("path", {
110
+ "fill": "#36ab60",
111
+ "d": "M502.690909 384.465455m-33.512727 0a33.512727 33.512727 0 1 0 67.025454 0 33.512727 33.512727 0 1 0-67.025454 0Z"
112
+ }, null), vue.createVNode("path", {
113
+ "fill": "#36ab60",
114
+ "d": "M576.232727 534.341818m-23.272727 0a23.272727 23.272727 0 1 0 46.545455 0 23.272727 23.272727 0 1 0-46.545455 0Z"
115
+ }, null), vue.createVNode("path", {
116
+ "fill": "#36ab60",
117
+ "d": "M694.458182 536.203636m-23.272727 0a23.272727 23.272727 0 1 0 46.545454 0 23.272727 23.272727 0 1 0-46.545454 0Z"
118
+ }, null), vue.createVNode("path", {
119
+ "fill": "#36ab60",
120
+ "d": "M512 0C229.003636 0 0 229.003636 0 512s229.003636 512 512 512 512-229.003636 512-512S794.996364 0 512 0z m-87.505455 630.225455c-26.996364 0-48.407273-5.585455-75.403636-11.17091l-75.403636 37.236364 21.410909-64.232727c-53.992727-37.236364-85.643636-85.643636-85.643637-145.221818 0-102.4 96.814545-182.458182 215.04-182.458182 105.192727 0 198.283636 64.232727 216.901819 150.807273-6.516364-0.930909-13.963636-0.930909-20.48-0.93091-102.4 0-182.458182 76.334545-182.458182 170.356364 0 15.825455 2.792727 30.72 6.516363 44.683636-7.447273 0-13.963636 0.930909-20.48 0.93091z m314.647273 75.403636l15.825455 53.992727-58.647273-32.581818c-21.410909 5.585455-42.821818 11.170909-64.232727 11.170909-102.4 0-182.458182-69.818182-182.458182-155.461818s80.058182-155.461818 182.458182-155.461818c96.814545 0 182.458182 69.818182 182.458182 155.461818 0 47.476364-31.650909 90.298182-75.403637 122.88z"
121
+ }, null)]);
122
+ }
123
+ return vue.createVNode("div", {
124
+ "class": [this.ns.e("sign-btn"), this.ns.m(item.key === "WXWORK" ? "wx" : (_a = item.key) == null ? void 0 : _a.toLowerCase())],
125
+ "title": item.title,
126
+ "onClick": () => this.handleThridLogin(item.key, item.params)
127
+ }, [icon]);
128
+ })]);
129
+ }
58
130
  return vue.createVNode("div", {
59
131
  "class": this.ns.b()
60
132
  }, [vue.createVNode("div", {
@@ -1 +1 @@
1
- .ibiz-auth-sso{--ibiz-auth-sso-icon-width:var(--ibiz-editor-default-line-height);--ibiz-auth-sso-icon-height:var(--ibiz-editor-default-line-height);--ibiz-auth-sso-gap:var(--ibiz-spacing-base);display:flex;gap:var(--ibiz-auth-sso-gap);justify-content:center;width:100%}.ibiz-auth-sso__sign-btn{width:var(--ibiz-auth-sso-icon-width);height:var(--ibiz-auth-sso-icon-height);cursor:pointer}.ibiz-auth-sso__sign-btn svg{width:100%;height:100%}
1
+ .ibiz-auth-sso{--ibiz-auth-sso-icon-width:var(--ibiz-editor-default-line-height);--ibiz-auth-sso-icon-height:var(--ibiz-editor-default-line-height);--ibiz-auth-sso-gap:var(--ibiz-spacing-base);display:flex;gap:var(--ibiz-auth-sso-gap);justify-content:center;width:100%}.ibiz-auth-sso__sign-btn{width:var(--ibiz-auth-sso-icon-width);height:var(--ibiz-auth-sso-icon-height);cursor:pointer}.ibiz-auth-sso__sign-btn svg{width:100%;height:100%}.ibiz-auth-sso__sign-btn .ibiz-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}
@@ -4,6 +4,12 @@ var core = require('@ibiz-template/core');
4
4
  var vue3Util = require('@ibiz-template/vue3-util');
5
5
 
6
6
  "use strict";
7
+ var __defProp = Object.defineProperty;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __publicField = (obj, key, value) => {
10
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
11
+ return value;
12
+ };
7
13
  class AppUtil {
8
14
  /**
9
15
  * Creates an instance of AppUtil.
@@ -13,6 +19,20 @@ class AppUtil {
13
19
  */
14
20
  constructor(router) {
15
21
  this.router = router;
22
+ /**
23
+ * @description 视图缓存中心
24
+ * @type {Map<string, IApiViewController>}
25
+ * @memberof AppUtil
26
+ */
27
+ __publicField(this, "viewCacheCenter", /* @__PURE__ */ new Map());
28
+ }
29
+ /**
30
+ * @description 路由是否初始化构建完成
31
+ * @returns {*} {Promise<void>}
32
+ * @memberof AppUtil
33
+ */
34
+ async onRouteIsReady() {
35
+ return this.router.isReady();
16
36
  }
17
37
  /**
18
38
  * 获取应用上下文
@@ -173,6 +193,41 @@ class AppUtil {
173
193
  async openAiChat(params) {
174
194
  throw new core.RuntimeError(ibiz.i18n.t("app.noSupport"));
175
195
  }
196
+ /**
197
+ * @description 当前路由转换成路由路径对象
198
+ * @param {boolean} [isRouteModal]
199
+ * @returns {*} {{
200
+ * appContext?: IParams;
201
+ * pathNodes: {
202
+ * viewName: string;
203
+ * context?: IParams;
204
+ * params?: IParams;
205
+ * srfnav?: string;
206
+ * }[];
207
+ * }}
208
+ * @memberof AppUtil
209
+ */
210
+ route2routeObject(isRouteModal) {
211
+ const routePath = vue3Util.route2routePath(this.router.currentRoute.value);
212
+ return routePath;
213
+ }
214
+ /**
215
+ * @description 路由路径对象转化为路由路径
216
+ * @param {{
217
+ * appContext?: IParams;
218
+ * pathNodes: {
219
+ * viewName: string;
220
+ * context?: IParams;
221
+ * params?: IParams;
222
+ * srfnav?: string;
223
+ * }[];
224
+ * }} routePath
225
+ * @returns {*} {string}
226
+ * @memberof AppUtil
227
+ */
228
+ routeObject2String(routePath) {
229
+ return vue3Util.routePath2string(routePath);
230
+ }
176
231
  }
177
232
 
178
233
  exports.AppUtil = AppUtil;
@@ -43,9 +43,11 @@ class LoginViewEngine extends runtime.ViewEngineBase {
43
43
  async call(key, args = {}) {
44
44
  if (key === runtime.SysUIActionTag.LOGIN) {
45
45
  await this.login(args);
46
+ return null;
46
47
  }
47
48
  if (key === runtime.SysUIActionTag.CANCEL_CHANGES) {
48
49
  await this.cancelChanges();
50
+ return null;
49
51
  }
50
52
  return super.call(key, args);
51
53
  }
@@ -15,7 +15,6 @@ class MobDataViewEngine extends runtime.MDViewEngine {
15
15
  get dataview() {
16
16
  return this.view.getController("dataview");
17
17
  }
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
19
18
  async call(key, args) {
20
19
  if (key === runtime.SysUIActionTag.LOAD_MORE) {
21
20
  await this.loadMore();
@@ -118,7 +118,6 @@ class MobEditViewEngine extends runtime.ViewEngineBase {
118
118
  async refresh() {
119
119
  await this.load();
120
120
  }
121
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
122
121
  async call(key, args) {
123
122
  if (key === runtime.SysUIActionTag.SAVE) {
124
123
  await this.form.save();
@@ -134,18 +133,23 @@ class MobEditViewEngine extends runtime.ViewEngineBase {
134
133
  }
135
134
  if (key === runtime.SysUIActionTag.SAVE_AND_NEW) {
136
135
  this.saveAndNew();
136
+ return null;
137
137
  }
138
138
  if (key === runtime.SysUIActionTag.REFRESH) {
139
139
  await this.refresh();
140
+ return null;
140
141
  }
141
142
  if (key === runtime.SysUIActionTag.SAVE_AND_START) {
142
143
  await this.wfStart();
144
+ return null;
143
145
  }
144
146
  if (key === runtime.SysUIActionTag.VIEW_WF_STEP) {
145
147
  await this.wfSubmit();
148
+ return null;
146
149
  }
147
150
  if (key === runtime.ViewCallTag.WF_WITHDRAW) {
148
151
  await this.wfWithdraw();
152
+ return null;
149
153
  }
150
154
  return super.call(key, args);
151
155
  }
@@ -7,7 +7,6 @@ class MobMDViewEngine extends runtime.MDViewEngine {
7
7
  get mdctrl() {
8
8
  return this.view.getController("mdctrl");
9
9
  }
10
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
11
10
  async call(key, args) {
12
11
  if (key === runtime.SysUIActionTag.LOAD_MORE) {
13
12
  await this.loadMore();
@@ -77,7 +77,6 @@ class MobMPickupViewEngine extends mobPickupView_engine.MobPickupViewEngine {
77
77
  this.view.layoutPanel.panelItems.simplelist.state.visible = false;
78
78
  }
79
79
  }
80
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
81
80
  async call(key, args) {
82
81
  if (key === runtime.SysUIActionTag.CANCEL) {
83
82
  this.cancel();
@@ -104,28 +103,11 @@ class MobMPickupViewEngine extends mobPickupView_engine.MobPickupViewEngine {
104
103
  /**
105
104
  * 选择面板激活数据
106
105
  *
107
- * @param {IData[]} data
108
- * @memberof MobMPickupViewEngine
109
- */
110
- pickupViewPanelDataActive(data) {
111
- const allData = this.simpleList.getAllData();
112
- const items = [...allData, ...data];
113
- const uniqueItems = this.handleUniqueItems(items);
114
- this.simpleList.setData(uniqueItems);
115
- }
116
- /**
117
- * 去重数组
118
- *
119
- * @protected
120
- * @param {IData[]} arr
121
- * @return {*} {IData[]}
122
106
  * @memberof MobMPickupViewEngine
123
107
  */
124
- handleUniqueItems(arr) {
125
- const res = /* @__PURE__ */ new Map();
126
- return arr.filter(
127
- (item) => !res.has(item.srfkey) && res.set(item.srfkey, 1)
128
- );
108
+ async pickupViewPanelDataActive() {
109
+ const selectedData = await this.pickupViewPanel.getSelectedData();
110
+ await this.handlePushSimpleListItems(selectedData);
129
111
  }
130
112
  /**
131
113
  * 选则面板激活数据
@@ -169,10 +151,26 @@ class MobMPickupViewEngine extends mobPickupView_engine.MobPickupViewEngine {
169
151
  * @param {IData[]} data
170
152
  * @memberof MobMPickupViewEngine
171
153
  */
172
- handlePushSimpleListItems(data) {
173
- const allData = this.simpleList.getAllData();
174
- const items = this.calcDuplicateData(allData, data);
175
- this.simpleList.setData(items);
154
+ async handlePushSimpleListItems(data) {
155
+ const items = await this.pickupViewPanel.getAllData();
156
+ const selectItems = this.simpleList.getAllData().filter((selected) => !items.some((item) => item.srfkey === selected.srfkey));
157
+ selectItems.push(...data);
158
+ const uniqueItems = this.handleUniqueItems(selectItems);
159
+ this.setSelectedData(uniqueItems);
160
+ }
161
+ /**
162
+ * 去重数组
163
+ *
164
+ * @protected
165
+ * @param {IData[]} arr
166
+ * @return {*} {IData[]}
167
+ * @memberof MobMPickupViewEngine
168
+ */
169
+ handleUniqueItems(arr) {
170
+ const res = /* @__PURE__ */ new Map();
171
+ return arr.filter(
172
+ (item) => !res.has(item.srfkey) && res.set(item.srfkey, 1)
173
+ );
176
174
  }
177
175
  /**
178
176
  * 添加所有
@@ -193,7 +191,7 @@ class MobMPickupViewEngine extends mobPickupView_engine.MobPickupViewEngine {
193
191
  * @memberof MobMPickupViewEngine
194
192
  */
195
193
  removeAll() {
196
- this.simpleList.setData([]);
194
+ this.setSelectedData([]);
197
195
  }
198
196
  /**
199
197
  * 添加选中
@@ -223,6 +221,16 @@ class MobMPickupViewEngine extends mobPickupView_engine.MobPickupViewEngine {
223
221
  items.splice(index, 1);
224
222
  }
225
223
  });
224
+ this.setSelectedData(items);
225
+ }
226
+ /**
227
+ * @description 设置选中数据
228
+ * @protected
229
+ * @param {IData[]} items
230
+ * @memberof MPickupViewEngine
231
+ */
232
+ setSelectedData(items) {
233
+ super.setSelectedData(items);
226
234
  this.simpleList.setData(items);
227
235
  }
228
236
  /**
@@ -37,7 +37,6 @@ class PickupMDViewEngine extends runtime.MDViewEngine {
37
37
  this.load();
38
38
  }
39
39
  }
40
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
41
40
  async call(key, args) {
42
41
  if (key === "GetAllData") {
43
42
  return this.mdctrl.state.items;
@@ -45,6 +45,10 @@ class MobPickupViewEngine extends runtime.ViewEngineBase {
45
45
  this.view.slotProps.pickupviewpanel = {};
46
46
  }
47
47
  this.view.slotProps.pickupviewpanel.singleSelect = true;
48
+ if (this.view.params.selecteddata) {
49
+ this.selectedData = JSON.parse(this.view.params.selecteddata);
50
+ delete this.view.params.selecteddata;
51
+ }
48
52
  }
49
53
  /**
50
54
  * 视图mounted生命周期执行逻辑
@@ -60,6 +64,17 @@ class MobPickupViewEngine extends runtime.ViewEngineBase {
60
64
  this.pickupViewPanel.evt.on("onDataActive", (event) => {
61
65
  this.pickupViewPanelDataActive(event.data);
62
66
  });
67
+ this.setSelectedData(this.selectedData);
68
+ }
69
+ /**
70
+ * @description 设置选中数据
71
+ * @protected
72
+ * @param {IData[]} items
73
+ * @memberof PickupViewEngine
74
+ */
75
+ setSelectedData(items) {
76
+ this.selectedData = items;
77
+ this.pickupViewPanel.setSelectedData(items);
63
78
  }
64
79
  /**
65
80
  * 选则面板激活数据
@@ -73,7 +88,6 @@ class MobPickupViewEngine extends runtime.ViewEngineBase {
73
88
  this.selectedData = data;
74
89
  this.view.closeView({ ok: true, data: this.selectedData });
75
90
  }
76
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
77
91
  async call(key, args) {
78
92
  if (key === runtime.SysUIActionTag.CANCEL) {
79
93
  this.cancel();
@@ -118,7 +118,6 @@ class MobTabSearchViewEngine extends mobTabExpView_engine.MobTabExpViewEngine {
118
118
  this.searchBar.placeHolder = caption || "";
119
119
  this.searchBar.state.quickSearchPlaceHolder = caption || "";
120
120
  }
121
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
122
121
  async call(key, args) {
123
122
  if (key === runtime.SysUIActionTag.SEARCH) {
124
123
  await this.searchForm.search();
@@ -20,7 +20,6 @@ class MobWFDynaActionViewEngine extends mobWfDynaEditView_engine.MobWFDynaEditVi
20
20
  const processForm = this.view.context.processForm ? `wfform_${this.view.context.processForm}` : "form";
21
21
  return processForm;
22
22
  }
23
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
24
23
  async call(key, args) {
25
24
  if (key === runtime.SysUIActionTag.OK) {
26
25
  this.onOkButtonClick();
@@ -247,7 +247,6 @@ class MobWFDynaEditViewEngine extends mobEditView_engine.MobEditViewEngine {
247
247
  await this.view.closeView();
248
248
  }
249
249
  }
250
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
251
250
  async call(key, args) {
252
251
  if (key === "WFAction") {
253
252
  this.onLinkClick(args.id);
@@ -20,7 +20,6 @@ class MobWFDynaStartViewEngine extends mobWfDynaEditView_engine.MobWFDynaEditVie
20
20
  const processForm = this.view.context.processForm ? `wfform_${this.view.context.processForm}` : "form";
21
21
  return processForm;
22
22
  }
23
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
24
23
  async call(key, args) {
25
24
  if (key === runtime.SysUIActionTag.OK) {
26
25
  this.onOkButtonClick();