@rocketspark/domain-checker 0.0.30 → 0.0.32

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 (61) hide show
  1. package/.npmrc.example +1 -1
  2. package/build/141.index.js +1 -1
  3. package/build/147.index.js +1 -1
  4. package/build/167.index.js +1 -1
  5. package/build/17.index.js +1 -1
  6. package/build/194.index.js +1 -1
  7. package/build/208.index.js +1 -1
  8. package/build/237.index.js +1 -1
  9. package/build/245.index.js +1 -1
  10. package/build/278.index.js +1 -1
  11. package/build/386.index.js +1 -1
  12. package/build/404.index.js +1 -1
  13. package/build/420.index.js +1 -1
  14. package/build/514.index.js +1 -1
  15. package/build/524.index.js +1 -1
  16. package/build/540.index.js +1 -1
  17. package/build/542.index.js +1 -1
  18. package/build/551.index.js +1 -1
  19. package/build/567.index.js +1 -1
  20. package/build/571.index.js +1 -1
  21. package/build/572.index.js +1 -1
  22. package/build/584.index.js +1 -1
  23. package/build/588.index.js +1 -1
  24. package/build/598.index.js +1 -1
  25. package/build/60.index.js +1 -1
  26. package/build/616.index.js +1 -1
  27. package/build/631.index.js +1 -1
  28. package/build/643.index.js +1 -1
  29. package/build/654.index.js +1 -1
  30. package/build/66.index.js +1 -1
  31. package/build/697.index.js +1 -1
  32. package/build/714.index.js +1 -1
  33. package/build/795.index.js +1 -1
  34. package/build/8.index.js +1 -1
  35. package/build/808.index.js +1 -1
  36. package/build/810.index.js +1 -1
  37. package/build/833.index.js +1 -1
  38. package/build/835.index.js +1 -1
  39. package/build/847.index.js +1 -1
  40. package/build/853.index.js +1 -1
  41. package/build/861.index.js +1 -1
  42. package/build/871.index.js +1 -1
  43. package/build/890.index.js +1 -1
  44. package/build/899.index.js +1 -1
  45. package/build/938.index.js +1 -1
  46. package/build/964.index.js +1 -1
  47. package/build/970.index.js +1 -1
  48. package/build/993.index.js +1 -1
  49. package/build/css/index.css +2 -2
  50. package/build/css/index.css.map +1 -1
  51. package/build/index.js +3 -3
  52. package/build/index.js.map +1 -1
  53. package/build/types/Components/Cart.d.ts +4 -1
  54. package/build/types/Components/DomainSearch.d.ts +1 -1
  55. package/build/types/Helpers/analytics.d.ts +8 -0
  56. package/build/types/Helpers/templates.d.ts +2 -0
  57. package/build/types/Interfaces/class-names.d.ts +4 -0
  58. package/build/types/index.d.ts +2 -0
  59. package/package.json +1 -1
  60. package/build/types/Helpers/gtag.d.ts +0 -7
  61. package/build/types/Interfaces/gtag.d.ts +0 -118
@@ -4,7 +4,10 @@ import { Locale } from '../Interfaces/locale';
4
4
  export default class Cart {
5
5
  readonly containerElement: HTMLElement;
6
6
  private readonly cartElement;
7
+ private emailCheckbox;
8
+ private websiteCheckbox;
7
9
  private cartButton;
10
+ private cartRows;
8
11
  private emptyCartMessage;
9
12
  private priceSummary;
10
13
  private cart;
@@ -15,7 +18,7 @@ export default class Cart {
15
18
  addDomain(domain: string, domainDetails: DomainResponse): void;
16
19
  removeDomain(domain: string): void;
17
20
  private resetGetItNowButton;
18
- private updateContinueButtonVisibility;
21
+ private updateCartDisplayState;
19
22
  private build;
20
23
  private getTemplate;
21
24
  }
@@ -17,5 +17,5 @@ export default class DomainSearch {
17
17
  setLoading(loading: boolean): void;
18
18
  private addEventListeners;
19
19
  private getTemplate;
20
- private submit;
20
+ submit(): void;
21
21
  }
@@ -0,0 +1,8 @@
1
+ declare global {
2
+ interface Window {
3
+ dataLayer: any;
4
+ }
5
+ }
6
+ export declare function logEvent(name: string, params: {
7
+ [key: string]: string | string[];
8
+ }): void;
@@ -15,6 +15,8 @@ declare const templates: {
15
15
  cartCaption({ classNames: { cartCaption } }: Options): HTMLParagraphElement;
16
16
  cartPriceSummary({ classNames: { cartPriceSummary } }: Options, locale: Locale): HTMLParagraphElement;
17
17
  cartRow({ classNames: { cartRow, cartRowDomainDetailsURL, cartRowDomainDetails, cartRowDomainDetailsPrice, cartRowRemove, cartRowDomainDetailsContainer, } }: Options, domain: string, price: string): HTMLDivElement;
18
+ checkbox({ classNames: { checkboxContainer, checkboxLabel, checkboxInput } }: Options, id: string, label: string): HTMLDivElement;
19
+ cartRows({ classNames: { cartRowsContainer } }: Options): HTMLDivElement;
18
20
  searchHeading({ classNames: { searchHeading } }: Options): HTMLDivElement;
19
21
  icon(classNames: Partial<ClassNames>, className: string): HTMLRsIconElement;
20
22
  searchResultText({ classNames: { searchResultCaption } }: Options): HTMLDivElement;
@@ -35,6 +35,7 @@ export interface ClassNames {
35
35
  cartCaption: string;
36
36
  cartButton: string;
37
37
  cartRow: string;
38
+ cartRowsContainer: string;
38
39
  cartRowRemove: string;
39
40
  cartRowDomainDetails: string;
40
41
  cartRowDomainDetailsURL: string;
@@ -59,4 +60,7 @@ export interface ClassNames {
59
60
  searchAlternativePricing: string;
60
61
  searchAlternativePricingBlurb: string;
61
62
  searchAlternativePricingDiscount: string;
63
+ checkboxContainer: string;
64
+ checkboxLabel: string;
65
+ checkboxInput: string;
62
66
  }
@@ -16,6 +16,8 @@ declare class DomainChecker {
16
16
  private popupContainer;
17
17
  constructor(element: HTMLElement, options?: Partial<Options>);
18
18
  static setPopupStatus(popupContainer: PopupContainer, { success, isAvailable, formattedPrice, error }: Partial<DomainResponse>): void;
19
+ private autofillSearchBar;
20
+ private getDomainFromUrl;
19
21
  private init;
20
22
  private getTemplate;
21
23
  private startListening;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocketspark/domain-checker",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "description": "Embeddable Domain Checker for Rocketspark",
5
5
  "main": "build/index.js",
6
6
  "types": "build/types/index.d.ts",
@@ -1,7 +0,0 @@
1
- import { Gtag } from "../Interfaces/gtag";
2
- declare global {
3
- interface Window {
4
- dataLayer: any;
5
- }
6
- }
7
- export declare const gtag: Gtag.Gtag;
@@ -1,118 +0,0 @@
1
- export declare namespace Gtag {
2
- export interface GtagCommands {
3
- config: [targetId: string, config?: ControlParams | EventParams | ConfigParams | CustomParams];
4
- set: [targetId: string, config: CustomParams | boolean | string] | [config: CustomParams];
5
- js: [config: Date];
6
- event: [eventName: EventNames | (string & {}), eventParams?: ControlParams | EventParams | CustomParams];
7
- get: [
8
- targetId: string,
9
- fieldName: FieldNames | string,
10
- callback?: (field: string | CustomParams | undefined) => any
11
- ];
12
- consent: [consentArg: ConsentArg | (string & {}), consentParams: ConsentParams];
13
- }
14
- export interface Gtag {
15
- <Command extends keyof GtagCommands>(command: Command, ...args: GtagCommands[Command]): void;
16
- }
17
- interface ConfigParams {
18
- page_title?: string | undefined;
19
- page_location?: string | undefined;
20
- page_path?: string | undefined;
21
- send_page_view?: boolean | undefined;
22
- }
23
- export interface CustomParams {
24
- [key: string]: any;
25
- }
26
- export interface ControlParams {
27
- groups?: string | string[] | undefined;
28
- send_to?: string | string[] | undefined;
29
- event_callback?: (() => void) | undefined;
30
- event_timeout?: number | undefined;
31
- }
32
- export type EventNames = "add_payment_info" | "add_shipping_info" | "add_to_cart" | "add_to_wishlist" | "begin_checkout" | "checkout_progress" | "earn_virtual_currency" | "exception" | "generate_lead" | "join_group" | "level_end" | "level_start" | "level_up" | "login" | "page_view" | "post_score" | "purchase" | "refund" | "remove_from_cart" | "screen_view" | "search" | "select_content" | "select_item" | "select_promotion" | "set_checkout_option" | "share" | "sign_up" | "spend_virtual_currency" | "tutorial_begin" | "tutorial_complete" | "unlock_achievement" | "timing_complete" | "view_cart" | "view_item" | "view_item_list" | "view_promotion" | "view_search_results";
33
- interface EventParams {
34
- checkout_option?: string | undefined;
35
- checkout_step?: number | undefined;
36
- content_id?: string | undefined;
37
- content_type?: string | undefined;
38
- coupon?: string | undefined;
39
- currency?: string | undefined;
40
- description?: string | undefined;
41
- fatal?: boolean | undefined;
42
- items?: Item[] | undefined;
43
- method?: string | undefined;
44
- number?: string | undefined;
45
- promotions?: Promotion[] | undefined;
46
- screen_name?: string | undefined;
47
- search_term?: string | undefined;
48
- shipping?: Currency | undefined;
49
- tax?: Currency | undefined;
50
- transaction_id?: string | undefined;
51
- value?: number | undefined;
52
- event_label?: string | undefined;
53
- event_category?: string | undefined;
54
- /** @see {@link https://developers.google.com/analytics/devguides/collection/gtagjs/sending-data#specify_different_transport_mechanisms specify_different_transport_mechanisms} */
55
- transport_type?: "image" | "xhr" | "beacon" | undefined;
56
- }
57
- type Currency = string | number;
58
- /**
59
- * Interface of an item object used in lists for this event.
60
- *
61
- * Reference:
62
- * @see {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/events#view_item_item view_item_item}
63
- * @see {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/events#view_item_list_item view_item_list_item}
64
- * @see {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/events#select_item_item select_item_item}
65
- * @see {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/events#add_to_cart_item add_to_cart_item}
66
- * @see {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/events#view_cart_item view_cart_item}
67
- */
68
- interface Item {
69
- item_id?: string | undefined;
70
- item_name?: string | undefined;
71
- affiliation?: string | undefined;
72
- coupon?: string | undefined;
73
- currency?: string | undefined;
74
- creative_name?: string | undefined;
75
- creative_slot?: string | undefined;
76
- discount?: Currency | undefined;
77
- index?: number | undefined;
78
- item_brand?: string | undefined;
79
- item_category?: string | undefined;
80
- item_category2?: string | undefined;
81
- item_category3?: string | undefined;
82
- item_category4?: string | undefined;
83
- item_category5?: string | undefined;
84
- item_list_id?: string | undefined;
85
- item_list_name?: string | undefined;
86
- item_variant?: string | undefined;
87
- location_id?: string | undefined;
88
- price?: Currency | undefined;
89
- promotion_id?: string | undefined;
90
- promotion_name?: string | undefined;
91
- quantity?: number | undefined;
92
- }
93
- interface Promotion {
94
- creative_name?: string | undefined;
95
- creative_slot?: string | undefined;
96
- promotion_id?: string | undefined;
97
- promotion_name?: string | undefined;
98
- }
99
- type FieldNames = "client_id" | "session_id" | "gclid";
100
- type ConsentArg = "default" | "update";
101
- /**
102
- * Reference:
103
- * @see {@link https://support.google.com/tagmanager/answer/10718549#consent-types consent-types}
104
- * @see {@link https://developers.google.com/tag-platform/devguides/consent consent}
105
- */
106
- interface ConsentParams {
107
- ad_personalization?: "granted" | "denied" | undefined;
108
- ad_user_data?: "granted" | "denied" | undefined;
109
- ad_storage?: "granted" | "denied" | undefined;
110
- analytics_storage?: "granted" | "denied" | undefined;
111
- functionality_storage?: "granted" | "denied" | undefined;
112
- personalization_storage?: "granted" | "denied" | undefined;
113
- security_storage?: "granted" | "denied" | undefined;
114
- wait_for_update?: number | undefined;
115
- region?: string[] | undefined;
116
- }
117
- export {};
118
- }