merchi_cart 0.0.4-b → 0.0.4-d
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/lib/Cart.js +62 -41
- package/lib/CartAlert.js +45 -13
- package/lib/CartHeader.js +33 -7
- package/lib/CartProvider.js +245 -185
- package/lib/CartTotals.js +99 -45
- package/lib/MerchiSDK/constants/auto_assign_production_on_actions.js +13 -7
- package/lib/MerchiSDK/constants/call_to_actions.js +21 -15
- package/lib/MerchiSDK/constants/discount_types.js +10 -4
- package/lib/MerchiSDK/constants/domain_types.js +19 -13
- package/lib/MerchiSDK/constants/errors.js +39 -32
- package/lib/MerchiSDK/constants/event_types.js +12 -6
- package/lib/MerchiSDK/constants/field_types.js +20 -14
- package/lib/MerchiSDK/constants/input_types.js +20 -14
- package/lib/MerchiSDK/constants/inventory_statuses.js +13 -7
- package/lib/MerchiSDK/constants/invoice_types.js +12 -6
- package/lib/MerchiSDK/constants/item_types.js +12 -6
- package/lib/MerchiSDK/constants/job/drafting_status.js +14 -8
- package/lib/MerchiSDK/constants/job/payment_status.js +14 -8
- package/lib/MerchiSDK/constants/job/production_status.js +19 -13
- package/lib/MerchiSDK/constants/job/shipment_status.js +18 -12
- package/lib/MerchiSDK/constants/job/supply_chain_request_status.js +13 -7
- package/lib/MerchiSDK/constants/job_priorities.js +13 -7
- package/lib/MerchiSDK/constants/job_status.js +56 -50
- package/lib/MerchiSDK/constants/job_types.js +22 -16
- package/lib/MerchiSDK/constants/notification_sections.js +20 -14
- package/lib/MerchiSDK/constants/notification_types.js +104 -98
- package/lib/MerchiSDK/constants/notification_urgencies.js +13 -7
- package/lib/MerchiSDK/constants/payment_types.js +17 -11
- package/lib/MerchiSDK/constants/platform.js +11 -5
- package/lib/MerchiSDK/constants/product_types.js +32 -26
- package/lib/MerchiSDK/constants/rights.js +12 -6
- package/lib/MerchiSDK/constants/robots_meta_directives.js +7 -11
- package/lib/MerchiSDK/constants/roles.js +25 -57
- package/lib/MerchiSDK/constants/shipment_companies.js +25 -19
- package/lib/MerchiSDK/constants/shipment_services.js +10 -4
- package/lib/MerchiSDK/constants/system_roles.js +10 -4
- package/lib/MerchiSDK/constants/theme_foundations.js +13 -7
- package/lib/MerchiSDK/constants/theme_status.js +12 -6
- package/lib/MerchiSDK/constants/user_types.js +24 -18
- package/lib/MerchiSDK/constants/white_label_accessibilities.js +12 -6
- package/lib/MerchiSDK/cookie.js +21 -14
- package/lib/MerchiSDK/entities/address.js +150 -104
- package/lib/MerchiSDK/entities/assignment.js +168 -151
- package/lib/MerchiSDK/entities/automatic_payment_relationship.js +61 -61
- package/lib/MerchiSDK/entities/backup.js +28 -45
- package/lib/MerchiSDK/entities/bank.js +100 -85
- package/lib/MerchiSDK/entities/cart.js +173 -180
- package/lib/MerchiSDK/entities/cart_item.js +135 -140
- package/lib/MerchiSDK/entities/cart_shipment_group.js +46 -53
- package/lib/MerchiSDK/entities/cart_shipment_quote.js +69 -70
- package/lib/MerchiSDK/entities/category.js +76 -73
- package/lib/MerchiSDK/entities/company.js +632 -371
- package/lib/MerchiSDK/entities/company_invitation.js +66 -70
- package/lib/MerchiSDK/entities/component.js +192 -165
- package/lib/MerchiSDK/entities/component_tag.js +34 -49
- package/lib/MerchiSDK/entities/component_version.js +64 -65
- package/lib/MerchiSDK/entities/country_tax.js +91 -80
- package/lib/MerchiSDK/entities/discount.js +60 -92
- package/lib/MerchiSDK/entities/discount_group.js +58 -60
- package/lib/MerchiSDK/entities/domain.js +517 -349
- package/lib/MerchiSDK/entities/domain_invitation.js +74 -74
- package/lib/MerchiSDK/entities/domain_tag.js +84 -77
- package/lib/MerchiSDK/entities/draft.js +148 -172
- package/lib/MerchiSDK/entities/draft_comment.js +116 -95
- package/lib/MerchiSDK/entities/draft_template.js +89 -79
- package/lib/MerchiSDK/entities/email_address.js +52 -56
- package/lib/MerchiSDK/entities/email_counter.js +40 -53
- package/lib/MerchiSDK/entities/enrolled_domain.js +65 -73
- package/lib/MerchiSDK/entities/exchange_rate.js +46 -56
- package/lib/MerchiSDK/entities/file.js +366 -249
- package/lib/MerchiSDK/entities/internal_tag.js +104 -84
- package/lib/MerchiSDK/entities/inventory.js +101 -113
- package/lib/MerchiSDK/entities/inventory_unit_variation.js +47 -85
- package/lib/MerchiSDK/entities/invoice.js +404 -252
- package/lib/MerchiSDK/entities/item.js +85 -105
- package/lib/MerchiSDK/entities/job.js +724 -478
- package/lib/MerchiSDK/entities/job_comment.js +104 -90
- package/lib/MerchiSDK/entities/matching_inventory.js +61 -63
- package/lib/MerchiSDK/entities/menu.js +62 -65
- package/lib/MerchiSDK/entities/menu_item.js +60 -65
- package/lib/MerchiSDK/entities/notification.js +218 -155
- package/lib/MerchiSDK/entities/page.js +68 -69
- package/lib/MerchiSDK/entities/payment.js +124 -130
- package/lib/MerchiSDK/entities/payment_device.js +71 -65
- package/lib/MerchiSDK/entities/phone_number.js +82 -72
- package/lib/MerchiSDK/entities/product.js +774 -565
- package/lib/MerchiSDK/entities/production_comment.js +104 -90
- package/lib/MerchiSDK/entities/quote.js +175 -191
- package/lib/MerchiSDK/entities/quote_item.js +103 -122
- package/lib/MerchiSDK/entities/seo_domain_page.js +66 -70
- package/lib/MerchiSDK/entities/session.js +61 -63
- package/lib/MerchiSDK/entities/shipment.js +383 -267
- package/lib/MerchiSDK/entities/shipment_item.js +33 -45
- package/lib/MerchiSDK/entities/shipment_item_fulfillment.js +32 -46
- package/lib/MerchiSDK/entities/shipment_method.js +130 -104
- package/lib/MerchiSDK/entities/shipment_method_variation.js +88 -77
- package/lib/MerchiSDK/entities/short_url.js +79 -73
- package/lib/MerchiSDK/entities/subscription_plan.js +156 -122
- package/lib/MerchiSDK/entities/supply_domain.js +57 -62
- package/lib/MerchiSDK/entities/system_role.js +34 -49
- package/lib/MerchiSDK/entities/theme.js +596 -389
- package/lib/MerchiSDK/entities/theme_css_setting.js +51 -57
- package/lib/MerchiSDK/entities/user.js +684 -462
- package/lib/MerchiSDK/entities/user_company.js +62 -62
- package/lib/MerchiSDK/entities/variation.js +131 -104
- package/lib/MerchiSDK/entities/variation_field.js +281 -271
- package/lib/MerchiSDK/entities/variation_fields_option.js +172 -160
- package/lib/MerchiSDK/entities/variation_option.js +113 -96
- package/lib/MerchiSDK/entities/variations_group.js +95 -79
- package/lib/MerchiSDK/entity.js +779 -861
- package/lib/MerchiSDK/merchi.js +317 -241
- package/lib/MerchiSDK/request.js +107 -143
- package/lib/MerchiSDK/test_util.js +21 -16
- package/lib/MerchiSDK/toasts.js +31 -13
- package/lib/MerchiSDK/util/float.js +18 -34
- package/lib/MerchiSDK/util/query_string.js +16 -10
- package/lib/MerchiSDK/util/validation.js +8 -3
- package/lib/MerchiSDK/uuid.js +14 -8
- package/lib/buttons/Button.js +32 -7
- package/lib/buttons/ButtonBack.js +43 -22
- package/lib/buttons/ButtonClearCart.js +21 -8
- package/lib/buttons/ButtonInvoiceDownload.js +63 -90
- package/lib/buttons/ButtonNext.js +46 -16
- package/lib/buttons/ButtonNextDynamic.js +27 -14
- package/lib/buttons/ButtonPay.js +39 -10
- package/lib/buttons/ButtonShipmentTabNext.js +40 -13
- package/lib/buttons/index.js +48 -7
- package/lib/components/Alert.js +37 -17
- package/lib/components/CartBody.js +25 -7
- package/lib/components/CartClient.js +64 -24
- package/lib/components/CartFooter.js +23 -7
- package/lib/components/CartItemRow.js +143 -33
- package/lib/components/CartPaymentSettingsInvalid.js +21 -4
- package/lib/components/CartShipment.js +65 -20
- package/lib/components/CartTabContent.js +23 -7
- package/lib/components/CartTabPanel.js +31 -17
- package/lib/components/CartTableContainer.js +23 -7
- package/lib/components/Collapse.js +32 -27
- package/lib/components/LoadingTemplate.js +32 -10
- package/lib/components/NoCartItems.js +27 -6
- package/lib/components/ShipmentGroupCard.js +163 -54
- package/lib/components/Table.js +20 -7
- package/lib/components/Title.js +37 -8
- package/lib/components/containers.js +41 -17
- package/lib/components/index.js +105 -14
- package/lib/forms/FormNewCustomer.js +134 -116
- package/lib/forms/FormReturningCustomer.js +74 -81
- package/lib/forms/FormShipmentAddressAndNotes.js +113 -56
- package/lib/forms/FormSquarePayment.js +18 -7
- package/lib/forms/FormStripePayment.js +18 -7
- package/lib/forms/InputAcceptUserTermsAndConditions.js +41 -7
- package/lib/forms/InputError.js +26 -10
- package/lib/forms/InputSelect.js +52 -27
- package/lib/forms/InputText.js +58 -41
- package/lib/forms/InputsAddress.js +216 -94
- package/lib/index.js +28 -4
- package/lib/panels/PanelCartItems.js +57 -12
- package/lib/panels/PanelCartShipment.js +69 -17
- package/lib/panels/PanelClearCart.js +51 -11
- package/lib/panels/PanelClientCheckout.js +81 -22
- package/lib/panels/PanelEditCartItem.js +60 -30
- package/lib/panels/PanelPaymentSuccess.js +73 -18
- package/lib/panels/index.js +48 -7
- package/lib/slices/sliceCart.js +168 -174
- package/lib/slices/sliceCartAlert.js +42 -37
- package/lib/slices/sliceCartItem.js +33 -24
- package/lib/slices/sliceCartPayment.js +47 -36
- package/lib/slices/sliceCartShipment.js +72 -63
- package/lib/slices/sliceFormReturningCustomer.js +26 -20
- package/lib/slices/sliceNewCustomerForm.js +25 -19
- package/lib/square/SquareCard.js +54 -41
- package/lib/square/actions.js +37 -75
- package/lib/square/slices/reducersSquare.js +13 -6
- package/lib/square/slices/sliceSquareAlerts.js +30 -45
- package/lib/square/slices/sliceSquareForm.js +33 -24
- package/lib/store.js +493 -525
- package/lib/stripe/StripeCardFields.js +133 -49
- package/lib/stripe/StripeCardForm.js +91 -134
- package/lib/stripe/StripePaymentButtons.js +91 -83
- package/lib/stripe/actions.js +83 -151
- package/lib/stripe/slices/sliceStripeAlerts.js +30 -45
- package/lib/stripe/slices/sliceStripeCardForm.js +13 -6
- package/lib/stripe/slices/sliceStripeForm.js +61 -52
- package/lib/stripe/utils.js +24 -18
- package/lib/tabs/CartNav.js +30 -24
- package/lib/tabs/NavTab.js +45 -16
- package/lib/utilities/address.js +347 -332
- package/lib/utilities/cart.js +73 -91
- package/lib/utilities/company.js +12 -6
- package/lib/utilities/cookie.js +55 -111
- package/lib/utilities/currency.js +223 -203
- package/lib/utilities/helpers.js +194 -197
- package/lib/utilities/invoice.js +54 -110
- package/lib/utilities/product.js +14 -6
- package/lib/utilities/user.js +44 -75
- package/lib/utilities/variations.js +53 -45
- package/package.json +7 -6
- package/lib/Cart.d.ts +0 -3
- package/lib/CartAlert.d.ts +0 -2
- package/lib/CartHeader.d.ts +0 -2
- package/lib/CartProvider.d.ts +0 -147
- package/lib/CartTotals.d.ts +0 -2
- package/lib/MerchiSDK/constants/auto_assign_production_on_actions.d.ts +0 -6
- package/lib/MerchiSDK/constants/call_to_actions.d.ts +0 -14
- package/lib/MerchiSDK/constants/discount_types.d.ts +0 -3
- package/lib/MerchiSDK/constants/domain_types.d.ts +0 -12
- package/lib/MerchiSDK/constants/errors.d.ts +0 -26
- package/lib/MerchiSDK/constants/event_types.d.ts +0 -5
- package/lib/MerchiSDK/constants/field_types.d.ts +0 -13
- package/lib/MerchiSDK/constants/input_types.d.ts +0 -13
- package/lib/MerchiSDK/constants/inventory_statuses.d.ts +0 -6
- package/lib/MerchiSDK/constants/invoice_types.d.ts +0 -5
- package/lib/MerchiSDK/constants/item_types.d.ts +0 -5
- package/lib/MerchiSDK/constants/job/drafting_status.d.ts +0 -7
- package/lib/MerchiSDK/constants/job/payment_status.d.ts +0 -7
- package/lib/MerchiSDK/constants/job/production_status.d.ts +0 -12
- package/lib/MerchiSDK/constants/job/shipment_status.d.ts +0 -11
- package/lib/MerchiSDK/constants/job/supply_chain_request_status.d.ts +0 -6
- package/lib/MerchiSDK/constants/job_priorities.d.ts +0 -6
- package/lib/MerchiSDK/constants/job_status.d.ts +0 -45
- package/lib/MerchiSDK/constants/job_types.d.ts +0 -15
- package/lib/MerchiSDK/constants/notification_sections.d.ts +0 -13
- package/lib/MerchiSDK/constants/notification_types.d.ts +0 -97
- package/lib/MerchiSDK/constants/notification_urgencies.d.ts +0 -6
- package/lib/MerchiSDK/constants/payment_types.d.ts +0 -10
- package/lib/MerchiSDK/constants/platform.d.ts +0 -5
- package/lib/MerchiSDK/constants/product_types.d.ts +0 -25
- package/lib/MerchiSDK/constants/rights.d.ts +0 -5
- package/lib/MerchiSDK/constants/robots_meta_directives.d.ts +0 -1
- package/lib/MerchiSDK/constants/roles.d.ts +0 -18
- package/lib/MerchiSDK/constants/shipment_companies.d.ts +0 -18
- package/lib/MerchiSDK/constants/shipment_services.d.ts +0 -3
- package/lib/MerchiSDK/constants/system_roles.d.ts +0 -3
- package/lib/MerchiSDK/constants/theme_foundations.d.ts +0 -6
- package/lib/MerchiSDK/constants/theme_status.d.ts +0 -5
- package/lib/MerchiSDK/constants/user_types.d.ts +0 -17
- package/lib/MerchiSDK/constants/white_label_accessibilities.d.ts +0 -5
- package/lib/MerchiSDK/cookie.d.ts +0 -1
- package/lib/MerchiSDK/entities/address.d.ts +0 -30
- package/lib/MerchiSDK/entities/assignment.d.ts +0 -37
- package/lib/MerchiSDK/entities/automatic_payment_relationship.d.ts +0 -13
- package/lib/MerchiSDK/entities/backup.d.ts +0 -9
- package/lib/MerchiSDK/entities/bank.d.ts +0 -20
- package/lib/MerchiSDK/entities/cart.d.ts +0 -35
- package/lib/MerchiSDK/entities/cart_item.d.ts +0 -27
- package/lib/MerchiSDK/entities/cart_shipment_group.d.ts +0 -12
- package/lib/MerchiSDK/entities/cart_shipment_quote.d.ts +0 -16
- package/lib/MerchiSDK/entities/category.d.ts +0 -18
- package/lib/MerchiSDK/entities/company.d.ts +0 -108
- package/lib/MerchiSDK/entities/company_invitation.d.ts +0 -16
- package/lib/MerchiSDK/entities/component.d.ts +0 -35
- package/lib/MerchiSDK/entities/component_tag.d.ts +0 -10
- package/lib/MerchiSDK/entities/component_version.d.ts +0 -14
- package/lib/MerchiSDK/entities/country_tax.d.ts +0 -20
- package/lib/MerchiSDK/entities/discount.d.ts +0 -13
- package/lib/MerchiSDK/entities/discount_group.d.ts +0 -14
- package/lib/MerchiSDK/entities/domain.d.ts +0 -94
- package/lib/MerchiSDK/entities/domain_invitation.d.ts +0 -17
- package/lib/MerchiSDK/entities/domain_tag.d.ts +0 -21
- package/lib/MerchiSDK/entities/draft.d.ts +0 -29
- package/lib/MerchiSDK/entities/draft_comment.d.ts +0 -25
- package/lib/MerchiSDK/entities/draft_template.d.ts +0 -19
- package/lib/MerchiSDK/entities/email_address.d.ts +0 -13
- package/lib/MerchiSDK/entities/email_counter.d.ts +0 -11
- package/lib/MerchiSDK/entities/enrolled_domain.d.ts +0 -16
- package/lib/MerchiSDK/entities/exchange_rate.d.ts +0 -11
- package/lib/MerchiSDK/entities/file.d.ts +0 -68
- package/lib/MerchiSDK/entities/internal_tag.d.ts +0 -26
- package/lib/MerchiSDK/entities/inventory.d.ts +0 -24
- package/lib/MerchiSDK/entities/inventory_unit_variation.d.ts +0 -13
- package/lib/MerchiSDK/entities/invoice.d.ts +0 -74
- package/lib/MerchiSDK/entities/item.d.ts +0 -17
- package/lib/MerchiSDK/entities/job.d.ts +0 -122
- package/lib/MerchiSDK/entities/job_comment.d.ts +0 -23
- package/lib/MerchiSDK/entities/matching_inventory.d.ts +0 -16
- package/lib/MerchiSDK/entities/menu.d.ts +0 -15
- package/lib/MerchiSDK/entities/menu_item.d.ts +0 -14
- package/lib/MerchiSDK/entities/notification.d.ts +0 -44
- package/lib/MerchiSDK/entities/page.d.ts +0 -15
- package/lib/MerchiSDK/entities/payment.d.ts +0 -24
- package/lib/MerchiSDK/entities/payment_device.d.ts +0 -14
- package/lib/MerchiSDK/entities/phone_number.d.ts +0 -17
- package/lib/MerchiSDK/entities/product.d.ts +0 -124
- package/lib/MerchiSDK/entities/production_comment.d.ts +0 -23
- package/lib/MerchiSDK/entities/quote.d.ts +0 -29
- package/lib/MerchiSDK/entities/quote_item.d.ts +0 -24
- package/lib/MerchiSDK/entities/seo_domain_page.d.ts +0 -16
- package/lib/MerchiSDK/entities/session.d.ts +0 -15
- package/lib/MerchiSDK/entities/shipment.d.ts +0 -71
- package/lib/MerchiSDK/entities/shipment_item.d.ts +0 -10
- package/lib/MerchiSDK/entities/shipment_item_fulfillment.d.ts +0 -10
- package/lib/MerchiSDK/entities/shipment_method.d.ts +0 -28
- package/lib/MerchiSDK/entities/shipment_method_variation.d.ts +0 -18
- package/lib/MerchiSDK/entities/short_url.d.ts +0 -17
- package/lib/MerchiSDK/entities/subscription_plan.d.ts +0 -30
- package/lib/MerchiSDK/entities/supply_domain.d.ts +0 -14
- package/lib/MerchiSDK/entities/system_role.d.ts +0 -10
- package/lib/MerchiSDK/entities/theme.d.ts +0 -91
- package/lib/MerchiSDK/entities/theme_css_setting.d.ts +0 -12
- package/lib/MerchiSDK/entities/user.d.ts +0 -124
- package/lib/MerchiSDK/entities/user_company.d.ts +0 -14
- package/lib/MerchiSDK/entities/variation.d.ts +0 -28
- package/lib/MerchiSDK/entities/variation_field.d.ts +0 -46
- package/lib/MerchiSDK/entities/variation_fields_option.d.ts +0 -31
- package/lib/MerchiSDK/entities/variation_option.d.ts +0 -21
- package/lib/MerchiSDK/entities/variations_group.d.ts +0 -20
- package/lib/MerchiSDK/entity.d.ts +0 -189
- package/lib/MerchiSDK/merchi.d.ts +0 -157
- package/lib/MerchiSDK/request.d.ts +0 -15
- package/lib/MerchiSDK/test_util.d.ts +0 -3
- package/lib/MerchiSDK/toasts.d.ts +0 -14
- package/lib/MerchiSDK/util/float.d.ts +0 -1
- package/lib/MerchiSDK/util/query_string.d.ts +0 -1
- package/lib/MerchiSDK/util/validation.d.ts +0 -1
- package/lib/MerchiSDK/uuid.d.ts +0 -1
- package/lib/buttons/Button.d.ts +0 -10
- package/lib/buttons/ButtonBack.d.ts +0 -5
- package/lib/buttons/ButtonClearCart.d.ts +0 -2
- package/lib/buttons/ButtonInvoiceDownload.d.ts +0 -2
- package/lib/buttons/ButtonNext.d.ts +0 -2
- package/lib/buttons/ButtonNextDynamic.d.ts +0 -2
- package/lib/buttons/ButtonPay.d.ts +0 -6
- package/lib/buttons/ButtonShipmentTabNext.d.ts +0 -1
- package/lib/buttons/index.d.ts +0 -7
- package/lib/components/Alert.d.ts +0 -6
- package/lib/components/CartBody.d.ts +0 -6
- package/lib/components/CartClient.d.ts +0 -6
- package/lib/components/CartFooter.d.ts +0 -5
- package/lib/components/CartItemRow.d.ts +0 -7
- package/lib/components/CartPaymentSettingsInvalid.d.ts +0 -1
- package/lib/components/CartShipment.d.ts +0 -5
- package/lib/components/CartTabContent.d.ts +0 -5
- package/lib/components/CartTabPanel.d.ts +0 -6
- package/lib/components/CartTableContainer.d.ts +0 -5
- package/lib/components/Collapse.d.ts +0 -2
- package/lib/components/LoadingTemplate.d.ts +0 -6
- package/lib/components/NoCartItems.d.ts +0 -2
- package/lib/components/ShipmentGroupCard.d.ts +0 -6
- package/lib/components/Table.d.ts +0 -5
- package/lib/components/Title.d.ts +0 -1
- package/lib/components/containers.d.ts +0 -13
- package/lib/components/index.d.ts +0 -14
- package/lib/forms/FormNewCustomer.d.ts +0 -3
- package/lib/forms/FormReturningCustomer.d.ts +0 -2
- package/lib/forms/FormShipmentAddressAndNotes.d.ts +0 -15
- package/lib/forms/FormSquarePayment.d.ts +0 -2
- package/lib/forms/FormStripePayment.d.ts +0 -2
- package/lib/forms/InputAcceptUserTermsAndConditions.d.ts +0 -6
- package/lib/forms/InputError.d.ts +0 -8
- package/lib/forms/InputSelect.d.ts +0 -13
- package/lib/forms/InputText.d.ts +0 -11
- package/lib/forms/InputsAddress.d.ts +0 -10
- package/lib/index.d.ts +0 -4
- package/lib/panels/PanelCartItems.d.ts +0 -2
- package/lib/panels/PanelCartShipment.d.ts +0 -2
- package/lib/panels/PanelClearCart.d.ts +0 -2
- package/lib/panels/PanelClientCheckout.d.ts +0 -2
- package/lib/panels/PanelEditCartItem.d.ts +0 -2
- package/lib/panels/PanelPaymentSuccess.d.ts +0 -2
- package/lib/panels/index.d.ts +0 -7
- package/lib/slices/sliceCart.d.ts +0 -52
- package/lib/slices/sliceCartAlert.d.ts +0 -23
- package/lib/slices/sliceCartItem.d.ts +0 -18
- package/lib/slices/sliceCartPayment.d.ts +0 -17
- package/lib/slices/sliceCartShipment.d.ts +0 -36
- package/lib/slices/sliceFormReturningCustomer.d.ts +0 -14
- package/lib/slices/sliceNewCustomerForm.d.ts +0 -13
- package/lib/square/SquareCard.d.ts +0 -2
- package/lib/square/actions.d.ts +0 -4
- package/lib/square/slices/reducersSquare.d.ts +0 -13
- package/lib/square/slices/sliceSquareAlerts.d.ts +0 -11
- package/lib/square/slices/sliceSquareForm.d.ts +0 -19
- package/lib/store.d.ts +0 -189
- package/lib/stripe/StripeCardFields.d.ts +0 -13
- package/lib/stripe/StripeCardForm.d.ts +0 -2
- package/lib/stripe/StripePaymentButtons.d.ts +0 -7
- package/lib/stripe/actions.d.ts +0 -4
- package/lib/stripe/slices/sliceStripeAlerts.d.ts +0 -11
- package/lib/stripe/slices/sliceStripeCardForm.d.ts +0 -15
- package/lib/stripe/slices/sliceStripeForm.d.ts +0 -31
- package/lib/stripe/utils.d.ts +0 -17
- package/lib/tabs/CartNav.d.ts +0 -2
- package/lib/tabs/NavTab.d.ts +0 -8
- package/lib/utilities/address.d.ts +0 -11
- package/lib/utilities/cart.d.ts +0 -8
- package/lib/utilities/company.d.ts +0 -2
- package/lib/utilities/cookie.d.ts +0 -3
- package/lib/utilities/currency.d.ts +0 -5
- package/lib/utilities/helpers.d.ts +0 -24
- package/lib/utilities/invoice.d.ts +0 -3
- package/lib/utilities/product.d.ts +0 -1
- package/lib/utilities/user.d.ts +0 -5
- package/lib/utilities/variations.d.ts +0 -15
package/lib/Cart.js
CHANGED
|
@@ -1,43 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import { tabIdClearCart, tabIdItem, tabIdPaymentSuccess, } from './slices/sliceCart';
|
|
25
|
-
import { actionFetchTheme, initMerchiCart, } from './store';
|
|
26
|
-
import './styles/globals.css';
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Cart;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _store = require("./store");
|
|
10
|
+
var _CartAlert = _interopRequireDefault(require("./CartAlert"));
|
|
11
|
+
var _CartHeader = _interopRequireDefault(require("./CartHeader"));
|
|
12
|
+
var _CartNav = _interopRequireDefault(require("./tabs/CartNav"));
|
|
13
|
+
var _CartTotals = _interopRequireDefault(require("./CartTotals"));
|
|
14
|
+
var _CartProvider = _interopRequireWildcard(require("./CartProvider"));
|
|
15
|
+
var _buttons = require("./buttons");
|
|
16
|
+
var _components = require("./components");
|
|
17
|
+
var _panels = require("./panels");
|
|
18
|
+
var _sliceCart = require("./slices/sliceCart");
|
|
19
|
+
require("./styles/globals.css");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
27
24
|
function CartComponents() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
25
|
+
const {
|
|
26
|
+
domainId,
|
|
27
|
+
includeTheme,
|
|
28
|
+
initialiseCart
|
|
29
|
+
} = (0, _CartProvider.useCartContext)();
|
|
30
|
+
const {
|
|
31
|
+
activeTab,
|
|
32
|
+
cartSettingsInvalid,
|
|
33
|
+
fetchingCart
|
|
34
|
+
} = (0, _reactRedux.useSelector)(s => s.stateCart);
|
|
35
|
+
React.useEffect(() => {
|
|
36
|
+
if (initialiseCart && domainId) {
|
|
37
|
+
if (includeTheme) {
|
|
38
|
+
(0, _store.actionFetchTheme)(domainId);
|
|
39
|
+
}
|
|
40
|
+
(0, _store.initMerchiCart)(domainId);
|
|
41
|
+
}
|
|
42
|
+
}, [domainId, includeTheme, initialiseCart]);
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
44
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CartHeader.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CartAlert.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CartNav.default, {}), fetchingCart ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.LoadingTemplate, {}) : cartSettingsInvalid ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CartPaymentSettingsInvalid, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
45
|
+
className: "merchi-tab-pane",
|
|
46
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_panels.PanelClearCart, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_panels.PanelEditCartItem, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_panels.PanelCartItems, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_panels.PanelCartShipment, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_panels.PanelClientCheckout, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_panels.PanelPaymentSuccess, {}), ![_sliceCart.tabIdItem, _sliceCart.tabIdClearCart, _sliceCart.tabIdPaymentSuccess].includes(activeTab) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
47
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CartFooter, {
|
|
48
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CartTotals.default, {})
|
|
49
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.CartFooter, {
|
|
50
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_buttons.ButtonClearCart, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_buttons.ButtonBack, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_buttons.ButtonNextDynamic, {})]
|
|
51
|
+
})]
|
|
52
|
+
})]
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
43
55
|
}
|
|
56
|
+
function Cart(props) {
|
|
57
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CartProvider.default, {
|
|
58
|
+
...props,
|
|
59
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRedux.Provider, {
|
|
60
|
+
store: _store.store,
|
|
61
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(CartComponents, {})
|
|
62
|
+
})
|
|
63
|
+
});
|
|
64
|
+
}
|
package/lib/CartAlert.js
CHANGED
|
@@ -1,15 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactRedux = require("react-redux");
|
|
8
|
+
var _reactFontawesome = require("@fortawesome/react-fontawesome");
|
|
9
|
+
var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons");
|
|
10
|
+
var _components = require("./components");
|
|
11
|
+
var _store = require("./store");
|
|
12
|
+
var _CartProvider = require("./CartProvider");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
14
|
function CartAlert() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
const {
|
|
16
|
+
classNameBtnClose
|
|
17
|
+
} = (0, _CartProvider.useCartContext)();
|
|
18
|
+
const {
|
|
19
|
+
alert
|
|
20
|
+
} = (0, _reactRedux.useSelector)(s => s.stateCartAlert);
|
|
21
|
+
const {
|
|
22
|
+
icon,
|
|
23
|
+
message,
|
|
24
|
+
show,
|
|
25
|
+
title
|
|
26
|
+
} = alert;
|
|
27
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
28
|
+
children: show && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Alert, {
|
|
29
|
+
alertType: alert.type,
|
|
30
|
+
children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
31
|
+
icon: icon
|
|
32
|
+
}), " ", /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
|
|
33
|
+
children: title
|
|
34
|
+
}), " ", message, /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
className: classNameBtnClose,
|
|
37
|
+
"data-bs-dismiss": "alert",
|
|
38
|
+
"aria-label": "Close",
|
|
39
|
+
onClick: _store.closeAlert,
|
|
40
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
41
|
+
icon: _freeSolidSvgIcons.faTimes
|
|
42
|
+
})
|
|
43
|
+
})]
|
|
44
|
+
})
|
|
45
|
+
});
|
|
14
46
|
}
|
|
15
|
-
|
|
47
|
+
var _default = exports.default = CartAlert;
|
package/lib/CartHeader.js
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactFontawesome = require("@fortawesome/react-fontawesome");
|
|
9
|
+
var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons");
|
|
10
|
+
var _CartProvider = require("./CartProvider");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
5
14
|
function CartHeader() {
|
|
6
|
-
|
|
7
|
-
|
|
15
|
+
const {
|
|
16
|
+
classNameCartHeader,
|
|
17
|
+
classNameBtnClose,
|
|
18
|
+
onClickClose
|
|
19
|
+
} = (0, _CartProvider.useCartContext)();
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21
|
+
className: classNameCartHeader,
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
23
|
+
icon: _freeSolidSvgIcons.faShoppingCart
|
|
24
|
+
}), " Shopping cart", /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
25
|
+
type: "button",
|
|
26
|
+
className: classNameBtnClose,
|
|
27
|
+
"aria-label": "Close",
|
|
28
|
+
onClick: onClickClose,
|
|
29
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFontawesome.FontAwesomeIcon, {
|
|
30
|
+
icon: _freeSolidSvgIcons.faTimes
|
|
31
|
+
})
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
8
34
|
}
|
|
9
|
-
|
|
35
|
+
var _default = exports.default = CartHeader;
|