@dative-gpi/foundation-shared-components 1.0.194-filled-check → 1.0.194-playlists-snackbar
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.
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-snackbar
|
|
3
|
+
class="fs-snackbar"
|
|
4
|
+
:modelValue="$props.modelValue"
|
|
5
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
6
|
+
:multi-line="$props.multiLine"
|
|
7
|
+
:location="$props.location"
|
|
8
|
+
:vertical="$props.vertical"
|
|
9
|
+
:timeout="$props.timeout"
|
|
10
|
+
:style="style"
|
|
11
|
+
>
|
|
12
|
+
<slot>
|
|
13
|
+
<FSRow
|
|
14
|
+
align="center-left"
|
|
15
|
+
:wrap="false"
|
|
16
|
+
gap="12px"
|
|
17
|
+
>
|
|
18
|
+
<FSIcon
|
|
19
|
+
v-if="$props.icon"
|
|
20
|
+
>
|
|
21
|
+
{{ $props.icon }}
|
|
22
|
+
</FSIcon>
|
|
23
|
+
<FSSpan
|
|
24
|
+
v-if="$props.text"
|
|
25
|
+
:ellipsis="!$props.multiLine"
|
|
26
|
+
>
|
|
27
|
+
{{ $props.text }}
|
|
28
|
+
</FSSpan>
|
|
29
|
+
</FSRow>
|
|
30
|
+
</slot>
|
|
31
|
+
<template
|
|
32
|
+
v-if="$slots.actions || $props.closeButton"
|
|
33
|
+
#actions
|
|
34
|
+
>
|
|
35
|
+
<slot
|
|
36
|
+
name="actions"
|
|
37
|
+
>
|
|
38
|
+
<FSButton
|
|
39
|
+
v-if="$props.closeButton"
|
|
40
|
+
icon="mdi-close"
|
|
41
|
+
variant="icon"
|
|
42
|
+
@click="$emit('update:modelValue', false)"
|
|
43
|
+
/>
|
|
44
|
+
</slot>
|
|
45
|
+
</template>
|
|
46
|
+
</v-snackbar>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script lang="ts">
|
|
50
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
51
|
+
|
|
52
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
53
|
+
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
54
|
+
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
55
|
+
|
|
56
|
+
import FSButton from "./FSButton.vue";
|
|
57
|
+
import FSIcon from "./FSIcon.vue";
|
|
58
|
+
import FSSpan from "./FSSpan.vue";
|
|
59
|
+
import FSRow from "./FSRow.vue";
|
|
60
|
+
|
|
61
|
+
export default defineComponent({
|
|
62
|
+
name: "FSSnackbar",
|
|
63
|
+
components: {
|
|
64
|
+
FSButton,
|
|
65
|
+
FSIcon,
|
|
66
|
+
FSSpan,
|
|
67
|
+
FSRow
|
|
68
|
+
},
|
|
69
|
+
props: {
|
|
70
|
+
modelValue: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
required: false,
|
|
73
|
+
default: false
|
|
74
|
+
},
|
|
75
|
+
text: {
|
|
76
|
+
type: String as PropType<string | null>,
|
|
77
|
+
required: false,
|
|
78
|
+
default: null
|
|
79
|
+
},
|
|
80
|
+
icon: {
|
|
81
|
+
type: String as PropType<string | null>,
|
|
82
|
+
required: false,
|
|
83
|
+
default: null
|
|
84
|
+
},
|
|
85
|
+
color: {
|
|
86
|
+
type: String as PropType<ColorBase>,
|
|
87
|
+
required: false,
|
|
88
|
+
default: ColorEnum.Dark
|
|
89
|
+
},
|
|
90
|
+
timeout: {
|
|
91
|
+
type: Number,
|
|
92
|
+
required: false,
|
|
93
|
+
default: 5000
|
|
94
|
+
},
|
|
95
|
+
location: {
|
|
96
|
+
type: String as PropType<"top" | "bottom" | "left" | "right" | "top left" | "top right" | "bottom left" | "bottom right">,
|
|
97
|
+
required: false,
|
|
98
|
+
default: "bottom"
|
|
99
|
+
},
|
|
100
|
+
vertical: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
required: false,
|
|
103
|
+
default: false
|
|
104
|
+
},
|
|
105
|
+
multiLine: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
required: false,
|
|
108
|
+
default: false
|
|
109
|
+
},
|
|
110
|
+
closeButton: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
required: false,
|
|
113
|
+
default: false
|
|
114
|
+
},
|
|
115
|
+
variant: {
|
|
116
|
+
type: String as PropType<"standard" | "full">,
|
|
117
|
+
required: false,
|
|
118
|
+
default: "full"
|
|
119
|
+
},
|
|
120
|
+
borderRadius: {
|
|
121
|
+
type: [String, Number],
|
|
122
|
+
required: false,
|
|
123
|
+
default: "4px"
|
|
124
|
+
},
|
|
125
|
+
opacity: {
|
|
126
|
+
type: Number,
|
|
127
|
+
required: false,
|
|
128
|
+
default: 0.9
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
emits: ["update:modelValue"],
|
|
132
|
+
setup(props) {
|
|
133
|
+
const { getColors } = useColors();
|
|
134
|
+
|
|
135
|
+
const colors = computed(() => getColors(props.color));
|
|
136
|
+
|
|
137
|
+
const style = computed((): StyleValue => {
|
|
138
|
+
switch (props.variant) {
|
|
139
|
+
case "standard": return {
|
|
140
|
+
"--fs-snackbar-border-radius": sizeToVar(props.borderRadius),
|
|
141
|
+
"--fs-snackbar-background-color": colors.value.light,
|
|
142
|
+
"--fs-snackbar-color": colors.value.dark,
|
|
143
|
+
"--fs-snackbar-opacity": props.opacity
|
|
144
|
+
};
|
|
145
|
+
default: return {
|
|
146
|
+
"--fs-snackbar-border-radius": sizeToVar(props.borderRadius),
|
|
147
|
+
"--fs-snackbar-background-color": colors.value.base,
|
|
148
|
+
"--fs-snackbar-color": colors.value.light,
|
|
149
|
+
"--fs-snackbar-opacity": props.opacity
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
style
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
</script>
|
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
<FSCol
|
|
3
3
|
gap="12px"
|
|
4
4
|
>
|
|
5
|
-
<
|
|
6
|
-
v-if="$props.searchable"
|
|
7
|
-
:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
<FSRow
|
|
6
|
+
v-if="$props.searchable || $slots.action"
|
|
7
|
+
:wrap="false"
|
|
8
|
+
align="center-left"
|
|
9
|
+
>
|
|
10
|
+
<FSSearchField
|
|
11
|
+
v-if="$props.searchable"
|
|
12
|
+
:hideHeader="true"
|
|
13
|
+
:modelValue="actualSearch"
|
|
14
|
+
@update:modelValue="onSearch"
|
|
15
|
+
/>
|
|
16
|
+
<slot
|
|
17
|
+
name="action"
|
|
18
|
+
/>
|
|
19
|
+
</FSRow>
|
|
11
20
|
<FSFadeOut
|
|
12
21
|
v-if="$props.direction == ListDirections.Column"
|
|
13
22
|
:maxHeight="$props.maxHeight"
|
|
@@ -109,11 +118,13 @@ import FSFadeOut from "../FSFadeOut.vue";
|
|
|
109
118
|
import FSSlideGroup from "../FSSlideGroup.vue"
|
|
110
119
|
import FSSearchField from "../fields/FSSearchField.vue";
|
|
111
120
|
import FSSimpleTileUI from "../tiles/FSSimpleTileUI.vue";
|
|
121
|
+
import FSRow from "../FSRow.vue";
|
|
112
122
|
|
|
113
123
|
export default defineComponent({
|
|
114
124
|
name: "FSTileList",
|
|
115
125
|
components: {
|
|
116
126
|
FSCol,
|
|
127
|
+
FSRow,
|
|
117
128
|
FSFadeOut,
|
|
118
129
|
FSLoader,
|
|
119
130
|
FSSlideGroup,
|
|
@@ -223,6 +234,12 @@ export default defineComponent({
|
|
|
223
234
|
actualSearch.value = value;
|
|
224
235
|
});
|
|
225
236
|
|
|
237
|
+
watch(() => props.singleSelect, () => {
|
|
238
|
+
if(props.singleSelect && props.modelValue.length > 1) {
|
|
239
|
+
emit("update:modelValue", []);
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
|
|
226
243
|
return {
|
|
227
244
|
actualSearch,
|
|
228
245
|
filteredItems,
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSTile
|
|
3
|
+
:activeColor="ColorEnum.Primary"
|
|
4
|
+
:modelValue="$props.modelValue"
|
|
5
|
+
:width="$props.width"
|
|
6
|
+
:height="$props.height"
|
|
7
|
+
padding="16px 24px"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
>
|
|
10
|
+
<FSRow
|
|
11
|
+
:wrap="false"
|
|
12
|
+
>
|
|
13
|
+
<FSCol
|
|
14
|
+
gap="16px"
|
|
15
|
+
width="fill"
|
|
16
|
+
>
|
|
17
|
+
<FSText
|
|
18
|
+
font="text-button"
|
|
19
|
+
>
|
|
20
|
+
{{ $props.label }}
|
|
21
|
+
</FSText>
|
|
22
|
+
<FSRow
|
|
23
|
+
:wrap="false"
|
|
24
|
+
align="center-left"
|
|
25
|
+
>
|
|
26
|
+
<FSIcon>
|
|
27
|
+
mdi-view-dashboard-outline
|
|
28
|
+
</FSIcon>
|
|
29
|
+
<FSText
|
|
30
|
+
font="text-overline"
|
|
31
|
+
>
|
|
32
|
+
{{ $tr('ui.dashboards.dynamic', '{0} dashboard(s)', $props.dashboardsCount) }}
|
|
33
|
+
</FSText>
|
|
34
|
+
</FSRow>
|
|
35
|
+
<FSRow
|
|
36
|
+
:wrap="false"
|
|
37
|
+
align="center-left"
|
|
38
|
+
>
|
|
39
|
+
<FSIconCheck
|
|
40
|
+
variant="fill"
|
|
41
|
+
:value="automaticTransition"
|
|
42
|
+
/>
|
|
43
|
+
<FSText
|
|
44
|
+
font="text-overline"
|
|
45
|
+
>
|
|
46
|
+
{{ automaticTransition
|
|
47
|
+
? $tr('ui.playlist.transition-delay.dynamic', 'Transition : {0}', getTimeBestString($props.delay ?? 0))
|
|
48
|
+
: $tr('ui.playlist.automatic-transition', 'Automatic transition')
|
|
49
|
+
}}
|
|
50
|
+
</FSText>
|
|
51
|
+
</FSRow>
|
|
52
|
+
<FSRow
|
|
53
|
+
:wrap="false"
|
|
54
|
+
align="center-left"
|
|
55
|
+
>
|
|
56
|
+
<FSIconCheck
|
|
57
|
+
variant="fill"
|
|
58
|
+
:value="$props.looped"
|
|
59
|
+
/>
|
|
60
|
+
<FSText
|
|
61
|
+
font="text-overline"
|
|
62
|
+
>
|
|
63
|
+
{{ $tr('entity.playlist.looped', 'Looped') }}
|
|
64
|
+
</FSText>
|
|
65
|
+
</FSRow>
|
|
66
|
+
</FSCol>
|
|
67
|
+
<slot
|
|
68
|
+
name="actions"
|
|
69
|
+
/>
|
|
70
|
+
</FSRow>
|
|
71
|
+
</FSTile>
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<script lang="ts">
|
|
75
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
76
|
+
|
|
77
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
78
|
+
|
|
79
|
+
import { getTimeBestString } from "@dative-gpi/foundation-shared-components/utils";
|
|
80
|
+
|
|
81
|
+
import FSIconCheck from "../FSIconCheck.vue";
|
|
82
|
+
import FSTile from "../tiles/FSTile.vue";
|
|
83
|
+
import FSIcon from "../FSIcon.vue";
|
|
84
|
+
import FSText from "../FSText.vue";
|
|
85
|
+
import FSRow from "../FSRow.vue";
|
|
86
|
+
import FSCol from "../FSCol.vue";
|
|
87
|
+
|
|
88
|
+
export default defineComponent({
|
|
89
|
+
name: "FSPlaylistTileUI",
|
|
90
|
+
components: {
|
|
91
|
+
FSIconCheck,
|
|
92
|
+
FSIcon,
|
|
93
|
+
FSTile,
|
|
94
|
+
FSText,
|
|
95
|
+
FSRow,
|
|
96
|
+
FSCol
|
|
97
|
+
},
|
|
98
|
+
inheritAttrs: false,
|
|
99
|
+
props: {
|
|
100
|
+
width: {
|
|
101
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
102
|
+
required: false,
|
|
103
|
+
default: () => [352, 336]
|
|
104
|
+
},
|
|
105
|
+
height: {
|
|
106
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
107
|
+
required: false,
|
|
108
|
+
default: () => 'hug'
|
|
109
|
+
},
|
|
110
|
+
label: {
|
|
111
|
+
type: String as PropType<string>,
|
|
112
|
+
required: true
|
|
113
|
+
},
|
|
114
|
+
dashboardsCount: {
|
|
115
|
+
type: Number,
|
|
116
|
+
required: true
|
|
117
|
+
},
|
|
118
|
+
delay: {
|
|
119
|
+
type: Number ,
|
|
120
|
+
required: false
|
|
121
|
+
},
|
|
122
|
+
looped: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
required: true
|
|
125
|
+
},
|
|
126
|
+
modelValue: {
|
|
127
|
+
type: Boolean,
|
|
128
|
+
required: false,
|
|
129
|
+
default: false
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
setup(props) {
|
|
133
|
+
|
|
134
|
+
const automaticTransition = computed((): boolean => {
|
|
135
|
+
return props.delay ? props.delay > 0 : false;
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
return {
|
|
139
|
+
getTimeBestString,
|
|
140
|
+
automaticTransition,
|
|
141
|
+
ColorEnum
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
</script>
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://github.com/Dative-GPI/foundation-shared-ui.git"
|
|
5
5
|
},
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"version": "1.0.194-
|
|
7
|
+
"version": "1.0.194-playlists-snackbar",
|
|
8
8
|
"description": "",
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.0.194-
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.0.194-
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.194-playlists-snackbar",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.194-playlists-snackbar"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"sass": "1.71.1",
|
|
39
39
|
"sass-loader": "13.3.2"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "cafcfdd6e441d814cb8e3a57bba8d802f3938223"
|
|
42
42
|
}
|