@mindly/ui-components 8.5.2 → 8.5.3

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.
@@ -7,4 +7,5 @@ export type RecurringSessionPreviewFeatureProps = {
7
7
  t?: WithTranslation['t'];
8
8
  isLoading?: boolean;
9
9
  onClick?(session: RecurringSession): void;
10
+ timeZone?: string;
10
11
  };
@@ -1,6 +1,6 @@
1
1
  import React, { FC } from 'react';
2
2
  import { WithTranslation } from 'react-i18next';
3
- import { RecurringSchedule } from '../../shared';
3
+ import { RecurringSession } from '../../shared';
4
4
  import { ModalSheetProps } from '../../shared/ui/ModalSheet/types';
5
5
  export declare enum SessionManageTypeEnum {
6
6
  ONLY_THIS_SESSION = "only_this_session",
@@ -9,8 +9,9 @@ export declare enum SessionManageTypeEnum {
9
9
  }
10
10
  type SessionManageModalFeatureProps = {
11
11
  action: 'reschedule' | 'cancel';
12
+ timeZone?: string;
12
13
  sessionStartDate: string;
13
- sessionRecurringSchedule?: RecurringSchedule;
14
+ recurringSession?: RecurringSession;
14
15
  isOpen?: boolean;
15
16
  locale?: string;
16
17
  ref?: React.RefObject<HTMLIonModalElement | null>;
@@ -8,6 +8,7 @@ export type SessionPreviewFeatureProps = {
8
8
  locale: SupportedLocales;
9
9
  maxPeriodToReviewPastSessionInHours?: number;
10
10
  daysBeforeCancelationQueueSession?: number;
11
+ timeZone?: string;
11
12
  onSessionClick?(session: Session | SessionQueue): void;
12
13
  onSessionStart?(session: Session | SessionQueue): void;
13
14
  rateSessionCallback?: (session: Session | SessionQueue) => void;
@@ -26,6 +26,7 @@ export type ScheduleFeatureProps = {
26
26
  bookButtonText?: string;
27
27
  footerContent?: React.ReactNode;
28
28
  sessionType?: SessionTypeEnum;
29
+ timeZone?: string;
29
30
  onDateChange?: (date: ScheduleDate, slots: ScheduleSlot[]) => void;
30
31
  onSlotChange?: (slot: ScheduleSlot | null) => void;
31
32
  onShowAll?: () => void;
@@ -82,9 +82,9 @@ export type RecurringSession = {
82
82
  id: string;
83
83
  specialistId: string;
84
84
  clientId: string;
85
- userTimezone: string;
86
85
  name?: string;
87
86
  avatarLink?: string;
87
+ timezone?: string;
88
88
  recurring: {
89
89
  interval: 'weekly';
90
90
  day: number;
@@ -13,3 +13,4 @@ export * from './mock';
13
13
  export { ONBOARDING_THEME_DEFAULT_COLORS } from './onboarding';
14
14
  export * from './globalAuthState';
15
15
  export * from './validation';
16
+ export * from './timezone';
@@ -1,5 +1,6 @@
1
+ import { DateTime } from 'luxon';
1
2
  import { WithTranslation } from 'react-i18next';
2
- import { Session, SessionTime, SessionVariant, SupportedLocales } from '../types';
3
+ import { RecurringSession, Session, SessionTime, SessionVariant, SupportedLocales } from '../types';
3
4
  export declare const SOON_SESSION_TIME_SECONDS: number;
4
5
  export declare const NEAR_SESSION_TIME_SECONDS: number;
5
6
  export declare const CAN_MANAGE_SESSION_TIME_HOURS = 24;
@@ -11,5 +12,6 @@ export declare const getSessionsByYear: (sessions: Session[]) => Map<number, Ses
11
12
  export declare const getSessionsByMonth: (sessions: Session[]) => Map<number, Session[]>;
12
13
  export declare const getSessionsByDay: (sessions: Session[]) => Map<number, Session[]>;
13
14
  export declare const splitSessions: (sessions: Session[]) => Map<string, Session[]>;
14
- export declare const getSessionTimeLabel: (variant: SessionVariant, startSessionDate: Date, t: WithTranslation["t"], locale: SupportedLocales) => string;
15
+ export declare const getSessionTimeLabel: (variant: SessionVariant, startSessionDate: Date, t: WithTranslation["t"], locale: SupportedLocales, timeZone: string) => string;
15
16
  export declare const canManageSession: (sessionDate?: Date) => boolean;
17
+ export declare const getRecurringSessionDate: (recurringSession: RecurringSession, timeZone: string) => DateTime;
@@ -0,0 +1 @@
1
+ export declare const localTimeZone: string;
@@ -7,6 +7,7 @@ export type SessionDetailWidgetProps = {
7
7
  t?: WithTranslation['t'];
8
8
  viewPerson?: 'client' | 'specialist';
9
9
  locale: SupportedLocales;
10
+ timeZone?: string;
10
11
  onSessionStart?(session: Session): void;
11
12
  onRescheduleClick?(session: Session): void;
12
13
  onCancelClick?(session: Session): void;
@@ -21,4 +21,5 @@ export type SessionsWidgetProps = {
21
21
  onScheduleSession?(): void;
22
22
  onUpdateSubscription?(session: Session): void;
23
23
  t?: WithTranslation['t'];
24
+ timeZone?: string;
24
25
  };