@tekkare/auriga 0.2.176 → 0.2.178
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
|
@@ -159,10 +159,16 @@ export default defineComponent({
|
|
|
159
159
|
}
|
|
160
160
|
);
|
|
161
161
|
await props.beforeExport();
|
|
162
|
-
if (props.posthogHost !== null && props.posthogKey !== null
|
|
162
|
+
if (props.posthogHost !== null && props.posthogKey !== null) {
|
|
163
163
|
const eventName = "downloadExcel";
|
|
164
|
+
const eventProps = {
|
|
165
|
+
title: `${props.exportName}-from_${currentDate}`
|
|
166
|
+
};
|
|
164
167
|
try {
|
|
165
|
-
posthog.capture(
|
|
168
|
+
posthog.capture(
|
|
169
|
+
eventName,
|
|
170
|
+
props.posthogProperties !== null ? props.posthogProperties : eventProps
|
|
171
|
+
);
|
|
166
172
|
} catch (error) {
|
|
167
173
|
console.warn(
|
|
168
174
|
"PostHog not initialized or event capture failed.",
|
|
@@ -83,8 +83,6 @@ export default defineComponent({
|
|
|
83
83
|
emits: ["clearFilters", "saveScope"],
|
|
84
84
|
setup(props, { emit }) {
|
|
85
85
|
const filtersOpen = ref(null);
|
|
86
|
-
const lastScrollY = ref(0);
|
|
87
|
-
const isUserScrolling = ref(false);
|
|
88
86
|
const langData = ref(null);
|
|
89
87
|
async function setLang() {
|
|
90
88
|
const jsonFiles = import.meta.glob("./locales/*.json");
|
|
@@ -108,62 +106,21 @@ export default defineComponent({
|
|
|
108
106
|
}
|
|
109
107
|
);
|
|
110
108
|
function openFromScroll() {
|
|
111
|
-
const input = document.getElementById("search_input_advanced");
|
|
112
|
-
if (window.scrollY !== lastScrollY.value) {
|
|
113
|
-
isUserScrolling.value = true;
|
|
114
|
-
}
|
|
115
109
|
if (!props.autoOpen) {
|
|
116
|
-
|
|
117
|
-
if (input && document.activeElement && document.activeElement === input) {
|
|
118
|
-
return;
|
|
119
|
-
} else if (isUserScrolling.value) {
|
|
120
|
-
filtersOpen.value = false;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
110
|
+
filtersOpen.value = false;
|
|
123
111
|
}
|
|
124
112
|
if (props.autoOpen) {
|
|
125
|
-
|
|
126
|
-
if (currentScrollY === 0) {
|
|
127
|
-
if (!isUserScrolling.value) {
|
|
128
|
-
return;
|
|
129
|
-
} else {
|
|
130
|
-
filtersOpen.value = true;
|
|
131
|
-
lastScrollY.value = currentScrollY;
|
|
132
|
-
}
|
|
133
|
-
} else {
|
|
134
|
-
const filters = document.getElementById("arg_filters_section");
|
|
135
|
-
if (filters) {
|
|
136
|
-
if (window.scrollY > lastScrollY.value + filters.offsetHeight) {
|
|
137
|
-
filtersOpen.value = false;
|
|
138
|
-
lastScrollY.value = currentScrollY;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
113
|
+
filtersOpen.value = window.scrollY === 0;
|
|
142
114
|
}
|
|
143
115
|
}
|
|
144
116
|
onUpdated(() => {
|
|
145
117
|
adjustFilterPosition();
|
|
146
118
|
});
|
|
147
|
-
watch(
|
|
148
|
-
() => filtersOpen.value,
|
|
149
|
-
(new_filters_open) => {
|
|
150
|
-
setTimeout(() => {
|
|
151
|
-
document.addEventListener("scroll", openFromScroll);
|
|
152
|
-
}, 500);
|
|
153
|
-
}
|
|
154
|
-
);
|
|
155
119
|
function handleCard() {
|
|
156
120
|
if (filtersOpen.value === false) {
|
|
157
|
-
document.removeEventListener("scroll", openFromScroll);
|
|
158
|
-
if (!props.autoOpen) {
|
|
159
|
-
document.removeEventListener("scroll", openFromScroll);
|
|
160
|
-
}
|
|
161
121
|
filtersOpen.value = true;
|
|
162
122
|
} else {
|
|
163
123
|
filtersOpen.value = false;
|
|
164
|
-
if (!props.autoOpen) {
|
|
165
|
-
document.addEventListener("scroll", openFromScroll);
|
|
166
|
-
}
|
|
167
124
|
}
|
|
168
125
|
}
|
|
169
126
|
function listenToHeaderChange() {
|
|
@@ -171,7 +128,6 @@ export default defineComponent({
|
|
|
171
128
|
const config = { attributes: true, childList: true };
|
|
172
129
|
const callback = function() {
|
|
173
130
|
adjustFilterPosition();
|
|
174
|
-
isUserScrolling.value = false;
|
|
175
131
|
};
|
|
176
132
|
const observer = new MutationObserver(callback);
|
|
177
133
|
if (fixedHeader !== null) {
|
|
@@ -198,11 +154,9 @@ export default defineComponent({
|
|
|
198
154
|
if (!props.autoOpen) {
|
|
199
155
|
filtersOpen.value = true;
|
|
200
156
|
}
|
|
157
|
+
document.addEventListener("wheel", openFromScroll);
|
|
201
158
|
adjustFilterPosition();
|
|
202
159
|
listenToHeaderChange();
|
|
203
|
-
setTimeout(() => {
|
|
204
|
-
openFromScroll();
|
|
205
|
-
});
|
|
206
160
|
});
|
|
207
161
|
return {
|
|
208
162
|
filtersOpen,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekkare/auriga",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.178",
|
|
4
4
|
"description": "Aurgia is a UI kit developped by Tekkare",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"test:watch": "vitest watch",
|
|
28
28
|
"storybook": "npm --prefix ./docs run storybook -- --port 6006",
|
|
29
29
|
"chromatic": "npm --prefix ./docs run chromatic",
|
|
30
|
-
"patch": "nuxt-module-build && npm version patch && npm publish"
|
|
30
|
+
"patch": "nuxt-module-build && npm version patch && npm publish && git push"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@nuxt/kit": "^3.15.4",
|