@dative-gpi/foundation-shared-components 1.0.89 → 1.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.
- package/components/FSCardPlaceholder.vue +0 -1
- package/components/FSClickable.vue +1 -0
- package/components/FSDialogFormBody.vue +12 -0
- package/components/FSDialogMultiFormBody.vue +12 -0
- package/components/FSDialogSubmit.vue +12 -0
- package/components/FSWindow.vue +12 -12
- package/components/fields/FSCommentField.vue +25 -14
- package/components/lists/FSDataTableUI.vue +12 -7
- package/components/lists/FSSimpleList.vue +1 -1
- package/components/lists/FSSimpleListItem.vue +1 -1
- package/package.json +4 -4
- package/styles/components/fs_slide_group.scss +3 -3
- package/styles/components/fs_window.scss +1 -1
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
:wrap="false"
|
|
29
29
|
>
|
|
30
30
|
<FSButton
|
|
31
|
+
v-if="$props.showCancelButton"
|
|
31
32
|
:prependIcon="$props.cancelButtonPrependIcon"
|
|
32
33
|
:appendIcon="$props.cancelButtonAppendIcon"
|
|
33
34
|
:variant="$props.cancelButtonVariant"
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
@click="() => $emit('click:cancelButton', false)"
|
|
37
38
|
/>
|
|
38
39
|
<FSButton
|
|
40
|
+
v-if="$props.showSubmitButton"
|
|
39
41
|
type="submit"
|
|
40
42
|
:prependIcon="$props.submitButtonPrependIcon"
|
|
41
43
|
:appendIcon="$props.submitButtonAppendIcon"
|
|
@@ -122,6 +124,11 @@ export default defineComponent({
|
|
|
122
124
|
required: false,
|
|
123
125
|
default: null
|
|
124
126
|
},
|
|
127
|
+
showCancelButton: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
required: false,
|
|
130
|
+
default: true
|
|
131
|
+
},
|
|
125
132
|
cancelButtonPrependIcon: {
|
|
126
133
|
type: String as PropType<string | null>,
|
|
127
134
|
required: false,
|
|
@@ -147,6 +154,11 @@ export default defineComponent({
|
|
|
147
154
|
required: false,
|
|
148
155
|
default: ColorEnum.Light
|
|
149
156
|
},
|
|
157
|
+
showSubmitButton: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
required: false,
|
|
160
|
+
default: true
|
|
161
|
+
},
|
|
150
162
|
submitButtonPrependIcon: {
|
|
151
163
|
type: String as PropType<string | null>,
|
|
152
164
|
required: false,
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
:wrap="false"
|
|
39
39
|
>
|
|
40
40
|
<FSButton
|
|
41
|
+
v-if="$props.showCancelButton || currentStep > 1"
|
|
41
42
|
:prependIcon="$props.cancelButtonPrependIcon"
|
|
42
43
|
:appendIcon="$props.cancelButtonAppendIcon"
|
|
43
44
|
:variant="$props.cancelButtonVariant"
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
@click="onPrevious()"
|
|
47
48
|
/>
|
|
48
49
|
<FSButton
|
|
50
|
+
v-if="$props.showSubmitButton || currentStep < $props.steps"
|
|
49
51
|
type="submit"
|
|
50
52
|
:prependIcon="$props.submitButtonPrependIcon"
|
|
51
53
|
:appendIcon="$props.submitButtonAppendIcon"
|
|
@@ -107,6 +109,11 @@ export default defineComponent({
|
|
|
107
109
|
type: Number,
|
|
108
110
|
required: true
|
|
109
111
|
},
|
|
112
|
+
showCancelButton: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
required: false,
|
|
115
|
+
default: true
|
|
116
|
+
},
|
|
110
117
|
cancelButtonPrependIcon: {
|
|
111
118
|
type: String as PropType<string | null>,
|
|
112
119
|
required: false,
|
|
@@ -132,6 +139,11 @@ export default defineComponent({
|
|
|
132
139
|
required: false,
|
|
133
140
|
default: ColorEnum.Light
|
|
134
141
|
},
|
|
142
|
+
showSubmitButton: {
|
|
143
|
+
type: Boolean,
|
|
144
|
+
required: false,
|
|
145
|
+
default: true
|
|
146
|
+
},
|
|
135
147
|
submitButtonPrependIcon: {
|
|
136
148
|
type: String as PropType<string | null>,
|
|
137
149
|
required: false,
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
:wrap="false"
|
|
34
34
|
>
|
|
35
35
|
<FSButton
|
|
36
|
+
v-if="$props.showCancelButton"
|
|
36
37
|
:prependIcon="$props.cancelButtonPrependIcon"
|
|
37
38
|
:appendIcon="$props.cancelButtonAppendIcon"
|
|
38
39
|
:variant="$props.cancelButtonVariant"
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
@click="$emit('update:modelValue', false)"
|
|
42
43
|
/>
|
|
43
44
|
<FSButton
|
|
45
|
+
v-if="$props.showSubmitButton"
|
|
44
46
|
:prependIcon="$props.submitButtonPrependIcon"
|
|
45
47
|
:appendIcon="$props.submitButtonAppendIcon"
|
|
46
48
|
:variant="$props.submitButtonVariant"
|
|
@@ -98,6 +100,11 @@ export default defineComponent({
|
|
|
98
100
|
required: false,
|
|
99
101
|
default: false
|
|
100
102
|
},
|
|
103
|
+
showCancelButton: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
required: false,
|
|
106
|
+
default: true
|
|
107
|
+
},
|
|
101
108
|
cancelButtonPrependIcon: {
|
|
102
109
|
type: String as PropType<string | null>,
|
|
103
110
|
required: false,
|
|
@@ -123,6 +130,11 @@ export default defineComponent({
|
|
|
123
130
|
required: false,
|
|
124
131
|
default: ColorEnum.Light
|
|
125
132
|
},
|
|
133
|
+
showSubmitButton: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
required: false,
|
|
136
|
+
default: true
|
|
137
|
+
},
|
|
126
138
|
submitButtonPrependIcon: {
|
|
127
139
|
type: String as PropType<string | null>,
|
|
128
140
|
required: false,
|
package/components/FSWindow.vue
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-window
|
|
3
|
-
ref="windowRoot"
|
|
4
3
|
class="fs-window"
|
|
5
4
|
:touch="false"
|
|
6
5
|
:style="style"
|
|
@@ -60,12 +59,14 @@ export default defineComponent({
|
|
|
60
59
|
const { slots, getChildren } = useSlots();
|
|
61
60
|
|
|
62
61
|
delete slots.default;
|
|
63
|
-
|
|
64
|
-
const
|
|
62
|
+
|
|
63
|
+
const showOverflow = ref(true);
|
|
64
|
+
const overflowTimeout = ref<NodeJS.Timeout | null>(null);
|
|
65
65
|
|
|
66
66
|
const style = computed((): StyleValue => ({
|
|
67
|
-
"--fs-window-
|
|
68
|
-
"--fs-window-height" : sizeToVar(props.height)
|
|
67
|
+
"--fs-window-overflow": showOverflow.value ? "visible" : "hidden",
|
|
68
|
+
"--fs-window-height" : sizeToVar(props.height),
|
|
69
|
+
"--fs-window-width" : sizeToVar(props.width)
|
|
69
70
|
}));
|
|
70
71
|
|
|
71
72
|
const value = (component: VNode, index: number): any => {
|
|
@@ -74,17 +75,16 @@ export default defineComponent({
|
|
|
74
75
|
|
|
75
76
|
// Hide horizontal overflow when switching windows, otherwise let it visible for the FSFadeOut scrollbar
|
|
76
77
|
watch(() => props.modelValue, (): void => {
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
showOverflow.value = false;
|
|
79
|
+
if (overflowTimeout.value) {
|
|
80
|
+
clearTimeout(overflowTimeout.value);
|
|
79
81
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}, 1120);
|
|
82
|
+
overflowTimeout.value = setTimeout(() => {
|
|
83
|
+
showOverflow.value = true;
|
|
84
|
+
}, 560);
|
|
84
85
|
});
|
|
85
86
|
|
|
86
87
|
return {
|
|
87
|
-
windowRoot,
|
|
88
88
|
slots,
|
|
89
89
|
style,
|
|
90
90
|
getChildren,
|
|
@@ -17,18 +17,21 @@
|
|
|
17
17
|
/>
|
|
18
18
|
</FSRow>
|
|
19
19
|
<FSRow>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
<FSRow
|
|
21
|
+
align="center-right"
|
|
22
|
+
>
|
|
23
|
+
<FSButtonCancel
|
|
24
|
+
v-if="showCancelButton"
|
|
25
|
+
@click="$emit('cancel')"
|
|
26
|
+
/>
|
|
27
|
+
<FSButton
|
|
28
|
+
prependIcon="mdi-send-outline"
|
|
29
|
+
:color="ColorEnum.Primary"
|
|
30
|
+
:loading="creating"
|
|
31
|
+
:label="buttonLabel ?? $tr('ui.common.publish','Publish')"
|
|
32
|
+
@click="onSubmit"
|
|
33
|
+
/>
|
|
34
|
+
</FSRow>
|
|
32
35
|
</FSRow>
|
|
33
36
|
</FSCol>
|
|
34
37
|
</template>
|
|
@@ -80,13 +83,21 @@ export default defineComponent({
|
|
|
80
83
|
},
|
|
81
84
|
},
|
|
82
85
|
emits: ["submit","cancel"],
|
|
83
|
-
setup(props) {
|
|
86
|
+
setup(props, { emit }) {
|
|
84
87
|
|
|
85
88
|
const innertext = ref<string | undefined>(props.text);
|
|
89
|
+
|
|
90
|
+
const onSubmit = () => {
|
|
91
|
+
if (innertext.value) {
|
|
92
|
+
emit('submit', innertext.value);
|
|
93
|
+
innertext.value = '';
|
|
94
|
+
}
|
|
95
|
+
};
|
|
86
96
|
|
|
87
97
|
return {
|
|
88
98
|
innertext,
|
|
89
|
-
ColorEnum
|
|
99
|
+
ColorEnum,
|
|
100
|
+
onSubmit,
|
|
90
101
|
};
|
|
91
102
|
},
|
|
92
103
|
})
|
|
@@ -1039,17 +1039,21 @@ export default defineComponent({
|
|
|
1039
1039
|
});
|
|
1040
1040
|
|
|
1041
1041
|
const innerItems = computed((): any[] => {
|
|
1042
|
-
const activeFilters: { key: string
|
|
1043
|
-
|
|
1044
|
-
|
|
1042
|
+
const activeFilters: { [key: string]: FSDataTableFilter[] } = {};
|
|
1043
|
+
for (const property in filters.value) {
|
|
1044
|
+
activeFilters[property] = filters.value[property].filter((filter) => !filter.hidden);
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1045
1047
|
if (props.items && props.items.length) {
|
|
1046
1048
|
const innerSearchFormatted = innerSearch.value ? innerSearch.value.toLowerCase() : null;
|
|
1047
1049
|
return props.items.filter((item) => {
|
|
1048
1050
|
if (props.selectedOnly && !props.modelValue.includes(item[props.itemValue])) {
|
|
1049
1051
|
return false;
|
|
1050
1052
|
}
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
+
for (const property in activeFilters) {
|
|
1054
|
+
if (!activeFilters[property].some((filter) => filter.filter && filter.filter(filter.value, item[property], item))) {
|
|
1055
|
+
return false;
|
|
1056
|
+
}
|
|
1053
1057
|
}
|
|
1054
1058
|
if (innerSearchFormatted) {
|
|
1055
1059
|
return containsSearchTerm(item, innerSearchFormatted);
|
|
@@ -1245,7 +1249,7 @@ export default defineComponent({
|
|
|
1245
1249
|
return header.methodFilterRaw(ff.value, item);
|
|
1246
1250
|
}
|
|
1247
1251
|
const flat = property = [property].flat();
|
|
1248
|
-
return Array.isArray(flat) ? flat.
|
|
1252
|
+
return Array.isArray(flat) ? flat.some(f => f == ff.value) : ff.value == flat;
|
|
1249
1253
|
})
|
|
1250
1254
|
}));
|
|
1251
1255
|
filterDictionary[key] = value;
|
|
@@ -1268,7 +1272,7 @@ export default defineComponent({
|
|
|
1268
1272
|
return header.methodFilterRaw(dv, item);
|
|
1269
1273
|
}
|
|
1270
1274
|
const flat = [property].flat().map(mapToInnerValue);
|
|
1271
|
-
return Array.isArray(flat) ? flat.
|
|
1275
|
+
return Array.isArray(flat) ? flat.some(f => f == dv) : dv == flat;
|
|
1272
1276
|
})
|
|
1273
1277
|
}
|
|
1274
1278
|
});
|
|
@@ -1544,6 +1548,7 @@ export default defineComponent({
|
|
|
1544
1548
|
|
|
1545
1549
|
watch(() => props.items, async () => {
|
|
1546
1550
|
computeFilters();
|
|
1551
|
+
observeIntersection();
|
|
1547
1552
|
if (innerPage.value !== 1) {
|
|
1548
1553
|
const formerPage = innerPage.value;
|
|
1549
1554
|
innerPage.value = 1;
|
|
@@ -79,7 +79,7 @@ export default defineComponent({
|
|
|
79
79
|
},
|
|
80
80
|
props: {
|
|
81
81
|
items: {
|
|
82
|
-
type: Array as PropType<{id: string, label?: string, icon?: string, imageId?: string, [index: string]: any}[]>,
|
|
82
|
+
type: Array as PropType<{id: string, label?: string, icon?: string, imageId?: string | null, [index: string]: any}[]>,
|
|
83
83
|
required: true
|
|
84
84
|
},
|
|
85
85
|
tileProps: {
|
|
@@ -103,7 +103,7 @@ export default defineComponent({
|
|
|
103
103
|
},
|
|
104
104
|
props: {
|
|
105
105
|
filteredItems: {
|
|
106
|
-
type: Array as PropType<{id: string, label?: string, icon?: string, imageId?: string, [index: string]: any}[]>,
|
|
106
|
+
type: Array as PropType<{id: string, label?: string, icon?: string, imageId?: string | null, [index: string]: any}[]>,
|
|
107
107
|
required: true
|
|
108
108
|
},
|
|
109
109
|
tileProps: {
|
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.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": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.92",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.92"
|
|
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": "5b512a8eaedd84fb5f24896d01891a9a6c838ec5"
|
|
39
39
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
height: var(--fs-group-height);
|
|
3
3
|
width: var(--fs-group-width);
|
|
4
4
|
max-width: 100%;
|
|
5
|
-
margin: -1px;
|
|
6
|
-
padding: 1px;
|
|
5
|
+
margin: 0 -1px 0 0;
|
|
7
6
|
|
|
8
7
|
& > .v-slide-group__container > .v-slide-group__content {
|
|
9
|
-
|
|
8
|
+
margin: 0 1px 0 0;
|
|
9
|
+
|
|
10
10
|
padding: var(--fs-group-padding);
|
|
11
11
|
gap: var(--fs-group-gap);
|
|
12
12
|
}
|