@unchainedshop/admin-ui 5.0.0-alpha.2 → 5.0.0-alpha.4
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/README.md +112 -0
- package/dist/chunk-45H2WVIC.js +51 -0
- package/dist/chunk-4VNS5WPM.js +37 -0
- package/dist/chunk-54DKBWXV.js +33 -0
- package/dist/chunk-6TXD4TA7.js +1196 -0
- package/dist/chunk-BGCKJQGS.js +58 -0
- package/dist/chunk-BYXBJQAS.js +1 -0
- package/dist/chunk-EJDZRZSZ.js +59 -0
- package/dist/chunk-ELPURWDC.js +75 -0
- package/dist/chunk-IAQPLRXZ.js +16 -0
- package/dist/chunk-ILYPJE4N.js +57 -0
- package/dist/chunk-IXBMHOB5.js +13 -0
- package/dist/chunk-KH5MK6ZW.js +18 -0
- package/dist/chunk-NT7RB7AK.js +70 -0
- package/dist/chunk-OKGJ6HDE.js +26 -0
- package/dist/chunk-Q6S3LBUF.js +180 -0
- package/dist/chunk-QNLGYFV7.js +22 -0
- package/dist/chunk-RAQV2GYF.js +70 -0
- package/dist/chunk-RHUFQVKL.js +514 -0
- package/dist/chunk-RVG6IOFC.js +11 -0
- package/dist/chunk-SRAAKMWY.js +39 -0
- package/dist/chunk-UFYR5WZT.js +165 -0
- package/dist/chunk-UXG7EYHC.js +614 -0
- package/dist/chunk-VDKQGOMV.js +840 -0
- package/dist/chunk-XHOCXPD5.js +9 -0
- package/dist/chunk-XJBPMIC4.js +284 -0
- package/dist/chunk-YO6PT7KD.js +13 -0
- package/dist/chunk-YSKZE2KN.js +652 -0
- package/dist/components/ui/Accordion/Accordion.d.ts +11 -0
- package/dist/components/ui/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/ui/Accordion/AccordionHeader.d.ts +6 -0
- package/dist/components/ui/Accordion/AccordionHeader.d.ts.map +1 -0
- package/dist/components/ui/Accordion/AccordionItem.d.ts +11 -0
- package/dist/components/ui/Accordion/AccordionItem.d.ts.map +1 -0
- package/dist/components/ui/ActiveInActive.d.ts +10 -0
- package/dist/components/ui/ActiveInActive.d.ts.map +1 -0
- package/dist/components/ui/AnimatedCounter.d.ts +7 -0
- package/dist/components/ui/AnimatedCounter.d.ts.map +1 -0
- package/dist/components/ui/Badge.d.ts +10 -0
- package/dist/components/ui/Badge.d.ts.map +1 -0
- package/dist/components/ui/BreadCrumbs.d.ts +7 -0
- package/dist/components/ui/BreadCrumbs.d.ts.map +1 -0
- package/dist/components/ui/Button.d.ts +36 -0
- package/dist/components/ui/Button.d.ts.map +1 -0
- package/dist/components/ui/CopyableText.d.ts +5 -0
- package/dist/components/ui/CopyableText.d.ts.map +1 -0
- package/dist/components/ui/DateInput.d.ts +15 -0
- package/dist/components/ui/DateInput.d.ts.map +1 -0
- package/dist/components/ui/DateRangeFilterInput.d.ts +4 -0
- package/dist/components/ui/DateRangeFilterInput.d.ts.map +1 -0
- package/dist/components/ui/DetailHeader.d.ts +6 -0
- package/dist/components/ui/DetailHeader.d.ts.map +1 -0
- package/dist/components/ui/DraggableIcon.d.ts +3 -0
- package/dist/components/ui/DraggableIcon.d.ts.map +1 -0
- package/dist/components/ui/ErrorBoundary.d.ts +18 -0
- package/dist/components/ui/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/ui/ErrorFallback.d.ts +6 -0
- package/dist/components/ui/ErrorFallback.d.ts.map +1 -0
- package/dist/components/ui/HelpText.d.ts +11 -0
- package/dist/components/ui/HelpText.d.ts.map +1 -0
- package/dist/components/ui/ImageWithFallback.d.ts +7 -0
- package/dist/components/ui/ImageWithFallback.d.ts.map +1 -0
- package/dist/components/ui/InfoTextBanner.d.ts +6 -0
- package/dist/components/ui/InfoTextBanner.d.ts.map +1 -0
- package/dist/components/ui/JSONView.d.ts +6 -0
- package/dist/components/ui/JSONView.d.ts.map +1 -0
- package/dist/components/ui/ListHeader.d.ts +6 -0
- package/dist/components/ui/ListHeader.d.ts.map +1 -0
- package/dist/components/ui/Loading.d.ts +3 -0
- package/dist/components/ui/Loading.d.ts.map +1 -0
- package/dist/components/ui/NoData.d.ts +7 -0
- package/dist/components/ui/NoData.d.ts.map +1 -0
- package/dist/components/ui/NoImage.d.ts +7 -0
- package/dist/components/ui/NoImage.d.ts.map +1 -0
- package/dist/components/ui/NoImageSvg.d.ts +8 -0
- package/dist/components/ui/NoImageSvg.d.ts.map +1 -0
- package/dist/components/ui/PageHeader.d.ts +11 -0
- package/dist/components/ui/PageHeader.d.ts.map +1 -0
- package/dist/components/ui/Pagination.d.ts +8 -0
- package/dist/components/ui/Pagination.d.ts.map +1 -0
- package/dist/components/ui/Portal/Portal.d.ts +16 -0
- package/dist/components/ui/Portal/Portal.d.ts.map +1 -0
- package/dist/components/ui/Portal/Portal.types.d.ts +16 -0
- package/dist/components/ui/Portal/Portal.types.d.ts.map +1 -0
- package/dist/components/ui/SaveAndCancelButtons.d.ts +10 -0
- package/dist/components/ui/SaveAndCancelButtons.d.ts.map +1 -0
- package/dist/components/ui/SearchField.d.ts +7 -0
- package/dist/components/ui/SearchField.d.ts.map +1 -0
- package/dist/components/ui/Tab.d.ts +18 -0
- package/dist/components/ui/Tab.d.ts.map +1 -0
- package/dist/components/ui/Tag/TagInput.d.ts +14 -0
- package/dist/components/ui/Tag/TagInput.d.ts.map +1 -0
- package/dist/components/ui/Tag/TagList.d.ts +8 -0
- package/dist/components/ui/Tag/TagList.d.ts.map +1 -0
- package/dist/components/ui/Tag/TagListForm.d.ts +8 -0
- package/dist/components/ui/Tag/TagListForm.d.ts.map +1 -0
- package/dist/components/ui/Toggle.d.ts +11 -0
- package/dist/components/ui/Toggle.d.ts.map +1 -0
- package/dist/components/ui/ToolTip.d.ts +7 -0
- package/dist/components/ui/ToolTip.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/chart.d.ts +42 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/form/CheckboxField.d.ts +4 -0
- package/dist/components/ui/form/CheckboxField.d.ts.map +1 -0
- package/dist/components/ui/form/ChoicesField.d.ts +12 -0
- package/dist/components/ui/form/ChoicesField.d.ts.map +1 -0
- package/dist/components/ui/form/Combobox.d.ts +20 -0
- package/dist/components/ui/form/Combobox.d.ts.map +1 -0
- package/dist/components/ui/form/DatePickerField.d.ts +4 -0
- package/dist/components/ui/form/DatePickerField.d.ts.map +1 -0
- package/dist/components/ui/form/EmailField.d.ts +7 -0
- package/dist/components/ui/form/EmailField.d.ts.map +1 -0
- package/dist/components/ui/form/FieldWithHelp.d.ts +10 -0
- package/dist/components/ui/form/FieldWithHelp.d.ts.map +1 -0
- package/dist/components/ui/form/FieldWrapper.d.ts +8 -0
- package/dist/components/ui/form/FieldWrapper.d.ts.map +1 -0
- package/dist/components/ui/form/FormErrors.d.ts +6 -0
- package/dist/components/ui/form/FormErrors.d.ts.map +1 -0
- package/dist/components/ui/form/JSONAreaField.d.ts +7 -0
- package/dist/components/ui/form/JSONAreaField.d.ts.map +1 -0
- package/dist/components/ui/form/MarkdownTextAreaField.d.ts +8 -0
- package/dist/components/ui/form/MarkdownTextAreaField.d.ts.map +1 -0
- package/dist/components/ui/form/PasswordField.d.ts +3 -0
- package/dist/components/ui/form/PasswordField.d.ts.map +1 -0
- package/dist/components/ui/form/SelectField.d.ts +11 -0
- package/dist/components/ui/form/SelectField.d.ts.map +1 -0
- package/dist/components/ui/form/SubmitButton.d.ts +9 -0
- package/dist/components/ui/form/SubmitButton.d.ts.map +1 -0
- package/dist/components/ui/form/TagInputField.d.ts +6 -0
- package/dist/components/ui/form/TagInputField.d.ts.map +1 -0
- package/dist/components/ui/form/TextAreaField.d.ts +8 -0
- package/dist/components/ui/form/TextAreaField.d.ts.map +1 -0
- package/dist/components/ui/form/TextField.d.ts +10 -0
- package/dist/components/ui/form/TextField.d.ts.map +1 -0
- package/dist/components/ui/form/index.d.ts +17 -0
- package/dist/components/ui/form/index.d.ts.map +1 -0
- package/dist/components/ui/icons.d.ts +4 -0
- package/dist/components/ui/icons.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +41 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/form.js +30077 -0
- package/dist/gql/types.d.ts +17209 -0
- package/dist/gql/types.d.ts.map +1 -0
- package/dist/hooks.js +41 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/modal.js +114 -0
- package/dist/modules/UnchainedContext/UnchainedContext.d.ts +8 -0
- package/dist/modules/UnchainedContext/UnchainedContext.d.ts.map +1 -0
- package/dist/modules/UnchainedContext/useUnchainedContext.d.ts +7 -0
- package/dist/modules/UnchainedContext/useUnchainedContext.d.ts.map +1 -0
- package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts +3 -0
- package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts.map +1 -0
- package/dist/modules/accounts/fragment/UserFragment.d.ts +3 -0
- package/dist/modules/accounts/fragment/UserFragment.d.ts.map +1 -0
- package/dist/modules/accounts/hooks/useCurrentUser.d.ts +10 -0
- package/dist/modules/accounts/hooks/useCurrentUser.d.ts.map +1 -0
- package/dist/modules/accounts/hooks/useUsersCount.d.ts +8 -0
- package/dist/modules/accounts/hooks/useUsersCount.d.ts.map +1 -0
- package/dist/modules/accounts.js +1013 -0
- package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts +8 -0
- package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts.map +1 -0
- package/dist/modules/assortment.js +1121 -0
- package/dist/modules/common/components/AppContext.d.ts +18 -0
- package/dist/modules/common/components/AppContext.d.ts.map +1 -0
- package/dist/modules/common/components/FormWrapper.d.ts +8 -0
- package/dist/modules/common/components/FormWrapper.d.ts.map +1 -0
- package/dist/modules/common/components/ThemeWrapper.d.ts +10 -0
- package/dist/modules/common/components/ThemeWrapper.d.ts.map +1 -0
- package/dist/modules/common/data/iso-codes.d.ts +4 -0
- package/dist/modules/common/data/iso-codes.d.ts.map +1 -0
- package/dist/modules/common/data/miscellaneous.d.ts +51 -0
- package/dist/modules/common/data/miscellaneous.d.ts.map +1 -0
- package/dist/modules/common/fragments/AddressFragment.d.ts +3 -0
- package/dist/modules/common/fragments/AddressFragment.d.ts.map +1 -0
- package/dist/modules/common/hooks/useApp.d.ts +11 -0
- package/dist/modules/common/hooks/useApp.d.ts.map +1 -0
- package/dist/modules/common/hooks/useCSVExport.d.ts +10 -0
- package/dist/modules/common/hooks/useCSVExport.d.ts.map +1 -0
- package/dist/modules/common/hooks/useCSVImport.d.ts +18 -0
- package/dist/modules/common/hooks/useCSVImport.d.ts.map +1 -0
- package/dist/modules/common/hooks/useChatEndpointChecker.d.ts +5 -0
- package/dist/modules/common/hooks/useChatEndpointChecker.d.ts.map +1 -0
- package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts +10 -0
- package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts.map +1 -0
- package/dist/modules/common/hooks/useDashboardMetrics.d.ts +23 -0
- package/dist/modules/common/hooks/useDashboardMetrics.d.ts.map +1 -0
- package/dist/modules/common/hooks/useLocalStorage.d.ts +3 -0
- package/dist/modules/common/hooks/useLocalStorage.d.ts.map +1 -0
- package/dist/modules/common/hooks/useOrderAnalytics.d.ts +25 -0
- package/dist/modules/common/hooks/useOrderAnalytics.d.ts.map +1 -0
- package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts +16 -0
- package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts.map +1 -0
- package/dist/modules/common/hooks/useOutsideClick.d.ts +3 -0
- package/dist/modules/common/hooks/useOutsideClick.d.ts.map +1 -0
- package/dist/modules/common/hooks/usePortal.d.ts +20 -0
- package/dist/modules/common/hooks/usePortal.d.ts.map +1 -0
- package/dist/modules/common/hooks/useShopConfiguration.d.ts +8 -0
- package/dist/modules/common/hooks/useShopConfiguration.d.ts.map +1 -0
- package/dist/modules/common/hooks/useShopInfo.d.ts +41 -0
- package/dist/modules/common/hooks/useShopInfo.d.ts.map +1 -0
- package/dist/modules/common/hooks/useStatusTypes.d.ts +10 -0
- package/dist/modules/common/hooks/useStatusTypes.d.ts.map +1 -0
- package/dist/modules/common/hooks/useSystemRoles.d.ts +7 -0
- package/dist/modules/common/hooks/useSystemRoles.d.ts.map +1 -0
- package/dist/modules/common/hooks/useTheme.d.ts +7 -0
- package/dist/modules/common/hooks/useTheme.d.ts.map +1 -0
- package/dist/modules/common/utils/deBounce.d.ts +3 -0
- package/dist/modules/common/utils/deBounce.d.ts.map +1 -0
- package/dist/modules/common/utils/defaultNextImageLoader.d.ts +7 -0
- package/dist/modules/common/utils/defaultNextImageLoader.d.ts.map +1 -0
- package/dist/modules/common/utils/formatUsername.d.ts +3 -0
- package/dist/modules/common/utils/formatUsername.d.ts.map +1 -0
- package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts +30 -0
- package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts.map +1 -0
- package/dist/modules/common/utils/normalizeFilterKeys.d.ts +4 -0
- package/dist/modules/common/utils/normalizeFilterKeys.d.ts.map +1 -0
- package/dist/modules/common/utils/useFormatDateTime.d.ts +7 -0
- package/dist/modules/common/utils/useFormatDateTime.d.ts.map +1 -0
- package/dist/modules/common/utils/utils.d.ts +21 -0
- package/dist/modules/common/utils/utils.d.ts.map +1 -0
- package/dist/modules/country/fragments/CountryFragment.d.ts +3 -0
- package/dist/modules/country/fragments/CountryFragment.d.ts.map +1 -0
- package/dist/modules/country/hooks/useCountries.d.ts +22 -0
- package/dist/modules/country/hooks/useCountries.d.ts.map +1 -0
- package/dist/modules/country.js +108 -0
- package/dist/modules/currency.js +119 -0
- package/dist/modules/delivery-provider.js +269 -0
- package/dist/modules/enrollment.js +353 -0
- package/dist/modules/event.js +123 -0
- package/dist/modules/filter.js +448 -0
- package/dist/modules/forms/components/Form.d.ts +8 -0
- package/dist/modules/forms/components/Form.d.ts.map +1 -0
- package/dist/modules/forms/hooks/useField.d.ts +35 -0
- package/dist/modules/forms/hooks/useField.d.ts.map +1 -0
- package/dist/modules/forms/hooks/useForm.d.ts +44 -0
- package/dist/modules/forms/hooks/useForm.d.ts.map +1 -0
- package/dist/modules/forms/hooks/useFormContext.d.ts +3 -0
- package/dist/modules/forms/hooks/useFormContext.d.ts.map +1 -0
- package/dist/modules/forms/lib/FormContext.d.ts +13 -0
- package/dist/modules/forms/lib/FormContext.d.ts.map +1 -0
- package/dist/modules/forms/lib/clean.d.ts +3 -0
- package/dist/modules/forms/lib/clean.d.ts.map +1 -0
- package/dist/modules/forms/lib/validators.d.ts +20 -0
- package/dist/modules/forms/lib/validators.d.ts.map +1 -0
- package/dist/modules/language/fragments/LanguageFragment.d.ts +3 -0
- package/dist/modules/language/fragments/LanguageFragment.d.ts.map +1 -0
- package/dist/modules/language/hooks/useLanguages.d.ts +19 -0
- package/dist/modules/language/hooks/useLanguages.d.ts.map +1 -0
- package/dist/modules/language.js +106 -0
- package/dist/modules/modal/components/AlertMessage.d.ts +9 -0
- package/dist/modules/modal/components/AlertMessage.d.ts.map +1 -0
- package/dist/modules/modal/components/DangerMessage.d.ts +12 -0
- package/dist/modules/modal/components/DangerMessage.d.ts.map +1 -0
- package/dist/modules/modal/components/ImportResultMessage.d.ts +14 -0
- package/dist/modules/modal/components/ImportResultMessage.d.ts.map +1 -0
- package/dist/modules/modal/components/Modal.d.ts +10 -0
- package/dist/modules/modal/components/Modal.d.ts.map +1 -0
- package/dist/modules/modal/components/ModalWrapper.d.ts +6 -0
- package/dist/modules/modal/components/ModalWrapper.d.ts.map +1 -0
- package/dist/modules/modal/hooks/useModal.d.ts +7 -0
- package/dist/modules/modal/hooks/useModal.d.ts.map +1 -0
- package/dist/modules/modal/utils/ModalContext.d.ts +9 -0
- package/dist/modules/modal/utils/ModalContext.d.ts.map +1 -0
- package/dist/modules/order/fragments/OrderDetailFragment.d.ts +3 -0
- package/dist/modules/order/fragments/OrderDetailFragment.d.ts.map +1 -0
- package/dist/modules/order/fragments/OrderFragment.d.ts +3 -0
- package/dist/modules/order/fragments/OrderFragment.d.ts.map +1 -0
- package/dist/modules/order/hooks/useOrders.d.ts +46 -0
- package/dist/modules/order/hooks/useOrders.d.ts.map +1 -0
- package/dist/modules/order.js +563 -0
- package/dist/modules/payment-providers.js +206 -0
- package/dist/modules/product/hooks/useProductsCount.d.ts +8 -0
- package/dist/modules/product/hooks/useProductsCount.d.ts.map +1 -0
- package/dist/modules/product-review.js +251 -0
- package/dist/modules/product.js +1929 -0
- package/dist/modules/quotation.js +297 -0
- package/dist/modules/token.js +143 -0
- package/dist/modules/warehousing-providers.js +206 -0
- package/dist/modules/work/fragments/WorkFragment.d.ts +3 -0
- package/dist/modules/work/fragments/WorkFragment.d.ts.map +1 -0
- package/dist/modules/work/hooks/useAddWork.d.ts +6 -0
- package/dist/modules/work/hooks/useAddWork.d.ts.map +1 -0
- package/dist/modules/work/hooks/useWork.d.ts +32 -0
- package/dist/modules/work/hooks/useWork.d.ts.map +1 -0
- package/dist/modules/work.js +308 -0
- package/dist/plugins.js +8 -0
- package/dist/providers.js +6 -0
- package/dist/sdk/hooks.d.ts +9 -0
- package/dist/sdk/hooks.d.ts.map +1 -0
- package/dist/sdk/modal.d.ts +7 -0
- package/dist/sdk/modal.d.ts.map +1 -0
- package/dist/sdk/plugins.d.ts +67 -0
- package/dist/sdk/plugins.d.ts.map +1 -0
- package/dist/sdk/providers.d.ts +5 -0
- package/dist/sdk/providers.d.ts.map +1 -0
- package/dist/sdk/theme.d.ts +26 -0
- package/dist/sdk/theme.d.ts.map +1 -0
- package/dist/theme.js +34 -0
- package/dist/ui.js +21527 -0
- package/out/403/index.html +2 -2
- package/out/404/index.html +2 -2
- package/out/404.html +2 -2
- package/out/423/index.html +2 -2
- package/out/500/index.html +2 -2
- package/out/_next/static/chunks/0-p8a6-okjx49.js +15 -0
- package/out/_next/static/chunks/0-u5tid26i8-3.js +188 -0
- package/out/_next/static/chunks/008hxgil51owu.js +234 -0
- package/out/_next/static/chunks/026k3ys50h91u.js +15 -0
- package/out/_next/static/chunks/02aa23atze2y4.js +119 -0
- package/out/_next/static/chunks/02dnhll1bce87.js +46 -0
- package/out/_next/static/chunks/03f0hv23abn4a.js +12 -0
- package/out/_next/static/chunks/03p0xulfluyqm.js +15 -0
- package/out/_next/static/chunks/044dmimivt13x.js +233 -0
- package/out/_next/static/chunks/047gokoblz-qy.js +16 -0
- package/out/_next/static/chunks/04yroykjly9ni.js +15 -0
- package/out/_next/static/chunks/05h2_5y4i_fe4.js +12 -0
- package/out/_next/static/chunks/0641gh6yb6tnd.js +3 -0
- package/out/_next/static/chunks/06bsql5zgjpaj.js +315 -0
- package/out/_next/static/chunks/06jtnxd7wr712.js +1 -0
- package/out/_next/static/chunks/070wy1qe-7-uf.js +242 -0
- package/out/_next/static/chunks/07l1vdt21xneu.js +14 -0
- package/out/_next/static/chunks/07q8ufsdxo1tx.js +1 -0
- package/out/_next/static/chunks/087a2d-0e1pvn.js +1 -0
- package/out/_next/static/chunks/09pees0w94cvm.js +1 -0
- package/out/_next/static/chunks/0_wmk0z5r9thu.js +95 -0
- package/out/_next/static/chunks/0ab_-095b34n5.js +90 -0
- package/out/_next/static/chunks/0aom8abciz-yf.js +1 -0
- package/out/_next/static/chunks/0cdcsn87u-tzw.js +1 -0
- package/out/_next/static/chunks/0cu-wqc76z_w6.js +1 -0
- package/out/_next/static/chunks/0dnzfqa8el54j.js +135 -0
- package/out/_next/static/chunks/0f-hhcgpd3kjt.js +5 -0
- package/out/_next/static/chunks/0gdriupdpmq28.js +14 -0
- package/out/_next/static/chunks/0hm6-xlqw4vmr.js +1 -0
- package/out/_next/static/chunks/0hmdmxkzhdtjx.js +155 -0
- package/out/_next/static/chunks/0hpirq7m-gjle.js +23 -0
- package/out/_next/static/chunks/0hup5ovc9v_-h.js +58 -0
- package/out/_next/static/chunks/0hxsdaxwhc3z4.js +110 -0
- package/out/_next/static/chunks/0j-yonuwgtg0k.js +22 -0
- package/out/_next/static/chunks/0jo3ujn_icmb9.js +28 -0
- package/out/_next/static/chunks/0mayhrft9-4hw.js +13 -0
- package/out/_next/static/chunks/0mdh4qszx-qw8.js +1 -0
- package/out/_next/static/chunks/0nyu34hvyz9_k.js +103 -0
- package/out/_next/static/chunks/0nz8nqr7k7pni.js +61 -0
- package/out/_next/static/chunks/0pjv94c771817.js +13 -0
- package/out/_next/static/chunks/0qrepe4aqal8_.js +2 -0
- package/out/_next/static/chunks/0qtbb-w9hs2i_.js +1 -0
- package/out/_next/static/chunks/0r0l1vs8bls6y.js +1 -0
- package/out/_next/static/chunks/0r2v5se5riad_.js +227 -0
- package/out/_next/static/chunks/0s3aax3no2y3_.js +54 -0
- package/out/_next/static/chunks/0sys36fl1uhl-.js +18 -0
- package/out/_next/static/chunks/0u-md-qpvyccn.js +149 -0
- package/out/_next/static/chunks/0ukobsq85_to1.js +135 -0
- package/out/_next/static/chunks/0vcn7yqzt3qlc.js +10 -0
- package/out/_next/static/chunks/0wl_oo549tgsw.js +14 -0
- package/out/_next/static/chunks/0wm5atnhe2mjs.js +119 -0
- package/out/_next/static/chunks/0wpmgf2-hr2iv.js +1 -0
- package/out/_next/static/chunks/0wthf9v7cuwqf.js +3 -0
- package/out/_next/static/chunks/0xcxmgeevaadl.js +8 -0
- package/out/_next/static/chunks/0xoerh23zk-pj.js +44 -0
- package/out/_next/static/chunks/0xvoojz5c4j32.js +14 -0
- package/out/_next/static/chunks/0ykc9b-l7rcv9.js +18 -0
- package/out/_next/static/chunks/0zb8qwy33hihq.js +142 -0
- package/out/_next/static/chunks/0zgu8kiokvsjz.js +1 -0
- package/out/_next/static/chunks/0zk0s8hqsf5tg.js +18 -0
- package/out/_next/static/chunks/0zl6mu89n1_wq.js +1 -0
- package/out/_next/static/chunks/0zntg6ltu_fk3.js +14 -0
- package/out/_next/static/chunks/10996osm11rxi.js +327 -0
- package/out/_next/static/chunks/10q9_f1ss9afd.js +8 -0
- package/out/_next/static/chunks/110vhftkm53lj.js +111 -0
- package/out/_next/static/chunks/113_jsmrqky1h.js +130 -0
- package/out/_next/static/chunks/11fqypagzye_v.js +43 -0
- package/out/_next/static/chunks/137522d4_apiu.js +166 -0
- package/out/_next/static/chunks/13ml43jv3bxh1.js +1 -0
- package/out/_next/static/chunks/16ad724tleody.js +13 -0
- package/out/_next/static/chunks/16r_t7quts1w0.js +289 -0
- package/out/_next/static/chunks/16yomp2b55xod.js +30 -0
- package/out/_next/static/chunks/17jd_42ijblk-.js +15 -0
- package/out/_next/static/chunks/17xseq9yxu638.js +1 -0
- package/out/_next/static/chunks/18yznjdgjug5c.js +7 -0
- package/out/_next/static/chunks/19i-cq0_2t00g.js +60 -0
- package/out/_next/static/chunks/19ppkss30jscq.js +13 -0
- package/out/_next/static/chunks/1_ov-8bomgh6c.js +54 -0
- package/out/_next/static/chunks/1b9l0n8vz64x7.js +233 -0
- package/out/_next/static/chunks/1cn3pe6lxja9e.js +44 -0
- package/out/_next/static/chunks/1dsjo02ozub3p.js +342 -0
- package/out/_next/static/chunks/1dut2ep8qfdv4.js +14 -0
- package/out/_next/static/chunks/1eqs_86cqpxcx.js +138 -0
- package/out/_next/static/chunks/1exlzd6w18o_b.js +8 -0
- package/out/_next/static/chunks/1f04wea7zvjf5.js +2 -0
- package/out/_next/static/chunks/1fqsykinbg1d_.js +12 -0
- package/out/_next/static/chunks/1g5l7e7du4p25.js +1 -0
- package/out/_next/static/chunks/1hokoliuqn63p.js +17 -0
- package/out/_next/static/chunks/1ihjqvn68cj5e.js +36 -0
- package/out/_next/static/chunks/1k798vpov34v6.js +12 -0
- package/out/_next/static/chunks/1lewut00m9sq1.js +1 -0
- package/out/_next/static/chunks/1lwiflo8v2d93.js +1 -0
- package/out/_next/static/chunks/1ng9tsm1f8e_a.js +1 -0
- package/out/_next/static/chunks/1nvy3y5qe_igv.js +233 -0
- package/out/_next/static/chunks/1osrrozfse5jn.js +190 -0
- package/out/_next/static/chunks/1ozaatz-b_-as.js +41 -0
- package/out/_next/static/chunks/1paq5rkj25r88.js +1 -0
- package/out/_next/static/chunks/1q2l02eq094zc.js +147 -0
- package/out/_next/static/chunks/1q8zx2rmluekr.js +13 -0
- package/out/_next/static/chunks/1qnuk3631sd6i.js +807 -0
- package/out/_next/static/chunks/1r0aluuzu5vw7.js +13 -0
- package/out/_next/static/chunks/1rgwj4dr0k4_b.js +5 -0
- package/out/_next/static/chunks/1sgv26vi42stl.js +13 -0
- package/out/_next/static/chunks/1t80pe40g73fh.js +82 -0
- package/out/_next/static/chunks/1u6jfjnf14knz.js +124 -0
- package/out/_next/static/chunks/1vnvinjvn78t3.js +1 -0
- package/out/_next/static/chunks/1xg3ey2rrdxfx.js +1 -0
- package/out/_next/static/chunks/1xx6ie3yh2hbk.js +235 -0
- package/out/_next/static/chunks/1y-vwb0-v5xv0.js +304 -0
- package/out/_next/static/chunks/2-8-i_m-82mjh.js +43 -0
- package/out/_next/static/chunks/2-s6g5_cyahx8.js +1 -0
- package/out/_next/static/chunks/20ndjd4r5l6vk.js +1 -0
- package/out/_next/static/chunks/20v019mj-zi94.js +13 -0
- package/out/_next/static/chunks/21w-hkh4_w1kl.js +19 -0
- package/out/_next/static/chunks/226ya3lbz_55w.js +19 -0
- package/out/_next/static/chunks/22az81pi-bqjb.js +1 -0
- package/out/_next/static/chunks/22get2_2lcba-.js +21 -0
- package/out/_next/static/chunks/22l-2aehes9lx.js +153 -0
- package/out/_next/static/chunks/23y9nin7qo-xy.js +17 -0
- package/out/_next/static/chunks/25t23h8zbmzh-.js +12 -0
- package/out/_next/static/chunks/273zh05aw6uz2.js +13 -0
- package/out/_next/static/chunks/28o-5560g4bwk.js +7 -0
- package/out/_next/static/chunks/28zahy_uqar2t.js +12 -0
- package/out/_next/static/chunks/29dylunjhn4te.js +34 -0
- package/out/_next/static/chunks/2_3qu55ddb4jo.js +3 -0
- package/out/_next/static/chunks/2_7z1veshuiiw.js +10 -0
- package/out/_next/static/chunks/2_ztj391g9yzt.js +226 -0
- package/out/_next/static/chunks/2a9z_gm1vn39c.js +173 -0
- package/out/_next/static/chunks/2a_46b7_7ml_y.js +1 -0
- package/out/_next/static/chunks/2b8nhs_3rpawc.js +1 -0
- package/out/_next/static/chunks/2biyd1hzgc2sv.js +339 -0
- package/out/_next/static/chunks/2c2vssolfspzg.js +50 -0
- package/out/_next/static/chunks/2dbrybnhe5thu.css +1 -0
- package/out/_next/static/chunks/2diqy5aehqe8j.js +58 -0
- package/out/_next/static/chunks/2djnsowjy3p8y.js +1 -0
- package/out/_next/static/chunks/2dq4d-ey-16cq.js +1 -0
- package/out/_next/static/chunks/2dyysegkbptw8.js +11 -0
- package/out/_next/static/chunks/2ei1rfxsl3q65.js +31 -0
- package/out/_next/static/chunks/2fazxtc5_9tgo.js +52 -0
- package/out/_next/static/chunks/2fzc9bsweg7nf.js +807 -0
- package/out/_next/static/chunks/2h5-bnhry6wzl.js +14 -0
- package/out/_next/static/chunks/2hmtn1okhj6zz.js +234 -0
- package/out/_next/static/chunks/2htrbj6g7da-e.js +12 -0
- package/out/_next/static/chunks/2j0apwnxuaeox.js +14 -0
- package/out/_next/static/chunks/2j51l4ukmrn7j.js +17 -0
- package/out/_next/static/chunks/2k4cusvrm93cp.js +39 -0
- package/out/_next/static/chunks/2ldks6pel2wcp.js +31 -0
- package/out/_next/static/chunks/2loz6t7f69t0c.js +1 -0
- package/out/_next/static/chunks/2onfts3kpe9d8.js +1 -0
- package/out/_next/static/chunks/2p9aozkdq_z13.js +329 -0
- package/out/_next/static/chunks/2pz2u5us_0jme.js +5 -0
- package/out/_next/static/chunks/2qaf44ypuy_4z.js +1 -0
- package/out/_next/static/chunks/2r1-eyf6hic-m.js +1 -0
- package/out/_next/static/chunks/2ritd1boot22-.js +32 -0
- package/out/_next/static/chunks/2s1__k407zn6n.js +1 -0
- package/out/_next/static/chunks/2s6qkrjh7-b6s.js +1 -0
- package/out/_next/static/chunks/2t70ji9pnllxh.js +81 -0
- package/out/_next/static/chunks/2tc6lgajxmo78.js +3 -0
- package/out/_next/static/chunks/2twd9trj9horc.js +61 -0
- package/out/_next/static/chunks/2ua7-skz9vm4r.js +13 -0
- package/out/_next/static/chunks/2vjkcd8g_hh68.js +46 -0
- package/out/_next/static/chunks/2w1twpn4nui6h.js +807 -0
- package/out/_next/static/chunks/2x4vo24qfe0mr.js +1 -0
- package/out/_next/static/chunks/2zm-d0-e0sxgo.js +23 -0
- package/out/_next/static/chunks/3-u1dp82vzyt9.js +1 -0
- package/out/_next/static/chunks/30iz3jszdu04d.js +11 -0
- package/out/_next/static/chunks/30jmh-3cp5wcg.js +12 -0
- package/out/_next/static/chunks/3178a_a_i-e-q.js +16 -0
- package/out/_next/static/chunks/317qzy7r8meg_.js +1 -0
- package/out/_next/static/chunks/32nwqfli0ne57.js +1 -0
- package/out/_next/static/chunks/33c-rzkj2k2v1.js +14 -0
- package/out/_next/static/chunks/33g91_yljnpiw.js +807 -0
- package/out/_next/static/chunks/34dhtdp_8idgm.js +658 -0
- package/out/_next/static/chunks/34ybf-w3bdlw8.js +13 -0
- package/out/_next/static/chunks/35-vqjhcep-zw.js +60 -0
- package/out/_next/static/chunks/358r9pdxbk-fv.js +39 -0
- package/out/_next/static/chunks/35a6ymsh4q0-o.js +14 -0
- package/out/_next/static/chunks/36yrxjq9zbvpx.js +13 -0
- package/out/_next/static/chunks/377ho63k7qphg.js +14 -0
- package/out/_next/static/chunks/37bs69urhjdz5.js +24 -0
- package/out/_next/static/chunks/37mpnb5qztb_g.js +15 -0
- package/out/_next/static/chunks/3827hqe9_anr7.js +24 -0
- package/out/_next/static/chunks/3a0_vzfa54k35.js +7 -0
- package/out/_next/static/chunks/3a8a8fpl7-ndf.js +1 -0
- package/out/_next/static/chunks/3b6hct2rk2wu9.js +24 -0
- package/out/_next/static/chunks/3czsj6bdmobbd.js +24 -0
- package/out/_next/static/chunks/3d0ic2ovyeue7.js +2 -0
- package/out/_next/static/chunks/3eq1b2m2xkkmp.js +1 -0
- package/out/_next/static/chunks/3f2ue6ut-mwka.js +2 -0
- package/out/_next/static/chunks/3g67xtrp0vv4m.js +1 -0
- package/out/_next/static/chunks/3iepyd4rzl-tt.js +13 -0
- package/out/_next/static/chunks/3j6p-522fcsnj.js +1 -0
- package/out/_next/static/chunks/3kle_yukf5aux.js +809 -0
- package/out/_next/static/chunks/3l_nx7eopgh02.js +1 -0
- package/out/_next/static/chunks/3mk-cv2ocv93u.js +50 -0
- package/out/_next/static/chunks/3n5290qcigwpc.js +13 -0
- package/out/_next/static/chunks/3nl02jbknvx4p.js +14 -0
- package/out/_next/static/chunks/3o5a5qn0dnq04.js +3 -0
- package/out/_next/static/chunks/3o5kwvdgt_t9z.js +73 -0
- package/out/_next/static/chunks/3qamj8gt1ijdz.js +12 -0
- package/out/_next/static/chunks/3rlrwz262rpw0.js +1 -0
- package/out/_next/static/chunks/3s3v9n_ob4m24.js +18 -0
- package/out/_next/static/chunks/3s47qr8fn6h4j.js +8 -0
- package/out/_next/static/chunks/3slzhmkeoggpm.js +66 -0
- package/out/_next/static/chunks/3tv9csz53av-5.js +1 -0
- package/out/_next/static/chunks/3uec1_7irpl71.js +16 -0
- package/out/_next/static/chunks/3uo1w1gaj7tsx.js +117 -0
- package/out/_next/static/chunks/3uwev5xyub_j1.js +7 -0
- package/out/_next/static/chunks/3w450c1xmh550.js +12 -0
- package/out/_next/static/chunks/3x8aami6-3l79.js +31 -0
- package/out/_next/static/chunks/3xhogi6_bbwh7.js +10 -0
- package/out/_next/static/chunks/3y62dz45ticve.js +1 -0
- package/out/_next/static/chunks/3yjzk_udmhv3i.js +1 -0
- package/out/_next/static/chunks/3z6v84zof80bt.js +1 -0
- package/out/_next/static/chunks/3zncjth-kop8p.js +1 -0
- package/out/_next/static/chunks/3zp4iedgev460.js +35 -0
- package/out/_next/static/chunks/413qu_x6yky1e.js +1 -0
- package/out/_next/static/chunks/41j8mb2ztwydi.js +14 -0
- package/out/_next/static/chunks/41pc5_e25bhgd.js +1 -0
- package/out/_next/static/chunks/424z-zudpy3n0.js +39 -0
- package/out/_next/static/chunks/42o6t6-v2qi37.js +29 -0
- package/out/_next/static/chunks/434iz38padke2.js +1 -0
- package/out/_next/static/chunks/43pb7hjetp965.js +1 -0
- package/out/_next/static/chunks/44rharl5hvsw-.js +22 -0
- package/out/_next/static/chunks/45ac68ug7hcoc.js +13 -0
- package/out/_next/static/chunks/turbopack-0-chqajqgydnn.js +1 -0
- package/out/_next/static/chunks/turbopack-0-jquaej6q4cd.js +1 -0
- package/out/_next/static/chunks/turbopack-01y_6kjoo1mvp.js +1 -0
- package/out/_next/static/chunks/turbopack-03_sghcquhw33.js +1 -0
- package/out/_next/static/chunks/turbopack-0a_5nw_3znl2r.js +1 -0
- package/out/_next/static/chunks/turbopack-0bbgz21dy5lm3.js +1 -0
- package/out/_next/static/chunks/turbopack-0cqzo60ry70im.js +1 -0
- package/out/_next/static/chunks/turbopack-0ex-kw1o5k02z.js +1 -0
- package/out/_next/static/chunks/turbopack-0g9gjb70ob0rb.js +1 -0
- package/out/_next/static/chunks/turbopack-0jzps1g34dah5.js +1 -0
- package/out/_next/static/chunks/turbopack-0o9rz5e94nq66.js +1 -0
- package/out/_next/static/chunks/turbopack-0rq3y47awgwpt.js +1 -0
- package/out/_next/static/chunks/turbopack-0vs4-gjxe552i.js +1 -0
- package/out/_next/static/chunks/turbopack-0x1jwahqhzo0u.js +1 -0
- package/out/_next/static/chunks/turbopack-13uretb6lcje8.js +1 -0
- package/out/_next/static/chunks/turbopack-14n2u99h724y-.js +1 -0
- package/out/_next/static/chunks/turbopack-1a774_gjam74t.js +1 -0
- package/out/_next/static/chunks/turbopack-1gy8illqlm_jj.js +1 -0
- package/out/_next/static/chunks/turbopack-1n9q29j854ltr.js +1 -0
- package/out/_next/static/chunks/turbopack-1nathpz4-f-4w.js +1 -0
- package/out/_next/static/chunks/turbopack-1nca86oa17qfx.js +1 -0
- package/out/_next/static/chunks/turbopack-1qe0zbu9fejdb.js +1 -0
- package/out/_next/static/chunks/turbopack-1qg26rdmwlotw.js +1 -0
- package/out/_next/static/chunks/turbopack-1u6lf-rzbdjuj.js +1 -0
- package/out/_next/static/chunks/turbopack-1z85kwwdibjh7.js +1 -0
- package/out/_next/static/chunks/turbopack-22as-nh7md98p.js +1 -0
- package/out/_next/static/chunks/turbopack-23lcv-araye0t.js +1 -0
- package/out/_next/static/chunks/turbopack-25gt3vwmogps-.js +1 -0
- package/out/_next/static/chunks/turbopack-26g97kfge67jz.js +1 -0
- package/out/_next/static/chunks/turbopack-26u67kbn41n8e.js +1 -0
- package/out/_next/static/chunks/turbopack-280jnadydykur.js +1 -0
- package/out/_next/static/chunks/turbopack-2bb6lvvhg6e0w.js +1 -0
- package/out/_next/static/chunks/turbopack-2bw5gluonepob.js +1 -0
- package/out/_next/static/chunks/turbopack-2c36n939jg0pf.js +1 -0
- package/out/_next/static/chunks/turbopack-2ez296aoalbog.js +1 -0
- package/out/_next/static/chunks/turbopack-2frqnl7lfn0h9.js +1 -0
- package/out/_next/static/chunks/turbopack-2jxkmyhbvdw4u.js +1 -0
- package/out/_next/static/chunks/turbopack-2k45z490u3tbj.js +1 -0
- package/out/_next/static/chunks/turbopack-2p-uq1erkf03-.js +1 -0
- package/out/_next/static/chunks/turbopack-2svkg0yvgyw3_.js +1 -0
- package/out/_next/static/chunks/turbopack-31s1c5ipeb5_p.js +1 -0
- package/out/_next/static/chunks/turbopack-33v049epa0erx.js +1 -0
- package/out/_next/static/chunks/turbopack-34jylrj_qw1ak.js +1 -0
- package/out/_next/static/chunks/turbopack-34u-t26ngu-oy.js +1 -0
- package/out/_next/static/chunks/turbopack-34x5gar31d5sv.js +1 -0
- package/out/_next/static/chunks/turbopack-363g_e-jzg5u_.js +1 -0
- package/out/_next/static/chunks/turbopack-39um5sy1v-bvw.js +1 -0
- package/out/_next/static/chunks/turbopack-3__2i-6jdv1s8.js +1 -0
- package/out/_next/static/chunks/turbopack-3b4s935ks8u-b.js +1 -0
- package/out/_next/static/chunks/turbopack-3b5-pdmr324f-.js +1 -0
- package/out/_next/static/chunks/turbopack-3bwm37xq99e4l.js +1 -0
- package/out/_next/static/chunks/turbopack-3ec8ol5n3kb0h.js +1 -0
- package/out/_next/static/chunks/turbopack-3gw7smd4lo5ud.js +1 -0
- package/out/_next/static/chunks/turbopack-3miy8-7wxcnbn.js +1 -0
- package/out/_next/static/chunks/turbopack-3nvjaj1vijowz.js +1 -0
- package/out/_next/static/chunks/turbopack-3poc67i76-q8q.js +1 -0
- package/out/_next/static/chunks/turbopack-3r1pnr94s1u0w.js +1 -0
- package/out/_next/static/chunks/turbopack-3sfa4031m280j.js +1 -0
- package/out/_next/static/chunks/turbopack-3sqs5hm2xhl3s.js +1 -0
- package/out/_next/static/chunks/turbopack-3xha6pmjqez6d.js +1 -0
- package/out/_next/static/chunks/turbopack-3yp7pgp42yfh3.js +1 -0
- package/out/_next/static/chunks/turbopack-3z_g6t7o2z7rb.js +1 -0
- package/out/_next/static/chunks/turbopack-3zb947kjm56zb.js +1 -0
- package/out/_next/static/chunks/turbopack-43m6wi0fybh1f.js +1 -0
- package/out/_next/static/mgojmR_4GNqJNutDR9oFi/_buildManifest.js +262 -0
- package/out/_offline/index.html +2 -2
- package/out/account/forgot-password/index.html +2 -2
- package/out/account/index.html +2 -2
- package/out/assortments/AssortmentDetailPage/index.html +2 -2
- package/out/assortments/index.html +2 -2
- package/out/assortments/new/index.html +2 -2
- package/out/copilot/index.html +2 -2
- package/out/country/CountryDetailPage/index.html +2 -2
- package/out/country/index.html +2 -2
- package/out/country/new/index.html +2 -2
- package/out/currency/CurrencyDetailPage/index.html +2 -2
- package/out/currency/index.html +2 -2
- package/out/currency/new/index.html +2 -2
- package/out/delivery-provider/DeliveryProviderDetailPage/index.html +2 -2
- package/out/delivery-provider/index.html +2 -2
- package/out/delivery-provider/new/index.html +2 -2
- package/out/enrollments/EnrollmentDetailPage/index.html +2 -2
- package/out/enrollments/index.html +2 -2
- package/out/events/EventDetailPage/index.html +2 -2
- package/out/events/index.html +2 -2
- package/out/exports/index.html +2 -2
- package/out/ext/[[...slug]]/index.html +11 -0
- package/out/external/index.html +2 -2
- package/out/filters/FilterDetailPage/index.html +2 -2
- package/out/filters/index.html +2 -2
- package/out/filters/new/index.html +2 -2
- package/out/index.html +2 -2
- package/out/install/index.html +2 -2
- package/out/language/LanguageDetailPage/index.html +2 -2
- package/out/language/index.html +2 -2
- package/out/language/new/index.html +2 -2
- package/out/log-in/index.html +2 -2
- package/out/orders/OrderDetailPage/index.html +2 -2
- package/out/orders/index.html +2 -2
- package/out/payment-provider/PaymentProviderDetailPage/index.html +2 -2
- package/out/payment-provider/index.html +2 -2
- package/out/payment-provider/new/index.html +2 -2
- package/out/products/ProductDetailPage/index.html +2 -2
- package/out/products/index.html +2 -2
- package/out/products/new/index.html +2 -2
- package/out/quotations/QuotationDetailPage/index.html +2 -2
- package/out/quotations/index.html +2 -2
- package/out/reset-password/index.html +2 -2
- package/out/sign-up/index.html +2 -2
- package/out/styleguide/index.html +2 -2
- package/out/tokens/TokenDetailPage/index.html +2 -2
- package/out/tokens/index.html +2 -2
- package/out/users/UserDetailPage/index.html +2 -2
- package/out/users/index.html +2 -2
- package/out/users/new/index.html +2 -2
- package/out/verify-email/index.html +2 -2
- package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +2 -2
- package/out/warehousing-provider/index.html +2 -2
- package/out/warehousing-provider/new/index.html +2 -2
- package/out/works/WorkDetailPage/index.html +2 -2
- package/out/works/WorkQueueListView/index.html +2 -2
- package/out/works/index.html +2 -2
- package/out/works/management/index.html +2 -2
- package/package.json +104 -14
- package/src/modules/accounts/index.ts +34 -0
- package/src/modules/assortment/index.ts +29 -0
- package/src/modules/copilot/index.ts +4 -0
- package/src/modules/country/index.ts +5 -0
- package/src/modules/currency/index.ts +5 -0
- package/src/modules/delivery-provider/index.ts +7 -0
- package/src/modules/enrollment/index.ts +6 -0
- package/src/modules/event/index.ts +3 -0
- package/src/modules/filter/index.ts +13 -0
- package/src/modules/language/index.ts +5 -0
- package/src/modules/order/index.ts +8 -0
- package/src/modules/payment-providers/index.ts +7 -0
- package/src/modules/product/index.ts +47 -0
- package/src/modules/product-review/index.ts +6 -0
- package/src/modules/quotation/index.ts +6 -0
- package/src/modules/token/index.ts +3 -0
- package/src/modules/warehousing-providers/index.ts +7 -0
- package/src/modules/work/index.ts +7 -0
- package/src/sdk/hooks.ts +11 -0
- package/src/sdk/modal.ts +6 -0
- package/src/sdk/plugin-build.mjs +112 -0
- package/src/sdk/plugin-build.test.mjs +11 -0
- package/src/sdk/plugins.ts +88 -0
- package/src/sdk/providers.ts +4 -0
- package/src/sdk/tailwind-preset.mjs +94 -0
- package/src/sdk/theme.ts +61 -0
- package/src/styles/globals.css +291 -0
- package/out/_next/static/NCD-SJ8yCV0Afw8rFopK9/_buildManifest.js +0 -258
- package/out/_next/static/chunks/0-beu4vu82jrh.js +0 -1
- package/out/_next/static/chunks/0-bq_~1lrxscv.js +0 -1
- package/out/_next/static/chunks/0-gs6rs8.en66.js +0 -807
- package/out/_next/static/chunks/0.4qfzuvwzsxc.js +0 -346
- package/out/_next/static/chunks/0.ezy3xvxrqcc.js +0 -15
- package/out/_next/static/chunks/0.i9a933lfo25.js +0 -110
- package/out/_next/static/chunks/0.qv4h3l4v.mz.js +0 -807
- package/out/_next/static/chunks/00-1l-sb67jn-.js +0 -807
- package/out/_next/static/chunks/0063j04yfdol-.js +0 -13
- package/out/_next/static/chunks/006d2uxhsngs-.js +0 -1
- package/out/_next/static/chunks/00d66~in48qe1.js +0 -108
- package/out/_next/static/chunks/00u_9mz-xfmbu.js +0 -119
- package/out/_next/static/chunks/00ysn67q-k.lf.js +0 -384
- package/out/_next/static/chunks/00z8y5zmd5ley.js +0 -16
- package/out/_next/static/chunks/01.ug0e_hak5n.js +0 -31
- package/out/_next/static/chunks/01755gvyv1u4p.js +0 -342
- package/out/_next/static/chunks/024hggxa5rlsk.js +0 -16
- package/out/_next/static/chunks/025rs.6-.kttm.js +0 -177
- package/out/_next/static/chunks/029met6o9c69_.js +0 -132
- package/out/_next/static/chunks/035ijcwfe128..js +0 -13
- package/out/_next/static/chunks/039.n12k.ourz.js +0 -1
- package/out/_next/static/chunks/039laq217w5af.js +0 -1
- package/out/_next/static/chunks/03awhk2amfyg9.js +0 -13
- package/out/_next/static/chunks/03b6o0yl3wq69.js +0 -324
- package/out/_next/static/chunks/03exf~-d8n0~p.js +0 -12
- package/out/_next/static/chunks/043qhigp~b~xd.js +0 -288
- package/out/_next/static/chunks/047b32b2zk0zr.js +0 -50
- package/out/_next/static/chunks/04ljxsi4h8opa.js +0 -3
- package/out/_next/static/chunks/05-wy9wkovd44.js +0 -66
- package/out/_next/static/chunks/059j6ba8pjbxt.js +0 -2
- package/out/_next/static/chunks/05c669_6-rcl4.js +0 -15
- package/out/_next/static/chunks/05ebn-rbx77t1.js +0 -1
- package/out/_next/static/chunks/05ijoypg9erzj.js +0 -15
- package/out/_next/static/chunks/05mdbs7fsyl0j.js +0 -15
- package/out/_next/static/chunks/05xkbw-s9zm4v.js +0 -1
- package/out/_next/static/chunks/05y5i1xi9l7xo.js +0 -46
- package/out/_next/static/chunks/06jxo~w32bob0.js +0 -14
- package/out/_next/static/chunks/06l-x0hfnht~9.js +0 -12
- package/out/_next/static/chunks/06rpbu900ohev.js +0 -807
- package/out/_next/static/chunks/06wxd~64yev29.js +0 -1
- package/out/_next/static/chunks/074t2kkalxoor.js +0 -54
- package/out/_next/static/chunks/0757.exyqs35o.js +0 -1
- package/out/_next/static/chunks/07bj_95mgrfr7.js +0 -81
- package/out/_next/static/chunks/07e9hvcn2m7m0.css +0 -1
- package/out/_next/static/chunks/07gsr_4x3t83l.js +0 -1
- package/out/_next/static/chunks/07m0kcby2q9_3.js +0 -119
- package/out/_next/static/chunks/07rosayyue4dv.js +0 -5
- package/out/_next/static/chunks/07vc0lr9~n374.js +0 -807
- package/out/_next/static/chunks/07we~tcuuf587.js +0 -1
- package/out/_next/static/chunks/08-e12375gky7.js +0 -1
- package/out/_next/static/chunks/08g5cr0k-wewy.js +0 -13
- package/out/_next/static/chunks/08gnfg~ucaonj.js +0 -31
- package/out/_next/static/chunks/08l8.c5-zq8l_.js +0 -13
- package/out/_next/static/chunks/08s08655wboxs.js +0 -224
- package/out/_next/static/chunks/08ubwqxtv1pi8.js +0 -471
- package/out/_next/static/chunks/093du9_a7j~e9.js +0 -22
- package/out/_next/static/chunks/09ar00gwggnv2.js +0 -92
- package/out/_next/static/chunks/09ew07.pd~qmo.js +0 -31
- package/out/_next/static/chunks/09h16th.ukf49.js +0 -9
- package/out/_next/static/chunks/09i.iewg619r8.js +0 -1
- package/out/_next/static/chunks/09ird980jk5l4.js +0 -1
- package/out/_next/static/chunks/09ti6--w-81qk.js +0 -12
- package/out/_next/static/chunks/0_.rynghl8eid.js +0 -16
- package/out/_next/static/chunks/0_fjllta7r.pd.js +0 -1
- package/out/_next/static/chunks/0_hapi9~w_m74.js +0 -807
- package/out/_next/static/chunks/0_rymam7ts5h_.js +0 -61
- package/out/_next/static/chunks/0_tmrtwx_w001.js +0 -1
- package/out/_next/static/chunks/0_wmd30ovkohg.js +0 -14
- package/out/_next/static/chunks/0a4iuso54enw6.js +0 -43
- package/out/_next/static/chunks/0a9xn3eyi55p7.js +0 -807
- package/out/_next/static/chunks/0ab-_zb.d-ta~.js +0 -13
- package/out/_next/static/chunks/0agmcim_ow38h.js +0 -41
- package/out/_next/static/chunks/0ah_xk7gumihc.js +0 -10
- package/out/_next/static/chunks/0al9fetggpofs.js +0 -101
- package/out/_next/static/chunks/0apih1f_pg7x5.js +0 -22
- package/out/_next/static/chunks/0aqef_pw6d4-x.js +0 -12
- package/out/_next/static/chunks/0av.mpk52l~sj.js +0 -78
- package/out/_next/static/chunks/0b26w_2v.jnnp.js +0 -23
- package/out/_next/static/chunks/0bgpq4k~.1ow~.js +0 -1
- package/out/_next/static/chunks/0b~~k586vhgzn.js +0 -22
- package/out/_next/static/chunks/0c1ohyu0~45-6.js +0 -16
- package/out/_next/static/chunks/0c6zpdc5tnyit.js +0 -14
- package/out/_next/static/chunks/0cxr_f9owlixa.js +0 -147
- package/out/_next/static/chunks/0d4_~230qii9x.js +0 -8
- package/out/_next/static/chunks/0d7ng.3g0fqyq.js +0 -14
- package/out/_next/static/chunks/0dgzbrz_ks6y3.js +0 -836
- package/out/_next/static/chunks/0dmlsqy.34z7l.js +0 -5
- package/out/_next/static/chunks/0d~mpqdnsqc_3.js +0 -217
- package/out/_next/static/chunks/0e.ov59u.i2g..js +0 -26
- package/out/_next/static/chunks/0e7j7~xp-kfcl.js +0 -1
- package/out/_next/static/chunks/0eshxr9tyc-ob.js +0 -1
- package/out/_next/static/chunks/0eyuawigvkque.js +0 -144
- package/out/_next/static/chunks/0f0p~b_1z06f-.js +0 -12
- package/out/_next/static/chunks/0f1vh2kuipe~w.js +0 -1
- package/out/_next/static/chunks/0f2lcm2fvm0o4.js +0 -15
- package/out/_next/static/chunks/0f5-n-rcb1ksy.js +0 -61
- package/out/_next/static/chunks/0f7rfo-9v~6ta.js +0 -16
- package/out/_next/static/chunks/0fadm_h6dqral.js +0 -1
- package/out/_next/static/chunks/0fgje3pp6kr-..js +0 -21
- package/out/_next/static/chunks/0fixfg1.spty7.js +0 -8
- package/out/_next/static/chunks/0fo857sizpzb..js +0 -14
- package/out/_next/static/chunks/0fpmn5~h1l5fy.js +0 -51
- package/out/_next/static/chunks/0fzx56yu8w89-.js +0 -1
- package/out/_next/static/chunks/0g5.zeq8z86p8.js +0 -22
- package/out/_next/static/chunks/0gcrw01taxxl6.js +0 -1
- package/out/_next/static/chunks/0hprhos6ompyh.js +0 -1
- package/out/_next/static/chunks/0hv.16xst798a.js +0 -807
- package/out/_next/static/chunks/0i67~d9m79069.js +0 -1
- package/out/_next/static/chunks/0i9ujbll13rjg.js +0 -7
- package/out/_next/static/chunks/0ixp-hqnt2hdk.js +0 -188
- package/out/_next/static/chunks/0j3_ll.umtrlh.js +0 -15
- package/out/_next/static/chunks/0j8_vntnh3wh1.js +0 -384
- package/out/_next/static/chunks/0jcl.bguz9-il.js +0 -173
- package/out/_next/static/chunks/0jhfv_wn9s6x1.js +0 -1
- package/out/_next/static/chunks/0jthyhkkkajye.js +0 -87
- package/out/_next/static/chunks/0jyfzjlxmkv47.js +0 -1
- package/out/_next/static/chunks/0k33b3l3swmdp.js +0 -14
- package/out/_next/static/chunks/0k8cqr5rpupnp.js +0 -12
- package/out/_next/static/chunks/0kacoozv1plky.js +0 -12
- package/out/_next/static/chunks/0kb8vq-u9e5ie.js +0 -596
- package/out/_next/static/chunks/0kpfj.1wbd8ym.js +0 -200
- package/out/_next/static/chunks/0kws6.oh9adj9.js +0 -14
- package/out/_next/static/chunks/0l6-vjb..0-s7.js +0 -286
- package/out/_next/static/chunks/0l8ujxmk7702g.js +0 -1
- package/out/_next/static/chunks/0lcd2so6jg-_l.js +0 -44
- package/out/_next/static/chunks/0lhvveiv7i555.js +0 -13
- package/out/_next/static/chunks/0lim3v66fnjbi.js +0 -73
- package/out/_next/static/chunks/0lj_~1h9s9o4p.js +0 -15
- package/out/_next/static/chunks/0m2jz56bm31rn.js +0 -13
- package/out/_next/static/chunks/0mw6751mia5o-.js +0 -13
- package/out/_next/static/chunks/0m~4npg.nbafl.js +0 -807
- package/out/_next/static/chunks/0nnrgfwlre~2w.js +0 -12
- package/out/_next/static/chunks/0nvdm-r7zmv-l.js +0 -1
- package/out/_next/static/chunks/0nyyy1v4911lw.js +0 -59
- package/out/_next/static/chunks/0o05daemjdhug.js +0 -227
- package/out/_next/static/chunks/0o6szwcbqvtk..js +0 -1
- package/out/_next/static/chunks/0oq1lazm-ypco.js +0 -15
- package/out/_next/static/chunks/0owfq70q4gv3g.js +0 -11
- package/out/_next/static/chunks/0o~ytet2snd7..js +0 -18
- package/out/_next/static/chunks/0pooq0ei74.fu.js +0 -17
- package/out/_next/static/chunks/0q92oiu-paus_.js +0 -1
- package/out/_next/static/chunks/0r.pkr~.dyugv.js +0 -137
- package/out/_next/static/chunks/0r.xn-_woklgt.js +0 -138
- package/out/_next/static/chunks/0r2eg~z0yxhkm.js +0 -384
- package/out/_next/static/chunks/0rf4yd5v399-n.js +0 -342
- package/out/_next/static/chunks/0s9gw8v77opep.js +0 -12
- package/out/_next/static/chunks/0sq1ba8siz_al.js +0 -46
- package/out/_next/static/chunks/0tgyufn7ieyma.js +0 -23
- package/out/_next/static/chunks/0tq-lptj3-s~9.js +0 -7
- package/out/_next/static/chunks/0tur4u0bq8afu.js +0 -1
- package/out/_next/static/chunks/0u.p7-5euvw9g.js +0 -101
- package/out/_next/static/chunks/0u0zlnx_0uuo~.js +0 -1
- package/out/_next/static/chunks/0ud072y3rsxuo.js +0 -26
- package/out/_next/static/chunks/0ueboweabxsm_.js +0 -12
- package/out/_next/static/chunks/0ulpot4q9efmn.js +0 -1
- package/out/_next/static/chunks/0up4o93erzv5i.js +0 -15
- package/out/_next/static/chunks/0uppdoxx035f~.js +0 -807
- package/out/_next/static/chunks/0v01e3xk0z2zz.js +0 -10
- package/out/_next/static/chunks/0v7odmyxhwxk9.js +0 -5
- package/out/_next/static/chunks/0vaop4ncta92i.js +0 -43
- package/out/_next/static/chunks/0vef8~~ul~q~3.js +0 -188
- package/out/_next/static/chunks/0vjviijon1cf_.js +0 -227
- package/out/_next/static/chunks/0vo3lqvc1gnao.js +0 -1
- package/out/_next/static/chunks/0vqde~70jg4mp.js +0 -13
- package/out/_next/static/chunks/0w_lpiygl_gbj.js +0 -51
- package/out/_next/static/chunks/0wm9vrqp0f2-g.js +0 -1
- package/out/_next/static/chunks/0wt4fkc59wtk~.js +0 -1
- package/out/_next/static/chunks/0x0ro0p0oede-.js +0 -1
- package/out/_next/static/chunks/0x5~rk9ckvkzm.js +0 -5
- package/out/_next/static/chunks/0xa.gldl0ypuc.js +0 -36
- package/out/_next/static/chunks/0xyz4eb8oj14e.js +0 -32
- package/out/_next/static/chunks/0x~m529wi_q8r.js +0 -807
- package/out/_next/static/chunks/0ygzo.kyf038-.js +0 -13
- package/out/_next/static/chunks/0z5_-ukry36hl.js +0 -905
- package/out/_next/static/chunks/0z69nmy7s-zha.js +0 -10
- package/out/_next/static/chunks/0zcy4ll048jyy.js +0 -13
- package/out/_next/static/chunks/0zpa9vt2u_r06.js +0 -14
- package/out/_next/static/chunks/0zsl0gp2-m_8s.js +0 -1
- package/out/_next/static/chunks/0zw1-wa39f8lg.js +0 -1
- package/out/_next/static/chunks/0z~lvtnl1p.em.js +0 -78
- package/out/_next/static/chunks/0~4r9ol9.3i_l.js +0 -46
- package/out/_next/static/chunks/0~4s5vi61p7ev.js +0 -291
- package/out/_next/static/chunks/0~6ud_t-945ch.js +0 -288
- package/out/_next/static/chunks/0~mh5ybxo9nf2.js +0 -19
- package/out/_next/static/chunks/0~zg_~~subg_x.js +0 -1
- package/out/_next/static/chunks/10.uqlra33~68.js +0 -13
- package/out/_next/static/chunks/10g0ipk~-ofy6.js +0 -20
- package/out/_next/static/chunks/10h4imeqlg217.js +0 -8
- package/out/_next/static/chunks/10jiudk1sj2jm.js +0 -14
- package/out/_next/static/chunks/10kcfk2uu1e6x.js +0 -73
- package/out/_next/static/chunks/10pv9vc9myzuy.js +0 -58
- package/out/_next/static/chunks/11d00p~.l1k_u.js +0 -8
- package/out/_next/static/chunks/11lx7_qu.04js.js +0 -596
- package/out/_next/static/chunks/11svm4d1gbpg3.js +0 -13
- package/out/_next/static/chunks/11xvbwibrxg70.js +0 -44
- package/out/_next/static/chunks/12_-fnbe.fpy3.js +0 -142
- package/out/_next/static/chunks/12_5sds1suvhm.js +0 -13
- package/out/_next/static/chunks/12eo~x2_f0n1c.js +0 -1
- package/out/_next/static/chunks/131o1ib1p4q0~.js +0 -807
- package/out/_next/static/chunks/13azvhnsuoq~i.js +0 -193
- package/out/_next/static/chunks/13qkehmx~~nca.js +0 -1
- package/out/_next/static/chunks/13xo605mvuvr..js +0 -137
- package/out/_next/static/chunks/14-js791sn0n..js +0 -90
- package/out/_next/static/chunks/149uwpe4mqt~4.js +0 -3
- package/out/_next/static/chunks/152e33k3zn_7h.js +0 -13
- package/out/_next/static/chunks/156o0mg9e~c1z.js +0 -135
- package/out/_next/static/chunks/15946_7~ym9mj.js +0 -1
- package/out/_next/static/chunks/15im3g6.ezb86.js +0 -16
- package/out/_next/static/chunks/167enz~evud8u.js +0 -1
- package/out/_next/static/chunks/16dxg.m0iyhff.js +0 -20
- package/out/_next/static/chunks/16e76-izprx_3.js +0 -60
- package/out/_next/static/chunks/17556jivokcgt.js +0 -13
- package/out/_next/static/chunks/17831iuhggap-.js +0 -5
- package/out/_next/static/chunks/17lq99ack-rqn.js +0 -7
- package/out/_next/static/chunks/1801hoawv7tvj.js +0 -209
- package/out/_next/static/chunks/turbopack-0-f1h~_vf~hgt.js +0 -1
- package/out/_next/static/chunks/turbopack-00gp6932c5-pc.js +0 -1
- package/out/_next/static/chunks/turbopack-00tplfce3sqmv.js +0 -1
- package/out/_next/static/chunks/turbopack-02xfqg-e5e5bq.js +0 -1
- package/out/_next/static/chunks/turbopack-033ew5zdp4sni.js +0 -1
- package/out/_next/static/chunks/turbopack-04ryg.qj6ce.e.js +0 -1
- package/out/_next/static/chunks/turbopack-05pr_j8b3qpck.js +0 -1
- package/out/_next/static/chunks/turbopack-05t73_ssb6_h5.js +0 -1
- package/out/_next/static/chunks/turbopack-06k1fv3edi.oc.js +0 -1
- package/out/_next/static/chunks/turbopack-06s9wk6xrnhe..js +0 -1
- package/out/_next/static/chunks/turbopack-07pf350usbyrn.js +0 -1
- package/out/_next/static/chunks/turbopack-07qx6il~q8zvj.js +0 -1
- package/out/_next/static/chunks/turbopack-093c3g8x0fud~.js +0 -1
- package/out/_next/static/chunks/turbopack-09mkh-~o1m0t4.js +0 -1
- package/out/_next/static/chunks/turbopack-0_6hyjgtzvvlt.js +0 -1
- package/out/_next/static/chunks/turbopack-0_jrb8zv4u-h5.js +0 -1
- package/out/_next/static/chunks/turbopack-0_z4clx8_mihg.js +0 -1
- package/out/_next/static/chunks/turbopack-0_~3azjxcbh7b.js +0 -1
- package/out/_next/static/chunks/turbopack-0acoq2sfyoi9y.js +0 -1
- package/out/_next/static/chunks/turbopack-0ce310hugu4ud.js +0 -1
- package/out/_next/static/chunks/turbopack-0cq29kq0j_4v~.js +0 -1
- package/out/_next/static/chunks/turbopack-0e-cncqz58fjt.js +0 -1
- package/out/_next/static/chunks/turbopack-0e2su8irrrxe9.js +0 -1
- package/out/_next/static/chunks/turbopack-0e8f.eohopo8i.js +0 -1
- package/out/_next/static/chunks/turbopack-0ek~cn8gmycju.js +0 -1
- package/out/_next/static/chunks/turbopack-0eywiuu9zzv~v.js +0 -1
- package/out/_next/static/chunks/turbopack-0ft2eo1uoq84f.js +0 -1
- package/out/_next/static/chunks/turbopack-0h0v60mhtl8e5.js +0 -1
- package/out/_next/static/chunks/turbopack-0hd7gd_hw0ffd.js +0 -1
- package/out/_next/static/chunks/turbopack-0ho~reia368_n.js +0 -1
- package/out/_next/static/chunks/turbopack-0hs67a4-408yr.js +0 -1
- package/out/_next/static/chunks/turbopack-0hzo_yuvuoq4p.js +0 -1
- package/out/_next/static/chunks/turbopack-0iqen9zbwhwwt.js +0 -1
- package/out/_next/static/chunks/turbopack-0lse_458kpvoc.js +0 -1
- package/out/_next/static/chunks/turbopack-0m802fcmg9zeo.js +0 -1
- package/out/_next/static/chunks/turbopack-0mh8jqpakiu6t.js +0 -1
- package/out/_next/static/chunks/turbopack-0n7uk~in3~kz5.js +0 -1
- package/out/_next/static/chunks/turbopack-0oq4yqp_mwlp8.js +0 -1
- package/out/_next/static/chunks/turbopack-0p8.m9z07pk0d.js +0 -1
- package/out/_next/static/chunks/turbopack-0q35m3rl2~7_w.js +0 -1
- package/out/_next/static/chunks/turbopack-0qj_d90z9-.xb.js +0 -1
- package/out/_next/static/chunks/turbopack-0rw3antw3c5q1.js +0 -1
- package/out/_next/static/chunks/turbopack-0s1w5b4s~tq0a.js +0 -1
- package/out/_next/static/chunks/turbopack-0s3brlp4-qpvy.js +0 -1
- package/out/_next/static/chunks/turbopack-0ssu8b8ns4wgj.js +0 -1
- package/out/_next/static/chunks/turbopack-0txlw7w4nbwom.js +0 -1
- package/out/_next/static/chunks/turbopack-0umaqu4ffby0g.js +0 -1
- package/out/_next/static/chunks/turbopack-0upagoxw-k-s-.js +0 -1
- package/out/_next/static/chunks/turbopack-0v97f616jctw_.js +0 -1
- package/out/_next/static/chunks/turbopack-0vborwvkaogp3.js +0 -1
- package/out/_next/static/chunks/turbopack-0vii195vc_rhx.js +0 -1
- package/out/_next/static/chunks/turbopack-0vy4m9hkmjj~..js +0 -1
- package/out/_next/static/chunks/turbopack-0wkwlz_hsol74.js +0 -1
- package/out/_next/static/chunks/turbopack-0w~j_hagmzb-9.js +0 -1
- package/out/_next/static/chunks/turbopack-0xe-7k8uoudaf.js +0 -1
- package/out/_next/static/chunks/turbopack-107_r~te8y84z.js +0 -1
- package/out/_next/static/chunks/turbopack-10m1bv2pqkdnu.js +0 -1
- package/out/_next/static/chunks/turbopack-11b3cci1vf3sv.js +0 -1
- package/out/_next/static/chunks/turbopack-11bncwch._hz4.js +0 -1
- package/out/_next/static/chunks/turbopack-11f~mh1t1pbfv.js +0 -1
- package/out/_next/static/chunks/turbopack-14fqn-ie4g30t.js +0 -1
- package/out/_next/static/chunks/turbopack-151-hh8klk1hk.js +0 -1
- package/out/_next/static/chunks/turbopack-16yza259goc47.js +0 -1
- package/out/admin-ui-permissions.js +0 -129
- /package/out/_next/static/chunks/{0a1flay6uksa2.js → 0wooaklx8_14q.js} +0 -0
- /package/out/_next/static/chunks/{0htfk2vj7m.9j.js → 1jqnrnw0p9tw5.js} +0 -0
- /package/out/_next/static/{NCD-SJ8yCV0Afw8rFopK9 → mgojmR_4GNqJNutDR9oFi}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{NCD-SJ8yCV0Afw8rFopK9 → mgojmR_4GNqJNutDR9oFi}/_ssgManifest.js +0 -0
|
@@ -1,596 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94330,43054,95336,16113,82191,42532,10785,1330,73356,50099,77035,56902,19051,84278,11907,e=>{"use strict";var t=e.i(91788);let a=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M6 5v1H4.667a1.75 1.75 0 0 0-1.743 1.598l-.826 9.5A1.75 1.75 0 0 0 3.84 19H16.16a1.75 1.75 0 0 0 1.743-1.902l-.826-9.5A1.75 1.75 0 0 0 15.333 6H14V5a4 4 0 0 0-8 0Zm4-2.5A2.5 2.5 0 0 0 7.5 5v1h5V5A2.5 2.5 0 0 0 10 2.5ZM7.5 10a2.5 2.5 0 0 0 5 0V8.75a.75.75 0 0 1 1.5 0V10a4 4 0 0 1-8 0V8.75a.75.75 0 0 1 1.5 0V10Z",clipRule:"evenodd"}))});e.s(["ShoppingBagIcon",0,a],94330);let s=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{d:"M12 9a1 1 0 0 1-1-1V3c0-.552.45-1.007.997-.93a7.004 7.004 0 0 1 5.933 5.933c.078.547-.378.997-.93.997h-5Z"}),t.createElement("path",{d:"M8.003 4.07C8.55 3.994 9 4.449 9 5v5a1 1 0 0 0 1 1h5c.552 0 1.008.45.93.997A7.001 7.001 0 0 1 2 11a7.002 7.002 0 0 1 6.003-6.93Z"}))});e.s(["ChartPieIcon",0,s],43054);let l=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{d:"M2 3a1 1 0 0 0-1 1v1a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H2Z"}),t.createElement("path",{fillRule:"evenodd",d:"M2 7.5h16l-.811 7.71a2 2 0 0 1-1.99 1.79H4.802a2 2 0 0 1-1.99-1.79L2 7.5ZM7 11a1 1 0 0 1 1-1h4a1 1 0 1 1 0 2H8a1 1 0 0 1-1-1Z",clipRule:"evenodd"}))});e.s(["ArchiveBoxIcon",0,l],95336);let d=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M3.5 2A1.5 1.5 0 0 0 2 3.5V15a3 3 0 1 0 6 0V3.5A1.5 1.5 0 0 0 6.5 2h-3Zm11.753 6.99L9.5 14.743V6.257l1.51-1.51a1.5 1.5 0 0 1 2.122 0l2.121 2.121a1.5 1.5 0 0 1 0 2.122ZM8.364 18H16.5a1.5 1.5 0 0 0 1.5-1.5v-3a1.5 1.5 0 0 0-1.5-1.5h-2.136l-6 6ZM5 16a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))});e.s(["SwatchIcon",0,d],16113);let i=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M1 2.75A.75.75 0 0 1 1.75 2h16.5a.75.75 0 0 1 0 1.5H18v8.75A2.75 2.75 0 0 1 15.25 15h-1.072l.798 3.06a.75.75 0 0 1-1.452.38L13.41 18H6.59l-.114.44a.75.75 0 0 1-1.452-.38L5.823 15H4.75A2.75 2.75 0 0 1 2 12.25V3.5h-.25A.75.75 0 0 1 1 2.75ZM7.373 15l-.391 1.5h6.037l-.392-1.5H7.373Zm7.49-8.931a.75.75 0 0 1-.175 1.046 19.326 19.326 0 0 0-3.398 3.098.75.75 0 0 1-1.097.04L8.5 8.561l-2.22 2.22A.75.75 0 1 1 5.22 9.72l2.75-2.75a.75.75 0 0 1 1.06 0l1.664 1.663a20.786 20.786 0 0 1 3.122-2.74.75.75 0 0 1 1.046.176Z",clipRule:"evenodd"}))});e.s(["PresentationChartLineIcon",0,i],82191);var r=e.i(91398),o=e.i(66773),n=e.i(38865),u=e.i(69322),c=e.i(58971),m=e.i(5505),p=e.i(1504),f=e.i(98520),x=e.i(79093),g=e.i(64127),h=e.i(69211),b=e.i(72094),v=e.i(73419),y=e.i(99160),j=e.i(45229),I=e.i(81013),w=e.i(98949),M=e.i(82226),P=e.i(59080),N=e.i(32171);let k=P.gql`
|
|
2
|
-
fragment ProductCatalogPriceFragment on ProductCatalogPrice {
|
|
3
|
-
isTaxable
|
|
4
|
-
isNetPrice
|
|
5
|
-
country {
|
|
6
|
-
_id
|
|
7
|
-
isoCode
|
|
8
|
-
name
|
|
9
|
-
flagEmoji
|
|
10
|
-
}
|
|
11
|
-
currency {
|
|
12
|
-
_id
|
|
13
|
-
isoCode
|
|
14
|
-
isActive
|
|
15
|
-
}
|
|
16
|
-
amount
|
|
17
|
-
maxQuantity
|
|
18
|
-
}
|
|
19
|
-
`,_=P.gql`
|
|
20
|
-
query ProductCatalogPrices($productId: ID!) {
|
|
21
|
-
productCatalogPrices(productId: $productId) {
|
|
22
|
-
...ProductCatalogPriceFragment
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
${k}
|
|
26
|
-
`;var C=e.i(76204),$=e.i(62199);let S=P.gql`
|
|
27
|
-
mutation UpdateProductCommerce(
|
|
28
|
-
$productId: ID!
|
|
29
|
-
$commerce: UpdateProductCommerceInput!
|
|
30
|
-
) {
|
|
31
|
-
updateProductCommerce(productId: $productId, commerce: $commerce) {
|
|
32
|
-
...ProductDetailFragment
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
${$.default}
|
|
36
|
-
`;e.s(["default",0,({productId:e,disabled:t=!1})=>{let{formatMessage:a}=(0,u.useIntl)(),{catalogPrices:s}=(({productId:e})=>{let{data:t,loading:a,error:s}=(0,N.useQuery)(_,{skip:!e,variables:{productId:e}});return{catalogPrices:t?.productCatalogPrices||[],loading:a,error:s}})({productId:e}),{hasRole:l}=(0,c.default)(),{updateProductCommerce:d}=(()=>{let[e]=(0,C.useMutation)(S),{currencies:t}=(0,x.default)();return{updateProductCommerce:async({productId:a,commerce:{pricing:s}})=>e({variables:{productId:a,commerce:{pricing:s.map(e=>{let a=t.find(({isoCode:t})=>t===e.currencyCode),s=((e,t)=>{if(!e||t<0)return 0;let a=e.trim();if(!/^-?\d*\.?\d*$/.test(a))return 0;let s=a.indexOf(".");return -1===s?Number(a)*10**t:Number((a.slice(0,s)||"0")+a.slice(s+1).slice(0,t).padEnd(t,"0"))})(e.amount.toString(),a.decimals);return{...e,amount:s}})}},refetchQueries:["Products"]})}})(),{countries:i}=(0,f.default)(),{currencies:P}=(0,x.default)(),k=i?.find(({isBase:e})=>e),$=k?.isoCode,T=k?.defaultCurrency?.isoCode,R=async({pricing:t})=>(await d({productId:e,commerce:{pricing:t}}),{success:!0}),A=a({id:"saved",defaultMessage:"Saved"}),q=((e=[],t=[])=>t.length?e.map(e=>{let a=t.find(({isoCode:t})=>t.toLowerCase()===e.currency.isoCode.toLowerCase());return{countryCode:e.country.isoCode,currencyCode:e.currency.isoCode,isTaxable:!!e.isTaxable,isNetPrice:!!e.isNetPrice,amount:((e,t)=>{if(t<0)return"0";if(0===t)return e.toString();let a=e.toString();if("0"===a)return"0."+"0".repeat(t);let s=a.startsWith("-"),l=s?a.slice(1):a;if(l.length<=t){let e=l.padStart(t,"0");return`${s?"-":""}0.${e}`}let d=l.length-t,i=l.slice(0,d),r=l.slice(d);return`${s?"-":""}${i}.${r}`})(e.amount,a?.decimals),maxQuantity:e.maxQuantity}}):[])(s,P),V=(0,w.default)({disabled:t,submit:R,successMessage:A,enableReinitialize:!0,initialValues:{pricing:[...q?.length?q:[{maxQuantity:"",amount:null,isTaxable:!1,isNetPrice:!1,currencyCode:T,countryCode:$}]]}}),{values:D}=V.formik,{pricing:E}=D;return(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"mt-5 md:col-span-3 lg:mt-0",children:[(0,r.jsx)(m.default,{children:(0,r.jsxs)(h.default,{className:"mt-3 rounded-md",form:V,disabled:!l(o.IRoleAction.ManageProducts),children:[(0,r.jsxs)("div",{className:"relative max-w-full p-3 sm:px-5",children:[(0,r.jsx)("div",{className:"max-w-full justify-between align-baseline"}),(0,r.jsxs)("label",{className:"sr-only flex w-full font-sans text-sm text-slate-500 dark:text-slate-200 lg:not-sr-only",children:[(0,r.jsxs)("span",{className:"flex w-full",children:[(0,r.jsx)("span",{className:"w-full",children:a({id:"max_quantity",defaultMessage:"Max Quantity"})}),(0,r.jsx)("span",{className:"w-full lg:ml-5",children:a({id:"price",defaultMessage:"Price"})})]}),(0,r.jsxs)("span",{className:"flex w-full",children:[(0,r.jsx)("span",{className:"w-full lg:ml-8",children:a({id:"vat_suspect",defaultMessage:"Vat Suspect"})}),(0,r.jsx)("span",{className:"w-full lg:ml-12",children:a({id:"net_price",defaultMessage:"Net Price"})})]}),(0,r.jsxs)("span",{className:"mr-5 flex w-full",children:[(0,r.jsx)("span",{className:"ml-10 w-full",children:a({id:"country",defaultMessage:"Country"})}),(0,r.jsx)("span",{className:"w-full",children:a({id:"currency",defaultMessage:"Currency"})})]})]}),(0,r.jsx)(n.FieldArray,{name:"pricing",children:({push:e,remove:t})=>(0,r.jsxs)("div",{children:[D.pricing.map((e,s)=>(0,r.jsxs)("div",{className:"relative max-w-full border-b dark:border-slate-700 pt-1 pb-5 mb-3 align-baseline lg:flex",children:[(0,r.jsxs)("div",{className:"flex w-full gap-x-2",children:[(0,r.jsx)(j.default,{className:"w-full",disabled:!l(o.IRoleAction.ManageProducts),validators:[(0,M.validateProductCommerce)(s,E),(0,M.validateProductCommerceOneNull)(E)],name:`pricing[${s}].maxQuantity`,id:`pricing[${s}].maxQuantity`,type:"number",min:0,hideLabel:!0,label:a({id:"max_quantity",defaultMessage:"Max Quantity"})}),(0,r.jsx)(j.default,{type:"number",className:"w-full",disabled:!l(o.IRoleAction.ManageProducts),name:`pricing[${s}].amount`,id:`pricing[${s}].amount`,required:!0,hideLabel:!0,label:a({id:"price",defaultMessage:"Price "})})]}),(0,r.jsxs)("div",{className:"flex w-full gap-x-2 pt-3 pb-2",children:[(0,r.jsx)("div",{className:"w-full lg:ml-8 lg:items-center",children:(0,r.jsx)(g.default,{name:`pricing[${s}].isTaxable`,labelClassName:"lg:sr-only items-center ",disabled:!l(o.IRoleAction.ManageProducts),label:a({id:"vat_suspect",defaultMessage:"Vat Suspect"}),className:"mr-2 h-4 w-4 rounded-sm border-slate-300 dark:border-slate-600 bg-white dark:!bg-slate-900 text-slate-950 focus:ring-slate-800 lg:items-center",type:"checkbox"})}),(0,r.jsx)("div",{className:"w-full lg:ml-8",children:(0,r.jsx)(g.default,{name:`pricing[${s}].isNetPrice`,labelClassName:"lg:sr-only items-center",disabled:!l(o.IRoleAction.ManageProducts),label:a({id:"net_price",defaultMessage:"Net Price"}),hideLabel:!0,className:"mr-2 h-4 w-4 justify-between rounded-sm border-slate-300 dark:border-slate-600 bg-white dark:!bg-slate-900 text-slate-950 focus:ring-slate-800 lg:items-center",type:"checkbox"})})]}),(0,r.jsxs)("div",{className:"flex w-full gap-x-2 mt-1",children:[(0,r.jsx)(v.default,{defaultValue:$,className:"w-full lg:ml-4 lg:mr-4",label:a({id:"country",defaultMessage:"Country"}),name:`pricing[${s}].countryCode`,id:`pricing[${s}].countryCode`,disabled:!l(o.IRoleAction.ManageProducts),required:!0,options:(0,p.default)(i,"isoCode","isoCode"),hideLabel:!0}),(0,r.jsx)(v.default,{defaultValue:T,className:"w-full lg:mr-8 ",label:a({id:"currency",defaultMessage:"Currency"}),disabled:!l(o.IRoleAction.ManageProducts),name:`pricing[${s}].currencyCode`,id:`pricing[${s}].currencyCode`,required:!0,options:(0,p.default)(P,"isoCode","isoCode"),hideLabel:!0,placeholder:a({id:"country_currency",defaultMessage:"Currency"})})]}),l(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"absolute -top-2 right-0 mt-0 mr-0 shrink-0 pb-1 md:mr-0 lg:mt-6 lg:py-0 lg:px-0 ",children:(0,r.jsx)("button",{className:"items-center rounded-full bg-white dark:bg-slate-900 px-1 py-1 text-sm text-rose-500 dark:text-rose-400 hover:bg-rose-50 focus:outline-hidden focus:ring-0 focus:ring-rose-500 focus:ring-offset-2",type:"button",onClick:()=>t(s),children:(0,r.jsxs)("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,r.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),(0,r.jsx)("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),(0,r.jsx)("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})})})]},s)),l(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsx)(I.default,{variant:"tertiary",text:a({id:"add_price_row",defaultMessage:"Add Price Row"}),className:"w-full items-center justify-center",onClick:()=>e({maxQuantity:"",amount:null,isTaxable:!1,isNetPrice:!1,currencyCode:T,countryCode:$})})})]})})]}),(0,r.jsx)(b.default,{displayFieldErrors:!0}),l(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"-mx-6 p-6 bg-slate-50 dark:bg-slate-900 text-right",children:(0,r.jsx)(y.default,{className:"mx-6",label:a({id:"save",defaultMessage:"Save"})})})]})}),(0,r.jsx)("p",{className:"mt-6 mb-10 text-sm text-slate-500 dark:text-slate-400",children:a({id:"product_commerce_info",defaultMessage:"One price list should have a max quantity field empty and no price should have the same max quantity along with currency and country specified"})})]})})}],42532);var T=e.i(70693),R=e.i(14336);let A=P.gql`
|
|
37
|
-
mutation UpdateProductTexts($productId: ID!, $texts: [ProductTextInput!]!) {
|
|
38
|
-
updateProductTexts(productId: $productId, texts: $texts) {
|
|
39
|
-
...ProductTextsFragment
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
${R.default}
|
|
43
|
-
`;var q=e.i(60195),V=e.i(73483),D=e.i(96015),E=e.i(30276),U=e.i(57561),O=e.i(48539);e.s(["default",0,({productId:e,disabled:a=!1})=>{let{selectedLocale:s,setSelectedLocale:l,languageDialectList:d}=(0,U.default)(),{formatMessage:i}=(0,u.useIntl)(),{hasRole:n}=(0,c.default)(),{defaultLocale:p,shopInfo:f,loading:x}=(0,O.default)(),{translatedTexts:g}=(({productId:e})=>{let{customProperties:t}=(0,T.default)(),{data:a,loading:s,error:l}=(0,N.useQuery)(((e="")=>P.gql`
|
|
44
|
-
query TranslatedProductTexts($productId: ID!) {
|
|
45
|
-
translatedProductTexts(productId: $productId) {
|
|
46
|
-
...ProductTextsFragment
|
|
47
|
-
${e}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
${R.default}
|
|
51
|
-
`)(t?.ProductTexts),{skip:!e,variables:{productId:e}});return{translatedTexts:a?.translatedProductTexts||[],loading:s,error:l}})({productId:e}),b=i({id:"saved",defaultMessage:"Saved"}),{updateProductTexts:v}=(()=>{let[e]=(0,C.useMutation)(A);return{updateProductTexts:async({productId:t,texts:a})=>e({variables:{productId:t,texts:a},refetchQueries:["TranslatedProductTexts"]})}})(),I=async({slug:t,title:a,subtitle:l,vendor:d,description:i,brand:r,labels:o})=>(await v({productId:e,texts:[{locale:s,slug:t,title:a,subtitle:l,vendor:d,description:i,brand:r,labels:o}]}),{success:!0}),M=(0,w.default)({disabled:a,submit:I,successMessage:b,initialValues:{slug:"",title:"",subtitle:"",vendor:"",description:"",brand:"",labels:[]}});return(0,t.useEffect)(()=>{let e=g?.find(e=>e.locale===s);M.formik.setValues({slug:"",title:"",subtitle:"",vendor:"",description:"",brand:"",labels:[],...e||{}})},[g,s]),(0,t.useEffect)(()=>{if(f&&g?.length&&!g?.find(({locale:e})=>e===s))if(p&&g?.find(({locale:e})=>e===p))l(p);else if(p&&g?.find(({locale:e})=>e===p.split("-")[0]))l(p.split("-")[0]);else{let e=g?.find(({locale:e})=>e&&d?.find(({isoCode:t})=>t===e));l(e?.locale)}},[x,g]),(0,r.jsx)(q.default,{documentationLabel:i({id:"texts",defaultMessage:"Texts"}),className:"mt-2 lg:mt-5",documentation:(0,r.jsx)(u.FormattedMessage,{id:"product_text_form_description",defaultMessage:"<ul> <li><strong>Slug:</strong> The unique part of your product URL (e.g., 'my-awesome-product'). Keep it short and descriptive.</li> <li><strong>Localization:</strong> Switch languages using the dropdown at the top left to translate content for different markets.</li> <li><strong>Description:</strong> Supports Markdown and HTML formatting. Use double backslash (\\\\\\\\) for line breaks.</li> <li><strong>Labels:</strong> Eye-catching badges that appear on your product (e.g., 'New Arrival', '50% Off', 'Limited Edition'). Perfect for promotions and highlighting special features. Each language can have unique labels.</li> <li><strong>Key Difference:</strong> Labels are customer-facing promotional badges, while Tags are internal keywords for organization and filtering.</li> </ul>",values:{ul:e=>(0,r.jsxs)("ul",{className:"space-y-2",children:[e," "]}),li:e=>(0,r.jsxs)("li",{className:"text-sm",children:[e," "]},Math.random()),strong:e=>(0,r.jsx)("strong",{className:"font-semibold text-slate-800 dark:text-slate-200",children:e})}}),children:(0,r.jsx)(m.default,{children:(0,r.jsxs)(h.default,{form:M,disabled:!n(o.IRoleAction.ManageProducts),children:[(0,r.jsxs)("div",{className:"relative text-slate-500 dark:text-slate-200 px-4 py-5 sm:p-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-6 gap-6",children:[(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{name:"slug",disabled:!n(o.IRoleAction.ManageProducts),required:!0,id:"slug",label:i({id:"slug",defaultMessage:"Slug"}),autoComplete:"on",className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{name:"title",disabled:!n(o.IRoleAction.ManageProducts),required:!0,id:"title",label:i({id:"title",defaultMessage:"Title"}),autoComplete:"on",className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{name:"subtitle",disabled:!n(o.IRoleAction.ManageProducts),id:"subtitle",label:i({id:"subtitle",defaultMessage:"Subtitle"}),autoComplete:"on",className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{name:"vendor",disabled:!n(o.IRoleAction.ManageProducts),id:"vendor",label:i({id:"vendor",defaultMessage:"Vendor"}),autoComplete:"on",className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{name:"brand",disabled:!n(o.IRoleAction.ManageProducts),id:"brand",label:i({id:"brand",defaultMessage:"Brand"}),autoComplete:"on",className:"text-sm"})}),(0,r.jsxs)("div",{className:"col-span-6 sm:col-span-3",children:[(0,r.jsx)(D.default,{name:"labels",id:"labels",disabled:!n(o.IRoleAction.ManageProducts),label:i({id:"labels",defaultMessage:"Labels"}),placeholder:i({id:"label",defaultMessage:"Label"}),buttonText:i({id:"add",defaultMessage:"Add"}),autoComplete:"on",className:"text-sm"}),(0,r.jsx)(E.default,{messageKey:"product_labels_help",defaultMessage:"Add promotional badges like 'New Arrival', '50% Off', or 'Limited Edition' that customers will see on your product. Perfect for highlighting deals and special features.",className:"mt-3"})]})]}),(0,r.jsx)("div",{className:"col-span-6 mt-6 sm:col-span-3",children:(0,r.jsx)(V.default,{name:"description",id:"description",disabled:!n(o.IRoleAction.ManageProducts),label:i({id:"description",defaultMessage:"Description"})})})]}),n(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"border-t-slate-100 border-t dark:border-t-slate-700 bg-slate-50 dark:bg-slate-900 px-4 py-5 text-right sm:px-6",children:(0,r.jsx)(y.default,{label:i({id:"save",defaultMessage:"Save"})})})]})})})}],10785);var L=e.i(28401),B=e.i(59295),F=e.i(6277),Q=e.i(33006),z=e.i(93994),K=e.i(64479);let H=P.gql`
|
|
52
|
-
mutation PrepareProductMediaUpload($mediaName: String!, $productId: ID!) {
|
|
53
|
-
prepareProductMediaUpload(mediaName: $mediaName, productId: $productId) {
|
|
54
|
-
_id
|
|
55
|
-
putURL
|
|
56
|
-
expires
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`;var Z=e.i(1880);let W=P.gql`
|
|
60
|
-
fragment ProductMediaFragment on ProductMedia {
|
|
61
|
-
_id
|
|
62
|
-
tags
|
|
63
|
-
file {
|
|
64
|
-
_id
|
|
65
|
-
name
|
|
66
|
-
type
|
|
67
|
-
size
|
|
68
|
-
url
|
|
69
|
-
}
|
|
70
|
-
sortKey
|
|
71
|
-
texts {
|
|
72
|
-
_id
|
|
73
|
-
locale
|
|
74
|
-
title
|
|
75
|
-
subtitle
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
`,G=P.gql`
|
|
79
|
-
query ProductMedia($productId: ID, $slug: String) {
|
|
80
|
-
product(productId: $productId, slug: $slug) {
|
|
81
|
-
_id
|
|
82
|
-
media {
|
|
83
|
-
...ProductMediaFragment
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
${W}
|
|
88
|
-
`;var J=e.i(26178),X=e.i(90062);let Y=P.gql`
|
|
89
|
-
fragment ProductMediaTextsFragment on ProductMediaTexts {
|
|
90
|
-
_id
|
|
91
|
-
locale
|
|
92
|
-
title
|
|
93
|
-
subtitle
|
|
94
|
-
}
|
|
95
|
-
`,ee=P.gql`
|
|
96
|
-
query TranslatedProductMediaTexts($productMediaId: ID!) {
|
|
97
|
-
translatedProductMediaTexts(productMediaId: $productMediaId) {
|
|
98
|
-
...ProductMediaTextsFragment
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
${Y}
|
|
102
|
-
`,et=P.gql`
|
|
103
|
-
mutation UpdateProductMediaTexts(
|
|
104
|
-
$productMediaId: ID!
|
|
105
|
-
$texts: [ProductMediaTextInput!]!
|
|
106
|
-
) {
|
|
107
|
-
updateProductMediaTexts(productMediaId: $productMediaId, texts: $texts) {
|
|
108
|
-
...ProductMediaTextsFragment
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
${Y}
|
|
112
|
-
`;var ea=e.i(15971);let es=P.gql`
|
|
113
|
-
mutation RemoveProductMedia($productMediaId: ID!) {
|
|
114
|
-
removeProductMedia(productMediaId: $productMediaId) {
|
|
115
|
-
_id
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
`;var el=e.i(6607);let ed=({media:e,id:a})=>{let{setModal:s}=(0,el.default)(),{removeProductMedia:l}=(()=>{let[e]=(0,C.useMutation)(es);return{removeProductMedia:async({productMediaId:t})=>e({variables:{productMediaId:t},refetchQueries:["ProductMedia"]})}})(),{formatMessage:d}=(0,u.useIntl)(),{selectedLocale:i}=(0,U.default)(),{updateProductMediaTexts:n}=(()=>{let[e]=(0,C.useMutation)(et);return{updateProductMediaTexts:async({productMediaId:t,texts:a})=>e({variables:{productMediaId:t,texts:a},refetchQueries:["TranslatedProductMediaTexts"]})}})(),[m,p]=(0,t.useState)(!1),{hasRole:f}=(0,c.default)(),{translatedMediaTexts:x}=(({productMediaId:e})=>{let{data:t,loading:a,error:s}=(0,N.useQuery)(ee,{skip:!e,variables:{productMediaId:e}});return{translatedMediaTexts:t?.translatedProductMediaTexts||[],loading:a,error:s}})({productMediaId:e._id}),g=x?.find(e=>e.locale===i)||{},h=async e=>{await s((0,r.jsx)(ea.default,{onCancelClick:async()=>s(""),message:d({id:"delete_product_media_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this media? "}),onOkClick:async()=>{s(""),await l({productMediaId:e}),L.toast.success(d({id:"product_media_deleted",defaultMessage:"Media deleted successfully"}))},okText:d({id:"delete_product_media",defaultMessage:"Delete media"})}))},b=async({title:t,subtitle:a})=>(await n({productMediaId:e._id,texts:[{title:t,locale:i,subtitle:a}]}),p(!1),!0);return(0,r.jsx)(X.default,{id:a,media:e,mediaText:g,isEdit:m,onDelete:f(o.IRoleAction.ManageProducts)?h:void 0,onEdit:f(o.IRoleAction.ManageProducts)?p:void 0,onUpdate:f(o.IRoleAction.ManageProducts)?b:void 0})},ei=({medias:e,items:t})=>{let{formatMessage:a}=(0,u.useIntl)();return(0,r.jsx)("div",{className:"rounded-md lg:col-span-6 px-6",children:(0,r.jsxs)("div",{className:"mx-auto overflow-hidden",children:[(0,r.jsx)("h2",{className:"sr-only",children:a({id:"product_media",defaultMessage:"Product Media"})}),(0,r.jsx)("div",{className:"flow-root",children:(0,r.jsx)(F.SortableContext,{items:t,strategy:F.verticalListSortingStrategy,children:(0,r.jsx)("ul",{className:"flex flex-col gap-3 rounded-md transition-[background-color] ease-in-out delay-200 ",children:e?.length?t.map(t=>{let a=Object.values(e).find(e=>e._id===t);return(0,r.jsx)(ed,{id:t,media:a},a._id)}):(0,r.jsx)(J.default,{message:a({id:"media",defaultMessage:"Media"})})})})})]})})},er=P.gql`
|
|
119
|
-
mutation ReOrderProductMedia($sortKeys: [ReorderProductMediaInput!]!) {
|
|
120
|
-
reorderProductMedia(sortKeys: $sortKeys) {
|
|
121
|
-
_id
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
`;e.s(["default",0,({productId:e})=>{let{productMedia:t}=(({productId:e=null,slug:t=null}={})=>{let a=(0,Z.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,N.useQuery)(G,{skip:!e&&!a,variables:{productId:e||a}});return{productMedia:s?.product?.media||[],loading:l,error:d}})({productId:e}),{formatMessage:a}=(0,u.useIntl)(),{hasRole:s}=(0,c.default)(),{addProductMedia:l}=(()=>{let[e]=(0,C.useMutation)(H),{confirmMediaUpload:t}=(0,K.default)({refetchQueries:["Product"]});return{addProductMedia:async({productId:a,media:s})=>{let{data:l}=await e({variables:{productId:a,mediaName:s.name}}),{prepareProductMediaUpload:d}=l;return await (0,z.default)(s,d.putURL),t({mediaUploadTicketId:d._id,size:s?.size,type:s.type})}}})(),{reOrderProductMedia:d}=(()=>{let[e]=(0,C.useMutation)(er);return{reOrderProductMedia:async({sortKeys:t})=>e({variables:{sortKeys:t},refetchQueries:["ProductMedia"]})}})(),i=t?.map(e=>e._id),n=async t=>{try{await l({productId:e,media:t}),L.toast.success(a({id:"product_media_upload",defaultMessage:"Media uploaded successfully"}))}catch(e){L.toast.error(a({id:"fail_upload",defaultMessage:"Media upload failed"}))}},m=async e=>{let{active:t,over:s}=e;if(t.id!==s.id){let e=i.indexOf(t.id),l=i.indexOf(s.id),r=(0,F.arrayMove)(i,e,l).map((e,t)=>({productMediaId:e,sortKey:t}));try{await d({sortKeys:r}),L.toast.success(a({id:"link_reorder",defaultMessage:"Link reorder successfully"}))}catch(e){L.toast.error(a({id:"fail_reorder",defaultMessage:"Reordering failed, Try again!"}))}}else L.toast.info(a({id:"reorder_original",defaultMessage:"Reorder to original location"}))},p=(0,B.useSensors)((0,B.useSensor)(B.PointerSensor,{activationConstraint:{distance:5}}),(0,B.useSensor)(B.KeyboardSensor,{coordinateGetter:F.sortableKeyboardCoordinates}));return(0,r.jsxs)("div",{className:"mx-auto mt-5 space-y-5 lg:space-y-0 max-w-full py-6 lg:grid lg:grid-cols-12 lg:gap-4",children:[s(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"mx-auto w-full px-6 lg:col-span-6 lg:col-start-1",children:(0,r.jsx)(Q.default,{onlyDragAndDrop:!0,addMedia:n})}),(0,r.jsx)(B.DndContext,{sensors:p,collisionDetection:B.closestCenter,onDragEnd:m,children:(0,r.jsx)(ei,{medias:t,items:i})})]})}],1330);let eo=P.gql`
|
|
125
|
-
fragment ProductPlanConfigurationFragment on ProductPlanConfiguration {
|
|
126
|
-
usageCalculationType
|
|
127
|
-
billingInterval
|
|
128
|
-
trialInterval
|
|
129
|
-
trialIntervalCount
|
|
130
|
-
billingIntervalCount
|
|
131
|
-
}
|
|
132
|
-
`,en=P.gql`
|
|
133
|
-
query ProductPlan($productId: ID, $slug: String) {
|
|
134
|
-
product(productId: $productId, slug: $slug) {
|
|
135
|
-
_id
|
|
136
|
-
... on PlanProduct {
|
|
137
|
-
plan {
|
|
138
|
-
...ProductPlanConfigurationFragment
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
${eo}
|
|
144
|
-
`,eu=P.gql`
|
|
145
|
-
query ProductPlanConfigurationOptions {
|
|
146
|
-
usageCalculationTypes: __type(name: "ProductPlanUsageCalculationType") {
|
|
147
|
-
options: enumValues {
|
|
148
|
-
value: name
|
|
149
|
-
label: description
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
configurationIntervals: __type(name: "ProductPlanConfigurationInterval") {
|
|
153
|
-
options: enumValues {
|
|
154
|
-
value: name
|
|
155
|
-
label: description
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
`,ec=P.gql`
|
|
160
|
-
mutation UpdateProductPlan($productId: ID!, $plan: UpdateProductPlanInput!) {
|
|
161
|
-
updateProductPlan(productId: $productId, plan: $plan) {
|
|
162
|
-
_id
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
`;e.s(["default",0,({productId:e,disabled:a=!1})=>{let{formatMessage:s}=(0,u.useIntl)(),{configurationIntervals:l,usageCalculationTypes:d}=(()=>{let{data:e,loading:t,error:a}=(0,N.useQuery)(eu),s=e?.usageCalculationTypes?.options||[];return{configurationIntervals:e?.configurationIntervals?.options||[],usageCalculationTypes:s,loading:t,error:a}})(),{plan:i,loading:n}=(({productId:e=null,slug:t=null}={})=>{let a=(0,Z.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,N.useQuery)(en,{skip:!e&&!a,variables:{productId:e||a}}),i=s?.product;return{plan:i?.plan,loading:l,error:d}})({productId:e}),{hasRole:f}=(0,c.default)(),{updateProductPlan:x}=(()=>{let[e]=(0,C.useMutation)(ec);return{updateProductPlan:async({productId:t,plan:{usageCalculationType:a,billingInterval:s,billingIntervalCount:l=null,trialInterval:d=null,trialIntervalCount:i=null}})=>e({variables:{productId:t,plan:{usageCalculationType:a,billingInterval:s,billingIntervalCount:l,trialInterval:d,trialIntervalCount:i}},refetchQueries:["Products"]})}})(),g=s({id:"enrollment_updated_successfully",defaultMessage:"Enrollment saved successfully"}),b=async({trialInterval:t,trialIntervalCount:a,billingInterval:s,billingIntervalCount:l,usageCalculationType:d})=>(await x({productId:e,plan:{billingInterval:s,usageCalculationType:d,billingIntervalCount:l,trialInterval:t,trialIntervalCount:a}}),{success:!0}),I=(0,w.default)({disabled:a,submit:b,successMessage:g,initialValues:{trialInterval:"",trialIntervalCount:"",billingInterval:"",billingIntervalCount:"",usageCalculationType:""},getSubmitErrorMessage:e=>e?.message?.includes("Status of the product does not allow this operation")?s({id:"subscription_product_type_not_valid",defaultMessage:"Status of the product does not allow this operation"}):e?.message||""});return(0,t.useEffect)(()=>{i&&!n&&I.formik.setValues(i)},[i]),(0,r.jsx)(q.default,{documentationLabel:s({id:"subscription",defaultMessage:"Subscription"}),className:"mt-2 lg:mt-5",documentation:(0,r.jsx)(u.FormattedMessage,{id:"product_subscription_form_description",defaultMessage:"<ul><li> Information that will be used to calculate price of a subscription based product </li> <li>The price specified in commerce section will be used when calculating fees on each interval. </li> <li>Price will not be included for the specified trial period </li> </ul>",values:{ul:e=>(0,r.jsxs)("ul",{className:"space-y-1",children:[e," "]}),li:e=>(0,r.jsx)("li",{children:e})}}),children:(0,r.jsx)(m.default,{children:(0,r.jsx)(h.default,{form:I,children:(0,r.jsxs)("div",{className:"relative max-w-full space-y-6 rounded-md sm:p-6",children:[(0,r.jsx)(v.default,{required:!0,className:"mt-2.5 w-full py-1.5 text-sm font-medium text-slate-500",label:s({id:"usage_calculation_type",defaultMessage:"Usage calculation type"}),placeholder:s({id:"usage_calculation_type",defaultMessage:"Usage calculation type"}),name:"usageCalculationType",options:(0,p.default)(d,"value","value")}),(0,r.jsxs)("div",{className:"w-full items-end justify-end sm:flex",children:[(0,r.jsx)(v.default,{className:"mt-2.5 w-full text-sm font-medium text-slate-500",required:!0,label:s({id:"billing_interval_unit",defaultMessage:"Billing interval unit"}),placeholder:s({id:"billing_interval_unit",defaultMessage:"Billing interval unit"}),name:"billingInterval",options:(0,p.default)(l,"value","value")}),(0,r.jsx)(j.default,{name:"billingIntervalCount",id:"billing_unit",type:"number",required:!0,label:s({id:"billing_unit",defaultMessage:"Billing Unit"}),placeholder:s({id:"billing_unit",defaultMessage:"Billing Unit"}),className:"mt-1 w-full text-sm font-medium text-slate-500 sm:ml-1"})]}),(0,r.jsxs)("div",{className:"max-w-full items-end justify-end sm:flex",children:[(0,r.jsx)(v.default,{className:"mt-2.5 w-full text-sm font-medium text-slate-500",label:s({id:"trial_interval_unit",defaultMessage:"Trial interval unit"}),placeholder:s({id:"trial_interval_unit",defaultMessage:"Trial interval unit"}),name:"trialInterval",options:(0,p.default)(l,"value","value")}),(0,r.jsx)(j.default,{type:"number",name:"trialIntervalCount",id:"trialIntervalCount ",label:s({id:"trial_unit",defaultMessage:"Trial Unit"}),placeholder:s({id:"trial_unit",defaultMessage:"Trial Unit"}),required:!0,className:"mt-1 w-full text-sm font-medium text-slate-500 sm:ml-1"})]}),f(o.IRoleAction.CreateEnrollment)&&(0,r.jsx)("div",{className:"-mx-6 -mb-6 mt-6 border-t-slate-100 border-t space-y-6 bg-slate-50 dark:bg-slate-500 text-right sm:p-6",children:(0,r.jsx)(y.default,{label:s({id:"save",defaultMessage:"Save"})})})]})})})})}],73356);var em=e.i(60959);let ep=P.gql`
|
|
166
|
-
query ProductSupply($productId: ID, $slug: String) {
|
|
167
|
-
product(productId: $productId, slug: $slug) {
|
|
168
|
-
_id
|
|
169
|
-
... on SimpleProduct {
|
|
170
|
-
dimensions {
|
|
171
|
-
...ProductDimensionFragment
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
${em.default}
|
|
177
|
-
`,ef=P.gql`
|
|
178
|
-
mutation UpdateProductSupply(
|
|
179
|
-
$productId: ID!
|
|
180
|
-
$supply: UpdateProductSupplyInput!
|
|
181
|
-
) {
|
|
182
|
-
updateProductSupply(productId: $productId, supply: $supply) {
|
|
183
|
-
_id
|
|
184
|
-
... on SimpleProduct {
|
|
185
|
-
dimensions {
|
|
186
|
-
...ProductDimensionFragment
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
${em.default}
|
|
192
|
-
`;e.s(["default",0,({productId:e,disabled:a=!1})=>{let{formatMessage:s}=(0,u.useIntl)(),l=s({id:"saved",defaultMessage:"Saved"}),{hasRole:d}=(0,c.default)(),{updateProductSupply:i}=(()=>{let[e]=(0,C.useMutation)(ef);return{updateProductSupply:async({productId:t,supply:{weightInGram:a=null,heightInMillimeters:s=null,lengthInMillimeters:l=null,widthInMillimeters:d=null}})=>e({variables:{productId:t,supply:{weightInGram:a||null,heightInMillimeters:s||null,lengthInMillimeters:l||null,widthInMillimeters:d||null}},refetchQueries:["Products"]})}})(),{dimensions:n}=(({productId:e=null,slug:t=null}={})=>{let a=(0,Z.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,N.useQuery)(ep,{skip:!e&&!t,variables:{productId:e||a}}),i=s?.product;return{dimensions:i?.dimensions||{},loading:l,error:d}})({productId:e}),p=async({weight:t,length:a,width:s,height:l})=>(await i({productId:e,supply:{weightInGram:t,lengthInMillimeters:a,heightInMillimeters:l,widthInMillimeters:s}}),{success:!0}),f=(0,w.default)({disabled:a,submit:p,getSubmitErrorMessage:e=>(e.message.includes("supply.weightInGram")&&e.message.includes("Expected type Int")?f.formik.setFieldError("weight","Invalid value, only integer is accepted"):e.message.includes("supply.heightInMillimeters")&&e.message.includes("Expected type Int")?f.formik.setFieldError("height","Invalid value, only integer is accepted"):e.message.includes("supply.lengthInMillimeters")&&e.message.includes("Expected type Int")&&f.formik.setFieldError("length","Invalid value, only integer is accepted"),null),successMessage:l,initialValues:{weight:"",length:"",width:"",height:""}});return(0,t.useEffect)(()=>{Object.keys(n).length&&f.formik.setValues(n)},[n]),(0,r.jsx)("div",{className:"mt-5 md:col-span-2 md:mt-0",children:(0,r.jsx)(m.default,{children:(0,r.jsxs)(h.default,{form:f,disabled:!d(o.IRoleAction.ManageProducts),children:[(0,r.jsx)("div",{className:"relative px-4 py-5 sm:p-6",children:(0,r.jsxs)("div",{className:"grid grid-cols-6 gap-6",children:[(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{validators:[(0,M.validateInteger)()],type:"number",name:"weight",disabled:!d(o.IRoleAction.ManageProducts),id:"weight",label:s({id:"weight_gram",defaultMessage:"Weight (Gram)"}),className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{validators:[(0,M.validateInteger)()],name:"length",disabled:!d(o.IRoleAction.ManageProducts),id:"length",type:"number",label:s({id:"length_millimeter",defaultMessage:"Length (Millimeter)"}),className:"text-sm"})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{validators:[(0,M.validateInteger)()],type:"number",name:"width",disabled:!d(o.IRoleAction.ManageProducts),id:"width ",label:s({id:"width",defaultMessage:"Width (Millimeter)"}),className:"text-sm "})}),(0,r.jsx)("div",{className:"col-span-6 sm:col-span-3",children:(0,r.jsx)(j.default,{validators:[(0,M.validateInteger)()],name:"height",disabled:!d(o.IRoleAction.ManageProducts),type:"number",id:"height",label:s({id:"height",defaultMessage:"Height (Millimeter)"}),className:"text-sm "})})]})}),d(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"border-t-slate-100 border-t dark:border-t-slate-700 space-y-6 bg-slate-50 dark:bg-slate-900 text-right sm:p-6",children:(0,r.jsx)(y.default,{label:s({id:"save",defaultMessage:"Save"}),full:!0})})]})})})}],50099);var ex=e.i(37369),eg=e.i(12197);let eh=P.gql`
|
|
193
|
-
mutation CreateProductVariation(
|
|
194
|
-
$productId: ID!
|
|
195
|
-
$variation: CreateProductVariationInput!
|
|
196
|
-
$texts: [ProductVariationTextInput!]
|
|
197
|
-
) {
|
|
198
|
-
createProductVariation(
|
|
199
|
-
productId: $productId
|
|
200
|
-
variation: $variation
|
|
201
|
-
texts: $texts
|
|
202
|
-
) {
|
|
203
|
-
_id
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
`,eb=P.gql`
|
|
207
|
-
fragment ProductVariationFragment on ProductVariation {
|
|
208
|
-
_id
|
|
209
|
-
type
|
|
210
|
-
key
|
|
211
|
-
texts(forceLocale: $locale) {
|
|
212
|
-
_id
|
|
213
|
-
locale
|
|
214
|
-
title
|
|
215
|
-
subtitle
|
|
216
|
-
}
|
|
217
|
-
options {
|
|
218
|
-
_id
|
|
219
|
-
texts(forceLocale: $locale) {
|
|
220
|
-
_id
|
|
221
|
-
locale
|
|
222
|
-
title
|
|
223
|
-
subtitle
|
|
224
|
-
}
|
|
225
|
-
value
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
`,ev=P.gql`
|
|
229
|
-
query ProductVariations($productId: ID, $slug: String, $locale: Locale) {
|
|
230
|
-
product(productId: $productId, slug: $slug) {
|
|
231
|
-
_id
|
|
232
|
-
... on ConfigurableProduct {
|
|
233
|
-
variations {
|
|
234
|
-
...ProductVariationFragment
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
${eb}
|
|
240
|
-
`,ey=P.gql`
|
|
241
|
-
query ProductVariationType {
|
|
242
|
-
variationTypes: __type(name: "ProductVariationType") {
|
|
243
|
-
options: enumValues {
|
|
244
|
-
value: name
|
|
245
|
-
label: description
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
`,ej=({helpKey:e,helpText:t,helpValues:a,...s})=>(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)(j.default,{...s}),(e||t)&&(0,r.jsx)(E.default,{messageKey:e||`${s.name}_help`,defaultMessage:t,values:a,className:"mt-1"})]});var eI=e.i(11309);let ew=P.gql`
|
|
250
|
-
mutation RemoveProductVariation($productVariationId: ID!) {
|
|
251
|
-
removeProductVariation(productVariationId: $productVariationId) {
|
|
252
|
-
_id
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
`;var eM=e.i(65153);let eP=P.gql`
|
|
256
|
-
mutation UpdateProductVariationTexts(
|
|
257
|
-
$productVariationId: ID!
|
|
258
|
-
$productVariationOptionValue: String
|
|
259
|
-
$texts: [ProductVariationTextInput!]!
|
|
260
|
-
) {
|
|
261
|
-
updateProductVariationTexts(
|
|
262
|
-
productVariationId: $productVariationId
|
|
263
|
-
productVariationOptionValue: $productVariationOptionValue
|
|
264
|
-
texts: $texts
|
|
265
|
-
) {
|
|
266
|
-
_id
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
`,eN=()=>{let[e]=(0,C.useMutation)(eP);return{updateProductVariationTexts:async({productVariationId:t,productVariationOptionValue:a,texts:s})=>e({variables:{productVariationId:t,productVariationOptionValue:a,texts:s},refetchQueries:["ProductVariations"]})}},ek=({variation:e,onCancel:t,onSuccess:a})=>{let{updateProductVariationTexts:s}=eN(),{formatMessage:l}=(0,u.useIntl)(),{selectedLocale:d}=(0,U.default)(),i=async({title:t,subtitle:l})=>(await s({productVariationId:e._id,texts:[{title:t,subtitle:l,locale:d}]}),a(),{success:!0}),o=(0,w.default)({submit:i,initialValues:{title:e?.texts?.title??"",subtitle:e?.texts?.subtitle??""}});return(0,r.jsx)(h.default,{form:o,className:"variation-update-form bg-white dark:bg-slate-800 px-4 py-3 border-b border-slate-200 dark:border-slate-700 w-full overflow-x-hidden overflow-y-visible relative hover:outline hover:outline-2 hover:outline-slate-400 dark:hover:outline-slate-500 transition-all","data-variationid":e._id,children:(0,r.jsxs)("div",{className:"flex items-center justify-between w-full gap-4",tabIndex:-1,children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 flex-1 min-w-0 overflow-hidden flex-wrap",children:[(0,r.jsx)("div",{className:"flex-shrink-0 min-w-[180px]",children:(0,r.jsx)(j.default,{className:"mt-0 py-1",name:"title",required:!0,label:l({id:"title",defaultMessage:"Title"})})}),e?.type&&(0,r.jsx)(eM.default,{text:e.type,color:"slate",className:"rounded-md uppercase text-xs font-medium flex-shrink-0"}),(0,r.jsx)("div",{className:"text-sm text-slate-500 dark:text-slate-400 truncate min-w-[200px]",children:(0,r.jsx)(j.default,{className:"mt-0 py-1",name:"subtitle",label:l({id:"subtitle",defaultMessage:"Subtitle"})})}),e?.options?.length>0&&(0,r.jsx)("div",{className:"flex items-center gap-2 flex-wrap",children:e.options.map((e,t)=>(0,r.jsx)("span",{className:"inline-flex text-nowrap items-center px-2 py-0.5 rounded-lg text-xs font-medium bg-slate-100 dark:bg-slate-900 text-slate-800 dark:text-slate-200 border border-slate-200 dark:border-slate-800",children:e?.texts?.title||e.value},e.value||t))}),(0,r.jsxs)("div",{className:"text-sm text-slate-400 dark:text-slate-500 font-mono flex-shrink-0",children:["(",e?.key,")"]})]}),(0,r.jsxs)("div",{className:"flex space-x-2 flex-shrink-0",children:[(0,r.jsx)(I.default,{onClick:t,type:"button",variant:"secondary",size:"sm",text:l({id:"cancel",defaultMessage:"Cancel"})}),(0,r.jsx)(I.default,{onClick:()=>o.formik.submitForm(),type:"submit",variant:"primary",size:"sm",text:l({id:"save",defaultMessage:"Save"})})]})]})})};var e_=e.i(86712),eC=e.i(16371),e$=e.i(37650),eS=e.i(24557);let eT=({type:e,variation:a,onEdit:s,onDelete:l})=>{let[d,i]=(0,t.useState)(!1),{formatMessage:o}=(0,u.useIntl)(),{buttonRef:n,menuRef:c,menuPosition:m}=((e,a)=>{let s=(0,t.useRef)(null),l=(0,t.useRef)(null),[d,i]=(0,t.useState)({top:0,left:0});return(0,t.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&a(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[a]),(0,t.useEffect)(()=>{if(e&&l.current){let e=l.current.getBoundingClientRect(),t=e.bottom+4,a=e.right-192;a<8&&(a=8),t+80>window.innerHeight-8&&(t=e.top-80-4),i({top:t,left:a})}},[e]),{buttonRef:l,menuRef:s,menuPosition:d}})(d,i);return(0,r.jsx)("div",{className:"variation-display bg-white dark:bg-slate-800 px-4 py-3 border-b border-slate-200 dark:border-slate-700 w-full overflow-x-hidden overflow-y-visible relative hover:outline hover:outline-2 hover:outline-slate-400 dark:hover:outline-slate-500 transition-all",children:(0,r.jsxs)("div",{className:"flex items-center justify-between w-full gap-4",tabIndex:-1,children:[(0,r.jsxs)("div",{className:"flex items-center gap-4 flex-1 min-w-0 overflow-hidden",children:[(0,r.jsx)("div",{className:"flex-shrink-0 text-lg font-semibold text-slate-900 dark:text-slate-200 truncate",children:a?.texts?.title}),e&&(0,r.jsx)(eM.default,{text:e,color:"slate",className:"rounded-md uppercase text-xs font-medium flex-shrink-0"}),a?.texts?.subtitle&&(0,r.jsx)("div",{className:"text-sm text-slate-500 dark:text-slate-400 truncate",children:a?.texts?.subtitle}),a?.options?.length>0&&(0,r.jsx)("div",{className:"flex items-center gap-2 flex-wrap",children:a.options.map((e,t)=>(0,r.jsx)("span",{className:"inline-flex text-nowrap items-center px-2 py-0.5 rounded-lg text-xs font-medium bg-slate-100 dark:bg-slate-900 text-slate-800 dark:text-slate-200 border border-slate-200 dark:border-slate-800",children:e?.texts?.title||e.value},e.value||t))}),(0,r.jsxs)("div",{className:"text-sm text-slate-400 dark:text-slate-500 font-mono flex-shrink-0",children:["(",a?.key,")"]})]}),(0,r.jsxs)("div",{className:"relative flex-shrink-0",children:[(0,r.jsx)("button",{ref:n,type:"button",onClick:e=>{e.stopPropagation(),e.preventDefault(),i(e=>!e)},className:"flex items-center justify-center w-8 h-8 rounded-md hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors",children:(0,r.jsx)(e_.EllipsisHorizontalIcon,{className:"w-5 h-5 text-slate-500 dark:text-slate-400"})}),d&&(0,r.jsx)(eC.default,{children:(0,r.jsx)("div",{ref:c,className:"fixed w-48 bg-white dark:bg-slate-800 rounded-md shadow-xl border border-slate-200 dark:border-slate-700 z-[9999]",style:{top:m.top,left:m.left,boxShadow:"0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"},children:(0,r.jsxs)("div",{className:"py-1",children:[(0,r.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),e.preventDefault(),s(),i(!1)},className:"flex items-center w-full px-4 py-2 text-sm text-slate-700 dark:text-slate-200 hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors",children:[(0,r.jsx)(e$.PencilSquareIcon,{className:"mr-3 h-5 w-5"}),o({id:"edit",defaultMessage:"Edit"})]}),(0,r.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),e.preventDefault(),l(a._id),i(!1)},className:"flex items-center w-full px-4 py-2 text-sm text-rose-600 dark:text-rose-400 hover:bg-rose-50 dark:hover:bg-rose-900/20 transition-colors",children:[(0,r.jsx)(eS.TrashIcon,{className:"mr-3 h-5 w-5"}),o({id:"delete",defaultMessage:"Delete"})]})]})})})]})]})})},eR=({type:e,variation:a,onDelete:s})=>{let[l,d]=(0,t.useState)(!1);return l?(0,r.jsx)(ek,{variation:a,onCancel:()=>d(!1),onSuccess:()=>d(!1)}):(0,r.jsx)(eT,{type:e,variation:a,onEdit:()=>d(!0),onDelete:s})},eA=P.gql`
|
|
270
|
-
mutation CreateProductVariationOption(
|
|
271
|
-
$productVariationId: ID!
|
|
272
|
-
$option: String!
|
|
273
|
-
$texts: [ProductVariationTextInput!]
|
|
274
|
-
) {
|
|
275
|
-
createProductVariationOption(
|
|
276
|
-
productVariationId: $productVariationId
|
|
277
|
-
option: $option
|
|
278
|
-
texts: $texts
|
|
279
|
-
) {
|
|
280
|
-
_id
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
`,eq=P.gql`
|
|
284
|
-
mutation RemoveProductVariationOption(
|
|
285
|
-
$productVariationId: ID!
|
|
286
|
-
$productVariationOptionValue: String!
|
|
287
|
-
) {
|
|
288
|
-
removeProductVariationOption(
|
|
289
|
-
productVariationId: $productVariationId
|
|
290
|
-
productVariationOptionValue: $productVariationOptionValue
|
|
291
|
-
) {
|
|
292
|
-
_id
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
`,eV=({onSubmit:e})=>{let{formatMessage:t}=(0,u.useIntl)(),{hasRole:a}=(0,c.default)(),s=t({id:"variation_option_added",defaultMessage:"Variation option added successfully!"}),l=(0,w.default)({submit:e,successMessage:s,initialValues:{value:"",title:""}});return(0,r.jsxs)(h.default,{form:l,className:"variation-option-form relative overflow-visible",children:[(0,r.jsx)("div",{className:"mb-4 px-2 sm:px-4 pt-2",children:(0,r.jsx)("div",{className:"p-3 bg-slate-50 dark:bg-slate-900/20 rounded-lg border border-slate-200 dark:border-slate-800",children:(0,r.jsx)("p",{className:"text-sm text-slate-800 dark:text-slate-200",children:t({id:"variation_options_explanation",defaultMessage:'Add individual choices for this variation (e.g., "Red", "Blue", "Green" for a Color variation)'})})})}),(0,r.jsxs)("div",{className:"grid lg:grid-cols-2 gap-3 px-2 sm:px-4 sm:pb-4",children:[(0,r.jsx)("div",{className:"col-span-1",children:(0,r.jsx)(ej,{className:"mt-2 pt-1",name:"title",label:t({id:"title",defaultMessage:"Title"}),helpText:t({id:"variation_option_title_help",defaultMessage:'Display name customers see (e.g., "Red", "Large", "Cotton")'}),required:!0})}),(0,r.jsx)("div",{className:"col-span-1",children:(0,r.jsx)(ej,{className:"mt-2 pt-1",name:"value",label:t({id:"value",defaultMessage:"Value"}),helpText:t({id:"variation_option_value_help",defaultMessage:'Internal identifier (e.g., "red", "large", "cotton")'}),required:!0})})]}),a(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"text-right mt-2 px-6 pb-6",children:(0,r.jsx)(y.default,{className:"py-2.5",label:t({id:"add_variation_option",defaultMessage:"Add option"})})})]})};var eD=e.i(3095);let eE=({option:e,onDelete:a,variationId:s})=>{let{formatMessage:l}=(0,u.useIntl)(),{selectedLocale:d}=(0,U.default)(),[i,o]=(0,t.useState)(!1),n=l({id:"variation_option_updated",defaultMessage:"Variation option updated successfully!"}),{updateProductVariationTexts:c}=eN(),m=async({title:t,subtitle:a})=>{let l=await c({productVariationId:s,productVariationOptionValue:e.value,texts:[{title:t,subtitle:a,locale:d}]});return o(!1),{data:l,success:!0}},p=(0,w.default)({submit:m,successMessage:n,initialValues:{title:e?.texts?.title,subtitle:e?.texts?.subtitle}});return(0,r.jsx)(h.default,{form:p,className:"last:pb-2 variation-option-update-form relative overflow-visible",children:(0,r.jsx)("div",{className:"my-2 rounded-sm border dark:border-slate-700 mx-4 ",children:(0,r.jsx)("div",{className:"p-2 bg-white dark:bg-slate-900 dark:text-slate-200",children:(0,r.jsxs)("div",{className:"flex gap-2 w-full items-center justify-between",children:[(0,r.jsx)(eM.default,{text:e?.value,color:"slate",className:"rounded-md"}),(0,r.jsxs)("div",{className:"flex items-center gap-4 w-full",children:[(0,r.jsx)("p",{className:"truncate text-sm font-medium text-slate-900 dark:text-slate-400",children:i?(0,r.jsx)(j.default,{className:"mt-0",name:"title",required:!0,label:l({id:"title",defaultMessage:"Title"})}):e?.texts?.title}),(0,r.jsx)("p",{className:"truncate text-sm text-slate-500",children:i?(0,r.jsx)(j.default,{className:"mt-0",name:"subtitle",label:l({id:"subtitle",defaultMessage:"Subtitle"})}):e?.texts?.subtitle})]}),(0,r.jsx)("div",{className:"flex items-center justify-end ml-auto",children:i?(0,r.jsxs)("div",{className:"flex space-x-2 py-2",children:[(0,r.jsx)("button",{onClick:()=>o(!i),"aria-label":l({id:"cancel",defaultMessage:"Cancel"}),type:"button",className:"inline-flex items-center justify-center font-medium shadow-sm focus:outline-hidden focus:ring-2 focus:ring-offset-2 transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-50 px-3 py-2 text-sm h-8 rounded-md border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 text-slate-700 dark:text-slate-200 hover:bg-slate-50 dark:hover:bg-slate-700 focus:ring-slate-500",children:l({id:"cancel",defaultMessage:"Cancel"})}),(0,r.jsx)("button",{type:"submit","aria-label":l({id:"save",defaultMessage:"Save"}),className:"inline-flex items-center justify-center font-medium shadow-sm focus:outline-hidden focus:ring-2 focus:ring-offset-2 transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-50 px-3 py-2 text-sm h-8 rounded-md border border-slate-800 dark:border-slate-600 bg-slate-800 dark:bg-slate-600 text-white hover:bg-slate-900 dark:hover:bg-slate-500 focus:ring-slate-800 dark:focus:ring-slate-400",children:l({id:"save",defaultMessage:"Save"})})]}):(0,r.jsx)(eD.default,{onEdit:()=>{o(!0)},onDelete:()=>{a(e.value)},showEdit:!0,showDelete:!0})})]})})})})},eU=({variationId:e,options:t})=>{let{createProductVariationOption:a}=(()=>{let[e]=(0,C.useMutation)(eA);return{createProductVariationOption:async({productVariationId:t,option:a,texts:s})=>e({variables:{productVariationId:t,option:a,texts:s},refetchQueries:["ProductVariations","Product"]})}})(),{formatMessage:s}=(0,u.useIntl)(),{selectedLocale:l}=(0,U.default)(),{setModal:d}=(0,el.default)(),{removeProductVariationOption:i}=(()=>{let[e]=(0,C.useMutation)(eq);return{removeProductVariationOption:async({productVariationId:t,productVariationOptionValue:a})=>e({variables:{productVariationId:t,productVariationOptionValue:a},refetchQueries:["ProductVariations"]})}})(),o=async t=>{await d((0,r.jsx)(ea.default,{message:s({id:"delete_variation_option_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this option? "}),onCancelClick:()=>d(""),onOkClick:async()=>{d(""),await i({productVariationId:e,productVariationOptionValue:t}),L.toast.success(s({id:"product_variation_option_deleted",defaultMessage:"Variation option deleted successfully"}))},okText:s({id:"delete_variation_option",defaultMessage:"Delete option"})}))},n=async({value:t,title:s})=>(await a({productVariationId:e,option:t,texts:[{title:s,locale:l}]}),{success:!0});return(0,r.jsxs)("div",{className:"relative overflow-visible",children:[(0,r.jsx)(eV,{onSubmit:n}),t.length?t.map(t=>(0,r.jsx)(eE,{variationId:e,option:t,onDelete:o},t._id)):(0,r.jsx)(J.default,{message:s({id:"option",defaultMessage:"Option"})})]})},eO=({productVariationId:e,variation:t})=>{let{formatMessage:a}=(0,u.useIntl)(),{setModal:s}=(0,el.default)(),{options:l}=t,{removeProductVariation:d}=(()=>{let[e]=(0,C.useMutation)(ew);return{removeProductVariation:async({productVariationId:t})=>e({variables:{productVariationId:t},refetchQueries:["ProductVariations"]})}})(),i=async()=>{await s((0,r.jsx)(ea.default,{onCancelClick:async()=>s(""),message:a({id:"delete_product_variation_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this variation? "}),onOkClick:async()=>{s(""),await d({productVariationId:e}),L.toast.success(a({id:"product_variation_deleted",defaultMessage:"Variation deleted successfully"}))},okText:a({id:"delete_product_variation",defaultMessage:"Delete variation"})}))},o=[{header:(0,r.jsx)(eR,{onDelete:i,variation:t,...t}),body:(0,r.jsx)(eU,{variationId:t._id,options:l},e)}];return(0,r.jsx)(eI.default,{"data-variationid":t._id,data:o,containerCSS:"w-full max-w-full !my-0 !border-0 !shadow-none relative",bodyCSS:"bg-slate-50 dark:bg-slate-950 !border-t-0 relative overflow-visible",itemContainerCSS:"!mt-0 !mb-0 !border-0",headerCSS:"w-full flex items-center justify-between !p-0 !bg-transparent !border-0",hideChevron:!0})},eL=({onSubmit:e,disabled:t,formatMessage:a})=>{let{variationTypes:s}=(()=>{let{data:e,loading:t,error:a}=(0,N.useQuery)(ey);return{variationTypes:e?.variationTypes?.options||[],loading:t,error:a}})(),{hasRole:l}=(0,c.default)(),d=a({id:"product_variation_added",defaultMessage:"Product variation added successfully"}),i=(0,w.default)({disabled:t,submit:e,successMessage:d,initialValues:{title:"",key:"",type:""}});return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-slate-900 dark:text-slate-100 mb-2",children:a({id:"product_variations_explanation_title",defaultMessage:"About Product Variations"})}),(0,r.jsx)("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:a({id:"product_variations_explanation",defaultMessage:"Variations allow customers to choose different options for your product (like color, size, material). Each variation can have multiple options that customers can select from."})})]}),(0,r.jsxs)(h.default,{form:i,children:[(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(ej,{name:"title",id:"title",label:a({id:"title",defaultMessage:"Title"}),helpText:a({id:"product_variation_title_help",defaultMessage:'The display name customers will see (e.g., "Color", "Size", "Material")'}),required:!0,autoComplete:"on",className:"w-full"}),(0,r.jsx)(ej,{name:"key",id:"key",label:a({id:"key",defaultMessage:"Key"}),helpText:a({id:"product_variation_key_help",defaultMessage:'Unique identifier used internally (e.g., "color", "size"). Use lowercase without spaces.'}),required:!0,autoComplete:"on",className:"w-full"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(v.default,{required:!0,className:"w-full",label:a({id:"type",defaultMessage:"Type"}),placeholder:a({id:"type",defaultMessage:"Type"}),name:"type",options:(0,p.default)(s,"value","value")}),(0,r.jsx)(E.default,{messageKey:"product_variation_type_help",defaultMessage:"COLOR: For predefined options like colors or sizes. TEXT: For free-form input like custom text or measurements.",className:"mt-1"})]})]}),l(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"flex justify-end mt-6 py-6 -mb-6 bg-slate-100 -mx-6 pe-5 border-t border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-900",children:(0,r.jsx)(y.default,{label:a({id:"add_variation",defaultMessage:"Add variation"})})})]})]})};e.s(["default",0,({productId:e,disabled:t=!1})=>{let{createProductVariation:a}=(()=>{let[e]=(0,C.useMutation)(eh);return{createProductVariation:async({productId:t,variation:{key:a,type:s},texts:l})=>e({variables:{productId:t,variation:{key:a,type:s},texts:l},refetchQueries:["ProductVariations"]})}})(),{selectedLocale:s}=(0,U.default)(),{formatMessage:l}=(0,u.useIntl)(),{setModal:d}=(0,el.default)(),{variations:i,loading:o}=(({productId:e=null,slug:t=null,locale:a=null}={})=>{let s=(0,Z.parseUniqueId)(t),{data:l,loading:d,error:i}=(0,N.useQuery)(ev,{skip:!e&&!s,variables:{productId:e||s,locale:a}}),r=l?.product;return{variations:r?.variations,loading:d,error:i}})({productId:e,locale:s}),n=async({title:t,key:l,type:i})=>(await a({productId:e,variation:{key:l,type:i},texts:[{title:t,locale:s}]}),d(""),{success:!0});return o?(0,r.jsx)(eg.default,{}):(0,r.jsxs)("div",{className:"mt-6 overflow-hidden rounded-md w-full max-w-full",children:[(0,r.jsx)("div",{className:"mb-6 flex justify-end items-center",children:(0,r.jsx)(I.default,{className:"m-1",onClick:()=>{d((0,r.jsx)(eL,{onSubmit:n,disabled:t,formatMessage:l}))},disabled:t,variant:"secondary",icon:(0,r.jsx)(ex.PlusIcon,{className:"w-5 h-5"}),text:l({id:"add_variation",defaultMessage:"Add variation"})})}),(0,r.jsx)("div",{className:"flex flex-col border border-slate-200 dark:border-slate-700 rounded-md overflow-x-hidden overflow-y-visible w-full relative",children:i?.length?i?.map(e=>(0,r.jsx)(eO,{productVariationId:e._id,variation:e},e._id)):(0,r.jsx)(J.default,{message:l({id:"variations",defaultMessage:"Variations"})})})]})}],77035);let eB=P.gql`
|
|
296
|
-
query ProductWarehousing($productId: ID, $slug: String) {
|
|
297
|
-
product(productId: $productId, slug: $slug) {
|
|
298
|
-
_id
|
|
299
|
-
... on SimpleProduct {
|
|
300
|
-
sku
|
|
301
|
-
baseUnit
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
`,eF=P.gql`
|
|
306
|
-
mutation UpdateProductWarehousing(
|
|
307
|
-
$productId: ID!
|
|
308
|
-
$warehousing: UpdateProductWarehousingInput!
|
|
309
|
-
) {
|
|
310
|
-
updateProductWarehousing(productId: $productId, warehousing: $warehousing) {
|
|
311
|
-
_id
|
|
312
|
-
... on SimpleProduct {
|
|
313
|
-
sku
|
|
314
|
-
baseUnit
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
`;e.s(["default",0,({productId:e,disabled:a=!1})=>{let{formatMessage:s}=(0,u.useIntl)(),{product:l}=(({productId:e=null,slug:t=null}={})=>{let a=(0,Z.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,N.useQuery)(eB,{skip:!e&&!a,variables:{productId:e||a}});return{product:s?.product||{},loading:l,error:d}})({productId:e}),{hasRole:d}=(0,c.default)(),{updateProductWarehousing:i}=(()=>{let[e]=(0,C.useMutation)(eF);return{updateProductWarehousing:async({productId:t,warehousing:{sku:a=null,baseUnit:s=null}})=>e({variables:{productId:t,warehousing:{sku:a,baseUnit:s}},refetchQueries:["Products"]})}})(),n=s({id:"saved",defaultMessage:"Saved"}),p=async({sku:t,baseUnit:a})=>({data:await i({productId:e,warehousing:{baseUnit:a,sku:t}}),success:!0}),f=(0,w.default)({disabled:a,submit:p,successMessage:n,initialValues:{sku:"",baseUnit:""}});return(0,t.useEffect)(()=>{Object.keys(l).length&&f.formik.setValues({...l})},[l]),(0,r.jsx)("div",{className:"mt-5 md:mt-0",children:(0,r.jsx)(m.default,{children:(0,r.jsxs)(h.default,{className:"rounded",form:f,disabled:!d(o.IRoleAction.ManageProducts),children:[(0,r.jsx)("div",{className:"relative px-4 pb-5 sm:p-6",children:(0,r.jsxs)("div",{className:"w-full justify-between align-baseline lg:flex gap-6",children:[(0,r.jsx)(j.default,{name:"sku",disabled:!d(o.IRoleAction.ManageProducts),id:"sku",label:s({id:"sku",defaultMessage:"SKU"}),className:"mb-4 text-sm"}),(0,r.jsx)(j.default,{name:"baseUnit",id:"baseUnit",disabled:!d(o.IRoleAction.ManageProducts),label:s({id:"baseUnit",defaultMessage:"Base Unit"}),className:"text-sm"})]})}),d(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"border-t-slate-100 border-t dark:border-t-slate-700 space-y-6 bg-slate-50 dark:bg-slate-900 text-right sm:p-6",children:(0,r.jsx)(y.default,{label:s({id:"save",defaultMessage:"Save"})})})]})})})}],56902);var eQ=o,ez=e.i(87593);let eK=P.gql`
|
|
319
|
-
query ProductReviewByProduct(
|
|
320
|
-
$productId: ID
|
|
321
|
-
$slug: String
|
|
322
|
-
$limit: Int
|
|
323
|
-
$offset: Int
|
|
324
|
-
$sort: [SortOptionInput!]
|
|
325
|
-
$forceLocale: Locale
|
|
326
|
-
) {
|
|
327
|
-
product(productId: $productId, slug: $slug) {
|
|
328
|
-
_id
|
|
329
|
-
reviews(limit: $limit, offset: $offset, sort: $sort) {
|
|
330
|
-
...ProductReviewDetailFragment
|
|
331
|
-
}
|
|
332
|
-
reviewsCount
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
${ez.default}
|
|
336
|
-
`;var eH=e.i(66859),eZ=e.i(39833),eW=e.i(84339);let eG=t.forwardRef(function({title:e,titleId:a,...s},l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":a},s),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z",clipRule:"evenodd"}))}),eJ=({productReviews:e})=>{let{formatMessage:t}=(0,u.useIntl)(),a=e.reduce((e,t)=>e+t.upVote,0),s=e.reduce((e,t)=>e+t.downVote,0),l=a?a/(a+s)*100:0,d=l?100-l:0;return(0,r.jsxs)("div",{className:"lg:col-span-4",children:[(0,r.jsx)("h2",{className:"text-2xl",children:t({id:"customer_reviews",defaultMessage:"Customer Reviews"})}),(0,r.jsxs)("div",{className:"mt-3 flex items-center",children:[(0,r.jsx)("div",{children:(0,r.jsx)("div",{title:`${l}`,className:"flex items-center",children:[0,1,2,3,4].map(e=>{let t=l>=20*e;return(0,r.jsx)(eG,{className:`
|
|
337
|
-
${t?"text-amber-400":"text-slate-300 dark:text-slate-600"}
|
|
338
|
-
h-5 w-5 shrink-0
|
|
339
|
-
`,"aria-hidden":"true"},e)})})}),(0,r.jsx)("div",{className:"ml-2 text-sm",children:(0,r.jsx)(u.FormattedMessage,{id:"review_summary",defaultMessage:"<div> Based on <cta> {total} </cta> reviews</div>",values:{div:e=>(0,r.jsx)("div",{children:e}),cta:e=>(0,r.jsx)("b",{className:"font-semibold",children:e}),total:e.length}})})]}),(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("h3",{className:"sr-only",children:t({id:"review_data",defaultMessage:"Review data"})}),(0,r.jsxs)("dl",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center text-sm",children:[(0,r.jsxs)("dt",{className:"flex flex-1 items-center",children:[(0,r.jsx)("p",{className:"font-medium",children:a}),(0,r.jsxs)("div",{"aria-hidden":"true",className:"ml-2 flex flex-1 items-center",children:[(0,r.jsx)(eW.HandThumbUpIcon,{className:`
|
|
340
|
-
${a>0?"text-emerald-500":"text-slate-500"}
|
|
341
|
-
h-5 w-5 shrink-0`,"aria-hidden":"true"}),(0,r.jsxs)("div",{className:"relative ml-3 flex-1",children:[(0,r.jsx)("div",{className:"h-3 rounded-full border border-slate-300 dark:border-slate-800 bg-slate-50 dark:bg-slate-900"}),a>0?(0,r.jsx)("div",{className:"absolute inset-y-0 rounded-full border border-emerald-500 bg-emerald-500",style:{width:`calc(${l}%)`}}):null]})]})]}),(0,r.jsxs)("dd",{className:"ml-3 w-10 text-right text-sm tabular-nums",children:[Math.round(l),"%"]})]}),(0,r.jsxs)("div",{className:"flex items-center text-sm",children:[(0,r.jsxs)("dt",{className:"flex flex-1 items-center",children:[(0,r.jsxs)("p",{className:"font-medium",children:[s,(0,r.jsx)("span",{className:"sr-only",children:t({id:"star_reviews",defaultMessage:"Star reviews"})})]}),(0,r.jsxs)("div",{"aria-hidden":"true",className:"ml-2 flex flex-1 items-center",children:[(0,r.jsx)(eZ.HandThumbDownIcon,{className:`
|
|
342
|
-
${s>0?"text-rose-500":"text-slate-500"}
|
|
343
|
-
h-5 w-5 shrink-0
|
|
344
|
-
`,"aria-hidden":"true"}),(0,r.jsxs)("div",{className:"relative ml-3 flex-1",children:[(0,r.jsx)("div",{className:"h-3 rounded-full border border-slate-300 dark:border-slate-800 bg-slate-50 dark:bg-slate-900"}),s>0?(0,r.jsx)("div",{className:"absolute inset-y-0 rounded-full border border-rose-500 bg-rose-500",style:{width:`calc(${d}%)`}}):null]})]})]}),(0,r.jsxs)("dd",{className:"ml-3 w-10 text-right text-sm tabular-nums",children:[Math.round(d),"%"]})]})]})]})]})};var eX=e.i(19471);let eY=({onSubmit:e,onSubmitSuccess:t=null,defaultValue:a={},isEdit:s=!1})=>{let{formatMessage:l}=(0,u.useIntl)(),{hasRole:d}=(0,c.default)(),i=l({id:"product_review_added",defaultMessage:"Review added successfully!"}),n=l({id:"product_review_updated",defaultMessage:"Review updated successfully!"}),m=(0,w.default)({submit:e,onSubmitSuccess:t,successMessage:s?n:i,initialValues:{title:"",review:"",rating:1,...a}});return(0,r.jsxs)("div",{className:"bg-white dark:bg-slate-800 rounded-md shadow-sm overflow-hidden p-6 mb-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-slate-900 dark:text-slate-100 mb-4",children:l({id:"write_review",defaultMessage:"Write a Review"})}),(0,r.jsxs)(h.default,{form:m,children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(j.default,{name:"title",disabled:!d(o.IRoleAction.ReviewProduct),id:"title",label:l({id:"title",defaultMessage:"Title"}),autoComplete:"off",required:!0}),(0,r.jsx)(eX.default,{rows:4,name:"review",disabled:!d(o.IRoleAction.ReviewProduct),id:"review",label:l({id:"review",defaultMessage:"Review"}),placeholder:l({id:"review_placeholder",defaultMessage:"Share your thoughts about this product..."})})]}),d(o.IRoleAction.ReviewProduct)&&(0,r.jsx)("div",{className:"mt-6 flex justify-end",children:(0,r.jsx)(y.default,{label:l(s?{id:"update_review",defaultMessage:"Update Review"}:{id:"add_review",defaultMessage:"Add Review"}),className:"px-6 py-2"})})]})]})},e0=P.gql`
|
|
345
|
-
mutation CreateProductReview(
|
|
346
|
-
$productId: ID!
|
|
347
|
-
$productReview: ProductReviewInput!
|
|
348
|
-
$forceLocale: Locale
|
|
349
|
-
) {
|
|
350
|
-
createProductReview(productId: $productId, productReview: $productReview) {
|
|
351
|
-
_id
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
`;e.s(["default",0,({productId:e})=>{let{productReviews:t,loadMore:a,reviewsCount:s}=(({productId:e=null,slug:t=null,limit:a=10,offset:s=0,sort:l=[{key:"created",value:eQ.ISortDirection.Desc}]}={})=>{let{selectedLocale:d}=(0,U.default)(),{data:i,loading:r,error:o,fetchMore:n}=(0,N.useQuery)(eK,{skip:!e,variables:{productId:e,slug:t,limit:a,offset:s,sort:l,forceLocale:d}}),u=i?.product,c=u?.reviews||[];return{productReviews:c,loading:r,error:o,reviewsCount:u?.reviewsCount||0,loadMore:()=>{n({variables:{offset:c?.length}})}}})({productId:e}),{createProductReview:l}=(()=>{let[e]=(0,C.useMutation)(e0);return{createProductReview:async({productId:t,productReview:{title:a,rating:s,review:l}})=>e({variables:{productId:t,productReview:{title:a,rating:s,review:l}},refetchQueries:["ProductReviewByProduct","ProductReviewByUser"]})}})(),{formatMessage:d}=(0,u.useIntl)();return(0,r.jsxs)("div",{className:"sm:max-w-full",children:[(0,r.jsx)("div",{className:"text-slate-900 dark:text-slate-200",children:(0,r.jsxs)("div",{className:"mx-auto p-2 lg:grid lg:max-w-7xl lg:grid-cols-12 lg:gap-x-8",children:[(0,r.jsx)(eJ,{productReviews:t}),(0,r.jsxs)("div",{className:"mt-16 lg:col-span-7 lg:col-start-6 lg:mt-0",children:[e&&(0,r.jsx)(eY,{onSubmit:async({title:t,review:a,rating:s})=>await l({productId:e,productReview:{title:t,review:a,rating:10}})}),(0,r.jsx)("h3",{className:"sr-only",children:d({id:"recent_reviews",defaultMessage:"Recent reviews"})}),(0,r.jsx)("div",{className:"flow-root",children:(0,r.jsx)("div",{className:"-my-3",children:t.map(e=>(0,r.jsx)(eH.default,{review:e},e._id))})})]})]})}),s>t?.length?(0,r.jsx)(I.default,{text:d({id:"load-more-reviews",defaultMessage:"Load reviews"}),onClick:a}):null]})}],19051);var e1=e.i(47542);let e5=P.gql`
|
|
355
|
-
mutation CreateProductBundleItem(
|
|
356
|
-
$productId: ID!
|
|
357
|
-
$item: CreateProductBundleItemInput!
|
|
358
|
-
) {
|
|
359
|
-
createProductBundleItem(productId: $productId, item: $item) {
|
|
360
|
-
_id
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
`;var e2=e.i(24112);let e3=(0,e.i(5270).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);var e7=e.i(38994);let e6=function({onSuccess:e}){let{selectedLocale:t}=(0,U.default)(),{createProduct:a}=(0,e7.default)(),{formatMessage:s}=(0,u.useIntl)();return async({title:l,type:d,quantity:i=1})=>{let r=[{title:l,slug:l.toLowerCase().replace(/\s+/g,"-"),locale:t}],{data:n}=await a({product:{type:d||o.IProductType.SimpleProduct},texts:r}),u=n?.createProduct;if(!u?._id)throw Error(s({id:"product_creation_failed",defaultMessage:"Product creation failed"}));return e?.(u,i),{success:!0}}},e9=({bundleProduct:e,onSuccess:a})=>{let{formatMessage:s}=(0,u.useIntl)(),{hasRole:l}=(0,c.default)(),d=e6({onSuccess:a}),i=(0,t.useMemo)(()=>{let t=e?.texts?.title??"";return`${t} - New Bundle Item`},[e]),n=async({title:e,type:t,quantity:a})=>{try{return await d({title:e,type:t,quantity:a}),{success:!0}}catch(e){return{success:!1,error:{message:e?.message}}}},m=s({id:"bundle-item-scaffolded-success",defaultMessage:"New product scaffolded and added to bundle successfully"}),p=(0,w.default)({submit:n,successMessage:m,enableReinitialize:!0,initialValues:{title:i,type:o.IProductType.SimpleProduct,quantity:1}});return(0,r.jsxs)(h.default,{className:"mt-4 rounded-md border border-slate-200 dark:border-slate-700",form:p,children:[(0,r.jsxs)("div",{className:"p-5 flex flex-col gap-3",children:[(0,r.jsx)("h3",{className:"text-md font-semibold text-slate-800 dark:text-slate-100",children:s({id:"scaffold_bundle_item_title",defaultMessage:"Scaffold New Bundle Item"})}),(0,r.jsx)(j.default,{name:"title",id:"title",label:s({id:"name",defaultMessage:"Name"}),required:!0,className:"block w-full rounded-md border-slate-300 dark:border-slate-800 text-sm"}),(0,r.jsx)(v.default,{className:"mt-1 w-full",label:s({id:"type",defaultMessage:"Type"}),placeholder:s({id:"type",defaultMessage:"Type"}),required:!0,name:"type",options:Object.fromEntries(Object.entries(o.IProductType).filter(([,e])=>e!==o.IProductType.ConfigurableProduct&&e!==o.IProductType.BundleProduct).map(([e,t])=>[t,e]))}),(0,r.jsx)(j.default,{name:"quantity",type:"number",required:!0,label:s({id:"quantity",defaultMessage:"Quantity"})})]}),l(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"border-t border-slate-100 dark:border-slate-700 bg-slate-50 dark:bg-slate-900 p-5 text-right",children:(0,r.jsx)(y.default,{label:s({id:"scaffold_and_add",defaultMessage:"Scaffold & Add"})})})]})},e4=({productId:e=null,slug:t=null}={})=>{let a=(0,Z.parseUniqueId)(t),{customProperties:s,hydrateFragment:l}=(0,T.default)(),{data:d,loading:i,error:r}=(0,N.useQuery)(((e="")=>P.gql`
|
|
364
|
-
query Product($productId: ID, $slug: String) {
|
|
365
|
-
product(productId: $productId, slug: $slug) {
|
|
366
|
-
...ProductDetailFragment
|
|
367
|
-
${e}
|
|
368
|
-
texts {
|
|
369
|
-
_id
|
|
370
|
-
title
|
|
371
|
-
subtitle
|
|
372
|
-
description
|
|
373
|
-
}
|
|
374
|
-
... on SimpleProduct {
|
|
375
|
-
texts {
|
|
376
|
-
_id
|
|
377
|
-
title
|
|
378
|
-
subtitle
|
|
379
|
-
description
|
|
380
|
-
}
|
|
381
|
-
proxies {
|
|
382
|
-
__typename
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
... on ConfigurableProduct {
|
|
386
|
-
texts {
|
|
387
|
-
_id
|
|
388
|
-
title
|
|
389
|
-
subtitle
|
|
390
|
-
description
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
... on PlanProduct {
|
|
394
|
-
texts {
|
|
395
|
-
_id
|
|
396
|
-
title
|
|
397
|
-
subtitle
|
|
398
|
-
description
|
|
399
|
-
}
|
|
400
|
-
proxies {
|
|
401
|
-
__typename
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
... on BundleProduct {
|
|
405
|
-
texts {
|
|
406
|
-
_id
|
|
407
|
-
title
|
|
408
|
-
subtitle
|
|
409
|
-
description
|
|
410
|
-
}
|
|
411
|
-
proxies {
|
|
412
|
-
__typename
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
${$.default}
|
|
418
|
-
`)(s?.Product),{skip:!e&&!a,variables:{productId:e||a}}),o=l(s?.Product,d?.product);return{product:d?.product,loading:i,error:r,extendedData:o}};e.s(["default",0,e4],84278);let e8=({productId:e,disabled:a=!1})=>{let{product:s}=e4({productId:e}),{setModal:l}=(0,el.default)(),[d,i]=(0,t.useState)(""),{createProductBundleItem:n}=(()=>{let[e]=(0,C.useMutation)(e5);return{createProductBundleItem:async({productId:t,item:a})=>e({variables:{productId:t,item:a},refetchQueries:["ProductBundleItems"]})}})(),{hasRole:m}=(0,c.default)(),{formatMessage:p}=(0,u.useIntl)(),{products:f,loading:x}=(0,e2.default)({queryString:d,includeDrafts:!0,limit:50,sort:[{key:"created",value:o.ISortDirection.Desc}]}),g=async({productId:t,quantity:a})=>(await n({item:{productId:t,quantity:a},productId:e}),{success:!0}),b=p({id:"bundle_item_added",defaultMessage:"Bundle product added successfully"}),v=(0,w.default)({disabled:a,submit:g,successMessage:b,onSubmitSuccess:()=>(v.formik.resetForm(),null),initialValues:{productId:"",quantity:1}}),M=(0,t.useCallback)(async()=>{await l((0,r.jsx)(e9,{bundleProduct:s,onSuccess:async(t,a=1)=>{await n({item:{productId:t._id,quantity:a},productId:e}),l("")}}))},[s]);return(0,r.jsxs)(h.default,{form:v,children:[(0,r.jsxs)("div",{className:"flex items-end gap-2 w-full",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(e1.default,{name:"productId",onFilter:i,queryString:d,label:p({id:"product",defaultMessage:"Product"}),data:((e=[])=>e.map(({_id:e,status:t,texts:a,media:s})=>({id:e,tag:t,...a,image:s?.length?s[0]?.file?.url:null})))(f),isLoading:x,className:"w-full text-sm font-medium text-slate-500",required:!0})}),m(o.IRoleAction.ManageProducts)&&(0,r.jsx)("div",{className:"pb-3",children:(0,r.jsx)(I.default,{className:"flex items-center justify-center p-2 rounded-md",onClick:M,children:(0,r.jsx)(e3,{className:"h-5 w-5"})})})]}),(0,r.jsx)(j.default,{name:"quantity",type:"number",required:!0,label:p({id:"quantity",defaultMessage:"Quantity"})}),m(o.IRoleAction.ManageProducts)&&(0,r.jsx)(y.default,{label:p({id:"submit",defaultMessage:"Submit"}),className:"mt-2"})]})};var te=e.i(54529);let tt=P.gql`
|
|
419
|
-
query ProductBundleItems(
|
|
420
|
-
$productId: ID
|
|
421
|
-
$slug: String
|
|
422
|
-
$forceLocale: Locale
|
|
423
|
-
) {
|
|
424
|
-
product(productId: $productId, slug: $slug) {
|
|
425
|
-
_id
|
|
426
|
-
... on BundleProduct {
|
|
427
|
-
bundleItems {
|
|
428
|
-
product {
|
|
429
|
-
...ProductBriefFragment
|
|
430
|
-
}
|
|
431
|
-
quantity
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
${te.default}
|
|
437
|
-
`,ta=P.gql`
|
|
438
|
-
mutation RemoveBundleItem($productId: ID!, $index: Int!) {
|
|
439
|
-
removeBundleItem(productId: $productId, index: $index) {
|
|
440
|
-
_id
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
`;var ts=e.i(41158),tl=e.i(35065),td=e.i(22315);let ti=({item:e,onDelete:t,index:a})=>{let{product:s,quantity:l}=e;return(0,r.jsx)(ts.default,{href:`/products?slug=${(0,Z.default)(s)}`,children:(0,r.jsxs)("div",{className:" group flex w-full items-center justify-between border-b border-slate-200 dark:border-slate-700 hover:border-slate-300 dark:hover:border-slate-600 hover:bg-slate-50/80 dark:hover:bg-slate-700/50 transition-all duration-200 ease-in-out hover:shadow-sm last:border-none",children:[(0,r.jsxs)("div",{className:"flex w-full items-center space-x-6 py-4",children:[s.media?.length?(0,r.jsx)("div",{className:"flex w-20 flex-col items-center",children:(0,r.jsx)("div",{className:"relative m-1 mr-2 mt-1 flex items-center justify-center rounded-full ",children:(0,r.jsx)(tl.default,{className:"mx-auto w-auto",src:s.media[0]?.file?.url,width:160,height:100,alt:s?.texts?.title||s?.texts?.subtitle})})}):(0,r.jsx)(td.default,{className:"h-10 w-10"}),(0,r.jsxs)("div",{className:"shrink grow basis-1/2",children:[(0,r.jsx)("h3",{className:"text-lg text-slate-800 dark:text-slate-200",children:s?.texts?.title}),(0,r.jsx)("p",{className:"text-xs text-slate-600 dark:text-slate-200",children:s?.texts?.subtitle})]}),(0,r.jsx)("div",{className:"ml-auto",children:(0,r.jsx)(eM.default,{text:l,color:"slate",square:!0})})]}),(0,r.jsx)(eD.default,{onDelete:()=>{t(a)},showDelete:!0})]})})},tr=({productId:e})=>{let{formatMessage:t}=(0,u.useIntl)(),{setModal:a}=(0,el.default)(),{selectedLocale:s}=(0,U.default)(),{bundleItems:l,loading:d}=(({productId:e=null,slug:t=null}={})=>{let{selectedLocale:a}=(0,U.default)(),s=(0,Z.parseUniqueId)(t),{data:l,loading:d,error:i}=(0,N.useQuery)(tt,{skip:!e&&!s,variables:{productId:e||s,forceLocale:a},context:{headers:{forceLocale:a}}});return{bundleItems:l?.product?.bundleItems||[],loading:d,error:i}})({productId:e,forceLocale:s}),{removeBundleItem:i}=(()=>{let[e]=(0,C.useMutation)(ta);return{removeBundleItem:async({productId:t,index:a})=>e({variables:{productId:t,index:a},refetchQueries:["ProductBundleItems"]})}})(),o=async s=>{await a((0,r.jsx)(ea.default,{onCancelClick:async()=>a(""),message:t({id:"delete_bundle_item_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this bundle item? "}),onOkClick:async()=>{a(""),await i({productId:e,index:s}),L.toast.success(t({id:"bundle_item_deleted",defaultMessage:"Bundle item deleted successfully"}))},okText:t({id:"delete_bundle_item",defaultMessage:"Delete item"})}))};return d?(0,r.jsx)(eg.default,{}):l.length?(0,r.jsx)(r.Fragment,{children:l.map((e,t)=>(0,r.jsx)(ti,{index:t,item:e,onDelete:o},e.product._id))}):(0,r.jsx)(J.default,{message:t({id:"bundle",defaultMessage:"Bundle product"})})};e.s(["default",0,({productId:e,disabled:t=!1})=>(0,r.jsx)("div",{className:"mt-6 rounded-md",children:(0,r.jsxs)("div",{className:"lg:grid lg:grid-cols-9",children:[(0,r.jsx)("div",{className:"mb-5 lg:col-span-4 lg:pr-5",children:(0,r.jsx)(e8,{productId:e,disabled:t})}),(0,r.jsx)("div",{className:"col-span-5 ml-auto rounded-md bg-white dark:bg-slate-800 px-8 shadow-md dark:shadow-none lg:w-full",children:(0,r.jsx)("div",{className:"py-4",children:(0,r.jsx)(tr,{productId:e})})})]})})],11907)},41418,e=>{"use strict";var t=e.i(59080),a=e.i(76204),s=e.i(62199);let l=t.gql`
|
|
444
|
-
mutation UpdateProduct($productId: ID!, $product: UpdateProductInput!) {
|
|
445
|
-
updateProduct(productId: $productId, product: $product) {
|
|
446
|
-
...ProductDetailFragment
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
${s.default}
|
|
450
|
-
`;e.s(["default",0,()=>{let[e]=(0,a.useMutation)(l);return{updateProduct:async({productId:t,product:{tags:a,sequence:s,meta:l}})=>e({variables:{productId:t,product:{tags:a,sequence:s,meta:l}},refetchQueries:["Products","ShopStatus","ShopInfo"]})}}])},42929,10878,97057,95379,51628,e=>{"use strict";var t=e.i(91398),a=e.i(69322),s=e.i(66773),l=e.i(25705),d=e.i(50243),i=e.i(94330),r=e.i(43054),o=e.i(95336),n=e.i(16113),u=e.i(82191),c=e.i(31004),m=e.i(76929),p=e.i(27927),f=e.i(61113),x=e.i(11056),g=e.i(42532),h=e.i(10785),b=e.i(1330),v=e.i(73356),y=e.i(50099),j=e.i(77035),I=e.i(56902),w=e.i(41523),M=e.i(19051),P=e.i(11907),N=e.i(37932),k=e.i(41418),_=e.i(58971),C=e.i(91788),$=e.i(44112),S=e.i(5505),T=e.i(30276),R=e.i(59080),A=e.i(32171),q=e.i(1880);let V=R.gql`
|
|
451
|
-
fragment ProductAssignmentFragment on ProductVariationAssignment {
|
|
452
|
-
_id
|
|
453
|
-
vectors {
|
|
454
|
-
_id
|
|
455
|
-
option {
|
|
456
|
-
_id
|
|
457
|
-
value
|
|
458
|
-
texts {
|
|
459
|
-
_id
|
|
460
|
-
title
|
|
461
|
-
subtitle
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
variation {
|
|
465
|
-
_id
|
|
466
|
-
key
|
|
467
|
-
texts {
|
|
468
|
-
_id
|
|
469
|
-
locale
|
|
470
|
-
title
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
product {
|
|
475
|
-
_id
|
|
476
|
-
texts {
|
|
477
|
-
_id
|
|
478
|
-
title
|
|
479
|
-
slug
|
|
480
|
-
subtitle
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
`,D=R.gql`
|
|
485
|
-
query ProductAssignments($productId: ID, $slug: String) {
|
|
486
|
-
product(productId: $productId, slug: $slug) {
|
|
487
|
-
_id
|
|
488
|
-
... on ConfigurableProduct {
|
|
489
|
-
texts {
|
|
490
|
-
_id
|
|
491
|
-
subtitle
|
|
492
|
-
slug
|
|
493
|
-
title
|
|
494
|
-
}
|
|
495
|
-
variations {
|
|
496
|
-
_id
|
|
497
|
-
key
|
|
498
|
-
texts {
|
|
499
|
-
_id
|
|
500
|
-
title
|
|
501
|
-
}
|
|
502
|
-
options {
|
|
503
|
-
_id
|
|
504
|
-
value
|
|
505
|
-
texts {
|
|
506
|
-
_id
|
|
507
|
-
title
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
assignments(includeInactive: true) {
|
|
512
|
-
...ProductAssignmentFragment
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
${V}
|
|
518
|
-
`;var E=e.i(8918);let U=(e,t,a)=>{let s=e[a],l=[];return(s?.values.filter(e=>e.length).forEach(e=>{let a={};a[s.key]=e,t.length>0?t.forEach(e=>{l.push({...e,...a})}):l.push(a)}),e.length>a+1)?U(e,l,a+1):Array.from(new Set(l.map(e=>JSON.stringify(e)))).map(e=>JSON.parse(e))},O=({_id:e,texts:t})=>({value:e,label:t?.title});var L=e.i(62100),B=e.i(90647),F=e.i(2765),Q=e.i(15971),z=e.i(6607),K=e.i(76204);let H=R.gql`
|
|
519
|
-
mutation AddProductAssignment(
|
|
520
|
-
$proxyId: ID!
|
|
521
|
-
$productId: ID!
|
|
522
|
-
$vectors: [ProductAssignmentVectorInput!]!
|
|
523
|
-
) {
|
|
524
|
-
addProductAssignment(
|
|
525
|
-
proxyId: $proxyId
|
|
526
|
-
productId: $productId
|
|
527
|
-
vectors: $vectors
|
|
528
|
-
) {
|
|
529
|
-
_id
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
`,Z=()=>{let[e]=(0,K.useMutation)(H);return{addProductAssignment:async({productId:t,proxyId:a,vectors:s})=>e({variables:{productId:t,proxyId:a,vectors:s},refetchQueries:["ProductAssignments"]})}};var W=e.i(24112);let G=R.gql`
|
|
533
|
-
mutation RemoveProductAssignment(
|
|
534
|
-
$proxyId: ID!
|
|
535
|
-
$vectors: [ProductAssignmentVectorInput!]!
|
|
536
|
-
) {
|
|
537
|
-
removeProductAssignment(proxyId: $proxyId, vectors: $vectors) {
|
|
538
|
-
_id
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
`;var J=e.i(41158),X=e.i(57748),Y=e.i(81013),ee=e.i(98949),et=e.i(69211),ea=e.i(45229),es=e.i(99160);let el={SimpleProduct:"SIMPLE_PRODUCT",BundleProduct:"BUNDLE_PRODUCT",PlanProduct:"PLAN_PRODUCT",ConfigurableProduct:"CONFIGURABLE_PRODUCT",TokenizedProduct:"TOKENIZED_PRODUCT"};e.s(["PRODUCT_TYPES",0,el],10878);var ed=e.i(38994);let ei=function({proxyProduct:e,vectors:t,onSuccess:s,locale:l}){let{createProduct:d}=(0,ed.default)(),{addProductAssignment:i}=Z(),{formatMessage:r}=(0,a.useIntl)();return async({title:a,type:o})=>{let n=[{title:a,slug:a.toLowerCase().replace(/\s+/g,"-"),locale:l}],{data:u}=await d({product:{type:o||el.SimpleProduct},texts:n}),c=u?.createProduct,m=c?._id;if(!m)throw Error(r({id:"product_creation_failed",defaultMessage:"Product creation failed"}));return await i({productId:m,proxyId:e?._id,vectors:t}),s?.(c),{success:!0}}};var er=e.i(73419),eo=e.i(57561);let en=({proxyProduct:e,vectors:l,onSuccess:d})=>{let{formatMessage:i}=(0,a.useIntl)(),{selectedLocale:r}=(0,eo.default)(),o=ei({onSuccess:d,proxyProduct:e,vectors:l,locale:r}),{hasRole:n}=(0,_.default)(),u=(0,C.useMemo)(()=>l.map(({value:e})=>e),[l]),c=(0,C.useMemo)(()=>{let t=e?.texts?.title??"";return`${u.join("-")} ${t}`.trim()},[u,e]),m=async({title:e,type:t})=>{try{return await o({title:e,type:t}),{success:!0}}catch(e){return{success:!1,error:{message:e?.message}}}},p=i({id:"product-scaffolded-success",defaultMessage:"Product scaffolded successfully"}),f=(0,ee.default)({submit:m,successMessage:p,enableReinitialize:!0,initialValues:{title:c,type:s.IProductType.SimpleProduct}});return(0,t.jsxs)(et.default,{className:"mt-3 rounded-md",form:f,children:[(0,t.jsxs)("div",{className:"p-5 pb-7 sm:max-w-full flex flex-col gap-3",children:[(0,t.jsx)(ea.default,{name:"title",id:"title",label:i({id:"name",defaultMessage:"Name"}),required:!0,className:"block w-full max-w-full rounded-md border-slate-300 dark:border-slate-800 text-sm focus:ring-slate-800 sm:text-sm"}),(0,t.jsx)(er.default,{className:"mt-1 w-full",label:i({id:"type",defaultMessage:"Type"}),placeholder:i({id:"type",defaultMessage:"Type"}),required:!0,name:"type",options:Object.fromEntries(Object.entries(s.IProductType).map(([e,t])=>[t,e]))})]}),n(s.IRoleAction.ManageProducts)&&(0,t.jsx)("div",{className:"border-t border-t-slate-100 dark:border-t-slate-700 bg-slate-50 dark:bg-slate-900 p-5 text-right",children:(0,t.jsx)(es.default,{label:i({id:"scaffold_product",defaultMessage:"Scaffold"})})})]})},eu=({columns:e,variationProduct:l,product:d,loading:i,disabled:r,proxyId:o,columnKeys:n})=>{let{formatMessage:u}=(0,a.useIntl)(),[c,m]=(0,C.useState)(""),{addProductAssignment:p}=Z(),{removeProductAssignment:f}=(()=>{let[e]=(0,K.useMutation)(G);return{removeProductAssignment:async({proxyId:t,vectors:a})=>e({variables:{proxyId:t,vectors:a},refetchQueries:["ProductAssignments"]})}})(),{hasRole:x}=(0,_.default)(),{setModal:g}=(0,z.default)(),{products:h}=(0,W.default)({queryString:c,limit:50,sort:[{key:"created",value:s.ISortDirection.Desc}]}),b=(0,C.useMemo)(()=>e.map((e,t)=>({key:n[t],value:e})).filter(({value:e})=>e),[e,n]),v=(0,C.useCallback)(async({value:e})=>{await p({proxyId:o,productId:e,vectors:b})},[b,p,o]),y=(0,C.useCallback)(async()=>{await g((0,t.jsx)(Q.default,{onCancelClick:async()=>g(""),message:u({id:"delete_product_assignment",defaultMessage:"This action might cause inconsistencies with other data that relates to it. Are you sure you want to delete this assignment? "}),onOkClick:async()=>{g(""),await f({proxyId:o,vectors:b})},okText:u({id:"delete_variation_assignment",defaultMessage:"Delete assignment"})}))},[o,b,u,g,f]),j=(0,C.useMemo)(()=>(0,F.default)(200)(m),[]),I=!l&&d?.variations?.length!==e?.length,w=(0,C.useMemo)(()=>h?.map(O).filter(({value:e})=>e!==o)||[],[h,o]),M=async()=>{await g((0,t.jsx)(en,{proxyProduct:d,vectors:b,onSuccess:()=>{g(null)}}))};return(0,t.jsxs)(E.default.Row,{children:[e.map((e,a)=>(0,t.jsx)(E.default.Cell,{className:"font-medium",children:e},`${e}`)),(0,t.jsx)(E.default.Cell,{children:l?(0,t.jsx)("div",{className:"flex items-center",children:(0,t.jsx)(J.default,{href:`/products?slug=${(0,q.default)(l)}`,children:(0,t.jsx)("span",{className:"text-green-700 dark:text-green-300 font-medium",children:l?.texts?.title})})}):I?(0,t.jsx)("div",{className:"mt-1 text-sm text-rose-600 italic",children:u({id:"assign_product_needs_variations",defaultMessage:"Please configure all variation options before assigning a product."})}):(0,t.jsx)("div",{className:"relative w-full",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(B.default,{name:"productId",placeholder:u({id:"search_product",defaultMessage:"Search product"}),isLoading:i,isDisabled:r,onChange:v,onInputChange:j,options:w,className:"mt-1 w-full py-2 text-sm font-medium text-slate-500"})}),x(s.IRoleAction.ManageProducts)&&(0,t.jsx)(Y.default,{onClick:M,children:(0,t.jsx)(X.SparklesIcon,{className:"h-5 w-5"})})]})})}),(0,t.jsx)(E.default.Cell,{children:l&&l._id&&(0,t.jsx)(L.default,{onClick:y})})]})};var ec=e.i(2875);let em=({proxyId:e,disabled:s=!1})=>{let{formatMessage:l}=(0,a.useIntl)(),{product:d,loading:i}=(({productId:e=null,slug:t=null}={})=>{let a=(0,q.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,A.useQuery)(D,{skip:!e&&!a,variables:{productId:e||a}});return{product:s?.product,loading:l,error:d}})({productId:e}),r=d&&d?.variations||[],o=d&&d.assignments||[],n=(0,C.useMemo)(()=>r.filter(({options:e})=>e.length).map(({key:e})=>e),[r]),u=(0,C.useMemo)(()=>r.map(({key:e,options:t})=>({values:t?.map(e=>e.value),key:e})),[r]),c=(0,C.useMemo)(()=>{let e=u.filter(({values:e})=>e?.length);return e.length>0?U(e,[],0):[]},[u]),m=(0,C.useMemo)(()=>o.map(e=>{let t={};return n.forEach(a=>{let s=e.vectors.find(e=>e.variation?.key===a);t[a]=s?.option?.value??""}),t}),[o,n]),p=(0,C.useMemo)(()=>{let e=[...c,...m],t=new Set;return e.filter(e=>{let a=Object.values(e).join("::");return!t.has(a)&&(t.add(a),!0)})},[c,m]),f=(0,C.useMemo)(()=>o.map(e=>{let t={};return e.vectors.forEach(e=>{e?.variation?.key&&e?.option?.value&&(t[e.variation.key]=e.option.value)}),{keys:t,product:e.product}}),[o]),x=(0,C.useMemo)(()=>p.map(e=>{let t=f.find(({keys:t})=>Object.entries(t).every(([t,a])=>e[t]===a));return{_id:Object.values(e).join("::"),product:t?.product,columns:Object.values(e),columnsText:Object.values(e)}}),[p,f]),g=(0,C.useMemo)(()=>r.length>0,[r]),h=(0,C.useMemo)(()=>r.some(e=>e.options&&e.options.length>0),[r]);return(0,t.jsxs)(S.default,{children:[(0,t.jsx)(ec.default,{title:l({id:"product_assignments_explanation_title",defaultMessage:"About Product Assignments"}),description:l({id:"product_assignments_explanation_text",defaultMessage:"Product assignments allow you to link specific products to each unique combination of variation options. For example, if you have a t-shirt with 'Size' and 'Color' variations, you can assign different product SKUs to each combination like 'Large + Red' or 'Small + Blue'. This is useful for managing inventory, pricing, and product details for each specific variant."})}),!g&&(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 dark:bg-gray-800 mb-4",children:(0,t.jsx)($.InformationCircleIcon,{className:"w-8 h-8 text-gray-400"})}),(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-2",children:l({id:"no_variations_configured",defaultMessage:"No variations configured yet. Please add variations and their options in the Variations tab first."})})]}),g&&h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(T.default,{messageKey:"assignment_matrix_help",defaultMessage:"Each row represents a unique combination of your product variations. Assign a specific product to each combination to create a complete product catalog."})}),(0,t.jsxs)(E.default,{children:[(0,t.jsxs)(E.default.Row,{children:[n.map(e=>(0,t.jsx)(E.default.Cell,{className:"font-semibold bg-gray-50 dark:bg-gray-800",children:r.find(t=>t.key===e)?.texts?.title||e},e)),(0,t.jsx)(E.default.Cell,{className:"font-semibold bg-gray-50 dark:bg-gray-800",children:l({id:"assigned_product_column_header",defaultMessage:"Assigned Product"})}),(0,t.jsx)(E.default.Cell,{className:"font-semibold bg-gray-50 dark:bg-gray-800",children:l({id:"actions_column_header",defaultMessage:"Actions"})})]}),x.length>0&&x.map(({_id:a,columns:l,product:r})=>(0,t.jsx)(eu,{columns:l,disabled:s,loading:i,product:d,variationProduct:r,columnKeys:n,proxyId:e},a))]})]}),g&&!h&&(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-yellow-100 dark:bg-yellow-900/30 mb-4",children:(0,t.jsx)($.InformationCircleIcon,{className:"w-8 h-8 text-yellow-600 dark:text-yellow-400"})}),(0,t.jsx)("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-2",children:l({id:"assign_product_needs_variations",defaultMessage:"Please configure all variation options before assigning a product."})}),(0,t.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:l({id:"assignment_matrix_help",defaultMessage:"Each row represents a unique combination of your product variations. Assign a specific product to each combination to create a complete product catalog."})})]})]})};var ep=e.i(60195),ef=e.i(1504);let ex=R.gql`
|
|
542
|
-
query ProductTokenization($productId: ID, $slug: String) {
|
|
543
|
-
product(productId: $productId, slug: $slug) {
|
|
544
|
-
_id
|
|
545
|
-
... on TokenizedProduct {
|
|
546
|
-
contractConfiguration {
|
|
547
|
-
tokenId
|
|
548
|
-
supply
|
|
549
|
-
}
|
|
550
|
-
contractStandard
|
|
551
|
-
contractAddress
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
`,eg=R.gql`
|
|
556
|
-
query SmartContractStandards {
|
|
557
|
-
smartContractStandards: __type(name: "SmartContractStandard") {
|
|
558
|
-
options: enumValues {
|
|
559
|
-
value: name
|
|
560
|
-
label: name
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
`,eh=R.gql`
|
|
565
|
-
mutation UpdateProductTokenization(
|
|
566
|
-
$productId: ID!
|
|
567
|
-
$tokenization: UpdateProductTokenizationInput!
|
|
568
|
-
) {
|
|
569
|
-
updateProductTokenization(
|
|
570
|
-
productId: $productId
|
|
571
|
-
tokenization: $tokenization
|
|
572
|
-
) {
|
|
573
|
-
_id
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
`,eb=({productId:e,disabled:l=!1})=>{let{formatMessage:d}=(0,a.useIntl)(),{hasRole:i}=(0,_.default)(),{smartContractStandards:r}=(()=>{let{data:e,loading:t,error:a}=(0,A.useQuery)(eg);return{smartContractStandards:e?.smartContractStandards?.options||[],loading:t,error:a}})(),{updateProductTokenization:o}=(()=>{let[e]=(0,K.useMutation)(eh);return{updateProductTokenization:async({productId:t,tokenization:{contractAddress:a,contractStandard:s,tokenId:l,supply:d}})=>e({variables:{productId:t,tokenization:{contractAddress:a,contractStandard:s,tokenId:l,supply:parseInt(d,10)}},refetchQueries:["Product","Products"]})}})(),{product:n,loading:u}=(({productId:e=null,slug:t=null}={})=>{let a=(0,q.parseUniqueId)(t),{data:s,loading:l,error:d}=(0,A.useQuery)(ex,{skip:!e&&!t,variables:{productId:e||a}});return{product:s?.product,loading:l,error:d}})({productId:e}),c=async({contractAddress:t,contractStandard:a,tokenId:s,supply:l})=>(await o({productId:e,tokenization:{contractAddress:t,contractStandard:a,tokenId:s||"",supply:l}}),{success:!0}),m=d({id:"token_updated",defaultMessage:"Token update successfully!"}),p=(0,ee.default)({disabled:l,submit:c,successMessage:m,initialValues:{contractAddress:"",contractStandard:"",tokenId:"",supply:""}});return(0,C.useEffect)(()=>{u||p.formik.setValues({contractAddress:n?.contractAddress||"",contractStandard:n?.contractStandard||"",tokenId:n?.contractConfiguration?.tokenId||"",supply:n?.contractConfiguration?.supply||""})},[u]),(0,t.jsx)(ep.default,{documentationLabel:d({id:"texts",defaultMessage:"Texts"}),className:"mt-2 lg:mt-5",documentation:(0,t.jsx)(a.FormattedMessage,{id:"tokenized_product_text_form_description",defaultMessage:"<b>Contract standards </b> <ol> <dt><b> ERC721 </b></dt> <dd> Buying multiple Products leads to multiple Tokens (make sure to set the tokenId to 0 to make it auto generate new id's) </dd> <dt> <b> ERC1155 </b></dt> <dd> Buying multiple Products leads to a new token with balance 3 of token with tokenId assigned </dd> <dt> <b> Contract address </b></dt> <dd> Address of a token on a given network </dd> </ol>",values:{ol:e=>(0,t.jsxs)("ol",{children:[e," "]}),dt:e=>(0,t.jsxs)("dt",{className:"bold",children:[e," "]}),dd:e=>(0,t.jsxs)("dd",{children:[e," "]}),b:e=>(0,t.jsxs)("b",{children:[e," "]})}}),children:(0,t.jsx)(S.default,{children:(0,t.jsxs)(et.default,{form:p,children:[(0,t.jsxs)("div",{className:"p-5 pb-7 sm:max-w-full flex flex-col gap-y-5",children:[(0,t.jsx)(er.default,{className:"w-full",label:d({id:"contract-standard",defaultMessage:"Contract standard"}),placeholder:d({id:"contract-standard",defaultMessage:"Contract standard"}),required:!0,name:"contractStandard",options:(0,ef.default)(r,"label","value")}),(0,t.jsx)(ea.default,{name:"contractAddress",id:"contractAddress",label:d({id:"contract-address-label",defaultMessage:"Contract Address"}),placeholder:d({id:"contract-address-label",defaultMessage:"Contract Address"}),required:!0,className:"block w-full max-w-full rounded-md border-slate-300 dark:border-slate-800 text-sm focus:ring-slate-800 sm:text-sm"}),(0,t.jsx)(ea.default,{name:"supply",id:"supply",type:"number",label:d({id:"token-supply",defaultMessage:"Supply"}),placeholder:d({id:"token-supply",defaultMessage:"Supply"}),required:!0,className:"block w-full max-w-full rounded-md border-slate-300 dark:border-slate-800 text-sm focus:ring-slate-800 sm:text-sm"}),(0,t.jsx)(ea.default,{name:"tokenId",id:"tokenId",label:d({id:"token-id-label",defaultMessage:"Token Serial Number"}),placeholder:d({id:"token-id-label",defaultMessage:"Token Serial Number"}),className:"block w-full max-w-full rounded-md border-slate-300 dark:border-slate-800 text-sm focus:ring-slate-800 sm:text-sm"})]}),i(s.IRoleAction.ManageProducts)&&(0,t.jsx)("div",{className:"space-y-6 border-t border-t-slate-100 dark:border-t-slate-700 bg-slate-50 dark:bg-slate-900 p-5 text-right",children:(0,t.jsx)(es.default,{label:d({id:"update_token",defaultMessage:"Update token"})})})]})})})};var ev=e.i(31494),ey=e.i(8199);let ej=({id:e,selectedView:a="",disableAll:s=!1,...l})=>"texts"===a?(0,t.jsx)(x.default,{children:(0,t.jsx)(h.default,{productId:e,disabled:s})}):"media"===a?(0,t.jsx)(ey.default,{children:(0,t.jsx)(x.default,{children:(0,t.jsx)(b.default,{productId:e})})}):"commerce"===a?(0,t.jsx)(g.default,{productId:e,disabled:s}):"supply"===a?(0,t.jsx)(y.default,{productId:e,disabled:s}):"warehousing"===a?(0,t.jsx)(I.default,{productId:e,disabled:s}):"variations"===a?(0,t.jsx)(x.default,{children:(0,t.jsx)(j.default,{productId:e,disabled:s})}):"bundled_products"===a?(0,t.jsx)(x.default,{children:(0,t.jsx)(P.default,{productId:e,disabled:s})}):"subscriptions"===a?(0,t.jsx)(v.default,{productId:e,disabled:s}):"reviews"===a?(0,t.jsx)(M.default,{productId:e}):"assignments"===a?(0,t.jsx)(x.default,{children:(0,t.jsx)(em,{proxyId:e,disabled:s})}):"token"===a?(0,t.jsx)(eb,{productId:e,disabled:s}):"extended"===a?(0,t.jsx)(ev.default,{data:l}):(0,t.jsx)(x.default,{children:(0,t.jsx)(h.default,{productId:e})});e.s(["default",0,({product:e,extendedData:x={}})=>{let{formatMessage:g}=(0,a.useIntl)(),{hasRole:h}=(0,_.default)(),{updateProduct:b}=(0,k.default)(),{shopInfo:v}=(0,eo.default)(),{__typename:y}=e||{},j=[{id:"texts",title:g({id:"general_text",defaultMessage:"Text"}),Icon:(0,t.jsx)(l.DocumentTextIcon,{className:"h-5 w-5"})},{id:"media",title:g({id:"media",defaultMessage:"Media"}),Icon:(0,t.jsx)(d.FilmIcon,{className:"h-5 w-5"})},"ConfigurableProduct"!==y&&{id:"commerce",title:g({id:"commerce",defaultMessage:"Commerce"}),Icon:(0,t.jsx)(i.ShoppingBagIcon,{className:"h-5 w-5"})},"SimpleProduct"===y&&{id:"supply",title:g({id:"supply",defaultMessage:"Supply"}),Icon:(0,t.jsx)(r.ChartPieIcon,{className:"h-5 w-5"})},"SimpleProduct"===y&&{id:"warehousing",title:g({id:"warehousing",defaultMessage:"Warehousing"}),Icon:(0,t.jsx)(o.ArchiveBoxIcon,{className:"h-5 w-5"})},"ConfigurableProduct"===y&&{id:"variations",title:g({id:"variations",defaultMessage:"Variations"}),Icon:(0,t.jsx)(n.SwatchIcon,{className:"h-5 w-5"})},"BundleProduct"===y&&{id:"bundled_products",title:g({id:"bundled_items",defaultMessage:"Bundled items"}),Icon:(0,t.jsx)(u.PresentationChartLineIcon,{className:"h-5 w-5"})},"PlanProduct"===y&&{id:"subscriptions",title:g({id:"subscriptions",defaultMessage:"Subscriptions"}),Icon:(0,t.jsx)(c.UsersIcon,{className:"h-5 w-5"})},"ConfigurableProduct"===y&&{id:"assignments",title:g({id:"assignments",defaultMessage:"Assignments"}),Icon:(0,t.jsx)(p.LinkIcon,{className:"h-5 w-5"})},"TokenizedProduct"===y&&{id:"token",title:g({id:"token",defaultMessage:"Token"}),Icon:(0,t.jsx)(p.LinkIcon,{className:"h-5 w-5"})},{id:"reviews",title:g({id:"reviews",defaultMessage:"Reviews"}),Icon:(0,t.jsx)(f.StarIcon,{className:"h-5 w-5"})},null!==x&&{id:"extended",title:g({id:"extended-fields",defaultMessage:"Extended"}),Icon:(0,t.jsx)(m.PuzzlePieceIcon,{className:"h-5 w-5"})}].filter(e=>e),I=async({tags:t})=>(await b({productId:e?._id,product:{tags:t}}),!0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mt-5 flex flex-wrap items-center justify-between gap-10",children:(0,t.jsx)(N.default,{defaultValue:e?.tags,onSubmit:I,enableEdit:h(s.IRoleAction.ManageProducts),availableTagOptions:v?.adminUiConfig?.productTags.filter(t=>!(e?.tags||[])?.includes(t)).map(e=>({value:e,label:e}))})}),(0,t.jsx)(w.default,{tabItems:j,defaultTab:"texts",children:(0,t.jsx)(ej,{disableAll:e?.status===s.IProductStatus.Deleted,id:e?._id,...x})})]})}],42929);var eI=e.i(35065);e.s(["default",0,({media:e=[],onEditMedia:a})=>(0,t.jsx)("div",{className:"my-5",children:(0,t.jsx)("div",{className:"flex gap-3 overflow-x-auto",children:e.map(e=>(0,t.jsx)("div",{className:"relative flex-shrink-0 group",children:(0,t.jsx)("div",{className:"w-16 h-16 bg-slate-100 dark:bg-slate-800 rounded-lg overflow-hidden cursor-pointer border border-slate-200 dark:border-slate-700",onClick:()=>{var t;return t=e._id,void(a&&a(t))},children:(0,t.jsx)(eI.default,{src:e?.file?.url,alt:e.texts?.[0]?.title||e?.file?.url,width:128,height:128,className:"w-full h-full object-cover"})})},e._id))})})],97057);var ew=e.i(62199);let eM=R.gql`
|
|
577
|
-
mutation PublishProduct($productId: ID!) {
|
|
578
|
-
publishProduct(productId: $productId) {
|
|
579
|
-
...ProductDetailFragment
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
${ew.default}
|
|
583
|
-
`;e.s(["default",0,()=>{let[e]=(0,K.useMutation)(eM);return{publishProduct:async({productId:t})=>e({variables:{productId:t},refetchQueries:["Product","ShopStatus"],awaitRefetchQueries:!0})}}],95379);let eP=R.gql`
|
|
584
|
-
mutation UnpublishProduct($productId: ID!) {
|
|
585
|
-
unpublishProduct(productId: $productId) {
|
|
586
|
-
...ProductDetailFragment
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
${ew.default}
|
|
590
|
-
`;e.s(["default",0,()=>{let[e]=(0,K.useMutation)(eP);return{unPublishProduct:async({productId:t})=>e({variables:{productId:t},refetchQueries:["Product","ShopStatus"],awaitRefetchQueries:!0})}}],51628)},88604,e=>{"use strict";var t=e.i(59080),a=e.i(76204);let s=t.gql`
|
|
591
|
-
mutation RemoveProduct($productId: ID!) {
|
|
592
|
-
removeProduct(productId: $productId) {
|
|
593
|
-
_id
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
`;e.s(["default",0,()=>{let[e]=(0,a.useMutation)(s);return{removeProduct:async({productId:t})=>e({variables:{productId:t},refetchQueries:["Products","ShopStatus","ShopInfo"]})}}])},30311,e=>{"use strict";var t=e.i(91398),a=e.i(69322),s=e.i(66773),l=e.i(28401),d=e.i(61494),i=e.i(12197),r=e.i(17644),o=e.i(84818),n=e.i(42929),u=e.i(97057),c=e.i(84278),m=e.i(92276),p=e.i(95379),f=e.i(51628),x=e.i(41418),g=e.i(81359),h=e.i(88604),b=e.i(6607),v=e.i(15971),y=e.i(41215),j=e.i(3828),I=e.i(58971),w=e.i(24608),M=e.i(91788),P=e.i(34728);e.s(["default",0,({slug:e})=>{let{formatMessage:N}=(0,a.useIntl)(),{formatDateTime:k}=(0,o.default)(),{hasRole:_}=(0,I.default)(),{publishProduct:C}=(0,p.default)(),{unPublishProduct:$}=(0,f.default)(),{removeProduct:S}=(0,h.default)(),{updateProduct:T}=(0,x.default)(),{setModal:R}=(0,b.default)(),A=(0,j.useRouter)(),{push:q}=(0,j.useRouter)(),{product:V,loading:D,error:E,extendedData:U}=(0,c.default)({slug:e}),O=V?.status||"DRAFT",L=(0,M.useMemo)(()=>[{id:"published",title:N({id:"published",defaultMessage:"Published"}),description:N({id:"publish_product_description",defaultMessage:"Product will be searchable and is available for orders"}),current:"ACTIVE"===O,selectedTitle:N({id:"published",defaultMessage:"Published"}),onClick:async()=>{try{await C({productId:V?._id}),l.toast.success(N({id:"product_published",defaultMessage:"Published successfully "}))}catch(t){console.error("Failed to publish product:",t);let e=t?.message||"Unknown error";l.toast.error(`${N({id:"product_publish_error",defaultMessage:"Failed to publish product"})}: ${e}`)}},bgColor:"green",disable:!_(s.IRoleAction.ManageProducts)},{id:"draft",title:N({id:"draft",defaultMessage:"Draft"}),description:N({id:"draft_product_description",defaultMessage:"Product will not be discoverable and can not be orderose"}),current:"DRAFT"===O,selectedTitle:N({id:"not_published",defaultMessage:"Not published"}),bgColor:"amber",disable:"ACTIVE"===O&&!_(s.IRoleAction.ManageProducts),onClick:async()=>{if(_(s.IRoleAction.ManageProducts))try{await $({productId:V?._id}),l.toast.success(N({id:"product_drafted",defaultMessage:"Drafted successfully "}))}catch(t){console.error("Failed to unpublish product:",t);let e=t?.message||"Unknown error";l.toast.error(`${N({id:"product_unpublish_error",defaultMessage:"Failed to unpublish product"})}: ${e}`)}}}],[V]);if(E)return console.error("Error loading product:",E),(0,t.jsx)("div",{className:"mt-5 max-w-full",children:(0,t.jsx)("div",{className:"text-center py-8",children:(0,t.jsx)("p",{className:"text-rose-600 dark:text-rose-400",children:N({id:"product_load_error",defaultMessage:"Failed to load product"})})})});let B=async e=>{e.target.value&&await T({productId:V?._id,product:{sequence:parseInt(e.target.value,10)}})},F=async()=>{"proxies"in V&&V.proxies?.length?await R((0,t.jsx)(P.default,{headerText:N({id:"product_delete_blocked_header",defaultMessage:"Remove links before deleting"}),message:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{children:N({id:"product_delete_blocked_intro",defaultMessage:"This product is linked to the following product types:"})}),(0,t.jsx)("ul",{className:"list-disc list-inside text-sm text-slate-700 dark:text-slate-300",children:"proxies"in V&&V.proxies.map(({__typename:e},a)=>(0,t.jsx)("li",{children:e.replace("Product","")},a))}),(0,t.jsx)("p",{children:N({id:"product_delete_blocked_action",defaultMessage:"Please unlink it before trying to delete it."})})]}),buttonText:N({id:"ok",defaultMessage:"Ok"}),onOkClick:()=>R(null)})):await R((0,t.jsx)(v.default,{onCancelClick:()=>R(""),message:N({id:"delete_product_confirmation",defaultMessage:"This action might cause inconsistencies with other data that relates to it and it is nonreversible. Are you sure you want to delete this product?"}),onOkClick:async()=>{R("");try{await S({productId:V?._id}),l.toast.success(N({id:"product_deleted_success",defaultMessage:"Deleted successfully"})),A.push("/products")}catch(e){await R((0,t.jsx)(v.default,{onCancelClick:()=>R(""),headerText:N({id:"error",defaultMessage:"Error"}),message:e instanceof y.default?e.message:e,icon:(0,t.jsx)("div",{className:"mx-auto flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-rose-100 dark:bg-rose-900/30 sm:mx-0 sm:h-10 sm:w-10",children:(0,t.jsx)(w.XMarkIcon,{className:"h-6 w-6 text-rose-600 dark:text-rose-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})}),okText:N({id:"ok",defaultMessage:"Ok"}),onOkClick:async()=>{R("")}}))}}}))};return V||D?D?(0,t.jsx)(i.default,{}):(0,t.jsxs)("div",{className:"mt-5 max-w-full",children:[(0,t.jsx)(d.default,{routeName:e,depth:3,currentPageTitle:V?.texts?.title}),"DELETED"===O&&(0,t.jsx)("div",{className:"mb-4 rounded-md border border-rose-300 bg-rose-50 p-4 text-sm text-rose-800 dark:border-rose-700 dark:bg-rose-900/30 dark:text-rose-300",children:N({id:"product_deleted_notice",defaultMessage:"This product has been deleted and is no longer active. Some actions may be restricted."})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"items-center flex-wrap flex gap-5 min-w-full justify-between",children:[(0,t.jsx)(r.default,{headerText:(0,t.jsxs)(t.Fragment,{children:[V?.texts?.title||"Untitled Product","DELETED"===O&&(0,t.jsx)("span",{className:"ml-3 rounded bg-rose-100 px-2 py-1 text-xs font-semibold text-rose-800 dark:bg-rose-900/40 dark:text-rose-300",children:N({id:"deleted_status",defaultMessage:"Deleted"})})]}),title:`${V?.texts?.title||"Product"} (${V?._id})`}),(0,t.jsxs)("div",{className:"publish-and-order flex flex-wrap gap-3",children:[O&&"DELETED"!==O&&(0,t.jsx)(m.default,{options:L,type:N({id:"product",defaultMessage:"Product"})}),(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-md dark:border-slate-600 px-4 py-2 text-sm font-medium leading-5 shadow-xs bg-white dark:bg-slate-800 h-[38px]",children:[(0,t.jsx)("label",{htmlFor:"sequence-input",className:"text-slate-700 dark:text-slate-200 font-medium cursor-pointer",children:N({id:"sequence",defaultMessage:"Display Order"})}),(0,t.jsx)("input",{type:"number",id:"sequence-input",disabled:!_(s.IRoleAction.ManageProducts),className:"text-center w-12 bg-transparent border border-slate-300 dark:border-slate-600 rounded focus:ring-2 focus:ring-slate-800 dark:focus:ring-slate-400 focus:border-transparent focus:outline-none text-sm font-semibold text-slate-900 dark:text-slate-300 px-2 py-1 transition-all",defaultValue:V?.sequence,onBlur:B})]}),"DRAFT"===O&&_(s.IRoleAction.ManageProducts)&&(0,t.jsx)(g.default,{onClick:F})]})]}),(0,t.jsxs)("div",{className:"mt-8 flex flex-wrap gap-3 gap-x-10 text-slate-600 dark:text-slate-400",children:[(0,t.jsxs)("div",{className:"flex flex-col items-baseline gap-0",children:[(0,t.jsx)("span",{className:"mr-2 text-xs text-slate-500 dark:text-slate-500",children:"ID:"}),(0,t.jsx)("span",{className:"text-sm font-mono",children:V?._id})]}),(0,t.jsxs)("div",{className:"flex flex-col items-baseline gap-0",children:[(0,t.jsx)("span",{className:"text-xs text-slate-500 dark:text-slate-500",children:"Type:"}),(0,t.jsx)("p",{className:"text-sm font-mono",children:V?.__typename})]}),V?.created&&(0,t.jsxs)("div",{className:"flex flex-col items-baseline gap-0",children:[(0,t.jsxs)("span",{className:"text-xs text-slate-500 dark:text-slate-500",children:[N({id:"created",defaultMessage:"Created"}),":"]}),(0,t.jsx)("span",{className:"text-sm font-mono",children:k(V.created,{dateStyle:"medium",timeStyle:"short"})})]}),V?.updated&&(0,t.jsxs)("div",{className:"flex flex-col items-baseline gap-0",children:[(0,t.jsxs)("span",{className:"text-xs text-slate-500 dark:text-slate-500",children:[N({id:"updated",defaultMessage:"Updated"}),":"]}),(0,t.jsx)("span",{className:"text-sm font-mono",children:k(V.updated,{dateStyle:"medium",timeStyle:"short"})})]}),V?.published&&(0,t.jsxs)("div",{className:"flex flex-col items-baseline gap-0",children:[(0,t.jsxs)("span",{className:"text-xs text-slate-500 dark:text-slate-500",children:[N({id:"published",defaultMessage:"Published"}),":"]}),(0,t.jsx)("span",{className:"text-sm font-mono",children:k(V.published,{dateStyle:"medium",timeStyle:"short"})})]})]})]}),(0,t.jsx)(u.default,{productId:V?._id,media:V?.media||[],onEditMedia:e=>{A.push({pathname:A.pathname,query:{...A.query,tab:"media"}},void 0,{shallow:!0})},canEdit:_(s.IRoleAction.ManageProducts)}),(0,t.jsx)(n.default,{product:V,extendedData:U})]}):(q("/404"),null)}])}]);
|