ui.shipaid.com 0.3.102 → 0.3.103

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 (28) hide show
  1. package/README.md +202 -202
  2. package/dist/widget.es.js +13 -3
  3. package/dist/widget.iife.js +1 -1
  4. package/dist/widget.umd.js +1 -1
  5. package/dist-types/common/shopify/index.d.ts +6 -6
  6. package/dist-types/common/shopify/protection.d.ts +7 -7
  7. package/dist-types/common/shopify/types/ShopifyCart.d.ts +29 -29
  8. package/dist-types/common/shopify/types/ShopifyProduct.d.ts +12 -12
  9. package/dist-types/common/types/ShipAid.d.ts +82 -82
  10. package/dist-types/widget/src/assets/confirmation-styles.d.ts +2 -2
  11. package/dist-types/widget/src/assets/icons.d.ts +9 -9
  12. package/dist-types/widget/src/assets/learn-more-styles.d.ts +2 -2
  13. package/dist-types/widget/src/assets/styles.d.ts +2 -2
  14. package/dist-types/widget/src/components/checkout-package-protection.d.ts +13 -13
  15. package/dist-types/widget/src/components/confirmation-popup.d.ts +9 -9
  16. package/dist-types/widget/src/components/learn-more-popup.d.ts +8 -8
  17. package/dist-types/widget/src/components/product-add-confirmation.d.ts +13 -0
  18. package/dist-types/widget/src/components/shipaid-cart-confirmation.d.ts +15 -15
  19. package/dist-types/widget/src/shipaid-widget.d.ts +150 -150
  20. package/dist-types/widget/src/utils/fetch_interceptor.d.ts +3 -3
  21. package/dist-types/widget/src/utils/fetch_interceptor.test.d.ts +1 -1
  22. package/dist-types/widget/types/shipaid.d.ts +10 -10
  23. package/dist-types/widget/types/shopify.d.ts +29 -29
  24. package/dist-types/widget/types/widget.d.ts +13 -13
  25. package/package.json +48 -48
  26. package/dist-types/widget/src/components/checkout-button.d.ts +0 -7
  27. package/dist-types/widget/src/components/checkoutButton.d.ts +0 -13
  28. package/dist-types/widget/src/components/content-loader.d.ts +0 -6
@@ -1,29 +1,29 @@
1
- import { ShopifyProduct } from '../../common/shopify/types/ShopifyProduct';
2
- export * from '../../common/shopify/types/ShopifyCart';
3
- export * from '../../common/shopify/types/ShopifyProduct';
4
- declare global {
5
- interface Window {
6
- Shopify?: {
7
- shop?: string;
8
- locale?: string;
9
- designMode?: boolean;
10
- currency?: {
11
- active?: string;
12
- };
13
- Checkout?: Record<string, string> & {
14
- apiHost?: string;
15
- };
16
- };
17
- }
18
- }
19
- export interface ShopifyCartAddPayload {
20
- id: number | string;
21
- quantity?: number;
22
- selling_plan?: number | string | null;
23
- }
24
- export interface ShopifyCartUpdatePayload {
25
- updates: Record<string | number, number>;
26
- }
27
- export interface ShopifyProductResponse {
28
- product: ShopifyProduct;
29
- }
1
+ import { ShopifyProduct } from '../../common/shopify/types/ShopifyProduct';
2
+ export * from '../../common/shopify/types/ShopifyCart';
3
+ export * from '../../common/shopify/types/ShopifyProduct';
4
+ declare global {
5
+ interface Window {
6
+ Shopify?: {
7
+ shop?: string;
8
+ locale?: string;
9
+ designMode?: boolean;
10
+ currency?: {
11
+ active?: string;
12
+ };
13
+ Checkout?: Record<string, string> & {
14
+ apiHost?: string;
15
+ };
16
+ };
17
+ }
18
+ }
19
+ export interface ShopifyCartAddPayload {
20
+ id: number | string;
21
+ quantity?: number;
22
+ selling_plan?: number | string | null;
23
+ }
24
+ export interface ShopifyCartUpdatePayload {
25
+ updates: Record<string | number, number>;
26
+ }
27
+ export interface ShopifyProductResponse {
28
+ product: ShopifyProduct;
29
+ }
@@ -1,13 +1,13 @@
1
- export declare enum Events {
2
- LOADED = "shipaid-loaded",
3
- STATUS_UPDATE = "shipaid-protection-status"
4
- }
5
- export interface State {
6
- loading: boolean;
7
- success: boolean | null;
8
- error: boolean | string | null;
9
- }
10
- export interface FetchHelper {
11
- get: <Data>(url: string) => Promise<Data>;
12
- post: <Data>(url: string, body: unknown) => Promise<Data>;
13
- }
1
+ export declare enum Events {
2
+ LOADED = "shipaid-loaded",
3
+ STATUS_UPDATE = "shipaid-protection-status"
4
+ }
5
+ export interface State {
6
+ loading: boolean;
7
+ success: boolean | null;
8
+ error: boolean | string | null;
9
+ }
10
+ export interface FetchHelper {
11
+ get: <Data>(url: string) => Promise<Data>;
12
+ post: <Data>(url: string, body: unknown) => Promise<Data>;
13
+ }
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
- {
2
- "name": "ui.shipaid.com",
3
- "private": false,
4
- "version": "0.3.102",
5
- "type": "module",
6
- "main": "dist/widget.umd.js",
7
- "unpkg": "dist/widget.iife.js",
8
- "module": "dist/widget.es.js",
9
- "exports": {
10
- ".": "./dist/widget.es.js"
11
- },
12
- "types": "dist-types/src/shipaid-widget.d.ts",
13
- "files": [
14
- "dist-types",
15
- "dist"
16
- ],
17
- "scripts": {
18
- "develop": "vite",
19
- "build": "tsc && node build",
20
- "lint": "eslint . --ext=ts --fix",
21
- "test": "vitest"
22
- },
23
- "dependencies": {
24
- "@lit-labs/task": "^2.0.0",
25
- "lit": "^2.6.1",
26
- "lit-element-effect": "^1.0.2",
27
- "lit-translate": "^2.0.1",
28
- "@nhost/nhost-js": "^3.1.10"
29
- },
30
- "devDependencies": {
31
- "@typescript-eslint/eslint-plugin": "^5.49.0",
32
- "@typescript-eslint/parser": "^5.49.0",
33
- "@vitest/browser": "^2.1.4",
34
- "eslint": "^8.32.0",
35
- "eslint-config-standard": "^17.0.0",
36
- "eslint-plugin-html": "^7.1.0",
37
- "eslint-plugin-import": "^2.27.5",
38
- "eslint-plugin-lit": "^1.8.2",
39
- "eslint-plugin-lit-a11y": "^2.3.0",
40
- "eslint-plugin-n": "^15.6.1",
41
- "eslint-plugin-promise": "^6.1.1",
42
- "jsdom": "^25.0.1",
43
- "playwright": "^1.48.2",
44
- "terser": "^5.16.1",
45
- "typescript": "^4.9.4",
46
- "vite": "^5.4.10",
47
- "vitest": "^2.1.4"
48
- }
1
+ {
2
+ "name": "ui.shipaid.com",
3
+ "private": false,
4
+ "version": "0.3.103",
5
+ "type": "module",
6
+ "main": "dist/widget.umd.js",
7
+ "unpkg": "dist/widget.iife.js",
8
+ "module": "dist/widget.es.js",
9
+ "exports": {
10
+ ".": "./dist/widget.es.js"
11
+ },
12
+ "types": "dist-types/src/shipaid-widget.d.ts",
13
+ "files": [
14
+ "dist-types",
15
+ "dist"
16
+ ],
17
+ "dependencies": {
18
+ "@lit-labs/task": "^2.0.0",
19
+ "lit": "^2.6.1",
20
+ "lit-element-effect": "^1.0.2",
21
+ "lit-translate": "^2.0.1",
22
+ "@nhost/nhost-js": "^3.1.10"
23
+ },
24
+ "devDependencies": {
25
+ "@typescript-eslint/eslint-plugin": "^5.49.0",
26
+ "@typescript-eslint/parser": "^5.49.0",
27
+ "@vitest/browser": "^2.1.4",
28
+ "eslint": "^8.32.0",
29
+ "eslint-config-standard": "^17.0.0",
30
+ "eslint-plugin-html": "^7.1.0",
31
+ "eslint-plugin-import": "^2.27.5",
32
+ "eslint-plugin-lit": "^1.8.2",
33
+ "eslint-plugin-lit-a11y": "^2.3.0",
34
+ "eslint-plugin-n": "^15.6.1",
35
+ "eslint-plugin-promise": "^6.1.1",
36
+ "jsdom": "^25.0.1",
37
+ "playwright": "^1.48.2",
38
+ "terser": "^5.16.1",
39
+ "typescript": "^4.9.4",
40
+ "vite": "^5.4.10",
41
+ "vitest": "^2.1.4"
42
+ },
43
+ "scripts": {
44
+ "develop": "vite",
45
+ "build": "tsc && node build",
46
+ "lint": "eslint . --ext=ts --fix",
47
+ "test": "vitest"
48
+ }
49
49
  }
@@ -1,7 +0,0 @@
1
- import { LitElement } from 'lit';
2
- declare class ShipAidCheckoutButton extends LitElement {
3
- createRenderRoot(): this;
4
- buttonClasses: string;
5
- render(): import("lit").TemplateResult<1>;
6
- }
7
- export default ShipAidCheckoutButton;
@@ -1,13 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class CheckoutPackageProtection extends LitElement {
3
- /**
4
- * Precio de la protección
5
- */
6
- protectionPrice: number;
7
- /**
8
- * Total del checkout
9
- */
10
- checkoutTotal: number;
11
- static styles: import("lit").CSSResult;
12
- render(): import("lit").TemplateResult<1>;
13
- }
@@ -1,6 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class SuspenseLoader extends LitElement {
3
- loading: boolean;
4
- static styles: import("lit").CSSResult;
5
- render(): import("lit").TemplateResult<1>;
6
- }