@mindly/ui-components 6.1.0 → 6.2.1

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 (66) hide show
  1. package/dist/cjs/index.js +8 -8
  2. package/dist/cjs/lib2/features/ScheduleFeature/ScheduleFeature.d.ts +4 -0
  3. package/dist/cjs/lib2/features/ScheduleFeature/ScheduleSkeletonFeature.d.ts +4 -0
  4. package/dist/cjs/lib2/features/ScheduleFeature/index.d.ts +1 -0
  5. package/dist/cjs/lib2/features/ScheduleFeature/types.d.ts +11 -0
  6. package/dist/cjs/lib2/features/SpecialistEducationsFeature/SpecialistEducationsFeature.d.ts +1 -0
  7. package/dist/cjs/lib2/features/SpecialistScheduleFeature/SpecialistScheduleFeature.d.ts +4 -0
  8. package/dist/cjs/lib2/features/SpecialistScheduleFeature/SpecialistScheduleSkeletonFeature.d.ts +4 -0
  9. package/dist/cjs/lib2/features/SpecialistScheduleFeature/index.d.ts +1 -0
  10. package/dist/cjs/lib2/features/SpecialistScheduleFeature/types.d.ts +11 -0
  11. package/dist/cjs/lib2/features/TabsFeature/TabsFeature.d.ts +4 -0
  12. package/dist/cjs/lib2/features/TabsFeature/TabsFeatureSkeleton.d.ts +4 -0
  13. package/dist/cjs/lib2/features/TabsFeature/index.d.ts +2 -0
  14. package/dist/cjs/lib2/features/TabsFeature/types.d.ts +10 -0
  15. package/dist/cjs/lib2/features/index.d.ts +2 -0
  16. package/dist/cjs/lib2/shared/assets/icons/IconMooving.d.ts +3 -0
  17. package/dist/cjs/lib2/shared/assets/icons/index.d.ts +1 -0
  18. package/dist/cjs/lib2/shared/hooks/index.d.ts +1 -0
  19. package/dist/cjs/lib2/shared/hooks/useDelayMount.d.ts +1 -0
  20. package/dist/cjs/lib2/shared/types/index.d.ts +1 -0
  21. package/dist/cjs/lib2/shared/types/schedule.d.ts +3 -0
  22. package/dist/cjs/lib2/shared/types/specialistTypes.d.ts +2 -0
  23. package/dist/cjs/lib2/shared/ui/EducationCard_v2/EducationCard.d.ts +1 -0
  24. package/dist/cjs/lib2/shared/ui/Typography/types.d.ts +1 -0
  25. package/dist/cjs/lib2/shared/ui/Video/Video.d.ts +1 -0
  26. package/dist/cjs/lib2/shared/ui/Video/styles.d.ts +17 -0
  27. package/dist/cjs/lib2/shared/utils/mock.d.ts +2 -1
  28. package/dist/cjs/lib2/widgets/SpecialistDetailWithTabsWidget/SpecialistDetailWithTabsSkeleton.d.ts +3 -0
  29. package/dist/cjs/lib2/widgets/SpecialistDetailWithTabsWidget/SpecialistDetailWithTabsWidget.d.ts +4 -0
  30. package/dist/cjs/lib2/widgets/SpecialistDetailWithTabsWidget/index.d.ts +2 -0
  31. package/dist/cjs/lib2/widgets/SpecialistDetailWithTabsWidget/types.d.ts +21 -0
  32. package/dist/cjs/lib2/widgets/index.d.ts +1 -0
  33. package/dist/esm/index.js +8 -8
  34. package/dist/esm/lib2/features/ScheduleFeature/ScheduleFeature.d.ts +4 -0
  35. package/dist/esm/lib2/features/ScheduleFeature/ScheduleSkeletonFeature.d.ts +4 -0
  36. package/dist/esm/lib2/features/ScheduleFeature/index.d.ts +1 -0
  37. package/dist/esm/lib2/features/ScheduleFeature/types.d.ts +11 -0
  38. package/dist/esm/lib2/features/SpecialistEducationsFeature/SpecialistEducationsFeature.d.ts +1 -0
  39. package/dist/esm/lib2/features/SpecialistScheduleFeature/SpecialistScheduleFeature.d.ts +4 -0
  40. package/dist/esm/lib2/features/SpecialistScheduleFeature/SpecialistScheduleSkeletonFeature.d.ts +4 -0
  41. package/dist/esm/lib2/features/SpecialistScheduleFeature/index.d.ts +1 -0
  42. package/dist/esm/lib2/features/SpecialistScheduleFeature/types.d.ts +11 -0
  43. package/dist/esm/lib2/features/TabsFeature/TabsFeature.d.ts +4 -0
  44. package/dist/esm/lib2/features/TabsFeature/TabsFeatureSkeleton.d.ts +4 -0
  45. package/dist/esm/lib2/features/TabsFeature/index.d.ts +2 -0
  46. package/dist/esm/lib2/features/TabsFeature/types.d.ts +10 -0
  47. package/dist/esm/lib2/features/index.d.ts +2 -0
  48. package/dist/esm/lib2/shared/assets/icons/IconMooving.d.ts +3 -0
  49. package/dist/esm/lib2/shared/assets/icons/index.d.ts +1 -0
  50. package/dist/esm/lib2/shared/hooks/index.d.ts +1 -0
  51. package/dist/esm/lib2/shared/hooks/useDelayMount.d.ts +1 -0
  52. package/dist/esm/lib2/shared/types/index.d.ts +1 -0
  53. package/dist/esm/lib2/shared/types/schedule.d.ts +3 -0
  54. package/dist/esm/lib2/shared/types/specialistTypes.d.ts +2 -0
  55. package/dist/esm/lib2/shared/ui/EducationCard_v2/EducationCard.d.ts +1 -0
  56. package/dist/esm/lib2/shared/ui/Typography/types.d.ts +1 -0
  57. package/dist/esm/lib2/shared/ui/Video/Video.d.ts +1 -0
  58. package/dist/esm/lib2/shared/ui/Video/styles.d.ts +17 -0
  59. package/dist/esm/lib2/shared/utils/mock.d.ts +2 -1
  60. package/dist/esm/lib2/widgets/SpecialistDetailWithTabsWidget/SpecialistDetailWithTabsSkeleton.d.ts +3 -0
  61. package/dist/esm/lib2/widgets/SpecialistDetailWithTabsWidget/SpecialistDetailWithTabsWidget.d.ts +4 -0
  62. package/dist/esm/lib2/widgets/SpecialistDetailWithTabsWidget/index.d.ts +2 -0
  63. package/dist/esm/lib2/widgets/SpecialistDetailWithTabsWidget/types.d.ts +21 -0
  64. package/dist/esm/lib2/widgets/index.d.ts +1 -0
  65. package/dist/index.d.ts +145 -83
  66. package/package.json +5 -3
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ScheduleFeatureProps } from './types';
3
+ declare const ScheduleFeature: React.FC<ScheduleFeatureProps>;
4
+ export default ScheduleFeature;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ScheduleFeatureProps } from './types';
3
+ declare const ScheduleSkeleton: React.FC<ScheduleFeatureProps>;
4
+ export default ScheduleSkeleton;
@@ -0,0 +1 @@
1
+ export { default as ScheduleFeature } from './ScheduleFeature';
@@ -0,0 +1,11 @@
1
+ import { WithTranslation } from 'react-i18next';
2
+ import { Schedule, ScheduleDate, ScheduleSlot } from '../../shared/types';
3
+ export type ScheduleFeatureProps = {
4
+ isLoading?: boolean;
5
+ className?: string;
6
+ t?: WithTranslation['t'];
7
+ schedule?: Schedule;
8
+ locale?: string;
9
+ onDateClick?: (date: ScheduleDate, slots: ScheduleSlot[]) => void;
10
+ onSlotClick?: (slot: ScheduleSlot) => void;
11
+ };
@@ -8,6 +8,7 @@ type Props = {
8
8
  classNameTitle?: string;
9
9
  t?: WithTranslation['t'];
10
10
  presentingElement?: HTMLElement;
11
+ withPreview?: boolean;
11
12
  };
12
13
  declare const SpecialistEducationsFeature: FC<Props>;
13
14
  export default SpecialistEducationsFeature;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ScheduleFeatureProps } from './types';
3
+ declare const SpecialistScheduleFeature: React.FC<ScheduleFeatureProps>;
4
+ export default SpecialistScheduleFeature;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ScheduleFeatureProps } from './types';
3
+ declare const ScheduleSkeleton: React.FC<ScheduleFeatureProps>;
4
+ export default ScheduleSkeleton;
@@ -0,0 +1 @@
1
+ export { default as SpecialistScheduleFeature } from './SpecialistScheduleFeature';
@@ -0,0 +1,11 @@
1
+ import { WithTranslation } from 'react-i18next';
2
+ import { Schedule, ScheduleDate, ScheduleSlot } from '../../shared/types';
3
+ export type ScheduleFeatureProps = {
4
+ isLoading?: boolean;
5
+ className?: string;
6
+ t?: WithTranslation['t'];
7
+ schedule?: Schedule;
8
+ locale?: string;
9
+ onDateChange?: (date: ScheduleDate, slots: ScheduleSlot[]) => void;
10
+ onSlotChange?: (slot: ScheduleSlot | null) => void;
11
+ };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TabsFeatureProps } from './types';
3
+ declare const TabsFeature: React.FC<TabsFeatureProps>;
4
+ export default TabsFeature;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TabsFeatureProps } from './types';
3
+ declare const TabsFeatureSkeleton: React.FC<Partial<TabsFeatureProps>>;
4
+ export default TabsFeatureSkeleton;
@@ -0,0 +1,2 @@
1
+ export { default as TabsFeature } from './TabsFeature';
2
+ export { default as TabsFeatureSkeleton } from './TabsFeatureSkeleton';
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export type TabsFeatureProps = {
3
+ tabs: {
4
+ title: string;
5
+ content?: React.ReactNode;
6
+ anchor?: string;
7
+ }[];
8
+ className?: string;
9
+ isLoading?: boolean;
10
+ };
@@ -48,3 +48,5 @@ export * from './MindlyReviewFeature';
48
48
  export * from './TariffFeature';
49
49
  export * from './PoweredByStripeFeature';
50
50
  export * from './DropdownFeature';
51
+ export * from './TabsFeature';
52
+ export * from './SpecialistScheduleFeature';
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import { IconProps } from '../../types/iconProps';
3
+ export declare const IconMooving: React.FC<IconProps>;
@@ -136,3 +136,4 @@ export * from './IconRadioPartial';
136
136
  export * from './IconArrowRange';
137
137
  export * from './IconLeaderboard';
138
138
  export * from './IconCheckboxThinUnchecked';
139
+ export * from './IconMooving';
@@ -8,3 +8,4 @@ export * from './useDeepCompareEffect';
8
8
  export * from './useUpdateEffect';
9
9
  export * from './useDeepUpdateEffect';
10
10
  export * from './useIsKeyboardShown';
11
+ export * from './useDelayMount';
@@ -0,0 +1 @@
1
+ export declare const useDelayMount: (delay: number) => boolean;
@@ -14,3 +14,4 @@ export * from './filter';
14
14
  export * from './subscription';
15
15
  export * from './session';
16
16
  export * from './tariff';
17
+ export * from './schedule';
@@ -0,0 +1,3 @@
1
+ export type ScheduleSlot = string;
2
+ export type ScheduleDate = string;
3
+ export type Schedule = Record<ScheduleDate, ScheduleSlot[]>;
@@ -1,5 +1,6 @@
1
1
  import { SupportedCurrency } from './common';
2
2
  import { ClientSpecialistContractStatusEnum, ContractStatusEnum } from './contract';
3
+ import { Schedule } from './schedule';
3
4
  import { Sex } from './user';
4
5
  export type SpecialistEducation = {
5
6
  institution_name: string;
@@ -66,4 +67,5 @@ export type Specialist = {
66
67
  activated_at?: number;
67
68
  matching_by_areas?: string[];
68
69
  matching_by_specialization?: string[];
70
+ available_schedule?: Schedule;
69
71
  };
@@ -6,6 +6,7 @@ export type Props = {
6
6
  className?: string;
7
7
  education: SpecialistEducation;
8
8
  t?: WithTranslation['t'];
9
+ withPreview?: boolean;
9
10
  };
10
11
  declare const _default: React.NamedExoticComponent<Props>;
11
12
  export default _default;
@@ -44,4 +44,5 @@ export type TypographyProps = {
44
44
  children: React.ReactNode;
45
45
  onClick?: (args: any) => typeof args;
46
46
  isError?: boolean;
47
+ id?: string;
47
48
  };
@@ -9,6 +9,7 @@ export type VideoProps = {
9
9
  hiddenVideo?: boolean;
10
10
  variant?: VariantEnum;
11
11
  preview?: string;
12
+ className?: string;
12
13
  onMuteToggle?: () => void;
13
14
  onPlay?(src: string): void;
14
15
  children?: React.ReactNode | ((props: {
@@ -19,13 +19,16 @@ export declare const videoStyle: import("tailwind-variants").TVReturnType<{
19
19
  variant: {
20
20
  default: {
21
21
  playButton: string;
22
+ loadingIcon: string;
22
23
  };
23
24
  blue: {
24
25
  playButton: string;
26
+ loadingIcon: string;
25
27
  };
26
28
  };
27
29
  }, {
28
30
  playButton: string;
31
+ loadingIcon: string;
29
32
  }, undefined, import("tailwind-variants/dist/config").TVConfig<{
30
33
  buttonPlacement: {
31
34
  center: {
@@ -47,9 +50,11 @@ export declare const videoStyle: import("tailwind-variants").TVReturnType<{
47
50
  variant: {
48
51
  default: {
49
52
  playButton: string;
53
+ loadingIcon: string;
50
54
  };
51
55
  blue: {
52
56
  playButton: string;
57
+ loadingIcon: string;
53
58
  };
54
59
  };
55
60
  }, {
@@ -73,9 +78,11 @@ export declare const videoStyle: import("tailwind-variants").TVReturnType<{
73
78
  variant: {
74
79
  default: {
75
80
  playButton: string;
81
+ loadingIcon: string;
76
82
  };
77
83
  blue: {
78
84
  playButton: string;
85
+ loadingIcon: string;
79
86
  };
80
87
  };
81
88
  }>, {
@@ -99,13 +106,16 @@ export declare const videoStyle: import("tailwind-variants").TVReturnType<{
99
106
  variant: {
100
107
  default: {
101
108
  playButton: string;
109
+ loadingIcon: string;
102
110
  };
103
111
  blue: {
104
112
  playButton: string;
113
+ loadingIcon: string;
105
114
  };
106
115
  };
107
116
  }, {
108
117
  playButton: string;
118
+ loadingIcon: string;
109
119
  }, import("tailwind-variants").TVReturnType<{
110
120
  buttonPlacement: {
111
121
  center: {
@@ -127,13 +137,16 @@ export declare const videoStyle: import("tailwind-variants").TVReturnType<{
127
137
  variant: {
128
138
  default: {
129
139
  playButton: string;
140
+ loadingIcon: string;
130
141
  };
131
142
  blue: {
132
143
  playButton: string;
144
+ loadingIcon: string;
133
145
  };
134
146
  };
135
147
  }, {
136
148
  playButton: string;
149
+ loadingIcon: string;
137
150
  }, undefined, import("tailwind-variants/dist/config").TVConfig<{
138
151
  buttonPlacement: {
139
152
  center: {
@@ -155,9 +168,11 @@ export declare const videoStyle: import("tailwind-variants").TVReturnType<{
155
168
  variant: {
156
169
  default: {
157
170
  playButton: string;
171
+ loadingIcon: string;
158
172
  };
159
173
  blue: {
160
174
  playButton: string;
175
+ loadingIcon: string;
161
176
  };
162
177
  };
163
178
  }, {
@@ -181,9 +196,11 @@ export declare const videoStyle: import("tailwind-variants").TVReturnType<{
181
196
  variant: {
182
197
  default: {
183
198
  playButton: string;
199
+ loadingIcon: string;
184
200
  };
185
201
  blue: {
186
202
  playButton: string;
203
+ loadingIcon: string;
187
204
  };
188
205
  };
189
206
  }>, unknown, unknown, undefined>>;
@@ -2,7 +2,7 @@ import { WithTranslation } from 'react-i18next';
2
2
  import { ClientSpecialistContractStatusEnum } from '../types/contract';
3
3
  import { UserType } from '../types/user';
4
4
  import { Specialist } from '../types/specialistTypes';
5
- import { Session, SpecialistReview } from '../types';
5
+ import { Schedule, Session, SpecialistReview } from '../types';
6
6
  export declare const mockT: (translate?: Record<string, string>) => WithTranslation['t'];
7
7
  export declare const specialist: Specialist;
8
8
  export declare const currentUser: UserType;
@@ -47,3 +47,4 @@ export declare const mockSessions: {
47
47
  subscription?: import("../types").Subscription | undefined;
48
48
  session_review?: import("../types").SessionReview | undefined;
49
49
  }[];
50
+ export declare const getMockSchedule: (dayCount: number, hoursStart?: number, hoursEnd?: number) => Schedule;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SpecialistDetailWithTabsSkeleton: React.FC;
3
+ export default SpecialistDetailWithTabsSkeleton;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SpecialistDetailWithTabsWidgetProps } from './types';
3
+ declare const _default: React.NamedExoticComponent<SpecialistDetailWithTabsWidgetProps>;
4
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as SpecialistDetailWithTabsWidget } from './SpecialistDetailWithTabsWidget';
2
+ export { default as SpecialistDetailWithTabsSkeleton } from './SpecialistDetailWithTabsSkeleton';
@@ -0,0 +1,21 @@
1
+ import { WithTranslation } from 'react-i18next';
2
+ import { Specialist } from '../../shared/types/specialistTypes';
3
+ import { ScheduleDate, ScheduleSlot, SpecialistReview, UserType } from '../../shared';
4
+ export type SpecialistDetailWithTabsWidgetProps = {
5
+ t?: WithTranslation['t'];
6
+ isLoading?: boolean;
7
+ isLoadingSchedule?: boolean;
8
+ specialist: Specialist;
9
+ reviews?: SpecialistReview[];
10
+ country: string;
11
+ isAuth?: boolean;
12
+ isSpecialistUnAvailable?: boolean;
13
+ onLoadMoreReviews?(): void;
14
+ currentUser?: UserType;
15
+ presentingElement?: HTMLElement;
16
+ onOpenSuperSpecialistArticle?(): void;
17
+ onOpenNewSpecialistArticle?(): void;
18
+ onEditSpecialistReview?: (review: Pick<SpecialistReview, 'id' | 'review_rating' | 'text_of_review'>) => Promise<void>;
19
+ onScheduleDateChange?: (date: ScheduleDate, slots: ScheduleSlot[]) => void;
20
+ onScheduleSlotChange?: (slot: ScheduleSlot | null) => void;
21
+ };
@@ -10,3 +10,4 @@ export * from './SessionsListWidget';
10
10
  export * from './SessionDetailWidget';
11
11
  export * from './SessionPaymentsWidget';
12
12
  export * from './SpecialistPreviewWidget';
13
+ export * from './SpecialistDetailWithTabsWidget';