@zohodesk/dot 1.0.0-temp-229 → 1.0.0-temp-230
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 +8 -0
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +0 -2
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +0 -2
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +0 -2
- package/es/AttachmentViewer/AttachmentViewer.js +57 -7
- package/es/AttachmentViewer/AttachmentViewer.module.css +1 -1
- package/es/AttachmentViewer/props/defaultProps.js +2 -1
- package/es/AttachmentViewer/props/propTypes.js +3 -1
- package/es/DotProvider/props/defaultProps.js +1 -1
- package/es/Link/Link.js +4 -3
- package/es/Link/props/propTypes.js +1 -0
- package/es/common/dot_boxShadow.module.css +0 -2
- package/es/form/fields/SelectField/SelectField.js +2 -4
- package/es/form/fields/SelectField/props/propTypes.js +0 -1
- package/es/list/status/StatusDropdown/StatusDropdown.js +79 -121
- package/es/list/status/StatusDropdown/StatusDropdown.module.css +7 -54
- package/es/list/status/StatusDropdown/props/defaultProps.js +1 -2
- package/es/list/status/StatusDropdown/props/propTypes.js +0 -1
- package/lib/AttachmentViewer/AttachmentViewer.js +94 -37
- package/lib/AttachmentViewer/AttachmentViewer.module.css +1 -1
- package/lib/AttachmentViewer/props/defaultProps.js +2 -1
- package/lib/AttachmentViewer/props/propTypes.js +3 -1
- package/lib/DotProvider/props/defaultProps.js +2 -2
- package/lib/Link/Link.js +4 -3
- package/lib/Link/props/propTypes.js +1 -0
- package/lib/common/dot_boxShadow.module.css +0 -2
- package/lib/form/fields/SelectField/SelectField.js +2 -4
- package/lib/form/fields/SelectField/props/propTypes.js +0 -1
- package/lib/list/status/StatusDropdown/StatusDropdown.js +81 -133
- package/lib/list/status/StatusDropdown/StatusDropdown.module.css +7 -54
- package/lib/list/status/StatusDropdown/props/defaultProps.js +1 -2
- package/lib/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.9.12
|
|
6
|
+
|
|
7
|
+
- DUMMY_ARRAY import path issue fixed in DotProvider DefaultProps
|
|
8
|
+
|
|
5
9
|
# 1.9.11
|
|
6
10
|
|
|
7
11
|
- padding, margin based css properties migrated to padding-inline,padding-block, margin-inline, margin-block
|
|
@@ -24,6 +28,10 @@ In this Library, we Provide Some Basic Components to Build Your Application
|
|
|
24
28
|
|
|
25
29
|
# 1.9.8
|
|
26
30
|
|
|
31
|
+
- **AttachmentViewer** Provide a method in the AttachmentViewer component to handle updates to existing attachment list items.
|
|
32
|
+
|
|
33
|
+
# 1.9.8
|
|
34
|
+
|
|
27
35
|
- **DotProvider** - Variables package handled and separated the component & variable import files
|
|
28
36
|
- **Dependency**: @zohodesk/variables@1.3.0 , @zohodesk/components@1.6.6
|
|
29
37
|
|
|
@@ -259,8 +259,6 @@
|
|
|
259
259
|
|
|
260
260
|
/* status dropdown */
|
|
261
261
|
--zdt_statusdropdown_line_border:var(--zdt_cta_grey_15_border);
|
|
262
|
-
--zdt_statusdropdown_wrapper_container_border:hsla(0, calc(var(--zd-saturation, 1) * 0.00%), calc(100.00% + var(--zdc_default_inverse_low)), calc( 0.2 + var(--zdc_alpha_low)));
|
|
263
|
-
--zdt_statusdropdown_wrapper_container_bg:hsla(0, calc(var(--zd-saturation, 1) * 0.00%), 100.00%, 0.03);
|
|
264
262
|
|
|
265
263
|
/* status listitem */
|
|
266
264
|
--zdt_statuslistitem_list_text:hsla(210, calc(var(--zd-saturation, 1) * 7.41%), calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
@@ -259,8 +259,6 @@
|
|
|
259
259
|
|
|
260
260
|
/* status dropdown */
|
|
261
261
|
--zdt_statusdropdown_line_border:var(--zdt_cta_grey_15_border);
|
|
262
|
-
--zdt_statusdropdown_wrapper_container_border:hsla(218, calc(var(--zd-saturation, 1) * 42.22%), calc(91.18% + var(--zdc_default_inverse_low)), calc(1 + var(--zdc_alpha_low)));
|
|
263
|
-
--zdt_statusdropdown_wrapper_container_bg:hsla(216, calc(var(--zd-saturation, 1) * 38.46%), 97.45%, 1);
|
|
264
262
|
|
|
265
263
|
/* status listitem */
|
|
266
264
|
--zdt_statuslistitem_list_text:hsla(0, calc(var(--zd-saturation, 1) * 0.00%), calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
@@ -259,8 +259,6 @@
|
|
|
259
259
|
|
|
260
260
|
/* status dropdown */
|
|
261
261
|
--zdt_statusdropdown_line_border:var(--zdt_cta_grey_15_border);
|
|
262
|
-
--zdt_statusdropdown_wrapper_container_border:hsla(0, calc(var(--zd-saturation, 1) * 0.00%), calc(100.00% + var(--zdc_default_inverse_low)), calc( 0.2 + var(--zdc_alpha_low)));
|
|
263
|
-
--zdt_statusdropdown_wrapper_container_bg:hsla(0, calc(var(--zd-saturation, 1) * 0.00%), 100.00%, 0.03);
|
|
264
262
|
|
|
265
263
|
/* status listitem */
|
|
266
264
|
--zdt_statuslistitem_list_text:hsla(210, calc(var(--zd-saturation, 1) * 7.41%), calc(89.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
@@ -48,6 +48,47 @@ export default class AttachmentViewer extends Component {
|
|
|
48
48
|
this.handleMenuValidation = this.handleMenuValidation.bind(this);
|
|
49
49
|
this.getPreviewIconData = this.getPreviewIconData.bind(this);
|
|
50
50
|
this.renderIframe = this.renderIframe.bind(this);
|
|
51
|
+
this.updateItem = this.updateItem.bind(this);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
updateItem(idOrIndex, changes) {
|
|
55
|
+
if (!changes || typeof changes !== 'object') {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const {
|
|
60
|
+
data
|
|
61
|
+
} = this.state;
|
|
62
|
+
const targetIdx = typeof idOrIndex === 'number' ? idOrIndex : data.findIndex(item => item && item.id === idOrIndex);
|
|
63
|
+
|
|
64
|
+
if (targetIdx < 0 || targetIdx >= data.length) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
this.setState(prevState => {
|
|
69
|
+
const nextData = prevState.data.slice();
|
|
70
|
+
nextData[targetIdx] = { ...nextData[targetIdx],
|
|
71
|
+
...changes
|
|
72
|
+
};
|
|
73
|
+
let nextDataList = prevState.dataList;
|
|
74
|
+
|
|
75
|
+
if (targetIdx < prevState.dataList.length) {
|
|
76
|
+
nextDataList = prevState.dataList.slice();
|
|
77
|
+
nextDataList[targetIdx] = { ...nextDataList[targetIdx],
|
|
78
|
+
...changes
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
data: nextData,
|
|
84
|
+
dataList: nextDataList
|
|
85
|
+
};
|
|
86
|
+
}, () => {
|
|
87
|
+
if (this.state.selectedIndex === targetIdx) {
|
|
88
|
+
this.handleMenuValidation();
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
return true;
|
|
51
92
|
}
|
|
52
93
|
|
|
53
94
|
isImageFileType(fileName) {
|
|
@@ -80,8 +121,9 @@ export default class AttachmentViewer extends Component {
|
|
|
80
121
|
selectedIndex
|
|
81
122
|
} = this.state;
|
|
82
123
|
let indexChanged = previewObj.selectedIndex != prevProps.previewObj.selectedIndex;
|
|
124
|
+
const attachmentPreviewUrlChanged = previewObj.previewData[0]?.viewUrl !== prevState.data[0]?.viewUrl; // Triggers an update if the previewed attachment is edited by the Attachment Annotator.
|
|
83
125
|
|
|
84
|
-
if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged) {
|
|
126
|
+
if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged || attachmentPreviewUrlChanged) {
|
|
85
127
|
let objChanged = previewObj.previewData.some((value, index) => {
|
|
86
128
|
return shallowDiff(value, prevProps.previewObj[index]);
|
|
87
129
|
});
|
|
@@ -100,7 +142,7 @@ export default class AttachmentViewer extends Component {
|
|
|
100
142
|
}
|
|
101
143
|
}
|
|
102
144
|
|
|
103
|
-
if (prevState.selectedIndex != selectedIndex) {
|
|
145
|
+
if (prevState.selectedIndex != selectedIndex || attachmentPreviewUrlChanged) {
|
|
104
146
|
this.handleMenuValidation();
|
|
105
147
|
}
|
|
106
148
|
}
|
|
@@ -424,9 +466,10 @@ export default class AttachmentViewer extends Component {
|
|
|
424
466
|
$ui_weight: "semibold"
|
|
425
467
|
}, previewUnsupportedText), downloadUrl ? /*#__PURE__*/React.createElement(Link, {
|
|
426
468
|
href: downloadUrl,
|
|
469
|
+
download: true,
|
|
470
|
+
downloadName: name,
|
|
427
471
|
className: style.downloadLink,
|
|
428
|
-
hasReload: true
|
|
429
|
-
download: true
|
|
472
|
+
hasReload: true
|
|
430
473
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
431
474
|
palette: "primaryFilled",
|
|
432
475
|
text: downloadText
|
|
@@ -449,7 +492,9 @@ export default class AttachmentViewer extends Component {
|
|
|
449
492
|
i18nKeys,
|
|
450
493
|
isActive,
|
|
451
494
|
dataId,
|
|
452
|
-
customProps
|
|
495
|
+
customProps,
|
|
496
|
+
showCount,
|
|
497
|
+
renderCustomIcons
|
|
453
498
|
} = this.props;
|
|
454
499
|
const {
|
|
455
500
|
avatarProps = {}
|
|
@@ -495,7 +540,7 @@ export default class AttachmentViewer extends Component {
|
|
|
495
540
|
"data-title": selectedAttachment.name,
|
|
496
541
|
dataId: "attachName",
|
|
497
542
|
id: ariaId
|
|
498
|
-
}, selectedAttachment.name), /*#__PURE__*/React.createElement(Box, {
|
|
543
|
+
}, selectedAttachment.name), showCount && /*#__PURE__*/React.createElement(Box, {
|
|
499
544
|
flexible: true,
|
|
500
545
|
className: style.count,
|
|
501
546
|
dataId: "attachCountContainer"
|
|
@@ -507,7 +552,11 @@ export default class AttachmentViewer extends Component {
|
|
|
507
552
|
align: uptoTablet ? 'bottom' : 'center',
|
|
508
553
|
wrap: "wrap",
|
|
509
554
|
isCover: false
|
|
510
|
-
},
|
|
555
|
+
}, typeof renderCustomIcons === 'function' && renderCustomIcons({
|
|
556
|
+
selectedAttachment,
|
|
557
|
+
selectedIndex,
|
|
558
|
+
totalLen
|
|
559
|
+
}), canZoom ? isZoomed ? /*#__PURE__*/React.createElement("div", {
|
|
511
560
|
className: uptoTablet ? style.mobileMenu : style.menu,
|
|
512
561
|
onClick: this.zoomOut.bind(this, selectedIndex),
|
|
513
562
|
"data-id": "zoomOut",
|
|
@@ -555,6 +604,7 @@ export default class AttachmentViewer extends Component {
|
|
|
555
604
|
className: uptoTablet ? style.mobileMenu : style.menu
|
|
556
605
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
557
606
|
href: downloadUrl,
|
|
607
|
+
downloadName: selectedAttachment.name,
|
|
558
608
|
target: "_parent",
|
|
559
609
|
hasReload: true,
|
|
560
610
|
download: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { THEME_APPEARANCE_LIGHT, THEME_COLOR_BLUE } from "../utils/constants";
|
|
2
|
-
import { DUMMY_ARRAY } from '@zohodesk/utils';
|
|
2
|
+
import { DUMMY_ARRAY } from '@zohodesk/utils/es/constantProps/constant';
|
|
3
3
|
export const defaultProps = {
|
|
4
4
|
themeAppearance: THEME_APPEARANCE_LIGHT,
|
|
5
5
|
themeColor: THEME_COLOR_BLUE,
|
package/es/Link/Link.js
CHANGED
|
@@ -61,7 +61,8 @@ export default class Link extends React.Component {
|
|
|
61
61
|
rel,
|
|
62
62
|
dataId,
|
|
63
63
|
customProps,
|
|
64
|
-
ariaLabel
|
|
64
|
+
ariaLabel,
|
|
65
|
+
downloadName
|
|
65
66
|
} = this.props;
|
|
66
67
|
let {
|
|
67
68
|
isLink,
|
|
@@ -71,10 +72,10 @@ export default class Link extends React.Component {
|
|
|
71
72
|
let option = {};
|
|
72
73
|
|
|
73
74
|
if (download) {
|
|
74
|
-
option.download = true;
|
|
75
|
+
option.download = downloadName || true;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
let ignoreKeys = ['children', 'href', 'target', 'urlData', 'urlName', 'className', 'title', 'download', 'rel', 'dataId', 'hasReload', 'customProps', 'option', 'ariaLabel'];
|
|
78
|
+
let ignoreKeys = ['children', 'href', 'target', 'urlData', 'urlName', 'className', 'title', 'download', 'downloadName', 'rel', 'dataId', 'hasReload', 'customProps', 'option', 'ariaLabel'];
|
|
78
79
|
let others = Object.keys(this.props).filter(key => ignoreKeys.indexOf(key) == -1).reduce((res, key) => {
|
|
79
80
|
res[key] = this.props[key];
|
|
80
81
|
return res;
|
|
@@ -40,6 +40,4 @@
|
|
|
40
40
|
--zd_bs_onboarding_close_icon: var(--zd_bs_contrast_outline, 0px 2px 15px var(--zd-shadow-saturation, rgba(0, 0, 0, 0.09)));
|
|
41
41
|
--zd_bs_onboarding_gradient: var(--zd_bs_contrast_outline, 0px 20px 30px 0px var(--zdt_onboarding_bg_box_shadow));
|
|
42
42
|
--zd_bs_onboarding_primary_button: var(--zd_bs_contrast_outline, 0px 4px 20px 0px var(--zdt_onboarding_primary_button_shadow));
|
|
43
|
-
/* status dropdown */
|
|
44
|
-
--zd_bs_statusdropdown_wrapper_container: var(--zd_bs_contrast_outline, 3px 3px 26px 0 var(--zdt_texteditor_menu_after_box_shadow));
|
|
45
43
|
}
|
|
@@ -97,8 +97,7 @@ export default class SelectField extends PureComponent {
|
|
|
97
97
|
onFocus,
|
|
98
98
|
iconOnHover,
|
|
99
99
|
customProps,
|
|
100
|
-
renderLabelProps
|
|
101
|
-
renderSuggestedStatus
|
|
100
|
+
renderLabelProps
|
|
102
101
|
} = this.props;
|
|
103
102
|
const {
|
|
104
103
|
LabelProps = {},
|
|
@@ -168,8 +167,7 @@ export default class SelectField extends PureComponent {
|
|
|
168
167
|
iconOnHover: iconOnHover,
|
|
169
168
|
title: title
|
|
170
169
|
}, SelectProps, {
|
|
171
|
-
ariaLabelledby: uniqueId
|
|
172
|
-
renderSuggestedStatus: renderSuggestedStatus
|
|
170
|
+
ariaLabelledby: uniqueId
|
|
173
171
|
}), children ? children : null)), validationMessage && /*#__PURE__*/React.createElement(ValidationMessage, _extends({
|
|
174
172
|
text: validationMessage,
|
|
175
173
|
palette: validationPalette,
|
|
@@ -13,7 +13,6 @@ import StatusListItem from "../StatusListItem/StatusListItem";
|
|
|
13
13
|
import commonStyle from '@zohodesk/components/es/common/common.module.css';
|
|
14
14
|
import ResponsiveDropBox from '@zohodesk/components/es/ResponsiveDropBox/ResponsiveDropBox';
|
|
15
15
|
import { ResponsiveReceiver } from '@zohodesk/components/es/Responsive/CustomResponsive';
|
|
16
|
-
import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
17
16
|
import { getUniqueId } from '@zohodesk/components/es/Provider/IdProvider';
|
|
18
17
|
import btnStyle from '@zohodesk/components/es/semantic/Button/semanticButton.module.css';
|
|
19
18
|
import style from "./StatusDropdown.module.css";
|
|
@@ -31,11 +30,6 @@ export class StatusDropdown extends React.Component {
|
|
|
31
30
|
this.searchList = this.searchList.bind(this);
|
|
32
31
|
this.handleScroll = this.handleScroll.bind(this);
|
|
33
32
|
this.emptySearchSVG = this.emptySearchSVG.bind(this);
|
|
34
|
-
this.getSearchA11y = this.getSearchA11y.bind(this);
|
|
35
|
-
this.getHeadingA11y = this.getHeadingA11y.bind(this);
|
|
36
|
-
this.getListItemA11y = this.getListItemA11y.bind(this);
|
|
37
|
-
this.getTextBoxIconCustomProps = this.getTextBoxIconCustomProps.bind(this);
|
|
38
|
-
this.handleListItemClick = this.handleListItemClick.bind(this);
|
|
39
33
|
this.getAriaId = getUniqueId(this);
|
|
40
34
|
}
|
|
41
35
|
|
|
@@ -130,44 +124,6 @@ export class StatusDropdown extends React.Component {
|
|
|
130
124
|
};
|
|
131
125
|
}
|
|
132
126
|
|
|
133
|
-
getSearchA11y() {
|
|
134
|
-
return {
|
|
135
|
-
ariaHaspopup: this.props.isSearch ? 'listbox' : 'menu',
|
|
136
|
-
ariaExpanded: this.props.isPopupReady,
|
|
137
|
-
role: 'combobox',
|
|
138
|
-
ariaActivedescendant: this.props.isPopupReady ? this.props.value : '',
|
|
139
|
-
ariaOwns: this.getAriaId()
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
getHeadingA11y() {
|
|
144
|
-
return {
|
|
145
|
-
role: 'heading'
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
getListItemA11y(isActive, listItemText) {
|
|
150
|
-
return {
|
|
151
|
-
role: this.props.isSearch ? 'option' : 'menuitem',
|
|
152
|
-
ariaSelected: isActive,
|
|
153
|
-
ariaLabel: listItemText
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
getTextBoxIconCustomProps() {
|
|
158
|
-
return {
|
|
159
|
-
TextBoxProps: {
|
|
160
|
-
'data-a11y-autofocus': true
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
handleListItemClick(item) {
|
|
166
|
-
return e => {
|
|
167
|
-
this.onSelect(item, e);
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
|
|
171
127
|
render() {
|
|
172
128
|
let {
|
|
173
129
|
options
|
|
@@ -223,12 +179,10 @@ export class StatusDropdown extends React.Component {
|
|
|
223
179
|
renderTargetElement,
|
|
224
180
|
renderFooterElement,
|
|
225
181
|
a11y = {},
|
|
226
|
-
customClass
|
|
227
|
-
renderSuggestedStatus
|
|
182
|
+
customClass
|
|
228
183
|
} = this.props;
|
|
229
184
|
const {
|
|
230
|
-
dropBoxClass = ''
|
|
231
|
-
suggestedStatusWrapper = ''
|
|
185
|
+
dropBoxClass = ''
|
|
232
186
|
} = customClass;
|
|
233
187
|
const {
|
|
234
188
|
tabIndex = 0,
|
|
@@ -241,9 +195,6 @@ export class StatusDropdown extends React.Component {
|
|
|
241
195
|
} = this.state;
|
|
242
196
|
let containerClass = `${className ? className : ''} ${isPopupReady ? activeStyle ? activeStyle : '' : showIconOnHover ? style.hoverIcon : ''} ${isDisabled ? commonStyle.disabled : isReadOnly ? style.readOnly : !isEditable ? style.cursorDefault : !showOnHover ? `${style.cursor} ${hoverStyle ? hoverStyle : ''}` : `${hoverStyle ? hoverStyle : ''} ${style.cursorDefault}`}`;
|
|
243
197
|
let ariaTitleId = this.getAriaId();
|
|
244
|
-
let textBoxA11y = this.getSearchA11y();
|
|
245
|
-
let headingA11y = this.getHeadingA11y();
|
|
246
|
-
let textBoxIconCustomProps = this.getTextBoxIconCustomProps();
|
|
247
198
|
return /*#__PURE__*/React.createElement("div", {
|
|
248
199
|
className: style.posRel,
|
|
249
200
|
onMouseEnter: showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : undefined,
|
|
@@ -300,8 +251,8 @@ export class StatusDropdown extends React.Component {
|
|
|
300
251
|
isAnimate: true,
|
|
301
252
|
getRef: getContainerRef,
|
|
302
253
|
customClass: {
|
|
303
|
-
customDropBoxWrap:
|
|
304
|
-
customDropBox:
|
|
254
|
+
customDropBoxWrap: style.dropBoxContainer,
|
|
255
|
+
customDropBox: dropBoxClass
|
|
305
256
|
},
|
|
306
257
|
needResponsive: needResponsive,
|
|
307
258
|
isResponsivePadding: true,
|
|
@@ -319,74 +270,81 @@ export class StatusDropdown extends React.Component {
|
|
|
319
270
|
isFetchingOptions: isFetchingOptions
|
|
320
271
|
}
|
|
321
272
|
}
|
|
322
|
-
}, ((
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
273
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
|
|
274
|
+
className: style.search
|
|
275
|
+
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
276
|
+
placeHolder: placeHolderText,
|
|
277
|
+
onChange: this.handleChange,
|
|
278
|
+
value: searchString,
|
|
279
|
+
onClear: this.onSearchClear,
|
|
280
|
+
size: searchBoxSize,
|
|
281
|
+
customProps: {
|
|
282
|
+
TextBoxProps: {
|
|
283
|
+
'data-a11y-autofocus': true
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
a11y: {
|
|
287
|
+
ariaHaspopup: isSearch ? 'listbox' : 'menu',
|
|
288
|
+
ariaExpanded: isPopupReady,
|
|
289
|
+
role: 'combobox',
|
|
290
|
+
ariaActivedescendant: isPopupReady ? value : '',
|
|
291
|
+
ariaOwns: ariaTitleId
|
|
292
|
+
},
|
|
293
|
+
dataId: `${dataId}_search`
|
|
294
|
+
})) : null, title && options.length != 0 && /*#__PURE__*/React.createElement(Box, {
|
|
295
|
+
className: style.title
|
|
296
|
+
}, /*#__PURE__*/React.createElement(DropDownHeading, {
|
|
297
|
+
htmlId: ariaTitleId,
|
|
298
|
+
text: title,
|
|
299
|
+
a11y: {
|
|
300
|
+
role: 'heading'
|
|
301
|
+
}
|
|
302
|
+
})), /*#__PURE__*/React.createElement(Box, {
|
|
303
|
+
scroll: "vertical",
|
|
304
|
+
flexible: true,
|
|
305
|
+
shrink: true,
|
|
306
|
+
dataId: `${dataId}_list`,
|
|
307
|
+
preventParentScroll: "vertical",
|
|
308
|
+
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
|
|
309
|
+
onScroll: this.handleScroll,
|
|
310
|
+
role: isSearch ? 'listbox' : 'menu',
|
|
311
|
+
tabindex: "-1",
|
|
312
|
+
isScrollAttribute: true
|
|
313
|
+
}, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => {
|
|
314
|
+
const listItemText = item[keyName];
|
|
315
|
+
const isActive = value === listItemText;
|
|
316
|
+
return /*#__PURE__*/React.createElement(StatusListItem, {
|
|
317
|
+
key: i,
|
|
318
|
+
dataId: `dataid_${i}`,
|
|
319
|
+
value: listItemText,
|
|
320
|
+
id: item[idName],
|
|
321
|
+
active: isActive,
|
|
322
|
+
onClick: this.onSelect.bind(this, item),
|
|
323
|
+
index: i,
|
|
324
|
+
needTick: needTick,
|
|
325
|
+
needBorder: false,
|
|
326
|
+
bulletColor: item[statusColor],
|
|
327
|
+
title: listItemText,
|
|
328
|
+
needMultiLineText: needMultiLineText,
|
|
329
|
+
autoHover: true,
|
|
330
|
+
a11y: {
|
|
331
|
+
role: isSearch ? 'option' : 'menuitem',
|
|
332
|
+
ariaSelected: isActive,
|
|
333
|
+
ariaLabel: listItemText
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
337
|
+
isCover: false,
|
|
338
|
+
align: "both"
|
|
339
|
+
}, /*#__PURE__*/React.createElement(Loader, null))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
|
|
340
|
+
className: style.svgWrapper,
|
|
341
|
+
title: searchErrorText || 'No results',
|
|
342
|
+
description: searchEmptyHint,
|
|
343
|
+
size: "small",
|
|
344
|
+
getEmptyState: this.emptySearchSVG
|
|
345
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
346
|
+
className: style.loader
|
|
347
|
+
}, /*#__PURE__*/React.createElement(Loader, null))), renderFooterElement ? renderFooterElement : null));
|
|
390
348
|
}) : null);
|
|
391
349
|
}
|
|
392
350
|
|
|
@@ -1,130 +1,83 @@
|
|
|
1
1
|
.container {
|
|
2
2
|
max-width: 100% ;
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
.dropBoxListContainer {
|
|
6
|
-
border-radius: 7px;
|
|
7
|
-
padding: var(--zd_size10) ;
|
|
8
|
-
border: 1px solid var(--zdt_statusdropdown_wrapper_container_border);
|
|
9
|
-
background: var(--zdt_statusdropdown_wrapper_container_bg);
|
|
10
|
-
box-shadow: var(--zd_bs_statusdropdown_wrapper_container);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.dropdownOptions {
|
|
14
|
-
padding-inline: var(--zd_size1) ;
|
|
15
|
-
padding-block: var(--zd_size1) ;
|
|
16
|
-
background-color: var(--zdt_commentList_normal_bg);
|
|
17
|
-
border: 1px solid var(--zdt_statusdropdown_wrapper_container_border);
|
|
18
|
-
border-radius: 7px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
4
|
.posRel {
|
|
22
5
|
position: relative;
|
|
23
6
|
}
|
|
24
|
-
|
|
25
7
|
.maxHgt {
|
|
26
8
|
max-height: var(--zd_size265) ;
|
|
27
9
|
padding-block: var(--zd_size10) ;
|
|
28
|
-
padding-inline:
|
|
10
|
+
padding-inline:0 ;
|
|
29
11
|
}
|
|
30
|
-
|
|
31
|
-
.responsivemaxHgt {
|
|
12
|
+
.responsivemaxHgt{
|
|
32
13
|
padding-block: var(--zd_size10) 0 ;
|
|
33
|
-
padding-inline:
|
|
14
|
+
padding-inline:0 ;
|
|
34
15
|
}
|
|
35
|
-
|
|
36
16
|
.title {
|
|
37
17
|
padding-block-start: var(--zd_size6) ;
|
|
38
18
|
}
|
|
39
|
-
|
|
40
19
|
.default_arrow,
|
|
41
20
|
.overlay_arrow {
|
|
42
21
|
padding-inline: var(--zd_size5) 0 ;
|
|
43
|
-
padding-block:
|
|
22
|
+
padding-block:0 ;
|
|
44
23
|
}
|
|
45
|
-
|
|
46
24
|
.overlay_arrow {
|
|
47
25
|
position: absolute;
|
|
48
26
|
top: 50% ;
|
|
49
27
|
transform: translateY(-50%) perspective(1px);
|
|
50
28
|
}
|
|
51
|
-
|
|
52
29
|
[dir=ltr] .overlay_arrow {
|
|
53
30
|
left: 100% ;
|
|
54
31
|
}
|
|
55
|
-
|
|
56
32
|
[dir=rtl] .overlay_arrow {
|
|
57
33
|
right: 100% ;
|
|
58
34
|
}
|
|
59
|
-
|
|
60
35
|
.hoverIcon .arrow {
|
|
61
36
|
opacity: 0;
|
|
62
37
|
visibility: hidden;
|
|
63
38
|
}
|
|
64
|
-
|
|
65
39
|
.hoverIcon:hover .arrow {
|
|
66
40
|
opacity: 1;
|
|
67
41
|
visibility: visible;
|
|
68
42
|
}
|
|
69
|
-
|
|
70
43
|
.value {
|
|
71
44
|
composes: dotted from '~@zohodesk/components/es/common/common.module.css';
|
|
72
45
|
}
|
|
73
|
-
|
|
74
46
|
.search {
|
|
75
47
|
padding-block: var(--zd_size6) 0 ;
|
|
76
|
-
padding-inline:
|
|
48
|
+
padding-inline:var(--zd_size20) ;
|
|
77
49
|
}
|
|
78
|
-
|
|
79
50
|
.svgWrapper {
|
|
80
51
|
padding-block-end: var(--zd_size25) ;
|
|
81
52
|
}
|
|
82
|
-
|
|
83
53
|
.readOnly {
|
|
84
54
|
cursor: no-drop;
|
|
85
55
|
}
|
|
86
|
-
|
|
87
56
|
.cursorDefault {
|
|
88
57
|
cursor: default;
|
|
89
58
|
}
|
|
90
|
-
|
|
91
59
|
.cursor {
|
|
92
60
|
cursor: pointer;
|
|
93
61
|
}
|
|
94
|
-
|
|
95
62
|
[dir=ltr] .dropBoxContainer {
|
|
96
63
|
text-align: left;
|
|
97
64
|
}
|
|
98
|
-
|
|
99
65
|
[dir=rtl] .dropBoxContainer {
|
|
100
66
|
text-align: right;
|
|
101
67
|
}
|
|
102
|
-
|
|
103
68
|
.iconBox {
|
|
104
69
|
margin-inline-end: var(--zd_size4) ;
|
|
105
70
|
}
|
|
106
|
-
|
|
107
|
-
.iconBox>i {
|
|
71
|
+
.iconBox > i {
|
|
108
72
|
display: block;
|
|
109
73
|
}
|
|
110
|
-
|
|
111
74
|
.loader {
|
|
112
75
|
width: var(--zd_size40) ;
|
|
113
76
|
margin: 0 auto ;
|
|
114
77
|
}
|
|
115
|
-
|
|
116
78
|
.seperatedLine {
|
|
117
79
|
height: var(--zd_size1) ;
|
|
118
80
|
margin-block: var(--zd_size9) var(--zd_size10) ;
|
|
119
|
-
margin-inline:
|
|
81
|
+
margin-inline:0 ;
|
|
120
82
|
border-bottom: 1px solid var(--zdt_statusdropdown_line_border);
|
|
121
83
|
}
|
|
122
|
-
|
|
123
|
-
.suggestedStatusContainer {
|
|
124
|
-
margin-block-end: var(--zd_size6) ;
|
|
125
|
-
margin-inline: var(--zd_size1) ;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.dropBoxWithSuggestedStatus {
|
|
129
|
-
border-radius: 7px;
|
|
130
|
-
}
|