diff --git a/libs/domain/product/src/components.ts b/libs/domain/product/src/components.ts index 3a4e84d5..211f426b 100644 --- a/libs/domain/product/src/components.ts +++ b/libs/domain/product/src/components.ts @@ -14,4 +14,4 @@ export * from '../media/src/media.def'; export * from '../price/src/price.def'; export * from '../relations/relations.def'; export * from '../title/src/title.def'; -export * from '../variant-list/variant-list.def'; +export * from '../variant-selector/variant-selector.def'; diff --git a/libs/domain/product/variant-list/index.ts b/libs/domain/product/variant-list/index.ts deleted file mode 100644 index 987bb52d..00000000 --- a/libs/domain/product/variant-list/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './variant-list.component'; -export * from './variant-list.styles'; diff --git a/libs/domain/product/variant-list/variant-list.def.ts b/libs/domain/product/variant-list/variant-list.def.ts deleted file mode 100644 index 02c5ce80..00000000 --- a/libs/domain/product/variant-list/variant-list.def.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { componentDef } from '@oryx-frontend/utilities'; -import { ProductVariantListComponent } from './variant-list.component'; - -declare global { - interface FeatureOptions { - 'oryx-product-variant-list'?: ProductVariantListComponent; - } -} - -export const productVariantListComponent = componentDef({ - name: 'oryx-product-variant-list', - impl: () => - import('./variant-list.component').then( - (m) => m.ProductVariantListComponent - ), -}); diff --git a/libs/domain/product/variant-selector/index.ts b/libs/domain/product/variant-selector/index.ts new file mode 100644 index 00000000..98009c99 --- /dev/null +++ b/libs/domain/product/variant-selector/index.ts @@ -0,0 +1,2 @@ +export * from './variant-selector.component'; +export * from './variant-selector.styles'; diff --git a/libs/domain/product/variant-list/variant-list.component.ts b/libs/domain/product/variant-selector/variant-selector.component.ts similarity index 97% rename from libs/domain/product/variant-list/variant-list.component.ts rename to libs/domain/product/variant-selector/variant-selector.component.ts index e45fe787..8c67159c 100644 --- a/libs/domain/product/variant-list/variant-list.component.ts +++ b/libs/domain/product/variant-selector/variant-selector.component.ts @@ -14,11 +14,11 @@ import { } from '@oryx-frontend/utilities/src/signals/core'; import { LitElement, TemplateResult, html } from 'lit'; import { repeat } from 'lit/directives/repeat.js'; -import { variantListStyle } from './variant-list.styles'; +import { variantListStyle } from './variant-selector.styles'; @hydrate({ context: PRODUCT }) @signalAware() -export class ProductVariantListComponent extends ProductMixin( +export class ProductVariantSelectorComponent extends ProductMixin( LayoutMixin(LitElement) ) { static styles = variantListStyle; diff --git a/libs/domain/product/variant-selector/variant-selector.def.ts b/libs/domain/product/variant-selector/variant-selector.def.ts new file mode 100644 index 00000000..86b2bffd --- /dev/null +++ b/libs/domain/product/variant-selector/variant-selector.def.ts @@ -0,0 +1,16 @@ +import { componentDef } from '@oryx-frontend/utilities'; +import { ProductVariantSelectorComponent } from './variant-selector.component'; + +declare global { + interface FeatureOptions { + 'oryx-product-variant-selector'?: ProductVariantSelectorComponent; + } +} + +export const productVariantSelectorComponent = componentDef({ + name: 'oryx-product-variant-selector', + impl: () => + import('./variant-selector.component').then( + (m) => m.ProductVariantSelectorComponent + ), +}); diff --git a/libs/domain/product/variant-list/variant-list.styles.ts b/libs/domain/product/variant-selector/variant-selector.styles.ts similarity index 100% rename from libs/domain/product/variant-list/variant-list.styles.ts rename to libs/domain/product/variant-selector/variant-selector.styles.ts diff --git a/libs/template/presets/storefront/experience/pages/product-page.ts b/libs/template/presets/storefront/experience/pages/product-page.ts index d9359aa7..d92eca27 100644 --- a/libs/template/presets/storefront/experience/pages/product-page.ts +++ b/libs/template/presets/storefront/experience/pages/product-page.ts @@ -97,7 +97,7 @@ export const productPage: ExperienceComponent = { }, { type: 'oryx-product-average-rating' }, { type: 'oryx-product-id' }, - { type: 'oryx-product-variant-list' }, + { type: 'oryx-product-variant-selector' }, { type: 'oryx-product-price', options: { enableSalesLabel: true }, diff --git a/tsconfig.base.json b/tsconfig.base.json index 8b827224..7341fc14 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -199,8 +199,8 @@ "libs/domain/product/relations/index.ts" ], "@oryx-frontend/product/title": ["libs/domain/product/title/index.ts"], - "@oryx-frontend/product/variant-list": [ - "libs/domain/product/variant-list/index.ts" + "@oryx-frontend/product/variant-selector": [ + "libs/domain/product/variant-selector/index.ts" ], "@oryx-frontend/push-notification": [ "libs/platform/push-notification/src/index.ts"