@wix/editor-react-components 1.2400.0 → 1.2402.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/Breadcrumbs/manifest.js +11 -0
- package/dist/site/components/Repeater/component.js +5 -3
- package/dist/site/components/Repeater/constants.d.ts +1 -0
- package/dist/site/components/Repeater/hooks/useAsyncLoadMore.d.ts +1 -1
- package/dist/site/components/Repeater/manifest.js +5 -1
- package/dist/site/components/Repeater/types.d.ts +1 -0
- package/dist/site/components/chunks/constants23.js +1 -0
- package/package.json +3 -3
|
@@ -76,6 +76,17 @@ const manifest = {
|
|
|
76
76
|
borderEndEndRadius: {},
|
|
77
77
|
boxShadow: {}
|
|
78
78
|
},
|
|
79
|
+
displayGroups: {
|
|
80
|
+
paddingGroup: {
|
|
81
|
+
groupType: DISPLAY_GROUPS.GROUP_TYPE.padding,
|
|
82
|
+
padding: {
|
|
83
|
+
top: "padding-top",
|
|
84
|
+
bottom: "padding-bottom",
|
|
85
|
+
left: "padding-inline-start",
|
|
86
|
+
right: "padding-inline-end"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
79
90
|
cssCustomProperties: {
|
|
80
91
|
"padding-top": {
|
|
81
92
|
cssPropertyType: CSS_PROPERTIES.CSS_PROPERTY_TYPE.paddingTop
|
|
@@ -5,7 +5,7 @@ import { d as directionStyles } from "../chunks/direction.module.js";
|
|
|
5
5
|
import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
|
|
6
6
|
import { D as DEFAULT_ITEMS_PER_ROW, C as COLUMN_COUNT_CSS_VAR, T as TestIds, s as semanticClassNames } from "../chunks/constants23.js";
|
|
7
7
|
import React__default, { useState, useRef, useEffect, useCallback, forwardRef } from "react";
|
|
8
|
-
const useAsyncLoadMore = (onLoadMore, itemsLength) => {
|
|
8
|
+
const useAsyncLoadMore = (onLoadMore, itemsLength, isLoadingProp) => {
|
|
9
9
|
const [isLoading, setIsLoading] = useState(false);
|
|
10
10
|
const [hasMore, setHasMore] = useState(true);
|
|
11
11
|
const itemsLengthAtLastLoad = useRef(null);
|
|
@@ -32,7 +32,7 @@ const useAsyncLoadMore = (onLoadMore, itemsLength) => {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}, [onLoadMore, itemsLength]);
|
|
35
|
-
return { isLoading, handleLoadMore, hasMore };
|
|
35
|
+
return { isLoading: isLoadingProp ?? isLoading, handleLoadMore, hasMore };
|
|
36
36
|
};
|
|
37
37
|
const useLoadMoreObserver = ({
|
|
38
38
|
enabled,
|
|
@@ -477,13 +477,15 @@ const Repeater = (props) => {
|
|
|
477
477
|
a11y,
|
|
478
478
|
renderItem = () => /* @__PURE__ */ jsx(Fragment, {}),
|
|
479
479
|
items = DEFAULT_ITEMS,
|
|
480
|
+
isLoading: isLoadingProp,
|
|
480
481
|
onLoadMore,
|
|
481
482
|
emptyState
|
|
482
483
|
} = props;
|
|
483
484
|
const presetsWrapperProps = ((_a = props.wix) == null ? void 0 : _a.presetsWrapperProps) || {};
|
|
484
485
|
const { isLoading, handleLoadMore, hasMore } = useAsyncLoadMore(
|
|
485
486
|
onLoadMore,
|
|
486
|
-
items.length
|
|
487
|
+
items.length,
|
|
488
|
+
isLoadingProp
|
|
487
489
|
);
|
|
488
490
|
const [ulRef, itemsPerRow] = useItemsPerRow(!!onLoadMore);
|
|
489
491
|
const sentinelRef = useLoadMoreObserver({
|
|
@@ -58,6 +58,7 @@ export declare const DisplayNames: {
|
|
|
58
58
|
readonly emptyState: "Empty State";
|
|
59
59
|
readonly emptyState_title: "Title";
|
|
60
60
|
readonly emptyState_description: "Description";
|
|
61
|
+
readonly isLoading: "Loading State";
|
|
61
62
|
readonly loadMore: "Load More";
|
|
62
63
|
};
|
|
63
64
|
readonly customActions: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useAsyncLoadMore: (onLoadMore: (() => Promise<void>) | undefined, itemsLength: number) => {
|
|
1
|
+
export declare const useAsyncLoadMore: (onLoadMore: (() => Promise<void>) | undefined, itemsLength: number, isLoadingProp?: boolean) => {
|
|
2
2
|
isLoading: boolean;
|
|
3
3
|
handleLoadMore: () => Promise<void>;
|
|
4
4
|
hasMore: boolean;
|
|
@@ -36,7 +36,7 @@ const manifest = {
|
|
|
36
36
|
hide: [presets.slider_vertical, presets.cards_off]
|
|
37
37
|
},
|
|
38
38
|
data: {
|
|
39
|
-
hide: ["emptyState", "direction", "activeItem"]
|
|
39
|
+
hide: ["emptyState", "direction", "activeItem", "isLoading"]
|
|
40
40
|
},
|
|
41
41
|
actions: {
|
|
42
42
|
hide: ["manageItems"]
|
|
@@ -72,6 +72,10 @@ const manifest = {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
+
isLoading: {
|
|
76
|
+
displayName: DisplayNames.root.data.isLoading,
|
|
77
|
+
dataType: DATA.DATA_TYPE.booleanValue
|
|
78
|
+
},
|
|
75
79
|
onLoadMore: {
|
|
76
80
|
displayName: DisplayNames.root.data.loadMore,
|
|
77
81
|
dataType: DATA.DATA_TYPE.function,
|
|
@@ -10,6 +10,7 @@ export interface RepeaterProps {
|
|
|
10
10
|
a11y?: A11y;
|
|
11
11
|
renderItem?: (itemId: string, itemIndex: number, itemLength: number) => React.JSX.Element;
|
|
12
12
|
items?: Array<string>;
|
|
13
|
+
isLoading?: boolean;
|
|
13
14
|
onLoadMore?: () => Promise<void>;
|
|
14
15
|
emptyState?: EmptyState;
|
|
15
16
|
wix?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2402.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@wix/design-system-illustrations": "^2.19.0",
|
|
82
82
|
"@wix/sdk": "^1.21.13",
|
|
83
83
|
"@wix/services-manager-react": "^0.1.27",
|
|
84
|
-
"@wix/site-ui": "1.
|
|
84
|
+
"@wix/site-ui": "1.177.0",
|
|
85
85
|
"@wix/video": "^1.85.0",
|
|
86
86
|
"@wix/viewer-service-consent-policy": "^1.0.100",
|
|
87
87
|
"@wix/web-bi-logger": "^2.1.26",
|
|
@@ -196,5 +196,5 @@
|
|
|
196
196
|
"registry": "https://registry.npmjs.org/",
|
|
197
197
|
"access": "public"
|
|
198
198
|
},
|
|
199
|
-
"falconPackageHash": "
|
|
199
|
+
"falconPackageHash": "9dc34d1fbcba762cc1f539f641ede974289aa96d03b7f33b5c2e7b91"
|
|
200
200
|
}
|