@antscorp/antsomi-ui 2.0.113 → 2.0.115
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/CHANGELOG.md +92 -63
- package/es/components/atoms/SelectAssociatedTag/SelectAssociatedTag.d.ts +5 -0
- package/es/components/atoms/SelectAssociatedTag/SelectAssociatedTag.js +15 -0
- package/es/components/atoms/SelectAssociatedTag/SelectTag.d.ts +4 -0
- package/es/components/atoms/SelectAssociatedTag/SelectTag.js +26 -0
- package/es/components/atoms/SelectAssociatedTag/constants.d.ts +11 -0
- package/es/components/atoms/SelectAssociatedTag/constants.js +42 -0
- package/es/components/atoms/SelectAssociatedTag/index.d.ts +3 -0
- package/es/components/atoms/SelectAssociatedTag/index.js +2 -0
- package/es/components/atoms/SelectAssociatedTag/styled.d.ts +7 -0
- package/es/components/atoms/SelectAssociatedTag/styled.js +60 -0
- package/es/components/atoms/SelectAssociatedTag/types.d.ts +76 -0
- package/es/components/atoms/SelectAssociatedTag/types.js +1 -0
- package/es/components/atoms/index.d.ts +1 -0
- package/es/components/atoms/index.js +1 -0
- package/es/components/icons/CircleInfoIcon.js +2 -2
- package/es/components/icons/LazyIcon/LazyIcon.d.ts +2 -0
- package/es/components/icons/LazyIcon/LazyIcon.js +2 -0
- package/es/components/molecules/InputSelectAttribute/index.d.ts +25 -0
- package/es/components/molecules/InputSelectAttribute/index.js +124 -0
- package/es/components/molecules/InputSelectAttribute/styled.d.ts +14 -0
- package/es/components/molecules/InputSelectAttribute/styled.js +33 -0
- package/es/components/molecules/SelectV2/styled.d.ts +3 -1
- package/es/components/molecules/SelectV2/styled.js +2 -2
- package/es/components/molecules/TagifyInput/TagifyInput.js +159 -71
- package/es/components/molecules/TagifyInput/constants.d.ts +24 -2
- package/es/components/molecules/TagifyInput/constants.js +25 -2
- package/es/components/molecules/TagifyInput/patternHandlers.d.ts +12 -6
- package/es/components/molecules/TagifyInput/patternHandlers.js +88 -43
- package/es/components/molecules/TagifyInput/types.d.ts +24 -3
- package/es/components/molecules/TagifyInput/utils.d.ts +10 -1
- package/es/components/molecules/TagifyInput/utils.js +82 -4
- package/es/components/molecules/TagifyInput/utils.style.js +81 -96
- package/es/components/molecules/index.d.ts +1 -0
- package/es/components/molecules/index.js +1 -0
- package/es/components/organism/AccountSharing/AccountSharing.js +18 -10
- package/es/components/organism/ActivityTimeline/utils.js +168 -2
- package/es/components/organism/LeftMenu/hooks/usePermission.js +1 -1
- package/es/components/organism/LeftMenu/utils/index.js +1 -1
- package/es/components/organism/TextEditor/TextEditor.js +17 -1
- package/es/components/organism/TextEditor/types.d.ts +6 -2
- package/es/components/organism/TextEditor/ui/Toolbar/FormattingToolbar.js +11 -6
- package/es/utils/cookie.js +9 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,63 +1,92 @@
|
|
|
1
|
-
### Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
|
4
|
-
|
|
5
|
-
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
|
-
|
|
7
|
-
#### [v2.0.
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- feat
|
|
12
|
-
|
|
13
|
-
#### [v2.0.
|
|
14
|
-
|
|
15
|
-
>
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
- feat
|
|
19
|
-
- feat
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
>
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
#### [
|
|
30
|
-
|
|
31
|
-
>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
1
|
+
### Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
|
|
4
|
+
|
|
5
|
+
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
|
+
|
|
7
|
+
#### [v2.0.115](https://bitbucket.org/git-vn/at.packages.frontend/compare/v2.0.115..v2.0.64-staging.60)
|
|
8
|
+
|
|
9
|
+
- feat: update version antsomi-locales [`7d44aae`](https://bitbucket.org/git-vn/at.packages.frontend/commits/7d44aae3055b3b1bbfb772e2ed3afd5fa920fd05)
|
|
10
|
+
- chore: update package antsomi locales [`30e406b`](https://bitbucket.org/git-vn/at.packages.frontend/commits/30e406ba9010701346823354f2829d0fca3c24be)
|
|
11
|
+
- feat: update version antsomi-locales [`187cb53`](https://bitbucket.org/git-vn/at.packages.frontend/commits/187cb5342342de8b2dea8b3a19c4a4029e4a3f7f)
|
|
12
|
+
|
|
13
|
+
#### [v2.0.64-staging.60](https://bitbucket.org/git-vn/at.packages.frontend/compare/v2.0.64-staging.60..v2.0.64-staging.58)
|
|
14
|
+
|
|
15
|
+
> 20 March 2026
|
|
16
|
+
|
|
17
|
+
- feat: update message activity timeline [`7a3bc15`](https://bitbucket.org/git-vn/at.packages.frontend/commits/7a3bc15dd2e2eb7caf91e6bf064edd48e97dcdb2)
|
|
18
|
+
- feat: add fallback scheme_code [`ecb8e67`](https://bitbucket.org/git-vn/at.packages.frontend/commits/ecb8e67a56b93610df913c2f7c37d89b8be98ad6)
|
|
19
|
+
- feat: update extra keys [`da5b04e`](https://bitbucket.org/git-vn/at.packages.frontend/commits/da5b04e9e1c6b5d0c3584c4e08ffe70733ad4e77)
|
|
20
|
+
|
|
21
|
+
#### [v2.0.64-staging.58](https://bitbucket.org/git-vn/at.packages.frontend/compare/v2.0.64-staging.58..v2.0.64-staging.54)
|
|
22
|
+
|
|
23
|
+
> 17 March 2026
|
|
24
|
+
|
|
25
|
+
- feat: add event tg [`3d5672b`](https://bitbucket.org/git-vn/at.packages.frontend/commits/3d5672bf798efc459cec8c2866692ecc48be1141)
|
|
26
|
+
- feat: update message activity timeline leads [`3b1590e`](https://bitbucket.org/git-vn/at.packages.frontend/commits/3b1590ee8c5aa8a1d671082f6fd72d9d85b6414b)
|
|
27
|
+
- feat: update message activity timeline leads [`8b4d22c`](https://bitbucket.org/git-vn/at.packages.frontend/commits/8b4d22cf8d1ad4a4cc0e7c36dcd8306ae9e2f7d7)
|
|
28
|
+
|
|
29
|
+
#### [v2.0.64-staging.54](https://bitbucket.org/git-vn/at.packages.frontend/compare/v2.0.64-staging.54..v2.0.22)
|
|
30
|
+
|
|
31
|
+
> 30 January 2026
|
|
32
|
+
|
|
33
|
+
- fix: build search logic [`#27`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/27)
|
|
34
|
+
- feat: add report area chart [`4a0fad4`](https://bitbucket.org/git-vn/at.packages.frontend/commits/4a0fad4b405425ef03b9cf6038f6e9389f44a366)
|
|
35
|
+
- chore: update storybook version [`d13f194`](https://bitbucket.org/git-vn/at.packages.frontend/commits/d13f19462c2fe117934df7fe2e09fd0aa95a0167)
|
|
36
|
+
- feat: init antsomi-genai [`d898d07`](https://bitbucket.org/git-vn/at.packages.frontend/commits/d898d07f09cf6436ff9ba2a5430e08fc44190781)
|
|
37
|
+
|
|
38
|
+
### [v2.0.22](https://bitbucket.org/git-vn/at.packages.frontend/compare/v2.0.22..v1.0.10)
|
|
39
|
+
|
|
40
|
+
> 19 January 2023
|
|
41
|
+
|
|
42
|
+
#### [v1.0.10](https://bitbucket.org/git-vn/at.packages.frontend/compare/v1.0.10..v1.0.9)
|
|
43
|
+
|
|
44
|
+
> 20 June 2024
|
|
45
|
+
|
|
46
|
+
#### [v1.0.9](https://bitbucket.org/git-vn/at.packages.frontend/compare/v1.0.9..v1.0.8)
|
|
47
|
+
|
|
48
|
+
> 20 June 2024
|
|
49
|
+
|
|
50
|
+
#### [v1.0.8](https://bitbucket.org/git-vn/at.packages.frontend/compare/v1.0.8..v1.0.3)
|
|
51
|
+
|
|
52
|
+
> 20 June 2024
|
|
53
|
+
|
|
54
|
+
- feat(SelectAccount): add component [`2f1dea0`](https://bitbucket.org/git-vn/at.packages.frontend/commits/2f1dea035af07a01a6be8da47b531d52d2977bbe)
|
|
55
|
+
- fix: update style for calendar selection [`4347b91`](https://bitbucket.org/git-vn/at.packages.frontend/commits/4347b91f5bbe31caeb64478116c1822fe443f359)
|
|
56
|
+
- feat(EditorTab): use modal async in onCloseTab [`76aece8`](https://bitbucket.org/git-vn/at.packages.frontend/commits/76aece8cc7a44385d63019058daa1f8477c8fbcb)
|
|
57
|
+
|
|
58
|
+
#### [v1.0.3](https://bitbucket.org/git-vn/at.packages.frontend/compare/v1.0.3..v1.0.2)
|
|
59
|
+
|
|
60
|
+
> 17 January 2023
|
|
61
|
+
|
|
62
|
+
- update timeline package [`e198927`](https://bitbucket.org/git-vn/at.packages.frontend/commits/e198927d83931f9155e90ab9a1d9d3a5ac2989c4)
|
|
63
|
+
- update-ticket-editor [`38dd7b0`](https://bitbucket.org/git-vn/at.packages.frontend/commits/38dd7b0a7b2b0b58a63e725419e9b057e053f44f)
|
|
64
|
+
- update-upload-file-ticket-editor [`bb2f2ef`](https://bitbucket.org/git-vn/at.packages.frontend/commits/bb2f2ef1c46f4239ad716c897e53856a6368ea7d)
|
|
65
|
+
|
|
66
|
+
#### v1.0.2
|
|
67
|
+
|
|
68
|
+
> 4 January 2023
|
|
69
|
+
|
|
70
|
+
- Sprint10/vinlt/feature/date advanced [`#24`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/24)
|
|
71
|
+
- Sprint10/sangndd/feature/extend value matches any [`#23`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/23)
|
|
72
|
+
- Sprint10/sangndd/feature/extend value matches any [`#22`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/22)
|
|
73
|
+
- [Scatter chart] Max X-axis giá trị bị lặp [`#20`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/20)
|
|
74
|
+
- Sprint8/vinlt/feature/show data label short [`#18`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/18)
|
|
75
|
+
- Fix duplicate axis max value [`#17`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/17)
|
|
76
|
+
- [Antalyser] Một số bug khi nhập axis giá trị thập phân [`#16`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/16)
|
|
77
|
+
- Sprint6/vinlt/fixbug/chart [`#15`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/15)
|
|
78
|
+
- - Axis allows input of decimal values [`#14`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/14)
|
|
79
|
+
- Sprint4/sangndd/feature/icons [`#12`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/12)
|
|
80
|
+
- Sprint4/sangndd/feature/icons [`#11`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/11)
|
|
81
|
+
- Sprint4/thanghn/fixbug/pivot alias border [`#10`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/10)
|
|
82
|
+
- fix scroll dimension and total column [`#9`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/9)
|
|
83
|
+
- [ANTALYSER][Filter][Khi filter filed có type date và semantic là "Month day" thì không load được danh sách các ngày trong tháng] [`#7`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/7)
|
|
84
|
+
- [ANTALYSER][Pivot chart][Tính năng Add border shadow chưa hoạt động] [`#8`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/8)
|
|
85
|
+
- Fix bug [ANTALYSER][Scatter chart][Label ở cột X và Y chưa đổi theo alias name đã change ở metric] [`#6`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/6)
|
|
86
|
+
- Fix bug [Pivot chart] Row color không hiển thị được khi chọn hiển thị data của metric là Bar [`#5`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/5)
|
|
87
|
+
- Fix bug package antscorp/charts [`#1`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/1)
|
|
88
|
+
- Fix bug package antscorp/chart [`#2`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/2)
|
|
89
|
+
- table component [`#1`](https://bitbucket.org/git-vn/at.packages.frontend/pull-requests/1)
|
|
90
|
+
- Update map indonesia [`fc94208`](https://bitbucket.org/git-vn/at.packages.frontend/commits/fc9420838b3f4087a5763017e9bf7e72ee8c5e31)
|
|
91
|
+
- Update geomap [`43f3098`](https://bitbucket.org/git-vn/at.packages.frontend/commits/43f3098506f30a215dc2b30734590e5c55f8b490)
|
|
92
|
+
- sync package master [`7476118`](https://bitbucket.org/git-vn/at.packages.frontend/commits/7476118de2fcfa1bd6b0a9e3c0f887b29fd149b6)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Components
|
|
3
|
+
import { StyledSpace } from './styled';
|
|
4
|
+
import { Divider } from 'antd';
|
|
5
|
+
import { Select } from '../../molecules';
|
|
6
|
+
import SelectTag from './SelectTag';
|
|
7
|
+
// Constants
|
|
8
|
+
import { defaultProps } from './constants';
|
|
9
|
+
export const SelectAssociatedTag = (props) => {
|
|
10
|
+
// Props
|
|
11
|
+
const { tagConfigs, style, status, selected, disabled, options, children, onSelect } = props;
|
|
12
|
+
const { tag, value } = selected || {};
|
|
13
|
+
return (_jsxs(StyledSpace, { className: `select-associated-tag ${status}`, style: style, children: [_jsx(SelectTag, { ...tagConfigs, selectedTag: tag }), _jsx(Divider, { type: "vertical", style: { margin: '0px 1px 0px 6px' }, className: "antsomi-divider-between-select" }), children ?? (_jsx(Select, { style: { width: '100%', height: '100%' }, value: value, disabled: disabled, options: options, onChange: onSelect }))] }));
|
|
14
|
+
};
|
|
15
|
+
SelectAssociatedTag.defaultProps = defaultProps;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Libraries
|
|
3
|
+
import { memo, useMemo, useState } from 'react';
|
|
4
|
+
import { keyBy } from 'lodash';
|
|
5
|
+
// Components
|
|
6
|
+
import { Flex, Typography } from 'antd';
|
|
7
|
+
import { Popover } from '../Popover';
|
|
8
|
+
import { SelectedTag } from './styled';
|
|
9
|
+
const SelectTag = (props) => {
|
|
10
|
+
// Props
|
|
11
|
+
const { selectedTag, disabled, title, options, onSelect } = props;
|
|
12
|
+
// State
|
|
13
|
+
const [open, setOpen] = useState(false);
|
|
14
|
+
// Memoized
|
|
15
|
+
const mapOptsMemo = useMemo(() => keyBy(options, 'value'), [options]);
|
|
16
|
+
const selectedItem = useMemo(() => mapOptsMemo?.[selectedTag] || {}, [selectedTag, mapOptsMemo]);
|
|
17
|
+
const handleOpenChange = () => {
|
|
18
|
+
setOpen(!open);
|
|
19
|
+
};
|
|
20
|
+
const handleClick = (item) => {
|
|
21
|
+
setOpen(false);
|
|
22
|
+
onSelect(item);
|
|
23
|
+
};
|
|
24
|
+
return (_jsx(Popover, { open: open && !disabled, title: _jsx(Typography.Text, { style: { fontWeight: '400', maxWidth: 130 }, ellipsis: { tooltip: title }, children: title }), content: _jsx(Flex, { wrap: "wrap", gap: 6, style: { padding: '10px 0px' }, children: options?.map(item => (_jsx(SelectedTag, { "$color": item.color, "$background": item.background, ellipsis: { tooltip: item.label }, onClick: () => handleClick(item), children: item.label }, item.value))) }), placement: "bottomLeft", trigger: "click", overlayInnerStyle: { padding: 10, maxWidth: 150 }, onOpenChange: handleOpenChange, children: _jsx(SelectedTag, { "$color": selectedItem?.color, "$background": selectedItem?.background, ellipsis: { tooltip: selectedItem?.label }, children: selectedItem?.label }) }));
|
|
25
|
+
};
|
|
26
|
+
export default memo(SelectTag);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SelectAssociatedTagProps, TagItem } from './types';
|
|
2
|
+
export declare const DEFAULT_TAGS: {
|
|
3
|
+
readonly RAW: "RAW";
|
|
4
|
+
readonly md5: "md5";
|
|
5
|
+
readonly sha_256: "sha_256";
|
|
6
|
+
readonly MD5: "MD5";
|
|
7
|
+
readonly SHA_256: "SHA_256";
|
|
8
|
+
};
|
|
9
|
+
export declare const DEFAULT_TAGS_OPTS: Record<string, TagItem>;
|
|
10
|
+
export declare const DEFAULT_TAGS_LIST: TagItem[];
|
|
11
|
+
export declare const defaultProps: SelectAssociatedTagProps;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Constants
|
|
2
|
+
import { globalToken } from '@antscorp/antsomi-ui/es/constants';
|
|
3
|
+
// Locales
|
|
4
|
+
import { translations, translate } from '@antscorp/antsomi-locales';
|
|
5
|
+
export const DEFAULT_TAGS = {
|
|
6
|
+
RAW: 'RAW',
|
|
7
|
+
md5: 'md5',
|
|
8
|
+
sha_256: 'sha_256',
|
|
9
|
+
MD5: 'MD5',
|
|
10
|
+
SHA_256: 'SHA_256',
|
|
11
|
+
};
|
|
12
|
+
export const DEFAULT_TAGS_OPTS = {
|
|
13
|
+
RAW: { label: 'RAW', value: DEFAULT_TAGS.RAW, color: globalToken?.bw0, background: '#4CB4C9' },
|
|
14
|
+
md5: { label: 'md5', value: DEFAULT_TAGS.md5, color: globalToken?.bw0, background: '#3B8FDE' },
|
|
15
|
+
sha_256: {
|
|
16
|
+
label: 'sha-256',
|
|
17
|
+
value: DEFAULT_TAGS.sha_256,
|
|
18
|
+
color: globalToken?.bw0,
|
|
19
|
+
background: '#12B800',
|
|
20
|
+
},
|
|
21
|
+
MD5: { label: 'MD5', value: DEFAULT_TAGS.MD5, color: globalToken?.bw0, background: '#3B8FDE' },
|
|
22
|
+
SHA_265: {
|
|
23
|
+
label: 'SHA-256',
|
|
24
|
+
value: DEFAULT_TAGS.SHA_256,
|
|
25
|
+
color: globalToken?.bw0,
|
|
26
|
+
background: '#12B800',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
export const DEFAULT_TAGS_LIST = Object.values(DEFAULT_TAGS_OPTS);
|
|
30
|
+
export const defaultProps = {
|
|
31
|
+
tagConfigs: {
|
|
32
|
+
options: DEFAULT_TAGS_LIST,
|
|
33
|
+
title: translate(translations._INFO_STORY_WAIT_FOR_HASH, 'Hash Method'),
|
|
34
|
+
onSelect: () => { },
|
|
35
|
+
},
|
|
36
|
+
selected: {
|
|
37
|
+
tag: DEFAULT_TAGS.RAW,
|
|
38
|
+
value: DEFAULT_TAGS.SHA_256,
|
|
39
|
+
},
|
|
40
|
+
options: DEFAULT_TAGS_LIST,
|
|
41
|
+
onSelect: () => { },
|
|
42
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TagItem } from './types';
|
|
3
|
+
export declare const StyledSpace: import("styled-components").StyledComponent<import("react").FC<import("antd/es/space/Compact").SpaceCompactProps>, any, {}, never>;
|
|
4
|
+
export declare const SelectedTag: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/es/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {
|
|
5
|
+
$background: TagItem['background'];
|
|
6
|
+
$color: TagItem['color'];
|
|
7
|
+
}, never>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Libraries
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
// Components
|
|
4
|
+
import { Space } from '../Space';
|
|
5
|
+
import { Typography } from 'antd';
|
|
6
|
+
// Constants
|
|
7
|
+
import { globalToken } from '@antscorp/antsomi-ui/es/constants';
|
|
8
|
+
export const StyledSpace = styled(Space.Compact) `
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 30px;
|
|
11
|
+
padding-left: 5px;
|
|
12
|
+
align-items: center;
|
|
13
|
+
|
|
14
|
+
border-bottom: 1px solid ${globalToken?.blue1};
|
|
15
|
+
|
|
16
|
+
&.select-associated-tag {
|
|
17
|
+
&.warning {
|
|
18
|
+
border-bottom-color: ${globalToken?.colorWarning};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.error {
|
|
22
|
+
border-bottom-color: ${globalToken?.colorError};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.success {
|
|
26
|
+
border-bottom-color: ${globalToken?.colorSuccess};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
> div:last-child {
|
|
31
|
+
width: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.antsomi-divider.antsomi-divider-vertical {
|
|
35
|
+
height: 20px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.antsomi-select-selector {
|
|
39
|
+
border: none !important;
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
export const SelectedTag = styled(Typography.Text) `
|
|
43
|
+
border-radius: 3px;
|
|
44
|
+
height: 16px;
|
|
45
|
+
line-height: 16px;
|
|
46
|
+
padding-left: 3px;
|
|
47
|
+
padding-right: 3px;
|
|
48
|
+
flex-shrink: 0;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
|
|
51
|
+
background: ${props => props.$background};
|
|
52
|
+
|
|
53
|
+
&.antsomi-typography {
|
|
54
|
+
color: ${props => props.$color};
|
|
55
|
+
|
|
56
|
+
&.antsomi-typography-ellipsis {
|
|
57
|
+
max-width: 70px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Dictionary } from 'lodash';
|
|
2
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
export type TagItem = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
background: CSSProperties['background'];
|
|
7
|
+
color: CSSProperties['color'];
|
|
8
|
+
};
|
|
9
|
+
export type Status = 'error' | 'warning' | 'success';
|
|
10
|
+
export interface TagConfigProps {
|
|
11
|
+
selectedTag: TagItem['value'];
|
|
12
|
+
title?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
options: TagItem[];
|
|
15
|
+
onSelect: (newItem: TagItem) => void;
|
|
16
|
+
}
|
|
17
|
+
export type SelectOption = {
|
|
18
|
+
label: string;
|
|
19
|
+
value: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Properties for the SelectAssociatedTag component.
|
|
23
|
+
*/
|
|
24
|
+
export interface SelectAssociatedTagProps {
|
|
25
|
+
/**
|
|
26
|
+
* Configuration properties for tag options, excluding the selected tag.
|
|
27
|
+
* @type {Omit<TagConfigProps, 'selectedTag'>}
|
|
28
|
+
*/
|
|
29
|
+
tagConfigs: Omit<TagConfigProps, 'selectedTag'>;
|
|
30
|
+
/**
|
|
31
|
+
* The currently selected tag and its associated value.
|
|
32
|
+
* @type {{ tag: string; value: string; }}
|
|
33
|
+
*/
|
|
34
|
+
selected: {
|
|
35
|
+
/**
|
|
36
|
+
* The identifier for the selected tag.
|
|
37
|
+
* @type {string}
|
|
38
|
+
*/
|
|
39
|
+
tag: string;
|
|
40
|
+
/**
|
|
41
|
+
* The value associated with the selected tag.
|
|
42
|
+
* @type {Dictionary<SelectOption>}
|
|
43
|
+
*/
|
|
44
|
+
value: Dictionary<SelectOption>;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Whether the SelectAssociatedTag is disabled.
|
|
48
|
+
* @type {boolean}
|
|
49
|
+
*/
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The status of the SelectAssociatedTag, if any.
|
|
53
|
+
* @type {'error' | 'warning' | 'success' }
|
|
54
|
+
*/
|
|
55
|
+
status?: Status;
|
|
56
|
+
/**
|
|
57
|
+
* A list of selectable options.
|
|
58
|
+
* @type {SelectOption[]}
|
|
59
|
+
*/
|
|
60
|
+
options: SelectOption[];
|
|
61
|
+
/**
|
|
62
|
+
* The style object for the SelectAssociatedTag component.
|
|
63
|
+
* @type {CSSProperties}
|
|
64
|
+
*/
|
|
65
|
+
style?: CSSProperties;
|
|
66
|
+
/**
|
|
67
|
+
* The children to be rendered inside the SelectAssociatedTag component.
|
|
68
|
+
* @type {ReactNode}
|
|
69
|
+
*/
|
|
70
|
+
children?: ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* Callback function called when an option is selected.
|
|
73
|
+
* @type {(value: Dictionary<SelectOption>, option: SelectOption | SelectOption[]) => void}
|
|
74
|
+
*/
|
|
75
|
+
onSelect: (value: Dictionary<SelectOption>, option: SelectOption | SelectOption[]) => void;
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { useIcon } from './hooks/useIcon';
|
|
4
4
|
export const CircleInfoIcon = forwardRef((props, ref) => {
|
|
5
5
|
const { width, height } = useIcon(props);
|
|
6
|
-
return (
|
|
6
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", ...props, ref: ref, width: width, height: height, children: _jsx("path", { d: "M12 22C10.0222 22 8.08879 21.4136 6.4443 20.3148C4.79981 19.216 3.51809 17.6541 2.76121 15.8268C2.00433 13.9996 1.8063 11.9889 2.19215 10.0492C2.578 8.10937 3.53041 6.32775 4.92894 4.92924C6.32746 3.53073 8.10929 2.57796 10.0491 2.19211C11.9889 1.80627 13.9996 2.00444 15.8269 2.7613C17.6541 3.51817 19.2159 4.79981 20.3148 6.44429C21.4135 8.08876 22 10.0224 22 12.0002C21.997 14.6513 20.9424 17.1929 19.0677 19.0675C17.193 20.9423 14.6513 21.997 12 22ZM8.99 9.44579C8.8334 9.44578 8.68318 9.50817 8.5723 9.61878C8.46144 9.72938 8.39895 9.8793 8.39857 10.0359V11.0857C8.39895 11.2423 8.46144 11.3922 8.5723 11.5028C8.68318 11.6134 8.8334 11.6758 8.99 11.6758H10.4757V19.0599H13.3329V9.44579H8.99ZM11.6714 4.87484C11.3154 4.87455 10.9673 4.97932 10.6712 5.17687C10.375 5.37442 10.1441 5.65582 10.0076 5.98461C9.87108 6.31341 9.83514 6.67473 9.90431 7.02395C9.97349 7.37316 10.1447 7.69415 10.3962 7.94609C10.6477 8.19802 10.9683 8.37021 11.3174 8.43994C11.6665 8.50967 12.0285 8.47408 12.3575 8.3381C12.6865 8.20212 12.9678 7.97129 13.1659 7.67544C13.3639 7.3796 13.4697 7.03187 13.47 6.67588C13.4708 6.19798 13.2817 5.73937 12.9445 5.40078C12.6072 5.06219 12.1493 4.87109 11.6714 4.86995V4.87484Z", fill: "currentColor" }) }));
|
|
7
7
|
});
|
|
@@ -408,4 +408,6 @@ export declare const LazyIcon: {
|
|
|
408
408
|
WebPersonalizationIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
409
409
|
WidgetIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
410
410
|
WritingAIAssitantIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
411
|
+
QRCodeManagementIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
412
|
+
QRSetDashboardIcon: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<import("../types").IconProps & import("react").RefAttributes<SVGSVGElement>>>;
|
|
411
413
|
};
|
|
@@ -411,4 +411,6 @@ export const LazyIcon = {
|
|
|
411
411
|
WebPersonalizationIcon: lazy(() => import('../WebPersonalizationIcon').then(m => ({ default: m.WebPersonalizationIcon }))),
|
|
412
412
|
WidgetIcon: lazy(() => import('../WidgetIcon').then(m => ({ default: m.WidgetIcon }))),
|
|
413
413
|
WritingAIAssitantIcon: lazy(() => import('../WritingAIAssitantIcon').then(m => ({ default: m.WritingAIAssitantIcon }))),
|
|
414
|
+
QRCodeManagementIcon: lazy(() => import('../QRCodeManagementIcon').then(m => ({ default: m.QRCodeManagementIcon }))),
|
|
415
|
+
QRSetDashboardIcon: lazy(() => import('../QRSetDashboardIcon').then(m => ({ default: m.QRSetDashboardIcon }))),
|
|
414
416
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type ValueType = 'input' | 'select';
|
|
3
|
+
type Value = {
|
|
4
|
+
source: any;
|
|
5
|
+
code: any;
|
|
6
|
+
} | string;
|
|
7
|
+
type Option = {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
};
|
|
12
|
+
export interface InputSelectAttributeProps {
|
|
13
|
+
sourceOptions: Option[];
|
|
14
|
+
mapCodeOptions: Record<string, Option[]>;
|
|
15
|
+
label?: string;
|
|
16
|
+
isErrorTag?: boolean;
|
|
17
|
+
errorMsg?: string;
|
|
18
|
+
value: Value;
|
|
19
|
+
onChange: (newValueData: {
|
|
20
|
+
value: Value;
|
|
21
|
+
valueType: ValueType;
|
|
22
|
+
}) => void;
|
|
23
|
+
}
|
|
24
|
+
declare const _default: import("react").MemoExoticComponent<(props: InputSelectAttributeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
25
|
+
export default _default;
|