Skip to content

Commit

Permalink
fix: expose atomic-commerce-load-more-products to react (#4097)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-bompart authored Jun 17, 2024
1 parent 1bfee6b commit d7214c7
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ AtomicAutomaticFacetGenerator,
AtomicBreadbox,
AtomicCategoryFacet,
AtomicColorFacet,
AtomicCommerceLoadMoreProducts,
AtomicCommerceSearchBox,
AtomicComponentError,
AtomicDidYouMean,
Expand Down Expand Up @@ -109,6 +110,7 @@ AtomicAutomaticFacetGenerator,
AtomicBreadbox,
AtomicCategoryFacet,
AtomicColorFacet,
AtomicCommerceLoadMoreProducts,
AtomicCommerceSearchBox,
AtomicComponentError,
AtomicDidYouMean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,27 @@ export class AtomicColorFacet {
export declare interface AtomicColorFacet extends Components.AtomicColorFacet {}


@ProxyCmp({
})
@Component({
selector: 'atomic-commerce-load-more-products',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: [],
})
export class AtomicCommerceLoadMoreProducts {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
}
}


export declare interface AtomicCommerceLoadMoreProducts extends Components.AtomicCommerceLoadMoreProducts {}


@ProxyCmp({
inputs: ['clearFilters', 'disableSearch', 'minimumQueryLength', 'numberOfQueries', 'redirectionUrl', 'suggestionDelay', 'suggestionTimeout']
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const AtomicCommerceFacet = /*@__PURE__*/createReactComponent<JSX.AtomicC
export const AtomicCommerceFacets = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceFacets, HTMLAtomicCommerceFacetsElement>('atomic-commerce-facets');
export const AtomicCommerceInterface = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceInterface, HTMLAtomicCommerceInterfaceElement>('atomic-commerce-interface');
export const AtomicCommerceLayout = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceLayout, HTMLAtomicCommerceLayoutElement>('atomic-commerce-layout');
export const AtomicCommerceLoadMoreProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceLoadMoreProducts, HTMLAtomicCommerceLoadMoreProductsElement>('atomic-commerce-load-more-products');
export const AtomicCommerceNoProducts = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceNoProducts, HTMLAtomicCommerceNoProductsElement>('atomic-commerce-no-products');
export const AtomicCommerceNumericFacet = /*@__PURE__*/createReactComponent<JSX.AtomicCommerceNumericFacet, HTMLAtomicCommerceNumericFacetElement>('atomic-commerce-numeric-facet');
export const AtomicCommercePager = /*@__PURE__*/createReactComponent<JSX.AtomicCommercePager, HTMLAtomicCommercePagerElement>('atomic-commerce-pager');
Expand Down
4 changes: 4 additions & 0 deletions packages/atomic/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ export namespace Components {
}
/**
* The `atomic-commerce-load-more-products` component allows the user to load additional products if more are available.
* @alpha
*/
interface AtomicCommerceLoadMoreProducts {
}
Expand Down Expand Up @@ -3523,6 +3524,7 @@ declare global {
};
/**
* The `atomic-commerce-load-more-products` component allows the user to load additional products if more are available.
* @alpha
*/
interface HTMLAtomicCommerceLoadMoreProductsElement extends Components.AtomicCommerceLoadMoreProducts, HTMLStencilElement {
}
Expand Down Expand Up @@ -5787,6 +5789,7 @@ declare namespace LocalJSX {
}
/**
* The `atomic-commerce-load-more-products` component allows the user to load additional products if more are available.
* @alpha
*/
interface AtomicCommerceLoadMoreProducts {
}
Expand Down Expand Up @@ -8796,6 +8799,7 @@ declare module "@stencil/core" {
"atomic-commerce-layout": LocalJSX.AtomicCommerceLayout & JSXBase.HTMLAttributes<HTMLAtomicCommerceLayoutElement>;
/**
* The `atomic-commerce-load-more-products` component allows the user to load additional products if more are available.
* @alpha
*/
"atomic-commerce-load-more-products": LocalJSX.AtomicCommerceLoadMoreProducts & JSXBase.HTMLAttributes<HTMLAtomicCommerceLoadMoreProductsElement>;
"atomic-commerce-no-products": LocalJSX.AtomicCommerceNoProducts & JSXBase.HTMLAttributes<HTMLAtomicCommerceNoProductsElement>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {CommerceBindings} from '../atomic-commerce-interface/atomic-commerce-int
* @part progress-bar - The progress bar displaying a percentage of results shown over the total number of products available.
* @part load-more-results-button - The "Load more products" button.
*
* @internal
* @alpha
*/
@Component({
tag: 'atomic-commerce-load-more-products',
Expand Down

0 comments on commit d7214c7

Please sign in to comment.