@dative-gpi/foundation-shared-components 0.0.110 → 0.0.111
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.
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
:wrap="false"
|
|
44
44
|
>
|
|
45
45
|
<FSImage
|
|
46
|
-
v-if="$props.imageId ||
|
|
46
|
+
v-if="$props.imageId || $props.modelValue"
|
|
47
47
|
:aspectRatio="$props.aspectRatio"
|
|
48
48
|
:height="$props.height"
|
|
49
49
|
:width="$props.width"
|
|
50
50
|
:imageId="$props.imageId"
|
|
51
|
-
:imageB64="
|
|
51
|
+
:imageB64="$props.modelValue"
|
|
52
52
|
/>
|
|
53
53
|
<FSCard
|
|
54
54
|
v-else
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
</FSRow>
|
|
107
107
|
</FSCard>
|
|
108
108
|
<FSRow
|
|
109
|
-
v-else-if="$props.imageId ||
|
|
109
|
+
v-else-if="$props.imageId || $props.modelValue"
|
|
110
110
|
:width="$props.width"
|
|
111
111
|
class="fs-edit-image-full"
|
|
112
112
|
>
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
:height="$props.height"
|
|
116
116
|
:width="$props.width"
|
|
117
117
|
:imageId="$props.imageId"
|
|
118
|
-
:imageB64="
|
|
118
|
+
:imageB64="$props.modelValue"
|
|
119
119
|
/>
|
|
120
120
|
<FSRow
|
|
121
121
|
class="fs-edit-image-full-toolbar"
|
|
@@ -203,6 +203,11 @@ export default defineComponent({
|
|
|
203
203
|
required: false,
|
|
204
204
|
default: null
|
|
205
205
|
},
|
|
206
|
+
label: {
|
|
207
|
+
type: String as PropType<string | null>,
|
|
208
|
+
required: false,
|
|
209
|
+
default: null
|
|
210
|
+
},
|
|
206
211
|
imageId: {
|
|
207
212
|
type: String as PropType<string | null>,
|
|
208
213
|
required: false,
|
|
@@ -232,11 +237,6 @@ export default defineComponent({
|
|
|
232
237
|
type: Boolean,
|
|
233
238
|
required: false,
|
|
234
239
|
default: false
|
|
235
|
-
},
|
|
236
|
-
label: {
|
|
237
|
-
type: String as PropType<string | null>,
|
|
238
|
-
required: false,
|
|
239
|
-
default: null
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
emits: ["update:modelValue", "update:imageId"],
|
|
@@ -260,13 +260,6 @@ export default defineComponent({
|
|
|
260
260
|
};
|
|
261
261
|
});
|
|
262
262
|
|
|
263
|
-
const realSource = computed(() => {
|
|
264
|
-
if (fileSelected.value && fileSelected.value.fileName) {
|
|
265
|
-
return fileSelected.value.fileContent as string;
|
|
266
|
-
}
|
|
267
|
-
return props.modelValue;
|
|
268
|
-
});
|
|
269
|
-
|
|
270
263
|
const onUpload = async (payload: File) => {
|
|
271
264
|
const content = (await readFile(payload)) as string;
|
|
272
265
|
fileSelected.value.fileName = payload.name;
|
|
@@ -292,7 +285,6 @@ export default defineComponent({
|
|
|
292
285
|
invisibleButtonRef,
|
|
293
286
|
fileSelected,
|
|
294
287
|
isExtraSmall,
|
|
295
|
-
realSource,
|
|
296
288
|
style,
|
|
297
289
|
onUpload,
|
|
298
290
|
onRemove
|
package/components/FSForm.vue
CHANGED
|
@@ -47,9 +47,14 @@ export default defineComponent({
|
|
|
47
47
|
await (formRef.value as any).validate();
|
|
48
48
|
emit("update:modelValue", !!((formRef.value as any).isValid ?? true));
|
|
49
49
|
emit("submit", !!((formRef.value as any).isValid ?? true));
|
|
50
|
-
|
|
51
50
|
};
|
|
52
51
|
|
|
52
|
+
const validate = async () => {
|
|
53
|
+
submitted.value = true;
|
|
54
|
+
await (formRef.value as any).validate();
|
|
55
|
+
emit("update:modelValue", !!((formRef.value as any).isValid ?? true));
|
|
56
|
+
};
|
|
57
|
+
|
|
53
58
|
provide("validateOn", validateOn);
|
|
54
59
|
provide("submitted", submitted);
|
|
55
60
|
|
|
@@ -57,7 +62,8 @@ export default defineComponent({
|
|
|
57
62
|
validateOn,
|
|
58
63
|
submitted,
|
|
59
64
|
formRef,
|
|
60
|
-
onSubmit
|
|
65
|
+
onSubmit,
|
|
66
|
+
validate
|
|
61
67
|
};
|
|
62
68
|
}
|
|
63
69
|
});
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
</FSCol>
|
|
80
80
|
<FSDivider
|
|
81
81
|
v-if="showFiltersDivider"
|
|
82
|
+
:size="['30px', '24px']"
|
|
82
83
|
:vertical="true"
|
|
83
84
|
/>
|
|
84
85
|
<FSCol>
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
v-if="showFilters && resetable"
|
|
90
91
|
variant="standard"
|
|
91
92
|
:label="$tr('ui.data-table.reset-filters', 'Reset')"
|
|
92
|
-
:height="[
|
|
93
|
+
:height="['30px', '24px']"
|
|
93
94
|
:color="ColorEnum.Error"
|
|
94
95
|
:editable="true"
|
|
95
96
|
@click="resetFilter"
|
|
@@ -944,8 +945,19 @@ export default defineComponent({
|
|
|
944
945
|
}
|
|
945
946
|
return {
|
|
946
947
|
...c,
|
|
947
|
-
sort: (a: any, b: any): number =>
|
|
948
|
-
|
|
948
|
+
sort: (a: any, b: any): number =>{
|
|
949
|
+
if (a === undefined && b === undefined) {
|
|
950
|
+
return 0;
|
|
951
|
+
}
|
|
952
|
+
if (a === undefined) {
|
|
953
|
+
return -1;
|
|
954
|
+
}
|
|
955
|
+
if (b === undefined) {
|
|
956
|
+
return 1;
|
|
957
|
+
}
|
|
958
|
+
return JSON.stringify(a)
|
|
959
|
+
.localeCompare(JSON.stringify(b), undefined, { numeric: true })
|
|
960
|
+
}
|
|
949
961
|
};
|
|
950
962
|
})
|
|
951
963
|
});
|
|
@@ -1420,7 +1432,7 @@ export default defineComponent({
|
|
|
1420
1432
|
emit("update:rowsPerPage", innerRowsPerPage.value);
|
|
1421
1433
|
});
|
|
1422
1434
|
|
|
1423
|
-
watch(() => props.headers, () => {
|
|
1435
|
+
watch([() => props.headers, () => props.items], () => {
|
|
1424
1436
|
computeFilters();
|
|
1425
1437
|
});
|
|
1426
1438
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.111",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "0.0.111",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.111",
|
|
15
15
|
"@fontsource/montserrat": "^5.0.16",
|
|
16
16
|
"@lexical/clipboard": "^0.12.5",
|
|
17
17
|
"@lexical/history": "^0.12.5",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"sass": "^1.69.5",
|
|
33
33
|
"sass-loader": "^13.3.2"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "6856c1334706daad1394d57eeb456f1f4497389e"
|
|
36
36
|
}
|