@dative-gpi/foundation-shared-components 0.0.10 → 0.0.12
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/aliases/FSButton.ts +8 -6
- package/components/FSAutocompleteField.vue +7 -5
- package/components/FSBreadcrumbs.vue +3 -1
- package/components/FSButton.vue +30 -23
- package/components/FSCalendar.vue +4 -3
- package/components/FSCalendarTwin.vue +4 -3
- package/components/FSCarousel.vue +3 -1
- package/components/FSCheckbox.vue +5 -3
- package/components/FSChip.vue +5 -3
- package/components/FSClock.vue +5 -4
- package/components/FSColor.vue +3 -1
- package/components/FSColorIcon.vue +3 -1
- package/components/FSContainer.vue +4 -2
- package/components/FSDateField.vue +4 -3
- package/components/FSDateRangeField.vue +4 -3
- package/components/FSDateTimeField.vue +4 -3
- package/components/FSDateTimeRangeField.vue +4 -3
- package/components/FSDivider.vue +3 -1
- package/components/FSFadeOut.vue +3 -1
- package/components/FSFileButton.vue +4 -3
- package/components/FSIconField.vue +5 -3
- package/components/FSImage.vue +1 -1
- package/components/FSLink.vue +95 -0
- package/components/FSPagination.vue +80 -0
- package/components/FSPasswordField.vue +4 -2
- package/components/FSRadio.vue +5 -3
- package/components/FSRemoveDialog.vue +1 -1
- package/components/FSRichTextField.vue +7 -6
- package/components/FSSearchField.vue +46 -13
- package/components/FSSelectField.vue +5 -3
- package/components/FSSlideGroup.vue +2 -1
- package/components/FSSlider.vue +5 -3
- package/components/FSSubmitDialog.vue +1 -1
- package/components/FSSwitch.vue +6 -4
- package/components/FSTabs.vue +4 -3
- package/components/FSTag.vue +4 -2
- package/components/FSTagField.vue +4 -3
- package/components/FSText.vue +2 -1
- package/components/FSTextArea.vue +4 -3
- package/components/FSTextField.vue +5 -3
- package/components/FSWrapGroup.vue +2 -1
- package/components/deviceOrganisations/FSConnectivity.vue +2 -1
- package/components/deviceOrganisations/FSWorstAlert.vue +2 -1
- package/components/lists/FSDataTableUI.vue +5 -4
- package/components/lists/FSFilterButton.vue +24 -16
- package/components/lists/FSHiddenButton.vue +1 -0
- package/components/lists/FSLoadDataTable.vue +88 -0
- package/components/tiles/FSDeviceOrganisationTileUI.vue +1 -1
- package/components/tiles/FSGroupTileUI.vue +1 -1
- package/components/{FSLoadTile.vue → tiles/FSLoadTile.vue} +9 -7
- package/components/{FSTile.vue → tiles/FSTile.vue} +5 -4
- package/composables/index.ts +1 -0
- package/composables/useDebounce.ts +22 -0
- package/models/rules.ts +2 -1
- package/package.json +6 -4
- package/styles/components/fs_calendar.scss +2 -2
- package/styles/components/fs_link.scss +6 -0
- package/styles/components/fs_load_data_table.scss +77 -0
- package/styles/components/fs_pagination.scss +11 -0
- package/styles/components/index.scss +3 -0
- package/index.ts +0 -6
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSCol
|
|
3
|
+
class="fs-load-data-table"
|
|
4
|
+
gap="16px"
|
|
5
|
+
:style="style"
|
|
6
|
+
>
|
|
7
|
+
<FSRow
|
|
8
|
+
align="bottom-center"
|
|
9
|
+
>
|
|
10
|
+
<v-skeleton-loader
|
|
11
|
+
type="button"
|
|
12
|
+
/>
|
|
13
|
+
<v-skeleton-loader
|
|
14
|
+
type="button"
|
|
15
|
+
/>
|
|
16
|
+
<v-spacer />
|
|
17
|
+
<v-skeleton-loader
|
|
18
|
+
type="button"
|
|
19
|
+
/>
|
|
20
|
+
<v-skeleton-loader
|
|
21
|
+
type="button"
|
|
22
|
+
/>
|
|
23
|
+
</FSRow>
|
|
24
|
+
<FSRow>
|
|
25
|
+
<v-skeleton-loader
|
|
26
|
+
type="chip"
|
|
27
|
+
/>
|
|
28
|
+
<v-skeleton-loader
|
|
29
|
+
type="chip"
|
|
30
|
+
/>
|
|
31
|
+
<v-skeleton-loader
|
|
32
|
+
type="chip"
|
|
33
|
+
/>
|
|
34
|
+
</FSRow>
|
|
35
|
+
<v-skeleton-loader
|
|
36
|
+
type="table-row-divider@10"
|
|
37
|
+
/>
|
|
38
|
+
<FSRow
|
|
39
|
+
align="bottom-right"
|
|
40
|
+
>
|
|
41
|
+
<v-skeleton-loader
|
|
42
|
+
type="button"
|
|
43
|
+
/>
|
|
44
|
+
<v-skeleton-loader
|
|
45
|
+
type="button"
|
|
46
|
+
/>
|
|
47
|
+
<v-skeleton-loader
|
|
48
|
+
type="button"
|
|
49
|
+
/>
|
|
50
|
+
<v-skeleton-loader
|
|
51
|
+
type="button"
|
|
52
|
+
/>
|
|
53
|
+
</FSRow>
|
|
54
|
+
</FSCol>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<script lang="ts">
|
|
58
|
+
import { computed, defineComponent } from "vue";
|
|
59
|
+
|
|
60
|
+
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
61
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
62
|
+
|
|
63
|
+
import FSCol from "../FSCol.vue";
|
|
64
|
+
import FSRow from "../FSRow.vue";
|
|
65
|
+
|
|
66
|
+
export default defineComponent({
|
|
67
|
+
name: "FSLoadDataTable",
|
|
68
|
+
components: {
|
|
69
|
+
FSCol,
|
|
70
|
+
FSRow
|
|
71
|
+
},
|
|
72
|
+
setup() {
|
|
73
|
+
const { getColors } = useColors();
|
|
74
|
+
|
|
75
|
+
const backgroundColors = getColors(ColorEnum.Background);
|
|
76
|
+
|
|
77
|
+
const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
|
|
78
|
+
return {
|
|
79
|
+
"--fs-load-data-table-background-color": backgroundColors.base
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
style
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
</script>
|
|
@@ -82,7 +82,7 @@ import FSWorstAlert from "../deviceOrganisations/FSWorstAlert.vue";
|
|
|
82
82
|
import FSDivider from "../FSDivider.vue";
|
|
83
83
|
import FSImage from "../FSImage.vue";
|
|
84
84
|
import FSSpan from "../FSSpan.vue";
|
|
85
|
-
import FSTile from "
|
|
85
|
+
import FSTile from "./FSTile.vue";
|
|
86
86
|
import FSCol from "../FSCol.vue";
|
|
87
87
|
import FSRow from "../FSRow.vue";
|
|
88
88
|
|
|
@@ -100,7 +100,7 @@ import FSImage from "../FSImage.vue";
|
|
|
100
100
|
import FSColor from "../FSColor.vue";
|
|
101
101
|
import FSSpan from "../FSSpan.vue";
|
|
102
102
|
import FSText from "../FSText.vue";
|
|
103
|
-
import FSTile from "
|
|
103
|
+
import FSTile from "./FSTile.vue";
|
|
104
104
|
import FSCol from "../FSCol.vue";
|
|
105
105
|
import FSRow from "../FSRow.vue";
|
|
106
106
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
@update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
|
|
29
29
|
/>
|
|
30
30
|
</FSContainer>
|
|
31
|
-
</FSCard>
|
|
31
|
+
</FSCard>
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script lang="ts">
|
|
@@ -37,11 +37,11 @@ import { computed, defineComponent } from "vue";
|
|
|
37
37
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
38
38
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
39
39
|
|
|
40
|
-
import FSContainer from "
|
|
41
|
-
import FSCheckbox from "
|
|
42
|
-
import FSCard from "
|
|
43
|
-
import FSCol from "
|
|
44
|
-
import FSRow from "
|
|
40
|
+
import FSContainer from "../FSContainer.vue";
|
|
41
|
+
import FSCheckbox from "../FSCheckbox.vue";
|
|
42
|
+
import FSCard from "../FSCard.vue";
|
|
43
|
+
import FSCol from "../FSCol.vue";
|
|
44
|
+
import FSRow from "../FSRow.vue";
|
|
45
45
|
|
|
46
46
|
export default defineComponent({
|
|
47
47
|
name: "FSTile",
|
|
@@ -64,10 +64,12 @@ export default defineComponent({
|
|
|
64
64
|
default: false
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
+
emits: ["update:modelValue"],
|
|
67
68
|
setup() {
|
|
68
69
|
const { isMobileSized } = useBreakpoints();
|
|
70
|
+
const { getColors } = useColors();
|
|
69
71
|
|
|
70
|
-
const backgroundColors =
|
|
72
|
+
const backgroundColors = getColors(ColorEnum.Background);
|
|
71
73
|
|
|
72
74
|
const width = computed(() => {
|
|
73
75
|
return isMobileSized.value ? 336 : 352;
|
|
@@ -31,9 +31,9 @@ import { computed, defineComponent, PropType } from "vue";
|
|
|
31
31
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
32
32
|
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
33
33
|
|
|
34
|
-
import FSContainer from "
|
|
35
|
-
import FSCheckbox from "
|
|
36
|
-
import FSCard from "
|
|
34
|
+
import FSContainer from "../FSContainer.vue";
|
|
35
|
+
import FSCheckbox from "../FSCheckbox.vue";
|
|
36
|
+
import FSCard from "../FSCard.vue";
|
|
37
37
|
|
|
38
38
|
export default defineComponent({
|
|
39
39
|
name: "FSTile",
|
|
@@ -62,8 +62,9 @@ export default defineComponent({
|
|
|
62
62
|
emits: ["update:modelValue"],
|
|
63
63
|
setup(props) {
|
|
64
64
|
const { isMobileSized } = useBreakpoints();
|
|
65
|
+
const { getGradients } = useColors();
|
|
65
66
|
|
|
66
|
-
const bottomColors = computed(() =>
|
|
67
|
+
const bottomColors = computed(() => getGradients(props.bottomColor));
|
|
67
68
|
|
|
68
69
|
const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
|
|
69
70
|
return {
|
package/composables/index.ts
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ref, Ref } from "vue";
|
|
2
|
+
|
|
3
|
+
export const useDebounce = () => {
|
|
4
|
+
const timeOutId: Ref<NodeJS.Timeout | null> = ref(null);
|
|
5
|
+
|
|
6
|
+
const debounce = (callback: Function, wait: number, ...args: any[]): void => {
|
|
7
|
+
cancel();
|
|
8
|
+
timeOutId.value = setTimeout(() => callback(...args), wait);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const cancel = (): void => {
|
|
12
|
+
if (timeOutId.value) {
|
|
13
|
+
clearTimeout(timeOutId.value);
|
|
14
|
+
timeOutId.value = null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
debounce,
|
|
20
|
+
cancel
|
|
21
|
+
};
|
|
22
|
+
}
|
package/models/rules.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
2
|
+
import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
2
3
|
|
|
3
4
|
const { epochToLongDateFormat } = useTimeZone()!;
|
|
4
5
|
const { $tr } = useTranslationsProvider();
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
|
-
"
|
|
3
|
+
"sideEffects": false,
|
|
4
|
+
"version": "0.0.12",
|
|
4
5
|
"description": "",
|
|
5
6
|
"publishConfig": {
|
|
6
7
|
"access": "public"
|
|
@@ -9,9 +10,10 @@
|
|
|
9
10
|
"author": "",
|
|
10
11
|
"license": "ISC",
|
|
11
12
|
"dependencies": {
|
|
12
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
13
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "0.0.12",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.12",
|
|
14
15
|
"@fontsource/montserrat": "^5.0.16",
|
|
16
|
+
"@lexical/clipboard": "^0.12.5",
|
|
15
17
|
"@lexical/history": "^0.12.5",
|
|
16
18
|
"@lexical/link": "^0.12.5",
|
|
17
19
|
"@lexical/plain-text": "^0.12.5",
|
|
@@ -30,5 +32,5 @@
|
|
|
30
32
|
"sass": "^1.69.5",
|
|
31
33
|
"sass-loader": "^13.3.2"
|
|
32
34
|
},
|
|
33
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "73c686b3b0343ac4b42d34c2aa7cf7604ad0d298"
|
|
34
36
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
.fs-load-data-table {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.fs-load-data-table .fs-row:first-of-type .v-skeleton-loader__button {
|
|
6
|
+
margin: 0;
|
|
7
|
+
|
|
8
|
+
@include web {
|
|
9
|
+
height: 40px !important;
|
|
10
|
+
min-width: 40px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@include mobile {
|
|
14
|
+
height: 36px !important;
|
|
15
|
+
min-width: 36px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.fs-load-data-table .fs-row:first-of-type .v-skeleton-loader:first-of-type {
|
|
20
|
+
@include web {
|
|
21
|
+
min-width: calc(50% - 132px);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@include mobile {
|
|
25
|
+
min-width: calc(50% - 124px);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
& .v-skeleton-loader__button {
|
|
29
|
+
min-width: 100%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.fs-load-data-table .fs-row:nth-of-type(2) .v-skeleton-loader__chip {
|
|
34
|
+
margin: 0;
|
|
35
|
+
border-radius: 50px !important;
|
|
36
|
+
min-width: 10vw;
|
|
37
|
+
|
|
38
|
+
@include web {
|
|
39
|
+
height: 24px !important;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@include mobile {
|
|
43
|
+
height: 20px !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.fs-load-data-table .v-skeleton-loader:has(.v-skeleton-loader__table-row-divider),
|
|
48
|
+
.fs-load-data-table .v-skeleton-loader:has(.v-skeleton-loader__table-thead) {
|
|
49
|
+
background-color: var(--fs-load-tile-background-color);
|
|
50
|
+
min-width: 100%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.fs-load-data-table .v-skeleton-loader__table-row {
|
|
54
|
+
margin: 0 -8px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.fs-load-data-table .fs-row:last-of-type .v-skeleton-loader__button {
|
|
58
|
+
margin: 0;
|
|
59
|
+
|
|
60
|
+
@include web {
|
|
61
|
+
height: 40px !important;
|
|
62
|
+
min-width: 40px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@include mobile {
|
|
66
|
+
height: 36px !important;
|
|
67
|
+
min-width: 36px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.fs-load-data-table .fs-row:last-of-type .v-skeleton-loader:first-of-type {
|
|
72
|
+
min-width: 120px;
|
|
73
|
+
|
|
74
|
+
& .v-skeleton-loader__button {
|
|
75
|
+
min-width: 100%;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
.fs-pagination {
|
|
2
|
+
height: 4px;
|
|
3
|
+
min-width: 12%;
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
background-color: var(--fs-pagination-background-color);
|
|
6
|
+
transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
7
|
+
|
|
8
|
+
&.fs-pagination-active {
|
|
9
|
+
background-color: var(--fs-pagination-active-background-color);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
@import "fs_icon_field.scss";
|
|
24
24
|
@import "fs_icon.scss";
|
|
25
25
|
@import "fs_image.scss";
|
|
26
|
+
@import "fs_link.scss";
|
|
27
|
+
@import "fs_load_data_table.scss";
|
|
26
28
|
@import "fs_load_tile.scss";
|
|
29
|
+
@import "fs_pagination.scss";
|
|
27
30
|
@import "fs_password_field.scss";
|
|
28
31
|
@import "fs_radio.scss";
|
|
29
32
|
@import "fs_rich_text_field.scss";
|