@mindly/ui-components 5.97.12 → 5.98.0
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/dist/cjs/index.js +6 -6
- package/dist/cjs/lib2/features/OnBoardingFlow/OnBoardingProgressFeature/OnBoardingProgressFeature.d.ts +1 -0
- package/dist/cjs/lib2/features/SessionPreviewFeature/SessionPreviewFeature.stories.d.ts +2 -1
- package/dist/cjs/lib2/features/SessionPreviewFeature/styles.d.ts +7 -0
- package/dist/cjs/lib2/features/SessionPreviewFeature/types.d.ts +2 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/ReviewSubscriptionSessionFeature/ReviewSubscriptionSessionFeature.d.ts +18 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/ReviewSubscriptionSessionFeature/SessionReview.d.ts +19 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/ReviewSubscriptionSessionFeature/SpecialistReview.d.ts +17 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/ReviewSubscriptionSessionFeature/constants.d.ts +8 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/ReviewSubscriptionSessionFeature/index.d.ts +2 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/ReviewTrialSessionFeature/ReviewTrialSessionFeature.d.ts +23 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/ReviewTrialSessionFeature/constants.d.ts +8 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/ReviewTrialSessionFeature/index.d.ts +2 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/components/StarRating.d.ts +7 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/components/TagsList.d.ts +16 -0
- package/dist/cjs/lib2/features/SessionReviewsFeature/index.d.ts +4 -0
- package/dist/cjs/lib2/features/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/types/onBoardingFlow.type.d.ts +4 -0
- package/dist/cjs/lib2/shared/types/session.d.ts +13 -0
- package/dist/cjs/lib2/shared/ui/Textarea_v2/types.d.ts +1 -0
- package/dist/cjs/lib2/shared/utils/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/utils/mock.d.ts +1 -0
- package/dist/cjs/lib2/shared/utils/session.d.ts +2 -1
- package/dist/cjs/lib2/widgets/SessionsListWidget/SessionsListWidgetSkeleton.d.ts +3 -1
- package/dist/cjs/lib2/widgets/SessionsListWidget/index.d.ts +1 -0
- package/dist/cjs/lib2/widgets/SessionsListWidget/types.d.ts +7 -4
- package/dist/esm/index.js +6 -6
- package/dist/esm/lib2/features/OnBoardingFlow/OnBoardingProgressFeature/OnBoardingProgressFeature.d.ts +1 -0
- package/dist/esm/lib2/features/SessionPreviewFeature/SessionPreviewFeature.stories.d.ts +2 -1
- package/dist/esm/lib2/features/SessionPreviewFeature/styles.d.ts +7 -0
- package/dist/esm/lib2/features/SessionPreviewFeature/types.d.ts +2 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/ReviewSubscriptionSessionFeature/ReviewSubscriptionSessionFeature.d.ts +18 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/ReviewSubscriptionSessionFeature/SessionReview.d.ts +19 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/ReviewSubscriptionSessionFeature/SpecialistReview.d.ts +17 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/ReviewSubscriptionSessionFeature/constants.d.ts +8 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/ReviewSubscriptionSessionFeature/index.d.ts +2 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/ReviewTrialSessionFeature/ReviewTrialSessionFeature.d.ts +23 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/ReviewTrialSessionFeature/constants.d.ts +8 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/ReviewTrialSessionFeature/index.d.ts +2 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/components/StarRating.d.ts +7 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/components/TagsList.d.ts +16 -0
- package/dist/esm/lib2/features/SessionReviewsFeature/index.d.ts +4 -0
- package/dist/esm/lib2/features/index.d.ts +1 -0
- package/dist/esm/lib2/shared/types/onBoardingFlow.type.d.ts +4 -0
- package/dist/esm/lib2/shared/types/session.d.ts +13 -0
- package/dist/esm/lib2/shared/ui/Textarea_v2/types.d.ts +1 -0
- package/dist/esm/lib2/shared/utils/index.d.ts +1 -0
- package/dist/esm/lib2/shared/utils/mock.d.ts +1 -0
- package/dist/esm/lib2/shared/utils/session.d.ts +2 -1
- package/dist/esm/lib2/widgets/SessionsListWidget/SessionsListWidgetSkeleton.d.ts +3 -1
- package/dist/esm/lib2/widgets/SessionsListWidget/index.d.ts +1 -0
- package/dist/esm/lib2/widgets/SessionsListWidget/types.d.ts +7 -4
- package/dist/index.d.ts +116 -8
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ type OnBoardingProgressFeatureProps = {
|
|
|
6
6
|
isBackButtonDisabled?: boolean;
|
|
7
7
|
onBackButtonClick?: () => void;
|
|
8
8
|
contentStyle?: OnBoardingScreenStyleOptions;
|
|
9
|
+
startAdornment?: React.ReactNode;
|
|
9
10
|
};
|
|
10
11
|
declare const _default: React.NamedExoticComponent<OnBoardingProgressFeatureProps>;
|
|
11
12
|
export default _default;
|
|
@@ -9,5 +9,6 @@ export declare const Soon: Story;
|
|
|
9
9
|
export declare const Near: Story;
|
|
10
10
|
export declare const NearInDays: Story;
|
|
11
11
|
export declare const Future: Story;
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const PastRated: Story;
|
|
13
|
+
export declare const PastNotRated: Story;
|
|
13
14
|
export declare const Loading: Story;
|
|
@@ -2,6 +2,7 @@ export declare const sessionPreviewFeatureStyle: import("tailwind-variants").TVR
|
|
|
2
2
|
variant: {
|
|
3
3
|
default: {
|
|
4
4
|
root: string;
|
|
5
|
+
label: string;
|
|
5
6
|
};
|
|
6
7
|
current: {
|
|
7
8
|
root: string;
|
|
@@ -26,6 +27,7 @@ export declare const sessionPreviewFeatureStyle: import("tailwind-variants").TVR
|
|
|
26
27
|
variant: {
|
|
27
28
|
default: {
|
|
28
29
|
root: string;
|
|
30
|
+
label: string;
|
|
29
31
|
};
|
|
30
32
|
current: {
|
|
31
33
|
root: string;
|
|
@@ -47,6 +49,7 @@ export declare const sessionPreviewFeatureStyle: import("tailwind-variants").TVR
|
|
|
47
49
|
variant: {
|
|
48
50
|
default: {
|
|
49
51
|
root: string;
|
|
52
|
+
label: string;
|
|
50
53
|
};
|
|
51
54
|
current: {
|
|
52
55
|
root: string;
|
|
@@ -68,6 +71,7 @@ export declare const sessionPreviewFeatureStyle: import("tailwind-variants").TVR
|
|
|
68
71
|
variant: {
|
|
69
72
|
default: {
|
|
70
73
|
root: string;
|
|
74
|
+
label: string;
|
|
71
75
|
};
|
|
72
76
|
current: {
|
|
73
77
|
root: string;
|
|
@@ -92,6 +96,7 @@ export declare const sessionPreviewFeatureStyle: import("tailwind-variants").TVR
|
|
|
92
96
|
variant: {
|
|
93
97
|
default: {
|
|
94
98
|
root: string;
|
|
99
|
+
label: string;
|
|
95
100
|
};
|
|
96
101
|
current: {
|
|
97
102
|
root: string;
|
|
@@ -116,6 +121,7 @@ export declare const sessionPreviewFeatureStyle: import("tailwind-variants").TVR
|
|
|
116
121
|
variant: {
|
|
117
122
|
default: {
|
|
118
123
|
root: string;
|
|
124
|
+
label: string;
|
|
119
125
|
};
|
|
120
126
|
current: {
|
|
121
127
|
root: string;
|
|
@@ -137,6 +143,7 @@ export declare const sessionPreviewFeatureStyle: import("tailwind-variants").TVR
|
|
|
137
143
|
variant: {
|
|
138
144
|
default: {
|
|
139
145
|
root: string;
|
|
146
|
+
label: string;
|
|
140
147
|
};
|
|
141
148
|
current: {
|
|
142
149
|
root: string;
|
|
@@ -5,6 +5,8 @@ export type SessionPreviewFeatureProps = {
|
|
|
5
5
|
viewPerson?: 'client' | 'specialist';
|
|
6
6
|
t?: WithTranslation['t'];
|
|
7
7
|
isLoading?: boolean;
|
|
8
|
+
maxPeriodToReviewPastSessionInHours?: number;
|
|
8
9
|
onSessionClick?(session: Session): void;
|
|
9
10
|
onSessionStart?(session: Session): void;
|
|
11
|
+
rateSessionCallback?: (session: Session) => void;
|
|
10
12
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SessionReview } from './SessionReview';
|
|
3
|
+
import { SpecialistReview } from './SpecialistReview';
|
|
4
|
+
export type ReviewSubscriptionSessionFeatureProps = {
|
|
5
|
+
specialistName: string;
|
|
6
|
+
specialistAvatar: string;
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
specialistReviewNeeded: boolean;
|
|
9
|
+
sessionReviewProps: React.ComponentProps<typeof SessionReview> & {
|
|
10
|
+
onModalAppeared?: () => void;
|
|
11
|
+
};
|
|
12
|
+
specialistReviewProps: React.ComponentProps<typeof SpecialistReview> & {
|
|
13
|
+
onModalAppeared?: () => void;
|
|
14
|
+
};
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
};
|
|
17
|
+
declare const ReviewSubscriptionSessionFeature: React.FC<ReviewSubscriptionSessionFeatureProps>;
|
|
18
|
+
export default ReviewSubscriptionSessionFeature;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type SessionReviewProps = {
|
|
3
|
+
specialistName: string;
|
|
4
|
+
onSubmit: (data: {
|
|
5
|
+
rate: number;
|
|
6
|
+
reason: string;
|
|
7
|
+
is_custom_reason: boolean;
|
|
8
|
+
comment?: string;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
specialistReviewNeeded?: boolean;
|
|
11
|
+
onModalAppeared?: () => void;
|
|
12
|
+
onStarsClick?: (rate: number) => void;
|
|
13
|
+
onReasonClick?: (rate: number, reason: string, is_custom_reason: boolean) => void;
|
|
14
|
+
onCommentBlur?: (rate: number, reason: string, is_custom_reason: boolean, comment: string) => void;
|
|
15
|
+
onContinueClick?: (rate: number, reason: string, is_custom_reason: boolean, comment: string) => void;
|
|
16
|
+
t?: (key: string) => string;
|
|
17
|
+
};
|
|
18
|
+
export declare const SessionReview: React.FC<SessionReviewProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type SpecialistReviewProps = {
|
|
3
|
+
specialistName: string;
|
|
4
|
+
specialistAvatar: string;
|
|
5
|
+
specialistReviewNeeded?: boolean;
|
|
6
|
+
onSubmit: (data: {
|
|
7
|
+
rate: number;
|
|
8
|
+
comment?: string;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
onModalAppeared?: () => void;
|
|
11
|
+
onStarsClick?: (rate: number) => void;
|
|
12
|
+
onCommentBlur?: (rate: number, comment: string) => void;
|
|
13
|
+
onContinueClick?: (rate: number, comment: string) => void;
|
|
14
|
+
t?: (key: string) => string;
|
|
15
|
+
};
|
|
16
|
+
export declare const SpecialistReview: React.FC<SpecialistReviewProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ReviewTrialSessionFeatureProps = {
|
|
3
|
+
specialistName: string;
|
|
4
|
+
specialistAvatar: string;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onSubmit: (data: {
|
|
7
|
+
rate: number;
|
|
8
|
+
reason: string;
|
|
9
|
+
is_custom_reason: boolean;
|
|
10
|
+
comment?: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
showMotivation?: () => void;
|
|
13
|
+
continueTherapy?: () => void;
|
|
14
|
+
onModalAppeared?: () => void;
|
|
15
|
+
onStarsClick?: (rate: number) => void;
|
|
16
|
+
onReasonClick?: (rate: number, reason: string, is_custom_reason: boolean) => void;
|
|
17
|
+
onCommentBlur?: (rate: number, reason: string, is_custom_reason: boolean, comment: string) => void;
|
|
18
|
+
onContinueClick?: (rate: number, reason: string, is_custom_reason: boolean, comment: string) => void;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
t?: (key: string) => string;
|
|
21
|
+
};
|
|
22
|
+
declare const ReviewTrialSessionFeature: React.FC<ReviewTrialSessionFeatureProps>;
|
|
23
|
+
export default ReviewTrialSessionFeature;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Tag = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
type TagsListProps = {
|
|
7
|
+
tags: Tag[];
|
|
8
|
+
selected: Tag | null;
|
|
9
|
+
onClick: (tag: Tag) => void;
|
|
10
|
+
comment: string;
|
|
11
|
+
onCommentChange: (comment: string) => void;
|
|
12
|
+
onCommentBlur: () => void;
|
|
13
|
+
t?: (key: string) => string;
|
|
14
|
+
};
|
|
15
|
+
export declare const TagsList: React.FC<TagsListProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ReviewTrialSessionFeature } from './ReviewTrialSessionFeature';
|
|
2
|
+
export { ReviewSubscriptionSessionFeature } from './ReviewSubscriptionSessionFeature';
|
|
3
|
+
export type { ReviewTrialSessionFeatureProps } from './ReviewTrialSessionFeature';
|
|
4
|
+
export type { ReviewSubscriptionSessionFeatureProps } from './ReviewSubscriptionSessionFeature';
|
|
@@ -65,6 +65,7 @@ export type OnBoardingBaseScreenType = {
|
|
|
65
65
|
};
|
|
66
66
|
isPreview?: boolean;
|
|
67
67
|
isPageView?: boolean;
|
|
68
|
+
hideTimer?: boolean;
|
|
68
69
|
};
|
|
69
70
|
export type OnBoardingStartScreenType = OnBoardingBaseScreenType & OnBoardingScreenButtonType & OnBoardingScreenSkipButtonType & OnBoardingScreenBgType & OnBoardingScreenDescriptionType & {
|
|
70
71
|
image?: ResponseFileType | null;
|
|
@@ -108,4 +109,7 @@ export type OnBoardingFlowType = {
|
|
|
108
109
|
name: string;
|
|
109
110
|
}[];
|
|
110
111
|
};
|
|
112
|
+
promocode_percent?: number | null;
|
|
113
|
+
promocode_duration_min?: number | null;
|
|
114
|
+
duration_min?: number | null;
|
|
111
115
|
};
|
|
@@ -8,6 +8,18 @@ export type SessionTime = {
|
|
|
8
8
|
seconds: number;
|
|
9
9
|
_nanoseconds?: number;
|
|
10
10
|
} | string;
|
|
11
|
+
export type SessionReview = {
|
|
12
|
+
id: string;
|
|
13
|
+
consultation_id: string;
|
|
14
|
+
specialist_id: string;
|
|
15
|
+
client_id: string;
|
|
16
|
+
stars_count: number;
|
|
17
|
+
reason?: string;
|
|
18
|
+
is_custom_reason?: boolean;
|
|
19
|
+
text_of_review: string;
|
|
20
|
+
client_avatar: string;
|
|
21
|
+
created_at: number;
|
|
22
|
+
};
|
|
11
23
|
export type Session = {
|
|
12
24
|
id: string;
|
|
13
25
|
consultation_time: SessionTime;
|
|
@@ -45,6 +57,7 @@ export type Session = {
|
|
|
45
57
|
price_default?: number;
|
|
46
58
|
payment_intent_id?: string;
|
|
47
59
|
subscription?: Subscription;
|
|
60
|
+
session_review?: SessionReview;
|
|
48
61
|
};
|
|
49
62
|
export type SessionVariant = 'default' | 'current' | 'soon' | 'near' | 'past';
|
|
50
63
|
export type Consultation = Session;
|
|
@@ -3,10 +3,11 @@ export declare const SOON_SESSION_TIME_SECONDS: number;
|
|
|
3
3
|
export declare const NEAR_SESSION_TIME_SECONDS: number;
|
|
4
4
|
export declare const CAN_MANAGE_SESSION_TIME_HOURS = 24;
|
|
5
5
|
export declare const getStartSessionDate: (sessionTime?: SessionTime) => Date | undefined;
|
|
6
|
+
export declare const getStartSessionTimestamp: (sessionTime?: SessionTime) => number;
|
|
6
7
|
export declare const getSessionVariant: (session?: Session) => SessionVariant;
|
|
7
8
|
export declare const getSessionsByYear: (sessions: Session[]) => Map<number, Session[]>;
|
|
8
9
|
export declare const getSessionsByMonth: (sessions: Session[]) => Map<number, Session[]>;
|
|
9
10
|
export declare const getSessionsByDay: (sessions: Session[]) => Map<number, Session[]>;
|
|
10
11
|
export declare const splitSessions: (sessions: Session[]) => Map<string, Session[]>;
|
|
11
|
-
export declare const getSessionTimeLabel: (variant: SessionVariant, startSessionDate: Date, t: TFunction<import("react-i18next").FallbackNs<Ns>, KPrefix
|
|
12
|
+
export declare const getSessionTimeLabel: (variant: SessionVariant, startSessionDate: Date, t: TFunction<import("react-i18next").FallbackNs<Ns>, KPrefix>, locale: string) => string;
|
|
12
13
|
export declare const canManageSession: (sessionDate?: Date) => boolean;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { WithTranslation } from 'react-i18next';
|
|
2
2
|
import { Session } from '../../shared/types';
|
|
3
|
-
export type SessionTab = 'future' | 'past';
|
|
4
3
|
export type SessionsWidgetProps = {
|
|
5
4
|
sessions?: Session[];
|
|
6
|
-
t?: WithTranslation['t'];
|
|
7
5
|
locale: string;
|
|
8
6
|
isLoading?: boolean;
|
|
9
|
-
|
|
7
|
+
maxPeriodToReviewPastSessionInHours?: number;
|
|
8
|
+
loadPreviousSessions: () => Promise<{
|
|
9
|
+
list: Session[];
|
|
10
|
+
total: number;
|
|
11
|
+
}>;
|
|
12
|
+
rateSessionCallback?: (session: Session) => void;
|
|
10
13
|
onSessionClick?(session: Session): void;
|
|
11
14
|
onSessionStart?(session: Session): void;
|
|
12
15
|
onScheduleSession?(): void;
|
|
13
|
-
|
|
16
|
+
t?: WithTranslation['t'];
|
|
14
17
|
};
|