@dative-gpi/foundation-shared-components 0.0.65 → 0.0.67
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/FSGrid.vue
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
import { computed, defineComponent, PropType } from "vue";
|
|
60
60
|
|
|
61
61
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
62
|
-
import { ColorEnum,
|
|
62
|
+
import { ColorEnum, FSGridItem } from "@dative-gpi/foundation-shared-components/models";
|
|
63
63
|
|
|
64
64
|
import FSText from "./FSText.vue";
|
|
65
65
|
import FSCol from "./FSCol.vue";
|
|
@@ -74,7 +74,7 @@ export default defineComponent({
|
|
|
74
74
|
},
|
|
75
75
|
props: {
|
|
76
76
|
items: {
|
|
77
|
-
type: Array as PropType<
|
|
77
|
+
type: Array as PropType<FSGridItem[]>,
|
|
78
78
|
default: [],
|
|
79
79
|
required: false
|
|
80
80
|
}
|
|
@@ -17,7 +17,11 @@
|
|
|
17
17
|
</FSText>
|
|
18
18
|
<FSGrid
|
|
19
19
|
:items="item.items"
|
|
20
|
-
|
|
20
|
+
>
|
|
21
|
+
<template v-for="(_, name) in $slots" v-slot:[name]="slotData">
|
|
22
|
+
<slot :name="name" v-bind="slotData" />
|
|
23
|
+
</template>
|
|
24
|
+
</FSGrid>
|
|
21
25
|
</FSCol>
|
|
22
26
|
</FSRow>
|
|
23
27
|
</FSRow>
|
|
@@ -27,7 +31,7 @@
|
|
|
27
31
|
import { computed, defineComponent, PropType } from "vue";
|
|
28
32
|
|
|
29
33
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
30
|
-
import {
|
|
34
|
+
import { FSGridMosaic } from "@dative-gpi/foundation-shared-components/models";
|
|
31
35
|
|
|
32
36
|
import FSGrid from "./FSGrid.vue";
|
|
33
37
|
import FSCol from "./FSCol.vue";
|
|
@@ -42,7 +46,7 @@ export default defineComponent({
|
|
|
42
46
|
},
|
|
43
47
|
props: {
|
|
44
48
|
items: {
|
|
45
|
-
type: Array as PropType<
|
|
49
|
+
type: Array as PropType<FSGridMosaic[]>,
|
|
46
50
|
default: [],
|
|
47
51
|
required: false
|
|
48
52
|
},
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSIcon
|
|
3
|
+
:color="color"
|
|
4
|
+
>
|
|
5
|
+
{{ icon }}
|
|
6
|
+
</FSIcon>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import { computed, defineComponent } from "vue";
|
|
11
|
+
|
|
12
|
+
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
13
|
+
|
|
14
|
+
import FSIcon from "./FSIcon.vue";
|
|
15
|
+
|
|
16
|
+
export default defineComponent({
|
|
17
|
+
name: "FSIconCheck",
|
|
18
|
+
components: {
|
|
19
|
+
FSIcon
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
value: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
required: false,
|
|
25
|
+
default: false
|
|
26
|
+
},
|
|
27
|
+
withColor: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
required: false,
|
|
30
|
+
default: true
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
setup(props) {
|
|
34
|
+
const icon = computed((): string => {
|
|
35
|
+
return props.value ? "mdi-check-circle-outline" : "mdi-close-circle-outline";
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const color = computed((): ColorBase | null => {
|
|
39
|
+
if (!props.withColor) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return props.value ? ColorEnum.Success : ColorEnum.Error;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
color,
|
|
47
|
+
icon
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
</script>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSIcon>
|
|
3
|
+
{{ icon }}
|
|
4
|
+
</FSIcon>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
import { PropType, computed, defineComponent, onMounted } from "vue";
|
|
9
|
+
|
|
10
|
+
import { useLanguages } from "@dative-gpi/foundation-shared-services/composables";
|
|
11
|
+
|
|
12
|
+
import FSIcon from "./FSIcon.vue";
|
|
13
|
+
|
|
14
|
+
export default defineComponent({
|
|
15
|
+
name: "FSIconFlag",
|
|
16
|
+
components: {
|
|
17
|
+
FSIcon
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
languageCode: {
|
|
21
|
+
type: String as PropType<string | null>,
|
|
22
|
+
required: false,
|
|
23
|
+
default: null
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setup(props) {
|
|
27
|
+
const { getMany: getManylanguages, entities: languages } = useLanguages();
|
|
28
|
+
|
|
29
|
+
const icon = computed((): string => {
|
|
30
|
+
if (!props.languageCode) {
|
|
31
|
+
return "mdi-web";
|
|
32
|
+
}
|
|
33
|
+
return languages.value.find(l => l.code === props.languageCode)?.icon ?? "mdi-web";
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
onMounted((): void => {
|
|
37
|
+
getManylanguages();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
icon
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
</script>
|
|
@@ -705,6 +705,7 @@ export default defineComponent({
|
|
|
705
705
|
];
|
|
706
706
|
|
|
707
707
|
const rowsPerPageOptions: { id: number, label: string }[] = [
|
|
708
|
+
{ id: 5, label: "5" },
|
|
708
709
|
{ id: 10, label: "10" },
|
|
709
710
|
{ id: 30, label: "30" },
|
|
710
711
|
{ id: -1, label: $tr("ui.data-table.all-rows", "All") }
|
package/models/grids.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface FSGridMosaic {
|
|
2
2
|
categoryLabel: string;
|
|
3
3
|
categoryCode: string;
|
|
4
|
-
items:
|
|
4
|
+
items: FSGridItem[];
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export interface
|
|
7
|
+
export interface FSGridItem {
|
|
8
|
+
hideDefault: boolean;
|
|
8
9
|
label: string;
|
|
9
10
|
code: string;
|
|
10
|
-
value
|
|
11
|
-
hideDefault: boolean;
|
|
11
|
+
value?: string;
|
|
12
12
|
}
|
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.67",
|
|
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.67",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.67",
|
|
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": "6cc34e046f8f86c6b13d67d8e11f8870bc073d15"
|
|
36
36
|
}
|