medusa-plugin-printify 0.3.0 → 0.3.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.
@@ -255,9 +255,8 @@ const PrintifyProductsPage = () => {
255
255
  ] })
256
256
  ] });
257
257
  };
258
- const formatCents = (cents) => `$${(cents / 100).toFixed(2)}`;
259
258
  const PrintifyProductDetailPage = () => {
260
- var _a, _b;
259
+ var _a;
261
260
  const { id } = reactRouterDom.useParams();
262
261
  const [product, setProduct] = react.useState(null);
263
262
  const [medusaProductId, setMedusaProductId] = react.useState(null);
@@ -361,50 +360,6 @@ const PrintifyProductDetailPage = () => {
361
360
  )
362
361
  ] }, i)) })
363
362
  ] }),
364
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { className: "p-6", children: [
365
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Heading, { level: "h2", className: "mb-4", children: [
366
- "Variants (",
367
- ((_b = product.variants) == null ? void 0 : _b.length) ?? 0,
368
- ")"
369
- ] }),
370
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Table, { children: [
371
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Table.Row, { children: [
372
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.HeaderCell, { children: "Title" }),
373
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.HeaderCell, { children: "SKU" }),
374
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.HeaderCell, { children: "Cost" }),
375
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.HeaderCell, { children: "Price" }),
376
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.HeaderCell, { children: "Status" })
377
- ] }) }),
378
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.Body, { children: (product.variants ?? []).map((v) => /* @__PURE__ */ jsxRuntime.jsxs(ui.Table.Row, { children: [
379
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.Cell, { children: v.title }),
380
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx("code", { className: "text-xs", children: v.sku }) }),
381
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.Cell, { children: formatCents(v.cost) }),
382
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.Cell, { children: formatCents(v.price) }),
383
- /* @__PURE__ */ jsxRuntime.jsx(ui.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(
384
- ui.Badge,
385
- {
386
- color: v.is_enabled ? "green" : "grey",
387
- size: "2xsmall",
388
- children: v.is_enabled ? "Enabled" : "Disabled"
389
- }
390
- ) })
391
- ] }, v.id)) })
392
- ] })
393
- ] }),
394
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { className: "p-6", children: [
395
- /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { level: "h2", className: "mb-4", children: "Medusa Product" }),
396
- medusaProductId ? /* @__PURE__ */ jsxRuntime.jsxs(
397
- reactRouterDom.Link,
398
- {
399
- to: `/products/${medusaProductId}`,
400
- className: "flex items-center gap-2 text-ui-fg-interactive hover:text-ui-fg-interactive-hover text-sm no-underline",
401
- children: [
402
- "View linked product",
403
- /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowUpRightOnBox, { className: "w-4 h-4" })
404
- ]
405
- }
406
- ) : /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { className: "text-ui-fg-muted", children: "No linked Medusa product" })
407
- ] }),
408
363
  product.printify_data && /* @__PURE__ */ jsxRuntime.jsxs(ui.Container, { className: "p-6", children: [
409
364
  /* @__PURE__ */ jsxRuntime.jsxs(
410
365
  "button",
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { defineWidgetConfig, defineRouteConfig } from "@medusajs/admin-sdk";
3
3
  import { Container, Heading, Text, Badge, Button, Table, Input, Switch, Label } from "@medusajs/ui";
4
4
  import { useState, useEffect } from "react";
5
- import { BuildingStorefront, ArrowRight, ArrowLeft, ArrowUpRightOnBox } from "@medusajs/icons";
5
+ import { BuildingStorefront, ArrowRight, ArrowLeft } from "@medusajs/icons";
6
6
  import { Link, useSearchParams, useParams } from "react-router-dom";
7
7
  const PrintifyOrderWidget = ({ data }) => {
8
8
  const [printifyOrders, setPrintifyOrders] = useState([]);
@@ -254,9 +254,8 @@ const PrintifyProductsPage = () => {
254
254
  ] })
255
255
  ] });
256
256
  };
257
- const formatCents = (cents) => `$${(cents / 100).toFixed(2)}`;
258
257
  const PrintifyProductDetailPage = () => {
259
- var _a, _b;
258
+ var _a;
260
259
  const { id } = useParams();
261
260
  const [product, setProduct] = useState(null);
262
261
  const [medusaProductId, setMedusaProductId] = useState(null);
@@ -360,50 +359,6 @@ const PrintifyProductDetailPage = () => {
360
359
  )
361
360
  ] }, i)) })
362
361
  ] }),
363
- /* @__PURE__ */ jsxs(Container, { className: "p-6", children: [
364
- /* @__PURE__ */ jsxs(Heading, { level: "h2", className: "mb-4", children: [
365
- "Variants (",
366
- ((_b = product.variants) == null ? void 0 : _b.length) ?? 0,
367
- ")"
368
- ] }),
369
- /* @__PURE__ */ jsxs(Table, { children: [
370
- /* @__PURE__ */ jsx(Table.Header, { children: /* @__PURE__ */ jsxs(Table.Row, { children: [
371
- /* @__PURE__ */ jsx(Table.HeaderCell, { children: "Title" }),
372
- /* @__PURE__ */ jsx(Table.HeaderCell, { children: "SKU" }),
373
- /* @__PURE__ */ jsx(Table.HeaderCell, { children: "Cost" }),
374
- /* @__PURE__ */ jsx(Table.HeaderCell, { children: "Price" }),
375
- /* @__PURE__ */ jsx(Table.HeaderCell, { children: "Status" })
376
- ] }) }),
377
- /* @__PURE__ */ jsx(Table.Body, { children: (product.variants ?? []).map((v) => /* @__PURE__ */ jsxs(Table.Row, { children: [
378
- /* @__PURE__ */ jsx(Table.Cell, { children: v.title }),
379
- /* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx("code", { className: "text-xs", children: v.sku }) }),
380
- /* @__PURE__ */ jsx(Table.Cell, { children: formatCents(v.cost) }),
381
- /* @__PURE__ */ jsx(Table.Cell, { children: formatCents(v.price) }),
382
- /* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx(
383
- Badge,
384
- {
385
- color: v.is_enabled ? "green" : "grey",
386
- size: "2xsmall",
387
- children: v.is_enabled ? "Enabled" : "Disabled"
388
- }
389
- ) })
390
- ] }, v.id)) })
391
- ] })
392
- ] }),
393
- /* @__PURE__ */ jsxs(Container, { className: "p-6", children: [
394
- /* @__PURE__ */ jsx(Heading, { level: "h2", className: "mb-4", children: "Medusa Product" }),
395
- medusaProductId ? /* @__PURE__ */ jsxs(
396
- Link,
397
- {
398
- to: `/products/${medusaProductId}`,
399
- className: "flex items-center gap-2 text-ui-fg-interactive hover:text-ui-fg-interactive-hover text-sm no-underline",
400
- children: [
401
- "View linked product",
402
- /* @__PURE__ */ jsx(ArrowUpRightOnBox, { className: "w-4 h-4" })
403
- ]
404
- }
405
- ) : /* @__PURE__ */ jsx(Text, { className: "text-ui-fg-muted", children: "No linked Medusa product" })
406
- ] }),
407
362
  product.printify_data && /* @__PURE__ */ jsxs(Container, { className: "p-6", children: [
408
363
  /* @__PURE__ */ jsxs(
409
364
  "button",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "medusa-plugin-printify",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Printify print-on-demand integration plugin for Medusa v2",
5
5
  "author": "Dawson Blackhouse",
6
6
  "license": "MIT",
@@ -83,7 +83,6 @@
83
83
  "scripts": {
84
84
  "build": "medusa plugin:build",
85
85
  "dev": "medusa plugin:develop",
86
- "publish:npm": "pnpm publish --access public --no-git-checks",
87
86
  "test": "jest",
88
87
  "test:watch": "jest --watch",
89
88
  "test:coverage": "jest --coverage"