@dative-gpi/foundation-shared-components 1.0.127 → 1.0.128-fix-mobile

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.
@@ -69,7 +69,7 @@ export default defineComponent({
69
69
  },
70
70
  emits: ["scroll"],
71
71
  setup(props) {
72
- const { windowHeight, windowWidth } = useBreakpoints();
72
+ const { windowHeight, windowWidth, isTouchScreenEnabled } = useBreakpoints();
73
73
  const { debounce } = useDebounce();
74
74
  const { getColors } = useColors();
75
75
 
@@ -84,14 +84,16 @@ export default defineComponent({
84
84
 
85
85
  const elementId = `id${uuidv4()}`;
86
86
 
87
+ const showOutsideScrollbar = computed(() => props.scrollOutside && !isTouchScreenEnabled);
88
+
87
89
  const style = computed((): StyleValue => ({
88
90
  "--fs-fade-out-height" : props.height ? sizeToVar(props.height) : "initial",
89
91
  "--fs-fade-out-max-height" : props.maxHeight ? sizeToVar(props.maxHeight) : "initial",
90
92
  "--fs-fade-out-width" : sizeToVar(props.width),
91
93
  "--fs-fade-out-padding" : sizeToVar(props.padding),
92
- "--fs-fade-out-width-offset" : props.scrollOutside ? '12px' : '0px',
93
- "--fs-fade-out-padding-offset" : props.scrollOutside ? '4px' : '0px',
94
- "--fs-fade-out-margin-right" : props.scrollOutside ? '-12px' : '0px',
94
+ "--fs-fade-out-width-offset" : showOutsideScrollbar.value ? '12px' : '0px',
95
+ "--fs-fade-out-padding-offset" : showOutsideScrollbar.value ? '4px' : '0px',
96
+ "--fs-fade-out-margin-right" : showOutsideScrollbar.value ? '-12px' : '0px',
95
97
  "--fs-fade-out-mask-color" : backgrounds.base,
96
98
  "--fs-fade-out-top-mask-height" : props.disableTopMask ? '0px' : topMaskHeight.value,
97
99
  "--fs-fade-out-bottom-mask-height": props.disableBottomMask ? '0px' : bottomMaskHeight.value,
@@ -1,9 +1,10 @@
1
1
  <template>
2
2
  <template
3
- v-if="noMatch"
3
+ v-if="showError"
4
4
  >
5
5
  <slot
6
- name="error"
6
+ name="error"
7
+ v-bind="{ goBack, width: $props.width, height: $props.height }"
7
8
  >
8
9
  <FSRow
9
10
  padding="16px"
@@ -144,14 +145,18 @@ export default defineComponent({
144
145
  }, 560);
145
146
  });
146
147
 
147
- const noMatch = computed(() => {
148
+ const showError = computed((): boolean => {
148
149
  if (!windowRef.value) {
149
- return;
150
+ return false;
150
151
  }
151
152
 
152
153
  // https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VWindow/VWindow.tsx
153
154
  // https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/composables/group.ts#L161
154
155
  const group = windowRef.value.group;
156
+
157
+ if (!group.items.value.length) {
158
+ return false;
159
+ }
155
160
  return !group.items.value.find((item: any) => item.value === props.modelValue);
156
161
  });
157
162
 
@@ -172,7 +177,7 @@ export default defineComponent({
172
177
  return {
173
178
  ColorEnum,
174
179
  windowRef,
175
- noMatch,
180
+ showError,
176
181
  slots,
177
182
  style,
178
183
  getChildren,
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.127",
4
+ "version": "1.0.128-fix-mobile",
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.127",
14
- "@dative-gpi/foundation-shared-services": "1.0.127"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.128-fix-mobile",
14
+ "@dative-gpi/foundation-shared-services": "1.0.128-fix-mobile"
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": "b0ad78457ad86632d841709d3fc3951a8e44c667"
38
+ "gitHead": "099789bb7c9a4134f9ee0aba08d805b673cbb977"
39
39
  }
@@ -7,8 +7,10 @@
7
7
  color: var(--fs-breadcrumbs-disabled-color) !important;
8
8
  }
9
9
 
10
- &:hover {
11
- text-decoration: underline;
10
+ @include clickscreen {
11
+ &:hover {
12
+ text-decoration: underline;
13
+ }
12
14
  }
13
15
 
14
16
  &:active {
@@ -2,11 +2,6 @@
2
2
  transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
3
3
  color: var(--fs-button-color) !important;
4
4
 
5
- &:not(.fs-button-disabled, :has(.fs-button-load)):hover {
6
- color: var(--fs-button-hover-color) !important;
7
- cursor: pointer !important;
8
- }
9
-
10
5
  &.fs-button-disabled,
11
6
  &:has(.fs-button-load) {
12
7
  cursor: default !important;
@@ -16,4 +11,11 @@
16
11
  color: inherit;
17
12
  text-decoration: none;
18
13
  }
14
+
15
+ @include clickscreen {
16
+ &:not(.fs-button-disabled, :has(.fs-button-load)):hover {
17
+ color: var(--fs-button-hover-color) !important;
18
+ cursor: pointer !important;
19
+ }
20
+ }
19
21
  }
@@ -12,15 +12,17 @@
12
12
  .fs-chip-editable {
13
13
  cursor: pointer !important;
14
14
 
15
- &:hover {
16
- background-color: var(--fs-chip-hover-background-color) !important;
17
- border-color: var(--fs-chip-hover-border-color) !important;
18
- color: var(--fs-chip-hover-color) !important;
19
- }
20
-
21
15
  &:active {
22
16
  background-color: var(--fs-chip-active-background-color) !important;
23
17
  border-color: var(--fs-chip-active-border-color) !important;
24
18
  color: var(--fs-chip-active-color) !important;
25
19
  }
20
+
21
+ @include clickscreen {
22
+ &:hover {
23
+ background-color: var(--fs-chip-hover-background-color) !important;
24
+ border-color: var(--fs-chip-hover-border-color) !important;
25
+ color: var(--fs-chip-hover-color) !important;
26
+ }
27
+ }
26
28
  }
@@ -11,18 +11,7 @@
11
11
  &.fs-clickable-disabled {
12
12
  cursor: default;
13
13
  }
14
-
15
- &:not(.fs-clickable-disabled):hover:not(:has( .fs-stopclick:hover)) {
16
- background-color: var(--fs-clickable-hover-background-color) !important;
17
- border-color: var(--fs-clickable-hover-border-color) !important;
18
- color: var(--fs-clickable-hover-color) !important;
19
-
20
- & .fs-card-clickable {
21
- transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
22
- background-color: var(--fs-clickable-hover-background-color);
23
- }
24
- }
25
-
14
+
26
15
  &:not(.fs-clickable-disabled):active:not(:has( .fs-stopclick:hover)) {
27
16
  background-color: var(--fs-clickable-active-background-color) !important;
28
17
  border-color: var(--fs-clickable-active-border-color) !important;
@@ -33,6 +22,19 @@
33
22
  background-color: var(--fs-clickable-active-background-color);
34
23
  }
35
24
  }
25
+
26
+ @include clickscreen {
27
+ &:not(.fs-clickable-disabled):hover:not(:has( .fs-stopclick:hover)) {
28
+ background-color: var(--fs-clickable-hover-background-color) !important;
29
+ border-color: var(--fs-clickable-hover-border-color) !important;
30
+ color: var(--fs-clickable-hover-color) !important;
31
+
32
+ & .fs-card-clickable {
33
+ transition: background-color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
34
+ background-color: var(--fs-clickable-hover-background-color);
35
+ }
36
+ }
37
+ }
36
38
  }
37
39
 
38
40
  a:has(.fs-clickable) {
@@ -8,16 +8,18 @@
8
8
  padding-right: 32px;
9
9
  }
10
10
 
11
- &:hover::after {
12
- content: "";
13
- background-color: black;
14
- pointer-events: none;
15
- position: absolute;
16
- opacity: 0.04;
17
- height: 100%;
18
- width: 100%;
19
- left: 0;
20
- top: 0;
11
+ @include clickscreen {
12
+ &:hover::after {
13
+ content: "";
14
+ background-color: black;
15
+ pointer-events: none;
16
+ position: absolute;
17
+ opacity: 0.04;
18
+ height: 100%;
19
+ width: 100%;
20
+ left: 0;
21
+ top: 0;
22
+ }
21
23
  }
22
24
  }
23
25
 
@@ -11,8 +11,10 @@
11
11
  }
12
12
  }
13
13
 
14
- .fs-image-card:hover {
15
- > .fs-card {
16
- background-size: 105%;
14
+ @include clickscreen {
15
+ .fs-image-card:hover {
16
+ > .fs-card {
17
+ background-size: 105%;
18
+ }
17
19
  }
18
20
  }
@@ -92,11 +92,13 @@
92
92
  align-items: center;
93
93
  justify-content: center;
94
94
 
95
- &:hover {
96
- filter: brightness(0.92) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
97
-
98
- > * {
99
- transform: scale(1.15);
95
+ @include clickscreen {
96
+ &:hover {
97
+ filter: brightness(0.92) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
98
+
99
+ > * {
100
+ transform: scale(1.15);
101
+ }
100
102
  }
101
103
  }
102
104
  }
@@ -128,8 +130,10 @@
128
130
  opacity: 0.6;
129
131
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
130
132
 
131
- &:hover {
132
- opacity: 1;
133
+ @include clickscreen {
134
+ &:hover {
135
+ opacity: 1;
136
+ }
133
137
  }
134
138
  }
135
139
  }
@@ -4,7 +4,9 @@
4
4
  color: var(--fs-password-field-color) !important;
5
5
  transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
6
6
 
7
- &:hover {
8
- color: var(--fs-password-field-hover-color) !important;
7
+ @include clickscreen {
8
+ &:hover {
9
+ color: var(--fs-password-field-hover-color) !important;
10
+ }
9
11
  }
10
12
  }
@@ -23,9 +23,11 @@
23
23
  @extend .text-button;
24
24
  }
25
25
 
26
- &:hover {
27
- border-bottom: 1px solid var(--fs-tab-hover-border-color) !important;
28
- color: var(--fs-group-hover-color) !important;
26
+ @include clickscreen {
27
+ &:hover {
28
+ border-bottom: 1px solid var(--fs-tab-hover-border-color) !important;
29
+ color: var(--fs-group-hover-color) !important;
30
+ }
29
31
  }
30
32
  }
31
33
 
@@ -34,8 +36,10 @@
34
36
  color: var(--fs-group-hover-color) !important;
35
37
  border-bottom: 0 !important;
36
38
 
37
- &:hover {
38
- border-bottom: 0 !important;
39
+ @include clickscreen {
40
+ &:hover {
41
+ border-bottom: 0 !important;
42
+ }
39
43
  }
40
44
  }
41
45
 
@@ -13,17 +13,19 @@
13
13
  background-color: var(--fs-tag-background-color) !important;
14
14
  color: var(--fs-tag-color) !important;
15
15
 
16
- &:hover {
17
- background-color: var(--fs-tag-hover-background-color) !important;
18
- color: var(--fs-tag-hover-color) !important;
19
- }
16
+ min-width: 20px !important;
17
+ width: 20px !important;
18
+ height: 20px !important;
20
19
 
21
20
  &:active {
22
21
  background-color: var(--fs-tag-active-background-color) !important;
23
22
  color: var(--fs-tag-active-color) !important;
24
23
  }
25
24
 
26
- min-width: 20px !important;
27
- width: 20px !important;
28
- height: 20px !important;
25
+ @include clickscreen {
26
+ &:hover {
27
+ background-color: var(--fs-tag-hover-background-color) !important;
28
+ color: var(--fs-tag-hover-color) !important;
29
+ }
30
+ }
29
31
  }
@@ -137,11 +137,16 @@
137
137
  }
138
138
  }
139
139
 
140
- // Ellipsis on input of all fields
141
140
  input {
141
+ // Ellipsis on all fields
142
142
  text-overflow: ellipsis;
143
143
  }
144
144
 
145
+ input, select, textarea {
146
+ // No zoom on focus for user of a certain version of Chrome, and who ask their mobile to zoom if font-size < 16px
147
+ touch-action: none;
148
+ }
149
+
145
150
  // No up / down buttons in input field of type number
146
151
  input[type=number] {
147
152
  -moz-appearance: textfield;
@@ -187,9 +192,11 @@ $nthOverlay: 25;
187
192
  }
188
193
 
189
194
  // Change color on arrows when hovered
190
- .v-slide-group__prev:hover,
191
- .v-slide-group__next:hover {
192
- color: var(--fs-group-hover-color);
195
+ @include clickscreen {
196
+ .v-slide-group__prev:hover,
197
+ .v-slide-group__next:hover {
198
+ color: var(--fs-group-hover-color);
199
+ }
193
200
  }
194
201
 
195
202
  /***************************************************************************/
@@ -47,9 +47,19 @@
47
47
  @include touchscreen {
48
48
  .fs-hide-x-scrollbar {
49
49
  overflow-x: scroll;
50
+
51
+ &::-webkit-scrollbar {
52
+ display: none;
53
+ }
54
+ scrollbar-width: none;
50
55
  }
51
56
 
52
57
  .fs-hide-y-scrollbar {
53
58
  overflow-y: scroll;
59
+
60
+ &::-webkit-scrollbar {
61
+ display: none;
62
+ }
63
+ scrollbar-width: none;
54
64
  }
55
65
  }
@@ -1,73 +0,0 @@
1
- <template>
2
- <FSChartTileUI
3
- v-if="chart"
4
- :label="chart.label"
5
- :icon="chart.icon"
6
- :type="chart.chartType"
7
- :imageId="chart.imageId"
8
- v-bind="$attrs"
9
- />
10
- </template>
11
-
12
- <script lang="ts">
13
- import { defineComponent, watch, computed } from "vue";
14
- import type { PropType } from "vue";
15
-
16
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
17
- import { chartIcon } from "@dative-gpi/foundation-shared-components/tools";
18
-
19
- import { useChartOrganisation, useChartOrganisationType } from "@dative-gpi/foundation-core-services/composables";
20
-
21
- import { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
22
- import FSChartTileUI from "./FSChartTileUI.vue";
23
-
24
- export default defineComponent({
25
- name: "FSChartTile",
26
- components: {
27
- FSChartTileUI
28
- },
29
- props: {
30
- chartId: {
31
- type: String,
32
- required: true
33
- },
34
- scope: {
35
- type: Object as PropType<ApplicationScope | number>,
36
- required : true
37
- }
38
- },
39
- setup(props) {
40
-
41
- const {get : fetchChartOrganisation, entity : chartOrganisation } = useChartOrganisation();
42
- const {get : fetchChartOrganisationType, entity : chartOrganisationType } = useChartOrganisationType();
43
-
44
- const chart = computed(() =>{
45
- if(props.scope == ApplicationScope.Organisation){
46
- return chartOrganisation.value;
47
- }
48
- else if(props.scope == ApplicationScope.OrganisationType){
49
- return chartOrganisationType.value;
50
- }
51
- else{
52
- return null
53
- }
54
- })
55
-
56
- watch(() => [props.chartId, props.scope], () =>{
57
- if(props.scope == ApplicationScope.Organisation){
58
- fetchChartOrganisation(props.chartId);
59
- }
60
- else if(props.scope == ApplicationScope.OrganisationType)
61
- {
62
- fetchChartOrganisationType(props.chartId)
63
- }
64
- }, {immediate : true})
65
-
66
- return {
67
- ColorEnum,
68
- chart,
69
- chartIcon
70
- };
71
- }
72
- });
73
- </script>