@alifd/chat 0.1.15-beta.1 → 0.1.15-beta.11
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/es/card/view/collapsable.d.ts +1 -1
- package/es/date-picker/index.js +1 -1
- package/es/icon/index.d.ts +13 -0
- package/es/icon/index.js +20 -0
- package/es/icon/main.scss +1 -0
- package/es/icon/style.d.ts +2 -0
- package/es/icon/style.js +2 -0
- package/es/icon/types.d.ts +0 -0
- package/es/icon/types.js +1 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/input/index.js +1 -1
- package/es/message/index.d.ts +22 -0
- package/es/message/index.js +30 -0
- package/es/message/main.scss +2 -0
- package/es/message/style.d.ts +3 -0
- package/es/message/style.js +3 -0
- package/es/message/types.d.ts +195 -0
- package/es/message/types.js +1 -0
- package/es/person-picker/index.js +43 -10
- package/es/person-picker/main.scss +30 -2
- package/es/person-picker/style.d.ts +1 -0
- package/es/person-picker/style.js +1 -0
- package/es/tag/index.d.ts +1769 -2
- package/es/tag/index.js +2 -2
- package/es/time-picker/index.js +3 -3
- package/lib/card/view/collapsable.d.ts +1 -1
- package/lib/date-picker/index.js +1 -1
- package/lib/icon/index.d.ts +13 -0
- package/lib/icon/index.js +22 -0
- package/lib/icon/main.scss +1 -0
- package/lib/icon/style.d.ts +2 -0
- package/lib/icon/style.js +4 -0
- package/lib/icon/types.d.ts +0 -0
- package/lib/icon/types.js +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -2
- package/lib/input/index.js +1 -1
- package/lib/message/index.d.ts +22 -0
- package/lib/message/index.js +32 -0
- package/lib/message/main.scss +2 -0
- package/lib/message/style.d.ts +3 -0
- package/lib/message/style.js +5 -0
- package/lib/message/types.d.ts +195 -0
- package/lib/message/types.js +2 -0
- package/lib/person-picker/index.js +40 -7
- package/lib/person-picker/main.scss +30 -2
- package/lib/person-picker/style.d.ts +1 -0
- package/lib/person-picker/style.js +1 -0
- package/lib/tag/index.d.ts +1769 -2
- package/lib/tag/index.js +2 -2
- package/lib/time-picker/index.js +3 -3
- package/package.json +26 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CollapsableCardProps } from '../types';
|
|
3
|
-
declare function CollapsableCard({ components, visible, defaultVisible, onVisibleChange, triggerType, mode, renderContent, ...props }: CollapsableCardProps): React.JSX.Element;
|
|
3
|
+
declare function CollapsableCard({ components, visible: _v, defaultVisible: _dv, onVisibleChange: _onVC, triggerType, mode, renderContent, ...props }: CollapsableCardProps): React.JSX.Element;
|
|
4
4
|
declare namespace CollapsableCard {
|
|
5
5
|
var displayName: string;
|
|
6
6
|
}
|
package/es/date-picker/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import { DatePicker2 as NextDatePicker2, ConfigProvider } from '@alifd/next';
|
|
|
23
23
|
import cs from 'classnames';
|
|
24
24
|
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
25
25
|
const DatePicker = forwardRef((_a, ref) => {
|
|
26
|
-
var { className, size = '
|
|
26
|
+
var { className, size = 'medium' } = _a, props = __rest(_a, ["className", "size"]);
|
|
27
27
|
return (React.createElement(NextDatePicker2, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}date-picker2`, className), size: size, ref: ref })));
|
|
28
28
|
});
|
|
29
29
|
const DatePickerWithSub = assignSubComponent(DatePicker, {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 标签
|
|
3
|
+
* @en Icon
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Icon - Same as Next.Icon
|
|
6
|
+
* @when Icon
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Icon as NextIcon } from '@alifd/next';
|
|
10
|
+
import type { IconProps } from '@alifd/next/types/icon';
|
|
11
|
+
export type { IconProps } from '@alifd/next/types/icon';
|
|
12
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<IconProps & React.RefAttributes<NextIcon>, "key" | keyof IconProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextIcon, {}>;
|
|
13
|
+
export default _default;
|
package/es/icon/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 标签
|
|
3
|
+
* @en Icon
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Icon - Same as Next.Icon
|
|
6
|
+
* @when Icon
|
|
7
|
+
*/
|
|
8
|
+
import { __rest } from "tslib";
|
|
9
|
+
import React, { forwardRef } from 'react';
|
|
10
|
+
import { Icon as NextIcon, ConfigProvider } from '@alifd/next';
|
|
11
|
+
import cs from 'classnames';
|
|
12
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
13
|
+
const Icon = forwardRef((_a, ref) => {
|
|
14
|
+
var { className, size = 'small' } = _a, props = __rest(_a, ["className", "size"]);
|
|
15
|
+
return (React.createElement(NextIcon, Object.assign({}, props, { ref: ref, className: cs(`${PREFIX_DEFAULT}icon`, className), size: size })));
|
|
16
|
+
});
|
|
17
|
+
const IconWithSub = assignSubComponent(Icon, {
|
|
18
|
+
displayName: 'Icon',
|
|
19
|
+
});
|
|
20
|
+
export default ConfigProvider.config(IconWithSub);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "../core/variables.scss";
|
package/es/icon/style.js
ADDED
|
File without changes
|
package/es/icon/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/es/index.d.ts
CHANGED
|
@@ -9,4 +9,6 @@ export { default as Input } from './input';
|
|
|
9
9
|
export { default as DatePicker } from './date-picker';
|
|
10
10
|
export { default as TimePicker } from './time-picker';
|
|
11
11
|
export { default as PersonPicker } from './person-picker';
|
|
12
|
+
export { default as Message } from './message';
|
|
13
|
+
export { default as Icon } from './icon';
|
|
12
14
|
export declare const version: string;
|
package/es/index.js
CHANGED
|
@@ -9,4 +9,6 @@ export { default as Input } from './input';
|
|
|
9
9
|
export { default as DatePicker } from './date-picker';
|
|
10
10
|
export { default as TimePicker } from './time-picker';
|
|
11
11
|
export { default as PersonPicker } from './person-picker';
|
|
12
|
-
export
|
|
12
|
+
export { default as Message } from './message';
|
|
13
|
+
export { default as Icon } from './icon';
|
|
14
|
+
export const version = '0.1.15-beta.11';
|
package/es/input/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import { Input as NextInput, ConfigProvider } from '@alifd/next';
|
|
|
23
23
|
import cs from 'classnames';
|
|
24
24
|
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
25
25
|
const Input = forwardRef((_a, ref) => {
|
|
26
|
-
var { className, size = '
|
|
26
|
+
var { className, size = 'medium' } = _a, props = __rest(_a, ["className", "size"]);
|
|
27
27
|
return (React.createElement(NextInput, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}input`, className), size: size, ref: ref })));
|
|
28
28
|
});
|
|
29
29
|
const InputWithSub = assignSubComponent(Input, {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 标签
|
|
3
|
+
* @en Message
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Message - Same as Next.Message
|
|
6
|
+
* @when Message
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Message as NextMessage } from '@alifd/next';
|
|
10
|
+
import type { MessageProps } from './types';
|
|
11
|
+
export * from './types';
|
|
12
|
+
declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<MessageProps & React.RefAttributes<NextMessage>, "key" | keyof MessageProps> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, NextMessage, {}> & {
|
|
13
|
+
loading: typeof NextMessage.loading;
|
|
14
|
+
warning: typeof NextMessage.warning;
|
|
15
|
+
error: typeof NextMessage.error;
|
|
16
|
+
help: typeof NextMessage.help;
|
|
17
|
+
hide: typeof NextMessage.hide;
|
|
18
|
+
show: typeof NextMessage.show;
|
|
19
|
+
success: typeof NextMessage.success;
|
|
20
|
+
notice: typeof NextMessage.notice;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @component 标签
|
|
3
|
+
* @en Message
|
|
4
|
+
* @type 通用 - General
|
|
5
|
+
* @remarks 同 Next Message - Same as Next.Message
|
|
6
|
+
* @when Message
|
|
7
|
+
*/
|
|
8
|
+
import { __rest } from "tslib";
|
|
9
|
+
import React, { forwardRef } from 'react';
|
|
10
|
+
import { Message as NextMessage, ConfigProvider } from '@alifd/next';
|
|
11
|
+
import cs from 'classnames';
|
|
12
|
+
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
13
|
+
const Message = forwardRef((_a, ref) => {
|
|
14
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
15
|
+
return (React.createElement(NextMessage, Object.assign({}, props, { ref: ref, className: cs(`${PREFIX_DEFAULT}message`, className) })));
|
|
16
|
+
});
|
|
17
|
+
const MessageWithSub = assignSubComponent(Message, {
|
|
18
|
+
show: NextMessage.show,
|
|
19
|
+
success: NextMessage.success,
|
|
20
|
+
warning: NextMessage.warning,
|
|
21
|
+
error: NextMessage.error,
|
|
22
|
+
notice: NextMessage.notice,
|
|
23
|
+
help: NextMessage.help,
|
|
24
|
+
loading: NextMessage.loading,
|
|
25
|
+
hide: NextMessage.hide,
|
|
26
|
+
});
|
|
27
|
+
export * from './types';
|
|
28
|
+
export default ConfigProvider.config(MessageWithSub, {
|
|
29
|
+
componentName: 'Message',
|
|
30
|
+
});
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { OverlayProps } from '@alifd/next/types/overlay';
|
|
3
|
+
import type { ConsumerState } from '@alifd/next/types/config-provider/consumer';
|
|
4
|
+
type HTMLAttributesWeak = Omit<React.HTMLAttributes<HTMLElement>, 'title'>;
|
|
5
|
+
/**
|
|
6
|
+
* @api Message
|
|
7
|
+
*/
|
|
8
|
+
export interface MessageProps extends HTMLAttributesWeak {
|
|
9
|
+
/**
|
|
10
|
+
* 反馈类型
|
|
11
|
+
* @en type of message
|
|
12
|
+
* @defaultValue 'success'
|
|
13
|
+
*/
|
|
14
|
+
type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
|
|
15
|
+
/**
|
|
16
|
+
* 反馈外观
|
|
17
|
+
* @en shape of message
|
|
18
|
+
* @defaultValue 'inline'
|
|
19
|
+
*/
|
|
20
|
+
shape?: 'inline' | 'addon' | 'toast';
|
|
21
|
+
/**
|
|
22
|
+
* 反馈大小
|
|
23
|
+
* @en size of message
|
|
24
|
+
* @defaultValue 'medium'
|
|
25
|
+
*/
|
|
26
|
+
size?: 'medium' | 'large';
|
|
27
|
+
/**
|
|
28
|
+
* 标题
|
|
29
|
+
* @en title of message
|
|
30
|
+
*/
|
|
31
|
+
title?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* 内容,非函数式调用下使用
|
|
34
|
+
* @en content of message
|
|
35
|
+
*/
|
|
36
|
+
children?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* 默认是否显示
|
|
39
|
+
* @en whether the message is visible in default
|
|
40
|
+
* @defaultValue false
|
|
41
|
+
*/
|
|
42
|
+
defaultVisible?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 当前是否显示
|
|
45
|
+
* @en whether the message is visible currently
|
|
46
|
+
*/
|
|
47
|
+
visible?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 显示的图标类型,会覆盖内部设置的IconType,传false不显示图标
|
|
50
|
+
* @en type of icon, overriding the internally type of icon
|
|
51
|
+
*/
|
|
52
|
+
iconType?: string | false;
|
|
53
|
+
/**
|
|
54
|
+
* 显示关闭按钮
|
|
55
|
+
* @en whether to show the close button
|
|
56
|
+
* @defaultValue false
|
|
57
|
+
*/
|
|
58
|
+
closeable?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* 关闭按钮的回调
|
|
61
|
+
* @en callback function triggered when close
|
|
62
|
+
* @defaultValue () =\> \{\}
|
|
63
|
+
*/
|
|
64
|
+
onClose?: () => void;
|
|
65
|
+
/**
|
|
66
|
+
* 关闭之后调用的函数
|
|
67
|
+
* @en callback function triggered after closed
|
|
68
|
+
* @defaultValue () =\> \{\}
|
|
69
|
+
*/
|
|
70
|
+
afterClose?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* 是否开启展开收起动画
|
|
73
|
+
* @en whether to enable expand and collapse animation
|
|
74
|
+
* @defaultValue true
|
|
75
|
+
*/
|
|
76
|
+
animation?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @api Message.show
|
|
80
|
+
* @remarks Message.show(props) 提供一个单例的调用方式,配置参数如下(继承 Overlay 的配置):
|
|
81
|
+
*
|
|
82
|
+
* ```js
|
|
83
|
+
* Message.show({
|
|
84
|
+
* type: 'error',
|
|
85
|
+
* title: '错误',
|
|
86
|
+
* content: '请联系相关人员反馈!',
|
|
87
|
+
* hasMask: true
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
90
|
+
* -
|
|
91
|
+
* `Message.show(props)` provides a singleton call with the following configuration parameters (inheriting `Overlay` configuration):
|
|
92
|
+
* ```js
|
|
93
|
+
* Message.show({
|
|
94
|
+
* type: 'error',
|
|
95
|
+
* title: 'Error',
|
|
96
|
+
* content: 'Please contact admin feedback!',
|
|
97
|
+
* hasMask: true
|
|
98
|
+
* });
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export interface MessageQuickProps extends Omit<HTMLAttributesWeak, 'content'> {
|
|
102
|
+
/**
|
|
103
|
+
* 反馈类型
|
|
104
|
+
* @en type of message
|
|
105
|
+
* @defaultValue 'success'
|
|
106
|
+
*/
|
|
107
|
+
type?: 'success' | 'warning' | 'error' | 'notice' | 'help' | 'loading';
|
|
108
|
+
/**
|
|
109
|
+
* 反馈大小
|
|
110
|
+
* @en size of message
|
|
111
|
+
* @defaultValue 'medium'
|
|
112
|
+
*/
|
|
113
|
+
size?: 'medium' | 'large';
|
|
114
|
+
/**
|
|
115
|
+
* 标题
|
|
116
|
+
* @en title of message
|
|
117
|
+
*/
|
|
118
|
+
title?: React.ReactNode;
|
|
119
|
+
/**
|
|
120
|
+
* 内容,函数式调用下使用
|
|
121
|
+
* @en content of message
|
|
122
|
+
*/
|
|
123
|
+
content?: React.ReactNode;
|
|
124
|
+
/**
|
|
125
|
+
* 弹层对齐方式,详情见 Overlay align
|
|
126
|
+
* @en alignment reference Overlay
|
|
127
|
+
* @defaultValue 'tc tc'
|
|
128
|
+
*/
|
|
129
|
+
align?: string | boolean;
|
|
130
|
+
/**
|
|
131
|
+
* 弹层相对于参照元素定位的微调
|
|
132
|
+
* @en offset after positioned
|
|
133
|
+
* @defaultValue [0, 0]
|
|
134
|
+
*/
|
|
135
|
+
offset?: Array<number>;
|
|
136
|
+
/**
|
|
137
|
+
* 是否显示遮罩
|
|
138
|
+
* @en whether to have a mask
|
|
139
|
+
* @defaultValue false
|
|
140
|
+
*/
|
|
141
|
+
hasMask?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* 显示持续时间,0表示一直存在,以毫秒为单位
|
|
144
|
+
* @en show duration, 0 means always present, in milliseconds
|
|
145
|
+
* @defaultValue 3000
|
|
146
|
+
*/
|
|
147
|
+
duration?: number;
|
|
148
|
+
/**
|
|
149
|
+
* @skip
|
|
150
|
+
*/
|
|
151
|
+
timeoutId?: string;
|
|
152
|
+
/**
|
|
153
|
+
* 显示关闭按钮
|
|
154
|
+
* @en whether to show the close button
|
|
155
|
+
* @defaultValue false
|
|
156
|
+
*/
|
|
157
|
+
closeable?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* 关闭按钮的回调
|
|
160
|
+
* @en callback function triggered when close
|
|
161
|
+
* @defaultValue () =\> \{\}
|
|
162
|
+
*/
|
|
163
|
+
onClose?: () => void;
|
|
164
|
+
/**
|
|
165
|
+
* 关闭之后调用的函数
|
|
166
|
+
* @en callback function triggered after closed
|
|
167
|
+
* @defaultValue () =\> \{\}
|
|
168
|
+
*/
|
|
169
|
+
afterClose?: () => void;
|
|
170
|
+
/**
|
|
171
|
+
* 是否开启展开收起动画
|
|
172
|
+
* @en whether to enable expand and collapse animation
|
|
173
|
+
* @defaultValue true
|
|
174
|
+
*/
|
|
175
|
+
animation?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* 透传到弹层组件的属性对象
|
|
178
|
+
* @en props of Overlay
|
|
179
|
+
*/
|
|
180
|
+
overlayProps?: OverlayProps;
|
|
181
|
+
/**
|
|
182
|
+
* @skip
|
|
183
|
+
*/
|
|
184
|
+
contextConfig?: ConsumerState;
|
|
185
|
+
}
|
|
186
|
+
export type OpenProps = string | React.ReactElement | MessageQuickProps;
|
|
187
|
+
export interface MessageWrapperItem extends MessageQuickProps {
|
|
188
|
+
timer?: ReturnType<typeof setTimeout>;
|
|
189
|
+
key: string;
|
|
190
|
+
}
|
|
191
|
+
export interface MessageWrapperProps {
|
|
192
|
+
prefix?: MessageQuickProps['prefix'];
|
|
193
|
+
dataSource: Array<MessageWrapperItem>;
|
|
194
|
+
}
|
|
195
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
1
|
+
import { __awaiter, __rest } from "tslib";
|
|
2
2
|
/**
|
|
3
3
|
* @component 人员选择
|
|
4
4
|
* @en PersonSelect
|
|
@@ -18,20 +18,53 @@ import { __rest } from "tslib";
|
|
|
18
18
|
* | Enter | Trigger the onClick event |
|
|
19
19
|
* | SPACE | Trigger the onClick event |
|
|
20
20
|
*/
|
|
21
|
-
import React, { forwardRef } from 'react';
|
|
22
|
-
import { Select as NextSelect,
|
|
21
|
+
import React, { useState, forwardRef, useEffect } from 'react';
|
|
22
|
+
import { Select as NextSelect, ConfigProvider } from '@alifd/next';
|
|
23
23
|
import cs from 'classnames';
|
|
24
|
+
import axios from 'axios';
|
|
24
25
|
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
25
26
|
const PersonPicker = forwardRef((_a, ref) => {
|
|
26
|
-
var { className, size = '
|
|
27
|
+
var { className, size = 'medium', defaultValue, readOnly } = _a, props = __rest(_a, ["className", "size", "defaultValue", "readOnly"]);
|
|
28
|
+
const [dataSource, setDataSource] = useState([]);
|
|
29
|
+
// 默认出现最近联系人
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
handleUserSearch('');
|
|
32
|
+
}, []);
|
|
27
33
|
const tagRender = (selectItem) => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
React.createElement("div", { className:
|
|
31
|
-
React.createElement(
|
|
32
|
-
React.createElement("
|
|
34
|
+
return React.createElement("div", { className: "tag-container" },
|
|
35
|
+
React.createElement("img", { src: `https://work.alibaba-inc.com/photo/${selectItem.value}.40x40.jpg` }),
|
|
36
|
+
React.createElement("div", { className: 'right-container' },
|
|
37
|
+
React.createElement("div", { className: 'nick-name' }, selectItem.label),
|
|
38
|
+
React.createElement("div", { className: 'dept-name' }, (selectItem === null || selectItem === void 0 ? void 0 : selectItem.deptName) || '')));
|
|
33
39
|
};
|
|
34
|
-
|
|
40
|
+
const labelRender = (selectItem) => {
|
|
41
|
+
return React.createElement("div", { className: "label-container" },
|
|
42
|
+
React.createElement("img", { style: { width: '20px', height: '20px', borderRadius: '4px' }, src: `https://work.alibaba-inc.com/photo/${selectItem.value}.20x20.jpg` }),
|
|
43
|
+
React.createElement("span", { className: "label-text" }, selectItem.label));
|
|
44
|
+
};
|
|
45
|
+
const handleUserSearch = (keyword) => __awaiter(void 0, void 0, void 0, function* () {
|
|
46
|
+
var _b, _c;
|
|
47
|
+
if (readOnly) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const queryParams = {
|
|
51
|
+
key: keyword,
|
|
52
|
+
pageSize: (props === null || props === void 0 ? void 0 : props.pageSize) || 5
|
|
53
|
+
};
|
|
54
|
+
try {
|
|
55
|
+
const response = yield axios.get('/_gw/employee360Service/searchEmpInfo.json', {
|
|
56
|
+
params: queryParams,
|
|
57
|
+
});
|
|
58
|
+
const newDataSource = (_c = (_b = response === null || response === void 0 ? void 0 : response.data) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.map((item) => {
|
|
59
|
+
return Object.assign(Object.assign({}, item), { label: item.nickName, value: item.workNo });
|
|
60
|
+
});
|
|
61
|
+
setDataSource(newDataSource);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
setDataSource([]);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return (React.createElement(NextSelect, Object.assign({}, props, { popupClassName: cs(`${PREFIX_DEFAULT}person-picker`, className), itemRender: tagRender, valueRender: labelRender, mode: "multiple", showSearch: true, filterLocal: false, hiddenSelected: true, dataSource: dataSource, onSearch: handleUserSearch, size: size, ref: ref, readOnly: readOnly })));
|
|
35
68
|
});
|
|
36
69
|
const PersonPickerWithSub = assignSubComponent(PersonPicker, {
|
|
37
70
|
displayName: 'PersonPicker',
|
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
@import "../core/variables.scss";
|
|
2
2
|
|
|
3
3
|
.#{$prefix}person-picker {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
.next-menu-item-inner {
|
|
5
|
+
height: var(--s--6, 44px);
|
|
6
|
+
}
|
|
7
|
+
.label-container {
|
|
8
|
+
.label-text{
|
|
9
|
+
margin-left: var(--s--2, 8px);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
.tag-container {
|
|
13
|
+
display: flex;
|
|
14
|
+
img {
|
|
15
|
+
width: var(--s--9, 36px);
|
|
16
|
+
height: var(--s--9, 36px);
|
|
17
|
+
border-radius: var(--s--1, 4px);
|
|
18
|
+
}
|
|
19
|
+
.right-container {
|
|
20
|
+
margin-left: var(--s--2, 8px);
|
|
21
|
+
.nick-name {
|
|
22
|
+
line-height: var(--font-size-body-2, 14px);
|
|
23
|
+
font-size: var(--font-size-body-2, 14px);
|
|
24
|
+
margin-bottom: var(--s--1, 4px);
|
|
25
|
+
color: var(--color-text1-4, #111720);
|
|
26
|
+
}
|
|
27
|
+
.dept-name {
|
|
28
|
+
font-size: var(--s--3, 12px);
|
|
29
|
+
line-height: var(--font-size-body-2, 14px);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|