@mindly/ui-components 8.8.8 → 8.8.10

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 (46) hide show
  1. package/dist/cjs/index.js +7 -7
  2. package/dist/cjs/lib2/features/CancelSubscriptionFeature/CancelSubscriptionFeature.d.ts +4 -0
  3. package/dist/cjs/lib2/features/CancelSubscriptionFeature/Stepper/Step1.d.ts +13 -0
  4. package/dist/cjs/lib2/features/CancelSubscriptionFeature/Stepper/Step2.d.ts +17 -0
  5. package/dist/cjs/lib2/features/CancelSubscriptionFeature/Stepper/Step3.d.ts +19 -0
  6. package/dist/cjs/lib2/features/CancelSubscriptionFeature/Stepper/Step4.d.ts +16 -0
  7. package/dist/cjs/lib2/features/CancelSubscriptionFeature/Stepper/Step5.d.ts +18 -0
  8. package/dist/cjs/lib2/features/CancelSubscriptionFeature/Stepper/Step6.d.ts +9 -0
  9. package/dist/cjs/lib2/features/CancelSubscriptionFeature/Stepper/index.d.ts +6 -0
  10. package/dist/cjs/lib2/features/CancelSubscriptionFeature/common/CustomButton/CustomButton.d.ts +10 -0
  11. package/dist/cjs/lib2/features/CancelSubscriptionFeature/common/CustomButton/index.d.ts +2 -0
  12. package/dist/cjs/lib2/features/CancelSubscriptionFeature/common/CustomButton/types.d.ts +4 -0
  13. package/dist/cjs/lib2/features/CancelSubscriptionFeature/common/HeaderWithIcon/HeaderWithIcon.d.ts +8 -0
  14. package/dist/cjs/lib2/features/CancelSubscriptionFeature/common/QuestionLayout/Main.d.ts +13 -0
  15. package/dist/cjs/lib2/features/CancelSubscriptionFeature/common/ScreenContent/ScreenContent.d.ts +19 -0
  16. package/dist/cjs/lib2/features/CancelSubscriptionFeature/common/index.d.ts +4 -0
  17. package/dist/cjs/lib2/features/CancelSubscriptionFeature/constants.d.ts +47 -0
  18. package/dist/cjs/lib2/features/CancelSubscriptionFeature/hooks/useSelectValue.d.ts +16 -0
  19. package/dist/cjs/lib2/features/CancelSubscriptionFeature/hooks/useStepChanger.d.ts +11 -0
  20. package/dist/cjs/lib2/features/CancelSubscriptionFeature/index.d.ts +2 -0
  21. package/dist/cjs/lib2/features/CancelSubscriptionFeature/types.d.ts +50 -0
  22. package/dist/cjs/lib2/features/index.d.ts +1 -0
  23. package/dist/esm/index.js +4 -4
  24. package/dist/esm/lib2/features/CancelSubscriptionFeature/CancelSubscriptionFeature.d.ts +4 -0
  25. package/dist/esm/lib2/features/CancelSubscriptionFeature/Stepper/Step1.d.ts +13 -0
  26. package/dist/esm/lib2/features/CancelSubscriptionFeature/Stepper/Step2.d.ts +17 -0
  27. package/dist/esm/lib2/features/CancelSubscriptionFeature/Stepper/Step3.d.ts +19 -0
  28. package/dist/esm/lib2/features/CancelSubscriptionFeature/Stepper/Step4.d.ts +16 -0
  29. package/dist/esm/lib2/features/CancelSubscriptionFeature/Stepper/Step5.d.ts +18 -0
  30. package/dist/esm/lib2/features/CancelSubscriptionFeature/Stepper/Step6.d.ts +9 -0
  31. package/dist/esm/lib2/features/CancelSubscriptionFeature/Stepper/index.d.ts +6 -0
  32. package/dist/esm/lib2/features/CancelSubscriptionFeature/common/CustomButton/CustomButton.d.ts +10 -0
  33. package/dist/esm/lib2/features/CancelSubscriptionFeature/common/CustomButton/index.d.ts +2 -0
  34. package/dist/esm/lib2/features/CancelSubscriptionFeature/common/CustomButton/types.d.ts +4 -0
  35. package/dist/esm/lib2/features/CancelSubscriptionFeature/common/HeaderWithIcon/HeaderWithIcon.d.ts +8 -0
  36. package/dist/esm/lib2/features/CancelSubscriptionFeature/common/QuestionLayout/Main.d.ts +13 -0
  37. package/dist/esm/lib2/features/CancelSubscriptionFeature/common/ScreenContent/ScreenContent.d.ts +19 -0
  38. package/dist/esm/lib2/features/CancelSubscriptionFeature/common/index.d.ts +4 -0
  39. package/dist/esm/lib2/features/CancelSubscriptionFeature/constants.d.ts +47 -0
  40. package/dist/esm/lib2/features/CancelSubscriptionFeature/hooks/useSelectValue.d.ts +16 -0
  41. package/dist/esm/lib2/features/CancelSubscriptionFeature/hooks/useStepChanger.d.ts +11 -0
  42. package/dist/esm/lib2/features/CancelSubscriptionFeature/index.d.ts +2 -0
  43. package/dist/esm/lib2/features/CancelSubscriptionFeature/types.d.ts +50 -0
  44. package/dist/esm/lib2/features/index.d.ts +1 -0
  45. package/dist/index.d.ts +141 -90
  46. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StepperBaseProps } from './types';
3
+ declare const _default: React.NamedExoticComponent<StepperBaseProps>;
4
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ import { WithTranslation } from 'react-i18next';
3
+ import { Specialist } from '../types';
4
+ export type Step1Props = {
5
+ specialist: Specialist;
6
+ t: WithTranslation['t'];
7
+ onGoNext: () => void;
8
+ onBack: () => void;
9
+ onInfoClick: () => void;
10
+ goToPostponeSubscriptionPage: (step?: number) => void;
11
+ };
12
+ declare const Step1: FC<Step1Props>;
13
+ export default Step1;
@@ -0,0 +1,17 @@
1
+ import { FC } from 'react';
2
+ import { WithTranslation } from 'react-i18next';
3
+ export type Step2Props = {
4
+ t: WithTranslation['t'];
5
+ dateText: string;
6
+ onGoNext: () => void;
7
+ onCancel: (step?: number) => void;
8
+ onBack: () => void;
9
+ onInfoClick: () => void;
10
+ screenImage: {
11
+ url: string;
12
+ width: number;
13
+ height: number;
14
+ };
15
+ };
16
+ declare const Step2: FC<Step2Props>;
17
+ export default Step2;
@@ -0,0 +1,19 @@
1
+ import { FC } from 'react';
2
+ import { RecurringSessionsTimeSlots } from '../types';
3
+ import { WithTranslation } from 'react-i18next';
4
+ export type Step3Props = {
5
+ t: WithTranslation['t'];
6
+ date?: RecurringSessionsTimeSlots;
7
+ recurrentSessionsItems: string | undefined;
8
+ onGoNext: () => void;
9
+ onCancel: (step?: number) => void;
10
+ onBack: () => void;
11
+ onInfoClick: () => void;
12
+ screenImage: {
13
+ url: string;
14
+ width: number;
15
+ height: number;
16
+ };
17
+ };
18
+ declare const Step3: FC<Step3Props>;
19
+ export default Step3;
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { WithTranslation } from 'react-i18next';
3
+ export type Step4Props = {
4
+ t: WithTranslation['t'];
5
+ onGoNext: () => void;
6
+ onCancel: (step?: number) => void;
7
+ onBack: () => void;
8
+ onInfoClick: () => void;
9
+ screenImage: {
10
+ url: string;
11
+ width: number;
12
+ height: number;
13
+ };
14
+ };
15
+ declare const Step4: FC<Step4Props>;
16
+ export default Step4;
@@ -0,0 +1,18 @@
1
+ import { FC } from 'react';
2
+ import { WithTranslation } from 'react-i18next';
3
+ import { Selection } from '@react-types/shared';
4
+ import { OnSubmitArgs } from '../types';
5
+ export type Step5Props = {
6
+ t: WithTranslation['t'];
7
+ onGoNext: () => void;
8
+ onBack: () => void;
9
+ onSubmit: ({ selection, step }: OnSubmitArgs) => void;
10
+ options: {
11
+ id: string;
12
+ label: string;
13
+ }[];
14
+ initialSelection?: Selection;
15
+ onSaveSelectionState?: (selection: Selection, step: number) => void;
16
+ };
17
+ declare const Step5: FC<Step5Props>;
18
+ export default Step5;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { WithTranslation } from 'react-i18next';
3
+ export type Step6Props = {
4
+ t: WithTranslation['t'];
5
+ isRequestCompleted: boolean;
6
+ onComplete: () => void;
7
+ };
8
+ declare const Step6: FC<Step6Props>;
9
+ export default Step6;
@@ -0,0 +1,6 @@
1
+ export { default as Step1 } from './Step1';
2
+ export { default as Step2 } from './Step2';
3
+ export { default as Step3 } from './Step3';
4
+ export { default as Step4 } from './Step4';
5
+ export { default as Step5 } from './Step5';
6
+ export { default as Step6 } from './Step6';
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { CustomButtonType } from './types';
3
+ type CustomButtonProps = {
4
+ onClick?: () => void;
5
+ buttonText: string;
6
+ type?: CustomButtonType;
7
+ disabled?: boolean;
8
+ };
9
+ declare const CustomButton: FC<CustomButtonProps>;
10
+ export default CustomButton;
@@ -0,0 +1,2 @@
1
+ export { default as CustomButton } from './CustomButton';
2
+ export { CustomButtonType } from './types';
@@ -0,0 +1,4 @@
1
+ export declare enum CustomButtonType {
2
+ BASE = "base",
3
+ OUTLINED = "outlined"
4
+ }
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ type HeaderWithIconProps = {
3
+ isIconVisible?: boolean;
4
+ onInfoClick?: () => void;
5
+ onBackClick: () => void;
6
+ };
7
+ declare const HeaderWithIcon: FC<HeaderWithIconProps>;
8
+ export default HeaderWithIcon;
@@ -0,0 +1,13 @@
1
+ import { Selection } from '../../../../shared';
2
+ type MainProps = {
3
+ title: string;
4
+ description?: string;
5
+ options?: {
6
+ id: string;
7
+ label: string;
8
+ }[];
9
+ selectedValue?: Selection;
10
+ onValueChange?: (value: Selection) => void;
11
+ };
12
+ declare const Main: ({ title, description, options, selectedValue, onValueChange, }: MainProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default Main;
@@ -0,0 +1,19 @@
1
+ import { FC, ReactNode } from 'react';
2
+ type AlertCardProps = {
3
+ title?: string;
4
+ text?: string;
5
+ };
6
+ type ScreenContentProps = {
7
+ isAvatarVisible: boolean;
8
+ title: string;
9
+ description: string | ReactNode;
10
+ avatarUrl?: string;
11
+ icon?: {
12
+ url?: string;
13
+ width?: number;
14
+ height?: number;
15
+ };
16
+ alertCardProps?: AlertCardProps;
17
+ };
18
+ declare const ScreenContent: FC<ScreenContentProps>;
19
+ export default ScreenContent;
@@ -0,0 +1,4 @@
1
+ export { default as ScreenContent } from './ScreenContent/ScreenContent';
2
+ export { default as CustomButton } from './CustomButton/CustomButton';
3
+ export { default as HeaderWithIcon } from './HeaderWithIcon/HeaderWithIcon';
4
+ export { CustomButtonType } from './CustomButton/types';
@@ -0,0 +1,47 @@
1
+ export declare const TRANSLATION_KEYS: {
2
+ STEP1: {
3
+ TITLE: string;
4
+ DESCRIPTION: string;
5
+ BUTTON1_TEXT: string;
6
+ BUTTON2_TEXT: string;
7
+ };
8
+ STEP2: {
9
+ TITLE: string;
10
+ DESCRIPTION: string;
11
+ BUTTON1_TEXT: string;
12
+ BUTTON2_TEXT: string;
13
+ };
14
+ STEP3: {
15
+ TITLE: string;
16
+ DESCRIPTION: string;
17
+ BUTTON1_TEXT: string;
18
+ BUTTON2_TEXT: string;
19
+ ALERT_TITLE: string;
20
+ ALERT_DESCRIPTION: string;
21
+ };
22
+ STEP4: {
23
+ TITLE: string;
24
+ DESCRIPTION: string;
25
+ BUTTON1_TEXT: string;
26
+ BUTTON2_TEXT: string;
27
+ };
28
+ STEP5: {
29
+ TITLE: string;
30
+ CONTINUE: string;
31
+ };
32
+ EVERY_DAY: {
33
+ monday: string;
34
+ tuesday: string;
35
+ wednesday: string;
36
+ thursday: string;
37
+ friday: string;
38
+ saturday: string;
39
+ sunday: string;
40
+ };
41
+ };
42
+ export declare const STEP_1_INDEX = 1;
43
+ export declare const STEP_2_INDEX = 2;
44
+ export declare const STEP_3_INDEX = 3;
45
+ export declare const STEP_4_INDEX = 4;
46
+ export declare const STEP_5_INDEX = 5;
47
+ export declare const STEP_6_INDEX = 6;
@@ -0,0 +1,16 @@
1
+ import { Selection } from '@react-types/shared';
2
+ import { OnSubmitArgs } from '../types';
3
+ type UseSelectValueProps = {
4
+ onSubmit: ({ selection, step }: OnSubmitArgs) => void;
5
+ handleGoNext: () => void;
6
+ initialSelection?: Selection;
7
+ onSaveSelectionState?: (selection: Selection, step: number) => void;
8
+ step: number;
9
+ };
10
+ export declare const useSelectValue: ({ onSubmit, handleGoNext, initialSelection, onSaveSelectionState, step, }: UseSelectValueProps) => {
11
+ selectedValue: Selection;
12
+ isButtonDisabled: boolean;
13
+ handleChangeValue: (selection: Selection) => void;
14
+ handleSubmit: () => void;
15
+ };
16
+ export {};
@@ -0,0 +1,11 @@
1
+ type UseStepChangerProps = {
2
+ onSendAnalytics: (step: number) => void;
3
+ onCancel: (step?: number) => void;
4
+ isScreen3Visible: boolean;
5
+ };
6
+ export declare const useStepChanger: ({ onSendAnalytics, onCancel, isScreen3Visible, }: UseStepChangerProps) => {
7
+ step: number;
8
+ handleGoNext: () => void;
9
+ handleGoBack: () => void;
10
+ };
11
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as CancelSubscriptionFeature } from './CancelSubscriptionFeature';
2
+ export type { RecurringSessionsTimeSlots } from './types';
@@ -0,0 +1,50 @@
1
+ import { WithTranslation } from 'react-i18next';
2
+ type ScreenSelectorOptionsType = {
3
+ id: string;
4
+ label: string;
5
+ };
6
+ export type OnSubmitArgs = {
7
+ selection: string[];
8
+ step: number;
9
+ };
10
+ export type RecurringSessionsTimeSlots = {
11
+ day: 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
12
+ time: string;
13
+ };
14
+ export type Specialist = {
15
+ first_name: string;
16
+ avatarUrl?: string;
17
+ };
18
+ export type StepperBaseProps = {
19
+ t: WithTranslation['t'];
20
+ notificationDateTime: string;
21
+ reccurentSessionsTimeSlots?: RecurringSessionsTimeSlots;
22
+ recurrentSessionsItems?: string;
23
+ goToPostponeSubscriptionPage: (step?: number) => void;
24
+ onComplete: () => void;
25
+ onSendAnalytics: (step: number) => void;
26
+ onSubmit: ({ selection, step }: OnSubmitArgs) => void;
27
+ onCancel: (step?: number) => void;
28
+ onInfoClick: () => void;
29
+ specialist: Specialist;
30
+ isRequestCompleted: boolean;
31
+ screen5Options: ScreenSelectorOptionsType[];
32
+ screenImages: {
33
+ screen2: {
34
+ url: string;
35
+ width: number;
36
+ height: number;
37
+ };
38
+ screen3: {
39
+ url: string;
40
+ width: number;
41
+ height: number;
42
+ };
43
+ screen4: {
44
+ url: string;
45
+ width: number;
46
+ height: number;
47
+ };
48
+ };
49
+ };
50
+ export {};
@@ -68,4 +68,5 @@ export * from './ViewedClientsListFeature';
68
68
  export * from './RevampSubscriptionStepperFeature';
69
69
  export * from './ScheduleFeature';
70
70
  export * from './SubscriptionCard';
71
+ export * from './CancelSubscriptionFeature';
71
72
  export type { RecurringSessionsTimeSlots } from './RevampSubscriptionStepperFeature';