@sdata/web-vue 3.0.0 → 3.0.2
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/sd.css +0 -3
- package/dist/sd.min.css +1 -1
- package/es/_hooks/use-popup-manager.js +5 -4
- package/es/index.css +0 -3
- package/es/json-form/style/index.css +0 -3
- package/es/json-form/style/index.scss +0 -4
- package/es/json-form/style/token.scss +0 -1
- package/es/trigger/trigger.js +8 -0
- package/json/web-types.json +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../style/theme/z-index.js";
|
|
1
|
+
import { MESSAGE_STACK_BASE_Z_INDEX } from "../style/theme/z-index.js";
|
|
2
2
|
import { onBeforeUnmount, onMounted, readonly, ref, watch } from "vue";
|
|
3
3
|
//#region components/_hooks/use-popup-manager.ts
|
|
4
4
|
var PopupManager = class {
|
|
@@ -9,17 +9,18 @@ var PopupManager = class {
|
|
|
9
9
|
message: /* @__PURE__ */ new Set()
|
|
10
10
|
};
|
|
11
11
|
this.getNextZIndex = (type) => {
|
|
12
|
-
|
|
12
|
+
const popupZIndex = Array.from(this.popupStack.popup).pop() || 1e3;
|
|
13
|
+
return (type === "message" ? Math.max(popupZIndex, MESSAGE_STACK_BASE_Z_INDEX) : popupZIndex) + 1;
|
|
13
14
|
};
|
|
14
15
|
this.add = (type) => {
|
|
15
16
|
const zIndex = this.getNextZIndex(type);
|
|
16
17
|
this.popupStack[type].add(zIndex);
|
|
17
|
-
if (type
|
|
18
|
+
if (type !== "popup") this.popupStack.popup.add(zIndex);
|
|
18
19
|
return zIndex;
|
|
19
20
|
};
|
|
20
21
|
this.delete = (zIndex, type) => {
|
|
21
22
|
this.popupStack[type].delete(zIndex);
|
|
22
|
-
if (type
|
|
23
|
+
if (type !== "popup") this.popupStack.popup.delete(zIndex);
|
|
23
24
|
};
|
|
24
25
|
this.isLastDialog = (zIndex) => {
|
|
25
26
|
if (this.popupStack.dialog.size > 1) return zIndex === Array.from(this.popupStack.dialog).pop();
|
package/es/index.css
CHANGED
|
@@ -14123,9 +14123,6 @@ body.sd-tour-active .sd-tour-popover * {
|
|
|
14123
14123
|
.sd-json-form-control--inline {
|
|
14124
14124
|
min-width: 0;
|
|
14125
14125
|
}
|
|
14126
|
-
.sd-json-form .sd-form-item {
|
|
14127
|
-
margin-bottom: 4px;
|
|
14128
|
-
}
|
|
14129
14126
|
|
|
14130
14127
|
.sd-ellipsis {
|
|
14131
14128
|
display: inline-block;
|
package/es/trigger/trigger.js
CHANGED
|
@@ -366,6 +366,14 @@ var trigger_default = /* @__PURE__ */ defineComponent({
|
|
|
366
366
|
documentContainer: true
|
|
367
367
|
});
|
|
368
368
|
const { zIndex } = usePopupManager("popup", { visible: computedVisible });
|
|
369
|
+
const syncThemePopupContainerZIndex = () => {
|
|
370
|
+
if (computedVisible.value && zIndex.value > 0 && (themePopupContainer === null || themePopupContainer === void 0 ? void 0 : themePopupContainer.value) && mergedPopupContainer.value === themePopupContainer.value) themePopupContainer.value.style.zIndex = String(zIndex.value);
|
|
371
|
+
};
|
|
372
|
+
watch([
|
|
373
|
+
computedVisible,
|
|
374
|
+
zIndex,
|
|
375
|
+
mergedPopupContainer
|
|
376
|
+
], syncThemePopupContainerZIndex, { immediate: true });
|
|
369
377
|
let delayTimer = 0;
|
|
370
378
|
let outsideListener = false;
|
|
371
379
|
let windowListener = false;
|
package/json/web-types.json
CHANGED