@fayz-ai/plugin-shop 0.11.0 → 0.11.2
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/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createConnectionStore, connectionSettings, connectionStatus, settingsSt
|
|
|
4
4
|
import { getShopTenantId, setShopTenantResolver, buildShopMessageDefaults, registerShippingLabelProvider, getShopProvider, buildShopDomainEvents, axesFromOptions, planVariantMatrix, validateVariantAxes, hasOnlyDefaultVariant, MAX_VARIANT_AXES, leavesNothingSellable, productImageToMediaFile, formatVariantCombination, applyVariantMatrix } from '@fayz-ai/shop';
|
|
5
5
|
import { fayzConnectorOAuth, useOrganizationStore, registerEntityPath, registerPersonLookup, createCrudPage, adminNavigateTo, ClientOrdersTab, createClientOrdersProvider, CrudFormPage, SettingsGroup, SelectRow, ToggleRow, useConnectors, useConnectorsPanelAvailable, openConnectorsPanel, MultiSelectRow, AddConnectorButton, AddConnectorPanel, ConnectorDetail, RegistryCrudView, TextRow, ConnectorRow, ConnectorMark, StateChip } from '@fayz-ai/admin';
|
|
6
6
|
import { Package, Eye, FileEdit, PackageX, UsersRound, Users, UserX, Filter, ShoppingBag, Repeat, CircleDollarSign, Tag, TicketCheck, Layers, CreditCard, ImageOff, Link2, MapPin, Music, Camera, MessageCircle, Globe, Plus, Loader2, ChevronLeft, ChevronRight, Sparkles, Download, RefreshCw, Trash2, Upload, ExternalLink, Check, X, AlertTriangle, Box, ChevronDown, Film, FileText, Warehouse, ArrowRight, Car, Truck, Info } from 'lucide-react';
|
|
7
|
-
import {
|
|
7
|
+
import { PageHeaderActions, PageTabs, Card, Button, Thumbnail, PageHeader, toast, ConfirmDialog, Input, Hint, Modal, ModalContent, ModalHeader, ModalTitle, ModalBody, Skeleton } from '@fayz-ai/ui';
|
|
8
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
import { advanceWindow, createRateLimiter, sliceWindow, paginate, reconcileMirror, serializeCursor } from '@fayz-ai/core/connector-runtime';
|
|
10
10
|
|
|
@@ -1035,9 +1035,11 @@ function buildShopProductEntity(currencyCode = "BRL", getProvider) {
|
|
|
1035
1035
|
currencyLocale: "pt-BR",
|
|
1036
1036
|
showInTable: true,
|
|
1037
1037
|
sortable: true,
|
|
1038
|
-
|
|
1038
|
+
// O "de" riscado vai EMBAIXO do preço em vigor, não ao lado: lado a lado
|
|
1039
|
+
// as duas quantias competem na mesma linha e o olho lê a maior primeiro.
|
|
1040
|
+
renderCell: (v, row) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-end leading-tight", children: [
|
|
1039
1041
|
/* @__PURE__ */ jsx("span", { className: "font-medium", children: money(v, row.currency) }),
|
|
1040
|
-
row.compareAtPrice > row.price && /* @__PURE__ */ jsx("span", { className: "
|
|
1042
|
+
row.compareAtPrice > row.price && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground line-through", children: money(row.compareAtPrice, row.currency) })
|
|
1041
1043
|
] })
|
|
1042
1044
|
},
|
|
1043
1045
|
{
|
|
@@ -2861,7 +2863,7 @@ function PackagesSettings({ basePath = shippingRegistryPath(PACKAGES_REGISTRY) }
|
|
|
2861
2863
|
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold", children: "Embalagens" }),
|
|
2862
2864
|
/* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: packagesRegistry.description })
|
|
2863
2865
|
] }),
|
|
2864
|
-
/* @__PURE__ */ jsx(RegistryCrudView, { registry: packagesRegistry, basePath })
|
|
2866
|
+
/* @__PURE__ */ jsx(RegistryCrudView, { registry: packagesRegistry, basePath, embedded: true })
|
|
2865
2867
|
] });
|
|
2866
2868
|
}
|
|
2867
2869
|
function HandlingSettings({ settings, provider }) {
|
|
@@ -4415,13 +4417,18 @@ function ContentPage({ resolveProvider }) {
|
|
|
4415
4417
|
file.id
|
|
4416
4418
|
)) });
|
|
4417
4419
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
4418
|
-
/* @__PURE__ */
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4420
|
+
supported && provider.uploadMediaFile && /* @__PURE__ */ jsx(PageHeaderActions, { children: /* @__PURE__ */ jsx(UploadButton, { uploading, onPick: handleUpload }) }),
|
|
4421
|
+
/* @__PURE__ */ jsx(
|
|
4422
|
+
PageTabs,
|
|
4423
|
+
{
|
|
4424
|
+
className: "mb-0",
|
|
4425
|
+
tabs: TABS,
|
|
4426
|
+
value: tab,
|
|
4427
|
+
onChange: setTab,
|
|
4428
|
+
"aria-label": "Arquivos",
|
|
4429
|
+
actions: caption ? /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: caption }) : void 0
|
|
4430
|
+
}
|
|
4431
|
+
),
|
|
4425
4432
|
!supported ? /* @__PURE__ */ jsxs(Card, { className: "p-12 text-center", children: [
|
|
4426
4433
|
/* @__PURE__ */ jsx(ImageOff, { className: "mx-auto h-8 w-8 text-muted-foreground" }),
|
|
4427
4434
|
/* @__PURE__ */ jsx("p", { className: "mt-3 font-medium", children: "Armazenamento n\xE3o configurado" }),
|