@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.
@@ -36,6 +36,7 @@ export declare const useTemplateSave: (options: TemplateListingOptions) => {
36
36
  }>;
37
37
  }[];
38
38
  templateItems: {
39
+ [key: string]: any;
39
40
  id: string | number;
40
41
  label: string;
41
42
  thumbnail?: string | undefined;
@@ -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(({ id, name, thumbnail }) => ({
72
- id,
73
- label: name,
74
- thumbnail,
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, keyof TTemplateItem | 'onClickWrapper'> & {
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, keyof TTemplateItem>;
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(({ id, name, thumbnail }) => ({
154
- id,
155
- name,
156
- thumbnail,
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]);
@@ -22,5 +22,6 @@ export interface TTemplateItem {
22
22
  id: TThumbnailCardId;
23
23
  name?: ThumbnailCardProps['name'];
24
24
  thumbnail?: ThumbnailCardProps['thumbnail'];
25
+ [key: string]: any;
25
26
  }
26
27
  export type TSelectTemplateAction = 'edit' | 'preview' | 'use';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.102",
3
+ "version": "1.3.5-beta.103",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",