@wix/editor-react-components 1.2174.0 → 1.2176.0
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/dist/site/components/Repeater/component.js +6 -3
- package/dist/site/components/Repeater/constants.d.ts +4 -1
- package/dist/site/components/Repeater/manifest.js +34 -11
- package/dist/site/components/Repeater/types.d.ts +3 -0
- package/dist/site/components/chunks/constants20.js +5 -1
- package/package.json +3 -3
|
@@ -403,11 +403,14 @@ const Repeater = (props) => {
|
|
|
403
403
|
a11y,
|
|
404
404
|
renderItem = () => /* @__PURE__ */ jsx(Fragment, {}),
|
|
405
405
|
items = DEFAULT_ITEMS,
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
406
|
+
isLoadingFunc,
|
|
407
|
+
hasMoreFunc,
|
|
408
|
+
onLoadMoreFunc,
|
|
409
409
|
emptyState
|
|
410
410
|
} = props;
|
|
411
|
+
const isLoading = isLoadingFunc !== void 0 ? isLoadingFunc() : props.isLoading ?? false;
|
|
412
|
+
const hasMore = hasMoreFunc !== void 0 ? hasMoreFunc() : props.hasMore ?? false;
|
|
413
|
+
const onLoadMore = onLoadMoreFunc ?? props.onLoadMore;
|
|
411
414
|
const presetsWrapperProps = ((_a = props.wix) == null ? void 0 : _a.presetsWrapperProps) || {};
|
|
412
415
|
const loadMoreEnabled = !!onLoadMore;
|
|
413
416
|
const sentinelRef = useLoadMoreObserver({
|
|
@@ -52,11 +52,14 @@ export declare const DisplayNames: {
|
|
|
52
52
|
readonly elementDisplayName: "Repeater";
|
|
53
53
|
readonly data: {
|
|
54
54
|
readonly direction: "Direction";
|
|
55
|
-
readonly items: "Items";
|
|
55
|
+
readonly items: "Display Items from";
|
|
56
56
|
readonly renderItem: "Item Template";
|
|
57
57
|
readonly emptyState: "Empty State";
|
|
58
58
|
readonly emptyState_title: "Title";
|
|
59
59
|
readonly emptyState_description: "Description";
|
|
60
|
+
readonly hasMore: "Has More Items";
|
|
61
|
+
readonly isLoading: "Is Loading";
|
|
62
|
+
readonly loadMore: "Load More";
|
|
60
63
|
};
|
|
61
64
|
readonly customActions: {
|
|
62
65
|
readonly presets: "Layout";
|
|
@@ -30,12 +30,31 @@ const manifest = {
|
|
|
30
30
|
disableStretching: false,
|
|
31
31
|
disablePositioning: false
|
|
32
32
|
},
|
|
33
|
+
displayFilters: {
|
|
34
|
+
presets: {
|
|
35
|
+
hide: [presets.slider_vertical]
|
|
36
|
+
},
|
|
37
|
+
data: {
|
|
38
|
+
hide: [
|
|
39
|
+
"emptyState",
|
|
40
|
+
"direction",
|
|
41
|
+
"renderItem",
|
|
42
|
+
"isLoading",
|
|
43
|
+
"hasMore",
|
|
44
|
+
"onLoadMore"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
actions: {
|
|
48
|
+
hide: ["manageItems"]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
33
51
|
data: {
|
|
34
52
|
direction: {
|
|
35
53
|
dataType: DATA.DATA_TYPE.direction
|
|
36
54
|
},
|
|
37
55
|
items: {
|
|
38
56
|
dataType: DATA.DATA_TYPE.arrayItems,
|
|
57
|
+
displayName: DisplayNames.root.data.items,
|
|
39
58
|
[DATA.DATA_TYPE.arrayItems]: {
|
|
40
59
|
dynamicItems: true
|
|
41
60
|
}
|
|
@@ -63,6 +82,21 @@ const manifest = {
|
|
|
63
82
|
dataType: DATA.DATA_TYPE.function,
|
|
64
83
|
[DATA.DATA_TYPE.function]: {}
|
|
65
84
|
},
|
|
85
|
+
isLoadingFunc: {
|
|
86
|
+
displayName: DisplayNames.root.data.isLoading,
|
|
87
|
+
dataType: DATA.DATA_TYPE.function,
|
|
88
|
+
[DATA.DATA_TYPE.function]: {}
|
|
89
|
+
},
|
|
90
|
+
hasMoreFunc: {
|
|
91
|
+
displayName: DisplayNames.root.data.hasMore,
|
|
92
|
+
dataType: DATA.DATA_TYPE.function,
|
|
93
|
+
[DATA.DATA_TYPE.function]: {}
|
|
94
|
+
},
|
|
95
|
+
onLoadMoreFunc: {
|
|
96
|
+
displayName: DisplayNames.root.data.loadMore,
|
|
97
|
+
dataType: DATA.DATA_TYPE.function,
|
|
98
|
+
[DATA.DATA_TYPE.function]: {}
|
|
99
|
+
},
|
|
66
100
|
a11y: {
|
|
67
101
|
dataType: DATA.DATA_TYPE.a11y,
|
|
68
102
|
[DATA.DATA_TYPE.a11y]: {
|
|
@@ -322,17 +356,6 @@ const manifest = {
|
|
|
322
356
|
}
|
|
323
357
|
}
|
|
324
358
|
},
|
|
325
|
-
displayFilters: {
|
|
326
|
-
presets: {
|
|
327
|
-
hide: [presets.slider_vertical]
|
|
328
|
-
},
|
|
329
|
-
data: {
|
|
330
|
-
hide: ["emptyState", "direction", "renderItem"]
|
|
331
|
-
},
|
|
332
|
-
actions: {
|
|
333
|
-
hide: ["manageItems"]
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
359
|
customActions: {
|
|
337
360
|
Presets: {
|
|
338
361
|
displayName: DisplayNames.root.customActions.presets,
|
|
@@ -13,6 +13,9 @@ export interface RepeaterProps {
|
|
|
13
13
|
isLoading?: boolean;
|
|
14
14
|
hasMore?: boolean;
|
|
15
15
|
onLoadMore?: () => void;
|
|
16
|
+
isLoadingFunc?: () => boolean;
|
|
17
|
+
hasMoreFunc?: () => boolean;
|
|
18
|
+
onLoadMoreFunc?: () => void;
|
|
16
19
|
emptyState?: EmptyState;
|
|
17
20
|
wix?: {
|
|
18
21
|
presetsWrapperProps?: Record<string, any>;
|
|
@@ -22,9 +22,13 @@ const DisplayNames = {
|
|
|
22
22
|
root: {
|
|
23
23
|
elementDisplayName: "Repeater",
|
|
24
24
|
data: {
|
|
25
|
+
items: "Display Items from",
|
|
25
26
|
emptyState: "Empty State",
|
|
26
27
|
emptyState_title: "Title",
|
|
27
|
-
emptyState_description: "Description"
|
|
28
|
+
emptyState_description: "Description",
|
|
29
|
+
hasMore: "Has More Items",
|
|
30
|
+
isLoading: "Is Loading",
|
|
31
|
+
loadMore: "Load More"
|
|
28
32
|
},
|
|
29
33
|
customActions: {
|
|
30
34
|
presets: "Layout"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2176.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@wix/business-tools": "^1.0.225",
|
|
104
104
|
"@wix/ci-build-info": "^1.0.333",
|
|
105
105
|
"@wix/cli": "^1.1.218",
|
|
106
|
-
"@wix/cli-app": "^1.1.
|
|
106
|
+
"@wix/cli-app": "^1.1.218",
|
|
107
107
|
"@wix/component-protocol": "^1.237.0",
|
|
108
108
|
"@wix/component-storybook-utils": "^1.0.0",
|
|
109
109
|
"@wix/components-infra": "^1.0.0",
|
|
@@ -189,5 +189,5 @@
|
|
|
189
189
|
"registry": "https://registry.npmjs.org/",
|
|
190
190
|
"access": "public"
|
|
191
191
|
},
|
|
192
|
-
"falconPackageHash": "
|
|
192
|
+
"falconPackageHash": "113d33acfee397d4ddb45e77c5a44c06485fdc513ad11f03b570be69"
|
|
193
193
|
}
|