@tekkare/auriga 0.2.145 → 0.2.146
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/module.json
CHANGED
|
@@ -156,7 +156,7 @@ export default defineComponent({
|
|
|
156
156
|
);
|
|
157
157
|
await props.beforeExport();
|
|
158
158
|
if (props.posthogHost !== null && props.posthogKey !== null) {
|
|
159
|
-
const eventName = "
|
|
159
|
+
const eventName = "downloadExcel";
|
|
160
160
|
const eventProps = {
|
|
161
161
|
title: `${props.exportName}-from_${currentDate}`
|
|
162
162
|
};
|
|
@@ -80,6 +80,8 @@ export default defineComponent({
|
|
|
80
80
|
setup(props, { emit }) {
|
|
81
81
|
const filtersOpen = ref(null);
|
|
82
82
|
const scrollPosition = ref(0);
|
|
83
|
+
const lastScrollY = ref(0);
|
|
84
|
+
const isUserScrolling = ref(false);
|
|
83
85
|
const langData = ref(null);
|
|
84
86
|
async function setLang() {
|
|
85
87
|
const jsonFiles = import.meta.glob("./locales/*.json");
|
|
@@ -92,6 +94,9 @@ export default defineComponent({
|
|
|
92
94
|
}
|
|
93
95
|
onBeforeMount(async () => {
|
|
94
96
|
setLang();
|
|
97
|
+
if (window.scrollY === 0) {
|
|
98
|
+
filtersOpen.value = true;
|
|
99
|
+
}
|
|
95
100
|
});
|
|
96
101
|
watch(
|
|
97
102
|
() => props.lang,
|
|
@@ -100,15 +105,20 @@ export default defineComponent({
|
|
|
100
105
|
}
|
|
101
106
|
);
|
|
102
107
|
function openFromScroll() {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
const currentScrollY = window.scrollY;
|
|
109
|
+
if (currentScrollY === 0) {
|
|
110
|
+
if (!isUserScrolling.value) {
|
|
111
|
+
return;
|
|
112
|
+
} else {
|
|
113
|
+
filtersOpen.value = true;
|
|
114
|
+
lastScrollY.value = currentScrollY;
|
|
115
|
+
}
|
|
106
116
|
} else {
|
|
107
117
|
const filters = document.getElementById("arg_filters_section");
|
|
108
118
|
if (filters) {
|
|
109
|
-
if (window.scrollY >
|
|
119
|
+
if (window.scrollY > lastScrollY.value + filters.offsetHeight) {
|
|
110
120
|
filtersOpen.value = false;
|
|
111
|
-
|
|
121
|
+
lastScrollY.value = currentScrollY;
|
|
112
122
|
}
|
|
113
123
|
}
|
|
114
124
|
}
|
|
@@ -144,6 +154,7 @@ export default defineComponent({
|
|
|
144
154
|
const config = { attributes: true, childList: true };
|
|
145
155
|
const callback = function() {
|
|
146
156
|
adjustFilterPosition();
|
|
157
|
+
isUserScrolling.value = false;
|
|
147
158
|
};
|
|
148
159
|
const observer = new MutationObserver(callback);
|
|
149
160
|
if (fixedHeader !== null) {
|
|
@@ -166,6 +177,13 @@ export default defineComponent({
|
|
|
166
177
|
function save() {
|
|
167
178
|
emit("saveScope");
|
|
168
179
|
}
|
|
180
|
+
onMounted(() => {
|
|
181
|
+
window.addEventListener("scroll", () => {
|
|
182
|
+
if (window.scrollY !== lastScrollY.value) {
|
|
183
|
+
isUserScrolling.value = true;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
});
|
|
169
187
|
return {
|
|
170
188
|
filtersOpen,
|
|
171
189
|
clear,
|
|
@@ -176,7 +194,6 @@ export default defineComponent({
|
|
|
176
194
|
}
|
|
177
195
|
});
|
|
178
196
|
</script>
|
|
179
|
-
|
|
180
197
|
<style scoped>
|
|
181
198
|
.oip_filter_card{align-items:flex-start;align-self:stretch;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--light);border-radius:8px;display:flex;flex-direction:column;max-width:1032px;position:sticky;position:-webkit-sticky;top:0;transition:gap .3s linear,max-height .4s ease,background-color .3s linear,padding .3s linear,top .3s linear;z-index:91}.filter_card{background-color:var(--white);gap:16px;max-height:1000px;overflow:visible;padding:24px}.filter_card_collapse{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background-color:rgba(245,245,249,.8);gap:0;max-height:32px;overflow:hidden;padding:16px 24px}.full-width{width:100%}.filter-icon{transition:transform .3s}.icon-rotate{transform:rotate(180deg)}.filters_title{font-size:20px;font-weight:900}.filters_amount,.filters_title{font-style:normal;line-height:normal}.filters_amount{align-items:center;border:1px solid var(--light,#ececf2);border-radius:16px;display:flex;flex-direction:column;font-size:12px;font-weight:700;gap:8px;justify-content:center;padding:2px 8px}.filters_clear,.filters_save{cursor:pointer;font-size:14px;font-style:normal;font-weight:500;line-height:normal;text-decoration-line:underline}.filters_clear{color:var(--system-alert,#ef4444)}.filters_save{color:var(--primary-primary,#2176ff)}.filters_collapse{font-size:14px;font-style:normal;font-weight:400;line-height:160%}.filters_section{align-items:flex-start;align-self:stretch;display:flex;flex-direction:column;gap:16px;transition:max-height .3s linear,opacity .3s linear,visibility .3s linear}.filters_section.open{max-height:100%;opacity:1;overflow:visible}.filters_section.closed{max-height:0;opacity:0;overflow:hidden}.toggle_filter_card{align-items:center;background:transparent;border-radius:4px;cursor:pointer;display:flex;gap:6px;padding:6px}.toggle_filter_card:hover{background:var(--light)!important}
|
|
182
199
|
</style>
|