@vicacha-devs/medusa-plugin-barcode 0.0.1 → 0.1.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.
@@ -2003,84 +2003,85 @@ var GuardedBarcodesOverviewPage = () => /* @__PURE__ */ (0, react_jsx_runtime.js
2003
2003
  permission: "barcodes.read",
2004
2004
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarcodesOverviewPage, {})
2005
2005
  });
2006
- // src/admin/routes/barcodes/print/page.tsx
2007
- var BarcodePrintCenterPage = () => {
2006
+ // src/admin/routes/barcodes/lookup/page.tsx
2007
+ var BarcodeLookupPage = () => {
2008
2008
  const studio = useBarcodeStudio();
2009
2009
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_ui.Toaster, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer, {
2010
- widgetsZonePrefix: "barcodes.print.details",
2010
+ widgetsZonePrefix: "barcodes.lookup.details",
2011
2011
  preferredLayoutId: _medusajs_admin_shared.CORE_LAYOUT_IDS.TWO_COLUMN,
2012
2012
  sections: {
2013
2013
  main: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer.Entry, {
2014
- id: "BarcodePrintDesignerSection",
2015
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LabelPrintDesignerSection, {
2016
- form: studio.printForm,
2017
- onFormChange: studio.setPrintForm,
2018
- templates: studio.templates,
2019
- onRenderLabels: () => void studio.handleRenderLabels()
2014
+ id: "BarcodeLookupMainSection",
2015
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GtinLookupLookupSection, {
2016
+ form: studio.lookupForm,
2017
+ onFormChange: studio.setLookupForm,
2018
+ lookupResult: studio.lookupResult,
2019
+ onLookup: () => void studio.handleLookupBarcode(),
2020
+ onCreateProduct: () => void studio.handleCreateProductFromBarcode()
2020
2021
  })
2021
2022
  }),
2022
2023
  side: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer.Entry, {
2023
- id: "BarcodePrintOutputSection",
2024
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LabelPrintOutputSection, { output: studio.printOutput })
2024
+ id: "BarcodeLookupBatchSection",
2025
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GtinLookupBatchSection, {
2026
+ form: studio.lookupForm,
2027
+ onFormChange: studio.setLookupForm,
2028
+ barcodes: studio.barcodes,
2029
+ onBatchImport: () => void studio.handleBatchImport()
2030
+ })
2025
2031
  })
2026
2032
  }
2027
2033
  })] });
2028
2034
  };
2029
2035
  var Breadcrumb$4 = () => {
2030
2036
  const { t } = (0, react_i18next.useTranslation)();
2031
- return t("tabs.print");
2037
+ return t("lookupTab.lookupTitle");
2032
2038
  };
2033
2039
  var config$4 = (0, _medusajs_admin_sdk.defineRouteConfig)({
2034
- label: "tabs.print",
2040
+ label: "lookupTab.lookupTitle",
2035
2041
  translationNs: "barcodes",
2036
- icon: _medusajs_icons.DocumentText
2042
+ icon: _medusajs_icons.MagnifyingGlass
2037
2043
  });
2038
2044
  var handle$4 = { breadcrumb: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Breadcrumb$4, {}) };
2039
- var GuardedBarcodePrintCenterPage = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RbacGuard, {
2045
+ var GuardedBarcodeLookupPage = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RbacGuard, {
2040
2046
  permission: "barcodes.read",
2041
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarcodePrintCenterPage, {})
2047
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarcodeLookupPage, {})
2042
2048
  });
2043
- // src/admin/routes/barcodes/stock-take/page.tsx
2044
- var BarcodeStockTakePage = () => {
2049
+ // src/admin/routes/barcodes/print/page.tsx
2050
+ var BarcodePrintCenterPage = () => {
2045
2051
  const studio = useBarcodeStudio();
2046
2052
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_ui.Toaster, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer, {
2047
- widgetsZonePrefix: "barcodes.stock_take.details",
2053
+ widgetsZonePrefix: "barcodes.print.details",
2048
2054
  preferredLayoutId: _medusajs_admin_shared.CORE_LAYOUT_IDS.TWO_COLUMN,
2049
2055
  sections: {
2050
2056
  main: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer.Entry, {
2051
- id: "StockTakeControlsSection",
2052
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StockTakeControlsSection, {
2053
- form: studio.countForm,
2054
- onFormChange: studio.setCountForm,
2055
- onCreateSession: () => void studio.handleCreateCountSession(),
2056
- onScanDelta: (delta) => void studio.handleScanIntoSession(delta)
2057
+ id: "BarcodePrintDesignerSection",
2058
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LabelPrintDesignerSection, {
2059
+ form: studio.printForm,
2060
+ onFormChange: studio.setPrintForm,
2061
+ templates: studio.templates,
2062
+ onRenderLabels: () => void studio.handleRenderLabels()
2057
2063
  })
2058
2064
  }),
2059
2065
  side: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer.Entry, {
2060
- id: "StockTakeSessionsSection",
2061
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StockTakeSessionsSection, {
2062
- sessions: studio.sessions,
2063
- selectedSessionId: studio.selectedSessionId,
2064
- onSelectSession: studio.setSelectedSessionId,
2065
- onApplySession: (id) => void studio.handleApplyCountSession(id)
2066
- })
2066
+ id: "BarcodePrintOutputSection",
2067
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LabelPrintOutputSection, { output: studio.printOutput })
2067
2068
  })
2068
2069
  }
2069
2070
  })] });
2070
2071
  };
2071
2072
  var Breadcrumb$3 = () => {
2072
2073
  const { t } = (0, react_i18next.useTranslation)();
2073
- return t("stockTakeTab.createTitle");
2074
+ return t("tabs.print");
2074
2075
  };
2075
2076
  var config$3 = (0, _medusajs_admin_sdk.defineRouteConfig)({
2076
- label: "stockTakeTab.createTitle",
2077
+ label: "tabs.print",
2077
2078
  translationNs: "barcodes",
2078
- icon: _medusajs_icons.Buildings
2079
+ icon: _medusajs_icons.DocumentText
2079
2080
  });
2080
2081
  var handle$3 = { breadcrumb: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Breadcrumb$3, {}) };
2081
- var GuardedBarcodeStockTakePage = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RbacGuard, {
2082
+ var GuardedBarcodePrintCenterPage = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RbacGuard, {
2082
2083
  permission: "barcodes.read",
2083
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarcodeStockTakePage, {})
2084
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarcodePrintCenterPage, {})
2084
2085
  });
2085
2086
  // src/admin/routes/barcodes/providers/page.tsx
2086
2087
  var BarcodeProvidersPage = () => {
@@ -2118,6 +2119,48 @@ var GuardedBarcodeProvidersPage = () => /* @__PURE__ */ (0, react_jsx_runtime.js
2118
2119
  permission: "barcodes.read",
2119
2120
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarcodeProvidersPage, {})
2120
2121
  });
2122
+ // src/admin/routes/barcodes/stock-take/page.tsx
2123
+ var BarcodeStockTakePage = () => {
2124
+ const studio = useBarcodeStudio();
2125
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_ui.Toaster, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer, {
2126
+ widgetsZonePrefix: "barcodes.stock_take.details",
2127
+ preferredLayoutId: _medusajs_admin_shared.CORE_LAYOUT_IDS.TWO_COLUMN,
2128
+ sections: {
2129
+ main: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer.Entry, {
2130
+ id: "StockTakeControlsSection",
2131
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StockTakeControlsSection, {
2132
+ form: studio.countForm,
2133
+ onFormChange: studio.setCountForm,
2134
+ onCreateSession: () => void studio.handleCreateCountSession(),
2135
+ onScanDelta: (delta) => void studio.handleScanIntoSession(delta)
2136
+ })
2137
+ }),
2138
+ side: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer.Entry, {
2139
+ id: "StockTakeSessionsSection",
2140
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StockTakeSessionsSection, {
2141
+ sessions: studio.sessions,
2142
+ selectedSessionId: studio.selectedSessionId,
2143
+ onSelectSession: studio.setSelectedSessionId,
2144
+ onApplySession: (id) => void studio.handleApplyCountSession(id)
2145
+ })
2146
+ })
2147
+ }
2148
+ })] });
2149
+ };
2150
+ var Breadcrumb$1 = () => {
2151
+ const { t } = (0, react_i18next.useTranslation)();
2152
+ return t("stockTakeTab.createTitle");
2153
+ };
2154
+ var config$1 = (0, _medusajs_admin_sdk.defineRouteConfig)({
2155
+ label: "stockTakeTab.createTitle",
2156
+ translationNs: "barcodes",
2157
+ icon: _medusajs_icons.Buildings
2158
+ });
2159
+ var handle$1 = { breadcrumb: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Breadcrumb$1, {}) };
2160
+ var GuardedBarcodeStockTakePage = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RbacGuard, {
2161
+ permission: "barcodes.read",
2162
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarcodeStockTakePage, {})
2163
+ });
2121
2164
  // src/admin/routes/barcodes/tags/page.tsx
2122
2165
  var BarcodeTagsPage = () => {
2123
2166
  const navigate = (0, react_router_dom.useNavigate)();
@@ -2145,16 +2188,16 @@ var BarcodeTagsPage = () => {
2145
2188
  }
2146
2189
  })] });
2147
2190
  };
2148
- var Breadcrumb$1 = () => {
2191
+ var Breadcrumb = () => {
2149
2192
  const { t } = (0, react_i18next.useTranslation)();
2150
2193
  return t("tagsTab.createTitle");
2151
2194
  };
2152
- var config$1 = (0, _medusajs_admin_sdk.defineRouteConfig)({
2195
+ var config = (0, _medusajs_admin_sdk.defineRouteConfig)({
2153
2196
  label: "tagsTab.createTitle",
2154
2197
  translationNs: "barcodes",
2155
2198
  icon: _medusajs_icons.Tag
2156
2199
  });
2157
- var handle$1 = { breadcrumb: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Breadcrumb$1, {}) };
2200
+ var handle = { breadcrumb: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Breadcrumb, {}) };
2158
2201
  var GuardedBarcodeTagsPage = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RbacGuard, {
2159
2202
  permission: "barcodes.read",
2160
2203
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarcodeTagsPage, {})
@@ -2186,49 +2229,6 @@ var GuardedBarcodeTagCreateModal = () => /* @__PURE__ */ (0, react_jsx_runtime.j
2186
2229
  permission: "barcodes.write",
2187
2230
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarcodeTagCreateModal, {})
2188
2231
  });
2189
- // src/admin/routes/barcodes/lookup/page.tsx
2190
- var BarcodeLookupPage = () => {
2191
- const studio = useBarcodeStudio();
2192
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_ui.Toaster, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer, {
2193
- widgetsZonePrefix: "barcodes.lookup.details",
2194
- preferredLayoutId: _medusajs_admin_shared.CORE_LAYOUT_IDS.TWO_COLUMN,
2195
- sections: {
2196
- main: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer.Entry, {
2197
- id: "BarcodeLookupMainSection",
2198
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GtinLookupLookupSection, {
2199
- form: studio.lookupForm,
2200
- onFormChange: studio.setLookupForm,
2201
- lookupResult: studio.lookupResult,
2202
- onLookup: () => void studio.handleLookupBarcode(),
2203
- onCreateProduct: () => void studio.handleCreateProductFromBarcode()
2204
- })
2205
- }),
2206
- side: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_medusajs_dashboard_components.LayoutComposer.Entry, {
2207
- id: "BarcodeLookupBatchSection",
2208
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GtinLookupBatchSection, {
2209
- form: studio.lookupForm,
2210
- onFormChange: studio.setLookupForm,
2211
- barcodes: studio.barcodes,
2212
- onBatchImport: () => void studio.handleBatchImport()
2213
- })
2214
- })
2215
- }
2216
- })] });
2217
- };
2218
- var Breadcrumb = () => {
2219
- const { t } = (0, react_i18next.useTranslation)();
2220
- return t("lookupTab.lookupTitle");
2221
- };
2222
- var config = (0, _medusajs_admin_sdk.defineRouteConfig)({
2223
- label: "lookupTab.lookupTitle",
2224
- translationNs: "barcodes",
2225
- icon: _medusajs_icons.MagnifyingGlass
2226
- });
2227
- var handle = { breadcrumb: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Breadcrumb, {}) };
2228
- var GuardedBarcodeLookupPage = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RbacGuard, {
2229
- permission: "barcodes.read",
2230
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BarcodeLookupPage, {})
2231
- });
2232
2232
  var ar_default = {
2233
2233
  nav: { "label": "استوديو الباركود والملصقات" },
2234
2234
  header: {
@@ -3840,8 +3840,8 @@ var plugin = {
3840
3840
  }
3841
3841
  },
3842
3842
  {
3843
- Component: GuardedBarcodePrintCenterPage,
3844
- path: "/barcodes/print",
3843
+ Component: GuardedBarcodeLookupPage,
3844
+ path: "/barcodes/lookup",
3845
3845
  handle: {
3846
3846
  label: config$4.label,
3847
3847
  translationNs: config$4.translationNs,
@@ -3850,8 +3850,8 @@ var plugin = {
3850
3850
  }
3851
3851
  },
3852
3852
  {
3853
- Component: GuardedBarcodeStockTakePage,
3854
- path: "/barcodes/stock-take",
3853
+ Component: GuardedBarcodePrintCenterPage,
3854
+ path: "/barcodes/print",
3855
3855
  handle: {
3856
3856
  label: config$3.label,
3857
3857
  translationNs: config$3.translationNs,
@@ -3870,28 +3870,28 @@ var plugin = {
3870
3870
  }
3871
3871
  },
3872
3872
  {
3873
- Component: GuardedBarcodeTagsPage,
3874
- path: "/barcodes/tags",
3873
+ Component: GuardedBarcodeStockTakePage,
3874
+ path: "/barcodes/stock-take",
3875
3875
  handle: {
3876
3876
  label: config$1.label,
3877
3877
  translationNs: config$1.translationNs,
3878
3878
  permissions: config$1.permissions,
3879
3879
  ...handle$1
3880
- },
3881
- children: [{
3882
- Component: GuardedBarcodeTagCreateModal,
3883
- path: "/barcodes/tags/create"
3884
- }]
3880
+ }
3885
3881
  },
3886
3882
  {
3887
- Component: GuardedBarcodeLookupPage,
3888
- path: "/barcodes/lookup",
3883
+ Component: GuardedBarcodeTagsPage,
3884
+ path: "/barcodes/tags",
3889
3885
  handle: {
3890
3886
  label: config.label,
3891
3887
  translationNs: config.translationNs,
3892
3888
  permissions: config.permissions,
3893
3889
  ...handle
3894
- }
3890
+ },
3891
+ children: [{
3892
+ Component: GuardedBarcodeTagCreateModal,
3893
+ path: "/barcodes/tags/create"
3894
+ }]
3895
3895
  }
3896
3896
  ] },
3897
3897
  menuItemModule: { menuItems: [
@@ -3907,19 +3907,19 @@ var plugin = {
3907
3907
  {
3908
3908
  label: config$4.label,
3909
3909
  icon: config$4.icon,
3910
- path: "/barcodes/print",
3910
+ path: "/barcodes/lookup",
3911
3911
  nested: void 0,
3912
3912
  rank: void 0,
3913
3913
  translationNs: config$4.translationNs,
3914
3914
  permissions: void 0
3915
3915
  },
3916
3916
  {
3917
- label: config.label,
3918
- icon: config.icon,
3919
- path: "/barcodes/lookup",
3917
+ label: config$3.label,
3918
+ icon: config$3.icon,
3919
+ path: "/barcodes/print",
3920
3920
  nested: void 0,
3921
3921
  rank: void 0,
3922
- translationNs: config.translationNs,
3922
+ translationNs: config$3.translationNs,
3923
3923
  permissions: void 0
3924
3924
  },
3925
3925
  {
@@ -3932,21 +3932,21 @@ var plugin = {
3932
3932
  permissions: void 0
3933
3933
  },
3934
3934
  {
3935
- label: config$3.label,
3936
- icon: config$3.icon,
3935
+ label: config$1.label,
3936
+ icon: config$1.icon,
3937
3937
  path: "/barcodes/stock-take",
3938
3938
  nested: void 0,
3939
3939
  rank: void 0,
3940
- translationNs: config$3.translationNs,
3940
+ translationNs: config$1.translationNs,
3941
3941
  permissions: void 0
3942
3942
  },
3943
3943
  {
3944
- label: config$1.label,
3945
- icon: config$1.icon,
3944
+ label: config.label,
3945
+ icon: config.icon,
3946
3946
  path: "/barcodes/tags",
3947
3947
  nested: void 0,
3948
3948
  rank: void 0,
3949
- translationNs: config$1.translationNs,
3949
+ translationNs: config.translationNs,
3950
3950
  permissions: void 0
3951
3951
  }
3952
3952
  ] },
@@ -2060,6 +2060,43 @@ var GuardedBarcodeProvidersPage = () => /* @__PURE__ */ jsx(RbacGuard, {
2060
2060
  permission: "barcodes.read",
2061
2061
  children: /* @__PURE__ */ jsx(BarcodeProvidersPage, {})
2062
2062
  });
2063
+ // src/admin/routes/barcodes/print/page.tsx
2064
+ var BarcodePrintCenterPage = () => {
2065
+ const studio = useBarcodeStudio();
2066
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Toaster, {}), /* @__PURE__ */ jsx(LayoutComposer, {
2067
+ widgetsZonePrefix: "barcodes.print.details",
2068
+ preferredLayoutId: CORE_LAYOUT_IDS.TWO_COLUMN,
2069
+ sections: {
2070
+ main: /* @__PURE__ */ jsx(LayoutComposer.Entry, {
2071
+ id: "BarcodePrintDesignerSection",
2072
+ children: /* @__PURE__ */ jsx(LabelPrintDesignerSection, {
2073
+ form: studio.printForm,
2074
+ onFormChange: studio.setPrintForm,
2075
+ templates: studio.templates,
2076
+ onRenderLabels: () => void studio.handleRenderLabels()
2077
+ })
2078
+ }),
2079
+ side: /* @__PURE__ */ jsx(LayoutComposer.Entry, {
2080
+ id: "BarcodePrintOutputSection",
2081
+ children: /* @__PURE__ */ jsx(LabelPrintOutputSection, { output: studio.printOutput })
2082
+ })
2083
+ }
2084
+ })] });
2085
+ };
2086
+ var Breadcrumb$2 = () => {
2087
+ const { t } = useTranslation();
2088
+ return t("tabs.print");
2089
+ };
2090
+ var config$2 = defineRouteConfig({
2091
+ label: "tabs.print",
2092
+ translationNs: "barcodes",
2093
+ icon: DocumentText
2094
+ });
2095
+ var handle$2 = { breadcrumb: () => /* @__PURE__ */ jsx(Breadcrumb$2, {}) };
2096
+ var GuardedBarcodePrintCenterPage = () => /* @__PURE__ */ jsx(RbacGuard, {
2097
+ permission: "barcodes.read",
2098
+ children: /* @__PURE__ */ jsx(BarcodePrintCenterPage, {})
2099
+ });
2063
2100
  // src/admin/routes/barcodes/stock-take/page.tsx
2064
2101
  var BarcodeStockTakePage = () => {
2065
2102
  const studio = useBarcodeStudio();
@@ -2088,16 +2125,16 @@ var BarcodeStockTakePage = () => {
2088
2125
  }
2089
2126
  })] });
2090
2127
  };
2091
- var Breadcrumb$2 = () => {
2128
+ var Breadcrumb$1 = () => {
2092
2129
  const { t } = useTranslation();
2093
2130
  return t("stockTakeTab.createTitle");
2094
2131
  };
2095
- var config$2 = defineRouteConfig({
2132
+ var config$1 = defineRouteConfig({
2096
2133
  label: "stockTakeTab.createTitle",
2097
2134
  translationNs: "barcodes",
2098
2135
  icon: Buildings
2099
2136
  });
2100
- var handle$2 = { breadcrumb: () => /* @__PURE__ */ jsx(Breadcrumb$2, {}) };
2137
+ var handle$1 = { breadcrumb: () => /* @__PURE__ */ jsx(Breadcrumb$1, {}) };
2101
2138
  var GuardedBarcodeStockTakePage = () => /* @__PURE__ */ jsx(RbacGuard, {
2102
2139
  permission: "barcodes.read",
2103
2140
  children: /* @__PURE__ */ jsx(BarcodeStockTakePage, {})
@@ -2129,16 +2166,16 @@ var BarcodeTagsPage = () => {
2129
2166
  }
2130
2167
  })] });
2131
2168
  };
2132
- var Breadcrumb$1 = () => {
2169
+ var Breadcrumb = () => {
2133
2170
  const { t } = useTranslation();
2134
2171
  return t("tagsTab.createTitle");
2135
2172
  };
2136
- var config$1 = defineRouteConfig({
2173
+ var config = defineRouteConfig({
2137
2174
  label: "tagsTab.createTitle",
2138
2175
  translationNs: "barcodes",
2139
2176
  icon: Tag
2140
2177
  });
2141
- var handle$1 = { breadcrumb: () => /* @__PURE__ */ jsx(Breadcrumb$1, {}) };
2178
+ var handle = { breadcrumb: () => /* @__PURE__ */ jsx(Breadcrumb, {}) };
2142
2179
  var GuardedBarcodeTagsPage = () => /* @__PURE__ */ jsx(RbacGuard, {
2143
2180
  permission: "barcodes.read",
2144
2181
  children: /* @__PURE__ */ jsx(BarcodeTagsPage, {})
@@ -2170,43 +2207,6 @@ var GuardedBarcodeTagCreateModal = () => /* @__PURE__ */ jsx(RbacGuard, {
2170
2207
  permission: "barcodes.write",
2171
2208
  children: /* @__PURE__ */ jsx(BarcodeTagCreateModal, {})
2172
2209
  });
2173
- // src/admin/routes/barcodes/print/page.tsx
2174
- var BarcodePrintCenterPage = () => {
2175
- const studio = useBarcodeStudio();
2176
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Toaster, {}), /* @__PURE__ */ jsx(LayoutComposer, {
2177
- widgetsZonePrefix: "barcodes.print.details",
2178
- preferredLayoutId: CORE_LAYOUT_IDS.TWO_COLUMN,
2179
- sections: {
2180
- main: /* @__PURE__ */ jsx(LayoutComposer.Entry, {
2181
- id: "BarcodePrintDesignerSection",
2182
- children: /* @__PURE__ */ jsx(LabelPrintDesignerSection, {
2183
- form: studio.printForm,
2184
- onFormChange: studio.setPrintForm,
2185
- templates: studio.templates,
2186
- onRenderLabels: () => void studio.handleRenderLabels()
2187
- })
2188
- }),
2189
- side: /* @__PURE__ */ jsx(LayoutComposer.Entry, {
2190
- id: "BarcodePrintOutputSection",
2191
- children: /* @__PURE__ */ jsx(LabelPrintOutputSection, { output: studio.printOutput })
2192
- })
2193
- }
2194
- })] });
2195
- };
2196
- var Breadcrumb = () => {
2197
- const { t } = useTranslation();
2198
- return t("tabs.print");
2199
- };
2200
- var config = defineRouteConfig({
2201
- label: "tabs.print",
2202
- translationNs: "barcodes",
2203
- icon: DocumentText
2204
- });
2205
- var handle = { breadcrumb: () => /* @__PURE__ */ jsx(Breadcrumb, {}) };
2206
- var GuardedBarcodePrintCenterPage = () => /* @__PURE__ */ jsx(RbacGuard, {
2207
- permission: "barcodes.read",
2208
- children: /* @__PURE__ */ jsx(BarcodePrintCenterPage, {})
2209
- });
2210
2210
  var ar_default = {
2211
2211
  nav: { "label": "استوديو الباركود والملصقات" },
2212
2212
  header: {
@@ -3838,8 +3838,8 @@ var plugin = {
3838
3838
  }
3839
3839
  },
3840
3840
  {
3841
- Component: GuardedBarcodeStockTakePage,
3842
- path: "/barcodes/stock-take",
3841
+ Component: GuardedBarcodePrintCenterPage,
3842
+ path: "/barcodes/print",
3843
3843
  handle: {
3844
3844
  label: config$2.label,
3845
3845
  translationNs: config$2.translationNs,
@@ -3848,28 +3848,28 @@ var plugin = {
3848
3848
  }
3849
3849
  },
3850
3850
  {
3851
- Component: GuardedBarcodeTagsPage,
3852
- path: "/barcodes/tags",
3851
+ Component: GuardedBarcodeStockTakePage,
3852
+ path: "/barcodes/stock-take",
3853
3853
  handle: {
3854
3854
  label: config$1.label,
3855
3855
  translationNs: config$1.translationNs,
3856
3856
  permissions: config$1.permissions,
3857
3857
  ...handle$1
3858
- },
3859
- children: [{
3860
- Component: GuardedBarcodeTagCreateModal,
3861
- path: "/barcodes/tags/create"
3862
- }]
3858
+ }
3863
3859
  },
3864
3860
  {
3865
- Component: GuardedBarcodePrintCenterPage,
3866
- path: "/barcodes/print",
3861
+ Component: GuardedBarcodeTagsPage,
3862
+ path: "/barcodes/tags",
3867
3863
  handle: {
3868
3864
  label: config.label,
3869
3865
  translationNs: config.translationNs,
3870
3866
  permissions: config.permissions,
3871
3867
  ...handle
3872
- }
3868
+ },
3869
+ children: [{
3870
+ Component: GuardedBarcodeTagCreateModal,
3871
+ path: "/barcodes/tags/create"
3872
+ }]
3873
3873
  }
3874
3874
  ] },
3875
3875
  menuItemModule: { menuItems: [
@@ -3883,21 +3883,21 @@ var plugin = {
3883
3883
  permissions: void 0
3884
3884
  },
3885
3885
  {
3886
- label: config$4.label,
3887
- icon: config$4.icon,
3888
- path: "/barcodes/lookup",
3886
+ label: config$2.label,
3887
+ icon: config$2.icon,
3888
+ path: "/barcodes/print",
3889
3889
  nested: void 0,
3890
3890
  rank: void 0,
3891
- translationNs: config$4.translationNs,
3891
+ translationNs: config$2.translationNs,
3892
3892
  permissions: void 0
3893
3893
  },
3894
3894
  {
3895
- label: config.label,
3896
- icon: config.icon,
3897
- path: "/barcodes/print",
3895
+ label: config$4.label,
3896
+ icon: config$4.icon,
3897
+ path: "/barcodes/lookup",
3898
3898
  nested: void 0,
3899
3899
  rank: void 0,
3900
- translationNs: config.translationNs,
3900
+ translationNs: config$4.translationNs,
3901
3901
  permissions: void 0
3902
3902
  },
3903
3903
  {
@@ -3910,21 +3910,21 @@ var plugin = {
3910
3910
  permissions: void 0
3911
3911
  },
3912
3912
  {
3913
- label: config$2.label,
3914
- icon: config$2.icon,
3913
+ label: config$1.label,
3914
+ icon: config$1.icon,
3915
3915
  path: "/barcodes/stock-take",
3916
3916
  nested: void 0,
3917
3917
  rank: void 0,
3918
- translationNs: config$2.translationNs,
3918
+ translationNs: config$1.translationNs,
3919
3919
  permissions: void 0
3920
3920
  },
3921
3921
  {
3922
- label: config$1.label,
3923
- icon: config$1.icon,
3922
+ label: config.label,
3923
+ icon: config.icon,
3924
3924
  path: "/barcodes/tags",
3925
3925
  nested: void 0,
3926
3926
  rank: void 0,
3927
- translationNs: config$1.translationNs,
3927
+ translationNs: config.translationNs,
3928
3928
  permissions: void 0
3929
3929
  }
3930
3930
  ] },
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import { z } from "@medusajs/framework/zod";
2
2
  import { BARCODE_MODULE } from "../../../modules/barcode/types";
3
3
  const AdminListBarcodesQuerySchema = z.object({
4
4
  product_id: z.string().min(1).max(256).optional(),
@@ -24,4 +24,4 @@ export async function GET(req, res) {
24
24
  overview,
25
25
  });
26
26
  }
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL2FkbWluL2JhcmNvZGVzL3JvdXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxDQUFDLEVBQUUsTUFBTSxLQUFLLENBQUE7QUFFdkIsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGdDQUFnQyxDQUFBO0FBRS9ELE1BQU0sNEJBQTRCLEdBQUcsQ0FBQyxDQUFDLE1BQU0sQ0FBQztJQUM1QyxVQUFVLEVBQUUsQ0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsUUFBUSxFQUFFO0NBQ2xELENBQUMsQ0FBQTtBQUVGLE1BQU0sQ0FBQyxLQUFLLFVBQVUsR0FBRyxDQUFDLEdBQWtCLEVBQUUsR0FBbUI7SUFDL0QsTUFBTSxNQUFNLEdBQU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BQUE7SUFFekIsTUFBTSxTQUFTLEdBQUcsTUFBTSxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUE7SUFDeEMsTUFBTSxNQUFNLEdBQUcsU0FBUyxDQUFDLENBQUMsQ0FBQyxFQUFFLFVBQVUsRUFBRSxTQUFTLEVBQUUsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFBO0lBRXpELE1BQU0sQ0FBQyxlQUFlLEVBQUUsUUFBUSxDQUFDLEdBQUcsTUFBTSxPQUFPLENBQUMsR0FBRyxDQUFDO1FBQ3BELGNBQWMsQ0FBQyxtQkFBbUIsQ0FBQyxNQUFNLEVBQUUsRUFBRSxJQUFJLEVBQUUsR0FBRyxFQUFFLENBQUM7UUFDekQsY0FBYyxDQUFDLG9CQUFvQixFQUFFO0tBQ3RDLENBQUMsQ0FBQTtJQUVGLEdBQUcsQ0FBQyxJQUFJLENBQUM7UUFDUCxRQUFRLEVBQUUsZUFBZTtRQUN6QixLQUFLLEVBQUUsZUFBZSxDQUFDLE1BQU07UUFDN0IsUUFBUTtLQUNULENBQUMsQ0FBQTtBQUNKLENBQUMifQ==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vicacha-devs/medusa-plugin-barcode",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "description": "Unified 4-in-1 Barcode, GS1, Dynamic QR, Multi-Provider GTIN Lookup, Thermal/Sheet Label Printing (HTML/SVG & ZPL II), Anti-Counterfeit Verification & Warehouse Stock-Take Scanner plugin for Medusa v2.",
5
5
  "keywords": [
6
6
  "barcode",
@@ -22,6 +22,11 @@
22
22
  ],
23
23
  "license": "MIT",
24
24
  "author": "Vicacha Devs",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/Vicacha-Devs/medusa-plugins.git",
28
+ "directory": "packages/barcode"
29
+ },
25
30
  "files": [
26
31
  ".medusa/server",
27
32
  "src",
@@ -1,5 +1,5 @@
1
1
  import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
2
- import { z } from "zod"
2
+ import { z } from "@medusajs/framework/zod"
3
3
  import type { BarcodeModuleService } from "../../../modules/barcode/service"
4
4
  import { BARCODE_MODULE } from "../../../modules/barcode/types"
5
5