Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web-admin/src/features/alerts/EditAlert.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
} from "@rilldata/web-common/components/dialog";
import GuardedDialog from "@rilldata/web-common/components/dialog/GuardedDialog.svelte";
import AlertForm from "@rilldata/web-common/features/alerts/AlertForm.svelte";
import type { V1AlertSpec } from "@rilldata/web-common/runtime-client";
import type { V1AlertSpec } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import Button from "web-common/src/components/button/Button.svelte";

export let alertSpec: V1AlertSpec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
type V1AlertExecution,
V1AssertionStatus,
type V1AssertionResult,
} from "@rilldata/web-common/runtime-client";
} from "@rilldata/web-common/runtime-client/gen/index.schemas";

export let currentExecution: V1AlertExecution;
export let result: V1AssertionResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import NoAlertRunsYet from "@rilldata/web-admin/features/alerts/history/NoAlertRunsYet.svelte";
import { useAlert } from "@rilldata/web-admin/features/alerts/selectors";
import ResourceList from "@rilldata/web-admin/features/resources/ResourceList.svelte";
import type { V1AlertExecution } from "@rilldata/web-common/runtime-client";
import type { V1AlertExecution } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { runtime } from "@rilldata/web-common/runtime-client/runtime-store";
import type { ColumnDef } from "@tanstack/svelte-table";
import { flexRender } from "@tanstack/svelte-table";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
V1AssertionStatus,
type V1AlertExecution,
type V1AssertionResult,
} from "@rilldata/web-common/runtime-client";
} from "@rilldata/web-common/runtime-client/gen/index.schemas";

export let alertTime: string;
export let timeZone: string;
Expand Down
2 changes: 1 addition & 1 deletion web-admin/src/features/alerts/listing/AlertsTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import ResourceList from "@rilldata/web-admin/features/resources/ResourceList.svelte";
import ResourceListEmptyState from "@rilldata/web-admin/features/resources/ResourceListEmptyState.svelte";
import AlertIcon from "@rilldata/web-common/components/icons/AlertIcon.svelte";
import type { V1Resource } from "@rilldata/web-common/runtime-client";
import type { V1Resource } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { flexRender, type ColumnDef } from "@tanstack/svelte-table";
import AlertsTableCompositeCell from "./AlertsTableCompositeCell.svelte";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import type {
V1Expression,
V1TimeRange,
} from "@rilldata/web-common/runtime-client";
} from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { flip } from "svelte/animate";
import { fly } from "svelte/transition";

Expand Down
2 changes: 1 addition & 1 deletion web-admin/src/features/alerts/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
createRuntimeServiceGetExplore,
createRuntimeServiceGetResource,
createRuntimeServiceListResources,
type V1AlertSpec,
} from "@rilldata/web-common/runtime-client";
import type { V1AlertSpec } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { smartRefetchIntervalFunc } from "@rilldata/web-admin/lib/refetch-interval-store";
import { derived, type Readable, readable } from "svelte/store";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ It is probably not the most up to date code; but it works very well in practice.
text-anchor="end"
x={xText}
{visibility}
aria-label="{location.key} value"
>
{#if !location?.yOverride}
{location.value
Expand Down Expand Up @@ -255,6 +256,7 @@ It is probably not the most up to date code; but it works very well in practice.
y={y.label}
x={xText}
{visibility}
aria-label="{location.key} value"
>
{#if !location?.yOverride}
{location.value
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/features/canvas/stores/canvas-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import { Theme } from "../../themes/theme";
import { createResolvedThemeStore } from "../../themes/selectors";
import { ExploreStateURLParams } from "../../dashboards/url-state/url-params";
import { DEFAULT_DASHBOARD_WIDTH } from "../layout-util";
import { createCustomMapStore } from "@rilldata/web-common/lib/map-utils";
import { createCustomMapStore } from "@rilldata/web-common/lib/custom-map-store";

export const lastVisitedState = new Map<string, string>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import type {
MetricsViewSpecMeasure,
V1TimeGrain,
} from "@rilldata/web-common/runtime-client";
} from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { extent } from "d3-array";
import { getContext } from "svelte";
import { cubicOut } from "svelte/easing";
Expand Down Expand Up @@ -288,7 +288,11 @@
}
</script>

<div class={`${cursorClass} select-none`}>
<div
role="presentation"
class="{cursorClass} select-none"
aria-label="Measure Chart for {measure.name}"
>
<SimpleDataGraphic
bind:hovered
let:mouseOverThisChart
Expand Down Expand Up @@ -357,6 +361,7 @@
{#if point && inBounds(internalXMin, internalXMax, point[xAccessor])}
<g transition:fly={{ duration: 100, x: -4 }}>
<text
aria-label="{measure.name} primary time label"
class="fill-fg-secondary stroke-surface-background"
style:paint-order="stroke"
stroke-width="3px"
Expand All @@ -367,6 +372,7 @@
</text>
{#if showComparison && point[`comparison.${labelAccessor}`]}
<text
aria-label="{measure.name} comparison time label"
style:paint-order="stroke"
stroke-width="3px"
class="fill-fg-secondary stroke-surface-background"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
TimeRangePreset,
type AvailableTimeGrain,
} from "@rilldata/web-common/lib/time/types";
import { type MetricsViewSpecMeasure } from "@rilldata/web-common/runtime-client";
import { type MetricsViewSpecMeasure } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { runtime } from "@rilldata/web-common/runtime-client/runtime-store.ts";
import { Tooltip } from "bits-ui";
import { DateTime } from "luxon";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DEFAULT_TIME_RANGES } from "@rilldata/web-common/lib/time/config.ts";
import { isGrainBigger } from "@rilldata/web-common/lib/time/grains";
import { humaniseISODuration } from "@rilldata/web-common/lib/time/ranges/iso-ranges.ts";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { DateTime, Duration } from "luxon";
import type { DateObjectUnits } from "luxon/src/datetime";
import {
Expand Down
26 changes: 26 additions & 0 deletions web-common/src/lib/custom-map-store.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { get, writable } from "svelte/store";

export function createCustomMapStore<T>() {
const { subscribe, set, update } = writable(new Map<string, T>());

return {
subscribe,
read: () => get({ subscribe }),
getNonReactive: (name: string) => {
return get({ subscribe }).get(name);
},
set: (name: string, component: T) => {
update((map) => {
map.set(name, component);
return map;
});
},
delete: (name: string) => {
update((map) => {
map.delete(name);
return map;
});
},
reset: () => set(new Map()),
};
}
27 changes: 0 additions & 27 deletions web-common/src/lib/map-utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { get, writable } from "svelte/store";

export function reverseMap<
K extends string | number,
V extends string | number,
Expand All @@ -10,28 +8,3 @@ export function reverseMap<
}
return revMap;
}

export function createCustomMapStore<T>() {
const { subscribe, set, update } = writable(new Map<string, T>());

return {
subscribe,
read: () => get({ subscribe }),
getNonReactive: (name: string) => {
return get({ subscribe }).get(name);
},
set: (name: string, component: T) => {
update((map) => {
map.set(name, component);
return map;
});
},
delete: (name: string) => {
update((map) => {
map.delete(name);
return map;
});
},
reset: () => set(new Map()),
};
}
2 changes: 1 addition & 1 deletion web-common/src/lib/time/comparisons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { humaniseISODuration } from "@rilldata/web-common/lib/time/ranges/iso-ra
import {
V1TimeGrain,
type V1TimeRange,
} from "@rilldata/web-common/runtime-client";
} from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { DateTime, Duration, Interval } from "luxon";
import { getTimeWidth } from "../transforms";
import {
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/lib/time/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* manually define these in the dashboard configuration.
*/

import { V1TimeGrain } from "@rilldata/web-common/runtime-client";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import type { Duration, DurationUnit } from "luxon";
import {
Period,
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/lib/time/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { V1TimeGrain } from "@rilldata/web-common/runtime-client";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { V1TimeGrainToAlias } from "@rilldata/web-common/lib/time/new-grains";
import { parseRillTime } from "@rilldata/web-common/features/dashboards/url-state/time-ranges/parser";
import type { RangeBuckets } from "@rilldata/web-common/features/dashboards/time-controls/new-time-controls";
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/lib/time/grains/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { V1TimeGrain } from "../../../runtime-client";
import { V1TimeGrain } from "../../../runtime-client/gen/index.schemas";
import { TIME_GRAIN } from "../config";
import {
durationToMillis,
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/lib/time/grains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* to generate either a subset of time grains or a single time grain.
*/

import { V1TimeGrain } from "@rilldata/web-common/runtime-client";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { Duration } from "luxon";
import { TIME_GRAIN } from "../config";
import { getTimeWidth } from "../transforms";
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/lib/time/new-grains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
type RillTime,
} from "@rilldata/web-common/features/dashboards/url-state/time-ranges/RillTime";
import { reverseMap } from "@rilldata/web-common/lib/map-utils.ts";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import type { DateTimeUnit } from "luxon";

type Order = 0 | 1 | 2 | 3 | 4 | 5 | 6 | typeof Infinity;
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/lib/time/ranges/formatter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
formatDateTimeByGrain,
prettyFormatTimeRange,
} from "@rilldata/web-common/lib/time/ranges/formatter.ts";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { DateTime, Interval } from "luxon";
import { describe, expect, it } from "vitest";

Expand Down
2 changes: 1 addition & 1 deletion web-common/src/lib/time/ranges/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { V1TimeGrainToOrder } from "@rilldata/web-common/lib/time/new-grains.ts"
import {
V1TimeGrain,
type V1TimeRange,
} from "@rilldata/web-common/runtime-client";
} from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { DateTime, type DateTimeFormatOptions, Interval } from "luxon";

// Formats a Luxon interval for human readable display throughout the application.
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/lib/time/ranges/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getAdjustedFetchTime } from "../ranges";
import { V1TimeGrain } from "../../../runtime-client";
import { V1TimeGrain } from "../../../runtime-client/gen/index.schemas";
import { describe, it, expect } from "vitest";

const getAdjustedFetchTimeTestCases = [
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/lib/time/ranges/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
addZoneOffset,
removeLocalTimezoneOffset,
} from "@rilldata/web-common/lib/time/timezone";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client";
import { V1TimeGrain } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import { DEFAULT_TIME_RANGES, TIME_GRAIN } from "../config";
import {
durationToMillis,
Expand Down
2 changes: 1 addition & 1 deletion web-common/src/lib/time/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { V1TimeGrain } from "@rilldata/web-common/runtime-client";
import type { V1TimeGrain } from "@rilldata/web-common/runtime-client/gen/index.schemas";
import type { DateTimeUnit } from "luxon";

// Note: The majority of types below are redundant with Luxon and should be removed - bgh
Expand Down
Loading
Loading