@antscorp/antsomi-ui 1.3.5-beta.535 → 1.3.5-beta.536
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.
|
@@ -102,10 +102,6 @@ export const useTemplateListing = (options) => {
|
|
|
102
102
|
// enabled: false,
|
|
103
103
|
// },
|
|
104
104
|
});
|
|
105
|
-
console.log('infiniteObjectTemplate', infiniteObjectTemplate);
|
|
106
|
-
// useDeepCompareEffect(() => {
|
|
107
|
-
// refetchTemplateList();
|
|
108
|
-
// }, [getTemplateListParams]);
|
|
109
105
|
const queryClient = useQueryClient();
|
|
110
106
|
const { mutateAsync: bulkUpdateTemplate } = useBulkUpdateTemplate({
|
|
111
107
|
options: {
|
|
@@ -32,7 +32,6 @@ export const TemplateListing = memo(props => {
|
|
|
32
32
|
const { header, footer, items = [], gap = LISTING_GAP_DEFAULT, loading = false, wrapperClassName, wrapperStyle, onLoadMoreTemplates = () => { }, } = templatesProps || {};
|
|
33
33
|
const _a = previewModalProps || {}, { onOk, onCancel } = _a, restOfPreviewModalProps = __rest(_a, ["onOk", "onCancel"]);
|
|
34
34
|
const _b = templateItemProps || {}, { width = THUMBNAIL_CARD_DEFAULT_WIDTH, height = THUMBNAIL_CARD_DEFAULT_HEIGHT, previewBtnProps } = _b, restOfTemplateItemProps = __rest(_b, ["width", "height", "previewBtnProps"]);
|
|
35
|
-
console.log('🚀 ~ templateItemProps:', templateItemProps);
|
|
36
35
|
const { onClick: onClickPreview } = previewBtnProps || {};
|
|
37
36
|
const isHasData = items.length > 0;
|
|
38
37
|
// Memo
|
|
@@ -81,7 +80,7 @@ export const TemplateListing = memo(props => {
|
|
|
81
80
|
const loading = typeof (item === null || item === void 0 ? void 0 : item.name) === 'undefined';
|
|
82
81
|
return (React.createElement("div", { key: id },
|
|
83
82
|
index === items.length - 2 && React.createElement(LoadMoreBlock, { ref: loadMoreRef }),
|
|
84
|
-
React.createElement(ThumbnailCard, Object.assign({ id: id || 0, name: name || 'Untitled', loading: loading, width: width * ratio, height: height * ratio, thumbnail: thumbnail, className: `${templateItemProps.className}`, thumbnailCacheValue: thumbnailCacheValue, previewBtnProps: Object.assign({ onClick: handleClickThumbnailPreview }
|
|
83
|
+
React.createElement(ThumbnailCard, Object.assign({ id: id || 0, name: name || 'Untitled', loading: loading, width: width * ratio, height: height * ratio, thumbnail: thumbnail, className: `${templateItemProps.className}`, thumbnailCacheValue: thumbnailCacheValue, previewBtnProps: Object.assign(Object.assign({}, previewBtnProps), { onClick: handleClickThumbnailPreview }) }, restOfTemplateItemProps))));
|
|
85
84
|
}))),
|
|
86
85
|
!loading && !blankTemplateProps.show && !isHasData && React.createElement(Empty, Object.assign({}, emptyProps)))),
|
|
87
86
|
footer),
|