@mychoice/mychoice-sdk-components 1.0.1 → 2.0.0

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 (81) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/components/buttons/interfaces.d.ts +6 -6
  3. package/dist/cjs/components/headers/interfaces.d.ts +2 -2
  4. package/dist/cjs/components/icons/IconArrow.d.ts +3 -0
  5. package/dist/cjs/components/icons/IconClock.d.ts +3 -0
  6. package/dist/cjs/components/icons/IconDropdownArrow.d.ts +3 -0
  7. package/dist/cjs/components/icons/IconTabArrow.d.ts +3 -0
  8. package/dist/cjs/components/icons/index.d.ts +1 -0
  9. package/dist/cjs/components/inputs/interfaces.d.ts +4 -3
  10. package/dist/cjs/components/messages/interfaces.d.ts +1 -1
  11. package/dist/cjs/components/navigations/Step/Step.d.ts +1 -0
  12. package/dist/cjs/components/navigations/Step/index.d.ts +1 -1
  13. package/dist/cjs/components/navigations/interfaces.d.ts +5 -2
  14. package/dist/cjs/components/quotes/BrokerLink/BrokerLink.d.ts +3 -0
  15. package/dist/cjs/components/quotes/BrokerLink/index.d.ts +1 -0
  16. package/dist/cjs/components/quotes/interfaces.d.ts +7 -7
  17. package/dist/cjs/components/selects/interfaces.d.ts +1 -1
  18. package/dist/cjs/components/titles/interfaces.d.ts +1 -1
  19. package/dist/cjs/components/tooltips/interfaces.d.ts +4 -2
  20. package/dist/cjs/constants/api.d.ts +4 -0
  21. package/dist/cjs/constants/application.d.ts +5 -2
  22. package/dist/cjs/constants/device.d.ts +2 -1
  23. package/dist/cjs/constants/insurances/home/pages/address.d.ts +2 -6
  24. package/dist/cjs/constants/insurances/home/pages/applicant.d.ts +4 -4
  25. package/dist/cjs/constants/insurances/home/pages/property.d.ts +26 -2
  26. package/dist/cjs/constants/insurances/index.d.ts +1 -0
  27. package/dist/cjs/constants/insurances/life/index.d.ts +1 -0
  28. package/dist/cjs/constants/insurances/life/pages/coverage.d.ts +12 -0
  29. package/dist/cjs/constants/insurances/life/pages/index.d.ts +1 -0
  30. package/dist/cjs/constants/insurances/shared/index.d.ts +1 -0
  31. package/dist/cjs/constants/insurances/shared/options.d.ts +1 -1
  32. package/dist/cjs/constants/insurances/shared/postal.d.ts +1 -0
  33. package/dist/cjs/constants/modals.d.ts +1 -0
  34. package/dist/cjs/helpers/main.d.ts +11 -0
  35. package/dist/cjs/index.js +302 -97
  36. package/dist/cjs/index.js.map +1 -1
  37. package/dist/cjs/interfaces/general.d.ts +7 -7
  38. package/dist/cjs/interfaces/inputs.d.ts +6 -3
  39. package/dist/cjs/utils/InputValueReducer/interfaces.d.ts +1 -5
  40. package/dist/esm/components/buttons/interfaces.d.ts +6 -6
  41. package/dist/esm/components/headers/interfaces.d.ts +2 -2
  42. package/dist/esm/components/icons/IconArrow.d.ts +3 -0
  43. package/dist/esm/components/icons/IconClock.d.ts +3 -0
  44. package/dist/esm/components/icons/IconDropdownArrow.d.ts +3 -0
  45. package/dist/esm/components/icons/IconTabArrow.d.ts +3 -0
  46. package/dist/esm/components/icons/index.d.ts +1 -0
  47. package/dist/esm/components/inputs/interfaces.d.ts +4 -3
  48. package/dist/esm/components/messages/interfaces.d.ts +1 -1
  49. package/dist/esm/components/navigations/Step/Step.d.ts +1 -0
  50. package/dist/esm/components/navigations/Step/index.d.ts +1 -1
  51. package/dist/esm/components/navigations/interfaces.d.ts +5 -2
  52. package/dist/esm/components/quotes/BrokerLink/BrokerLink.d.ts +3 -0
  53. package/dist/esm/components/quotes/BrokerLink/index.d.ts +1 -0
  54. package/dist/esm/components/quotes/interfaces.d.ts +7 -7
  55. package/dist/esm/components/selects/interfaces.d.ts +1 -1
  56. package/dist/esm/components/titles/interfaces.d.ts +1 -1
  57. package/dist/esm/components/tooltips/interfaces.d.ts +4 -2
  58. package/dist/esm/constants/api.d.ts +4 -0
  59. package/dist/esm/constants/application.d.ts +5 -2
  60. package/dist/esm/constants/device.d.ts +2 -1
  61. package/dist/esm/constants/insurances/home/pages/address.d.ts +2 -6
  62. package/dist/esm/constants/insurances/home/pages/applicant.d.ts +4 -4
  63. package/dist/esm/constants/insurances/home/pages/property.d.ts +26 -2
  64. package/dist/esm/constants/insurances/index.d.ts +1 -0
  65. package/dist/esm/constants/insurances/life/index.d.ts +1 -0
  66. package/dist/esm/constants/insurances/life/pages/coverage.d.ts +12 -0
  67. package/dist/esm/constants/insurances/life/pages/index.d.ts +1 -0
  68. package/dist/esm/constants/insurances/shared/index.d.ts +1 -0
  69. package/dist/esm/constants/insurances/shared/options.d.ts +1 -1
  70. package/dist/esm/constants/insurances/shared/postal.d.ts +1 -0
  71. package/dist/esm/constants/modals.d.ts +1 -0
  72. package/dist/esm/helpers/main.d.ts +11 -0
  73. package/dist/esm/index.js +279 -95
  74. package/dist/esm/index.js.map +1 -1
  75. package/dist/esm/interfaces/general.d.ts +7 -7
  76. package/dist/esm/interfaces/inputs.d.ts +6 -3
  77. package/dist/esm/utils/InputValueReducer/interfaces.d.ts +1 -5
  78. package/dist/index.d.ts +167 -105
  79. package/package.json +3 -3
  80. package/dist/cjs/components/icons/loaders/IconLoaderVideo.d.ts +0 -5
  81. package/dist/esm/components/icons/loaders/IconLoaderVideo.d.ts +0 -5
@@ -1,4 +1,4 @@
1
- export declare type OfferHeaderProps = {
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 declare type OfferPriceProps = {
11
+ export type OfferPriceProps = {
12
12
  className?: string;
13
13
  companyLogo?: string;
14
14
  price?: PriceInterface;
15
15
  };
16
- export declare type OfferDetailTitleProps = {
16
+ export type OfferDetailTitleProps = {
17
17
  className?: string;
18
18
  name?: string;
19
19
  title?: string;
20
20
  companyType?: string;
21
21
  };
22
- export declare type OfferDetailInfoProps = {
22
+ export type OfferDetailInfoProps = {
23
23
  className?: string;
24
24
  logo?: string;
25
25
  description?: string;
26
26
  };
27
- export declare type OfferDetailProps = OfferDetailTitleProps & OfferDetailInfoProps;
28
- export declare type OperationHoursInfoProps = {
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 declare type QuoteEditProps = {
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 declare type SelectProps = DefaultInputProps & {
3
+ export type SelectProps = DefaultInputProps & {
4
4
  size?: SizeTypes;
5
5
  autoSelectIfValueIsOutOfOptions?: boolean;
6
6
  onChange?: (option: OnChangeEventInterface) => void;
@@ -1,4 +1,4 @@
1
- export declare type TitleProps = {
1
+ export type TitleProps = {
2
2
  title: string;
3
3
  subTitle?: string;
4
4
  className?: string;
@@ -1,4 +1,6 @@
1
- export declare type TooltipProps = {
1
+ import { SdkElement } from '../../interfaces';
2
+ export type TooltipProps = {
2
3
  id?: string;
3
- description?: string;
4
+ description?: string | SdkElement;
5
+ color?: string;
4
6
  };
@@ -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
- Life = "life",
9
- Home = "home"
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,6 +1,7 @@
1
1
  export declare enum DeviceTypes {
2
2
  Desktop = "desktop",
3
- Mobile = "mobile"
3
+ Mobile = "mobile",
4
+ Tablet = "tablet"
4
5
  }
5
6
  export declare const DeviceTypeWidthList: {
6
7
  type: DeviceTypes;
@@ -1,10 +1,6 @@
1
- export declare enum HomeOwnerTypes {
2
- Home = "home",
3
- Condo = "condo",
4
- Tenant = "tenant"
5
- }
1
+ import { InsuranceTypes } from '../../../application';
6
2
  export declare const homeOwnerTypeOptions: {
7
- value: string;
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 buildingStructureOptions: {
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 heatingTypeOptions: {
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
+ }[];
@@ -1,3 +1,4 @@
1
1
  export * from './car';
2
2
  export * from './home';
3
+ export * from './life';
3
4
  export * from './shared';
@@ -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';
@@ -1 +1,2 @@
1
1
  export * from './options';
2
+ export * from './postal';
@@ -2,7 +2,7 @@ export declare const yesNoOptions: {
2
2
  name: string;
3
3
  value: boolean;
4
4
  }[];
5
- export declare const yesNoOptionsTemporary: {
5
+ export declare const smokerOptions: {
6
6
  name: string;
7
7
  value: boolean;
8
8
  }[];
@@ -0,0 +1 @@
1
+ export declare const supportedProvinceCodes: string[];
@@ -2,5 +2,6 @@ export declare enum ModalTypes {
2
2
  MessageModal = "MessageModal",
3
3
  ConfirmModal = "ConfirmModal",
4
4
  PostalModal = "PostalModal",
5
+ AddressModal = "AddressModal",
5
6
  FinaleModal = "FinaleModal"
6
7
  }
@@ -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;