@antscorp/antsomi-ui 1.3.5-beta.200 → 1.3.5-beta.201
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.
|
@@ -21,12 +21,13 @@ export const Category = props => {
|
|
|
21
21
|
const selectedLabel = (_a = categoryChildren.find(item => item.key === selectedKey)) === null || _a === void 0 ? void 0 : _a.label;
|
|
22
22
|
return (React.createElement(Flex, { key: selectedKey, className: "selected-category", justify: "space-between", align: "center" },
|
|
23
23
|
React.createElement(Tooltip, { title: selectedLabel, zIndex: 3001 },
|
|
24
|
-
React.createElement(Text, { ellipsis: true
|
|
24
|
+
React.createElement(Text, { ellipsis: true }, selectedLabel)),
|
|
25
25
|
React.createElement(Icon, { type: "icon-ants-remove-light", className: "remove-btn", onClick: () => onRemoveCategory({ parentKey: categoryKey, childKey: selectedKey }) })));
|
|
26
26
|
}),
|
|
27
27
|
remainChildren.length === 0 ? (typeof label === 'string' ? (React.createElement(Button, { disabled: true },
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
React.createElement(Text, { ellipsis: true, style: { color: 'inherit' } },
|
|
29
|
+
"+ Add ", label === null || label === void 0 ? void 0 :
|
|
30
|
+
label.toLowerCase()))) : (label)) : (React.createElement(Dropdown, { menu: {
|
|
30
31
|
items: remainChildren,
|
|
31
32
|
onClick: ({ key }) => onAddCategory({ parentKey: categoryKey, childKey: key }),
|
|
32
33
|
},
|
|
@@ -35,6 +36,7 @@ export const Category = props => {
|
|
|
35
36
|
// overflow: 'auto',
|
|
36
37
|
// }}
|
|
37
38
|
getPopupContainer: triggerNode => triggerNode.parentElement, trigger: ['click'], dropdownRender: node => React.createElement(DropdownMenuContent, null, node) }, typeof label === 'string' ? (React.createElement(Button, { disabled: true },
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
React.createElement(Text, { ellipsis: true, style: { color: 'inherit' } },
|
|
40
|
+
"+ Add ", label === null || label === void 0 ? void 0 :
|
|
41
|
+
label.toLowerCase()))) : (label))))));
|
|
40
42
|
};
|
|
@@ -132,7 +132,7 @@ export const useTemplateSave = (options) => {
|
|
|
132
132
|
},
|
|
133
133
|
});
|
|
134
134
|
if (response.existed) {
|
|
135
|
-
return Promise.reject(new Error('
|
|
135
|
+
return Promise.reject(new Error('This name has already existed'));
|
|
136
136
|
}
|
|
137
137
|
return Promise.resolve();
|
|
138
138
|
}), [objectType, publicLevel, service, validateTemplateName]);
|
|
@@ -24,9 +24,9 @@ export const TemplateSaveAsStyled = styled(Flex) `
|
|
|
24
24
|
margin-bottom: 20px;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
&:not(:has(.share-access-container)) .categories-container {
|
|
27
|
+
/* &:not(:has(.share-access-container)) .categories-container {
|
|
28
28
|
width: 60%;
|
|
29
|
-
}
|
|
29
|
+
} */
|
|
30
30
|
|
|
31
31
|
.share-access-container {
|
|
32
32
|
flex: 1 1 40%;
|
|
@@ -87,7 +87,7 @@ export const TemplateSaveAsStyled = styled(Flex) `
|
|
|
87
87
|
.category-container {
|
|
88
88
|
flex: 1;
|
|
89
89
|
display: grid;
|
|
90
|
-
grid-template-columns: repeat(2,
|
|
90
|
+
grid-template-columns: repeat(2, minmax(100px, 250px));
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.selected-category {
|