@antscorp/antsomi-ui 1.3.5-beta.371 → 1.3.5-beta.372
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/es/components/template/TemplateListing/constants/defaultProps.d.ts +1 -2
- package/es/components/template/TemplateListing/constants/defaultProps.js +4 -4
- package/es/components/template/TemplateListing/hooks/useTemplateListing.d.ts +1 -0
- package/es/components/template/TemplateListing/hooks/useTemplateListing.js +2 -1
- package/es/components/template/TemplateListing/index.js +5 -2
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ThumbnailCardProps } from '../../../molecules';
|
|
2
|
-
import { BlankTemplateProps, CategoryListingProps,
|
|
2
|
+
import { BlankTemplateProps, CategoryListingProps, TemplatesProps } from '../types';
|
|
3
3
|
import { EmptyProps } from '../types/Empty';
|
|
4
4
|
export declare const CATEGORY_LISTING_WITH = 230;
|
|
5
5
|
export declare const THUMBNAIL_URL = "https://st-media-template.antsomi.com/base64-img/37563.png";
|
|
@@ -8,6 +8,5 @@ export declare const CATEGORY_DEBOUNCE = 400;
|
|
|
8
8
|
export declare const TEMPLATE_ITEM_DEFAULT: Omit<ThumbnailCardProps, 'id'>;
|
|
9
9
|
export declare const BLANK_TEMPLATE_DEFAULT: BlankTemplateProps;
|
|
10
10
|
export declare const CATEGORY_LISTING_DEFAULT: Omit<CategoryListingProps, 'items'>;
|
|
11
|
-
export declare const TEMPLATE_LISTING_DEFAULT: TemplateListingProps;
|
|
12
11
|
export declare const EMPTY_DEFAULT: EmptyProps;
|
|
13
12
|
export declare const TEMPLATES_DEFAULT: TemplatesProps;
|
|
@@ -14,10 +14,10 @@ export const CATEGORY_LISTING_DEFAULT = {
|
|
|
14
14
|
checkedCategories: {},
|
|
15
15
|
onMenuChange: () => { },
|
|
16
16
|
};
|
|
17
|
-
export const TEMPLATE_LISTING_DEFAULT = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
17
|
+
// export const TEMPLATE_LISTING_DEFAULT: TemplateListingProps = {
|
|
18
|
+
// templateItemProps: TEMPLATE_ITEM_DEFAULT,
|
|
19
|
+
// blankTemplateProps: BLANK_TEMPLATE_DEFAULT,
|
|
20
|
+
// };
|
|
21
21
|
export const EMPTY_DEFAULT = {
|
|
22
22
|
description: 'No data',
|
|
23
23
|
};
|
|
@@ -64,6 +64,7 @@ export declare const useTemplateListing: <T = undefined>(options: TemplateListin
|
|
|
64
64
|
checkedCategories: TCheckedCategories;
|
|
65
65
|
selectTemplateAction: string | T | undefined;
|
|
66
66
|
previewTemplateCategories: TCategoryItem[];
|
|
67
|
+
isRefetching: boolean;
|
|
67
68
|
isLoadingCategoryList: boolean;
|
|
68
69
|
isLoadingTemplateList: boolean;
|
|
69
70
|
isLoadingTemplateDetail: boolean;
|
|
@@ -91,7 +91,7 @@ export const useTemplateListing = (options) => {
|
|
|
91
91
|
filter: JSON.stringify(filter),
|
|
92
92
|
};
|
|
93
93
|
// Queries
|
|
94
|
-
const { data: infiniteObjectTemplate, isFetchingNextPage, isFetching, hasNextPage, fetchNextPage, refetch: refetchTemplateList, } = useGetObjectTemplateList({
|
|
94
|
+
const { data: infiniteObjectTemplate, isFetchingNextPage, isFetching, hasNextPage, fetchNextPage, refetch: refetchTemplateList, isRefetching, } = useGetObjectTemplateList({
|
|
95
95
|
args: {
|
|
96
96
|
auth: serviceAuth,
|
|
97
97
|
params: getTemplateListParams,
|
|
@@ -273,6 +273,7 @@ export const useTemplateListing = (options) => {
|
|
|
273
273
|
checkedCategories,
|
|
274
274
|
selectTemplateAction,
|
|
275
275
|
previewTemplateCategories,
|
|
276
|
+
isRefetching,
|
|
276
277
|
isLoadingCategoryList,
|
|
277
278
|
isLoadingTemplateList,
|
|
278
279
|
isLoadingTemplateDetail: false,
|
|
@@ -18,7 +18,9 @@ import { Scrollbars, Spin } from '@antscorp/antsomi-ui/es/components/atoms';
|
|
|
18
18
|
import { ThumbnailCard } from '@antscorp/antsomi-ui/es/components/molecules';
|
|
19
19
|
import { PreviewTemplateModal } from '../../organism/PreviewTemplateModal';
|
|
20
20
|
// Constants
|
|
21
|
-
import { BLANK_TEMPLATE_DEFAULT, TEMPLATE_ITEM_DEFAULT,
|
|
21
|
+
import { BLANK_TEMPLATE_DEFAULT, TEMPLATE_ITEM_DEFAULT,
|
|
22
|
+
// TEMPLATE_LISTING_DEFAULT,
|
|
23
|
+
CATEGORY_LISTING_DEFAULT, EMPTY_DEFAULT, TEMPLATES_DEFAULT, LISTING_GAP_DEFAULT, } from './constants';
|
|
22
24
|
import { THUMBNAIL_CARD_DEFAULT_HEIGHT, THUMBNAIL_CARD_DEFAULT_WIDTH, } from '../../molecules/ThumbnailCard/constants';
|
|
23
25
|
// Styled
|
|
24
26
|
import { LoadMoreBlock, TemplateListingWrapper, TemplateWrapper } from './styled';
|
|
@@ -63,6 +65,7 @@ export const TemplateListing = memo(props => {
|
|
|
63
65
|
return (React.createElement(TemplateListingWrapper, null,
|
|
64
66
|
React.createElement(CategoryListing, Object.assign({}, categoryListingProps, { emptyProps: emptyProps })),
|
|
65
67
|
React.createElement(TemplateWrapper, { className: wrapperClassName, style: wrapperStyle },
|
|
68
|
+
React.createElement("div", { className: "placeholder-test-template-listing" }),
|
|
66
69
|
header,
|
|
67
70
|
React.createElement(Spin, { spinning: loading || !itemPerRow, wrapperClassName: "template-listing__loading template-listing__loading--full" },
|
|
68
71
|
React.createElement(Scrollbars, { className: "template-listing" },
|
|
@@ -87,4 +90,4 @@ export const TemplateListing = memo(props => {
|
|
|
87
90
|
React.createElement(PreviewTemplateModal, Object.assign({ open: openPreviewModal, onOk: handleOkPreviewModal, onCancel: handleCancelPreviewModal }, restOfPreviewModalProps))));
|
|
88
91
|
});
|
|
89
92
|
TemplateListing.displayName = 'TemplateListing';
|
|
90
|
-
TemplateListing.defaultProps = TEMPLATE_LISTING_DEFAULT;
|
|
93
|
+
// TemplateListing.defaultProps = TEMPLATE_LISTING_DEFAULT;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antscorp/antsomi-ui",
|
|
3
|
-
"version": "1.3.5-beta.
|
|
3
|
+
"version": "1.3.5-beta.372",
|
|
4
4
|
"description": "An enterprise-class UI design language and React UI library.",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"dist/*",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@fortawesome/free-regular-svg-icons": "6.1.1",
|
|
72
72
|
"@fortawesome/free-solid-svg-icons": "6.1.1",
|
|
73
73
|
"@fortawesome/react-fontawesome": "0.2.0",
|
|
74
|
-
"@storybook/test": "8.0.5",
|
|
74
|
+
"@storybook/test": "^8.0.5",
|
|
75
75
|
"@swiper/core": "^0.0.21",
|
|
76
76
|
"@tanstack/react-query": "4.20.4",
|
|
77
77
|
"@tanstack/react-query-devtools": "4.20.4",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"@babel/preset-env": "^7.20.2",
|
|
146
146
|
"@babel/preset-react": "^7.18.6",
|
|
147
147
|
"@babel/preset-typescript": "^7.23.3",
|
|
148
|
-
"@chromatic-com/storybook": "1.3.3",
|
|
148
|
+
"@chromatic-com/storybook": "^1.3.3",
|
|
149
149
|
"@commitlint/cli": "17.5.0",
|
|
150
150
|
"@commitlint/config-conventional": "17.4.4",
|
|
151
151
|
"@storybook/addon-actions": "^8.0.5",
|
|
@@ -153,11 +153,11 @@
|
|
|
153
153
|
"@storybook/addon-interactions": "^8.0.5",
|
|
154
154
|
"@storybook/addon-links": "^8.0.5",
|
|
155
155
|
"@storybook/addon-styling-webpack": "^1.0.0",
|
|
156
|
-
"@storybook/addon-webpack5-compiler-babel": "3.0.3",
|
|
157
|
-
"@storybook/blocks": "8.0.5",
|
|
156
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
|
|
157
|
+
"@storybook/blocks": "^8.0.5",
|
|
158
158
|
"@storybook/manager-api": "^8.0.5",
|
|
159
159
|
"@storybook/react": "^8.0.5",
|
|
160
|
-
"@storybook/react-webpack5": "8.0.5",
|
|
160
|
+
"@storybook/react-webpack5": "^8.0.5",
|
|
161
161
|
"@storybook/theming": "^8.0.5",
|
|
162
162
|
"@testing-library/jest-dom": "^5.16.5",
|
|
163
163
|
"@testing-library/react": "^14.0.0",
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"react-router-dom": "5.1.0 || 6.14.2",
|
|
214
214
|
"sass": "^1.60.0",
|
|
215
215
|
"sass-loader": "^13.2.2",
|
|
216
|
-
"storybook": "8.0.5",
|
|
216
|
+
"storybook": "^8.0.5",
|
|
217
217
|
"style-loader": "^3.3.2",
|
|
218
218
|
"styled-components": "^5.3.9",
|
|
219
219
|
"terser-webpack-plugin": "^5.3.7",
|