@giteeteam/apps-team-components 1.2.0-alpha.3 → 1.2.1

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/README.md CHANGED
@@ -23,3 +23,6 @@ const Demo = ({children}) => {
23
23
 
24
24
  # 1.1.x版本
25
25
  - team最低版本为4.16.0
26
+
27
+ # 1.2.x版本
28
+ - team最低版本为4.21.0
@@ -1 +1,8 @@
1
- export declare const formatUserOption: (actorData: any) => any;
1
+ import type { ObjectId, User as UserTyped } from '../../../lib/types/models';
2
+ type UserOption = {
3
+ label: string;
4
+ value: ObjectId;
5
+ key: string;
6
+ };
7
+ export declare const formatUserOption: (actorData: UserTyped) => UserOption;
8
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { userOptionAdapter } from '../../../lib/users';
2
- export const formatUserOption = actorData => {
2
+ export const formatUserOption = (actorData) => {
3
3
  const isUserData = !!(actorData === null || actorData === void 0 ? void 0 : actorData.username) && (actorData === null || actorData === void 0 ? void 0 : actorData.enabled);
4
4
  if (isUserData)
5
5
  return userOptionAdapter(actorData);
@@ -17,7 +17,8 @@ const DataQuoteReadView = ({ value, userData }) => {
17
17
  }
18
18
  }, [dataQuoteList, userData === null || userData === void 0 ? void 0 : userData.display, value, currentDeleteItem]);
19
19
  const cellDisplay = (dataList === null || dataList === void 0 ? void 0 : dataList.length) ? (dataList.map((item, index) => (_jsxs("span", { children: [item.label, " ", index === dataList.length - 1 ? '' : '、'] }, item.value)))) : (_jsx(EmptyField, { readonly: true }));
20
- return (_jsx("div", { css: css(fieldValueOverlayStyle), children: _jsx(BaseOverflowTooltip, { maxline: 1, children: cellDisplay }) }));
20
+ const showValue = (dataList === null || dataList === void 0 ? void 0 : dataList.length) ? dataList.map(item => item.label).join('、') : '';
21
+ return (_jsx("div", { css: css(fieldValueOverlayStyle), children: _jsx(BaseOverflowTooltip, { title: showValue, maxline: 1, children: cellDisplay }) }));
21
22
  };
22
23
  DataQuoteReadView.displayName = 'DataQuoteReadView';
23
24
  export default DataQuoteReadView;
@@ -1,3 +1,5 @@
1
1
  import { Item } from '../../../lib/types/models';
2
2
  import { selectValue as selectValueProps } from '../dropdown/BaseField';
3
+ export declare const DATA_QUOTE_OPTION_FORMAT_REG: RegExp;
4
+ export declare const dataQuoteOptionFormat: (data: Item, display?: string) => selectValueProps;
3
5
  export declare const dataQuoteInit: (dates: Item[], value: string[], display?: string) => selectValueProps[];
@@ -1,26 +1,30 @@
1
+ export const DATA_QUOTE_OPTION_FORMAT_REG = /{(\S+?)}/g;
2
+ export const dataQuoteOptionFormat = (data, display) => {
3
+ var _a, _b, _c;
4
+ if (!data)
5
+ return undefined;
6
+ const dataCopy = {
7
+ ...data,
8
+ status: (_a = data.status) === null || _a === void 0 ? void 0 : _a.name,
9
+ itemType: (_b = data.itemType) === null || _b === void 0 ? void 0 : _b.name,
10
+ };
11
+ return {
12
+ label: display
13
+ ? display.replace(DATA_QUOTE_OPTION_FORMAT_REG, function (itemKey) {
14
+ const key = itemKey.slice(1, itemKey.length - 1);
15
+ return dataCopy[key] || (data.values && data.values[key]) || '';
16
+ })
17
+ : data.name,
18
+ value: data.objectId,
19
+ name: data.name,
20
+ key: data.key,
21
+ itemType: data.itemType,
22
+ icon: (_c = data === null || data === void 0 ? void 0 : data.itemType) === null || _c === void 0 ? void 0 : _c.icon,
23
+ values: data.values,
24
+ };
25
+ };
1
26
  export const dataQuoteInit = (dates, value, display) => {
2
- const regex = /({\S+?})/g;
3
- const existedDatas = dates === null || dates === void 0 ? void 0 : dates.filter(data => value === null || value === void 0 ? void 0 : value.includes(data.objectId));
4
- const dataInit = existedDatas === null || existedDatas === void 0 ? void 0 : existedDatas.map(existedData => {
5
- var _a, _b, _c;
6
- const dataCopy = {
7
- ...existedData,
8
- status: (_a = existedData.status) === null || _a === void 0 ? void 0 : _a.name,
9
- itemType: (_b = existedData.itemType) === null || _b === void 0 ? void 0 : _b.name,
10
- };
11
- const values = existedData.values || {};
12
- return {
13
- label: display
14
- ? display.replace(regex, function (itemKey) {
15
- const key = itemKey.slice(1, itemKey.length - 1);
16
- return dataCopy[key] || values[key] || '';
17
- })
18
- : existedData.name,
19
- value: existedData.objectId,
20
- itemType: existedData.itemType,
21
- icon: (_c = existedData === null || existedData === void 0 ? void 0 : existedData.itemType) === null || _c === void 0 ? void 0 : _c.icon,
22
- values: existedData.values,
23
- };
24
- });
27
+ const existedDataList = dates === null || dates === void 0 ? void 0 : dates.filter(data => value === null || value === void 0 ? void 0 : value.includes(data.objectId));
28
+ const dataInit = existedDataList === null || existedDataList === void 0 ? void 0 : existedDataList.map(existedData => dataQuoteOptionFormat(existedData, display));
25
29
  return dataInit;
26
30
  };
@@ -2,5 +2,6 @@
2
2
  export interface selectValue {
3
3
  label: React.ReactNode;
4
4
  value: string | number;
5
+ [key: string]: any;
5
6
  }
6
7
  export declare const handleValue: (value: selectValue | string | number) => string | number;
@@ -7,7 +7,7 @@ import { ArrowBackIcon, DoneIcon, SearchIcon } from '../../../icons';
7
7
  import { WorkFlowStatusColor } from '../../../lib/global';
8
8
  import { i18n } from '../../../lib/i18n';
9
9
  import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip';
10
- import { FlowHandlerHeader, FlowHandlerSearchWrapper, FlowHandlerSelectContent, FlowHandlerSelectItem, FlowHandlerSelectMessage, FlowHandlerSubmitWrapper, FlowHandlerWrapper, flowStateStyle, iconStyle, overflowStyle, overflowStyleText, stateBoxStyle, tooltipStyle, } from './style';
10
+ import { FlowHandlerHeader, FlowHandlerSearchWrapper, FlowHandlerSelectContent, FlowHandlerSelectItem, FlowHandlerSelectMessage, FlowHandlerSubmitWrapper, FlowHandlerWrapper, flowStateStyle, headerFlowStyle, headerStateStyle, iconStyle, overflowStyle, overflowStyleText, stateBoxStyle, tooltipStyle, } from './style';
11
11
  const SelectFlowHandler = ({ itemId, task, onBack, users, loading, loadingUser, fetchUsers, handleTransition, }) => {
12
12
  var _a, _b, _c;
13
13
  const [selectedUsers, setSelectedUsers] = React.useState([]);
@@ -65,11 +65,11 @@ const SelectFlowHandler = ({ itemId, task, onBack, users, loading, loadingUser,
65
65
  ]);
66
66
  const OverflowText = () => {
67
67
  var _a, _b;
68
- return (_jsxs("div", { css: css(overflowStyle), children: [_jsx(BaseOverflowTooltip, { css: css(tooltipStyle, overflowStyleText), title: task.name, children: task.name }), _jsx("span", { css: css(iconStyle), children: " \u2192 " }), _jsx("div", { css: css(stateBoxStyle), children: _jsx(BaseOverflowTooltip, { css: css(flowStateStyle, overflowStyleText), style: {
69
- backgroundColor: (_a = WorkFlowStatusColor[task.target.type]) === null || _a === void 0 ? void 0 : _a.bgColor,
70
- color: (_b = WorkFlowStatusColor[task.target.type]) === null || _b === void 0 ? void 0 : _b.color,
71
- }, title: task.target.name, children: task.target.name }) })] }));
68
+ return (_jsxs("div", { css: css(overflowStyle), children: [_jsx(BaseOverflowTooltip, { css: css(tooltipStyle, overflowStyleText, headerFlowStyle), title: task.name, children: task.name }), _jsx("span", { css: css(iconStyle), children: " \u2192 " }), _jsx("div", { css: css(stateBoxStyle), children: _jsx("span", { css: css(overflowStyleText, headerStateStyle), children: _jsx(BaseOverflowTooltip, { css: css(flowStateStyle, overflowStyleText), style: {
69
+ backgroundColor: (_a = WorkFlowStatusColor[task.target.type]) === null || _a === void 0 ? void 0 : _a.bgColor,
70
+ color: (_b = WorkFlowStatusColor[task.target.type]) === null || _b === void 0 ? void 0 : _b.color,
71
+ }, title: task.target.name, children: task.target.name }) }) })] }));
72
72
  };
73
- return (_jsx(ClassNames, { children: ({ cx, css }) => (_jsxs("div", { className: cx(css(FlowHandlerWrapper)), children: [_jsxs("header", { className: cx(css(FlowHandlerHeader)), children: [_jsx("span", { className: "back-wrapper", onClick: () => onBack === null || onBack === void 0 ? void 0 : onBack(), children: _jsx(ArrowBackIcon, { className: "icon-back" }) }), _jsx("span", { children: i18n.t('pages.workflow.flowHandler.title') })] }), task && _jsx(OverflowText, {}), _jsxs("div", { className: cx(css(FlowHandlerSearchWrapper)), children: [_jsx(SearchIcon, { className: "icon-search" }), _jsx(Input, { className: "search-input", placeholder: i18n.t('pages.workflow.flowHandler.search'), onChange: e => onSearch === null || onSearch === void 0 ? void 0 : onSearch(e.target.value), allowClear: true })] }), _jsxs("div", { className: cx(css(FlowHandlerSelectMessage)), children: [_jsx("span", { onClick: selectAll, children: i18n.t('pages.workflow.flowHandler.selectAll') }), _jsx("span", { children: i18n.t('pages.workflow.flowHandler.count', { count: selectedUserIds.length }) }), _jsx("span", { onClick: clearSelect, children: i18n.t('pages.workflow.flowHandler.clear') })] }), _jsx("div", { className: cx(css(FlowHandlerSelectContent)), children: _jsx(Spin, { spinning: loadingUser, className: "loading", children: users.map(user => (_jsxs("div", { className: cx(css(FlowHandlerSelectItem), { active: selectedUserIds.includes(user.objectId) }), onClick: () => selectUser(user), children: [user.username, " ", user.nickname ? `(${user.nickname})` : '', _jsx("span", { children: selectedUserIds.includes(user.objectId) && _jsx(DoneIcon, { className: "icon-done" }) })] }, user.objectId))) }) }), _jsx("div", { className: cx(css(FlowHandlerSubmitWrapper)), children: _jsx(Button, { type: "primary", onClick: onSubmit, loading: loading, children: i18n.t('pages.workflow.flowHandler.submit') }) })] })) }));
73
+ return (_jsx(ClassNames, { children: ({ cx, css }) => (_jsxs("div", { className: cx(css(FlowHandlerWrapper)), children: [_jsxs("header", { className: cx(css(FlowHandlerHeader)), children: [_jsx("span", { className: "back-wrapper", onClick: () => onBack === null || onBack === void 0 ? void 0 : onBack(), children: _jsx(ArrowBackIcon, { className: "icon-back" }) }), _jsx("span", { children: i18n.t('pages.workflow.flowHandler.title') })] }), task && _jsx(OverflowText, {}), _jsxs("div", { className: cx(css(FlowHandlerSearchWrapper)), children: [_jsx(SearchIcon, { className: "icon-search" }), _jsx(Input, { className: "search-input", placeholder: i18n.t('pages.workflow.flowHandler.search'), onChange: e => onSearch === null || onSearch === void 0 ? void 0 : onSearch(e.target.value), allowClear: true })] }), _jsxs("div", { className: cx(css(FlowHandlerSelectMessage)), children: [_jsx("span", { onClick: selectAll, children: i18n.t('pages.workflow.flowHandler.selectAll') }), _jsx("span", { children: i18n.t('pages.workflow.flowHandler.count', { count: selectedUserIds.length }) }), _jsx("span", { onClick: clearSelect, children: i18n.t('pages.workflow.flowHandler.clear') })] }), _jsx("div", { className: cx(css(FlowHandlerSelectContent)), children: _jsx(Spin, { spinning: loadingUser, className: "loading", children: users.map(user => (_jsxs("div", { className: cx(css(FlowHandlerSelectItem), { active: selectedUserIds.includes(user.objectId) }), onClick: () => selectUser(user), children: [user.username, " ", user.nickname ? `(${user.nickname})` : '', _jsx("span", { children: selectedUserIds.includes(user.objectId) && _jsx(DoneIcon, { className: "icon-done" }) })] }, user.objectId))) }) }), _jsx("div", { className: cx(css(FlowHandlerSubmitWrapper)), children: _jsx(Button, { type: "primary", onClick: onSubmit, loading: loading, disabled: !selectedUserIds.length, children: i18n.t('pages.workflow.flowHandler.submit') }) })] })) }));
74
74
  };
75
75
  export default memo(SelectFlowHandler);
@@ -3,11 +3,11 @@ import { memo } from 'react';
3
3
  import { ClassNames } from '@emotion/react';
4
4
  import { Spin } from 'antd';
5
5
  import { i18n } from '../../../lib/i18n';
6
- import { flowNextStyle, noPermissionStyle, spinStyle } from './style';
6
+ import { flowNextStyle, flowWrapperStyle, noPermissionStyle, spinStyle } from './style';
7
7
  import TransitionButton from './TransitionButton';
8
8
  import View from './View';
9
9
  const SelectTransition = ({ fetching, flowing, tasks, itemId, itemData, currentUser, workspace, setPopoverVisible, name, objectId, workflowData, roleIds, groupIds, workspaceRoleIds, approval, checkIn, handleTransition, readonly, flowHandlerActive, }) => {
10
- return (_jsx(ClassNames, { children: ({ cx, css }) => (_jsxs(_Fragment, { children: [fetching ? (_jsx(Spin, { css: css(spinStyle) })) : tasks.length ? (_jsx("div", { className: cx(css(flowNextStyle), `flow-next-global`), children: _jsx("div", { children: tasks.map(task => {
10
+ return (_jsx(ClassNames, { children: ({ cx, css }) => (_jsxs(_Fragment, { children: [fetching ? (_jsx(Spin, { css: css(spinStyle) })) : tasks.length ? (_jsx("div", { className: cx(css(flowNextStyle), `flow-next-global`), children: _jsx("div", { className: cx(css(flowWrapperStyle)), children: tasks.map(task => {
11
11
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
12
12
  return (_jsx(TransitionButton, { itemId: itemId, loading: flowing, text: task.name, item: itemData, workspace: workspace, userId: currentUser.id, groupIds: groupIds, roleIds: roleIds, workspaceRoleIds: workspaceRoleIds, currentTaskId: task.id, authUsers: (_b = (_a = task.parameters) === null || _a === void 0 ? void 0 : _a.permissionType) === null || _b === void 0 ? void 0 : _b.users, authRoles: (_d = (_c = task.parameters) === null || _c === void 0 ? void 0 : _c.permissionType) === null || _d === void 0 ? void 0 : _d.roles, authGroups: (_f = (_e = task.parameters) === null || _e === void 0 ? void 0 : _e.permissionType) === null || _f === void 0 ? void 0 : _f.groups, authUserFields: (_h = (_g = task.parameters) === null || _g === void 0 ? void 0 : _g.permissionType) === null || _h === void 0 ? void 0 : _h.customFields, authWorkSpaceRoles: (_k = (_j = task.parameters) === null || _j === void 0 ? void 0 : _j.permissionType) === null || _k === void 0 ? void 0 : _k.workspaceRoles, creatorAuth: (_m = (_l = task.parameters) === null || _l === void 0 ? void 0 : _l.permissionType) === null || _m === void 0 ? void 0 : _m.creatorAuth, scriptValidator: (_o = task.parameters) === null || _o === void 0 ? void 0 : _o.scriptValidator, conditions: (_p = task.parameters) === null || _p === void 0 ? void 0 : _p.fieldType, screenId: (_r = (_q = task.parameters) === null || _q === void 0 ? void 0 : _q.screen) === null || _r === void 0 ? void 0 : _r.key, target: task.target, approval: approval, checkIn: checkIn, handleTransition: handleTransition, hiddenPopover: () => setPopoverVisible(false), readonly: readonly, flowHandlerActive: flowHandlerActive }, task.id));
13
13
  }) }) })) : (_jsx("span", { onClick: () => {
@@ -2,13 +2,14 @@ export declare const readViewWrapper = "\n display: -webkit-box;\n align-items
2
2
  export declare const workflowContentStyle = "\n max-width: 200px;\n text-align: left;\n";
3
3
  export declare const statePopoverStyle: (antPrefix: string) => string;
4
4
  export declare const flowNextStyle = "\n max-height: 260px;\n padding-top: 10px;\n overflow: auto;\n margin: -12px;\n";
5
+ export declare const flowWrapperStyle = "\n padding: 4px 0;\n";
5
6
  export declare const flowStateStyle = "\n min-width: 62px;\n height: 24px;\n padding: 0 18px 0 8px;\n font-size: 12px;\n font-weight: 600;\n line-height: 24px;\n color: #fff;\n text-align: center;\n background: #cdcdcd;\n border-radius: 4px;\n box-shadow: none !important;\n\n span {\n text-decoration: none !important;\n }\n";
6
7
  export declare const flowStateInWorkflowStyle = "\n &.status-btn:not(.add-weights) {\n min-width: 62px;\n height: 22px;\n padding: 0 8px;\n font-size: 12px;\n font-weight: 600;\n line-height: 22px;\n color: #fff;\n text-align: center;\n background: #cdcdcd;\n border-radius: 4px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n }\n";
7
8
  export declare const flowStateButtonStyle = "\n &:not(.add-weights) > span {\n display: -webkit-box;\n }\n";
8
9
  export declare const stateBtnStyle = "\n height: 22px;\n line-height: 22px;\n";
9
10
  export declare const noStateStyle = "\n color: #909aaa;\n background: #F1F2F4;\n";
10
11
  export declare const caretDownStyle = "\n padding-left: 2px;\n margin-left: 0;\n line-height: 10px;\n";
11
- export declare const statusViewGlobalStyle = "\n.field-layout.status-view {\n position: relative;\n padding: 10px;\n margin: -12px;\n margin-top: 10px;\n font-size: 12px;\n cursor: pointer;\n border-top: 1px solid #ddd;\n}\n\n.field-layout.status-view .status-view-watch {\n width: 12px;\n height: 12px;\n margin-right: 5px;\n font-size: 12px;\n vertical-align: middle;\n}\n";
12
+ export declare const statusViewGlobalStyle = "\n.field-layout.status-view {\n position: relative;\n padding: 10px;\n margin: -12px;\n margin-top: 10px;\n font-size: 12px;\n cursor: pointer;\n border-top: 1px solid #ddd;\n width: auto;\n}\n\n.field-layout.status-view .status-view-watch {\n width: 12px;\n height: 12px;\n margin-right: 5px;\n font-size: 12px;\n vertical-align: middle;\n}\n";
12
13
  export declare const tipLineStyle = "\n margin-bottom: 0;\n";
13
14
  export declare const tooltipStyle = "\n width: 98px;\n";
14
15
  export declare const iconStyle = "\n padding: 0 6px;\n color: #848C9F;\n";
@@ -19,12 +20,14 @@ export declare const pointerStyle = "\n cursor: pointer;\n";
19
20
  export declare const spinStyle = "\n width: 150px;\n height: 50px;\n";
20
21
  export declare const noPermissionStyle = "\n display: block;\n width: 120px;\n padding: 20px 10px 10px;\n font-size: 12px;\n color: #2e405e;\n";
21
22
  export declare const overflowStyle = "\n display: flex;\n margin-top: 4px;\n";
22
- export declare const overflowStyleText = "\n flex: 1;\n";
23
+ export declare const overflowStyleText = "\n font-size: 13px;\n line-height: 24px;\n color: #848C9F;\n flex: 1;\n";
24
+ export declare const headerFlowStyle = "\n text-align: right;\n";
25
+ export declare const headerStateStyle = "\n & > span {\n display: inline-block !important;\n }\n";
23
26
  export declare const FlowHandlerWrapper = "\n width: 216px;\n";
24
- export declare const FlowHandlerHeader = "\n position: relative;\n font-size: 14px;\n text-align: center;\n line-height: 22px;\n .back-wrapper {\n position: absolute;\n left: 0;\n top: 0;\n cursor: pointer;\n }\n .icon-back {\n font-size: 16px !important;\n width: 16px !important;\n }\n";
25
- export declare const FlowHandlerSearchWrapper = "\n margin: 0 -12px;\n margin-top: 6px;\n padding: 5px 10px;\n border-top: 1px solid #f1f2f4;\n border-bottom: 1px solid #f1f2f4;\n\n .icon-search {\n position: relative;\n top: 2px;\n color: #b5bac5;\n font-size: 16px !important;\n width: 16px !important;\n }\n .search-input {\n padding-left: 6px;\n border: none;\n width: 196px;\n outline: none;\n fill: none;\n box-shadow: none !important;\n }\n";
27
+ export declare const FlowHandlerHeader = "\n position: relative;\n font-size: 14px;\n text-align: center;\n line-height: 22px;\n margin-top: -6px;\n .back-wrapper {\n position: absolute;\n left: 0;\n top: 0;\n cursor: pointer;\n }\n .icon-back {\n font-size: 16px !important;\n width: 16px !important;\n }\n";
28
+ export declare const FlowHandlerSearchWrapper = "\n margin: 0 -12px;\n padding: 5px 10px;\n border-top: 1px solid #f1f2f4;\n border-bottom: 1px solid #f1f2f4;\n\n .icon-search {\n position: relative;\n top: 2px;\n color: #b5bac5;\n font-size: 16px !important;\n width: 16px !important;\n }\n .search-input {\n padding-left: 6px;\n border: none;\n width: 196px;\n outline: none;\n fill: none;\n box-shadow: none !important;\n }\n";
26
29
  export declare const FlowHandlerSelectWrapper = "\n margin: 0 -12px;\n padding: 9px 10px;\n .icon-arrow-down {\n position: relative;\n top: 2px; \n color: #b5bac5;\n font-size: 16px !important;\n width: 16px !important;\n }\n .select-input {\n border: none;\n display: inline-block;\n width: 196px;\n outline: none;\n fill: none;\n box-shadow: none;\n &:focus {\n box-shadow: none;\n }\n }\n .select-input::placeholder {\n color: #b5bac5;\n }\n }\n";
27
30
  export declare const FlowHandlerSelectMessage = "\n margin: 0 -12px;\n padding: 6px 12px;\n display: flex;\n font-size: 12px;\n color: #091940;\n border-bottom: 1px solid #f1f2f4;\n\n span:nth-child(1) {\n position: relative;\n color: #0C62FF;\n cursor: pointer;\n &:hover {\n color: #091940;\n }\n\n &:after {\n content: '';\n position: absolute;\n height: 14px;\n top: 2px;\n right: -10px;\n border-right: 1px solid #f1f2f4;\n }\n }\n span:nth-child(2) {\n padding-left: 18px;\n flex: 1;\n \n }\n span:nth-child(3) {\n color: #0c62ff;\n cursor: pointer;\n &:hover {\n color: #091940;\n }\n }\n";
28
31
  export declare const FlowHandlerSelectContent = "\n min-height: 200px;\n max-height: 200px;\n overflow-y: auto;\n margin: 0 -12px;\n .loading {\n height: 200px !important;\n }\n";
29
32
  export declare const FlowHandlerSelectItem = "\n position: relative;\n margin: 0 4px;\n padding: 5px 12px;\n font-size: 14px;\n color: #091940;\n cursor: pointer;\n border-radius: 4px;\n\n .icon-done {\n position: absolute;\n top: 10px;\n right: 14px;\n width: 12px;\n height: 12px;\n color: #0C62FF;\n scale: 1.2;\n }\n\n &:hover {\n background-color: #f1f2f4;\n }\n\n &.active {\n background-color: #E6F3FF;\n font-weight: 600;\n }\n";
30
- export declare const FlowHandlerSubmitWrapper = "\n border-top: 1px solid #f1f2f4;\n padding: 6px 0;\n margin-bottom: -12px;\n text-align: right;\n";
33
+ export declare const FlowHandlerSubmitWrapper = "\n border-top: 1px solid #f1f2f4;\n padding: 6px 6px 6px 0;\n margin: 0 -12px -12px -12px;\n text-align: right;\n";
@@ -35,6 +35,9 @@ export const flowNextStyle = `
35
35
  overflow: auto;
36
36
  margin: -12px;
37
37
  `;
38
+ export const flowWrapperStyle = `
39
+ padding: 4px 0;
40
+ `;
38
41
  export const flowStateStyle = `
39
42
  min-width: ${statusCellMinWidth};
40
43
  height: 24px;
@@ -97,6 +100,7 @@ export const statusViewGlobalStyle = `
97
100
  font-size: 12px;
98
101
  cursor: pointer;
99
102
  border-top: 1px solid #ddd;
103
+ width: auto;
100
104
  }
101
105
 
102
106
  .field-layout.status-view .status-view-watch {
@@ -157,8 +161,19 @@ export const overflowStyle = `
157
161
  margin-top: 4px;
158
162
  `;
159
163
  export const overflowStyleText = `
164
+ font-size: 13px;
165
+ line-height: 24px;
166
+ color: ${gray7};
160
167
  flex: 1;
161
168
  `;
169
+ export const headerFlowStyle = `
170
+ text-align: right;
171
+ `;
172
+ export const headerStateStyle = `
173
+ & > span {
174
+ display: inline-block !important;
175
+ }
176
+ `;
162
177
  export const FlowHandlerWrapper = `
163
178
  width: 216px;
164
179
  `;
@@ -167,6 +182,7 @@ export const FlowHandlerHeader = `
167
182
  font-size: 14px;
168
183
  text-align: center;
169
184
  line-height: 22px;
185
+ margin-top: -6px;
170
186
  .back-wrapper {
171
187
  position: absolute;
172
188
  left: 0;
@@ -180,7 +196,6 @@ export const FlowHandlerHeader = `
180
196
  `;
181
197
  export const FlowHandlerSearchWrapper = `
182
198
  margin: 0 -12px;
183
- margin-top: 6px;
184
199
  padding: 5px 10px;
185
200
  border-top: 1px solid #f1f2f4;
186
201
  border-bottom: 1px solid #f1f2f4;
@@ -304,7 +319,7 @@ export const FlowHandlerSelectItem = `
304
319
  `;
305
320
  export const FlowHandlerSubmitWrapper = `
306
321
  border-top: 1px solid #f1f2f4;
307
- padding: 6px 0;
308
- margin-bottom: -12px;
322
+ padding: 6px 6px 6px 0;
323
+ margin: 0 -12px -12px -12px;
309
324
  text-align: right;
310
325
  `;
@@ -14,7 +14,7 @@ const UserReadView = memo(({ value, readonly }) => {
14
14
  })) || EMPTY_ARRAY);
15
15
  }, [value]);
16
16
  const tooltipValues = useMemo(() => {
17
- return value === null || value === void 0 ? void 0 : value.map((val) => {
17
+ return value === null || value === void 0 ? void 0 : value.map(val => {
18
18
  const item = userDataFormat(val);
19
19
  return generateUserDisplayName(item);
20
20
  });
@@ -22,7 +22,7 @@ const UserReadView = memo(({ value, readonly }) => {
22
22
  if (!displayValues.length) {
23
23
  return _jsx(EmptyField, { readonly: readonly, isUser: true });
24
24
  }
25
- return _jsx(BaseOverflowTooltip, { title: tooltipValues.join(','), maxline: 1, children: displayValues });
25
+ return (_jsx(BaseOverflowTooltip, { title: tooltipValues.join(','), maxline: 1, children: displayValues }));
26
26
  });
27
27
  UserReadView.displayName = 'UserReadView';
28
28
  export default UserReadView;
@@ -6,5 +6,5 @@ export declare const arrayDiff: (origin: Array<any>, target: Array<any>) => IDif
6
6
  export declare const serializationArrayByKey: (list: any[], keyPath: string) => Record<string, any> | null;
7
7
  export declare const createHash: () => number;
8
8
  export declare function parseArray(str: string): string[];
9
- export declare const getArrayValue: (value: any) => any[];
9
+ export declare const getArrayValue: <T = any>(value: T) => T;
10
10
  export {};
@@ -1,4 +1,3 @@
1
- declare const useI18n: () => {
2
- t: (key: string, opts?: Record<string, any>) => string;
3
- };
1
+ import { i18n } from '../i18n';
2
+ declare const useI18n: () => Pick<typeof i18n, 't'>;
4
3
  export default useI18n;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-team-components",
3
- "version": "1.2.0-alpha.3",
3
+ "version": "1.2.1",
4
4
  "description": "Gitee team components",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",