@dative-gpi/foundation-shared-components 1.0.180-fix-utils-composable → 1.0.180-fix-sandbox-connectivity
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,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSRow
|
|
3
|
+
align="bottom-left"
|
|
4
|
+
:wrap="false"
|
|
5
|
+
gap="16px"
|
|
6
|
+
>
|
|
7
|
+
<FSRow
|
|
8
|
+
align="bottom-center"
|
|
9
|
+
>
|
|
10
|
+
<FSNumberField
|
|
11
|
+
:label="$tr('entity.widget.width', 'Width')"
|
|
12
|
+
:modelValue="widgetWidth"
|
|
13
|
+
@update:modelValue="$emit('update:widgetWidth', $event)"
|
|
14
|
+
/>
|
|
15
|
+
<FSNumberField
|
|
16
|
+
:label="$tr('entity.widget.height', 'Height')"
|
|
17
|
+
:modelValue="widgetHeight"
|
|
18
|
+
@update:modelValue="$emit('update:widgetHeight', $event)"
|
|
19
|
+
/>
|
|
20
|
+
<FSSwitch
|
|
21
|
+
class="dialog-configure-widget-hide-borders"
|
|
22
|
+
:label="$tr('entity.widget.hide-borders', 'Hide borders')"
|
|
23
|
+
:modelValue="hideBorders"
|
|
24
|
+
@update:modelValue="$emit('update:hideBorders', $event)"
|
|
25
|
+
/>
|
|
26
|
+
</FSRow>
|
|
27
|
+
</FSRow>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script lang="ts">
|
|
31
|
+
import { defineComponent } from "vue";
|
|
32
|
+
|
|
33
|
+
import FSRow from "./FSRow.vue";
|
|
34
|
+
import FSNumberField from "./fields/FSNumberField.vue";
|
|
35
|
+
import FSSwitch from "./FSSwitch.vue";
|
|
36
|
+
|
|
37
|
+
export default defineComponent({
|
|
38
|
+
name: "WidgetStandardOptions",
|
|
39
|
+
components: {
|
|
40
|
+
FSRow,
|
|
41
|
+
FSNumberField,
|
|
42
|
+
FSSwitch
|
|
43
|
+
},
|
|
44
|
+
props: {
|
|
45
|
+
widgetWidth: {
|
|
46
|
+
type: Number,
|
|
47
|
+
required: true
|
|
48
|
+
},
|
|
49
|
+
widgetHeight: {
|
|
50
|
+
type: Number,
|
|
51
|
+
required: true
|
|
52
|
+
},
|
|
53
|
+
hideBorders: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
required: true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
emits: ["update:widgetWidth", "update:widgetHeight", "update:hideBorders"]
|
|
59
|
+
});
|
|
60
|
+
</script>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSCard
|
|
3
|
+
height="100px"
|
|
4
|
+
width="100%"
|
|
5
|
+
>
|
|
6
|
+
<FSCol
|
|
7
|
+
align="center-center"
|
|
8
|
+
>
|
|
9
|
+
<FSIcon
|
|
10
|
+
v-if="icon"
|
|
11
|
+
size="32px"
|
|
12
|
+
>
|
|
13
|
+
{{ $props.icon }}
|
|
14
|
+
</FSIcon>
|
|
15
|
+
<FSText
|
|
16
|
+
font="text-overline"
|
|
17
|
+
>
|
|
18
|
+
{{ $props.label }}
|
|
19
|
+
</FSText>
|
|
20
|
+
</FSCol>
|
|
21
|
+
</FSCard>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script lang="ts">
|
|
25
|
+
import { defineComponent } from "vue";
|
|
26
|
+
|
|
27
|
+
import FSCard from "./FSCard.vue";
|
|
28
|
+
import FSCol from "./FSCol.vue";
|
|
29
|
+
import FSIcon from "./FSIcon.vue";
|
|
30
|
+
import FSText from "./FSText.vue";
|
|
31
|
+
|
|
32
|
+
export default defineComponent({
|
|
33
|
+
name: "FSWidgetTemplateCardUI",
|
|
34
|
+
components: {
|
|
35
|
+
FSCard,
|
|
36
|
+
FSCol,
|
|
37
|
+
FSIcon,
|
|
38
|
+
FSText
|
|
39
|
+
},
|
|
40
|
+
props: {
|
|
41
|
+
icon: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: false,
|
|
44
|
+
default: "mdi-chart-bar"
|
|
45
|
+
},
|
|
46
|
+
label: {
|
|
47
|
+
type: String,
|
|
48
|
+
required: true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
</script>
|
package/composables/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ export * from "./useBreakpoints";
|
|
|
5
5
|
export * from "./useColors";
|
|
6
6
|
export * from "./useCountUp";
|
|
7
7
|
export * from "./useDebounce";
|
|
8
|
-
export * from "./useElementVisibility"
|
|
8
|
+
export * from "./useElementVisibility";
|
|
9
9
|
export * from "./useMapLayers";
|
|
10
10
|
export * from "./useRules";
|
|
11
11
|
export * from "./useSlots";
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
import { ref, onMounted } from 'vue';
|
|
1
|
+
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
|
2
|
+
|
|
3
|
+
const PREFERS_REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
|
|
2
4
|
|
|
3
5
|
export function useAccessibilityPreferences() {
|
|
4
6
|
const prefersReducedMotion = ref(false);
|
|
7
|
+
let mediaQuery: MediaQueryList | null = null;
|
|
8
|
+
|
|
9
|
+
const handleChange = (e: MediaQueryListEvent) => {
|
|
10
|
+
prefersReducedMotion.value = e.matches;
|
|
11
|
+
};
|
|
5
12
|
|
|
6
13
|
onMounted(() => {
|
|
7
|
-
prefersReducedMotion.value = window.matchMedia?.(
|
|
14
|
+
prefersReducedMotion.value = window.matchMedia?.(PREFERS_REDUCED_MOTION_QUERY)?.matches || false;
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
mediaQuery = window.matchMedia?.(PREFERS_REDUCED_MOTION_QUERY) || null;
|
|
10
17
|
if (mediaQuery?.addEventListener) {
|
|
11
|
-
mediaQuery.addEventListener('change',
|
|
12
|
-
prefersReducedMotion.value = e.matches;
|
|
13
|
-
});
|
|
18
|
+
mediaQuery.addEventListener('change', handleChange);
|
|
14
19
|
}
|
|
15
20
|
});
|
|
16
|
-
|
|
21
|
+
|
|
22
|
+
onBeforeUnmount(() => {
|
|
23
|
+
if (mediaQuery?.removeEventListener) {
|
|
24
|
+
mediaQuery.removeEventListener('change', handleChange);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
17
28
|
return {
|
|
18
29
|
prefersReducedMotion
|
|
19
30
|
};
|
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.180-fix-
|
|
4
|
+
"version": "1.0.180-fix-sandbox-connectivity",
|
|
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.180-fix-
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.180-fix-
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.180-fix-sandbox-connectivity",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.180-fix-sandbox-connectivity"
|
|
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": "9a678d42907eb96d2e42a36c61c44f8abc0715f0"
|
|
39
39
|
}
|