@giteeteam/apps-team-components 1.11.6 → 1.11.8
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/dist/components/fields/dropdown/BaseField.js +5 -5
- package/dist/components/fields/dropdown/style.d.ts +1 -1
- package/dist/components/fields/dropdown/style.js +4 -6
- package/dist/components/fields/priority/ActionCell.js +2 -2
- package/dist/components/fields/priority/style/index.d.ts +1 -0
- package/dist/components/fields/priority/style/index.js +4 -1
- package/dist/components/fields/text/BaseField.js +3 -3
- package/dist/components/fields/text/style.d.ts +1 -1
- package/dist/components/fields/text/style.js +4 -6
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ import useI18n from '../../../lib/hooks/useI18n.js';
|
|
|
24
24
|
import { API_KEY } from '../../../lib/swr/constants.js';
|
|
25
25
|
import useViewClass from '../hooks/useViewClass.js';
|
|
26
26
|
import { EMPTY_OPTIONS, useCommonProps } from './hook.js';
|
|
27
|
-
import { dropdownSelectDisabled, onlyWorkspaceStyle, onlyWorkspaceDividerStyle, dropdownSelectStyle, optionDisplayWrapClass, dropdownSelectOptionClass, disabledClass, workspaceClass, dropdownStyle, hiddenHoverClass, displayWrapClass,
|
|
27
|
+
import { dropdownSelectDisabled, onlyWorkspaceStyle, onlyWorkspaceDividerStyle, dropdownSelectStyle, optionDisplayWrapClass, dropdownSelectOptionClass, disabledClass, workspaceClass, dropdownStyle, hiddenHoverClass, displayWrapClass, cellWrapperStyle, valueOptionContentClass, valueOptionClass, valueOptionIconClass, valueOptionLabelClass, hoverIconClass } from './style.js';
|
|
28
28
|
|
|
29
29
|
const loggers = debug('dropdown:BaseField');
|
|
30
30
|
const isNilFilter = function (value) {
|
|
@@ -567,10 +567,10 @@ const Dropdown = props => {
|
|
|
567
567
|
]);
|
|
568
568
|
return (jsx(ClassNames, { children: ({ cx, css }) => {
|
|
569
569
|
const cxShowValue = showValue({ cx, css });
|
|
570
|
-
return (
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
570
|
+
return (jsx(Col, { style: style, ref: containerRef, className: cx(css(dropdownStyle(antPrefix)), 'field-value', viewClassNames, { [hiddenHoverClass]: hiddenHover }, { [displayWrapClass]: valueDisplayWrap }, { [css(dropdownSelectStyle(antPrefix))]: disabledLineThrough || displayValueHidden }), onClick: handleClick, children: jsxs("div", { css: css(cellWrapperStyle), children: [(readonly || (!editMode && !editing)) &&
|
|
571
|
+
(cxShowValue ? (!valueDisplayWrap ? (isView && isMultiple ? (jsx(Expand, { readonly: readonly, editing: editing, expandType: EXPAND_TYPE_ENUM.TAG, children: valueOptions.map(item => (jsx("span", { className: "field-common-view-tag", children: jsx(BaseOverflowTooltip, { title: item.label, children: item.label }) }, item.value))) })) : (jsx(OverflowTooltip, { title: cxShowValue, children: cxShowValue }))) : (jsx("div", { className: cx(valueOptionContentClass), children: valueOptions.map(ele => {
|
|
572
|
+
return (jsxs("div", { className: cx(valueOptionClass), title: ele.label, children: [jsx(ItemIcon, { className: cx(valueOptionIconClass), icon: ele.icon }), jsx("span", { className: cx(valueOptionLabelClass), children: ele.label })] }, ele.value));
|
|
573
|
+
}) }))) : (jsx(EmptyField, { readonly: readonly }))), !readonly && (editMode || editing) && containerRef && (jsx(Overlay, { show: true, rootClose: true, container: containerRef, target: containerRef, onHide: noop, children: () => overlayRender })), jsx(DownOutlined, { className: cx(hoverIconClass) })] }) }));
|
|
574
574
|
} }));
|
|
575
575
|
};
|
|
576
576
|
Dropdown.displayName = 'DropdownBaseField';
|
|
@@ -4,7 +4,6 @@ export declare const onlyWorkspaceDividerStyle = "\n &:not(.add-weights) {\n
|
|
|
4
4
|
export declare const hiddenHoverClass: string;
|
|
5
5
|
export declare const displayWrapClass: string;
|
|
6
6
|
export declare const valueOptionClass: string;
|
|
7
|
-
export declare const pointerClass: string;
|
|
8
7
|
export declare const valueOptionContentClass: string;
|
|
9
8
|
export declare const valueOptionIconClass: string;
|
|
10
9
|
export declare const valueOptionLabelClass: string;
|
|
@@ -14,4 +13,5 @@ export declare const optionDisplayWrapClass: string;
|
|
|
14
13
|
export declare const dropdownStyle: (antPrefix: string) => string;
|
|
15
14
|
export declare const dropdownSelectOptionClass: string;
|
|
16
15
|
export declare const disabledClass: string;
|
|
16
|
+
export declare const cellWrapperStyle = "\n cursor: pointer;\n";
|
|
17
17
|
export declare const dropdownSelectStyle: (antPrefix: string) => string;
|
|
@@ -15,7 +15,6 @@ const onlyWorkspaceDividerStyle = `
|
|
|
15
15
|
const hiddenHoverClass = randomClassName('hidden-hover');
|
|
16
16
|
const displayWrapClass = randomClassName('display-wrap');
|
|
17
17
|
const valueOptionClass = randomClassName('value-option');
|
|
18
|
-
const pointerClass = randomClassName('pointer-class');
|
|
19
18
|
const valueOptionContentClass = randomClassName('value-option-content');
|
|
20
19
|
const valueOptionIconClass = randomClassName('value-option-icon');
|
|
21
20
|
const valueOptionLabelClass = randomClassName('value-option-label');
|
|
@@ -33,10 +32,6 @@ const dropdownStyle = (antPrefix) => `
|
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
.${pointerClass} {
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
35
|
.${hoverIconClass} {
|
|
41
36
|
${hoverIconStyle}
|
|
42
37
|
}
|
|
@@ -85,6 +80,9 @@ const dropdownStyle = (antPrefix) => `
|
|
|
85
80
|
`;
|
|
86
81
|
const dropdownSelectOptionClass = randomClassName('dropdown-select-option');
|
|
87
82
|
const disabledClass = randomClassName('disabled');
|
|
83
|
+
const cellWrapperStyle = `
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
`;
|
|
88
86
|
const dropdownSelectStyle = (antPrefix) => `
|
|
89
87
|
.${dropdownSelectOptionClass}.${disabledClass} {
|
|
90
88
|
text-decoration: line-through;
|
|
@@ -95,4 +93,4 @@ const dropdownSelectStyle = (antPrefix) => `
|
|
|
95
93
|
}
|
|
96
94
|
`;
|
|
97
95
|
|
|
98
|
-
export { disabledClass, displayWrapClass, dropdownSelectDisabled, dropdownSelectOptionClass, dropdownSelectStyle, dropdownStyle, hiddenHoverClass, hoverIconClass, onlyWorkspaceDividerStyle, onlyWorkspaceStyle, optionDisplayWrapClass,
|
|
96
|
+
export { cellWrapperStyle, disabledClass, displayWrapClass, dropdownSelectDisabled, dropdownSelectOptionClass, dropdownSelectStyle, dropdownStyle, hiddenHoverClass, hoverIconClass, onlyWorkspaceDividerStyle, onlyWorkspaceStyle, optionDisplayWrapClass, valueOptionClass, valueOptionContentClass, valueOptionIconClass, valueOptionLabelClass, workspaceClass };
|
|
@@ -9,7 +9,7 @@ import useI18n from '../../../lib/hooks/useI18n.js';
|
|
|
9
9
|
import EmptyField from '../../common/EmptyField.js';
|
|
10
10
|
import BaseOverflowTooltip from '../../common/overflow-tooltip/BaseOverflowTooltip.js';
|
|
11
11
|
import { getPopupContainerFun } from '../../common/utils.js';
|
|
12
|
-
import { menuBoxStyle, cellBoxStyle, checkedStyle, colorIconStyle, emptyTipStyle, dropdownStyle, headerCellStyle, downIconStyle, emptyTextStyle, emptyStyle, emptyIconStyle } from './style/index.js';
|
|
12
|
+
import { menuBoxStyle, cellBoxStyle, checkedStyle, colorIconStyle, emptyTipStyle, dropdownStyle, cellWrapperStyle, headerCellStyle, downIconStyle, emptyTextStyle, emptyStyle, emptyIconStyle } from './style/index.js';
|
|
13
13
|
|
|
14
14
|
const filterData = (list, id) => {
|
|
15
15
|
return list === null || list === void 0 ? void 0 : list.filter(v => {
|
|
@@ -51,7 +51,7 @@ const PriorityCell = props => {
|
|
|
51
51
|
if (readonly)
|
|
52
52
|
return;
|
|
53
53
|
setVisible(flag);
|
|
54
|
-
}, open: visible, getPopupContainer: triggerNode => getPopupContainerFun(getPopupContainer, triggerNode, apply, page), children: showData ? (jsxs("div", { css: css(cellBoxStyle(antPrefix), isFromHeader && headerCellStyle), children: [jsx(HollowCircleIcon, { css: css(colorIconStyle), style: { color: showData.color } }), jsx(BaseOverflowTooltip, { title: showData.name, children: showData.name }), isFromHeader && jsx(CaretDownOutlined, { css: css(downIconStyle) })] })) : !isFromHeader ? (jsx("div", { css: css(emptyTextStyle), children: jsx(EmptyField, { readonly: readonly }) })) : (jsxs("div", { css: css(emptyStyle), children: [jsx(DottedCircleIcon, { css: css(emptyIconStyle) }), t('pages.fields.view.noPriority')] })) })) }));
|
|
54
|
+
}, open: visible, getPopupContainer: triggerNode => getPopupContainerFun(getPopupContainer, triggerNode, apply, page), children: jsx("div", { css: css(cellWrapperStyle), children: showData ? (jsxs("div", { css: css(cellBoxStyle(antPrefix), isFromHeader && headerCellStyle), children: [jsx(HollowCircleIcon, { css: css(colorIconStyle), style: { color: showData.color } }), jsx(BaseOverflowTooltip, { title: showData.name, children: showData.name }), isFromHeader && jsx(CaretDownOutlined, { css: css(downIconStyle) })] })) : !isFromHeader ? (jsx("div", { css: css(emptyTextStyle), children: jsx(EmptyField, { readonly: readonly }) })) : (jsxs("div", { css: css(emptyStyle), children: [jsx(DottedCircleIcon, { css: css(emptyIconStyle) }), t('pages.fields.view.noPriority')] })) }) })) }));
|
|
55
55
|
};
|
|
56
56
|
PriorityCell.displayName = 'ActionPriorityCell';
|
|
57
57
|
|
|
@@ -11,3 +11,4 @@ export declare const iconStyle = "\n padding-left: 3px;\n color: var(--theme-t
|
|
|
11
11
|
export declare const spinStyle = "\n width: 150px;\n height: 50px;\n line-height: 60px;\n";
|
|
12
12
|
export declare const menuBoxStyle = "\n max-height: 300px;\n overflow: auto;\n";
|
|
13
13
|
export declare const dropdownStyle = "\n background: var(--color-gray-1, #FFFFFF);\n\n .menu-box {\n max-height: 300px;\n overflow: auto;\n }\n";
|
|
14
|
+
export declare const cellWrapperStyle = "\n cursor: pointer;\n";
|
|
@@ -85,5 +85,8 @@ const dropdownStyle = `
|
|
|
85
85
|
overflow: auto;
|
|
86
86
|
}
|
|
87
87
|
`;
|
|
88
|
+
const cellWrapperStyle = `
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
`;
|
|
88
91
|
|
|
89
|
-
export { cellBoxStyle, checkedStyle, colorIconStyle, downIconStyle, dropdownStyle, emptyIconStyle, emptyStyle, emptyTextStyle, emptyTipStyle, headerCellStyle, iconStyle, menuBoxStyle, spinStyle };
|
|
92
|
+
export { cellBoxStyle, cellWrapperStyle, checkedStyle, colorIconStyle, downIconStyle, dropdownStyle, emptyIconStyle, emptyStyle, emptyTextStyle, emptyTipStyle, headerCellStyle, iconStyle, menuBoxStyle, spinStyle };
|
|
@@ -11,7 +11,7 @@ import useI18n from '../../../lib/hooks/useI18n.js';
|
|
|
11
11
|
import EmptyField from '../../common/EmptyField.js';
|
|
12
12
|
import { getFieldWidthStyle } from '../base-component/utils.js';
|
|
13
13
|
import useViewClass from '../hooks/useViewClass.js';
|
|
14
|
-
import { textStyle, hiddenHoverClass,
|
|
14
|
+
import { textStyle, hiddenHoverClass, cellWrapperStyle } from './style.js';
|
|
15
15
|
|
|
16
16
|
const BASE_FIELD_WIDTH = 104;
|
|
17
17
|
const Text = props => {
|
|
@@ -69,8 +69,8 @@ const Text = props => {
|
|
|
69
69
|
};
|
|
70
70
|
const style = getFieldWidthStyle(labelWidth, labelAlign, hiddenLabel, apply, hasExtraNode);
|
|
71
71
|
const hiddenHover = readonly || editing || editMode || apply === 'cell' || defaultProps.name === 'name-view' || isView;
|
|
72
|
-
return (jsx(ClassNames, { children: ({ cx, css }) => (
|
|
73
|
-
|
|
72
|
+
return (jsx(ClassNames, { children: ({ cx, css }) => (jsx(Col, { style: style, ref: containerRef, className: cx(css(textStyle()), 'field-value', viewClassNames, { [hiddenHoverClass]: hiddenHover }), onClick: handleClick, children: jsxs("div", { css: css(cellWrapperStyle), children: [(readonly || (!editMode && !editing)) &&
|
|
73
|
+
(value ? (isView ? (jsxs(Expand, { readonly: readonly, editing: editing, expandType: EXPAND_TYPE_ENUM.TEXT, children: [addonBefore, value, addonAfter] })) : (jsxs(OverflowTooltip, { enterable: true, title: `${addonBefore}${value}${addonAfter}`, maxline: maxline, children: [addonBefore, value, addonAfter] }))) : (jsx(EmptyField, { readonly: readonly }))), !readonly && (editMode || editing) && containerRef && (jsx(Overlay, { show: true, flip: true, rootClose: true, container: containerRef, target: containerRef, onHide: noop, children: () => (jsx("div", { className: "field-value-overlay", children: jsx(Input, { ...defaultProps, className: 'field-value-overlay-component', ref: targetRef, value: value, onChange: handleChange, onBlur: handleBlur, placeholder: placeholder, addonBefore: addonBefore, addonAfter: addonAfter }) })) }))] }) })) }));
|
|
74
74
|
};
|
|
75
75
|
Text.displayName = 'TextBaseField';
|
|
76
76
|
var BaseField = memo(Text, isPropsEqual);
|
|
@@ -2,17 +2,15 @@ import { randomClassName } from '../../../style/common.js';
|
|
|
2
2
|
import { hoverStyle } from '../../common/style/mixin.js';
|
|
3
3
|
|
|
4
4
|
const hiddenHoverClass = randomClassName('hidden-hover');
|
|
5
|
-
const pointerClass = randomClassName('pointer-class');
|
|
6
5
|
const textStyle = () => `
|
|
7
6
|
width: 100%;
|
|
8
7
|
|
|
9
8
|
&:not(.${hiddenHoverClass}) :hover {
|
|
10
9
|
${hoverStyle}
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
11
|
+
`;
|
|
12
|
+
const cellWrapperStyle = `
|
|
13
|
+
cursor: pointer;
|
|
16
14
|
`;
|
|
17
15
|
|
|
18
|
-
export {
|
|
16
|
+
export { cellWrapperStyle, hiddenHoverClass, textStyle };
|