@antscorp/antsomi-ui 1.3.5-beta.959 → 1.3.5-beta.960
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.
|
@@ -8,8 +8,8 @@ import SelectTag from './SelectTag';
|
|
|
8
8
|
import { defaultProps } from './constants';
|
|
9
9
|
export const SelectAssociatedTag = (props) => {
|
|
10
10
|
// Props
|
|
11
|
-
const { tagConfigs, style, selected, options, onSelect } = props;
|
|
11
|
+
const { tagConfigs, style, selected, options, children, onSelect } = props;
|
|
12
12
|
const { tag, value } = selected || {};
|
|
13
|
-
return (_jsxs(StyledSpace, { className: "select-associated-tag", style: style, children: [_jsx(SelectTag, { ...tagConfigs, selectedTag: tag }), _jsx(Divider, { type: "vertical", style: { margin: '0px 1px 0px 6px' } }), _jsx(Select, { style: { width: '100%', height: '100%' }, value: value, options: options, onChange: onSelect })] }));
|
|
13
|
+
return (_jsxs(StyledSpace, { className: "select-associated-tag", style: style, children: [_jsx(SelectTag, { ...tagConfigs, selectedTag: tag }), _jsx(Divider, { type: "vertical", style: { margin: '0px 1px 0px 6px' } }), children ?? (_jsx(Select, { style: { width: '100%', height: '100%' }, value: value, options: options, onChange: onSelect }))] }));
|
|
14
14
|
};
|
|
15
15
|
SelectAssociatedTag.defaultProps = defaultProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Constants
|
|
2
2
|
import { globalToken } from '@antscorp/antsomi-ui/es/constants';
|
|
3
3
|
// Locales
|
|
4
|
-
|
|
4
|
+
import { translations, translate } from '@antscorp/antsomi-locales';
|
|
5
5
|
export const DEFAULT_TAGS = {
|
|
6
6
|
RAW: 'RAW',
|
|
7
7
|
md5: 'md5',
|
|
@@ -30,8 +30,7 @@ export const DEFAULT_TAGS_LIST = Object.values(DEFAULT_TAGS_OPTS);
|
|
|
30
30
|
export const defaultProps = {
|
|
31
31
|
tagConfigs: {
|
|
32
32
|
options: DEFAULT_TAGS_LIST,
|
|
33
|
-
|
|
34
|
-
title: 'Hash Method',
|
|
33
|
+
title: translate(translations._INFO_STORY_WAIT_FOR_HASH, 'Hash Method'),
|
|
35
34
|
onSelect: () => { },
|
|
36
35
|
},
|
|
37
36
|
selected: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dictionary } from 'lodash';
|
|
2
|
-
import { CSSProperties } from 'react';
|
|
2
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
3
3
|
export type TagItem = {
|
|
4
4
|
label: string;
|
|
5
5
|
value: string;
|
|
@@ -51,6 +51,11 @@ export interface SelectAssociatedTagProps {
|
|
|
51
51
|
* @type {CSSProperties}
|
|
52
52
|
*/
|
|
53
53
|
style?: CSSProperties;
|
|
54
|
+
/**
|
|
55
|
+
* The children to be rendered inside the SelectAssociatedTag component.
|
|
56
|
+
* @type {ReactNode}
|
|
57
|
+
*/
|
|
58
|
+
children?: ReactNode;
|
|
54
59
|
/**
|
|
55
60
|
* Callback function called when an option is selected.
|
|
56
61
|
* @type {(value: Dictionary<SelectOption>, option: SelectOption | SelectOption[]) => void}
|
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.960",
|
|
4
4
|
"description": "An enterprise-class UI design language and React UI library.",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"dist/*",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"not op_mini all"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@antscorp/antsomi-locales": "1.0.
|
|
64
|
+
"@antscorp/antsomi-locales": "1.0.31",
|
|
65
65
|
"@ant-design/cssinjs": "^1.6.2",
|
|
66
66
|
"@antscorp/icons": "0.27.54",
|
|
67
67
|
"@antscorp/image-editor": "1.0.2",
|