@mindly/ui-components 8.5.2 → 8.5.4

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.
Files changed (34) hide show
  1. package/dist/cjs/index.js +5 -5
  2. package/dist/cjs/lib2/features/RecurringSessionPreviewFeature/types.d.ts +1 -0
  3. package/dist/cjs/lib2/features/SessionManageModalFeature/SessionManageModalFeature.d.ts +3 -2
  4. package/dist/cjs/lib2/features/SessionPreviewFeature/types.d.ts +1 -0
  5. package/dist/cjs/lib2/features/SpecialistScheduleFeature/types.d.ts +1 -0
  6. package/dist/cjs/lib2/shared/assets/icons/IconBusiness.d.ts +7 -0
  7. package/dist/cjs/lib2/shared/assets/icons/index.d.ts +1 -0
  8. package/dist/cjs/lib2/shared/types/session.d.ts +1 -1
  9. package/dist/cjs/lib2/shared/ui/ListItems/Item.d.ts +2 -0
  10. package/dist/cjs/lib2/shared/ui/ListItems/ListItems.d.ts +2 -0
  11. package/dist/cjs/lib2/shared/ui/ListItems/styles.d.ts +9 -0
  12. package/dist/cjs/lib2/shared/utils/index.d.ts +1 -0
  13. package/dist/cjs/lib2/shared/utils/session.d.ts +4 -2
  14. package/dist/cjs/lib2/shared/utils/timezone.d.ts +1 -0
  15. package/dist/cjs/lib2/widgets/SessionDetailWidget/types.d.ts +1 -0
  16. package/dist/cjs/lib2/widgets/SessionsListWidget/types.d.ts +1 -0
  17. package/dist/esm/index.js +5 -5
  18. package/dist/esm/lib2/features/RecurringSessionPreviewFeature/types.d.ts +1 -0
  19. package/dist/esm/lib2/features/SessionManageModalFeature/SessionManageModalFeature.d.ts +3 -2
  20. package/dist/esm/lib2/features/SessionPreviewFeature/types.d.ts +1 -0
  21. package/dist/esm/lib2/features/SpecialistScheduleFeature/types.d.ts +1 -0
  22. package/dist/esm/lib2/shared/assets/icons/IconBusiness.d.ts +7 -0
  23. package/dist/esm/lib2/shared/assets/icons/index.d.ts +1 -0
  24. package/dist/esm/lib2/shared/types/session.d.ts +1 -1
  25. package/dist/esm/lib2/shared/ui/ListItems/Item.d.ts +2 -0
  26. package/dist/esm/lib2/shared/ui/ListItems/ListItems.d.ts +2 -0
  27. package/dist/esm/lib2/shared/ui/ListItems/styles.d.ts +9 -0
  28. package/dist/esm/lib2/shared/utils/index.d.ts +1 -0
  29. package/dist/esm/lib2/shared/utils/session.d.ts +4 -2
  30. package/dist/esm/lib2/shared/utils/timezone.d.ts +1 -0
  31. package/dist/esm/lib2/widgets/SessionDetailWidget/types.d.ts +1 -0
  32. package/dist/esm/lib2/widgets/SessionsListWidget/types.d.ts +1 -0
  33. package/dist/index.d.ts +192 -174
  34. package/package.json +1 -1
@@ -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;
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ interface IconProps extends React.SVGAttributes<SVGElement> {
3
+ size?: number | string;
4
+ color?: string;
5
+ }
6
+ export declare function IconBusiness({ size, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -160,3 +160,4 @@ export * from './IconPhotoCamera';
160
160
  export * from './IconAccountBalance';
161
161
  export * from './IconVoiceMode';
162
162
  export * from './IconKeyboard';
163
+ export * from './IconBusiness';
@@ -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;
@@ -4,6 +4,7 @@ type ItemProps = React.HTMLAttributes<HTMLIonItemElement> & {
4
4
  rightContent?: React.ReactNode;
5
5
  innerItemClassName?: string;
6
6
  withBorders?: boolean;
7
+ isHighlight?: boolean;
7
8
  isDisabled?: boolean;
8
9
  /** @deprecated Use `status` instead */
9
10
  isError?: boolean;
@@ -14,6 +15,7 @@ export declare const Item: React.ForwardRefExoticComponent<React.HTMLAttributes<
14
15
  rightContent?: React.ReactNode;
15
16
  innerItemClassName?: string;
16
17
  withBorders?: boolean;
18
+ isHighlight?: boolean;
17
19
  isDisabled?: boolean;
18
20
  /** @deprecated Use `status` instead */
19
21
  isError?: boolean;
@@ -1,9 +1,11 @@
1
1
  import * as React from 'react';
2
2
  type ListItemsProps = React.HTMLAttributes<HTMLIonListElement> & {
3
3
  withBorders?: boolean;
4
+ isHighlight?: boolean;
4
5
  };
5
6
  export declare const ListItems: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLIonListElement> & {
6
7
  withBorders?: boolean;
8
+ isHighlight?: boolean;
7
9
  } & {
8
10
  children?: React.ReactNode | undefined;
9
11
  } & React.RefAttributes<HTMLIonListElement>>;
@@ -5,6 +5,9 @@ export declare const listItemsStyles: import("tailwind-variants").TVReturnType<{
5
5
  isDisabled: {
6
6
  true: string;
7
7
  };
8
+ isHighlight: {
9
+ true: string;
10
+ };
8
11
  status: {
9
12
  error: string;
10
13
  attention: string;
@@ -22,6 +25,9 @@ export declare const listItemsStyles: import("tailwind-variants").TVReturnType<{
22
25
  isDisabled: {
23
26
  true: string;
24
27
  };
28
+ isHighlight: {
29
+ true: string;
30
+ };
25
31
  status: {
26
32
  error: string;
27
33
  attention: string;
@@ -39,6 +45,9 @@ export declare const listItemsStyles: import("tailwind-variants").TVReturnType<{
39
45
  isDisabled: {
40
46
  true: string;
41
47
  };
48
+ isHighlight: {
49
+ true: string;
50
+ };
42
51
  status: {
43
52
  error: string;
44
53
  attention: string;
@@ -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
  };