@dative-gpi/foundation-shared-components 1.0.138 → 1.0.139-chartlists
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.
|
@@ -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>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<FSTile
|
|
3
3
|
:width="['275px','336px']"
|
|
4
4
|
:height="['124px','156px']"
|
|
5
|
+
:editable="$props.editable"
|
|
5
6
|
borderRadius="8px"
|
|
6
7
|
v-bind="$attrs"
|
|
7
8
|
>
|
|
@@ -99,6 +100,11 @@ export default defineComponent({
|
|
|
99
100
|
type: Number as PropType<ChartType>,
|
|
100
101
|
required: false,
|
|
101
102
|
default: ChartType.None
|
|
103
|
+
},
|
|
104
|
+
editable: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
required: false,
|
|
107
|
+
default: true
|
|
102
108
|
}
|
|
103
109
|
},
|
|
104
110
|
setup() {
|
|
@@ -4,58 +4,54 @@
|
|
|
4
4
|
:height="$props.height"
|
|
5
5
|
:width="$props.width"
|
|
6
6
|
>
|
|
7
|
-
<
|
|
8
|
-
v-if="$props.editable"
|
|
7
|
+
<FSClickable
|
|
8
|
+
v-if="$props.editable && $props.singleSelect"
|
|
9
|
+
padding="12px"
|
|
10
|
+
:variant="variant"
|
|
11
|
+
:color="color"
|
|
12
|
+
:style="style"
|
|
13
|
+
:to="$props.to"
|
|
14
|
+
:href="$props.href"
|
|
15
|
+
width="100%"
|
|
16
|
+
height="100%"
|
|
17
|
+
@click="() => $emit('update:modelValue', !$props.modelValue)"
|
|
18
|
+
v-bind="$attrs"
|
|
9
19
|
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
:
|
|
30
|
-
width="
|
|
31
|
-
|
|
32
|
-
:to="$props.to"
|
|
33
|
-
:style="style"
|
|
34
|
-
v-bind="$attrs"
|
|
20
|
+
<slot />
|
|
21
|
+
</FSClickable>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
<FSClickable
|
|
25
|
+
v-else-if="$props.editable && ($props.href || $props.to || $attrs.onClick)"
|
|
26
|
+
variant="background"
|
|
27
|
+
class="fs-tile"
|
|
28
|
+
padding="12px"
|
|
29
|
+
:href="$props.href"
|
|
30
|
+
width="100%"
|
|
31
|
+
height="100%"
|
|
32
|
+
:to="$props.to"
|
|
33
|
+
:style="style"
|
|
34
|
+
v-bind="$attrs"
|
|
35
|
+
>
|
|
36
|
+
<slot />
|
|
37
|
+
<FSCard
|
|
38
|
+
class="fs-tile-checkbox"
|
|
39
|
+
:height="['40px', '32px']"
|
|
40
|
+
:width="['40px', '32px']"
|
|
41
|
+
:border="false"
|
|
35
42
|
>
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
:border="false"
|
|
44
|
-
v-bind="$attrs"
|
|
45
|
-
>
|
|
46
|
-
<FSCheckbox
|
|
47
|
-
:modelValue="$props.modelValue"
|
|
48
|
-
@update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
|
|
49
|
-
/>
|
|
50
|
-
</FSCard>
|
|
51
|
-
</FSClickable>
|
|
52
|
-
</template>
|
|
43
|
+
<FSCheckbox
|
|
44
|
+
:modelValue="$props.modelValue"
|
|
45
|
+
@update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
|
|
46
|
+
/>
|
|
47
|
+
</FSCard>
|
|
48
|
+
</FSClickable>
|
|
49
|
+
|
|
53
50
|
<FSCard
|
|
54
51
|
v-else
|
|
55
52
|
variant="background"
|
|
56
53
|
class="fs-tile"
|
|
57
54
|
padding="12px"
|
|
58
|
-
:color="color"
|
|
59
55
|
:style="style"
|
|
60
56
|
width="100%"
|
|
61
57
|
height="100%"
|
|
@@ -69,7 +65,6 @@
|
|
|
69
65
|
:height="['40px', '32px']"
|
|
70
66
|
:width="['40px', '32px']"
|
|
71
67
|
:border="false"
|
|
72
|
-
v-bind="$attrs"
|
|
73
68
|
>
|
|
74
69
|
<FSCheckbox
|
|
75
70
|
:modelValue="$props.modelValue"
|
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.139-chartlists",
|
|
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.139-chartlists",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.139-chartlists"
|
|
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": "d6d4df26014365b637a93c3e05c616616159a6f7"
|
|
39
39
|
}
|