@cedros/pay-react 1.1.17 → 1.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AISettingsSection--jn-BNmd.mjs → AISettingsSection-BH-RXvk1.mjs} +10 -10
- package/dist/{AISettingsSection-BrXUD4l_.js → AISettingsSection-f5K0nUoQ.js} +1 -1
- package/dist/{AutosaveIndicator-BQkm3cn8.js → AutosaveIndicator-CpTVtJIz.js} +1 -1
- package/dist/{AutosaveIndicator-B3T328jH.mjs → AutosaveIndicator-DTOaopUP.mjs} +1 -1
- package/dist/{CedrosContext-BnJ2Cf7R.mjs → CedrosContext-BE6P5PQ0.mjs} +241 -245
- package/dist/{CedrosContext-C26DlvLF.js → CedrosContext-D-lnoEkR.js} +3 -3
- package/dist/{CryptoButton-Dhxnk9d7.mjs → CryptoButton-CksMkZjL.mjs} +48 -48
- package/dist/CryptoButton-Dy-g3bR0.js +1 -0
- package/dist/{FAQSection-BB1wJRsR.mjs → FAQSection-BO7ZfQMN.mjs} +4 -4
- package/dist/{FAQSection-aoAz35MV.js → FAQSection-CVJ5w6cB.js} +1 -1
- package/dist/{MessagingSection-DId-WJdU.js → MessagingSection-CRFtSoE8.js} +1 -1
- package/dist/{MessagingSection-BG9O62ko.mjs → MessagingSection-CmFYFdaw.mjs} +5 -5
- package/dist/{PaymentSettingsSection-D92IO4xJ.js → PaymentSettingsSection-BKDiep-C.js} +1 -1
- package/dist/{PaymentSettingsSection-c13RAUxn.mjs → PaymentSettingsSection-VDcgpOkp.mjs} +1 -1
- package/dist/{SettingsSection-htem-WL3.mjs → SettingsSection-B0TpaIOG.mjs} +1 -1
- package/dist/{SettingsSection-DUxjXl2G.js → SettingsSection-DSlW47o4.js} +1 -1
- package/dist/SingleCategorySettings-BTXR7zex.js +3 -0
- package/dist/{SingleCategorySettings-BIEs6s6Z.mjs → SingleCategorySettings-Cwlehl0u.mjs} +66 -73
- package/dist/{StorefrontSection-CKTQt255.mjs → StorefrontSection-BAY9V1j6.mjs} +8 -8
- package/dist/{StorefrontSection-DcSoDx-k.js → StorefrontSection-DfN5yxkV.js} +1 -1
- package/dist/{SubscriptionsSection-C0hYf7Hr.js → SubscriptionsSection-BboudRYv.js} +1 -1
- package/dist/{SubscriptionsSection-CONwHhT4.mjs → SubscriptionsSection-D_RKCILr.mjs} +6 -6
- package/dist/{WalletManager-HXXyARQ7.mjs → WalletManager-D78miaJ2.mjs} +1 -1
- package/dist/{WalletManager-D6BYTwXn.js → WalletManager-QcfgQmap.js} +1 -1
- package/dist/crypto-only.d.ts +2 -23
- package/dist/crypto-only.js +1 -1
- package/dist/crypto-only.mjs +64 -63
- package/dist/{index-C1hbnxn0.mjs → index-75RhiLDq.mjs} +7192 -9782
- package/dist/index-B5ck27xb.js +84 -0
- package/dist/index.d.ts +2 -45
- package/dist/index.js +1 -1
- package/dist/index.mjs +64 -63
- package/dist/pay-react.css +1 -1
- package/dist/sections-BCdzdqlG.js +1 -0
- package/dist/sections-BIBMX6KS.mjs +8 -0
- package/dist/src/admin/index.d.ts.map +1 -0
- package/dist/src/admin/plugin.d.ts.map +1 -0
- package/dist/src/admin/types.d.ts.map +1 -0
- package/dist/src/components/CedrosPay.d.ts.map +1 -0
- package/dist/src/components/CreditsButton.d.ts.map +1 -0
- package/dist/src/components/CreditsSubscribeButton.d.ts.map +1 -0
- package/dist/src/components/CryptoButton.d.ts.map +1 -0
- package/dist/src/components/CryptoSubscribeButton.d.ts.map +1 -0
- package/dist/src/components/PaymentModal.d.ts.map +1 -0
- package/dist/src/components/ProductPrice.d.ts.map +1 -0
- package/dist/src/components/PurchaseButton.d.ts.map +1 -0
- package/dist/src/components/StripeButton.d.ts.map +1 -0
- package/dist/src/components/SubscribeButton.d.ts.map +1 -0
- package/dist/src/components/SubscriptionManagementPanel.d.ts.map +1 -0
- package/dist/src/components/admin/AISettingsSection.d.ts.map +1 -0
- package/dist/src/components/admin/AdminAuthManager.d.ts.map +1 -0
- package/dist/src/components/admin/AutosaveIndicator.d.ts.map +1 -0
- package/dist/src/components/admin/CedrosPayAdminDashboard.d.ts.map +1 -0
- package/dist/src/components/admin/ConfigEditor.d.ts.map +1 -0
- package/dist/src/components/admin/CouponsSection.d.ts.map +1 -0
- package/dist/src/components/admin/Dropdown.d.ts.map +1 -0
- package/dist/src/components/admin/ErrorBanner.d.ts.map +1 -0
- package/dist/src/components/admin/FAQSection.d.ts.map +1 -0
- package/dist/src/components/admin/MessagingSection.d.ts.map +1 -0
- package/dist/src/components/admin/OverviewSection.d.ts.map +1 -0
- package/dist/src/components/admin/PaymentSettingsSection.d.ts.map +1 -0
- package/dist/src/components/admin/ProductVariationsEditor.d.ts.map +1 -0
- package/dist/src/components/admin/ProductsSection.d.ts.map +1 -0
- package/dist/src/components/admin/RefundsSection.d.ts.map +1 -0
- package/dist/src/components/admin/SecretArrayEditor.d.ts.map +1 -0
- package/dist/src/components/admin/SettingsSection.d.ts.map +1 -0
- package/dist/src/components/admin/SingleCategorySettings.d.ts.map +1 -0
- package/dist/src/components/admin/StatsBar.d.ts.map +1 -0
- package/dist/src/components/admin/StorefrontSection.d.ts.map +1 -0
- package/dist/src/components/admin/SubscriptionsSection.d.ts.map +1 -0
- package/dist/src/components/admin/Toggle.d.ts.map +1 -0
- package/dist/{components → src/components}/admin/TokenMintSelector.d.ts +1 -1
- package/dist/src/components/admin/TokenMintSelector.d.ts.map +1 -0
- package/dist/src/components/admin/TransactionsSection.d.ts.map +1 -0
- package/dist/src/components/admin/VariantInventoryGrid.d.ts.map +1 -0
- package/dist/src/components/admin/VariationTypeEditor.d.ts.map +1 -0
- package/dist/src/components/admin/configApi.d.ts.map +1 -0
- package/dist/src/components/admin/icons.d.ts.map +1 -0
- package/dist/{components → src/components}/admin/index.d.ts +1 -1
- package/dist/src/components/admin/index.d.ts.map +1 -0
- package/dist/src/components/admin/sections-more.d.ts.map +1 -0
- package/dist/src/components/admin/sections.d.ts.map +1 -0
- package/dist/src/components/admin/types.d.ts.map +1 -0
- package/dist/{components → src/components}/admin/useAdminAuth.d.ts +11 -23
- package/dist/src/components/admin/useAdminAuth.d.ts.map +1 -0
- package/dist/src/components/admin/useAutosave.d.ts.map +1 -0
- package/dist/src/components/admin/useProductVariations.d.ts.map +1 -0
- package/dist/src/components/subscriptionPanelStyles.d.ts.map +1 -0
- package/dist/src/context/CedrosContext.d.ts.map +1 -0
- package/dist/src/context/ThemeContext.d.ts.map +1 -0
- package/dist/src/context/index.d.ts.map +1 -0
- package/dist/src/crypto-only.d.ts +23 -0
- package/dist/src/crypto-only.d.ts.map +1 -0
- package/dist/src/ecommerce/__tests__/cartCheckoutRequirements.test.d.ts.map +1 -0
- package/dist/src/ecommerce/__tests__/cartProviderPersistence.test.d.ts.map +1 -0
- package/dist/src/ecommerce/__tests__/cartReducer.test.d.ts.map +1 -0
- package/dist/src/ecommerce/__tests__/cartServerMerge.test.d.ts.map +1 -0
- package/dist/src/ecommerce/__tests__/checkoutPaymentMethods.test.d.ts.map +1 -0
- package/dist/src/ecommerce/__tests__/checkoutReturn.test.d.ts.map +1 -0
- package/dist/src/ecommerce/__tests__/checkoutSchema.test.d.ts.map +1 -0
- package/dist/src/ecommerce/__tests__/inventoryHooks.test.d.ts.map +1 -0
- package/dist/src/ecommerce/__tests__/mockAdapter.test.d.ts.map +1 -0
- package/dist/src/ecommerce/__tests__/storage.test.d.ts.map +1 -0
- package/dist/src/ecommerce/adapters/CommerceAdapter.d.ts.map +1 -0
- package/dist/src/ecommerce/adapters/mock/mockAdapter.d.ts.map +1 -0
- package/dist/src/ecommerce/adapters/paywall/paywallAdapter.d.ts.map +1 -0
- package/dist/src/ecommerce/adapters/paywall/paywallAdapter.test.d.ts.map +1 -0
- package/dist/src/ecommerce/components/cart/CartLineItem.d.ts.map +1 -0
- package/dist/src/ecommerce/components/cart/CartPageContent.d.ts.map +1 -0
- package/dist/src/ecommerce/components/cart/CartPanel.d.ts.map +1 -0
- package/dist/src/ecommerce/components/cart/CartSidebar.d.ts.map +1 -0
- package/dist/src/ecommerce/components/cart/CartSummary.d.ts.map +1 -0
- package/dist/src/ecommerce/components/cart/PromoCodeInput.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/Breadcrumbs.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/CategoryNav.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/FilterPanel.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/Price.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/ProductCard.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/ProductGallery.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/ProductGrid.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/QuantitySelector.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/QuickViewDialog.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/SearchInput.d.ts.map +1 -0
- package/dist/src/ecommerce/components/catalog/VariantSelector.d.ts.map +1 -0
- package/dist/src/ecommerce/components/chat/ShopChatPanel.d.ts.map +1 -0
- package/dist/src/ecommerce/components/checkout/AddressForm.d.ts.map +1 -0
- package/dist/src/ecommerce/components/checkout/CheckoutCancelPage.d.ts.map +1 -0
- package/dist/src/ecommerce/components/checkout/CheckoutForm.d.ts.map +1 -0
- package/dist/src/ecommerce/components/checkout/CheckoutLayout.d.ts.map +1 -0
- package/dist/src/ecommerce/components/checkout/CheckoutReceipt.d.ts.map +1 -0
- package/dist/src/ecommerce/components/checkout/CheckoutSuccessPage.d.ts.map +1 -0
- package/dist/src/ecommerce/components/checkout/InventoryVerificationDialog.d.ts.map +1 -0
- package/dist/src/ecommerce/components/checkout/OrderReview.d.ts.map +1 -0
- package/dist/src/ecommerce/components/checkout/PaymentStep.d.ts.map +1 -0
- package/dist/src/ecommerce/components/checkout/ShippingMethodSelector.d.ts.map +1 -0
- package/dist/src/ecommerce/components/faq/FAQItem.d.ts.map +1 -0
- package/dist/src/ecommerce/components/faq/FAQItem.test.d.ts.map +1 -0
- package/dist/src/ecommerce/components/faq/FAQList.d.ts.map +1 -0
- package/dist/src/ecommerce/components/faq/index.d.ts.map +1 -0
- package/dist/src/ecommerce/components/general/EmptyState.d.ts.map +1 -0
- package/dist/src/ecommerce/components/general/ErrorBoundary.d.ts.map +1 -0
- package/dist/src/ecommerce/components/general/ErrorState.d.ts.map +1 -0
- package/dist/src/ecommerce/components/general/toast.d.ts.map +1 -0
- package/dist/src/ecommerce/components/orders/OrderCard.d.ts.map +1 -0
- package/dist/src/ecommerce/components/orders/OrderDetails.d.ts.map +1 -0
- package/dist/src/ecommerce/components/orders/OrderList.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/accordion.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/badge.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/button.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/card.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/input.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/label.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/select.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/separator.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/sheet.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/skeleton.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/tabs.d.ts.map +1 -0
- package/dist/src/ecommerce/components/ui/textarea.d.ts.map +1 -0
- package/dist/src/ecommerce/config/context.d.ts.map +1 -0
- package/dist/src/ecommerce/config/types.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/checkoutReturn.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useAIRelatedProducts.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useCartInventory.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useCatalogUrlState.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useCategories.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useCheckoutResultFromUrl.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useHoldExpiry.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useInventoryVerification.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useOrders.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/usePaymentMethodsConfig.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useProduct.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useProducts.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useShippingMethods.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useStorefrontSettings.d.ts.map +1 -0
- package/dist/src/ecommerce/hooks/useSubscriptionData.d.ts.map +1 -0
- package/dist/src/ecommerce/index.d.ts.map +1 -0
- package/dist/src/ecommerce/integrations/cedros-pay/useCedrosPayCheckoutAdapter.d.ts.map +1 -0
- package/dist/src/ecommerce/state/cart/CartProvider.d.ts.map +1 -0
- package/dist/src/ecommerce/state/cart/cartReducer.d.ts.map +1 -0
- package/dist/src/ecommerce/state/checkout/checkoutSchema.d.ts.map +1 -0
- package/dist/src/ecommerce/state/checkout/useCheckout.d.ts.map +1 -0
- package/dist/src/ecommerce/templates/CartTemplate.d.ts.map +1 -0
- package/dist/src/ecommerce/templates/CategoryTemplate.d.ts.map +1 -0
- package/dist/src/ecommerce/templates/CheckoutTemplate.d.ts.map +1 -0
- package/dist/src/ecommerce/templates/ProductTemplate.d.ts.map +1 -0
- package/dist/src/ecommerce/templates/PurchaseHistoryTemplate.d.ts.map +1 -0
- package/dist/src/ecommerce/templates/ReceiptTemplate.d.ts.map +1 -0
- package/dist/src/ecommerce/templates/ShopTemplate.d.ts.map +1 -0
- package/dist/src/ecommerce/templates/SubscriptionTemplate.d.ts.map +1 -0
- package/dist/src/ecommerce/testing/adapterContract.d.ts.map +1 -0
- package/dist/src/ecommerce/types.d.ts.map +1 -0
- package/dist/src/ecommerce/utils/cartCheckoutRequirements.d.ts.map +1 -0
- package/dist/src/ecommerce/utils/cartItemMetadata.d.ts.map +1 -0
- package/dist/src/ecommerce/utils/cn.d.ts.map +1 -0
- package/dist/src/ecommerce/utils/money.d.ts.map +1 -0
- package/dist/src/ecommerce/utils/storage.d.ts.map +1 -0
- package/dist/src/hooks/useCreditsPayment.d.ts.map +1 -0
- package/dist/src/hooks/useCreditsSubscription.d.ts.map +1 -0
- package/dist/src/hooks/useCryptoSubscription.d.ts.map +1 -0
- package/dist/src/hooks/usePaymentMode.d.ts.map +1 -0
- package/dist/src/hooks/useRefundVerification.d.ts.map +1 -0
- package/dist/src/hooks/useStripeCheckout.d.ts.map +1 -0
- package/dist/src/hooks/useSubscription.d.ts.map +1 -0
- package/dist/src/hooks/useSubscriptionManagement.d.ts.map +1 -0
- package/dist/src/hooks/useX402Payment.d.ts.map +1 -0
- package/dist/src/i18n/index.d.ts.map +1 -0
- package/dist/src/i18n/useTranslation.d.ts.map +1 -0
- package/dist/src/index.d.ts +45 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/managers/CreditsManager.d.ts.map +1 -0
- package/dist/src/managers/ManagerCache.d.ts.map +1 -0
- package/dist/src/managers/RouteDiscoveryManager.d.ts +6 -0
- package/dist/src/managers/RouteDiscoveryManager.d.ts.map +1 -0
- package/dist/src/managers/StripeManager.d.ts.map +1 -0
- package/dist/src/managers/SubscriptionChangeManager.d.ts.map +1 -0
- package/dist/src/managers/SubscriptionManager.d.ts.map +1 -0
- package/dist/src/managers/WalletManager.d.ts.map +1 -0
- package/dist/src/managers/X402Manager.d.ts.map +1 -0
- package/dist/src/stripe-only.d.ts +49 -0
- package/dist/src/stripe-only.d.ts.map +1 -0
- package/dist/src/telemetry.d.ts +27 -0
- package/dist/src/telemetry.d.ts.map +1 -0
- package/dist/src/testing/__tests__/providers.test.d.ts.map +1 -0
- package/dist/src/testing/helpers.d.ts.map +1 -0
- package/dist/src/testing/index.d.ts +12 -0
- package/dist/src/testing/index.d.ts.map +1 -0
- package/dist/src/testing/mocks.d.ts.map +1 -0
- package/dist/src/testing/providers.d.ts.map +1 -0
- package/dist/src/types/componentOptions.d.ts.map +1 -0
- package/dist/src/types/errors.d.ts.map +1 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/subscription.d.ts.map +1 -0
- package/dist/src/utils/__tests__/couponHelpers.test.d.ts.map +1 -0
- package/dist/src/utils/__tests__/cspHelper.test.d.ts.map +1 -0
- package/dist/src/utils/__tests__/fetchWithTimeout.test.d.ts.map +1 -0
- package/dist/src/utils/cartHelpers.d.ts.map +1 -0
- package/dist/src/utils/circuitBreaker.d.ts.map +1 -0
- package/dist/src/utils/couponHelpers.d.ts.map +1 -0
- package/dist/src/utils/cspHelper.d.ts.map +1 -0
- package/dist/src/utils/csvHelpers.d.ts.map +1 -0
- package/dist/src/utils/csvHelpers.test.d.ts.map +1 -0
- package/dist/src/utils/dateHelpers.d.ts.map +1 -0
- package/dist/src/utils/deprecation.d.ts.map +1 -0
- package/dist/src/utils/errorHandling.d.ts.map +1 -0
- package/dist/src/utils/errorMessages.d.ts.map +1 -0
- package/dist/src/utils/errorParser.d.ts.map +1 -0
- package/dist/src/utils/eventEmitter.d.ts.map +1 -0
- package/dist/src/utils/exponentialBackoff.d.ts.map +1 -0
- package/dist/src/utils/fetchWithTimeout.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/modalStyles.d.ts.map +1 -0
- package/dist/src/utils/rateLimiter.d.ts.map +1 -0
- package/dist/src/utils/requestDeduplication.d.ts.map +1 -0
- package/dist/src/utils/securityValidation.d.ts.map +1 -0
- package/dist/src/utils/solanaCheck.d.ts.map +1 -0
- package/dist/src/utils/telemetry.d.ts.map +1 -0
- package/dist/src/utils/tokenMintValidator.d.ts.map +1 -0
- package/dist/src/utils/uuid.d.ts.map +1 -0
- package/dist/src/utils/validateConfig.d.ts.map +1 -0
- package/dist/src/utils/walletDetection.d.ts.map +1 -0
- package/dist/src/utils/walletPool.d.ts.map +1 -0
- package/dist/stripe-only.d.ts +2 -14
- package/dist/stripe-only.js +1 -1
- package/dist/stripe-only.mjs +59 -62
- package/dist/styles--eKKnfdj.mjs +2578 -0
- package/dist/styles-BWrLnaUW.js +1 -0
- package/dist/telemetry.d.ts +2 -27
- package/dist/testing/index.d.ts +2 -12
- package/dist/testing/index.js +1 -1
- package/dist/testing/index.mjs +1 -1
- package/dist/{walletPool-DjA7J3a9.js → walletPool-BqNfOhB0.js} +1 -1
- package/dist/{walletPool-BV_z1lEA.mjs → walletPool-DShNjCQ6.mjs} +1 -1
- package/package.json +8 -3
- package/dist/CryptoButton-B4-oJ8lF.js +0 -1
- package/dist/SingleCategorySettings-CQ-osdzb.js +0 -3
- package/dist/admin/index.d.ts.map +0 -1
- package/dist/admin/plugin.d.ts.map +0 -1
- package/dist/admin/types.d.ts.map +0 -1
- package/dist/components/CedrosPay.d.ts.map +0 -1
- package/dist/components/CreditsButton.d.ts.map +0 -1
- package/dist/components/CreditsSubscribeButton.d.ts.map +0 -1
- package/dist/components/CryptoButton.d.ts.map +0 -1
- package/dist/components/CryptoSubscribeButton.d.ts.map +0 -1
- package/dist/components/PaymentModal.d.ts.map +0 -1
- package/dist/components/ProductPrice.d.ts.map +0 -1
- package/dist/components/PurchaseButton.d.ts.map +0 -1
- package/dist/components/StripeButton.d.ts.map +0 -1
- package/dist/components/SubscribeButton.d.ts.map +0 -1
- package/dist/components/SubscriptionManagementPanel.d.ts.map +0 -1
- package/dist/components/admin/AISettingsSection.d.ts.map +0 -1
- package/dist/components/admin/AdminAuthManager.d.ts.map +0 -1
- package/dist/components/admin/AutosaveIndicator.d.ts.map +0 -1
- package/dist/components/admin/CedrosPayAdminDashboard.d.ts.map +0 -1
- package/dist/components/admin/ConfigEditor.d.ts.map +0 -1
- package/dist/components/admin/CouponsSection.d.ts.map +0 -1
- package/dist/components/admin/Dropdown.d.ts.map +0 -1
- package/dist/components/admin/ErrorBanner.d.ts.map +0 -1
- package/dist/components/admin/FAQSection.d.ts.map +0 -1
- package/dist/components/admin/MessagingSection.d.ts.map +0 -1
- package/dist/components/admin/OverviewSection.d.ts.map +0 -1
- package/dist/components/admin/PaymentSettingsSection.d.ts.map +0 -1
- package/dist/components/admin/ProductVariationsEditor.d.ts.map +0 -1
- package/dist/components/admin/ProductsSection.d.ts.map +0 -1
- package/dist/components/admin/RefundsSection.d.ts.map +0 -1
- package/dist/components/admin/SecretArrayEditor.d.ts.map +0 -1
- package/dist/components/admin/SettingsSection.d.ts.map +0 -1
- package/dist/components/admin/SingleCategorySettings.d.ts.map +0 -1
- package/dist/components/admin/StatsBar.d.ts.map +0 -1
- package/dist/components/admin/StorefrontSection.d.ts.map +0 -1
- package/dist/components/admin/SubscriptionsSection.d.ts.map +0 -1
- package/dist/components/admin/Toggle.d.ts.map +0 -1
- package/dist/components/admin/TokenMintSelector.d.ts.map +0 -1
- package/dist/components/admin/TransactionsSection.d.ts.map +0 -1
- package/dist/components/admin/VariantInventoryGrid.d.ts.map +0 -1
- package/dist/components/admin/VariationTypeEditor.d.ts.map +0 -1
- package/dist/components/admin/configApi.d.ts.map +0 -1
- package/dist/components/admin/icons.d.ts.map +0 -1
- package/dist/components/admin/index.d.ts.map +0 -1
- package/dist/components/admin/sections-more.d.ts.map +0 -1
- package/dist/components/admin/sections.d.ts.map +0 -1
- package/dist/components/admin/types.d.ts.map +0 -1
- package/dist/components/admin/useAdminAuth.d.ts.map +0 -1
- package/dist/components/admin/useAutosave.d.ts.map +0 -1
- package/dist/components/admin/useProductVariations.d.ts.map +0 -1
- package/dist/components/subscriptionPanelStyles.d.ts.map +0 -1
- package/dist/context/CedrosContext.d.ts.map +0 -1
- package/dist/context/ThemeContext.d.ts.map +0 -1
- package/dist/context/index.d.ts.map +0 -1
- package/dist/crypto-only.d.ts.map +0 -1
- package/dist/ecommerce/__tests__/cartCheckoutRequirements.test.d.ts.map +0 -1
- package/dist/ecommerce/__tests__/cartProviderPersistence.test.d.ts.map +0 -1
- package/dist/ecommerce/__tests__/cartReducer.test.d.ts.map +0 -1
- package/dist/ecommerce/__tests__/cartServerMerge.test.d.ts.map +0 -1
- package/dist/ecommerce/__tests__/checkoutPaymentMethods.test.d.ts.map +0 -1
- package/dist/ecommerce/__tests__/checkoutReturn.test.d.ts.map +0 -1
- package/dist/ecommerce/__tests__/checkoutSchema.test.d.ts.map +0 -1
- package/dist/ecommerce/__tests__/inventoryHooks.test.d.ts.map +0 -1
- package/dist/ecommerce/__tests__/mockAdapter.test.d.ts.map +0 -1
- package/dist/ecommerce/__tests__/storage.test.d.ts.map +0 -1
- package/dist/ecommerce/adapters/CommerceAdapter.d.ts.map +0 -1
- package/dist/ecommerce/adapters/mock/mockAdapter.d.ts.map +0 -1
- package/dist/ecommerce/adapters/paywall/paywallAdapter.d.ts.map +0 -1
- package/dist/ecommerce/adapters/paywall/paywallAdapter.test.d.ts.map +0 -1
- package/dist/ecommerce/components/cart/CartLineItem.d.ts.map +0 -1
- package/dist/ecommerce/components/cart/CartPageContent.d.ts.map +0 -1
- package/dist/ecommerce/components/cart/CartPanel.d.ts.map +0 -1
- package/dist/ecommerce/components/cart/CartSidebar.d.ts.map +0 -1
- package/dist/ecommerce/components/cart/CartSummary.d.ts.map +0 -1
- package/dist/ecommerce/components/cart/PromoCodeInput.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/Breadcrumbs.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/CategoryNav.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/FilterPanel.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/Price.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/ProductCard.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/ProductGallery.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/ProductGrid.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/QuantitySelector.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/QuickViewDialog.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/SearchInput.d.ts.map +0 -1
- package/dist/ecommerce/components/catalog/VariantSelector.d.ts.map +0 -1
- package/dist/ecommerce/components/chat/ShopChatPanel.d.ts.map +0 -1
- package/dist/ecommerce/components/checkout/AddressForm.d.ts.map +0 -1
- package/dist/ecommerce/components/checkout/CheckoutCancelPage.d.ts.map +0 -1
- package/dist/ecommerce/components/checkout/CheckoutForm.d.ts.map +0 -1
- package/dist/ecommerce/components/checkout/CheckoutLayout.d.ts.map +0 -1
- package/dist/ecommerce/components/checkout/CheckoutReceipt.d.ts.map +0 -1
- package/dist/ecommerce/components/checkout/CheckoutSuccessPage.d.ts.map +0 -1
- package/dist/ecommerce/components/checkout/InventoryVerificationDialog.d.ts.map +0 -1
- package/dist/ecommerce/components/checkout/OrderReview.d.ts.map +0 -1
- package/dist/ecommerce/components/checkout/PaymentStep.d.ts.map +0 -1
- package/dist/ecommerce/components/checkout/ShippingMethodSelector.d.ts.map +0 -1
- package/dist/ecommerce/components/faq/FAQItem.d.ts.map +0 -1
- package/dist/ecommerce/components/faq/FAQItem.test.d.ts.map +0 -1
- package/dist/ecommerce/components/faq/FAQList.d.ts.map +0 -1
- package/dist/ecommerce/components/faq/index.d.ts.map +0 -1
- package/dist/ecommerce/components/general/EmptyState.d.ts.map +0 -1
- package/dist/ecommerce/components/general/ErrorBoundary.d.ts.map +0 -1
- package/dist/ecommerce/components/general/ErrorState.d.ts.map +0 -1
- package/dist/ecommerce/components/general/toast.d.ts.map +0 -1
- package/dist/ecommerce/components/orders/OrderCard.d.ts.map +0 -1
- package/dist/ecommerce/components/orders/OrderDetails.d.ts.map +0 -1
- package/dist/ecommerce/components/orders/OrderList.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/accordion.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/badge.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/button.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/card.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/dialog.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/input.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/label.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/select.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/separator.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/sheet.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/skeleton.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/tabs.d.ts.map +0 -1
- package/dist/ecommerce/components/ui/textarea.d.ts.map +0 -1
- package/dist/ecommerce/config/context.d.ts.map +0 -1
- package/dist/ecommerce/config/types.d.ts.map +0 -1
- package/dist/ecommerce/hooks/checkoutReturn.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useAIRelatedProducts.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useCartInventory.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useCatalogUrlState.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useCategories.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useCheckoutResultFromUrl.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useHoldExpiry.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useInventoryVerification.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useOrders.d.ts.map +0 -1
- package/dist/ecommerce/hooks/usePaymentMethodsConfig.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useProduct.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useProducts.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useShippingMethods.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useStorefrontSettings.d.ts.map +0 -1
- package/dist/ecommerce/hooks/useSubscriptionData.d.ts.map +0 -1
- package/dist/ecommerce/index.d.ts.map +0 -1
- package/dist/ecommerce/integrations/cedros-pay/useCedrosPayCheckoutAdapter.d.ts.map +0 -1
- package/dist/ecommerce/state/cart/CartProvider.d.ts.map +0 -1
- package/dist/ecommerce/state/cart/cartReducer.d.ts.map +0 -1
- package/dist/ecommerce/state/checkout/checkoutSchema.d.ts.map +0 -1
- package/dist/ecommerce/state/checkout/useCheckout.d.ts.map +0 -1
- package/dist/ecommerce/templates/CartTemplate.d.ts.map +0 -1
- package/dist/ecommerce/templates/CategoryTemplate.d.ts.map +0 -1
- package/dist/ecommerce/templates/CheckoutTemplate.d.ts.map +0 -1
- package/dist/ecommerce/templates/ProductTemplate.d.ts.map +0 -1
- package/dist/ecommerce/templates/PurchaseHistoryTemplate.d.ts.map +0 -1
- package/dist/ecommerce/templates/ReceiptTemplate.d.ts.map +0 -1
- package/dist/ecommerce/templates/ShopTemplate.d.ts.map +0 -1
- package/dist/ecommerce/templates/SubscriptionTemplate.d.ts.map +0 -1
- package/dist/ecommerce/testing/adapterContract.d.ts.map +0 -1
- package/dist/ecommerce/types.d.ts.map +0 -1
- package/dist/ecommerce/utils/cartCheckoutRequirements.d.ts.map +0 -1
- package/dist/ecommerce/utils/cartItemMetadata.d.ts.map +0 -1
- package/dist/ecommerce/utils/cn.d.ts.map +0 -1
- package/dist/ecommerce/utils/money.d.ts.map +0 -1
- package/dist/ecommerce/utils/storage.d.ts.map +0 -1
- package/dist/hooks/useCreditsPayment.d.ts.map +0 -1
- package/dist/hooks/useCreditsSubscription.d.ts.map +0 -1
- package/dist/hooks/useCryptoSubscription.d.ts.map +0 -1
- package/dist/hooks/usePaymentMode.d.ts.map +0 -1
- package/dist/hooks/useRefundVerification.d.ts.map +0 -1
- package/dist/hooks/useStripeCheckout.d.ts.map +0 -1
- package/dist/hooks/useSubscription.d.ts.map +0 -1
- package/dist/hooks/useSubscriptionManagement.d.ts.map +0 -1
- package/dist/hooks/useX402Payment.d.ts.map +0 -1
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/useTranslation.d.ts.map +0 -1
- package/dist/index-2N_CMVAv.js +0 -84
- package/dist/index.d.ts.map +0 -1
- package/dist/managers/CreditsManager.d.ts.map +0 -1
- package/dist/managers/ManagerCache.d.ts.map +0 -1
- package/dist/managers/RouteDiscoveryManager.d.ts +0 -75
- package/dist/managers/RouteDiscoveryManager.d.ts.map +0 -1
- package/dist/managers/StripeManager.d.ts.map +0 -1
- package/dist/managers/SubscriptionChangeManager.d.ts.map +0 -1
- package/dist/managers/SubscriptionManager.d.ts.map +0 -1
- package/dist/managers/WalletManager.d.ts.map +0 -1
- package/dist/managers/X402Manager.d.ts.map +0 -1
- package/dist/sections-D2GMJuKq.js +0 -1
- package/dist/sections-DICaHGhz.mjs +0 -10
- package/dist/stripe-only.d.ts.map +0 -1
- package/dist/telemetry.d.ts.map +0 -1
- package/dist/testing/__tests__/providers.test.d.ts.map +0 -1
- package/dist/testing/helpers.d.ts.map +0 -1
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/mocks.d.ts.map +0 -1
- package/dist/testing/providers.d.ts.map +0 -1
- package/dist/types/componentOptions.d.ts.map +0 -1
- package/dist/types/errors.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/subscription.d.ts.map +0 -1
- package/dist/utils/__tests__/couponHelpers.test.d.ts.map +0 -1
- package/dist/utils/__tests__/cspHelper.test.d.ts.map +0 -1
- package/dist/utils/__tests__/fetchWithTimeout.test.d.ts.map +0 -1
- package/dist/utils/cartHelpers.d.ts.map +0 -1
- package/dist/utils/circuitBreaker.d.ts.map +0 -1
- package/dist/utils/couponHelpers.d.ts.map +0 -1
- package/dist/utils/cspHelper.d.ts.map +0 -1
- package/dist/utils/csvHelpers.d.ts.map +0 -1
- package/dist/utils/csvHelpers.test.d.ts.map +0 -1
- package/dist/utils/dateHelpers.d.ts.map +0 -1
- package/dist/utils/deprecation.d.ts.map +0 -1
- package/dist/utils/errorHandling.d.ts.map +0 -1
- package/dist/utils/errorMessages.d.ts.map +0 -1
- package/dist/utils/errorParser.d.ts.map +0 -1
- package/dist/utils/eventEmitter.d.ts.map +0 -1
- package/dist/utils/exponentialBackoff.d.ts.map +0 -1
- package/dist/utils/fetchWithTimeout.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/modalStyles.d.ts.map +0 -1
- package/dist/utils/rateLimiter.d.ts.map +0 -1
- package/dist/utils/requestDeduplication.d.ts.map +0 -1
- package/dist/utils/securityValidation.d.ts.map +0 -1
- package/dist/utils/solanaCheck.d.ts.map +0 -1
- package/dist/utils/telemetry.d.ts.map +0 -1
- package/dist/utils/tokenMintValidator.d.ts.map +0 -1
- package/dist/utils/uuid.d.ts.map +0 -1
- package/dist/utils/validateConfig.d.ts.map +0 -1
- package/dist/utils/walletDetection.d.ts.map +0 -1
- package/dist/utils/walletPool.d.ts.map +0 -1
- /package/dist/{admin → src/admin}/index.d.ts +0 -0
- /package/dist/{admin → src/admin}/plugin.d.ts +0 -0
- /package/dist/{admin → src/admin}/types.d.ts +0 -0
- /package/dist/{components → src/components}/CedrosPay.d.ts +0 -0
- /package/dist/{components → src/components}/CreditsButton.d.ts +0 -0
- /package/dist/{components → src/components}/CreditsSubscribeButton.d.ts +0 -0
- /package/dist/{components → src/components}/CryptoButton.d.ts +0 -0
- /package/dist/{components → src/components}/CryptoSubscribeButton.d.ts +0 -0
- /package/dist/{components → src/components}/PaymentModal.d.ts +0 -0
- /package/dist/{components → src/components}/ProductPrice.d.ts +0 -0
- /package/dist/{components → src/components}/PurchaseButton.d.ts +0 -0
- /package/dist/{components → src/components}/StripeButton.d.ts +0 -0
- /package/dist/{components → src/components}/SubscribeButton.d.ts +0 -0
- /package/dist/{components → src/components}/SubscriptionManagementPanel.d.ts +0 -0
- /package/dist/{components → src/components}/admin/AISettingsSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/AdminAuthManager.d.ts +0 -0
- /package/dist/{components → src/components}/admin/AutosaveIndicator.d.ts +0 -0
- /package/dist/{components → src/components}/admin/CedrosPayAdminDashboard.d.ts +0 -0
- /package/dist/{components → src/components}/admin/ConfigEditor.d.ts +0 -0
- /package/dist/{components → src/components}/admin/CouponsSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/Dropdown.d.ts +0 -0
- /package/dist/{components → src/components}/admin/ErrorBanner.d.ts +0 -0
- /package/dist/{components → src/components}/admin/FAQSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/MessagingSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/OverviewSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/PaymentSettingsSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/ProductVariationsEditor.d.ts +0 -0
- /package/dist/{components → src/components}/admin/ProductsSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/RefundsSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/SecretArrayEditor.d.ts +0 -0
- /package/dist/{components → src/components}/admin/SettingsSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/SingleCategorySettings.d.ts +0 -0
- /package/dist/{components → src/components}/admin/StatsBar.d.ts +0 -0
- /package/dist/{components → src/components}/admin/StorefrontSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/SubscriptionsSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/Toggle.d.ts +0 -0
- /package/dist/{components → src/components}/admin/TransactionsSection.d.ts +0 -0
- /package/dist/{components → src/components}/admin/VariantInventoryGrid.d.ts +0 -0
- /package/dist/{components → src/components}/admin/VariationTypeEditor.d.ts +0 -0
- /package/dist/{components → src/components}/admin/configApi.d.ts +0 -0
- /package/dist/{components → src/components}/admin/icons.d.ts +0 -0
- /package/dist/{components → src/components}/admin/sections-more.d.ts +0 -0
- /package/dist/{components → src/components}/admin/sections.d.ts +0 -0
- /package/dist/{components → src/components}/admin/types.d.ts +0 -0
- /package/dist/{components → src/components}/admin/useAutosave.d.ts +0 -0
- /package/dist/{components → src/components}/admin/useProductVariations.d.ts +0 -0
- /package/dist/{components → src/components}/subscriptionPanelStyles.d.ts +0 -0
- /package/dist/{context → src/context}/CedrosContext.d.ts +0 -0
- /package/dist/{context → src/context}/ThemeContext.d.ts +0 -0
- /package/dist/{context → src/context}/index.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/__tests__/cartCheckoutRequirements.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/__tests__/cartProviderPersistence.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/__tests__/cartReducer.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/__tests__/cartServerMerge.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/__tests__/checkoutPaymentMethods.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/__tests__/checkoutReturn.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/__tests__/checkoutSchema.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/__tests__/inventoryHooks.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/__tests__/mockAdapter.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/__tests__/storage.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/adapters/CommerceAdapter.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/adapters/mock/mockAdapter.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/adapters/paywall/paywallAdapter.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/adapters/paywall/paywallAdapter.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/cart/CartLineItem.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/cart/CartPageContent.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/cart/CartPanel.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/cart/CartSidebar.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/cart/CartSummary.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/cart/PromoCodeInput.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/Breadcrumbs.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/CategoryNav.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/FilterPanel.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/Price.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/ProductCard.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/ProductGallery.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/ProductGrid.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/QuantitySelector.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/QuickViewDialog.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/SearchInput.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/catalog/VariantSelector.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/chat/ShopChatPanel.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/checkout/AddressForm.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/checkout/CheckoutCancelPage.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/checkout/CheckoutForm.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/checkout/CheckoutLayout.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/checkout/CheckoutReceipt.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/checkout/CheckoutSuccessPage.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/checkout/InventoryVerificationDialog.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/checkout/OrderReview.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/checkout/PaymentStep.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/checkout/ShippingMethodSelector.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/faq/FAQItem.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/faq/FAQItem.test.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/faq/FAQList.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/faq/index.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/general/EmptyState.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/general/ErrorBoundary.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/general/ErrorState.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/general/toast.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/orders/OrderCard.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/orders/OrderDetails.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/orders/OrderList.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/accordion.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/badge.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/button.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/card.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/dialog.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/input.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/label.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/select.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/separator.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/sheet.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/skeleton.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/tabs.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/components/ui/textarea.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/config/context.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/config/types.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/checkoutReturn.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useAIRelatedProducts.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useCartInventory.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useCatalogUrlState.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useCategories.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useCheckoutResultFromUrl.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useHoldExpiry.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useInventoryVerification.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useOrders.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/usePaymentMethodsConfig.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useProduct.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useProducts.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useShippingMethods.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useStorefrontSettings.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/hooks/useSubscriptionData.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/index.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/integrations/cedros-pay/useCedrosPayCheckoutAdapter.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/state/cart/CartProvider.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/state/cart/cartReducer.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/state/checkout/checkoutSchema.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/state/checkout/useCheckout.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/templates/CartTemplate.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/templates/CategoryTemplate.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/templates/CheckoutTemplate.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/templates/ProductTemplate.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/templates/PurchaseHistoryTemplate.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/templates/ReceiptTemplate.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/templates/ShopTemplate.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/templates/SubscriptionTemplate.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/testing/adapterContract.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/types.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/utils/cartCheckoutRequirements.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/utils/cartItemMetadata.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/utils/cn.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/utils/money.d.ts +0 -0
- /package/dist/{ecommerce → src/ecommerce}/utils/storage.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useCreditsPayment.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useCreditsSubscription.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useCryptoSubscription.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/usePaymentMode.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useRefundVerification.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useStripeCheckout.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useSubscription.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useSubscriptionManagement.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useX402Payment.d.ts +0 -0
- /package/dist/{i18n → src/i18n}/index.d.ts +0 -0
- /package/dist/{i18n → src/i18n}/useTranslation.d.ts +0 -0
- /package/dist/{managers → src/managers}/CreditsManager.d.ts +0 -0
- /package/dist/{managers → src/managers}/ManagerCache.d.ts +0 -0
- /package/dist/{managers → src/managers}/StripeManager.d.ts +0 -0
- /package/dist/{managers → src/managers}/SubscriptionChangeManager.d.ts +0 -0
- /package/dist/{managers → src/managers}/SubscriptionManager.d.ts +0 -0
- /package/dist/{managers → src/managers}/WalletManager.d.ts +0 -0
- /package/dist/{managers → src/managers}/X402Manager.d.ts +0 -0
- /package/dist/{testing → src/testing}/__tests__/providers.test.d.ts +0 -0
- /package/dist/{testing → src/testing}/helpers.d.ts +0 -0
- /package/dist/{testing → src/testing}/mocks.d.ts +0 -0
- /package/dist/{testing → src/testing}/providers.d.ts +0 -0
- /package/dist/{types → src/types}/componentOptions.d.ts +0 -0
- /package/dist/{types → src/types}/errors.d.ts +0 -0
- /package/dist/{types → src/types}/index.d.ts +0 -0
- /package/dist/{types → src/types}/subscription.d.ts +0 -0
- /package/dist/{utils → src/utils}/__tests__/couponHelpers.test.d.ts +0 -0
- /package/dist/{utils → src/utils}/__tests__/cspHelper.test.d.ts +0 -0
- /package/dist/{utils → src/utils}/__tests__/fetchWithTimeout.test.d.ts +0 -0
- /package/dist/{utils → src/utils}/cartHelpers.d.ts +0 -0
- /package/dist/{utils → src/utils}/circuitBreaker.d.ts +0 -0
- /package/dist/{utils → src/utils}/couponHelpers.d.ts +0 -0
- /package/dist/{utils → src/utils}/cspHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/csvHelpers.d.ts +0 -0
- /package/dist/{utils → src/utils}/csvHelpers.test.d.ts +0 -0
- /package/dist/{utils → src/utils}/dateHelpers.d.ts +0 -0
- /package/dist/{utils → src/utils}/deprecation.d.ts +0 -0
- /package/dist/{utils → src/utils}/errorHandling.d.ts +0 -0
- /package/dist/{utils → src/utils}/errorMessages.d.ts +0 -0
- /package/dist/{utils → src/utils}/errorParser.d.ts +0 -0
- /package/dist/{utils → src/utils}/eventEmitter.d.ts +0 -0
- /package/dist/{utils → src/utils}/exponentialBackoff.d.ts +0 -0
- /package/dist/{utils → src/utils}/fetchWithTimeout.d.ts +0 -0
- /package/dist/{utils → src/utils}/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/logger.d.ts +0 -0
- /package/dist/{utils → src/utils}/modalStyles.d.ts +0 -0
- /package/dist/{utils → src/utils}/rateLimiter.d.ts +0 -0
- /package/dist/{utils → src/utils}/requestDeduplication.d.ts +0 -0
- /package/dist/{utils → src/utils}/securityValidation.d.ts +0 -0
- /package/dist/{utils → src/utils}/solanaCheck.d.ts +0 -0
- /package/dist/{utils → src/utils}/telemetry.d.ts +0 -0
- /package/dist/{utils → src/utils}/tokenMintValidator.d.ts +0 -0
- /package/dist/{utils → src/utils}/uuid.d.ts +0 -0
- /package/dist/{utils → src/utils}/validateConfig.d.ts +0 -0
- /package/dist/{utils → src/utils}/walletDetection.d.ts +0 -0
- /package/dist/{utils → src/utils}/walletPool.d.ts +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),m=require("react"),w=require("./index-B5ck27xb.js"),J=require("./useAutosave-B2p6iwh8.js"),$=require("./AutosaveIndicator-CpTVtJIz.js"),P=require("./CedrosContext-D-lnoEkR.js");class G{constructor(i,a,n){this._serverUrl=i,this.auth=a,this.authManager=n}get serverUrl(){return this._serverUrl}async fetch(i,a={}){if(this.authManager?.isAuthenticated())return this.authManager.fetchWithAuth(i,a);throw this.auth?new Error("Legacy AdminAuth is no longer supported due to replay vulnerability. Use IAdminAuthManager instead."):new Error("Admin authentication required. Provide an IAdminAuthManager to ConfigApi.")}async listCategories(i=100){return this.fetch(`/admin/config?limit=${i}`)}async getConfig(i,a=!0){return this.fetch(`/admin/config/${i}?redact_secrets=${a}`)}async updateConfig(i,a,n){await this.fetch(`/admin/config/${i}`,{method:"PUT",body:JSON.stringify({config:a,description:n})})}async patchConfig(i,a,n){await this.fetch(`/admin/config/${i}`,{method:"PATCH",body:JSON.stringify({updates:a,description:n})})}async batchUpdate(i){await this.fetch("/admin/config/batch",{method:"POST",body:JSON.stringify({updates:i})})}async validateConfig(i,a){return this.fetch("/admin/config/validate",{method:"POST",body:JSON.stringify({category:i,config:a})})}async getHistory(i,a=50){const n=new URLSearchParams({limit:a.toString()});return i&&n.set("category",i),this.fetch(`/admin/config/history?${n}`)}}const O={server:{label:"Server",secrets:[],icon:"🖥️",fields:{admin_metrics_api_key:{hidden:!0},cors_allowed_origins:{hidden:!0}}},security:{label:"Security",description:"Configure CORS, rate limiting, and other security settings",secrets:[],icon:"🔒",fields:{cors_allowed_origins:{description:'List of allowed origins for CORS requests. Use ["*"] to allow all origins (not recommended for production).'}}},metrics:{label:"Metrics",description:"Configure metrics collection and API access",secrets:["admin_metrics_api_key"],icon:"📊",fields:{admin_metrics_api_key:{description:"API key for accessing the admin metrics endpoint. Keep this secret."}}},logging:{label:"Logging",secrets:[],icon:"📝",fields:{level:{type:"dropdown",options:["trace","debug","info","warn","error"]},format:{hidden:!0},environment:{hidden:!0}}},stripe:{label:"Stripe",secrets:["secret_key","webhook_secret"],icon:"💳",fields:{enabled:{hidden:!0},secret_key:{description:"Stripe Dashboard → Developers → API keys → Secret key. Use the test key (sk_test_...) for testing, or the live key (sk_live_...) for production."},publishable_key:{description:"Stripe Dashboard → Developers → API keys → Publishable key. Starts with pk_test_... or pk_live_..."},mode:{type:"dropdown",options:["test","live"],description:'Use "test" mode with test API keys during development, then switch to "live" with live keys for real payments.'},webhook_url:{description:"The full URL Stripe sends webhook events to. Default is your server URL + /webhook/stripe (e.g. https://example.com/webhook/stripe). Only change this if you've customized the route in your cedros-pay server."},webhook_secret:{description:`Stripe Dashboard → Developers → Webhooks → "Create an event destination" → select events: checkout.session.completed, customer.subscription.created, customer.subscription.updated, customer.subscription.deleted, invoice.paid, invoice.payment_failed → Continue → choose "Webhook endpoint" → enter your server's webhook endpoint, e.g. https://example.com/webhook/stripe (your server URL + /webhook/stripe) → after creating, click the endpoint and "Click to reveal" the signing secret. Starts with whsec_...`},tax_rate_id:{description:`Stripe Dashboard → More → Product catalog → Tax rates → "+ New" → set the percentage, region, and whether tax is inclusive or exclusive → Save → copy the tax rate ID from the detail page (starts with txr_...). Leave empty if you don't collect tax.`},success_url:{hidden:!0},cancel_url:{hidden:!0}}},x402:{label:"X402 (Crypto)",secrets:["server_wallets"],icon:"⚡",fields:{enabled:{hidden:!0},payment_address:{type:"solana_address",description:"The Solana wallet address where payments are received. This is where customer funds are sent."},token_mint:{type:"token_mint",description:"The SPL token used for payments. Most commonly USDC."},token_decimals:{type:"number",description:"Number of decimal places for the token (e.g., USDC has 6 decimals).",hidden:!0},custom_token_symbol:{description:'Display symbol for your custom token (e.g., "MYTOKEN").',hidden:!0},custom_token_icon:{description:"URL to your token's icon image.",hidden:!0},rpc_url:{description:"Custom Solana RPC endpoint. Leave empty to use the default public RPC."},gasless_enabled:{type:"toggle",description:"When enabled, your server pays transaction fees so customers don't need SOL."},server_wallets:{type:"secret_array",description:"Server keypair(s) used to sign and pay for transactions. Required for gasless payments.",showWhen:"gasless_enabled"},rounding_mode:{type:"dropdown",options:["nearest","up","down"],description:"How to round fractional token amounts: nearest (default), up (always round up), or down (always round down)."},network:{hidden:!0},ws_url:{hidden:!0},skip_preflight:{hidden:!0},commitment:{hidden:!0},compute_unit_limit:{hidden:!0},compute_unit_price:{hidden:!0}}},paywall:{label:"Paywall",secrets:[],icon:"🚪",fields:{product_cache_ttl:{type:"number",unit:"seconds"}}},coupons:{label:"Coupons",secrets:[],icon:"🎟️",fields:{cache_ttl:{type:"number",unit:"seconds"}}},subscriptions:{label:"Subscriptions",secrets:[],icon:"🔄",fields:{grace_period_hours:{type:"number",unit:"hours"}}},callbacks:{label:"Callbacks",secrets:["hmac_secret"],icon:"🔔"},email:{label:"Email",description:"Email receipts for customers after purchase",secrets:["smtp_password"],icon:"📧",fields:{enabled:{hidden:!0},provider:{type:"dropdown",options:["sendgrid","mailgun","postmark","ses","resend","custom"],description:"Email service provider."},smtp_host:{description:"SMTP server hostname.",showWhen:"provider"},smtp_port:{type:"number",description:"SMTP server port (typically 587 for TLS).",showWhen:"provider"},smtp_user:{description:"SMTP authentication username or API key name.",showWhen:"provider"},smtp_password:{description:"SMTP password or API key.",showWhen:"provider"},from_address:{description:"Sender email address (e.g., orders@yourstore.com)."},from_name:{description:'Sender display name (e.g., "Your Store").'}}},webhook:{label:"Webhook",description:"HTTP notifications when purchases occur",secrets:["secret"],icon:"🔔",fields:{enabled:{hidden:!0},url:{description:"URL to receive POST notifications (e.g., https://api.yoursite.com/webhooks/orders)."},secret:{description:"Shared secret for HMAC-SHA256 signature verification."},retry_attempts:{type:"number",description:"Number of retry attempts on failure (default: 3)."}}},messaging:{label:"Messaging",description:"Email and webhook notifications for purchases",secrets:["smtp_password","webhook_secret"],icon:"📬",fields:{email_enabled:{type:"boolean",description:"Send order confirmation emails to customers."},smtp_host:{description:"SMTP server hostname.",showWhen:"email_enabled"},smtp_port:{type:"number",description:"SMTP server port (typically 587 for TLS).",showWhen:"email_enabled"},smtp_username:{description:"SMTP authentication username or API key.",showWhen:"email_enabled"},smtp_password:{description:"SMTP password or API key.",showWhen:"email_enabled"},from_email:{description:"Sender email address (e.g., orders@yourstore.com).",showWhen:"email_enabled"},from_name:{description:'Sender display name (e.g., "Your Store").',showWhen:"email_enabled"},webhook_enabled:{type:"boolean",description:"Send webhook notifications when purchases complete."},webhook_url:{description:"URL to receive POST notifications.",showWhen:"webhook_enabled"},webhook_secret:{description:"Shared secret for HMAC-SHA256 signature verification.",showWhen:"webhook_enabled"},webhook_timeout:{type:"number",description:"Request timeout in seconds (default: 30).",showWhen:"webhook_enabled"}}},monitoring:{label:"Monitoring",secrets:[],icon:"📊",fields:{check_interval:{type:"number",unit:"seconds"},low_balance_threshold:{type:"number",unit:"SOL"}}},rate_limit:{label:"Rate Limiting",secrets:[],icon:"⏱️"},circuit_breaker:{label:"Circuit Breaker",secrets:[],icon:"🔌"},admin:{label:"Admin Keys",secrets:[],icon:"👤"},api_keys:{label:"API Keys",secrets:[],icon:"🔐"},cedros_login:{label:"Cedros Login",secrets:["api_key"],icon:"🔑",fields:{enabled:{hidden:!0},credits_enabled:{hidden:!0},base_url:{hidden:!0},timeout:{hidden:!0},jwt_issuer:{hidden:!0},jwt_audience:{hidden:!0}}},shop:{label:"Storefront",description:"Product pages & display settings",secrets:[],icon:"🏪",fields:{enabled:{hidden:!0},"relatedProducts.mode":{type:"dropdown",options:["most_recent","by_category","manual","ai"]},"relatedProducts.maxItems":{type:"number"}}}};function F(b,i){return O[b]?.secrets.includes(i)??!1}const D="[REDACTED]",Y=/^[1-9A-HJ-NP-Za-km-z]{32,44}$/;function W(b){return!b||b.trim()===""?{valid:!0}:Y.test(b.trim())?{valid:!0}:{valid:!1,error:"Invalid Solana address"}}function X({label:b,value:i,onChange:a,decimals:n,onDecimalsChange:S,disabled:d=!1,description:c,customSymbol:l="",customIcon:h="",onCustomSymbolChange:u,onCustomIconChange:y}){const[x,N]=m.useState(!1),f=Object.entries(P.STABLECOIN_METADATA),_=!!P.STABLECOIN_METADATA[i],k=x||!!i&&!_,j=t=>{if(t==="custom")N(!0),_&&a("");else{N(!1),a(t);const s=P.STABLECOIN_METADATA[t];s&&S&&S(s.decimals),u&&u(""),y&&y("")}};return e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:b}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:[e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem"},children:[f.map(([t,s])=>e.jsxs("button",{type:"button",onClick:()=>j(t),disabled:d,style:{display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.5rem 0.75rem",border:i===t?"2px solid var(--cedros-admin-primary, #171717)":"1px solid var(--cedros-admin-border, #d4d4d4)",borderRadius:"0.5rem",background:i===t?"var(--cedros-admin-primary-bg, #f5f5f5)":"var(--cedros-admin-bg, #fff)",cursor:d?"not-allowed":"pointer",opacity:d?.5:1,fontWeight:i===t?600:400},children:[e.jsx("img",{src:s.icon,alt:s.symbol,style:{width:20,height:20,borderRadius:"50%"},onError:r=>{r.target.style.display="none"}}),e.jsx("span",{children:s.symbol})]},t)),e.jsxs("button",{type:"button",onClick:()=>j("custom"),disabled:d,style:{display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.5rem 0.75rem",border:k?"2px solid var(--cedros-admin-primary, #171717)":"1px solid var(--cedros-admin-border, #d4d4d4)",borderRadius:"0.5rem",background:k?"var(--cedros-admin-primary-bg, #f5f5f5)":"var(--cedros-admin-bg, #fff)",cursor:d?"not-allowed":"pointer",opacity:d?.5:1,fontWeight:k?600:400},children:[e.jsx("span",{style:{fontSize:"1rem"},children:"+"}),e.jsx("span",{children:"Custom"})]})]}),k&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem",padding:"1rem",background:"var(--cedros-admin-bg-muted, #f9fafb)",borderRadius:"0.5rem",border:"1px solid var(--cedros-admin-border, #e5e7eb)"},children:[e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontSize:"0.75rem",fontWeight:500,marginBottom:"0.25rem",color:"var(--cedros-admin-text-muted, #64748b)"},children:"Token Mint Address"}),(()=>{const t=W(i);return e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"text",className:`cedros-admin__input ${t.valid?"":"cedros-admin__input--error"}`,value:i,onChange:s=>a(s.target.value),placeholder:"e.g., EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",disabled:d,style:{fontFamily:"monospace",fontSize:"0.875rem",borderColor:t.valid?void 0:"var(--cedros-admin-error, #dc2626)"}}),!t.valid&&e.jsx("span",{style:{color:"var(--cedros-admin-error, #dc2626)",fontSize:"0.75rem",marginTop:"0.25rem",display:"block"},children:t.error})]})})()]}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontSize:"0.75rem",fontWeight:500,marginBottom:"0.25rem",color:"var(--cedros-admin-text-muted, #64748b)"},children:"Token Symbol"}),e.jsx("input",{type:"text",className:"cedros-admin__input",value:l,onChange:t=>u?.(t.target.value),placeholder:"e.g., MYTOKEN",disabled:d,style:{textTransform:"uppercase"}})]}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontSize:"0.75rem",fontWeight:500,marginBottom:"0.25rem",color:"var(--cedros-admin-text-muted, #64748b)"},children:"Token Icon URL"}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem",alignItems:"center"},children:[e.jsx("input",{type:"text",className:"cedros-admin__input",value:h,onChange:t=>y?.(t.target.value),placeholder:"https://example.com/token-logo.png",disabled:d,style:{flex:1}}),h&&e.jsx("img",{src:h,alt:"Token icon preview",style:{width:32,height:32,borderRadius:"50%",border:"1px solid var(--cedros-admin-border, #e5e7eb)",objectFit:"cover"},onError:t=>{t.target.style.display="none"}})]}),e.jsx("div",{style:{fontSize:"0.7rem",color:"var(--cedros-admin-text-muted, #94a3b8)",marginTop:"0.25rem"},children:"Shown to customers during checkout"})]}),e.jsxs("div",{children:[e.jsx("label",{style:{display:"block",fontSize:"0.75rem",fontWeight:500,marginBottom:"0.25rem",color:"var(--cedros-admin-text-muted, #64748b)"},children:"Token Decimals"}),e.jsx("input",{type:"number",className:"cedros-admin__input",value:n??6,onChange:t=>S?.(parseInt(t.target.value,10)||0),min:0,max:18,disabled:d,style:{width:"100px"}}),e.jsx("div",{style:{fontSize:"0.7rem",color:"var(--cedros-admin-text-muted, #94a3b8)",marginTop:"0.25rem"},children:"Most SPL tokens use 6 decimals (like USDC)"})]})]}),i&&_&&e.jsx("div",{style:{fontSize:"0.75rem",color:"var(--cedros-admin-text-muted, #64748b)",fontFamily:"monospace",wordBreak:"break-all"},children:i}),c&&e.jsx("div",{style:{fontSize:"0.75rem",color:"var(--cedros-admin-text-muted, #64748b)",marginTop:"0.25rem"},children:c})]})]})}function Z({label:b,value:i,onChange:a,disabled:n=!1,description:S}){const[d,c]=m.useState(new Set),[l,h]=m.useState(null),[u,y]=m.useState(""),x=Array.isArray(i)?i:[],N=t=>{c(s=>{const r=new Set(s);return r.has(t)?r.delete(t):r.add(t),r})},f=()=>{a([...x,""]),h(x.length),y("")},E=(t,s)=>{const r=[...x];r[t]=s,a(r)},_=t=>{const s=x.filter((r,g)=>g!==t);a(s),c(r=>{const g=new Set;return r.forEach(v=>{v<t?g.add(v):v>t&&g.add(v-1)}),g})},T=t=>{h(t),y(x[t]||"")},k=()=>{l!==null&&(E(l,u),h(null),y(""))},j=()=>{l!==null&&x[l]===""&&_(l),h(null),y("")};return e.jsxs("div",{className:"cedros-admin__field",children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.5rem"},children:[e.jsx("label",{className:"cedros-admin__field-label",style:{marginBottom:0},children:b}),e.jsxs("button",{type:"button",onClick:f,disabled:n,style:{display:"flex",alignItems:"center",gap:"0.25rem",padding:"0.25rem 0.5rem",fontSize:"0.75rem",border:"1px solid var(--cedros-admin-border, #d4d4d4)",borderRadius:"0.375rem",background:"var(--cedros-admin-bg, #fff)",cursor:n?"not-allowed":"pointer",opacity:n?.5:1},children:[w.Icons.plus,"Add"]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:[x.length===0&&e.jsx("div",{style:{padding:"1rem",textAlign:"center",color:"var(--cedros-admin-text-muted, #64748b)",fontSize:"0.875rem",border:"1px dashed var(--cedros-admin-border, #d4d4d4)",borderRadius:"0.5rem"},children:'No items. Click "Add" to create one.'}),x.map((t,s)=>{const r=d.has(s),g=l===s,v=t===D;return e.jsx("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.5rem",background:"var(--cedros-admin-bg-muted, #f9fafb)",borderRadius:"0.375rem",border:"1px solid var(--cedros-admin-border, #e5e7eb)"},children:g?e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"text",className:"cedros-admin__input",value:u,onChange:o=>y(o.target.value),placeholder:"Enter wallet keypair...",autoFocus:!0,style:{flex:1,fontFamily:"monospace",fontSize:"0.75rem"},onKeyDown:o=>{o.key==="Enter"&&k(),o.key==="Escape"&&j()}}),e.jsx("button",{type:"button",onClick:k,style:{padding:"0.375rem",border:"none",background:"var(--cedros-admin-success, #22c55e)",color:"#fff",borderRadius:"0.25rem",cursor:"pointer"},title:"Save",children:w.Icons.check}),e.jsx("button",{type:"button",onClick:j,style:{padding:"0.375rem",border:"none",background:"var(--cedros-admin-text-muted, #64748b)",color:"#fff",borderRadius:"0.25rem",cursor:"pointer"},title:"Cancel",children:w.Icons.close})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{flex:1,fontFamily:"monospace",fontSize:"0.75rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r&&!v?t:v?"[REDACTED]":"••••••••••••••••••••"}),e.jsx("button",{type:"button",onClick:()=>N(s),disabled:n||v,style:{padding:"0.375rem",border:"none",background:"transparent",cursor:n||v?"not-allowed":"pointer",opacity:n||v?.5:1,color:"var(--cedros-admin-text-muted, #64748b)"},title:r?"Hide":"Show",children:r?w.Icons.eyeOff:w.Icons.eye}),e.jsx("button",{type:"button",onClick:()=>T(s),disabled:n,style:{padding:"0.375rem",border:"none",background:"transparent",cursor:n?"not-allowed":"pointer",opacity:n?.5:1,color:"var(--cedros-admin-text-muted, #64748b)"},title:"Edit",children:w.Icons.settings}),e.jsx("button",{type:"button",onClick:()=>_(s),disabled:n,style:{padding:"0.375rem",border:"none",background:"transparent",cursor:n?"not-allowed":"pointer",opacity:n?.5:1,color:"var(--cedros-admin-error, #ef4444)"},title:"Delete",children:w.Icons.trash})]})},s)})]}),S&&e.jsx("div",{style:{fontSize:"0.75rem",color:"var(--cedros-admin-text-muted, #64748b)",marginTop:"0.5rem"},children:S})]})}function L(b,i,a){const n=F(b,i),S=i.replace(/_/g," ").replace(/\b\w/g,h=>h.toUpperCase()),c=O[b]?.fields?.[i],l={isSecret:n,label:S,description:c?.description,hidden:c?.hidden,showWhen:c?.showWhen};return c?.type==="dropdown"&&c.options?{...l,type:"dropdown",options:c.options}:c?.type==="token_mint"?{...l,type:"token_mint"}:c?.type==="toggle"?{...l,type:"toggle"}:c?.type==="secret_array"?{...l,type:"secret_array",isSecret:!0}:c?.type==="solana_address"?{...l,type:"solana_address"}:c?.type==="number"?{...l,type:"number",unit:c.unit}:typeof a=="boolean"?{...l,type:"boolean"}:typeof a=="number"?{...l,type:"number",unit:c?.unit}:Array.isArray(a)?{...l,type:"array"}:typeof a=="object"&&a!==null?{...l,type:"object"}:{...l,type:"string"}}function Q({category:b,config:i,originalConfig:a,isLoading:n=!1,onSave:S}){const[d,c]=m.useState(i),[l,h]=m.useState(new Set);m.useEffect(()=>{c(i)},[i]);const u=m.useMemo(()=>{const t={...d};for(const s of Object.keys(t))if(F(b,s)){const r=a[s],g=t[s];(g===D||g===r)&&(t[s]=D)}return t},[d,a,b]),y=m.useMemo(()=>{const t=d.token_mint;return typeof t!="string"||!t?!1:!W(t).valid},[d]),{status:x,error:N}=J.useAutosave({data:u,onSave:S,debounceMs:1500,enabled:!y}),f=m.useCallback((t,s)=>{c(r=>({...r,[t]:s}))},[]),E=m.useCallback(t=>{h(s=>{const r=new Set(s);return r.has(t)?r.delete(t):r.add(t),r})},[]),_=t=>t?e.jsx("div",{style:{fontSize:"0.75rem",color:"var(--cedros-admin-text-muted, #64748b)",marginTop:"0.25rem"},children:t}):null,T=(t,s)=>{const r=L(b,t,a[t]??s);if(r.type==="dropdown"&&r.options)return e.jsx(w.FormDropdown,{value:s,onChange:o=>f(t,o),options:r.options.map(o=>({value:o,label:o})),label:r.label,description:r.description,disabled:n});if(r.type==="token_mint")return e.jsx(X,{label:r.label,value:s,onChange:o=>f(t,o),decimals:d.token_decimals??6,onDecimalsChange:o=>f("token_decimals",o),disabled:n,description:r.description,customSymbol:d.custom_token_symbol||"",customIcon:d.custom_token_icon||"",onCustomSymbolChange:o=>f("custom_token_symbol",o),onCustomIconChange:o=>f("custom_token_icon",o)});if(r.type==="toggle")return e.jsxs("div",{className:"cedros-admin__field",children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[e.jsx("button",{type:"button",role:"switch","aria-checked":s,onClick:()=>f(t,!s),disabled:n,style:{width:44,height:24,borderRadius:12,border:"none",backgroundColor:s?"var(--cedros-admin-primary, #171717)":"var(--cedros-admin-border, #d4d4d4)",cursor:n?"not-allowed":"pointer",position:"relative",transition:"background-color 0.2s",opacity:n?.5:1,flexShrink:0},children:e.jsx("span",{style:{position:"absolute",top:2,left:s?22:2,width:20,height:20,borderRadius:"50%",backgroundColor:"#fff",transition:"left 0.2s",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}})}),e.jsx("span",{className:"cedros-admin__field-label",style:{marginBottom:0},children:r.label})]}),_(r.description)]});if(r.type==="solana_address"){const o=s||"",C=W(o);return e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:r.label}),e.jsxs("div",{style:{position:"relative"},children:[e.jsx("input",{type:"text",className:`cedros-admin__input ${C.valid?"":"cedros-admin__input--error"}`,value:o,onChange:R=>f(t,R.target.value),disabled:n,placeholder:"e.g. 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",style:{width:"100%",fontFamily:"monospace",fontSize:"0.875rem",borderColor:C.valid?void 0:"var(--cedros-admin-error, #dc2626)",paddingRight:o&&C.valid?"2rem":void 0}}),o&&C.valid&&e.jsx("span",{style:{position:"absolute",right:10,top:"50%",transform:"translateY(-50%)",color:"var(--cedros-admin-success, #16a34a)",fontSize:"1rem"},title:"Valid Solana address",children:"✓"})]}),!C.valid&&e.jsx("span",{style:{color:"var(--cedros-admin-error, #dc2626)",fontSize:"0.75rem",marginTop:"0.25rem",display:"block"},children:C.error}),_(r.description)]})}if(r.type==="boolean")return e.jsxs("div",{className:"cedros-admin__field",children:[e.jsxs("label",{className:"cedros-admin__checkbox",children:[e.jsx("input",{type:"checkbox",checked:s,onChange:o=>f(t,o.target.checked),disabled:n}),r.label]}),_(r.description)]});if(r.type==="number")return e.jsxs("div",{className:"cedros-admin__field",children:[e.jsxs("label",{className:"cedros-admin__field-label",children:[r.label,r.unit&&e.jsxs("span",{className:"cedros-admin__field-unit",children:[" (",r.unit,")"]})]}),e.jsx("input",{type:"number",className:"cedros-admin__input",value:s,onChange:o=>f(t,parseFloat(o.target.value)||0),disabled:n}),_(r.description)]});if(r.type==="secret_array")return e.jsx(Z,{label:r.label,value:s,onChange:o=>f(t,o),disabled:n,description:r.description});if(r.type==="array"){const o=s;return e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:r.label}),e.jsx("textarea",{className:"cedros-admin__textarea",value:o.join(`
|
|
2
|
+
`),onChange:C=>f(t,C.target.value.split(`
|
|
3
|
+
`).filter(Boolean)),placeholder:"One item per line",rows:3,disabled:n}),_(r.description)]})}if(r.type==="object")return e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:r.label}),e.jsx("textarea",{className:"cedros-admin__textarea cedros-admin__textarea--mono",value:JSON.stringify(s,null,2),onChange:o=>{try{f(t,JSON.parse(o.target.value))}catch{}},rows:5,disabled:n}),_(r.description)]});const g=l.has(t),v=r.isSecret&&!g&&s===D?D:s;return e.jsxs("div",{className:"cedros-admin__field",children:[e.jsxs("label",{className:"cedros-admin__field-label",children:[r.label,r.isSecret&&e.jsx("span",{className:"cedros-admin__field-secret",children:" (secret)"})]}),e.jsxs("div",{className:"cedros-admin__input-group",children:[e.jsx("input",{type:r.isSecret&&!g?"password":"text",className:"cedros-admin__input",value:v,onChange:o=>f(t,o.target.value),disabled:n,placeholder:r.isSecret?"••••••••":""}),r.isSecret&&e.jsx("button",{type:"button",className:"cedros-admin__button cedros-admin__button--ghost",onClick:()=>E(t),style:{padding:"0.5rem",minWidth:"auto"},title:g?"Hide":"Show",children:g?w.Icons.eyeOff:w.Icons.eye})]}),_(r.description)]})},k=Object.keys(d),j=t=>{const s=L(b,t,a[t]??d[t]);if(s.hidden||s.showWhen&&!d[s.showWhen])return!1;if(t==="token_decimals"){const r=d.token_mint;if(r&&P.STABLECOIN_METADATA[r])return!1}return!0};return e.jsxs("div",{className:"cedros-admin__config-editor",children:[e.jsx("div",{className:"cedros-admin__config-fields",children:k.filter(j).map(t=>e.jsx("div",{className:"cedros-admin__config-field",children:T(t,d[t])},t))}),e.jsx("div",{className:"cedros-admin__config-actions",children:e.jsx("div",{className:"cedros-admin__autosave-status",children:e.jsx($.AutosaveIndicator,{status:x,error:N})})})]})}function ee({serverUrl:b,apiKey:i,authManager:a,category:n,title:S,description:d,enabledField:c="enabled",showEnabledToggle:l=!1}){const h=m.useMemo(()=>new G(b,void 0,a),[b,a]),[u,y]=m.useState(null),[x,N]=m.useState([]),[f,E]=m.useState(!1),[_,T]=m.useState(!0),[k,j]=m.useState(null),[t,s]=m.useState(null),[r,g]=m.useState(!1),v=O[n]||{label:n,icon:"⚙️"},o=S||v.label,C=d||v.description,R=m.useCallback(async()=>{T(!0),j(null);try{const p=await h.getConfig(n,!0);y(p)}catch{y(null),j("Failed to load settings")}finally{T(!1)}},[h,n]);m.useEffect(()=>{R()},[R]);const z=m.useCallback(async()=>{try{const p=await h.getHistory(n,20);N(p.history)}catch{N([])}},[h,n]);m.useEffect(()=>{f&&z()},[f,z]);const q=m.useCallback(async p=>{await h.updateConfig(n,p,"Updated via admin dashboard")},[h,n]),B=m.useCallback(async p=>h.validateConfig(n,p),[h,n]),[M,U]=m.useState(!1),K=m.useCallback(async()=>{if(!u||M)return;const p=!!u.config[c],I=!p,V={...u.config,[c]:I};U(!0),y({...u,config:V});try{await h.updateConfig(n,V,`${I?"Enabled":"Disabled"} via admin dashboard`)}catch(H){y({...u,config:{...u.config,[c]:p}}),j(H instanceof Error?H.message:"Failed to save enabled state")}finally{U(!1)}},[u,h,n,c,M]),A=!!u?.config[c];return _&&!u?e.jsx("div",{className:"cedros-admin__section",children:e.jsxs("div",{className:"cedros-admin__loading",children:[w.Icons.loading," Loading ",o," settings..."]})}):e.jsxs("div",{className:"cedros-admin__section",children:[e.jsx(w.ErrorBanner,{message:k,onRetry:R}),e.jsxs("div",{className:"cedros-admin__section-header",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"cedros-admin__section-title",children:[e.jsx("span",{style:{marginRight:"0.5rem"},children:v.icon}),o]}),C&&e.jsx("p",{className:"cedros-admin__text-muted",style:{marginTop:"0.25rem"},children:C})]}),l&&u&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem"},children:[e.jsx("span",{style:{fontSize:"0.875rem",color:A?"var(--cedros-admin-text, #171717)":"var(--cedros-admin-muted, #737373)"},children:A?"Enabled":"Disabled"}),e.jsx("button",{type:"button",role:"switch","aria-checked":A,onClick:K,disabled:M,style:{width:44,height:24,borderRadius:12,border:"none",backgroundColor:A?"var(--cedros-admin-primary, #171717)":"var(--cedros-admin-border, #d4d4d4)",cursor:M?"wait":"pointer",position:"relative",transition:"background-color 0.2s",flexShrink:0,opacity:M?.6:1},children:e.jsx("span",{style:{position:"absolute",top:2,left:A?22:2,width:20,height:20,borderRadius:"50%",backgroundColor:"#fff",transition:"left 0.2s",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}})})]})]}),u&&e.jsxs("div",{className:"cedros-admin__settings-editor",style:{marginTop:"1rem",opacity:l&&!A?.6:1,pointerEvents:l&&!A?"none":"auto"},children:[l&&!A&&e.jsx("div",{style:{padding:"0.75rem 1rem",marginBottom:"1rem",backgroundColor:"var(--cedros-admin-warning-bg, #fef3c7)",border:"1px solid var(--cedros-admin-warning-border, #f59e0b)",borderRadius:"0.375rem",fontSize:"0.875rem",color:"var(--cedros-admin-warning-text, #92400e)",pointerEvents:"auto"},children:"This payment method is disabled. Enable it using the toggle above to accept payments."}),e.jsx(Q,{category:u.category,config:u.config,originalConfig:u.config,onSave:q,onValidate:B})]}),f&&e.jsxs("div",{className:"cedros-admin__settings-history",style:{marginTop:"1.5rem"},children:[e.jsx("h4",{style:{marginBottom:"0.75rem",fontWeight:600},children:"Change History"}),x.length===0?e.jsx("p",{className:"cedros-admin__text-muted",children:"No history entries found."}):e.jsx("div",{className:"cedros-admin__settings-timeline",children:x.map(p=>e.jsxs("div",{className:"cedros-admin__settings-timeline-item",children:[e.jsx("div",{className:"cedros-admin__settings-timeline-dot"}),e.jsxs("div",{className:"cedros-admin__settings-timeline-content",children:[e.jsxs("div",{className:"cedros-admin__settings-timeline-header",children:[e.jsx("code",{children:p.configKey}),e.jsx("span",{className:`cedros-admin__badge cedros-admin__badge--${p.action.toLowerCase()}`,children:p.action})]}),e.jsxs("div",{className:"cedros-admin__settings-timeline-meta",children:[w.formatDateTime(p.changedAt)," by ",p.changedBy]})]})]},p.id))})]}),t&&e.jsx("div",{style:{marginTop:"1rem",padding:"0.75rem 1rem",borderRadius:"0.375rem",backgroundColor:t.valid?"var(--cedros-admin-success-bg, #dcfce7)":"var(--cedros-admin-error-bg, #fef2f2)",border:`1px solid ${t.valid?"var(--cedros-admin-success-border, #86efac)":"var(--cedros-admin-error-border, #fecaca)"}`},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start"},children:[e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontWeight:600,color:t.valid?"var(--cedros-admin-success, #16a34a)":"var(--cedros-admin-error, #dc2626)",marginBottom:t.errors.length>0||t.warnings.length>0?"0.5rem":0},children:t.valid?"✓ Configuration is valid":"✗ Validation failed"}),t.errors.length>0&&e.jsx("ul",{style:{margin:0,paddingLeft:"1.25rem",color:"var(--cedros-admin-error, #dc2626)",fontSize:"0.875rem"},children:t.errors.map((p,I)=>e.jsx("li",{children:p},I))}),t.warnings.length>0&&e.jsx("ul",{style:{margin:t.errors.length>0?"0.5rem 0 0":0,paddingLeft:"1.25rem",color:"var(--cedros-admin-warning, #ca8a04)",fontSize:"0.875rem"},children:t.warnings.map((p,I)=>e.jsx("li",{children:p},I))})]}),e.jsx("button",{type:"button",onClick:()=>s(null),style:{background:"none",border:"none",cursor:"pointer",padding:"0.25rem",color:"var(--cedros-admin-text-muted, #64748b)",fontSize:"1.25rem",lineHeight:1},title:"Dismiss",children:"×"})]})}),e.jsxs("div",{style:{marginTop:"1.5rem",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx("button",{type:"button",className:"cedros-admin__button cedros-admin__button--ghost cedros-admin__button--sm",onClick:()=>E(!f),children:f?"Hide History":"History"}),e.jsx("button",{type:"button",className:"cedros-admin__button cedros-admin__button--ghost cedros-admin__button--sm",disabled:r||!u,onClick:async()=>{if(u){g(!0),s(null);try{const p=await B(u.config);s(p)}catch(p){s({valid:!1,errors:[p instanceof Error?p.message:"Validation failed"],warnings:[]})}finally{g(!1)}}},children:r?"Validating...":"Validate"})]})]})}exports.SingleCategorySettings=ee;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsxs as o, jsx as t, Fragment as U } from "react/jsx-runtime";
|
|
2
2
|
import { useState as k, useEffect as V, useMemo as H, useCallback as I } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { I as T, F as Z, E as Q, f as ee } from "./index-75RhiLDq.mjs";
|
|
4
4
|
import { u as te } from "./useAutosave-YwMqRzqy.mjs";
|
|
5
|
-
import { A as re } from "./AutosaveIndicator-
|
|
6
|
-
import { S as O } from "./CedrosContext-
|
|
7
|
-
|
|
8
|
-
class ne {
|
|
5
|
+
import { A as re } from "./AutosaveIndicator-DTOaopUP.mjs";
|
|
6
|
+
import { S as O } from "./CedrosContext-BE6P5PQ0.mjs";
|
|
7
|
+
class ie {
|
|
9
8
|
constructor(s, d, n) {
|
|
10
9
|
this._serverUrl = s, this.auth = d, this.authManager = n;
|
|
11
10
|
}
|
|
@@ -64,7 +63,7 @@ class ne {
|
|
|
64
63
|
return s && n.set("category", s), this.fetch(`/admin/config/history?${n}`);
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
|
-
const
|
|
66
|
+
const F = {
|
|
68
67
|
server: {
|
|
69
68
|
label: "Server",
|
|
70
69
|
secrets: [],
|
|
@@ -412,17 +411,11 @@ const L = {
|
|
|
412
411
|
}
|
|
413
412
|
};
|
|
414
413
|
function G(b, s) {
|
|
415
|
-
return
|
|
414
|
+
return F[b]?.secrets.includes(s) ?? !1;
|
|
416
415
|
}
|
|
417
|
-
const z = "[REDACTED]"
|
|
416
|
+
const z = "[REDACTED]", ne = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;
|
|
418
417
|
function B(b) {
|
|
419
|
-
|
|
420
|
-
return { valid: !0 };
|
|
421
|
-
try {
|
|
422
|
-
return new ie(b.trim()), { valid: !0 };
|
|
423
|
-
} catch {
|
|
424
|
-
return { valid: !1, error: "Invalid Solana address" };
|
|
425
|
-
}
|
|
418
|
+
return !b || b.trim() === "" ? { valid: !0 } : ne.test(b.trim()) ? { valid: !0 } : { valid: !1, error: "Invalid Solana address" };
|
|
426
419
|
}
|
|
427
420
|
function oe({
|
|
428
421
|
label: b,
|
|
@@ -435,7 +428,7 @@ function oe({
|
|
|
435
428
|
customSymbol: m = "",
|
|
436
429
|
customIcon: h = "",
|
|
437
430
|
onCustomSymbolChange: p,
|
|
438
|
-
onCustomIconChange:
|
|
431
|
+
onCustomIconChange: y
|
|
439
432
|
}) {
|
|
440
433
|
const [w, A] = k(!1), f = Object.entries(O), _ = !!O[s], x = w || !!s && !_, C = (e) => {
|
|
441
434
|
if (e === "custom")
|
|
@@ -443,7 +436,7 @@ function oe({
|
|
|
443
436
|
else {
|
|
444
437
|
A(!1), d(e);
|
|
445
438
|
const i = O[e];
|
|
446
|
-
i && S && S(i.decimals), p && p(""),
|
|
439
|
+
i && S && S(i.decimals), p && p(""), y && y("");
|
|
447
440
|
}
|
|
448
441
|
};
|
|
449
442
|
return /* @__PURE__ */ o("div", { className: "cedros-admin__field", children: [
|
|
@@ -586,7 +579,7 @@ function oe({
|
|
|
586
579
|
type: "text",
|
|
587
580
|
className: "cedros-admin__input",
|
|
588
581
|
value: h,
|
|
589
|
-
onChange: (e) =>
|
|
582
|
+
onChange: (e) => y?.(e.target.value),
|
|
590
583
|
placeholder: "https://example.com/token-logo.png",
|
|
591
584
|
disabled: c,
|
|
592
585
|
style: { flex: 1 }
|
|
@@ -665,30 +658,30 @@ function se({
|
|
|
665
658
|
disabled: n = !1,
|
|
666
659
|
description: S
|
|
667
660
|
}) {
|
|
668
|
-
const [c, l] = k(/* @__PURE__ */ new Set()), [m, h] = k(null), [p,
|
|
661
|
+
const [c, l] = k(/* @__PURE__ */ new Set()), [m, h] = k(null), [p, y] = k(""), w = Array.isArray(s) ? s : [], A = (e) => {
|
|
669
662
|
l((i) => {
|
|
670
663
|
const r = new Set(i);
|
|
671
664
|
return r.has(e) ? r.delete(e) : r.add(e), r;
|
|
672
665
|
});
|
|
673
666
|
}, f = () => {
|
|
674
|
-
d([...w, ""]), h(w.length),
|
|
675
|
-
},
|
|
667
|
+
d([...w, ""]), h(w.length), y("");
|
|
668
|
+
}, M = (e, i) => {
|
|
676
669
|
const r = [...w];
|
|
677
670
|
r[e] = i, d(r);
|
|
678
671
|
}, _ = (e) => {
|
|
679
|
-
const i = w.filter((r,
|
|
672
|
+
const i = w.filter((r, g) => g !== e);
|
|
680
673
|
d(i), l((r) => {
|
|
681
|
-
const
|
|
674
|
+
const g = /* @__PURE__ */ new Set();
|
|
682
675
|
return r.forEach((v) => {
|
|
683
|
-
v < e ?
|
|
684
|
-
}),
|
|
676
|
+
v < e ? g.add(v) : v > e && g.add(v - 1);
|
|
677
|
+
}), g;
|
|
685
678
|
});
|
|
686
679
|
}, R = (e) => {
|
|
687
|
-
h(e),
|
|
680
|
+
h(e), y(w[e] || "");
|
|
688
681
|
}, x = () => {
|
|
689
|
-
m !== null && (
|
|
682
|
+
m !== null && (M(m, p), h(null), y(""));
|
|
690
683
|
}, C = () => {
|
|
691
|
-
m !== null && w[m] === "" && _(m), h(null),
|
|
684
|
+
m !== null && w[m] === "" && _(m), h(null), y("");
|
|
692
685
|
};
|
|
693
686
|
return /* @__PURE__ */ o("div", { className: "cedros-admin__field", children: [
|
|
694
687
|
/* @__PURE__ */ o("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "0.5rem" }, children: [
|
|
@@ -728,7 +721,7 @@ function se({
|
|
|
728
721
|
borderRadius: "0.5rem"
|
|
729
722
|
}, children: 'No items. Click "Add" to create one.' }),
|
|
730
723
|
w.map((e, i) => {
|
|
731
|
-
const r = c.has(i),
|
|
724
|
+
const r = c.has(i), g = m === i, v = e === z;
|
|
732
725
|
return /* @__PURE__ */ t(
|
|
733
726
|
"div",
|
|
734
727
|
{
|
|
@@ -741,14 +734,14 @@ function se({
|
|
|
741
734
|
borderRadius: "0.375rem",
|
|
742
735
|
border: "1px solid var(--cedros-admin-border, #e5e7eb)"
|
|
743
736
|
},
|
|
744
|
-
children:
|
|
737
|
+
children: g ? /* @__PURE__ */ o(U, { children: [
|
|
745
738
|
/* @__PURE__ */ t(
|
|
746
739
|
"input",
|
|
747
740
|
{
|
|
748
741
|
type: "text",
|
|
749
742
|
className: "cedros-admin__input",
|
|
750
743
|
value: p,
|
|
751
|
-
onChange: (a) =>
|
|
744
|
+
onChange: (a) => y(a.target.value),
|
|
752
745
|
placeholder: "Enter wallet keypair...",
|
|
753
746
|
autoFocus: !0,
|
|
754
747
|
style: { flex: 1, fontFamily: "monospace", fontSize: "0.75rem" },
|
|
@@ -867,8 +860,8 @@ function se({
|
|
|
867
860
|
}, children: S })
|
|
868
861
|
] });
|
|
869
862
|
}
|
|
870
|
-
function
|
|
871
|
-
const n = G(b, s), S = s.replace(/_/g, " ").replace(/\b\w/g, (h) => h.toUpperCase()), l =
|
|
863
|
+
function q(b, s, d) {
|
|
864
|
+
const n = G(b, s), S = s.replace(/_/g, " ").replace(/\b\w/g, (h) => h.toUpperCase()), l = F[b]?.fields?.[s], m = {
|
|
872
865
|
isSecret: n,
|
|
873
866
|
label: S,
|
|
874
867
|
description: l?.description,
|
|
@@ -892,21 +885,21 @@ function ae({
|
|
|
892
885
|
const e = { ...c };
|
|
893
886
|
for (const i of Object.keys(e))
|
|
894
887
|
if (G(b, i)) {
|
|
895
|
-
const r = d[i],
|
|
896
|
-
(
|
|
888
|
+
const r = d[i], g = e[i];
|
|
889
|
+
(g === z || g === r) && (e[i] = z);
|
|
897
890
|
}
|
|
898
891
|
return e;
|
|
899
|
-
}, [c, d, b]),
|
|
892
|
+
}, [c, d, b]), y = H(() => {
|
|
900
893
|
const e = c.token_mint;
|
|
901
894
|
return typeof e != "string" || !e ? !1 : !B(e).valid;
|
|
902
895
|
}, [c]), { status: w, error: A } = te({
|
|
903
896
|
data: p,
|
|
904
897
|
onSave: S,
|
|
905
898
|
debounceMs: 1500,
|
|
906
|
-
enabled: !
|
|
899
|
+
enabled: !y
|
|
907
900
|
}), f = I((e, i) => {
|
|
908
901
|
l((r) => ({ ...r, [e]: i }));
|
|
909
|
-
}, []),
|
|
902
|
+
}, []), M = I((e) => {
|
|
910
903
|
h((i) => {
|
|
911
904
|
const r = new Set(i);
|
|
912
905
|
return r.has(e) ? r.delete(e) : r.add(e), r;
|
|
@@ -916,7 +909,7 @@ function ae({
|
|
|
916
909
|
color: "var(--cedros-admin-text-muted, #64748b)",
|
|
917
910
|
marginTop: "0.25rem"
|
|
918
911
|
}, children: e }) : null, R = (e, i) => {
|
|
919
|
-
const r =
|
|
912
|
+
const r = q(b, e, d[e] ?? i);
|
|
920
913
|
if (r.type === "dropdown" && r.options)
|
|
921
914
|
return /* @__PURE__ */ t(
|
|
922
915
|
Z,
|
|
@@ -1002,7 +995,7 @@ function ae({
|
|
|
1002
995
|
type: "text",
|
|
1003
996
|
className: `cedros-admin__input ${N.valid ? "" : "cedros-admin__input--error"}`,
|
|
1004
997
|
value: a,
|
|
1005
|
-
onChange: (
|
|
998
|
+
onChange: (D) => f(e, D.target.value),
|
|
1006
999
|
disabled: n,
|
|
1007
1000
|
placeholder: "e.g. 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
|
|
1008
1001
|
style: {
|
|
@@ -1123,7 +1116,7 @@ function ae({
|
|
|
1123
1116
|
),
|
|
1124
1117
|
_(r.description)
|
|
1125
1118
|
] });
|
|
1126
|
-
const
|
|
1119
|
+
const g = m.has(e), v = r.isSecret && !g && i === z ? z : i;
|
|
1127
1120
|
return /* @__PURE__ */ o("div", { className: "cedros-admin__field", children: [
|
|
1128
1121
|
/* @__PURE__ */ o("label", { className: "cedros-admin__field-label", children: [
|
|
1129
1122
|
r.label,
|
|
@@ -1133,7 +1126,7 @@ function ae({
|
|
|
1133
1126
|
/* @__PURE__ */ t(
|
|
1134
1127
|
"input",
|
|
1135
1128
|
{
|
|
1136
|
-
type: r.isSecret && !
|
|
1129
|
+
type: r.isSecret && !g ? "password" : "text",
|
|
1137
1130
|
className: "cedros-admin__input",
|
|
1138
1131
|
value: v,
|
|
1139
1132
|
onChange: (a) => f(e, a.target.value),
|
|
@@ -1146,17 +1139,17 @@ function ae({
|
|
|
1146
1139
|
{
|
|
1147
1140
|
type: "button",
|
|
1148
1141
|
className: "cedros-admin__button cedros-admin__button--ghost",
|
|
1149
|
-
onClick: () =>
|
|
1142
|
+
onClick: () => M(e),
|
|
1150
1143
|
style: { padding: "0.5rem", minWidth: "auto" },
|
|
1151
|
-
title:
|
|
1152
|
-
children:
|
|
1144
|
+
title: g ? "Hide" : "Show",
|
|
1145
|
+
children: g ? T.eyeOff : T.eye
|
|
1153
1146
|
}
|
|
1154
1147
|
)
|
|
1155
1148
|
] }),
|
|
1156
1149
|
_(r.description)
|
|
1157
1150
|
] });
|
|
1158
1151
|
}, x = Object.keys(c), C = (e) => {
|
|
1159
|
-
const i =
|
|
1152
|
+
const i = q(b, e, d[e] ?? c[e]);
|
|
1160
1153
|
if (i.hidden || i.showWhen && !c[i.showWhen])
|
|
1161
1154
|
return !1;
|
|
1162
1155
|
if (e === "token_decimals") {
|
|
@@ -1171,7 +1164,7 @@ function ae({
|
|
|
1171
1164
|
/* @__PURE__ */ t("div", { className: "cedros-admin__config-actions", children: /* @__PURE__ */ t("div", { className: "cedros-admin__autosave-status", children: /* @__PURE__ */ t(re, { status: w, error: A }) }) })
|
|
1172
1165
|
] });
|
|
1173
1166
|
}
|
|
1174
|
-
function
|
|
1167
|
+
function he({
|
|
1175
1168
|
serverUrl: b,
|
|
1176
1169
|
apiKey: s,
|
|
1177
1170
|
authManager: d,
|
|
@@ -1182,23 +1175,23 @@ function fe({
|
|
|
1182
1175
|
showEnabledToggle: m = !1
|
|
1183
1176
|
}) {
|
|
1184
1177
|
const h = H(
|
|
1185
|
-
() => new
|
|
1178
|
+
() => new ie(b, void 0, d),
|
|
1186
1179
|
[b, d]
|
|
1187
|
-
), [p,
|
|
1180
|
+
), [p, y] = k(null), [w, A] = k([]), [f, M] = k(!1), [_, R] = k(!0), [x, C] = k(null), [e, i] = k(null), [r, g] = k(!1), v = F[n] || { label: n, icon: "⚙️" }, a = S || v.label, N = c || v.description, D = I(async () => {
|
|
1188
1181
|
R(!0), C(null);
|
|
1189
1182
|
try {
|
|
1190
1183
|
const u = await h.getConfig(n, !0);
|
|
1191
|
-
|
|
1184
|
+
y(u);
|
|
1192
1185
|
} catch {
|
|
1193
|
-
|
|
1186
|
+
y(null), C("Failed to load settings");
|
|
1194
1187
|
} finally {
|
|
1195
1188
|
R(!1);
|
|
1196
1189
|
}
|
|
1197
1190
|
}, [h, n]);
|
|
1198
1191
|
V(() => {
|
|
1199
|
-
|
|
1200
|
-
}, [
|
|
1201
|
-
const
|
|
1192
|
+
D();
|
|
1193
|
+
}, [D]);
|
|
1194
|
+
const L = I(async () => {
|
|
1202
1195
|
try {
|
|
1203
1196
|
const u = await h.getHistory(n, 20);
|
|
1204
1197
|
A(u.history);
|
|
@@ -1207,20 +1200,20 @@ function fe({
|
|
|
1207
1200
|
}
|
|
1208
1201
|
}, [h, n]);
|
|
1209
1202
|
V(() => {
|
|
1210
|
-
f &&
|
|
1211
|
-
}, [f,
|
|
1203
|
+
f && L();
|
|
1204
|
+
}, [f, L]);
|
|
1212
1205
|
const Y = I(async (u) => {
|
|
1213
|
-
await h.updateConfig(n, u, "Updated via admin dashboard")
|
|
1214
|
-
}, [h, n
|
|
1206
|
+
await h.updateConfig(n, u, "Updated via admin dashboard");
|
|
1207
|
+
}, [h, n]), j = I(async (u) => h.validateConfig(n, u), [h, n]), [W, $] = k(!1), X = I(async () => {
|
|
1215
1208
|
if (!p || W) return;
|
|
1216
|
-
const u = !!p.config[l],
|
|
1217
|
-
|
|
1209
|
+
const u = !!p.config[l], P = !u, K = { ...p.config, [l]: P };
|
|
1210
|
+
$(!0), y({ ...p, config: K });
|
|
1218
1211
|
try {
|
|
1219
|
-
await h.updateConfig(n,
|
|
1220
|
-
} catch (
|
|
1221
|
-
|
|
1212
|
+
await h.updateConfig(n, K, `${P ? "Enabled" : "Disabled"} via admin dashboard`);
|
|
1213
|
+
} catch (J) {
|
|
1214
|
+
y({ ...p, config: { ...p.config, [l]: u } }), C(J instanceof Error ? J.message : "Failed to save enabled state");
|
|
1222
1215
|
} finally {
|
|
1223
|
-
|
|
1216
|
+
$(!1);
|
|
1224
1217
|
}
|
|
1225
1218
|
}, [p, h, n, l, W]), E = !!p?.config[l];
|
|
1226
1219
|
return _ && !p ? /* @__PURE__ */ t("div", { className: "cedros-admin__section", children: /* @__PURE__ */ o("div", { className: "cedros-admin__loading", children: [
|
|
@@ -1229,7 +1222,7 @@ function fe({
|
|
|
1229
1222
|
a,
|
|
1230
1223
|
" settings..."
|
|
1231
1224
|
] }) }) : /* @__PURE__ */ o("div", { className: "cedros-admin__section", children: [
|
|
1232
|
-
/* @__PURE__ */ t(Q, { message: x, onRetry:
|
|
1225
|
+
/* @__PURE__ */ t(Q, { message: x, onRetry: D }),
|
|
1233
1226
|
/* @__PURE__ */ o("div", { className: "cedros-admin__section-header", children: [
|
|
1234
1227
|
/* @__PURE__ */ o("div", { children: [
|
|
1235
1228
|
/* @__PURE__ */ o("h3", { className: "cedros-admin__section-title", children: [
|
|
@@ -1313,7 +1306,7 @@ function fe({
|
|
|
1313
1306
|
config: p.config,
|
|
1314
1307
|
originalConfig: p.config,
|
|
1315
1308
|
onSave: Y,
|
|
1316
|
-
onValidate:
|
|
1309
|
+
onValidate: j
|
|
1317
1310
|
}
|
|
1318
1311
|
)
|
|
1319
1312
|
]
|
|
@@ -1353,8 +1346,8 @@ function fe({
|
|
|
1353
1346
|
color: e.valid ? "var(--cedros-admin-success, #16a34a)" : "var(--cedros-admin-error, #dc2626)",
|
|
1354
1347
|
marginBottom: e.errors.length > 0 || e.warnings.length > 0 ? "0.5rem" : 0
|
|
1355
1348
|
}, children: e.valid ? "✓ Configuration is valid" : "✗ Validation failed" }),
|
|
1356
|
-
e.errors.length > 0 && /* @__PURE__ */ t("ul", { style: { margin: 0, paddingLeft: "1.25rem", color: "var(--cedros-admin-error, #dc2626)", fontSize: "0.875rem" }, children: e.errors.map((u,
|
|
1357
|
-
e.warnings.length > 0 && /* @__PURE__ */ t("ul", { style: { margin: e.errors.length > 0 ? "0.5rem 0 0" : 0, paddingLeft: "1.25rem", color: "var(--cedros-admin-warning, #ca8a04)", fontSize: "0.875rem" }, children: e.warnings.map((u,
|
|
1349
|
+
e.errors.length > 0 && /* @__PURE__ */ t("ul", { style: { margin: 0, paddingLeft: "1.25rem", color: "var(--cedros-admin-error, #dc2626)", fontSize: "0.875rem" }, children: e.errors.map((u, P) => /* @__PURE__ */ t("li", { children: u }, P)) }),
|
|
1350
|
+
e.warnings.length > 0 && /* @__PURE__ */ t("ul", { style: { margin: e.errors.length > 0 ? "0.5rem 0 0" : 0, paddingLeft: "1.25rem", color: "var(--cedros-admin-warning, #ca8a04)", fontSize: "0.875rem" }, children: e.warnings.map((u, P) => /* @__PURE__ */ t("li", { children: u }, P)) })
|
|
1358
1351
|
] }),
|
|
1359
1352
|
/* @__PURE__ */ t(
|
|
1360
1353
|
"button",
|
|
@@ -1383,7 +1376,7 @@ function fe({
|
|
|
1383
1376
|
{
|
|
1384
1377
|
type: "button",
|
|
1385
1378
|
className: "cedros-admin__button cedros-admin__button--ghost cedros-admin__button--sm",
|
|
1386
|
-
onClick: () =>
|
|
1379
|
+
onClick: () => M(!f),
|
|
1387
1380
|
children: f ? "Hide History" : "History"
|
|
1388
1381
|
}
|
|
1389
1382
|
),
|
|
@@ -1395,9 +1388,9 @@ function fe({
|
|
|
1395
1388
|
disabled: r || !p,
|
|
1396
1389
|
onClick: async () => {
|
|
1397
1390
|
if (p) {
|
|
1398
|
-
|
|
1391
|
+
g(!0), i(null);
|
|
1399
1392
|
try {
|
|
1400
|
-
const u = await
|
|
1393
|
+
const u = await j(p.config);
|
|
1401
1394
|
i(u);
|
|
1402
1395
|
} catch (u) {
|
|
1403
1396
|
i({
|
|
@@ -1406,7 +1399,7 @@ function fe({
|
|
|
1406
1399
|
warnings: []
|
|
1407
1400
|
});
|
|
1408
1401
|
} finally {
|
|
1409
|
-
|
|
1402
|
+
g(!1);
|
|
1410
1403
|
}
|
|
1411
1404
|
}
|
|
1412
1405
|
},
|
|
@@ -1417,5 +1410,5 @@ function fe({
|
|
|
1417
1410
|
] });
|
|
1418
1411
|
}
|
|
1419
1412
|
export {
|
|
1420
|
-
|
|
1413
|
+
he as S
|
|
1421
1414
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as h, useCallback as z, useEffect as j } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { I as H, E as V, F as x } from "./index-75RhiLDq.mjs";
|
|
4
4
|
import { T as d } from "./Toggle-DAxIdpY4.mjs";
|
|
5
5
|
import { u as q } from "./useAutosave-YwMqRzqy.mjs";
|
|
6
|
-
import { A as X } from "./AutosaveIndicator-
|
|
6
|
+
import { A as X } from "./AutosaveIndicator-DTOaopUP.mjs";
|
|
7
7
|
const C = {
|
|
8
8
|
enabled: !0,
|
|
9
9
|
relatedProducts: {
|
|
@@ -141,17 +141,17 @@ function te({ serverUrl: g, apiKey: s, authManager: c }) {
|
|
|
141
141
|
} catch {
|
|
142
142
|
throw y("Failed to save storefront settings"), new Error("Save failed");
|
|
143
143
|
}
|
|
144
|
-
}, [g, s, c]), { status: E, error:
|
|
144
|
+
}, [g, s, c]), { status: E, error: F } = q({
|
|
145
145
|
data: o,
|
|
146
146
|
onSave: A,
|
|
147
147
|
debounceMs: 1500,
|
|
148
148
|
enabled: !N
|
|
149
|
-
}),
|
|
149
|
+
}), O = (e) => {
|
|
150
150
|
n((r) => ({
|
|
151
151
|
...r,
|
|
152
152
|
relatedProducts: { ...r.relatedProducts, mode: e }
|
|
153
153
|
}));
|
|
154
|
-
},
|
|
154
|
+
}, $ = (e) => {
|
|
155
155
|
n((r) => ({
|
|
156
156
|
...r,
|
|
157
157
|
relatedProducts: { ...r.relatedProducts, maxItems: e }
|
|
@@ -253,7 +253,7 @@ function te({ serverUrl: g, apiKey: s, authManager: c }) {
|
|
|
253
253
|
e.id
|
|
254
254
|
)),
|
|
255
255
|
/* @__PURE__ */ t("div", { style: { flex: 1 } }),
|
|
256
|
-
/* @__PURE__ */ t(X, { status: E, error:
|
|
256
|
+
/* @__PURE__ */ t(X, { status: E, error: F })
|
|
257
257
|
] }),
|
|
258
258
|
/* @__PURE__ */ t(V, { message: R, onRetry: f }),
|
|
259
259
|
m === "shop-page" && /* @__PURE__ */ a("div", { className: "cedros-admin__section", style: { marginTop: "1rem" }, children: [
|
|
@@ -514,7 +514,7 @@ function te({ serverUrl: g, apiKey: s, authManager: c }) {
|
|
|
514
514
|
name: "relatedProductsMode",
|
|
515
515
|
value: e.value,
|
|
516
516
|
checked: r,
|
|
517
|
-
onChange: () => !i &&
|
|
517
|
+
onChange: () => !i && O(e.value),
|
|
518
518
|
disabled: i,
|
|
519
519
|
style: { marginTop: 2 }
|
|
520
520
|
}
|
|
@@ -575,7 +575,7 @@ function te({ serverUrl: g, apiKey: s, authManager: c }) {
|
|
|
575
575
|
type: "number",
|
|
576
576
|
className: "cedros-admin__input",
|
|
577
577
|
value: o.relatedProducts.maxItems,
|
|
578
|
-
onChange: (e) =>
|
|
578
|
+
onChange: (e) => $(Math.max(1, Math.min(12, parseInt(e.target.value) || 4))),
|
|
579
579
|
min: 1,
|
|
580
580
|
max: 12
|
|
581
581
|
}
|