Bump Scenes to 5.42.0 (#100205)

* update scenes and weekStart prop type

* update test

* adjust weekStart type in schemaV2

* clean up weekStart error message

* clean up weekStart in test data
This commit is contained in:
Sergej-Vlasov
2025-02-11 13:20:47 +00:00
committed by GitHub
parent 43d7d00247
commit bbe21bb1d2
13 changed files with 39 additions and 32 deletions

View File

@@ -467,7 +467,7 @@ TimeSettingsSpec: {
// Whether timepicker is visible or not.
hideTimepicker: bool // v1: timepicker.hidden
// Day when the week starts. Expressed by the name of the day in lowercase, e.g. "monday".
weekStart: string
weekStart?: "saturday" | "monday" | "sunday"
// The month that the fiscal year starts on. 0 = January, 11 = December
fiscalYearStartMonth: int
// Override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values.

View File

@@ -644,7 +644,7 @@ export interface TimeSettingsSpec {
// v1: timepicker.hidden
hideTimepicker: boolean;
// Day when the week starts. Expressed by the name of the day in lowercase, e.g. "monday".
weekStart: string;
weekStart?: "saturday" | "monday" | "sunday";
// The month that the fiscal year starts on. 0 = January, 11 = December
fiscalYearStartMonth: number;
// Override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values.
@@ -681,7 +681,6 @@ export const defaultTimeSettingsSpec = (): TimeSettingsSpec => ({
"30d",
],
hideTimepicker: false,
weekStart: "",
fiscalYearStartMonth: 0,
});

View File

@@ -7,7 +7,7 @@ import { Combobox } from '../Combobox/Combobox';
import { ComboboxOption } from '../Combobox/types';
export interface Props {
onChange: (weekStart: string) => void;
onChange: (weekStart: WeekStart) => void;
value: string;
width?: number;
autoFocus?: boolean;
@@ -57,7 +57,7 @@ export const WeekStartPicker = (props: Props) => {
const onChangeWeekStart = useCallback(
(selectable: ComboboxOption | null) => {
if (selectable && selectable.value !== undefined) {
onChange(selectable.value);
onChange(selectable.value as WeekStart);
}
},
[onChange]