@sheerid/jslib 1.152.0 → 1.154.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 (54) hide show
  1. package/es5/Tmetrix.bundle.js +4 -4
  2. package/es5/messages_ar.bundle.js +4 -4
  3. package/es5/messages_bg.bundle.js +4 -4
  4. package/es5/messages_cs.bundle.js +4 -4
  5. package/es5/messages_da.bundle.js +4 -4
  6. package/es5/messages_de.bundle.js +4 -4
  7. package/es5/messages_el.bundle.js +4 -4
  8. package/es5/messages_en-GB.bundle.js +4 -4
  9. package/es5/messages_es-ES.bundle.js +4 -4
  10. package/es5/messages_es.bundle.js +4 -4
  11. package/es5/messages_fi.bundle.js +4 -4
  12. package/es5/messages_fr-CA.bundle.js +4 -4
  13. package/es5/messages_fr.bundle.js +4 -4
  14. package/es5/messages_ga.bundle.js +4 -4
  15. package/es5/messages_hr.bundle.js +4 -4
  16. package/es5/messages_hu.bundle.js +4 -4
  17. package/es5/messages_id.bundle.js +4 -4
  18. package/es5/messages_it.bundle.js +4 -4
  19. package/es5/messages_iw.bundle.js +4 -4
  20. package/es5/messages_ja.bundle.js +4 -4
  21. package/es5/messages_ko.bundle.js +4 -4
  22. package/es5/messages_lo.bundle.js +4 -4
  23. package/es5/messages_lt.bundle.js +4 -4
  24. package/es5/messages_ms.bundle.js +4 -4
  25. package/es5/messages_nl.bundle.js +4 -4
  26. package/es5/messages_no.bundle.js +4 -4
  27. package/es5/messages_pl.bundle.js +4 -4
  28. package/es5/messages_pt-BR.bundle.js +4 -4
  29. package/es5/messages_pt.bundle.js +4 -4
  30. package/es5/messages_ru.bundle.js +4 -4
  31. package/es5/messages_sk.bundle.js +4 -4
  32. package/es5/messages_sl.bundle.js +4 -4
  33. package/es5/messages_sr.bundle.js +4 -4
  34. package/es5/messages_sv.bundle.js +4 -4
  35. package/es5/messages_th.bundle.js +4 -4
  36. package/es5/messages_tr.bundle.js +4 -4
  37. package/es5/messages_zh-HK.bundle.js +4 -4
  38. package/es5/messages_zh.bundle.js +4 -4
  39. package/manifest.json +43 -43
  40. package/package.json +1 -1
  41. package/sheerid-requestOrg.css +4 -4
  42. package/sheerid-requestOrg.js +5 -5
  43. package/sheerid-requestOrg.js.map +1 -1
  44. package/sheerid-utils.js +6 -6
  45. package/sheerid-utils.js.map +1 -1
  46. package/sheerid.css +4 -4
  47. package/sheerid.js +10 -10
  48. package/sheerid.js.map +1 -1
  49. package/sheerides6.js +193 -163
  50. package/sheerides6.js.map +1 -1
  51. package/src/lib/installScript/iframe.d.ts +15 -1
  52. package/src/lib/types/runtimeTypes.d.ts +4 -1
  53. package/src/lib/types/types.d.ts +15 -1
  54. package/types-reference.zip +0 -0
@@ -1,4 +1,4 @@
1
- import { Options, ViewModel } from "../types/types";
1
+ import { Options, PostMessageAction, ViewModel } from "../types/types";
2
2
  declare type IframeOptions = {
3
3
  className: string;
4
4
  title: string;
@@ -11,13 +11,21 @@ declare class Iframe {
11
11
  verificationIframeUid: string;
12
12
  hasLoaded: boolean;
13
13
  onLoadEvents: Function[];
14
+ onCleanupEvents: (() => void)[];
14
15
  installType: string;
15
16
  constructor(containerElement: HTMLElement, url: string);
17
+ cleanup(): void;
16
18
  static createUniqueId(): string;
17
19
  static isValidHttpUrl(urlString: string): boolean;
18
20
  createIframe(options: IframeOptions): HTMLIFrameElement;
19
21
  addOnLoadEvent(callback: Function): void;
20
22
  onLoad(): void;
23
+ /**
24
+ * Using this to add parent window message listeners gives us
25
+ * - Event Cleanup for modals
26
+ * - verification of origin, verificationIframeUid, and message data structure
27
+ */
28
+ addWindowMessageListener(actionCb: (action: PostMessageAction) => void): void;
21
29
  addVerificationSizeUpdatesListener(): void;
22
30
  setViewModel(viewModel: Partial<ViewModel> | ViewModel): void;
23
31
  setOptions(options: Options): void;
@@ -25,3 +33,9 @@ declare class Iframe {
25
33
  init(): void;
26
34
  }
27
35
  export default Iframe;
36
+ /**
37
+ * All post messages from inside our iframes and modals should use this function
38
+ * to post messages to the parent window. It strongly types the data and makes
39
+ * sure we're only listening to events that have the iframeUid
40
+ */
41
+ export declare function postMessageFromIframe(action: PostMessageAction): void;
@@ -106,7 +106,10 @@ export declare enum SubSegmentEnum {
106
106
  SNAP_BENEFITS = "snapBenefits",
107
107
  OTHER_GOVERNMENT_ASSISTANCE = "otherGovernmentAssistance",
108
108
  CHILD_CARE_WORKER = "childCareWorker",
109
- LIBRARIAN = "librarian"
109
+ LIBRARIAN = "librarian",
110
+ INTERIOR_DESIGNER = "interiorDesigner",
111
+ ARCHITECT = "architect",
112
+ GENERAL_CONTRACTOR = "generalContractor"
110
113
  }
111
114
  export declare const SubSegments: any;
112
115
  export declare const MilitaryStatusDefaultMessagesEnum: {
@@ -223,6 +223,17 @@ export declare type PostMessagesOptions = {
223
223
  origin: VerificationUrl;
224
224
  interval: number;
225
225
  };
226
+ export declare type PostMessageAction = {
227
+ type: "updateHeight";
228
+ height: number;
229
+ } | {
230
+ type: "focus";
231
+ focusOn: "firstElement" | "lastElement";
232
+ };
233
+ export declare type PostMessageData = {
234
+ verificationIframeUid: string;
235
+ action: PostMessageAction;
236
+ };
226
237
  /**
227
238
  * @description URLs related to conversion endpoints.
228
239
  */
@@ -282,7 +293,7 @@ export declare const FIRST_RESPONDER_STATUS: readonly ["FIREFIGHTER", "EMT", "PO
282
293
  export declare type FirstResponderStatus = typeof FIRST_RESPONDER_STATUS[number];
283
294
  export declare const MEDICAL_PROFESSIONAL_STATUS: readonly ["NURSE", "DOCTOR", "DENTIST", "PHARMACIST", "OTHER_HEALTH_WORKER"];
284
295
  export declare type MedicalProfessionalStatus = typeof MEDICAL_PROFESSIONAL_STATUS[number];
285
- export declare const LICENSED_PROFESSIONAL_STATUS: readonly ["LICENSED_COSMETOLOGIST", "LICENSED_REAL_ESTATE_AGENT", "VETERINARIAN", "CHILD_CARE_WORKER", "LIBRARIAN"];
296
+ export declare const LICENSED_PROFESSIONAL_STATUS: readonly ["LICENSED_COSMETOLOGIST", "LICENSED_REAL_ESTATE_AGENT", "VETERINARIAN", "CHILD_CARE_WORKER", "LIBRARIAN", "INTERIOR_DESIGNER", "ARCHITECT", "GENERAL_CONTRACTOR"];
286
297
  export declare type LicensedProfessionalStatus = typeof LICENSED_PROFESSIONAL_STATUS[number];
287
298
  export declare const RECENT_MOVER_STATUS: readonly ["HOME_BUYER", "OTHER_MOVER"];
288
299
  export declare type RecentMoverStatus = typeof RECENT_MOVER_STATUS[number];
@@ -1479,6 +1490,9 @@ export declare type DefaultMessages = {
1479
1490
  VETERINARIAN: string;
1480
1491
  CHILD_CARE_WORKER: string;
1481
1492
  LIBRARIAN: string;
1493
+ INTERIOR_DESIGNER: string;
1494
+ ARCHITECT: string;
1495
+ GENERAL_CONTRACTOR: string;
1482
1496
  tryAgain: string;
1483
1497
  footerText: string;
1484
1498
  infoShared1: string;
Binary file