@antscorp/antsomi-ui 1.3.5-beta.62 → 1.3.5-beta.64

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.
Files changed (22) hide show
  1. package/es/components/molecules/TemplateSaveAs/TemplateSaveAs.d.ts +5 -2
  2. package/es/components/molecules/TemplateSaveAs/TemplateSaveAs.js +22 -20
  3. package/es/components/molecules/TemplateSaveAs/TemplateSaveAsModal.js +7 -7
  4. package/es/components/template/TemplateListing/components/CategoryListing/styled.js +4 -4
  5. package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.d.ts +2 -0
  6. package/es/components/template/TemplateListing/stories/dataTypes/components/BlankTemplatePropsTable/index.js +44 -0
  7. package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.d.ts +2 -0
  8. package/es/components/template/TemplateListing/stories/dataTypes/components/CategoryListingPropsTable/index.js +53 -0
  9. package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.d.ts +2 -0
  10. package/es/components/template/TemplateListing/stories/dataTypes/components/DataTypeTables/index.js +68 -0
  11. package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.d.ts +2 -0
  12. package/es/components/template/TemplateListing/stories/dataTypes/components/EmptyPropsTable/index.js +28 -0
  13. package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.d.ts +2 -0
  14. package/es/components/template/TemplateListing/stories/dataTypes/components/TemplatesPropsTable/index.js +46 -0
  15. package/es/components/template/TemplateListing/stories/dataTypes/components/index.d.ts +5 -0
  16. package/es/components/template/TemplateListing/stories/dataTypes/components/index.js +5 -0
  17. package/es/components/template/TemplateListing/stories/demo/styled.d.ts +1 -0
  18. package/es/components/template/TemplateListing/stories/demo/styled.js +7 -0
  19. package/es/components/template/TemplateListing/styled/index.d.ts +0 -1
  20. package/es/components/template/TemplateListing/styled/index.js +0 -5
  21. package/es/components/template/TemplateListing/types/BlankTemplate.d.ts +1 -1
  22. package/package.json +1 -1
@@ -7,8 +7,11 @@ export type categoriesProps = {
7
7
  export interface TemplateValueOptions {
8
8
  saveOption?: string;
9
9
  templateName?: {
10
- id?: string | number;
11
- label?: string;
10
+ id: undefined;
11
+ label: string;
12
+ } | {
13
+ id: string | number;
14
+ label: string;
12
15
  };
13
16
  description?: string;
14
17
  defaultThumbnail?: number;
@@ -22,7 +22,7 @@ import { TemplateSaveAsStyled } from './styled';
22
22
  import { ImageSlider } from './components';
23
23
  const { Text } = Typography;
24
24
  export const TemplateSaveAs = props => {
25
- const { className, shareAccess, saveOptions, imageReview, categories, omitCategories, templateNames, templateNamesOptions, descriptionOptions, form, value, onChange, onEvent,
25
+ const { className, shareAccess, saveOptions, imageReview, categories, omitCategories, templateNames: templateNameList, templateNamesOptions, descriptionOptions, form, value, onChange, onEvent,
26
26
  // onNamePopupScroll,
27
27
  } = props;
28
28
  const { show: isShowShareAccess } = shareAccess, shareAccessProps = __rest(shareAccess, ["show"]);
@@ -30,21 +30,21 @@ export const TemplateSaveAs = props => {
30
30
  const { isLoading, label: templateLabel, defaultNewTemplateName, onSearch, onNamePopupScroll, } = templateNamesOptions || {};
31
31
  const { label: descriptionLabel, placeholder: descriptionPlaceholder } = descriptionOptions || {};
32
32
  const { saveNewText = 'Save as a new media Template', saveExistText = 'Save as an existing media Template', saveNewValue = 'save-new', saveExistValue = 'save-exist', } = saveOptions || {};
33
- const { saveOption = saveNewValue, templateName: defaultTemplateName, description: defaultTemplateDesc, defaultThumbnail = 0, categories: categoriesValue = {}, accessInfo, } = value || {};
33
+ const { saveOption = saveNewValue, templateName, description: defaultTemplateDesc, defaultThumbnail = 0, categories: categoriesValue = {}, accessInfo, } = value || {};
34
34
  const [searchValue, setSearchValue] = useState('');
35
35
  const searchValueDebounce = useDebounce(searchValue, 1000);
36
36
  useEffect(() => {
37
37
  if (searchValueDebounce && onSearch)
38
38
  onSearch(searchValueDebounce);
39
39
  }, [searchValueDebounce, onSearch]);
40
- const [templateName, setTemplateName] = useState(defaultNewTemplateName || `Untitled Media Template#${dayjs().format('YYYY-MM-DD HH:mm:ss')}`);
41
- const [templateNameExist, setTemplateNameExist] = useState((defaultTemplateName === null || defaultTemplateName === void 0 ? void 0 : defaultTemplateName.id) ? defaultTemplateName : templateNames === null || templateNames === void 0 ? void 0 : templateNames[0]);
40
+ const [templateNameNew, setTemplateNameNew] = useState(defaultNewTemplateName || `Untitled Media Template#${dayjs().format('YYYY-MM-DD HH:mm:ss')}`);
41
+ const [templateNameExist, setTemplateNameExist] = useState((templateName === null || templateName === void 0 ? void 0 : templateName.id) ? templateName : templateNameList === null || templateNameList === void 0 ? void 0 : templateNameList[0]);
42
42
  // NOTE: HOTFIX templateNameExist not update when value outside changed
43
43
  useEffect(() => {
44
- if (defaultTemplateName) {
45
- setTemplateNameExist(defaultTemplateName);
44
+ if (templateName === null || templateName === void 0 ? void 0 : templateName.id) {
45
+ setTemplateNameExist(templateName);
46
46
  }
47
- }, [defaultTemplateName]);
47
+ }, [templateName]);
48
48
  const handleChangeValue = (newValue) => {
49
49
  var _a, _b;
50
50
  if (onEvent) {
@@ -53,7 +53,9 @@ export const TemplateSaveAs = props => {
53
53
  if (onChange) {
54
54
  onChange(Object.assign(Object.assign(Object.assign({}, value), newValue), {
55
55
  // TODO: return saveOption and templateName generate default value if not pass as value props
56
- defaultThumbnail: newValue.defaultThumbnail || defaultThumbnail, saveOption: !(value === null || value === void 0 ? void 0 : value.saveOption) && !newValue.saveOption
56
+ defaultThumbnail: newValue.defaultThumbnail || defaultThumbnail,
57
+ // NOTE: if have no saveOption set saveOption value follow this priority => newValue >> value
58
+ saveOption: !(value === null || value === void 0 ? void 0 : value.saveOption) && !newValue.saveOption
57
59
  ? saveOption
58
60
  : newValue.saveOption || (value === null || value === void 0 ? void 0 : value.saveOption) }), (_b = (_a = form === null || form === void 0 ? void 0 : form.getFieldsError()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.errors);
59
61
  }
@@ -88,7 +90,7 @@ export const TemplateSaveAs = props => {
88
90
  handleChangeValue({
89
91
  saveOption: e.target.value,
90
92
  templateName: e.target.value === saveNewValue
91
- ? { id: templateNameExist.id, label: templateName }
93
+ ? { id: undefined, label: templateNameNew }
92
94
  : templateNameExist,
93
95
  });
94
96
  } },
@@ -102,11 +104,11 @@ export const TemplateSaveAs = props => {
102
104
  " ",
103
105
  React.createElement("span", null, " *")),
104
106
  saveOption === saveNewValue ? (React.createElement(Form.Item, { name: "template-name", validateTrigger: "onChange", noStyle: true, rules: [{ required: true }] },
105
- React.createElement(Input, { debounce: 1000, className: "field-input", value: templateName, onAfterChange: value => {
107
+ React.createElement(Input, { className: "field-input", value: templateNameNew, debounce: 100, onAfterChange: value => {
106
108
  handleChangeValue({ templateName: { id: undefined, label: value } });
107
- setTemplateName(value);
108
- }, required: true }))) : (React.createElement(Select, { className: "field-input", showSearch: true, searchValue: searchValue, onSearch: setSearchValue, onPopupScroll: onNamePopupScroll, filterOption: false, dropdownRender: menu => (React.createElement(React.Fragment, null,
109
- isLoading && templateNames.length === 0 ? null : menu,
109
+ setTemplateNameNew(value);
110
+ }, "aria-valuetext": templateNameNew, required: true }))) : (React.createElement(Select, { className: "field-input", showSearch: true, searchValue: searchValue, onSearch: setSearchValue, onPopupScroll: onNamePopupScroll, filterOption: false, dropdownRender: menu => (React.createElement(React.Fragment, null,
111
+ isLoading && templateNameList.length === 0 ? null : menu,
110
112
  isLoading ? (React.createElement(Space, { style: {
111
113
  padding: '4px 0',
112
114
  width: '100%',
@@ -115,29 +117,29 @@ export const TemplateSaveAs = props => {
115
117
  } },
116
118
  React.createElement(Spin, { size: "small" }))) : null)), value: templateNameExist === null || templateNameExist === void 0 ? void 0 : templateNameExist.id, options:
117
119
  // If template exist is not in templateNames list => add to begin of options array
118
- (templateNames === null || templateNames === void 0 ? void 0 : templateNames.length) > 0
120
+ (templateNameList === null || templateNameList === void 0 ? void 0 : templateNameList.length) > 0
119
121
  ? [
120
- ...(templateNames.find(item => item.id === templateNameExist.id)
122
+ ...(templateNameList.find(item => item.id === (templateNameExist === null || templateNameExist === void 0 ? void 0 : templateNameExist.id))
121
123
  ? []
122
- : [{ value: templateNameExist.id, label: templateNameExist.label }]),
123
- ...templateNames.map(item => ({ value: item.id, label: item.label })),
124
+ : [{ value: templateNameExist === null || templateNameExist === void 0 ? void 0 : templateNameExist.id, label: templateNameExist === null || templateNameExist === void 0 ? void 0 : templateNameExist.label }]),
125
+ ...templateNameList.map(item => ({ value: item.id, label: item.label })),
124
126
  ]
125
127
  : [], onChange: value => {
126
128
  var _a, _b;
127
129
  handleChangeValue({
128
130
  templateName: {
129
131
  id: value,
130
- label: ((_a = templateNames.find(item => item.id === value)) === null || _a === void 0 ? void 0 : _a.label) || '',
132
+ label: ((_a = templateNameList.find(item => item.id === value)) === null || _a === void 0 ? void 0 : _a.label) || '',
131
133
  },
132
134
  });
133
135
  setTemplateNameExist({
134
136
  id: value,
135
- label: ((_b = templateNames.find(item => item.id === value)) === null || _b === void 0 ? void 0 : _b.label) || '',
137
+ label: ((_b = templateNameList.find(item => item.id === value)) === null || _b === void 0 ? void 0 : _b.label) || '',
136
138
  });
137
139
  } }))),
138
140
  React.createElement(Flex, { className: "field-container" },
139
141
  React.createElement(Text, { className: "field-title field-title--middle" }, descriptionLabel || 'Description'),
140
- React.createElement(Input, { placeholder: descriptionPlaceholder || 'Describe your media template', className: "field-input", value: defaultTemplateDesc, debounce: 1000, onAfterChange: value => handleChangeValue({ description: value }) })),
142
+ React.createElement(Input, { placeholder: descriptionPlaceholder || 'Describe your media template', className: "field-input", value: defaultTemplateDesc, debounce: 100, onAfterChange: value => handleChangeValue({ description: value }) })),
141
143
  React.createElement(Flex, { className: "field-container" },
142
144
  React.createElement(Text, { className: "field-title" },
143
145
  imageReviewLabel || 'Thumbnail template',
@@ -16,7 +16,7 @@ import { TemplateSaveAs } from './TemplateSaveAs';
16
16
  // Inspiration form input component https://react.dev/reference/react-dom/components/input
17
17
  export const TemplateSaveAsModal = props => {
18
18
  const { open, onCancel, okText, onOk, title, templateProps, defaultValue } = props, restProps = __rest(props, ["open", "onCancel", "okText", "onOk", "title", "templateProps", "defaultValue"]);
19
- const { onChange: templateOnChange, value: templateValue } = templateProps, restTemplateProps = __rest(templateProps, ["onChange", "value"]);
19
+ const { onChange, value: templateValue } = templateProps, restTemplateProps = __rest(templateProps, ["onChange", "value"]);
20
20
  const [internalValue, setInternalValue] = useState(defaultValue || templateValue);
21
21
  const [errors, setErrors] = useState();
22
22
  useEffect(() => {
@@ -25,18 +25,18 @@ export const TemplateSaveAsModal = props => {
25
25
  }, [defaultValue]);
26
26
  const handleOnChange = (value, errors) => {
27
27
  setErrors(errors);
28
- if (templateOnChange) {
29
- templateOnChange(value);
28
+ if (onChange) {
29
+ onChange(value);
30
30
  }
31
31
  // NOTE: If there are no templateValue and templateOnChange => uncontrolled component => return templateValue
32
- if (defaultValue && !templateValue && !templateOnChange) {
32
+ if (defaultValue && !templateValue && !onChange) {
33
33
  setInternalValue(value);
34
34
  }
35
35
  };
36
36
  const handleOk = (event) => {
37
37
  if (onOk && (!errors || errors.length === 0)) {
38
- // NOTE: If there are templateValue and templateOnChange => controlled component => return templateValue
39
- onOk(event, templateValue && templateOnChange ? templateValue : internalValue);
38
+ // NOTE: If there are templateValue and onChange => controlled component => return templateValue
39
+ onOk(event, templateValue && onChange ? templateValue : internalValue);
40
40
  }
41
41
  };
42
42
  const handleCancel = (event) => {
@@ -46,5 +46,5 @@ export const TemplateSaveAsModal = props => {
46
46
  }
47
47
  };
48
48
  return (React.createElement(ModalV2, Object.assign({ open: open, onCancel: handleCancel, onOk: handleOk, okText: okText || 'Save', width: 1177, title: title || 'Save as my template' }, restProps),
49
- React.createElement(TemplateSaveAs, Object.assign({ onChange: (newValue, errors) => handleOnChange(newValue, errors), value: templateValue || internalValue }, restTemplateProps))));
49
+ React.createElement(TemplateSaveAs, Object.assign({ onChange: onChange ? (newValue, errors) => handleOnChange(newValue, errors) : undefined, value: templateValue || internalValue }, restTemplateProps))));
50
50
  };
@@ -10,9 +10,8 @@ export const MenuWrapper = styled.div `
10
10
  overflow-x: hidden;
11
11
  border-right: 1px solid rgba(5, 5, 5, 0.06);
12
12
 
13
- .antsomi-menu {
14
- height: 100%;
15
-
13
+ .antsomi-menu,
14
+ .ant-menu {
16
15
  [role='menuitem'] {
17
16
  width: 100%;
18
17
  border-radius: 0;
@@ -21,7 +20,8 @@ export const MenuWrapper = styled.div `
21
20
  margin-left: 0 !important;
22
21
  margin-right: 0 !important;
23
22
 
24
- .antsomi-menu-title-content {
23
+ .antsomi-menu-title-content,
24
+ .ant-menu-title-content {
25
25
  height: 100%;
26
26
  }
27
27
  }
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const BlankTemplatePropsTable: React.FC;
@@ -0,0 +1,44 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ // Components
4
+ import { Table } from '../../../../../../organism';
5
+ import { Tag, Typography, Flex } from '../../../../../../atoms';
6
+ // Constants
7
+ import { TABLE_API_COLUMNS } from '@antscorp/antsomi-ui/es/constants';
8
+ export const BlankTemplatePropsTable = () => {
9
+ const dataSource = [
10
+ {
11
+ key: '1',
12
+ property: 'show',
13
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
14
+ React.createElement(Typography.Text, null, "Handler show or hide Blank Template"))),
15
+ type: React.createElement(Tag, { color: "processing" }, "boolean"),
16
+ default: React.createElement(Tag, { bordered: false }, "false"),
17
+ },
18
+ {
19
+ key: '2',
20
+ property: 'description',
21
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
22
+ React.createElement(Typography.Text, null, "The text that is displayed below the Add Button"))),
23
+ type: React.createElement(Tag, { color: "processing" }, "string"),
24
+ default: React.createElement(Tag, { bordered: false }, "Blank Template"),
25
+ },
26
+ {
27
+ key: '3',
28
+ property: 'onClick',
29
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
30
+ React.createElement(Typography.Text, null, "Callback onClick on Blank Template"))),
31
+ type: React.createElement(Tag, { color: "processing" }, 'React.MouseEventHandler<HTMLElement>'),
32
+ default: React.createElement(Tag, { bordered: false }, " - "),
33
+ },
34
+ {
35
+ key: '4',
36
+ property: 'blankTemplateRender',
37
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
38
+ React.createElement(Typography.Text, null, "Render Blank Template node for customizing"))),
39
+ type: React.createElement(Tag, { color: "processing" }, '(node: ReactNode) => ReactNode'),
40
+ default: React.createElement(Tag, { bordered: false }, " - "),
41
+ },
42
+ ];
43
+ return React.createElement(Table, { dataSource: dataSource, columns: TABLE_API_COLUMNS, pagination: false });
44
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const CategoryListingPropsTable: React.FC;
@@ -0,0 +1,53 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ // Components
4
+ import { Table } from '../../../../../../organism';
5
+ import { Tag, Typography, Flex } from '../../../../../../atoms';
6
+ // Constants
7
+ import { TABLE_API_COLUMNS } from '@antscorp/antsomi-ui/es/constants';
8
+ import { CATEGORY_LISTING_WITH } from '../../../../constants';
9
+ export const CategoryListingPropsTable = () => {
10
+ const dataSource = [
11
+ {
12
+ key: '1',
13
+ property: 'items',
14
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
15
+ React.createElement(Typography.Text, null, "List of category items"))),
16
+ type: React.createElement(Tag, { color: "processing" }, "TCategoryItem [ ]"),
17
+ default: React.createElement(Tag, { bordered: false }, "[ ]"),
18
+ },
19
+ {
20
+ key: '2',
21
+ property: 'width',
22
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
23
+ React.createElement(Typography.Text, null, "Width of category"))),
24
+ type: React.createElement(Tag, { color: "processing" }, "number"),
25
+ default: React.createElement(Tag, { bordered: false }, CATEGORY_LISTING_WITH),
26
+ },
27
+ {
28
+ key: '3',
29
+ property: 'loading',
30
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
31
+ React.createElement(Typography.Text, null, "Show loading category listing"))),
32
+ type: React.createElement(Tag, { color: "processing" }, "boolean"),
33
+ default: React.createElement(Tag, { bordered: false }, "false"),
34
+ },
35
+ {
36
+ key: '4',
37
+ property: 'show',
38
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
39
+ React.createElement(Typography.Text, null, "Handler show or hide category"))),
40
+ type: React.createElement(Tag, { color: "processing" }, "boolean"),
41
+ default: React.createElement(Tag, { bordered: false }, "true"),
42
+ },
43
+ {
44
+ key: '5',
45
+ property: 'checkedCategories',
46
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
47
+ React.createElement(Typography.Text, null, "Record of checked categories"))),
48
+ type: React.createElement(Tag, { color: "processing" }, "TCheckedCategories"),
49
+ default: React.createElement(Tag, { bordered: false }, '{ }'),
50
+ },
51
+ ];
52
+ return React.createElement(Table, { dataSource: dataSource, columns: TABLE_API_COLUMNS, pagination: false });
53
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DataTypeTable: React.FC;
@@ -0,0 +1,68 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ import { Tag, Table } from '@antscorp/antsomi-ui/es/index';
4
+ import LinkTo from '@storybook/addon-links/react';
5
+ export const DataTypeTable = () => {
6
+ const columns = [
7
+ {
8
+ title: 'Name',
9
+ dataIndex: 'name',
10
+ key: 'name',
11
+ },
12
+ {
13
+ title: 'Type',
14
+ dataIndex: 'type',
15
+ key: 'type',
16
+ },
17
+ {
18
+ title: 'Description',
19
+ dataIndex: 'description',
20
+ key: 'description',
21
+ },
22
+ ];
23
+ const dataSource = [
24
+ {
25
+ key: 'templatesProps',
26
+ name: 'templatesProps',
27
+ type: (React.createElement(LinkTo, { story: "templates-props" },
28
+ React.createElement(Tag, { color: "processing" }, "templatesProps"))),
29
+ description: '-',
30
+ },
31
+ {
32
+ key: 'templateItemProps',
33
+ name: 'templateItemProps',
34
+ type: (React.createElement("a", { href: "../?path=/docs/molecules-thumbnailcard--default", target: "_blank" },
35
+ React.createElement(Tag, { color: "processing" }, "templateItemProps"))),
36
+ description: '-',
37
+ },
38
+ {
39
+ key: 'categoryListingProps',
40
+ name: 'categoryListingProps',
41
+ type: (React.createElement(LinkTo, { story: "category-listing-props" },
42
+ React.createElement(Tag, { color: "processing" }, "categoryListingProps"))),
43
+ description: '-',
44
+ },
45
+ {
46
+ key: 'blankTemplateProps',
47
+ name: 'blankTemplateProps',
48
+ type: (React.createElement(LinkTo, { story: "blank-template-props" },
49
+ React.createElement(Tag, { color: "processing" }, "blankTemplateProps"))),
50
+ description: '-',
51
+ },
52
+ {
53
+ key: 'previewModalProps',
54
+ name: 'previewModalProps',
55
+ type: (React.createElement("a", { href: "../?path=/docs/organisms-previewtemplatemodal--default", target: "_blank" },
56
+ React.createElement(Tag, { color: "processing" }, "previewModalProps"))),
57
+ description: '-',
58
+ },
59
+ {
60
+ key: 'emptyProps',
61
+ name: 'emptyProps',
62
+ type: (React.createElement(LinkTo, { story: "empty-props" },
63
+ React.createElement(Tag, { color: "processing" }, "emptyProps"))),
64
+ description: '-',
65
+ },
66
+ ];
67
+ return React.createElement(Table, { dataSource: dataSource, columns: columns, pagination: false });
68
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const EmptyPropsTable: React.FC;
@@ -0,0 +1,28 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ // Components
4
+ import { Table } from '../../../../../../organism';
5
+ import { Tag, Typography, Flex } from '../../../../../../atoms';
6
+ // Constants
7
+ import { TABLE_API_COLUMNS } from '@antscorp/antsomi-ui/es/constants';
8
+ export const EmptyPropsTable = () => {
9
+ const dataSource = [
10
+ {
11
+ key: '1',
12
+ property: 'icon',
13
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
14
+ React.createElement(Typography.Text, null, "Customize Empty icon"))),
15
+ type: React.createElement(Tag, { color: "processing" }, "ReactNode"),
16
+ default: React.createElement(Tag, { bordered: false }, " - "),
17
+ },
18
+ {
19
+ key: '2',
20
+ property: 'description',
21
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
22
+ React.createElement(Typography.Text, null, "The text that is displayed below the Icon"))),
23
+ type: React.createElement(Tag, { color: "processing" }, "string"),
24
+ default: React.createElement(Tag, { bordered: false }, "No data"),
25
+ },
26
+ ];
27
+ return React.createElement(Table, { dataSource: dataSource, columns: TABLE_API_COLUMNS, pagination: false });
28
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const TemplatesPropsTable: React.FC;
@@ -0,0 +1,46 @@
1
+ // Libraries
2
+ import React from 'react';
3
+ // Components
4
+ import { Table } from '../../../../../../organism';
5
+ import { Tag, Typography, Flex } from '../../../../../../atoms';
6
+ // Constants
7
+ import { TABLE_API_COLUMNS } from '@antscorp/antsomi-ui/es/constants';
8
+ import { LISTING_GAP_DEFAULT } from '../../../../constants';
9
+ export const TemplatesPropsTable = () => {
10
+ const dataSource = [
11
+ {
12
+ key: '1',
13
+ property: 'items',
14
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
15
+ React.createElement(Typography.Text, null, "List of templates"))),
16
+ type: React.createElement(Tag, { color: "processing" }, "( TTemplateItem & T) [ ]"),
17
+ default: React.createElement(Tag, { bordered: false }, "[ ]"),
18
+ },
19
+ {
20
+ key: '2',
21
+ property: 'loading',
22
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
23
+ React.createElement(Typography.Text, null, "Show loading template listing"))),
24
+ type: React.createElement(Tag, { color: "processing" }, "boolean"),
25
+ default: React.createElement(Tag, { bordered: false }, "false"),
26
+ },
27
+ {
28
+ key: '3',
29
+ property: 'gap',
30
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
31
+ React.createElement(Typography.Text, null, "Spacing between template items"),
32
+ React.createElement(Typography.Text, null, "When the screen size changes, the height and width of each template will change according to the screen, but the gap remains the same."))),
33
+ type: React.createElement(Tag, { color: "processing" }, "number"),
34
+ default: React.createElement(Tag, { bordered: false }, LISTING_GAP_DEFAULT),
35
+ },
36
+ {
37
+ key: '4',
38
+ property: 'onLoadMoreTemplates',
39
+ description: (React.createElement(Flex, { gap: 10, vertical: true },
40
+ React.createElement(Typography.Text, null, "Handles loading additional data based on lazy loading mechanism"))),
41
+ type: React.createElement(Tag, { color: "processing" }, '( ) => void'),
42
+ default: React.createElement(Tag, { bordered: false }, '( ) => { }'),
43
+ },
44
+ ];
45
+ return React.createElement(Table, { dataSource: dataSource, columns: TABLE_API_COLUMNS, pagination: false });
46
+ };
@@ -0,0 +1,5 @@
1
+ export { DataTypeTable } from './DataTypeTables';
2
+ export { TemplatesPropsTable } from './TemplatesPropsTable';
3
+ export { CategoryListingPropsTable } from './CategoryListingPropsTable';
4
+ export { BlankTemplatePropsTable } from './BlankTemplatePropsTable';
5
+ export { EmptyPropsTable } from './EmptyPropsTable';
@@ -0,0 +1,5 @@
1
+ export { DataTypeTable } from './DataTypeTables';
2
+ export { TemplatesPropsTable } from './TemplatesPropsTable';
3
+ export { CategoryListingPropsTable } from './CategoryListingPropsTable';
4
+ export { BlankTemplatePropsTable } from './BlankTemplatePropsTable';
5
+ export { EmptyPropsTable } from './EmptyPropsTable';
@@ -0,0 +1 @@
1
+ export declare const ImageWrapper: import("styled-components").StyledComponent<"img", any, {}, never>;
@@ -0,0 +1,7 @@
1
+ // Libraries
2
+ import styled from 'styled-components';
3
+ export const ImageWrapper = styled.img `
4
+ width: 100%;
5
+ height: 100%;
6
+ object-fit: contain;
7
+ `;
@@ -1,4 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  export declare const TemplateListingWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/flex/interface").FlexProps<import("antd/es/_util/type").AnyObject> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
3
3
  export declare const LoadMoreBlock: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const ImageWrapper: import("styled-components").StyledComponent<"img", any, {}, never>;
@@ -33,8 +33,3 @@ export const TemplateListingWrapper = styled(Flex) `
33
33
  }
34
34
  `;
35
35
  export const LoadMoreBlock = styled.div ``;
36
- export const ImageWrapper = styled.img `
37
- width: 100%;
38
- height: 100%;
39
- object-fit: contain;
40
- `;
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface BlankTemplateProps {
3
+ show?: boolean;
3
4
  width?: number;
4
5
  height?: number;
5
- show?: boolean;
6
6
  description?: string;
7
7
  onClick?: React.MouseEventHandler<HTMLElement>;
8
8
  blankTemplateRender?: (node: ReactNode) => ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.62",
3
+ "version": "1.3.5-beta.64",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",