@dative-gpi/foundation-shared-components 1.0.100 → 1.0.102
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/FSDialog.vue +3 -1
- package/components/fields/FSCommentField.vue +3 -2
- package/components/fields/FSDateTimeField.vue +1 -1
- package/components/fields/FSDateTimeRangeField.vue +3 -3
- package/components/fields/FSRichTextField.vue +4 -2
- package/components/lists/FSDataTableUI.vue +1 -1
- package/components/lists/FSSimpleListItem.vue +2 -1
- package/composables/useBreakpoints.ts +1 -1
- package/package.json +4 -4
- package/styles/components/fs_dialog.scss +11 -9
package/components/FSDialog.vue
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:class="classes"
|
|
5
5
|
:modelValue="$props.modelValue"
|
|
6
6
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
@click="$emit('update:modelValue', false)"
|
|
7
8
|
v-bind="$attrs"
|
|
8
9
|
>
|
|
9
10
|
<slot>
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
:width="$props.width"
|
|
14
15
|
:modelValue="$props.modelValue"
|
|
15
16
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
17
|
+
@click.stop="$emit('click', $event)"
|
|
16
18
|
>
|
|
17
19
|
<template
|
|
18
20
|
v-for="(_, name) in $slots"
|
|
@@ -67,7 +69,7 @@ export default defineComponent({
|
|
|
67
69
|
default: false
|
|
68
70
|
}
|
|
69
71
|
},
|
|
70
|
-
emits: ["update:modelValue"],
|
|
72
|
+
emits: ["click", "update:modelValue"],
|
|
71
73
|
setup() {
|
|
72
74
|
const { isExtraSmall } = useBreakpoints();
|
|
73
75
|
|
|
@@ -301,7 +301,7 @@ export default defineComponent({
|
|
|
301
301
|
if (props.modelValue) {
|
|
302
302
|
// FSClock just gives two numbers without consideration for the time zone
|
|
303
303
|
// We must adjust the time to the user's time zone
|
|
304
|
-
innerTime.value = Math.floor((props.modelValue + getUserOffset()) % (24 * 60 * 60 * 1000));
|
|
304
|
+
innerTime.value = Math.floor((props.modelValue + getUserOffset(props.modelValue)) % (24 * 60 * 60 * 1000));
|
|
305
305
|
innerDate.value = props.modelValue - innerTime.value;
|
|
306
306
|
}
|
|
307
307
|
else {
|
|
@@ -208,13 +208,13 @@ export default defineComponent({
|
|
|
208
208
|
break;
|
|
209
209
|
}
|
|
210
210
|
case 1: {
|
|
211
|
-
innerTimeLeft.value = Math.floor((props.modelValue[0] + getUserOffset()) % (24 * 60 * 60 * 1000));
|
|
211
|
+
innerTimeLeft.value = Math.floor((props.modelValue[0] + getUserOffset(props.modelValue[0])) % (24 * 60 * 60 * 1000));
|
|
212
212
|
innerDateRange.value = [props.modelValue[0] - innerTimeLeft.value];
|
|
213
213
|
break;
|
|
214
214
|
}
|
|
215
215
|
default: {
|
|
216
|
-
innerTimeLeft.value = Math.floor((props.modelValue[0] + getUserOffset()) % (24 * 60 * 60 * 1000));
|
|
217
|
-
innerTimeRight.value = Math.floor((props.modelValue[1] + getUserOffset()) % (24 * 60 * 60 * 1000));
|
|
216
|
+
innerTimeLeft.value = Math.floor((props.modelValue[0] + getUserOffset(props.modelValue[0])) % (24 * 60 * 60 * 1000));
|
|
217
|
+
innerTimeRight.value = Math.floor((props.modelValue[1] + getUserOffset(props.modelValue[0])) % (24 * 60 * 60 * 1000));
|
|
218
218
|
innerDateRange.value = [props.modelValue[0] - innerTimeLeft.value, props.modelValue[1] - innerTimeRight.value];
|
|
219
219
|
break;
|
|
220
220
|
}
|
|
@@ -674,8 +674,10 @@ export default defineComponent({
|
|
|
674
674
|
}
|
|
675
675
|
if (props.modelValue != null) {
|
|
676
676
|
editor.update(() => {
|
|
677
|
-
if(typeof props.modelValue === "string") {
|
|
678
|
-
|
|
677
|
+
if (typeof props.modelValue === "string") {
|
|
678
|
+
if (props.modelValue !== "") {
|
|
679
|
+
editor.setEditorState(editor.parseEditorState(props.modelValue!));
|
|
680
|
+
}
|
|
679
681
|
}
|
|
680
682
|
else {
|
|
681
683
|
editor.setEditorState(editor.parseEditorState(JSON.stringify(props.modelValue)));
|
|
@@ -1245,7 +1245,7 @@ export default defineComponent({
|
|
|
1245
1245
|
value = header.fixedFilters.map((ff): FSDataTableFilter => ({
|
|
1246
1246
|
hidden: currentFilters?.find((cf) => cf.value == (ff.value || null))?.hidden ?? false,
|
|
1247
1247
|
text: ff.text?.toString() ?? "—",
|
|
1248
|
-
value: ff.value
|
|
1248
|
+
value: ff.value ?? null,
|
|
1249
1249
|
filter: header.methodFilter ?? ((_, property, item) => {
|
|
1250
1250
|
if (header.methodFilterRaw) {
|
|
1251
1251
|
return header.methodFilterRaw(ff.value, item);
|
|
@@ -5,7 +5,7 @@ let initialized = false;
|
|
|
5
5
|
const windowHeight = ref(window.innerHeight);
|
|
6
6
|
const windowWidth = ref(window.innerWidth);
|
|
7
7
|
|
|
8
|
-
const windowOuterWidth = ref(window.outerWidth);
|
|
8
|
+
const windowOuterWidth = ref(!window.document.hasFocus() && window.outerWidth === 0 ? window.innerWidth : window.outerWidth);
|
|
9
9
|
|
|
10
10
|
export const useBreakpoints = () => {
|
|
11
11
|
const onSizeChange = (): void => {
|
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.102",
|
|
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.102",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.102"
|
|
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": "fd73b73f8107a44b608c04b092a41a70af78f8fa"
|
|
39
39
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
.fs-dialog-mobile > .v-overlay__content {
|
|
2
|
-
|
|
3
|
-
max-width: 100% !important;
|
|
4
|
-
width: 100% !important;
|
|
5
|
-
margin: 0 !important;
|
|
6
|
-
align-self: flex-end;
|
|
2
|
+
flex-direction: column-reverse !important;
|
|
7
3
|
}
|
|
8
4
|
|
|
9
5
|
.fs-dialog > .v-overlay__content {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
justify-content: center !important;
|
|
7
|
+
align-items: center !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.v-dialog > .v-overlay__content {
|
|
11
|
+
max-height: 100vh !important;
|
|
12
|
+
max-width: 100vw !important;
|
|
13
|
+
height: 100% !important;
|
|
14
|
+
width: 100% !important;
|
|
15
|
+
margin: 0 !important;
|
|
14
16
|
}
|