@tekkare/auriga 0.1.175 → 0.1.177

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.
Files changed (37) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/argAdvancedSearchBar.vue +1 -1
  3. package/dist/runtime/components/argChart.vue +1 -1
  4. package/dist/runtime/components/argExportXLSX.vue +6 -3
  5. package/dist/runtime/components/argMapsEurope.vue +216 -0
  6. package/dist/runtime/components/argMapsEurope.vue.d.ts +57 -0
  7. package/dist/runtime/components/argMapsFrDepartements.vue +1 -1
  8. package/dist/runtime/components/argMapsFrDepartements.vue.d.ts +1 -1
  9. package/dist/runtime/components/argMapsFrRegions.vue +1 -1
  10. package/dist/runtime/components/argMapsFrRegions.vue.d.ts +1 -1
  11. package/dist/runtime/components/argMapsFrRegionsToDepartements.vue +1130 -0
  12. package/dist/runtime/components/argMapsFrRegionsToDepartements.vue.d.ts +95 -0
  13. package/dist/runtime/components/argMapsUs.vue +216 -0
  14. package/dist/runtime/components/argMapsUs.vue.d.ts +57 -0
  15. package/dist/runtime/components/argNumberInput.vue +1 -1
  16. package/dist/runtime/components/argSearchInput.vue +165 -19
  17. package/dist/runtime/components/argSearchInput.vue.d.ts +70 -0
  18. package/dist/runtime/components/argSimpleInput.vue +1 -1
  19. package/dist/runtime/components/maps/countryEuropPath.json +177 -0
  20. package/dist/runtime/components/maps/departementsPath.json +406 -0
  21. package/dist/runtime/components/{mapsFr → maps}/interfaces.d.ts +112 -0
  22. package/dist/runtime/components/{mapsFr → maps}/interfaces.mjs +114 -0
  23. package/dist/runtime/components/maps/regionsPath.json +164 -0
  24. package/dist/runtime/components/maps/usStatesPath.json +152 -0
  25. package/dist/runtime/components/oneCountryEurope.vue +62 -0
  26. package/dist/runtime/components/oneCountryEurope.vue.d.ts +54 -0
  27. package/dist/runtime/components/oneDepartementFr.vue +1 -1
  28. package/dist/runtime/components/oneDepartementFr.vue.d.ts +1 -1
  29. package/dist/runtime/components/oneRegionFr.vue +1 -1
  30. package/dist/runtime/components/oneRegionFr.vue.d.ts +1 -1
  31. package/dist/runtime/components/oneRegionToDepartements.vue +178 -0
  32. package/dist/runtime/components/oneRegionToDepartements.vue.d.ts +111 -0
  33. package/dist/runtime/components/oneStateUs.vue +62 -0
  34. package/dist/runtime/components/oneStateUs.vue.d.ts +54 -0
  35. package/package.json +1 -1
  36. package/dist/runtime/components/mapsFr/departementsPath.json +0 -407
  37. package/dist/runtime/components/mapsFr/regionsPath.json +0 -164
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.1.175"
7
+ "version": "0.1.177"
8
8
  }
@@ -513,5 +513,5 @@ export default defineComponent({
513
513
  });
514
514
  </script>
515
515
  <style scoped>
516
- .research_tags{align-items:center;display:flex;flex-direction:row;gap:8px;overflow-x:scroll}.research_tags::-webkit-scrollbar{display:none}.filters_input_search{align-items:center;background:var(--white);border:1.5px solid var(--light);border-radius:8px;display:flex;flex-direction:row;gap:12px;height:40px;padding:0 0 0 12px;width:calc(100% - 24px)}.filters_shortcuts_open{border-radius:8px 8px 8px 0}.filters_input_style{margin-right:8px;max-width:20%}.research_section{align-items:flex-start;background:var(--white);border:1.5px solid var(--light);border-radius:0 0 8px 8px;box-shadow:0 16px 40px rgba(62,63,94,.12);box-sizing:border-box;display:flex;flex-direction:column;flex-shrink:0;padding:0;width:340px}.research_title{align-items:center;align-self:stretch;display:flex;flex:none;flex-direction:row;flex-grow:0;font-size:14px;font-weight:700;gap:8px;line-height:16px;order:0;padding:16px}.align_icon{margin-left:auto}.research_content{align-items:flex-start;align-self:stretch;display:flex;flex:none;flex-direction:column;flex-grow:0;order:1;padding:0 8px;width:90%}.research_item{align-items:center;border-radius:2px;cursor:pointer;display:flex;flex-direction:row;gap:4px;padding:8px;width:100%}.research_item:hover{background:var(--lightest)!important}.research_item_selected{background:var(--lightest)}.research_keyword{font-size:16px;font-weight:500;line-height:19px}.research_value{color:var(--dark);font-size:16px;font-weight:400;line-height:19px}.research_item>svg{margin-left:auto}.research_footer{align-items:flex-start;align-self:stretch;display:flex;flex:none;flex-direction:column;flex-grow:0;order:2;padding:16px 0 0}.research_separator{background:var(--light);height:1px;width:100%}.shortcuts_choice{align-self:stretch;font-size:14px;font-weight:400;gap:4px;line-height:16px;padding:12px 16px}.shortcut_tag,.shortcuts_choice{align-items:center;display:flex;flex:none;flex-direction:row;flex-grow:0;order:1}.shortcut_tag{background:var(--lightest);border-radius:4px;gap:2px;justify-content:center;padding:4px}.shortcut_keyword{font-size:14px;font-weight:400;line-height:16px;white-space:nowrap}.shortcut_symbol{font-size:14px;font-weight:500;line-height:16px}.tag_search_type{color:var(--dark);font-size:14px;line-height:16px;text-transform:uppercase}.input_shortcut_tag{align-items:center;background:var(--lightest);border-radius:8px;display:flex;flex-direction:row;gap:4px;isolation:isolate;padding:4px 12px;position:relative;width:auto}.input_shortcut_tag.selected_tag>.remove_search,.input_shortcut_tag:hover .remove_search{background:var(--lightest);left:calc(100% - 25px);opacity:1;position:absolute;transition:all .3s ease}.remove_search_section{margin-left:auto;padding:0 12px}.remove_search,.remove_search_section{align-items:center;border-left:1px solid var(--light);border-radius:0 8px 8px 0;cursor:pointer;display:flex;flex-direction:row;height:100%}.remove_search{background:var(--lightest);left:calc(100% - 15px);opacity:0;padding-left:4px;position:absolute;transition:all .2s ease}.search_error{color:var(--system-alert);font-size:14px}.selected_tag{border:1px solid var(--primary)}.input_shortcut_tag.duplicate_tag{animation:shake 1s;background:var(--lightest)!important}@keyframes shake{10%,90%{transform:scale(.9) translate3d(-1px,0,0)}20%,80%{transform:scale(.9) translate3d(2px,0,0)}30%,50%,70%{transform:scale(.9) translate3d(-4px,0,0)}40%,60%{transform:scale(.9) translate3d(4px,0,0)}}.search_icon{flex-shrink:0}.select-remove{background:rgba(33,118,255,.1)!important}.select-remove svg{color:var(--primary)!important}.sub_input_section{align-items:flex-start;display:flex;flex-direction:row;position:absolute;z-index:3}@media screen and (max-width:700px){.sub_input_section{align-items:flex-start;display:flex;flex-direction:column-reverse}.searchbar_info{border-radius:0!important;height:100px;opacity:1!important;overflow-y:scroll;width:338px}}.searchbar_info{align-items:flex-start;background:var(--darkest);border:1px solid var(--darkest);border-radius:0 0 8px 8px;box-shadow:0 16px 40px rgba(62,63,94,.12);color:var(--white);display:flex;flex-direction:row;max-width:500px}.searchbar_shortcuts{padding:16px}.searchbar_info_title{font-size:14px;font-weight:700;text-decoration:underline}.searchbar_info_content{font-size:14px;list-style:inside;padding-inline-start:0!important}.close_info{padding:12px 16px 0 0}.close_info,.show_shortcuts{cursor:pointer}.filters_input_search:hover{border:1.5px solid rgba(33,118,255,.2)!important}.filters_input_search:focus-within{border:1.5px solid var(--primary)!important;box-shadow:0 0 0 4px rgba(33,118,255,.1)!important}.filters_input_search:focus-within .search_icon,.filters_input_search:hover .search_icon{color:var(--primary)!important}.filters_input_style{width:100%}.filters_input_style,.filters_input_style:focus-visible{border:none;outline:none}.filters_input_style::-moz-placeholder{color:var(--medium)}.filters_input_style::placeholder{color:var(--medium)}
516
+ .research_tags{align-items:center;display:flex;flex-direction:row;gap:8px;overflow-x:scroll}.research_tags::-webkit-scrollbar{display:none}.filters_input_search{align-items:center;background:var(--white);border:1.5px solid var(--light);border-radius:8px;display:flex;flex-direction:row;gap:12px;height:40px;padding:0 0 0 12px;width:calc(100% - 24px)}.filters_shortcuts_open{border-radius:8px 8px 8px 0}.filters_input_style{margin-right:8px;max-width:20%}.research_section{align-items:flex-start;background:var(--white);border:1.5px solid var(--light);border-radius:0 0 8px 8px;box-sizing:border-box;display:flex;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important;flex-direction:column;flex-shrink:0;padding:0;width:340px}.research_title{align-items:center;align-self:stretch;display:flex;flex:none;flex-direction:row;flex-grow:0;font-size:14px;font-weight:700;gap:8px;line-height:16px;order:0;padding:16px}.align_icon{margin-left:auto}.research_content{align-items:flex-start;align-self:stretch;display:flex;flex:none;flex-direction:column;flex-grow:0;order:1;padding:0 8px;width:90%}.research_item{align-items:center;border-radius:2px;cursor:pointer;display:flex;flex-direction:row;gap:4px;padding:8px;width:100%}.research_item:hover{background:var(--lightest)!important}.research_item_selected{background:var(--lightest)}.research_keyword{font-size:16px;font-weight:500;line-height:19px}.research_value{color:var(--dark);font-size:16px;font-weight:400;line-height:19px}.research_item>svg{margin-left:auto}.research_footer{align-items:flex-start;align-self:stretch;display:flex;flex:none;flex-direction:column;flex-grow:0;order:2;padding:16px 0 0}.research_separator{background:var(--light);height:1px;width:100%}.shortcuts_choice{align-self:stretch;font-size:14px;font-weight:400;gap:4px;line-height:16px;padding:12px 16px}.shortcut_tag,.shortcuts_choice{align-items:center;display:flex;flex:none;flex-direction:row;flex-grow:0;order:1}.shortcut_tag{background:var(--lightest);border-radius:4px;gap:2px;justify-content:center;padding:4px}.shortcut_keyword{font-size:14px;font-weight:400;line-height:16px;white-space:nowrap}.shortcut_symbol{font-size:14px;font-weight:500;line-height:16px}.tag_search_type{color:var(--dark);font-size:14px;line-height:16px;text-transform:uppercase}.input_shortcut_tag{align-items:center;background:var(--lightest);border-radius:8px;display:flex;flex-direction:row;gap:4px;isolation:isolate;padding:4px 12px;position:relative;width:auto}.input_shortcut_tag.selected_tag>.remove_search,.input_shortcut_tag:hover .remove_search{background:var(--lightest);left:calc(100% - 25px);opacity:1;position:absolute;transition:all .3s ease}.remove_search_section{margin-left:auto;padding:0 12px}.remove_search,.remove_search_section{align-items:center;border-left:1px solid var(--light);border-radius:0 8px 8px 0;cursor:pointer;display:flex;flex-direction:row;height:100%}.remove_search{background:var(--lightest);left:calc(100% - 15px);opacity:0;padding-left:4px;position:absolute;transition:all .2s ease}.search_error{color:var(--system-alert);font-size:14px}.selected_tag{border:1px solid var(--primary)}.input_shortcut_tag.duplicate_tag{animation:shake 1s;background:var(--lightest)!important}@keyframes shake{10%,90%{transform:scale(.9) translate3d(-1px,0,0)}20%,80%{transform:scale(.9) translate3d(2px,0,0)}30%,50%,70%{transform:scale(.9) translate3d(-4px,0,0)}40%,60%{transform:scale(.9) translate3d(4px,0,0)}}.search_icon{flex-shrink:0}.select-remove{background:rgba(33,118,255,.1)!important}.select-remove svg{color:var(--primary)!important}.sub_input_section{align-items:flex-start;display:flex;flex-direction:row;position:absolute;z-index:3}@media screen and (max-width:700px){.sub_input_section{align-items:flex-start;display:flex;flex-direction:column-reverse}.searchbar_info{border-radius:0!important;height:100px;opacity:1!important;overflow-y:scroll;width:338px}}.searchbar_info{align-items:flex-start;background:var(--darkest);border:1px solid var(--darkest);border-radius:0 0 8px 8px;color:var(--white);display:flex;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important;flex-direction:row;max-width:500px}.searchbar_shortcuts{padding:16px}.searchbar_info_title{font-size:14px;font-weight:700;text-decoration:underline}.searchbar_info_content{font-size:14px;list-style:inside;padding-inline-start:0!important}.close_info{padding:12px 16px 0 0}.close_info,.show_shortcuts{cursor:pointer}.filters_input_search:hover{border:1.5px solid rgba(33,118,255,.2)!important}.filters_input_search:focus-within{border:1.5px solid var(--primary)!important;filter:drop-shadow(0 0 4px rgba(33,118,255,.3))!important}.filters_input_search:focus-within .search_icon,.filters_input_search:hover .search_icon{color:var(--primary)!important}.filters_input_style{width:100%}.filters_input_style,.filters_input_style:focus-visible{border:none;outline:none}.filters_input_style::-moz-placeholder{color:var(--medium)}.filters_input_style::placeholder{color:var(--medium)}
517
517
  </style>
@@ -705,5 +705,5 @@ export default defineComponent({
705
705
  });
706
706
  </script>
707
707
  <style>
708
- .prmt_chart{font-family:Figtree,sans-serif!important;position:relative}.prmt_chart_title{color:var(--darkest);font-size:18px;font-style:normal;font-weight:700;line-height:21px;margin-bottom:8px;margin-right:150px}.prmt_chart_title.prmt_chart_title_without_subtitle{margin-bottom:22px}.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center{max-height:100px!important}.prmt_chart_source{align-items:center;color:#2176ff;cursor:pointer;display:flex;font-size:12px;font-style:normal;font-weight:400;gap:8px;height:14px;line-height:14px;overflow:hidden;padding:4px 0;text-overflow:ellipsis;white-space:nowrap}.prmt_chart_source a{color:#2176ff}.prmt_chart_source:empty{visibility:hidden}.prmt_chart .apexcharts-toolbar{top:0!important}.prmt_chart .apexcharts-canvas .apexcharts-svg{overflow:visible}.prmt_chart .apexcharts-pie-area{stroke-width:0}.prmt_chart .apexcharts-canvas{position:static}.prmt_chart.bar-column_arg_chart>.vue-apexcharts>.apexcharts-canvas>svg>.apexcharts-inner>.apexcharts-bar-series.apexcharts-plot-series .apexcharts-series path,.prmt_chart.bar_arg_chart>.vue-apexcharts>.apexcharts-canvas>svg>.apexcharts-inner>.apexcharts-bar-series.apexcharts-plot-series .apexcharts-series path{-webkit-clip-path:inset(0 0 -11% 0 round 6px)!important;clip-path:inset(0 0 -11% 0 round 6px)!important}.prmt_chart.bar-horizontal-group_arg_chart>.vue-apexcharts>.apexcharts-canvas>svg>.apexcharts-inner>.apexcharts-bar-series.apexcharts-plot-series .apexcharts-series path,.prmt_chart.bar-horizontal_arg_chart>.vue-apexcharts>.apexcharts-canvas>svg>.apexcharts-inner>.apexcharts-bar-series.apexcharts-plot-series .apexcharts-series path{-webkit-clip-path:inset(0 0 0 -11% round 6px)!important;clip-path:inset(0 0 0 -11% round 6px)!important}
708
+ .prmt_chart{font-family:Figtree,sans-serif!important;position:relative}.prmt_chart:hover{z-index:92!important}.prmt_chart_title{color:var(--darkest);font-size:18px;font-style:normal;font-weight:700;line-height:21px;margin-bottom:8px;margin-right:150px}.prmt_chart_title.prmt_chart_title_without_subtitle{margin-bottom:22px}.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center{max-height:100px!important}.prmt_chart_source{align-items:center;color:#2176ff;cursor:pointer;display:flex;font-size:12px;font-style:normal;font-weight:400;gap:8px;height:14px;line-height:14px;overflow:hidden;padding:4px 0;text-overflow:ellipsis;white-space:nowrap}.prmt_chart_source a{color:#2176ff}.prmt_chart_source:empty{visibility:hidden}.prmt_chart .apexcharts-toolbar{top:0!important}.prmt_chart .apexcharts-canvas .apexcharts-svg{overflow:visible}.prmt_chart .apexcharts-pie-area{stroke-width:0}.prmt_chart .apexcharts-canvas{position:static}.prmt_chart.bar-column_arg_chart>.vue-apexcharts>.apexcharts-canvas>svg>.apexcharts-inner>.apexcharts-bar-series.apexcharts-plot-series .apexcharts-series path,.prmt_chart.bar_arg_chart>.vue-apexcharts>.apexcharts-canvas>svg>.apexcharts-inner>.apexcharts-bar-series.apexcharts-plot-series .apexcharts-series path{-webkit-clip-path:inset(0 0 -11% 0 round 6px)!important;clip-path:inset(0 0 -11% 0 round 6px)!important}.prmt_chart.bar-horizontal-group_arg_chart>.vue-apexcharts>.apexcharts-canvas>svg>.apexcharts-inner>.apexcharts-bar-series.apexcharts-plot-series .apexcharts-series path,.prmt_chart.bar-horizontal_arg_chart>.vue-apexcharts>.apexcharts-canvas>svg>.apexcharts-inner>.apexcharts-bar-series.apexcharts-plot-series .apexcharts-series path{-webkit-clip-path:inset(0 0 0 -11% round 6px)!important;clip-path:inset(0 0 0 -11% round 6px)!important}
709
709
  </style>
@@ -135,9 +135,12 @@ export default defineComponent({
135
135
  const isLoading = ref(false);
136
136
  const launchDownload = async () => {
137
137
  isLoading.value = true;
138
- const currentDate = (/* @__PURE__ */ new Date()).toLocaleString([], {
139
- dateStyle: "short"
140
- });
138
+ const currentDate = (/* @__PURE__ */ new Date()).toLocaleString(
139
+ [props.lang === "en" ? "en-US" : "fr-FR"],
140
+ {
141
+ dateStyle: "short"
142
+ }
143
+ );
141
144
  await props.beforeExport();
142
145
  if ((props.actualAmount !== null && props.actualAmount > props.limit || props.actualAmount === null && props.tabs.some((tab) => tab.data.length > props.limit)) && canLaunchDownload.value === false) {
143
146
  openModal();
@@ -0,0 +1,216 @@
1
+ <template>
2
+ <div class="oip_table_card map_card-container" :id="`container_map-${title}`">
3
+ <div class="p-24">
4
+ <div class="oip_subtitle">
5
+ {{ title ? title : "Your map title" }}
6
+ </div>
7
+ <ArgSourceContainer @click="openSource">
8
+ {{ source ? source : "Your source" }}
9
+ </ArgSourceContainer>
10
+ </div>
11
+ <div
12
+ v-if="hoveredCountry !== null"
13
+ :id="`tooltip_map-${title}`"
14
+ class="tooltip_container"
15
+ :style="{
16
+ top: tooltipPosition.y + 'px',
17
+ left: tooltipPosition.x + 'px',
18
+ width: tooltipPosition.width + 'px',
19
+ }"
20
+ >
21
+ <div class="tooltip">
22
+ <p class="card_title">{{ hoveredCountry }}</p>
23
+ <div class="card_text">
24
+ <slot
25
+ name="Tooltip"
26
+ v-bind:value="{
27
+ name: hoveredCountry,
28
+ value: data.find((x) => x.name == hoveredCountry)?.value,
29
+ }"
30
+ />
31
+ </div>
32
+ </div>
33
+ </div>
34
+ <div class="p24">
35
+ <svg
36
+ class="map"
37
+ width="auto"
38
+ height="500"
39
+ viewBox="0 0 1749 1458"
40
+ fill="none"
41
+ xmlns="http://www.w3.org/2000/svg"
42
+ >
43
+ <OneCountryEurope
44
+ v-for="country in EuropeanCountries"
45
+ :key="country"
46
+ :data="{
47
+ color: getColor(data.find((x) => x.name == country)?.value),
48
+ value: data.find((x) => x.name == country)?.value,
49
+ }"
50
+ :currentCountry="country"
51
+ :title="title"
52
+ :hoveredCountry="hoveredCountry"
53
+ @hover="handleHover(country)"
54
+ @mouseleave="handleMouseLeave"
55
+ />
56
+ </svg>
57
+ <div class="legend">
58
+ <div class="scale" />
59
+ <div class="legend-text">
60
+ <p v-for="value in scale" :key="value">
61
+ {{ Math.ceil(value) }}
62
+ </p>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ <slot name="Subcontent" />
67
+ </div>
68
+ </template>
69
+
70
+ <script>
71
+ import { onMounted, ref, watch, defineComponent, nextTick } from "vue";
72
+ import { EuropeanCountries } from "./maps/interfaces";
73
+ import ArgSourceContainer from "./argSourceContainer.vue";
74
+ import OneCountryEurope from "./oneCountryEurope.vue";
75
+ export default defineComponent({
76
+ name: "ArgMapsEurope",
77
+ components: { OneCountryEurope, ArgSourceContainer },
78
+ props: {
79
+ data: {
80
+ type: Array,
81
+ default: null,
82
+ required: true
83
+ },
84
+ title: {
85
+ type: [String, null],
86
+ default: null,
87
+ required: false
88
+ },
89
+ source: {
90
+ type: [String, null],
91
+ default: null
92
+ }
93
+ },
94
+ emits: ["openSource"],
95
+ setup(props, { emit }) {
96
+ const minimalValue = ref(null);
97
+ const maximalValue = ref(null);
98
+ const hoveredCountry = ref(null);
99
+ const tooltipPosition = ref({ x: 0, y: 0, width: 0 });
100
+ const scale = ref([]);
101
+ function getColor(value) {
102
+ if (!value)
103
+ return "var(--lightest)";
104
+ if (value >= scale.value[9]) {
105
+ return "#3F1151";
106
+ } else if (value >= scale.value[8]) {
107
+ return "#432974";
108
+ } else if (value >= scale.value[7]) {
109
+ return "#404A85";
110
+ } else if (value >= scale.value[6]) {
111
+ return "#3F668A";
112
+ } else if (value >= scale.value[5]) {
113
+ return "#43808C";
114
+ } else if (value >= scale.value[4]) {
115
+ return "#4C9C8A";
116
+ } else if (value >= scale.value[3]) {
117
+ return "#5FB57E";
118
+ } else if (value >= scale.value[2]) {
119
+ return "#85CB68";
120
+ } else if (value >= scale.value[1]) {
121
+ return "#BDDD51";
122
+ } else if (value >= scale.value[0]) {
123
+ return "#F9E855";
124
+ }
125
+ }
126
+ function handleHover(country) {
127
+ hoveredCountry.value = country;
128
+ }
129
+ function handleMouseLeave() {
130
+ hoveredCountry.value = null;
131
+ }
132
+ function openSource() {
133
+ emit("openSource");
134
+ }
135
+ function setupScale() {
136
+ minimalValue.value = Math.floor(
137
+ Math.min(...props.data.map((x) => x.value))
138
+ );
139
+ maximalValue.value = Math.ceil(
140
+ Math.max(...props.data.map((x) => x.value))
141
+ );
142
+ const step = (maximalValue.value - minimalValue.value) / 10;
143
+ if (minimalValue.value !== null) {
144
+ scale.value = Array.from(
145
+ { length: 10 },
146
+ (_, i) => (minimalValue.value !== null ? minimalValue.value : 0) + i * step
147
+ );
148
+ }
149
+ }
150
+ onMounted(() => {
151
+ setupScale();
152
+ });
153
+ watch(
154
+ () => props.data,
155
+ () => {
156
+ setupScale();
157
+ }
158
+ );
159
+ watch(
160
+ () => hoveredCountry.value,
161
+ () => {
162
+ if (hoveredCountry.value) {
163
+ const selectedcountry = document.getElementById(
164
+ `interactiveMap-${props.title}-${hoveredCountry.value}`
165
+ )?.getBoundingClientRect();
166
+ const containerPosition = document.getElementById(`container_map-${props.title}`)?.getBoundingClientRect();
167
+ if (!selectedcountry || !containerPosition)
168
+ return;
169
+ tooltipPosition.value = {
170
+ x: selectedcountry?.x - containerPosition?.x,
171
+ y: selectedcountry?.top - containerPosition?.top - 60,
172
+ width: selectedcountry?.width
173
+ };
174
+ }
175
+ }
176
+ );
177
+ watch(
178
+ () => hoveredCountry.value,
179
+ async () => {
180
+ if (hoveredCountry.value) {
181
+ await nextTick();
182
+ const selectedRegion = document.getElementById(
183
+ `interactiveMap-${props.title}-${hoveredCountry.value}`
184
+ )?.getBoundingClientRect();
185
+ const containerPosition = document.getElementById(`container_map-${props.title}`)?.getBoundingClientRect();
186
+ const tooltipElement = document.getElementById(
187
+ `tooltip_map-${props.title}`
188
+ );
189
+ const tooltipHeight = tooltipElement ? tooltipElement.getBoundingClientRect().height : 60;
190
+ if (!selectedRegion || !containerPosition)
191
+ return;
192
+ tooltipPosition.value = {
193
+ x: selectedRegion?.x - containerPosition?.x,
194
+ y: selectedRegion?.top - containerPosition?.top - tooltipHeight,
195
+ width: selectedRegion?.width
196
+ };
197
+ }
198
+ }
199
+ );
200
+ return {
201
+ getColor,
202
+ handleHover,
203
+ handleMouseLeave,
204
+ EuropeanCountries,
205
+ hoveredCountry,
206
+ tooltipPosition,
207
+ scale,
208
+ openSource
209
+ };
210
+ }
211
+ });
212
+ </script>
213
+
214
+ <style scoped>
215
+ .map{margin-top:24px}.p24{padding:24px}.map path{stroke-width:2px;stroke:rgba(0,0,0,.2);max-height:400px;position:relative}.map path:hover{transition:all .2s}.map_card-container{display:flex;flex-direction:column;gap:8px;min-width:400px;position:relative;width:100%}.test{margin-bottom:200px}.tooltip_container{align-items:center;display:flex;flex-direction:column;justify-content:center;left:0;min-width:-moz-fit-content;min-width:fit-content;position:absolute;top:0;z-index:96}.tooltip{background:#fff;border:1px solid var(--light);border-radius:4px;box-shadow:var(--medium-shadow);color:var(--darkest);font-size:12px}.card_title{background-color:var(--light);border-radius:4px 4px 0 0;font-size:14px;font-weight:600;padding:2px 8px;width:calc(100% - 15px)}.card_text{color:var(--dark);font-size:12px;font-weight:400;line-height:160%;padding:8px;width:100%}.legend{display:flex;flex-direction:column;gap:8px;margin:8px auto auto;width:50%}.scale{background:linear-gradient(45deg,#3f1151,#432974,#404a85,#3f668a,#43808c,#4c9c8a,#5fb57e,#85cb68,#bddd51,#f9e855);height:10px;transform:rotate(180deg)}.legend-text{align-items:center;color:var(--dark);display:flex;font-size:12px;font-weight:400;justify-content:space-between;line-height:160%}.p-24{padding:0 24px}
216
+ </style>
@@ -0,0 +1,57 @@
1
+ import type { PropType } from "vue";
2
+ import { EuropeanCountries } from "./maps/interfaces";
3
+ type Data = {
4
+ name: EuropeanCountries;
5
+ value: number;
6
+ };
7
+ declare const _default: import("vue").DefineComponent<{
8
+ data: {
9
+ type: PropType<Data[]>;
10
+ default: null;
11
+ required: true;
12
+ };
13
+ title: {
14
+ type: PropType<string | null>;
15
+ default: null;
16
+ required: false;
17
+ };
18
+ source: {
19
+ type: PropType<string | null>;
20
+ default: null;
21
+ };
22
+ }, {
23
+ getColor: (value?: number) => "var(--lightest)" | "#3F1151" | "#432974" | "#404A85" | "#3F668A" | "#43808C" | "#4C9C8A" | "#5FB57E" | "#85CB68" | "#BDDD51" | "#F9E855" | undefined;
24
+ handleHover: (country: EuropeanCountries) => void;
25
+ handleMouseLeave: () => void;
26
+ EuropeanCountries: typeof EuropeanCountries;
27
+ hoveredCountry: import("vue").Ref<EuropeanCountries | null>;
28
+ tooltipPosition: import("vue").Ref<{
29
+ x: number;
30
+ y: number;
31
+ width: number;
32
+ }>;
33
+ scale: import("vue").Ref<number[]>;
34
+ openSource: () => void;
35
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "openSource"[], "openSource", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
36
+ data: {
37
+ type: PropType<Data[]>;
38
+ default: null;
39
+ required: true;
40
+ };
41
+ title: {
42
+ type: PropType<string | null>;
43
+ default: null;
44
+ required: false;
45
+ };
46
+ source: {
47
+ type: PropType<string | null>;
48
+ default: null;
49
+ };
50
+ }>> & {
51
+ onOpenSource?: ((...args: any[]) => any) | undefined;
52
+ }, {
53
+ data: Data[];
54
+ title: string | null;
55
+ source: string | null;
56
+ }, {}>;
57
+ export default _default;
@@ -69,7 +69,7 @@
69
69
 
70
70
  <script>
71
71
  import { onMounted, ref, watch, nextTick, defineComponent } from "vue";
72
- import { Departements } from "./mapsFr/interfaces";
72
+ import { Departements } from "./maps/interfaces";
73
73
  import oneDepartementFr from "./oneDepartementFr.vue";
74
74
  import ArgSourceContainer from "./argSourceContainer.vue";
75
75
  export default defineComponent({
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from "vue";
2
- import { Departements } from "./mapsFr/interfaces";
2
+ import { Departements } from "./maps/interfaces";
3
3
  type Data = {
4
4
  name: Departements;
5
5
  value: number;
@@ -69,7 +69,7 @@
69
69
 
70
70
  <script>
71
71
  import { onMounted, ref, watch, defineComponent, nextTick } from "vue";
72
- import { Regions } from "./mapsFr/interfaces";
72
+ import { Regions } from "./maps/interfaces";
73
73
  import oneRegionFr from "./oneRegionFr.vue";
74
74
  import ArgSourceContainer from "./argSourceContainer.vue";
75
75
  export default defineComponent({
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from "vue";
2
- import { Regions } from "./mapsFr/interfaces";
2
+ import { Regions } from "./maps/interfaces";
3
3
  type dataRegion = {
4
4
  name: Regions;
5
5
  value: number;