@mychoice/mychoice-sdk-components 1.0.1 → 2.0.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.
- package/dist/cjs/components/buttons/interfaces.d.ts +6 -6
- package/dist/cjs/components/headers/interfaces.d.ts +2 -2
- package/dist/cjs/components/icons/IconArrow.d.ts +3 -0
- package/dist/cjs/components/icons/IconClock.d.ts +3 -0
- package/dist/cjs/components/icons/IconDropdownArrow.d.ts +3 -0
- package/dist/cjs/components/icons/IconTabArrow.d.ts +3 -0
- package/dist/cjs/components/icons/index.d.ts +1 -0
- package/dist/cjs/components/inputs/interfaces.d.ts +4 -3
- package/dist/cjs/components/messages/interfaces.d.ts +1 -1
- package/dist/cjs/components/navigations/Step/Step.d.ts +1 -0
- package/dist/cjs/components/navigations/Step/index.d.ts +1 -1
- package/dist/cjs/components/navigations/interfaces.d.ts +5 -2
- package/dist/cjs/components/quotes/BrokerLink/BrokerLink.d.ts +3 -0
- package/dist/cjs/components/quotes/BrokerLink/index.d.ts +1 -0
- package/dist/cjs/components/quotes/interfaces.d.ts +7 -7
- package/dist/cjs/components/selects/interfaces.d.ts +1 -1
- package/dist/cjs/components/titles/interfaces.d.ts +1 -1
- package/dist/cjs/components/tooltips/interfaces.d.ts +4 -2
- package/dist/cjs/constants/api.d.ts +4 -0
- package/dist/cjs/constants/application.d.ts +5 -2
- package/dist/cjs/constants/device.d.ts +2 -1
- package/dist/cjs/constants/insurances/home/pages/address.d.ts +2 -6
- package/dist/cjs/constants/insurances/home/pages/applicant.d.ts +4 -4
- package/dist/cjs/constants/insurances/home/pages/property.d.ts +26 -2
- package/dist/cjs/constants/insurances/index.d.ts +1 -0
- package/dist/cjs/constants/insurances/life/index.d.ts +1 -0
- package/dist/cjs/constants/insurances/life/pages/coverage.d.ts +12 -0
- package/dist/cjs/constants/insurances/life/pages/index.d.ts +1 -0
- package/dist/cjs/constants/insurances/shared/index.d.ts +1 -0
- package/dist/cjs/constants/insurances/shared/options.d.ts +1 -1
- package/dist/cjs/constants/insurances/shared/postal.d.ts +1 -0
- package/dist/cjs/constants/modals.d.ts +1 -0
- package/dist/cjs/helpers/main.d.ts +11 -0
- package/dist/cjs/index.js +302 -97
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/general.d.ts +7 -7
- package/dist/cjs/interfaces/inputs.d.ts +6 -3
- package/dist/cjs/utils/InputValueReducer/interfaces.d.ts +1 -5
- package/dist/esm/components/buttons/interfaces.d.ts +6 -6
- package/dist/esm/components/headers/interfaces.d.ts +2 -2
- package/dist/esm/components/icons/IconArrow.d.ts +3 -0
- package/dist/esm/components/icons/IconClock.d.ts +3 -0
- package/dist/esm/components/icons/IconDropdownArrow.d.ts +3 -0
- package/dist/esm/components/icons/IconTabArrow.d.ts +3 -0
- package/dist/esm/components/icons/index.d.ts +1 -0
- package/dist/esm/components/inputs/interfaces.d.ts +4 -3
- package/dist/esm/components/messages/interfaces.d.ts +1 -1
- package/dist/esm/components/navigations/Step/Step.d.ts +1 -0
- package/dist/esm/components/navigations/Step/index.d.ts +1 -1
- package/dist/esm/components/navigations/interfaces.d.ts +5 -2
- package/dist/esm/components/quotes/BrokerLink/BrokerLink.d.ts +3 -0
- package/dist/esm/components/quotes/BrokerLink/index.d.ts +1 -0
- package/dist/esm/components/quotes/interfaces.d.ts +7 -7
- package/dist/esm/components/selects/interfaces.d.ts +1 -1
- package/dist/esm/components/titles/interfaces.d.ts +1 -1
- package/dist/esm/components/tooltips/interfaces.d.ts +4 -2
- package/dist/esm/constants/api.d.ts +4 -0
- package/dist/esm/constants/application.d.ts +5 -2
- package/dist/esm/constants/device.d.ts +2 -1
- package/dist/esm/constants/insurances/home/pages/address.d.ts +2 -6
- package/dist/esm/constants/insurances/home/pages/applicant.d.ts +4 -4
- package/dist/esm/constants/insurances/home/pages/property.d.ts +26 -2
- package/dist/esm/constants/insurances/index.d.ts +1 -0
- package/dist/esm/constants/insurances/life/index.d.ts +1 -0
- package/dist/esm/constants/insurances/life/pages/coverage.d.ts +12 -0
- package/dist/esm/constants/insurances/life/pages/index.d.ts +1 -0
- package/dist/esm/constants/insurances/shared/index.d.ts +1 -0
- package/dist/esm/constants/insurances/shared/options.d.ts +1 -1
- package/dist/esm/constants/insurances/shared/postal.d.ts +1 -0
- package/dist/esm/constants/modals.d.ts +1 -0
- package/dist/esm/helpers/main.d.ts +11 -0
- package/dist/esm/index.js +279 -95
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/general.d.ts +7 -7
- package/dist/esm/interfaces/inputs.d.ts +6 -3
- package/dist/esm/utils/InputValueReducer/interfaces.d.ts +1 -5
- package/dist/index.d.ts +167 -105
- package/package.json +3 -3
- package/dist/cjs/components/icons/loaders/IconLoaderVideo.d.ts +0 -5
- package/dist/esm/components/icons/loaders/IconLoaderVideo.d.ts +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MouseEventHandler, ReactElement } from 'react';
|
|
2
2
|
import { SizeTypes, ButtonTypes, ButtonVariantTypes, CategoryTypes, ColorTypes, DirectionTypes } from '../../constants';
|
|
3
|
-
export
|
|
3
|
+
export type ButtonBaseProps = {
|
|
4
4
|
label?: string;
|
|
5
5
|
category?: CategoryTypes;
|
|
6
6
|
color?: ColorTypes;
|
|
@@ -11,25 +11,25 @@ export declare type ButtonBaseProps = {
|
|
|
11
11
|
type?: ButtonTypes;
|
|
12
12
|
onClick?: () => void;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type ButtonArrowProps = ButtonBaseProps & {
|
|
15
15
|
direction?: DirectionTypes;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type ButtonTabArrowProps = {
|
|
18
18
|
className?: string;
|
|
19
19
|
onClick?: () => void;
|
|
20
20
|
direction?: DirectionTypes;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type ButtonMenuProps = {
|
|
23
23
|
className?: string;
|
|
24
24
|
onClick?: () => void;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type ButtonFormProps = {
|
|
27
27
|
className?: string;
|
|
28
28
|
selected?: boolean;
|
|
29
29
|
onClick?: () => void;
|
|
30
30
|
label?: string;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type NavigationTabProps = {
|
|
33
33
|
className?: string;
|
|
34
34
|
selfDelete?: boolean;
|
|
35
35
|
iconClick?: MouseEventHandler<SVGSVGElement | HTMLButtonElement>;
|
|
@@ -2,11 +2,11 @@ export interface NavItemInterface {
|
|
|
2
2
|
name: string;
|
|
3
3
|
link: string;
|
|
4
4
|
}
|
|
5
|
-
export
|
|
5
|
+
export type HeaderNavGroupProps = {
|
|
6
6
|
className?: string;
|
|
7
7
|
navItems: NavItemInterface[];
|
|
8
8
|
isExternal?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type HeaderDropDownProps = HeaderNavGroupProps & {
|
|
11
11
|
name: string;
|
|
12
12
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { InputTypes, SizeTypes, ValidationStatusTypes } from '../../constants';
|
|
2
2
|
import { DefaultInputProps, OnChangeEventInterface } from '../../interfaces';
|
|
3
|
-
export
|
|
3
|
+
export type InputProps = DefaultInputProps & {
|
|
4
4
|
size?: SizeTypes;
|
|
5
5
|
type?: InputTypes;
|
|
6
6
|
onChange?: (option: OnChangeEventInterface) => void;
|
|
7
|
+
manipulateInput?: (value: string) => string;
|
|
7
8
|
};
|
|
8
|
-
export
|
|
9
|
+
export type CheckboxProps = {
|
|
9
10
|
className?: string;
|
|
10
11
|
name: string;
|
|
11
12
|
label?: string;
|
|
@@ -13,7 +14,7 @@ export declare type CheckboxProps = {
|
|
|
13
14
|
onChange?: (option: OnChangeEventInterface) => void;
|
|
14
15
|
disabled?: boolean;
|
|
15
16
|
};
|
|
16
|
-
export
|
|
17
|
+
export type EmailInputProps = DefaultInputProps & {
|
|
17
18
|
validationStatus?: ValidationStatusTypes;
|
|
18
19
|
onChange?: (option: OnChangeEventInterface) => void;
|
|
19
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Step } from './Step';
|
|
1
|
+
export { Step, MychoiceStep } from './Step';
|
|
@@ -4,22 +4,25 @@ export interface NavigationItemInterface {
|
|
|
4
4
|
name?: string;
|
|
5
5
|
icon?: SdkElement;
|
|
6
6
|
title?: string;
|
|
7
|
+
mychoiceTitle?: string;
|
|
7
8
|
key?: number;
|
|
8
9
|
}
|
|
9
10
|
export interface ValidationOptionsInterface {
|
|
10
11
|
validate: (isRedirect?: boolean) => boolean;
|
|
11
12
|
isValid: boolean;
|
|
13
|
+
requestFn?: () => Promise<void>;
|
|
12
14
|
}
|
|
13
15
|
export interface ValidationHookInterface {
|
|
14
16
|
path?: string;
|
|
15
17
|
name?: string;
|
|
16
18
|
validateOptions: ValidationOptionsInterface;
|
|
19
|
+
requestFn?: () => Promise<void>;
|
|
17
20
|
key?: number;
|
|
18
21
|
}
|
|
19
|
-
export
|
|
22
|
+
export type StepProps = {
|
|
20
23
|
item?: NavigationItemInterface;
|
|
21
24
|
itemsCount?: number;
|
|
22
|
-
index
|
|
25
|
+
index: number;
|
|
23
26
|
className?: string;
|
|
24
27
|
isMobile?: boolean;
|
|
25
28
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BrokerLink } from './BrokerLink';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type OfferHeaderProps = {
|
|
2
2
|
className?: string;
|
|
3
3
|
companyName?: string;
|
|
4
4
|
isBestOffer?: boolean;
|
|
@@ -8,30 +8,30 @@ export interface PriceInterface {
|
|
|
8
8
|
monthly?: number | string;
|
|
9
9
|
yearly?: number | string;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type OfferPriceProps = {
|
|
12
12
|
className?: string;
|
|
13
13
|
companyLogo?: string;
|
|
14
14
|
price?: PriceInterface;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type OfferDetailTitleProps = {
|
|
17
17
|
className?: string;
|
|
18
18
|
name?: string;
|
|
19
19
|
title?: string;
|
|
20
20
|
companyType?: string;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type OfferDetailInfoProps = {
|
|
23
23
|
className?: string;
|
|
24
24
|
logo?: string;
|
|
25
25
|
description?: string;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
28
|
-
export
|
|
27
|
+
export type OfferDetailProps = OfferDetailTitleProps & OfferDetailInfoProps;
|
|
28
|
+
export type OperationHoursInfoProps = {
|
|
29
29
|
className?: string;
|
|
30
30
|
weekdayHours?: string;
|
|
31
31
|
saturdayHours?: string;
|
|
32
32
|
sundayHours?: string;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type QuoteEditProps = {
|
|
35
35
|
className?: string;
|
|
36
36
|
editClick?: ((index: number) => () => void);
|
|
37
37
|
title?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultInputProps, OnChangeEventInterface, SelectOptionGroupInterface, SelectOptionInterface } from '../../interfaces';
|
|
2
2
|
import { SizeTypes } from '../../constants';
|
|
3
|
-
export
|
|
3
|
+
export type SelectProps = DefaultInputProps & {
|
|
4
4
|
size?: SizeTypes;
|
|
5
5
|
autoSelectIfValueIsOutOfOptions?: boolean;
|
|
6
6
|
onChange?: (option: OnChangeEventInterface) => void;
|
|
@@ -25,6 +25,10 @@ export declare const API_FORM_CAR: {
|
|
|
25
25
|
};
|
|
26
26
|
export declare const API_FORM_HOME: {
|
|
27
27
|
GET_POSTAL: string;
|
|
28
|
+
GET_PLACE: string;
|
|
29
|
+
POST_QUOTE_DATA: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const API_FORM_LIFE: {
|
|
28
32
|
POST_QUOTE_DATA: string;
|
|
29
33
|
};
|
|
30
34
|
export declare enum HttpRequestHeaderTypes {
|
|
@@ -5,8 +5,11 @@ export declare enum AppTypes {
|
|
|
5
5
|
}
|
|
6
6
|
export declare enum InsuranceTypes {
|
|
7
7
|
Car = "car",
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Home = "home",
|
|
9
|
+
Condo = "condo",
|
|
10
|
+
Tenant = "tenant",
|
|
11
|
+
Life = "life"
|
|
10
12
|
}
|
|
11
13
|
export declare const defaultLocalIndex = "insurance";
|
|
12
14
|
export declare const MAX_LOCAL_STORAGE_HOURS = 168;
|
|
15
|
+
export declare const MAX_LOCAL_STORAGE_HOURS_THEBIG = 8;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Home = "home",
|
|
3
|
-
Condo = "condo",
|
|
4
|
-
Tenant = "tenant"
|
|
5
|
-
}
|
|
1
|
+
import { InsuranceTypes } from '../../../application';
|
|
6
2
|
export declare const homeOwnerTypeOptions: {
|
|
7
|
-
value:
|
|
3
|
+
value: InsuranceTypes;
|
|
8
4
|
name: string;
|
|
9
5
|
}[];
|
|
10
6
|
export declare const comprehensiveCoverages: {
|
|
@@ -6,11 +6,11 @@ export declare const insuredYearsOptions: {
|
|
|
6
6
|
value: string;
|
|
7
7
|
name: string;
|
|
8
8
|
}[];
|
|
9
|
+
export declare enum ApplicantListTypes {
|
|
10
|
+
InsuranceCancellation = "insuranceCancellationList",
|
|
11
|
+
InsuranceClaim = "insuranceClaimList"
|
|
12
|
+
}
|
|
9
13
|
export declare const claimTypeOptions: {
|
|
10
14
|
value: string;
|
|
11
15
|
name: string;
|
|
12
16
|
}[];
|
|
13
|
-
export declare enum ApplicantListTypes {
|
|
14
|
-
InsuranceCancellation = "insuranceCancellationList",
|
|
15
|
-
InsuranceClaim = "InsuranceClaimList"
|
|
16
|
-
}
|
|
@@ -16,7 +16,15 @@ export declare const garageTypeOptions: {
|
|
|
16
16
|
value: string;
|
|
17
17
|
name: string;
|
|
18
18
|
}[];
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const homeBuildingStructureOptions: {
|
|
20
|
+
value: string;
|
|
21
|
+
name: string;
|
|
22
|
+
}[];
|
|
23
|
+
export declare const condoBuildingStructureOptions: {
|
|
24
|
+
value: string;
|
|
25
|
+
name: string;
|
|
26
|
+
}[];
|
|
27
|
+
export declare const tenantBuildingStructureOptions: {
|
|
20
28
|
value: string;
|
|
21
29
|
name: string;
|
|
22
30
|
}[];
|
|
@@ -28,7 +36,23 @@ export declare const fireHydrantDistanceOptions: {
|
|
|
28
36
|
value: string;
|
|
29
37
|
name: string;
|
|
30
38
|
}[];
|
|
31
|
-
export declare const
|
|
39
|
+
export declare const primaryHeatingTypeOptions: {
|
|
40
|
+
value: string;
|
|
41
|
+
name: string;
|
|
42
|
+
}[];
|
|
43
|
+
export declare const auxHeatingTypeOptions: {
|
|
32
44
|
value: string;
|
|
33
45
|
name: string;
|
|
34
46
|
}[];
|
|
47
|
+
export declare const homeCoverageOptions: {
|
|
48
|
+
name: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}[];
|
|
51
|
+
export declare const homeLiabilityOptions: {
|
|
52
|
+
name: string;
|
|
53
|
+
value: string;
|
|
54
|
+
}[];
|
|
55
|
+
export declare const ppOptions: {
|
|
56
|
+
name: string;
|
|
57
|
+
value: string;
|
|
58
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pages';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const lifeProvinceOptions: {
|
|
2
|
+
value: string;
|
|
3
|
+
name: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const lifeInsuranceTypeOptions: {
|
|
6
|
+
value: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const lifeCoverageOptions: {
|
|
10
|
+
value: string;
|
|
11
|
+
name: string;
|
|
12
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './coverage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const supportedProvinceCodes: string[];
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { SelectOptionInterface } from '../interfaces';
|
|
2
|
+
import { DriverLicenceTypes, InsuranceTypes } from '../constants';
|
|
2
3
|
export declare const getNumericOptions: (start: number, end: number, suffix?: string) => SelectOptionInterface[];
|
|
3
4
|
export declare const formatPostalCode: (str?: string) => string;
|
|
4
5
|
export declare const postalCodeFormat: (postalCode?: string) => string;
|
|
5
6
|
export declare const numberWithCommas: (value: number) => string;
|
|
7
|
+
export declare const getLicenceTypeOptions: (options: SelectOptionInterface[], optionValues: string[], disabled: boolean) => SelectOptionInterface[];
|
|
8
|
+
export declare const checkDateIsSpecial: (defaultMinDate: string, specialDate: string) => boolean;
|
|
9
|
+
export declare const getLicenceMinDate: (licenceType: DriverLicenceTypes, defaultMinDate: string, config: any) => string;
|
|
10
|
+
export declare const getLicenceMaxDate: (licenceType: DriverLicenceTypes, minDate: string, config: any) => string;
|
|
11
|
+
export declare const getDisabledLicenceTypes: (gBlock: boolean, g2Block: boolean, g1Block: boolean) => string[];
|
|
12
|
+
export declare const getInsuranceYearsOptions: (maxValue: string) => {
|
|
13
|
+
value: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}[];
|
|
16
|
+
export declare const getInsuranceType: () => InsuranceTypes;
|