@rypen-dev/shared-components 8.0.11 → 8.0.12
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/index.js +482 -471
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FileUpload.vue +6 -3
- package/src/components/Pagination.vue +0 -1
- package/src/components/SearchableDropdownInput.vue +4 -1
- package/src/components/SwitchInput.vue +5 -3
- package/src/components/TimespanInput.vue +5 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rypen-dev/shared-components",
|
|
3
3
|
"description": "Shared styles and Vuejs ui components for Rypen projects. Starting with version 8, this package is built with Vite 7 and Vue 3.",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.12",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
},
|
|
19
19
|
|
|
20
20
|
file: [Object, File],
|
|
21
|
-
id:
|
|
21
|
+
id: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
22
25
|
updating: {
|
|
23
26
|
type: Boolean,
|
|
24
27
|
default: false,
|
|
@@ -44,11 +47,12 @@
|
|
|
44
47
|
const emit = defineEmits(['change']);
|
|
45
48
|
|
|
46
49
|
const reader = ref(null);
|
|
50
|
+
const internalFile = ref('');
|
|
47
51
|
const fileupload = ref(null);
|
|
48
52
|
|
|
49
53
|
onMounted(() => {
|
|
50
54
|
if (props.file) {
|
|
51
|
-
internalFile.value = props.assetBasePath + props.file;
|
|
55
|
+
internalFile.value = props.assetBasePath + props.file;
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
reader.value = new FileReader();
|
|
@@ -60,7 +64,6 @@
|
|
|
60
64
|
if (files[0]) {
|
|
61
65
|
readFile(files[0]);
|
|
62
66
|
|
|
63
|
-
// emit the file change
|
|
64
67
|
emit('change', files[0]);
|
|
65
68
|
}
|
|
66
69
|
}
|
|
@@ -24,14 +24,16 @@
|
|
|
24
24
|
type: String,
|
|
25
25
|
default: 'No',
|
|
26
26
|
},
|
|
27
|
-
id:
|
|
27
|
+
id: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
28
31
|
cssClass: String,
|
|
29
32
|
});
|
|
33
|
+
const emit = defineEmits(['change']);
|
|
30
34
|
|
|
31
35
|
const internalValue = ref(props.value);
|
|
32
36
|
|
|
33
|
-
const emit = defineEmits(['change']);
|
|
34
|
-
|
|
35
37
|
function change() {
|
|
36
38
|
internalValue.value = !internalValue.value;
|
|
37
39
|
emit('change', internalValue.value);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="timespan">
|
|
3
3
|
<div class="input-container">
|
|
4
|
-
<input type="number" :min="0" :max="9999" @change="updateValue" :value="
|
|
4
|
+
<input type="number" :min="0" :max="9999" @change="updateValue" :value="daysValue" />
|
|
5
5
|
</div>
|
|
6
6
|
<div class="input-container select">
|
|
7
7
|
<select :value="selectedInterval" @change="updateTimeInterval">
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
daysValue.value = newValue;
|
|
57
57
|
selectedInterval.value = newInterval;
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
newInterval = TIMESPAN_INTERVALS.DAYS;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
daysValue.value = newValue;
|
|
85
85
|
selectedInterval.value = newInterval;
|
|
86
86
|
|
|
87
87
|
if (callback !== undefined) {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
const { value } = e.target;
|
|
94
94
|
selectedInterval.value = value;
|
|
95
95
|
|
|
96
|
-
syncValueAndInterval(value, sendUpdate);
|
|
96
|
+
syncValueAndInterval(daysValue.value, sendUpdate);
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
function updateValue(e) {
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
const realValue = computed(() => {
|
|
109
|
-
let finalValue =
|
|
109
|
+
let finalValue = daysValue.value;
|
|
110
110
|
|
|
111
111
|
if (selectedInterval.value === TIMESPAN_INTERVALS.WEEKS) {
|
|
112
112
|
finalValue = finalValue * 7;
|