@ibiz-template/vue3-components 0.7.41-alpha.50 → 0.7.41-alpha.52
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/chart-B_uQaEfA.js +1 -0
- package/dist/{index-CXRnZZS2.js → index-DFvp2f5r.js} +4 -4
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-9WDOiHof.js → wang-editor-BbR16ZTX.js} +1 -1
- package/dist/{xlsx-util-CgGjW9-u.js → xlsx-util-BkJoKKKt.js} +1 -1
- package/es/control/chart/chart.mjs +1 -0
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/form/form-detail/form-button/form-button.css +1 -1
- package/es/control/form/form-detail/form-button/form-button.mjs +1 -1
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.mjs +10 -1
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.css +1 -1
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.mjs +3 -2
- package/es/control/form/form-detail/form-item/form-item-container/form-item-container.mjs +2 -1
- package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.mjs +2 -4
- package/es/util/ai-chat-util/ai-chat-util.mjs +66 -30
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +29 -16
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +10 -11
- package/es/web-app/router/index.mjs +181 -95
- package/lib/control/chart/chart.cjs +1 -0
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/form/form-detail/form-button/form-button.cjs +1 -1
- package/lib/control/form/form-detail/form-button/form-button.css +1 -1
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.cjs +3 -2
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.cjs +10 -1
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.css +1 -1
- package/lib/control/form/form-detail/form-item/form-item-container/form-item-container.cjs +2 -1
- package/lib/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.cjs +2 -4
- package/lib/util/ai-chat-util/ai-chat-util.cjs +66 -30
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +10 -11
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +28 -15
- package/lib/web-app/router/index.cjs +181 -95
- package/package.json +6 -6
- package/dist/chart-pMMcGXRE.js +0 -1
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.52_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.53_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.52_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.53_axios@1.12.2_lodash-es@4.17.21_qs@6.14.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
|
@@ -8,11 +8,13 @@ var nprogress = require('../../node_modules/.pnpm/nprogress@0.2.0/node_modules/n
|
|
|
8
8
|
require('../../view/index.cjs');
|
|
9
9
|
require('../components/index.cjs');
|
|
10
10
|
var shareView = require('../../view/share-view/share-view.cjs');
|
|
11
|
+
require('../../util/index.cjs');
|
|
11
12
|
require('nprogress/nprogress.css');
|
|
12
13
|
var loginView = require('../../view/login-view/login-view.cjs');
|
|
13
14
|
var errorView = require('../../view/error-view/error-view.cjs');
|
|
14
15
|
var modalRouterShell = require('../components/modal-router-shell/modal-router-shell.cjs');
|
|
15
16
|
var routerShell = require('../components/router-shell/router-shell.cjs');
|
|
17
|
+
var userRouteUtil = require('../../util/user-route-util/user-route-util.cjs');
|
|
16
18
|
|
|
17
19
|
"use strict";
|
|
18
20
|
var __defProp = Object.defineProperty;
|
|
@@ -35,74 +37,91 @@ class AppRouter {
|
|
|
35
37
|
}
|
|
36
38
|
return appContext;
|
|
37
39
|
}
|
|
38
|
-
static
|
|
40
|
+
static getRoutes() {
|
|
39
41
|
const placeholder = ibiz.env.routePlaceholder;
|
|
40
42
|
const paramReg = "[^/]+=[^/]+|".concat(placeholder);
|
|
41
43
|
const viewReg = "[^=/]+";
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
44
|
+
const routes = [
|
|
45
|
+
{
|
|
46
|
+
path: "/",
|
|
47
|
+
redirect: "/".concat(placeholder, "/index/").concat(placeholder)
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
path: "/login",
|
|
51
|
+
name: "loginView",
|
|
52
|
+
beforeEnter: async (_to, from, next) => {
|
|
53
|
+
await this.authGuard(this.getAppContext(_to), false);
|
|
54
|
+
next();
|
|
55
|
+
},
|
|
56
|
+
component: loginView.LoginView
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
path: "/share",
|
|
60
|
+
name: "shareView",
|
|
61
|
+
beforeEnter: async (_to, from, next) => {
|
|
62
|
+
const authority = await this.authGuard(this.getAppContext(_to));
|
|
63
|
+
if (authority) {
|
|
64
|
+
next();
|
|
65
|
+
} else {
|
|
66
|
+
next(false);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
component: shareView.ShareView
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
path: "/error/:code",
|
|
73
|
+
name: "errorView1",
|
|
74
|
+
component: errorView.ErrorView
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
path: "/appredirectview",
|
|
78
|
+
name: "appRedirectView",
|
|
79
|
+
beforeEnter: async (_to, from, next) => {
|
|
80
|
+
const authority = await this.authGuard(this.getAppContext(_to));
|
|
81
|
+
if (authority) {
|
|
82
|
+
next();
|
|
83
|
+
} else {
|
|
84
|
+
next(false);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
component: vue3Util.AppRedirectView
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
path: "/:appContext(".concat(paramReg, ")/:view1(").concat(viewReg, ")/:params1(").concat(paramReg, ")"),
|
|
91
|
+
beforeEnter: async (_to, from, next) => {
|
|
92
|
+
const authority = await this.authGuard(this.getAppContext(_to));
|
|
93
|
+
if (authority) {
|
|
94
|
+
next();
|
|
95
|
+
} else {
|
|
96
|
+
next(false);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
component: routerShell.RouterShell,
|
|
100
|
+
meta: {
|
|
101
|
+
depth: 1
|
|
102
|
+
},
|
|
103
|
+
children: [
|
|
73
104
|
{
|
|
74
|
-
path: "
|
|
75
|
-
name: "
|
|
105
|
+
path: "error/:code",
|
|
106
|
+
name: "errorView2",
|
|
76
107
|
component: errorView.ErrorView
|
|
77
108
|
},
|
|
78
109
|
{
|
|
79
|
-
path: "
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (authority) {
|
|
84
|
-
next();
|
|
85
|
-
} else {
|
|
86
|
-
next(false);
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
component: vue3Util.AppRedirectView
|
|
110
|
+
path: "".concat(runtime.RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
|
|
111
|
+
components: {
|
|
112
|
+
[runtime.RouteConst.ROUTE_MODAL_TAG]: modalRouterShell.ModalRouterShell
|
|
113
|
+
}
|
|
90
114
|
},
|
|
91
115
|
{
|
|
92
|
-
path: "
|
|
93
|
-
beforeEnter: async (_to, _from, next) => {
|
|
94
|
-
const authority = await this.authGuard(this.getAppContext(_to));
|
|
95
|
-
if (authority) {
|
|
96
|
-
next();
|
|
97
|
-
} else {
|
|
98
|
-
next(false);
|
|
99
|
-
}
|
|
100
|
-
},
|
|
116
|
+
path: ":view2(".concat(viewReg, ")/:params2(").concat(paramReg, ")"),
|
|
101
117
|
component: routerShell.RouterShell,
|
|
118
|
+
meta: {
|
|
119
|
+
depth: 2
|
|
120
|
+
},
|
|
102
121
|
children: [
|
|
103
122
|
{
|
|
104
123
|
path: "error/:code",
|
|
105
|
-
name: "
|
|
124
|
+
name: "errorView3",
|
|
106
125
|
component: errorView.ErrorView
|
|
107
126
|
},
|
|
108
127
|
{
|
|
@@ -112,12 +131,15 @@ class AppRouter {
|
|
|
112
131
|
}
|
|
113
132
|
},
|
|
114
133
|
{
|
|
115
|
-
path: ":
|
|
134
|
+
path: ":view3(".concat(viewReg, ")/:params3(").concat(paramReg, ")"),
|
|
116
135
|
component: routerShell.RouterShell,
|
|
136
|
+
meta: {
|
|
137
|
+
depth: 3
|
|
138
|
+
},
|
|
117
139
|
children: [
|
|
118
140
|
{
|
|
119
141
|
path: "error/:code",
|
|
120
|
-
name: "
|
|
142
|
+
name: "errorView4",
|
|
121
143
|
component: errorView.ErrorView
|
|
122
144
|
},
|
|
123
145
|
{
|
|
@@ -127,12 +149,15 @@ class AppRouter {
|
|
|
127
149
|
}
|
|
128
150
|
},
|
|
129
151
|
{
|
|
130
|
-
path: ":
|
|
152
|
+
path: ":view4(".concat(viewReg, ")/:params4(").concat(paramReg, ")"),
|
|
131
153
|
component: routerShell.RouterShell,
|
|
154
|
+
meta: {
|
|
155
|
+
depth: 4
|
|
156
|
+
},
|
|
132
157
|
children: [
|
|
133
158
|
{
|
|
134
159
|
path: "error/:code",
|
|
135
|
-
name: "
|
|
160
|
+
name: "errorView5",
|
|
136
161
|
component: errorView.ErrorView
|
|
137
162
|
},
|
|
138
163
|
{
|
|
@@ -142,12 +167,15 @@ class AppRouter {
|
|
|
142
167
|
}
|
|
143
168
|
},
|
|
144
169
|
{
|
|
145
|
-
path: ":
|
|
170
|
+
path: ":view5(".concat(viewReg, ")/:params5(").concat(paramReg, ")"),
|
|
146
171
|
component: routerShell.RouterShell,
|
|
172
|
+
meta: {
|
|
173
|
+
depth: 5
|
|
174
|
+
},
|
|
147
175
|
children: [
|
|
148
176
|
{
|
|
149
177
|
path: "error/:code",
|
|
150
|
-
name: "
|
|
178
|
+
name: "errorView6",
|
|
151
179
|
component: errorView.ErrorView
|
|
152
180
|
},
|
|
153
181
|
{
|
|
@@ -157,12 +185,15 @@ class AppRouter {
|
|
|
157
185
|
}
|
|
158
186
|
},
|
|
159
187
|
{
|
|
160
|
-
path: ":
|
|
188
|
+
path: ":view6(".concat(viewReg, ")/:params6(").concat(paramReg, ")"),
|
|
161
189
|
component: routerShell.RouterShell,
|
|
190
|
+
meta: {
|
|
191
|
+
depth: 6
|
|
192
|
+
},
|
|
162
193
|
children: [
|
|
163
194
|
{
|
|
164
195
|
path: "error/:code",
|
|
165
|
-
name: "
|
|
196
|
+
name: "errorView7",
|
|
166
197
|
component: errorView.ErrorView
|
|
167
198
|
},
|
|
168
199
|
{
|
|
@@ -172,12 +203,15 @@ class AppRouter {
|
|
|
172
203
|
}
|
|
173
204
|
},
|
|
174
205
|
{
|
|
175
|
-
path: ":
|
|
206
|
+
path: ":view7(".concat(viewReg, ")/:params7(").concat(paramReg, ")"),
|
|
176
207
|
component: routerShell.RouterShell,
|
|
208
|
+
meta: {
|
|
209
|
+
depth: 7
|
|
210
|
+
},
|
|
177
211
|
children: [
|
|
178
212
|
{
|
|
179
213
|
path: "error/:code",
|
|
180
|
-
name: "
|
|
214
|
+
name: "errorView8",
|
|
181
215
|
component: errorView.ErrorView
|
|
182
216
|
},
|
|
183
217
|
{
|
|
@@ -187,71 +221,123 @@ class AppRouter {
|
|
|
187
221
|
}
|
|
188
222
|
},
|
|
189
223
|
{
|
|
190
|
-
path: ":
|
|
224
|
+
path: ":view8(".concat(viewReg, ")/:params8(").concat(paramReg, ")"),
|
|
191
225
|
component: routerShell.RouterShell,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
name: "errorView8",
|
|
196
|
-
component: errorView.ErrorView
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
path: "".concat(runtime.RouteConst.ROUTE_MODAL_TAG, "/:modalView(").concat(viewReg, ")/:modalParams(").concat(paramReg, ")"),
|
|
200
|
-
components: {
|
|
201
|
-
[runtime.RouteConst.ROUTE_MODAL_TAG]: modalRouterShell.ModalRouterShell
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
path: ":view8(".concat(viewReg, ")/:params8(").concat(paramReg, ")"),
|
|
206
|
-
component: routerShell.RouterShell
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
path: ":pathMatch(.*)*",
|
|
210
|
-
redirect: { name: "errorView8" }
|
|
211
|
-
}
|
|
212
|
-
]
|
|
226
|
+
meta: {
|
|
227
|
+
depth: 8
|
|
228
|
+
}
|
|
213
229
|
},
|
|
214
230
|
{
|
|
215
231
|
path: ":pathMatch(.*)*",
|
|
216
|
-
redirect: { name: "
|
|
232
|
+
redirect: { name: "errorView8" }
|
|
217
233
|
}
|
|
218
234
|
]
|
|
219
235
|
},
|
|
220
236
|
{
|
|
221
237
|
path: ":pathMatch(.*)*",
|
|
222
|
-
redirect: { name: "
|
|
238
|
+
redirect: { name: "errorView7" }
|
|
223
239
|
}
|
|
224
240
|
]
|
|
225
241
|
},
|
|
226
242
|
{
|
|
227
243
|
path: ":pathMatch(.*)*",
|
|
228
|
-
redirect: { name: "
|
|
244
|
+
redirect: { name: "errorView6" }
|
|
229
245
|
}
|
|
230
246
|
]
|
|
231
247
|
},
|
|
232
248
|
{
|
|
233
249
|
path: ":pathMatch(.*)*",
|
|
234
|
-
redirect: { name: "
|
|
250
|
+
redirect: { name: "errorView5" }
|
|
235
251
|
}
|
|
236
252
|
]
|
|
237
253
|
},
|
|
238
254
|
{
|
|
239
255
|
path: ":pathMatch(.*)*",
|
|
240
|
-
redirect: { name: "
|
|
256
|
+
redirect: { name: "errorView4" }
|
|
241
257
|
}
|
|
242
258
|
]
|
|
243
259
|
},
|
|
244
260
|
{
|
|
245
261
|
path: ":pathMatch(.*)*",
|
|
246
|
-
redirect: { name: "
|
|
262
|
+
redirect: { name: "errorView3" }
|
|
247
263
|
}
|
|
248
264
|
]
|
|
249
265
|
},
|
|
250
266
|
{
|
|
251
|
-
path: "
|
|
252
|
-
redirect: { name: "
|
|
267
|
+
path: ":pathMatch(.*)*",
|
|
268
|
+
redirect: { name: "errorView2" }
|
|
253
269
|
}
|
|
254
270
|
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
path: "/:pathMatch(.*)*",
|
|
274
|
+
redirect: { name: "errorView1" }
|
|
275
|
+
}
|
|
276
|
+
];
|
|
277
|
+
return routes;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* 添加路由
|
|
281
|
+
* @param parentDepth 父路由层级
|
|
282
|
+
* @param userRoute
|
|
283
|
+
* @param routes
|
|
284
|
+
* @returns
|
|
285
|
+
*/
|
|
286
|
+
static addRoute(parentDepth, userRoute, routes) {
|
|
287
|
+
if (!parentDepth)
|
|
288
|
+
return;
|
|
289
|
+
const findAndAdd = (routeList) => {
|
|
290
|
+
for (const route of routeList) {
|
|
291
|
+
if (route && route.meta && route.meta.depth === parentDepth) {
|
|
292
|
+
if (route.children && route.children.length > 0) {
|
|
293
|
+
route.children.push(userRoute);
|
|
294
|
+
} else {
|
|
295
|
+
route.children = [userRoute];
|
|
296
|
+
}
|
|
297
|
+
return true;
|
|
298
|
+
}
|
|
299
|
+
if (route.children && route.children.length > 0) {
|
|
300
|
+
if (findAndAdd(route.children)) {
|
|
301
|
+
return true;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return false;
|
|
306
|
+
};
|
|
307
|
+
findAndAdd(routes);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* 获取路由器
|
|
311
|
+
* @param userRoutes
|
|
312
|
+
* @returns
|
|
313
|
+
*/
|
|
314
|
+
static getRouter(userRoutes = []) {
|
|
315
|
+
if (!this.router) {
|
|
316
|
+
const routes = this.getRoutes();
|
|
317
|
+
if (userRoutes && userRoutes.length > 0) {
|
|
318
|
+
for (let i = 0; i < userRoutes.length; i++) {
|
|
319
|
+
const route = userRoutes[i];
|
|
320
|
+
const paginationathSegments = userRouteUtil.splitPathToSegments(route.path);
|
|
321
|
+
const validateResult = userRouteUtil.validateRouteSegments(paginationathSegments);
|
|
322
|
+
if (!validateResult) {
|
|
323
|
+
ibiz.log.warn(
|
|
324
|
+
"\u8DEF\u7531\u914D\u7F6E\u9519\u8BEF\uFF1A\u8DEF\u7531\u8DEF\u5F84\u6709\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u8DEF\u7531\u914D\u7F6E\uFF0C\u8BE6\u60C5\u53C2\u89C1\uFF1Ahttps://open.ibizlab.cn/apphub/zh/guide/router.html"
|
|
325
|
+
);
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
const pathDeepth = (paginationathSegments.length - 1) / 2;
|
|
329
|
+
if (pathDeepth > 1) {
|
|
330
|
+
const segmentLength = paginationathSegments.length;
|
|
331
|
+
route.path = "".concat(paginationathSegments[segmentLength - 2], "/").concat(paginationathSegments[segmentLength - 1]);
|
|
332
|
+
this.addRoute(pathDeepth - 1, route, routes);
|
|
333
|
+
} else {
|
|
334
|
+
routes.push(route);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
this.router = vueRouter.createRouter({
|
|
339
|
+
history: vueRouter.createWebHashHistory(),
|
|
340
|
+
routes
|
|
255
341
|
});
|
|
256
342
|
this.router.beforeEach((_to, _from, next) => {
|
|
257
343
|
nprogress.default.configure({ showSpinner: false });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-components",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.52",
|
|
4
4
|
"description": "web端组件库(vue3)",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
32
32
|
"@floating-ui/dom": "^1.5.3",
|
|
33
|
-
"@ibiz-template-plugin/ai-chat": "^0.0.
|
|
33
|
+
"@ibiz-template-plugin/ai-chat": "^0.0.43",
|
|
34
34
|
"@ibiz-template-plugin/gantt": "0.1.8-alpha.378",
|
|
35
35
|
"@ibiz-template-plugin/bi-report": "0.0.30",
|
|
36
36
|
"@ibiz-template-plugin/data-view": "0.0.6",
|
|
37
|
-
"@ibiz-template/core": "0.7.41-alpha.
|
|
37
|
+
"@ibiz-template/core": "0.7.41-alpha.53",
|
|
38
38
|
"@ibiz-template/devtool": "0.0.13",
|
|
39
|
-
"@ibiz-template/model-helper": "0.7.41-alpha.
|
|
40
|
-
"@ibiz-template/runtime": "0.7.41-alpha.
|
|
39
|
+
"@ibiz-template/model-helper": "0.7.41-alpha.54",
|
|
40
|
+
"@ibiz-template/runtime": "0.7.41-alpha.54",
|
|
41
41
|
"@ibiz-template/theme": "0.7.39",
|
|
42
|
-
"@ibiz-template/vue3-util": "0.7.41-alpha.
|
|
42
|
+
"@ibiz-template/vue3-util": "0.7.41-alpha.54",
|
|
43
43
|
"@ibiz-template/web-theme": "3.10.0",
|
|
44
44
|
"@ibiz/model-core": "^0.1.84",
|
|
45
45
|
"@imengyu/vue3-context-menu": "^1.3.5",
|
package/dist/chart-pMMcGXRE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["vue","@ibiz-template/vue3-util","echarts","qx-util","lodash-es","@ibiz-template/runtime"],function(e){"use strict";var t,i,a,l,n,r,o,s,d,c,h,u,m,p,v,f,g,w;return{setters:[function(e){t=e.defineComponent,i=e.createVNode,a=e.resolveComponent,l=e.ref,n=e.watch,r=e.onMounted,o=e.onBeforeUnmount,s=e.nextTick,d=e.isVNode},function(e){c=e.useControlController,h=e.useNamespace,u=e.hasEmptyPanelRenderer,m=e.IBizCustomRender},function(e){p=e.init},function(e){v=e.createUUID},function(e){f=e.isArray},function(e){g=e.ChartController,w=e.ControlVO}],execute:function(){function b(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!d(e)}e("default",t({name:"IBizChartControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},loadDefault:{type:Boolean,default:!0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1}},emits:["drillDetail"],setup(e,{emit:t}){const d=c((...e)=>new g(...e)),D=h("control-".concat(d.model.controlType.toLowerCase())),y=l(),z=l(0),C=v(),L=l(!1),x=l({}),P=l();let R;const B=()=>{e.data&&(d.state.items=e.data.map(e=>new w(e)),d.afterLoad({},d.state.items))};d.evt.on("onCreated",async()=>{e.isSimple&&(B(),d.state.isSimple=!0,d.state.isLoaded=!0)}),n(()=>e.data,()=>{e.isSimple&&B()},{deep:!0});const N=async()=>{await s();const e=document.getElementById(C);e&&("bottom"===d.state.gridPosition||"top"===d.state.gridPosition?z.value=e.offsetHeight/2-8:z.value=e.offsetHeight-16)},S=()=>{L.value=!1},E=()=>{L.value||d.changeTooltipState(!0)};let O;r(()=>{var t,i;const a=p(y.value);d.initChart(a),window.addEventListener("resize",N),window.addEventListener("pointerdown",S),window.addEventListener("click",E),y.value&&ResizeObserver&&(O=new ResizeObserver(()=>{d.resizeChart()}),O.observe(y.value)),N();let l=(null==(i=null==(t=e.modelData.controlParam)?void 0:t.ctrlParams)?void 0:i.ENABLEDRILLDETAIL)||d.controlParams.enabledrilldetail;if(l&&!f(l))try{l=JSON.parse(l)}catch(e){ibiz.log.error(e),l=void 0}(null==l?void 0:l.length)&&a.on("click",e=>{const t=d.computedClickSerieModel(e);if(!t||ibiz.fullscreenUtil.isFullScreen)return;const i=l.find(e=>e.name===t.valueField);i&&i.isDrill&&(R=e,(e=>{if(e.event){const t=e.event.event,{offsetX:i,offsetY:a}=e.event,{clientWidth:l}=t.target;x.value=i+160>l?{top:"".concat(a-20,"px"),left:"".concat(i-160,"px")}:{top:"".concat(a,"px"),left:"".concat(i+16,"px")}}})(e),a.dispatchAction({type:"hideTip"}),d.changeTooltipState(!1),L.value=!0)})});n(()=>d.state.showGrid,()=>{N()},{immediate:!0});return o(()=>{window.removeEventListener("resize",N),window.removeEventListener("pointerdown",S),window.removeEventListener("click",E),null==O||O.disconnect()}),{c:d,ns:D,chartRef:y,uuid:C,showCheck:L,drillDetailPos:x,drillDetailRef:P,openDrillDetail:e=>{e.stopPropagation(),e.preventDefault(),L.value=!1,d.changeTooltipState(!0);const i=d.computedDrillDetailParam(R);t("drillDetail",i)},renderGrid:()=>{let e;return i(a("el-table"),{ref:"tableRef",data:d.state.gridData||[],border:!0,style:{width:"100%"},"max-height":z.value,"span-method":d.spanMethod.bind(d),"header-row-class-name":D.e("grid-header")},b(e=d.state.gridHeaders.map(e=>i(a("el-table-column"),{prop:e.id,align:"center",label:e.name},null)))?e:{default:()=>[e]})},renderNoData:()=>{if(0===d.state.items.length){const e={};return u(d)&&Object.assign(e,{customRender:()=>i(m,{controller:d},null)}),i(a("iBizNoData"),{text:d.model.emptyText,emptyTextLanguageRes:d.model.emptyTextLanguageRes,hideNoDataImage:d.state.hideNoDataImage},b(e)?e:{default:()=>[e]})}}}},render(){return i(a("iBizControlNavigation"),{controller:this.c},{default:()=>[i(a("iBizControlBase"),{controller:this.c},{default:()=>[i("div",{id:this.uuid,class:this.ns.b("chart-container")},[this.renderNoData(),i("div",{class:[this.ns.e("chart-grid"),this.ns.is("no-data",0===this.c.state.items.length),this.ns.is("show-grid",this.c.state.showGrid),{[this.ns.em("chart-grid",this.c.state.gridPosition)]:this.c.state.showGrid}]},[i("div",{class:[this.ns.e("chart-grid-container"),this.ns.is(this.c.state.gridPosition,this.c.state.showGrid),this.ns.is("no-grid",!this.c.state.showGrid)]},[i("div",{ref:"chartRef",class:[this.ns.e("chart")]},[ibiz.i18n.t("control.chart.chartPlaceholder")]),this.showCheck?i("div",{ref:"drillDetailRef",class:this.ns.e("drill-detail"),style:this.drillDetailPos,onPointerdown:this.openDrillDetail},[i("div",{class:this.ns.em("drill-detail","item")},[i("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false",fill:"currentColor"},[i("g",{id:"aspnormal/preview","stroke-width":"1","fill-rule":"evenodd"},[i("path",{d:"M11.626 0c1.057 0 1.923.818 2 1.855l.005.15v3.411a.6.6 0 0 1-1.192.097l-.008-.097.001-1.348V2.005c0-.41-.31-.749-.705-.799l-.101-.006h-9.62c-.41 0-.75.308-.8.704l-.006.101v11.989c0 .41.308.75.705.8l.101.006h5.906l.017-.004.016-.003h2.074a.598.598 0 1 1 .107 1.187l-.095.01V16H2.006a2.006 2.006 0 0 1-2-1.856L0 13.994V2.005C0 .948.818.082 1.856.005L2.006 0h9.62zm-1.595 6.328a3.669 3.669 0 0 1 3.665 3.665c0 .79-.251 1.523-.678 2.123l2.412 2.412a.6.6 0 1 1-.848.85l-2.41-2.412a3.646 3.646 0 0 1-2.14.692 3.67 3.67 0 0 1-3.667-3.665 3.67 3.67 0 0 1 3.666-3.665zm-5.106 5.29a.6.6 0 0 1 .097 1.191l-.097.008H2.85a.6.6 0 0 1-.097-1.192l.097-.008h2.074zm5.106-4.09a2.468 2.468 0 0 0-2.466 2.465 2.468 2.468 0 0 0 2.466 2.466 2.47 2.47 0 0 0 2.466-2.466 2.469 2.469 0 0 0-2.466-2.465zm-4.815-.126a.6.6 0 0 1 .097 1.193l-.097.007h-2.35A.6.6 0 0 1 2.77 7.41l.098-.008h2.349zm5.58-4a.6.6 0 0 1 .097 1.192l-.097.008H2.867A.6.6 0 0 1 2.77 3.41l.097-.008h7.929z",id:"asp合并形状"},null)])]),i("div",{class:this.ns.em("drill-detail","item-text")},[ibiz.i18n.t("control.chart.drillDetail")])])]):null]),this.c.state.showGrid?i("div",{class:this.ns.e("grid")},[this.renderGrid()]):null])])]})]})}}))}}});
|