@axos-web-dev/shared-components 2.0.0-dev.2-bwaTest → 2.0.0-dev.2-nav-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.
Files changed (81) hide show
  1. package/dist/ATMLocator/ATMLocator.js +14 -84
  2. package/dist/Auth/ErrorAlert.js +6 -88
  3. package/dist/Button/Button.js +6 -120
  4. package/dist/Calculators/Calculator.d.ts +1 -1
  5. package/dist/Calculators/Calculator.js +18 -89
  6. package/dist/Calculators/MarginTradingCalculator/index.js +2 -112
  7. package/dist/Carousel/index.js +4 -109
  8. package/dist/Chatbot/ChatWindow.css.d.ts +4 -0
  9. package/dist/Chatbot/ChatWindow.css.js +8 -0
  10. package/dist/Chatbot/ChatWindow.js +8 -2
  11. package/dist/Chatbot/Chatbot.js +12 -2
  12. package/dist/Chatbot/ChatbotMessage.d.ts +1 -0
  13. package/dist/Chatbot/ChatbotMessage.js +47 -4
  14. package/dist/Chatbot/index.js +5 -1
  15. package/dist/Chevron/index.js +4 -114
  16. package/dist/Comparison/Comparison.js +5 -121
  17. package/dist/ExecutiveBio/ExecutiveBio.interface.d.ts +3 -2
  18. package/dist/ExecutiveBio/ExecutiveBio.js +4 -126
  19. package/dist/FaqAccordion/index.js +7 -110
  20. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +5 -110
  21. package/dist/Forms/ApplyNow.js +4 -109
  22. package/dist/Forms/ContactCompany.d.ts +1 -1
  23. package/dist/Forms/ContactCompanyTitle.d.ts +1 -1
  24. package/dist/Forms/ContactUsBusiness.js +7 -104
  25. package/dist/Forms/ContactUsBusinessNameEmail.js +8 -104
  26. package/dist/Forms/ContactUsNMLSId.js +7 -104
  27. package/dist/Forms/CpraRequest.js +2 -96
  28. package/dist/Forms/CraPublicFile.js +7 -104
  29. package/dist/Forms/DealerServices.d.ts +1 -1
  30. package/dist/Forms/EmailOnly.js +7 -104
  31. package/dist/Forms/EmailUs.js +34 -40
  32. package/dist/Forms/Forms.css.d.ts +0 -3
  33. package/dist/Forms/Forms.css.js +39 -39
  34. package/dist/Forms/MortgageRate/MortgageRateForm.js +8 -96
  35. package/dist/Forms/MortgageRate/MortgageRateWatch.js +4 -92
  36. package/dist/Forms/MortgageWarehouseLending.js +7 -104
  37. package/dist/Forms/SuccesForm.js +8 -91
  38. package/dist/Hyperlink/index.js +5 -110
  39. package/dist/ImageLink/ImageLink.js +6 -106
  40. package/dist/ImageLink/ImageLinkSet.js +6 -114
  41. package/dist/ImageLink/index.js +6 -105
  42. package/dist/Insight/Featured/CategorySelector.d.ts +1 -1
  43. package/dist/Insight/Featured/CategorySelector.js +5 -109
  44. package/dist/Insight/Featured/Featured.js +8 -106
  45. package/dist/Insight/Featured/Header.js +4 -109
  46. package/dist/LandingPageHeader/LandingPageHeader.d.ts +1 -1
  47. package/dist/Modal/Modal.js +2 -122
  48. package/dist/NavigationMenu/AxosALTS/index.js +6 -111
  49. package/dist/NavigationMenu/AxosBank/DropwdownButton.d.ts +7 -0
  50. package/dist/NavigationMenu/AxosBank/DropwdownButton.js +125 -0
  51. package/dist/NavigationMenu/AxosBank/Menu.d.ts +37 -0
  52. package/dist/NavigationMenu/AxosBank/Menu.js +150 -0
  53. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.d.ts +12 -1
  54. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +183 -268
  55. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +37 -268
  56. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +63 -492
  57. package/dist/NavigationMenu/AxosBank/MobileMenu/mobileReducer.d.ts +36 -0
  58. package/dist/NavigationMenu/AxosBank/MobileMenu/mobileReducer.js +105 -0
  59. package/dist/NavigationMenu/AxosBank/NavBar.module.js +42 -39
  60. package/dist/NavigationMenu/AxosBank/SubNavBar.d.ts +6 -1
  61. package/dist/NavigationMenu/AxosBank/SubNavBar.js +118 -3187
  62. package/dist/NavigationMenu/AxosBank/SubNavItem.d.ts +1 -0
  63. package/dist/NavigationMenu/AxosBank/SubNavItem.js +206 -0
  64. package/dist/NavigationMenu/AxosBank/index.d.ts +6 -4
  65. package/dist/NavigationMenu/AxosBank/index.js +83 -457
  66. package/dist/NavigationMenu/LaVictoire/index.js +5 -118
  67. package/dist/NavigationMenu/Navbar.d.ts +4 -1
  68. package/dist/NavigationMenu/Navbar.js +11 -114
  69. package/dist/NavigationMenu/SignInNavButton.js +9 -122
  70. package/dist/NavigationMenu/utils.d.ts +465 -0
  71. package/dist/NavigationMenu/utils.js +112 -0
  72. package/dist/SetContainer/SetContainer.js +7 -108
  73. package/dist/SocialMediaBar/iconsRepository.js +0 -124
  74. package/dist/VideoTile/VideoTile.js +2 -106
  75. package/dist/VideoWrapper/index.js +7 -110
  76. package/dist/assets/Chatbot/ChatWindow.css +26 -0
  77. package/dist/assets/Forms/Forms.css +91 -94
  78. package/dist/assets/NavigationMenu/AxosBank/NavBar.css +125 -87
  79. package/dist/assets/incoming.mp3.js +4 -0
  80. package/dist/main.js +5 -1
  81. package/package.json +5 -3
@@ -0,0 +1,465 @@
1
+ export interface Logo {
2
+ id: string;
3
+ url: string;
4
+ alt: string;
5
+ }
6
+ export interface NavItem {
7
+ id: string;
8
+ url: string;
9
+ label: string;
10
+ descriptiveTextAriaLabel?: string;
11
+ icon?: string | undefined;
12
+ ariaLabel?: string | undefined;
13
+ target?: any;
14
+ }
15
+ export interface NavItems extends NavItem {
16
+ items?: NavItems[];
17
+ subItems?: NavItems[];
18
+ menuItems?: Menu;
19
+ hasMenu?: boolean;
20
+ rightSide?: boolean | undefined;
21
+ dropdown?: boolean | undefined;
22
+ displayInNavigation?: boolean | undefined;
23
+ }
24
+ export interface SubNavItems extends NavItem {
25
+ subItems: (NavItems | NavItem | undefined)[];
26
+ menuItems?: Menu;
27
+ hasMenu?: boolean;
28
+ dropdown: boolean | undefined;
29
+ rightSide?: boolean | undefined;
30
+ displayInNavigation?: boolean | undefined;
31
+ }
32
+ export interface Navigation {
33
+ subNavBar?: SubNavItems[];
34
+ logo?: Logo;
35
+ quickLinks: NavItem[];
36
+ }
37
+ export interface Menu {
38
+ target: Record<string, unknown>;
39
+ heading: string;
40
+ bannerHeading: string;
41
+ bannerDescription: string;
42
+ helpAndSupportLink?: string;
43
+ bannerImage: {
44
+ fields: {
45
+ title: string;
46
+ file: {
47
+ url: string;
48
+ details: {
49
+ size: number;
50
+ image: {
51
+ width: number;
52
+ height: number;
53
+ };
54
+ };
55
+ fileName: string;
56
+ contentType: string;
57
+ };
58
+ };
59
+ };
60
+ bannerCta: {
61
+ id: string;
62
+ label: string;
63
+ url: string;
64
+ ariaLabel: string;
65
+ };
66
+ subItems?: NavItems[];
67
+ }
68
+ export interface PrimaryMenu {
69
+ sys: {
70
+ id: string;
71
+ contentType: {
72
+ sys: {
73
+ id: "primaryNavigation";
74
+ };
75
+ };
76
+ };
77
+ fields: {
78
+ display: string;
79
+ displayInNavigation: boolean;
80
+ rightSide: boolean;
81
+ dropdown: boolean;
82
+ target: {
83
+ sys: {
84
+ id: string;
85
+ contentType: {
86
+ sys: {
87
+ id: string;
88
+ };
89
+ };
90
+ };
91
+ fields: {
92
+ displayText: string;
93
+ targetUrl: string;
94
+ descriptiveTextAriaLabel: string;
95
+ icon: {
96
+ fields: {
97
+ image: {
98
+ fields: {
99
+ file: {
100
+ url: string;
101
+ };
102
+ };
103
+ };
104
+ };
105
+ };
106
+ };
107
+ };
108
+ children: Array<PrimaryChildrens>;
109
+ };
110
+ }
111
+ export interface QuickLink {
112
+ sys: {
113
+ id: string;
114
+ contentType: {
115
+ sys: {
116
+ id: string;
117
+ };
118
+ };
119
+ };
120
+ fields: {
121
+ displayText: string;
122
+ targetUrl: string;
123
+ descriptiveTextAriaLabel: string;
124
+ icon: {
125
+ fields: {
126
+ image: {
127
+ fields: {
128
+ file: {
129
+ url: string;
130
+ };
131
+ };
132
+ };
133
+ };
134
+ };
135
+ };
136
+ }
137
+ export interface HyperLinkType {
138
+ sys: {
139
+ id: string;
140
+ contentType: {
141
+ sys: {
142
+ id: "hyperlink";
143
+ };
144
+ };
145
+ };
146
+ fields: {
147
+ displayText: string;
148
+ targetUrl: string;
149
+ descriptiveTextAriaLabel: string;
150
+ };
151
+ }
152
+ export interface CallToActionType {
153
+ sys: {
154
+ id: string;
155
+ contentType: {
156
+ sys: {
157
+ id: "hyperlink";
158
+ };
159
+ };
160
+ };
161
+ fields: {
162
+ displayText: string;
163
+ targetUrl: string;
164
+ descriptiveTextAriaLabel: string;
165
+ icon: {
166
+ fields: {
167
+ image: {
168
+ fields: {
169
+ file: {
170
+ url: string;
171
+ };
172
+ };
173
+ };
174
+ };
175
+ };
176
+ };
177
+ }
178
+ export interface TertiaryMenu {
179
+ sys: {
180
+ id: string;
181
+ contentType: {
182
+ sys: {
183
+ id: "tertiaryNavigation";
184
+ };
185
+ };
186
+ };
187
+ fields: {
188
+ displayText?: string;
189
+ target: CallToActionType;
190
+ descriptiveTextAriaLabel?: string;
191
+ children: Array<HyperLinkType>;
192
+ targetUrl?: string;
193
+ icon: {
194
+ fields: {
195
+ file: {
196
+ url: string;
197
+ };
198
+ };
199
+ };
200
+ };
201
+ }
202
+ export interface SecondaryMenu {
203
+ sys: {
204
+ id: string;
205
+ contentType: {
206
+ sys: {
207
+ id: "secondaryNavigation";
208
+ };
209
+ };
210
+ };
211
+ fields: {
212
+ display: string;
213
+ target: HyperLinkType;
214
+ children: Array<TertiaryMenu>;
215
+ heading: string;
216
+ bannerHeading: string;
217
+ bannerDescription: string;
218
+ helpAndSupportLink?: string;
219
+ bannerImage: {
220
+ fields: {
221
+ title: string;
222
+ file: {
223
+ url: string;
224
+ details: {
225
+ size: number;
226
+ image: {
227
+ width: number;
228
+ height: number;
229
+ };
230
+ };
231
+ fileName: string;
232
+ contentType: string;
233
+ };
234
+ };
235
+ };
236
+ bannerCtaLinks?: Array<{
237
+ sys: {
238
+ id: string;
239
+ type: string;
240
+ };
241
+ fields: {
242
+ displayText: string;
243
+ targetUrl: string;
244
+ descriptiveTextAriaLabel: string;
245
+ };
246
+ }>;
247
+ };
248
+ }
249
+ type PrimaryChildrens = SecondaryMenu | HyperLinkType;
250
+ export interface MenuObject {
251
+ sys: {
252
+ id: string;
253
+ contentType: {
254
+ sys: {
255
+ id: string;
256
+ };
257
+ };
258
+ };
259
+ fields: {
260
+ label: string;
261
+ description: string;
262
+ display: string;
263
+ target: Array<{
264
+ sys: {
265
+ id: string;
266
+ contentType: {
267
+ sys: {
268
+ id: string;
269
+ };
270
+ };
271
+ };
272
+ fields: {
273
+ displayText: string;
274
+ targetUrl: string;
275
+ descriptiveTextAriaLabel: string;
276
+ };
277
+ }>;
278
+ logo: {
279
+ sys: {
280
+ id: string;
281
+ type: string;
282
+ };
283
+ fields: {
284
+ title: string;
285
+ image: {
286
+ fields: {
287
+ file: {
288
+ url: string;
289
+ };
290
+ };
291
+ };
292
+ };
293
+ };
294
+ quickLinks: Array<{
295
+ sys: {
296
+ id: string;
297
+ contentType: {
298
+ sys: {
299
+ id: string;
300
+ };
301
+ };
302
+ };
303
+ fields: {
304
+ displayText: string;
305
+ targetUrl: string;
306
+ descriptiveTextAriaLabel: string;
307
+ icon: {
308
+ fields: {
309
+ image: {
310
+ fields: {
311
+ file: {
312
+ url: string;
313
+ };
314
+ };
315
+ };
316
+ };
317
+ };
318
+ };
319
+ }>;
320
+ children: PrimaryMenu[];
321
+ };
322
+ }
323
+ export declare const getFirstLevelMenuItems: (menuData: MenuObject) => ({
324
+ id: string;
325
+ label: string;
326
+ url: string;
327
+ descriptiveTextAriaLabel: string;
328
+ rightSide: boolean;
329
+ dropdown: boolean;
330
+ } | {
331
+ id?: undefined;
332
+ label?: undefined;
333
+ url?: undefined;
334
+ descriptiveTextAriaLabel?: undefined;
335
+ rightSide?: undefined;
336
+ dropdown?: undefined;
337
+ })[];
338
+ export declare const getLogo: (menuData: MenuObject) => {
339
+ id: string;
340
+ url: string;
341
+ alt: string;
342
+ };
343
+ export declare const getQuickLinks: (menuData: MenuObject) => NavItem[];
344
+ export declare const extractChildrenTargets: (children: PrimaryChildrens[]) => (NavItem | {
345
+ id: string;
346
+ label: string;
347
+ url: string;
348
+ hasMenu: boolean;
349
+ descriptiveTextAriaLabel: string;
350
+ menuItems: {
351
+ target: {
352
+ displayText: string;
353
+ targetUrl: string;
354
+ descriptiveTextAriaLabel: string;
355
+ id: string;
356
+ };
357
+ heading: string;
358
+ bannerHeading: string;
359
+ bannerDescription: string;
360
+ helpAndSupportLink: string | undefined;
361
+ bannerImage: {
362
+ fields: {
363
+ title: string;
364
+ file: {
365
+ url: string;
366
+ details: {
367
+ size: number;
368
+ image: {
369
+ width: number;
370
+ height: number;
371
+ };
372
+ };
373
+ fileName: string;
374
+ contentType: string;
375
+ };
376
+ };
377
+ };
378
+ bannerCta: {
379
+ id: string;
380
+ label: string;
381
+ url: string;
382
+ ariaLabel: string;
383
+ }[] | undefined;
384
+ subItems: {
385
+ items: {
386
+ id: string;
387
+ label: string;
388
+ descriptiveTextAriaLabel: string;
389
+ url: string;
390
+ icon: string;
391
+ }[];
392
+ id: string;
393
+ label: string;
394
+ icon: string;
395
+ descrictiveTextAriaLabel: string;
396
+ url: string;
397
+ }[];
398
+ };
399
+ } | undefined)[];
400
+ export declare const getNavMenuItems: (menuData: MenuObject) => {
401
+ id: string;
402
+ label: string;
403
+ url: string;
404
+ descriptiveTextAriaLabel: string;
405
+ dropdown: boolean;
406
+ rightSide: boolean;
407
+ displayInNavigation: boolean;
408
+ subItems: (NavItem | {
409
+ id: string;
410
+ label: string;
411
+ url: string;
412
+ hasMenu: boolean;
413
+ descriptiveTextAriaLabel: string;
414
+ menuItems: {
415
+ target: {
416
+ displayText: string;
417
+ targetUrl: string;
418
+ descriptiveTextAriaLabel: string;
419
+ id: string;
420
+ };
421
+ heading: string;
422
+ bannerHeading: string;
423
+ bannerDescription: string;
424
+ helpAndSupportLink: string | undefined;
425
+ bannerImage: {
426
+ fields: {
427
+ title: string;
428
+ file: {
429
+ url: string;
430
+ details: {
431
+ size: number;
432
+ image: {
433
+ width: number;
434
+ height: number;
435
+ };
436
+ };
437
+ fileName: string;
438
+ contentType: string;
439
+ };
440
+ };
441
+ };
442
+ bannerCta: {
443
+ id: string;
444
+ label: string;
445
+ url: string;
446
+ ariaLabel: string;
447
+ }[] | undefined;
448
+ subItems: {
449
+ items: {
450
+ id: string;
451
+ label: string;
452
+ descriptiveTextAriaLabel: string;
453
+ url: string;
454
+ icon: string;
455
+ }[];
456
+ id: string;
457
+ label: string;
458
+ icon: string;
459
+ descrictiveTextAriaLabel: string;
460
+ url: string;
461
+ }[];
462
+ };
463
+ } | undefined)[];
464
+ }[];
465
+ export {};
@@ -0,0 +1,112 @@
1
+ const getFirstLevelMenuItems = (menuData) => {
2
+ if (!menuData.fields?.children) return [];
3
+ return menuData.fields?.children?.map(
4
+ ({ fields, sys }) => fields?.target !== void 0 ? {
5
+ id: sys.id || sys.id,
6
+ label: fields.target.fields.displayText,
7
+ url: fields.target.fields.targetUrl,
8
+ descriptiveTextAriaLabel: fields?.target.fields.descriptiveTextAriaLabel,
9
+ rightSide: !!fields.rightSide,
10
+ dropdown: fields?.dropdown
11
+ } : {}
12
+ );
13
+ };
14
+ const getLogo = (menuData) => {
15
+ const { fields } = menuData;
16
+ return {
17
+ id: fields?.logo?.sys?.id,
18
+ url: fields?.logo?.fields?.image?.fields?.file?.url,
19
+ alt: fields?.logo?.fields?.title
20
+ };
21
+ };
22
+ const transformPrimaryNavigation = (item) => {
23
+ const { sys, fields } = item;
24
+ return {
25
+ id: sys.id,
26
+ label: fields.display,
27
+ url: fields?.target?.fields?.targetUrl,
28
+ hasMenu: fields.children && fields.children.length > 0,
29
+ descriptiveTextAriaLabel: fields.target?.fields.descriptiveTextAriaLabel,
30
+ menuItems: {
31
+ target: { id: fields.target?.sys?.id, ...fields?.target?.fields },
32
+ heading: fields.heading,
33
+ bannerHeading: fields.bannerHeading,
34
+ bannerDescription: fields.bannerDescription,
35
+ helpAndSupportLink: fields.helpAndSupportLink,
36
+ bannerImage: fields?.bannerImage,
37
+ bannerCta: fields?.bannerCtaLinks?.map(({ sys: sys2, fields: fields2 }) => ({
38
+ id: sys2.id,
39
+ label: fields2.displayText,
40
+ url: fields2.targetUrl,
41
+ ariaLabel: fields2.descriptiveTextAriaLabel
42
+ })),
43
+ subItems: fields?.children?.length > 0 ? fields.children?.map(({ fields: menuFields, sys: menuSys }) => {
44
+ const target = {
45
+ id: menuSys.id,
46
+ label: menuFields?.target?.fields?.displayText ?? menuFields?.displayText,
47
+ icon: menuFields?.icon?.fields?.file?.url,
48
+ descrictiveTextAriaLabel: menuFields?.target?.fields?.descriptiveTextAriaLabel ?? menuFields.descriptiveTextAriaLabel,
49
+ url: menuFields?.target?.fields?.targetUrl ?? menuFields.targetUrl
50
+ };
51
+ const items = menuFields?.children?.map((item2) => {
52
+ return {
53
+ id: item2.sys.id,
54
+ label: item2.fields.displayText,
55
+ descriptiveTextAriaLabel: item2.fields.descriptiveTextAriaLabel,
56
+ url: item2.fields.targetUrl,
57
+ icon: menuFields?.icon?.fields?.file?.url
58
+ };
59
+ });
60
+ return {
61
+ ...target,
62
+ items
63
+ };
64
+ }) : []
65
+ }
66
+ };
67
+ };
68
+ const getQuickLinks = (menuData) => {
69
+ return menuData?.fields?.quickLinks?.map(({ fields, sys }) => ({
70
+ id: sys.id,
71
+ label: fields?.displayText,
72
+ url: fields?.targetUrl,
73
+ ariaLabel: fields?.descriptiveTextAriaLabel ?? "",
74
+ icon: fields?.icon?.fields?.image?.fields?.file?.url
75
+ }));
76
+ };
77
+ const extractChildrenTargets = (children) => {
78
+ if (!children) return [];
79
+ return children?.map((child) => {
80
+ if (child?.sys?.contentType?.sys?.id === "secondaryNavigation") {
81
+ return transformPrimaryNavigation(child);
82
+ }
83
+ if (child?.sys?.contentType?.sys?.id === "hyperlink") {
84
+ const { fields, sys } = child;
85
+ return {
86
+ id: sys.id,
87
+ label: fields?.displayText,
88
+ url: fields?.targetUrl,
89
+ descriptiveTextAriaLabel: fields?.descriptiveTextAriaLabel
90
+ };
91
+ }
92
+ });
93
+ };
94
+ const getNavMenuItems = (menuData) => {
95
+ return menuData?.fields?.children?.map(({ fields, sys }) => ({
96
+ id: sys.id,
97
+ label: fields.target?.fields?.displayText,
98
+ url: fields.target?.fields?.targetUrl,
99
+ descriptiveTextAriaLabel: fields.target?.fields?.descriptiveTextAriaLabel ?? "",
100
+ dropdown: fields?.dropdown,
101
+ rightSide: fields?.rightSide ?? false,
102
+ displayInNavigation: fields?.displayInNavigation,
103
+ subItems: extractChildrenTargets(fields.children)
104
+ }));
105
+ };
106
+ export {
107
+ extractChildrenTargets,
108
+ getFirstLevelMenuItems,
109
+ getLogo,
110
+ getNavMenuItems,
111
+ getQuickLinks
112
+ };