@dative-gpi/foundation-shared-components 1.0.55 → 1.0.57
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/FSDialogMultiFormBody.vue +61 -48
- package/components/FSImage.vue +3 -2
- package/components/agenda/FSAgenda.vue +30 -36
- package/components/fields/FSRichTextField.vue +29 -1
- package/components/lists/FSSimpleList.vue +1 -20
- package/package.json +4 -4
- package/styles/components/fs_rich_text_field.scss +2 -1
- package/styles/components/fs_tabs.scss +1 -0
|
@@ -1,60 +1,69 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
:modelValue="currentStep - 1"
|
|
2
|
+
<FSCol
|
|
3
|
+
gap="24px"
|
|
5
4
|
>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
<FSPagination
|
|
6
|
+
width="calc(100% - 16px)"
|
|
7
|
+
:pages="$props.steps"
|
|
8
|
+
:modelValue="currentStep - 1"
|
|
9
|
+
/>
|
|
10
|
+
<FSWindow
|
|
11
|
+
width="100%"
|
|
12
|
+
:modelValue="currentStep - 1"
|
|
12
13
|
>
|
|
13
|
-
<
|
|
14
|
-
|
|
14
|
+
<FSForm
|
|
15
|
+
v-for="(step, index) in $props.steps"
|
|
16
|
+
:variant="$props.variant"
|
|
17
|
+
:key="index"
|
|
18
|
+
@submit="onSubmit"
|
|
19
|
+
v-model="valid"
|
|
15
20
|
>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
:maxHeight="maxHeight"
|
|
21
|
+
<FSCol
|
|
22
|
+
gap="24px"
|
|
19
23
|
>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</FSFadeOut>
|
|
24
|
-
<FSRow
|
|
25
|
-
padding="0 16px 0 0"
|
|
26
|
-
>
|
|
27
|
-
<slot
|
|
28
|
-
name="left-footer"
|
|
29
|
-
/>
|
|
30
|
-
<FSRow
|
|
31
|
-
class="fs-dialog-actions"
|
|
32
|
-
align="top-right"
|
|
33
|
-
:wrap="false"
|
|
24
|
+
<FSFadeOut
|
|
25
|
+
padding="0 8px 0 0"
|
|
26
|
+
:maxHeight="maxHeight"
|
|
34
27
|
>
|
|
35
|
-
<
|
|
36
|
-
:
|
|
37
|
-
:appendIcon="$props.cancelButtonAppendIcon"
|
|
38
|
-
:variant="$props.cancelButtonVariant"
|
|
39
|
-
:color="$props.cancelButtonColor"
|
|
40
|
-
:label="previousButtonLabel"
|
|
41
|
-
@click="onPrevious()"
|
|
28
|
+
<slot
|
|
29
|
+
:name="`step-${step}`"
|
|
42
30
|
/>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
:editable="$props.editable"
|
|
50
|
-
:label="nextButtonLabel"
|
|
51
|
-
:load="$props.load"
|
|
31
|
+
</FSFadeOut>
|
|
32
|
+
<FSRow
|
|
33
|
+
padding="0 16px 0 0"
|
|
34
|
+
>
|
|
35
|
+
<slot
|
|
36
|
+
name="left-footer"
|
|
52
37
|
/>
|
|
38
|
+
<FSRow
|
|
39
|
+
class="fs-dialog-actions"
|
|
40
|
+
align="top-right"
|
|
41
|
+
:wrap="false"
|
|
42
|
+
>
|
|
43
|
+
<FSButton
|
|
44
|
+
:prependIcon="$props.cancelButtonPrependIcon"
|
|
45
|
+
:appendIcon="$props.cancelButtonAppendIcon"
|
|
46
|
+
:variant="$props.cancelButtonVariant"
|
|
47
|
+
:color="$props.cancelButtonColor"
|
|
48
|
+
:label="previousButtonLabel"
|
|
49
|
+
@click="onPrevious()"
|
|
50
|
+
/>
|
|
51
|
+
<FSButton
|
|
52
|
+
type="submit"
|
|
53
|
+
:prependIcon="$props.submitButtonPrependIcon"
|
|
54
|
+
:appendIcon="$props.submitButtonAppendIcon"
|
|
55
|
+
:color="$props.submitButtonColor"
|
|
56
|
+
:variant="nextButtonVariant"
|
|
57
|
+
:editable="$props.editable"
|
|
58
|
+
:label="nextButtonLabel"
|
|
59
|
+
:load="$props.load"
|
|
60
|
+
/>
|
|
61
|
+
</FSRow>
|
|
53
62
|
</FSRow>
|
|
54
|
-
</
|
|
55
|
-
</
|
|
56
|
-
</
|
|
57
|
-
</
|
|
63
|
+
</FSCol>
|
|
64
|
+
</FSForm>
|
|
65
|
+
</FSWindow>
|
|
66
|
+
</FSCol>
|
|
58
67
|
</template>
|
|
59
68
|
|
|
60
69
|
<script lang="ts">
|
|
@@ -64,17 +73,21 @@ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui
|
|
|
64
73
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
65
74
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
66
75
|
|
|
76
|
+
import FSPagination from "./FSPagination.vue";
|
|
67
77
|
import FSFadeOut from "./FSFadeOut.vue";
|
|
68
78
|
import FSButton from "./FSButton.vue";
|
|
69
79
|
import FSForm from "./FSForm.vue";
|
|
80
|
+
import FSCol from "./FSCol.vue";
|
|
70
81
|
import FSRow from "./FSRow.vue";
|
|
71
82
|
|
|
72
83
|
export default defineComponent({
|
|
73
84
|
name: "FSDialogMultiFormBody",
|
|
74
85
|
components: {
|
|
86
|
+
FSPagination,
|
|
75
87
|
FSFadeOut,
|
|
76
88
|
FSButton,
|
|
77
89
|
FSForm,
|
|
90
|
+
FSCol,
|
|
78
91
|
FSRow
|
|
79
92
|
},
|
|
80
93
|
props: {
|
package/components/FSImage.vue
CHANGED
|
@@ -12,7 +12,7 @@ import { computed, defineComponent, type PropType } from "vue";
|
|
|
12
12
|
|
|
13
13
|
import { IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
|
|
14
14
|
|
|
15
|
-
import { useImage } from "@dative-gpi/foundation-shared-services/composables";
|
|
15
|
+
import { useAppAuthToken, useImage } from "@dative-gpi/foundation-shared-services/composables";
|
|
16
16
|
|
|
17
17
|
import FSImageUI from "./FSImageUI.vue";
|
|
18
18
|
|
|
@@ -30,9 +30,10 @@ export default defineComponent({
|
|
|
30
30
|
},
|
|
31
31
|
setup(props) {
|
|
32
32
|
const { get: getImage, entity: image } = useImage();
|
|
33
|
+
const { authToken } = useAppAuthToken();
|
|
33
34
|
|
|
34
35
|
const source = computed(() => {
|
|
35
|
-
return props.imageId ? IMAGE_RAW_URL(props.imageId) : null;
|
|
36
|
+
return props.imageId ? IMAGE_RAW_URL(props.imageId, authToken.value) : null;
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
const onError = (): void => {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol
|
|
3
|
+
v-if="$props.start && $props.end"
|
|
3
4
|
:height="$props.height"
|
|
4
5
|
:width="$props.width"
|
|
5
6
|
gap="24px"
|
|
6
7
|
>
|
|
7
8
|
<FSAgendaHeader
|
|
8
9
|
:mode="$props.mode!"
|
|
9
|
-
:start="start"
|
|
10
|
-
:end="end"
|
|
10
|
+
:start="$props.start"
|
|
11
|
+
:end="$props.end"
|
|
11
12
|
:now="now"
|
|
12
13
|
@update:start="($event) => $emit('update:start', $event)"
|
|
13
14
|
@update:end="($event) => $emit('update:end', $event)"
|
|
@@ -28,8 +29,8 @@
|
|
|
28
29
|
:value="AgendaMode.Day"
|
|
29
30
|
:events="$props.events"
|
|
30
31
|
:firstColumnWidth="dayColumnWidth"
|
|
31
|
-
:start="start"
|
|
32
|
-
:end="end"
|
|
32
|
+
:start="$props.start"
|
|
33
|
+
:end="$props.end"
|
|
33
34
|
:now="now"
|
|
34
35
|
:nowIsInSelectedRange="nowIsInSelectedRange"
|
|
35
36
|
:loading="$props.loading"
|
|
@@ -44,8 +45,8 @@
|
|
|
44
45
|
:value="AgendaMode.Week"
|
|
45
46
|
:events="$props.events"
|
|
46
47
|
:firstColumnWidth="dayColumnWidth"
|
|
47
|
-
:start="start"
|
|
48
|
-
:end="end"
|
|
48
|
+
:start="$props.start"
|
|
49
|
+
:end="$props.end"
|
|
49
50
|
:now="now"
|
|
50
51
|
:nowIsInSelectedRange="nowIsInSelectedRange"
|
|
51
52
|
:loading="$props.loading"
|
|
@@ -60,8 +61,8 @@
|
|
|
60
61
|
:value="AgendaMode.Month"
|
|
61
62
|
:events="$props.events"
|
|
62
63
|
:firstColumnWidth="dayColumnWidth"
|
|
63
|
-
:start="start"
|
|
64
|
-
:end="end"
|
|
64
|
+
:start="$props.start"
|
|
65
|
+
:end="$props.end"
|
|
65
66
|
:now="now"
|
|
66
67
|
:nowIsInSelectedRange="nowIsInSelectedRange"
|
|
67
68
|
:loading="$props.loading"
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
</template>
|
|
79
80
|
|
|
80
81
|
<script lang="ts">
|
|
81
|
-
import { defineComponent, type PropType, computed, ref, onUnmounted, watch } from 'vue';
|
|
82
|
+
import { defineComponent, type PropType, computed, ref, onUnmounted, watch, onMounted } from 'vue';
|
|
82
83
|
|
|
83
84
|
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
84
85
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -150,41 +151,36 @@ export default defineComponent({
|
|
|
150
151
|
const now = ref(todayToEpoch());
|
|
151
152
|
const defaultMode = ref(props.mode);
|
|
152
153
|
|
|
153
|
-
const
|
|
154
|
-
if (props.start) {
|
|
155
|
-
return
|
|
156
|
-
}
|
|
157
|
-
if (props.mode === AgendaMode.Week) {
|
|
158
|
-
return epochToLocalDayStart(now.value - (new Date(now.value).getDay() - 1) * 24 * 60 * 60 * 1000);
|
|
159
|
-
}
|
|
160
|
-
if (props.mode === AgendaMode.Month) {
|
|
161
|
-
return epochToLocalDayStart(new Date(now.value).setDate(1));
|
|
154
|
+
const nowIsInSelectedRange = computed(() => {
|
|
155
|
+
if (!props.start || !props.end) {
|
|
156
|
+
return false;
|
|
162
157
|
}
|
|
163
|
-
return
|
|
158
|
+
return now.value >= props.start && now.value <= props.end;
|
|
164
159
|
});
|
|
165
160
|
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
161
|
+
const nowInterval = setInterval(() => {
|
|
162
|
+
now.value = todayToEpoch();
|
|
163
|
+
}, 10000);
|
|
164
|
+
|
|
165
|
+
onMounted(() => {
|
|
166
|
+
if(props.end && props.start) {
|
|
167
|
+
return;
|
|
169
168
|
}
|
|
170
169
|
if (props.mode === AgendaMode.Week) {
|
|
171
|
-
|
|
170
|
+
emit("update:start", epochToLocalDayStart(now.value - (new Date(now.value).getDay() - 1) * 24 * 60 * 60 * 1000));
|
|
171
|
+
emit("update:end", epochToLocalDayEnd(now.value + (7 - new Date(now.value).getDay()) * 24 * 60 * 60 * 1000));
|
|
172
|
+
return;
|
|
172
173
|
}
|
|
173
174
|
if (props.mode === AgendaMode.Month) {
|
|
174
175
|
const lastDayOfMonth = new Date(new Date(now.value).getFullYear(), new Date(now.value).getMonth() + 1, 0);
|
|
175
|
-
|
|
176
|
+
emit("update:start", epochToLocalDayStart(new Date(now.value).setDate(1)));
|
|
177
|
+
emit("update:end", lastDayOfMonth.getTime());
|
|
178
|
+
return;
|
|
176
179
|
}
|
|
177
|
-
|
|
180
|
+
emit("update:start", epochToLocalDayStart(now.value));
|
|
181
|
+
emit("update:end", epochToLocalDayEnd(now.value));
|
|
178
182
|
});
|
|
179
183
|
|
|
180
|
-
const nowIsInSelectedRange = computed(() => {
|
|
181
|
-
return now.value >= start.value && now.value <= end.value;
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
const nowInterval = setInterval(() => {
|
|
185
|
-
now.value = todayToEpoch();
|
|
186
|
-
}, 10000);
|
|
187
|
-
|
|
188
184
|
onUnmounted(() => {
|
|
189
185
|
clearInterval(nowInterval);
|
|
190
186
|
});
|
|
@@ -195,13 +191,11 @@ export default defineComponent({
|
|
|
195
191
|
} else if (!value && defaultMode.value !== AgendaMode.Day) {
|
|
196
192
|
emit('update:mode', defaultMode.value);
|
|
197
193
|
}
|
|
198
|
-
}
|
|
194
|
+
});
|
|
199
195
|
|
|
200
196
|
return {
|
|
201
197
|
AgendaMode,
|
|
202
|
-
start,
|
|
203
198
|
dayColumnWidth,
|
|
204
|
-
end,
|
|
205
199
|
now,
|
|
206
200
|
nowIsInSelectedRange
|
|
207
201
|
};
|
|
@@ -179,8 +179,14 @@
|
|
|
179
179
|
</FSIcon>
|
|
180
180
|
</template>
|
|
181
181
|
</FSRow>
|
|
182
|
+
<FSText
|
|
183
|
+
v-if="readonly && !$props.modelValue && $props.emptyLabel"
|
|
184
|
+
variant="soft"
|
|
185
|
+
>
|
|
186
|
+
{{ $props.emptyLabel }}
|
|
187
|
+
</FSText>
|
|
182
188
|
<div
|
|
183
|
-
class="
|
|
189
|
+
:class="classes"
|
|
184
190
|
:style="style"
|
|
185
191
|
>
|
|
186
192
|
<div
|
|
@@ -237,6 +243,7 @@ import FSAutoCompleteField from "./FSAutocompleteField.vue";
|
|
|
237
243
|
import FSTextField from "./FSTextField.vue";
|
|
238
244
|
import FSIcon from "../FSIcon.vue";
|
|
239
245
|
import FSCard from "../FSCard.vue";
|
|
246
|
+
import FSText from "../FSText.vue";
|
|
240
247
|
import FSCol from "../FSCol.vue";
|
|
241
248
|
import FSRow from "../FSRow.vue";
|
|
242
249
|
|
|
@@ -245,6 +252,7 @@ export default defineComponent({
|
|
|
245
252
|
components: {
|
|
246
253
|
FSAutoCompleteField,
|
|
247
254
|
FSTextField,
|
|
255
|
+
FSText,
|
|
248
256
|
FSIcon,
|
|
249
257
|
FSCard,
|
|
250
258
|
FSCol,
|
|
@@ -261,6 +269,11 @@ export default defineComponent({
|
|
|
261
269
|
required: false,
|
|
262
270
|
default: null
|
|
263
271
|
},
|
|
272
|
+
emptyLabel: {
|
|
273
|
+
type: String as PropType<string | null>,
|
|
274
|
+
required: false,
|
|
275
|
+
default: null
|
|
276
|
+
},
|
|
264
277
|
modelValue: {
|
|
265
278
|
type: String as PropType<string | null>,
|
|
266
279
|
required: false,
|
|
@@ -350,6 +363,10 @@ export default defineComponent({
|
|
|
350
363
|
onError: console.error
|
|
351
364
|
}
|
|
352
365
|
|
|
366
|
+
const isEmpty = computed((): boolean => {
|
|
367
|
+
return editor.getEditorState().isEmpty();
|
|
368
|
+
});
|
|
369
|
+
|
|
353
370
|
const editor = createEditor(config);
|
|
354
371
|
|
|
355
372
|
onMounted((): void => {
|
|
@@ -423,6 +440,14 @@ export default defineComponent({
|
|
|
423
440
|
}
|
|
424
441
|
});
|
|
425
442
|
|
|
443
|
+
const classes = computed((): string[] => {
|
|
444
|
+
const innerClasses = ["fs-rich-text-field"];
|
|
445
|
+
if (!readonly.value) {
|
|
446
|
+
innerClasses.push("fs-rich-text-field-readonly");
|
|
447
|
+
}
|
|
448
|
+
return innerClasses;
|
|
449
|
+
});
|
|
450
|
+
|
|
426
451
|
const toolbarColors = computed((): { [code: string]: string } => {
|
|
427
452
|
if (props.editable) {
|
|
428
453
|
return {
|
|
@@ -655,8 +680,11 @@ export default defineComponent({
|
|
|
655
680
|
toolbarColors,
|
|
656
681
|
menuVariable,
|
|
657
682
|
UNDO_COMMAND,
|
|
683
|
+
ColorEnum,
|
|
658
684
|
readonly,
|
|
659
685
|
linkUrl,
|
|
686
|
+
classes,
|
|
687
|
+
isEmpty,
|
|
660
688
|
editor,
|
|
661
689
|
isLink,
|
|
662
690
|
style,
|
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
v-bind="$props"
|
|
4
4
|
gap="12px"
|
|
5
5
|
>
|
|
6
|
-
<FSText
|
|
7
|
-
v-if="$props.label"
|
|
8
|
-
font="text-button"
|
|
9
|
-
>
|
|
10
|
-
{{ $props.label }}
|
|
11
|
-
</FSText>
|
|
12
6
|
<FSSearchField
|
|
13
7
|
v-if="$props.searchable"
|
|
14
8
|
padding="0 12px 0 0"
|
|
@@ -45,8 +39,6 @@
|
|
|
45
39
|
:width="$props.direction == 'row' ? 'fit-content' : '100%'"
|
|
46
40
|
height="fit-content"
|
|
47
41
|
:editable="false"
|
|
48
|
-
:singleSelect="$props.clickable"
|
|
49
|
-
@update:modelValue="$emit('click:item', item.id)"
|
|
50
42
|
>
|
|
51
43
|
<slot
|
|
52
44
|
name="item"
|
|
@@ -108,7 +100,6 @@ import { filterItems } from "../../utils";
|
|
|
108
100
|
|
|
109
101
|
import FSRow from "../FSRow.vue";
|
|
110
102
|
import FSCol from "../FSCol.vue";
|
|
111
|
-
import FSText from "../FSText.vue";
|
|
112
103
|
import FSIcon from "../FSIcon.vue";
|
|
113
104
|
import FSSpan from "../FSSpan.vue";
|
|
114
105
|
import FSImage from "../FSImage.vue";
|
|
@@ -125,7 +116,6 @@ export default defineComponent({
|
|
|
125
116
|
components: {
|
|
126
117
|
FSRow,
|
|
127
118
|
FSCol,
|
|
128
|
-
FSText,
|
|
129
119
|
FSTile,
|
|
130
120
|
FSIcon,
|
|
131
121
|
FSSpan,
|
|
@@ -138,10 +128,6 @@ export default defineComponent({
|
|
|
138
128
|
FSButtonRemoveIcon,
|
|
139
129
|
},
|
|
140
130
|
props: {
|
|
141
|
-
label: {
|
|
142
|
-
type: String,
|
|
143
|
-
required: false
|
|
144
|
-
},
|
|
145
131
|
items: {
|
|
146
132
|
type: Array as PropType<{id: string, label?: string, icon?: string, imageId?: string, [index: string]: any}[]>,
|
|
147
133
|
required: true
|
|
@@ -166,11 +152,6 @@ export default defineComponent({
|
|
|
166
152
|
required: false,
|
|
167
153
|
default: false
|
|
168
154
|
},
|
|
169
|
-
clickable: {
|
|
170
|
-
type: Boolean,
|
|
171
|
-
required: false,
|
|
172
|
-
default: false
|
|
173
|
-
},
|
|
174
155
|
searchable: {
|
|
175
156
|
type: Boolean,
|
|
176
157
|
required: false,
|
|
@@ -207,7 +188,7 @@ export default defineComponent({
|
|
|
207
188
|
default: false
|
|
208
189
|
}
|
|
209
190
|
},
|
|
210
|
-
emits: ["click:edit", "click:remove", "
|
|
191
|
+
emits: ["click:edit", "click:remove", "update:search"],
|
|
211
192
|
setup(props, { emit }) {
|
|
212
193
|
const actualSearch = ref<string | null>(props.search);
|
|
213
194
|
const filteredItems = computed(() => {
|
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.57",
|
|
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.57",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.57"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "4445a164fed7501246674432eba3e8227c8bc827"
|
|
39
39
|
}
|
|
@@ -25,7 +25,9 @@
|
|
|
25
25
|
&:focus-within {
|
|
26
26
|
border-color: var(--fs-rich-text-field-active-border-color) !important;
|
|
27
27
|
}
|
|
28
|
+
}
|
|
28
29
|
|
|
30
|
+
.fs-rich-text-field-readonly {
|
|
29
31
|
@include web {
|
|
30
32
|
padding: 10px 12px !important;
|
|
31
33
|
}
|
|
@@ -33,7 +35,6 @@
|
|
|
33
35
|
@include mobile {
|
|
34
36
|
padding: 6px 16px !important;
|
|
35
37
|
}
|
|
36
|
-
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
.fs-rich-text-field-undo {
|