ui.shipaid.com 0.3.47 → 0.3.49
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.
- package/README.md +200 -200
- package/dist/nl-CI8lUOMC.js +41 -0
- package/dist/widget.es.js +9 -5
- package/dist/widget.iife.js +46 -43
- package/dist/widget.umd.js +45 -42
- package/dist-types/common/shopify/index.d.ts +6 -6
- package/dist-types/common/shopify/protection.d.ts +7 -7
- package/dist-types/common/shopify/types/ShopifyCart.d.ts +29 -29
- package/dist-types/common/shopify/types/ShopifyProduct.d.ts +7 -7
- package/dist-types/common/types/ShipAid.d.ts +81 -81
- package/dist-types/widget/src/assets/confirmation-styles.d.ts +2 -2
- package/dist-types/widget/src/assets/icons.d.ts +8 -8
- package/dist-types/widget/src/assets/learn-more-styles.d.ts +2 -2
- package/dist-types/widget/src/assets/styles.d.ts +2 -2
- package/dist-types/widget/src/components/confirmation-popup.d.ts +9 -9
- package/dist-types/widget/src/components/learn-more-popup.d.ts +8 -8
- package/dist-types/widget/src/shipaid-widget.d.ts +137 -137
- package/dist-types/widget/src/utils/fetch_interceptor.d.ts +3 -3
- package/dist-types/widget/src/utils/fetch_interceptor.test.d.ts +1 -1
- package/dist-types/widget/types/shipaid.d.ts +10 -10
- package/dist-types/widget/types/shopify.d.ts +29 -29
- package/dist-types/widget/types/widget.d.ts +13 -13
- package/package.json +48 -48
|
@@ -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.
|
|
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
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"eslint": "^
|
|
35
|
-
"eslint-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ui.shipaid.com",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.3.49",
|
|
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
|
}
|