@dative-gpi/foundation-shared-components 1.0.108 → 1.0.110
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/FSCalendar.vue +50 -12
- package/components/FSCalendarTwin.vue +73 -14
- package/components/agenda/FSAgendaDialogCalendar.vue +1 -1
- package/components/agenda/FSAgendaHeader.vue +1 -1
- package/components/agenda/FSAgendaHorizontalEvent.vue +1 -1
- package/components/agenda/FSAgendaHoursRow.vue +31 -7
- package/components/agenda/FSAgendaVerticalEvent.vue +1 -1
- package/components/agenda/FSDayAgenda.vue +0 -1
- package/components/agenda/FSMonthAgenda.vue +1 -6
- package/components/agenda/FSWeekAgenda.vue +1 -6
- package/components/fields/FSMagicConfigField.vue +8 -1
- package/components/fields/FSMagicField.vue +5 -0
- package/components/selects/FSSelectDashboardVariableType.vue +2 -1
- package/components/selects/chartSelectors/FSAggregationSelector.vue +52 -0
- package/components/selects/chartSelectors/FSAxisTypeSelector.vue +49 -0
- package/components/selects/chartSelectors/FSDisplayAsSelector.vue +53 -0
- package/components/selects/chartSelectors/FSFilterTypeSelector.vue +54 -0
- package/components/selects/chartSelectors/FSHeatmapRuleSelector.vue +54 -0
- package/components/selects/chartSelectors/FSOperationOnSelector.vue +53 -0
- package/components/selects/chartSelectors/FSPlanningTypeSelector.vue +53 -0
- package/components/selects/chartSelectors/FSPlotPerSelector.vue +52 -0
- package/components/selects/chartSelectors/FSSelectEntityType.vue +59 -0
- package/components/selects/chartSelectors/FSSerieTypeSelector.vue +53 -0
- package/composables/useMagicFieldProvider.ts +1 -0
- package/models/magicFields.ts +1 -0
- package/package.json +4 -4
- package/styles/components/fs_agenda_hours_row.scss +0 -8
|
@@ -3,13 +3,20 @@
|
|
|
3
3
|
width="hug"
|
|
4
4
|
>
|
|
5
5
|
<FSRow>
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
<FSSelectField
|
|
7
|
+
:hideHeader="true"
|
|
8
|
+
:clearable="false"
|
|
9
|
+
:items="years"
|
|
10
|
+
v-model="innerYear"
|
|
11
|
+
/>
|
|
12
|
+
<FSRow
|
|
13
|
+
align="center-right"
|
|
10
14
|
>
|
|
11
|
-
|
|
12
|
-
|
|
15
|
+
<FSButton
|
|
16
|
+
:label="$tr('ui.calendar.today', 'Today')"
|
|
17
|
+
@click="onClickToday"
|
|
18
|
+
/>
|
|
19
|
+
</FSRow>
|
|
13
20
|
</FSRow>
|
|
14
21
|
<FSCol
|
|
15
22
|
class="fs-calendar"
|
|
@@ -71,6 +78,7 @@ import { useDateFormat, useAppLanguageCode } from "@dative-gpi/foundation-shared
|
|
|
71
78
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
72
79
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
73
80
|
|
|
81
|
+
import FSSelectField from "./fields/FSSelectField.vue";
|
|
74
82
|
import FSButton from "./FSButton.vue";
|
|
75
83
|
import FSSpan from "./FSSpan.vue";
|
|
76
84
|
import FSCol from "./FSCol.vue";
|
|
@@ -79,17 +87,13 @@ import FSRow from "./FSRow.vue";
|
|
|
79
87
|
export default defineComponent({
|
|
80
88
|
name: "FSCalendar",
|
|
81
89
|
components: {
|
|
90
|
+
FSSelectField,
|
|
82
91
|
FSButton,
|
|
83
92
|
FSSpan,
|
|
84
93
|
FSCol,
|
|
85
94
|
FSRow
|
|
86
95
|
},
|
|
87
96
|
props: {
|
|
88
|
-
label: {
|
|
89
|
-
type: String as PropType<string | null>,
|
|
90
|
-
required: false,
|
|
91
|
-
default: null
|
|
92
|
-
},
|
|
93
97
|
modelValue: {
|
|
94
98
|
type: Number as PropType<number | null>,
|
|
95
99
|
required: false,
|
|
@@ -117,13 +121,14 @@ export default defineComponent({
|
|
|
117
121
|
|
|
118
122
|
const colors = computed(() => getColors(props.color));
|
|
119
123
|
const backgrounds = getColors(ColorEnum.Background);
|
|
124
|
+
const lights = getColors(ColorEnum.Light);
|
|
120
125
|
const darks = getColors(ColorEnum.Dark);
|
|
121
126
|
|
|
122
127
|
const style = computed((): StyleValue => ({
|
|
123
128
|
"--fs-calendar-background-color" : backgrounds.base,
|
|
124
129
|
"--fs-calendar-hover-background-color" : colors.value.light,
|
|
125
130
|
"--fs-calendar-active-background-color": colors.value.base,
|
|
126
|
-
"--fs-calendar-border-color" :
|
|
131
|
+
"--fs-calendar-border-color" : lights.dark,
|
|
127
132
|
"--fs-calendar-hover-border-color" : colors.value.base,
|
|
128
133
|
"--fs-calendar-active-border-color" : colors.value.base,
|
|
129
134
|
"--fs-calendar-color" : darks.base,
|
|
@@ -138,6 +143,28 @@ export default defineComponent({
|
|
|
138
143
|
return new Intl.DateTimeFormat(languageCode.value, { month: "long", year: "numeric" }).format(date);
|
|
139
144
|
});
|
|
140
145
|
|
|
146
|
+
const years = computed((): any[] => {
|
|
147
|
+
const years = [];
|
|
148
|
+
switch (props.limit) {
|
|
149
|
+
case "past":
|
|
150
|
+
for (let i = 1900; i < new Date().getFullYear(); i++) {
|
|
151
|
+
years.push({ label: i.toString(), id: i });
|
|
152
|
+
}
|
|
153
|
+
break;
|
|
154
|
+
case "future":
|
|
155
|
+
for (let i = new Date().getFullYear(); i < 2100; i++) {
|
|
156
|
+
years.push({ label: i.toString(), id: i });
|
|
157
|
+
}
|
|
158
|
+
break;
|
|
159
|
+
default:
|
|
160
|
+
for (let i = 1900; i < 2100; i++) {
|
|
161
|
+
years.push({ label: i.toString(), id: i });
|
|
162
|
+
}
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
return years;
|
|
166
|
+
});
|
|
167
|
+
|
|
141
168
|
const onClickPrevious = (): void => {
|
|
142
169
|
if (innerMonth.value > 0) {
|
|
143
170
|
innerMonth.value--;
|
|
@@ -165,6 +192,15 @@ export default defineComponent({
|
|
|
165
192
|
emit("update:modelValue", pickerToEpoch(value[0]));
|
|
166
193
|
};
|
|
167
194
|
|
|
195
|
+
const onClickToday = (): void => {
|
|
196
|
+
const today = new Date();
|
|
197
|
+
innerMonth.value = today.getMonth();
|
|
198
|
+
innerYear.value = today.getFullYear();
|
|
199
|
+
|
|
200
|
+
today.setHours(0, 0, 0, 0);
|
|
201
|
+
emit("update:modelValue", pickerToEpoch(today));
|
|
202
|
+
};
|
|
203
|
+
|
|
168
204
|
const allowedDates = (value: unknown): boolean => {
|
|
169
205
|
if (!(value instanceof Date)) {
|
|
170
206
|
return false;
|
|
@@ -190,11 +226,13 @@ export default defineComponent({
|
|
|
190
226
|
text,
|
|
191
227
|
innerMonth,
|
|
192
228
|
innerYear,
|
|
229
|
+
years,
|
|
193
230
|
epochToPicker,
|
|
194
231
|
pickerToEpoch,
|
|
195
232
|
onClickPrevious,
|
|
196
233
|
onClickNext,
|
|
197
234
|
onClickDate,
|
|
235
|
+
onClickToday,
|
|
198
236
|
allowedDates
|
|
199
237
|
};
|
|
200
238
|
}
|
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
<FSCol
|
|
3
3
|
width="hug"
|
|
4
4
|
>
|
|
5
|
-
<FSRow
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
<FSRow>
|
|
6
|
+
<FSSelectField
|
|
7
|
+
:hideHeader="true"
|
|
8
|
+
:clearable="false"
|
|
9
|
+
:items="years"
|
|
10
|
+
:modelValue="innerLeftYear"
|
|
11
|
+
@update:modelValue="onChangeYear"
|
|
12
|
+
/>
|
|
13
|
+
<FSRow
|
|
14
|
+
align="center-right"
|
|
11
15
|
>
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
<FSButton
|
|
17
|
+
:label="$tr('ui.calendar.today', 'Today')"
|
|
18
|
+
@click="onClickToday"
|
|
19
|
+
/>
|
|
20
|
+
</FSRow>
|
|
14
21
|
</FSRow>
|
|
15
22
|
<FSRow
|
|
16
23
|
class="fs-calendar-twin"
|
|
@@ -118,6 +125,7 @@ import { useDateFormat, useAppLanguageCode } from "@dative-gpi/foundation-shared
|
|
|
118
125
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
119
126
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
120
127
|
|
|
128
|
+
import FSSelectField from "./fields/FSSelectField.vue";
|
|
121
129
|
import FSButton from "./FSButton.vue";
|
|
122
130
|
import FSSpan from "./FSSpan.vue";
|
|
123
131
|
import FSCol from "./FSCol.vue";
|
|
@@ -126,17 +134,13 @@ import FSRow from "./FSRow.vue";
|
|
|
126
134
|
export default defineComponent({
|
|
127
135
|
name: "FSCalendarTwin",
|
|
128
136
|
components: {
|
|
137
|
+
FSSelectField,
|
|
129
138
|
FSButton,
|
|
130
139
|
FSSpan,
|
|
131
140
|
FSCol,
|
|
132
141
|
FSRow
|
|
133
142
|
},
|
|
134
143
|
props: {
|
|
135
|
-
label: {
|
|
136
|
-
type: String as PropType<string | null>,
|
|
137
|
-
required: false,
|
|
138
|
-
default: null
|
|
139
|
-
},
|
|
140
144
|
modelValue: {
|
|
141
145
|
type: Array as PropType<number[] | null>,
|
|
142
146
|
required: false,
|
|
@@ -167,13 +171,14 @@ export default defineComponent({
|
|
|
167
171
|
|
|
168
172
|
const colors = computed(() => getColors(props.color));
|
|
169
173
|
const backgrounds = getColors(ColorEnum.Background);
|
|
174
|
+
const lights = getColors(ColorEnum.Light);
|
|
170
175
|
const darks = getColors(ColorEnum.Dark);
|
|
171
176
|
|
|
172
177
|
const style = computed((): StyleValue => ({
|
|
173
178
|
"--fs-calendar-background-color" : backgrounds.base,
|
|
174
179
|
"--fs-calendar-hover-background-color" : colors.value.light,
|
|
175
180
|
"--fs-calendar-active-background-color": colors.value.base,
|
|
176
|
-
"--fs-calendar-border-color" :
|
|
181
|
+
"--fs-calendar-border-color" : lights.dark,
|
|
177
182
|
"--fs-calendar-hover-border-color" : colors.value.base,
|
|
178
183
|
"--fs-calendar-active-border-color" : colors.value.base,
|
|
179
184
|
"--fs-calendar-color" : darks.base,
|
|
@@ -259,6 +264,28 @@ export default defineComponent({
|
|
|
259
264
|
return classNames;
|
|
260
265
|
});
|
|
261
266
|
|
|
267
|
+
const years = computed((): any[] => {
|
|
268
|
+
const years = [];
|
|
269
|
+
switch (props.limit) {
|
|
270
|
+
case "past":
|
|
271
|
+
for (let i = 1900; i < new Date().getFullYear(); i++) {
|
|
272
|
+
years.push({ label: i.toString(), id: i });
|
|
273
|
+
}
|
|
274
|
+
break;
|
|
275
|
+
case "future":
|
|
276
|
+
for (let i = new Date().getFullYear(); i < 2100; i++) {
|
|
277
|
+
years.push({ label: i.toString(), id: i });
|
|
278
|
+
}
|
|
279
|
+
break;
|
|
280
|
+
default:
|
|
281
|
+
for (let i = 1900; i < 2100; i++) {
|
|
282
|
+
years.push({ label: i.toString(), id: i });
|
|
283
|
+
}
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
return years;
|
|
287
|
+
});
|
|
288
|
+
|
|
262
289
|
const compare = (operator: "before" | "during" | "after", side: "left" | "right", date: { d: number, m: number, y: number }): boolean => {
|
|
263
290
|
switch (operator) {
|
|
264
291
|
case "before":
|
|
@@ -359,6 +386,35 @@ export default defineComponent({
|
|
|
359
386
|
}
|
|
360
387
|
};
|
|
361
388
|
|
|
389
|
+
const onClickToday = (): void => {
|
|
390
|
+
const today = new Date();
|
|
391
|
+
innerLeftMonth.value = today.getMonth();
|
|
392
|
+
innerLeftYear.value = today.getFullYear();
|
|
393
|
+
|
|
394
|
+
if (innerLeftMonth.value === 11) {
|
|
395
|
+
innerRightMonth.value = 0;
|
|
396
|
+
innerRightYear.value = innerLeftYear.value + 1;
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
innerRightMonth.value = innerLeftMonth.value + 1;
|
|
400
|
+
innerRightYear.value = innerLeftYear.value;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
today.setHours(0, 0, 0, 0);
|
|
404
|
+
emit("update:modelValue", [pickerToEpoch(today), pickerToEpoch(today)]);
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
const onChangeYear = (value: number): void => {
|
|
408
|
+
if (innerRightYear.value !== innerLeftYear.value) {
|
|
409
|
+
innerLeftYear.value = value;
|
|
410
|
+
innerRightYear.value = value + 1;
|
|
411
|
+
}
|
|
412
|
+
else {
|
|
413
|
+
innerLeftYear.value = value;
|
|
414
|
+
innerRightYear.value = value;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
362
418
|
const allowedDates = (value: unknown): boolean => {
|
|
363
419
|
if (!(value instanceof Date)) {
|
|
364
420
|
return false;
|
|
@@ -411,11 +467,14 @@ export default defineComponent({
|
|
|
411
467
|
innerRightMonth,
|
|
412
468
|
innerRightYear,
|
|
413
469
|
innerRightValue,
|
|
470
|
+
years,
|
|
414
471
|
epochToPicker,
|
|
415
472
|
onClickPrevious,
|
|
416
473
|
onClickNext,
|
|
417
474
|
onClickLeft,
|
|
418
475
|
onClickRight,
|
|
476
|
+
onClickToday,
|
|
477
|
+
onChangeYear,
|
|
419
478
|
allowedDates
|
|
420
479
|
};
|
|
421
480
|
}
|
|
@@ -134,7 +134,7 @@ export default defineComponent({
|
|
|
134
134
|
const width = computed(() => {
|
|
135
135
|
let start = props.start - dayDurationOffset.value;
|
|
136
136
|
let end = props.end - dayDurationOffset.value;
|
|
137
|
-
if(props.variant === 'current') {
|
|
137
|
+
if(props.variant === 'current' && dayEnd.value > props.now) {
|
|
138
138
|
end = props.now;
|
|
139
139
|
} else if (props.end > dayEnd.value) {
|
|
140
140
|
end = dayEnd.value - dayDurationOffset.value;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
gap="0"
|
|
4
4
|
>
|
|
5
5
|
<FSRow
|
|
6
|
+
:padding="`0 ${paddingRightHours} 0 ${paddingLeftHours}`"
|
|
6
7
|
class="fs-agenda-hours-row"
|
|
7
8
|
:wrap="false"
|
|
8
9
|
gap="0"
|
|
9
10
|
align="center-center"
|
|
10
|
-
:style="style"
|
|
11
11
|
>
|
|
12
12
|
<FSRow
|
|
13
13
|
v-for="hour in hours"
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
</FSRow>
|
|
38
38
|
</FSRow>
|
|
39
39
|
<FSRow
|
|
40
|
+
:padding="`0 ${paddingRightMarkers} 0 ${paddingLeftMarkers}`"
|
|
40
41
|
class="fs-agenda-hours-row-markers"
|
|
41
42
|
:wrap="false"
|
|
42
43
|
gap="0"
|
|
@@ -88,8 +89,12 @@ export default defineComponent({
|
|
|
88
89
|
required: false,
|
|
89
90
|
default: false,
|
|
90
91
|
},
|
|
92
|
+
firstColumnWidth: {
|
|
93
|
+
type: String,
|
|
94
|
+
required: true,
|
|
95
|
+
},
|
|
91
96
|
},
|
|
92
|
-
setup() {
|
|
97
|
+
setup(props) {
|
|
93
98
|
const { getColors } = useColors();
|
|
94
99
|
const { isMobileSized } = useBreakpoints();
|
|
95
100
|
|
|
@@ -108,12 +113,27 @@ export default defineComponent({
|
|
|
108
113
|
return Array.from({ length: hoursToShow.value }, (_, i) => i * (24 / hoursToShow.value));
|
|
109
114
|
});
|
|
110
115
|
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
116
|
+
const paddingLeftHours = computed(() => {
|
|
117
|
+
// ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}) is the width of each hour slot (2 hour if 12 hours are shown, 1 hour if 24 hours are shown)
|
|
118
|
+
// 0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}) is half of the width of each hour slot
|
|
119
|
+
// So we have : ${props.firstColumnWidth} - Half of the width of each hour slot
|
|
120
|
+
return `calc(${props.firstColumnWidth} - 0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}))`;
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
const paddingRightHours = computed(() => {
|
|
124
|
+
return `calc(0.5 * ((100% - ${props.firstColumnWidth}) / ${hoursToShow.value}))`;
|
|
115
125
|
});
|
|
116
126
|
|
|
127
|
+
const paddingLeftMarkers = computed(() => {
|
|
128
|
+
return `calc(${props.firstColumnWidth} - 0.5 * ((100% - ${props.firstColumnWidth}) / 24))`;
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
const paddingRightMarkers = computed(() => {
|
|
132
|
+
return `calc(0.5 * ((100% - ${props.firstColumnWidth}) / 24))`;
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
117
137
|
const getMarkerStyle = (isNowHour: boolean): StyleValue => {
|
|
118
138
|
if(isNowHour) {
|
|
119
139
|
return {
|
|
@@ -129,8 +149,12 @@ export default defineComponent({
|
|
|
129
149
|
|
|
130
150
|
return {
|
|
131
151
|
hours,
|
|
132
|
-
style,
|
|
133
152
|
fontColor,
|
|
153
|
+
hoursToShow,
|
|
154
|
+
paddingLeftHours,
|
|
155
|
+
paddingRightHours,
|
|
156
|
+
paddingLeftMarkers,
|
|
157
|
+
paddingRightMarkers,
|
|
134
158
|
getMarkerStyle,
|
|
135
159
|
to2Digits
|
|
136
160
|
};
|
|
@@ -131,7 +131,7 @@ export default defineComponent({
|
|
|
131
131
|
const height = computed(() => {
|
|
132
132
|
let start = props.start - dayDurationOffset.value;
|
|
133
133
|
let end = props.end - dayDurationOffset.value;
|
|
134
|
-
if (props.variant === 'current') {
|
|
134
|
+
if (props.variant === 'current' && dayEnd.value > props.now) {
|
|
135
135
|
end = props.now;
|
|
136
136
|
} else if (props.end > dayEnd.value) {
|
|
137
137
|
end = dayEnd.value - dayDurationOffset.value;
|
|
@@ -9,13 +9,8 @@
|
|
|
9
9
|
gap="0"
|
|
10
10
|
:wrap="false"
|
|
11
11
|
>
|
|
12
|
-
<FSCol
|
|
13
|
-
height="100%"
|
|
14
|
-
:width="$props.firstColumnWidth"
|
|
15
|
-
>
|
|
16
|
-
</FSCol>
|
|
17
|
-
|
|
18
12
|
<FSAgendaHoursRow
|
|
13
|
+
:firstColumnWidth="$props.firstColumnWidth"
|
|
19
14
|
:displayNow="$props.nowIsInSelectedRange"
|
|
20
15
|
:modelValue="nowHour"
|
|
21
16
|
/>
|
|
@@ -9,13 +9,8 @@
|
|
|
9
9
|
gap="0"
|
|
10
10
|
:wrap="false"
|
|
11
11
|
>
|
|
12
|
-
<FSCol
|
|
13
|
-
height="100%"
|
|
14
|
-
:width="$props.firstColumnWidth"
|
|
15
|
-
>
|
|
16
|
-
</FSCol>
|
|
17
|
-
|
|
18
12
|
<FSAgendaHoursRow
|
|
13
|
+
:firstColumnWidth="$props.firstColumnWidth"
|
|
19
14
|
:displayNow="$props.nowIsInSelectedRange"
|
|
20
15
|
:modelValue="nowHour"
|
|
21
16
|
/>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<script lang="ts">
|
|
43
43
|
import { computed, defineComponent, type PropType } from "vue";
|
|
44
44
|
|
|
45
|
-
import { DateRules, IconRules, NumberRules, TextRules, TimeRules, TimeStepRules } from "../../models";
|
|
45
|
+
import { DateRules, IconRules, NumberRules, TextRules, TimeRules, TimeStepRules, AutocompleteRules } from "../../models";
|
|
46
46
|
import { useMagicFieldProvider } from "../../composables";
|
|
47
47
|
import { MagicFieldType } from "../../models/magicFields";
|
|
48
48
|
|
|
@@ -104,6 +104,8 @@ export default defineComponent({
|
|
|
104
104
|
return [TimeRules.required()];
|
|
105
105
|
case MagicFieldType.TimeStepField:
|
|
106
106
|
return [TimeStepRules.required()];
|
|
107
|
+
case MagicFieldType.PlotPerField:
|
|
108
|
+
return [AutocompleteRules.required()];
|
|
107
109
|
}
|
|
108
110
|
return [];
|
|
109
111
|
});
|
|
@@ -125,6 +127,8 @@ export default defineComponent({
|
|
|
125
127
|
return props.modelValue === "true";
|
|
126
128
|
case MagicFieldType.TimeStepField:
|
|
127
129
|
return JSON.parse(props.modelValue);
|
|
130
|
+
case MagicFieldType.PlotPerField:
|
|
131
|
+
return parseInt(props.modelValue);
|
|
128
132
|
default:
|
|
129
133
|
return props.modelValue;
|
|
130
134
|
}
|
|
@@ -145,6 +149,9 @@ export default defineComponent({
|
|
|
145
149
|
case MagicFieldType.TimeStepField:
|
|
146
150
|
emit("update:modelValue", JSON.stringify(value));
|
|
147
151
|
break;
|
|
152
|
+
case MagicFieldType.PlotPerField:
|
|
153
|
+
emit("update:modelValue", value.toString());
|
|
154
|
+
break;
|
|
148
155
|
default:
|
|
149
156
|
emit("update:modelValue", value);
|
|
150
157
|
break;
|
|
@@ -131,6 +131,8 @@ export default defineComponent({
|
|
|
131
131
|
return props.modelValue === "true";
|
|
132
132
|
case MagicFieldType.TimeStepField:
|
|
133
133
|
return JSON.parse(props.modelValue);
|
|
134
|
+
case MagicFieldType.PlotPerField:
|
|
135
|
+
return parseInt(props.modelValue);
|
|
134
136
|
default:
|
|
135
137
|
return props.modelValue;
|
|
136
138
|
}
|
|
@@ -175,6 +177,9 @@ export default defineComponent({
|
|
|
175
177
|
case MagicFieldType.TimeStepField:
|
|
176
178
|
emit("update:modelValue", JSON.stringify(value));
|
|
177
179
|
break;
|
|
180
|
+
case MagicFieldType.PlotPerField:
|
|
181
|
+
emit("update:modelValue", value.toString());
|
|
182
|
+
break;
|
|
178
183
|
default:
|
|
179
184
|
emit("update:modelValue", value);
|
|
180
185
|
break;
|
|
@@ -36,7 +36,8 @@ export default defineComponent({
|
|
|
36
36
|
const dashboardVariableTypes = computed((): { id: DashboardVariableType; label: string }[] => ([
|
|
37
37
|
{ id: DashboardVariableType.Number, label: $tr("ui.dashboard-variable-type.number", "Number") },
|
|
38
38
|
{ id: DashboardVariableType.String, label: $tr("ui.dashboard-variable-type.string", "String") },
|
|
39
|
-
{ id: DashboardVariableType.TimeStep, label: $tr("ui.dashboard-variable-type.time-step", "Time step")
|
|
39
|
+
{ id: DashboardVariableType.TimeStep, label: $tr("ui.dashboard-variable-type.time-step", "Time step")},
|
|
40
|
+
{ id: DashboardVariableType.PlotPer, label: $tr("ui.dashboard-variable-type.plot-per", "Plot per")}
|
|
40
41
|
]));
|
|
41
42
|
|
|
42
43
|
return {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.aggregation-type','Aggregation')"
|
|
4
|
+
:items="aggregationTypeItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import { AggregationType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
+
|
|
16
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
+
import { aggregationTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
+
|
|
19
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
+
|
|
21
|
+
export default defineComponent({
|
|
22
|
+
components: {
|
|
23
|
+
FSAutocompleteField
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
modelValue : {
|
|
27
|
+
type: Number as PropType<AggregationType>,
|
|
28
|
+
required: false
|
|
29
|
+
},
|
|
30
|
+
label : {
|
|
31
|
+
type: String,
|
|
32
|
+
required: false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
emits: ['update:modelValue'],
|
|
36
|
+
setup() {
|
|
37
|
+
|
|
38
|
+
const aggregationTypeItems = computed(()=>{
|
|
39
|
+
return getEnumEntries(AggregationType).filter(f=>f.value != AggregationType.None).map((f)=>{
|
|
40
|
+
return {
|
|
41
|
+
id: f.value,
|
|
42
|
+
label: aggregationTypeLabel(f.value)
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
aggregationTypeItems
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
</script>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSToggleSet
|
|
3
|
+
:hideHeader="true"
|
|
4
|
+
:values="axisTypeItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {AxisType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
+
|
|
16
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
+
import { axisTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
+
|
|
19
|
+
import FSToggleSet from "@dative-gpi/foundation-shared-components/components/FSToggleSet.vue";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
components: {
|
|
24
|
+
FSToggleSet
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: Number as PropType<AxisType>,
|
|
29
|
+
required: false
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
emits: ['update:modelValue'],
|
|
33
|
+
setup() {
|
|
34
|
+
|
|
35
|
+
const axisTypeItems = computed(()=>{
|
|
36
|
+
return getEnumEntries(AxisType).map((f)=>{
|
|
37
|
+
return {
|
|
38
|
+
id: f.value,
|
|
39
|
+
label: axisTypeLabel(f.value)
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
return {
|
|
45
|
+
axisTypeItems
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.display-as','Display as')"
|
|
4
|
+
:items="displayAsItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {DisplayAs} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
+
|
|
16
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
+
import { displayAsLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
+
|
|
19
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
+
|
|
21
|
+
export default defineComponent({
|
|
22
|
+
components: {
|
|
23
|
+
FSAutocompleteField
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: Number as PropType<DisplayAs>,
|
|
28
|
+
required: false
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: false
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
},
|
|
36
|
+
emits: ['update:modelValue'],
|
|
37
|
+
setup() {
|
|
38
|
+
|
|
39
|
+
const displayAsItems = computed(()=>{
|
|
40
|
+
return getEnumEntries(DisplayAs).filter(f=>f.value != DisplayAs.None).map((f)=>{
|
|
41
|
+
return {
|
|
42
|
+
id: f.value,
|
|
43
|
+
label: displayAsLabel(f.value)
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
displayAsItems,
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.filter-type','Filter type')"
|
|
4
|
+
:toggleSet="true"
|
|
5
|
+
:items="filterTypeItems"
|
|
6
|
+
:modelValue="modelValue"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
14
|
+
|
|
15
|
+
import {FilterType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
16
|
+
|
|
17
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
18
|
+
import { filterTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
19
|
+
|
|
20
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
21
|
+
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
components: {
|
|
24
|
+
FSAutocompleteField
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: Number as PropType<FilterType>,
|
|
29
|
+
required: false,
|
|
30
|
+
default : FilterType.None
|
|
31
|
+
},
|
|
32
|
+
label: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ['update:modelValue'],
|
|
38
|
+
setup() {
|
|
39
|
+
|
|
40
|
+
const filterTypeItems = computed(()=>{
|
|
41
|
+
return getEnumEntries(FilterType).filter(f=>f.value != FilterType.None).map((f)=>{
|
|
42
|
+
return {
|
|
43
|
+
id: f.value,
|
|
44
|
+
label: filterTypeLabel(f.value)
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
filterTypeItems
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
</script>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.heat-rule','Heat rule')"
|
|
4
|
+
:items="heatmapRuleItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {HeatmapRule} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
+
|
|
16
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
+
import { heatmapRuleLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
+
|
|
19
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
components: {
|
|
24
|
+
FSAutocompleteField
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: Number as PropType<HeatmapRule>,
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
label: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
},
|
|
37
|
+
emits: ['update:modelValue'],
|
|
38
|
+
setup() {
|
|
39
|
+
|
|
40
|
+
const heatmapRuleItems = computed(()=>{
|
|
41
|
+
return getEnumEntries(HeatmapRule).filter(f=>f.value != HeatmapRule.None).map((f)=>{
|
|
42
|
+
return {
|
|
43
|
+
id: f.value,
|
|
44
|
+
label: heatmapRuleLabel(f.value)
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
heatmapRuleItems
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.operation-on','Operation on')"
|
|
4
|
+
:items="operationOnItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {OperationOn} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
+
|
|
16
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
+
import { operationOnLabel} from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
+
|
|
19
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
components: {
|
|
24
|
+
FSAutocompleteField
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: Number as PropType<OperationOn>,
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
label : {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
emits: ['update:modelValue'],
|
|
37
|
+
setup() {
|
|
38
|
+
|
|
39
|
+
const operationOnItems = computed(()=>{
|
|
40
|
+
return getEnumEntries(OperationOn).filter(f=>f.value != OperationOn.None).map((f)=>{
|
|
41
|
+
return {
|
|
42
|
+
id: f.value,
|
|
43
|
+
label: operationOnLabel(f.value)
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
operationOnItems
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.planning-type','Planning type')"
|
|
4
|
+
:items="planningTypeItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {PlanningType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
+
|
|
16
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
+
import { planningTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
+
|
|
19
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
components: {
|
|
24
|
+
FSAutocompleteField
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: Number as PropType<PlanningType>,
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
label: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
emits: ['update:modelValue'],
|
|
37
|
+
setup() {
|
|
38
|
+
|
|
39
|
+
const planningTypeItems = computed(()=>{
|
|
40
|
+
return getEnumEntries(PlanningType).filter(f=>f.value != PlanningType.None).map((f)=>{
|
|
41
|
+
return {
|
|
42
|
+
id: f.value,
|
|
43
|
+
label: planningTypeLabel(f.value)
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
planningTypeItems
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.plot-per','Plot per')"
|
|
4
|
+
:items="plotPerItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {PlotPer} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
+
|
|
16
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
+
import { plotPerLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
+
|
|
19
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
+
|
|
21
|
+
export default defineComponent({
|
|
22
|
+
components: {
|
|
23
|
+
FSAutocompleteField
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: Number as PropType<PlotPer>,
|
|
28
|
+
required: false
|
|
29
|
+
},
|
|
30
|
+
label: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: false
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
emits: ['update:modelValue'],
|
|
36
|
+
setup() {
|
|
37
|
+
|
|
38
|
+
const plotPerItems = computed(()=>{
|
|
39
|
+
return getEnumEntries(PlotPer).filter(f=>f.value != PlotPer.None).map((f)=>{
|
|
40
|
+
return {
|
|
41
|
+
id: f.value,
|
|
42
|
+
label: plotPerLabel(f.value)
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
plotPerItems
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
</script>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:items="entityTypes"
|
|
4
|
+
:clearable="false"
|
|
5
|
+
:modelValue="$props.modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import type { PropType} from "vue";
|
|
13
|
+
import { computed, defineComponent } from "vue";
|
|
14
|
+
|
|
15
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
16
|
+
import { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
17
|
+
|
|
18
|
+
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
19
|
+
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
name: "FSSelectEntityType",
|
|
22
|
+
components: {
|
|
23
|
+
FSSelectField
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: Number as PropType<EntityType>,
|
|
28
|
+
required: false,
|
|
29
|
+
default: EntityType.Device
|
|
30
|
+
},
|
|
31
|
+
useNone: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
required: false,
|
|
34
|
+
default: false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ["update:modelValue"],
|
|
38
|
+
setup(props) {
|
|
39
|
+
const { $tr } = useTranslationsProvider();
|
|
40
|
+
|
|
41
|
+
const entityTypes = computed((): { id: EntityType; label: string }[] => {
|
|
42
|
+
const items = [
|
|
43
|
+
{ id: EntityType.Model, label: $tr("ui.entity-type.models", "Models") },
|
|
44
|
+
{ id: EntityType.Device, label: $tr("ui.entity-type.devices", "Devices") },
|
|
45
|
+
{ id: EntityType.Group, label: $tr("ui.entity-type.groups", "Groups") },
|
|
46
|
+
{ id: EntityType.Location, label: $tr("ui.entity-type.locations", "Locations") }
|
|
47
|
+
];
|
|
48
|
+
if (props.useNone) {
|
|
49
|
+
items.unshift({ id: EntityType.None, label: $tr("ui.entity-type.none", "None") });
|
|
50
|
+
}
|
|
51
|
+
return items;
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
entityTypes
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.serie-type','Serie type')"
|
|
4
|
+
:items="serieTypeItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {SerieType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
+
|
|
16
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
+
import { serieTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
+
|
|
19
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
components: {
|
|
24
|
+
FSAutocompleteField
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: Number as PropType<SerieType>,
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
label: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
emits: ['update:modelValue'],
|
|
37
|
+
setup() {
|
|
38
|
+
|
|
39
|
+
const serieTypeItems = computed(()=>{
|
|
40
|
+
return getEnumEntries(SerieType).filter(f=>f.value != SerieType.None).map((f)=>{
|
|
41
|
+
return {
|
|
42
|
+
id: f.value,
|
|
43
|
+
label: serieTypeLabel(f.value)
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
serieTypeItems
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
@@ -10,6 +10,7 @@ const FIELDS = {
|
|
|
10
10
|
[MagicFieldType.IconField] : defineAsyncComponent(() => import("../components/fields/FSIconField.vue")),
|
|
11
11
|
[MagicFieldType.TimeField] : defineAsyncComponent(() => import("../components/fields/FSTimeField.vue")),
|
|
12
12
|
[MagicFieldType.TimeStepField] : defineAsyncComponent(() => import("../components/fields/FSTimeStepField.vue")),
|
|
13
|
+
[MagicFieldType.PlotPerField] : defineAsyncComponent(() => import("../components/selects/chartSelectors/FSPlotPerSelector.vue")),
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
export const useMagicFieldProvider = () => {
|
package/models/magicFields.ts
CHANGED
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.110",
|
|
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.110",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.110"
|
|
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": "ce27d3542d6a82946127e9004d82ff2f401d7242"
|
|
39
39
|
}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
.fs-agenda-hours-row {
|
|
2
|
-
transform: var(--fs-agenda-hours-row-transform);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.fs-agenda-hours-row-markers {
|
|
6
|
-
transform: translateX(calc(-2.4% + 1px)); // 1px is the border width
|
|
7
|
-
}
|
|
8
|
-
|
|
9
1
|
.fs-agenda-hours-row-marker {
|
|
10
2
|
height: 4px;
|
|
11
3
|
border-right: solid 1px var(--fs-agenda-hours-row-marker-color);
|