@rocketspark/domain-checker 0.0.34 → 1.0.2

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/.gitconfig +8 -0
  2. package/README.md +8 -3
  3. package/build/141.index.js +1 -1
  4. package/build/147.index.js +1 -1
  5. package/build/167.index.js +1 -1
  6. package/build/17.index.js +1 -1
  7. package/build/194.index.js +1 -1
  8. package/build/208.index.js +1 -1
  9. package/build/237.index.js +1 -1
  10. package/build/245.index.js +1 -1
  11. package/build/278.index.js +1 -1
  12. package/build/386.index.js +1 -1
  13. package/build/404.index.js +1 -1
  14. package/build/420.index.js +1 -1
  15. package/build/514.index.js +1 -1
  16. package/build/524.index.js +1 -1
  17. package/build/540.index.js +1 -1
  18. package/build/542.index.js +1 -1
  19. package/build/551.index.js +1 -1
  20. package/build/567.index.js +1 -1
  21. package/build/571.index.js +1 -1
  22. package/build/572.index.js +1 -1
  23. package/build/584.index.js +1 -1
  24. package/build/588.index.js +1 -1
  25. package/build/598.index.js +1 -1
  26. package/build/60.index.js +1 -1
  27. package/build/616.index.js +1 -1
  28. package/build/631.index.js +1 -1
  29. package/build/643.index.js +1 -1
  30. package/build/654.index.js +1 -1
  31. package/build/66.index.js +1 -1
  32. package/build/697.index.js +1 -1
  33. package/build/714.index.js +1 -1
  34. package/build/795.index.js +1 -1
  35. package/build/8.index.js +1 -1
  36. package/build/808.index.js +1 -1
  37. package/build/810.index.js +1 -1
  38. package/build/833.index.js +1 -1
  39. package/build/835.index.js +1 -1
  40. package/build/847.index.js +1 -1
  41. package/build/853.index.js +1 -1
  42. package/build/861.index.js +1 -1
  43. package/build/871.index.js +1 -1
  44. package/build/890.index.js +1 -1
  45. package/build/899.index.js +1 -1
  46. package/build/938.index.js +1 -1
  47. package/build/964.index.js +1 -1
  48. package/build/970.index.js +1 -1
  49. package/build/993.index.js +1 -1
  50. package/build/css/index.css +2 -2
  51. package/build/css/index.css.map +1 -1
  52. package/build/index.js +10 -3
  53. package/build/index.js.map +1 -1
  54. package/build/types/Components/Cart.d.ts +1 -0
  55. package/build/types/Helpers/Fetch.d.ts +7 -0
  56. package/build/types/Helpers/sanitize.d.ts +1 -0
  57. package/build/types/Helpers/templates.d.ts +3 -2
  58. package/build/types/Interfaces/class-names.d.ts +6 -0
  59. package/mprocs.yaml +1 -1
  60. package/package.json +4 -2
  61. package/webpack.config.demo.js +2 -2
@@ -21,4 +21,5 @@ export default class Cart {
21
21
  private updateCartDisplayState;
22
22
  private build;
23
23
  private getTemplate;
24
+ private getSelectedDomainPeriod;
24
25
  }
@@ -2,6 +2,12 @@ export interface DomainSuggestions {
2
2
  prefix: string;
3
3
  suffixes: string[];
4
4
  }
5
+ export interface Price {
6
+ period: number;
7
+ price: string;
8
+ originalPrice: string;
9
+ }
10
+ export type Pricing = Price[];
5
11
  export interface DomainResponse {
6
12
  currency: string;
7
13
  taxLabel: string;
@@ -10,6 +16,7 @@ export interface DomainResponse {
10
16
  formattedYearlyPrice: string | null;
11
17
  success: boolean;
12
18
  error: string;
19
+ pricing: Pricing;
13
20
  domainSuggestions: DomainSuggestions;
14
21
  }
15
22
  export declare const FetchDomain: (domainName: string, locale: string, limit?: number) => Promise<DomainResponse>;
@@ -0,0 +1 @@
1
+ export declare function sanitiseHtml(html: string): string;
@@ -1,6 +1,7 @@
1
1
  import { Options } from '../Interfaces/options';
2
2
  import { ClassNames } from '../Interfaces/class-names';
3
3
  import { Locale } from '../Interfaces/locale';
4
+ import { Pricing } from './Fetch';
4
5
  declare const templates: {
5
6
  container({ classNames: { containerOuter } }: Options): HTMLDivElement;
6
7
  inputContainer({ classNames: { inputContainer } }: Options): HTMLDivElement;
@@ -10,11 +11,11 @@ declare const templates: {
10
11
  popupContainer({ classNames: { popupContainer } }: Options): HTMLDivElement;
11
12
  domainContainer({ classNames: { domainContainer } }: Options): HTMLDivElement;
12
13
  cartContainer({ classNames: { cartContainer } }: Options): HTMLDivElement;
13
- cart({ classNames: { cart, cartHeading } }: Options): HTMLElement;
14
+ cart({ classNames: { cart, cartHeading, cartHeaderContainer, cartRowsContainer, cartRowsContainerCollapsed, cartHeaderCollapseButton } }: Options): HTMLElement;
14
15
  cartContinueButton({ classNames: { cartButton } }: Options): HTMLRsButtonElement;
15
16
  cartCaption({ classNames: { cartCaption } }: Options): HTMLParagraphElement;
16
17
  cartPriceSummary({ classNames: { cartPriceSummary } }: Options, locale: Locale): HTMLParagraphElement;
17
- cartRow({ classNames: { cartRow, cartRowDomainDetailsURL, cartRowDomainDetails, cartRowDomainDetailsPrice, cartRowRemove, cartRowDomainDetailsContainer, } }: Options, domain: string, price: string): HTMLDivElement;
18
+ cartRow({ classNames: { cartRow, cartRowDomainDetailsURL, cartRowDomainDetails, cartRowDomainDetailsPrice, cartRowDomainDetailsPriceDiscount, cartRowDomainDetailsPriceDropdownContainer, cartRowDomainDetailsPriceDropdown, cartRowRemove, cartRowDomainDetailsContainer, } }: Options, domain: string, pricing: Pricing, formattedPrice: string): HTMLDivElement;
18
19
  checkbox({ classNames: { checkboxContainer, checkboxLabel, checkboxInput } }: Options, id: string, label: string): HTMLDivElement;
19
20
  cartRows({ classNames: { cartRowsContainer } }: Options): HTMLDivElement;
20
21
  searchHeading({ classNames: { searchHeading } }: Options): HTMLDivElement;
@@ -32,15 +32,21 @@ export interface ClassNames {
32
32
  cartContainer: string;
33
33
  cart: string;
34
34
  cartHeading: string;
35
+ cartHeaderContainer: string;
36
+ cartHeaderCollapseButton: string;
35
37
  cartCaption: string;
36
38
  cartButton: string;
37
39
  cartRow: string;
38
40
  cartRowsContainer: string;
41
+ cartRowsContainerCollapsed: string;
39
42
  cartRowRemove: string;
40
43
  cartRowDomainDetails: string;
41
44
  cartRowDomainDetailsURL: string;
42
45
  cartRowDomainDetailsContainer: string;
43
46
  cartRowDomainDetailsPrice: string;
47
+ cartRowDomainDetailsPriceDiscount: string;
48
+ cartRowDomainDetailsPriceDropdownContainer: string;
49
+ cartRowDomainDetailsPriceDropdown: string;
44
50
  cartPriceSummary: string;
45
51
  searchAlternativeContainer: string;
46
52
  searchAlternativeContainerTitle: string;
package/mprocs.yaml CHANGED
@@ -10,5 +10,5 @@ procs:
10
10
  shell: "npm run build:watch"
11
11
  cwd: "<CONFIG_DIR>"
12
12
  cms server:
13
- shell: "npx http-server -p 9001"
13
+ shell: "npx http-server -p 8501"
14
14
  cwd: "<CONFIG_DIR>/build"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocketspark/domain-checker",
3
- "version": "0.0.34",
3
+ "version": "1.0.2",
4
4
  "description": "Embeddable Domain Checker for Rocketspark",
5
5
  "main": "build/index.js",
6
6
  "types": "build/types/index.d.ts",
@@ -55,6 +55,7 @@
55
55
  "eslint": "^7.32.0",
56
56
  "file-loader": "^6.2.0",
57
57
  "html-webpack-plugin": "^5.5.0",
58
+ "http-server": "^14.1.1",
58
59
  "jest": "^28.1.0",
59
60
  "jest-environment-jsdom": "^28.1.0",
60
61
  "mini-css-extract-plugin": "^2.6.0",
@@ -68,7 +69,8 @@
68
69
  "webpack": "^5.72.1",
69
70
  "webpack-cli": "^4.9.2",
70
71
  "webpack-dev-server": "4.9.0",
71
- "http-server": "^14.1.1"
72
+ "@types/sanitize-html": "^2.16.0",
73
+ "sanitize-html": "^2.17.0"
72
74
  },
73
75
  "jest": {
74
76
  "moduleNameMapper": {
@@ -12,10 +12,10 @@ module.exports = {
12
12
  minimize: false,
13
13
  },
14
14
  devServer: {
15
- open: ['http://localhost:9000'],
15
+ open: ['http://localhost:8500'],
16
16
  hot: true,
17
17
  host: '0.0.0.0',
18
- port: 9000,
18
+ port: 8500,
19
19
  },
20
20
  module: {
21
21
  rules: [