gotrip-fx-transaction-form 1.0.198-dev → 1.0.200-dev
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/index.js +26799 -24813
- package/package.json +1 -1
- package/types/components/Insurance/InsuranceContentRenderer/DynamicRenderer.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/AccordionBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ActionButtonBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ContainerBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/DataRowBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/DividerBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ListGroupBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/TextBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/types.d.ts +64 -0
- package/types/components/Insurance/InsuranceContentRenderer/utils/richText.d.ts +14 -0
- package/types/components/Insurance/InsuranceContentRenderer/utils/styleMapper.d.ts +6 -0
- package/types/components/Insurance/InsurancePlans/InsurancePlanFilter.d.ts +11 -0
- package/types/components/Insurance/InsurancePlans/index.d.ts +1 -0
- package/types/components/Insurance/StepTwoPlans.d.ts +8 -1
- package/types/components/Insurance/types.d.ts +2 -0
package/package.json
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionButtonBlock as ActionButtonBlockType } from '../types';
|
|
2
|
+
interface ActionButtonBlockProps {
|
|
3
|
+
block: ActionButtonBlockType;
|
|
4
|
+
}
|
|
5
|
+
export declare const ActionButtonBlock: ({ block }: ActionButtonBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export type BlockType = 'accordion' | 'data_row' | 'text_block' | 'list_group' | 'divider' | 'action_button' | 'container';
|
|
2
|
+
export interface StyleBlock {
|
|
3
|
+
margin?: [number, number, number, number];
|
|
4
|
+
padding?: [number, number, number, number];
|
|
5
|
+
font_weight?: 'bold' | 'normal' | 'semibold' | 'medium';
|
|
6
|
+
font_style?: 'italic' | 'normal';
|
|
7
|
+
text_color?: string;
|
|
8
|
+
alignment?: 'left' | 'center' | 'right';
|
|
9
|
+
}
|
|
10
|
+
export interface BaseBlock {
|
|
11
|
+
type: BlockType;
|
|
12
|
+
styles?: StyleBlock;
|
|
13
|
+
}
|
|
14
|
+
export interface AccordionBlock extends BaseBlock {
|
|
15
|
+
type: 'accordion';
|
|
16
|
+
title: string;
|
|
17
|
+
value?: string;
|
|
18
|
+
is_expanded?: boolean;
|
|
19
|
+
children?: InsuranceContentBlock[];
|
|
20
|
+
}
|
|
21
|
+
export interface DataRowBlock extends BaseBlock {
|
|
22
|
+
type: 'data_row';
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
has_info?: boolean;
|
|
26
|
+
info_content?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface TextBlock extends BaseBlock {
|
|
29
|
+
type: 'text_block';
|
|
30
|
+
content: string;
|
|
31
|
+
text_style?: 'h1' | 'h2' | 'h3' | 'body';
|
|
32
|
+
}
|
|
33
|
+
export interface ListGroupBlock extends BaseBlock {
|
|
34
|
+
type: 'list_group';
|
|
35
|
+
marker_type?: 'disc' | 'decimal' | 'roman';
|
|
36
|
+
items: Array<{
|
|
37
|
+
content: string;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
export interface DividerBlock extends BaseBlock {
|
|
41
|
+
type: 'divider';
|
|
42
|
+
line_style?: 'solid' | 'dashed';
|
|
43
|
+
thickness?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface ActionButtonBlock extends BaseBlock {
|
|
46
|
+
type: 'action_button';
|
|
47
|
+
label: string;
|
|
48
|
+
icon?: 'pdf_red' | string;
|
|
49
|
+
action: {
|
|
50
|
+
type: 'open_url';
|
|
51
|
+
payload: string;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface ContainerBlock extends BaseBlock {
|
|
55
|
+
type: 'container';
|
|
56
|
+
layout?: 'vertical' | 'horizontal';
|
|
57
|
+
children: InsuranceContentBlock[];
|
|
58
|
+
}
|
|
59
|
+
export type InsuranceContentBlock = AccordionBlock | DataRowBlock | TextBlock | ListGroupBlock | DividerBlock | ActionButtonBlock | ContainerBlock;
|
|
60
|
+
export interface InsuranceContent {
|
|
61
|
+
benefits?: InsuranceContentBlock[];
|
|
62
|
+
conditions?: InsuranceContentBlock[];
|
|
63
|
+
compensation?: InsuranceContentBlock[];
|
|
64
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts markdown-like rich text formatting to HTML
|
|
3
|
+
* Supports:
|
|
4
|
+
* - **text** -> <strong>text</strong> (bold)
|
|
5
|
+
* - _text_ -> <em>text</em> (italic)
|
|
6
|
+
*/
|
|
7
|
+
export declare const parseRichText: (content: string) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Safely renders rich text with React
|
|
10
|
+
* Returns an object suitable for dangerouslySetInnerHTML
|
|
11
|
+
*/
|
|
12
|
+
export declare const getRichTextHtml: (content: string) => {
|
|
13
|
+
__html: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EInsuranceProviderType } from '../../../types/insurance';
|
|
2
|
+
export type SortOrder = 'asc' | 'desc';
|
|
3
|
+
interface InsurancePlanFilterProps {
|
|
4
|
+
selectedProviders: EInsuranceProviderType[];
|
|
5
|
+
onProviderChange: (providers: EInsuranceProviderType[]) => void;
|
|
6
|
+
sortOrder: SortOrder;
|
|
7
|
+
onSortChange: (order: SortOrder) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const InsurancePlanFilter: ({ selectedProviders, onProviderChange, sortOrder, onSortChange, disabled, }: InsurancePlanFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { SortOrder } from './InsurancePlans';
|
|
2
|
+
import { EInsuranceProviderType } from '../../types/insurance';
|
|
1
3
|
import { CoveragePlanPremium, CalculatePremiumRequest, TravelPlanFormValues } from './types';
|
|
2
4
|
interface StepTwoPlansProps {
|
|
3
5
|
requestPayload: CalculatePremiumRequest | null;
|
|
@@ -6,6 +8,11 @@ interface StepTwoPlansProps {
|
|
|
6
8
|
insuranceType?: 'travel' | 'car' | 'motorcycle' | string;
|
|
7
9
|
travelPlan?: TravelPlanFormValues | null;
|
|
8
10
|
allowDiscount?: boolean;
|
|
11
|
+
onScrollToTop?: () => void;
|
|
12
|
+
selectedProviders: EInsuranceProviderType[];
|
|
13
|
+
onProviderChange: (providers: EInsuranceProviderType[]) => void;
|
|
14
|
+
sortOrder: SortOrder;
|
|
15
|
+
onSortChange: (sortOrder: SortOrder) => void;
|
|
9
16
|
}
|
|
10
|
-
export declare const StepTwoPlans: ({ requestPayload, selectedPlanId, onPlanSelect, insuranceType, travelPlan, allowDiscount, }: StepTwoPlansProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const StepTwoPlans: ({ requestPayload, selectedPlanId, onPlanSelect, insuranceType, travelPlan, allowDiscount, onScrollToTop, selectedProviders, onProviderChange, sortOrder, onSortChange, }: StepTwoPlansProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
18
|
export {};
|