@dative-gpi/foundation-shared-components 0.0.91 → 0.0.92

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.
@@ -10,7 +10,7 @@
10
10
  </template>
11
11
 
12
12
  <script lang="ts">
13
- import { computed, defineComponent, onMounted, PropType, ref, watch } from "vue";
13
+ import { computed, defineComponent, onMounted, onUnmounted, PropType, ref, watch } from "vue";
14
14
 
15
15
  import { useBreakpoints, useColors, useDebounce } from "@dative-gpi/foundation-shared-components/composables";
16
16
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
@@ -52,6 +52,8 @@ export default defineComponent({
52
52
  const topMaskHeight = ref("0px");
53
53
  const lastScroll = ref(0);
54
54
 
55
+ const resizeObserver = ref<ResizeObserver | null>(null);
56
+
55
57
  const style = computed((): { [key: string] : string | undefined } => {
56
58
  return {
57
59
  "--fs-fade-out-height" : sizeToVar(props.height),
@@ -99,6 +101,21 @@ export default defineComponent({
99
101
 
100
102
  onMounted((): void => {
101
103
  debounceMasks();
104
+
105
+ resizeObserver.value = new ResizeObserver(entries => {
106
+ entries.forEach(() => {
107
+ debounceMasks();
108
+ });
109
+ });
110
+ if (document.querySelector(".fs-fade-out")) {
111
+ resizeObserver.value.observe(document.querySelector(".fs-fade-out")!);
112
+ }
113
+ });
114
+
115
+ onUnmounted((): void => {
116
+ if (resizeObserver.value) {
117
+ resizeObserver.value.disconnect();
118
+ }
102
119
  });
103
120
 
104
121
  watch([() => windowWidth.value, () => windowHeight.value], debounceMasks);
@@ -1212,13 +1212,16 @@ export default defineComponent({
1212
1212
  };
1213
1213
 
1214
1214
  const toggleSort = (header: FSDataTableColumn) => {
1215
- if (header.value == null) {return}
1216
-
1215
+ if (header.value == null) {
1216
+ return;
1217
+ }
1217
1218
  if (innerSortBy.value?.key !== header.value) {
1218
1219
  innerSortBy.value = { key: header.value, order: 'asc' };
1219
- } else if (innerSortBy.value.order === 'asc') {
1220
+ }
1221
+ else if (innerSortBy.value.order === 'asc') {
1220
1222
  innerSortBy.value.order = 'desc' ;
1221
- } else {
1223
+ }
1224
+ else {
1222
1225
  innerSortBy.value = null;
1223
1226
  }
1224
1227
  }
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.91",
4
+ "version": "0.0.92",
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.91",
14
- "@dative-gpi/foundation-shared-services": "0.0.91",
13
+ "@dative-gpi/foundation-shared-domain": "0.0.92",
14
+ "@dative-gpi/foundation-shared-services": "0.0.92",
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": "5470b07f299ab5d02f4240807304335501bdaf07"
35
+ "gitHead": "9c937d9f684b22f0230cd801b4f6bbe7adac8176"
36
36
  }