@dative-gpi/foundation-shared-components 1.0.14 → 1.0.16
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/FSButton.vue +64 -27
- package/components/FSClickable.vue +8 -0
- package/components/FSIconCard.vue +1 -1
- package/components/FSSwitch.vue +1 -1
- package/components/buttons/FSButtonAddMini.vue +1 -0
- package/components/buttons/FSButtonCancelMini.vue +1 -0
- package/components/buttons/FSButtonDuplicateMini.vue +1 -0
- package/components/buttons/FSButtonEditMini.vue +1 -0
- package/components/buttons/FSButtonFileMini.vue +1 -0
- package/components/buttons/FSButtonNextMini.vue +1 -0
- package/components/buttons/FSButtonPreviousMini.vue +1 -0
- package/components/buttons/FSButtonRedoMini.vue +1 -0
- package/components/buttons/FSButtonRemoveMini.vue +1 -0
- package/components/buttons/FSButtonSaveMini.vue +1 -0
- package/components/buttons/FSButtonSearchMini.vue +1 -0
- package/components/buttons/FSButtonUndoMini.vue +1 -0
- package/components/buttons/FSButtonUpdateMini.vue +1 -0
- package/components/buttons/FSButtonValidateMini.vue +1 -0
- package/components/lists/FSDataTableUI.vue +1 -0
- package/components/map/FSMap.vue +4 -5
- package/components/map/FSMapLayerButton.vue +4 -2
- package/components/tiles/FSFolderTileUI.vue +3 -1
- package/components/tiles/FSSimpleTileUI.vue +19 -7
- package/components/views/FSEntityHeader.vue +31 -17
- package/package.json +4 -4
package/components/FSButton.vue
CHANGED
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
<FSClickable
|
|
3
3
|
v-if="$props.variant !== 'icon'"
|
|
4
4
|
:editable="$props.editable"
|
|
5
|
-
:
|
|
5
|
+
:padding="$props.padding"
|
|
6
6
|
:variant="$props.variant"
|
|
7
|
+
:height="$props.height"
|
|
7
8
|
:color="$props.color"
|
|
9
|
+
:width="$props.width"
|
|
8
10
|
:load="$props.load"
|
|
9
11
|
:href="$props.href"
|
|
10
|
-
:padding="padding"
|
|
11
12
|
:to="$props.to"
|
|
12
13
|
:style="style"
|
|
13
|
-
:width="width"
|
|
14
14
|
@click.stop="onClick"
|
|
15
15
|
v-bind="$attrs"
|
|
16
16
|
>
|
|
17
17
|
<FSRow
|
|
18
|
+
v-if="$props.axis === 'horizontal'"
|
|
18
19
|
align="center-center"
|
|
19
20
|
width="fill"
|
|
20
21
|
:wrap="false"
|
|
@@ -51,6 +52,43 @@
|
|
|
51
52
|
</FSIcon>
|
|
52
53
|
</slot>
|
|
53
54
|
</FSRow>
|
|
55
|
+
<FSCol
|
|
56
|
+
v-else
|
|
57
|
+
align="center-center"
|
|
58
|
+
width="fill"
|
|
59
|
+
>
|
|
60
|
+
<slot
|
|
61
|
+
name="prepend"
|
|
62
|
+
v-bind="{ color: $props.color, colors }"
|
|
63
|
+
>
|
|
64
|
+
<FSIcon
|
|
65
|
+
v-if="$props.prependIcon || $props.icon"
|
|
66
|
+
:size="$props.iconSize"
|
|
67
|
+
>
|
|
68
|
+
{{ $props.prependIcon ?? $props.icon }}
|
|
69
|
+
</FSIcon>
|
|
70
|
+
</slot>
|
|
71
|
+
<slot
|
|
72
|
+
v-bind="{ color: $props.color, colors }"
|
|
73
|
+
>
|
|
74
|
+
<FSSpan
|
|
75
|
+
v-if="$props.label"
|
|
76
|
+
>
|
|
77
|
+
{{ $props.label }}
|
|
78
|
+
</FSSpan>
|
|
79
|
+
</slot>
|
|
80
|
+
<slot
|
|
81
|
+
name="append"
|
|
82
|
+
v-bind="{ color: $props.color, colors }"
|
|
83
|
+
>
|
|
84
|
+
<FSIcon
|
|
85
|
+
v-if="$props.appendIcon"
|
|
86
|
+
:size="$props.iconSize"
|
|
87
|
+
>
|
|
88
|
+
{{ $props.appendIcon }}
|
|
89
|
+
</FSIcon>
|
|
90
|
+
</slot>
|
|
91
|
+
</FSCol>
|
|
54
92
|
</FSClickable>
|
|
55
93
|
<FSRow
|
|
56
94
|
v-else
|
|
@@ -132,11 +170,12 @@ import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
|
132
170
|
import { type RouteLocation } from "vue-router";
|
|
133
171
|
|
|
134
172
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
135
|
-
import { useColors
|
|
173
|
+
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
136
174
|
|
|
137
175
|
import FSClickable from "./FSClickable.vue";
|
|
138
176
|
import FSSpan from "./FSSpan.vue";
|
|
139
177
|
import FSIcon from "./FSIcon.vue";
|
|
178
|
+
import FSCol from "./FSCol.vue";
|
|
140
179
|
import FSRow from "./FSRow.vue";
|
|
141
180
|
|
|
142
181
|
export default defineComponent({
|
|
@@ -145,9 +184,25 @@ export default defineComponent({
|
|
|
145
184
|
FSClickable,
|
|
146
185
|
FSSpan,
|
|
147
186
|
FSIcon,
|
|
187
|
+
FSCol,
|
|
148
188
|
FSRow
|
|
149
189
|
},
|
|
150
190
|
props: {
|
|
191
|
+
height: {
|
|
192
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
193
|
+
required: false,
|
|
194
|
+
default: () => ["40px", "36px"]
|
|
195
|
+
},
|
|
196
|
+
width: {
|
|
197
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
198
|
+
required: false,
|
|
199
|
+
default: "fit-content"
|
|
200
|
+
},
|
|
201
|
+
padding: {
|
|
202
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
203
|
+
required: false,
|
|
204
|
+
default: "0 16px"
|
|
205
|
+
},
|
|
151
206
|
to: {
|
|
152
207
|
type: [String, Object] as PropType<string | RouteLocation | null>,
|
|
153
208
|
required: false,
|
|
@@ -188,16 +243,16 @@ export default defineComponent({
|
|
|
188
243
|
required: false,
|
|
189
244
|
default: "standard"
|
|
190
245
|
},
|
|
246
|
+
axis: {
|
|
247
|
+
type: String as PropType<"horizontal" | "vertical">,
|
|
248
|
+
required: false,
|
|
249
|
+
default: "horizontal"
|
|
250
|
+
},
|
|
191
251
|
color: {
|
|
192
252
|
type: String as PropType<ColorBase>,
|
|
193
253
|
required: false,
|
|
194
254
|
default: ColorEnum.Light
|
|
195
255
|
},
|
|
196
|
-
fullWidth: {
|
|
197
|
-
type: Boolean,
|
|
198
|
-
required: false,
|
|
199
|
-
default: false
|
|
200
|
-
},
|
|
201
256
|
load: {
|
|
202
257
|
type: Boolean,
|
|
203
258
|
required: false,
|
|
@@ -212,7 +267,6 @@ export default defineComponent({
|
|
|
212
267
|
emits: ["click"],
|
|
213
268
|
setup(props, { emit }) {
|
|
214
269
|
const { getColors } = useColors();
|
|
215
|
-
const { slots } = useSlots();
|
|
216
270
|
|
|
217
271
|
const colors = computed(() => getColors(props.color));
|
|
218
272
|
const lights = getColors(ColorEnum.Light);
|
|
@@ -260,21 +314,6 @@ export default defineComponent({
|
|
|
260
314
|
}
|
|
261
315
|
});
|
|
262
316
|
|
|
263
|
-
const padding = computed((): string | number => {
|
|
264
|
-
switch (props.variant) {
|
|
265
|
-
case "standard":
|
|
266
|
-
case "full": return (!slots.default && !props.label) ? "0 7px" : "0 16px";
|
|
267
|
-
default: return "0px";
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
const width = computed((): string | number => {
|
|
272
|
-
if (props.fullWidth) {
|
|
273
|
-
return "100%";
|
|
274
|
-
}
|
|
275
|
-
return "fit-content";
|
|
276
|
-
});
|
|
277
|
-
|
|
278
317
|
const onClick = (event: MouseEvent) => {
|
|
279
318
|
if (!props.to && !props.href && props.editable && !props.load) {
|
|
280
319
|
emit("click", event);
|
|
@@ -284,10 +323,8 @@ export default defineComponent({
|
|
|
284
323
|
return {
|
|
285
324
|
iconClasses,
|
|
286
325
|
loadColor,
|
|
287
|
-
padding,
|
|
288
326
|
colors,
|
|
289
327
|
style,
|
|
290
|
-
width,
|
|
291
328
|
onClick
|
|
292
329
|
};
|
|
293
330
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
<FSCard
|
|
12
12
|
:borderRadius="$props.borderRadius"
|
|
13
13
|
:borderStyle="$props.borderStyle"
|
|
14
|
+
:padding="$props.padding"
|
|
14
15
|
:height="$props.height"
|
|
15
16
|
:width="$props.width"
|
|
16
17
|
:class="classes"
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
<FSCard
|
|
52
53
|
:borderRadius="$props.borderRadius"
|
|
53
54
|
:borderStyle="$props.borderStyle"
|
|
55
|
+
:padding="$props.padding"
|
|
54
56
|
:height="$props.height"
|
|
55
57
|
:width="$props.width"
|
|
56
58
|
:class="classes"
|
|
@@ -92,6 +94,7 @@
|
|
|
92
94
|
<FSCard
|
|
93
95
|
:borderRadius="$props.borderRadius"
|
|
94
96
|
:borderStyle="$props.borderStyle"
|
|
97
|
+
:padding="$props.padding"
|
|
95
98
|
:height="$props.height"
|
|
96
99
|
:width="$props.width"
|
|
97
100
|
:class="classes"
|
|
@@ -148,6 +151,11 @@ export default defineComponent({
|
|
|
148
151
|
required: false,
|
|
149
152
|
default: null
|
|
150
153
|
},
|
|
154
|
+
padding: {
|
|
155
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
156
|
+
required: false,
|
|
157
|
+
default: "0"
|
|
158
|
+
},
|
|
151
159
|
to: {
|
|
152
160
|
type: [String, Object] as PropType<string | RouteLocation | null>,
|
|
153
161
|
required: false,
|
|
@@ -46,7 +46,7 @@ export default defineComponent({
|
|
|
46
46
|
default: null
|
|
47
47
|
},
|
|
48
48
|
backgroundVariant: {
|
|
49
|
-
type: String as PropType<"background" | "gradient">,
|
|
49
|
+
type: String as PropType<"background" | "standard" | "full" | "gradient">,
|
|
50
50
|
required: false,
|
|
51
51
|
default: "background"
|
|
52
52
|
},
|
package/components/FSSwitch.vue
CHANGED
package/components/map/FSMap.vue
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
<FSButton
|
|
66
66
|
v-if="$props.showFullScreen"
|
|
67
67
|
prependIcon="mdi-fullscreen"
|
|
68
|
+
padding="0 7px"
|
|
68
69
|
:elevation="true"
|
|
69
70
|
@click="fullScreen = !fullScreen"
|
|
70
71
|
/>
|
|
@@ -86,10 +87,10 @@
|
|
|
86
87
|
<FSButton
|
|
87
88
|
v-if="$props.showMyLocation"
|
|
88
89
|
prependIcon="mdi-crosshairs-gps"
|
|
90
|
+
padding="0 7px"
|
|
89
91
|
color="primary"
|
|
90
92
|
variant="full"
|
|
91
93
|
:elevation="true"
|
|
92
|
-
:border="false"
|
|
93
94
|
@click="locate"
|
|
94
95
|
/>
|
|
95
96
|
<FSCol
|
|
@@ -98,17 +99,15 @@
|
|
|
98
99
|
>
|
|
99
100
|
|
|
100
101
|
<FSButton
|
|
101
|
-
class="fs-map-zoom-plus"
|
|
102
102
|
prependIcon="mdi-plus"
|
|
103
|
+
padding="0 7px"
|
|
103
104
|
:elevation="true"
|
|
104
|
-
:border="false"
|
|
105
105
|
@click="zoomIn"
|
|
106
106
|
/>
|
|
107
107
|
<FSButton
|
|
108
|
-
class="fs-map-zoom-minus"
|
|
109
108
|
prependIcon="mdi-minus"
|
|
109
|
+
padding="0 7px"
|
|
110
110
|
:elevation="true"
|
|
111
|
-
:border="false"
|
|
112
111
|
@click="zoomOut"
|
|
113
112
|
/>
|
|
114
113
|
</FSCol>
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSButton
|
|
3
3
|
prependIcon="mdi-layers-outline"
|
|
4
|
+
padding="0 7px"
|
|
4
5
|
:elevation="true"
|
|
5
6
|
@click="dialog = true"
|
|
6
7
|
/>
|
|
7
8
|
<FSDialog
|
|
8
9
|
v-model="dialog"
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
width="500px"
|
|
11
|
+
:title="$tr('ui.map.select-layer', 'Select layer')"
|
|
11
12
|
>
|
|
12
13
|
<template
|
|
13
14
|
v-slot:body
|
|
14
15
|
>
|
|
15
16
|
<FSRow
|
|
16
17
|
align="center-center"
|
|
18
|
+
padding="0 16px 0 0"
|
|
17
19
|
>
|
|
18
20
|
<FSImageCard
|
|
19
21
|
v-for="layer in layers"
|
|
@@ -36,13 +36,15 @@
|
|
|
36
36
|
</FSCol>
|
|
37
37
|
<FSImage
|
|
38
38
|
v-if="$props.imageId"
|
|
39
|
+
:imageId="$props.imageId"
|
|
39
40
|
:height="imageSize"
|
|
40
41
|
:width="imageSize"
|
|
41
|
-
:imageId="$props.imageId"
|
|
42
42
|
/>
|
|
43
43
|
<FSIconCard
|
|
44
44
|
v-else
|
|
45
|
-
:
|
|
45
|
+
:backgroundVariant="$props.iconBackgroundVariant"
|
|
46
|
+
:backgroundColor="$props.iconBackgroundColor"
|
|
47
|
+
:border="$props.iconBorder"
|
|
46
48
|
:icon="$props.icon"
|
|
47
49
|
:size="imageSize"
|
|
48
50
|
/>
|
|
@@ -90,16 +92,26 @@ export default defineComponent({
|
|
|
90
92
|
required: false,
|
|
91
93
|
default: null
|
|
92
94
|
},
|
|
93
|
-
iconBackgroundColor: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
required: false,
|
|
96
|
-
default: false
|
|
97
|
-
},
|
|
98
95
|
icon: {
|
|
99
96
|
type: String as PropType<string>,
|
|
100
97
|
required: false,
|
|
101
98
|
default: "mdi-ab-testing"
|
|
102
99
|
},
|
|
100
|
+
iconBackgroundVariant: {
|
|
101
|
+
type: String as PropType<"background" | "standard" | "full" | "gradient">,
|
|
102
|
+
required: false,
|
|
103
|
+
default: "background"
|
|
104
|
+
},
|
|
105
|
+
iconBackgroundColor: {
|
|
106
|
+
type: [Array, String] as PropType<ColorBase | ColorBase[]>,
|
|
107
|
+
required: false,
|
|
108
|
+
default: ColorEnum.Background
|
|
109
|
+
},
|
|
110
|
+
iconBorder: {
|
|
111
|
+
type: Boolean as PropType<boolean>,
|
|
112
|
+
required: false,
|
|
113
|
+
default: true
|
|
114
|
+
},
|
|
103
115
|
activeColor: {
|
|
104
116
|
type: String as PropType<ColorBase>,
|
|
105
117
|
required: false,
|
|
@@ -17,21 +17,23 @@
|
|
|
17
17
|
<FSImage
|
|
18
18
|
v-if="$props.imageId"
|
|
19
19
|
:imageId="$props.imageId"
|
|
20
|
+
:cover="imageCover"
|
|
20
21
|
:height="imageSize"
|
|
21
22
|
:width="imageSize"
|
|
22
|
-
:cover="imageCover"
|
|
23
23
|
/>
|
|
24
24
|
<FSIcon
|
|
25
25
|
v-else-if="$props.icon && $props.color"
|
|
26
|
+
:color="$props.color"
|
|
26
27
|
:icon="$props.icon"
|
|
27
28
|
:size="imageSize"
|
|
28
|
-
:color="$props.color"
|
|
29
29
|
/>
|
|
30
30
|
<FSIconCard
|
|
31
|
-
v-else-if="$props.icon && $props.
|
|
31
|
+
v-else-if="$props.icon && $props.iconBackgroundColor && $props.iconBackgroundColor.length > 0"
|
|
32
|
+
:backgroundVariant="$props.iconBackgroundVariant"
|
|
33
|
+
:backgroundColor="$props.iconBackgroundColor"
|
|
34
|
+
:border="$props.iconBorder"
|
|
32
35
|
:icon="$props.icon"
|
|
33
36
|
:size="imageSize"
|
|
34
|
-
:backgroundColor="$props.iconBackgroundColors"
|
|
35
37
|
/>
|
|
36
38
|
<FSCol
|
|
37
39
|
align="center-left"
|
|
@@ -137,16 +139,18 @@
|
|
|
137
139
|
<FSImage
|
|
138
140
|
v-if="$props.imageId"
|
|
139
141
|
:imageId="$props.imageId"
|
|
142
|
+
:cover="imageCover"
|
|
140
143
|
:height="imageSize"
|
|
141
144
|
:width="imageSize"
|
|
142
|
-
:cover="imageCover"
|
|
143
145
|
/>
|
|
144
146
|
<FSIconCard
|
|
145
|
-
v-else-if="$props.icon && $props.
|
|
147
|
+
v-else-if="$props.icon && $props.iconBackgroundColor && $props.iconBackgroundColor.length > 0"
|
|
148
|
+
iconSize="70px"
|
|
149
|
+
:backgroundVariant="$props.iconBackgroundVariant"
|
|
150
|
+
:backgroundColor="$props.iconBackgroundColor"
|
|
151
|
+
:border="$props.iconBorder"
|
|
146
152
|
:icon="$props.icon"
|
|
147
153
|
:size="imageSize"
|
|
148
|
-
iconSize="70px"
|
|
149
|
-
:backgroundColor="$props.iconBackgroundColors"
|
|
150
154
|
/>
|
|
151
155
|
<FSIcon
|
|
152
156
|
v-else-if="$props.icon"
|
|
@@ -210,7 +214,7 @@
|
|
|
210
214
|
<script lang="ts">
|
|
211
215
|
import { computed, defineComponent, type PropType } from "vue";
|
|
212
216
|
|
|
213
|
-
import { type ColorBase, type FSBreadcrumbItem } from "@dative-gpi/foundation-shared-components/models";
|
|
217
|
+
import { ColorEnum, type ColorBase, type FSBreadcrumbItem } from "@dative-gpi/foundation-shared-components/models";
|
|
214
218
|
import { useBreakpoints, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
215
219
|
|
|
216
220
|
import FSBreadcrumbs from "../FSBreadcrumbs.vue";
|
|
@@ -240,20 +244,30 @@ export default defineComponent({
|
|
|
240
244
|
required: false,
|
|
241
245
|
default: null
|
|
242
246
|
},
|
|
243
|
-
icon: {
|
|
244
|
-
type: String as PropType<string | null>,
|
|
245
|
-
required: false,
|
|
246
|
-
default: null
|
|
247
|
-
},
|
|
248
247
|
color: {
|
|
249
248
|
type: String as PropType<ColorBase>,
|
|
250
249
|
required: false,
|
|
251
250
|
default: null
|
|
252
251
|
},
|
|
253
|
-
|
|
254
|
-
type:
|
|
252
|
+
icon: {
|
|
253
|
+
type: String as PropType<string>,
|
|
254
|
+
required: false,
|
|
255
|
+
default: "mdi-ab-testing"
|
|
256
|
+
},
|
|
257
|
+
iconBackgroundVariant: {
|
|
258
|
+
type: String as PropType<"background" | "standard" | "full" | "gradient">,
|
|
255
259
|
required: false,
|
|
256
|
-
default:
|
|
260
|
+
default: "background"
|
|
261
|
+
},
|
|
262
|
+
iconBackgroundColor: {
|
|
263
|
+
type: [Array, String] as PropType<ColorBase | ColorBase[]>,
|
|
264
|
+
required: false,
|
|
265
|
+
default: ColorEnum.Background
|
|
266
|
+
},
|
|
267
|
+
iconBorder: {
|
|
268
|
+
type: Boolean as PropType<boolean>,
|
|
269
|
+
required: false,
|
|
270
|
+
default: true
|
|
257
271
|
},
|
|
258
272
|
title: {
|
|
259
273
|
type: String as PropType<string | null>,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.16",
|
|
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": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.16",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.16"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "ed54fe2f03db8e7af8bbf5fcc585a2b4cd52f52e"
|
|
39
39
|
}
|