@mercurjs/vendor 2.2.0-canary.12 → 2.2.0-canary.13

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.
Files changed (118) hide show
  1. package/dist/{[id]-Q4HX3TQU.js → [id]-ET35KT2M.js} +3 -3
  2. package/dist/{[id]-A55T2ORL.js → [id]-FALIOGXK.js} +3 -4
  3. package/dist/{[id]-GC3ZYPK4.js → [id]-GY5R652O.js} +5 -6
  4. package/dist/{[id]-GBT6VB4S.js → [id]-IGQTT3AM.js} +4 -5
  5. package/dist/{[id]-SHAJTJNZ.js → [id]-IW2AZE77.js} +5 -6
  6. package/dist/{[id]-FE5GYYVZ.js → [id]-OTK2NOXT.js} +3 -4
  7. package/dist/{[id]-WDBUNEJB.js → [id]-PEUI67SP.js} +2 -2
  8. package/dist/{[id]-T5ECVBPF.js → [id]-RFEYRBLI.js} +4 -5
  9. package/dist/{[id]-OWENEUQB.js → [id]-US6IULL2.js} +147 -441
  10. package/dist/{[id]-QOEO3JOV.js → [id]-YZSVSJWU.js} +3 -4
  11. package/dist/{[id]-QQU5HVFU.js → [id]-ZMLS73X5.js} +4 -5
  12. package/dist/{[province_id]-6GUA4PV5.js → [province_id]-J3OB2LZ4.js} +5 -6
  13. package/dist/{add-NTRYWOJF.js → add-XEUXK63F.js} +6 -7
  14. package/dist/{add-customer-groups-U5RZWW4B.js → add-customer-groups-HZNWWRVG.js} +3 -4
  15. package/dist/{add-products-Q4MMDQKT.js → add-products-E5GULF6B.js} +4 -5
  16. package/dist/{add-promotions-DH5CD5AT.js → add-promotions-KW5YZHLS.js} +3 -3
  17. package/dist/{address-77Y3AOQ3.js → address-6T4H6P7O.js} +3 -4
  18. package/dist/{breadcrumb-EVZIOB2G.js → breadcrumb-5HYIEPCL.js} +3 -4
  19. package/dist/{breadcrumb-TNJSGX4T.js → breadcrumb-HL7NKNX4.js} +3 -4
  20. package/dist/{breadcrumb-THJ2HPRB.js → breadcrumb-L3MFH4I2.js} +9 -8
  21. package/dist/{breadcrumb-5NP23D6X.js → breadcrumb-LKLWHB63.js} +4 -5
  22. package/dist/breadcrumb-ZMACILH3.js +28 -0
  23. package/dist/chunk-4WCPN4OA.js +315 -0
  24. package/dist/{chunk-23LX6FBE.js → chunk-5YCDZ4AU.js} +1 -1
  25. package/dist/{chunk-N77NE6O7.js → chunk-A6QH53CS.js} +8 -2
  26. package/dist/{chunk-TM76WRG2.js → chunk-AQTEEQWX.js} +1 -1
  27. package/dist/{chunk-K6LOZ4S3.js → chunk-DEJIBIQZ.js} +1 -1
  28. package/dist/{chunk-4LVP635F.js → chunk-DNEPOMOX.js} +125 -125
  29. package/dist/{chunk-CBRAKSMA.js → chunk-J7ZU2HZZ.js} +1 -1
  30. package/dist/{chunk-OZ44ATGE.js → chunk-KJWVLGXG.js} +2 -2
  31. package/dist/{chunk-LKUW5SV4.js → chunk-LDX23XPT.js} +1 -1
  32. package/dist/{chunk-55OUOPNF.js → chunk-MVYAN2RR.js} +4 -4
  33. package/dist/{chunk-TBYCZRZ7.js → chunk-R5QZO3QY.js} +14 -5
  34. package/dist/{chunk-UORPTGV2.js → chunk-SIEEMXNZ.js} +10 -14
  35. package/dist/chunk-SJT6A4AV.js +354 -0
  36. package/dist/{chunk-2UXFGPKI.js → chunk-STWHJLVV.js} +1 -1
  37. package/dist/{chunk-TYESCFYW.js → chunk-UDOBGAP7.js} +1 -1
  38. package/dist/{chunk-6K6EQOJF.js → chunk-VAOJVT7R.js} +1 -1
  39. package/dist/{chunk-VCOQ7WQ2.js → chunk-VMFC2UDJ.js} +1 -1
  40. package/dist/chunk-XQUF3WIS.js +159 -0
  41. package/dist/{chunk-7IPCLQ5V.js → chunk-YPTJETJQ.js} +2 -2
  42. package/dist/{chunk-X4GWB6AT.js → chunk-ZBSFGCWY.js} +2 -2
  43. package/dist/{chunk-7DBAV3KH.js → chunk-ZPH3WXJ6.js} +1 -1
  44. package/dist/{collections-URH2TCWJ.js → collections-HO2F62RN.js} +4 -5
  45. package/dist/{create-FKRYB7ZS.js → create-7EVR4N6N.js} +1 -1
  46. package/dist/{create-JF2OUZQA.js → create-DB4EYPJ5.js} +3 -4
  47. package/dist/{create-JGYG5SBM.js → create-EFMCNOR5.js} +6 -7
  48. package/dist/{create-MS6KKFSV.js → create-FBPPNBLQ.js} +3 -4
  49. package/dist/{create-ODOFJF5N.js → create-J5OLH7OJ.js} +7 -8
  50. package/dist/{create-O35JRZEF.js → create-QAEOARJO.js} +4 -5
  51. package/dist/{create-XEQZ6CLI.js → create-QZBCYHHQ.js} +8 -9
  52. package/dist/{create-A7B3MLJX.js → create-SLJ2BMH7.js} +5 -6
  53. package/dist/{create-GGACODDN.js → create-WQ5TM5IZ.js} +1 -1
  54. package/dist/{edit-2AAEQJEM.js → edit-3O6WVIMM.js} +5 -6
  55. package/dist/{edit-VVLITC2E.js → edit-G57GESSR.js} +1 -1
  56. package/dist/edit-PUZ23M7V.js +102 -0
  57. package/dist/{edit-G2E5SNGU.js → edit-PVJ3S4TW.js} +3 -4
  58. package/dist/{edit-2R5QCPTB.js → edit-RJE7L3PH.js} +3 -4
  59. package/dist/{edit-HTLLYECP.js → edit-TIRMXOLT.js} +6 -7
  60. package/dist/{edit-5CROKEJE.js → edit-W6WKYNOG.js} +5 -6
  61. package/dist/{edit-OKU6FMHJ.js → edit-WPX2ANVI.js} +3 -4
  62. package/dist/{edit-3E4ZO7HT.js → edit-YW4RBDPH.js} +6 -7
  63. package/dist/edit-price-5ICQPJ42.js +196 -0
  64. package/dist/edit-stock-KS2NFC2Z.js +229 -0
  65. package/dist/{fulfillment-76IVZ266.js → fulfillment-ZV2R43N2.js} +3 -4
  66. package/dist/{fulfillment-providers-G2L6LEVO.js → fulfillment-providers-KKCL25KA.js} +4 -5
  67. package/dist/index.css +6 -3
  68. package/dist/index.js +138 -102
  69. package/dist/{offer-inventory-batch-page-BD6PMDLW.js → inventory-5UNDKYDL.js} +12 -12
  70. package/dist/{invite-2673PU4I.js → invite-KKIJNMER.js} +6 -7
  71. package/dist/{invite-HRXZ5YBP.js → invite-P7I5BGOJ.js} +3 -4
  72. package/dist/loader-UZTTBKYF.js +33 -0
  73. package/dist/loader-WEJZTX5Q.js +34 -0
  74. package/dist/{login-TWUBU6I6.js → login-A65IAXSI.js} +4 -5
  75. package/dist/{media-LVQQTWOJ.js → media-EM3K4AWO.js} +6 -7
  76. package/dist/{metadata-Q74OJWUD.js → metadata-A5XZKPL4.js} +4 -5
  77. package/dist/{metadata-D6M66NQK.js → metadata-JFLFWXOS.js} +3 -4
  78. package/dist/{metadata-YVHJPDLD.js → metadata-SFO3J5O5.js} +3 -4
  79. package/dist/{metadata-NIDIBXJT.js → metadata-USXOQUIX.js} +3 -4
  80. package/dist/{metadata-REQIFWWH.js → metadata-WJ4CNB6I.js} +3 -4
  81. package/dist/{offer-create-page-E4FLSDJQ.js → offer-create-page-3PIJXHWZ.js} +169 -173
  82. package/dist/offer-detail-page-SPHP3XKC.js +580 -0
  83. package/dist/{offer-detail-page-6SIBQTLP.js → offer-variant-detail-page-KTHKV6WW.js} +144 -215
  84. package/dist/offers-GWMIEPCM.js +54 -0
  85. package/dist/{onboarding-MK2RIFD4.js → onboarding-JOGRNDPI.js} +3 -4
  86. package/dist/{orders-TVQDR4OJ.js → orders-Q2IKEJIM.js} +4 -5
  87. package/dist/{organization-XO3T2K2X.js → organization-HRYDC66D.js} +3 -4
  88. package/dist/pages/index.js +25 -27
  89. package/dist/{payment-details-CFTX3QDL.js → payment-details-YLPIR52N.js} +3 -4
  90. package/dist/{pricing-ECXV6K7G.js → pricing-ECJH4VXZ.js} +5 -6
  91. package/dist/{offer-pricing-edit-page-4TINK42V.js → pricing-EPNQ63NT.js} +15 -13
  92. package/dist/{product-tags-5O7ZG6SA.js → product-tags-WMC7G3C4.js} +5 -6
  93. package/dist/{product-variant-detail-PUWOMVHQ.js → product-variant-detail-BQL2NGVE.js} +3 -4
  94. package/dist/{products-6XWNKRLZ.js → products-LGQMESEZ.js} +10 -11
  95. package/dist/{products-BM3IIH5P.js → products-PQ3FG5KC.js} +4 -5
  96. package/dist/{professional-details-ED4HNYXY.js → professional-details-AASVGTUO.js} +3 -4
  97. package/dist/{profile-6TGCNNUU.js → profile-ZNQEDSDM.js} +3 -4
  98. package/dist/{promotions-ACIFBWUH.js → promotions-MFAFFHF3.js} +4 -4
  99. package/dist/{register-4AQP5DC3.js → register-3A6G6QNI.js} +5 -6
  100. package/dist/{reset-password-VSAY3YQX.js → reset-password-FV5762CA.js} +1 -1
  101. package/dist/{settings-2GCQQTO6.js → settings-OKNGWUKL.js} +12 -13
  102. package/dist/{shipment-HWQHMX2L.js → shipment-ZF7IRKKS.js} +3 -4
  103. package/dist/shipping-HWJPX34K.js +113 -0
  104. package/dist/{shipping-profiles-C5WBXWZ2.js → shipping-profiles-FZCKGCBU.js} +3 -4
  105. package/dist/{stock-MQA7PRO6.js → stock-FI5WXVWN.js} +4 -5
  106. package/dist/{store-5ZHZR4JI.js → store-VFRKJYMD.js} +3 -4
  107. package/dist/{store-closure-H5WHV3LA.js → store-closure-WZIWGESD.js} +3 -4
  108. package/dist/{store-select-PZS556FB.js → store-select-GKRDFGEY.js} +4 -5
  109. package/dist/{team-CLKJCZNH.js → team-CXEAYN7O.js} +3 -4
  110. package/package.json +1 -1
  111. package/dist/chunk-27KRIXMQ.js +0 -71
  112. package/dist/chunk-CFRWIQIZ.js +0 -43
  113. package/dist/chunk-RXV7INUV.js +0 -426
  114. package/dist/chunk-T6LHVNWO.js +0 -27
  115. package/dist/loader-VDYPD3RI.js +0 -31
  116. package/dist/offer-edit-page-3MO566RP.js +0 -151
  117. package/dist/offers-GVN5LCK6.js +0 -32
  118. package/dist/{chunk-SPOHNK4X.js → chunk-BPVMJN2D.js} +3 -3
@@ -4081,121 +4081,13 @@ function createDataGridHelper() {
4081
4081
  };
4082
4082
  }
4083
4083
 
4084
- // src/components/common/tax-badge/tax-badge.tsx
4085
- import { TaxExclusive, TaxInclusive } from "@medusajs/icons";
4086
- import { Tooltip as Tooltip3 } from "@medusajs/ui";
4087
- import { useTranslation as useTranslation5 } from "react-i18next";
4088
- import { jsx as jsx18 } from "react/jsx-runtime";
4089
- var IncludesTaxTooltip = ({
4090
- includesTax
4091
- }) => {
4092
- const { t } = useTranslation5();
4093
- return /* @__PURE__ */ jsx18(
4094
- Tooltip3,
4095
- {
4096
- maxWidth: 999,
4097
- content: includesTax ? t("general.includesTaxTooltip") : t("general.excludesTaxTooltip"),
4098
- children: includesTax ? /* @__PURE__ */ jsx18(TaxInclusive, { className: "text-ui-fg-muted shrink-0" }) : /* @__PURE__ */ jsx18(TaxExclusive, { className: "text-ui-fg-muted shrink-0" })
4099
- }
4100
- );
4101
- };
4102
-
4103
- // src/components/data-grid/helpers/create-data-grid-price-columns.tsx
4104
- import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
4105
- var createDataGridPriceColumns = ({
4106
- currencies: currencies2,
4107
- regions,
4108
- pricePreferences,
4109
- isReadyOnly,
4110
- getFieldName,
4111
- t
4112
- }) => {
4113
- const columnHelper = createDataGridHelper();
4114
- return [
4115
- ...currencies2?.map((currency) => {
4116
- const preference = pricePreferences?.find(
4117
- (p) => p.attribute === "currency_code" && p.value === currency
4118
- );
4119
- const translatedCurrencyName = t("fields.priceTemplate", {
4120
- regionOrCurrency: currency.toUpperCase()
4121
- });
4122
- return columnHelper.column({
4123
- id: `currency_prices.${currency}`,
4124
- name: t("fields.priceTemplate", {
4125
- regionOrCurrency: currency.toUpperCase()
4126
- }),
4127
- field: (context) => {
4128
- const isReadyOnlyValue = isReadyOnly?.(context);
4129
- if (isReadyOnlyValue) {
4130
- return null;
4131
- }
4132
- return getFieldName(context, currency);
4133
- },
4134
- type: "number",
4135
- header: () => /* @__PURE__ */ jsxs13("div", { className: "flex w-full items-center justify-between gap-3", children: [
4136
- /* @__PURE__ */ jsx19("span", { className: "truncate", title: translatedCurrencyName, children: translatedCurrencyName }),
4137
- /* @__PURE__ */ jsx19(IncludesTaxTooltip, { includesTax: preference?.is_tax_inclusive })
4138
- ] }),
4139
- cell: (context) => {
4140
- if (isReadyOnly?.(context)) {
4141
- return /* @__PURE__ */ jsx19(DataGridReadonlyCell, { context });
4142
- }
4143
- return /* @__PURE__ */ jsx19(DataGridCurrencyCell, { code: currency, context });
4144
- }
4145
- });
4146
- }) ?? [],
4147
- ...regions?.map((region) => {
4148
- const preference = pricePreferences?.find(
4149
- (p) => p.attribute === "region_id" && p.value === region.id
4150
- );
4151
- const translatedRegionName = t("fields.priceTemplate", {
4152
- regionOrCurrency: region.name
4153
- });
4154
- return columnHelper.column({
4155
- id: `region_prices.${region.id}`,
4156
- name: t("fields.priceTemplate", {
4157
- regionOrCurrency: region.name
4158
- }),
4159
- field: (context) => {
4160
- const isReadyOnlyValue = isReadyOnly?.(context);
4161
- if (isReadyOnlyValue) {
4162
- return null;
4163
- }
4164
- return getFieldName(context, region.id);
4165
- },
4166
- type: "number",
4167
- header: () => /* @__PURE__ */ jsxs13("div", { className: "flex w-full items-center justify-between gap-3", children: [
4168
- /* @__PURE__ */ jsx19("span", { className: "truncate", title: translatedRegionName, children: translatedRegionName }),
4169
- /* @__PURE__ */ jsx19(IncludesTaxTooltip, { includesTax: preference?.is_tax_inclusive })
4170
- ] }),
4171
- cell: (context) => {
4172
- if (isReadyOnly?.(context)) {
4173
- return /* @__PURE__ */ jsx19(DataGridReadonlyCell, { context });
4174
- }
4175
- const currency = currencies2?.find((c) => c === region.currency_code);
4176
- if (!currency) {
4177
- return null;
4178
- }
4179
- return /* @__PURE__ */ jsx19(
4180
- DataGridCurrencyCell,
4181
- {
4182
- code: region.currency_code,
4183
- context
4184
- }
4185
- );
4186
- }
4187
- });
4188
- }) ?? []
4189
- ];
4190
- };
4191
-
4192
4084
  // src/components/data-grid/components/data-grid-toggleable-number-cell.tsx
4193
4085
  import { Switch as Switch2 } from "@medusajs/ui";
4194
4086
  import { useEffect as useEffect10, useRef as useRef8, useState as useState13 } from "react";
4195
4087
  import CurrencyInput2 from "react-currency-input-field";
4196
4088
  import { Controller as Controller11 } from "react-hook-form";
4197
- import { useTranslation as useTranslation6 } from "react-i18next";
4198
- import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
4089
+ import { useTranslation as useTranslation5 } from "react-i18next";
4090
+ import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
4199
4091
  var DataGridTogglableNumberCell = ({
4200
4092
  context,
4201
4093
  disabledToggleTooltip,
@@ -4207,18 +4099,18 @@ var DataGridTogglableNumberCell = ({
4207
4099
  });
4208
4100
  const errorProps = useDataGridCellError({ context });
4209
4101
  const { container, input } = renderProps;
4210
- return /* @__PURE__ */ jsx20(
4102
+ return /* @__PURE__ */ jsx18(
4211
4103
  Controller11,
4212
4104
  {
4213
4105
  control,
4214
4106
  name: field,
4215
4107
  render: ({ field: field2 }) => {
4216
- return /* @__PURE__ */ jsx20(
4108
+ return /* @__PURE__ */ jsx18(
4217
4109
  DataGridCellContainer,
4218
4110
  {
4219
4111
  ...container,
4220
4112
  ...errorProps,
4221
- outerComponent: /* @__PURE__ */ jsx20(
4113
+ outerComponent: /* @__PURE__ */ jsx18(
4222
4114
  OuterComponent,
4223
4115
  {
4224
4116
  field: field2,
@@ -4227,7 +4119,7 @@ var DataGridTogglableNumberCell = ({
4227
4119
  tooltip: disabledToggleTooltip
4228
4120
  }
4229
4121
  ),
4230
- children: /* @__PURE__ */ jsx20(Inner8, { field: field2, inputProps: input, hideInput, ...rest })
4122
+ children: /* @__PURE__ */ jsx18(Inner8, { field: field2, inputProps: input, hideInput, ...rest })
4231
4123
  }
4232
4124
  );
4233
4125
  }
@@ -4268,12 +4160,12 @@ var OuterComponent = ({
4268
4160
  document.addEventListener("keydown", handleKeyDown);
4269
4161
  return () => document.removeEventListener("keydown", handleKeyDown);
4270
4162
  }, [isAnchor]);
4271
- return /* @__PURE__ */ jsx20(
4163
+ return /* @__PURE__ */ jsx18(
4272
4164
  ConditionalTooltip,
4273
4165
  {
4274
4166
  showTooltip: localValue.disabledToggle && tooltip,
4275
4167
  content: tooltip,
4276
- children: /* @__PURE__ */ jsx20("div", { className: "absolute inset-y-0 left-4 z-[3] flex w-fit items-center justify-center", children: /* @__PURE__ */ jsx20(
4168
+ children: /* @__PURE__ */ jsx18("div", { className: "absolute inset-y-0 left-4 z-[3] flex w-fit items-center justify-center", children: /* @__PURE__ */ jsx18(
4277
4169
  Switch2,
4278
4170
  {
4279
4171
  dir: "ltr",
@@ -4295,7 +4187,7 @@ var Inner8 = ({
4295
4187
  hideInput,
4296
4188
  ...props
4297
4189
  }) => {
4298
- const { t } = useTranslation6();
4190
+ const { t } = useTranslation5();
4299
4191
  const { ref, value, onChange: _, onBlur, ...fieldProps } = field;
4300
4192
  const {
4301
4193
  ref: inputRef,
@@ -4324,8 +4216,8 @@ var Inner8 = ({
4324
4216
  onChange(localValue, value);
4325
4217
  };
4326
4218
  if (hideInput) {
4327
- return /* @__PURE__ */ jsxs14("div", { className: "flex size-full items-center gap-x-2 pl-8", children: [
4328
- /* @__PURE__ */ jsx20(
4219
+ return /* @__PURE__ */ jsxs13("div", { className: "flex size-full items-center gap-x-2 pl-8", children: [
4220
+ /* @__PURE__ */ jsx18(
4329
4221
  "input",
4330
4222
  {
4331
4223
  ref: combinedRefs,
@@ -4339,10 +4231,10 @@ var Inner8 = ({
4339
4231
  readOnly: true
4340
4232
  }
4341
4233
  ),
4342
- /* @__PURE__ */ jsx20("span", { className: "txt-compact-small text-ui-fg-subtle", children: localValue?.checked ? t("dataGrid.toggle.enabled") : t("dataGrid.toggle.notEnabled") })
4234
+ /* @__PURE__ */ jsx18("span", { className: "txt-compact-small text-ui-fg-subtle", children: localValue?.checked ? t("dataGrid.toggle.enabled") : t("dataGrid.toggle.notEnabled") })
4343
4235
  ] });
4344
4236
  }
4345
- return /* @__PURE__ */ jsx20("div", { className: "flex size-full items-center gap-x-2", children: /* @__PURE__ */ jsx20(
4237
+ return /* @__PURE__ */ jsx18("div", { className: "flex size-full items-center gap-x-2", children: /* @__PURE__ */ jsx18(
4346
4238
  CurrencyInput2,
4347
4239
  {
4348
4240
  ...fieldProps,
@@ -4368,7 +4260,7 @@ var Inner8 = ({
4368
4260
  };
4369
4261
 
4370
4262
  // src/components/data-grid/helpers/create-data-grid-location-stock-columns.tsx
4371
- import { jsx as jsx21 } from "react/jsx-runtime";
4263
+ import { jsx as jsx19 } from "react/jsx-runtime";
4372
4264
  var createDataGridLocationStockColumns = ({
4373
4265
  stockLocations,
4374
4266
  isReadyOnly,
@@ -4389,12 +4281,12 @@ var createDataGridLocationStockColumns = ({
4389
4281
  return getFieldName(context, index);
4390
4282
  },
4391
4283
  type: "togglable-number",
4392
- header: () => /* @__PURE__ */ jsx21("div", { className: "flex w-full items-center justify-between gap-3", children: /* @__PURE__ */ jsx21("span", { className: "truncate", title: stockLocation.name, children: stockLocation.name }) }),
4284
+ header: () => /* @__PURE__ */ jsx19("div", { className: "flex w-full items-center justify-between gap-3", children: /* @__PURE__ */ jsx19("span", { className: "truncate", title: stockLocation.name, children: stockLocation.name }) }),
4393
4285
  cell: (context) => {
4394
4286
  if (isReadyOnly?.(context)) {
4395
- return /* @__PURE__ */ jsx21(DataGridReadonlyCell, { context });
4287
+ return /* @__PURE__ */ jsx19(DataGridReadonlyCell, { context });
4396
4288
  }
4397
- return /* @__PURE__ */ jsx21(
4289
+ return /* @__PURE__ */ jsx19(
4398
4290
  DataGridTogglableNumberCell,
4399
4291
  {
4400
4292
  context,
@@ -4407,6 +4299,114 @@ var createDataGridLocationStockColumns = ({
4407
4299
  ];
4408
4300
  };
4409
4301
 
4302
+ // src/components/common/tax-badge/tax-badge.tsx
4303
+ import { TaxExclusive, TaxInclusive } from "@medusajs/icons";
4304
+ import { Tooltip as Tooltip3 } from "@medusajs/ui";
4305
+ import { useTranslation as useTranslation6 } from "react-i18next";
4306
+ import { jsx as jsx20 } from "react/jsx-runtime";
4307
+ var IncludesTaxTooltip = ({
4308
+ includesTax
4309
+ }) => {
4310
+ const { t } = useTranslation6();
4311
+ return /* @__PURE__ */ jsx20(
4312
+ Tooltip3,
4313
+ {
4314
+ maxWidth: 999,
4315
+ content: includesTax ? t("general.includesTaxTooltip") : t("general.excludesTaxTooltip"),
4316
+ children: includesTax ? /* @__PURE__ */ jsx20(TaxInclusive, { className: "text-ui-fg-muted shrink-0" }) : /* @__PURE__ */ jsx20(TaxExclusive, { className: "text-ui-fg-muted shrink-0" })
4317
+ }
4318
+ );
4319
+ };
4320
+
4321
+ // src/components/data-grid/helpers/create-data-grid-price-columns.tsx
4322
+ import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
4323
+ var createDataGridPriceColumns = ({
4324
+ currencies: currencies2,
4325
+ regions,
4326
+ pricePreferences,
4327
+ isReadyOnly,
4328
+ getFieldName,
4329
+ t
4330
+ }) => {
4331
+ const columnHelper = createDataGridHelper();
4332
+ return [
4333
+ ...currencies2?.map((currency) => {
4334
+ const preference = pricePreferences?.find(
4335
+ (p) => p.attribute === "currency_code" && p.value === currency
4336
+ );
4337
+ const translatedCurrencyName = t("fields.priceTemplate", {
4338
+ regionOrCurrency: currency.toUpperCase()
4339
+ });
4340
+ return columnHelper.column({
4341
+ id: `currency_prices.${currency}`,
4342
+ name: t("fields.priceTemplate", {
4343
+ regionOrCurrency: currency.toUpperCase()
4344
+ }),
4345
+ field: (context) => {
4346
+ const isReadyOnlyValue = isReadyOnly?.(context);
4347
+ if (isReadyOnlyValue) {
4348
+ return null;
4349
+ }
4350
+ return getFieldName(context, currency);
4351
+ },
4352
+ type: "number",
4353
+ header: () => /* @__PURE__ */ jsxs14("div", { className: "flex w-full items-center justify-between gap-3", children: [
4354
+ /* @__PURE__ */ jsx21("span", { className: "truncate", title: translatedCurrencyName, children: translatedCurrencyName }),
4355
+ /* @__PURE__ */ jsx21(IncludesTaxTooltip, { includesTax: preference?.is_tax_inclusive })
4356
+ ] }),
4357
+ cell: (context) => {
4358
+ if (isReadyOnly?.(context)) {
4359
+ return /* @__PURE__ */ jsx21(DataGridReadonlyCell, { context });
4360
+ }
4361
+ return /* @__PURE__ */ jsx21(DataGridCurrencyCell, { code: currency, context });
4362
+ }
4363
+ });
4364
+ }) ?? [],
4365
+ ...regions?.map((region) => {
4366
+ const preference = pricePreferences?.find(
4367
+ (p) => p.attribute === "region_id" && p.value === region.id
4368
+ );
4369
+ const translatedRegionName = t("fields.priceTemplate", {
4370
+ regionOrCurrency: region.name
4371
+ });
4372
+ return columnHelper.column({
4373
+ id: `region_prices.${region.id}`,
4374
+ name: t("fields.priceTemplate", {
4375
+ regionOrCurrency: region.name
4376
+ }),
4377
+ field: (context) => {
4378
+ const isReadyOnlyValue = isReadyOnly?.(context);
4379
+ if (isReadyOnlyValue) {
4380
+ return null;
4381
+ }
4382
+ return getFieldName(context, region.id);
4383
+ },
4384
+ type: "number",
4385
+ header: () => /* @__PURE__ */ jsxs14("div", { className: "flex w-full items-center justify-between gap-3", children: [
4386
+ /* @__PURE__ */ jsx21("span", { className: "truncate", title: translatedRegionName, children: translatedRegionName }),
4387
+ /* @__PURE__ */ jsx21(IncludesTaxTooltip, { includesTax: preference?.is_tax_inclusive })
4388
+ ] }),
4389
+ cell: (context) => {
4390
+ if (isReadyOnly?.(context)) {
4391
+ return /* @__PURE__ */ jsx21(DataGridReadonlyCell, { context });
4392
+ }
4393
+ const currency = currencies2?.find((c) => c === region.currency_code);
4394
+ if (!currency) {
4395
+ return null;
4396
+ }
4397
+ return /* @__PURE__ */ jsx21(
4398
+ DataGridCurrencyCell,
4399
+ {
4400
+ code: region.currency_code,
4401
+ context
4402
+ }
4403
+ );
4404
+ }
4405
+ });
4406
+ }) ?? []
4407
+ ];
4408
+ };
4409
+
4410
4410
  export {
4411
4411
  useCombinedRefs,
4412
4412
  useDataGridCell,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-7DBAV3KH.js";
4
+ } from "./chunk-ZPH3WXJ6.js";
5
5
  import {
6
6
  usePromotionTableFilters
7
7
  } from "./chunk-S2WEYEQR.js";
@@ -39,7 +39,7 @@ import {
39
39
  } from "./chunk-MJCL3WID.js";
40
40
  import {
41
41
  useProductTableFilters
42
- } from "./chunk-K6LOZ4S3.js";
42
+ } from "./chunk-DEJIBIQZ.js";
43
43
  import {
44
44
  _DataTable,
45
45
  useDataTable
@@ -50,7 +50,7 @@ import {
50
50
  } from "./chunk-GDWBOQI5.js";
51
51
  import {
52
52
  useProductTags
53
- } from "./chunk-TBYCZRZ7.js";
53
+ } from "./chunk-R5QZO3QY.js";
54
54
  import {
55
55
  useProductTypes
56
56
  } from "./chunk-VV6IKGCN.js";
@@ -9,7 +9,7 @@ import {
9
9
  useCombinedRefs,
10
10
  useDataGridCell,
11
11
  useDataGridCellError
12
- } from "./chunk-4LVP635F.js";
12
+ } from "./chunk-DNEPOMOX.js";
13
13
  import {
14
14
  currencies
15
15
  } from "./chunk-IQPN4PZJ.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DataGrid,
3
3
  createDataGridHelper
4
- } from "./chunk-4LVP635F.js";
4
+ } from "./chunk-DNEPOMOX.js";
5
5
  import {
6
6
  HandleInput
7
7
  } from "./chunk-HJ56YXBU.js";
@@ -19,14 +19,14 @@ import {
19
19
  } from "./chunk-OVPAOBZB.js";
20
20
  import {
21
21
  UploadMediaFormItem
22
- } from "./chunk-TM76WRG2.js";
22
+ } from "./chunk-AQTEEQWX.js";
23
23
  import {
24
24
  PRODUCT_CREATE_FORM_DEFAULTS,
25
25
  ProductCreateSchema,
26
26
  decorateVariantsWithDefaultValues,
27
27
  generateVariantsFromAttributes,
28
28
  normalizeProductFormValues
29
- } from "./chunk-23LX6FBE.js";
29
+ } from "./chunk-5YCDZ4AU.js";
30
30
  import {
31
31
  ChipInput
32
32
  } from "./chunk-YGRTRAWX.js";
@@ -58,7 +58,7 @@ import {
58
58
  } from "./chunk-UCYSCKZV.js";
59
59
  import {
60
60
  useFeatureFlags
61
- } from "./chunk-TBYCZRZ7.js";
61
+ } from "./chunk-R5QZO3QY.js";
62
62
  import {
63
63
  ActionMenu
64
64
  } from "./chunk-BDGZ4EQO.js";
@@ -177,15 +177,24 @@ var useMarkPaymentCollectionAsPaid = (orderId, paymentCollectionId, options) =>
177
177
  });
178
178
  };
179
179
 
180
+ // src/hooks/api/product-variants.tsx
181
+ import {
182
+ useQuery as useQuery6
183
+ } from "@tanstack/react-query";
184
+ var PRODUCT_VARIANT_QUERY_KEY = "product_variant";
185
+ var productVariantQueryKeys = queryKeysFactory(
186
+ PRODUCT_VARIANT_QUERY_KEY
187
+ );
188
+
180
189
  // src/hooks/api/regions.tsx
181
190
  import {
182
191
  useMutation as useMutation5,
183
- useQuery as useQuery6
192
+ useQuery as useQuery7
184
193
  } from "@tanstack/react-query";
185
194
  var REGIONS_QUERY_KEY = "regions";
186
195
  var regionsQueryKeys = queryKeysFactory(REGIONS_QUERY_KEY);
187
196
  var useRegions = (query, options) => {
188
- const { data, ...rest } = useQuery6({
197
+ const { data, ...rest } = useQuery7({
189
198
  queryFn: () => sdk.vendor.regions.query({ ...query }),
190
199
  queryKey: regionsQueryKeys.list(query),
191
200
  ...options
@@ -196,7 +205,7 @@ var useRegions = (query, options) => {
196
205
  // src/hooks/api/shipping-option-types.tsx
197
206
  import {
198
207
  useMutation as useMutation6,
199
- useQuery as useQuery7
208
+ useQuery as useQuery8
200
209
  } from "@tanstack/react-query";
201
210
  var SHIPPING_OPTION_TYPES_QUERY_KEY = "shipping_option_types";
202
211
  var shippingOptionTypesQueryKeys = queryKeysFactory(
@@ -204,7 +213,7 @@ var shippingOptionTypesQueryKeys = queryKeysFactory(
204
213
  );
205
214
 
206
215
  // src/hooks/api/store.tsx
207
- import { useQuery as useQuery8 } from "@tanstack/react-query";
216
+ import { useQuery as useQuery9 } from "@tanstack/react-query";
208
217
  import { ClientError } from "@mercurjs/client";
209
218
  var STORE_QUERY_KEY = "store";
210
219
  var storeQueryKeys = queryKeysFactory(STORE_QUERY_KEY);
@@ -217,7 +226,7 @@ async function retrieveActiveStore(query) {
217
226
  return { store: activeStore };
218
227
  }
219
228
  var useStore = (query, options) => {
220
- const { data, ...rest } = useQuery8({
229
+ const { data, ...rest } = useQuery9({
221
230
  queryFn: () => retrieveActiveStore(query),
222
231
  queryKey: storeQueryKeys.details(),
223
232
  ...options
@@ -1,3 +1,6 @@
1
+ import {
2
+ productsQueryKeys
3
+ } from "./chunk-JAUZ73XE.js";
1
4
  import {
2
5
  queryClient
3
6
  } from "./chunk-RHKRREUU.js";
@@ -39,6 +42,9 @@ var useBulkCreateOffers = (options) => {
39
42
  queryClient.invalidateQueries({
40
43
  queryKey: offerQueryKeys.lists()
41
44
  });
45
+ queryClient.invalidateQueries({
46
+ queryKey: productsQueryKeys.all
47
+ });
42
48
  options?.onSuccess?.(data, variables, context);
43
49
  },
44
50
  ...options
@@ -52,21 +58,9 @@ var useUpdateOffer = (id, options) => {
52
58
  queryKey: offerQueryKeys.lists()
53
59
  });
54
60
  queryClient.invalidateQueries({
55
- queryKey: offerQueryKeys.detail(id)
61
+ queryKey: productsQueryKeys.all
56
62
  });
57
- options?.onSuccess?.(data, variables, context);
58
- },
59
- ...options
60
- });
61
- };
62
- var useDeleteOffer = (id, options) => {
63
- return useMutation({
64
- mutationFn: () => sdk.vendor.offers.$id.delete({ $id: id }),
65
- onSuccess: (data, variables, context) => {
66
63
  queryClient.invalidateQueries({
67
- queryKey: offerQueryKeys.lists()
68
- });
69
- queryClient.removeQueries({
70
64
  queryKey: offerQueryKeys.detail(id)
71
65
  });
72
66
  options?.onSuccess?.(data, variables, context);
@@ -92,6 +86,9 @@ var useBulkDeleteOffers = (options) => {
92
86
  queryClient.invalidateQueries({
93
87
  queryKey: offerQueryKeys.lists()
94
88
  });
89
+ queryClient.invalidateQueries({
90
+ queryKey: productsQueryKeys.all
91
+ });
95
92
  result.succeeded.forEach((id) => {
96
93
  queryClient.removeQueries({
97
94
  queryKey: offerQueryKeys.detail(id)
@@ -109,6 +106,5 @@ export {
109
106
  useOffer,
110
107
  useBulkCreateOffers,
111
108
  useUpdateOffer,
112
- useDeleteOffer,
113
109
  useBulkDeleteOffers
114
110
  };