@mindly/ui-components 8.8.1 → 8.8.3
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 +5 -5
- package/dist/cjs/lib2/features/SpecialistScheduleFeature/types.d.ts +5 -1
- package/dist/cjs/lib2/features/SubscriptionCard/SubscriptionCard.d.ts +18 -0
- package/dist/cjs/lib2/features/SubscriptionCard/common/ActiveBalance.d.ts +11 -0
- package/dist/cjs/lib2/features/SubscriptionCard/common/Footer.d.ts +13 -0
- package/dist/cjs/lib2/features/SubscriptionCard/common/Header.d.ts +14 -0
- package/dist/cjs/lib2/features/SubscriptionCard/common/SubscriptionDetails.d.ts +14 -0
- package/dist/cjs/lib2/features/SubscriptionCard/constants.d.ts +2 -0
- package/dist/cjs/lib2/features/SubscriptionCard/index.d.ts +1 -0
- package/dist/cjs/lib2/features/SubscriptionCard/types.d.ts +2 -0
- package/dist/cjs/lib2/features/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/assets/icons/IconParallelArrows.d.ts +6 -0
- package/dist/cjs/lib2/shared/assets/icons/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/types/subscription.d.ts +6 -0
- package/dist/esm/index.js +7 -7
- package/dist/esm/lib2/features/SpecialistScheduleFeature/types.d.ts +5 -1
- package/dist/esm/lib2/features/SubscriptionCard/SubscriptionCard.d.ts +18 -0
- package/dist/esm/lib2/features/SubscriptionCard/common/ActiveBalance.d.ts +11 -0
- package/dist/esm/lib2/features/SubscriptionCard/common/Footer.d.ts +13 -0
- package/dist/esm/lib2/features/SubscriptionCard/common/Header.d.ts +14 -0
- package/dist/esm/lib2/features/SubscriptionCard/common/SubscriptionDetails.d.ts +14 -0
- package/dist/esm/lib2/features/SubscriptionCard/constants.d.ts +2 -0
- package/dist/esm/lib2/features/SubscriptionCard/index.d.ts +1 -0
- package/dist/esm/lib2/features/SubscriptionCard/types.d.ts +2 -0
- package/dist/esm/lib2/features/index.d.ts +1 -0
- package/dist/esm/lib2/shared/assets/icons/IconParallelArrows.d.ts +6 -0
- package/dist/esm/lib2/shared/assets/icons/index.d.ts +1 -0
- package/dist/esm/lib2/shared/types/subscription.d.ts +6 -0
- package/dist/index.d.ts +207 -178
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WithTranslation } from 'react-i18next';
|
|
2
|
-
import { AppViewType, ScheduleSlot, SessionTypeEnum, SupportedLocales, TypographyVariantsEnum, UserTypeEnum } from '../../shared';
|
|
2
|
+
import { AppViewType, Schedule, ScheduleSlot, SessionTypeEnum, SupportedLocales, TypographyVariantsEnum, UserTypeEnum } from '../../shared';
|
|
3
3
|
import { ScheduleDate } from '../../shared';
|
|
4
4
|
type SelectionMode = 'single' | 'multiple';
|
|
5
5
|
export type ScheduleFeatureProps = {
|
|
@@ -32,5 +32,9 @@ export type ScheduleFeatureProps = {
|
|
|
32
32
|
onSlotChange?: (slot: ScheduleSlot | null) => void;
|
|
33
33
|
onShowAll?: () => void;
|
|
34
34
|
onBookClick?: () => void;
|
|
35
|
+
apiRef?: React.RefObject<ScheduleFeatureApiRef>;
|
|
36
|
+
};
|
|
37
|
+
export type ScheduleFeatureApiRef = {
|
|
38
|
+
getHandledSchedule: () => Schedule | undefined;
|
|
35
39
|
};
|
|
36
40
|
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { WithTranslation } from 'react-i18next';
|
|
3
|
+
import { SupportedLocales } from '../../shared';
|
|
4
|
+
import { Subscription } from '../../shared/types/subscription';
|
|
5
|
+
type RedesignedSubscriptionСardProps = {
|
|
6
|
+
subscription: Subscription;
|
|
7
|
+
onMoveToPostponeFlow?: (subscriptionId: string, specialistId: string) => void;
|
|
8
|
+
onOpenActionModal: (subscription: Subscription) => void;
|
|
9
|
+
onUpdateSubscription: ({ sessionCount, usedBalance, therapistId, }: {
|
|
10
|
+
sessionCount: number;
|
|
11
|
+
usedBalance: number;
|
|
12
|
+
therapistId: string;
|
|
13
|
+
}) => void;
|
|
14
|
+
locale: SupportedLocales;
|
|
15
|
+
t: WithTranslation['t'];
|
|
16
|
+
};
|
|
17
|
+
declare const RedesignedSubscriptionСard: FC<RedesignedSubscriptionСardProps>;
|
|
18
|
+
export default RedesignedSubscriptionСard;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { WithTranslation } from 'react-i18next';
|
|
3
|
+
type ActiveBalanceProps = {
|
|
4
|
+
t: WithTranslation['t'];
|
|
5
|
+
activeBalance: number;
|
|
6
|
+
isSubscriptionCanceled: boolean;
|
|
7
|
+
subscriptionEndDate: string;
|
|
8
|
+
isPaymentDateInTheFuture: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const ActiveBalance: FC<ActiveBalanceProps>;
|
|
11
|
+
export default ActiveBalance;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { WithTranslation } from 'react-i18next';
|
|
3
|
+
type FooterProps = {
|
|
4
|
+
t: WithTranslation['t'];
|
|
5
|
+
isSubscriptionCanceled: boolean;
|
|
6
|
+
isSubscriptionWasPostponed: boolean;
|
|
7
|
+
isSubscriptionBalanceZero: boolean;
|
|
8
|
+
onMoveToPostponeFlow: () => void;
|
|
9
|
+
onUpdateSubscription: () => void;
|
|
10
|
+
onOpenActionModal: (state: boolean) => void;
|
|
11
|
+
};
|
|
12
|
+
declare const Footer: FC<FooterProps>;
|
|
13
|
+
export default Footer;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { badgeVariants } from '../constants';
|
|
3
|
+
type HeaderProps = {
|
|
4
|
+
avatar_link: string;
|
|
5
|
+
first_name: string;
|
|
6
|
+
last_name: string;
|
|
7
|
+
specializationList: string;
|
|
8
|
+
subscriptionStatus: {
|
|
9
|
+
status: keyof typeof badgeVariants;
|
|
10
|
+
text: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
declare const Header: FC<HeaderProps>;
|
|
14
|
+
export default Header;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { WithTranslation } from 'react-i18next';
|
|
3
|
+
type SubscriptionDetailsProps = {
|
|
4
|
+
t: WithTranslation['t'];
|
|
5
|
+
activePaymentDate: string;
|
|
6
|
+
subscriptionSum: string;
|
|
7
|
+
subscriptionInterval: number;
|
|
8
|
+
sessionCount: number;
|
|
9
|
+
deprecatedPaymentDate?: string;
|
|
10
|
+
isSubscriptionCanceled: boolean;
|
|
11
|
+
isPaymentDateInTheFuture: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const SubscriptionDetails: FC<SubscriptionDetailsProps>;
|
|
14
|
+
export default SubscriptionDetails;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SubscriptionCard } from './SubscriptionCard';
|
|
@@ -66,4 +66,5 @@ export * from './RecurringSessionPreviewFeature';
|
|
|
66
66
|
export * from './ReservedSessionManageModalFeature';
|
|
67
67
|
export * from './ViewedClientsListFeature';
|
|
68
68
|
export * from './RevampSubscriptionStepperFeature';
|
|
69
|
+
export * from './SubscriptionCard';
|
|
69
70
|
export type { RecurringSessionsTimeSlots } from './RevampSubscriptionStepperFeature';
|
|
@@ -42,4 +42,10 @@ export type Subscription = {
|
|
|
42
42
|
exchange_rate_in_basis_points: number;
|
|
43
43
|
charge_currency: SupportedCurrency;
|
|
44
44
|
exchange_rate: string;
|
|
45
|
+
postponements?: {
|
|
46
|
+
created_at: number;
|
|
47
|
+
days: number;
|
|
48
|
+
reason: string;
|
|
49
|
+
}[];
|
|
50
|
+
previous_period_end?: number;
|
|
45
51
|
};
|