@liquidcommerce/elements-sdk 2.7.40 → 2.7.41
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/index.checkout.esm.js +7974 -7971
- package/dist/index.esm.js +13104 -12991
- package/dist/ssr-stub.esm.js +1 -0
- package/dist/types/enums/core.enum.d.ts +1 -0
- package/dist/types/interfaces/configs/product.interface.d.ts +2 -0
- package/dist/types/modules/product/components/index.d.ts +1 -0
- package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +1 -0
- package/dist/types/modules/product/components/product-delivery-estimate.component.d.ts +11 -0
- package/dist/types/modules/product/components/product-retailers.component.d.ts +1 -0
- package/dist/types/modules/product-list/components/card-components/index.d.ts +1 -0
- package/dist/types/modules/product-list/components/card-components/product-fulfillment-text.d.ts +2 -0
- package/dist/types/modules/product-list/components/product-list-card.component.d.ts +2 -0
- package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +1 -0
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -0
- package/dist/types/utils/product.d.ts +4 -1
- package/docs/v1/api/configuration.md +4 -0
- package/docs/v1/guides/product-component.md +9 -0
- package/package.json +1 -1
package/dist/ssr-stub.esm.js
CHANGED
|
@@ -169,6 +169,7 @@ const COMPONENT_TYPE = {
|
|
|
169
169
|
PRODUCT_RETAILERS_CAROUSEL: 'product-retailers-carousel',
|
|
170
170
|
PRODUCT_RETAILERS_POPUP: 'product-retailers-popup',
|
|
171
171
|
PRODUCT_RETAILERS_POPUP_LIST: 'product-retailers-popup-list',
|
|
172
|
+
PRODUCT_DELIVERY_ESTIMATE: 'product-delivery-estimate',
|
|
172
173
|
PRODUCT_PRICE: 'product-price',
|
|
173
174
|
PRODUCT_ADD_TO_CART_SECTION: 'product-add-to-cart-section',
|
|
174
175
|
PRODUCT_DRAWER: 'product-drawer',
|
|
@@ -88,6 +88,7 @@ export declare const COMPONENT_TYPE: {
|
|
|
88
88
|
readonly PRODUCT_RETAILERS_CAROUSEL: "product-retailers-carousel";
|
|
89
89
|
readonly PRODUCT_RETAILERS_POPUP: "product-retailers-popup";
|
|
90
90
|
readonly PRODUCT_RETAILERS_POPUP_LIST: "product-retailers-popup-list";
|
|
91
|
+
readonly PRODUCT_DELIVERY_ESTIMATE: "product-delivery-estimate";
|
|
91
92
|
readonly PRODUCT_PRICE: "product-price";
|
|
92
93
|
readonly PRODUCT_ADD_TO_CART_SECTION: "product-add-to-cart-section";
|
|
93
94
|
readonly PRODUCT_DRAWER: "product-drawer";
|
|
@@ -15,6 +15,8 @@ export interface IProductLayout {
|
|
|
15
15
|
enableShippingFulfillment: boolean;
|
|
16
16
|
enableOnDemandFulfillment: boolean;
|
|
17
17
|
primaryFulfillmentMethod: FulfillmentType;
|
|
18
|
+
showOnlyOneRetailer: boolean;
|
|
19
|
+
hideRetailerName: boolean;
|
|
18
20
|
addToCartButtonText: string;
|
|
19
21
|
addToCartButtonShowTotalPrice: boolean;
|
|
20
22
|
buyNowButtonText: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './components';
|
|
2
2
|
export * from './product-add-to-cart-section.component';
|
|
3
|
+
export * from './product-delivery-estimate.component';
|
|
3
4
|
export * from './product-description.component';
|
|
4
5
|
export * from './product-drawer.component';
|
|
5
6
|
export * from './product-image-carousel.component';
|
|
@@ -17,6 +17,7 @@ export declare class ProductAddToCartSectionComponent extends BaseComponent<IAdd
|
|
|
17
17
|
afterRender(): void;
|
|
18
18
|
private getAvailableQuantity;
|
|
19
19
|
private isFulfillmentClosed;
|
|
20
|
+
private isRequiredEngravingUnavailable;
|
|
20
21
|
private isButtonLoading;
|
|
21
22
|
private calculateQuantityLimits;
|
|
22
23
|
private handleAddToCart;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import type { IProductComponent } from '@/interfaces/configs';
|
|
3
|
+
export interface IProductDeliveryEstimateComponentParams {
|
|
4
|
+
productId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class ProductDeliveryEstimateComponent extends BaseComponent<IProductDeliveryEstimateComponentParams, IProductComponent> {
|
|
7
|
+
get hostClasses(): string[];
|
|
8
|
+
constructor();
|
|
9
|
+
private getProductId;
|
|
10
|
+
protected template(): HTMLElement[];
|
|
11
|
+
}
|
|
@@ -28,6 +28,8 @@ export declare class ProductListCardComponent extends BaseComponent<IProductList
|
|
|
28
28
|
protected afterRender(): void;
|
|
29
29
|
private updatePriceDisplay;
|
|
30
30
|
private updateFulfillmentText;
|
|
31
|
+
private isRetailerNameHidden;
|
|
32
|
+
private showsDeliveryOptions;
|
|
31
33
|
private updateImage;
|
|
32
34
|
private updatePersonalizeVisibility;
|
|
33
35
|
private updateAddToCartButton;
|
package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare class ProductListProductPreCartComponent extends BaseComponent<IP
|
|
|
29
29
|
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
30
30
|
private updatePriceDisplay;
|
|
31
31
|
private updateFulfillmentText;
|
|
32
|
+
private isRetailerNameHidden;
|
|
32
33
|
private updateImage;
|
|
33
34
|
private updatePersonalizeVisibility;
|
|
34
35
|
private updateAddToCartButton;
|
|
@@ -21,6 +21,7 @@ export declare class EngravingFormComponent extends BaseComponent<IEngravingForm
|
|
|
21
21
|
private partNumber;
|
|
22
22
|
private isPresale;
|
|
23
23
|
beforeConnected(): void;
|
|
24
|
+
private canSubmit;
|
|
24
25
|
private calculateTotalPrice;
|
|
25
26
|
private productInformationSection;
|
|
26
27
|
private addToCartButtonText;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type { IProductStore } from '@/core/store/interfaces/product.interface';
|
|
1
|
+
import type { IProductFulfillmentStore, IProductSizeStore, IProductStore } from '@/core/store/interfaces/product.interface';
|
|
2
2
|
import type { IPLProductStore } from '@/core/store/interfaces/product-list.interface';
|
|
3
3
|
import { type FulfillmentType } from '@/enums';
|
|
4
4
|
import type { IProduct, IProductAvailabilityResponse } from '@/interfaces/api/product.interface';
|
|
5
|
+
import type { IProductLayout } from '@/interfaces/configs';
|
|
6
|
+
export declare function engravingFulfillmentFor(size: Pick<IProductSizeStore, 'shippingFulfillments'> | undefined, selectedFulfillmentId: string | null | undefined): IProductFulfillmentStore | null;
|
|
7
|
+
export declare function isRetailerNameHidden(layout: Pick<IProductLayout, 'showOnlyOneRetailer' | 'hideRetailerName'> | undefined): boolean;
|
|
5
8
|
export interface IPrepareApiProductForStoreParams {
|
|
6
9
|
context: 'product-list' | 'product-page';
|
|
7
10
|
product: IProduct;
|
|
@@ -204,6 +204,8 @@ interface IProductLayout {
|
|
|
204
204
|
enableShippingFulfillment: boolean;
|
|
205
205
|
enableOnDemandFulfillment: boolean;
|
|
206
206
|
primaryFulfillmentMethod: 'shipping' | 'onDemand';
|
|
207
|
+
showOnlyOneRetailer: boolean;
|
|
208
|
+
hideRetailerName: boolean;
|
|
207
209
|
addToCartButtonText: string;
|
|
208
210
|
addToCartButtonShowTotalPrice: boolean;
|
|
209
211
|
buyNowButtonText: string;
|
|
@@ -227,6 +229,8 @@ interface IProductLayout {
|
|
|
227
229
|
| `enableShippingFulfillment` | `boolean` | Enable shipping fulfillment option |
|
|
228
230
|
| `enableOnDemandFulfillment` | `boolean` | Enable on-demand delivery option |
|
|
229
231
|
| `primaryFulfillmentMethod` | `'shipping' \| 'onDemand'` | Fulfillment method shown first and selected by default; falls back to the other enabled method when it has no availability |
|
|
232
|
+
| `showOnlyOneRetailer` | `boolean` | Admin setting. Availability is narrowed server-side to one shipping and one on-demand retailer per product |
|
|
233
|
+
| `hideRetailerName` | `boolean` | Admin setting, honoured only with `showOnlyOneRetailer`. Availability is narrowed to one retailer and one delivery method per size, and the product component and product list show only its delivery estimate (e.g. "Ships in 2-3 days") instead of the retailer choice. Cart and checkout still show the retailer |
|
|
230
234
|
| `addToCartButtonText` | `string` | Custom text for add-to-cart button |
|
|
231
235
|
| `addToCartButtonShowTotalPrice` | `boolean` | Show total price on add-to-cart button |
|
|
232
236
|
| `buyNowButtonText` | `string` | Custom text for buy-now button |
|
|
@@ -211,6 +211,15 @@ For products with multiple retailers:
|
|
|
211
211
|
- Opens a plain, scrollable list of the available delivery/retailer options
|
|
212
212
|
- No filtering or search — select a retailer from the list to choose it
|
|
213
213
|
|
|
214
|
+
**Delivery Estimate Only**
|
|
215
|
+
- Used when the `showOnlyOneRetailer` and `hideRetailerName` admin settings are both on
|
|
216
|
+
- Each size arrives with a single retailer and a single delivery method, so there is nothing to choose
|
|
217
|
+
- Shows only the delivery estimate, e.g. "Ships in 2-3 days" or "Arrives in 60 minutes", and never the retailer name; the engraving form does the same
|
|
218
|
+
- Product list cards and their pre-cart follow the same settings: the "Ships from" line shows the estimate instead, and the "Delivery Options" button is not shown
|
|
219
|
+
- The retailer is still shown in the cart and checkout
|
|
220
|
+
|
|
221
|
+
Both settings are made in the LiquidCommerce admin, because the narrowing happens in the availability response. Setting them through `customTheme` changes the display only: the shopper would see one estimate while the store still holds every retailer.
|
|
222
|
+
|
|
214
223
|
### Personalization/Engraving
|
|
215
224
|
|
|
216
225
|
For products that support personalization:
|
package/package.json
CHANGED