@ibiz-template/vue3-components 0.7.41-alpha.6 → 0.7.41-alpha.8
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/{index-4CBJktLS.js → index-CsiyXR27.js} +1 -1
- package/dist/index-bg15JdWL.js +4 -0
- package/dist/{index-QL7Ukex9.js → index-tjsobxd3.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-kEzIt0zV.js → wang-editor-7B_U_6_C.js} +1 -1
- package/dist/{xlsx-util-_VPcoWqm.js → xlsx-util-J0IypI5_.js} +1 -1
- package/es/common/editor-empty-text/editor-empty-text.css +1 -0
- package/es/common/editor-empty-text/editor-empty-text.d.ts +25 -0
- package/es/common/editor-empty-text/editor-empty-text.mjs +31 -0
- package/es/common/index.mjs +2 -0
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/data-view/data-view.mjs +4 -4
- package/es/control/drbar/drbar.controller.mjs +3 -1
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/drtab/drtab.controller.mjs +3 -5
- package/es/control/drtab/drtab.d.ts +13 -0
- package/es/control/drtab/drtab.mjs +7 -1
- package/es/control/drtab/index.d.ts +7 -0
- package/es/control/kanban/kanban.css +1 -1
- package/es/control/kanban/kanban.d.ts +2 -2
- package/es/control/kanban/kanban.mjs +14 -9
- package/es/control/kanban/lane-kanban/lane-kanban.css +1 -0
- package/es/control/kanban/lane-kanban/lane-kanban.d.ts +27 -0
- package/es/control/kanban/lane-kanban/lane-kanban.mjs +409 -0
- package/es/control/toolbar/toolbar.css +1 -1
- package/es/control/toolbar/toolbar.mjs +232 -132
- package/es/control/tree/el-tree-util.d.ts +11 -0
- package/es/control/tree/el-tree-util.mjs +35 -1
- package/es/control/tree/index.d.ts +1 -0
- package/es/control/tree/tree.css +1 -1
- package/es/control/tree/tree.d.ts +2 -2
- package/es/control/tree/tree.mjs +61 -5
- package/es/control/wizard-panel/wizard-panel.css +1 -1
- package/es/control/wizard-panel/wizard-panel.mjs +24 -8
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.mjs +4 -1
- package/es/editor/cascader/ibiz-cascader/ibiz-cascader.mjs +4 -1
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +4 -1
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +11 -12
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +17 -17
- package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.mjs +10 -9
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +4 -1
- package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.mjs +4 -1
- package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.mjs +4 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +4 -1
- package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.mjs +4 -1
- package/es/editor/map-picker/ibiz-map-picker/ibiz-map-picker.mjs +4 -1
- package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.mjs +4 -1
- package/es/editor/raw/ibiz-raw/ibiz-raw.d.ts +2 -2
- package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +2 -0
- package/es/editor/span/span/span.d.ts +3 -3
- package/es/editor/span/span/span.mjs +7 -4
- package/es/editor/stepper/ibiz-stepper/ibiz-stepper.mjs +2 -1
- package/es/editor/switch/ibiz-switch/ibiz-switch.d.ts +1 -1
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +2 -2
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +5 -2
- package/es/editor/text-box/input/input.d.ts +4 -3
- package/es/editor/text-box/input/input.mjs +6 -3
- package/es/locale/en/index.d.ts +6 -0
- package/es/locale/en/index.mjs +5 -0
- package/es/locale/zh-CN/index.d.ts +6 -0
- package/es/locale/zh-CN/index.mjs +5 -0
- package/es/panel-component/app-extend-menu/bottom-side-menu/bottom-side-menu.css +1 -1
- package/es/panel-component/app-extend-menu/extend-menu-base/common-extend-menu/common-extend-menu.d.ts +1 -0
- package/es/panel-component/app-extend-menu/extend-menu-base/common-extend-menu/common-extend-menu.mjs +25 -4
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-button-menu/extend-button-menu.css +1 -0
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-button-menu/extend-button-menu.d.ts +2030 -0
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-button-menu/extend-button-menu.mjs +231 -0
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-menu-base.util.d.ts +166 -0
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-menu-base.util.mjs +339 -0
- package/es/panel-component/app-extend-menu/left-side-menu/left-side-menu.css +1 -1
- package/es/panel-component/app-extend-menu/right-side-menu/right-side-menu.css +1 -1
- package/es/panel-component/app-extend-menu/top-side-menu/top-side-menu.css +1 -1
- package/es/util/app-util/app-util.d.ts +6 -0
- package/es/util/app-util/app-util.mjs +8 -0
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/view-engine/app-start-view.engine.d.ts +12 -0
- package/es/view-engine/app-start-view.engine.mjs +11 -0
- package/es/view-engine/app-welcome-view.engine.d.ts +12 -0
- package/es/view-engine/app-welcome-view.engine.mjs +11 -0
- package/es/view-engine/edit-view.engine.d.ts +11 -2
- package/es/view-engine/edit-view.engine.mjs +23 -8
- package/es/view-engine/edit-view4.engine.mjs +4 -0
- package/es/view-engine/index.mjs +10 -0
- package/es/view-engine/opt-view.engine.d.ts +11 -2
- package/es/view-engine/opt-view.engine.mjs +23 -8
- package/es/view-engine/tab-exp-view.engine.mjs +1 -0
- package/lib/common/editor-empty-text/editor-empty-text.cjs +33 -0
- package/lib/common/editor-empty-text/editor-empty-text.css +1 -0
- package/lib/common/index.cjs +2 -0
- package/lib/control/data-view/data-view.cjs +4 -4
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drbar/drbar.controller.cjs +3 -1
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/drtab/drtab.cjs +7 -1
- package/lib/control/drtab/drtab.controller.cjs +3 -5
- package/lib/control/kanban/kanban.cjs +14 -9
- package/lib/control/kanban/kanban.css +1 -1
- package/lib/control/kanban/lane-kanban/lane-kanban.cjs +411 -0
- package/lib/control/kanban/lane-kanban/lane-kanban.css +1 -0
- package/lib/control/toolbar/toolbar.cjs +232 -132
- package/lib/control/toolbar/toolbar.css +1 -1
- package/lib/control/tree/el-tree-util.cjs +35 -0
- package/lib/control/tree/tree.cjs +59 -3
- package/lib/control/tree/tree.css +1 -1
- package/lib/control/wizard-panel/wizard-panel.cjs +23 -7
- package/lib/control/wizard-panel/wizard-panel.css +1 -1
- package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.cjs +4 -1
- package/lib/editor/cascader/ibiz-cascader/ibiz-cascader.cjs +4 -1
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +4 -1
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +11 -12
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +17 -17
- package/lib/editor/data-picker/ibiz-picker-link/ibiz-picker-link.cjs +9 -8
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +4 -1
- package/lib/editor/date-picker/ibiz-date-picker/ibiz-date-picker.cjs +4 -1
- package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.cjs +4 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +4 -1
- package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.cjs +4 -1
- package/lib/editor/map-picker/ibiz-map-picker/ibiz-map-picker.cjs +4 -1
- package/lib/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.cjs +4 -1
- package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +2 -0
- package/lib/editor/span/span/span.cjs +7 -4
- package/lib/editor/stepper/ibiz-stepper/ibiz-stepper.cjs +2 -1
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +5 -2
- package/lib/editor/text-box/input/input.cjs +6 -3
- package/lib/locale/en/index.cjs +5 -0
- package/lib/locale/zh-CN/index.cjs +5 -0
- package/lib/panel-component/app-extend-menu/bottom-side-menu/bottom-side-menu.css +1 -1
- package/lib/panel-component/app-extend-menu/extend-menu-base/common-extend-menu/common-extend-menu.cjs +24 -3
- package/lib/panel-component/app-extend-menu/extend-menu-base/extend-button-menu/extend-button-menu.cjs +233 -0
- package/lib/panel-component/app-extend-menu/extend-menu-base/extend-button-menu/extend-button-menu.css +1 -0
- package/lib/panel-component/app-extend-menu/extend-menu-base/extend-menu-base.util.cjs +344 -0
- package/lib/panel-component/app-extend-menu/left-side-menu/left-side-menu.css +1 -1
- package/lib/panel-component/app-extend-menu/right-side-menu/right-side-menu.css +1 -1
- package/lib/panel-component/app-extend-menu/top-side-menu/top-side-menu.css +1 -1
- package/lib/util/app-util/app-util.cjs +8 -0
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/view-engine/app-start-view.engine.cjs +13 -0
- package/lib/view-engine/app-welcome-view.engine.cjs +13 -0
- package/lib/view-engine/edit-view.engine.cjs +23 -8
- package/lib/view-engine/edit-view4.engine.cjs +4 -0
- package/lib/view-engine/index.cjs +10 -0
- package/lib/view-engine/opt-view.engine.cjs +23 -8
- package/lib/view-engine/tab-exp-view.engine.cjs +1 -0
- package/package.json +8 -8
- package/dist/index-2Djp0sQl.js +0 -4
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.2_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.7_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_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.2_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.7_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { ref, h, onMounted, onUnmounted } from 'vue';
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
function useCascaderPopover(props, ns, menuAlign, renderCascaderContent) {
|
|
5
|
+
let hoverCount = 0;
|
|
6
|
+
let closeTimer = null;
|
|
7
|
+
const overlayInstances = /* @__PURE__ */ new Map();
|
|
8
|
+
const activeMenuIdStack = ref([]);
|
|
9
|
+
const rotatedArrowElements = /* @__PURE__ */ new Map();
|
|
10
|
+
const getOverlayNum = () => {
|
|
11
|
+
return overlayInstances.size;
|
|
12
|
+
};
|
|
13
|
+
const getPopoverPlacement = (level) => {
|
|
14
|
+
switch (props.position) {
|
|
15
|
+
case "TOP":
|
|
16
|
+
return level > 0 ? "right-start" : "bottom-start";
|
|
17
|
+
case "BOTTOM":
|
|
18
|
+
return level > 0 ? "right-end" : "top-start";
|
|
19
|
+
case "RIGHT":
|
|
20
|
+
return "left-start";
|
|
21
|
+
case "LEFT":
|
|
22
|
+
return "right-start";
|
|
23
|
+
default:
|
|
24
|
+
return void 0;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const clearCloseTimer = () => {
|
|
28
|
+
if (closeTimer) {
|
|
29
|
+
clearTimeout(closeTimer);
|
|
30
|
+
closeTimer = null;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const resetArrowRotation = (ns2, key) => {
|
|
34
|
+
const arrow = rotatedArrowElements.get(key);
|
|
35
|
+
if (!arrow)
|
|
36
|
+
return;
|
|
37
|
+
arrow.classList.remove(ns2.is("rotate-arrow", true));
|
|
38
|
+
rotatedArrowElements.delete(key);
|
|
39
|
+
};
|
|
40
|
+
const rotateArrowIcon = (el, ns2, key) => {
|
|
41
|
+
if (el) {
|
|
42
|
+
el.classList.add(ns2.is("rotate-arrow", true));
|
|
43
|
+
rotatedArrowElements.set(key, el);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const closePopoverAtLevel = (key) => {
|
|
47
|
+
const overlay = overlayInstances.get(key);
|
|
48
|
+
if (overlay) {
|
|
49
|
+
overlay.dismiss();
|
|
50
|
+
overlayInstances.delete(key);
|
|
51
|
+
resetArrowRotation(ns, key);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const closeSubsequentPopovers = (currentLevel) => {
|
|
55
|
+
let level = currentLevel;
|
|
56
|
+
while (overlayInstances.get(level + 1)) {
|
|
57
|
+
level++;
|
|
58
|
+
}
|
|
59
|
+
for (let i = level; i >= currentLevel; i--) {
|
|
60
|
+
closePopoverAtLevel(i);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const closeAllPopovers = () => {
|
|
64
|
+
for (const key of overlayInstances.keys()) {
|
|
65
|
+
closePopoverAtLevel(key);
|
|
66
|
+
}
|
|
67
|
+
overlayInstances.clear();
|
|
68
|
+
activeMenuIdStack.value = [];
|
|
69
|
+
hoverCount = 0;
|
|
70
|
+
};
|
|
71
|
+
const scheduleDelayedClose = () => {
|
|
72
|
+
clearCloseTimer();
|
|
73
|
+
closeTimer = setTimeout(() => {
|
|
74
|
+
if (hoverCount <= 0) {
|
|
75
|
+
closeAllPopovers();
|
|
76
|
+
}
|
|
77
|
+
}, 300);
|
|
78
|
+
};
|
|
79
|
+
const clearAllCascader = () => {
|
|
80
|
+
closeAllPopovers();
|
|
81
|
+
clearCloseTimer();
|
|
82
|
+
};
|
|
83
|
+
const handleMenuItemMouseEnter = (_menu, event) => {
|
|
84
|
+
if (activeMenuIdStack.value.includes(_menu.id))
|
|
85
|
+
return;
|
|
86
|
+
activeMenuIdStack.value.push(_menu.id);
|
|
87
|
+
closeSubsequentPopovers(_menu.level);
|
|
88
|
+
if (_menu.children) {
|
|
89
|
+
openCascaderPopover(_menu, event);
|
|
90
|
+
}
|
|
91
|
+
clearCloseTimer();
|
|
92
|
+
};
|
|
93
|
+
const handleMenuItemMouseLeave = (_menu) => {
|
|
94
|
+
const index = activeMenuIdStack.value.indexOf(_menu.id);
|
|
95
|
+
if (index !== -1) {
|
|
96
|
+
activeMenuIdStack.value.splice(index, 1);
|
|
97
|
+
}
|
|
98
|
+
scheduleDelayedClose();
|
|
99
|
+
};
|
|
100
|
+
const onPopoverMouseEnter = () => {
|
|
101
|
+
hoverCount++;
|
|
102
|
+
clearCloseTimer();
|
|
103
|
+
};
|
|
104
|
+
const onPopoverMouseLeave = (_menu, _event) => {
|
|
105
|
+
hoverCount = Math.max(0, hoverCount - 1);
|
|
106
|
+
scheduleDelayedClose();
|
|
107
|
+
};
|
|
108
|
+
const openCascaderPopover = (menu, evt, opts) => {
|
|
109
|
+
var _a;
|
|
110
|
+
const overlay = ibiz.overlay.createPopover(
|
|
111
|
+
() => h(renderCascaderContent(menu), {
|
|
112
|
+
onMouseenter: onPopoverMouseEnter,
|
|
113
|
+
onMouseleave: onPopoverMouseLeave
|
|
114
|
+
}),
|
|
115
|
+
void 0,
|
|
116
|
+
{
|
|
117
|
+
width: "auto",
|
|
118
|
+
height: "auto",
|
|
119
|
+
noArrow: true,
|
|
120
|
+
placement: getPopoverPlacement(menu.level),
|
|
121
|
+
offsetOpts: 10,
|
|
122
|
+
...opts,
|
|
123
|
+
modalClass: "".concat(ns.b("cascader-popover"), " ").concat(ns.is(
|
|
124
|
+
menuAlign.value,
|
|
125
|
+
true
|
|
126
|
+
), " ").concat((opts == null ? void 0 : opts.modalClass) || "")
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
overlayInstances.set(menu.level, overlay);
|
|
130
|
+
overlay == null ? void 0 : overlay.present(evt.currentTarget);
|
|
131
|
+
rotateArrowIcon(
|
|
132
|
+
(_a = evt.currentTarget) == null ? void 0 : _a.parentElement,
|
|
133
|
+
ns,
|
|
134
|
+
menu.level
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
return {
|
|
138
|
+
getOverlayNum,
|
|
139
|
+
openCascaderPopover,
|
|
140
|
+
clearAllCascader,
|
|
141
|
+
handleMenuItemMouseEnter,
|
|
142
|
+
handleMenuItemMouseLeave
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
function useBorderLayout(menuRef, ns, position, menuAlign, getOverlayNum, renderBorderContent) {
|
|
146
|
+
let overlay;
|
|
147
|
+
const getElementAbsolutePosition = (element) => {
|
|
148
|
+
let x = 0;
|
|
149
|
+
let y = 0;
|
|
150
|
+
let current = element;
|
|
151
|
+
while (current) {
|
|
152
|
+
x += current.offsetLeft;
|
|
153
|
+
y += current.offsetTop;
|
|
154
|
+
current = current.offsetParent;
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
x,
|
|
158
|
+
y,
|
|
159
|
+
width: element.offsetWidth,
|
|
160
|
+
height: element.offsetHeight
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
const resolvePopoverPlacement = () => {
|
|
164
|
+
switch (position) {
|
|
165
|
+
case "TOP":
|
|
166
|
+
return "bottom";
|
|
167
|
+
case "BOTTOM":
|
|
168
|
+
return "top";
|
|
169
|
+
case "RIGHT":
|
|
170
|
+
return "left";
|
|
171
|
+
case "LEFT":
|
|
172
|
+
return "right";
|
|
173
|
+
default:
|
|
174
|
+
return void 0;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
let popoverEl;
|
|
178
|
+
const closeBorderPopover = () => {
|
|
179
|
+
overlay == null ? void 0 : overlay.dismiss();
|
|
180
|
+
overlay = null;
|
|
181
|
+
document.removeEventListener("mousemove", handleMouseTrackOut);
|
|
182
|
+
popoverEl = void 0;
|
|
183
|
+
};
|
|
184
|
+
const handleMouseTrackOut = (e) => {
|
|
185
|
+
if (!popoverEl) {
|
|
186
|
+
popoverEl = document.querySelector(
|
|
187
|
+
".".concat(ns.b("border-popover"))
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
const pos = getElementAbsolutePosition(popoverEl);
|
|
191
|
+
const isInside = e.pageX >= pos.x && e.pageX <= pos.x + pos.width && e.pageY >= pos.y && e.pageY <= pos.y + pos.height;
|
|
192
|
+
if (!isInside && getOverlayNum() <= 0) {
|
|
193
|
+
closeBorderPopover();
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
const handlePlaceholderMouseEnter = async (evt) => {
|
|
197
|
+
var _a;
|
|
198
|
+
if (overlay)
|
|
199
|
+
return;
|
|
200
|
+
overlay = ibiz.overlay.createPopover(
|
|
201
|
+
() => h(renderBorderContent()),
|
|
202
|
+
void 0,
|
|
203
|
+
{
|
|
204
|
+
width: "auto",
|
|
205
|
+
height: "auto",
|
|
206
|
+
noArrow: true,
|
|
207
|
+
placement: resolvePopoverPlacement(),
|
|
208
|
+
offsetOpts: -1,
|
|
209
|
+
modalClass: "".concat(ns.b("border-popover"), " ").concat(ns.is(menuAlign.value, true))
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
const triggerEl = (_a = evt.currentTarget) == null ? void 0 : _a.querySelector(
|
|
213
|
+
".".concat(ns.be("placehold", "line"))
|
|
214
|
+
);
|
|
215
|
+
await (overlay == null ? void 0 : overlay.present(triggerEl));
|
|
216
|
+
setTimeout(() => {
|
|
217
|
+
document.addEventListener("mousemove", handleMouseTrackOut);
|
|
218
|
+
}, 200);
|
|
219
|
+
};
|
|
220
|
+
let placeholderEl = null;
|
|
221
|
+
let resizeObserver = null;
|
|
222
|
+
let frameLoopId = null;
|
|
223
|
+
const minWidth = 20;
|
|
224
|
+
const minHeight = 20;
|
|
225
|
+
const computeTop = (top, height) => {
|
|
226
|
+
return position === "BOTTOM" ? top + height - minHeight : top;
|
|
227
|
+
};
|
|
228
|
+
const computeLeft = (left, width) => {
|
|
229
|
+
return position === "RIGHT" ? left + width - minWidth : left;
|
|
230
|
+
};
|
|
231
|
+
const computeWidth = (width) => {
|
|
232
|
+
return ["RIGHT", "LEFT"].includes(position) ? minWidth : width;
|
|
233
|
+
};
|
|
234
|
+
const computeHeight = (height) => {
|
|
235
|
+
return ["TOP", "BOTTOM"].includes(position) ? minHeight : height;
|
|
236
|
+
};
|
|
237
|
+
function createFixedPlaceholder(el) {
|
|
238
|
+
const container = document.createElement("div");
|
|
239
|
+
container.classList.add(ns.b("placehold"));
|
|
240
|
+
container.classList.add(ns.is(position.toLowerCase(), !!position));
|
|
241
|
+
const line = document.createElement("div");
|
|
242
|
+
line.classList.add(ns.be("placehold", "line"));
|
|
243
|
+
const arrow = document.createElement("div");
|
|
244
|
+
arrow.classList.add(ns.be("placehold", "arrow"));
|
|
245
|
+
container.appendChild(line);
|
|
246
|
+
container.appendChild(arrow);
|
|
247
|
+
document.body.appendChild(container);
|
|
248
|
+
placeholderEl = container;
|
|
249
|
+
placeholderEl.addEventListener("mouseenter", handlePlaceholderMouseEnter);
|
|
250
|
+
arrow.innerHTML = '\n <svg xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 1024 1024"\n width="1em"\n height="1em"\n fill="currentColor">\n <path fill="currentColor"\n d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z">\n </path>\n </svg>\n ';
|
|
251
|
+
updatePlaceholderPosition(el);
|
|
252
|
+
}
|
|
253
|
+
function updatePlaceholderPosition(el) {
|
|
254
|
+
if (!placeholderEl)
|
|
255
|
+
return;
|
|
256
|
+
const rect = el.getBoundingClientRect();
|
|
257
|
+
placeholderEl.style.top = "".concat(computeTop(rect.top, rect.height), "px");
|
|
258
|
+
placeholderEl.style.left = "".concat(computeLeft(rect.left, rect.width), "px");
|
|
259
|
+
placeholderEl.style.width = "".concat(computeWidth(rect.width), "px");
|
|
260
|
+
placeholderEl.style.height = "".concat(computeHeight(rect.height), "px");
|
|
261
|
+
}
|
|
262
|
+
function startTracking() {
|
|
263
|
+
const el = menuRef.value;
|
|
264
|
+
if (!el)
|
|
265
|
+
return;
|
|
266
|
+
createFixedPlaceholder(el);
|
|
267
|
+
resizeObserver = new ResizeObserver(() => updatePlaceholderPosition(el));
|
|
268
|
+
resizeObserver.observe(el);
|
|
269
|
+
const updateLoop = () => {
|
|
270
|
+
updatePlaceholderPosition(el);
|
|
271
|
+
frameLoopId = requestAnimationFrame(updateLoop);
|
|
272
|
+
};
|
|
273
|
+
frameLoopId = requestAnimationFrame(updateLoop);
|
|
274
|
+
}
|
|
275
|
+
function stopTrackingAndDestroy() {
|
|
276
|
+
if (resizeObserver) {
|
|
277
|
+
const el = menuRef.value;
|
|
278
|
+
if (el)
|
|
279
|
+
resizeObserver.unobserve(el);
|
|
280
|
+
resizeObserver.disconnect();
|
|
281
|
+
resizeObserver = null;
|
|
282
|
+
}
|
|
283
|
+
if (frameLoopId !== null) {
|
|
284
|
+
cancelAnimationFrame(frameLoopId);
|
|
285
|
+
frameLoopId = null;
|
|
286
|
+
}
|
|
287
|
+
if (placeholderEl && placeholderEl.parentNode) {
|
|
288
|
+
placeholderEl.removeEventListener(
|
|
289
|
+
"mouseenter",
|
|
290
|
+
handlePlaceholderMouseEnter
|
|
291
|
+
);
|
|
292
|
+
placeholderEl.parentNode.removeChild(placeholderEl);
|
|
293
|
+
placeholderEl = null;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
onMounted(startTracking);
|
|
297
|
+
onUnmounted(stopTrackingAndDestroy);
|
|
298
|
+
return { closeBorderPopover };
|
|
299
|
+
}
|
|
300
|
+
function getMenus(items, _parentItem, level = 0) {
|
|
301
|
+
return items.map((item) => {
|
|
302
|
+
var _a;
|
|
303
|
+
const data = {
|
|
304
|
+
...item,
|
|
305
|
+
value: item.id,
|
|
306
|
+
label: item.caption,
|
|
307
|
+
parentId: _parentItem == null ? void 0 : _parentItem.id,
|
|
308
|
+
level
|
|
309
|
+
};
|
|
310
|
+
if ((_a = item.appMenuItems) == null ? void 0 : _a.length) {
|
|
311
|
+
data.children = getMenus(item.appMenuItems, item, level + 1);
|
|
312
|
+
}
|
|
313
|
+
return data;
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
function findMenuItem(_id, items) {
|
|
317
|
+
let temp;
|
|
318
|
+
if (items) {
|
|
319
|
+
items.some((item) => {
|
|
320
|
+
if (!item.id)
|
|
321
|
+
return true;
|
|
322
|
+
if (item.id === _id) {
|
|
323
|
+
temp = item;
|
|
324
|
+
return true;
|
|
325
|
+
}
|
|
326
|
+
if (item.appMenuItems && item.appMenuItems.length > 0) {
|
|
327
|
+
temp = findMenuItem(_id, item.appMenuItems);
|
|
328
|
+
if (!temp) {
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
return true;
|
|
332
|
+
}
|
|
333
|
+
return false;
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return temp;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export { findMenuItem, getMenus, useBorderLayout, useCascaderPopover };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-left-side-menu{width:100%;height:100%}
|
|
1
|
+
.ibiz-left-side-menu{width:100%;height:100%}.ibiz-col--self-align>.ibiz-left-side-menu{width:100%;height:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-right-side-menu{width:100%;height:100%}
|
|
1
|
+
.ibiz-right-side-menu{width:100%;height:100%}.ibiz-col--self-align>.ibiz-right-side-menu{width:100%;height:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-top-side-menu{width:100%;height:100%}
|
|
1
|
+
.ibiz-top-side-menu{width:100%;height:100%}.ibiz-col--self-align>.ibiz-top-side-menu{width:100%;height:100%}
|
|
@@ -10,6 +10,12 @@ export declare class AppUtil implements IAppUtil {
|
|
|
10
10
|
* @param {Router} router
|
|
11
11
|
*/
|
|
12
12
|
constructor(router: Router);
|
|
13
|
+
/**
|
|
14
|
+
* @description 路由是否初始化构建完成
|
|
15
|
+
* @returns {*} {Promise<void>}
|
|
16
|
+
* @memberof AppUtil
|
|
17
|
+
*/
|
|
18
|
+
onRouteIsReady(): Promise<void>;
|
|
13
19
|
/**
|
|
14
20
|
* 登录
|
|
15
21
|
*
|
|
@@ -15,6 +15,14 @@ class AppUtil {
|
|
|
15
15
|
constructor(router) {
|
|
16
16
|
this.router = router;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* @description 路由是否初始化构建完成
|
|
20
|
+
* @returns {*} {Promise<void>}
|
|
21
|
+
* @memberof AppUtil
|
|
22
|
+
*/
|
|
23
|
+
async onRouteIsReady() {
|
|
24
|
+
return this.router.isReady();
|
|
25
|
+
}
|
|
18
26
|
/**
|
|
19
27
|
* 登录
|
|
20
28
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createApp } from 'vue';
|
|
2
2
|
import ElementPlus from 'element-plus';
|
|
3
|
-
import { defaultNamespace } from '../../node_modules/.pnpm/@ibiz-template_core@0.7.41-alpha.
|
|
3
|
+
import { defaultNamespace } from '../../node_modules/.pnpm/@ibiz-template_core@0.7.41-alpha.7_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs';
|
|
4
4
|
import { IBizFullscreenToolbar } from '../../common/fullscreen-toolbar/fullscreen-toolbar.mjs';
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IViewEvent, IViewState, ViewController, ViewEngineBase } from '@ibiz-template/runtime';
|
|
2
|
+
import { IAppView } from '@ibiz/model-core';
|
|
3
|
+
/**
|
|
4
|
+
* @description 应用启动视图引擎
|
|
5
|
+
* @export
|
|
6
|
+
* @class AppStartViewEngine
|
|
7
|
+
* @extends {ViewEngineBase}
|
|
8
|
+
*/
|
|
9
|
+
export declare class AppStartViewEngine extends ViewEngineBase {
|
|
10
|
+
protected view: ViewController<IAppView, IViewState, IViewEvent>;
|
|
11
|
+
onCreated(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IViewEvent, IViewState, ViewController, ViewEngineBase } from '@ibiz-template/runtime';
|
|
2
|
+
import { IAppView } from '@ibiz/model-core';
|
|
3
|
+
/**
|
|
4
|
+
* @description 应用欢迎视图引擎
|
|
5
|
+
* @export
|
|
6
|
+
* @class AppStartViewEngine
|
|
7
|
+
* @extends {ViewEngineBase}
|
|
8
|
+
*/
|
|
9
|
+
export declare class AppWelcomeViewEngine extends ViewEngineBase {
|
|
10
|
+
protected view: ViewController<IAppView, IViewState, IViewEvent>;
|
|
11
|
+
onCreated(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -16,13 +16,22 @@ export declare class EditViewEngine extends DEMainViewEngine {
|
|
|
16
16
|
get form(): IEditFormController;
|
|
17
17
|
protected init(): void;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* @description 模态关闭前执行钩子
|
|
20
|
+
* @param {{ allowNext?: boolean }} context
|
|
21
|
+
* @returns {*} {Promise<void>}
|
|
22
|
+
* @memberof EditViewEngine
|
|
23
|
+
*/
|
|
24
|
+
modalPreDismissHook(context: {
|
|
25
|
+
allowNext?: boolean;
|
|
26
|
+
}): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* 模态计算是否关闭钩子
|
|
20
29
|
*
|
|
21
30
|
* @param {{ allowClose?: boolean }} context
|
|
22
31
|
* @return {*} {Promise<void>}
|
|
23
32
|
* @memberof EditViewEngine
|
|
24
33
|
*/
|
|
25
|
-
|
|
34
|
+
modalShouldDismissHook(context: {
|
|
26
35
|
allowClose?: boolean;
|
|
27
36
|
}): Promise<void>;
|
|
28
37
|
onCreated(): Promise<void>;
|
|
@@ -28,17 +28,29 @@ class EditViewEngine extends DEMainViewEngine {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* @description 模态关闭前执行钩子
|
|
32
|
+
* @param {{ allowNext?: boolean }} context
|
|
33
|
+
* @returns {*} {Promise<void>}
|
|
34
|
+
* @memberof EditViewEngine
|
|
35
|
+
*/
|
|
36
|
+
async modalPreDismissHook(context) {
|
|
37
|
+
try {
|
|
38
|
+
if (this.form && this.form.state.modified && this.form.model.enableAutoSave) {
|
|
39
|
+
await this.form.immediateAutoSave();
|
|
40
|
+
}
|
|
41
|
+
} catch (error) {
|
|
42
|
+
context.allowNext = false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 模态计算是否关闭钩子
|
|
32
47
|
*
|
|
33
48
|
* @param {{ allowClose?: boolean }} context
|
|
34
49
|
* @return {*} {Promise<void>}
|
|
35
50
|
* @memberof EditViewEngine
|
|
36
51
|
*/
|
|
37
|
-
async
|
|
52
|
+
async modalShouldDismissHook(context) {
|
|
38
53
|
var _a, _b;
|
|
39
|
-
if (this.form && this.form.state.modified && this.form.model.enableAutoSave) {
|
|
40
|
-
await this.form.immediateAutoSave();
|
|
41
|
-
}
|
|
42
54
|
const srfSessionid = this.view.context.srfsessionid;
|
|
43
55
|
const uiDomain = ibiz.uiDomainManager.get(srfSessionid);
|
|
44
56
|
let isChange = this.view.model.enableDirtyChecking === true;
|
|
@@ -63,7 +75,8 @@ class EditViewEngine extends DEMainViewEngine {
|
|
|
63
75
|
}
|
|
64
76
|
async onCreated() {
|
|
65
77
|
await super.onCreated();
|
|
66
|
-
this.
|
|
78
|
+
this.modalPreDismissHook = this.modalPreDismissHook.bind(this);
|
|
79
|
+
this.modalShouldDismissHook = this.modalShouldDismissHook.bind(this);
|
|
67
80
|
this.formDataStateChange = this.formDataStateChange.bind(this);
|
|
68
81
|
const { childNames, modal } = this.view;
|
|
69
82
|
childNames.push("form");
|
|
@@ -75,7 +88,8 @@ class EditViewEngine extends DEMainViewEngine {
|
|
|
75
88
|
this.view.slotProps.toolbar = {};
|
|
76
89
|
}
|
|
77
90
|
this.view.slotProps.toolbar.manualCalcButtonState = true;
|
|
78
|
-
modal.hooks.
|
|
91
|
+
modal.hooks.preDismiss.tapPromise(this.modalPreDismissHook);
|
|
92
|
+
modal.hooks.shouldDismiss.tapPromise(this.modalShouldDismissHook);
|
|
79
93
|
}
|
|
80
94
|
/**
|
|
81
95
|
* @description 监控form事件
|
|
@@ -500,7 +514,8 @@ class EditViewEngine extends DEMainViewEngine {
|
|
|
500
514
|
async onDestroyed() {
|
|
501
515
|
super.onDestroyed();
|
|
502
516
|
const { modal } = this.view;
|
|
503
|
-
modal.hooks.
|
|
517
|
+
modal.hooks.preDismiss.removeTapPromise(this.modalPreDismissHook);
|
|
518
|
+
modal.hooks.shouldDismiss.removeTapPromise(this.modalShouldDismissHook);
|
|
504
519
|
}
|
|
505
520
|
}
|
|
506
521
|
|
|
@@ -6,6 +6,10 @@ class EditView4Engine extends EditViewEngine {
|
|
|
6
6
|
await super.onCreated();
|
|
7
7
|
const { childNames } = this.view;
|
|
8
8
|
childNames.push("drtab");
|
|
9
|
+
if (!this.view.slotProps.drtab) {
|
|
10
|
+
this.view.slotProps.drtab = {};
|
|
11
|
+
}
|
|
12
|
+
this.view.slotProps.drtab.hideEditItem = true;
|
|
9
13
|
}
|
|
10
14
|
/**
|
|
11
15
|
* 数据分页栏
|
package/es/view-engine/index.mjs
CHANGED
|
@@ -47,6 +47,8 @@ import { SubAppRefViewEngine } from './sub-app-ref-view.engine.mjs';
|
|
|
47
47
|
import { TabSearchViewEngine } from './tab-search-view.engine.mjs';
|
|
48
48
|
import { AppDataUploadViewEngine } from './app-data-upload-view.engine.mjs';
|
|
49
49
|
import { WFStepDataViewEngine } from './wf-step-data-view.engine.mjs';
|
|
50
|
+
import { AppStartViewEngine } from './app-start-view.engine.mjs';
|
|
51
|
+
import { AppWelcomeViewEngine } from './app-welcome-view.engine.mjs';
|
|
50
52
|
export { ExpViewEngine } from './exp-view.engine.mjs';
|
|
51
53
|
|
|
52
54
|
"use strict";
|
|
@@ -252,6 +254,14 @@ const IBizViewEngine = {
|
|
|
252
254
|
"VIEW_APPDATAUPLOADVIEW",
|
|
253
255
|
(c) => new AppDataUploadViewEngine(c)
|
|
254
256
|
);
|
|
257
|
+
ibiz.engine.register(
|
|
258
|
+
"VIEW_APPSTARTVIEW",
|
|
259
|
+
(c) => new AppStartViewEngine(c)
|
|
260
|
+
);
|
|
261
|
+
ibiz.engine.register(
|
|
262
|
+
"VIEW_APPWELCOMEVIEW",
|
|
263
|
+
(c) => new AppWelcomeViewEngine(c)
|
|
264
|
+
);
|
|
255
265
|
ibiz.engine.register(
|
|
256
266
|
"VIEW_GridView9",
|
|
257
267
|
(c) => new GridViewEngine(c)
|
|
@@ -40,14 +40,23 @@ export declare class OptViewEngine extends ViewEngineBase {
|
|
|
40
40
|
*/
|
|
41
41
|
onDestroyed(): Promise<void>;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* @description 模态关闭前执行钩子
|
|
44
|
+
* @param {{ allowNext?: boolean }} context
|
|
45
|
+
* @returns {*} {Promise<void>}
|
|
46
|
+
* @memberof OptViewEngine
|
|
47
|
+
*/
|
|
48
|
+
modalPreDismissHook(context: {
|
|
49
|
+
allowNext?: boolean;
|
|
50
|
+
}): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* 模态计算是否关闭钩子
|
|
44
53
|
*
|
|
45
54
|
* @author tony001
|
|
46
55
|
* @date 2024-09-14 15:09:59
|
|
47
56
|
* @param {{ allowClose?: boolean }} context
|
|
48
57
|
* @return {*} {Promise<void>}
|
|
49
58
|
*/
|
|
50
|
-
|
|
59
|
+
modalShouldDismissHook(context: {
|
|
51
60
|
allowClose?: boolean;
|
|
52
61
|
}): Promise<void>;
|
|
53
62
|
/**
|
|
@@ -40,7 +40,8 @@ class OptViewEngine extends ViewEngineBase {
|
|
|
40
40
|
*/
|
|
41
41
|
async onCreated() {
|
|
42
42
|
await super.onCreated();
|
|
43
|
-
this.
|
|
43
|
+
this.modalPreDismissHook = this.modalPreDismissHook.bind(this);
|
|
44
|
+
this.modalShouldDismissHook = this.modalShouldDismissHook.bind(this);
|
|
44
45
|
const { childNames, modal } = this.view;
|
|
45
46
|
childNames.push("form");
|
|
46
47
|
if (!this.view.slotProps.form) {
|
|
@@ -51,7 +52,8 @@ class OptViewEngine extends ViewEngineBase {
|
|
|
51
52
|
this.view.slotProps.toolbar = {};
|
|
52
53
|
}
|
|
53
54
|
this.view.slotProps.toolbar.manualCalcButtonState = true;
|
|
54
|
-
modal.hooks.
|
|
55
|
+
modal.hooks.preDismiss.tapPromise(this.modalPreDismissHook);
|
|
56
|
+
modal.hooks.shouldDismiss.tapPromise(this.modalShouldDismissHook);
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
59
|
* 视图mounted生命周期执行逻辑
|
|
@@ -118,21 +120,34 @@ class OptViewEngine extends ViewEngineBase {
|
|
|
118
120
|
async onDestroyed() {
|
|
119
121
|
super.onDestroyed();
|
|
120
122
|
const { modal } = this.view;
|
|
121
|
-
modal.hooks.
|
|
123
|
+
modal.hooks.preDismiss.removeTapPromise(this.modalPreDismissHook);
|
|
124
|
+
modal.hooks.shouldDismiss.removeTapPromise(this.modalShouldDismissHook);
|
|
122
125
|
}
|
|
123
126
|
/**
|
|
124
|
-
*
|
|
127
|
+
* @description 模态关闭前执行钩子
|
|
128
|
+
* @param {{ allowNext?: boolean }} context
|
|
129
|
+
* @returns {*} {Promise<void>}
|
|
130
|
+
* @memberof OptViewEngine
|
|
131
|
+
*/
|
|
132
|
+
async modalPreDismissHook(context) {
|
|
133
|
+
try {
|
|
134
|
+
if (this.form && this.form.state.modified && this.form.model.enableAutoSave) {
|
|
135
|
+
await this.form.immediateAutoSave();
|
|
136
|
+
}
|
|
137
|
+
} catch (error) {
|
|
138
|
+
context.allowNext = false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* 模态计算是否关闭钩子
|
|
125
143
|
*
|
|
126
144
|
* @author tony001
|
|
127
145
|
* @date 2024-09-14 15:09:59
|
|
128
146
|
* @param {{ allowClose?: boolean }} context
|
|
129
147
|
* @return {*} {Promise<void>}
|
|
130
148
|
*/
|
|
131
|
-
async
|
|
149
|
+
async modalShouldDismissHook(context) {
|
|
132
150
|
var _a, _b;
|
|
133
|
-
if (this.form && this.form.state.modified && this.form.model.enableAutoSave) {
|
|
134
|
-
await this.form.immediateAutoSave();
|
|
135
|
-
}
|
|
136
151
|
const srfSessionid = this.view.context.srfsessionid;
|
|
137
152
|
const uiDomain = ibiz.uiDomainManager.get(srfSessionid);
|
|
138
153
|
let isChange = this.view.model.enableDirtyChecking === true;
|
|
@@ -32,6 +32,7 @@ class TabExpViewEngine extends ViewEngineBase {
|
|
|
32
32
|
(item) => item.id === "srfdefaultnav"
|
|
33
33
|
)) == null ? void 0 : _a.value;
|
|
34
34
|
this.view.slotProps.tabexppanel.defaultTabName = this.view.state.srfnav || srfdefaultnav;
|
|
35
|
+
this.view.slotProps.tabexppanel.hideEditItem = true;
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
38
|
* 分页导航视图刷新
|