@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
package/dist/esm/index.js
CHANGED
|
@@ -240,43 +240,41 @@ var DriverListTypes;
|
|
|
240
240
|
|
|
241
241
|
const defaultBrokerPhone = '1-855-843-1570';
|
|
242
242
|
|
|
243
|
-
var
|
|
244
|
-
(function (
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
})(
|
|
243
|
+
var AppTypes;
|
|
244
|
+
(function (AppTypes) {
|
|
245
|
+
AppTypes["MyChoice"] = "MyChoice";
|
|
246
|
+
AppTypes["Partner"] = "Partner";
|
|
247
|
+
AppTypes["TheBig"] = "TheBig";
|
|
248
|
+
})(AppTypes || (AppTypes = {}));
|
|
249
|
+
var InsuranceTypes;
|
|
250
|
+
(function (InsuranceTypes) {
|
|
251
|
+
InsuranceTypes["Car"] = "car";
|
|
252
|
+
InsuranceTypes["Home"] = "home";
|
|
253
|
+
InsuranceTypes["Condo"] = "condo";
|
|
254
|
+
InsuranceTypes["Tenant"] = "tenant";
|
|
255
|
+
InsuranceTypes["Life"] = "life";
|
|
256
|
+
})(InsuranceTypes || (InsuranceTypes = {}));
|
|
257
|
+
const defaultLocalIndex = 'insurance';
|
|
258
|
+
const MAX_LOCAL_STORAGE_HOURS = 168;
|
|
259
|
+
const MAX_LOCAL_STORAGE_HOURS_THEBIG = 8;
|
|
260
|
+
|
|
249
261
|
const homeOwnerTypeOptions = [
|
|
250
|
-
{ value:
|
|
251
|
-
{ value:
|
|
252
|
-
{ value:
|
|
253
|
-
{ value: HomeOwnerTypes.Tenant, name: 'Tenant' },
|
|
262
|
+
{ value: InsuranceTypes.Home, name: 'Homeowner' },
|
|
263
|
+
{ value: InsuranceTypes.Condo, name: 'Condo Owner' },
|
|
264
|
+
{ value: InsuranceTypes.Tenant, name: 'Tenant' },
|
|
254
265
|
];
|
|
255
|
-
//
|
|
256
266
|
const comprehensiveCoverages = [
|
|
257
267
|
{ value: true, name: 'Yes' },
|
|
258
268
|
{ value: false, name: 'No' },
|
|
259
269
|
];
|
|
260
|
-
// export const collisionCoverage = [
|
|
261
|
-
// { value: true, name: 'Yes' },
|
|
262
|
-
// { value: false, name: 'No' },
|
|
263
|
-
// ];
|
|
264
|
-
//
|
|
265
|
-
// export enum CoverageTypes {
|
|
266
|
-
// Comprehensive = 'comprehensive',
|
|
267
|
-
// Collision = 'collision',
|
|
268
|
-
// Liability = 'liability',
|
|
269
|
-
// }
|
|
270
270
|
|
|
271
271
|
const residentsOptions = [
|
|
272
|
-
{ value: '', name: '-' },
|
|
273
272
|
{ value: '1', name: 'You and your family' },
|
|
274
273
|
{ value: '2', name: 'Your family and another family' },
|
|
275
274
|
{ value: '3', name: 'Your family and two other families' },
|
|
276
|
-
{ value: '
|
|
275
|
+
{ value: 'none', name: 'It is rented out/Used for commercial purposes' },
|
|
277
276
|
];
|
|
278
277
|
const insuredYearsOptions = [
|
|
279
|
-
{ value: '', name: '-' },
|
|
280
278
|
{ value: '0', name: 'Less than 1 year' },
|
|
281
279
|
{ value: '1', name: '1 year' },
|
|
282
280
|
{ value: '2', name: '2 years' },
|
|
@@ -290,8 +288,12 @@ const insuredYearsOptions = [
|
|
|
290
288
|
{ value: '10', name: '10 years' },
|
|
291
289
|
{ value: '11', name: 'More than 10 years' },
|
|
292
290
|
];
|
|
291
|
+
var ApplicantListTypes;
|
|
292
|
+
(function (ApplicantListTypes) {
|
|
293
|
+
ApplicantListTypes["InsuranceCancellation"] = "insuranceCancellationList";
|
|
294
|
+
ApplicantListTypes["InsuranceClaim"] = "insuranceClaimList";
|
|
295
|
+
})(ApplicantListTypes || (ApplicantListTypes = {}));
|
|
293
296
|
const claimTypeOptions = [
|
|
294
|
-
{ value: '', name: '-' },
|
|
295
297
|
{ value: 'personal', name: 'Personal Property Claim' },
|
|
296
298
|
{ value: 'sewer', name: 'Sewer Backup Claim' },
|
|
297
299
|
{ value: 'liability', name: 'Liability Claim' },
|
|
@@ -300,11 +302,6 @@ const claimTypeOptions = [
|
|
|
300
302
|
{ value: 'waterdamage', name: 'Water Damage Claim' },
|
|
301
303
|
{ value: 'other', name: 'Other Type of Claim' },
|
|
302
304
|
];
|
|
303
|
-
var ApplicantListTypes;
|
|
304
|
-
(function (ApplicantListTypes) {
|
|
305
|
-
ApplicantListTypes["InsuranceCancellation"] = "insuranceCancellationList";
|
|
306
|
-
ApplicantListTypes["InsuranceClaim"] = "InsuranceClaimList";
|
|
307
|
-
})(ApplicantListTypes || (ApplicantListTypes = {}));
|
|
308
305
|
|
|
309
306
|
var DwellingInfoTypes;
|
|
310
307
|
(function (DwellingInfoTypes) {
|
|
@@ -314,77 +311,195 @@ var DwellingInfoTypes;
|
|
|
314
311
|
DwellingInfoTypes["Deadbolt"] = "deadbolt";
|
|
315
312
|
})(DwellingInfoTypes || (DwellingInfoTypes = {}));
|
|
316
313
|
const constructionTypeOptions = [
|
|
317
|
-
{ value: '', name: '
|
|
318
|
-
{ value: '
|
|
319
|
-
{ value: 'mansory', name: 'Mansory' },
|
|
314
|
+
{ value: 'wood', name: 'Wood Frame' },
|
|
315
|
+
{ value: 'masonry', name: 'Masonry' },
|
|
320
316
|
{ value: 'brick', name: 'Brick' },
|
|
321
|
-
{ value: '
|
|
317
|
+
{ value: 'fireresistive', name: 'Fire Resistive' },
|
|
322
318
|
{ value: 'other', name: 'Other' },
|
|
323
319
|
];
|
|
324
320
|
const exteriorFinishOptions = [
|
|
325
|
-
{ value: '', name: '-' },
|
|
326
321
|
{ value: 'brick', name: 'Brick' },
|
|
327
322
|
{ value: 'brickveneer', name: 'Brick Veneer' },
|
|
328
323
|
{ value: 'masonryveneer', name: 'Masonry Veneer' },
|
|
324
|
+
{ value: 'fiberglass', name: 'Fiberglass' },
|
|
329
325
|
{ value: 'concrete', name: 'Concrete' },
|
|
330
326
|
{ value: 'logs', name: 'Logs' },
|
|
331
327
|
{ value: 'stone', name: 'Stone' },
|
|
332
328
|
{ value: 'stoneveneer', name: 'Stone Veneer' },
|
|
333
|
-
{ value: '
|
|
334
|
-
{ value: '
|
|
329
|
+
{ value: 'stucco', name: 'Stucco' },
|
|
330
|
+
{ value: 'vinyl', name: 'Siding' },
|
|
331
|
+
{ value: 'wood', name: 'Wood Siding' },
|
|
335
332
|
];
|
|
336
333
|
const garageTypeOptions = [
|
|
337
|
-
{ value: '', name: '
|
|
338
|
-
{ value: '
|
|
339
|
-
{ value: '
|
|
340
|
-
{ value: 'basement', name: 'Basement' },
|
|
334
|
+
{ value: 'attached', name: 'Attached Garage' },
|
|
335
|
+
{ value: 'builtin', name: 'Built-in Garage' },
|
|
336
|
+
{ value: 'basement', name: 'Basement Garage' },
|
|
341
337
|
{ value: 'carport', name: 'Carport' },
|
|
342
338
|
{ value: 'none', name: 'None' },
|
|
343
339
|
];
|
|
344
|
-
const
|
|
345
|
-
{ value: '', name: '-' },
|
|
340
|
+
const homeBuildingStructureOptions = [
|
|
346
341
|
{ value: 'detached', name: 'Detached' },
|
|
347
|
-
{ value: '
|
|
342
|
+
{ value: 'endrow', name: 'Townhouse - End of Row' },
|
|
343
|
+
{ value: 'inrow', name: 'Townhouse - Middle of Row' },
|
|
344
|
+
{ value: 'semidetached', name: 'Semi Detached' },
|
|
345
|
+
{ value: 'duplex', name: 'Duplex' },
|
|
346
|
+
{ value: 'triplex', name: 'Triplex' },
|
|
347
|
+
];
|
|
348
|
+
const condoBuildingStructureOptions = [
|
|
349
|
+
{ value: 'highrise', name: 'High Rise' },
|
|
350
|
+
{ value: 'lowrise', name: 'Low Rise' },
|
|
351
|
+
{ value: 'townhouse', name: 'Townhouse' },
|
|
352
|
+
];
|
|
353
|
+
const tenantBuildingStructureOptions = [
|
|
348
354
|
{ value: 'highrise', name: 'High Rise' },
|
|
349
355
|
{ value: 'lowrise', name: 'Low Rise' },
|
|
350
|
-
{ value: 'basement', name: 'Basement' },
|
|
351
|
-
{ value: '
|
|
352
|
-
{ value: '
|
|
356
|
+
{ value: 'basement', name: 'Basement Apartment' },
|
|
357
|
+
{ value: 'townhouse', name: 'Townhouse' },
|
|
358
|
+
{ value: 'detached', name: 'Detached' },
|
|
353
359
|
{ value: 'duplex', name: 'Duplex' },
|
|
354
360
|
{ value: 'triplex', name: 'Triplex' },
|
|
355
361
|
];
|
|
356
362
|
const fireHallDistanceOptions = [
|
|
357
|
-
{ value: '', name: '-' },
|
|
358
363
|
{ value: '5', name: 'Within 5km' },
|
|
359
364
|
{ value: '8', name: 'Within 8km' },
|
|
360
365
|
{ value: '13', name: 'Within 13km' },
|
|
361
366
|
{ value: '16', name: 'Over 13km' },
|
|
362
367
|
];
|
|
363
368
|
const fireHydrantDistanceOptions = [
|
|
364
|
-
{ value: '', name: '-' },
|
|
365
369
|
{ value: '150', name: 'Within 150m' },
|
|
366
370
|
{ value: '300', name: 'Within 300m' },
|
|
367
371
|
{ value: '301', name: 'Over 300m' },
|
|
368
372
|
];
|
|
369
|
-
const
|
|
370
|
-
{ value: '', name: '
|
|
371
|
-
{ value: 'naturalgas', name: 'Natural Gas' },
|
|
373
|
+
const primaryHeatingTypeOptions = [
|
|
374
|
+
{ value: 'naturalgas', name: 'Natural Gas Forced Air' },
|
|
372
375
|
{ value: 'electric', name: 'Electric' },
|
|
373
376
|
{ value: 'wood', name: 'Wood' },
|
|
374
377
|
{ value: 'water', name: 'Water' },
|
|
375
378
|
{ value: 'geothermal', name: 'Geothermal' },
|
|
376
379
|
{ value: 'radiant', name: 'Radiant' },
|
|
377
380
|
{ value: 'oil', name: 'Oil' },
|
|
381
|
+
{ value: 'none', name: 'None' },
|
|
382
|
+
{ value: 'unknown', name: 'Unknown' },
|
|
383
|
+
];
|
|
384
|
+
const auxHeatingTypeOptions = [
|
|
385
|
+
{ value: 'electric', name: 'Electric' },
|
|
378
386
|
{ value: 'fireplace', name: 'Fireplace' },
|
|
379
387
|
{ value: 'woodstove', name: 'Wood Stove' },
|
|
380
388
|
{ value: 'woodfurnace', name: 'Wood Furnace' },
|
|
381
389
|
{ value: 'pelletstove', name: 'Pallet Stove' },
|
|
390
|
+
{ value: 'oil', name: 'Oil' },
|
|
382
391
|
{ value: 'none', name: 'None' },
|
|
383
392
|
{ value: 'unknown', name: 'Unknown' },
|
|
384
393
|
];
|
|
394
|
+
const homeCoverageOptions = [
|
|
395
|
+
{ name: '$500', value: '500' },
|
|
396
|
+
{ name: '$1,000', value: '1000' },
|
|
397
|
+
{ name: '$1,500', value: '1500' },
|
|
398
|
+
];
|
|
399
|
+
const homeLiabilityOptions = [
|
|
400
|
+
{ name: '$1,000,000', value: '1000000' },
|
|
401
|
+
{ name: '$2,000,000', value: '2000000' },
|
|
402
|
+
];
|
|
403
|
+
const ppOptions = [
|
|
404
|
+
{ name: '$30,000', value: '30000' },
|
|
405
|
+
{ name: '$40,000', value: '40000' },
|
|
406
|
+
{ name: '$50,000', value: '50000' },
|
|
407
|
+
{ name: '$60,000', value: '60000' },
|
|
408
|
+
{ name: '$70,000', value: '70000' },
|
|
409
|
+
{ name: '$80,000', value: '80000' },
|
|
410
|
+
{ name: '$90,000', value: '90000' },
|
|
411
|
+
{ name: '$100,000', value: '100000' },
|
|
412
|
+
];
|
|
413
|
+
|
|
414
|
+
const lifeProvinceOptions = [
|
|
415
|
+
{ value: '1', name: 'Alberta' },
|
|
416
|
+
{ value: '2', name: 'British Columbia' },
|
|
417
|
+
{ value: '3', name: 'Manitoba' },
|
|
418
|
+
{ value: '4', name: 'New Brunswick' },
|
|
419
|
+
{ value: '5', name: 'Newfoundland and Labrador' },
|
|
420
|
+
{ value: '6', name: 'Nova Scotia' },
|
|
421
|
+
{ value: '7', name: 'Northwest Territories' },
|
|
422
|
+
{ value: '8', name: 'Nunavut' },
|
|
423
|
+
{ value: '9', name: 'Ontario' },
|
|
424
|
+
{ value: '10', name: 'Prince Edward Island' },
|
|
425
|
+
{ value: '11', name: 'Quebec' },
|
|
426
|
+
{ value: '12', name: 'Saskatchewan' },
|
|
427
|
+
{ value: '13', name: 'Yukon' },
|
|
428
|
+
];
|
|
429
|
+
const lifeInsuranceTypeOptions = [
|
|
430
|
+
{ value: '3', name: '10 Year Level Term' },
|
|
431
|
+
{ value: '4', name: '15 Year Level Term' },
|
|
432
|
+
{ value: '5', name: '20 Year Level Term' },
|
|
433
|
+
{ value: '6', name: '25 Year Level Term' },
|
|
434
|
+
{ value: '7', name: '30 Year Level Term' },
|
|
435
|
+
{ value: '9', name: '35 Year Level Term' },
|
|
436
|
+
{ value: '0', name: '40 Year Level Term' },
|
|
437
|
+
{ value: 'A', name: 'Level Term to age 65' },
|
|
438
|
+
{ value: 'B', name: 'Level Term to age 70' },
|
|
439
|
+
{ value: 'C', name: 'Level Term to age 75' },
|
|
440
|
+
{ value: 'W', name: 'Level Term to age 80' },
|
|
441
|
+
{ value: 'F', name: 'Other Term' },
|
|
442
|
+
{ value: 'Z:357:30', name: '10, 20, 30 Year Term' },
|
|
443
|
+
{ value: 'Z:3456790ABCW', name: 'All Level Term Product Categories' },
|
|
444
|
+
{ value: 'G', name: 'Decreasing Term' },
|
|
445
|
+
{ value: 'H', name: 'Whole Life Guaranteed Life Pay' },
|
|
446
|
+
{ value: 'I', name: 'Whole Life Guaranteed Pay to 65' },
|
|
447
|
+
{ value: 'T', name: 'Whole Life Guaranteed 25 Pay' },
|
|
448
|
+
{ value: 'J', name: 'Whole Life Guaranteed 20 Pay' },
|
|
449
|
+
{ value: 'K', name: 'Whole Life Guaranteed 15 Pay' },
|
|
450
|
+
{ value: 'S', name: 'Whole Life Guaranteed 10 Pay' },
|
|
451
|
+
{ value: 'L', name: 'U/L T100 - Minimum Premium' },
|
|
452
|
+
{ value: 'U', name: 'U/L T100 - Minimum Premium - Pay to 65' },
|
|
453
|
+
{ value: 'M', name: 'U/L T100 - Minimum Premium - 20 Pay' },
|
|
454
|
+
{ value: 'N', name: 'U/L T100 - Minimum Premium - 15 Pay' },
|
|
455
|
+
{ value: 'O', name: 'U/L T100 - Minimum Premium - 10 Pay' },
|
|
456
|
+
{ value: 'P', name: 'Term to 100 Guaranteed Life Pay' },
|
|
457
|
+
{ value: 'R', name: 'Term to 100 Guaranteed 20 Pay' },
|
|
458
|
+
];
|
|
459
|
+
const lifeCoverageOptions = [
|
|
460
|
+
{ value: '10000', name: '$10,000' },
|
|
461
|
+
{ value: '25000', name: '$25,000' },
|
|
462
|
+
{ value: '50000', name: '$50,000' },
|
|
463
|
+
{ value: '75000', name: '$75,000' },
|
|
464
|
+
{ value: '100000', name: '$100,000' },
|
|
465
|
+
{ value: '125000', name: '$125,000' },
|
|
466
|
+
{ value: '150000', name: '$150,000' },
|
|
467
|
+
{ value: '175000', name: '$175,000' },
|
|
468
|
+
{ value: '200000', name: '$200,000' },
|
|
469
|
+
{ value: '225000', name: '$225,000' },
|
|
470
|
+
{ value: '250000', name: '$250,000' },
|
|
471
|
+
{ value: '300000', name: '$300,000' },
|
|
472
|
+
{ value: '350000', name: '$350,000' },
|
|
473
|
+
{ value: '400000', name: '$400,000' },
|
|
474
|
+
{ value: '450000', name: '$450,000' },
|
|
475
|
+
{ value: '500000', name: '$500,000' },
|
|
476
|
+
{ value: '550000', name: '$550,000' },
|
|
477
|
+
{ value: '600000', name: '$600,000' },
|
|
478
|
+
{ value: '650000', name: '$650,000' },
|
|
479
|
+
{ value: '700000', name: '$700,000' },
|
|
480
|
+
{ value: '750000', name: '$750,000' },
|
|
481
|
+
{ value: '800000', name: '$800,000' },
|
|
482
|
+
{ value: '900000', name: '$900,000' },
|
|
483
|
+
{ value: '1000000', name: '$1,000,000' },
|
|
484
|
+
{ value: '1100000', name: '$1,100,000' },
|
|
485
|
+
{ value: '1250000', name: '$1,250,000' },
|
|
486
|
+
{ value: '1500000', name: '$1,500,000' },
|
|
487
|
+
{ value: '1750000', name: '$1,750,000' },
|
|
488
|
+
{ value: '2000000', name: '$2,000,000' },
|
|
489
|
+
{ value: '2500000', name: '$2,500,000' },
|
|
490
|
+
{ value: '3000000', name: '$3,000,000' },
|
|
491
|
+
{ value: '5000000', name: '$5,000,000' },
|
|
492
|
+
{ value: '6000000', name: '$6,000,000' },
|
|
493
|
+
{ value: '7000000', name: '$7,000,000' },
|
|
494
|
+
{ value: '8000000', name: '$8,000,000' },
|
|
495
|
+
{ value: '9000000', name: '$9,000,000' },
|
|
496
|
+
{ value: '10000000', name: '$10,000,000' },
|
|
497
|
+
];
|
|
385
498
|
|
|
386
499
|
const yesNoOptions = [{ name: 'Yes', value: true }, { name: 'No', value: false }];
|
|
387
|
-
const
|
|
500
|
+
const smokerOptions = [{ name: 'Non-Smoker', value: false }, { name: 'Smoker', value: true }];
|
|
501
|
+
|
|
502
|
+
const supportedProvinceCodes = ['AB', 'ON', 'NS', 'NF', 'NB'];
|
|
388
503
|
|
|
389
504
|
var DateTypes;
|
|
390
505
|
(function (DateTypes) {
|
|
@@ -475,6 +590,7 @@ var DeviceTypes;
|
|
|
475
590
|
(function (DeviceTypes) {
|
|
476
591
|
DeviceTypes["Desktop"] = "desktop";
|
|
477
592
|
DeviceTypes["Mobile"] = "mobile";
|
|
593
|
+
DeviceTypes["Tablet"] = "tablet";
|
|
478
594
|
})(DeviceTypes || (DeviceTypes = {}));
|
|
479
595
|
const DeviceTypeWidthList = [
|
|
480
596
|
{
|
|
@@ -482,9 +598,13 @@ const DeviceTypeWidthList = [
|
|
|
482
598
|
minWidth: 0,
|
|
483
599
|
},
|
|
484
600
|
{
|
|
485
|
-
type: DeviceTypes.
|
|
601
|
+
type: DeviceTypes.Tablet,
|
|
486
602
|
minWidth: 601,
|
|
487
603
|
},
|
|
604
|
+
{
|
|
605
|
+
type: DeviceTypes.Desktop,
|
|
606
|
+
minWidth: 861,
|
|
607
|
+
},
|
|
488
608
|
];
|
|
489
609
|
var ScreenBPTypes;
|
|
490
610
|
(function (ScreenBPTypes) {
|
|
@@ -522,21 +642,6 @@ const ScreenBPList = [
|
|
|
522
642
|
},
|
|
523
643
|
];
|
|
524
644
|
|
|
525
|
-
var AppTypes;
|
|
526
|
-
(function (AppTypes) {
|
|
527
|
-
AppTypes["MyChoice"] = "MyChoice";
|
|
528
|
-
AppTypes["Partner"] = "Partner";
|
|
529
|
-
AppTypes["TheBig"] = "TheBig";
|
|
530
|
-
})(AppTypes || (AppTypes = {}));
|
|
531
|
-
var InsuranceTypes;
|
|
532
|
-
(function (InsuranceTypes) {
|
|
533
|
-
InsuranceTypes["Car"] = "car";
|
|
534
|
-
InsuranceTypes["Life"] = "life";
|
|
535
|
-
InsuranceTypes["Home"] = "home";
|
|
536
|
-
})(InsuranceTypes || (InsuranceTypes = {}));
|
|
537
|
-
const defaultLocalIndex = 'insurance';
|
|
538
|
-
const MAX_LOCAL_STORAGE_HOURS = 168;
|
|
539
|
-
|
|
540
645
|
const API_ROOT = process.env.REACT_APP_API_BASE_URL ? process.env.REACT_APP_API_BASE_URL.toString() : '';
|
|
541
646
|
const API_AUTH = {
|
|
542
647
|
POST_SIGN_IN: `${API_ROOT}login/`,
|
|
@@ -564,8 +669,12 @@ const API_FORM_CAR = {
|
|
|
564
669
|
};
|
|
565
670
|
const API_FORM_HOME = {
|
|
566
671
|
GET_POSTAL: `${API_ROOT}postal/home/`,
|
|
672
|
+
GET_PLACE: `${API_ROOT}homequote/info/`,
|
|
567
673
|
POST_QUOTE_DATA: `${API_ROOT}homequote/`,
|
|
568
674
|
};
|
|
675
|
+
const API_FORM_LIFE = {
|
|
676
|
+
POST_QUOTE_DATA: `${API_ROOT}lifequote/`,
|
|
677
|
+
};
|
|
569
678
|
var HttpRequestHeaderTypes;
|
|
570
679
|
(function (HttpRequestHeaderTypes) {
|
|
571
680
|
HttpRequestHeaderTypes["Json"] = "JSON";
|
|
@@ -592,6 +701,7 @@ var ModalTypes;
|
|
|
592
701
|
ModalTypes["MessageModal"] = "MessageModal";
|
|
593
702
|
ModalTypes["ConfirmModal"] = "ConfirmModal";
|
|
594
703
|
ModalTypes["PostalModal"] = "PostalModal";
|
|
704
|
+
ModalTypes["AddressModal"] = "AddressModal";
|
|
595
705
|
ModalTypes["FinaleModal"] = "FinaleModal";
|
|
596
706
|
})(ModalTypes || (ModalTypes = {}));
|
|
597
707
|
|
|
@@ -679,23 +789,19 @@ IconDelete.defaultProps = {
|
|
|
679
789
|
|
|
680
790
|
const IconTooltip = (props) => {
|
|
681
791
|
const [isHover, setIsHover] = useState(false);
|
|
682
|
-
const { width, height, className, } = props;
|
|
792
|
+
const { width, height, className, color, } = props;
|
|
683
793
|
const handleEvent = (type) => () => {
|
|
684
|
-
// const element = document.getElementById(tooltipId as string);
|
|
685
794
|
if (type === 'mouseOver') {
|
|
686
795
|
if (!isHover) {
|
|
687
796
|
setIsHover(true);
|
|
688
|
-
// element?.classList.add('show');
|
|
689
797
|
}
|
|
690
798
|
}
|
|
691
799
|
if (type === 'mouseLeave') {
|
|
692
800
|
setIsHover(false);
|
|
693
|
-
// element?.classList.remove('show');
|
|
694
801
|
}
|
|
695
802
|
};
|
|
696
|
-
return (jsxs("svg", { className: className, onMouseOver: handleEvent('mouseOver'), onMouseLeave: handleEvent('mouseLeave'), version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 18 18", style: { width, height }, children: [!isHover
|
|
697
|
-
|
|
698
|
-
&& jsx("circle", { fill: "var(--color-secondary)", cx: "9", cy: "9", r: "9" }), jsxs("g", { fill: isHover ? '#FFF' : 'var(--color-secondary)', children: [jsx("path", { d: "M9.8,13.8c0,0.4-0.3,0.8-0.8,0.8s-0.8-0.3-0.8-0.8S8.6,13,9,13S9.8,13.3,9.8,13.8z" }), jsx("path", { d: "M9,11.6c-0.3,0-0.6-0.3-0.6-0.6v-0.8c0-0.7,0.5-1.4,1.1-1.6c0.8-0.3,1.4-1.1,\n 1.5-2 c0-1.1-1-2-2.1-2c-1.1,0-2,0.9-2,2c0,0.3-0.3,0.6-0.6,0.5C6.1,7.2,5.8,7,5.8,\n 6.7c0-1.8,1.4-3.2,3.1-3.2c1.8,0,3.2,1.4,3.2,3.1 c0,0,0,0.1,0,0.1c-0.1,1.4-1,\n 2.6-2.2,3C9.7,9.8,9.6,10,9.6,10.2V11C9.6,11.3,9.3,11.6,9,11.6C9,11.6,9,11.6,9,11.6z" })] }), jsx("circle", { fill: "transparent", cx: "9", cy: "9", r: "9" })] }));
|
|
803
|
+
return (jsxs("svg", { className: className, onMouseOver: handleEvent('mouseOver'), onMouseLeave: handleEvent('mouseLeave'), version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 18 18", style: { width, height }, children: [!isHover ? (jsx("path", { fill: color || 'var(--color-secondary)', d: "M9,18c-5,0-9-4-9-9c0-5,4-9,9-9c5,0,9,4,9,\n 9C18,14,14,18,9,18z M9,1C4.6,1,1,4.6,1,9s3.6,8,8,8s8-3.6,8-8 S13.4,1,9,1z" }))
|
|
804
|
+
: jsx("circle", { fill: color || 'var(--color-secondary)', cx: "9", cy: "9", r: "9" }), jsxs("g", { fill: isHover ? '#FFF' : color || 'var(--color-secondary)', children: [jsx("path", { d: "M9.8,13.8c0,0.4-0.3,0.8-0.8,0.8s-0.8-0.3-0.8-0.8S8.6,13,9,13S9.8,13.3,9.8,13.8z" }), jsx("path", { d: "M9,11.6c-0.3,0-0.6-0.3-0.6-0.6v-0.8c0-0.7,0.5-1.4,1.1-1.6c0.8-0.3,1.4-1.1,\n 1.5-2 c0-1.1-1-2-2.1-2c-1.1,0-2,0.9-2,2c0,0.3-0.3,0.6-0.6,0.5C6.1,7.2,5.8,7,5.8,\n 6.7c0-1.8,1.4-3.2,3.1-3.2c1.8,0,3.2,1.4,3.2,3.1 c0,0,0,0.1,0,0.1c-0.1,1.4-1,\n 2.6-2.2,3C9.7,9.8,9.6,10,9.6,10.2V11C9.6,11.3,9.3,11.6,9,11.6C9,11.6,9,11.6,9,11.6z" })] }), jsx("circle", { fill: "transparent", cx: "9", cy: "9", r: "9" })] }));
|
|
699
805
|
};
|
|
700
806
|
IconTooltip.defaultProps = {
|
|
701
807
|
className: '',
|
|
@@ -719,6 +825,16 @@ IconDecline.defaultProps = {
|
|
|
719
825
|
height: '1.25rem',
|
|
720
826
|
};
|
|
721
827
|
|
|
828
|
+
const IconClock = (props) => {
|
|
829
|
+
const { width, height, className, } = props;
|
|
830
|
+
return (jsx("svg", { className: className, version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 20 20", style: { width, height }, children: jsxs("g", { id: "Group_2002", "data-name": "Group 2002", transform: "translate(-86 -511)", children: [jsxs("g", { id: "Ellipse_55", "data-name": "Ellipse 55", transform: "translate(86 511)", fill: "none", stroke: "#9ED4DB", strokeWidth: "1", children: [jsx("circle", { cx: "10", cy: "10", r: "10", stroke: "none" }), jsx("circle", { cx: "10", cy: "10", r: "9.5", fill: "none" })] }), jsx("path", { id: "Path_362", "data-name": "Path 362", d: "M-20448-18259.338v6.816l3.4,2.408", transform: "translate(20544 18774.439)", fill: "none", stroke: "#9ED4DB", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1" })] }) }));
|
|
831
|
+
};
|
|
832
|
+
IconClock.defaultProps = {
|
|
833
|
+
className: '',
|
|
834
|
+
width: '1.25rem',
|
|
835
|
+
height: '1.25rem',
|
|
836
|
+
};
|
|
837
|
+
|
|
722
838
|
const ButtonBase = (props) => {
|
|
723
839
|
const { color, category, className, variant, size, label, type, onClick, children, } = props;
|
|
724
840
|
const buttonVariant = variant === ButtonVariantTypes.Rectangle ? variant : `button-${variant}-${size}`;
|
|
@@ -1059,6 +1175,73 @@ const formatPostalCode = (str = '') => (str && str.replace(/[^a-zA-Z0-9]/g, '').
|
|
|
1059
1175
|
.toUpperCase());
|
|
1060
1176
|
const postalCodeFormat = (postalCode = '') => postalCode && postalCode.replace(/\s/g, '').substr(0, 6);
|
|
1061
1177
|
const numberWithCommas = (value) => value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
1178
|
+
const getLicenceTypeOptions = (options, optionValues, disabled) => (options.map((option) => {
|
|
1179
|
+
const newOption = option;
|
|
1180
|
+
if (optionValues.includes(option.value)) {
|
|
1181
|
+
newOption.disabled = disabled;
|
|
1182
|
+
}
|
|
1183
|
+
return newOption;
|
|
1184
|
+
}));
|
|
1185
|
+
const checkDateIsSpecial = (defaultMinDate, specialDate) => compareDates(specialDate, defaultMinDate) >= 0;
|
|
1186
|
+
const getLicenceMinDate = (licenceType, defaultMinDate, config) => {
|
|
1187
|
+
if (defaultMinDate) {
|
|
1188
|
+
if (licenceType === DriverLicenceTypes.G1) {
|
|
1189
|
+
return addMonthsToDate(defaultMinDate, config.minDates.g1.minMonth);
|
|
1190
|
+
}
|
|
1191
|
+
if (licenceType === DriverLicenceTypes.G) {
|
|
1192
|
+
if (checkDateIsSpecial(defaultMinDate, config.minDates.g.specialDate)) {
|
|
1193
|
+
return defaultMinDate;
|
|
1194
|
+
}
|
|
1195
|
+
return addMonthsToDate(defaultMinDate, config.minDates.g.minMonth);
|
|
1196
|
+
}
|
|
1197
|
+
if (licenceType === DriverLicenceTypes.G2) {
|
|
1198
|
+
return addMonthsToDate(defaultMinDate, config.minDates.g2.minMonth);
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
return '';
|
|
1202
|
+
};
|
|
1203
|
+
const getLicenceMaxDate = (licenceType, minDate, config) => {
|
|
1204
|
+
let maxDate = '';
|
|
1205
|
+
const { minDates: { g: { specialDate } } } = config;
|
|
1206
|
+
if (licenceType === DriverLicenceTypes.G
|
|
1207
|
+
&& compareDates(specialDate, minDate) >= 0) {
|
|
1208
|
+
maxDate = config.minDates.g.specialDate;
|
|
1209
|
+
}
|
|
1210
|
+
return getFormattedDate(maxDate, 'yyyy-MM-dd');
|
|
1211
|
+
};
|
|
1212
|
+
const getDisabledLicenceTypes = (gBlock, g2Block, g1Block) => {
|
|
1213
|
+
const disabledLicenceTypes = [];
|
|
1214
|
+
if (gBlock) {
|
|
1215
|
+
disabledLicenceTypes.push(DriverLicenceTypes.G);
|
|
1216
|
+
}
|
|
1217
|
+
if (g1Block) {
|
|
1218
|
+
disabledLicenceTypes.push(DriverLicenceTypes.G1);
|
|
1219
|
+
}
|
|
1220
|
+
if (g2Block) {
|
|
1221
|
+
disabledLicenceTypes.push(DriverLicenceTypes.G2);
|
|
1222
|
+
}
|
|
1223
|
+
return disabledLicenceTypes;
|
|
1224
|
+
};
|
|
1225
|
+
const getInsuranceYearsOptions = (maxValue) => (insuredYearsOptions.filter((option) => +option.value <= +maxValue));
|
|
1226
|
+
const getInsuranceType = () => {
|
|
1227
|
+
const pathParts = window.location.pathname.split('/');
|
|
1228
|
+
if (pathParts.includes('car')) {
|
|
1229
|
+
return InsuranceTypes.Car;
|
|
1230
|
+
}
|
|
1231
|
+
if (pathParts.includes('home')) {
|
|
1232
|
+
return InsuranceTypes.Home;
|
|
1233
|
+
}
|
|
1234
|
+
if (pathParts.includes('condo')) {
|
|
1235
|
+
return InsuranceTypes.Condo;
|
|
1236
|
+
}
|
|
1237
|
+
if (pathParts.includes('tenant')) {
|
|
1238
|
+
return InsuranceTypes.Tenant;
|
|
1239
|
+
}
|
|
1240
|
+
if (pathParts.includes('life')) {
|
|
1241
|
+
return InsuranceTypes.Life;
|
|
1242
|
+
}
|
|
1243
|
+
return InsuranceTypes.Car;
|
|
1244
|
+
};
|
|
1062
1245
|
|
|
1063
1246
|
const useEffectOnce = (effect) => {
|
|
1064
1247
|
const destroyFunc = useRef();
|
|
@@ -1180,7 +1363,7 @@ TitleForm.defaultProps = {
|
|
|
1180
1363
|
};
|
|
1181
1364
|
|
|
1182
1365
|
const InputForm = memo((props) => {
|
|
1183
|
-
const { size, className, name, type, defaultValue, onChange, placeholder, disabled, minValue, maxValue, } = props;
|
|
1366
|
+
const { size, className, name, type, defaultValue, onChange, placeholder, disabled, minValue, maxValue, inputRef, error, } = props;
|
|
1184
1367
|
const [isRender, setIsRender] = useState(false);
|
|
1185
1368
|
const [value, setValue,] = useReducer(inputValueReducer, defaultValue);
|
|
1186
1369
|
useEffect(() => {
|
|
@@ -1204,7 +1387,7 @@ const InputForm = memo((props) => {
|
|
|
1204
1387
|
}
|
|
1205
1388
|
}, []);
|
|
1206
1389
|
if (isRender) {
|
|
1207
|
-
return (jsx("input", { className:
|
|
1390
|
+
return (jsx("input", { className: ` ${className} ${size} ${disabled ? 'disabled' : ''} ${error ? 'error' : ''}`, type: type, name: name, defaultValue: defaultValue, onChange: handleChange, placeholder: placeholder, disabled: disabled, min: minValue, max: maxValue, ref: inputRef }));
|
|
1208
1391
|
}
|
|
1209
1392
|
return jsx("div", { className: `${size} ${disabled ? 'disabled' : ''} ${className}` });
|
|
1210
1393
|
}, (prevProps, nextProps) => {
|
|
@@ -1213,7 +1396,8 @@ const InputForm = memo((props) => {
|
|
|
1213
1396
|
|| nextProps.defaultValue !== nextProps.maxValue;
|
|
1214
1397
|
const testMinValue = prevProps.minValue === nextProps.minValue;
|
|
1215
1398
|
const testMaxValue = prevProps.maxValue === nextProps.maxValue;
|
|
1216
|
-
|
|
1399
|
+
const errorValue = prevProps.error === nextProps.error;
|
|
1400
|
+
return !(!testDefaultValue || !testMinValue || !testMaxValue || !minMaxValue || !errorValue);
|
|
1217
1401
|
});
|
|
1218
1402
|
InputForm.defaultProps = {
|
|
1219
1403
|
size: SizeTypes.Large,
|
|
@@ -1226,7 +1410,7 @@ InputForm.defaultProps = {
|
|
|
1226
1410
|
};
|
|
1227
1411
|
|
|
1228
1412
|
const InputFormPhone = React.memo((props) => {
|
|
1229
|
-
const { size, className, disabled, defaultValue, name, onChange, placeholder, } = props;
|
|
1413
|
+
const { size, className, disabled, defaultValue, name, onChange, placeholder, error, } = props;
|
|
1230
1414
|
const [value, setValue,] = useReducer(inputValueReducer, defaultValue);
|
|
1231
1415
|
const handleChange = useCallback((phoneNumber) => {
|
|
1232
1416
|
setValue({
|
|
@@ -1241,11 +1425,11 @@ const InputFormPhone = React.memo((props) => {
|
|
|
1241
1425
|
}
|
|
1242
1426
|
}, []);
|
|
1243
1427
|
return (jsx(ReactPhoneInput, { buttonClass: "dropdown-button", inputProps: {
|
|
1244
|
-
className: `input-form-phone ${size} ${disabled ? 'disabled' : ''} ${className}`,
|
|
1428
|
+
className: `input-form-phone ${size} ${disabled ? 'disabled' : ''} ${className} ${error ? 'error' : ''}`,
|
|
1245
1429
|
name,
|
|
1246
1430
|
placeholder: placeholder || '(855) 325-8444',
|
|
1247
1431
|
}, country: "ca", value: value, onlyCountries: ['ca'], disableDropdown: true, disableCountryCode: true, onChange: handleChange, autoFormat: true }));
|
|
1248
|
-
}, (prevProps, nextProps) => prevProps.defaultValue === nextProps.defaultValue);
|
|
1432
|
+
}, (prevProps, nextProps) => (prevProps.defaultValue === nextProps.defaultValue || prevProps.error === nextProps.error));
|
|
1249
1433
|
InputFormPhone.defaultProps = {
|
|
1250
1434
|
size: SizeTypes.Large,
|
|
1251
1435
|
type: InputTypes.Text,
|
|
@@ -1256,16 +1440,11 @@ InputFormPhone.defaultProps = {
|
|
|
1256
1440
|
error: false,
|
|
1257
1441
|
};
|
|
1258
1442
|
|
|
1259
|
-
const
|
|
1443
|
+
const defaultManipulateInput = (value) => value;
|
|
1260
1444
|
const InputFormLicence = React.memo((props) => {
|
|
1261
|
-
const { className, maxLength, name, onChange, placeholder, defaultValue, disabled, size, } = props;
|
|
1445
|
+
const { className, maxLength, name, onChange, placeholder, defaultValue, disabled, size, manipulateInput, } = props;
|
|
1446
|
+
const returnValue = (manipulateInput || defaultManipulateInput);
|
|
1262
1447
|
const [inputValue, setInputValue,] = useReducer(inputValueReducer, returnValue(defaultValue));
|
|
1263
|
-
// useEffect(() => {
|
|
1264
|
-
// props.onChange({ target: { value: inputValue, name: props.name } }, props.rootName);
|
|
1265
|
-
// }, [inputValue]);
|
|
1266
|
-
// const handleChange = (event) => {
|
|
1267
|
-
// setInputValue(returnValue(event.target.value, props.maxLength));
|
|
1268
|
-
// }
|
|
1269
1448
|
const handleChange = (event) => {
|
|
1270
1449
|
setInputValue({
|
|
1271
1450
|
type: InputValueActionTypes.Set,
|
|
@@ -1349,15 +1528,20 @@ CheckboxForm.defaultProps = {
|
|
|
1349
1528
|
disabled: false,
|
|
1350
1529
|
};
|
|
1351
1530
|
|
|
1352
|
-
const Step = ({ item, index, className, itemsCount, isMobile, }) => (jsxs("li", { className: `navigation-step ${className}`, value: index, children: [item?.icon, jsxs("div", { className: "step-label", children: [jsx("span", { className: "step-name", children: isMobile ?
|
|
1531
|
+
const Step = ({ item, index, className, itemsCount, isMobile, }) => (jsxs("li", { className: `navigation-step ${className}`, value: index, children: [item?.icon, jsxs("div", { className: "step-label", children: [jsx("span", { className: "step-name", children: isMobile ? `Step ${index + 1} / ${itemsCount}` : `Step ${index + 1}` }), jsx("span", { className: "step-title", children: item?.title })] }), !isMobile && jsx("span", { className: `navigation-dot ${className}` })] }));
|
|
1353
1532
|
Step.defaultProps = {
|
|
1354
1533
|
className: '',
|
|
1355
1534
|
isMobile: false,
|
|
1356
1535
|
};
|
|
1536
|
+
const MychoiceStep = ({ item, index, className, }) => (jsxs("li", { className: `navigation-step mychoice ${className}`, value: index, children: [jsx("span", { className: `navigation-dot ${className} mychoice` }), jsx("span", { className: "step-title", children: item?.mychoiceTitle })] }));
|
|
1537
|
+
MychoiceStep.defaultProps = {
|
|
1538
|
+
className: '',
|
|
1539
|
+
isMobile: false,
|
|
1540
|
+
};
|
|
1357
1541
|
|
|
1358
|
-
const SdkTooltip = ({ description }) => (jsx(ReactTooltip, { placement: "left", overlay: jsx("
|
|
1542
|
+
const SdkTooltip = ({ description, color = '' }) => (jsx(ReactTooltip, { placement: "left", overlay: jsx("div", { className: "tooltip-text", children: description }), overlayClassName: "tooltip-container", defaultVisible: false, destroyTooltipOnHide: true, children: jsx("div", { children: jsx(IconTooltip, { className: "tooltip-icon", color: color }) }) }));
|
|
1359
1543
|
|
|
1360
|
-
const TooltipForm = ({ id, description }) => (jsx(SdkTooltip, { id: id, description: description }));
|
|
1544
|
+
const TooltipForm = ({ id, description, color = '' }) => (jsx(SdkTooltip, { id: id, description: description, color: color }));
|
|
1361
1545
|
|
|
1362
1546
|
const HeaderNavGroup = ({ className, navItems, isExternal = false, }) => (jsx(Fragment, { children: navItems.map((navItem, index) => {
|
|
1363
1547
|
const isLogin = navItem.name?.toUpperCase() === 'LOGIN';
|
|
@@ -1366,7 +1550,7 @@ const HeaderNavGroup = ({ className, navItems, isExternal = false, }) => (jsx(Fr
|
|
|
1366
1550
|
if (!isExternal) {
|
|
1367
1551
|
return (jsx(NavLink, { className: `${className} ${isLogin ? 'login' : 'nav-link'} ${isSignup ? 'signup' : ''} ${isLogout ? 'logout' : ''}`, to: isExternal ? { pathname: navItem.link } : navItem.link, rel: "noreferrer", children: navItem.name }, `header-nav-${index}`));
|
|
1368
1552
|
}
|
|
1369
|
-
return (jsx("a", { className: `${className} ${isLogin ? 'login' : 'nav-link'} ${isSignup ? 'signup' : ''} ${isLogout ? 'logout' : ''}`, href: navItem.link, rel: "noreferrer", children: navItem.name }, `header-nav-${index}`));
|
|
1553
|
+
return (jsx("a", { className: `${className?.toLowerCase() === navItem.name.toLowerCase() ? 'active' : ''} ${isLogin ? 'login' : 'nav-link'} ${isSignup ? 'signup' : ''} ${isLogout ? 'logout' : ''}`, href: navItem.link, rel: "noreferrer", children: navItem.name }, `header-nav-${index}`));
|
|
1370
1554
|
}) }));
|
|
1371
1555
|
HeaderNavGroup.defaultProps = {
|
|
1372
1556
|
className: '',
|
|
@@ -1452,5 +1636,5 @@ InfoMessage.defaultProps = {
|
|
|
1452
1636
|
isRemovable: false,
|
|
1453
1637
|
};
|
|
1454
1638
|
|
|
1455
|
-
export { API_APP, API_AUTH, API_FORM_CAR, API_FORM_HOME, API_ROOT, AlignTypes, AppTypes, ApplicantListTypes, ButtonArrow, ButtonBase, ButtonForm, ButtonMenu, ButtonTab, ButtonTabArrow, ButtonTabMobile, ButtonTypes, ButtonVariantTypes, CategoryTypes, CheckboxForm, ColorTypes, ColorVariablesTypes, CompanyRoleTypes, CoverageTypes, DateTypes, DeviceTypeWidthList, DeviceTypes, DirectionTypes, DriverLicenceTypes, DriverListTypes, DriverPriorityTypes, DwellingInfoTypes, GenderTypes, HeaderDropDown, HeaderNavGroup,
|
|
1639
|
+
export { API_APP, API_AUTH, API_FORM_CAR, API_FORM_HOME, API_FORM_LIFE, API_ROOT, AlignTypes, AppTypes, ApplicantListTypes, ButtonArrow, ButtonBase, ButtonForm, ButtonMenu, ButtonTab, ButtonTabArrow, ButtonTabMobile, ButtonTypes, ButtonVariantTypes, CategoryTypes, CheckboxForm, ColorTypes, ColorVariablesTypes, CompanyRoleTypes, CoverageTypes, DateTypes, DeviceTypeWidthList, DeviceTypes, DirectionTypes, DriverLicenceTypes, DriverListTypes, DriverPriorityTypes, DwellingInfoTypes, GenderTypes, HeaderDropDown, HeaderNavGroup, HttpRequestHeaderTypes, IconArrow, IconChecked, IconClock, IconDecline, IconDelete, IconDropdownArrow, IconLoaderPrimary, IconLoaderSecondary, IconSuccess, IconTabArrow, IconTooltip, InfoMessage, InputForm, InputFormEmail, InputFormLicence, InputFormPhone, InputTypes, InsuranceTypes, MAX_LOCAL_STORAGE_HOURS, MAX_LOCAL_STORAGE_HOURS_THEBIG, ModalTypes, MychoiceStep, NavigationAddress, NavigationBase, NavigationCar, NavigationDiscount, NavigationPerson, NavigationProperty, NavigationQuotes, OccupationTypes, OfferDetail, OfferDetailTitle, OfferHeader, OfferPrice, OperationHoursInfo, PROFILE_API, QuoteEdit, RequestStatusTypes, RequestTypes, ScreenBPList, ScreenBPTypes, SdkTooltip, SelectForm, SizeTypes, Step, TitleForm, TooltipForm, ValidationStatusTypes, VehicleConditionTypes, 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 };
|
|
1456
1640
|
//# sourceMappingURL=index.js.map
|