@paris-ias/list 1.0.18 → 1.0.19
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/fellowships/Badges.vue +2 -1
- package/dist/runtime/components/list/atoms/SearchInput.vue +1 -0
- package/dist/runtime/components/list/atoms/SortMenu.vue +1 -1
- package/dist/runtime/components/list/molecules/Filters.vue +1 -0
- package/dist/runtime/components/list/molecules/Pagination.vue +2 -3
- package/dist/runtime/components/list/organisms/List.vue +1 -0
- package/dist/runtime/components/misc/atoms/DateStamp.vue +2 -0
- package/dist/runtime/components/misc/atoms/ImageContainer.vue +5 -4
- package/dist/runtime/components/misc/molecules/Related.vue +1 -0
- package/dist/runtime/components/people/RowsItem.vue +1 -0
- package/package.json +1 -1
- package/dist/runtime/components/misc/atoms/CountUp.vue +0 -143
package/dist/module.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
/>
|
|
14
14
|
|
|
15
15
|
<div v-else-if="registrationStatus === 2" class="my-2 text-overline">
|
|
16
|
-
<v-icon class="text-grey" size="x-large"> mdi-circle-medium</v-icon>
|
|
16
|
+
<v-icon class="text-grey" size="x-large"> mdi-circle-medium </v-icon>
|
|
17
17
|
{{
|
|
18
18
|
$t("applications-closed-since-0", [
|
|
19
19
|
getLocalizedDate(item.applicationStop),
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
</template>
|
|
24
24
|
|
|
25
25
|
<script setup>
|
|
26
|
+
import { computed } from "vue";
|
|
26
27
|
const props = defineProps({
|
|
27
28
|
item: { type: Object, required: true },
|
|
28
29
|
view: { type: Boolean, required: false, default: false }
|
|
@@ -78,10 +78,9 @@
|
|
|
78
78
|
|
|
79
79
|
<script setup>
|
|
80
80
|
import { computed } from "vue";
|
|
81
|
-
import { useRoute
|
|
81
|
+
import { useRoute } from "vue-router";
|
|
82
82
|
import { useRootStore } from "../../../stores/root";
|
|
83
83
|
const route = useRoute();
|
|
84
|
-
const router = useRouter();
|
|
85
84
|
const rootStore = useRootStore();
|
|
86
85
|
const props = defineProps({
|
|
87
86
|
totalPages: {
|
|
@@ -189,7 +188,7 @@ watch(
|
|
|
189
188
|
() => route.query.page,
|
|
190
189
|
(newPage) => {
|
|
191
190
|
if (newPage) {
|
|
192
|
-
props.currentPage = parseInt(newPage, 10);
|
|
191
|
+
props.currentPage = Number.parseInt(newPage, 10);
|
|
193
192
|
}
|
|
194
193
|
},
|
|
195
194
|
{ immediate: true }
|
|
@@ -41,10 +41,12 @@
|
|
|
41
41
|
|
|
42
42
|
<script setup>
|
|
43
43
|
import { useDisplay } from "vuetify";
|
|
44
|
+
import { computed } from "vue";
|
|
44
45
|
import {
|
|
45
46
|
getDetailedFormatedDate,
|
|
46
47
|
formatDateValue
|
|
47
48
|
} from "../../../composables/useUtils";
|
|
49
|
+
import { useI18n } from "#imports";
|
|
48
50
|
const { smAndDown, mdAndUp, name } = useDisplay();
|
|
49
51
|
const { locale } = useI18n();
|
|
50
52
|
const props = defineProps({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<!-- TODO
|
|
4
|
-
- add skeleton UI
|
|
3
|
+
<!-- TODO
|
|
4
|
+
- add skeleton UI
|
|
5
5
|
- test lazy-src
|
|
6
|
-
- validate requested quality
|
|
7
|
-
- Add conditional overlays slots (top left/right, bottom left/right/center for date, caption, copyright)-->
|
|
6
|
+
- validate requested quality
|
|
7
|
+
- Add conditional overlays slots (top left/right, bottom left/right/center for date, caption, copyright) -->
|
|
8
8
|
|
|
9
9
|
<v-skeleton-loader v-if="loading" height="100%" type="image" />
|
|
10
10
|
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
</template>
|
|
51
51
|
|
|
52
52
|
<script setup>
|
|
53
|
+
import { computed } from "vue";
|
|
53
54
|
const localePath = useLocalePath();
|
|
54
55
|
const img = useImage();
|
|
55
56
|
const computedSrc = computed(() => {
|
package/package.json
CHANGED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span> {{ displayedAmount }}</span>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script setup>
|
|
6
|
-
const props = defineProps({
|
|
7
|
-
startAmount: {
|
|
8
|
-
type: Number,
|
|
9
|
-
default: 0
|
|
10
|
-
},
|
|
11
|
-
endAmount: {
|
|
12
|
-
type: Number,
|
|
13
|
-
default: 0,
|
|
14
|
-
required: true
|
|
15
|
-
},
|
|
16
|
-
duration: {
|
|
17
|
-
type: Number,
|
|
18
|
-
default: 3,
|
|
19
|
-
validator(duration) {
|
|
20
|
-
return duration > 0;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
autoinit: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: true
|
|
26
|
-
},
|
|
27
|
-
prefix: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: ""
|
|
30
|
-
},
|
|
31
|
-
suffix: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: ""
|
|
34
|
-
},
|
|
35
|
-
separator: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: ","
|
|
38
|
-
},
|
|
39
|
-
decimalSeparator: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: "."
|
|
42
|
-
},
|
|
43
|
-
decimals: {
|
|
44
|
-
type: Number,
|
|
45
|
-
default: 0,
|
|
46
|
-
validator(decimals) {
|
|
47
|
-
return decimals >= 0;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
const state = reactive({
|
|
52
|
-
timestamp: 0,
|
|
53
|
-
startTimestamp: null,
|
|
54
|
-
currentAmount: props.startAmount,
|
|
55
|
-
currentStartAmount: props.startAmount,
|
|
56
|
-
currentDuration: props.duration * 1e3,
|
|
57
|
-
paused: false,
|
|
58
|
-
remaining: props.duration * 1e3,
|
|
59
|
-
animationFrame: 0
|
|
60
|
-
});
|
|
61
|
-
const isCountingUp = computed(() => props.endAmount > props.startAmount);
|
|
62
|
-
const formatedAmount = computed(() => {
|
|
63
|
-
const regex = /(\d+)(\d{3})/;
|
|
64
|
-
const numberString = state.currentAmount.toFixed(props.decimals);
|
|
65
|
-
const numberArray = numberString.split(".");
|
|
66
|
-
let numbers = numberArray[0];
|
|
67
|
-
const decimals = numberArray.length > 1 ? props.decimalSeparator + numberArray[1] : "";
|
|
68
|
-
const isNumber = !isNaN(parseFloat(props.separator));
|
|
69
|
-
if (props.separator && !isNumber) {
|
|
70
|
-
while (regex.test(numbers)) {
|
|
71
|
-
numbers = numbers.replace(regex, "$1" + props.separator + "$2");
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return numbers + decimals;
|
|
75
|
-
});
|
|
76
|
-
const displayedAmount = computed(
|
|
77
|
-
() => `${props.prefix}${formatedAmount.value}${props.suffix}`
|
|
78
|
-
);
|
|
79
|
-
const start = () => {
|
|
80
|
-
cancelAnimation();
|
|
81
|
-
state.currentStartAmount = props.startAmount;
|
|
82
|
-
state.startTimestamp = null;
|
|
83
|
-
state.currentDuration = props.duration * 1e3;
|
|
84
|
-
state.paused = false;
|
|
85
|
-
state.animationFrame = window.requestAnimationFrame(counting);
|
|
86
|
-
};
|
|
87
|
-
const pause = () => {
|
|
88
|
-
if (state.paused) return;
|
|
89
|
-
cancelAnimation();
|
|
90
|
-
state.paused = true;
|
|
91
|
-
};
|
|
92
|
-
const resume = () => {
|
|
93
|
-
if (!state.paused) return;
|
|
94
|
-
state.startTimestamp = null;
|
|
95
|
-
state.currentDuration = +state.remaining;
|
|
96
|
-
state.currentStartAmount = +state.currentAmount;
|
|
97
|
-
state.animationFrame = window.requestAnimationFrame(counting);
|
|
98
|
-
state.paused = false;
|
|
99
|
-
};
|
|
100
|
-
const reset = () => {
|
|
101
|
-
state.paused = false;
|
|
102
|
-
state.startTimestamp = null;
|
|
103
|
-
cancelAnimation();
|
|
104
|
-
state.currentAmount = props.startAmount;
|
|
105
|
-
if (props.autoinit) start();
|
|
106
|
-
else state.paused = true;
|
|
107
|
-
};
|
|
108
|
-
const counting = (timestamp) => {
|
|
109
|
-
state.timestamp = timestamp;
|
|
110
|
-
if (!state.startTimestamp) state.startTimestamp = timestamp;
|
|
111
|
-
const progress = timestamp - state.startTimestamp;
|
|
112
|
-
state.remaining = state.currentDuration - progress;
|
|
113
|
-
if (!isCountingUp.value) {
|
|
114
|
-
state.currentAmount = state.currentStartAmount - (state.currentStartAmount - props.endAmount) * (progress / state.currentDuration);
|
|
115
|
-
state.currentAmount = state.currentAmount < props.endAmount ? props.endAmount : state.currentAmount;
|
|
116
|
-
} else {
|
|
117
|
-
state.currentAmount = state.currentStartAmount + (props.endAmount - state.currentStartAmount) * (progress / state.currentDuration);
|
|
118
|
-
state.currentAmount = state.currentAmount > props.endAmount ? props.endAmount : state.currentAmount;
|
|
119
|
-
}
|
|
120
|
-
if (progress < state.currentDuration) {
|
|
121
|
-
state.animationFrame = window.requestAnimationFrame(counting);
|
|
122
|
-
} else {
|
|
123
|
-
console.log("finished");
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
const cancelAnimation = () => {
|
|
127
|
-
if (state.animationFrame) window.cancelAnimationFrame(state.animationFrame);
|
|
128
|
-
};
|
|
129
|
-
watch(() => props.startAmount, reset);
|
|
130
|
-
watch(() => props.endAmount, reset);
|
|
131
|
-
watch(() => props.duration, reset);
|
|
132
|
-
onMounted(() => {
|
|
133
|
-
state.currentAmount = props.startAmount;
|
|
134
|
-
state.currentStartAmount = props.startAmount;
|
|
135
|
-
state.currentDuration = props.duration * 1e3;
|
|
136
|
-
state.remaining = props.duration * 1e3;
|
|
137
|
-
if (props.autoinit) start();
|
|
138
|
-
else state.paused = true;
|
|
139
|
-
});
|
|
140
|
-
onUnmounted(() => {
|
|
141
|
-
cancelAnimation();
|
|
142
|
-
});
|
|
143
|
-
</script>
|