@mindly/ui-components 8.8.0 → 8.8.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.
Files changed (30) hide show
  1. package/dist/cjs/index.js +5 -5
  2. package/dist/cjs/lib2/features/SubscriptionCard/SubscriptionCard.d.ts +18 -0
  3. package/dist/cjs/lib2/features/SubscriptionCard/common/ActiveBalance.d.ts +11 -0
  4. package/dist/cjs/lib2/features/SubscriptionCard/common/Footer.d.ts +13 -0
  5. package/dist/cjs/lib2/features/SubscriptionCard/common/Header.d.ts +14 -0
  6. package/dist/cjs/lib2/features/SubscriptionCard/common/SubscriptionDetails.d.ts +14 -0
  7. package/dist/cjs/lib2/features/SubscriptionCard/constants.d.ts +2 -0
  8. package/dist/cjs/lib2/features/SubscriptionCard/index.d.ts +1 -0
  9. package/dist/cjs/lib2/features/SubscriptionCard/types.d.ts +2 -0
  10. package/dist/cjs/lib2/features/SuccessModalFeature/SuccessModalFeature.d.ts +1 -0
  11. package/dist/cjs/lib2/features/index.d.ts +1 -0
  12. package/dist/cjs/lib2/shared/assets/icons/IconParallelArrows.d.ts +6 -0
  13. package/dist/cjs/lib2/shared/assets/icons/index.d.ts +1 -0
  14. package/dist/cjs/lib2/shared/types/subscription.d.ts +6 -0
  15. package/dist/esm/index.js +7 -7
  16. package/dist/esm/lib2/features/SubscriptionCard/SubscriptionCard.d.ts +18 -0
  17. package/dist/esm/lib2/features/SubscriptionCard/common/ActiveBalance.d.ts +11 -0
  18. package/dist/esm/lib2/features/SubscriptionCard/common/Footer.d.ts +13 -0
  19. package/dist/esm/lib2/features/SubscriptionCard/common/Header.d.ts +14 -0
  20. package/dist/esm/lib2/features/SubscriptionCard/common/SubscriptionDetails.d.ts +14 -0
  21. package/dist/esm/lib2/features/SubscriptionCard/constants.d.ts +2 -0
  22. package/dist/esm/lib2/features/SubscriptionCard/index.d.ts +1 -0
  23. package/dist/esm/lib2/features/SubscriptionCard/types.d.ts +2 -0
  24. package/dist/esm/lib2/features/SuccessModalFeature/SuccessModalFeature.d.ts +1 -0
  25. package/dist/esm/lib2/features/index.d.ts +1 -0
  26. package/dist/esm/lib2/shared/assets/icons/IconParallelArrows.d.ts +6 -0
  27. package/dist/esm/lib2/shared/assets/icons/index.d.ts +1 -0
  28. package/dist/esm/lib2/shared/types/subscription.d.ts +6 -0
  29. package/dist/index.d.ts +204 -178
  30. package/package.json +1 -1
@@ -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,2 @@
1
+ import { badgeAvailableVariants } from './types';
2
+ export declare const badgeVariants: Record<'active' | 'canceled', badgeAvailableVariants>;
@@ -0,0 +1 @@
1
+ export { default as SubscriptionCard } from './SubscriptionCard';
@@ -0,0 +1,2 @@
1
+ import { BadgeVariants } from '../../shared/ui/Badge/types';
2
+ export type badgeAvailableVariants = Exclude<BadgeVariants, 'brand' | 'attention' | 'neutral' | 'info'>;
@@ -15,6 +15,7 @@ type SuccessModalFeatureProps = {
15
15
  onSyncClick?: () => void;
16
16
  onContinueClick?: () => void;
17
17
  showGoogleCalendar?: boolean;
18
+ additionalContent?: React.ReactNode;
18
19
  };
19
20
  declare const SuccessModalFeature: FC<SuccessModalFeatureProps>;
20
21
  export default SuccessModalFeature;
@@ -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';
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ interface IconProps extends React.SVGAttributes<SVGElement> {
3
+ color?: string;
4
+ }
5
+ export declare function IconParallelArrows({ color, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -169,3 +169,4 @@ export * from './IconPeople';
169
169
  export * from './IconRoundWarning';
170
170
  export * from './IconRoundInfo';
171
171
  export * from './IconAI';
172
+ export * from './IconParallelArrows';
@@ -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
  };