@ibiz-template/vue3-components 0.7.13-alpha.0 → 0.7.13

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 (52) hide show
  1. package/dist/index-5IjaPupj.js +4 -0
  2. package/dist/index.min.css +1 -1
  3. package/dist/index.system.min.js +1 -1
  4. package/dist/{xlsx-util-OSsMvylt.js → xlsx-util-8i01yifN.js} +1 -1
  5. package/es/control/app-menu/app-menu.mjs +1 -1
  6. package/es/control/context-menu/context-menu.css +1 -1
  7. package/es/control/context-menu/context-menu.mjs +55 -6
  8. package/es/control/form/form/form.css +1 -1
  9. package/es/control/form/form-detail/form-page/form-page.css +1 -1
  10. package/es/control/form/form-detail/form-page/form-page.d.ts +1 -0
  11. package/es/control/form/form-detail/form-page/form-page.mjs +10 -4
  12. package/es/control/form/form-detail/form-page/index.d.ts +1 -0
  13. package/es/control/toolbar/short-cut-button/short-cut-button.css +0 -0
  14. package/es/control/toolbar/short-cut-button/short-cut-button.d.ts +48 -0
  15. package/es/control/toolbar/short-cut-button/short-cut-button.mjs +71 -0
  16. package/es/control/toolbar/toolbar.mjs +11 -0
  17. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
  18. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.d.ts +1 -0
  19. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +15 -3
  20. package/es/index.mjs +1 -0
  21. package/es/panel-component/auth-userinfo/auth-userinfo.d.ts +1 -1
  22. package/es/panel-component/auth-userinfo/auth-userinfo.mjs +2 -7
  23. package/es/panel-component/auth-userinfo/index.d.ts +1 -1
  24. package/es/panel-component/short-cut/index.d.ts +21 -4
  25. package/es/panel-component/short-cut/short-cut.css +1 -1
  26. package/es/panel-component/short-cut/short-cut.d.ts +21 -4
  27. package/es/panel-component/short-cut/short-cut.mjs +45 -28
  28. package/es/util/app-util/app-util.d.ts +90 -0
  29. package/es/util/app-util/app-util.mjs +152 -0
  30. package/es/util/index.d.ts +1 -0
  31. package/es/util/index.mjs +1 -0
  32. package/es/web-app/main.mjs +2 -0
  33. package/lib/control/app-menu/app-menu.cjs +1 -1
  34. package/lib/control/context-menu/context-menu.cjs +55 -6
  35. package/lib/control/context-menu/context-menu.css +1 -1
  36. package/lib/control/form/form/form.css +1 -1
  37. package/lib/control/form/form-detail/form-page/form-page.cjs +10 -4
  38. package/lib/control/form/form-detail/form-page/form-page.css +1 -1
  39. package/lib/control/toolbar/short-cut-button/short-cut-button.cjs +73 -0
  40. package/lib/control/toolbar/short-cut-button/short-cut-button.css +0 -0
  41. package/lib/control/toolbar/toolbar.cjs +11 -0
  42. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +14 -2
  43. package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.css +1 -1
  44. package/lib/index.cjs +2 -0
  45. package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +2 -7
  46. package/lib/panel-component/short-cut/short-cut.cjs +44 -27
  47. package/lib/panel-component/short-cut/short-cut.css +1 -1
  48. package/lib/util/app-util/app-util.cjs +154 -0
  49. package/lib/util/index.cjs +2 -0
  50. package/lib/web-app/main.cjs +2 -0
  51. package/package.json +4 -4
  52. package/dist/index-Ky5xo5V5.js +0 -4
@@ -1,9 +1,10 @@
1
- import { getCurrentInstance, ref, createVNode, resolveComponent, defineComponent } from 'vue';
1
+ import { getCurrentInstance, ref, reactive, onMounted, onUnmounted, createVNode, resolveComponent, defineComponent } from 'vue';
2
+ import { useRouter } from 'vue-router';
2
3
  import { PanelItemController, OpenAppViewCommand } from '@ibiz-template/runtime';
3
4
  import { useNamespace } from '@ibiz-template/vue3-util';
4
5
  import draggable from 'vuedraggable';
5
- import './short-cut.css';
6
6
  import { IBizContext } from '@ibiz-template/core';
7
+ import './short-cut.css';
7
8
 
8
9
  "use strict";
9
10
  const ShortCut = /* @__PURE__ */ defineComponent({
@@ -24,35 +25,47 @@ const ShortCut = /* @__PURE__ */ defineComponent({
24
25
  setup(props) {
25
26
  const ns = useNamespace("short-cut");
26
27
  const vue = getCurrentInstance().proxy;
28
+ const router = useRouter();
27
29
  const isShowToolbar = ref(false);
28
30
  const isShowMore = ref(false);
29
- const data = ref(ibiz.util.shortCut.data);
31
+ const data = reactive(ibiz.util.shortCut.data);
30
32
  const dragCache = {
31
33
  newIndex: 0,
32
34
  oldIndex: 0
33
35
  };
36
+ const openModeMap = /* @__PURE__ */ new Map([["ROUTE_MODAL", "INDEXVIEWTAB_POPUPMODAL"], ["MODAL", "POPUPMODAL"], ["DRAWER", "DRAWER_RIGHT"]]);
37
+ const onShortCutChange = (items) => {
38
+ if (data.length === 0 && isShowMore.value) {
39
+ isShowMore.value = false;
40
+ }
41
+ vue.$forceUpdate();
42
+ };
43
+ onMounted(() => {
44
+ ibiz.util.shortCut.onChange(onShortCutChange);
45
+ });
46
+ onUnmounted(() => {
47
+ ibiz.util.shortCut.offChange(onShortCutChange);
48
+ });
34
49
  const onShowChange = () => {
35
50
  isShowToolbar.value = !isShowToolbar.value;
36
51
  if (isShowToolbar.value) {
37
52
  isShowMore.value = false;
38
53
  }
39
54
  };
40
- const getOpenMode = (openMode) => {
41
- switch (openMode) {
42
- case "ROUTE_MODAL":
43
- return "INDEXVIEWTAB_POPUPMODAL";
44
- case "MODAL":
45
- return "POPUPMODAL";
46
- case "DRAWER":
47
- return "DRAWER_RIGHT";
48
- default:
49
- }
50
- };
51
55
  const onClick = (item) => {
52
56
  isShowMore.value = false;
53
- ibiz.commands.execute(OpenAppViewCommand.TAG, item.appViewId, IBizContext.create(item.context), item.params, {
54
- openMode: getOpenMode(item.openMode)
55
- });
57
+ if (item.openMode === "ROUTE") {
58
+ const fullPath = item.fullPath.substring(1);
59
+ if (router.currentRoute.value.fullPath !== fullPath) {
60
+ router.push({
61
+ path: item.fullPath.substring(1)
62
+ });
63
+ }
64
+ } else {
65
+ ibiz.commands.execute(OpenAppViewCommand.TAG, item.appViewId, IBizContext.create(item.context), item.params, {
66
+ openMode: openModeMap.get(item.openMode)
67
+ });
68
+ }
56
69
  };
57
70
  const onChange = (evt) => {
58
71
  if (evt.moved) {
@@ -63,18 +76,16 @@ const ShortCut = /* @__PURE__ */ defineComponent({
63
76
  dragCache.oldIndex = evt.removed.oldIndex;
64
77
  ibiz.util.shortCut.changeIndex(dragCache.newIndex, dragCache.oldIndex);
65
78
  }
66
- vue.$forceUpdate();
67
79
  };
68
80
  const onDelete = (event, key) => {
69
81
  event.stopPropagation();
70
82
  ibiz.util.shortCut.removeShortCut(key);
71
- vue.$forceUpdate();
72
83
  };
73
84
  const renderDraggable = (isVertical) => {
74
85
  return createVNode(draggable, {
75
86
  "itemKey": "key",
76
87
  "class": [ns.e("draggable"), ns.is("vertical", isVertical), ns.is("horizontal", !isVertical)],
77
- "modelValue": data.value,
88
+ "modelValue": data,
78
89
  "group": props.controller.model.id,
79
90
  "onChange": (evt) => onChange(evt)
80
91
  }, {
@@ -85,13 +96,14 @@ const ShortCut = /* @__PURE__ */ defineComponent({
85
96
  if (isVertical && !isShowToolbar.value || isVertical && isShowToolbar.value && index > 5 || !isVertical && index < 6) {
86
97
  return createVNode("div", {
87
98
  "class": ns.e("item"),
99
+ "title": element.caption,
88
100
  "onClick": () => onClick(element)
89
101
  }, [createVNode("svg", {
90
102
  "viewBox": "0 0 16 16",
91
103
  "class": ["drag-icon", "icon"],
92
104
  "xmlns": "http://www.w3.org/2000/svg",
93
- "height": "14px",
94
- "width": "14px",
105
+ "height": "16px",
106
+ "width": "16px",
95
107
  "focusable": "false"
96
108
  }, [createVNode("g", {
97
109
  "id": "drag-icon/drag--",
@@ -104,14 +116,17 @@ const ShortCut = /* @__PURE__ */ defineComponent({
104
116
  }, [createVNode("path", {
105
117
  "d": "M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z",
106
118
  "id": "drag-icon-air"
107
- }, null)])])]), createVNode("ion-icon", {
108
- "class": ["icon", "caption"],
119
+ }, null)])])]), element.icon ? createVNode(resolveComponent("iBizIcon"), {
120
+ "class": ["caption-icon", "icon"],
121
+ "icon": element.icon
122
+ }, null) : createVNode("ion-icon", {
123
+ "class": ["caption-icon", "icon"],
109
124
  "name": "ellipsis-horizontal-circle-outline"
110
125
  }, null), createVNode("div", {
111
126
  "class": ns.em("item", "caption")
112
- }, [element.name]), createVNode("ion-icon", {
113
- "class": ["close-icon", "icon"],
127
+ }, [element.caption]), createVNode("ion-icon", {
114
128
  "name": "close-outline",
129
+ "class": ["close-icon", "icon"],
115
130
  "onClick": (event) => onDelete(event, element.key)
116
131
  }, null)]);
117
132
  }
@@ -122,6 +137,7 @@ const ShortCut = /* @__PURE__ */ defineComponent({
122
137
  "class": [ns.e("item"), ns.e("action")],
123
138
  "onClick": onShowChange
124
139
  }, [createVNode("ion-icon", {
140
+ "class": ["expand-icon", "icon"],
125
141
  "name": "chevron-back-outline"
126
142
  }, null), createVNode("div", {
127
143
  "class": ns.em("item", "caption")
@@ -148,7 +164,7 @@ const ShortCut = /* @__PURE__ */ defineComponent({
148
164
  }, {
149
165
  default: () => [createVNode("div", null, [createVNode("span", {
150
166
  "class": ns.em("more", "caption")
151
- }, [isShowToolbar.value ? "6/".concat(data.value.length) : data.value.length]), createVNode("i", {
167
+ }, [isShowToolbar.value ? "6/".concat(data.length) : data.length]), createVNode("i", {
152
168
  "class": ["fa", ns.em("more", "icon"), isShowMore.value ? "fa-angle-double-down" : "fa-angle-double-up"],
153
169
  "aria-hidden": "true"
154
170
  }, null)])]
@@ -171,7 +187,7 @@ const ShortCut = /* @__PURE__ */ defineComponent({
171
187
  },
172
188
  render() {
173
189
  return createVNode("div", {
174
- "class": [this.ns.b(), ...this.controller.containerClass, this.ns.is("hidden", this.data.length === 0)]
190
+ "class": [this.ns.b(), ...this.controller.containerClass, this.ns.is("conceal", this.data.length === 0)]
175
191
  }, [this.isShowToolbar && this.renderDraggable(false), (!this.isShowToolbar || this.data.length > 6) && this.renderMoreToolbar(), this.isShowToolbar && createVNode("div", {
176
192
  "class": this.ns.e("recover"),
177
193
  "onClick": this.onShowChange
@@ -181,6 +197,7 @@ const ShortCut = /* @__PURE__ */ defineComponent({
181
197
  "placement": "top"
182
198
  }, {
183
199
  default: () => [createVNode("ion-icon", {
200
+ "class": ["recover-icon", "icon"],
184
201
  "name": "chevron-forward-outline"
185
202
  }, null)]
186
203
  })])]);
@@ -0,0 +1,90 @@
1
+ import { Router } from 'vue-router';
2
+ import { IAppUtil } from '@ibiz-template/runtime';
3
+ export declare class AppUtil implements IAppUtil {
4
+ protected router: Router;
5
+ /**
6
+ * Creates an instance of AppUtil.
7
+ * @author tony001
8
+ * @date 2024-05-14 17:05:00
9
+ * @param {Router} router
10
+ */
11
+ constructor(router: Router);
12
+ /**
13
+ * 登录
14
+ *
15
+ * @author tony001
16
+ * @date 2024-05-14 16:05:41
17
+ * @param {string} loginName
18
+ * @param {string} password
19
+ * @param {(boolean | undefined)} [remember]
20
+ * @param {(IData | undefined)} [headers]
21
+ * @param {(IData | undefined)} [opts]
22
+ * @return {*} {Promise<boolean>}
23
+ */
24
+ login(loginName: string, password: string, remember?: boolean | undefined, headers?: IData | undefined, opts?: IData | undefined): Promise<boolean>;
25
+ /**
26
+ * 登出
27
+ *
28
+ * @author tony001
29
+ * @date 2024-05-14 16:05:02
30
+ * @param {(IData | undefined)} [opts]
31
+ * @return {*} {Promise<boolean>}
32
+ */
33
+ logout(opts?: IData | undefined): Promise<boolean>;
34
+ /**
35
+ * 变更密码
36
+ *
37
+ * @author tony001
38
+ * @date 2024-05-14 16:05:11
39
+ * @param {string} oldPwd
40
+ * @param {string} newPwd
41
+ * @param {(IData | undefined)} [opts]
42
+ * @return {*} {Promise<boolean>}
43
+ */
44
+ changePwd(oldPwd: string, newPwd: string, opts?: IData | undefined): Promise<boolean>;
45
+ /**
46
+ * 切换组织
47
+ *
48
+ * @author tony001
49
+ * @date 2024-05-14 16:05:20
50
+ * @param {string} oldOrgId
51
+ * @param {string} newOrgId
52
+ * @param {(IData | undefined)} [opts]
53
+ * @return {*} {Promise<boolean>}
54
+ */
55
+ switchOrg(oldOrgId: string, newOrgId: string, opts?: IData | undefined): Promise<boolean>;
56
+ /**
57
+ * 切换主题
58
+ *
59
+ * @author tony001
60
+ * @date 2024-05-14 16:05:30
61
+ * @param {string} oldTheme
62
+ * @param {string} newTheme
63
+ * @param {(IData | undefined)} [opts]
64
+ * @return {*} {Promise<boolean>}
65
+ */
66
+ switchTheme(oldTheme: string, newTheme: string, opts?: IData | undefined): Promise<boolean>;
67
+ /**
68
+ * 切换语言
69
+ *
70
+ * @author tony001
71
+ * @date 2024-05-14 16:05:42
72
+ * @param {string} oldLanguage
73
+ * @param {string} newLanguage
74
+ * @param {(IData | undefined)} [opts]
75
+ * @return {*} {Promise<boolean>}
76
+ */
77
+ switchLanguage(oldLanguage: string, newLanguage: string, opts?: IData | undefined): Promise<boolean>;
78
+ /**
79
+ * 校验密码
80
+ *
81
+ * @author tony001
82
+ * @date 2024-05-14 17:05:31
83
+ * @protected
84
+ * @param {string} oldPwd
85
+ * @param {string} newPwd
86
+ * @param {IData} [opts={}]
87
+ * @return {*} {boolean}
88
+ */
89
+ protected validatePwd(oldPwd: string, newPwd: string, opts?: IData): boolean;
90
+ }
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ class AppUtil {
3
+ /**
4
+ * Creates an instance of AppUtil.
5
+ * @author tony001
6
+ * @date 2024-05-14 17:05:00
7
+ * @param {Router} router
8
+ */
9
+ constructor(router) {
10
+ this.router = router;
11
+ }
12
+ /**
13
+ * 登录
14
+ *
15
+ * @author tony001
16
+ * @date 2024-05-14 16:05:41
17
+ * @param {string} loginName
18
+ * @param {string} password
19
+ * @param {(boolean | undefined)} [remember]
20
+ * @param {(IData | undefined)} [headers]
21
+ * @param {(IData | undefined)} [opts]
22
+ * @return {*} {Promise<boolean>}
23
+ */
24
+ async login(loginName, password, remember, headers, opts) {
25
+ const bol = await ibiz.auth.login(loginName, password, remember, headers);
26
+ if (bol === true) {
27
+ window.location.hash = this.router.currentRoute.value.query.ru || "/";
28
+ window.history.pushState({}, "");
29
+ window.location.reload();
30
+ }
31
+ return bol;
32
+ }
33
+ /**
34
+ * 登出
35
+ *
36
+ * @author tony001
37
+ * @date 2024-05-14 16:05:02
38
+ * @param {(IData | undefined)} [opts]
39
+ * @return {*} {Promise<boolean>}
40
+ */
41
+ async logout(opts) {
42
+ const bol = await ibiz.auth.logout();
43
+ if (bol) {
44
+ const path = window.location;
45
+ if (path.search.indexOf("isAnonymous=true") !== -1) {
46
+ const href = "".concat(path.origin).concat(path.pathname).concat(path.hash);
47
+ window.history.replaceState({}, "", href);
48
+ }
49
+ await this.router.push(
50
+ "/login?ru=".concat(encodeURIComponent(
51
+ window.location.hash.replace("#/", "/")
52
+ ))
53
+ );
54
+ ibiz.util.showAppLoading();
55
+ window.location.reload();
56
+ }
57
+ return bol;
58
+ }
59
+ /**
60
+ * 变更密码
61
+ *
62
+ * @author tony001
63
+ * @date 2024-05-14 16:05:11
64
+ * @param {string} oldPwd
65
+ * @param {string} newPwd
66
+ * @param {(IData | undefined)} [opts]
67
+ * @return {*} {Promise<boolean>}
68
+ */
69
+ async changePwd(oldPwd, newPwd, opts) {
70
+ let bol = this.validatePwd(oldPwd, newPwd, opts);
71
+ if (bol) {
72
+ bol = await ibiz.auth.changePwd(oldPwd, newPwd);
73
+ }
74
+ return bol;
75
+ }
76
+ /**
77
+ * 切换组织
78
+ *
79
+ * @author tony001
80
+ * @date 2024-05-14 16:05:20
81
+ * @param {string} oldOrgId
82
+ * @param {string} newOrgId
83
+ * @param {(IData | undefined)} [opts]
84
+ * @return {*} {Promise<boolean>}
85
+ */
86
+ switchOrg(oldOrgId, newOrgId, opts) {
87
+ throw new Error("Method not implemented.");
88
+ }
89
+ /**
90
+ * 切换主题
91
+ *
92
+ * @author tony001
93
+ * @date 2024-05-14 16:05:30
94
+ * @param {string} oldTheme
95
+ * @param {string} newTheme
96
+ * @param {(IData | undefined)} [opts]
97
+ * @return {*} {Promise<boolean>}
98
+ */
99
+ switchTheme(oldTheme, newTheme, opts) {
100
+ throw new Error("Method not implemented.");
101
+ }
102
+ /**
103
+ * 切换语言
104
+ *
105
+ * @author tony001
106
+ * @date 2024-05-14 16:05:42
107
+ * @param {string} oldLanguage
108
+ * @param {string} newLanguage
109
+ * @param {(IData | undefined)} [opts]
110
+ * @return {*} {Promise<boolean>}
111
+ */
112
+ switchLanguage(oldLanguage, newLanguage, opts) {
113
+ throw new Error("Method not implemented.");
114
+ }
115
+ /**
116
+ * 校验密码
117
+ *
118
+ * @author tony001
119
+ * @date 2024-05-14 17:05:31
120
+ * @protected
121
+ * @param {string} oldPwd
122
+ * @param {string} newPwd
123
+ * @param {IData} [opts={}]
124
+ * @return {*} {boolean}
125
+ */
126
+ validatePwd(oldPwd, newPwd, opts = {}) {
127
+ const { surePwd } = opts;
128
+ if (!oldPwd) {
129
+ ibiz.message.error("\u539F\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A");
130
+ return false;
131
+ }
132
+ if (!newPwd) {
133
+ ibiz.message.error("\u65B0\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A");
134
+ return false;
135
+ }
136
+ if (!surePwd) {
137
+ ibiz.message.error("\u786E\u8BA4\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A");
138
+ return false;
139
+ }
140
+ if (oldPwd === newPwd) {
141
+ ibiz.message.error("\u65B0\u5BC6\u7801\u4E0D\u80FD\u4E0E\u65E7\u5BC6\u7801\u4E00\u81F4");
142
+ return false;
143
+ }
144
+ if (newPwd !== surePwd) {
145
+ ibiz.message.error("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4");
146
+ return false;
147
+ }
148
+ return true;
149
+ }
150
+ }
151
+
152
+ export { AppUtil };
@@ -8,3 +8,4 @@ export { OverlayController } from './overlay-controller/overlay-controller';
8
8
  export { usePagination } from './pagination/use-pagination';
9
9
  export { NoticeUtil } from './notice-util/notice-util';
10
10
  export { RenderUtil } from './render-util/render-util';
11
+ export { AppUtil } from './app-util/app-util';
package/es/util/index.mjs CHANGED
@@ -8,5 +8,6 @@ export { OverlayController } from './overlay-controller/overlay-controller.mjs';
8
8
  export { usePagination } from './pagination/use-pagination.mjs';
9
9
  export { NoticeUtil } from './notice-util/notice-util.mjs';
10
10
  export { RenderUtil } from './render-util/render-util.mjs';
11
+ export { AppUtil } from './app-util/app-util.mjs';
11
12
 
12
13
  "use strict";
@@ -10,6 +10,7 @@ import '../util/index.mjs';
10
10
  import './guard/index.mjs';
11
11
  import { UnauthorizedHandler } from './util/unauthorized-handler/unauthorized-handler.mjs';
12
12
  import { DynaAuthGuard } from './guard/auth-guard/dyna-auth-guard.mjs';
13
+ import { AppUtil } from '../util/app-util/app-util.mjs';
13
14
  import { OpenViewUtil } from '../util/open-view-util/open-view-util.mjs';
14
15
  import { RenderUtil } from '../util/render-util/render-util.mjs';
15
16
  import { MessageUtil } from '../util/message-util/message-util.mjs';
@@ -62,6 +63,7 @@ async function runApp(plugins, opts) {
62
63
  }
63
64
  AppRouter.setAuthGuard((notLogin) => authGuard.verify(notLogin));
64
65
  app.use(AppRouter.getRouter());
66
+ ibiz.appUtil = new AppUtil(AppRouter.getRouter());
65
67
  ibiz.openView = new OpenViewUtil(AppRouter.getRouter());
66
68
  ibiz.render = new RenderUtil();
67
69
  ibiz.message = new MessageUtil();
@@ -280,7 +280,7 @@ const AppMenuControl = /* @__PURE__ */ vue.defineComponent({
280
280
  "onSelect": this.onClick,
281
281
  "theme": "light",
282
282
  "mode": this.menuMode,
283
- "ellipsis": false
283
+ "ellipsis": this.menuMode === "horizontal"
284
284
  }, _isSlot(_slot = this.menus.map((item) => {
285
285
  var _a;
286
286
  if (((_a = item.children) == null ? void 0 : _a.length) > 0) {
@@ -57,17 +57,24 @@ const ContextMenuControl = /* @__PURE__ */ vue.defineComponent({
57
57
  const groupButtonRef = vue.ref();
58
58
  const dropdownRef = vue.ref();
59
59
  const popoverVisible = vue.ref(false);
60
- if (actionDetails) {
61
- actionDetails == null ? void 0 : actionDetails.forEach((detail) => {
60
+ const transformLanguage = (items) => {
61
+ if (!Array.isArray(items)) {
62
+ return;
63
+ }
64
+ items.forEach((detail) => {
62
65
  if (detail.capLanguageRes && detail.capLanguageRes.lanResTag) {
63
66
  detail.caption = ibiz.i18n.t(detail.capLanguageRes.lanResTag, detail.caption);
64
67
  }
65
68
  if (detail.tooltipLanguageRes && detail.tooltipLanguageRes.lanResTag) {
66
69
  detail.tooltip = ibiz.i18n.t(detail.tooltipLanguageRes.lanResTag, detail.tooltip);
67
70
  }
71
+ transformLanguage(detail.detoolbarItems);
68
72
  });
73
+ };
74
+ if (actionDetails) {
75
+ transformLanguage(actionDetails);
69
76
  actionDetails.forEach((detail) => {
70
- if (props.groupLevelKeys.findIndex((item) => item === detail.actionLevel) !== -1) {
77
+ if (!detail.actionLevel || props.groupLevelKeys.findIndex((item) => item === detail.actionLevel) !== -1) {
71
78
  groupDetails.value.push(detail);
72
79
  } else {
73
80
  expandDetails.value.push(detail);
@@ -95,6 +102,7 @@ const ContextMenuControl = /* @__PURE__ */ vue.defineComponent({
95
102
  dropdownRef.value.handleClose();
96
103
  }
97
104
  e.stopPropagation();
105
+ popoverVisible.value = false;
98
106
  emit("action-click", detail, e);
99
107
  };
100
108
  return {
@@ -121,8 +129,14 @@ const ContextMenuControl = /* @__PURE__ */ vue.defineComponent({
121
129
  };
122
130
  const renderActions = (items, isExpand = true) => {
123
131
  return items.map((detail) => {
124
- var _a;
125
- if ((_a = this.c.state.buttonsState[detail.id]) == null ? void 0 : _a.visible) {
132
+ var _a, _b;
133
+ if (!((_a = this.c.state.buttonsState[detail.id]) == null ? void 0 : _a.visible)) {
134
+ return null;
135
+ }
136
+ if (detail.itemType === "SEPERATOR") {
137
+ return renderDivider(isExpand);
138
+ }
139
+ if (detail.itemType === "DEUIACTION" || detail.itemType === "ITEMS" && !((_b = detail.detoolbarItems) == null ? void 0 : _b.length)) {
126
140
  return [detail.addSeparator && renderDivider(isExpand), vue.createVNode(vue.resolveComponent("el-button"), {
127
141
  "text": true,
128
142
  "size": "small",
@@ -142,6 +156,40 @@ const ContextMenuControl = /* @__PURE__ */ vue.defineComponent({
142
156
  }, [detail.caption]) : ""])]
143
157
  })];
144
158
  }
159
+ if (detail.itemType === "ITEMS") {
160
+ return vue.createVNode(vue.resolveComponent("el-popover"), {
161
+ "placement": "right-start",
162
+ "popper-class": this.ns.e("popover"),
163
+ "teleported": false
164
+ }, {
165
+ reference: () => {
166
+ return [detail.addSeparator && renderDivider(isExpand), vue.createVNode(vue.resolveComponent("el-button"), {
167
+ "text": true,
168
+ "size": "small",
169
+ "onClick": (e) => this.handleClick(detail, e),
170
+ "title": detail.tooltip,
171
+ "disabled": this.c.state.buttonsState[detail.id].disabled,
172
+ "class": this.calcActionItemClass(detail)
173
+ }, {
174
+ default: () => [vue.createVNode("div", {
175
+ "class": this.ns.e("action-content")
176
+ }, [detail.showIcon && detail.sysImage && vue.createVNode("div", {
177
+ "class": this.ns.e("action-content-icon")
178
+ }, [vue.createVNode(vue.resolveComponent("iBizIcon"), {
179
+ "icon": detail.sysImage
180
+ }, null)]), detail.showCaption ? vue.createVNode("div", {
181
+ "class": [this.ns.e("action-content-caption"), this.ns.e("action-content-group-caption")]
182
+ }, [detail.caption]) : "", vue.createVNode("ion-icon", {
183
+ "class": this.ns.e("action-content-group-icon"),
184
+ "name": "chevron-forward-outline"
185
+ }, null)])]
186
+ })];
187
+ },
188
+ default: () => {
189
+ return renderActions(detail.detoolbarItems || [], isExpand);
190
+ }
191
+ });
192
+ }
145
193
  return null;
146
194
  });
147
195
  };
@@ -167,7 +215,8 @@ const ContextMenuControl = /* @__PURE__ */ vue.defineComponent({
167
215
  "visible": this.popoverVisible,
168
216
  "onUpdate:visible": ($event) => this.popoverVisible = $event,
169
217
  "popper-class": this.ns.e("popover"),
170
- "virtual-triggering": true
218
+ "virtual-triggering": true,
219
+ "transition": "none"
171
220
  }, _isSlot(_slot = renderActions(this.groupDetails, false)) ? _slot : {
172
221
  default: () => [_slot]
173
222
  })]]);
@@ -1 +1 @@
1
- @charset "UTF-8";.ibiz-context-menu{--ibiz-context-menu-item-margin:0 0 0 4px;--ibiz-context-menu-separator-height:20px;--ibiz-context-menu-separator-width:2px;--ibiz-context-menu-separator-color:var(--ibiz-color-border);--ibiz-context-menu-popover-padding:8px 0;--ibiz-context-menu-popover-button-padding:8px 20px;--ibiz-context-menu-popover-button-color:var(--ibiz-color-text-2);--ibiz-context-menu-popover-button-hover-bg:var(--ibiz-color-bg-0)}.ibiz-context-menu__item{padding:var(--ibiz-spacing-extra-tight) 0}.ibiz-context-menu__item+.ibiz-context-menu__item{margin:var(--ibiz-context-menu-item-margin)}.ibiz-context-menu__item .ibiz-context-menu__action-content-icon{margin-right:3px}.ibiz-context-menu__action-content{display:flex}.ibiz-context-menu__action-content-icon{display:flex;align-items:center;justify-content:center;width:20px}.ibiz-context-menu__action-content-caption{display:flex;align-items:center;justify-content:center}.ibiz-context-menu__popover{--ibiz-context-menu-item-margin:0 0 0 4px;--ibiz-context-menu-separator-height:20px;--ibiz-context-menu-separator-width:2px;--ibiz-context-menu-separator-color:var(--ibiz-color-border);--ibiz-context-menu-popover-padding:8px 0;--ibiz-context-menu-popover-button-padding:8px 20px;--ibiz-context-menu-popover-button-color:var(--ibiz-color-text-2);--ibiz-context-menu-popover-button-hover-bg:var(--ibiz-color-bg-0);width:auto!important;min-width:150px;--el-popover-padding:var(--ibiz-context-menu-popover-padding)}.ibiz-context-menu__popover .el-button{--el-button-size:40px;display:block;width:100%;padding:var(--ibiz-context-menu-popover-button-padding);margin:0;font-size:14px;color:var(--ibiz-context-menu-popover-button-color);text-align:left;border-radius:0}.ibiz-context-menu__popover .el-button:hover{background-color:var(--ibiz-context-menu-popover-button-hover-bg)}.ibiz-context-menu__popover .el-button .ibiz-context-menu__action-content-icon{margin-right:6px}.ibiz-context-menu__separator{margin:0}.ibiz-context-menu--dropdown .ibiz-context-menu__caption{cursor:pointer}.ibiz-context-menu--dropdown .ibiz-context-menu__caption-icon{vertical-align:bottom}
1
+ @charset "UTF-8";.ibiz-context-menu{--ibiz-context-menu-item-margin:0 0 0 4px;--ibiz-context-menu-separator-height:20px;--ibiz-context-menu-separator-width:2px;--ibiz-context-menu-separator-color:var(--ibiz-color-border);--ibiz-context-menu-popover-padding:8px 0;--ibiz-context-menu-popover-button-padding:8px 20px;--ibiz-context-menu-popover-button-color:var(--ibiz-color-text-2);--ibiz-context-menu-popover-button-hover-bg:var(--ibiz-color-bg-0)}.ibiz-context-menu__item{padding:var(--ibiz-spacing-extra-tight) 0}.ibiz-context-menu__item+.ibiz-context-menu__item{margin:var(--ibiz-context-menu-item-margin)}.ibiz-context-menu__item .ibiz-context-menu__action-content-icon{margin-right:3px}.ibiz-context-menu__action-content{display:flex}.ibiz-context-menu__action-content-icon{display:flex;align-items:center;justify-content:center;width:20px}.ibiz-context-menu__action-content-caption{display:flex;align-items:center;justify-content:center}.ibiz-context-menu__popover{--ibiz-context-menu-item-margin:0 0 0 4px;--ibiz-context-menu-separator-height:20px;--ibiz-context-menu-separator-width:2px;--ibiz-context-menu-separator-color:var(--ibiz-color-border);--ibiz-context-menu-popover-padding:8px 0;--ibiz-context-menu-popover-button-padding:8px 20px;--ibiz-context-menu-popover-button-color:var(--ibiz-color-text-2);--ibiz-context-menu-popover-button-hover-bg:var(--ibiz-color-bg-0);width:auto!important;min-width:150px;--el-popover-padding:var(--ibiz-context-menu-popover-padding)}.ibiz-context-menu__popover .el-button{--el-button-size:40px;display:block;width:100%;padding:var(--ibiz-context-menu-popover-button-padding);margin:0;font-size:14px;color:var(--ibiz-context-menu-popover-button-color);text-align:left;border-radius:0}.ibiz-context-menu__popover .el-button:hover{background-color:var(--ibiz-context-menu-popover-button-hover-bg)}.ibiz-context-menu__popover .el-button .ibiz-context-menu__action-content-icon{margin-right:6px}.ibiz-context-menu__popover .el-button .ibiz-context-menu__action-content-group-caption{margin-right:var(--ibiz-spacing-base-loose)}.ibiz-context-menu__popover .el-button .ibiz-context-menu__action-content-group-icon{position:absolute;right:var(--ibiz-spacing-base-loose);font-size:var(--ibiz-font-size-header-6)}.ibiz-context-menu__separator{margin:0}.ibiz-context-menu__separator.el-divider--horizontal{width:calc(100% - 2 * var(--ibiz-spacing-base-loose));margin:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-base-loose)}.ibiz-context-menu--dropdown .ibiz-context-menu__caption{cursor:pointer}.ibiz-context-menu--dropdown .ibiz-context-menu__caption-icon{vertical-align:bottom}
@@ -1 +1 @@
1
- .ibiz-control-form{width:100%;padding-bottom:var(--ibiz-spacing-tight)}
1
+ .ibiz-control-form{width:100%;height:100%;padding-bottom:var(--ibiz-spacing-tight)}
@@ -18,10 +18,15 @@ const FormPage = /* @__PURE__ */ vue.defineComponent({
18
18
  required: true
19
19
  }
20
20
  },
21
- setup() {
21
+ setup(props) {
22
22
  const ns = vue3Util.useNamespace("form-page");
23
+ let position = "top";
24
+ if (props.modelData.tabHeaderPos) {
25
+ position = props.modelData.tabHeaderPos.toLowerCase();
26
+ }
23
27
  return {
24
- ns
28
+ ns,
29
+ position
25
30
  };
26
31
  },
27
32
  render() {
@@ -37,8 +42,9 @@ const FormPage = /* @__PURE__ */ vue.defineComponent({
37
42
  }, [defaultSlots]);
38
43
  }
39
44
  return vue.createVNode(vue.resolveComponent("el-tabs"), {
40
- "class": [this.ns.b(), this.ns.b("tab")],
41
- "model-value": (_d = defaultSlots[0]) == null ? void 0 : _d.key
45
+ "class": [this.ns.b(), this.ns.b("tab"), this.ns.e(this.position)],
46
+ "model-value": (_d = defaultSlots[0]) == null ? void 0 : _d.key,
47
+ "tab-position": this.position
42
48
  }, _isSlot(_slot = defaultSlots.map((slot) => {
43
49
  const props = slot.props;
44
50
  if (!props || !props.controller) {
@@ -1 +1 @@
1
- .ibiz-form-page{--ibiz-form-page-font-size:var(--ibiz-font-size-header-4);--ibiz-form-page-header-border-color:var(--ibiz-color-border);--ibiz-form-page-text-color:var(--ibiz-color-text-2);--ibiz-form-page-bg-color:transparent;--ibiz-form-page-hover-text-color:var(--ibiz-color-primary);--ibiz-form-page-hover-bg-color:transparent;--ibiz-form-page-active-text-color:var(--ibiz-color-primary);--ibiz-form-page-active-bg-color:transparent;--ibiz-form-page-active-border-color:var(--ibiz-color-primary)}.ibiz-form-page--no-tab-header .ibiz-form-page-item{padding-top:0}.ibiz-form-page-tab>.el-tabs__header.is-top{margin-bottom:var(--ibiz-spacing-tight)}.ibiz-form-page-tab>.el-tabs__header.is-top .el-tabs__item.is-top{font-size:var(--ibiz-form-page-font-size);color:var(--ibiz-form-page-text-color);background-color:var(--ibiz-form-page-bg-color)}.ibiz-form-page-tab>.el-tabs__header.is-top .el-tabs__item.is-top:hover{color:var(--ibiz-form-page-hover-text-color);background-color:var(--ibiz-form-page-hover-bg-color)}.ibiz-form-page-tab>.el-tabs__header.is-top .el-tabs__item.is-top.is-active{color:var(--ibiz-form-page-active-text-color);background-color:var(--ibiz-form-page-active-bg-color)}.ibiz-form-page-tab .el-tabs__nav-wrap::after{background-color:var(--ibiz-form-page-header-border-color)}.ibiz-form-page-tab .el-tabs__active-bar{background-color:var(--ibiz-form-page-active-border-color)}.ibiz-form-page-item{padding-top:var(--ibiz-padding-top)}.ibiz-form-page-item-child{margin-bottom:var(--ibiz-margin-bottom)}
1
+ .ibiz-form-page{--ibiz-form-page-font-size:var(--ibiz-font-size-header-4);--ibiz-form-page-header-border-color:var(--ibiz-color-border);--ibiz-form-page-text-color:var(--ibiz-color-text-2);--ibiz-form-page-bg-color:transparent;--ibiz-form-page-hover-text-color:var(--ibiz-color-primary);--ibiz-form-page-hover-bg-color:transparent;--ibiz-form-page-active-text-color:var(--ibiz-color-primary);--ibiz-form-page-active-bg-color:transparent;--ibiz-form-page-active-border-color:var(--ibiz-color-primary)}.ibiz-form-page__left{height:100%}.ibiz-form-page__left>.el-tabs__header{height:100%}.ibiz-form-page__left>.el-tabs__content{height:100%;overflow:auto}.ibiz-form-page__right{height:100%}.ibiz-form-page__right>.el-tabs__header{height:100%}.ibiz-form-page__right>.el-tabs__content{height:100%;overflow:auto}.ibiz-form-page--no-tab-header .ibiz-form-page-item{padding-top:0}.ibiz-form-page-tab>.el-tabs__header.is-top{margin-bottom:var(--ibiz-spacing-tight)}.ibiz-form-page-tab>.el-tabs__header.is-top .el-tabs__item.is-top{font-size:var(--ibiz-form-page-font-size);color:var(--ibiz-form-page-text-color);background-color:var(--ibiz-form-page-bg-color)}.ibiz-form-page-tab>.el-tabs__header.is-top .el-tabs__item.is-top:hover{color:var(--ibiz-form-page-hover-text-color);background-color:var(--ibiz-form-page-hover-bg-color)}.ibiz-form-page-tab>.el-tabs__header.is-top .el-tabs__item.is-top.is-active{color:var(--ibiz-form-page-active-text-color);background-color:var(--ibiz-form-page-active-bg-color)}.ibiz-form-page-tab .el-tabs__nav-wrap::after{background-color:var(--ibiz-form-page-header-border-color)}.ibiz-form-page-tab .el-tabs__active-bar{background-color:var(--ibiz-form-page-active-border-color)}.ibiz-form-page-item{padding-top:var(--ibiz-padding-top)}.ibiz-form-page-item-child{margin-bottom:var(--ibiz-margin-bottom)}