@tekkare/auriga 0.1.78 → 0.1.80
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
|
@@ -447,8 +447,7 @@ export default defineComponent({
|
|
|
447
447
|
const simpleElem = document?.getElementById(
|
|
448
448
|
`simple-select-complex-${props.complex_label}`
|
|
449
449
|
);
|
|
450
|
-
|
|
451
|
-
if (elem !== null && simpleElem !== null && sidebar && sidebar !== null) {
|
|
450
|
+
if (elem !== null && simpleElem !== null) {
|
|
452
451
|
elem.style.display = "";
|
|
453
452
|
elem.style.left = "";
|
|
454
453
|
const bounding = elem.getBoundingClientRect();
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="map_class">
|
|
9
9
|
<svg-map
|
|
10
10
|
:style="`width: ${width};`"
|
|
11
|
-
class=""
|
|
11
|
+
:class="[isEJPRD ? 'ejprd_map' : '', showTooltip ? '' : 'no_hover']"
|
|
12
12
|
:map="getMapsName()"
|
|
13
13
|
:data="state_table"
|
|
14
14
|
:location-class="getLocationClass"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
></svg-map>
|
|
19
19
|
</div>
|
|
20
20
|
<!-- Tooltip -->
|
|
21
|
-
<div class="oip_maps_tooltip" :style="tooltipStyle">
|
|
21
|
+
<div v-if="showTooltip" class="oip_maps_tooltip" :style="tooltipStyle">
|
|
22
22
|
<h3>{{ pointedLocation }}</h3>
|
|
23
23
|
<div class="legend-value">
|
|
24
24
|
<div
|
|
@@ -117,10 +117,10 @@ import {
|
|
|
117
117
|
watch,
|
|
118
118
|
defineComponent
|
|
119
119
|
} from "vue";
|
|
120
|
-
import _ from "lodash";
|
|
121
120
|
import Usa from "@svg-maps/usa";
|
|
122
121
|
import UsaCounties from "@svg-maps/usa.counties";
|
|
123
122
|
import France from "@svg-maps/france.regions";
|
|
123
|
+
import World from "@svg-maps/world";
|
|
124
124
|
import SvgMap from "./SvgMap.vue";
|
|
125
125
|
export default defineComponent({
|
|
126
126
|
name: "argMaps",
|
|
@@ -132,7 +132,10 @@ export default defineComponent({
|
|
|
132
132
|
},
|
|
133
133
|
country: { type: String, default: "Usa" },
|
|
134
134
|
width: { type: String, default: "80%" },
|
|
135
|
-
pourcentage: { type: Boolean, default: false }
|
|
135
|
+
pourcentage: { type: Boolean, default: false },
|
|
136
|
+
showLegend: { type: Boolean, default: true },
|
|
137
|
+
showTooltip: { type: Boolean, default: false },
|
|
138
|
+
isEJPRD: { type: Boolean, default: false }
|
|
136
139
|
},
|
|
137
140
|
setup(props) {
|
|
138
141
|
const table = ref([]);
|
|
@@ -170,6 +173,8 @@ export default defineComponent({
|
|
|
170
173
|
return France;
|
|
171
174
|
if (props.country === "UsaCounties")
|
|
172
175
|
return UsaCounties;
|
|
176
|
+
if (props.country === "World")
|
|
177
|
+
return World;
|
|
173
178
|
return null;
|
|
174
179
|
}
|
|
175
180
|
function getLocationName(node) {
|
|
@@ -195,17 +200,24 @@ export default defineComponent({
|
|
|
195
200
|
pointedLocation.value = getLocationName(event.target);
|
|
196
201
|
let data2 = props.state_table;
|
|
197
202
|
const selectstate = pointedLocation.value;
|
|
198
|
-
data2 =
|
|
203
|
+
data2 = data2.map((i) => {
|
|
199
204
|
if (i.state === selectstate)
|
|
200
205
|
return i;
|
|
201
206
|
return false;
|
|
202
207
|
});
|
|
203
|
-
data2 =
|
|
204
|
-
data2 =
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
data2 = data2.filter((i) => i !== false);
|
|
209
|
+
data2 = data2.find((o) => o.value + 1);
|
|
210
|
+
if (data2) {
|
|
211
|
+
value.value = data2.value;
|
|
212
|
+
value1.value = data2.value1;
|
|
213
|
+
value2.value = data2.value2;
|
|
214
|
+
value3.value = data2.value3;
|
|
215
|
+
} else {
|
|
216
|
+
value.value = void 0;
|
|
217
|
+
value1.value = void 0;
|
|
218
|
+
value2.value = void 0;
|
|
219
|
+
value3.value = void 0;
|
|
220
|
+
}
|
|
209
221
|
}
|
|
210
222
|
function unpointLocation() {
|
|
211
223
|
pointedLocation.value = null;
|
|
@@ -273,5 +285,5 @@ export default defineComponent({
|
|
|
273
285
|
</script>
|
|
274
286
|
|
|
275
287
|
<style>
|
|
276
|
-
.oip_maps_tooltip>h3{color:(--independence);font-size:18px;font-weight:700}.number_table{flex:none;flex-grow:0;font-family:Figtree,sans-serif;font-size:14px;font-style:normal;font-weight:400;height:45px;left:71px;line-height:180%;margin:0;order:0;position:static;top:10px;width:200px}.oip_maps_tooltip{background-color:var(--white);border:1px solid #dedfe9;border-radius:10px;box-shadow:var(--overlay-shadow);box-sizing:border-box;margin:0 auto;min-width:200px;padding:16px;position:fixed;text-align:left;z-index:2}.svg-map{height:auto;width:100%;stroke:
|
|
288
|
+
.oip_maps_tooltip>h3{color:(--independence);font-size:18px;font-weight:700}.number_table{flex:none;flex-grow:0;font-family:Figtree,sans-serif;font-size:14px;font-style:normal;font-weight:400;height:45px;left:71px;line-height:180%;margin:0;order:0;position:static;top:10px;width:200px}.oip_maps_tooltip{background-color:var(--white);border:1px solid #dedfe9;border-radius:10px;box-shadow:var(--overlay-shadow);box-sizing:border-box;margin:0 auto;min-width:200px;padding:16px;position:fixed;text-align:left;z-index:2}.svg-map{height:auto;width:100%;stroke:none;stroke-width:.7;stroke-linecap:round;stroke-linejoin:round}.ejprd_map>.svg-map__location{fill:#f3f2f5;cursor:pointer}.ejprd_map.no_hover>.svg-map__location{fill:#f3f2f5;cursor:auto}.ejprd_map>.svg-map__location:focus,.ejprd_map>.svg-map__location:hover{fill:var(--light)!important;filter:brightness(90%);outline:0}.ejprd_map.no_hover>.svg-map__location:focus,.ejprd_map.no_hover>.svg-map__location:hover{fill:#f3f2f5!important;filter:brightness(100%);outline:0}.ejprd_map>.svg-map__location[aria-checked=true]{fill:#f4bc44}.ejprd_map>.svg-map__location--heat0{fill:#edf5fe!important}.ejprd_map>.svg-map__location--heat1{fill:#dbeafc!important}.ejprd_map>.svg-map__location--heat2{fill:#c8dffb!important}.ejprd_map>.svg-map__location--heat3{fill:#b7d5fa!important}.ejprd_map>.svg-map__location--heat4{fill:#a5cbf9!important}.ejprd_map>.svg-map__location--heat5{fill:#93c0f8!important}.ejprd_map>.svg-map__location--heat6{fill:#82b6f7!important}.ejprd_map>.svg-map__location--heat7{fill:#71abf7!important}.ejprd_map>.svg-map__location--heat8{fill:#5e9ef5!important}.ejprd_map>.svg-map__location--heat9{fill:#5397f5!important}.ejprd_map>.svg-map__location--heat10{fill:#468df4!important}.ejprd_map>.svg-map__location--heat-none{fill:#f3f2f5!important}.svg-map__location{fill:var(--lightest);cursor:pointer}.no_hover>.svg-map__location{fill:var(--lightest);cursor:auto}.svg-map__location:focus,.svg-map__location:hover{fill:var(--primary)!important;filter:brightness(90%);outline:0}.no_hover>.svg-map__location:focus,.no_hover>.svg-map__location:hover{fill:var(--lightest)!important;filter:brightness(100%);outline:0}.svg-map__location[aria-checked=true]{fill:#f4bc44}.svg-map__location--heat0{fill:#ecf2fe!important}.svg-map__location--heat1{fill:#dae5fc!important}.svg-map__location--heat2{fill:#c7d8fb!important}.svg-map__location--heat3{fill:#b5ccfa!important}.svg-map__location--heat4{fill:#a2bff8!important}.svg-map__location--heat5{fill:#90b3f7!important}.svg-map__location--heat6{fill:#7ea5f6!important}.svg-map__location--heat7{fill:#6c99f6!important}.svg-map__location--heat8{fill:#5789f4!important}.svg-map__location--heat9{fill:#4b80f4!important}.svg-map__location--heat10{fill:#3c73f3!important}.svg-map__location--heat-none{fill:var(--lightest)!important}.legend_scale{background:linear-gradient(90deg,#ecf2fe,#3c73f3);display:grid;left:25%;width:45%}.legend_scale,.legend_value{content:"";height:20px;position:relative;top:90%}.legend_value{display:flex;justify-content:space-between;left:24%;width:47%}.legend-divider-1{left:33%}.legend-divider-1,.legend-divider-2{background-color:var(--white);content:"";height:100%;position:absolute;width:1px}.legend-divider-2{left:66%}.legend-value{margin-top:14px}.legend-value>div{display:flex;flex-flow:column;gap:6px}.map_class{display:flex;justify-content:center;margin:auto;padding:0 0 15px}
|
|
277
289
|
</style>
|
|
@@ -28,6 +28,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
type: BooleanConstructor;
|
|
29
29
|
default: boolean;
|
|
30
30
|
};
|
|
31
|
+
showLegend: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
showTooltip: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
isEJPRD: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
31
43
|
}, {
|
|
32
44
|
getMapsName: () => any;
|
|
33
45
|
getLocationName: (node: any) => any;
|
|
@@ -84,9 +96,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
96
|
type: BooleanConstructor;
|
|
85
97
|
default: boolean;
|
|
86
98
|
};
|
|
99
|
+
showLegend: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
showTooltip: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
isEJPRD: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
default: boolean;
|
|
110
|
+
};
|
|
87
111
|
}>>, {
|
|
88
112
|
width: string;
|
|
89
113
|
country: string;
|
|
90
114
|
pourcentage: boolean;
|
|
115
|
+
showLegend: boolean;
|
|
116
|
+
showTooltip: boolean;
|
|
117
|
+
isEJPRD: boolean;
|
|
91
118
|
}, {}>;
|
|
92
119
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekkare/auriga",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.80",
|
|
4
4
|
"description": "Aurgia is a UI kit developped by Tekkare",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -34,9 +34,11 @@
|
|
|
34
34
|
"@svg-maps/france.regions": "^1.1.1",
|
|
35
35
|
"@svg-maps/usa": "^1.1.1",
|
|
36
36
|
"@svg-maps/usa.counties": "^1.1.2",
|
|
37
|
+
"@svg-maps/world": "^1.0.1",
|
|
37
38
|
"apexcharts": "^3.43.0",
|
|
38
|
-
"
|
|
39
|
+
"save": "^2.9.0",
|
|
39
40
|
"vue-apexcharts": "^1.6.2",
|
|
41
|
+
"vue-svg-map": "^1.2.0",
|
|
40
42
|
"vue3-apexcharts": "^1.4.4"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
@@ -45,7 +47,6 @@
|
|
|
45
47
|
"@nuxt/module-builder": "^0.5.1",
|
|
46
48
|
"@nuxt/schema": "^3.7.3",
|
|
47
49
|
"@nuxt/test-utils": "^3.7.3",
|
|
48
|
-
"@types/lodash": "^4.14.202",
|
|
49
50
|
"@types/node": "^18.17.17",
|
|
50
51
|
"changelogen": "^0.5.5",
|
|
51
52
|
"eslint": "^8.49.0",
|