@mychoice/mychoice-sdk-components 1.0.0 → 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.
- package/README.md +2 -2
- 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 +2 -2
- package/dist/cjs/components/icons/loaders/IconLoaderVideo.d.ts +0 -5
- package/dist/esm/components/icons/loaders/IconLoaderVideo.d.ts +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,60 +1,6 @@
|
|
|
1
|
-
import React, { ReactNode, ReactElement, MouseEventHandler } from 'react';
|
|
1
|
+
import React, { Ref, ReactNode, ReactElement, MouseEventHandler } from 'react';
|
|
2
2
|
export { NavLink as HeaderNavLink } from 'react-router-dom';
|
|
3
3
|
|
|
4
|
-
interface SelectDateInterface {
|
|
5
|
-
day?: string;
|
|
6
|
-
month?: string;
|
|
7
|
-
year?: string;
|
|
8
|
-
}
|
|
9
|
-
interface StartEndDatesInterface {
|
|
10
|
-
start: Date;
|
|
11
|
-
end: Date;
|
|
12
|
-
}
|
|
13
|
-
interface SelectDateErrorInterface {
|
|
14
|
-
day?: boolean;
|
|
15
|
-
month?: boolean;
|
|
16
|
-
year?: boolean;
|
|
17
|
-
}
|
|
18
|
-
interface OnChangeEventInterface {
|
|
19
|
-
name: string;
|
|
20
|
-
value: InputValueType;
|
|
21
|
-
}
|
|
22
|
-
interface SelectOptionGroupInterface {
|
|
23
|
-
label: string;
|
|
24
|
-
options: SelectOptionInterface[];
|
|
25
|
-
}
|
|
26
|
-
declare type SelectOptionInterface = OnChangeEventInterface & {
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
};
|
|
29
|
-
declare type InputValueType = string | string[] | number | number[] | SelectOptionInterface[] | SelectDateInterface | boolean | undefined;
|
|
30
|
-
declare type DefaultInputProps = {
|
|
31
|
-
className?: string;
|
|
32
|
-
defaultValue?: InputValueType;
|
|
33
|
-
disabled?: boolean;
|
|
34
|
-
error?: boolean | SelectDateErrorInterface;
|
|
35
|
-
name: string;
|
|
36
|
-
placeholder?: string;
|
|
37
|
-
minValue?: number | string;
|
|
38
|
-
maxValue?: number | string;
|
|
39
|
-
maxLength?: number | string;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
declare type SdkNode = ReactNode | undefined;
|
|
43
|
-
declare type SdkElement = ReactElement | null;
|
|
44
|
-
declare type SdkChildren = {
|
|
45
|
-
children?: SdkNode | SdkElement;
|
|
46
|
-
};
|
|
47
|
-
declare type SdkFC<T = SdkChildren> = React.FC<SdkChildren & T>;
|
|
48
|
-
declare type UseReducerType<S, A> = (state: S, action: A) => S;
|
|
49
|
-
declare type VehicleMakeInterface = {
|
|
50
|
-
modelYear?: string;
|
|
51
|
-
make?: string;
|
|
52
|
-
};
|
|
53
|
-
declare type VehicleModelInterface = {
|
|
54
|
-
make?: string;
|
|
55
|
-
model?: string;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
4
|
declare const yearMessage: string;
|
|
59
5
|
declare const carCondition: {
|
|
60
6
|
value: string;
|
|
@@ -178,13 +124,24 @@ declare enum DriverListTypes {
|
|
|
178
124
|
|
|
179
125
|
declare const defaultBrokerPhone = "1-855-843-1570";
|
|
180
126
|
|
|
181
|
-
declare enum
|
|
127
|
+
declare enum AppTypes {
|
|
128
|
+
MyChoice = "MyChoice",
|
|
129
|
+
Partner = "Partner",
|
|
130
|
+
TheBig = "TheBig"
|
|
131
|
+
}
|
|
132
|
+
declare enum InsuranceTypes {
|
|
133
|
+
Car = "car",
|
|
182
134
|
Home = "home",
|
|
183
135
|
Condo = "condo",
|
|
184
|
-
Tenant = "tenant"
|
|
136
|
+
Tenant = "tenant",
|
|
137
|
+
Life = "life"
|
|
185
138
|
}
|
|
139
|
+
declare const defaultLocalIndex = "insurance";
|
|
140
|
+
declare const MAX_LOCAL_STORAGE_HOURS = 168;
|
|
141
|
+
declare const MAX_LOCAL_STORAGE_HOURS_THEBIG = 8;
|
|
142
|
+
|
|
186
143
|
declare const homeOwnerTypeOptions: {
|
|
187
|
-
value:
|
|
144
|
+
value: InsuranceTypes;
|
|
188
145
|
name: string;
|
|
189
146
|
}[];
|
|
190
147
|
declare const comprehensiveCoverages: {
|
|
@@ -200,14 +157,14 @@ declare const insuredYearsOptions: {
|
|
|
200
157
|
value: string;
|
|
201
158
|
name: string;
|
|
202
159
|
}[];
|
|
160
|
+
declare enum ApplicantListTypes {
|
|
161
|
+
InsuranceCancellation = "insuranceCancellationList",
|
|
162
|
+
InsuranceClaim = "insuranceClaimList"
|
|
163
|
+
}
|
|
203
164
|
declare const claimTypeOptions: {
|
|
204
165
|
value: string;
|
|
205
166
|
name: string;
|
|
206
167
|
}[];
|
|
207
|
-
declare enum ApplicantListTypes {
|
|
208
|
-
InsuranceCancellation = "insuranceCancellationList",
|
|
209
|
-
InsuranceClaim = "InsuranceClaimList"
|
|
210
|
-
}
|
|
211
168
|
|
|
212
169
|
declare enum DwellingInfoTypes {
|
|
213
170
|
BurglarAlarm = "burglarAlarm",
|
|
@@ -227,7 +184,15 @@ declare const garageTypeOptions: {
|
|
|
227
184
|
value: string;
|
|
228
185
|
name: string;
|
|
229
186
|
}[];
|
|
230
|
-
declare const
|
|
187
|
+
declare const homeBuildingStructureOptions: {
|
|
188
|
+
value: string;
|
|
189
|
+
name: string;
|
|
190
|
+
}[];
|
|
191
|
+
declare const condoBuildingStructureOptions: {
|
|
192
|
+
value: string;
|
|
193
|
+
name: string;
|
|
194
|
+
}[];
|
|
195
|
+
declare const tenantBuildingStructureOptions: {
|
|
231
196
|
value: string;
|
|
232
197
|
name: string;
|
|
233
198
|
}[];
|
|
@@ -239,7 +204,36 @@ declare const fireHydrantDistanceOptions: {
|
|
|
239
204
|
value: string;
|
|
240
205
|
name: string;
|
|
241
206
|
}[];
|
|
242
|
-
declare const
|
|
207
|
+
declare const primaryHeatingTypeOptions: {
|
|
208
|
+
value: string;
|
|
209
|
+
name: string;
|
|
210
|
+
}[];
|
|
211
|
+
declare const auxHeatingTypeOptions: {
|
|
212
|
+
value: string;
|
|
213
|
+
name: string;
|
|
214
|
+
}[];
|
|
215
|
+
declare const homeCoverageOptions: {
|
|
216
|
+
name: string;
|
|
217
|
+
value: string;
|
|
218
|
+
}[];
|
|
219
|
+
declare const homeLiabilityOptions: {
|
|
220
|
+
name: string;
|
|
221
|
+
value: string;
|
|
222
|
+
}[];
|
|
223
|
+
declare const ppOptions: {
|
|
224
|
+
name: string;
|
|
225
|
+
value: string;
|
|
226
|
+
}[];
|
|
227
|
+
|
|
228
|
+
declare const lifeProvinceOptions: {
|
|
229
|
+
value: string;
|
|
230
|
+
name: string;
|
|
231
|
+
}[];
|
|
232
|
+
declare const lifeInsuranceTypeOptions: {
|
|
233
|
+
value: string;
|
|
234
|
+
name: string;
|
|
235
|
+
}[];
|
|
236
|
+
declare const lifeCoverageOptions: {
|
|
243
237
|
value: string;
|
|
244
238
|
name: string;
|
|
245
239
|
}[];
|
|
@@ -248,11 +242,13 @@ declare const yesNoOptions: {
|
|
|
248
242
|
name: string;
|
|
249
243
|
value: boolean;
|
|
250
244
|
}[];
|
|
251
|
-
declare const
|
|
245
|
+
declare const smokerOptions: {
|
|
252
246
|
name: string;
|
|
253
247
|
value: boolean;
|
|
254
248
|
}[];
|
|
255
249
|
|
|
250
|
+
declare const supportedProvinceCodes: string[];
|
|
251
|
+
|
|
256
252
|
declare enum DateTypes {
|
|
257
253
|
Day = "Day",
|
|
258
254
|
Month = "Month",
|
|
@@ -328,7 +324,8 @@ declare enum CompanyRoleTypes {
|
|
|
328
324
|
|
|
329
325
|
declare enum DeviceTypes {
|
|
330
326
|
Desktop = "desktop",
|
|
331
|
-
Mobile = "mobile"
|
|
327
|
+
Mobile = "mobile",
|
|
328
|
+
Tablet = "tablet"
|
|
332
329
|
}
|
|
333
330
|
declare const DeviceTypeWidthList: {
|
|
334
331
|
type: DeviceTypes;
|
|
@@ -347,19 +344,6 @@ declare const ScreenBPList: {
|
|
|
347
344
|
minWidth: number;
|
|
348
345
|
}[];
|
|
349
346
|
|
|
350
|
-
declare enum AppTypes {
|
|
351
|
-
MyChoice = "MyChoice",
|
|
352
|
-
Partner = "Partner",
|
|
353
|
-
TheBig = "TheBig"
|
|
354
|
-
}
|
|
355
|
-
declare enum InsuranceTypes {
|
|
356
|
-
Car = "car",
|
|
357
|
-
Life = "life",
|
|
358
|
-
Home = "home"
|
|
359
|
-
}
|
|
360
|
-
declare const defaultLocalIndex = "insurance";
|
|
361
|
-
declare const MAX_LOCAL_STORAGE_HOURS = 168;
|
|
362
|
-
|
|
363
347
|
declare const API_ROOT: string;
|
|
364
348
|
declare const API_AUTH: {
|
|
365
349
|
POST_SIGN_IN: string;
|
|
@@ -387,6 +371,10 @@ declare const API_FORM_CAR: {
|
|
|
387
371
|
};
|
|
388
372
|
declare const API_FORM_HOME: {
|
|
389
373
|
GET_POSTAL: string;
|
|
374
|
+
GET_PLACE: string;
|
|
375
|
+
POST_QUOTE_DATA: string;
|
|
376
|
+
};
|
|
377
|
+
declare const API_FORM_LIFE: {
|
|
390
378
|
POST_QUOTE_DATA: string;
|
|
391
379
|
};
|
|
392
380
|
declare enum HttpRequestHeaderTypes {
|
|
@@ -411,9 +399,65 @@ declare enum ModalTypes {
|
|
|
411
399
|
MessageModal = "MessageModal",
|
|
412
400
|
ConfirmModal = "ConfirmModal",
|
|
413
401
|
PostalModal = "PostalModal",
|
|
402
|
+
AddressModal = "AddressModal",
|
|
414
403
|
FinaleModal = "FinaleModal"
|
|
415
404
|
}
|
|
416
405
|
|
|
406
|
+
interface SelectDateInterface {
|
|
407
|
+
day?: string;
|
|
408
|
+
month?: string;
|
|
409
|
+
year?: string;
|
|
410
|
+
}
|
|
411
|
+
interface StartEndDatesInterface {
|
|
412
|
+
start: Date;
|
|
413
|
+
end: Date;
|
|
414
|
+
}
|
|
415
|
+
interface SelectDateErrorInterface {
|
|
416
|
+
day?: boolean;
|
|
417
|
+
month?: boolean;
|
|
418
|
+
year?: boolean;
|
|
419
|
+
}
|
|
420
|
+
interface OnChangeEventInterface {
|
|
421
|
+
name: string;
|
|
422
|
+
value: InputValueType;
|
|
423
|
+
}
|
|
424
|
+
interface SelectOptionGroupInterface {
|
|
425
|
+
label: string;
|
|
426
|
+
options: SelectOptionInterface[];
|
|
427
|
+
}
|
|
428
|
+
type SelectOptionInterface = OnChangeEventInterface & {
|
|
429
|
+
disabled?: boolean;
|
|
430
|
+
};
|
|
431
|
+
type InputValueType = string | string[] | number | number[] | SelectOptionInterface[] | SelectDateInterface | InsuranceTypes | boolean | undefined;
|
|
432
|
+
type DefaultInputProps = {
|
|
433
|
+
className?: string;
|
|
434
|
+
defaultValue?: InputValueType;
|
|
435
|
+
disabled?: boolean;
|
|
436
|
+
error?: boolean | SelectDateErrorInterface;
|
|
437
|
+
name: string;
|
|
438
|
+
placeholder?: string;
|
|
439
|
+
minValue?: number | string;
|
|
440
|
+
maxValue?: number | string;
|
|
441
|
+
maxLength?: number | string;
|
|
442
|
+
inputRef?: Ref<any>;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
type SdkNode = ReactNode | undefined;
|
|
446
|
+
type SdkElement = ReactElement | null;
|
|
447
|
+
type SdkChildren = {
|
|
448
|
+
children?: SdkNode | SdkElement;
|
|
449
|
+
};
|
|
450
|
+
type SdkFC<T = SdkChildren> = React.FC<SdkChildren & T>;
|
|
451
|
+
type UseReducerType<S, A> = (state: S, action: A) => S;
|
|
452
|
+
type VehicleMakeInterface = {
|
|
453
|
+
modelYear?: string;
|
|
454
|
+
make?: string;
|
|
455
|
+
};
|
|
456
|
+
type VehicleModelInterface = {
|
|
457
|
+
make?: string;
|
|
458
|
+
model?: string;
|
|
459
|
+
};
|
|
460
|
+
|
|
417
461
|
interface IconPropsInterface {
|
|
418
462
|
width?: string | number;
|
|
419
463
|
height?: string | number;
|
|
@@ -461,7 +505,9 @@ declare const IconChecked: SdkFC;
|
|
|
461
505
|
|
|
462
506
|
declare const IconDecline: SdkFC<IconPropsInterface>;
|
|
463
507
|
|
|
464
|
-
declare
|
|
508
|
+
declare const IconClock: SdkFC<IconPropsInterface>;
|
|
509
|
+
|
|
510
|
+
type ButtonBaseProps = {
|
|
465
511
|
label?: string;
|
|
466
512
|
category?: CategoryTypes;
|
|
467
513
|
color?: ColorTypes;
|
|
@@ -472,25 +518,25 @@ declare type ButtonBaseProps = {
|
|
|
472
518
|
type?: ButtonTypes;
|
|
473
519
|
onClick?: () => void;
|
|
474
520
|
};
|
|
475
|
-
|
|
521
|
+
type ButtonArrowProps = ButtonBaseProps & {
|
|
476
522
|
direction?: DirectionTypes;
|
|
477
523
|
};
|
|
478
|
-
|
|
524
|
+
type ButtonTabArrowProps = {
|
|
479
525
|
className?: string;
|
|
480
526
|
onClick?: () => void;
|
|
481
527
|
direction?: DirectionTypes;
|
|
482
528
|
};
|
|
483
|
-
|
|
529
|
+
type ButtonMenuProps = {
|
|
484
530
|
className?: string;
|
|
485
531
|
onClick?: () => void;
|
|
486
532
|
};
|
|
487
|
-
|
|
533
|
+
type ButtonFormProps = {
|
|
488
534
|
className?: string;
|
|
489
535
|
selected?: boolean;
|
|
490
536
|
onClick?: () => void;
|
|
491
537
|
label?: string;
|
|
492
538
|
};
|
|
493
|
-
|
|
539
|
+
type NavigationTabProps = {
|
|
494
540
|
className?: string;
|
|
495
541
|
selfDelete?: boolean;
|
|
496
542
|
iconClick?: MouseEventHandler<SVGSVGElement | HTMLButtonElement>;
|
|
@@ -513,7 +559,7 @@ declare const ButtonArrow: SdkFC<ButtonArrowProps>;
|
|
|
513
559
|
|
|
514
560
|
declare const ButtonTabArrow: SdkFC<ButtonTabArrowProps>;
|
|
515
561
|
|
|
516
|
-
|
|
562
|
+
type SelectProps = DefaultInputProps & {
|
|
517
563
|
size?: SizeTypes;
|
|
518
564
|
autoSelectIfValueIsOutOfOptions?: boolean;
|
|
519
565
|
onChange?: (option: OnChangeEventInterface) => void;
|
|
@@ -523,7 +569,7 @@ declare type SelectProps = DefaultInputProps & {
|
|
|
523
569
|
|
|
524
570
|
declare const SelectForm: SdkFC<SelectProps>;
|
|
525
571
|
|
|
526
|
-
|
|
572
|
+
type TitleProps = {
|
|
527
573
|
title: string;
|
|
528
574
|
subTitle?: string;
|
|
529
575
|
className?: string;
|
|
@@ -532,12 +578,13 @@ declare type TitleProps = {
|
|
|
532
578
|
|
|
533
579
|
declare const TitleForm: SdkFC<TitleProps>;
|
|
534
580
|
|
|
535
|
-
|
|
581
|
+
type InputProps = DefaultInputProps & {
|
|
536
582
|
size?: SizeTypes;
|
|
537
583
|
type?: InputTypes;
|
|
538
584
|
onChange?: (option: OnChangeEventInterface) => void;
|
|
585
|
+
manipulateInput?: (value: string) => string;
|
|
539
586
|
};
|
|
540
|
-
|
|
587
|
+
type CheckboxProps = {
|
|
541
588
|
className?: string;
|
|
542
589
|
name: string;
|
|
543
590
|
label?: string;
|
|
@@ -545,7 +592,7 @@ declare type CheckboxProps = {
|
|
|
545
592
|
onChange?: (option: OnChangeEventInterface) => void;
|
|
546
593
|
disabled?: boolean;
|
|
547
594
|
};
|
|
548
|
-
|
|
595
|
+
type EmailInputProps = DefaultInputProps & {
|
|
549
596
|
validationStatus?: ValidationStatusTypes;
|
|
550
597
|
onChange?: (option: OnChangeEventInterface) => void;
|
|
551
598
|
};
|
|
@@ -565,31 +612,36 @@ interface NavigationItemInterface {
|
|
|
565
612
|
name?: string;
|
|
566
613
|
icon?: SdkElement;
|
|
567
614
|
title?: string;
|
|
615
|
+
mychoiceTitle?: string;
|
|
568
616
|
key?: number;
|
|
569
617
|
}
|
|
570
618
|
interface ValidationOptionsInterface {
|
|
571
619
|
validate: (isRedirect?: boolean) => boolean;
|
|
572
620
|
isValid: boolean;
|
|
621
|
+
requestFn?: () => Promise<void>;
|
|
573
622
|
}
|
|
574
623
|
interface ValidationHookInterface {
|
|
575
624
|
path?: string;
|
|
576
625
|
name?: string;
|
|
577
626
|
validateOptions: ValidationOptionsInterface;
|
|
627
|
+
requestFn?: () => Promise<void>;
|
|
578
628
|
key?: number;
|
|
579
629
|
}
|
|
580
|
-
|
|
630
|
+
type StepProps = {
|
|
581
631
|
item?: NavigationItemInterface;
|
|
582
632
|
itemsCount?: number;
|
|
583
|
-
index
|
|
633
|
+
index: number;
|
|
584
634
|
className?: string;
|
|
585
635
|
isMobile?: boolean;
|
|
586
636
|
};
|
|
587
637
|
|
|
588
638
|
declare const Step: SdkFC<StepProps>;
|
|
639
|
+
declare const MychoiceStep: SdkFC<StepProps>;
|
|
589
640
|
|
|
590
|
-
|
|
641
|
+
type TooltipProps = {
|
|
591
642
|
id?: string;
|
|
592
|
-
description?: string;
|
|
643
|
+
description?: string | SdkElement;
|
|
644
|
+
color?: string;
|
|
593
645
|
};
|
|
594
646
|
|
|
595
647
|
declare const SdkTooltip: SdkFC<TooltipProps>;
|
|
@@ -600,12 +652,12 @@ interface NavItemInterface {
|
|
|
600
652
|
name: string;
|
|
601
653
|
link: string;
|
|
602
654
|
}
|
|
603
|
-
|
|
655
|
+
type HeaderNavGroupProps = {
|
|
604
656
|
className?: string;
|
|
605
657
|
navItems: NavItemInterface[];
|
|
606
658
|
isExternal?: boolean;
|
|
607
659
|
};
|
|
608
|
-
|
|
660
|
+
type HeaderDropDownProps = HeaderNavGroupProps & {
|
|
609
661
|
name: string;
|
|
610
662
|
};
|
|
611
663
|
|
|
@@ -613,7 +665,7 @@ declare const HeaderNavGroup: SdkFC<HeaderNavGroupProps>;
|
|
|
613
665
|
|
|
614
666
|
declare const HeaderDropDown: SdkFC<HeaderDropDownProps>;
|
|
615
667
|
|
|
616
|
-
|
|
668
|
+
type OfferHeaderProps = {
|
|
617
669
|
className?: string;
|
|
618
670
|
companyName?: string;
|
|
619
671
|
isBestOffer?: boolean;
|
|
@@ -623,30 +675,30 @@ interface PriceInterface {
|
|
|
623
675
|
monthly?: number | string;
|
|
624
676
|
yearly?: number | string;
|
|
625
677
|
}
|
|
626
|
-
|
|
678
|
+
type OfferPriceProps = {
|
|
627
679
|
className?: string;
|
|
628
680
|
companyLogo?: string;
|
|
629
681
|
price?: PriceInterface;
|
|
630
682
|
};
|
|
631
|
-
|
|
683
|
+
type OfferDetailTitleProps = {
|
|
632
684
|
className?: string;
|
|
633
685
|
name?: string;
|
|
634
686
|
title?: string;
|
|
635
687
|
companyType?: string;
|
|
636
688
|
};
|
|
637
|
-
|
|
689
|
+
type OfferDetailInfoProps = {
|
|
638
690
|
className?: string;
|
|
639
691
|
logo?: string;
|
|
640
692
|
description?: string;
|
|
641
693
|
};
|
|
642
|
-
|
|
643
|
-
|
|
694
|
+
type OfferDetailProps = OfferDetailTitleProps & OfferDetailInfoProps;
|
|
695
|
+
type OperationHoursInfoProps = {
|
|
644
696
|
className?: string;
|
|
645
697
|
weekdayHours?: string;
|
|
646
698
|
saturdayHours?: string;
|
|
647
699
|
sundayHours?: string;
|
|
648
700
|
};
|
|
649
|
-
|
|
701
|
+
type QuoteEditProps = {
|
|
650
702
|
className?: string;
|
|
651
703
|
editClick?: ((index: number) => () => void);
|
|
652
704
|
title?: string;
|
|
@@ -666,7 +718,7 @@ declare const OfferDetailTitle: SdkFC<OfferDetailTitleProps>;
|
|
|
666
718
|
|
|
667
719
|
declare const QuoteEdit: SdkFC<QuoteEditProps>;
|
|
668
720
|
|
|
669
|
-
|
|
721
|
+
type MessageProps = {
|
|
670
722
|
className?: string;
|
|
671
723
|
isRemovable?: boolean;
|
|
672
724
|
onIconClick?: () => void;
|
|
@@ -710,7 +762,17 @@ declare const getNumericOptions: (start: number, end: number, suffix?: string) =
|
|
|
710
762
|
declare const formatPostalCode: (str?: string) => string;
|
|
711
763
|
declare const postalCodeFormat: (postalCode?: string) => string;
|
|
712
764
|
declare const numberWithCommas: (value: number) => string;
|
|
765
|
+
declare const getLicenceTypeOptions: (options: SelectOptionInterface[], optionValues: string[], disabled: boolean) => SelectOptionInterface[];
|
|
766
|
+
declare const checkDateIsSpecial: (defaultMinDate: string, specialDate: string) => boolean;
|
|
767
|
+
declare const getLicenceMinDate: (licenceType: DriverLicenceTypes, defaultMinDate: string, config: any) => string;
|
|
768
|
+
declare const getLicenceMaxDate: (licenceType: DriverLicenceTypes, minDate: string, config: any) => string;
|
|
769
|
+
declare const getDisabledLicenceTypes: (gBlock: boolean, g2Block: boolean, g1Block: boolean) => string[];
|
|
770
|
+
declare const getInsuranceYearsOptions: (maxValue: string) => {
|
|
771
|
+
value: string;
|
|
772
|
+
name: string;
|
|
773
|
+
}[];
|
|
774
|
+
declare const getInsuranceType: () => InsuranceTypes;
|
|
713
775
|
|
|
714
776
|
declare const useEffectOnce: (effect: () => void | (() => void)) => void;
|
|
715
777
|
|
|
716
|
-
export { API_APP, API_AUTH, API_FORM_CAR, API_FORM_HOME, API_ROOT, AlignTypes, AppTypes, ApplicantListTypes, ButtonArrow, ButtonArrowProps, ButtonBase, ButtonBaseProps, ButtonForm, ButtonFormProps, ButtonMenu, ButtonMenuProps, ButtonTab, ButtonTabArrow, ButtonTabArrowProps, ButtonTabMobile, ButtonTypes, ButtonVariantTypes, CategoryTypes, CheckboxForm, CheckboxProps, ColorTypes, ColorVariablesTypes, CompanyRoleTypes, CoverageTypes, DateTypes, DefaultInputProps, DeviceTypeWidthList, DeviceTypes, DirectionTypes, DriverLicenceTypes, DriverListTypes, DriverPriorityTypes, DwellingInfoTypes, EmailInputProps, GenderTypes, HeaderDropDown, HeaderDropDownProps, HeaderNavGroup, HeaderNavGroupProps,
|
|
778
|
+
export { API_APP, API_AUTH, API_FORM_CAR, API_FORM_HOME, API_FORM_LIFE, API_ROOT, AlignTypes, AppTypes, ApplicantListTypes, ButtonArrow, ButtonArrowProps, ButtonBase, ButtonBaseProps, ButtonForm, ButtonFormProps, ButtonMenu, ButtonMenuProps, ButtonTab, ButtonTabArrow, ButtonTabArrowProps, ButtonTabMobile, ButtonTypes, ButtonVariantTypes, CategoryTypes, CheckboxForm, CheckboxProps, ColorTypes, ColorVariablesTypes, CompanyRoleTypes, CoverageTypes, DateTypes, DefaultInputProps, DeviceTypeWidthList, DeviceTypes, DirectionTypes, DriverLicenceTypes, DriverListTypes, DriverPriorityTypes, DwellingInfoTypes, EmailInputProps, GenderTypes, HeaderDropDown, HeaderDropDownProps, HeaderNavGroup, HeaderNavGroupProps, HttpRequestHeaderTypes, IconArrow, IconChecked, IconClock, IconDecline, IconDelete, IconDropdownArrow, IconLoaderPrimary, IconLoaderSecondary, IconSuccess, IconTabArrow, IconTooltip, InfoMessage, InputForm, InputFormEmail, InputFormLicence, InputFormPhone, InputProps, InputTypes, InputValueType, InsuranceTypes, MAX_LOCAL_STORAGE_HOURS, MAX_LOCAL_STORAGE_HOURS_THEBIG, ModalTypes, MychoiceStep, NavItemInterface, NavigationAddress, NavigationBase, NavigationCar, NavigationDiscount, NavigationItemInterface, NavigationPerson, NavigationProperty, NavigationQuotes, NavigationTabProps, OccupationTypes, OfferDetail, OfferDetailInfoProps, OfferDetailProps, OfferDetailTitle, OfferDetailTitleProps, OfferHeader, OfferHeaderProps, OfferPrice, OfferPriceProps, OnChangeEventInterface, OperationHoursInfo, OperationHoursInfoProps, PROFILE_API, PriceInterface, QuoteEdit, QuoteEditProps, RequestStatusTypes, RequestTypes, ScreenBPList, ScreenBPTypes, SdkChildren, SdkElement, SdkFC, SdkNode, SdkTooltip, SelectDateErrorInterface, SelectDateInterface, SelectForm, SelectOptionGroupInterface, SelectOptionInterface, SelectProps, SizeTypes, StartEndDatesInterface, Step, StepProps, TitleForm, TitleProps, TooltipForm, TooltipProps, UseReducerType, ValidationHookInterface, ValidationOptionsInterface, ValidationStatusTypes, VehicleConditionTypes, VehicleMakeInterface, VehicleModelInterface, VehiclePrimaryUseTypes, addDaysToDate, addMonthsToDate, addYearsToDate, applicantRelationshipOptions, auxHeatingTypeOptions, carCondition, carKeepPlace, carStatus, carUsagePurpose, carWinterTiresCheck, checkDateIsSpecial, claimTypeOptions, collisionCoverage, compareDates, comprehensiveCoverage, comprehensiveCoverages, condoBuildingStructureOptions, constructionTypeOptions, coverageOptions, dailyDriveBusinessDistanceList, deepClone, defaultBrokerPhone, defaultLocalIndex, exteriorFinishOptions, fireHallDistanceOptions, fireHydrantDistanceOptions, firstDriveDistanceList, formatPostalCode, garageTypeOptions, genderOptions, getDateOptions, getDayStartEndDates, getDaysOfMonth, getDifferenceInHours, getDifferenceInMonths, getDifferenceInYears, getDisabledLicenceTypes, getEndOfMonth, getEndOfYear, getFormattedDate, getInsuranceType, getInsuranceYearsOptions, getLicenceMaxDate, getLicenceMinDate, getLicenceTypeOptions, getMinDate, getMinDateByYears, getMonthStartEndDates, getNumericOptions, getStartOfMonth, getStartOfYear, getValueIndexInOptions, getValuesFromNumbers, getYearIntervalOptions, getYearStartEndDates, homeBuildingStructureOptions, homeCoverageOptions, homeLiabilityOptions, homeOwnerTypeOptions, insuranceCancellationReasonOptions, insuredYearsOptions, isDateValid, isValueInOptions, liabilityOptions, licenceSuspensionsReasonOptions, lifeCoverageOptions, lifeInsuranceTypeOptions, lifeProvinceOptions, maritalStatusOptions, numberWithCommas, occupationOptions, optionsIsEqual, postalCodeFormat, ppOptions, primaryHeatingTypeOptions, residentsOptions, smokerOptions, subDaysFromDate, subMonthsFromDate, subYearsFromDate, supportedProvinceCodes, tenantBuildingStructureOptions, trafficTicketsGroupOptions, useEffectOnce, yearMessage, yearlyDriveDistanceList, yesNoOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mychoice/mychoice-sdk-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Now I’m the model of a modern major general / The venerated Virginian veteran whose men are all / Lining up, to put me up on a pedestal / Writin’ letters to relatives / Embellishin’ my elegance and eloquence / But the elephant is in the room / The truth is in ya face when ya hear the British cannons go / BOOM",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "GogMes",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"rc-tooltip": "^5.2.2",
|
|
35
35
|
"react-phone-input-2": "^2.15.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "d5ef3041d7c4292b3a160c62e85f3c788eb589a6"
|
|
38
38
|
}
|