@liquidcommerce/elements-sdk 2.4.4 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +28 -0
  2. package/dist/index.esm.js +11198 -9788
  3. package/dist/types/constants/core.constant.d.ts +32 -0
  4. package/dist/types/constants/index.d.ts +0 -1
  5. package/dist/types/{modules/api-client → core}/api-client.service.d.ts +4 -2
  6. package/dist/types/core/auth.service.d.ts +21 -0
  7. package/dist/types/core/base-component.service.d.ts +4 -3
  8. package/dist/types/core/client/client-action.service.d.ts +4 -2
  9. package/dist/types/core/client/client-config.service.d.ts +1 -0
  10. package/dist/types/core/command/base-command.service.d.ts +5 -3
  11. package/dist/types/core/command/command.service.d.ts +2 -0
  12. package/dist/types/core/google-tag-manager.service.d.ts +1 -2
  13. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +4 -1
  14. package/dist/types/core/pubsub/pubsub.service.d.ts +1 -1
  15. package/dist/types/core/sdk-error-handler.d.ts +1 -0
  16. package/dist/types/core/store/interfaces/core.interface.d.ts +4 -2
  17. package/dist/types/core/store/store.constant.d.ts +5 -1
  18. package/dist/types/core/store/store.service.d.ts +3 -1
  19. package/dist/types/core/utils.d.ts +0 -4
  20. package/dist/types/elements-base-client.d.ts +3 -3
  21. package/dist/types/enums/core.enum.d.ts +10 -0
  22. package/dist/types/enums/index.d.ts +0 -1
  23. package/dist/types/interfaces/cloud/catalog.interface.d.ts +43 -0
  24. package/dist/types/interfaces/cloud/index.d.ts +1 -0
  25. package/dist/types/interfaces/configs/product.interface.d.ts +2 -0
  26. package/dist/types/interfaces/core.interface.d.ts +13 -0
  27. package/dist/types/modules/cart/cart.commands.d.ts +1 -2
  28. package/dist/types/modules/cart/cart.commands.helper.d.ts +3 -2
  29. package/dist/types/modules/checkout/checkout.commands.d.ts +1 -2
  30. package/dist/types/modules/checkout/checkout.commands.helper.d.ts +1 -1
  31. package/dist/types/modules/product/components/components.d.ts +1 -1
  32. package/dist/types/modules/product/components/index.d.ts +1 -2
  33. package/dist/types/modules/product/product.commands.d.ts +2 -3
  34. package/dist/types/modules/product/utils/helpers.d.ts +1 -1
  35. package/dist/types/modules/product/utils/retailer-hours.d.ts +1 -1
  36. package/dist/types/modules/product-list/components/index.d.ts +3 -0
  37. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +7 -0
  38. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +36 -0
  39. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +21 -0
  40. package/dist/types/modules/product-list/product-list.commands.d.ts +15 -0
  41. package/dist/types/modules/product-list/product-list.component.d.ts +76 -0
  42. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +0 -2
  43. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +1 -0
  44. package/dist/types/modules/theme-provider/styles/product-list/product-list.style.d.ts +1 -0
  45. package/dist/types/modules/theme-provider/styles/ui/loading.style.d.ts +1 -0
  46. package/dist/types/modules/ui-components/alert/alert.component.d.ts +1 -1
  47. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +1 -1
  48. package/dist/types/modules/ui-components/ui.commands.d.ts +1 -1
  49. package/docs/ACTIONS.md +27 -0
  50. package/docs/TROUBLESHOOTING.md +21 -0
  51. package/package.json +12 -9
  52. package/umd/elements.js +1 -1
  53. package/dist/types/constants/z-index.constant.d.ts +0 -24
  54. package/dist/types/core/pubsub/index.d.ts +0 -2
  55. package/dist/types/core/pubsub/interfaces/index.d.ts +0 -5
  56. package/dist/types/core/store/index.d.ts +0 -2
  57. package/dist/types/core/store/interfaces/index.d.ts +0 -5
  58. package/dist/types/enums/debug.enum.d.ts +0 -6
  59. package/dist/types/modules/address/index.d.ts +0 -4
  60. package/dist/types/modules/api-client/api-client.interface.d.ts +0 -21
  61. package/dist/types/modules/api-client/index.d.ts +0 -2
  62. package/dist/types/modules/cart/index.d.ts +0 -1
  63. package/dist/types/modules/checkout/index.d.ts +0 -1
  64. package/dist/types/modules/product/constant.d.ts +0 -2
  65. package/dist/types/modules/product/index.d.ts +0 -1
  66. package/dist/types/modules/theme-provider/index.d.ts +0 -2
  67. package/dist/types/modules/ui-components/loading/index.d.ts +0 -1
  68. /package/dist/types/modules/{ui-components/loading → product/components}/product-loading.component.d.ts +0 -0
package/README.md CHANGED
@@ -791,6 +791,34 @@ const address = actions.address.getDetails();
791
791
  actions.address.clear();
792
792
  ```
793
793
 
794
+ #### Clear Address - Complete Reset
795
+
796
+ The `actions.address.clear()` action performs a comprehensive reset of the user's address and shopping session:
797
+
798
+ **What it clears:**
799
+ - ✅ **Address Data**: Removes all saved address information (street, city, state, zip, coordinates)
800
+ - ✅ **Cart Contents**: Completely resets the cart (removes all items, totals, promo codes)
801
+ - ✅ **Local Storage**: Completely removes the localStorage entry and its value
802
+ - ✅ **Database**: Deletes the persisted store from the server database
803
+ - ✅ **Checkout State**: Resets any pending checkout information
804
+
805
+ **Why it resets the cart:**
806
+ When an address is cleared, the cart must be reset because:
807
+ - Cart items have location-specific pricing and availability
808
+ - Fulfillment options are tied to specific addresses
809
+ - Delivery fees and shipping costs depend on location
810
+ - Without a valid address, cart operations would fail or show incorrect data
811
+
812
+ **Events fired:**
813
+ - `lce:actions.address_cleared` - Address successfully cleared
814
+ - `lce:actions.cart_reset` - Cart successfully reset
815
+
816
+ **Use cases:**
817
+ - Guest checkout option (clear previous user's data)
818
+ - Location change (start fresh with new address)
819
+ - Privacy compliance (complete data removal)
820
+ - Testing/development (reset to clean state)
821
+
794
822
  **Notes**:
795
823
  - To find Google Places IDs for the `setAddressByPlacesId` action, use the [Google Places ID Finder](https://developers.google.com/maps/documentation/places/web-service/place-id#find-id)
796
824
  - The `setAddressManually` action automatically generates a Google Places API-formatted address string from the provided components