@dative-gpi/foundation-shared-components 1.0.126 → 1.0.128-dvh
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/FSBreadcrumbs.vue +20 -12
- package/components/FSDialogFormBody.vue +6 -6
- package/components/FSDialogMenu.vue +12 -2
- package/components/FSDialogMultiFormBody.vue +1 -1
- package/components/FSDialogRemove.vue +1 -1
- package/components/FSDialogSubmit.vue +1 -1
- package/components/FSFadeOut.vue +24 -9
- package/components/FSSpan.vue +8 -5
- package/components/FSText.vue +7 -5
- package/components/FSWindow.vue +10 -5
- package/components/agenda/FSAgendaHorizontalEvent.vue +14 -4
- package/components/calendar/FSSimpleCalendar.vue +6 -10
- package/components/fields/FSAutocompleteField.vue +37 -53
- package/components/fields/FSSelectField.vue +37 -53
- package/components/fields/FSTreeViewField.vue +1 -1
- package/components/lists/FSDataTableUI.vue +22 -14
- package/components/map/FSMap.vue +18 -8
- package/components/map/FSMapOverlay.vue +46 -18
- package/components/tiles/FSLocationTileUI.vue +1 -1
- package/components/views/desktop/FSBaseDefaultDesktopView.vue +9 -9
- package/components/views/desktop/FSBaseEntityDesktopView.vue +1 -0
- package/components/views/mobile/FSBaseDefaultMobileView.vue +9 -9
- package/components/views/mobile/FSBaseEntityMobileView.vue +1 -0
- package/composables/useBreakpoints.ts +6 -0
- package/composables/useSlots.ts +2 -1
- package/package.json +4 -4
- package/styles/components/fs_agenda_event.scss +1 -1
- package/styles/components/fs_breadcrumbs.scss +19 -31
- package/styles/components/fs_button.scss +7 -5
- package/styles/components/fs_chip.scss +8 -6
- package/styles/components/fs_clickable.scss +14 -12
- package/styles/components/fs_data_iterator_item.scss +12 -10
- package/styles/components/fs_dialog.scss +1 -1
- package/styles/components/fs_dialog_menu.scss +2 -2
- package/styles/components/fs_image_card.scss +5 -3
- package/styles/components/fs_map.scss +11 -7
- package/styles/components/fs_password_field.scss +4 -2
- package/styles/components/fs_span.scss +12 -4
- package/styles/components/fs_tabs.scss +9 -5
- package/styles/components/fs_tag.scss +9 -7
- package/styles/globals/overrides.scss +11 -4
- package/styles/globals/scrollbars.scss +10 -0
- package/tools/chartsTools.ts +3 -3
- package/utils/time.ts +13 -13
- package/components/tiles/FSChartTile.vue +0 -73
|
@@ -122,6 +122,7 @@
|
|
|
122
122
|
</FSCard>
|
|
123
123
|
</FSSlideGroup>
|
|
124
124
|
<FSDialogMenu
|
|
125
|
+
cardPadding="16px"
|
|
125
126
|
v-model="dialog"
|
|
126
127
|
>
|
|
127
128
|
<template
|
|
@@ -135,69 +136,52 @@
|
|
|
135
136
|
>
|
|
136
137
|
<FSRow
|
|
137
138
|
v-for="(item, index) in $props.items"
|
|
139
|
+
align="center-left"
|
|
140
|
+
height="36px"
|
|
141
|
+
:wrap="false"
|
|
138
142
|
:key="index"
|
|
143
|
+
@click="$props.multiple ?
|
|
144
|
+
onCheckboxChange(item[$props.itemValue!]) :
|
|
145
|
+
onRadioChange(item[$props.itemValue!])
|
|
146
|
+
"
|
|
139
147
|
>
|
|
140
|
-
<
|
|
141
|
-
|
|
142
|
-
:
|
|
143
|
-
:editable="$props.editable"
|
|
144
|
-
:modelValue="$props.modelValue?.includes(item[$props.itemValue!])"
|
|
145
|
-
@update:modelValue="() => onCheckboxChange(item[$props.itemValue!])"
|
|
146
|
-
>
|
|
147
|
-
<template
|
|
148
|
-
#label="{ font }"
|
|
149
|
-
>
|
|
150
|
-
<FSRow
|
|
151
|
-
align="center-left"
|
|
152
|
-
:wrap="false"
|
|
153
|
-
>
|
|
154
|
-
<slot
|
|
155
|
-
name="item-prepend"
|
|
156
|
-
v-bind="{ item }"
|
|
157
|
-
/>
|
|
158
|
-
<FSSpan
|
|
159
|
-
:font="font"
|
|
160
|
-
>
|
|
161
|
-
{{ item[$props.itemTitle!] }}
|
|
162
|
-
</FSSpan>
|
|
163
|
-
</FSRow>
|
|
164
|
-
</template>
|
|
165
|
-
</FSCheckbox>
|
|
166
|
-
<FSRadio
|
|
167
|
-
v-else
|
|
168
|
-
:selected="$props.modelValue === item[$props.itemValue!]"
|
|
169
|
-
:label="item[$props.itemTitle!]"
|
|
170
|
-
:editable="$props.editable"
|
|
171
|
-
:item="item"
|
|
172
|
-
:modelValue="item[$props.itemValue!]"
|
|
173
|
-
@update:modelValue="() => onRadioChange(item[$props.itemValue!])"
|
|
148
|
+
<FSRow
|
|
149
|
+
style="min-width: 0;"
|
|
150
|
+
:wrap="false"
|
|
174
151
|
>
|
|
175
|
-
<
|
|
176
|
-
|
|
152
|
+
<slot
|
|
153
|
+
name="item-prepend"
|
|
154
|
+
v-bind="{ item }"
|
|
155
|
+
/>
|
|
156
|
+
<FSSpan
|
|
157
|
+
:font="selectedItems.includes(item) ? 'text-button' : 'text-body'"
|
|
177
158
|
>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
>
|
|
182
|
-
<slot
|
|
183
|
-
name="item-prepend"
|
|
184
|
-
v-bind="{ item }"
|
|
185
|
-
/>
|
|
186
|
-
<FSSpan
|
|
187
|
-
:font="font"
|
|
188
|
-
>
|
|
189
|
-
{{ item[$props.itemTitle!] }}
|
|
190
|
-
</FSSpan>
|
|
191
|
-
</FSRow>
|
|
192
|
-
</template>
|
|
193
|
-
</FSRadio>
|
|
159
|
+
{{ item[$props.itemTitle!] }}
|
|
160
|
+
</FSSpan>
|
|
161
|
+
</FSRow>
|
|
194
162
|
<FSRow
|
|
195
163
|
align="center-right"
|
|
164
|
+
width="hug"
|
|
165
|
+
:wrap="false"
|
|
196
166
|
>
|
|
197
167
|
<slot
|
|
198
168
|
name="item-append"
|
|
199
169
|
v-bind="{ item }"
|
|
200
170
|
/>
|
|
171
|
+
<FSCheckbox
|
|
172
|
+
v-if="$props.multiple"
|
|
173
|
+
:editable="$props.editable"
|
|
174
|
+
:modelValue="$props.modelValue?.includes(item[$props.itemValue!])"
|
|
175
|
+
@update:modelValue="onCheckboxChange(item[$props.itemValue!])"
|
|
176
|
+
/>
|
|
177
|
+
<FSRadio
|
|
178
|
+
v-else
|
|
179
|
+
:selected="$props.modelValue === item[$props.itemValue!]"
|
|
180
|
+
:editable="$props.editable"
|
|
181
|
+
:item="item"
|
|
182
|
+
:modelValue="item[$props.itemValue!]"
|
|
183
|
+
@update:modelValue="onRadioChange(item[$props.itemValue!])"
|
|
184
|
+
/>
|
|
201
185
|
</FSRow>
|
|
202
186
|
</FSRow>
|
|
203
187
|
</FSCol>
|
|
@@ -648,7 +632,7 @@ export default defineComponent({
|
|
|
648
632
|
|
|
649
633
|
const maxHeight = computed(() => {
|
|
650
634
|
const other = 8 + 8; // Paddings
|
|
651
|
-
return `calc(
|
|
635
|
+
return `calc(100dvh - 40px - ${other}px)`;
|
|
652
636
|
});
|
|
653
637
|
|
|
654
638
|
const mobileValue = computed((): string | null => {
|
|
@@ -383,7 +383,7 @@ export default defineComponent({
|
|
|
383
383
|
|
|
384
384
|
const maxHeight = computed(() => {
|
|
385
385
|
const other = 8 + 8; // Paddings
|
|
386
|
-
return `calc(
|
|
386
|
+
return `calc(100dvh - 40px - ${other}px)`;
|
|
387
387
|
});
|
|
388
388
|
|
|
389
389
|
const fieldSlots = computed((): any => {
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
style="position: relative;"
|
|
5
5
|
>
|
|
6
6
|
<FSRow
|
|
7
|
-
v-if="$props.showSearch || (!
|
|
7
|
+
v-if="$props.showSearch || (!isMobileSized && ($slots['prepend-toolbar'] || $slots['toolbar'] || $slots['append-toolbar'])) || (!$props.disableTable && !$props.disableIterator)"
|
|
8
8
|
align="bottom-left"
|
|
9
|
-
:wrap="
|
|
9
|
+
:wrap="isMobileSized ? false : true"
|
|
10
10
|
width="fill"
|
|
11
11
|
>
|
|
12
12
|
<slot
|
|
13
|
-
v-if="!
|
|
13
|
+
v-if="!isMobileSized"
|
|
14
14
|
name="prepend-toolbar"
|
|
15
15
|
/>
|
|
16
16
|
<template
|
|
@@ -28,16 +28,22 @@
|
|
|
28
28
|
/>
|
|
29
29
|
</template>
|
|
30
30
|
<slot
|
|
31
|
-
v-if="!
|
|
31
|
+
v-if="!isMobileSized"
|
|
32
32
|
name="toolbar"
|
|
33
33
|
/>
|
|
34
34
|
<template
|
|
35
|
-
v-if="!$props.disableTable && !$props.disableIterator"
|
|
35
|
+
v-if="$slots['append-toolbar'] || (!$props.disableTable && !$props.disableIterator)"
|
|
36
36
|
>
|
|
37
37
|
<FSRow
|
|
38
38
|
align="center-right"
|
|
39
|
+
:width="isExtraSmall ? 'hug' : 'fill'"
|
|
39
40
|
>
|
|
41
|
+
<slot
|
|
42
|
+
v-if="!isMobileSized"
|
|
43
|
+
name="append-toolbar"
|
|
44
|
+
/>
|
|
40
45
|
<FSOptionGroup
|
|
46
|
+
v-if="!$props.disableTable && !$props.disableIterator"
|
|
41
47
|
:values="modeOptions"
|
|
42
48
|
:singleColor="true"
|
|
43
49
|
:required="true"
|
|
@@ -48,13 +54,19 @@
|
|
|
48
54
|
</template>
|
|
49
55
|
</FSRow>
|
|
50
56
|
<FSRow
|
|
51
|
-
v-if="
|
|
57
|
+
v-if="isMobileSized && ($slots['prepend-toolbar'] || $slots['toolbar'] || $slots['append-toolbar'])"
|
|
52
58
|
>
|
|
53
|
-
<
|
|
59
|
+
<FSSlideGroup>
|
|
60
|
+
<slot
|
|
61
|
+
name="prepend-toolbar"
|
|
62
|
+
/>
|
|
54
63
|
<slot
|
|
55
64
|
name="toolbar"
|
|
56
65
|
/>
|
|
57
|
-
|
|
66
|
+
<slot
|
|
67
|
+
name="append-toolbar"
|
|
68
|
+
/>
|
|
69
|
+
</FSSlideGroup>
|
|
58
70
|
</FSRow>
|
|
59
71
|
<FSRow
|
|
60
72
|
v-if="showFiltersRow"
|
|
@@ -900,8 +912,8 @@ export default defineComponent({
|
|
|
900
912
|
},
|
|
901
913
|
emits: ["update:modelValue", "update:headers", "update:search", "update:showFilters", "update:filters", "update:mode", "update:sortBy", "update:rowsPerPage", "update:page", "update:include", "update:items", "click:row"],
|
|
902
914
|
setup(props, { emit }) {
|
|
915
|
+
const { isExtraSmall, isMobileSized } = useBreakpoints();
|
|
903
916
|
const { handleRoutingEvent } = useRouting();
|
|
904
|
-
const { isExtraSmall } = useBreakpoints();
|
|
905
917
|
const { $tr } = useTranslationsProvider();
|
|
906
918
|
const { getColors } = useColors();
|
|
907
919
|
const router = useRouter();
|
|
@@ -962,10 +974,6 @@ export default defineComponent({
|
|
|
962
974
|
|
|
963
975
|
});
|
|
964
976
|
|
|
965
|
-
const hasToolbar = computed((): boolean => {
|
|
966
|
-
return !!useSlots().slots["toolbar"];
|
|
967
|
-
});
|
|
968
|
-
|
|
969
977
|
const innerSlots = computed((): { [label: string]: Slot<any> } => {
|
|
970
978
|
const slots = { ...useSlots().slots };
|
|
971
979
|
delete slots["toolbar"];
|
|
@@ -1577,7 +1585,6 @@ export default defineComponent({
|
|
|
1577
1585
|
innerMode,
|
|
1578
1586
|
modeOptions,
|
|
1579
1587
|
innerPage,
|
|
1580
|
-
hasToolbar,
|
|
1581
1588
|
pageOptions,
|
|
1582
1589
|
innerShowFilters,
|
|
1583
1590
|
showFiltersRow,
|
|
@@ -1596,6 +1603,7 @@ export default defineComponent({
|
|
|
1596
1603
|
classes,
|
|
1597
1604
|
style,
|
|
1598
1605
|
size,
|
|
1606
|
+
isMobileSized,
|
|
1599
1607
|
isExtraSmall,
|
|
1600
1608
|
draggableDisabled,
|
|
1601
1609
|
elementId,
|
package/components/map/FSMap.vue
CHANGED
|
@@ -100,17 +100,18 @@
|
|
|
100
100
|
</FSCol>
|
|
101
101
|
|
|
102
102
|
<FSMapOverlay
|
|
103
|
-
v-if="$slots['overlay']"
|
|
104
103
|
:mode="$props.overlayMode"
|
|
105
104
|
@update:mode="$emit('update:overlayMode', $event)"
|
|
106
105
|
@update:height="(height) => overlayHeight = height"
|
|
107
106
|
@update:width="(width) => overlayWidth = width"
|
|
108
107
|
>
|
|
109
108
|
<template
|
|
110
|
-
|
|
109
|
+
v-for="(_, name) in overlaySlots"
|
|
110
|
+
v-slot:[name]="slotData"
|
|
111
111
|
>
|
|
112
112
|
<slot
|
|
113
|
-
name="overlay"
|
|
113
|
+
:name="'overlay-' + name"
|
|
114
|
+
v-bind="slotData"
|
|
114
115
|
/>
|
|
115
116
|
</template>
|
|
116
117
|
</FSMapOverlay>
|
|
@@ -126,7 +127,7 @@ import { map as createMap, control, tileLayer, latLngBounds, latLng, type LatLng
|
|
|
126
127
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
127
128
|
import { type FSArea } from '@dative-gpi/foundation-shared-domain/models';
|
|
128
129
|
|
|
129
|
-
import { useBreakpoints, useColors } from "../../composables";
|
|
130
|
+
import { useBreakpoints, useColors, useSlots } from "../../composables";
|
|
130
131
|
import { ColorEnum, type FSLocation, type MapLayer } from "../../models";
|
|
131
132
|
|
|
132
133
|
import FSMapLayerButton from "./FSMapLayerButton.vue";
|
|
@@ -231,8 +232,9 @@ export default defineComponent({
|
|
|
231
232
|
emits: ["update:modelValue", "update:selectedLocationId", "update:selectedAreaId", 'update:overlayMode', 'update:currentLayer', "click:latlng"],
|
|
232
233
|
setup(props, { emit }) {
|
|
233
234
|
const { $tr } = useTranslationsProvider();
|
|
234
|
-
const { getColors } = useColors();
|
|
235
235
|
const { isExtraSmall } = useBreakpoints();
|
|
236
|
+
const { getColors } = useColors();
|
|
237
|
+
const { slots } = useSlots();
|
|
236
238
|
|
|
237
239
|
const leafletContainer = ref<HTMLElement>();
|
|
238
240
|
const locationGroupBounds = ref<LatLngBounds>();
|
|
@@ -257,7 +259,7 @@ export default defineComponent({
|
|
|
257
259
|
name: "map",
|
|
258
260
|
label: $tr("ui.map-layer.map", "Map"),
|
|
259
261
|
image: new URL("../../assets/images/map/map.png", import.meta.url).href,
|
|
260
|
-
layer: tileLayer(`
|
|
262
|
+
layer: tileLayer(`https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&key=${import.meta.env.VITE_GOOGLE_MAPS_API_KEY ?? ""}`, {
|
|
261
263
|
maxZoom: 22,
|
|
262
264
|
subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
|
|
263
265
|
attribution: '© Google Map Data'
|
|
@@ -267,7 +269,7 @@ export default defineComponent({
|
|
|
267
269
|
name: "imagery",
|
|
268
270
|
label: $tr("ui.map-layer.imagery", "Imagery"),
|
|
269
271
|
image: new URL("../../assets/images/map/imagery.png", import.meta.url).href,
|
|
270
|
-
layer: tileLayer(`
|
|
272
|
+
layer: tileLayer(`https://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}&key=${import.meta.env.VITE_GOOGLE_MAPS_API_KEY ?? ""}`, {
|
|
271
273
|
maxZoom: 22,
|
|
272
274
|
subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
|
|
273
275
|
attribution: '© Google Map Data'
|
|
@@ -314,6 +316,13 @@ export default defineComponent({
|
|
|
314
316
|
return bounds as LatLngBounds;
|
|
315
317
|
});
|
|
316
318
|
|
|
319
|
+
const overlaySlots = computed(() => {
|
|
320
|
+
return Object.keys(slots).filter((slot) => slot.startsWith("overlay-")).reduce((acc, slot) => {
|
|
321
|
+
acc[slot.replace("overlay-", "")] = slots[slot];
|
|
322
|
+
return acc;
|
|
323
|
+
}, {} as Record<string, unknown>);
|
|
324
|
+
});
|
|
325
|
+
|
|
317
326
|
const calculateTargetPosition = (target: L.LatLng, zoom?: number) => {
|
|
318
327
|
if(!map.value) {
|
|
319
328
|
return target;
|
|
@@ -468,7 +477,8 @@ export default defineComponent({
|
|
|
468
477
|
actualLayer,
|
|
469
478
|
mapLayers,
|
|
470
479
|
gpsPosition,
|
|
471
|
-
style
|
|
480
|
+
style,
|
|
481
|
+
overlaySlots
|
|
472
482
|
};
|
|
473
483
|
}
|
|
474
484
|
});
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
v-show="isExtraSmall"
|
|
11
11
|
ref="mobileOverlayWrapper"
|
|
12
12
|
class="fs-map-overlay-mobile"
|
|
13
|
-
:style="{ height: $props.mode === 'expand' ? '90%' : ($props.mode === 'half' ? '60%' : '
|
|
13
|
+
:style="{ height: $props.mode === 'expand' ? '90%' : ($props.mode === 'half' ? '60%' : 'auto') }"
|
|
14
14
|
>
|
|
15
15
|
<FSCard
|
|
16
16
|
width="100%"
|
|
@@ -22,16 +22,39 @@
|
|
|
22
22
|
height="100%"
|
|
23
23
|
gap="0px"
|
|
24
24
|
>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
@touchstart="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
25
|
+
<template
|
|
26
|
+
v-if="isTouchScreenEnabled"
|
|
28
27
|
>
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
<FSRow
|
|
29
|
+
align="center-center"
|
|
30
|
+
@touchstart="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
31
|
+
>
|
|
32
|
+
<FSIcon>
|
|
33
|
+
{{ $props.mode === 'expand' ? 'mdi-chevron-down' : 'mdi-chevron-up' }}
|
|
34
|
+
</FSIcon>
|
|
35
|
+
</FSRow>
|
|
36
|
+
<slot
|
|
37
|
+
v-if="$props.mode === 'collapse'"
|
|
38
|
+
name="collapsed"
|
|
33
39
|
/>
|
|
34
|
-
</
|
|
40
|
+
</template>
|
|
41
|
+
<template
|
|
42
|
+
v-else
|
|
43
|
+
>
|
|
44
|
+
<FSRow
|
|
45
|
+
align="center-center"
|
|
46
|
+
>
|
|
47
|
+
<FSButton
|
|
48
|
+
variant="icon"
|
|
49
|
+
:icon="$props.mode === 'expand' ? 'mdi-chevron-down' : 'mdi-chevron-up'"
|
|
50
|
+
@click="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
51
|
+
/>
|
|
52
|
+
</FSRow>
|
|
53
|
+
<slot
|
|
54
|
+
v-if="$props.mode === 'collapse'"
|
|
55
|
+
name="collapsed"
|
|
56
|
+
/>
|
|
57
|
+
</template>
|
|
35
58
|
<FSCol
|
|
36
59
|
v-if="$props.mode !== 'collapse'"
|
|
37
60
|
height="fill"
|
|
@@ -64,14 +87,24 @@
|
|
|
64
87
|
|
|
65
88
|
<script lang="ts">
|
|
66
89
|
import { defineComponent, type PropType, onUnmounted, onMounted, ref } from "vue";
|
|
90
|
+
|
|
67
91
|
import { useBreakpoints } from "../../composables";
|
|
92
|
+
|
|
68
93
|
import FSButton from "../FSButton.vue";
|
|
69
94
|
import FSCard from "../FSCard.vue";
|
|
95
|
+
import FSIcon from "../FSIcon.vue";
|
|
70
96
|
import FSCol from "../FSCol.vue";
|
|
71
97
|
import FSRow from "../FSRow.vue";
|
|
72
98
|
|
|
73
99
|
export default defineComponent({
|
|
74
100
|
name: "FSMapOverlay",
|
|
101
|
+
components: {
|
|
102
|
+
FSButton,
|
|
103
|
+
FSCard,
|
|
104
|
+
FSIcon,
|
|
105
|
+
FSCol,
|
|
106
|
+
FSRow
|
|
107
|
+
},
|
|
75
108
|
props: {
|
|
76
109
|
mode: {
|
|
77
110
|
type: String as PropType<"collapse" | "half" | "expand">,
|
|
@@ -79,15 +112,9 @@ export default defineComponent({
|
|
|
79
112
|
default: "collapse"
|
|
80
113
|
}
|
|
81
114
|
},
|
|
82
|
-
components: {
|
|
83
|
-
FSButton,
|
|
84
|
-
FSCard,
|
|
85
|
-
FSCol,
|
|
86
|
-
FSRow
|
|
87
|
-
},
|
|
88
115
|
emits: ["update:mode", "update:height", "update:width"],
|
|
89
116
|
setup(_, { emit }) {
|
|
90
|
-
const { isExtraSmall } = useBreakpoints();
|
|
117
|
+
const { isExtraSmall, isTouchScreenEnabled } = useBreakpoints();
|
|
91
118
|
|
|
92
119
|
const mobileOverlayWrapper = ref<HTMLDivElement | null>(null);
|
|
93
120
|
const desktopOverlay = ref<InstanceType<typeof FSCard> | null>(null);
|
|
@@ -129,9 +156,10 @@ export default defineComponent({
|
|
|
129
156
|
});
|
|
130
157
|
|
|
131
158
|
return {
|
|
132
|
-
isExtraSmall,
|
|
133
159
|
mobileOverlayWrapper,
|
|
134
|
-
|
|
160
|
+
isTouchScreenEnabled,
|
|
161
|
+
desktopOverlay,
|
|
162
|
+
isExtraSmall,
|
|
135
163
|
};
|
|
136
164
|
}
|
|
137
165
|
});
|
|
@@ -12,11 +12,9 @@
|
|
|
12
12
|
<slot
|
|
13
13
|
name="header"
|
|
14
14
|
>
|
|
15
|
-
|
|
16
15
|
<FSRow
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
:style="{ backgroundColor, marginTop: $props.stickyTitleTopOffset }"
|
|
16
|
+
:style="`position: sticky; top: 0px; z-index: 3; background-color: ${backgroundColor}; margin-top: ${$props.stickyTitleTopOffset};`"
|
|
17
|
+
:padding="`24px ${isTouchScreenEnabled ? '24px' : '16px'} 16px 24px`"
|
|
20
18
|
>
|
|
21
19
|
<slot
|
|
22
20
|
name="title"
|
|
@@ -45,8 +43,8 @@
|
|
|
45
43
|
</FSCol>
|
|
46
44
|
<FSRow
|
|
47
45
|
v-if="$slots.toolbar"
|
|
48
|
-
padding="0px 16px 8px 24px"
|
|
49
46
|
:style="stickyToolbar ? `position: sticky; top: ${$props.toolbarTopOffset}; z-index: 3; background-color: ${backgroundColor}` : undefined"
|
|
47
|
+
:padding="`0px ${isTouchScreenEnabled ? '24px' : '16px'} 8px 24px`"
|
|
50
48
|
>
|
|
51
49
|
<FSSlideGroup
|
|
52
50
|
width="100%"
|
|
@@ -60,8 +58,8 @@
|
|
|
60
58
|
|
|
61
59
|
<FSCol
|
|
62
60
|
height="fill"
|
|
63
|
-
:padding="$slots.toolbar ? '8px 16px 24px 24px' : '16px 16px 24px 24px'"
|
|
64
61
|
gap="0px"
|
|
62
|
+
:padding="`${$slots.toolbar ? '8px' : '16px'} ${isTouchScreenEnabled ? '24px' : '16px'} 24px 24px`"
|
|
65
63
|
>
|
|
66
64
|
<slot />
|
|
67
65
|
</FSCol>
|
|
@@ -74,7 +72,7 @@ import { defineComponent, type PropType, computed } from "vue";
|
|
|
74
72
|
|
|
75
73
|
import { type FSBreadcrumbItem, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
76
74
|
|
|
77
|
-
import { useColors } from "../../../composables"
|
|
75
|
+
import { useBreakpoints, useColors } from "../../../composables"
|
|
78
76
|
|
|
79
77
|
import FSCol from "../../FSCol.vue";
|
|
80
78
|
import FSRow from "../../FSRow.vue"
|
|
@@ -119,7 +117,8 @@ export default defineComponent({
|
|
|
119
117
|
default: "0px"
|
|
120
118
|
}
|
|
121
119
|
},
|
|
122
|
-
setup(){
|
|
120
|
+
setup() {
|
|
121
|
+
const { isTouchScreenEnabled } = useBreakpoints();
|
|
123
122
|
const { getColors } = useColors();
|
|
124
123
|
|
|
125
124
|
const backgroundColor = computed(() => {
|
|
@@ -127,8 +126,9 @@ export default defineComponent({
|
|
|
127
126
|
});
|
|
128
127
|
|
|
129
128
|
return {
|
|
129
|
+
isTouchScreenEnabled,
|
|
130
130
|
backgroundColor
|
|
131
|
-
}
|
|
131
|
+
};
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
134
|
</script>
|
|
@@ -12,11 +12,9 @@
|
|
|
12
12
|
<slot
|
|
13
13
|
name="header"
|
|
14
14
|
>
|
|
15
|
-
|
|
16
15
|
<FSRow
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
:style="{ backgroundColor, marginTop: $props.stickyTitleTopOffset }"
|
|
16
|
+
:style="`position: sticky; top: 0px; z-index: 3; background-color: ${backgroundColor}; margin-top: ${$props.stickyTitleTopOffset};`"
|
|
17
|
+
:padding="`24px ${isTouchScreenEnabled ? '24px' : '16px'} 16px 24px`"
|
|
20
18
|
>
|
|
21
19
|
<slot
|
|
22
20
|
name="title"
|
|
@@ -45,8 +43,8 @@
|
|
|
45
43
|
</FSCol>
|
|
46
44
|
<FSRow
|
|
47
45
|
v-if="$slots.toolbar"
|
|
48
|
-
padding="0px 16px 8px 24px"
|
|
49
46
|
:style="stickyToolbar ? `position: sticky; top: ${$props.toolbarTopOffset}; z-index: 3; background-color: ${backgroundColor}` : undefined"
|
|
47
|
+
:padding="`0px ${isTouchScreenEnabled ? '24px' : '16px'} 8px 24px`"
|
|
50
48
|
>
|
|
51
49
|
<FSSlideGroup>
|
|
52
50
|
<slot
|
|
@@ -58,8 +56,8 @@
|
|
|
58
56
|
|
|
59
57
|
<FSCol
|
|
60
58
|
height="fill"
|
|
61
|
-
:padding="$slots.toolbar ? '8px 16px 24px 24px' : '16px 16px 24px 24px'"
|
|
62
59
|
gap="0px"
|
|
60
|
+
:padding="`${$slots.toolbar ? '8px' : '16px'} ${isTouchScreenEnabled ? '24px' : '16px'} 24px 24px`"
|
|
63
61
|
>
|
|
64
62
|
<slot />
|
|
65
63
|
</FSCol>
|
|
@@ -72,7 +70,7 @@ import { defineComponent, type PropType, computed } from "vue";
|
|
|
72
70
|
|
|
73
71
|
import { type FSBreadcrumbItem, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
74
72
|
|
|
75
|
-
import { useColors } from "../../../composables"
|
|
73
|
+
import { useBreakpoints, useColors } from "../../../composables"
|
|
76
74
|
|
|
77
75
|
import FSCol from "../../FSCol.vue";
|
|
78
76
|
import FSRow from "../../FSRow.vue"
|
|
@@ -117,7 +115,8 @@ export default defineComponent({
|
|
|
117
115
|
default: "0px"
|
|
118
116
|
}
|
|
119
117
|
},
|
|
120
|
-
setup(){
|
|
118
|
+
setup() {
|
|
119
|
+
const { isTouchScreenEnabled } = useBreakpoints();
|
|
121
120
|
const { getColors } = useColors();
|
|
122
121
|
|
|
123
122
|
const backgroundColor = computed(() => {
|
|
@@ -125,8 +124,9 @@ export default defineComponent({
|
|
|
125
124
|
});
|
|
126
125
|
|
|
127
126
|
return {
|
|
127
|
+
isTouchScreenEnabled,
|
|
128
128
|
backgroundColor
|
|
129
|
-
}
|
|
129
|
+
};
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
</script>
|
|
@@ -6,6 +6,7 @@ const windowHeight = ref(window.innerHeight);
|
|
|
6
6
|
const windowWidth = ref(window.innerWidth);
|
|
7
7
|
|
|
8
8
|
const windowOuterWidth = ref(!window.document.hasFocus() && window.outerWidth === 0 ? window.innerWidth : window.outerWidth);
|
|
9
|
+
const visualViewportHeight = ref(window.visualViewport!.height);
|
|
9
10
|
|
|
10
11
|
export const useBreakpoints = () => {
|
|
11
12
|
const onSizeChange = (): void => {
|
|
@@ -20,6 +21,10 @@ export const useBreakpoints = () => {
|
|
|
20
21
|
windowOuterWidth.value = window.outerWidth;
|
|
21
22
|
};
|
|
22
23
|
|
|
24
|
+
const onVisualViewportResize = (): void => {
|
|
25
|
+
visualViewportHeight.value = window.visualViewport!.height;
|
|
26
|
+
};
|
|
27
|
+
|
|
23
28
|
const isTouchScreenEnabled = computed((): boolean => {
|
|
24
29
|
return navigator.maxTouchPoints > 0;
|
|
25
30
|
});
|
|
@@ -34,6 +39,7 @@ export const useBreakpoints = () => {
|
|
|
34
39
|
|
|
35
40
|
if (!initialized) {
|
|
36
41
|
window.addEventListener("resize", onSizeChange);
|
|
42
|
+
window.visualViewport!.addEventListener ("resize", onVisualViewportResize);
|
|
37
43
|
initialized = true;
|
|
38
44
|
}
|
|
39
45
|
|
package/composables/useSlots.ts
CHANGED
|
@@ -20,11 +20,12 @@ export const useSlots = () => {
|
|
|
20
20
|
// Directive wrapper (v-for, v-if)
|
|
21
21
|
case "symbol":
|
|
22
22
|
switch (element.type) {
|
|
23
|
+
// On a v-for, we want to get the children of the v-for
|
|
23
24
|
case Symbol.for("v-fgt"):
|
|
24
25
|
returnElements.push(...recursiveGetChildren(element.children));
|
|
25
26
|
break;
|
|
27
|
+
// On a negative v-if, we want to get nothing
|
|
26
28
|
case Symbol.for("v-cmt"):
|
|
27
|
-
returnElements.push(element);
|
|
28
29
|
break;
|
|
29
30
|
default:
|
|
30
31
|
returnElements.push(element);
|
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.128-dvh",
|
|
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.128-dvh",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.128-dvh"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "02186299b1e99ef0040b5f09892143f046fe119d"
|
|
39
39
|
}
|