@mindly/ui-components 5.92.0 → 5.92.2
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 +7 -7
- package/dist/cjs/lib/Consultations/ConsultationCard/types.d.ts +1 -0
- package/dist/cjs/lib/Consultations/ConsultationSpecialistCard/ConsultationSpecialistCard.d.ts +1 -0
- package/dist/cjs/lib/Consultations/SignUpSessionModal/SignUpSessionModal.d.ts +1 -0
- package/dist/cjs/lib2/features/TabsToolbarFeature/TabsToolbarFeature.d.ts +4 -0
- package/dist/cjs/lib2/features/TabsToolbarFeature/index.d.ts +1 -0
- package/dist/cjs/lib2/features/TabsToolbarFeature/types.d.ts +14 -0
- package/dist/cjs/lib2/features/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/assets/icons/IconChat.d.ts +3 -0
- package/dist/cjs/lib2/shared/assets/icons/IconMindlyMini.d.ts +3 -0
- package/dist/cjs/lib2/shared/assets/icons/IconSchedule.d.ts +3 -0
- package/dist/cjs/lib2/shared/assets/icons/index.d.ts +3 -0
- package/dist/cjs/lib2/shared/types/consultation.d.ts +45 -0
- package/dist/cjs/lib2/shared/types/index.d.ts +3 -0
- package/dist/cjs/lib2/shared/types/specialistTypes.d.ts +1 -0
- package/dist/cjs/lib2/shared/types/subscription.d.ts +44 -0
- package/dist/cjs/lib2/shared/ui/Avatar_v2/Avatar_v2.d.ts +2 -1
- package/dist/cjs/lib2/shared/ui/Avatar_v2/Avatar_v2.style.d.ts +1 -0
- package/dist/cjs/lib2/shared/ui/NewSpecialist/NewSpecialist.d.ts +4 -0
- package/dist/cjs/lib2/shared/ui/NewSpecialist/NewSpecialist.stories.d.ts +7 -0
- package/dist/cjs/lib2/shared/ui/NewSpecialist/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/ui/NewSpecialist/styles.d.ts +140 -0
- package/dist/cjs/lib2/shared/ui/NewSpecialist/types.d.ts +7 -0
- package/dist/cjs/lib2/shared/ui/SpecialistProfileNotFound/SpecialistProfileNotFound.d.ts +4 -0
- package/dist/cjs/lib2/shared/ui/SpecialistProfileNotFound/SpecialistProfileNotFound.stories.d.ts +7 -0
- package/dist/cjs/lib2/shared/ui/SpecialistProfileNotFound/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/ui/SpecialistProfileNotFound/types.d.ts +6 -0
- package/dist/cjs/lib2/shared/ui/index.d.ts +2 -0
- package/dist/cjs/lib2/shared/utils/index.d.ts +2 -0
- package/dist/cjs/lib2/shared/utils/specialistStatus.d.ts +4 -0
- package/dist/cjs/lib2/shared/utils/userCan.d.ts +13 -0
- package/dist/cjs/lib2/widgets/SpecialistCardWidget/SpecialistCardWidget.stories.d.ts +1 -0
- package/dist/cjs/lib2/widgets/SpecialistDetailWidget/types.d.ts +1 -0
- package/dist/esm/index.js +7 -7
- package/dist/esm/lib/Consultations/ConsultationCard/types.d.ts +1 -0
- package/dist/esm/lib/Consultations/ConsultationSpecialistCard/ConsultationSpecialistCard.d.ts +1 -0
- package/dist/esm/lib/Consultations/SignUpSessionModal/SignUpSessionModal.d.ts +1 -0
- package/dist/esm/lib2/features/TabsToolbarFeature/TabsToolbarFeature.d.ts +4 -0
- package/dist/esm/lib2/features/TabsToolbarFeature/index.d.ts +1 -0
- package/dist/esm/lib2/features/TabsToolbarFeature/types.d.ts +14 -0
- package/dist/esm/lib2/features/index.d.ts +1 -0
- package/dist/esm/lib2/shared/assets/icons/IconChat.d.ts +3 -0
- package/dist/esm/lib2/shared/assets/icons/IconMindlyMini.d.ts +3 -0
- package/dist/esm/lib2/shared/assets/icons/IconSchedule.d.ts +3 -0
- package/dist/esm/lib2/shared/assets/icons/index.d.ts +3 -0
- package/dist/esm/lib2/shared/types/consultation.d.ts +45 -0
- package/dist/esm/lib2/shared/types/index.d.ts +3 -0
- package/dist/esm/lib2/shared/types/specialistTypes.d.ts +1 -0
- package/dist/esm/lib2/shared/types/subscription.d.ts +44 -0
- package/dist/esm/lib2/shared/ui/Avatar_v2/Avatar_v2.d.ts +2 -1
- package/dist/esm/lib2/shared/ui/Avatar_v2/Avatar_v2.style.d.ts +1 -0
- package/dist/esm/lib2/shared/ui/NewSpecialist/NewSpecialist.d.ts +4 -0
- package/dist/esm/lib2/shared/ui/NewSpecialist/NewSpecialist.stories.d.ts +7 -0
- package/dist/esm/lib2/shared/ui/NewSpecialist/index.d.ts +1 -0
- package/dist/esm/lib2/shared/ui/NewSpecialist/styles.d.ts +140 -0
- package/dist/esm/lib2/shared/ui/NewSpecialist/types.d.ts +7 -0
- package/dist/esm/lib2/shared/ui/SpecialistProfileNotFound/SpecialistProfileNotFound.d.ts +4 -0
- package/dist/esm/lib2/shared/ui/SpecialistProfileNotFound/SpecialistProfileNotFound.stories.d.ts +7 -0
- package/dist/esm/lib2/shared/ui/SpecialistProfileNotFound/index.d.ts +1 -0
- package/dist/esm/lib2/shared/ui/SpecialistProfileNotFound/types.d.ts +6 -0
- package/dist/esm/lib2/shared/ui/index.d.ts +2 -0
- package/dist/esm/lib2/shared/utils/index.d.ts +2 -0
- package/dist/esm/lib2/shared/utils/specialistStatus.d.ts +4 -0
- package/dist/esm/lib2/shared/utils/userCan.d.ts +13 -0
- package/dist/esm/lib2/widgets/SpecialistCardWidget/SpecialistCardWidget.stories.d.ts +1 -0
- package/dist/esm/lib2/widgets/SpecialistDetailWidget/types.d.ts +1 -0
- package/dist/index.d.ts +147 -2
- package/package.json +1 -1
package/dist/esm/lib/Consultations/ConsultationSpecialistCard/ConsultationSpecialistCard.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ type ConsultationSpecialistCardProps = {
|
|
|
7
7
|
onClick?: (id: string) => void;
|
|
8
8
|
onSignUp?: (id: string) => void;
|
|
9
9
|
signInBtnLabel: string;
|
|
10
|
+
isBlockedText?: string;
|
|
10
11
|
};
|
|
11
12
|
declare const _default: React.NamedExoticComponent<ConsultationSpecialistCardProps>;
|
|
12
13
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TabsToolbarFeature } from './TabsToolbarFeature';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Specialist, UserType } from '../../shared';
|
|
3
|
+
export type TabsToolbarItemIcon = 'schedule' | 'list' | 'profile';
|
|
4
|
+
export type TabsToolbarItem = {
|
|
5
|
+
label: string;
|
|
6
|
+
icon: string | React.JSX.Element;
|
|
7
|
+
href: string;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type TabsToolbarProps = {
|
|
11
|
+
user?: UserType | Specialist;
|
|
12
|
+
slot?: 'bottom' | 'top';
|
|
13
|
+
items: TabsToolbarItem[];
|
|
14
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ClientSpecialistContractStatusEnum } from './contract';
|
|
2
|
+
import { Specialist } from './specialistTypes';
|
|
3
|
+
export type Consultation = {
|
|
4
|
+
id: string;
|
|
5
|
+
consultation_time: {
|
|
6
|
+
_seconds: number;
|
|
7
|
+
nanoseconds: number;
|
|
8
|
+
} | string;
|
|
9
|
+
consultation_with: string;
|
|
10
|
+
duration: number;
|
|
11
|
+
exchange_rate: string;
|
|
12
|
+
payment_date: {
|
|
13
|
+
_seconds: number;
|
|
14
|
+
nanoseconds: number;
|
|
15
|
+
};
|
|
16
|
+
payment_type?: string;
|
|
17
|
+
price: number;
|
|
18
|
+
price_uah: number;
|
|
19
|
+
psychologist_avatar: string;
|
|
20
|
+
psychologist_id: string;
|
|
21
|
+
psychologist_name: string;
|
|
22
|
+
psychologist_timezone: string;
|
|
23
|
+
user_avatar: string;
|
|
24
|
+
user_id: string;
|
|
25
|
+
user_name: string;
|
|
26
|
+
user_timezone: string;
|
|
27
|
+
videochat_url: string;
|
|
28
|
+
was_rescheduled: boolean;
|
|
29
|
+
session_status?: 'client_showed' | 'client_not_showed';
|
|
30
|
+
consultation_time_before_rescheduling?: {
|
|
31
|
+
_seconds: number;
|
|
32
|
+
nanoseconds: number;
|
|
33
|
+
};
|
|
34
|
+
therapist?: Specialist;
|
|
35
|
+
client?: {
|
|
36
|
+
specialist_client_contract_id?: string | null;
|
|
37
|
+
specialist_client_contract_status?: ClientSpecialistContractStatusEnum | null;
|
|
38
|
+
};
|
|
39
|
+
applied_promotional_code?: string | null;
|
|
40
|
+
auto_booking_status?: 'enable' | 'disable';
|
|
41
|
+
subscription_id?: string | null;
|
|
42
|
+
price_type?: string;
|
|
43
|
+
price_default?: number;
|
|
44
|
+
payment_intent_id?: string;
|
|
45
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type AutoComplete<T extends string> = T | (string & {});
|
|
1
2
|
export * from './ratingCircleTypes';
|
|
2
3
|
export * from './specialistPaymentTypes';
|
|
3
4
|
export * from './iconProps';
|
|
@@ -9,3 +10,5 @@ export * from './specialistTypes';
|
|
|
9
10
|
export * from './review';
|
|
10
11
|
export * from './contract';
|
|
11
12
|
export * from './user';
|
|
13
|
+
export * from './subscription';
|
|
14
|
+
export * from './consultation';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SupportedCurrency } from './common';
|
|
2
|
+
import { Specialist } from './specialistTypes';
|
|
3
|
+
import { UserType } from './user';
|
|
4
|
+
export type SubscriptionStatuses = 'incomplete' | 'incomplete_expired' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid';
|
|
5
|
+
export type Subscription = {
|
|
6
|
+
id: string;
|
|
7
|
+
last_charge: number;
|
|
8
|
+
period_start: number;
|
|
9
|
+
period_end: number;
|
|
10
|
+
therapist_id: string;
|
|
11
|
+
user_id: string;
|
|
12
|
+
session_count: number;
|
|
13
|
+
subscription_interval_in_month: number;
|
|
14
|
+
subscription_status: SubscriptionStatuses;
|
|
15
|
+
stripe_subscription_id: string;
|
|
16
|
+
session_price: number;
|
|
17
|
+
session_price_default: number;
|
|
18
|
+
session_price_type: SupportedCurrency;
|
|
19
|
+
session_price_uah?: number;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated
|
|
22
|
+
*/
|
|
23
|
+
session_price_by_session_in_eur?: number;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
27
|
+
session_price_by_session_in_uah?: number;
|
|
28
|
+
created_at: number;
|
|
29
|
+
product_id: string;
|
|
30
|
+
subscription_item_id: string;
|
|
31
|
+
discount: number;
|
|
32
|
+
cancel_at_period_end: boolean | null;
|
|
33
|
+
canceled_at?: number;
|
|
34
|
+
pause_collection?: boolean;
|
|
35
|
+
pause_used_at?: number | null;
|
|
36
|
+
number_of_sessions_per_week: number;
|
|
37
|
+
used_balance: number;
|
|
38
|
+
therapist: Specialist;
|
|
39
|
+
user: UserType;
|
|
40
|
+
next_payment_default_in_cents: number;
|
|
41
|
+
next_payment_original_in_cents: number;
|
|
42
|
+
exchange_rate_in_basis_points: number;
|
|
43
|
+
charge_currency: SupportedCurrency;
|
|
44
|
+
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AvatarRoundVariants } from './Avatar_v2.style';
|
|
3
3
|
export type AvatarProps = {
|
|
4
|
-
variant?: 'small' | 'medium' | 'smaller' | 'large' | 'xl';
|
|
4
|
+
variant?: 'small' | 'medium' | 'smaller' | 'large' | 'xl' | 'xs';
|
|
5
5
|
round?: AvatarRoundVariants;
|
|
6
6
|
className?: string;
|
|
7
7
|
src?: string;
|
|
8
8
|
alt?: string;
|
|
9
9
|
showSkeleton?: boolean;
|
|
10
10
|
onClick?(): void;
|
|
11
|
+
border?: boolean;
|
|
11
12
|
};
|
|
12
13
|
declare const _default: React.NamedExoticComponent<AvatarProps>;
|
|
13
14
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import NewSpecialist from './NewSpecialist';
|
|
3
|
+
declare const meta: Meta<typeof NewSpecialist>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Full: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NewSpecialist } from './NewSpecialist';
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { TypographyVariantsEnum } from '../Typography';
|
|
2
|
+
export declare const newSpecialistStyle: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
default: {
|
|
5
|
+
root: string;
|
|
6
|
+
iconVariant: TypographyVariantsEnum;
|
|
7
|
+
titleVariant: TypographyVariantsEnum;
|
|
8
|
+
};
|
|
9
|
+
full: {
|
|
10
|
+
root: string;
|
|
11
|
+
iconVariant: TypographyVariantsEnum;
|
|
12
|
+
titleVariant: TypographyVariantsEnum;
|
|
13
|
+
};
|
|
14
|
+
badge: {
|
|
15
|
+
root: string;
|
|
16
|
+
iconVariant: TypographyVariantsEnum;
|
|
17
|
+
titleVariant: TypographyVariantsEnum;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
iconVariant: string;
|
|
22
|
+
titleVariant: string;
|
|
23
|
+
root: string;
|
|
24
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
|
25
|
+
variant: {
|
|
26
|
+
default: {
|
|
27
|
+
root: string;
|
|
28
|
+
iconVariant: TypographyVariantsEnum;
|
|
29
|
+
titleVariant: TypographyVariantsEnum;
|
|
30
|
+
};
|
|
31
|
+
full: {
|
|
32
|
+
root: string;
|
|
33
|
+
iconVariant: TypographyVariantsEnum;
|
|
34
|
+
titleVariant: TypographyVariantsEnum;
|
|
35
|
+
};
|
|
36
|
+
badge: {
|
|
37
|
+
root: string;
|
|
38
|
+
iconVariant: TypographyVariantsEnum;
|
|
39
|
+
titleVariant: TypographyVariantsEnum;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
variant: {
|
|
44
|
+
default: {
|
|
45
|
+
root: string;
|
|
46
|
+
iconVariant: TypographyVariantsEnum;
|
|
47
|
+
titleVariant: TypographyVariantsEnum;
|
|
48
|
+
};
|
|
49
|
+
full: {
|
|
50
|
+
root: string;
|
|
51
|
+
iconVariant: TypographyVariantsEnum;
|
|
52
|
+
titleVariant: TypographyVariantsEnum;
|
|
53
|
+
};
|
|
54
|
+
badge: {
|
|
55
|
+
root: string;
|
|
56
|
+
iconVariant: TypographyVariantsEnum;
|
|
57
|
+
titleVariant: TypographyVariantsEnum;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
}>, {
|
|
61
|
+
variant: {
|
|
62
|
+
default: {
|
|
63
|
+
root: string;
|
|
64
|
+
iconVariant: TypographyVariantsEnum;
|
|
65
|
+
titleVariant: TypographyVariantsEnum;
|
|
66
|
+
};
|
|
67
|
+
full: {
|
|
68
|
+
root: string;
|
|
69
|
+
iconVariant: TypographyVariantsEnum;
|
|
70
|
+
titleVariant: TypographyVariantsEnum;
|
|
71
|
+
};
|
|
72
|
+
badge: {
|
|
73
|
+
root: string;
|
|
74
|
+
iconVariant: TypographyVariantsEnum;
|
|
75
|
+
titleVariant: TypographyVariantsEnum;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}, {
|
|
79
|
+
iconVariant: string;
|
|
80
|
+
titleVariant: string;
|
|
81
|
+
root: string;
|
|
82
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
83
|
+
variant: {
|
|
84
|
+
default: {
|
|
85
|
+
root: string;
|
|
86
|
+
iconVariant: TypographyVariantsEnum;
|
|
87
|
+
titleVariant: TypographyVariantsEnum;
|
|
88
|
+
};
|
|
89
|
+
full: {
|
|
90
|
+
root: string;
|
|
91
|
+
iconVariant: TypographyVariantsEnum;
|
|
92
|
+
titleVariant: TypographyVariantsEnum;
|
|
93
|
+
};
|
|
94
|
+
badge: {
|
|
95
|
+
root: string;
|
|
96
|
+
iconVariant: TypographyVariantsEnum;
|
|
97
|
+
titleVariant: TypographyVariantsEnum;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}, {
|
|
101
|
+
iconVariant: string;
|
|
102
|
+
titleVariant: string;
|
|
103
|
+
root: string;
|
|
104
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
|
105
|
+
variant: {
|
|
106
|
+
default: {
|
|
107
|
+
root: string;
|
|
108
|
+
iconVariant: TypographyVariantsEnum;
|
|
109
|
+
titleVariant: TypographyVariantsEnum;
|
|
110
|
+
};
|
|
111
|
+
full: {
|
|
112
|
+
root: string;
|
|
113
|
+
iconVariant: TypographyVariantsEnum;
|
|
114
|
+
titleVariant: TypographyVariantsEnum;
|
|
115
|
+
};
|
|
116
|
+
badge: {
|
|
117
|
+
root: string;
|
|
118
|
+
iconVariant: TypographyVariantsEnum;
|
|
119
|
+
titleVariant: TypographyVariantsEnum;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
}, {
|
|
123
|
+
variant: {
|
|
124
|
+
default: {
|
|
125
|
+
root: string;
|
|
126
|
+
iconVariant: TypographyVariantsEnum;
|
|
127
|
+
titleVariant: TypographyVariantsEnum;
|
|
128
|
+
};
|
|
129
|
+
full: {
|
|
130
|
+
root: string;
|
|
131
|
+
iconVariant: TypographyVariantsEnum;
|
|
132
|
+
titleVariant: TypographyVariantsEnum;
|
|
133
|
+
};
|
|
134
|
+
badge: {
|
|
135
|
+
root: string;
|
|
136
|
+
iconVariant: TypographyVariantsEnum;
|
|
137
|
+
titleVariant: TypographyVariantsEnum;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
}>, unknown, unknown, undefined>>;
|
package/dist/esm/lib2/shared/ui/SpecialistProfileNotFound/SpecialistProfileNotFound.stories.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import SpecialistProfileNotFound from './SpecialistProfileNotFound';
|
|
3
|
+
declare const meta: Meta<typeof SpecialistProfileNotFound>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SpecialistProfileNotFound>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithAuth: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SpecialistProfileNotFound } from './SpecialistProfileNotFound';
|
|
@@ -4,3 +4,5 @@ export { priceNormalize } from './priceNormalizer';
|
|
|
4
4
|
export { newShade } from './newShade';
|
|
5
5
|
export { replaceMarkdownWithReactElements } from './replaceMarkdownWithReactElements';
|
|
6
6
|
export { getSignAgreementsTabs } from './getSignAgreementsTabs';
|
|
7
|
+
export * from './specialistStatus';
|
|
8
|
+
export * from './userCan';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Specialist } from '../types/specialistTypes';
|
|
2
|
+
export declare const isSpecialistActive: (specialist: Specialist) => boolean;
|
|
3
|
+
export declare const isSpecialistPublic: (specialist: Specialist) => boolean;
|
|
4
|
+
export declare const isSpecialistBlocked: (specialist: Specialist) => boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AutoComplete } from '../types';
|
|
2
|
+
import { Consultation } from '../types/consultation';
|
|
3
|
+
import { Specialist } from '../types/specialistTypes';
|
|
4
|
+
import { Subscription } from '../types/subscription';
|
|
5
|
+
export type ClientCanAction = AutoComplete<'book_session'>;
|
|
6
|
+
export type ClientCanParams = {
|
|
7
|
+
action: ClientCanAction;
|
|
8
|
+
specialist: Specialist;
|
|
9
|
+
activeSubscription?: Subscription | null;
|
|
10
|
+
subscriptionAvailableBalance?: number;
|
|
11
|
+
consultations?: Consultation[];
|
|
12
|
+
};
|
|
13
|
+
export declare const isClientCan: ({ action, ...params }: ClientCanParams) => boolean;
|