@antscorp/antsomi-ui 1.3.5-beta.102 → 1.3.5-beta.103
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/molecules/TemplateSaveAs/hooks/useTemplateSave.d.ts +1 -0
- package/es/components/molecules/TemplateSaveAs/hooks/useTemplateSave.js +15 -5
- package/es/components/organism/PreviewTemplateModal/types.d.ts +2 -2
- package/es/components/template/TemplateListing/hooks/useTemplateListing.js +15 -5
- package/es/components/template/TemplateListing/types/TemplateListing.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
// Libraries
|
|
2
13
|
import { useCallback, useMemo, useState } from 'react';
|
|
3
14
|
import { useGetTemplateCategoryList, useGetObjectTemplateList, } from '@antscorp/antsomi-ui/es/queries/TemplateListing';
|
|
@@ -68,11 +79,10 @@ export const useTemplateSave = (options) => {
|
|
|
68
79
|
const templateItems = useMemo(() => {
|
|
69
80
|
if (infiniteObjectTemplate) {
|
|
70
81
|
const { pages } = infiniteObjectTemplate;
|
|
71
|
-
return pages.flatMap(({ entities }) => entities.flatMap((
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
})));
|
|
82
|
+
return pages.flatMap(({ entities }) => entities.flatMap((_a) => {
|
|
83
|
+
var { model } = _a, restOfEntity = __rest(_a, ["model"]);
|
|
84
|
+
return restOfEntity;
|
|
85
|
+
}));
|
|
76
86
|
}
|
|
77
87
|
return [];
|
|
78
88
|
}, [infiniteObjectTemplate]);
|
|
@@ -17,14 +17,14 @@ export interface BannerProps {
|
|
|
17
17
|
showSkeleton?: boolean;
|
|
18
18
|
children?: React.ReactNode;
|
|
19
19
|
}
|
|
20
|
-
export type ThumbnailProps = Omit<ThumbnailCardProps,
|
|
20
|
+
export type ThumbnailProps = Omit<ThumbnailCardProps, 'id' | 'name' | 'thumbnail' | 'onClickWrapper'> & {
|
|
21
21
|
thumbnails?: TThumbnail[];
|
|
22
22
|
onClickThumbnail?: (value: TThumbnail) => void;
|
|
23
23
|
};
|
|
24
24
|
export interface SimilarTemplateProps {
|
|
25
25
|
show?: boolean;
|
|
26
26
|
similarTemplates?: TTemplateItem[];
|
|
27
|
-
similarCardProps?: Omit<ThumbnailCardProps,
|
|
27
|
+
similarCardProps?: Omit<ThumbnailCardProps, 'id' | 'name' | 'thumbnail'>;
|
|
28
28
|
}
|
|
29
29
|
export interface InformationProps {
|
|
30
30
|
deviceType: string;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
// Libraries
|
|
2
13
|
import { useCallback, useMemo, useState } from 'react';
|
|
3
14
|
import { App } from 'antd';
|
|
@@ -150,11 +161,10 @@ export const useTemplateListing = (options) => {
|
|
|
150
161
|
const templateItems = useMemo(() => {
|
|
151
162
|
if (infiniteObjectTemplate) {
|
|
152
163
|
const { pages } = infiniteObjectTemplate;
|
|
153
|
-
return pages.flatMap(({ entities }) => entities.flatMap((
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
})));
|
|
164
|
+
return pages.flatMap(({ entities }) => entities.flatMap((_a) => {
|
|
165
|
+
var { model } = _a, restOfEntity = __rest(_a, ["model"]);
|
|
166
|
+
return restOfEntity;
|
|
167
|
+
}));
|
|
158
168
|
}
|
|
159
169
|
return [];
|
|
160
170
|
}, [infiniteObjectTemplate]);
|