@fayz-ai/plugin-shop 0.17.0 → 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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { errorMessage, listProductsDetailed, invalidateProductLists,
|
|
1
|
+
import { errorMessage, shopCustomerLookup, listProductsDetailed, invalidateProductLists, buildStockLocationsRegistry, listProductsCached, resolveTerm, candidateMeta } from './chunk-6DRDPROL.js';
|
|
2
2
|
import * as React2 from 'react';
|
|
3
|
-
import React2__default, { useState, useEffect,
|
|
4
|
-
import {
|
|
5
|
-
import { RotateCcw, QrCode, Pencil, Archive, Ban, CreditCard, XCircle, ShoppingBag, Package, Wallet, Plus, WandSparkles,
|
|
6
|
-
import {
|
|
7
|
-
import { useAdminPath, adminNavigateTo,
|
|
3
|
+
import React2__default, { useState, useEffect, useRef, useCallback, useMemo } from 'react';
|
|
4
|
+
import { Modal, ModalContent, ModalHeader, ModalTitle, ModalDescription, ModalFooter, Button, formatPhone, toast, DataTable, ConfirmDialog, Skeleton, ModalPortal, ModalOverlay, ModalBody, SearchSelect } from '@fayz-ai/ui';
|
|
5
|
+
import { RotateCcw, QrCode, Pencil, Archive, Ban, CreditCard, XCircle, ShoppingBag, Package, Wallet, Plus, WandSparkles, CheckCircle2, Printer, RefreshCw, ExternalLink, Truck, AlertTriangle, Loader2, Check, Copy, Link2, HandCoins, Share2, MessageCircle, X, MapPin } from 'lucide-react';
|
|
6
|
+
import { formatDocument, getShopProvider, CHARGEABLE_PROVIDERS, supportsPaymentLink, resolveShippingLabelProvider, documentDigits, isValidDocument } from '@fayz-ai/shop';
|
|
7
|
+
import { useAdminPath, adminNavigateTo, useOrderReceivable, OrderDetailSkeleton, PageActions, OrderDetailBlock, OrderDetailRow, toOrderDetailReceivable, PersonLink, OrderDetailView as OrderDetailView$1, OrderFormBlock, OrderCreateScreen, OrderListView, askAI, useConnectors, CrudRecordModal, useAgentSurface, ClientOrdersTab, createClientOrdersProvider, duplicateWrite } from '@fayz-ai/admin';
|
|
8
8
|
import { ReceivePaymentModal } from '@fayz-ai/plugin-financial';
|
|
9
9
|
import { usePluginRuntimeOptional, getSupabaseClientOptional } from '@fayz-ai/core';
|
|
10
10
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1510,7 +1510,7 @@ function fromSession(session) {
|
|
|
1510
1510
|
};
|
|
1511
1511
|
}
|
|
1512
1512
|
var shopShipmentsCache = /* @__PURE__ */ new Map();
|
|
1513
|
-
function OrderDetailView({ orderId, provider, onBack }) {
|
|
1513
|
+
function OrderDetailView({ orderId, provider, onBack, fallback }) {
|
|
1514
1514
|
const runtime = usePluginRuntimeOptional();
|
|
1515
1515
|
const hasFinancial = (runtime?.activePlugins ?? []).some(
|
|
1516
1516
|
(p) => p.routes?.some((r) => r.path === "/financial")
|
|
@@ -1612,7 +1612,7 @@ function OrderDetailView({ orderId, provider, onBack }) {
|
|
|
1612
1612
|
/* @__PURE__ */ jsx("p", { className: "mt-1 text-red-700", children: error })
|
|
1613
1613
|
] });
|
|
1614
1614
|
}
|
|
1615
|
-
if (!order) return /* @__PURE__ */ jsx("div", { className: "py-12 text-center text-sm text-muted-foreground", children: "Pedido n\xE3o encontrado." });
|
|
1615
|
+
if (!order) return fallback ?? /* @__PURE__ */ jsx("div", { className: "py-12 text-center text-sm text-muted-foreground", children: "Pedido n\xE3o encontrado." });
|
|
1616
1616
|
const cur = order.currency;
|
|
1617
1617
|
const delivery = deliveryFromNotes(order.notes);
|
|
1618
1618
|
const addr = order.shippingAddress;
|
|
@@ -3575,6 +3575,17 @@ var statusColors = {
|
|
|
3575
3575
|
function resolveShopProvider(provider) {
|
|
3576
3576
|
return typeof provider === "function" ? provider() : provider ?? getShopProvider();
|
|
3577
3577
|
}
|
|
3578
|
+
function ShopOrderDetailSlot({ orderId, onBack, fallback, provider }) {
|
|
3579
|
+
return /* @__PURE__ */ jsx("div", { className: "max-w-7xl", children: /* @__PURE__ */ jsx(
|
|
3580
|
+
OrderDetailView,
|
|
3581
|
+
{
|
|
3582
|
+
orderId,
|
|
3583
|
+
provider: () => resolveShopProvider(provider),
|
|
3584
|
+
onBack,
|
|
3585
|
+
fallback
|
|
3586
|
+
}
|
|
3587
|
+
) });
|
|
3588
|
+
}
|
|
3578
3589
|
function useShopList(load, deps) {
|
|
3579
3590
|
const [items, setItems] = useState([]);
|
|
3580
3591
|
const [loading, setLoading] = useState(true);
|
|
@@ -4101,6 +4112,6 @@ var ShopPage = ({ provider, section }) => {
|
|
|
4101
4112
|
};
|
|
4102
4113
|
ShopPage.displayName = "ShopPage";
|
|
4103
4114
|
|
|
4104
|
-
export { ShopPage };
|
|
4105
|
-
//# sourceMappingURL=ShopPage-
|
|
4106
|
-
//# sourceMappingURL=ShopPage-
|
|
4115
|
+
export { ShopOrderDetailSlot, ShopPage };
|
|
4116
|
+
//# sourceMappingURL=ShopPage-J34V43NW.js.map
|
|
4117
|
+
//# sourceMappingURL=ShopPage-J34V43NW.js.map
|