@ibiz-template/mob-vue3-components 0.7.41-alpha.13 → 0.7.41-alpha.16

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 (86) hide show
  1. package/dist/{index-OsiEgFnw.js → index-5DjmQP8W.js} +2 -2
  2. package/dist/index-5DjmQP8W.js.map +1 -0
  3. package/dist/index-fAu1z4L0.js +2 -0
  4. package/dist/index-fAu1z4L0.js.map +1 -0
  5. package/dist/index-yjjy8EQH.js +76 -0
  6. package/dist/index-yjjy8EQH.js.map +1 -0
  7. package/dist/index.min.css +4 -4
  8. package/dist/index.system.min.js +1 -1
  9. package/dist/{quill-editor-VqApoQJq.js → quill-editor-6a0LLTGQ.js} +2 -2
  10. package/dist/{quill-editor-VqApoQJq.js.map → quill-editor-6a0LLTGQ.js.map} +1 -1
  11. package/dist/{quill-editor-preview-G0MpMJzC.js → quill-editor-preview-PFiM-IPE.js} +2 -2
  12. package/dist/{quill-editor-preview-G0MpMJzC.js.map → quill-editor-preview-PFiM-IPE.js.map} +1 -1
  13. package/dist/{quill-wfN-3C_3.js → quill-n54HJUg2.js} +2 -2
  14. package/dist/{quill-wfN-3C_3.js.map → quill-n54HJUg2.js.map} +1 -1
  15. package/dist/tree-4CqtwsXL.js +2 -0
  16. package/dist/tree-4CqtwsXL.js.map +1 -0
  17. package/es/common/action-group/action-group.css +1 -0
  18. package/es/common/action-group/action-group.d.ts +55 -0
  19. package/es/common/action-group/action-group.mjs +174 -0
  20. package/es/common/action-toolbar/action-toolbar.d.ts +1 -0
  21. package/es/common/action-toolbar/action-toolbar.mjs +20 -8
  22. package/es/common/button-list/button-list.css +1 -1
  23. package/es/common/button-list/button-list.d.ts +3 -2
  24. package/es/common/button-list/button-list.mjs +83 -63
  25. package/es/common/index.mjs +2 -0
  26. package/es/common/rawitem/rawitem.mjs +2 -2
  27. package/es/control/list/md-ctrl/md-ctrl.mjs +13 -15
  28. package/es/control/tab-exp-panel/index.d.ts +1 -0
  29. package/es/control/tab-exp-panel/tab-exp-panel.css +1 -0
  30. package/es/control/tab-exp-panel/tab-exp-panel.d.ts +2 -0
  31. package/es/control/tab-exp-panel/tab-exp-panel.mjs +28 -1
  32. package/es/control/tree/tree.css +1 -1
  33. package/es/control/tree/tree.d.ts +15 -0
  34. package/es/control/tree/tree.mjs +14 -2
  35. package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.d.ts +5 -7
  36. package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.mjs +18 -0
  37. package/es/editor/rate/ibiz-rate/ibiz-rate.d.ts +2 -1
  38. package/es/editor/rate/ibiz-rate/ibiz-rate.mjs +3 -0
  39. package/es/editor/raw/ibiz-raw/ibiz-raw.d.ts +2 -2
  40. package/es/editor/span/span/span.d.ts +5 -3
  41. package/es/editor/span/span/span.mjs +5 -5
  42. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.d.ts +4 -3
  43. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.mjs +9 -0
  44. package/es/editor/switch/ibiz-switch/ibiz-switch.d.ts +1 -0
  45. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +2 -1
  46. package/es/editor/text-box/input/input.d.ts +2 -0
  47. package/es/editor/upload/upload-editor.controller.d.ts +23 -2
  48. package/es/editor/upload/upload-editor.controller.mjs +46 -15
  49. package/es/editor/upload/use/use-van-upload.mjs +35 -3
  50. package/es/locale/en/index.d.ts +2 -0
  51. package/es/locale/en/index.mjs +2 -1
  52. package/es/locale/zh-CN/index.d.ts +2 -0
  53. package/es/locale/zh-CN/index.mjs +2 -1
  54. package/es/panel-component/panel-button-list/panel-button-list.controller.d.ts +1 -1
  55. package/es/panel-component/panel-button-list/panel-button-list.controller.mjs +19 -18
  56. package/es/util/store/view-stack/view-stack.mjs +11 -1
  57. package/lib/common/action-group/action-group.cjs +176 -0
  58. package/lib/common/action-group/action-group.css +1 -0
  59. package/lib/common/action-toolbar/action-toolbar.cjs +20 -8
  60. package/lib/common/button-list/button-list.cjs +82 -62
  61. package/lib/common/button-list/button-list.css +1 -1
  62. package/lib/common/index.cjs +2 -0
  63. package/lib/common/rawitem/rawitem.cjs +2 -2
  64. package/lib/control/list/md-ctrl/md-ctrl.cjs +12 -14
  65. package/lib/control/tab-exp-panel/tab-exp-panel.cjs +27 -0
  66. package/lib/control/tab-exp-panel/tab-exp-panel.css +1 -0
  67. package/lib/control/tree/tree.cjs +14 -2
  68. package/lib/control/tree/tree.css +1 -1
  69. package/lib/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.cjs +18 -0
  70. package/lib/editor/rate/ibiz-rate/ibiz-rate.cjs +3 -0
  71. package/lib/editor/span/span/span.cjs +5 -5
  72. package/lib/editor/stepper/ibiz-stepper/ibiz-stepper.cjs +9 -0
  73. package/lib/editor/upload/upload-editor.controller.cjs +46 -15
  74. package/lib/editor/upload/use/use-van-upload.cjs +35 -3
  75. package/lib/locale/en/index.cjs +2 -1
  76. package/lib/locale/zh-CN/index.cjs +2 -1
  77. package/lib/panel-component/panel-button-list/panel-button-list.controller.cjs +18 -17
  78. package/lib/util/store/view-stack/view-stack.cjs +11 -1
  79. package/package.json +6 -6
  80. package/dist/index-JSf84k9b.js +0 -2
  81. package/dist/index-JSf84k9b.js.map +0 -1
  82. package/dist/index-OsiEgFnw.js.map +0 -1
  83. package/dist/index-TTGYeV0q.js +0 -76
  84. package/dist/index-TTGYeV0q.js.map +0 -1
  85. package/dist/tree-nburezSg.js +0 -2
  86. package/dist/tree-nburezSg.js.map +0 -1
@@ -202,7 +202,8 @@ var index = {
202
202
  upload: {
203
203
  uploadJsonFormatErr: "The configuration of uploadparams did not follow the standard JSON format",
204
204
  exportJsonFormatErr: "The configuration of exportparams did not follow the standard JSON format",
205
- cancelUpload: "Cancel Upload"
205
+ cancelUpload: "Cancel Upload",
206
+ compressError: "Image compression failed"
206
207
  },
207
208
  emojiPicker: {
208
209
  addEmoji: "Add emoji"
@@ -102,6 +102,7 @@ declare const _default: {
102
102
  };
103
103
  runtime: {
104
104
  common: {
105
+ undefined: string;
105
106
  unrealized: string;
106
107
  noExplanation: string;
107
108
  };
@@ -931,6 +932,7 @@ declare const _default: {
931
932
  uploadJsonFormatErr: string;
932
933
  exportJsonFormatErr: string;
933
934
  cancelUpload: string;
935
+ compressError: string;
934
936
  };
935
937
  emojiPicker: {
936
938
  addEmoji: string;
@@ -187,7 +187,8 @@ var index = {
187
187
  upload: {
188
188
  uploadJsonFormatErr: "\u914D\u7F6Euploadparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F",
189
189
  exportJsonFormatErr: "\u914D\u7F6Eexportparams\u6CA1\u6709\u6309\u6807\u51C6JSON\u683C\u5F0F",
190
- cancelUpload: "\u53D6\u6D88\u4E0A\u4F20"
190
+ cancelUpload: "\u53D6\u6D88\u4E0A\u4F20",
191
+ compressError: "\u56FE\u7247\u538B\u7F29\u5931\u8D25"
191
192
  },
192
193
  emojiPicker: {
193
194
  addEmoji: "\u6DFB\u52A0\u8868\u60C5"
@@ -1,4 +1,4 @@
1
- import { PanelController, PanelItemController, PanelNotifyState } from '@ibiz-template/runtime';
1
+ import { PanelController, PanelNotifyState, PanelItemController } from '@ibiz-template/runtime';
2
2
  import { IPanelButtonList } from '@ibiz/model-core';
3
3
  import { PanelButtonListState } from './panel-button-list.state';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { PanelItemController, ButtonContainerState, UIActionButtonState, UIActionUtil } from '@ibiz-template/runtime';
1
+ import { PanelItemController, ButtonContainerState, getAllUIActionItems, UIActionButtonState, UIActionUtil } from '@ibiz-template/runtime';
2
2
  import { PanelButtonListState } from './panel-button-list.state.mjs';
3
3
 
4
4
  "use strict";
@@ -45,20 +45,22 @@ class PanelButtonListController extends PanelItemController {
45
45
  * @memberof PanelButtonListController
46
46
  */
47
47
  async initButtonsState() {
48
- var _a;
49
48
  const { buttonListType, uiactionGroup, panelButtons } = this.model;
50
49
  if (buttonListType === "UIACTIONGROUP") {
51
- (_a = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.forEach((detail) => {
52
- if (detail.uiactionId) {
53
- const buttonState = new UIActionButtonState(
54
- detail.id,
55
- this.model.appId,
56
- detail.uiactionId,
57
- detail
58
- );
59
- this.state.buttonsState.addState(detail.id, buttonState);
60
- }
61
- });
50
+ if (uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) {
51
+ const actions = getAllUIActionItems(uiactionGroup.uiactionGroupDetails);
52
+ actions.forEach((detail) => {
53
+ if (detail.uiactionId) {
54
+ const buttonState = new UIActionButtonState(
55
+ detail.id,
56
+ detail.appId,
57
+ detail.uiactionId,
58
+ detail
59
+ );
60
+ this.state.buttonsState.addState(detail.id, buttonState);
61
+ }
62
+ });
63
+ }
62
64
  } else {
63
65
  panelButtons == null ? void 0 : panelButtons.forEach((button) => {
64
66
  if (button.uiactionId) {
@@ -110,12 +112,11 @@ class PanelButtonListController extends PanelItemController {
110
112
  * @memberof PanelButtonListController
111
113
  */
112
114
  getModelById(id) {
113
- var _a;
114
115
  const { buttonListType, uiactionGroup, panelButtons } = this.model;
115
- if (buttonListType === "UIACTIONGROUP")
116
- return (_a = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.find(
117
- (detail) => detail.id === id
118
- );
116
+ if (buttonListType === "UIACTIONGROUP") {
117
+ const actions = getAllUIActionItems(uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails);
118
+ return actions.find((detail) => detail.id === id);
119
+ }
119
120
  return panelButtons == null ? void 0 : panelButtons.find((button) => button.id === id);
120
121
  }
121
122
  /**
@@ -27,6 +27,11 @@ const useViewStack = defineStore("viewStack", () => {
27
27
  cacheKeys: [],
28
28
  currentKey: ""
29
29
  });
30
+ const clear = () => {
31
+ viewStack.cacheKeys = [];
32
+ viewStack.currentKey = "";
33
+ viewInfoMap.clear();
34
+ };
30
35
  const updateViewInfo = (key, route) => {
31
36
  if (viewInfoMap.has(key)) {
32
37
  const info = viewInfoMap.get(key);
@@ -61,7 +66,12 @@ const useViewStack = defineStore("viewStack", () => {
61
66
  if (key === viewStack.currentKey) {
62
67
  updateViewInfo(key, to);
63
68
  } else if (viewStack.cacheKeys.includes(key)) {
64
- pop();
69
+ if (key === "/-/index/-") {
70
+ clear();
71
+ push(key, to);
72
+ } else {
73
+ pop();
74
+ }
65
75
  } else {
66
76
  push(key, to);
67
77
  }
@@ -0,0 +1,176 @@
1
+ 'use strict';
2
+
3
+ var vue = require('vue');
4
+ var vue3Util = require('@ibiz-template/vue3-util');
5
+ require('../../util/index.cjs');
6
+ require('./action-group.css');
7
+ var buttonUtil = require('../../util/button-util/button-util.cjs');
8
+
9
+ "use strict";
10
+ const IBizActionGroup = /* @__PURE__ */ vue.defineComponent({
11
+ name: "IBizActionGroup",
12
+ props: {
13
+ actionDetail: {
14
+ type: Object,
15
+ required: true
16
+ },
17
+ actionsState: {
18
+ type: Object,
19
+ required: true
20
+ },
21
+ popoverClassName: {
22
+ type: String
23
+ },
24
+ direction: {
25
+ type: String,
26
+ default: "horizontal"
27
+ }
28
+ },
29
+ emits: {
30
+ actionClick: (detail, event) => true,
31
+ popoverVisibleChange: (visible) => true
32
+ },
33
+ setup(props, {
34
+ emit
35
+ }) {
36
+ const ns = vue3Util.useNamespace("action-group");
37
+ const showPopover = vue.ref(false);
38
+ const buttonRef = vue.ref();
39
+ const childPopover = vue.ref(false);
40
+ const details = vue.computed(() => {
41
+ if (props.actionDetail.detailType === "DEUIACTIONGROUP" && props.actionDetail.refUIActionGroup)
42
+ return props.actionDetail.refUIActionGroup.uiactionGroupDetails || [];
43
+ return [];
44
+ });
45
+ const visible = vue.computed(() => {
46
+ const visible2 = details.value.some((item) => {
47
+ var _a, _b;
48
+ return (_b = (_a = props.actionsState) == null ? void 0 : _a[item.id]) == null ? void 0 : _b.visible;
49
+ });
50
+ return visible2;
51
+ });
52
+ const caption = vue.computed(() => {
53
+ var _a, _b;
54
+ return ((_a = props.actionDetail.refUIActionGroup) == null ? void 0 : _a.name) || ((_b = props.actionDetail.refUIActionGroup) == null ? void 0 : _b.id);
55
+ });
56
+ const placement = vue.computed(() => {
57
+ if (!buttonRef.value)
58
+ return props.direction === "horizontal" ? "right" : "bottom";
59
+ const {
60
+ innerWidth,
61
+ innerHeight
62
+ } = window;
63
+ const {
64
+ offsetLeft: x,
65
+ offsetTop: y,
66
+ offsetWidth: width
67
+ } = buttonRef.value.$el;
68
+ const centerX = innerWidth - width - 128;
69
+ const centerY = details.value.length ? innerHeight - details.value.length * 44 : innerHeight / 2;
70
+ if (y > centerY) {
71
+ if (props.direction === "horizontal")
72
+ return x > centerX ? "left-end" : "right-end";
73
+ return x > centerX ? "top-end" : "top-start";
74
+ }
75
+ if (props.direction === "horizontal")
76
+ return x > centerX ? "left-start" : "right-start";
77
+ return x > centerX ? "bottom-end" : "bottom-start";
78
+ });
79
+ const handleClick = async (detail, event, closePopover = false) => {
80
+ if (closePopover)
81
+ showPopover.value = false;
82
+ emit("actionClick", detail, event);
83
+ };
84
+ const onPopoverVisibleChange = (visible2) => {
85
+ emit("popoverVisibleChange", visible2);
86
+ };
87
+ const renderSeparator = (visible2) => {
88
+ if (visible2)
89
+ return vue.createVNode("div", {
90
+ "class": ns.e("separator")
91
+ }, null);
92
+ };
93
+ const renderActions = () => {
94
+ var _a;
95
+ return (_a = details.value) == null ? void 0 : _a.map((detail) => {
96
+ var _a2, _b, _c;
97
+ if (detail.detailType === "DEUIACTIONGROUP")
98
+ return [renderSeparator(detail.addSeparator), vue.createVNode(vue.resolveComponent("iBizActionGroup"), {
99
+ "actionDetail": detail,
100
+ "onActionClick": handleClick,
101
+ "actionsState": props.actionsState,
102
+ "popoverClassName": props.popoverClassName,
103
+ "onPopoverVisibleChange": (visible2) => childPopover.value = visible2
104
+ }, null)];
105
+ if ((_b = (_a2 = props.actionsState) == null ? void 0 : _a2[detail.id]) == null ? void 0 : _b.visible)
106
+ return [renderSeparator(detail.addSeparator), vue.createVNode(vue.resolveComponent("van-button"), {
107
+ "size": "small",
108
+ "type": buttonUtil.convertBtnType(detail.buttonStyle),
109
+ "text": detail.showCaption ? detail.caption : "",
110
+ "onClick": (e) => handleClick(detail, e, true),
111
+ "disabled": props.actionsState[detail.id].disabled,
112
+ "class": [ns.e("item"), (_c = detail.sysCss) == null ? void 0 : _c.codeName]
113
+ }, {
114
+ icon: () => {
115
+ return detail.showIcon && detail.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
116
+ "icon": detail.sysImage
117
+ }, null);
118
+ }
119
+ })];
120
+ return null;
121
+ });
122
+ };
123
+ return {
124
+ ns,
125
+ visible,
126
+ caption,
127
+ buttonRef,
128
+ placement,
129
+ showPopover,
130
+ childPopover,
131
+ renderActions,
132
+ onPopoverVisibleChange
133
+ };
134
+ },
135
+ render() {
136
+ if (this.visible)
137
+ return vue.createVNode(vue.resolveComponent("van-popover"), {
138
+ "placement": this.placement,
139
+ "show": this.showPopover,
140
+ "onUpdate:show": ($event) => this.showPopover = $event,
141
+ "close-on-click-outside": !this.childPopover,
142
+ "class": [this.ns.b(), this.popoverClassName],
143
+ "onOpen": () => this.onPopoverVisibleChange(true),
144
+ "onClose": () => this.onPopoverVisibleChange(false)
145
+ }, {
146
+ reference: () => {
147
+ return vue.createVNode(vue.resolveComponent("van-button"), {
148
+ "size": "small",
149
+ "ref": "buttonRef",
150
+ "class": this.ns.e("button"),
151
+ "type": buttonUtil.convertBtnType(this.actionDetail.buttonStyle)
152
+ }, {
153
+ icon: () => {
154
+ return this.actionDetail.showIcon && this.actionDetail.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
155
+ "icon": this.actionDetail.sysImage
156
+ }, null);
157
+ },
158
+ default: () => {
159
+ return [vue.createVNode("div", {
160
+ "class": this.ns.em("button", "text")
161
+ }, [this.actionDetail.showCaption ? this.caption : ""]), vue.createVNode("ion-icon", {
162
+ "class": this.ns.em("button", "icon"),
163
+ "name": this.direction === "horizontal" ? "chevron-forward-outline" : "chevron-down-outline"
164
+ }, null)];
165
+ }
166
+ });
167
+ },
168
+ default: () => {
169
+ return this.renderActions();
170
+ }
171
+ });
172
+ return void 0;
173
+ }
174
+ });
175
+
176
+ exports.IBizActionGroup = IBizActionGroup;
@@ -0,0 +1 @@
1
+ .ibiz-action-group__separator{width:100%;height:.0625rem;display:inline-block;vertical-align:middle;background-color:var(--ibiz-color-border)}.ibiz-action-group__button .van-button__text{display:flex;align-items:center;gap:var(--ibiz-spacing-extra-tight)}.ibiz-action-group .van-popover__content{display:flex;flex-direction:column}.ibiz-action-group .van-popover__content .van-button{padding:0;font-size:var(--van-popover-action-font-size);line-height:var(--van-line-height-md);width:var(--van-popover-action-width);height:var(--van-popover-action-height);border-color:var(--ibiz-color-white)}.ibiz-action-group .van-popover__content .van-button:before{border-color:var(--ibiz-color-white)}.ibiz-action-group .van-popover__content .van-button .van-button__text{display:flex;align-items:center;gap:var(--ibiz-spacing-extra-tight)}
@@ -32,27 +32,40 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
32
32
  event.stopPropagation();
33
33
  emit("action-click", detail, event);
34
34
  };
35
+ const renderSeparator = () => {
36
+ return vue.createVNode("div", {
37
+ "class": ns.e("separator")
38
+ }, null);
39
+ };
35
40
  return {
36
41
  ns,
37
- handleClick
42
+ handleClick,
43
+ renderSeparator
38
44
  };
39
45
  },
40
46
  render() {
41
47
  const details = this.actionDetails || [];
42
- if (this.mode === "buttons") {
48
+ if (this.mode === "buttons")
43
49
  return vue.createVNode("div", {
44
50
  "class": [this.ns.b(), this.ns.m("buttons")]
45
51
  }, [details.length > 0 && details.map((detail) => {
46
- if (this.actionsState[detail.id].visible) {
47
- return [detail.addSeparator && vue.createVNode("div", {
48
- "class": this.ns.e("separator")
49
- }, null), vue.createVNode(vue.resolveComponent("van-button"), {
52
+ var _a, _b, _c;
53
+ if (detail.detailType === "DEUIACTIONGROUP")
54
+ return [detail.addSeparator && this.renderSeparator(), vue.createVNode(vue.resolveComponent("iBizActionGroup"), {
55
+ "direction": "vertical",
56
+ "actionDetail": detail,
57
+ "actionsState": this.actionsState,
58
+ "onActionClick": this.handleClick,
59
+ "popoverClassName": this.ns.b("action-group")
60
+ }, null)];
61
+ if ((_b = (_a = this.actionsState) == null ? void 0 : _a[detail.id]) == null ? void 0 : _b.visible) {
62
+ return [detail.addSeparator && this.renderSeparator(), vue.createVNode(vue.resolveComponent("van-button"), {
50
63
  "size": "small",
51
64
  "text": detail.showCaption ? detail.caption : "",
52
65
  "type": buttonUtil.convertBtnType(detail.buttonStyle),
53
66
  "onClick": (e) => this.handleClick(detail, e),
54
67
  "disabled": this.actionsState[detail.id].disabled,
55
- "class": [this.ns.e("item"), this.ns.is("disabled", false)]
68
+ "class": [this.ns.e("item"), this.ns.is("disabled", false), (_c = detail.sysCss) == null ? void 0 : _c.codeName]
56
69
  }, {
57
70
  icon: () => {
58
71
  return detail.showIcon && detail.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
@@ -63,7 +76,6 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
63
76
  }
64
77
  return null;
65
78
  })]);
66
- }
67
79
  return vue.createVNode("div", null, [ibiz.i18n.t("component.actionToolbar.noSupportDropDown")]);
68
80
  }
69
81
  });
@@ -31,6 +31,36 @@ const IBizButtonList = /* @__PURE__ */ vue.defineComponent({
31
31
  }) {
32
32
  const ns = vue3Util.useNamespace("button-list");
33
33
  const showPopover = vue.ref(false);
34
+ const buttonRef = vue.ref();
35
+ const childPopover = vue.ref(false);
36
+ const details = vue.computed(() => {
37
+ const {
38
+ buttonListType,
39
+ uiactionGroup
40
+ } = props.model;
41
+ if (buttonListType === "UIACTIONGROUP")
42
+ return (uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) || [];
43
+ return props.model.panelButtons || props.model.deformButtons || [];
44
+ });
45
+ const placement = vue.computed(() => {
46
+ if (!buttonRef.value)
47
+ return "bottom";
48
+ const {
49
+ innerWidth,
50
+ innerHeight
51
+ } = window;
52
+ const {
53
+ offsetLeft: x,
54
+ offsetTop: y,
55
+ offsetWidth: width
56
+ } = buttonRef.value.$el;
57
+ const centerX = innerWidth - width - 128;
58
+ const centerY = details.value.length ? innerHeight - details.value.length * 44 : innerHeight / 2;
59
+ if (y > centerY) {
60
+ return x > centerX ? "top-end" : "top-start";
61
+ }
62
+ return x > centerX ? "bottom-end" : "bottom-start";
63
+ });
34
64
  const buttonListStyle = vue.computed(() => {
35
65
  const {
36
66
  itemStyle,
@@ -39,102 +69,90 @@ const IBizButtonList = /* @__PURE__ */ vue.defineComponent({
39
69
  return itemStyle || detailStyle || "DEFAULT";
40
70
  });
41
71
  const handleClick = (item, e) => {
72
+ e == null ? void 0 : e.stopPropagation();
42
73
  emit("click", item.id, e);
43
74
  };
44
75
  const onChangePopover = (e) => {
45
76
  e.stopPropagation();
46
77
  showPopover.value = !showPopover.value;
47
78
  };
48
- const details = vue.computed(() => {
49
- const {
50
- buttonListType,
51
- uiactionGroup
52
- } = props.model;
53
- if (buttonListType === "UIACTIONGROUP")
54
- return (uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) || [];
55
- return props.model.panelButtons || props.model.deformButtons || [];
56
- });
57
- const actions = vue.computed(() => {
58
- return details.value.filter((detail) => {
59
- var _a;
60
- return ((_a = props.buttonsState[detail.id]) == null ? void 0 : _a.visible) !== false;
61
- }).map((detail) => {
62
- var _a, _b;
63
- return {
64
- ...detail,
65
- disabled: (_a = props.buttonsState[detail.id]) == null ? void 0 : _a.disabled,
66
- className: (_b = detail.sysCss) == null ? void 0 : _b.cssName
67
- };
68
- });
69
- });
70
- const renderActions = () => {
71
- return vue.createVNode("div", {
72
- "class": ns.e("content")
73
- }, [details.value.map((item) => {
79
+ const renderSeparator = (visible) => {
80
+ if (visible)
81
+ return vue.createVNode("div", {
82
+ "class": ns.e("separator")
83
+ }, null);
84
+ };
85
+ const renderActions = (direction) => {
86
+ const showSeparator = direction === "vertical";
87
+ return details.value.map((item) => {
74
88
  var _a, _b, _c, _d;
75
- if (((_a = props.buttonsState[item.id]) == null ? void 0 : _a.visible) === false)
76
- return;
77
- return vue.createVNode(vue.resolveComponent("van-button"), {
78
- "class": [ns.e("item"), ns.em("item", `${(_b = item.id) == null ? void 0 : _b.toLowerCase()}`), (_c = item.sysCss) == null ? void 0 : _c.cssName],
79
- "size": "small",
80
- "type": buttonUtil.convertBtnType(item.buttonStyle),
81
- "disabled": ((_d = props.buttonsState[item.id]) == null ? void 0 : _d.disabled) || props.disabled,
82
- "onClick": (event) => handleClick(item, event)
83
- }, {
84
- default: () => [item.showIcon !== false && vue.createVNode(vue.resolveComponent("iBizIcon"), {
85
- "icon": item.sysImage,
86
- "class": ns.em("item", "icon")
87
- }, null), item.showCaption && vue.createVNode("span", {
88
- "class": ns.em("item", "caption")
89
- }, [item.caption])]
90
- });
91
- })]);
89
+ if (item.detailType === "DEUIACTIONGROUP")
90
+ return [renderSeparator(item.addSeparator && showSeparator), vue.createVNode(vue.resolveComponent("iBizActionGroup"), {
91
+ "actionDetail": item,
92
+ "onActionClick": handleClick,
93
+ "actionsState": props.buttonsState,
94
+ "popoverClassName": ns.b("action-group"),
95
+ "onPopoverVisibleChange": (visible) => childPopover.value = visible,
96
+ "direction": direction === "horizontal" ? "vertical" : "horizontal"
97
+ }, null)];
98
+ if ((_a = props.buttonsState[item.id]) == null ? void 0 : _a.visible)
99
+ return [renderSeparator(item.addSeparator && showSeparator), vue.createVNode(vue.resolveComponent("van-button"), {
100
+ "size": "small",
101
+ "class": [ns.e("item"), ns.em("item", `${(_b = item.id) == null ? void 0 : _b.toLowerCase()}`), (_c = item.sysCss) == null ? void 0 : _c.cssName],
102
+ "type": buttonUtil.convertBtnType(item.buttonStyle),
103
+ "disabled": ((_d = props.buttonsState[item.id]) == null ? void 0 : _d.disabled) || props.disabled,
104
+ "onClick": (event) => handleClick(item, event)
105
+ }, {
106
+ default: () => [item.showIcon !== false && vue.createVNode(vue.resolveComponent("iBizIcon"), {
107
+ "icon": item.sysImage,
108
+ "class": ns.em("item", "icon")
109
+ }, null), item.showCaption && vue.createVNode("span", {
110
+ "class": ns.em("item", "caption")
111
+ }, [item.caption])]
112
+ })];
113
+ return null;
114
+ });
92
115
  };
93
116
  const renderDropdown = () => {
94
117
  return vue.createVNode(vue.resolveComponent("van-popover"), {
95
118
  "class": ns.e("popover"),
96
- "placement": "bottom-end",
97
- "actions": actions.value,
119
+ "placement": placement.value,
98
120
  "show": showPopover.value,
99
121
  "onUpdate:show": ($event) => showPopover.value = $event,
100
- "onSelect": (data) => handleClick(data)
122
+ "close-on-click-outside": !childPopover.value
101
123
  }, {
102
- action: ({
103
- action
104
- }) => {
105
- return vue.createVNode("span", {
106
- "class": ns.em("popover", "item")
107
- }, [action.showIcon !== false && action.sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
108
- "icon": action.sysImage
109
- }, null), action.showCaption && action.caption]);
110
- },
111
124
  reference: () => {
112
125
  const {
113
126
  caption,
114
- sysImage,
115
- showCaption
127
+ sysImage
116
128
  } = props.model;
117
129
  return vue.createVNode(vue.resolveComponent("van-button"), {
118
130
  "size": "small",
131
+ "ref": "buttonRef",
132
+ "class": ns.e("button"),
119
133
  "disabled": props.disabled,
120
134
  "onClick": onChangePopover,
121
135
  "type": buttonUtil.convertBtnType(buttonListStyle.value)
122
136
  }, {
123
137
  default: () => [sysImage && vue.createVNode(vue.resolveComponent("iBizIcon"), {
124
- "class": ns.em("popover", "icon"),
138
+ "class": ns.em("button", "icon"),
125
139
  "icon": sysImage
126
- }, null), showCaption && vue.createVNode("span", {
127
- "class": ns.em("popover", "caption")
140
+ }, null), caption && vue.createVNode("span", {
141
+ "class": ns.em("button", "caption")
128
142
  }, [caption, vue.createVNode("ion-icon", {
129
143
  "name": "chevron-down-outline",
130
- "class": ns.em("popover", "more")
144
+ "class": ns.em("button", "more")
131
145
  }, null)])]
132
146
  });
147
+ },
148
+ default: () => {
149
+ return renderActions("vertical");
133
150
  }
134
151
  });
135
152
  };
136
153
  return {
137
154
  ns,
155
+ buttonRef,
138
156
  renderDropdown,
139
157
  renderActions
140
158
  };
@@ -144,7 +162,9 @@ const IBizButtonList = /* @__PURE__ */ vue.defineComponent({
144
162
  return vue.createVNode("div", {
145
163
  "class": [this.ns.b(), this.ns.m(this.model.id), this.ns.m((_a = this.model.actionGroupExtractMode) == null ? void 0 : _a.toLowerCase())],
146
164
  "style": this.model.cssStyle
147
- }, [this.model.actionGroupExtractMode === "ITEM" || this.model.buttonListType === "BUTTONS" ? this.renderActions() : this.renderDropdown()]);
165
+ }, [this.model.actionGroupExtractMode === "ITEM" || this.model.buttonListType === "BUTTONS" ? vue.createVNode("div", {
166
+ "class": this.ns.e("content")
167
+ }, [this.renderActions("horizontal")]) : this.renderDropdown()]);
148
168
  }
149
169
  });
150
170
 
@@ -1 +1 @@
1
- .ibiz-button-list{width:100%;height:100%}.ibiz-button-list .van-button{border:none}.ibiz-button-list .van-button .van-button__text{display:flex;align-items:center;gap:var(--ibiz-spacing-extra-tight)}.ibiz-button-list .van-button .van-button__text .ibiz-icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-width-icon-medium);height:var(--ibiz-width-icon-medium);font-size:var(--ibiz-width-icon-medium)}.ibiz-button-list__content{display:flex;flex-wrap:wrap;gap:var(--ibiz-spacing-extra-tight)}.ibiz-button-list__popover{--ibiz-color-bg-0:var(--van-popover-light-text-color)}.ibiz-button-list__popover .van-popover__action--disabled,.ibiz-button-list__popover .van-popover__action--disabled:active{color:var(--ibiz-color-disabled-text)!important;background-color:var(--ibiz-color-disabled-bg)}.ibiz-button-list__popover--item{display:flex;align-items:center;gap:var(--ibiz-spacing-extra-tight)}.ibiz-button-list__popover--item .ibiz-icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-width-icon-medium);height:var(--ibiz-width-icon-medium);font-size:var(--ibiz-width-icon-medium)}.ibiz-button-list__popover--caption{display:flex;line-height:100%;align-items:center;gap:var(--ibiz-spacing-extra-tight)}
1
+ .ibiz-button-list{width:100%;height:100%}.ibiz-button-list .van-button{border:none}.ibiz-button-list .van-button .van-button__text{display:flex;align-items:center;gap:var(--ibiz-spacing-extra-tight)}.ibiz-button-list .van-button .van-button__text .ibiz-icon{display:flex;align-items:center;justify-content:center;width:var(--ibiz-width-icon-medium);height:var(--ibiz-width-icon-medium);font-size:var(--ibiz-width-icon-medium)}.ibiz-button-list__content{display:flex;flex-wrap:wrap;gap:var(--ibiz-spacing-extra-tight)}.ibiz-button-list__button--caption{display:flex;line-height:100%;align-items:center;gap:var(--ibiz-spacing-extra-tight)}.ibiz-button-list__popover{--ibiz-color-bg-0:var(--van-popover-light-text-color)}.ibiz-button-list__popover .van-popover__action--disabled,.ibiz-button-list__popover .van-popover__action--disabled:active{color:var(--ibiz-color-disabled-text)!important;background-color:var(--ibiz-color-disabled-bg)}.ibiz-button-list__popover .van-popover__content{display:flex;flex-direction:column}.ibiz-button-list__popover .van-popover__content .van-button{padding:0;font-size:var(--van-popover-action-font-size);line-height:var(--van-line-height-md);width:var(--van-popover-action-width);height:var(--van-popover-action-height);border-color:var(--ibiz-color-white)}.ibiz-button-list__popover .van-popover__content .van-button:before{border-color:var(--ibiz-color-white)}.ibiz-button-list__popover .van-popover__content .van-button .van-button__text{display:flex;align-items:center;gap:var(--ibiz-spacing-extra-tight)}
@@ -19,10 +19,12 @@ var mdCtrlSetting = require('./md-ctrl-setting/md-ctrl-setting.cjs');
19
19
  var previewImage = require('./preview-image/preview-image.cjs');
20
20
  var dateRangePicker = require('./date-range-picker/date-range-picker.cjs');
21
21
  var cropping = require('./cropping/cropping.cjs');
22
+ var actionGroup = require('./action-group/action-group.cjs');
22
23
 
23
24
  "use strict";
24
25
  const IBizCommonComponents = {
25
26
  install: (v) => {
27
+ v.component(actionGroup.IBizActionGroup.name, actionGroup.IBizActionGroup);
26
28
  v.component(dateRangePicker.IBizDateRangeCalendar.name, dateRangePicker.IBizDateRangeCalendar);
27
29
  v.component(vue3Util.IBizViewShell.name, vue3Util.IBizViewShell);
28
30
  v.component(row.IBizRow.name, row.IBizRow);
@@ -87,7 +87,7 @@ const IBizRawItem = /* @__PURE__ */ vue.defineComponent({
87
87
  }
88
88
  }
89
89
  }
90
- if (["TEXT", "HEADING1", "HEADING2", "HEADING3", "HEADING4", "HEADING5", "HEADING6", "PARAGRAPH", "HTML"].includes(rawItemType.value)) {
90
+ if (["TEXT", "HEADING1", "HEADING2", "HEADING3", "HEADING4", "HEADING5", "HEADING6", "PARAGRAPH", "HTML", "RAW"].includes(rawItemType.value)) {
91
91
  rawItemText.value = rawItemContent.value;
92
92
  if (typeof rawItemText.value === "string") {
93
93
  rawItemText.value = rawItemText.value.replaceAll("&lt;", "<");
@@ -163,7 +163,7 @@ const IBizRawItem = /* @__PURE__ */ vue.defineComponent({
163
163
  "icon": this.rawItemContent
164
164
  }, null);
165
165
  }
166
- if (this.rawItemType === "TEXT") {
166
+ if (this.rawItemType === "TEXT" || this.rawItemType === "RAW") {
167
167
  return vue.createVNode("span", {
168
168
  "class": this.ns.e("text")
169
169
  }, [this.rawItemText]);
@@ -149,24 +149,22 @@ const MDCtrlControl = /* @__PURE__ */ vue.defineComponent({
149
149
  const leftSlidingActionGroup = c.model.deuiactionGroup;
150
150
  const rightSlidingActionGroup = c.model.deuiactionGroup2;
151
151
  const renderSlidingActionGroup = (group, data) => {
152
- const groupDetails = group.uiactionGroupDetails || [];
153
- if (!groupDetails || groupDetails.length === 0) {
152
+ const groupDetails = runtime.getAllUIActionItems(group.uiactionGroupDetails);
153
+ if (!groupDetails || groupDetails.length === 0)
154
154
  return null;
155
- }
156
155
  const row = c.state.rows.find((rowData) => data.srfkey === rowData.data.srfkey);
157
156
  const btnContainer = row.uaColStates[group.id];
158
157
  return groupDetails.map((detail) => {
159
- const btn = btnContainer[detail.id];
160
- if (btn.visible === false) {
161
- return null;
162
- }
163
- return vue.createVNode(vue.resolveComponent("van-button"), {
164
- "square": true,
165
- "type": "primary",
166
- "text": detail.caption,
167
- "disabled": btn.disabled || btn.loading,
168
- "onClick": (e) => c.onActionClick(detail, row, e)
169
- }, null);
158
+ const btn = btnContainer == null ? void 0 : btnContainer[detail.id];
159
+ if (btn == null ? void 0 : btn.visible)
160
+ return vue.createVNode(vue.resolveComponent("van-button"), {
161
+ "square": true,
162
+ "type": "primary",
163
+ "text": detail.caption,
164
+ "disabled": btn.disabled || btn.loading,
165
+ "onClick": (e) => c.onActionClick(detail, row, e)
166
+ }, null);
167
+ return null;
170
168
  });
171
169
  };
172
170
  const renderDefaultItem = (data) => {