@tekkare/auriga 0.1.86 → 0.1.87
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 +1 -1
- package/dist/runtime/components/argMainLayout.vue +9 -0
- package/dist/runtime/components/argSourceCollapse.vue +20 -38
- package/dist/runtime/components/argSourceCollapse.vue.d.ts +3 -54
- package/dist/runtime/components/argToolbarSources.vue +57 -0
- package/dist/runtime/components/argToolbarSources.vue.d.ts +20 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
</template>
|
|
21
21
|
<script>
|
|
22
|
+
import { useRoute } from "#app";
|
|
22
23
|
import {
|
|
23
24
|
onMounted,
|
|
25
|
+
watch,
|
|
24
26
|
defineComponent,
|
|
25
27
|
onUpdated
|
|
26
28
|
} from "vue";
|
|
@@ -49,6 +51,13 @@ export default defineComponent({
|
|
|
49
51
|
onUpdated(() => {
|
|
50
52
|
adjustMarginForBody();
|
|
51
53
|
});
|
|
54
|
+
const route = useRoute();
|
|
55
|
+
watch(
|
|
56
|
+
() => route.fullPath,
|
|
57
|
+
() => {
|
|
58
|
+
adjustMarginForBody();
|
|
59
|
+
}
|
|
60
|
+
);
|
|
52
61
|
function listenToHeaderChange() {
|
|
53
62
|
const fixedHeader = document.getElementById("arg_header");
|
|
54
63
|
const config = { attributes: true, childList: true };
|
|
@@ -13,12 +13,10 @@
|
|
|
13
13
|
/>
|
|
14
14
|
<p class="source_title">{{ sourceTitle.toUpperCase() }}</p>
|
|
15
15
|
</div>
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</div>
|
|
21
|
-
</arg-tags>
|
|
16
|
+
<div class="copy_action" @click.stop="copy()">
|
|
17
|
+
<arg-icon name="Copy" color="var(--cool-grey)" size="16" />
|
|
18
|
+
<p>Copy</p>
|
|
19
|
+
</div>
|
|
22
20
|
</div>
|
|
23
21
|
<div
|
|
24
22
|
:class="['source_content', sourceOpen ? 'show_content' : 'hide_content']"
|
|
@@ -27,27 +25,19 @@
|
|
|
27
25
|
Source update in OIP: {{ sourceUpdate }}
|
|
28
26
|
</p> -->
|
|
29
27
|
<div class="oip_row v-start gap-16">
|
|
28
|
+
<div class="tag_display">
|
|
29
|
+
<p class="toolbar_tag_title">Country</p>
|
|
30
|
+
<arg-tags class="source_tag">
|
|
31
|
+
<div class="oip_row v-center gap-4">
|
|
32
|
+
<arg-flag :slug="sourceCountry.toLowerCase()" emoji height="10" />
|
|
33
|
+
<p>{{ sourceCountry }}</p>
|
|
34
|
+
</div>
|
|
35
|
+
</arg-tags>
|
|
36
|
+
</div>
|
|
30
37
|
<div class="tag_display">
|
|
31
38
|
<p class="toolbar_tag_title">Sector</p>
|
|
32
39
|
<arg-tags>{{ sourceSector }}</arg-tags>
|
|
33
40
|
</div>
|
|
34
|
-
<div v-if="!isProvider && sourceProvider !== null" class="tag_display">
|
|
35
|
-
<p class="toolbar_tag_title">Provider</p>
|
|
36
|
-
<arg-tags>{{ sourceProvider }}</arg-tags>
|
|
37
|
-
</div>
|
|
38
|
-
<div
|
|
39
|
-
v-else-if="isProvider && relatedSources !== null"
|
|
40
|
-
class="tag_display"
|
|
41
|
-
>
|
|
42
|
-
<p class="toolbar_tag_title">
|
|
43
|
-
{{ isProvider ? "Related Sources" : "Provider" }}
|
|
44
|
-
</p>
|
|
45
|
-
<div class="oip_row v-center gap-8 wrap">
|
|
46
|
-
<arg-tags v-for="(source, index) in relatedSources" :key="index">{{
|
|
47
|
-
source
|
|
48
|
-
}}</arg-tags>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
41
|
</div>
|
|
52
42
|
<span class="oip_body">
|
|
53
43
|
<slot />
|
|
@@ -85,21 +75,9 @@ export default defineComponent({
|
|
|
85
75
|
defaultOpen: {
|
|
86
76
|
type: Boolean,
|
|
87
77
|
default: false
|
|
88
|
-
},
|
|
89
|
-
isProvider: {
|
|
90
|
-
type: Boolean,
|
|
91
|
-
default: false
|
|
92
|
-
},
|
|
93
|
-
sourceProvider: {
|
|
94
|
-
type: String,
|
|
95
|
-
default: null
|
|
96
|
-
},
|
|
97
|
-
relatedSources: {
|
|
98
|
-
type: Array,
|
|
99
|
-
default: () => null
|
|
100
78
|
}
|
|
101
79
|
},
|
|
102
|
-
emits: ["onClick"],
|
|
80
|
+
emits: ["onClick", "copyTitle"],
|
|
103
81
|
setup(props, { emit }) {
|
|
104
82
|
const sourceOpen = ref(false);
|
|
105
83
|
function closeSource() {
|
|
@@ -125,11 +103,15 @@ export default defineComponent({
|
|
|
125
103
|
document.removeEventListener("click", closeSource);
|
|
126
104
|
}
|
|
127
105
|
);
|
|
128
|
-
|
|
106
|
+
function copy() {
|
|
107
|
+
navigator.clipboard.writeText(props.sourceTitle);
|
|
108
|
+
emit("copyTitle");
|
|
109
|
+
}
|
|
110
|
+
return { closeSource, sourceOpen, copy };
|
|
129
111
|
}
|
|
130
112
|
});
|
|
131
113
|
</script>
|
|
132
114
|
|
|
133
115
|
<style scoped>
|
|
134
|
-
.oip_source_card_collapse{align-self:stretch;border:1px solid var(--light,#dbdef0);border-radius:8px;cursor:pointer;display:flex;flex-direction:column;overflow:hidden;padding:8px 8px 8px 16px;transition:gap .3s linear,max-height .3s linear,background-color .3s linear,padding .3s linear}.oip_source_card_collapse:hover svg{color:var(--primary)!important}.oip_source_card_collapse.close{background-color:var(--white,#fff);gap:0;max-height:40px}.oip_source_card_collapse.open{background-color:var(--demi-fond);gap:16px;max-height:500px;padding:8px 8px 16px 16px}.icon_open{transition:transform .3s}.icon_rotate{transform:rotateX(180deg)}.source_card_header{align-items:center;align-self:stretch;display:flex;flex-direction:row;justify-content:space-between}.source_title{font-family:Figtree;font-size:14px;font-style:normal;font-weight:700;line-height:160%}.source_content{display:flex;flex-direction:column;gap:16px;margin-right:-6px;padding-right:4px;transition:max-height .3s linear,opacity .3s linear}.hide_content{max-height:0;opacity:0}.show_content{max-height:100%;opacity:1;overflow-y:scroll}.show_content::-webkit-scrollbar{height:5px;width:5px}.show_content::-webkit-scrollbar-thumb{background:var(--medium);border-radius:12px!important}.show_content::-webkit-scrollbar-thumb:hover{background:var(--medium)!important}.source_tag{align-self:stretch;display:flex}.toolbar_source_update,.toolbar_tag_title{color:var(--dark);font-size:12px;font-style:normal;font-weight:400;line-height:normal}.tag_display{align-items:flex-start;display:flex;flex-direction:column;gap:var(--s,8px);justify-content:center}
|
|
116
|
+
.oip_source_card_collapse{align-self:stretch;border:1px solid var(--light,#dbdef0);border-radius:8px;cursor:pointer;display:flex;flex-direction:column;overflow:hidden;padding:8px 8px 8px 16px;transition:gap .3s linear,max-height .3s linear,background-color .3s linear,padding .3s linear}.oip_source_card_collapse:hover svg{color:var(--primary)!important}.oip_source_card_collapse.close{background-color:var(--white,#fff);gap:0;max-height:40px}.oip_source_card_collapse.open{background-color:var(--demi-fond);gap:16px;max-height:500px;padding:8px 8px 16px 16px}.icon_open{transition:transform .3s}.icon_rotate{transform:rotateX(180deg)}.source_card_header{align-items:center;align-self:stretch;display:flex;flex-direction:row;justify-content:space-between}.source_title{font-family:Figtree;font-size:14px;font-style:normal;font-weight:700;line-height:160%}.source_content{display:flex;flex-direction:column;gap:16px;margin-right:-6px;padding-right:4px;transition:max-height .3s linear,opacity .3s linear}.hide_content{max-height:0;opacity:0}.show_content{max-height:100%;opacity:1;overflow-y:scroll}.show_content::-webkit-scrollbar{height:5px;width:5px}.show_content::-webkit-scrollbar-thumb{background:var(--medium);border-radius:12px!important}.show_content::-webkit-scrollbar-thumb:hover{background:var(--medium)!important}.source_tag{align-self:stretch;display:flex}.toolbar_source_update,.toolbar_tag_title{color:var(--dark);font-size:12px;font-style:normal;font-weight:400;line-height:normal}.tag_display{align-items:flex-start;display:flex;flex-direction:column;gap:var(--s,8px);justify-content:center}.copy_action{align-items:center;background:var(--white);border:1px solid var(--light);border-radius:6px;box-shadow:0 1px 2px 0 rgba(30,41,59,.1);color:var(--dark);cursor:pointer;display:flex;flex-direction:row;font-size:12px;font-style:normal;font-weight:500;gap:4px;line-height:normal;padding:4px 8px 4px 6px}.copy_action:hover,.copy_action:hover svg{color:var(--primary)!important}
|
|
135
117
|
</style>
|
|
@@ -15,35 +15,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
type: BooleanConstructor;
|
|
16
16
|
default: boolean;
|
|
17
17
|
};
|
|
18
|
-
isProvider: {
|
|
19
|
-
type: BooleanConstructor;
|
|
20
|
-
default: boolean;
|
|
21
|
-
};
|
|
22
|
-
sourceProvider: {
|
|
23
|
-
type: StringConstructor;
|
|
24
|
-
default: null;
|
|
25
|
-
};
|
|
26
|
-
relatedSources: {
|
|
27
|
-
type: {
|
|
28
|
-
(arrayLength: number): String[];
|
|
29
|
-
(...items: String[]): String[];
|
|
30
|
-
new (arrayLength: number): String[];
|
|
31
|
-
new (...items: String[]): String[];
|
|
32
|
-
isArray(arg: any): arg is any[];
|
|
33
|
-
readonly prototype: any[];
|
|
34
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
35
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
36
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
37
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
38
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
39
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
40
|
-
};
|
|
41
|
-
default: () => null;
|
|
42
|
-
};
|
|
43
18
|
}, {
|
|
44
19
|
closeSource: () => void;
|
|
45
20
|
sourceOpen: import("vue").Ref<boolean>;
|
|
46
|
-
|
|
21
|
+
copy: () => void;
|
|
22
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClick" | "copyTitle")[], "onClick" | "copyTitle", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
23
|
sourceTitle: {
|
|
48
24
|
type: StringConstructor;
|
|
49
25
|
required: true;
|
|
@@ -60,39 +36,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
36
|
type: BooleanConstructor;
|
|
61
37
|
default: boolean;
|
|
62
38
|
};
|
|
63
|
-
isProvider: {
|
|
64
|
-
type: BooleanConstructor;
|
|
65
|
-
default: boolean;
|
|
66
|
-
};
|
|
67
|
-
sourceProvider: {
|
|
68
|
-
type: StringConstructor;
|
|
69
|
-
default: null;
|
|
70
|
-
};
|
|
71
|
-
relatedSources: {
|
|
72
|
-
type: {
|
|
73
|
-
(arrayLength: number): String[];
|
|
74
|
-
(...items: String[]): String[];
|
|
75
|
-
new (arrayLength: number): String[];
|
|
76
|
-
new (...items: String[]): String[];
|
|
77
|
-
isArray(arg: any): arg is any[];
|
|
78
|
-
readonly prototype: any[];
|
|
79
|
-
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
80
|
-
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
81
|
-
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
82
|
-
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
83
|
-
of<T_4>(...items: T_4[]): T_4[];
|
|
84
|
-
readonly [Symbol.species]: ArrayConstructor;
|
|
85
|
-
};
|
|
86
|
-
default: () => null;
|
|
87
|
-
};
|
|
88
39
|
}>> & {
|
|
89
40
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
41
|
+
onCopyTitle?: ((...args: any[]) => any) | undefined;
|
|
90
42
|
}, {
|
|
91
43
|
sourceCountry: string;
|
|
92
44
|
sourceSector: string;
|
|
93
45
|
defaultOpen: boolean;
|
|
94
|
-
isProvider: boolean;
|
|
95
|
-
sourceProvider: string;
|
|
96
|
-
relatedSources: String[];
|
|
97
46
|
}, {}>;
|
|
98
47
|
export default _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="toolbar_tab_container">
|
|
3
|
+
<p class="oip_heading">Sources</p>
|
|
4
|
+
<div>
|
|
5
|
+
<p>
|
|
6
|
+
{{ lang === "fr" ? "Pour être conforme à l’" : "To comply with the" }}
|
|
7
|
+
<span class="open_data_link" @click="openPDF()"
|
|
8
|
+
>Open Data License 2.0</span
|
|
9
|
+
>,
|
|
10
|
+
{{
|
|
11
|
+
lang === "fr"
|
|
12
|
+
? "vous devez annotez vos documents avec les sources utilisées."
|
|
13
|
+
: "you must list in your reports the sources used."
|
|
14
|
+
}}
|
|
15
|
+
</p>
|
|
16
|
+
<p>
|
|
17
|
+
{{
|
|
18
|
+
lang === "fr"
|
|
19
|
+
? "Le bouton “Copier” est prévu pour faciliter cette démarche."
|
|
20
|
+
: "The ”Copy” button is provided to ease this process."
|
|
21
|
+
}}
|
|
22
|
+
</p>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="toolbar_sources_display">
|
|
25
|
+
<slot name="Sources" />
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
import {
|
|
32
|
+
defineComponent
|
|
33
|
+
} from "vue";
|
|
34
|
+
export default defineComponent({
|
|
35
|
+
name: "argToolbarSources",
|
|
36
|
+
props: {
|
|
37
|
+
lang: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "en",
|
|
40
|
+
validator: (value) => {
|
|
41
|
+
return ["en", "fr"].includes(value);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
emits: ["openPDF"],
|
|
46
|
+
setup(props, { emit }) {
|
|
47
|
+
function openPDF() {
|
|
48
|
+
emit("openPDF");
|
|
49
|
+
}
|
|
50
|
+
return { openPDF };
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style scoped>
|
|
56
|
+
.open_data_link{color:var(--primary)!important;cursor:pointer;text-decoration:underline}.open_data_link:hover{color:var(--primary-hover)!important}
|
|
57
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
lang: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
validator: (value: string) => boolean;
|
|
6
|
+
};
|
|
7
|
+
}, {
|
|
8
|
+
openPDF: () => void;
|
|
9
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "openPDF"[], "openPDF", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
lang: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
validator: (value: string) => boolean;
|
|
14
|
+
};
|
|
15
|
+
}>> & {
|
|
16
|
+
onOpenPDF?: ((...args: any[]) => any) | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
lang: string;
|
|
19
|
+
}, {}>;
|
|
20
|
+
export default _default;
|