@dative-gpi/foundation-shared-components 1.0.137 → 1.0.139-auth-token
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/assets/images/map/snow.png +0 -0
- package/components/FSCheckbox.vue +1 -0
- package/components/FSChipGroup.vue +69 -0
- package/components/FSRadio.vue +1 -0
- package/components/FSSlider.vue +2 -1
- package/components/FSSwitch.vue +38 -44
- package/components/autocompletes/FSAutoCompleteAddress.vue +3 -0
- package/components/fields/FSBaseField.vue +1 -0
- package/components/fields/FSClosableSearchField.vue +83 -0
- package/components/fields/FSEntityFieldUI.vue +7 -4
- package/components/fields/FSRichTextField.vue +13 -17
- package/components/fields/FSTranslateRichTextField.vue +3 -1
- package/components/map/FSMap.vue +74 -126
- package/components/map/FSMapMarker.vue +6 -6
- package/components/map/FSMapMarkerClusterGroup.vue +1 -1
- package/components/map/FSMapOverlay.vue +14 -11
- package/components/map/FSMapTileLayer.vue +14 -8
- package/components/selects/FSSelectMapLayer.vue +68 -0
- package/components/tiles/FSChartTileUI.vue +6 -0
- package/components/tiles/FSTile.vue +7 -8
- package/composables/useAddress.ts +40 -8
- package/models/map.ts +12 -10
- package/package.json +4 -4
- package/styles/components/fs_map.scss +46 -10
- package/tools/index.ts +1 -0
- package/tools/reportsTools.ts +38 -0
|
Binary file
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSWrapGroup
|
|
3
|
+
v-if="$props.variant === 'wrap'"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
>
|
|
6
|
+
<FSChip
|
|
7
|
+
v-for="(label, index) in $props.labels"
|
|
8
|
+
:key="index"
|
|
9
|
+
:variant="$props.chipVariant"
|
|
10
|
+
:color="$props.color"
|
|
11
|
+
:label="label"
|
|
12
|
+
/>
|
|
13
|
+
<slot />
|
|
14
|
+
</FSWrapGroup>
|
|
15
|
+
<FSSlideGroup
|
|
16
|
+
v-if="$props.variant === 'slide'"
|
|
17
|
+
v-bind="$attrs"
|
|
18
|
+
>
|
|
19
|
+
<FSChip
|
|
20
|
+
v-for="(label, index) in $props.labels"
|
|
21
|
+
:key="index"
|
|
22
|
+
:variant="$props.chipVariant"
|
|
23
|
+
:color="$props.color"
|
|
24
|
+
:label="label"
|
|
25
|
+
/>
|
|
26
|
+
<slot />
|
|
27
|
+
</FSSlideGroup>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script lang="ts">
|
|
31
|
+
import { defineComponent, type PropType } from "vue";
|
|
32
|
+
|
|
33
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
34
|
+
|
|
35
|
+
import FSSlideGroup from "./FSSlideGroup.vue";
|
|
36
|
+
import FSWrapGroup from "./FSWrapGroup.vue";
|
|
37
|
+
import FSChip from "./FSChip.vue";
|
|
38
|
+
|
|
39
|
+
export default defineComponent({
|
|
40
|
+
name: "FSChipGroup",
|
|
41
|
+
components: {
|
|
42
|
+
FSSlideGroup,
|
|
43
|
+
FSWrapGroup,
|
|
44
|
+
FSChip
|
|
45
|
+
},
|
|
46
|
+
props: {
|
|
47
|
+
labels: {
|
|
48
|
+
type: Array as PropType<string[]>,
|
|
49
|
+
required: false,
|
|
50
|
+
default: () => []
|
|
51
|
+
},
|
|
52
|
+
variant: {
|
|
53
|
+
type: String as PropType<"wrap" | "slide">,
|
|
54
|
+
required: false,
|
|
55
|
+
default: "wrap"
|
|
56
|
+
},
|
|
57
|
+
chipVariant: {
|
|
58
|
+
type: String as PropType<"standard" | "full" | "borderless">,
|
|
59
|
+
required: false,
|
|
60
|
+
default: "full"
|
|
61
|
+
},
|
|
62
|
+
color: {
|
|
63
|
+
type: String as PropType<ColorBase>,
|
|
64
|
+
required: false,
|
|
65
|
+
default: ColorEnum.Light
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
</script>
|
package/components/FSRadio.vue
CHANGED
package/components/FSSlider.vue
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
:elevation="0"
|
|
36
36
|
:tickSize="4"
|
|
37
37
|
:modelValue="$props.modelValue ?? undefined"
|
|
38
|
-
@update:modelValue="
|
|
38
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
39
39
|
v-bind="$attrs"
|
|
40
40
|
>
|
|
41
41
|
<template
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
v-if="$props.description"
|
|
56
56
|
class="fs-slider-description"
|
|
57
57
|
font="text-overline"
|
|
58
|
+
:lineClamp="2"
|
|
58
59
|
:style="style"
|
|
59
60
|
>
|
|
60
61
|
{{ $props.description }}
|
package/components/FSSwitch.vue
CHANGED
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
width="hug"
|
|
4
|
-
align="top-left"
|
|
5
|
-
gap="16px"
|
|
2
|
+
<FSCol
|
|
6
3
|
padding="8px 0px"
|
|
7
|
-
:wrap="false"
|
|
8
4
|
>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
>
|
|
5
|
+
<FSRow
|
|
6
|
+
gap="16px"
|
|
7
|
+
:wrap="false"
|
|
8
|
+
>
|
|
9
|
+
<v-switch
|
|
10
|
+
v-if="variant == 'left'"
|
|
11
|
+
class="fs-switch"
|
|
12
|
+
hide-details
|
|
13
|
+
inset
|
|
14
|
+
:validateOn="validateOn"
|
|
15
|
+
:rules="$props.rules"
|
|
16
|
+
:ripple="false"
|
|
17
|
+
:style="style"
|
|
18
|
+
:modelValue="$props.modelValue"
|
|
19
|
+
@update:modelValue="onToggle"
|
|
20
|
+
v-bind="$attrs"
|
|
21
|
+
/>
|
|
22
|
+
<FSCol>
|
|
27
23
|
<FSSpan
|
|
28
24
|
v-if="$props.label"
|
|
29
25
|
class="fs-switch-label"
|
|
@@ -41,33 +37,31 @@
|
|
|
41
37
|
class="fs-switch-description"
|
|
42
38
|
font="text-overline"
|
|
43
39
|
:style="style"
|
|
40
|
+
:lineClamp="2"
|
|
44
41
|
>
|
|
45
42
|
{{ $props.description }}
|
|
46
43
|
</FSSpan>
|
|
47
44
|
</slot>
|
|
48
|
-
<slot
|
|
49
|
-
name="footer"
|
|
50
|
-
/>
|
|
51
45
|
</FSCol>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
46
|
+
<FSRow
|
|
47
|
+
v-if="variant == 'right'"
|
|
48
|
+
align="center-right"
|
|
49
|
+
>
|
|
50
|
+
<v-switch
|
|
51
|
+
class="fs-switch"
|
|
52
|
+
hide-details
|
|
53
|
+
inset
|
|
54
|
+
:validateOn="validateOn"
|
|
55
|
+
:rules="$props.rules"
|
|
56
|
+
:ripple="false"
|
|
57
|
+
:style="style"
|
|
58
|
+
:modelValue="$props.modelValue"
|
|
59
|
+
@update:modelValue="onToggle"
|
|
60
|
+
v-bind="$attrs"
|
|
61
|
+
/>
|
|
62
|
+
</FSRow>
|
|
69
63
|
</FSRow>
|
|
70
|
-
</
|
|
64
|
+
</FSCol>
|
|
71
65
|
</template>
|
|
72
66
|
|
|
73
67
|
<script lang="ts">
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
:toggleSet="false"
|
|
6
6
|
:multiple="false"
|
|
7
7
|
:items="items"
|
|
8
|
+
:customFilter="(_label: string, _query: string, item: any) => {
|
|
9
|
+
return item.value !== $props.modelValue?.placeId;
|
|
10
|
+
}"
|
|
8
11
|
:modelValue="$props.modelValue?.placeId"
|
|
9
12
|
@update:modelValue="onUpdate"
|
|
10
13
|
v-model:search="search"
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSearchField
|
|
3
|
+
:modelValue="$props.modelValue"
|
|
4
|
+
:appendInnerIcon="$props.closable ? $props.appendInnerIcon : null"
|
|
5
|
+
:clearable="false"
|
|
6
|
+
@click:appendInner="onCloseClicked"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
>
|
|
10
|
+
<template
|
|
11
|
+
v-for="(_, name) in $slots"
|
|
12
|
+
v-slot:[name]="slotData"
|
|
13
|
+
>
|
|
14
|
+
<slot
|
|
15
|
+
:name="name"
|
|
16
|
+
v-bind="slotData"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
19
|
+
</FSSearchField>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { defineComponent, type PropType } from "vue";
|
|
24
|
+
|
|
25
|
+
import FSSearchField from "./FSSearchField.vue";
|
|
26
|
+
|
|
27
|
+
export default defineComponent({
|
|
28
|
+
name: "FSClosableSearchField",
|
|
29
|
+
components: {
|
|
30
|
+
FSSearchField
|
|
31
|
+
},
|
|
32
|
+
props: {
|
|
33
|
+
closable: {
|
|
34
|
+
type: Boolean as PropType<boolean>,
|
|
35
|
+
required: false,
|
|
36
|
+
default: true
|
|
37
|
+
},
|
|
38
|
+
unfocusOnClose: {
|
|
39
|
+
type: Boolean as PropType<boolean>,
|
|
40
|
+
required: false,
|
|
41
|
+
default: true
|
|
42
|
+
},
|
|
43
|
+
clearOnClose: {
|
|
44
|
+
type: Boolean as PropType<boolean>,
|
|
45
|
+
required: false,
|
|
46
|
+
default: true
|
|
47
|
+
},
|
|
48
|
+
modelValue: {
|
|
49
|
+
type: String as PropType<string | null>,
|
|
50
|
+
required: false,
|
|
51
|
+
default: null
|
|
52
|
+
},
|
|
53
|
+
appendInnerIcon: {
|
|
54
|
+
type: String as PropType<string | undefined>,
|
|
55
|
+
required: false,
|
|
56
|
+
default: 'mdi-close'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
emits: ["update:modelValue", "close"],
|
|
60
|
+
setup(props, { emit }) {
|
|
61
|
+
const onCloseClicked = ($event: MouseEvent) => {
|
|
62
|
+
if(!props.closable) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (props.unfocusOnClose) {
|
|
67
|
+
$event.preventDefault();
|
|
68
|
+
$event.stopPropagation();
|
|
69
|
+
(document.activeElement as HTMLElement)?.blur();
|
|
70
|
+
}
|
|
71
|
+
if (props.clearOnClose) {
|
|
72
|
+
emit('update:modelValue', null);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
emit('close');
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
onCloseClicked
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
</script>
|
|
@@ -14,18 +14,20 @@
|
|
|
14
14
|
:wrap="false"
|
|
15
15
|
>
|
|
16
16
|
<FSSelectField
|
|
17
|
+
:editable="$props.editable"
|
|
18
|
+
:items="actualEntityTypes"
|
|
17
19
|
:hideHeader="true"
|
|
20
|
+
:clearable="false"
|
|
18
21
|
:modelValue="$props.entityType"
|
|
19
22
|
@update:modelValue="$emit('update:entityType', $event)"
|
|
20
|
-
:items="actualEntityTypes"
|
|
21
|
-
:clearable="false"
|
|
22
23
|
/>
|
|
23
24
|
<template
|
|
24
25
|
v-if="itemsCount > 0"
|
|
25
26
|
>
|
|
26
27
|
<FSButton
|
|
27
|
-
:label="$tr('ui.common.edit', 'Edit')"
|
|
28
28
|
icon="mdi-pencil"
|
|
29
|
+
:label="$tr('ui.common.edit', 'Edit')"
|
|
30
|
+
:editable="$props.editable"
|
|
29
31
|
@click="$emit('click:select')"
|
|
30
32
|
/>
|
|
31
33
|
</template>
|
|
@@ -33,8 +35,9 @@
|
|
|
33
35
|
v-else
|
|
34
36
|
>
|
|
35
37
|
<FSButton
|
|
36
|
-
:label="$tr('ui.common.select', 'Select')"
|
|
37
38
|
icon="mdi-plus-circle-multiple-outline"
|
|
39
|
+
:label="$tr('ui.common.select', 'Select')"
|
|
40
|
+
:editable="$props.editable"
|
|
38
41
|
@click="$emit('click:select')"
|
|
39
42
|
/>
|
|
40
43
|
</template>
|
|
@@ -215,7 +215,8 @@
|
|
|
215
215
|
<FSSpan
|
|
216
216
|
v-if="!readonly && $props.description"
|
|
217
217
|
class="fs-rich-text-field-description"
|
|
218
|
-
font="text-
|
|
218
|
+
font="text-overline"
|
|
219
|
+
:lineClamp="2"
|
|
219
220
|
:style="style"
|
|
220
221
|
>
|
|
221
222
|
{{ $props.description }}
|
|
@@ -500,11 +501,11 @@ export default defineComponent({
|
|
|
500
501
|
return;
|
|
501
502
|
}
|
|
502
503
|
const editorModelValue = JSON.stringify(editorState.toJSON());
|
|
503
|
-
if(editorModelValue === emptyLexicalState) {
|
|
504
|
+
if(editorModelValue === emptyLexicalState && props.modelValue !== null) {
|
|
504
505
|
emit("update:modelValue", null);
|
|
505
506
|
return;
|
|
506
507
|
}
|
|
507
|
-
if(editorModelValue !== props.modelValue) {
|
|
508
|
+
if(editorModelValue !== emptyLexicalState && editorModelValue !== props.modelValue) {
|
|
508
509
|
emit("update:modelValue", editorModelValue);
|
|
509
510
|
}
|
|
510
511
|
});
|
|
@@ -673,21 +674,16 @@ export default defineComponent({
|
|
|
673
674
|
return;
|
|
674
675
|
}
|
|
675
676
|
if (props.modelValue != null) {
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
}
|
|
685
|
-
});
|
|
686
|
-
return;
|
|
677
|
+
if (typeof props.modelValue === "string" && props.modelValue !== "") {
|
|
678
|
+
editor.setEditorState(editor.parseEditorState(props.modelValue!));
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
if (typeof props.modelValue === "object") {
|
|
682
|
+
editor.setEditorState(editor.parseEditorState(JSON.stringify(props.modelValue)));
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
687
685
|
}
|
|
688
|
-
editor.
|
|
689
|
-
editor.setEditorState(editor.parseEditorState(emptyLexicalState));
|
|
690
|
-
});
|
|
686
|
+
editor.setEditorState(editor.parseEditorState(emptyLexicalState));
|
|
691
687
|
}
|
|
692
688
|
|
|
693
689
|
watch(() => props.modelValue, () => {
|