@fayz-ai/plugin-shop 0.17.1 → 0.18.0
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/{ShopPage-4B2NPTRT.js → ShopPage-J34V43NW.js} +22 -11
- package/dist/ShopPage-J34V43NW.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +235 -81
- package/dist/index.js.map +1 -1
- package/dist/views/OrderDetailView.d.ts +4 -2
- package/dist/views/OrderDetailView.d.ts.map +1 -1
- package/dist/views/ProductContentTab.d.ts +17 -0
- package/dist/views/ProductContentTab.d.ts.map +1 -0
- package/dist/views/ProductImagesTab.d.ts +3 -1
- package/dist/views/ProductImagesTab.d.ts.map +1 -1
- package/dist/views/ShopPage.d.ts +7 -0
- package/dist/views/ShopPage.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/ShopPage-4B2NPTRT.js.map +0 -1
|
@@ -2,11 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import type { ShopProvider } from '@fayz-ai/shop';
|
|
3
3
|
/** Shared with the orders table: one order vocabulary, not two. */
|
|
4
4
|
export declare const ORDER_STATUS_LABEL: Record<string, string>;
|
|
5
|
-
export declare function OrderDetailView({ orderId, provider, onBack }: {
|
|
5
|
+
export declare function OrderDetailView({ orderId, provider, onBack, fallback }: {
|
|
6
6
|
orderId: string;
|
|
7
|
+
/** Rendered instead of "not found": the order exists, it is just not the shop's. */
|
|
8
|
+
fallback?: React.ReactNode;
|
|
7
9
|
provider: () => ShopProvider;
|
|
8
10
|
onBack: () => void;
|
|
9
|
-
}): React.JSX.Element;
|
|
11
|
+
}): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element;
|
|
10
12
|
export declare const orderDetailPath: (id: string) => string;
|
|
11
13
|
export declare const goToOrder: (id: string) => void;
|
|
12
14
|
//# sourceMappingURL=OrderDetailView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderDetailView.d.ts","sourceRoot":"","sources":["../../src/views/OrderDetailView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAwBvE,OAAO,KAAK,EAAwC,YAAY,EAAE,MAAM,eAAe,CAAA;AA0DvF,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKrD,CAAA;AAoGD,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"OrderDetailView.d.ts","sourceRoot":"","sources":["../../src/views/OrderDetailView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAwBvE,OAAO,KAAK,EAAwC,YAAY,EAAE,MAAM,eAAe,CAAA;AA0DvF,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKrD,CAAA;AAoGD,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IACvE,OAAO,EAAE,MAAM,CAAA;IACf,oFAAoF;IACpF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,EAAE,MAAM,YAAY,CAAA;IAC5B,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,6EAinBA;AAED,eAAO,MAAM,eAAe,GAAI,IAAI,MAAM,WAAyB,CAAA;AACnE,eAAO,MAAM,SAAS,GAAI,IAAI,MAAM,SAAyC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ShopProvider } from '@fayz-ai/shop';
|
|
3
|
+
/**
|
|
4
|
+
* The store's content for a CATALOG product: its photos, which one is the
|
|
5
|
+
* cover, and the way to the content library — mounted on the product record of
|
|
6
|
+
* whichever plugin owns the catalog (stock, here), not only on the shop's own.
|
|
7
|
+
*
|
|
8
|
+
* `item.id` is the catalog product; the gallery belongs to the storefront
|
|
9
|
+
* product behind it, which is looked up once.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ProductContentTab({ item, getProvider, libraryHref }: {
|
|
12
|
+
item: unknown;
|
|
13
|
+
getProvider: () => ShopProvider;
|
|
14
|
+
/** Where the whole library opens. */
|
|
15
|
+
libraryHref?: string;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
//# sourceMappingURL=ProductContentTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductContentTab.d.ts","sourceRoot":"","sources":["../../src/views/ProductContentTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAElD,OAAO,KAAK,EAAW,YAAY,EAAE,MAAM,eAAe,CAAA;AAI1D;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,WAAyB,EAAE,EAAE;IAClF,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,MAAM,YAAY,CAAA;IAC/B,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,qBA+DA"}
|
|
@@ -12,8 +12,10 @@ import type { ShopProvider } from '@fayz-ai/shop';
|
|
|
12
12
|
* keyboard and a screen reader can use them, and because reordering four
|
|
13
13
|
* photos of a rib is not worth a drag library.
|
|
14
14
|
*/
|
|
15
|
-
export declare function ProductImagesTab({ item, getProvider }: {
|
|
15
|
+
export declare function ProductImagesTab({ item, getProvider, footer }: {
|
|
16
16
|
item: unknown;
|
|
17
17
|
getProvider: () => ShopProvider;
|
|
18
|
+
/** Under the gallery: where else this content lives. */
|
|
19
|
+
footer?: React.ReactNode;
|
|
18
20
|
}): React.JSX.Element;
|
|
19
21
|
//# sourceMappingURL=ProductImagesTab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductImagesTab.d.ts","sourceRoot":"","sources":["../../src/views/ProductImagesTab.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAyB,YAAY,EAAE,MAAM,eAAe,CAAA;AAExE;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"ProductImagesTab.d.ts","sourceRoot":"","sources":["../../src/views/ProductImagesTab.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAyB,YAAY,EAAE,MAAM,eAAe,CAAA;AAExE;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE;IAC9D,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,MAAM,YAAY,CAAA;IAC/B,wDAAwD;IACxD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACzB,qBAwMA"}
|
package/dist/views/ShopPage.d.ts
CHANGED
|
@@ -4,6 +4,13 @@ export type ShopProviderResolver = ShopProvider | (() => ShopProvider);
|
|
|
4
4
|
export interface ShopPageProps {
|
|
5
5
|
provider?: ShopProviderResolver;
|
|
6
6
|
}
|
|
7
|
+
/** The shop's order page, for a host that owns `/orders/:id` (the `orders.detail` slot). */
|
|
8
|
+
export declare function ShopOrderDetailSlot({ orderId, onBack, fallback, provider }: {
|
|
9
|
+
orderId: string;
|
|
10
|
+
onBack: () => void;
|
|
11
|
+
fallback: React.ReactNode;
|
|
12
|
+
provider?: ShopProviderResolver;
|
|
13
|
+
}): React.JSX.Element;
|
|
7
14
|
declare const TABS: readonly [{
|
|
8
15
|
readonly id: "products";
|
|
9
16
|
readonly label: "Produtos";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShopPage.d.ts","sourceRoot":"","sources":["../../src/views/ShopPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAaxE,OAAO,KAAK,EAA+D,YAAY,EAAE,MAAM,eAAe,CAAA;AAE9G,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,CAAC,MAAM,YAAY,CAAC,CAAA;AAEtE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CAChC;
|
|
1
|
+
{"version":3,"file":"ShopPage.d.ts","sourceRoot":"","sources":["../../src/views/ShopPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAaxE,OAAO,KAAK,EAA+D,YAAY,EAAE,MAAM,eAAe,CAAA;AAE9G,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,CAAC,MAAM,YAAY,CAAC,CAAA;AAEtE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CAChC;AAmCD,4FAA4F;AAC5F,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE;IAC3E,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CAChC,qBAWA;AAigBD,QAAA,MAAM,IAAI;;;;;;;;;;;;EAKA,CAAA;AAEV,KAAK,KAAK,GAAG,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAA;AAStC;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,GAAG;IAAE,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,CAmFlE,CAAA"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"status": "preview",
|
|
5
5
|
"dependencies": []
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.18.0",
|
|
8
8
|
"description": "[experimental] Fayz SDK — plugin-shop plugin",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": false,
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@tanstack/react-table": "^8.20.0",
|
|
31
|
-
"@fayz-ai/admin": "^0.
|
|
32
|
-
"@fayz-ai/core": "^0.
|
|
33
|
-
"@fayz-ai/plugin-financial": "^0.
|
|
34
|
-
"@fayz-ai/plugin-inventory": "^0.
|
|
35
|
-
"@fayz-ai/shop": "^0.
|
|
36
|
-
"@fayz-ai/ui": "^0.
|
|
31
|
+
"@fayz-ai/admin": "^0.44.0",
|
|
32
|
+
"@fayz-ai/core": "^0.44.0",
|
|
33
|
+
"@fayz-ai/plugin-financial": "^0.23.0",
|
|
34
|
+
"@fayz-ai/plugin-inventory": "^0.16.0",
|
|
35
|
+
"@fayz-ai/shop": "^0.44.0",
|
|
36
|
+
"@fayz-ai/ui": "^0.44.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^20.0.0",
|