@atomsolution/sdk-merchant 1.6.1 → 1.6.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/batch-product-creation.cjs +45 -27
- package/dist/batch-product-creation.cjs.map +1 -1
- package/dist/batch-product-creation.esm.js +45 -27
- package/dist/batch-product-creation.esm.js.map +1 -1
- package/dist/batch-product-creation.js +45 -27
- package/dist/batch-product-creation.js.map +1 -1
- package/dist/components/common/modals/WrapModal.d.ts +2 -1
- package/package.json +1 -1
|
@@ -29168,32 +29168,48 @@ var Title = DialogTitle;
|
|
|
29168
29168
|
var Description = DialogDescription;
|
|
29169
29169
|
var Close = DialogClose;
|
|
29170
29170
|
const closeIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%206L6%2018'%20stroke='url(%23paint0_linear_10838_182207)'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6%206L18%2018'%20stroke='url(%23paint1_linear_10838_182207)'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_10838_182207'%20x1='6'%20y1='6.41753'%20x2='19.5738'%20y2='8.22863'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23001E3F'/%3e%3cstop%20offset='1'%20stop-color='%23181427'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_10838_182207'%20x1='18'%20y1='6.41753'%20x2='4.42619'%20y2='8.22863'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23001E3F'/%3e%3cstop%20offset='1'%20stop-color='%23181427'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";
|
|
29171
|
-
const WrapModal = ({
|
|
29172
|
-
|
|
29173
|
-
|
|
29174
|
-
|
|
29175
|
-
|
|
29176
|
-
|
|
29177
|
-
|
|
29178
|
-
|
|
29179
|
-
|
|
29180
|
-
|
|
29181
|
-
|
|
29182
|
-
|
|
29183
|
-
|
|
29184
|
-
|
|
29185
|
-
|
|
29186
|
-
|
|
29187
|
-
|
|
29188
|
-
|
|
29189
|
-
|
|
29190
|
-
|
|
29191
|
-
|
|
29192
|
-
|
|
29193
|
-
|
|
29194
|
-
|
|
29195
|
-
|
|
29196
|
-
|
|
29171
|
+
const WrapModal = ({
|
|
29172
|
+
open,
|
|
29173
|
+
className,
|
|
29174
|
+
disableClose = false,
|
|
29175
|
+
onClose,
|
|
29176
|
+
children
|
|
29177
|
+
}) => {
|
|
29178
|
+
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
29179
|
+
Root$1,
|
|
29180
|
+
{
|
|
29181
|
+
open,
|
|
29182
|
+
onOpenChange: (nextOpen) => {
|
|
29183
|
+
if (!nextOpen && disableClose) return;
|
|
29184
|
+
onClose();
|
|
29185
|
+
},
|
|
29186
|
+
children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(Portal, { children: [
|
|
29187
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Overlay, { className: "fixed inset-0 bg-black/30 data-[state=open]:animate-overlayShow" }),
|
|
29188
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
|
|
29189
|
+
Content,
|
|
29190
|
+
{
|
|
29191
|
+
className: dropdownMenuAbsolute.twMerge(
|
|
29192
|
+
"fixed left-1/2 top-1/2 max-h-[95vh] overflow-y-auto -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-white p-10 shadow-md focus:outline-none data-[state=open]:animate-contentShow",
|
|
29193
|
+
className
|
|
29194
|
+
),
|
|
29195
|
+
children: [
|
|
29196
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Title, {}),
|
|
29197
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Description, {}),
|
|
29198
|
+
children,
|
|
29199
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
29200
|
+
"img",
|
|
29201
|
+
{
|
|
29202
|
+
src: closeIcon,
|
|
29203
|
+
alt: "close",
|
|
29204
|
+
className: `absolute right-2.5 top-2.5 size-6 cursor-pointer ${disableClose ? "opacity-50 cursor-not-allowed" : ""}`
|
|
29205
|
+
}
|
|
29206
|
+
) })
|
|
29207
|
+
]
|
|
29208
|
+
}
|
|
29209
|
+
)
|
|
29210
|
+
] })
|
|
29211
|
+
}
|
|
29212
|
+
);
|
|
29197
29213
|
};
|
|
29198
29214
|
const ConfirmModal = ({
|
|
29199
29215
|
disable,
|
|
@@ -29205,7 +29221,7 @@ const ConfirmModal = ({
|
|
|
29205
29221
|
onConfirm,
|
|
29206
29222
|
onCancel
|
|
29207
29223
|
}) => {
|
|
29208
|
-
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(WrapModal, { open, onClose, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex flex-col w-full gap-8 max-w-[600px]", children: [
|
|
29224
|
+
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(WrapModal, { open, onClose, disableClose: disable, children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex flex-col w-full gap-8 max-w-[600px]", children: [
|
|
29209
29225
|
children,
|
|
29210
29226
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-4 w-full", children: [
|
|
29211
29227
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
@@ -29267,6 +29283,7 @@ const createProductsService = {
|
|
|
29267
29283
|
);
|
|
29268
29284
|
})
|
|
29269
29285
|
};
|
|
29286
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
29270
29287
|
const CreateProductConfirmModal = ({
|
|
29271
29288
|
checkedProducts,
|
|
29272
29289
|
numCheckedProducts,
|
|
@@ -29294,6 +29311,7 @@ const CreateProductConfirmModal = ({
|
|
|
29294
29311
|
}, taxDeductionMethod === "credit" ? { price_after_vat: (_b = product.priceAfterTax) != null ? _b : 0 } : {});
|
|
29295
29312
|
});
|
|
29296
29313
|
try {
|
|
29314
|
+
yield sleep(5e3);
|
|
29297
29315
|
const response = yield createProductsService.createProducts(
|
|
29298
29316
|
formattedProducts
|
|
29299
29317
|
);
|