@durablex/react-ui 0.1.0-beta.5 → 0.1.0-beta.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@durablex/react-ui",
3
- "version": "0.1.0-beta.5",
3
+ "version": "0.1.0-beta.6",
4
4
  "description": "Styled, themeable React components for durablex - the shell, run tables, and status views built on @durablex/react.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -8,8 +8,14 @@ import { FlowSummary } from "./FlowSummary";
8
8
  import { ALL_FILTER } from "../lib/run-filters";
9
9
  import { DEFAULT_TIME_RANGE, seriesBucketSeconds, timeLabel, windowSince } from "../lib/time-range";
10
10
 
11
- export function OverviewView() {
12
- const [time, setTime] = useState(DEFAULT_TIME_RANGE);
11
+ export interface OverviewViewProps {
12
+ // Seeds the uncontrolled time window. The kit defaults to a live 1h view; a
13
+ // console reviewing history can open wider (e.g. "7d").
14
+ initialTime?: string;
15
+ }
16
+
17
+ export function OverviewView({ initialTime = DEFAULT_TIME_RANGE }: OverviewViewProps = {}) {
18
+ const [time, setTime] = useState(initialTime);
13
19
  const [app, setApp] = useState<string>(ALL_FILTER);
14
20
 
15
21
  const since = windowSince(time);
package/src/index.ts CHANGED
@@ -82,6 +82,7 @@ export { TableStatusRows } from "./components/TableStatusRows";
82
82
  export { WebhooksView } from "./components/WebhooksView";
83
83
  export { Facts } from "./components/Facts";
84
84
  export { OverviewView } from "./components/OverviewView";
85
+ export type { OverviewViewProps } from "./components/OverviewView";
85
86
  export { FlowSummary } from "./components/FlowSummary";
86
87
  export {
87
88
  Table,