@dative-gpi/foundation-shared-components 0.0.49 → 0.0.50

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.
@@ -62,7 +62,7 @@
62
62
  <script lang="ts">
63
63
  import { computed, defineComponent, PropType, ref } from "vue";
64
64
 
65
- import { useTimeZone, useLanguageCode } from "@dative-gpi/foundation-shared-services/composables";
65
+ import { useAppTimeZone, useAppLanguageCode } from "@dative-gpi/foundation-shared-services/composables";
66
66
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
67
67
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
68
68
 
@@ -103,8 +103,8 @@ export default defineComponent({
103
103
  },
104
104
  emits: ["update:modelValue"],
105
105
  setup(props) {
106
- const { epochToPicker, pickerToEpoch, todayToEpoch } = useTimeZone();
107
- const { languageCode } = useLanguageCode();
106
+ const { epochToPicker, pickerToEpoch, todayToEpoch } = useAppTimeZone();
107
+ const { languageCode } = useAppLanguageCode();
108
108
  const { getColors } = useColors();
109
109
 
110
110
  const colors = computed(() => getColors(props.color));
@@ -102,7 +102,7 @@
102
102
  <script lang="ts">
103
103
  import { computed, defineComponent, onMounted, PropType, ref } from "vue";
104
104
 
105
- import { useTimeZone, useLanguageCode } from "@dative-gpi/foundation-shared-services/composables";
105
+ import { useAppTimeZone, useAppLanguageCode } from "@dative-gpi/foundation-shared-services/composables";
106
106
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
107
107
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
108
108
 
@@ -143,8 +143,8 @@ export default defineComponent({
143
143
  },
144
144
  emits: ["update:modelValue"],
145
145
  setup(props, { emit }) {
146
- const { epochToPicker, epochToPickerHeader, pickerToEpoch, todayToEpoch } = useTimeZone();
147
- const { languageCode } = useLanguageCode();
146
+ const { epochToPicker, epochToPickerHeader, pickerToEpoch, todayToEpoch } = useAppTimeZone();
147
+ const { languageCode } = useAppLanguageCode();
148
148
  const { getColors } = useColors();
149
149
 
150
150
  const colors = computed(() => getColors(props.color));
@@ -73,7 +73,7 @@
73
73
  import { computed, defineComponent, PropType, ref, watch } from "vue";
74
74
 
75
75
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
76
- import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
76
+ import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
77
77
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
78
78
 
79
79
  import FSSlider from "./FSSlider.vue";
@@ -123,7 +123,7 @@ export default defineComponent({
123
123
  },
124
124
  emits: ["update:modelValue"],
125
125
  setup(props, { emit }) {
126
- const { epochToLongDateFormat } = useTimeZone();
126
+ const { epochToLongDateFormat } = useAppTimeZone();
127
127
  const { getColors } = useColors();
128
128
 
129
129
  const colors = computed(() => getColors(props.color));
@@ -0,0 +1,128 @@
1
+ <template>
2
+ <FSRow
3
+ width="fill"
4
+ gap="24px"
5
+ >
6
+ <FSCard
7
+ class="fs-edit-image"
8
+ :borderRadius="$props.borderRadius"
9
+ :padding="$props.padding"
10
+ >
11
+ <FSImage
12
+ :borderRadius="$props.borderRadius"
13
+ :aspectRatio="$props.aspectRatio"
14
+ :height="$props.height"
15
+ :imageB64="realSource"
16
+ :width="$props.width"
17
+ />
18
+ </FSCard>
19
+ <FSCol
20
+ height="fill"
21
+ align="bottom-left"
22
+ >
23
+ <FSText
24
+ v-if="fileSelected"
25
+ font="text-body"
26
+ >
27
+ {{ fileSelected.fileName }}
28
+ </FSText>
29
+ <FSRow>
30
+ <FSButtonFileIcon
31
+ accept="image/*"
32
+ :readFile="false"
33
+ @update:modelValue="onUpload"
34
+ />
35
+ <FSButtonRemoveIcon
36
+ @click="onRemove"
37
+ />
38
+ </FSRow>
39
+ </FSCol>
40
+ </FSRow>
41
+ </template>
42
+
43
+ <script lang="ts">
44
+ import { computed, defineComponent, PropType, ref } from "vue";
45
+
46
+ import { useFiles } from "@dative-gpi/foundation-shared-components/composables";
47
+ import { FileImage } from "@dative-gpi/foundation-shared-components/models";
48
+
49
+ import FSButtonRemoveIcon from "./buttons/FSButtonRemoveIcon.vue";
50
+ import FSButtonFileIcon from "./buttons/FSButtonFileIcon.vue";
51
+ import FSImage from "./FSImage.vue";
52
+ import FSCard from "./FSCard.vue";
53
+ import FSText from "./FSText.vue";
54
+
55
+ export default defineComponent({
56
+ name: "FSEditImage",
57
+ components: {
58
+ FSButtonRemoveIcon,
59
+ FSButtonFileIcon,
60
+ FSImage,
61
+ FSCard,
62
+ FSText
63
+ },
64
+ props: {
65
+ padding: {
66
+ type: [String, Number],
67
+ required: false,
68
+ default: "8px"
69
+ },
70
+ width: {
71
+ type: [String, Number],
72
+ required: false,
73
+ default: null
74
+ },
75
+ height: {
76
+ type: [String, Number],
77
+ required: false,
78
+ default: null
79
+ },
80
+ aspectRatio: {
81
+ type: String,
82
+ required: false,
83
+ default: null
84
+ },
85
+ borderRadius: {
86
+ type: [String, Number],
87
+ required: false,
88
+ default: "4px"
89
+ },
90
+ modelValue: {
91
+ type: String as PropType<string>,
92
+ required: false,
93
+ default: null
94
+ }
95
+ },
96
+ emits: ["update:modelValue"],
97
+ setup(props, { emit }) {
98
+ const { read } = useFiles();
99
+
100
+ const fileSelected = ref<FileImage>({ fileName: "", fileContent: null });
101
+
102
+ const realSource = computed(() => {
103
+ return fileSelected.value && fileSelected.value.fileName ? fileSelected.value.fileContent : props.modelValue;
104
+ });
105
+
106
+ const onUpload = (payload: File) => {
107
+ read(payload, (content: string) => {
108
+ fileSelected.value.fileName = payload.name;
109
+ fileSelected.value.fileContent = content;
110
+ emit("update:modelValue", content);
111
+ });
112
+ };
113
+
114
+ const onRemove = () => {
115
+ fileSelected.value.fileName = "";
116
+ fileSelected.value.fileContent = null;
117
+ emit("update:modelValue", null);
118
+ };
119
+
120
+ return {
121
+ fileSelected,
122
+ realSource,
123
+ onUpload,
124
+ onRemove
125
+ };
126
+ }
127
+ });
128
+ </script>
@@ -54,6 +54,11 @@ export default defineComponent({
54
54
  required: false,
55
55
  default: null
56
56
  },
57
+ imageB64: {
58
+ type: String,
59
+ required: false,
60
+ default: null
61
+ },
57
62
  cover: {
58
63
  type: Boolean,
59
64
  required: false,
@@ -86,6 +91,14 @@ export default defineComponent({
86
91
  const imageRef = ref(null);
87
92
  const canvasRef = ref(null);
88
93
 
94
+ const signatures = ref<{ [key: string]: string }>({
95
+ JVBERi0 : "application/pdf",
96
+ R0lGODdh : "image/gif",
97
+ R0lGODlh : "image/gif",
98
+ iVBORw0KGgo: "image/png",
99
+ "/9j/" : "image/jpg",
100
+ });
101
+
89
102
  const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
90
103
  return {
91
104
  "--fs-image-border-radius" : sizeToVar(props.borderRadius),
@@ -98,7 +111,7 @@ export default defineComponent({
98
111
  return props.height;
99
112
  }
100
113
  if (props.width) {
101
- if (typeof(props.width) === "string") {
114
+ if (typeof (props.width) === "string") {
102
115
  return undefined;
103
116
  }
104
117
  if (props.aspectRatio) {
@@ -117,7 +130,7 @@ export default defineComponent({
117
130
  return props.width;
118
131
  }
119
132
  if (props.height) {
120
- if (typeof(props.height) === "string") {
133
+ if (typeof (props.height) === "string") {
121
134
  return undefined;
122
135
  }
123
136
  if (props.aspectRatio) {
@@ -135,12 +148,38 @@ export default defineComponent({
135
148
  if (props.imageId) {
136
149
  return IMAGE_RAW_URL(props.imageId);
137
150
  }
151
+ else if (props.imageB64) {
152
+ if (imageType.value && imageData.value) {
153
+ return `${imageType.value},${imageData.value}`;
154
+ }
155
+ }
138
156
  return null;
139
157
  });
140
158
 
159
+ const imageData = computed((): string => {
160
+ if (props.imageB64 && props.imageB64.includes(",")) {
161
+ return props.imageB64.split(",")[1];
162
+ }
163
+ return props.imageB64;
164
+ });
165
+
166
+ const imageType = computed((): string => {
167
+ if (props.imageB64 && props.imageB64.includes(",")) {
168
+ return props.imageB64.split(",")[0];
169
+ }
170
+ if (props.imageB64) {
171
+ for (const s in signatures.value) {
172
+ if (props.imageB64.startsWith(s)) {
173
+ return `data:${signatures.value[s]};base64`;
174
+ }
175
+ }
176
+ }
177
+ return "";
178
+ });
179
+
141
180
  const onError = (): void => {
142
181
  if (props.imageId) {
143
- fetchBlurHash(props.imageId);
182
+ fetchBlurHash(props.imageId);
144
183
  }
145
184
  };
146
185
 
@@ -22,6 +22,7 @@
22
22
  <script lang="ts">
23
23
  import { defineComponent, ref } from "vue";
24
24
 
25
+ import { useFiles } from "@dative-gpi/foundation-shared-components/composables";
25
26
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
26
27
 
27
28
  import FSButton from "../FSButton.vue";
@@ -44,7 +45,9 @@ export default defineComponent({
44
45
  }
45
46
  },
46
47
  emits: ["update:modelValue"],
47
- setup(props, { emit }) {
48
+ setup(props, { emit }) {
49
+ const { read } = useFiles();
50
+
48
51
  const input = ref(null);
49
52
 
50
53
  const clear = () => {
@@ -65,12 +68,9 @@ export default defineComponent({
65
68
  clear();
66
69
  }
67
70
  else {
68
- const reader = new FileReader();
69
- reader.addEventListener("load", (fileEv) => {
70
- emit("update:modelValue", fileEv.target && fileEv.target.result);
71
- clear();
71
+ read(file, (content: string) => {
72
+ emit("update:modelValue", content);
72
73
  });
73
- reader.readAsDataURL(file);
74
74
  }
75
75
  };
76
76
 
@@ -22,6 +22,7 @@
22
22
  <script lang="ts">
23
23
  import { defineComponent, ref } from "vue";
24
24
 
25
+ import { useFiles } from "@dative-gpi/foundation-shared-components/composables";
25
26
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
26
27
 
27
28
  import FSButton from "../FSButton.vue";
@@ -44,7 +45,9 @@ export default defineComponent({
44
45
  }
45
46
  },
46
47
  emits: ["update:modelValue"],
47
- setup(props, { emit }) {
48
+ setup(props, { emit }) {
49
+ const { read } = useFiles();
50
+
48
51
  const input = ref(null);
49
52
 
50
53
  const clear = () => {
@@ -65,12 +68,9 @@ export default defineComponent({
65
68
  clear();
66
69
  }
67
70
  else {
68
- const reader = new FileReader();
69
- reader.addEventListener("load", (fileEv) => {
70
- emit("update:modelValue", fileEv.target && fileEv.target.result);
71
- clear();
71
+ read(file, (content: string) => {
72
+ emit("update:modelValue", content);
72
73
  });
73
- reader.readAsDataURL(file);
74
74
  }
75
75
  };
76
76
 
@@ -21,6 +21,7 @@
21
21
  <script lang="ts">
22
22
  import { defineComponent, ref } from "vue";
23
23
 
24
+ import { useFiles } from "@dative-gpi/foundation-shared-components/composables";
24
25
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
25
26
 
26
27
  import FSButton from "../FSButton.vue";
@@ -43,7 +44,9 @@ export default defineComponent({
43
44
  }
44
45
  },
45
46
  emits: ["update:modelValue"],
46
- setup(props, { emit }) {
47
+ setup(props, { emit }) {
48
+ const { read } = useFiles();
49
+
47
50
  const input = ref(null);
48
51
 
49
52
  const clear = () => {
@@ -64,12 +67,9 @@ export default defineComponent({
64
67
  clear();
65
68
  }
66
69
  else {
67
- const reader = new FileReader();
68
- reader.addEventListener("load", (fileEv) => {
69
- emit("update:modelValue", fileEv.target && fileEv.target.result);
70
- clear();
70
+ read(file, (content: string) => {
71
+ emit("update:modelValue", content);
71
72
  });
72
- reader.readAsDataURL(file);
73
73
  }
74
74
  };
75
75
 
@@ -21,6 +21,7 @@
21
21
  <script lang="ts">
22
22
  import { defineComponent, ref } from "vue";
23
23
 
24
+ import { useFiles } from "@dative-gpi/foundation-shared-components/composables";
24
25
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
25
26
 
26
27
  import FSButton from "../FSButton.vue";
@@ -43,7 +44,9 @@ export default defineComponent({
43
44
  }
44
45
  },
45
46
  emits: ["update:modelValue"],
46
- setup(props, { emit }) {
47
+ setup(props, { emit }) {
48
+ const { read } = useFiles();
49
+
47
50
  const input = ref(null);
48
51
 
49
52
  const clear = () => {
@@ -64,12 +67,9 @@ export default defineComponent({
64
67
  clear();
65
68
  }
66
69
  else {
67
- const reader = new FileReader();
68
- reader.addEventListener("load", (fileEv) => {
69
- emit("update:modelValue", fileEv.target && fileEv.target.result);
70
- clear();
70
+ read(file, (content: string) => {
71
+ emit("update:modelValue", content);
71
72
  });
72
- reader.readAsDataURL(file);
73
73
  }
74
74
  };
75
75
 
@@ -44,7 +44,7 @@ import { computed, defineComponent, PropType } from "vue";
44
44
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
45
45
  import { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
46
46
  import { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/models";
47
- import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
47
+ import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
48
48
 
49
49
  import FSCard from "../FSCard.vue";
50
50
  import FSChip from "../FSChip.vue";
@@ -70,7 +70,7 @@ export default defineComponent({
70
70
  }
71
71
  },
72
72
  setup(props) {
73
- const { epochToLongTimeFormat } = useTimeZone();
73
+ const { epochToLongTimeFormat } = useAppTimeZone();
74
74
  const { $tr } = useTranslationsProvider();
75
75
 
76
76
  const connectivityLabel = computed((): string => {
@@ -54,7 +54,7 @@
54
54
  import { computed, defineComponent, PropType } from "vue";
55
55
 
56
56
  import { FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
57
- import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
57
+ import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
58
58
 
59
59
  import FSCard from "../FSCard.vue";
60
60
  import FSChip from "../FSChip.vue";
@@ -84,7 +84,7 @@ export default defineComponent({
84
84
  }
85
85
  },
86
86
  setup(props) {
87
- const { epochToLongTimeFormat } = useTimeZone();
87
+ const { epochToLongTimeFormat } = useAppTimeZone();
88
88
 
89
89
  const deviceTimestamp = computed((): string => {
90
90
  if (props.statusGroup.sourceTimestamp) {
@@ -43,7 +43,7 @@ import { computed, defineComponent, PropType, ref } from "vue";
43
43
 
44
44
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
45
45
  import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
46
- import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
46
+ import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
47
47
  import { FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
48
48
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
49
49
 
@@ -71,7 +71,7 @@ export default defineComponent({
71
71
  }
72
72
  },
73
73
  setup(props) {
74
- const { epochToLongTimeFormat } = useTimeZone();
74
+ const { epochToLongTimeFormat } = useAppTimeZone();
75
75
  const { $tr } = useTranslationsProvider();
76
76
 
77
77
  const criticityColor = computed(() => {
@@ -64,7 +64,7 @@ import { computed, defineComponent, PropType, ref } from "vue";
64
64
 
65
65
  import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
66
66
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
67
- import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
67
+ import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
68
68
 
69
69
  import FSTextField from "./FSTextField.vue";
70
70
  import FSCalendar from "../FSCalendar.vue";
@@ -126,7 +126,7 @@ export default defineComponent({
126
126
  emits: ["update:modelValue"],
127
127
  setup(props, { emit }) {
128
128
  const {validateOn, blurred, getMessages} = useRules();
129
- const { epochToLongDateFormat } = useTimeZone();
129
+ const { epochToLongDateFormat } = useAppTimeZone();
130
130
  const { getColors } = useColors();
131
131
 
132
132
  const errors = getColors(ColorEnum.Error);
@@ -51,7 +51,7 @@ import { computed, defineComponent, PropType, ref } from "vue";
51
51
 
52
52
  import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
53
53
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
54
- import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
54
+ import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
55
55
 
56
56
  import FSSubmitDialog from "../FSSubmitDialog.vue";
57
57
  import FSCalendarTwin from "../FSCalendarTwin.vue";
@@ -111,7 +111,7 @@ export default defineComponent({
111
111
  emits: ["update:modelValue"],
112
112
  setup(props, { emit }) {
113
113
  const { validateOn, blurred, getMessages } = useRules();
114
- const { epochToShortDateFormat } = useTimeZone();
114
+ const { epochToShortDateFormat } = useAppTimeZone();
115
115
  const { getColors } = useColors();
116
116
 
117
117
  const errors = getColors(ColorEnum.Error);
@@ -88,7 +88,7 @@ import { computed, defineComponent, PropType, ref, watch } from "vue";
88
88
 
89
89
  import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
90
90
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
91
- import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
91
+ import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
92
92
 
93
93
  import FSTextField from "./FSTextField.vue";
94
94
  import FSCalendar from "../FSCalendar.vue";
@@ -153,7 +153,7 @@ export default defineComponent({
153
153
  },
154
154
  emits: ["update:modelValue"],
155
155
  setup(props, { emit }) {
156
- const { getUserOffsetMillis, epochToLongTimeFormat } = useTimeZone();
156
+ const { getUserOffsetMillis, epochToLongTimeFormat } = useAppTimeZone();
157
157
  const { validateOn, blurred, getMessages } = useRules();
158
158
  const { getColors } = useColors();
159
159
 
@@ -77,7 +77,7 @@ import { computed, defineComponent, PropType, ref } from "vue";
77
77
 
78
78
  import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
79
79
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
80
- import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
80
+ import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
81
81
 
82
82
  import FSSubmitDialog from "../FSSubmitDialog.vue";
83
83
  import FSCalendarTwin from "../FSCalendarTwin.vue";
@@ -142,7 +142,7 @@ export default defineComponent({
142
142
  },
143
143
  emits: ["update:modelValue"],
144
144
  setup(props, { emit }) {
145
- const { getUserOffsetMillis, epochToShortTimeFormat } = useTimeZone();
145
+ const { getUserOffsetMillis, epochToShortTimeFormat } = useAppTimeZone();
146
146
  const { validateOn, blurred, getMessages } = useRules();
147
147
  const { getColors } = useColors();
148
148
 
@@ -5,16 +5,18 @@
5
5
  <FSRow
6
6
  align="bottom-center"
7
7
  >
8
- <FSSearchField
9
- prependInnerIcon="mdi-magnify"
10
- :hideHeader="true"
11
- v-model="innerSearch"
12
- />
13
- <FSButton
14
- prependIcon="mdi-filter-variant"
15
- :variant="showFilters ? 'full' : 'standard'"
16
- @click="showFilters = !showFilters"
17
- />
8
+ <template v-if="$props.showSearch">
9
+ <FSSearchField
10
+ prependInnerIcon="mdi-magnify"
11
+ :hideHeader="true"
12
+ v-model="innerSearch"
13
+ />
14
+ <FSButton
15
+ prependIcon="mdi-filter-variant"
16
+ :variant="showFilters ? 'full' : 'standard'"
17
+ @click="showFilters = !showFilters"
18
+ />
19
+ </template>
18
20
  <slot name="toolbar" />
19
21
  <v-spacer />
20
22
  <FSOptionGroup
@@ -25,7 +27,7 @@
25
27
  />
26
28
  </FSRow>
27
29
  <FSRow
28
- v-if="(showFilters && filterableHeaders.length > 0) || hiddenHeaders.length > 0"
30
+ v-if="showFiltersRow"
29
31
  >
30
32
  <template v-if="showFilters">
31
33
  <FSFilterButton
@@ -628,6 +630,11 @@ export default defineComponent({
628
630
  required: false,
629
631
  default: true
630
632
  },
633
+ showSearch: {
634
+ type: Boolean,
635
+ required: false,
636
+ default: true
637
+ },
631
638
  singleSelect: {
632
639
  type: Boolean,
633
640
  required: false,
@@ -703,6 +710,10 @@ export default defineComponent({
703
710
  { id: -1, label: $tr("ui.data-table.all-rows", "All") }
704
711
  ];
705
712
 
713
+ const showFiltersRow = computed((): boolean => {
714
+ return (props.showSearch && showFilters.value && filterableHeaders.value.length > 0) || hiddenHeaders.value.length > 0;
715
+ });
716
+
706
717
  const innerSlots = computed((): { [label: string]: Slot<any> } => {
707
718
  const slots = { ...useSlots().slots };
708
719
  delete slots["toolbar"];
@@ -1203,6 +1214,7 @@ export default defineComponent({
1203
1214
  innerPage,
1204
1215
  pageOptions,
1205
1216
  showFilters,
1217
+ showFiltersRow,
1206
1218
  extraHeaders,
1207
1219
  innerHeaders,
1208
1220
  hiddenHeaders,
@@ -1,19 +1,15 @@
1
1
  <template>
2
- <FSSelectField
3
- itemTitle="id"
2
+ <FSSelectField itemTitle="id"
4
3
  :items="timeZones"
5
4
  :modelValue="$props.modelValue"
6
5
  @update:modelValue="$emit('update:modelValue', $event)"
7
- v-bind="$attrs"
8
- >
6
+ v-bind="$attrs">
9
7
  <template #append-inner>
10
8
  <slot name="append-inner">
11
- <FSChip
12
- v-if="offset"
9
+ <FSChip v-if="offset"
13
10
  variant="standard"
14
11
  :color="ColorEnum.Dark"
15
- :label="offset"
16
- />
12
+ :label="offset" />
17
13
  </slot>
18
14
  </template>
19
15
  </FSSelectField>
@@ -45,7 +41,7 @@ export default defineComponent({
45
41
  setup(props) {
46
42
  const { getMany: getTimeZones, entities: timeZones } = useTimeZones();
47
43
 
48
- const offset = computed((): string => {
44
+ const offset = computed((): string | undefined => {
49
45
  return timeZones.value.find((entity) => entity.id === props.modelValue)?.offset;
50
46
  });
51
47
 
@@ -1,5 +1,6 @@
1
1
  export * from "./useBreakpoints";
2
2
  export * from "./useColors";
3
3
  export * from "./useDebounce";
4
+ export * from "./useFiles";
4
5
  export * from "./useRules";
5
6
  export * from "./useSlots";
@@ -0,0 +1,13 @@
1
+ export const useFiles = () => {
2
+ const read = (file: File, callback: Function): void => {
3
+ const reader = new FileReader();
4
+ reader.addEventListener("load", (fileEv) => {
5
+ callback(fileEv.target && fileEv.target.result);
6
+ });
7
+ reader.readAsDataURL(file);
8
+ };
9
+
10
+ return {
11
+ read
12
+ };
13
+ }
@@ -0,0 +1,4 @@
1
+ export interface FileImage {
2
+ fileName: string;
3
+ fileContent: string | ArrayBuffer | null;
4
+ }
package/models/index.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./deviceConnectivities";
5
5
  export * from "./deviceStatuses";
6
6
  export * from "./errors";
7
7
  export * from "./grids";
8
+ export * from "./images";
8
9
  export * from "./modelStatuses";
9
10
  export * from "./rules";
10
11
  export * from "./tables";
package/models/rules.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
2
- import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
2
+ import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
3
3
 
4
4
  import { getTimeBestString } from "../utils";
5
5
 
6
- const { epochToLongDateFormat } = useTimeZone()!;
6
+ const { epochToLongDateFormat } = useAppTimeZone()!;
7
7
  const { $tr } = useTranslationsProvider();
8
8
 
9
9
  export const TextRules = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "0.0.49",
4
+ "version": "0.0.50",
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": "0.0.49",
14
- "@dative-gpi/foundation-shared-services": "0.0.49",
13
+ "@dative-gpi/foundation-shared-domain": "0.0.50",
14
+ "@dative-gpi/foundation-shared-services": "0.0.50",
15
15
  "@fontsource/montserrat": "^5.0.16",
16
16
  "@lexical/clipboard": "^0.12.5",
17
17
  "@lexical/history": "^0.12.5",
@@ -32,5 +32,5 @@
32
32
  "sass": "^1.69.5",
33
33
  "sass-loader": "^13.3.2"
34
34
  },
35
- "gitHead": "cf285c38be7fcc0f02f813f2cb3693867d277003"
35
+ "gitHead": "be18a14ae47c91c1f3ccd22a196593050f06aae8"
36
36
  }
@@ -0,0 +1,3 @@
1
+ .fs-edit-image {
2
+ border-style: dashed;
3
+ }
@@ -19,6 +19,7 @@
19
19
  @import "fs_dialog.scss";
20
20
  @import "fs_divider.scss";
21
21
  @import "fs_draggable.scss";
22
+ @import "fs_edit_image.scss";
22
23
  @import "fs_error_toast.scss";
23
24
  @import "fs_fade_out.scss";
24
25
  @import "fs_filter_button.scss";