@anker-in/shopify-react 0.1.1-beta.2 → 0.1.1-beta.20
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/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/index.d.ts +2 -2
- package/dist/hooks/index.d.mts +1879 -9
- package/dist/hooks/index.d.ts +1879 -9
- package/dist/hooks/index.js +358 -140
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +354 -138
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +380 -166
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +371 -141
- package/dist/index.mjs.map +1 -1
- package/dist/provider/index.d.mts +9 -9
- package/dist/provider/index.d.ts +9 -9
- package/dist/provider/index.js +215 -73
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +214 -72
- package/dist/provider/index.mjs.map +1 -1
- package/dist/{types-CICUnw0v.d.mts → types-C1So3siD.d.mts} +6 -18
- package/dist/{types-CICUnw0v.d.ts → types-C1So3siD.d.ts} +6 -18
- package/dist/{types-BLMoxbOk.d.mts → types-Dt0DUG00.d.mts} +1 -9
- package/dist/{types-BLMoxbOk.d.ts → types-Dt0DUG00.d.ts} +1 -9
- package/package.json +3 -3
- package/dist/index-BZ6WbAdZ.d.ts +0 -1889
- package/dist/index-Bea95u2X.d.mts +0 -1889
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as swr_mutation from 'swr/mutation';
|
|
2
2
|
import { SWRMutationConfiguration } from 'swr/mutation';
|
|
3
|
-
import { NormalizedProductVariant, NormalizedProduct, MoneyV2, NormalizedCart } from '@anker-in/shopify-sdk';
|
|
3
|
+
import { NormalizedProductVariant, NormalizedProduct, MoneyV2, NormalizedCart, MailingAddress } from '@anker-in/shopify-sdk';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Tracking Types
|
|
@@ -528,32 +528,20 @@ type SelectedPlusMemberProduct = {
|
|
|
528
528
|
product: NormalizedProduct;
|
|
529
529
|
variant: NormalizedProductVariant;
|
|
530
530
|
} | null;
|
|
531
|
-
type DeliveryOption = string;
|
|
532
531
|
type DeliveryCustomData = {
|
|
533
532
|
discount_code?: string[];
|
|
534
533
|
allow_nextday_delivery?: boolean;
|
|
535
534
|
allow_thirdday_delivery?: boolean;
|
|
536
|
-
selected_delivery_option?:
|
|
535
|
+
selected_delivery_option?: {
|
|
536
|
+
code?: string;
|
|
537
|
+
mode?: string;
|
|
538
|
+
};
|
|
537
539
|
is_presale?: boolean;
|
|
538
540
|
plus_type?: DeliveryPlusType;
|
|
539
541
|
};
|
|
540
|
-
type MailingAddress = {
|
|
541
|
-
address1?: string | null;
|
|
542
|
-
address2?: string | null;
|
|
543
|
-
city?: string | null;
|
|
544
|
-
company?: string | null;
|
|
545
|
-
country?: string | null;
|
|
546
|
-
countryCode?: string | null;
|
|
547
|
-
firstName?: string | null;
|
|
548
|
-
lastName?: string | null;
|
|
549
|
-
phone?: string | null;
|
|
550
|
-
province?: string | null;
|
|
551
|
-
provinceCode?: string | null;
|
|
552
|
-
zip?: string | null;
|
|
553
|
-
};
|
|
554
542
|
type DeliveryData = {
|
|
555
543
|
deliveryAddress: MailingAddress;
|
|
556
544
|
deliveryCustomData: DeliveryCustomData;
|
|
557
545
|
};
|
|
558
546
|
|
|
559
|
-
export { type AddToCartLineItem as A, type BuyNowTrackConfig as B, DeliveryPlusType as D, type GtmParams as G,
|
|
547
|
+
export { type AddToCartLineItem as A, type BuyNowTrackConfig as B, DeliveryPlusType as D, type GtmParams as G, PLUS_MEMBER_TYPE as P, ShippingMethodMode as S, type UseAddToCartOptions as U, type AddToCartInput as a, PlusMemberMode as b, type PlusMemberShippingMethodMetafields as c, type PlusMemberShippingMethodConfig as d, type PlusMemberSettingsMetafields as e, type SelectedPlusMemberProduct as f, type DeliveryCustomData as g, type DeliveryData as h, gaTrack as i, trackBeginCheckoutGA as j, trackBuyNowGA as k, trackAddToCartFBQ as l, trackBuyNowFBQ as m, trackAddToCartGA as t, useAddToCart as u };
|
|
@@ -29,14 +29,6 @@ interface RouterAdapter {
|
|
|
29
29
|
replace(url: string): void | Promise<void>;
|
|
30
30
|
getLocalizedPath?(path: string, locale?: string): string;
|
|
31
31
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Cart cookie adapter interface
|
|
34
|
-
*/
|
|
35
|
-
interface CartCookieAdapter {
|
|
36
|
-
getCartId(locale: string): string | undefined;
|
|
37
|
-
setCartId(locale: string, cartId: string): void;
|
|
38
|
-
removeCartId(locale: string): void;
|
|
39
|
-
}
|
|
40
32
|
/**
|
|
41
33
|
* User context adapter interface
|
|
42
34
|
*/
|
|
@@ -51,4 +43,4 @@ interface UserContextAdapter {
|
|
|
51
43
|
isLoggedIn: boolean;
|
|
52
44
|
}
|
|
53
45
|
|
|
54
|
-
export type { CookieAdapter as C, RouterAdapter as R, UserContextAdapter as U, CookieOptions as a
|
|
46
|
+
export type { CookieAdapter as C, RouterAdapter as R, UserContextAdapter as U, CookieOptions as a };
|
|
@@ -29,14 +29,6 @@ interface RouterAdapter {
|
|
|
29
29
|
replace(url: string): void | Promise<void>;
|
|
30
30
|
getLocalizedPath?(path: string, locale?: string): string;
|
|
31
31
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Cart cookie adapter interface
|
|
34
|
-
*/
|
|
35
|
-
interface CartCookieAdapter {
|
|
36
|
-
getCartId(locale: string): string | undefined;
|
|
37
|
-
setCartId(locale: string, cartId: string): void;
|
|
38
|
-
removeCartId(locale: string): void;
|
|
39
|
-
}
|
|
40
32
|
/**
|
|
41
33
|
* User context adapter interface
|
|
42
34
|
*/
|
|
@@ -51,4 +43,4 @@ interface UserContextAdapter {
|
|
|
51
43
|
isLoggedIn: boolean;
|
|
52
44
|
}
|
|
53
45
|
|
|
54
|
-
export type { CookieAdapter as C, RouterAdapter as R, UserContextAdapter as U, CookieOptions as a
|
|
46
|
+
export type { CookieAdapter as C, RouterAdapter as R, UserContextAdapter as U, CookieOptions as a };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anker-in/shopify-react",
|
|
3
|
-
"version": "0.1.1-beta.
|
|
3
|
+
"version": "0.1.1-beta.20",
|
|
4
4
|
"description": "React hooks and components for Shopify SDK",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"decimal.js": "^10.6.0",
|
|
32
32
|
"js-cookie": "^3.0.5",
|
|
33
33
|
"swr": "^2.2.0",
|
|
34
|
-
"@anker-in/shopify-core": "0.1.1-beta.
|
|
35
|
-
"@anker-in/shopify-sdk": "0.1.1-beta.
|
|
34
|
+
"@anker-in/shopify-core": "0.1.1-beta.4",
|
|
35
|
+
"@anker-in/shopify-sdk": "0.1.1-beta.8"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": ">=18.0.0",
|