@dative-gpi/foundation-shared-components 0.0.51 → 0.0.53
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/components/FSAccordion.vue +7 -4
- package/components/FSEditImage.vue +7 -8
- package/components/FSLabel.vue +1 -1
- package/components/FSLink.vue +1 -1
- package/components/FSSlideGroup.vue +1 -2
- package/components/FSSpan.vue +1 -1
- package/components/FSTabs.vue +4 -3
- package/components/FSText.vue +1 -1
- package/components/FSWindow.vue +4 -3
- package/components/FSWrapGroup.vue +4 -3
- package/components/buttons/FSButtonFile.vue +7 -8
- package/components/buttons/FSButtonFileIcon.vue +7 -8
- package/components/buttons/FSButtonFileLabel.vue +7 -8
- package/components/buttons/FSButtonFileMini.vue +7 -8
- package/composables/index.ts +0 -1
- package/composables/useSlots.ts +2 -2
- package/models/rules.ts +31 -31
- package/package.json +4 -4
- package/composables/useFiles.ts +0 -13
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-expansion-panels
|
|
2
|
+
<v-expansion-panels
|
|
3
|
+
variant="accordion"
|
|
4
|
+
>
|
|
3
5
|
<template
|
|
4
|
-
v-for="
|
|
5
|
-
:key="index"
|
|
6
|
+
v-for="component in getChildren()"
|
|
6
7
|
>
|
|
7
|
-
<component
|
|
8
|
+
<component
|
|
9
|
+
:is="component"
|
|
10
|
+
/>
|
|
8
11
|
</template>
|
|
9
12
|
</v-expansion-panels>
|
|
10
13
|
</template>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<script lang="ts">
|
|
44
44
|
import { computed, defineComponent, PropType, ref } from "vue";
|
|
45
45
|
|
|
46
|
-
import { useFiles } from "@dative-gpi/foundation-shared-
|
|
46
|
+
import { useFiles } from "@dative-gpi/foundation-shared-services/composables";
|
|
47
47
|
import { FileImage } from "@dative-gpi/foundation-shared-components/models";
|
|
48
48
|
|
|
49
49
|
import FSButtonRemoveIcon from "./buttons/FSButtonRemoveIcon.vue";
|
|
@@ -95,7 +95,7 @@ export default defineComponent({
|
|
|
95
95
|
},
|
|
96
96
|
emits: ["update:modelValue"],
|
|
97
97
|
setup(props, { emit }) {
|
|
98
|
-
const {
|
|
98
|
+
const { readFile } = useFiles();
|
|
99
99
|
|
|
100
100
|
const fileSelected = ref<FileImage>({ fileName: "", fileContent: null });
|
|
101
101
|
|
|
@@ -106,12 +106,11 @@ export default defineComponent({
|
|
|
106
106
|
return props.modelValue;
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
const onUpload = (payload: File) => {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
});
|
|
109
|
+
const onUpload = async (payload: File) => {
|
|
110
|
+
const content = await readFile(payload);
|
|
111
|
+
fileSelected.value.fileName = payload.name;
|
|
112
|
+
fileSelected.value.fileContent = content;
|
|
113
|
+
emit("update:modelValue", content);
|
|
115
114
|
};
|
|
116
115
|
|
|
117
116
|
const onRemove = () => {
|
package/components/FSLabel.vue
CHANGED
package/components/FSLink.vue
CHANGED
package/components/FSSpan.vue
CHANGED
package/components/FSTabs.vue
CHANGED
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
v-bind="$attrs"
|
|
12
12
|
>
|
|
13
13
|
<template
|
|
14
|
-
v-for="
|
|
15
|
-
:key="index"
|
|
14
|
+
v-for="component in getChildren()"
|
|
16
15
|
>
|
|
17
|
-
<component
|
|
16
|
+
<component
|
|
17
|
+
:is="component"
|
|
18
|
+
/>
|
|
18
19
|
</template>
|
|
19
20
|
</v-tabs>
|
|
20
21
|
</template>
|
package/components/FSText.vue
CHANGED
package/components/FSWindow.vue
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
v-bind="$attrs"
|
|
5
5
|
>
|
|
6
6
|
<v-window-item
|
|
7
|
-
v-for="(component, index) in getChildren(
|
|
7
|
+
v-for="(component, index) in getChildren()"
|
|
8
8
|
:value="value(component, index)"
|
|
9
|
-
:key="index"
|
|
10
9
|
>
|
|
11
|
-
<component
|
|
10
|
+
<component
|
|
11
|
+
:is="component"
|
|
12
|
+
/>
|
|
12
13
|
</v-window-item>
|
|
13
14
|
</v-window>
|
|
14
15
|
</template>
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
v-bind="$attrs"
|
|
7
7
|
>
|
|
8
8
|
<v-slide-group-item
|
|
9
|
-
v-for="
|
|
10
|
-
:key="index"
|
|
9
|
+
v-for="component in getChildren()"
|
|
11
10
|
>
|
|
12
|
-
<component
|
|
11
|
+
<component
|
|
12
|
+
:is="component"
|
|
13
|
+
/>
|
|
13
14
|
</v-slide-group-item>
|
|
14
15
|
</v-slide-group>
|
|
15
16
|
</template>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<script lang="ts">
|
|
23
23
|
import { defineComponent, ref } from "vue";
|
|
24
24
|
|
|
25
|
-
import { useFiles } from "@dative-gpi/foundation-shared-
|
|
25
|
+
import { useFiles } from "@dative-gpi/foundation-shared-services/composables";
|
|
26
26
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
27
27
|
|
|
28
28
|
import FSButton from "../FSButton.vue";
|
|
@@ -46,23 +46,23 @@ export default defineComponent({
|
|
|
46
46
|
},
|
|
47
47
|
emits: ["update:modelValue"],
|
|
48
48
|
setup(props, { emit }) {
|
|
49
|
-
const {
|
|
49
|
+
const { readFile } = useFiles();
|
|
50
50
|
|
|
51
51
|
const input = ref<HTMLFormElement | null>(null);
|
|
52
52
|
|
|
53
|
-
const clear = () => {
|
|
53
|
+
const clear = (): void => {
|
|
54
54
|
if (input.value) {
|
|
55
55
|
input.value.form && input.value.form.reset();
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
const onClick = () => {
|
|
59
|
+
const onClick = (): void => {
|
|
60
60
|
if (input.value) {
|
|
61
61
|
input.value.click();
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
const onInput = () => {
|
|
65
|
+
const onInput = async (): Promise<void> => {
|
|
66
66
|
if (!input.value) {
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
@@ -75,9 +75,8 @@ export default defineComponent({
|
|
|
75
75
|
clear();
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});
|
|
78
|
+
const content = await readFile(file);
|
|
79
|
+
emit("update:modelValue", content);
|
|
81
80
|
}
|
|
82
81
|
};
|
|
83
82
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<script lang="ts">
|
|
23
23
|
import { defineComponent, ref } from "vue";
|
|
24
24
|
|
|
25
|
-
import { useFiles } from "@dative-gpi/foundation-shared-
|
|
25
|
+
import { useFiles } from "@dative-gpi/foundation-shared-services/composables";
|
|
26
26
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
27
27
|
|
|
28
28
|
import FSButton from "../FSButton.vue";
|
|
@@ -46,23 +46,23 @@ export default defineComponent({
|
|
|
46
46
|
},
|
|
47
47
|
emits: ["update:modelValue"],
|
|
48
48
|
setup(props, { emit }) {
|
|
49
|
-
const {
|
|
49
|
+
const { readFile } = useFiles();
|
|
50
50
|
|
|
51
51
|
const input = ref<HTMLFormElement | null>(null);
|
|
52
52
|
|
|
53
|
-
const clear = () => {
|
|
53
|
+
const clear = (): void => {
|
|
54
54
|
if (input.value) {
|
|
55
55
|
input.value.form && input.value.form.reset();
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
const onClick = () => {
|
|
59
|
+
const onClick = (): void => {
|
|
60
60
|
if (input.value) {
|
|
61
61
|
input.value.click();
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
const onInput = () => {
|
|
65
|
+
const onInput = async (): Promise<void> => {
|
|
66
66
|
if (!input.value) {
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
@@ -75,9 +75,8 @@ export default defineComponent({
|
|
|
75
75
|
clear();
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});
|
|
78
|
+
const content = await readFile(file);
|
|
79
|
+
emit("update:modelValue", content);
|
|
81
80
|
}
|
|
82
81
|
};
|
|
83
82
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<script lang="ts">
|
|
22
22
|
import { defineComponent, ref } from "vue";
|
|
23
23
|
|
|
24
|
-
import { useFiles } from "@dative-gpi/foundation-shared-
|
|
24
|
+
import { useFiles } from "@dative-gpi/foundation-shared-services/composables";
|
|
25
25
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
26
26
|
|
|
27
27
|
import FSButton from "../FSButton.vue";
|
|
@@ -45,23 +45,23 @@ export default defineComponent({
|
|
|
45
45
|
},
|
|
46
46
|
emits: ["update:modelValue"],
|
|
47
47
|
setup(props, { emit }) {
|
|
48
|
-
const {
|
|
48
|
+
const { readFile } = useFiles();
|
|
49
49
|
|
|
50
50
|
const input = ref<HTMLFormElement | null>(null);
|
|
51
51
|
|
|
52
|
-
const clear = () => {
|
|
52
|
+
const clear = (): void => {
|
|
53
53
|
if (input.value) {
|
|
54
54
|
input.value.form && input.value.form.reset();
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
const onClick = () => {
|
|
58
|
+
const onClick = (): void => {
|
|
59
59
|
if (input.value) {
|
|
60
60
|
input.value.click();
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
const onInput = () => {
|
|
64
|
+
const onInput = async (): Promise<void> => {
|
|
65
65
|
if (!input.value) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
@@ -74,9 +74,8 @@ export default defineComponent({
|
|
|
74
74
|
clear();
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
});
|
|
77
|
+
const content = await readFile(file);
|
|
78
|
+
emit("update:modelValue", content);
|
|
80
79
|
}
|
|
81
80
|
};
|
|
82
81
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<script lang="ts">
|
|
22
22
|
import { defineComponent, ref } from "vue";
|
|
23
23
|
|
|
24
|
-
import { useFiles } from "@dative-gpi/foundation-shared-
|
|
24
|
+
import { useFiles } from "@dative-gpi/foundation-shared-services/composables";
|
|
25
25
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
26
26
|
|
|
27
27
|
import FSButton from "../FSButton.vue";
|
|
@@ -45,23 +45,23 @@ export default defineComponent({
|
|
|
45
45
|
},
|
|
46
46
|
emits: ["update:modelValue"],
|
|
47
47
|
setup(props, { emit }) {
|
|
48
|
-
const {
|
|
48
|
+
const { readFile } = useFiles();
|
|
49
49
|
|
|
50
50
|
const input = ref<HTMLFormElement | null>(null);
|
|
51
51
|
|
|
52
|
-
const clear = () => {
|
|
52
|
+
const clear = (): void => {
|
|
53
53
|
if (input.value) {
|
|
54
54
|
input.value.form && input.value.form.reset();
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
const onClick = () => {
|
|
58
|
+
const onClick = (): void => {
|
|
59
59
|
if (input.value) {
|
|
60
60
|
input.value.click();
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
const onInput = () => {
|
|
64
|
+
const onInput = async (): Promise<void> => {
|
|
65
65
|
if (!input.value) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
@@ -74,9 +74,8 @@ export default defineComponent({
|
|
|
74
74
|
clear();
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
});
|
|
77
|
+
const content = await readFile(file);
|
|
78
|
+
emit("update:modelValue", content);
|
|
80
79
|
}
|
|
81
80
|
};
|
|
82
81
|
|
package/composables/index.ts
CHANGED
package/composables/useSlots.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSlots as useVueSlots } from "vue"
|
|
2
2
|
|
|
3
3
|
export const useSlots = () => {
|
|
4
|
-
const getChildren = (name: string | undefined): any => {
|
|
4
|
+
const getChildren = (name: string | undefined = undefined): any => {
|
|
5
5
|
const innerSlots = { ...useVueSlots() };
|
|
6
6
|
const innerName = name ?? "default";
|
|
7
7
|
if (innerSlots[innerName] != null) {
|
|
@@ -27,7 +27,7 @@ export const useSlots = () => {
|
|
|
27
27
|
return null;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
const getFirstChild = (name: string | undefined): any => {
|
|
30
|
+
const getFirstChild = (name: string | undefined = undefined): any => {
|
|
31
31
|
const children = getChildren(name);
|
|
32
32
|
if (children != null) {
|
|
33
33
|
return children[0];
|
package/models/rules.ts
CHANGED
|
@@ -7,59 +7,59 @@ const { epochToLongDateFormat } = useAppTimeZone()!;
|
|
|
7
7
|
const { $tr } = useTranslationsProvider();
|
|
8
8
|
|
|
9
9
|
export const TextRules = {
|
|
10
|
-
required: (message: string |
|
|
11
|
-
copy: (original: string, message: string |
|
|
12
|
-
min: (min: number, message: string |
|
|
13
|
-
max: (max: number, message: string |
|
|
14
|
-
email: (message: string |
|
|
15
|
-
phone: (message: string |
|
|
16
|
-
digit: (message: string |
|
|
17
|
-
uppercase: (message: string |
|
|
18
|
-
lowercase: (message: string |
|
|
19
|
-
special: (message: string |
|
|
10
|
+
required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
|
|
11
|
+
copy: (original: string, message: string | undefined = undefined) => (value: string) => value === original || (message ?? $tr("ui.rules.copy", "Different from original")),
|
|
12
|
+
min: (min: number, message: string | undefined = undefined) => (value: string) => value.length >= min || (message ?? $tr("ui.rules.text-min", "Must be at least {0} characters", min.toString())),
|
|
13
|
+
max: (max: number, message: string | undefined = undefined) => (value: string) => value.length <= max || (message ?? $tr("ui.rules.text-max", "Must be at most {0} characters", max.toString())),
|
|
14
|
+
email: (message: string | undefined = undefined) => (value: string) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value) || (message ?? $tr("ui.rules.text-email", "Must be a valid email")),
|
|
15
|
+
phone: (message: string | undefined = undefined) => (value: string) => /^[\+]?([0-9]+[ -]?)+$/.test(value) || (message ?? $tr("ui.rules.text-phone", "Must be a valid phone number")),
|
|
16
|
+
digit: (message: string | undefined = undefined) => (value: string) => /(?=.*\d)/.test(value) || (message ?? $tr("ui.rules.text-digit", "Must contain a digit")),
|
|
17
|
+
uppercase: (message: string | undefined = undefined) => (value: string) => /(?=.*[A-Z])/.test(value) || (message ?? $tr("ui.rules.text-uppercase", "Must contain an uppercase letter")),
|
|
18
|
+
lowercase: (message: string | undefined = undefined) => (value: string) => /(?=.*[a-z])/.test(value) || (message ?? $tr("ui.rules.text-lowercase", "Must contain a lowercase letter")),
|
|
19
|
+
special: (message: string | undefined = undefined) => (value: string) => /(?=.*[!@#$%^&*])/.test(value) || (message ?? $tr("ui.rules.text-special-character", "Must contain a special character"))
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const TagRules = {
|
|
23
|
-
required: (message: string |
|
|
24
|
-
min: (min: number, message: string |
|
|
25
|
-
max: (max: number, message: string |
|
|
23
|
+
required: (message: string | undefined = undefined) => (value: string[]) => value.length > 0 || (message ?? $tr("ui.rules.required", "Required")),
|
|
24
|
+
min: (min: number, message: string | undefined = undefined) => (value: string[]) => value.length >= min || (message ?? $tr("ui.rules.tag-min", "Must be at least {0} elements", min.toString())),
|
|
25
|
+
max: (max: number, message: string | undefined = undefined) => (value: string[]) => value.length <= max || (message ?? $tr("ui.rules.tag-max", "Must be at most {0} elements", max.toString()))
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export const NumberRules = {
|
|
29
|
-
required: (message: string |
|
|
30
|
-
min: (min: number, message: string |
|
|
31
|
-
max: (max: number, message: string |
|
|
32
|
-
integer: (message: string |
|
|
29
|
+
required: (message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value))) || (message ?? $tr("ui.rules.required", "Required")),
|
|
30
|
+
min: (min: number, message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value)) && parseFloat(value) >= min) || (message ?? $tr("ui.rules.number-min", "Must be at least {0}", min.toString())),
|
|
31
|
+
max: (max: number, message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value)) && parseFloat(value) <= max) || (message ?? $tr("ui.rules.number-max", "Must be at most {0}", max.toString())),
|
|
32
|
+
integer: (message: string | undefined = undefined) => (value: string) => (!!value && !isNaN(parseFloat(value)) && Number.isInteger(parseFloat(value))) || (message ?? $tr("ui.rules.number-integer", "Must be an integer"))
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export const IconRules = {
|
|
36
|
-
required: (message: string |
|
|
36
|
+
required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export const DateRules = {
|
|
40
|
-
required: (message: string |
|
|
41
|
-
min: (min: number, message: string |
|
|
42
|
-
max: (max: number, message: string |
|
|
40
|
+
required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
|
|
41
|
+
min: (min: number, message: string | undefined = undefined) => (value: number) => (!value || value >= min) || (message ?? $tr("ui.rules.date-min", "Must be after {0}", epochToLongDateFormat(min))),
|
|
42
|
+
max: (max: number, message: string | undefined = undefined) => (value: number) => (!value || value <= max) || (message ?? $tr("ui.rules.date-max", "Must be before {0}", epochToLongDateFormat(max)))
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
export const SelectRules = {
|
|
46
|
-
required: (message: string |
|
|
47
|
-
min: (min: number, message: string |
|
|
48
|
-
max: (max: number, message: string |
|
|
46
|
+
required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
|
|
47
|
+
min: (min: number, message: string | undefined = undefined) => (value: string[]) => (Array.isArray(value) && value.length >= min) || (message ?? $tr("ui.rules.select-min", "Must select at least {0} elements", min.toString())),
|
|
48
|
+
max: (max: number, message: string | undefined = undefined) => (value: string[]) => (Array.isArray(value) && value.length <= max) || (message ?? $tr("ui.rules.select-max", "Must select at most {0} elements", max.toString()))
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
export const AutocompleteRules = {
|
|
52
|
-
required: (message: string |
|
|
53
|
-
min: (min: number, message: string |
|
|
54
|
-
max: (max: number, message: string |
|
|
52
|
+
required: (message: string | undefined = undefined) => (value: string) => !!value || (message ?? $tr("ui.rules.required", "Required")),
|
|
53
|
+
min: (min: number, message: string | undefined = undefined) => (value: string[]) => (Array.isArray(value) && value.length >= min) || (message ?? $tr("ui.rules.autocomplete-min", "Must select at least {0} elements", min.toString())),
|
|
54
|
+
max: (max: number, message: string | undefined = undefined) => (value: string[]) => (Array.isArray(value) && value.length <= max) || (message ?? $tr("ui.rules.autocomplete-max", "Must select at most {0} elements", max.toString()))
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
export const TimeRules = {
|
|
58
|
-
required: (message: string |
|
|
59
|
-
min: (min: number, message: string |
|
|
60
|
-
max: (max: number, message: string |
|
|
58
|
+
required: (message: string | undefined = undefined) => (value: number) => !!value || (message ?? $tr("ui.rules.required", "Required")),
|
|
59
|
+
min: (min: number, message: string | undefined = undefined) => (value: number) => value >= min || (message ?? $tr("ui.rules.time-min", "Must be more than {0}", getTimeBestString(min))),
|
|
60
|
+
max: (max: number, message: string | undefined = undefined) => (value: number) => value <= max || (message ?? $tr("ui.rules.time-max", "Must be less than {0}", getTimeBestString(max)))
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
export const ToggleRules = {
|
|
64
|
-
required: (message: string |
|
|
64
|
+
required: (message: string | undefined = undefined) => (value: boolean) => value || (message ?? $tr("ui.rules.required", "Required"))
|
|
65
65
|
}
|
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.53",
|
|
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.53",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.53",
|
|
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": "4ecd4c47590cb49ab9f480e12202cde9af5396e1"
|
|
36
36
|
}
|
package/composables/useFiles.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const useFiles = () => {
|
|
2
|
-
const read = (file: File, callback: Function): void => {
|
|
3
|
-
const reader = new FileReader();
|
|
4
|
-
reader.addEventListener("load", (fileEv) => {
|
|
5
|
-
callback(fileEv.target && fileEv.target.result);
|
|
6
|
-
});
|
|
7
|
-
reader.readAsDataURL(file);
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
read
|
|
12
|
-
};
|
|
13
|
-
}
|