@shophost/react 2.0.56 → 2.0.57

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.
@@ -1,5 +1,5 @@
1
- import { ColumnDef, Row } from '@tanstack/react-table';
2
1
  import { LocalizedProduct } from '../../../../../../client/src/index.ts';
2
+ import { ColumnDef, Row } from '@tanstack/react-table';
3
3
  interface PublishStatusCellProps {
4
4
  row: Row<LocalizedProduct>;
5
5
  table: any;
@@ -4,7 +4,9 @@ interface StatusCellProps {
4
4
  id: string;
5
5
  acceptedAt: string | Date | null | undefined;
6
6
  cancelledAt: string | Date | null | undefined;
7
- refetch: () => void;
7
+ refetch: () => void | Promise<unknown>;
8
+ className?: string;
9
+ compact?: boolean;
8
10
  }
9
11
  export declare const ActionsCell: React.FC<StatusCellProps>;
10
12
  export {};
@@ -1,3 +1,3 @@
1
- import { ColumnDef } from '@tanstack/react-table';
2
1
  import { Reservation } from '../../../../../../client/src/index.ts';
2
+ import { ColumnDef } from '@tanstack/react-table';
3
3
  export declare const columns: ColumnDef<Reservation>[];
@@ -3,7 +3,9 @@ import { default as React } from 'react';
3
3
  interface ReservationDetailsModalProps {
4
4
  open: boolean;
5
5
  onOpenChange: (open: boolean) => void;
6
+ organizationId?: string;
6
7
  reservation: Reservation;
8
+ refetch?: () => void | Promise<unknown>;
7
9
  }
8
10
  export declare const ReservationDetailsModal: React.FC<ReservationDetailsModalProps>;
9
11
  export {};
@@ -0,0 +1,22 @@
1
+ import { Reservation } from '../../../../../../client/src/index.ts';
2
+ export type ReservationCalendarView = "month" | "week" | "day";
3
+ interface ReservationsCalendarProps {
4
+ currentDate: Date;
5
+ error?: boolean;
6
+ loading?: boolean;
7
+ onCurrentDateChange: (date: Date) => void;
8
+ onRetry: () => void | Promise<unknown>;
9
+ onViewChange: (view: ReservationCalendarView) => void;
10
+ organizationId: string;
11
+ reservations: Reservation[];
12
+ refetch: () => void | Promise<unknown>;
13
+ view: ReservationCalendarView;
14
+ }
15
+ export declare const getReservationCalendarRange: (date: Date, view: ReservationCalendarView) => {
16
+ from: Date;
17
+ to: Date;
18
+ };
19
+ export declare const shiftReservationCalendarDate: (date: Date, view: ReservationCalendarView, direction: -1 | 1) => Date;
20
+ export declare const formatReservationCalendarTitle: (date: Date, view: ReservationCalendarView) => string;
21
+ export declare function ReservationsCalendar({ currentDate, error, loading, onCurrentDateChange, onRetry, onViewChange, organizationId, reservations, refetch, view, }: ReservationsCalendarProps): import("react/jsx-runtime").JSX.Element;
22
+ export {};
@@ -0,0 +1,12 @@
1
+ interface SegmentedControlOption<T extends string> {
2
+ label: string;
3
+ value: T;
4
+ }
5
+ interface SegmentedControlProps<T extends string> {
6
+ options: readonly SegmentedControlOption<T>[];
7
+ value: T;
8
+ onValueChange: (value: T) => void;
9
+ className?: string;
10
+ }
11
+ export declare function SegmentedControl<T extends string>({ options, value, onValueChange, className, }: SegmentedControlProps<T>): import("react/jsx-runtime").JSX.Element;
12
+ export {};