Skip to content

Commit d94800e

Browse files
committed
refactor: rename other names in code
1 parent 985beeb commit d94800e

13 files changed

Lines changed: 49 additions & 50 deletions

File tree

packages/pluggableWidgets/datagrid-web/src/Datagrid.editorConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function getProperties(values: DatagridPreviewProps, defaultProperties: P
6969

7070
if (values.pagination === "buttons") {
7171
hidePropertyIn(defaultProperties, values, "showNumberOfRows");
72-
hidePropertyIn(defaultProperties, values, "loadedRowsValue");
72+
hidePropertyIn(defaultProperties, values, "dynamicItemCount");
7373

7474
if (values.useCustomPagination === false) {
7575
hidePropertyIn(defaultProperties, values, "customPagination");

packages/pluggableWidgets/datagrid-web/src/Datagrid.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
<attributeType name="Integer" />
343343
</attributeTypes>
344344
</property>
345-
<property key="loadedRowsValue" type="attribute" required="false">
345+
<property key="dynamicItemCount" type="attribute" required="false">
346346
<caption>Loaded rows</caption>
347347
<description>Read-only attribute reflecting the number of rows currently loaded.</description>
348348
<attributeTypes>

packages/pluggableWidgets/datagrid-web/typings/DatagridProps.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export interface DatagridContainerProps {
127127
dynamicPageSize?: EditableValue<Big>;
128128
dynamicPage?: EditableValue<Big>;
129129
totalCountValue?: EditableValue<Big>;
130-
loadedRowsValue?: EditableValue<Big>;
130+
dynamicItemCount?: EditableValue<Big>;
131131
showEmptyPlaceholder: ShowEmptyPlaceholderEnum;
132132
emptyPlaceholder?: ReactNode;
133133
rowClass?: ListExpressionValue<string>;
@@ -194,7 +194,7 @@ export interface DatagridPreviewProps {
194194
dynamicPageSize: string;
195195
dynamicPage: string;
196196
totalCountValue: string;
197-
loadedRowsValue: string;
197+
dynamicItemCount: string;
198198
showEmptyPlaceholder: ShowEmptyPlaceholderEnum;
199199
emptyPlaceholder: { widgetCount: number; renderer: ComponentType<{ children: ReactNode; caption?: string }> };
200200
rowClass: string;

packages/pluggableWidgets/datagrid-web/typings/MainGateProps.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export type MainGateProps = Pick<
4242
| "storeFiltersInPersonalization"
4343
| "style"
4444
| "totalCountValue"
45-
| "loadedRowsValue"
4645
| "useCustomPagination"
4746
| "customPagination"
4847
>;

packages/pluggableWidgets/gallery-web/src/Gallery.editorConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function getProperties(values: GalleryPreviewProps, defaultProperties: Pr
3737

3838
if (values.pagination === "buttons") {
3939
hidePropertyIn(defaultProperties, values, "showTotalCount");
40-
hidePropertyIn(defaultProperties, values, "loadedRowsValue");
40+
hidePropertyIn(defaultProperties, values, "dynamicItemCount");
4141
} else {
4242
hidePropertyIn(defaultProperties, values, "showPagingButtons");
4343

packages/pluggableWidgets/gallery-web/src/Gallery.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
<attributeType name="Integer" />
186186
</attributeTypes>
187187
</property>
188-
<property key="loadedRowsValue" type="attribute" required="false">
188+
<property key="dynamicItemCount" type="attribute" required="false">
189189
<caption>Loaded items</caption>
190190
<description>Read-only attribute reflecting the number of items currently loaded.</description>
191191
<attributeTypes>

packages/pluggableWidgets/gallery-web/src/typings/GalleryGateProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export type GalleryGateProps = Pick<
3030
| "content"
3131
| "ariaLabelItem"
3232
| "totalCountValue"
33-
| "loadedRowsValue"
33+
| "dynamicItemCount"
3434
| "clearSelectionButtonLabel"
3535
| "selectedCountTemplateSingular"
3636
| "selectedCountTemplatePlural"

packages/pluggableWidgets/gallery-web/typings/GalleryProps.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export interface GalleryContainerProps {
5858
dynamicPageSize?: EditableValue<Big>;
5959
dynamicPage?: EditableValue<Big>;
6060
totalCountValue?: EditableValue<Big>;
61-
loadedRowsValue?: EditableValue<Big>;
61+
dynamicItemCount?: EditableValue<Big>;
6262
showEmptyPlaceholder: ShowEmptyPlaceholderEnum;
6363
emptyPlaceholder?: ReactNode;
6464
itemClass?: ListExpressionValue<string>;
@@ -114,7 +114,7 @@ export interface GalleryPreviewProps {
114114
dynamicPageSize: string;
115115
dynamicPage: string;
116116
totalCountValue: string;
117-
loadedRowsValue: string;
117+
dynamicItemCount: string;
118118
showEmptyPlaceholder: ShowEmptyPlaceholderEnum;
119119
emptyPlaceholder: { widgetCount: number; renderer: ComponentType<{ children: ReactNode; caption?: string }> };
120120
itemClass: string;

packages/shared/widget-plugin-grid/src/interfaces/GridPageControl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ export interface GridPageControl {
22
setPage(page: number): void;
33
setPageSize(pageSize: number): void;
44
setTotalCount(totalCount: number): void;
5-
setLoadedRows?(loadedRows: number): void;
5+
setItemCount?(itemCount: number): void;
66
}

packages/shared/widget-plugin-grid/src/pagination/DynamicPagination.feature.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type FeatureGateProps = {
1414
dynamicPage?: EditableValue<Big>;
1515
dynamicPageSize?: EditableValue<Big>;
1616
totalCountValue?: EditableValue<Big>;
17-
loadedRowsValue?: EditableValue<Big>;
17+
dynamicItemCount?: EditableValue<Big>;
1818
};
1919

2020
export class DynamicPaginationFeature implements SetupComponent {
@@ -118,15 +118,15 @@ export class DynamicPaginationFeature implements SetupComponent {
118118
}
119119

120120
/**
121-
* Syncs internal itemCount state to the loadedRowsValue attribute.
121+
* Syncs internal itemCount state to the dynamicItemCount attribute.
122122
* Skips sentinel value (-1) when count isn't yet available.
123123
*/
124124
private syncItemCountToAttribute(): () => void {
125125
return reaction(
126126
() => this.itemCount.get(),
127127
count => {
128128
if (count < 0) return;
129-
this.service.setLoadedRows?.(count);
129+
this.service.setItemCount?.(count);
130130
},
131131
{ name: "[@reaction] syncItemCountToAttribute", fireImmediately: true }
132132
);

0 commit comments

Comments
 (0)