@liquidcommerce/elements-sdk 2.6.0-beta.6 → 2.6.0-beta.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -2519
- package/dist/index.checkout.esm.js +16576 -0
- package/dist/index.esm.js +23632 -21083
- package/dist/ssr-stub.checkout.esm.js +18 -0
- package/dist/ssr-stub.esm.js +270 -0
- package/dist/types/auto-initialize/checkout.d.ts +2 -0
- package/dist/types/auto-initialize/shared-utils.d.ts +46 -0
- package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +15 -2
- package/dist/types/clients/builder.d.ts +3 -0
- package/dist/types/clients/checkout.d.ts +6 -0
- package/dist/types/{elements-client-helper.d.ts → clients/helpers.d.ts} +2 -1
- package/dist/types/clients/main.d.ts +3 -0
- package/dist/types/constants/core.constant.d.ts +2 -6
- package/dist/types/core/api/api-client.service.d.ts +21 -20
- package/dist/types/core/api/api-result.d.ts +19 -0
- package/dist/types/core/api/auth-client.service.d.ts +40 -13
- package/dist/types/core/api/http-client.service.d.ts +0 -1
- package/dist/types/core/base-component.service.d.ts +2 -1
- package/dist/types/core/client/actions/base-action.service.d.ts +15 -0
- package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
- package/dist/types/core/client/actions/client-cart-action.service.d.ts +37 -0
- package/dist/types/core/client/actions/client-checkout-action.service.d.ts +56 -0
- package/dist/types/core/client/actions/client-product-action.service.d.ts +15 -0
- package/dist/types/core/client/client-action.service.d.ts +6 -70
- package/dist/types/core/client/client-config.service.d.ts +8 -2
- package/dist/types/core/command/common-command.service.d.ts +2 -1
- package/dist/types/core/google-tag-manager.service.d.ts +4 -1
- package/dist/types/core/logger/logger.service.d.ts +1 -1
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +45 -50
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +9 -4
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -75
- package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
- package/dist/types/core/singleton-manager.service.d.ts +12 -8
- package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -56
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +17 -108
- package/dist/types/core/store/interfaces/core.interface.d.ts +14 -3
- package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
- package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
- package/dist/types/core/store/interfaces/product.interface.d.ts +1 -0
- package/dist/types/core/store/store.constant.d.ts +5 -0
- package/dist/types/core/store/store.service.d.ts +1 -0
- package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
- package/dist/types/enums/core.enum.d.ts +39 -1
- package/dist/types/enums/index.d.ts +0 -1
- package/dist/types/index.checkout.d.ts +8 -0
- package/dist/types/index.checkout.umd.d.ts +4 -0
- package/dist/types/index.d.ts +8 -3
- package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
- package/dist/types/interfaces/api/checkout.interface.d.ts +238 -0
- package/dist/types/interfaces/api/index.d.ts +5 -0
- package/dist/types/interfaces/api/product-list.interface.d.ts +39 -0
- package/dist/types/interfaces/api/product.interface.d.ts +9 -4
- package/dist/types/interfaces/client.interface.d.ts +72 -0
- package/dist/types/interfaces/component.interface.d.ts +7 -0
- package/dist/types/interfaces/config.interface.d.ts +41 -0
- package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/cart.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/checkout.interface.d.ts +2 -1
- package/dist/types/interfaces/configs/global.interface.d.ts +5 -3
- package/dist/types/interfaces/configs/index.d.ts +1 -0
- package/dist/types/interfaces/configs/product-list.interface.d.ts +47 -0
- package/dist/types/interfaces/configs/product.interface.d.ts +2 -1
- package/dist/types/interfaces/injection.interface.d.ts +47 -0
- package/dist/types/modules/address/address.command.d.ts +2 -1
- package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/cart/cart.commands.d.ts +4 -5
- package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
- package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
- package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
- package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/checkout/checkout.commands.d.ts +23 -9
- package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
- package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +3 -0
- package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
- package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
- package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
- package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
- package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +2 -1
- package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
- package/dist/types/modules/checkout/constant.d.ts +3 -0
- package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/product/components/product-image-carousel.component.d.ts +3 -0
- package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +3 -0
- package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +5 -2
- package/dist/types/modules/product/product.commands.d.ts +2 -3
- package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/product-list/components/card-components/index.d.ts +5 -0
- package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
- package/dist/types/modules/product-list/components/card-components/product-button.d.ts +9 -0
- package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +13 -0
- package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +9 -0
- package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +13 -0
- package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +14 -0
- package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-price-filter.components.d.ts → filter-components/product-list-price-filter.d.ts} +1 -1
- package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
- package/dist/types/modules/product-list/components/index.d.ts +6 -2
- package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +2 -1
- package/dist/types/modules/product-list/components/product-list-card.component.d.ts +27 -30
- package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +55 -36
- package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
- package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +47 -0
- package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-search.component.d.ts → product-list-search.component.d.ts} +11 -4
- package/dist/types/modules/product-list/product-list-filter.utils.d.ts +8 -0
- package/dist/types/modules/product-list/product-list.commands.d.ts +23 -8
- package/dist/types/modules/product-list/product-list.component.d.ts +10 -45
- package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
- package/dist/types/modules/product-list/product-list.interface.d.ts +20 -35
- package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
- package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
- package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
- package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
- package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
- package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
- package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +1 -0
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +6 -1
- package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +5 -1
- package/dist/types/modules/ui-components/input/index.d.ts +0 -1
- package/dist/types/modules/ui-components/input/input.component.d.ts +8 -1
- package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
- package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
- package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
- package/dist/types/modules/ui-components/ui.commands.d.ts +5 -1
- package/dist/types/ssr/stub.checkout.d.ts +6 -0
- package/dist/types/ssr/stub.d.ts +10 -0
- package/dist/types/static/icon/check.icon.d.ts +2 -0
- package/dist/types/static/icon/index.d.ts +1 -0
- package/dist/types/utils/dom-compat.d.ts +2 -0
- package/dist/types/utils/format.d.ts +0 -14
- package/dist/types/utils/product-selection.d.ts +16 -0
- package/dist/types/utils/product.d.ts +10 -0
- package/docs/v1/README.md +210 -0
- package/docs/v1/api/actions/address-actions.md +281 -0
- package/docs/v1/api/actions/cart-actions.md +337 -0
- package/docs/v1/api/actions/checkout-actions.md +387 -0
- package/docs/v1/api/actions/product-actions.md +115 -0
- package/docs/v1/api/client.md +482 -0
- package/docs/v1/api/configuration.md +1 -0
- package/docs/v1/api/injection-methods.md +247 -0
- package/docs/v1/api/typescript-types.md +1 -0
- package/docs/v1/api/ui-helpers.md +200 -0
- package/docs/v1/examples/advanced-patterns.md +96 -0
- package/docs/v1/examples/checkout-flow.md +91 -0
- package/docs/v1/examples/custom-theming.md +63 -0
- package/docs/v1/examples/multi-product-page.md +90 -0
- package/docs/v1/examples/simple-product-page.md +89 -0
- package/docs/v1/getting-started/concepts.md +507 -0
- package/docs/v1/getting-started/installation.md +328 -0
- package/docs/v1/getting-started/quick-start.md +405 -0
- package/docs/v1/guides/address-component.md +431 -0
- package/docs/v1/guides/best-practices.md +324 -0
- package/docs/v1/guides/cart-component.md +737 -0
- package/docs/v1/guides/checkout-component.md +672 -0
- package/docs/v1/guides/events.md +926 -0
- package/docs/v1/guides/product-component.md +686 -0
- package/docs/v1/guides/product-list-component.md +598 -0
- package/docs/v1/guides/theming.md +216 -0
- package/docs/v1/integration/angular.md +39 -0
- package/docs/v1/integration/laravel.md +41 -0
- package/docs/v1/integration/nextjs.md +69 -0
- package/docs/v1/integration/proxy-setup.md +89 -0
- package/docs/v1/integration/react.md +64 -0
- package/docs/v1/integration/vanilla-js.md +84 -0
- package/docs/v1/integration/vue.md +58 -0
- package/docs/v1/reference/browser-support.md +44 -0
- package/docs/v1/reference/error-handling.md +70 -0
- package/docs/v1/reference/performance.md +54 -0
- package/docs/v1/reference/troubleshooting.md +72 -0
- package/package.json +28 -17
- package/dist/types/elements-builder-client.d.ts +0 -2
- package/dist/types/elements-client.d.ts +0 -2
- package/dist/types/enums/cloud.enum.d.ts +0 -106
- package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
- package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -42
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -211
- package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
- package/dist/types/interfaces/cloud/index.d.ts +0 -5
- package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
- package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
- package/dist/types/interfaces/core.interface.d.ts +0 -111
- package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
- package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
- package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
- package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
- package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
- package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
- package/dist/types/utils/helper.d.ts +0 -27
- package/docs/ACTIONS.md +0 -1300
- package/docs/BROWSER_SUPPORT.md +0 -279
- package/docs/CONFIGURATION.md +0 -853
- package/docs/DOCUMENTATION_INDEX.md +0 -311
- package/docs/EVENTS.md +0 -798
- package/docs/PROXY.md +0 -228
- package/docs/THEMING.md +0 -592
- package/docs/TROUBLESHOOTING.md +0 -793
- package/umd/elements.js +0 -1
- /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
- /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
- /package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts → filter-components/product-list-checkbox-filter.d.ts} +0 -0
- /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
-
import type {
|
|
3
|
-
import type { ProductListCardVariantType } from '@/interfaces/core.interface';
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
import type { IProductListComponent } from '@/interfaces/configs';
|
|
4
3
|
export interface IProductListCardParams {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
product: IProduct;
|
|
8
|
-
shippingFulfillment: IFulfillment | null;
|
|
9
|
-
onDemandFulfillment: IFulfillment | null;
|
|
4
|
+
slug: string;
|
|
5
|
+
productId: string;
|
|
10
6
|
productUrl?: string;
|
|
11
7
|
}
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export interface IProductVariantParams {
|
|
23
|
-
image: string;
|
|
24
|
-
name: string;
|
|
25
|
-
size: string | null;
|
|
26
|
-
price: number;
|
|
27
|
-
availability: IProductAvailabilityData;
|
|
28
|
-
}
|
|
29
|
-
export declare class ProductListCardComponent extends BaseComponent<IProductListCardParams> {
|
|
8
|
+
export declare class ProductListCardComponent extends BaseComponent<IProductListCardParams, IProductListComponent> {
|
|
9
|
+
private imageElement;
|
|
10
|
+
private priceElement;
|
|
11
|
+
private personalizeElement;
|
|
12
|
+
private fulfillmentTextElement;
|
|
13
|
+
private addToCartButton;
|
|
14
|
+
private previousSelectedSizeId;
|
|
15
|
+
private previousSelectedFulfillmentId;
|
|
16
|
+
constructor();
|
|
17
|
+
private getListConfig;
|
|
30
18
|
get hostClasses(): string[];
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
private
|
|
19
|
+
protected disconnected?(): void;
|
|
20
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
21
|
+
private getSelectedSize;
|
|
34
22
|
protected template(): HTMLElement[];
|
|
23
|
+
private updatePriceDisplay;
|
|
24
|
+
private updateFulfillmentText;
|
|
25
|
+
private updateImage;
|
|
26
|
+
private updatePersonalizeVisibility;
|
|
27
|
+
private updateAddToCartButton;
|
|
35
28
|
private generateProductUrl;
|
|
36
|
-
private
|
|
29
|
+
private createImageSection;
|
|
30
|
+
private createContentSection;
|
|
31
|
+
private createFulfillmentSectionWrapper;
|
|
32
|
+
private createFulfillmentTextSection;
|
|
33
|
+
private createAddToCartSection;
|
|
37
34
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import type { IProductListComponent } from '@/interfaces/configs';
|
|
3
|
+
import type { IEngravingFormComponentParams } from '@/modules/ui-components/engraving';
|
|
4
|
+
interface IProductListEngravingParams extends IEngravingFormComponentParams {
|
|
5
|
+
slug: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class ProductListEngravingComponent extends BaseComponent<IProductListEngravingParams, IProductListComponent> {
|
|
8
|
+
private getListConfig;
|
|
9
|
+
protected template(): HTMLElement[];
|
|
10
|
+
private createHeader;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -1,43 +1,62 @@
|
|
|
1
1
|
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ProductListFilterType } from '@/interfaces/injection.interface';
|
|
3
3
|
export interface IProductListFiltersParams {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
enableDeliveryOptions: boolean;
|
|
7
|
-
sanitizedFilters?: IExtendedFilterSchema[];
|
|
8
|
-
currentFilters?: ICurrentFilters;
|
|
9
|
-
priceConfig?: IPriceConfig;
|
|
10
|
-
isDrawerMode?: boolean;
|
|
11
|
-
onPersonalizedChange?: (enabled: boolean) => void;
|
|
12
|
-
onPreOrderChange?: (enabled: boolean) => void;
|
|
13
|
-
onDeliveryOptionsChange?: (value: 'all' | 'shipping' | 'onDemand') => void;
|
|
14
|
-
onPriceChange?: (min: string, max: string) => void;
|
|
15
|
-
onCheckboxFilterChange?: (filterCategory: string, selectedValues: string[]) => void;
|
|
16
|
-
onApplyFilters?: () => void;
|
|
4
|
+
slug: string;
|
|
5
|
+
filters: ProductListFilterType[];
|
|
17
6
|
}
|
|
18
7
|
export declare class ProductListFiltersComponent extends BaseComponent<IProductListFiltersParams> {
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
private
|
|
25
|
-
private
|
|
26
|
-
private
|
|
27
|
-
private
|
|
8
|
+
private readonly FILTER_DEBOUNCE_DELAY_MS;
|
|
9
|
+
private isRenderedInDrawerMode;
|
|
10
|
+
private permanentFilters;
|
|
11
|
+
private availableDynamicFilters;
|
|
12
|
+
private checkboxFilterStateMap;
|
|
13
|
+
private isPriceFilterCollapsed;
|
|
14
|
+
private isFulfillmentFilterCollapsed;
|
|
15
|
+
private appliedFiltersChipsContainer;
|
|
16
|
+
private engravingFiltersContainer?;
|
|
17
|
+
private fulfillmentFilterContainer?;
|
|
18
|
+
private priceFiltersContainer?;
|
|
19
|
+
private dynamicFiltersContainer?;
|
|
20
|
+
private filterButtonContainer?;
|
|
21
|
+
private fulfillmentOptionsList?;
|
|
22
|
+
private priceFilterChevronIcon?;
|
|
23
|
+
private fulfillmentFilterChevronIcon?;
|
|
24
|
+
private priceSliderWrapper?;
|
|
25
|
+
private boundDrawerClosedHandler;
|
|
26
|
+
private priceFilterDebounceTimer;
|
|
27
|
+
constructor();
|
|
28
28
|
get hostClasses(): string[];
|
|
29
|
-
|
|
30
|
-
private
|
|
31
|
-
|
|
32
|
-
private
|
|
33
|
-
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
private
|
|
37
|
-
private
|
|
38
|
-
private
|
|
39
|
-
private
|
|
40
|
-
private
|
|
41
|
-
private toggleCheckboxFilter;
|
|
29
|
+
protected connected(): Promise<void>;
|
|
30
|
+
private setupDrawerCloseListener;
|
|
31
|
+
protected disconnected(): void;
|
|
32
|
+
private detectIfRenderedInDrawer;
|
|
33
|
+
onStoreWatch(): void;
|
|
34
|
+
private syncFiltersFromStore;
|
|
35
|
+
private createFilterSection;
|
|
36
|
+
private rebuildContainer;
|
|
37
|
+
private refreshUIStates;
|
|
38
|
+
private transformFilterValue;
|
|
39
|
+
private fetchFilters;
|
|
40
|
+
private applyFiltersAndCloseDrawer;
|
|
42
41
|
protected template(): HTMLElement[];
|
|
42
|
+
private buildFilterButton;
|
|
43
|
+
private openFilterDrawer;
|
|
44
|
+
private buildFilterHeader;
|
|
45
|
+
private clearAllActiveFilters;
|
|
46
|
+
private removeSingleFilter;
|
|
47
|
+
private getFilteredAndSanitizedFilters;
|
|
48
|
+
private buildAppliedFiltersChipsContainer;
|
|
49
|
+
private handleFilterChange;
|
|
50
|
+
private isEngravingCurrentlyDisabled;
|
|
51
|
+
private buildEngravingFilterElements;
|
|
52
|
+
private isSameDayDeliveryCurrentlyDisabled;
|
|
53
|
+
private toggleFulfillmentFilterCollapse;
|
|
54
|
+
private buildFulfillmentFilterElements;
|
|
55
|
+
private togglePriceFilterCollapse;
|
|
56
|
+
private buildPriceFilterElements;
|
|
57
|
+
private buildDynamicFiltersElements;
|
|
58
|
+
private buildCheckboxFilterElements;
|
|
59
|
+
private toggleCheckboxFilterExpansion;
|
|
60
|
+
private renderCheckboxItemsForFilter;
|
|
61
|
+
private handleCheckboxSelectionChange;
|
|
43
62
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import type { IProductListComponent } from '@/interfaces/configs';
|
|
3
|
+
export interface IProductListProductEngravingLinesComponentParams {
|
|
4
|
+
slug: string;
|
|
5
|
+
identifier: string;
|
|
6
|
+
lines: string[];
|
|
7
|
+
maxLines: number;
|
|
8
|
+
maxCharsPerLine: number;
|
|
9
|
+
location?: string;
|
|
10
|
+
fee: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class ProductListProductEngravingLinesComponent extends BaseComponent<IProductListProductEngravingLinesComponentParams, IProductListComponent> {
|
|
13
|
+
private engravingLines;
|
|
14
|
+
private addEngravingButton;
|
|
15
|
+
constructor();
|
|
16
|
+
protected disconnected?(): void;
|
|
17
|
+
template(): HTMLElement;
|
|
18
|
+
private engravingLinesSection;
|
|
19
|
+
private actionButtonsSection;
|
|
20
|
+
private calculateTotalPrice;
|
|
21
|
+
private addToCartButtonText;
|
|
22
|
+
}
|
package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
+
import type { IProductListComponent } from '@/interfaces/configs';
|
|
3
|
+
export interface IProductListProductPreCartComponentParams {
|
|
4
|
+
slug: string;
|
|
5
|
+
productId: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class ProductListProductPreCartComponent extends BaseComponent<IProductListProductPreCartComponentParams, IProductListComponent> {
|
|
8
|
+
private showRetailersContent;
|
|
9
|
+
private showEngravingForm;
|
|
10
|
+
private isInitialRender;
|
|
11
|
+
private priceElement;
|
|
12
|
+
private imageElement;
|
|
13
|
+
private fulfillmentTextElement;
|
|
14
|
+
private addToCartButton;
|
|
15
|
+
private personalizeElement;
|
|
16
|
+
private previousSelectedSizeId;
|
|
17
|
+
private previousSelectedFulfillmentId;
|
|
18
|
+
constructor();
|
|
19
|
+
private getListConfig;
|
|
20
|
+
protected afterRender?(): void;
|
|
21
|
+
private handleRetailersBack;
|
|
22
|
+
private handleEngravingBack;
|
|
23
|
+
private handleEngravingEdit;
|
|
24
|
+
protected disconnected?(): void;
|
|
25
|
+
private getSelectedSize;
|
|
26
|
+
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
27
|
+
private updatePriceDisplay;
|
|
28
|
+
private updateFulfillmentText;
|
|
29
|
+
private updateImage;
|
|
30
|
+
private updatePersonalizeVisibility;
|
|
31
|
+
private updateAddToCartButton;
|
|
32
|
+
private getEngravingFee;
|
|
33
|
+
protected template(): HTMLElement[];
|
|
34
|
+
private createEngravingFormContent;
|
|
35
|
+
private renderPreCartContent;
|
|
36
|
+
private createDeliversToSectionWrapper;
|
|
37
|
+
private createShippingFromSectionWrapper;
|
|
38
|
+
private createDescriptionSection;
|
|
39
|
+
private createCartHeader;
|
|
40
|
+
private createImageSection;
|
|
41
|
+
private createPricePersonalizationSection;
|
|
42
|
+
private createDeliversToSection;
|
|
43
|
+
private createFulfillmentSectionWrapper;
|
|
44
|
+
private createFulfillmentTextSection;
|
|
45
|
+
private createAddToCartSection;
|
|
46
|
+
private handleAddToCart;
|
|
47
|
+
}
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { BaseComponent } from '@/core/base-component.service';
|
|
2
2
|
export interface IProductListSearchParams {
|
|
3
|
-
|
|
4
|
-
handleInputChange?: (search: string) => void;
|
|
5
|
-
clearSearch?: VoidFunction;
|
|
3
|
+
slug: string;
|
|
6
4
|
}
|
|
7
5
|
export declare class ProductListSearchComponent extends BaseComponent<IProductListSearchParams> {
|
|
8
6
|
private searchInput?;
|
|
9
7
|
private clearButton?;
|
|
8
|
+
private debounceTimer;
|
|
9
|
+
private currentSearchTerm;
|
|
10
10
|
private readonly ALLOWED_CHARACTERS;
|
|
11
11
|
private readonly MAX_LENGTH;
|
|
12
|
+
private readonly DEFAULT_DEBOUNCE_MS;
|
|
12
13
|
get hostClasses(): string[];
|
|
14
|
+
disconnectedCallback(): void;
|
|
15
|
+
private fetchProducts;
|
|
13
16
|
protected template(): HTMLElement[];
|
|
14
|
-
private
|
|
17
|
+
private handleDebouncedSearch;
|
|
18
|
+
private handleClearSearch;
|
|
19
|
+
private cleanInput;
|
|
20
|
+
private normalizeForSearch;
|
|
15
21
|
private updateClearButtonVisibility;
|
|
22
|
+
private cleanupDebounceTimer;
|
|
16
23
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IFilterSchema, IProductSearchParams } from '@/interfaces/api/product-list.interface';
|
|
2
|
+
import type { ProductListFilterType } from '@/interfaces/injection.interface';
|
|
3
|
+
import type { IExtendedFilterSchema, IProductListFilters } from './product-list.interface';
|
|
4
|
+
export declare const FILTER_TYPE_MAP: Record<string, string>;
|
|
5
|
+
export declare function getSanitizedFilters(filters: IFilterSchema[], configuredFilters: ProductListFilterType[]): IExtendedFilterSchema[];
|
|
6
|
+
export declare function syncFiltersToAppliedFormat(filters: IProductListFilters): Record<string, string[]>;
|
|
7
|
+
export declare function buildSearchParams(slug: string, page: number, perPage: number, searchTerm: string, currentFilters: IProductListFilters, configuredFilters: ProductListFilterType[]): IProductSearchParams;
|
|
8
|
+
export declare function buildCurrentFiltersFromState(stateFilters: Record<string, string[]>): IProductListFilters;
|
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
import { BaseCommand } from '@/core/command/base-command.service';
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
2
|
+
import { type FulfillmentType } from '@/enums';
|
|
3
|
+
import type { IFilterSchema, INavigationResponse, IProductSearchParams, IProductSearchResponse } from '@/interfaces/api/product-list.interface';
|
|
4
|
+
import type { ProductListFilterType } from '@/interfaces/injection.interface';
|
|
4
5
|
import { type AddItemParams } from '@/modules/cart/cart.commands';
|
|
6
|
+
import type { IExtendedFilterSchema, ILoadInitialProductsParams, IPagination, IProductListFilters } from './product-list.interface';
|
|
5
7
|
export declare class ProductListCommands extends BaseCommand {
|
|
6
8
|
private readonly uiCommands;
|
|
7
9
|
private readonly cartCommands;
|
|
8
10
|
constructor();
|
|
9
11
|
static getInstance(): ProductListCommands;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
initializeListStore(slug: string): void;
|
|
13
|
+
updateSearchTerm(slug: string, searchTerm: string): void;
|
|
14
|
+
setLoading(slug: string, isLoading: boolean): void;
|
|
15
|
+
rerenderProductLists(): void;
|
|
16
|
+
loadInitialProducts({ slug, page, perPage, searchTerm, currentFilters, configuredFilters, }: ILoadInitialProductsParams): Promise<void>;
|
|
17
|
+
loadMoreProducts(slug: string, perPage: number, searchTerm: string, currentFilters: IProductListFilters, configuredFilters: ProductListFilterType[]): Promise<void>;
|
|
18
|
+
getProductList(params: IProductSearchParams): Promise<IProductSearchResponse>;
|
|
19
|
+
syncFiltersFromComponent(slug: string, filters: IProductListFilters): void;
|
|
20
|
+
getSanitizedFilters(filters: IFilterSchema[], configuredFilters: ProductListFilterType[]): IExtendedFilterSchema[];
|
|
21
|
+
setGridConfig(slug: string, rows: number, columns: number): void;
|
|
22
|
+
getItemsPerPage(slug: string): number;
|
|
23
|
+
updatePagination(navigation: INavigationResponse | undefined): IPagination;
|
|
24
|
+
createInitialPagination(): IPagination;
|
|
25
|
+
addToCart(slug: string, productId: string, params: AddItemParams): Promise<void>;
|
|
26
|
+
selectSize(slug: string, productId: string, sizeId: string): Promise<void>;
|
|
27
|
+
changeFulfillmentType: (slug: string, productId: string, newFulfillmentType: FulfillmentType) => Promise<void>;
|
|
28
|
+
selectFulfillment: (slug: string, productId: string, selectedFulfillmentId: string) => Promise<void>;
|
|
29
|
+
updateQuantity: (slug: string, productId: string, quantity: number) => void;
|
|
30
|
+
saveEngravingLines(slug: string, productId: string, engravingLines: string[]): void;
|
|
16
31
|
}
|
|
@@ -1,73 +1,36 @@
|
|
|
1
1
|
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
-
import type {
|
|
2
|
+
import type { IProductListComponent } from '@/interfaces/configs';
|
|
3
|
+
import type { ProductListFilterType } from '@/interfaces/injection.interface';
|
|
3
4
|
export interface IProductListComponentParams {
|
|
4
|
-
|
|
5
|
+
slug: string;
|
|
5
6
|
rows: number;
|
|
6
7
|
columns: number;
|
|
7
|
-
fillCard: boolean;
|
|
8
8
|
filters: ProductListFilterType[];
|
|
9
9
|
productUrl?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare class ProductListComponent extends BaseComponent<IProductListComponentParams> {
|
|
11
|
+
export declare class ProductListComponent extends BaseComponent<IProductListComponentParams, IProductListComponent> {
|
|
12
12
|
private products;
|
|
13
|
-
private retailers;
|
|
14
13
|
private pagination;
|
|
15
|
-
private filters;
|
|
16
|
-
private searchFilter;
|
|
17
|
-
private currentFilters;
|
|
18
14
|
private cardsContainer;
|
|
19
|
-
private filtersContainer;
|
|
20
|
-
private searchContainer;
|
|
21
15
|
private sentinelElement;
|
|
22
|
-
private personalizedSwitch;
|
|
23
|
-
private preOrderSwitch;
|
|
24
|
-
private deliveryRadios;
|
|
25
|
-
private deliveryRadioLabels;
|
|
26
16
|
private loadingState;
|
|
27
17
|
private scrollObserver;
|
|
28
18
|
private initializationPromise;
|
|
29
|
-
private
|
|
30
|
-
private readonly FILTER_DEBOUNCE_MS;
|
|
31
|
-
private filterButton;
|
|
19
|
+
private unsubscribeFromState?;
|
|
32
20
|
get hostClasses(): string[];
|
|
33
21
|
constructor();
|
|
34
22
|
protected connected(): Promise<void>;
|
|
35
|
-
|
|
23
|
+
disconnected(): void;
|
|
36
24
|
private initializeComponent;
|
|
37
|
-
|
|
25
|
+
private toProductArray;
|
|
38
26
|
private setLoadingState;
|
|
39
27
|
private renderCurrentState;
|
|
40
28
|
private loadInitialProducts;
|
|
41
|
-
private updateFiltersComponent;
|
|
42
29
|
private loadMoreProducts;
|
|
43
|
-
private mergeRetailers;
|
|
44
|
-
private updatePagination;
|
|
45
|
-
private buildApiParams;
|
|
46
|
-
private buildFiltersFromState;
|
|
47
|
-
private syncFiltersFromResponse;
|
|
48
|
-
private onFilterChange;
|
|
49
|
-
private resetPagination;
|
|
50
|
-
private updateFiltersUI;
|
|
51
|
-
private updatePersonalizedSwitch;
|
|
52
|
-
private updatePreOrderSwitch;
|
|
53
|
-
private updateDeliveryOptions;
|
|
54
|
-
private updateRadioLabel;
|
|
55
|
-
private isPersonalizationDisabled;
|
|
56
|
-
private isPreOrderDisabled;
|
|
57
|
-
private isSameDayDeliveryDisabled;
|
|
58
30
|
private createCardsContainer;
|
|
59
|
-
private getResponsiveColumns;
|
|
60
31
|
private renderLoadingState;
|
|
61
32
|
private renderProducts;
|
|
62
33
|
private appendNewProducts;
|
|
63
|
-
private createProductCard;
|
|
64
|
-
private filterSanitizedFilters;
|
|
65
|
-
private buildFiltersParams;
|
|
66
|
-
private createSearchContainer;
|
|
67
|
-
private createFiltersContainer;
|
|
68
|
-
private storeFilterElementReferences;
|
|
69
|
-
private openFiltersDrawer;
|
|
70
|
-
private createFilterButton;
|
|
71
34
|
private setupInfiniteScroll;
|
|
72
35
|
private createScrollSentinel;
|
|
73
36
|
private updateSentinel;
|
|
@@ -79,6 +42,8 @@ export declare class ProductListComponent extends BaseComponent<IProductListComp
|
|
|
79
42
|
private showErrorState;
|
|
80
43
|
private clearCardsContainer;
|
|
81
44
|
private cleanupScrollObserver;
|
|
82
|
-
onStoreWatch(changes: IOnStoreChanged[]): Promise<void>;
|
|
83
45
|
private doCleanup;
|
|
46
|
+
onStoreWatch(changes: IOnStoreChanged[]): Promise<void>;
|
|
47
|
+
onStoreChanged(): boolean;
|
|
48
|
+
protected template(): HTMLElement[];
|
|
84
49
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const FILTER_KEYS: {
|
|
2
|
+
readonly BRANDS: "brands";
|
|
3
|
+
readonly FLAVOR: "flavor";
|
|
4
|
+
readonly FULFILLMENT: "fulfillment";
|
|
5
|
+
readonly TAGS: "tags";
|
|
6
|
+
readonly REGION: "region";
|
|
7
|
+
readonly VARIETY: "variety";
|
|
8
|
+
readonly ENGRAVING: "engraving";
|
|
9
|
+
readonly PRICE: "price";
|
|
10
|
+
readonly AVAILABILITY: "availability";
|
|
11
|
+
readonly CATEGORIES: "categories";
|
|
12
|
+
readonly SIZES: "sizes";
|
|
13
|
+
readonly COLORS: "colors";
|
|
14
|
+
readonly APPELLATION: "appellation";
|
|
15
|
+
readonly COUNTRY: "country";
|
|
16
|
+
readonly VINTAGE: "vintage";
|
|
17
|
+
readonly MATERIALS: "materials";
|
|
18
|
+
readonly COLLECTION_TAGS: "collectionTags";
|
|
19
|
+
};
|
|
20
|
+
export declare const FULFILLMENT_OPTIONS: {
|
|
21
|
+
readonly ALL: "all";
|
|
22
|
+
readonly SHIPPING: "shipping";
|
|
23
|
+
readonly ON_DEMAND: "onDemand";
|
|
24
|
+
};
|
|
25
|
+
export declare const PRICE_OPTIONS: {
|
|
26
|
+
readonly MIN: "0";
|
|
27
|
+
readonly MAX: "1000";
|
|
28
|
+
};
|
|
29
|
+
export declare const FILTER_VALUE_OPTIONS: {
|
|
30
|
+
readonly YES: "YES";
|
|
31
|
+
readonly NO: "NO";
|
|
32
|
+
};
|
|
33
|
+
export declare const FILTER_LOADING_STATE: {
|
|
34
|
+
readonly IDLE: "idle";
|
|
35
|
+
readonly LOADING_INITIAL: "loading_initial";
|
|
36
|
+
readonly LOADING_MORE: "loading_more";
|
|
37
|
+
readonly ERROR: "error";
|
|
38
|
+
};
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import type { IFilterValue } from '
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
price?: {
|
|
7
|
-
min?: string;
|
|
8
|
-
max?: string;
|
|
9
|
-
};
|
|
10
|
-
[key: string]: any;
|
|
1
|
+
import type { IFilterValue } from '@/interfaces/api/product-list.interface';
|
|
2
|
+
import type { ProductListFilterType } from '@/interfaces/injection.interface';
|
|
3
|
+
export interface IPriceConfig {
|
|
4
|
+
min?: string;
|
|
5
|
+
max?: string;
|
|
11
6
|
}
|
|
12
|
-
export interface
|
|
13
|
-
|
|
7
|
+
export interface IProductListFilters {
|
|
8
|
+
price?: IPriceConfig;
|
|
9
|
+
[key: string]: boolean | string | string[] | IPriceConfig | undefined;
|
|
14
10
|
}
|
|
15
11
|
export interface IExtendedFilterSchema {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
export interface IProductListSearch {
|
|
20
|
-
searchTerm?: string;
|
|
12
|
+
type: string;
|
|
13
|
+
values: IFilterValue[];
|
|
21
14
|
}
|
|
22
15
|
export interface IPagination {
|
|
23
16
|
currentPage: number;
|
|
24
17
|
totalPages: number;
|
|
18
|
+
totalCount: number;
|
|
25
19
|
hasMorePages: boolean;
|
|
26
20
|
}
|
|
27
21
|
export interface ICheckboxLabelStates {
|
|
@@ -29,29 +23,15 @@ export interface ICheckboxLabelStates {
|
|
|
29
23
|
selectedValues: Set<string>;
|
|
30
24
|
searchInput: HTMLInputElement | null;
|
|
31
25
|
checkboxList: HTMLElement | null;
|
|
32
|
-
filteredItems:
|
|
26
|
+
filteredItems: IFilterValue[];
|
|
33
27
|
contentElement: HTMLElement | null;
|
|
34
28
|
iconElement: HTMLElement | null;
|
|
35
29
|
hasUserInteraction: boolean;
|
|
36
30
|
}
|
|
37
|
-
export interface ICurrentFilters {
|
|
38
|
-
personalized: boolean;
|
|
39
|
-
preOrder: boolean;
|
|
40
|
-
deliveryOptions: 'all' | 'shipping' | 'onDemand';
|
|
41
|
-
price?: {
|
|
42
|
-
min?: string;
|
|
43
|
-
max?: string;
|
|
44
|
-
};
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}
|
|
47
|
-
export interface IPriceConfig {
|
|
48
|
-
min: string;
|
|
49
|
-
max: string;
|
|
50
|
-
}
|
|
51
31
|
export interface ICreateCheckboxItemParams {
|
|
52
32
|
filter: IExtendedFilterSchema;
|
|
53
33
|
state: ICheckboxLabelStates;
|
|
54
|
-
item:
|
|
34
|
+
item: IFilterValue;
|
|
55
35
|
onChange: VoidFunction;
|
|
56
36
|
}
|
|
57
37
|
export interface IHandleCheckboxFilterSearchParams {
|
|
@@ -75,6 +55,11 @@ export interface IRenderCheckboxItemsParams {
|
|
|
75
55
|
state: ICheckboxLabelStates;
|
|
76
56
|
onCheckboxChange: (value: string, checked: boolean) => void;
|
|
77
57
|
}
|
|
78
|
-
export interface
|
|
79
|
-
|
|
58
|
+
export interface ILoadInitialProductsParams {
|
|
59
|
+
slug: string;
|
|
60
|
+
page: number;
|
|
61
|
+
perPage: number;
|
|
62
|
+
searchTerm: string;
|
|
63
|
+
currentFilters: IProductListFilters;
|
|
64
|
+
configuredFilters: ProductListFilterType[];
|
|
80
65
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getProductListCardStyles: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getProductListFiltersStyles: () => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,3 +3,4 @@ export declare const productGroupComponents: ComponentType[];
|
|
|
3
3
|
export declare const addressGroupComponents: ComponentType[];
|
|
4
4
|
export declare const cartGroupComponents: ComponentType[];
|
|
5
5
|
export declare const checkoutGroupComponents: ComponentType[];
|
|
6
|
+
export declare const productListGroupComponent: ComponentType[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type StylesheetType = 'global' | 'ui' | 'product' | 'address' | 'cart' | 'checkout';
|
|
1
|
+
export type StylesheetType = 'global' | 'ui' | 'product' | 'address' | 'cart' | 'checkout' | 'product-list';
|
|
2
2
|
export declare function getCSSVariableMapping(componentPrefix: string): Record<string, string>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StylesheetType } from '../constants/css-variable-mappings';
|
|
2
|
+
export type StyleGetter = () => string;
|
|
3
|
+
declare class StyleRegistryService {
|
|
4
|
+
private static instance;
|
|
5
|
+
private registry;
|
|
6
|
+
private constructor();
|
|
7
|
+
static getInstance(): StyleRegistryService;
|
|
8
|
+
register(type: StylesheetType, getter: StyleGetter, priority?: number): void;
|
|
9
|
+
getStyleGetters(type: StylesheetType): StyleGetter[];
|
|
10
|
+
getStyles(type: StylesheetType): string[];
|
|
11
|
+
hasStyles(type: StylesheetType): boolean;
|
|
12
|
+
getRegisteredTypes(): StylesheetType[];
|
|
13
|
+
clear(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const styleRegistry: StyleRegistryService;
|
|
16
|
+
export { StyleRegistryService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentType } from '@/enums';
|
|
2
|
-
import type { ConfigsKeyType, ConfigsType, IAllConfigs, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent } from '@/interfaces/configs';
|
|
2
|
+
import type { ConfigsKeyType, ConfigsType, IAllConfigs, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent, UpdateProductListComponent } from '@/interfaces/configs';
|
|
3
3
|
import { type GeneratedStylesheet } from './services/stylesheet-generator.service';
|
|
4
4
|
export declare class ThemeProviderService {
|
|
5
5
|
private data;
|
|
@@ -14,9 +14,9 @@ export declare class ThemeProviderService {
|
|
|
14
14
|
updateAddressComponent(data: UpdateAddressComponent): void;
|
|
15
15
|
updateCartComponent(data: UpdateCartComponent): void;
|
|
16
16
|
updateCheckoutComponent(data: UpdateCheckoutComponent): void;
|
|
17
|
+
updateProductListComponent(data: UpdateProductListComponent): void;
|
|
17
18
|
getConfigs<T = any>(type: ConfigsKeyType): T;
|
|
18
19
|
getComponentConfig(componentType: ComponentType): ConfigsType | undefined;
|
|
19
20
|
getStylesheet(componentType: ComponentType): GeneratedStylesheet[];
|
|
20
21
|
private getBaseStylesheets;
|
|
21
|
-
private deepMerge;
|
|
22
22
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
+
import { type DisplayModeType } from '@/enums';
|
|
2
3
|
export interface IEngravingFormComponentParams {
|
|
3
4
|
identifier: string;
|
|
4
|
-
context: 'product' | 'cart';
|
|
5
|
+
context: 'product' | 'cart' | 'product-list';
|
|
6
|
+
slug?: string;
|
|
5
7
|
lines: string[];
|
|
6
8
|
maxLines: number;
|
|
7
9
|
maxCharsPerLine: number;
|
|
8
10
|
fee: number;
|
|
9
11
|
location?: string;
|
|
12
|
+
displayMode?: DisplayModeType;
|
|
10
13
|
}
|
|
11
14
|
export declare class EngravingFormComponent extends BaseComponent<IEngravingFormComponentParams, null> {
|
|
12
15
|
get hostClasses(): string[];
|
|
@@ -15,10 +18,12 @@ export declare class EngravingFormComponent extends BaseComponent<IEngravingForm
|
|
|
15
18
|
private addToCartButton;
|
|
16
19
|
private fulfillmentId;
|
|
17
20
|
private partNumber;
|
|
21
|
+
private isPresale;
|
|
18
22
|
beforeConnected(): void;
|
|
19
23
|
private calculateTotalPrice;
|
|
20
24
|
private productInformationSection;
|
|
21
25
|
private addToCartButtonText;
|
|
26
|
+
private getFulfillmentData;
|
|
22
27
|
private retailersSection;
|
|
23
28
|
private engravingLinesSection;
|
|
24
29
|
private actionButtonsSection;
|