@tekkare/auriga 0.2.125 → 0.2.126

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
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.2.125"
7
+ "version": "0.2.126"
8
8
  }
@@ -229,14 +229,16 @@
229
229
  <script>
230
230
  import {
231
231
  onMounted,
232
- onUnmounted,
233
232
  ref,
234
233
  computed,
235
234
  watch,
236
- defineComponent
235
+ defineComponent,
236
+ onBeforeUnmount
237
237
  } from "vue";
238
238
  import argIcon from "./argIcon.vue";
239
239
  import { useFuse } from "@vueuse/integrations/useFuse";
240
+ import posthog from "posthog-js";
241
+ import { useRoute } from "#app";
240
242
  export default defineComponent({
241
243
  name: "argAdvancedSearchBar",
242
244
  components: { argIcon },
@@ -275,6 +277,18 @@ export default defineComponent({
275
277
  highlightInput: {
276
278
  type: Boolean,
277
279
  default: false
280
+ },
281
+ posthogKey: {
282
+ type: String,
283
+ default: null
284
+ },
285
+ posthogHost: {
286
+ type: String,
287
+ default: null
288
+ },
289
+ appName: {
290
+ type: String,
291
+ default: null
278
292
  }
279
293
  },
280
294
  emits: ["update:Value", "onClose", "onTyping"],
@@ -402,7 +416,7 @@ export default defineComponent({
402
416
  });
403
417
  onMounted(() => {
404
418
  searchBar.value = document.getElementById("search_input_advanced");
405
- searchBar.value.addEventListener("input", debounce(handleInput, 300));
419
+ searchBar.value?.addEventListener("input", debounce(handleInput, 300));
406
420
  tagsSection.value = document.getElementById("tags");
407
421
  if (props.customShortcuts.length > 0) {
408
422
  for (let i = 0; i < props.customShortcuts.length; i++) {
@@ -420,8 +434,8 @@ export default defineComponent({
420
434
  searchedWords.value = props.defaultInputs;
421
435
  }
422
436
  });
423
- onUnmounted(() => {
424
- searchBar.value.removeEventListener("input", debounce(handleInput, 300));
437
+ onBeforeUnmount(() => {
438
+ searchBar.value?.removeEventListener("input", debounce(handleInput, 300));
425
439
  });
426
440
  function shortcutColor(shortcut) {
427
441
  if (shortcut === selectedShortcut.value || shortcut === hoverShortcut.value) {
@@ -475,6 +489,22 @@ export default defineComponent({
475
489
  if (!isDefault) {
476
490
  emit("update:Value", searchedWords.value);
477
491
  }
492
+ if (props.posthogHost !== null && props.posthogKey !== null && props.appName !== null) {
493
+ const eventName = "Search Input";
494
+ const eventProps = {
495
+ title: `${props.appName}_search`,
496
+ page: useRoute().path,
497
+ value: searchedWords.value
498
+ };
499
+ try {
500
+ posthog.capture(eventName, eventProps);
501
+ } catch (error) {
502
+ console.warn(
503
+ "PostHog not initialized or event capture failed.",
504
+ error
505
+ );
506
+ }
507
+ }
478
508
  searchBar.value.focus();
479
509
  resetSearch();
480
510
  }
@@ -100,6 +100,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
100
100
  type: BooleanConstructor;
101
101
  default: boolean;
102
102
  };
103
+ posthogKey: {
104
+ type: StringConstructor;
105
+ default: null;
106
+ };
107
+ posthogHost: {
108
+ type: StringConstructor;
109
+ default: null;
110
+ };
111
+ appName: {
112
+ type: StringConstructor;
113
+ default: null;
114
+ };
103
115
  }>, {
104
116
  close: () => void;
105
117
  changeDisplay: () => void;
@@ -266,6 +278,18 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
266
278
  type: BooleanConstructor;
267
279
  default: boolean;
268
280
  };
281
+ posthogKey: {
282
+ type: StringConstructor;
283
+ default: null;
284
+ };
285
+ posthogHost: {
286
+ type: StringConstructor;
287
+ default: null;
288
+ };
289
+ appName: {
290
+ type: StringConstructor;
291
+ default: null;
292
+ };
269
293
  }>> & Readonly<{
270
294
  "onUpdate:Value"?: ((...args: any[]) => any) | undefined;
271
295
  onOnClose?: ((...args: any[]) => any) | undefined;
@@ -283,6 +307,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
283
307
  fuzzyThreshold: number;
284
308
  loadingSuggs: boolean;
285
309
  highlightInput: boolean;
310
+ posthogKey: string;
311
+ posthogHost: string;
312
+ appName: string;
286
313
  }, {}, {
287
314
  argIcon: any;
288
315
  }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -153,6 +153,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
153
153
  };
154
154
  }>> & Readonly<{}>, {
155
155
  lang: string;
156
+ posthogKey: string;
157
+ posthogHost: string;
156
158
  cut: boolean;
157
159
  style: string;
158
160
  subtitle: string;
@@ -162,8 +164,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
162
164
  exportName: string;
163
165
  limit: number;
164
166
  actualAmount: number;
165
- posthogKey: string;
166
- posthogHost: string;
167
167
  }, {}, {
168
168
  argBtn: any;
169
169
  }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.2.125",
3
+ "version": "0.2.126",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,7 +30,7 @@
30
30
  "patch": "nuxt-module-build && npm version patch && npm publish"
31
31
  },
32
32
  "dependencies": {
33
- "@nuxt/kit": "^3.14.1592",
33
+ "@nuxt/kit": "^3.15.3",
34
34
  "@svg-maps/france.departments": "^1.0.1",
35
35
  "@svg-maps/france.regions": "^1.1.1",
36
36
  "@svg-maps/usa": "^1.1.1",
@@ -39,7 +39,7 @@
39
39
  "@vueuse/integrations": "^10.11.1",
40
40
  "apexcharts": "^3.54.1",
41
41
  "fuse.js": "^6.6.2",
42
- "posthog-js": "^1.194.4",
42
+ "posthog-js": "^1.210.2",
43
43
  "save": "^2.9.0",
44
44
  "vue-apexcharts": "^1.7.0",
45
45
  "vue-svg-map": "^1.2.0",
@@ -50,12 +50,12 @@
50
50
  "@nuxt/devtools": "latest",
51
51
  "@nuxt/eslint-config": "^0.2.0",
52
52
  "@nuxt/module-builder": "^0.5.5",
53
- "@nuxt/schema": "^3.14.1592",
54
- "@nuxt/test-utils": "^3.15.0",
55
- "@types/node": "^18.19.67",
53
+ "@nuxt/schema": "^3.15.3",
54
+ "@nuxt/test-utils": "^3.15.4",
55
+ "@types/node": "^18.19.74",
56
56
  "changelogen": "^0.5.7",
57
57
  "eslint": "^8.57.1",
58
- "nuxt": "^3.14.1592",
58
+ "nuxt": "^3.15.3",
59
59
  "vitest": "^0.34.6"
60
60
  },
61
61
  "author": "Tekkare"