@quoreadmin/ui 1.7.16 → 1.7.18
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/index131.js +151 -90
- package/dist/index140.js +291 -281
- package/dist/index185.js +7 -7
- package/dist/index191.js +23 -23
- package/dist/index192.js +1 -1
- package/dist/index193.js +1 -1
- package/dist/index196.js +2 -2
- package/dist/index198.js +14 -14
- package/dist/index199.js +1 -1
- package/dist/index200.js +1 -1
- package/dist/index201.js +3 -3
- package/dist/index202.js +6 -6
- package/dist/index203.js +2 -2
- package/dist/index204.js +2 -2
- package/dist/index205.js +1 -1
- package/dist/index220.js +1 -1
- package/dist/index224.js +1 -1
- package/dist/index226.js +1 -1
- package/dist/index232.js +105 -231
- package/dist/index233.js +38 -8
- package/dist/index234.js +78 -136
- package/dist/index235.js +20 -83
- package/dist/index236.js +20 -3632
- package/dist/index237.js +20 -55
- package/dist/index238.js +20 -77
- package/dist/index239.js +22 -52
- package/dist/index240.js +22 -215
- package/dist/index241.js +20 -10
- package/dist/index242.js +827 -48
- package/dist/index243.js +691 -50
- package/dist/index244.js +174 -52
- package/dist/index245.js +22 -75
- package/dist/index246.js +19 -722
- package/dist/index247.js +20 -39
- package/dist/index248.js +3 -64
- package/dist/index249.js +187 -11
- package/dist/index250.js +124 -696
- package/dist/index251.js +1189 -786
- package/dist/index252.js +19 -126
- package/dist/index253.js +21 -37
- package/dist/index254.js +22 -80
- package/dist/index255.js +22 -13
- package/dist/index256.js +12 -12
- package/dist/index257.js +9 -9
- package/dist/index258.js +2 -20
- package/dist/index259.js +2 -22
- package/dist/index260.js +3632 -22
- package/dist/index261.js +55 -20
- package/dist/index262.js +64 -823
- package/dist/index263.js +43 -693
- package/dist/index264.js +204 -165
- package/dist/index265.js +10 -22
- package/dist/index266.js +57 -20
- package/dist/index267.js +61 -20
- package/dist/index268.js +54 -3
- package/dist/index269.js +69 -181
- package/dist/index270.js +710 -120
- package/dist/index271.js +33 -1217
- package/dist/index272.js +64 -20
- package/dist/index273.js +11 -22
- package/dist/index274.js +705 -22
- package/dist/index275.js +820 -29
- package/dist/index276.js +253 -20
- package/dist/index277.js +8 -20
- package/dist/index278.js +138 -2
- package/dist/index279.js +83 -2
- package/dist/index280.js +1 -1
- package/dist/index285.js +1 -1
- package/dist/index286.js +1 -1
- package/dist/index287.js +1 -1
- package/dist/index288.js +137 -110
- package/dist/index290.js +62 -56
- package/dist/index291.js +31 -26
- package/dist/index294.js +15 -8
- package/dist/index297.js +1 -1
- package/dist/index299.js +36 -37
- package/dist/index305.js +2 -1518
- package/dist/index306.js +1478 -346
- package/dist/index307.js +330 -2675
- package/dist/index308.js +2717 -72
- package/dist/index309.js +75 -3759
- package/dist/index310.js +3758 -48
- package/dist/index311.js +60 -15
- package/dist/index312.js +76 -81
- package/dist/index313.js +22 -202
- package/dist/index314.js +915 -226
- package/dist/index315.js +22 -2
- package/dist/index316.js +19 -78
- package/dist/index317.js +13 -15
- package/dist/index318.js +64 -930
- package/dist/index319.js +18 -21
- package/dist/index320.js +19 -20
- package/dist/index321.js +12 -10
- package/dist/index322.js +21 -68
- package/dist/index323.js +60 -16
- package/dist/index324.js +15 -19
- package/dist/index325.js +83 -21
- package/dist/index326.js +202 -22
- package/dist/index327.js +246 -63
- package/dist/index330.js +1 -1
- package/dist/index331.js +12 -14
- package/dist/index332.js +1 -0
- package/dist/index336.js +4 -3
- package/dist/index342.js +27 -27
- package/dist/index345.js +1 -1
- package/dist/index346.js +1 -1
- package/dist/index372.js +1 -1
- package/dist/index380.js +1 -1
- package/dist/index382.js +16 -100
- package/dist/index383.js +100 -90
- package/dist/index384.js +91 -98
- package/dist/index385.js +97 -16
- package/dist/index43.js +160 -158
- package/dist/src/components/comment/comment.d.ts +27 -0
- package/dist/src/components/comment/comment.stories.d.ts +27 -0
- package/dist/src/components/comment-section/comment-section.d.ts +27 -0
- package/dist/src/components/comment-section/comment-section.stories.d.ts +27 -0
- package/dist/src/components/data-filter/data-filter.d.ts +27 -0
- package/dist/src/components/data-list/data-list.d.ts +27 -0
- package/dist/src/components/grid/grid.stories.d.ts +54 -0
- package/dist/src/components/popover/popover.d.ts +37 -0
- package/dist/src/components/popover/popover.stories.d.ts +189 -0
- package/dist/src/components/room-details-popover/room-details-popover.d.ts +60 -2
- package/dist/src/views/lists.vue.d.ts +54 -0
- package/dist/src/views/tables.vue.d.ts +27 -0
- package/package.json +1 -1
package/dist/index131.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { onClickOutside as
|
|
3
|
-
import { useThrottleFn as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as M, ref as h, computed as H, onMounted as A, onUnmounted as Q, watch as F, nextTick as O } from "vue";
|
|
2
|
+
import { onClickOutside as W } from "./index163.js";
|
|
3
|
+
import { useThrottleFn as k } from "./index174.js";
|
|
4
|
+
const G = M({
|
|
5
5
|
name: "QPopover",
|
|
6
6
|
props: {
|
|
7
7
|
/** Aligns the popover accordingly with the trigger.
|
|
@@ -64,133 +64,194 @@ const Q = z({
|
|
|
64
64
|
trigger: {
|
|
65
65
|
type: String,
|
|
66
66
|
default: "click"
|
|
67
|
+
},
|
|
68
|
+
/** Whether to close the popover when the trigger scrolls out of its scrollable parent.
|
|
69
|
+
* Useful for popovers inside scrollable containers to prevent orphaned popovers. */
|
|
70
|
+
closeOnScrollOutOfView: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: !1
|
|
73
|
+
},
|
|
74
|
+
/** Whether to scroll the page to bring the popover into view when it opens or content changes.
|
|
75
|
+
* Uses smooth scrolling and adds padding to ensure the popover isn't at the edge of the viewport. */
|
|
76
|
+
scrollIntoView: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: !1
|
|
79
|
+
},
|
|
80
|
+
/** Padding (in pixels) from viewport edge when scrolling popover into view. */
|
|
81
|
+
scrollIntoViewPadding: {
|
|
82
|
+
type: Number,
|
|
83
|
+
default: 20
|
|
67
84
|
}
|
|
68
85
|
},
|
|
69
86
|
emits: ["update:modelValue"],
|
|
70
|
-
setup(
|
|
71
|
-
const
|
|
87
|
+
setup(o, { emit: a }) {
|
|
88
|
+
const f = h(!1), d = h(""), u = h(null), g = h(null), V = h({
|
|
72
89
|
top: "0",
|
|
73
90
|
left: "0",
|
|
74
91
|
transform: "none"
|
|
75
|
-
}),
|
|
76
|
-
if (!
|
|
77
|
-
const e =
|
|
78
|
-
if (!e ||
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
81
|
-
const
|
|
82
|
-
return window.innerWidth -
|
|
92
|
+
}), p = H(() => f.value === !0 && o.reposition === !0 ? S(o.align) : o.align), y = H(() => f.value === !0 && o.reposition === !0 ? R(o.position) : o.position), S = (t) => {
|
|
93
|
+
if (!u.value) return t;
|
|
94
|
+
const e = o.teleport ? document.querySelector(".q-popover.teleported") : u.value.children[1];
|
|
95
|
+
if (!e || w(e)) return t;
|
|
96
|
+
const n = u.value.children[0].getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
97
|
+
if (t === "left" || t === "right" || t === "center") {
|
|
98
|
+
const l = n.left;
|
|
99
|
+
return window.innerWidth - l < r.width ? "right" : "left";
|
|
83
100
|
} else {
|
|
84
|
-
const
|
|
85
|
-
return window.innerHeight -
|
|
101
|
+
const l = n.top;
|
|
102
|
+
return window.innerHeight - l < r.height ? "bottom" : "top";
|
|
86
103
|
}
|
|
87
|
-
},
|
|
88
|
-
if (!
|
|
89
|
-
const e =
|
|
90
|
-
if (!e ||
|
|
91
|
-
const
|
|
92
|
-
if (
|
|
93
|
-
const
|
|
94
|
-
return window.innerHeight -
|
|
104
|
+
}, R = (t) => {
|
|
105
|
+
if (!u.value) return t;
|
|
106
|
+
const e = o.teleport ? document.querySelector(".q-popover.teleported") : u.value.children[1];
|
|
107
|
+
if (!e || w(e)) return t;
|
|
108
|
+
const n = u.value.children[0].getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
109
|
+
if (t === "top" || t === "bottom") {
|
|
110
|
+
const l = n.top;
|
|
111
|
+
return window.innerHeight - l < r.height ? "top" : "bottom";
|
|
95
112
|
} else {
|
|
96
|
-
const
|
|
97
|
-
return window.innerWidth -
|
|
113
|
+
const l = n.left;
|
|
114
|
+
return window.innerWidth - l < r.width ? "left" : "right";
|
|
98
115
|
}
|
|
99
|
-
},
|
|
100
|
-
if (!
|
|
101
|
-
const e =
|
|
116
|
+
}, w = (t) => {
|
|
117
|
+
if (!t) return !1;
|
|
118
|
+
const e = t.getBoundingClientRect();
|
|
102
119
|
return e ? e.top >= 0 && e.left >= 0 && e.bottom <= (window.innerHeight || document.documentElement.clientHeight) && e.right <= (window.innerWidth || document.documentElement.clientWidth) : !1;
|
|
103
|
-
},
|
|
104
|
-
(
|
|
105
|
-
|
|
106
|
-
t
|
|
107
|
-
|
|
108
|
-
|
|
120
|
+
}, q = () => {
|
|
121
|
+
if (!u.value) return !0;
|
|
122
|
+
const t = u.value.children[0];
|
|
123
|
+
if (!t) return !0;
|
|
124
|
+
const e = t.getBoundingClientRect();
|
|
125
|
+
let n = t.parentElement;
|
|
126
|
+
for (; n; ) {
|
|
127
|
+
const r = getComputedStyle(n), l = r.overflowY, i = r.overflowX;
|
|
128
|
+
if (l === "auto" || l === "scroll" || (i === "auto" || i === "scroll")) {
|
|
129
|
+
const v = n.getBoundingClientRect();
|
|
130
|
+
if (!(e.bottom > v.top && e.top < v.bottom && e.right > v.left && e.left < v.right))
|
|
131
|
+
return !1;
|
|
132
|
+
}
|
|
133
|
+
n = n.parentElement;
|
|
134
|
+
}
|
|
135
|
+
return !0;
|
|
136
|
+
}, B = () => {
|
|
137
|
+
if (!o.teleport || !o.scrollIntoView || !o.modelValue) return;
|
|
138
|
+
const t = document.querySelector(".q-popover.teleported");
|
|
139
|
+
if (!t) return;
|
|
140
|
+
const e = t.getBoundingClientRect(), n = o.scrollIntoViewPadding, r = window.innerHeight, l = window.innerWidth;
|
|
141
|
+
let i = 0, c = 0;
|
|
142
|
+
e.bottom + n > r ? c = e.bottom + n - r : e.top - n < 0 && (c = e.top - n), e.right + n > l ? i = e.right + n - l : e.left - n < 0 && (i = e.left - n), (i !== 0 || c !== 0) && window.scrollBy({
|
|
143
|
+
top: c,
|
|
144
|
+
left: i,
|
|
145
|
+
behavior: "smooth"
|
|
146
|
+
});
|
|
147
|
+
}, z = () => {
|
|
148
|
+
if (!o.teleport || !o.scrollIntoView) return;
|
|
149
|
+
b();
|
|
150
|
+
const t = document.querySelector(".q-popover.teleported");
|
|
151
|
+
t && (g.value = new ResizeObserver(() => {
|
|
152
|
+
setTimeout(B, 50);
|
|
153
|
+
}), g.value.observe(t));
|
|
154
|
+
}, b = () => {
|
|
155
|
+
g.value && (g.value.disconnect(), g.value = null);
|
|
156
|
+
}, I = () => {
|
|
157
|
+
(o.trigger === "click" || o.trigger === "both") && a("update:modelValue", !o.modelValue);
|
|
158
|
+
}, P = () => {
|
|
159
|
+
o.trigger !== "click" && a("update:modelValue", !1);
|
|
160
|
+
}, T = () => {
|
|
161
|
+
o.trigger !== "click" && a("update:modelValue", !0);
|
|
109
162
|
}, x = () => {
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
112
|
-
const e =
|
|
113
|
-
switch (
|
|
163
|
+
const t = u.value?.children[0];
|
|
164
|
+
if (t) {
|
|
165
|
+
const e = t.clientWidth, n = t.clientHeight;
|
|
166
|
+
switch (p.value) {
|
|
114
167
|
case "left":
|
|
115
|
-
|
|
168
|
+
d.value = `margin-left: ${e / 2 - 10}px;`;
|
|
116
169
|
break;
|
|
117
170
|
case "right":
|
|
118
|
-
|
|
171
|
+
d.value = `margin-right: ${e / 2 - 10}px;`;
|
|
119
172
|
break;
|
|
120
173
|
case "top":
|
|
121
|
-
|
|
174
|
+
d.value = `margin-top: ${n / 2 - 10}px;`;
|
|
122
175
|
break;
|
|
123
176
|
case "bottom":
|
|
124
|
-
|
|
177
|
+
d.value = `margin-bottom: ${n / 2 - 10}px;`;
|
|
125
178
|
break;
|
|
126
179
|
}
|
|
127
180
|
}
|
|
128
|
-
},
|
|
129
|
-
if (!
|
|
130
|
-
const
|
|
131
|
-
if (!
|
|
132
|
-
const e =
|
|
133
|
-
let i = 0,
|
|
134
|
-
|
|
181
|
+
}, m = () => {
|
|
182
|
+
if (!u.value || !o.teleport) return;
|
|
183
|
+
const t = u.value.children[0];
|
|
184
|
+
if (!t) return;
|
|
185
|
+
const e = t.getBoundingClientRect(), n = 10, r = y.value, l = p.value;
|
|
186
|
+
let i = 0, c = 0, s = "none";
|
|
187
|
+
r === "bottom" ? (i = e.bottom + n, l === "left" ? (c = e.left, s = "none") : l === "right" ? (c = e.right, s = "translateX(-100%)") : l === "center" && (c = e.left + e.width / 2, s = "translateX(-50%)")) : r === "top" ? (i = e.top - n, s = "translateY(-100%)", l === "left" ? c = e.left : l === "right" ? (c = e.right, s = "translate(-100%, -100%)") : l === "center" && (c = e.left + e.width / 2, s = "translate(-50%, -100%)")) : r === "left" ? (c = e.left - n, s = "translateX(-100%)", l === "top" ? i = e.top : l === "bottom" ? (i = e.bottom, s = "translate(-100%, -100%)") : l === "middle" && (i = e.top + e.height / 2, s = "translate(-100%, -50%)")) : r === "right" && (c = e.right + n, l === "top" ? (i = e.top, s = "none") : l === "bottom" ? (i = e.bottom, s = "translateY(-100%)") : l === "middle" && (i = e.top + e.height / 2, s = "translateY(-50%)")), V.value = {
|
|
135
188
|
top: `${i}px`,
|
|
136
|
-
left: `${
|
|
137
|
-
transform:
|
|
189
|
+
left: `${c}px`,
|
|
190
|
+
transform: s
|
|
138
191
|
};
|
|
139
192
|
}, L = () => {
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
193
|
+
o.teleport && o.modelValue && m();
|
|
194
|
+
}, X = () => {
|
|
195
|
+
if (o.teleport && o.modelValue) {
|
|
196
|
+
if (o.closeOnScrollOutOfView && !q()) {
|
|
197
|
+
a("update:modelValue", !1);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
o.followScroll && m();
|
|
201
|
+
}
|
|
202
|
+
}, C = k(L, 16, !0), E = k(X, 16, !0);
|
|
203
|
+
W(u, (t) => {
|
|
204
|
+
if (o.teleport) {
|
|
146
205
|
const e = document.querySelector(".q-popover.teleported");
|
|
147
|
-
if (e && e.contains(
|
|
206
|
+
if (e && e.contains(t.target))
|
|
148
207
|
return;
|
|
149
208
|
}
|
|
150
|
-
|
|
209
|
+
o.modelValue && a("update:modelValue", !1);
|
|
151
210
|
});
|
|
152
|
-
function
|
|
153
|
-
|
|
211
|
+
function Y() {
|
|
212
|
+
f.value = !1, b();
|
|
154
213
|
}
|
|
155
214
|
function $() {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
215
|
+
f.value = !0, o.teleport ? O(() => {
|
|
216
|
+
m(), o.scrollIntoView && setTimeout(() => {
|
|
217
|
+
z(), B();
|
|
218
|
+
}, 100);
|
|
219
|
+
}) : !w(u.value?.children[1]) && o.reposition === !0 && x();
|
|
159
220
|
}
|
|
160
|
-
return
|
|
161
|
-
|
|
162
|
-
}),
|
|
163
|
-
|
|
164
|
-
}),
|
|
165
|
-
() =>
|
|
166
|
-
(
|
|
167
|
-
|
|
168
|
-
|
|
221
|
+
return A(() => {
|
|
222
|
+
o.teleport && (window.addEventListener("resize", C), window.addEventListener("scroll", E, !0));
|
|
223
|
+
}), Q(() => {
|
|
224
|
+
o.teleport && (window.removeEventListener("resize", C), window.removeEventListener("scroll", E, !0)), b();
|
|
225
|
+
}), F(
|
|
226
|
+
() => o.modelValue,
|
|
227
|
+
(t) => {
|
|
228
|
+
o.teleport && t && O(() => {
|
|
229
|
+
m();
|
|
169
230
|
});
|
|
170
231
|
}
|
|
171
232
|
), {
|
|
172
233
|
// Refs
|
|
173
|
-
entered:
|
|
174
|
-
offsetStyle:
|
|
175
|
-
popover:
|
|
176
|
-
teleportedStyle:
|
|
234
|
+
entered: f,
|
|
235
|
+
offsetStyle: d,
|
|
236
|
+
popover: u,
|
|
237
|
+
teleportedStyle: V,
|
|
177
238
|
// Computed
|
|
178
|
-
alignment:
|
|
179
|
-
positioning:
|
|
239
|
+
alignment: p,
|
|
240
|
+
positioning: y,
|
|
180
241
|
// Methods
|
|
181
|
-
getAlignment:
|
|
182
|
-
getPositioning:
|
|
183
|
-
isElementInView:
|
|
184
|
-
onAfterLeave:
|
|
185
|
-
onClick:
|
|
186
|
-
onClickOutside:
|
|
242
|
+
getAlignment: S,
|
|
243
|
+
getPositioning: R,
|
|
244
|
+
isElementInView: w,
|
|
245
|
+
onAfterLeave: Y,
|
|
246
|
+
onClick: I,
|
|
247
|
+
onClickOutside: W,
|
|
187
248
|
onEnter: $,
|
|
188
|
-
onMouseLeave:
|
|
189
|
-
onMouseOver:
|
|
190
|
-
updateTeleportedPosition:
|
|
249
|
+
onMouseLeave: P,
|
|
250
|
+
onMouseOver: T,
|
|
251
|
+
updateTeleportedPosition: m
|
|
191
252
|
};
|
|
192
253
|
}
|
|
193
254
|
});
|
|
194
255
|
export {
|
|
195
|
-
|
|
256
|
+
G as default
|
|
196
257
|
};
|