@fluid-topics/ft-search-load-more-button 1.3.53 → 1.3.55
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.
|
@@ -2,12 +2,14 @@ import { nothing } from "lit";
|
|
|
2
2
|
import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
|
|
3
3
|
import { FtSearchLoadMoreButtonProperties } from "./ft-search-load-more-button.properties";
|
|
4
4
|
import { FtSearchComponent } from "@fluid-topics/ft-search-context/build/registration";
|
|
5
|
+
import { FtSearchStateResourceRequest } from "@fluid-topics/ft-search-context/build/store/model";
|
|
5
6
|
declare const FtSearchLoadMoreButton_base: typeof FtSearchComponent & import("@fluid-topics/ft-wc-utils").Constructor<import("@fluid-topics/ft-i18n").FtLitElementWithI18nInterface>;
|
|
6
7
|
export declare class FtSearchLoadMoreButton extends FtSearchLoadMoreButton_base implements FtSearchLoadMoreButtonProperties {
|
|
7
8
|
static elementDefinitions: ElementDefinitionsMap;
|
|
8
9
|
static styles: import("lit").CSSResult;
|
|
9
10
|
private currentPage;
|
|
10
11
|
private isLastPage;
|
|
12
|
+
neededSearchRequests: FtSearchStateResourceRequest[];
|
|
11
13
|
constructor();
|
|
12
14
|
protected render(): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
13
15
|
private loadMore;
|
|
@@ -11,11 +11,13 @@ import { FtButton } from "@fluid-topics/ft-button";
|
|
|
11
11
|
import { FtSearchComponent } from "@fluid-topics/ft-search-context/build/registration";
|
|
12
12
|
import { withI18n } from "@fluid-topics/ft-i18n";
|
|
13
13
|
import { designedActionBlockAriaLabels } from "./messages";
|
|
14
|
+
import { FtSearchStateResourceRequest } from "@fluid-topics/ft-search-context/build/store/model";
|
|
14
15
|
class FtSearchLoadMoreButton extends withI18n(FtSearchComponent) {
|
|
15
16
|
constructor() {
|
|
16
17
|
super();
|
|
17
18
|
this.currentPage = 1;
|
|
18
19
|
this.isLastPage = true;
|
|
20
|
+
this.neededSearchRequests = [FtSearchStateResourceRequest.CLUSTERED_SEARCH];
|
|
19
21
|
this.addI18nContext(designedActionBlockAriaLabels);
|
|
20
22
|
}
|
|
21
23
|
render() {
|
|
@@ -23,7 +25,7 @@ class FtSearchLoadMoreButton extends withI18n(FtSearchComponent) {
|
|
|
23
25
|
return nothing;
|
|
24
26
|
}
|
|
25
27
|
return html `
|
|
26
|
-
<ft-button @click
|
|
28
|
+
<ft-button @click=${this.loadMore}>
|
|
27
29
|
${designedActionBlockAriaLabels.messages.searchPageLoadMore()}
|
|
28
30
|
</ft-button>
|
|
29
31
|
`;
|