@zohodesk/dot 1.0.0-temp-75 → 1.0.0-temp-78
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 +15 -0
- package/assets/Appearance/dark/mode/dotDarkMode.module.css +2 -0
- package/assets/Appearance/default/mode/dotDefaultMode.module.css +2 -0
- package/assets/Appearance/pureDark/mode/dotPureDarkMode.module.css +8 -6
- package/es/FreezeLayer/FreezeLayer.js +3 -6
- package/es/ImportantNotes/ImportantNotes.js +5 -3
- package/es/{utils → deprecated/utils}/KeyboardApi.js +0 -0
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +23 -11
- package/es/list/GridStencils/GridStencils.module.css +3 -1
- package/es/lookup/header/ModuleHeader/ModuleHeader.js +8 -3
- package/es/lookup/header/TicketHeader/TicketHeader.js +7 -4
- package/es/lookup/header/lookupHeaderCommon.module.css +8 -2
- package/lib/FreezeLayer/FreezeLayer.js +2 -4
- package/lib/ImportantNotes/ImportantNotes.js +5 -3
- package/lib/{utils → deprecated/utils}/KeyboardApi.js +0 -0
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +22 -11
- package/lib/list/GridStencils/GridStencils.module.css +3 -1
- package/lib/lookup/header/ModuleHeader/ModuleHeader.js +8 -3
- package/lib/lookup/header/TicketHeader/TicketHeader.js +7 -4
- package/lib/lookup/header/lookupHeaderCommon.module.css +8 -2
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.0.0-beta.224
|
|
6
|
+
|
|
7
|
+
- className prop added in ImportantNotes
|
|
8
|
+
- palette prop added in ModuleHeader
|
|
9
|
+
- palette prop added in TicketHeader
|
|
10
|
+
|
|
11
|
+
# 1.0.0-beta.223
|
|
12
|
+
|
|
13
|
+
- TagMultiSelect id, onSelectTag prop added.
|
|
14
|
+
- GridStencils UI fix.
|
|
15
|
+
|
|
16
|
+
# 1.0.0-beta.222
|
|
17
|
+
|
|
18
|
+
- TagMultiSelect Keyboard Shortcut Issue Fixed
|
|
19
|
+
|
|
5
20
|
# 1.0.0-beta.221
|
|
6
21
|
|
|
7
22
|
- editor fontsize prop added
|
|
@@ -282,7 +282,9 @@
|
|
|
282
282
|
|
|
283
283
|
/* lookup header common */
|
|
284
284
|
--zdt_lookupheader_default_bg: var(--zdt_cta_grey_10_bg);
|
|
285
|
+
--zdt_lookupheader_white_bg: var(--dot_ebonyclay);
|
|
285
286
|
--zdt_lookupheader_default_border: var(--zdt_cta_grey_35_border);
|
|
287
|
+
--zdt_lookupheader_white_border: var(--dot_brightgrey);
|
|
286
288
|
--zdt_lookupheader_para_text: var(--dot_cadetblue);
|
|
287
289
|
--zdt_lookupheader_input_border: var(--zd_smoke33);
|
|
288
290
|
|
|
@@ -282,7 +282,9 @@
|
|
|
282
282
|
|
|
283
283
|
/* lookup header common */
|
|
284
284
|
--zdt_lookupheader_default_bg: var(--zdt_cta_grey_10_bg);
|
|
285
|
+
--zdt_lookupheader_white_bg: var(--dot_white);
|
|
285
286
|
--zdt_lookupheader_default_border: var(--zdt_cta_grey_35_border);
|
|
287
|
+
--zdt_lookupheader_white_border: var(--zdt_cta_grey_15_border);
|
|
286
288
|
--zdt_lookupheader_para_text: var(--dot_shuttleGrey);
|
|
287
289
|
--zdt_lookupheader_input_border: var(--zd_smoke33);
|
|
288
290
|
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
--zdt_drawer_default_box_shadow: rgba(0, 0, 0, 0.4);
|
|
104
104
|
--zdt_drawer_default_bg: #212121;
|
|
105
105
|
--zdt_drawer_header_bg: var(--zdt_cta_grey_10_bg);
|
|
106
|
-
--zdt_drawer_header_border:
|
|
106
|
+
--zdt_drawer_header_border: #161515;
|
|
107
107
|
--zdt_drawer_title_text: var(--dot_platinum);
|
|
108
108
|
|
|
109
109
|
/* toggle dropdown */
|
|
@@ -149,13 +149,13 @@
|
|
|
149
149
|
|
|
150
150
|
/* form action */
|
|
151
151
|
--zdt_formAction_bg: #2b2b2b;
|
|
152
|
-
--zdt_formAction_border: #
|
|
152
|
+
--zdt_formAction_border: #161515;
|
|
153
153
|
|
|
154
154
|
/* freezelayer */
|
|
155
|
-
--zdt_freezelayer_default_bg: rgba(0, 0, 0, 0.
|
|
156
|
-
--zdt_freezelayer_dark_bg: rgba(0, 0, 0, 0.
|
|
155
|
+
--zdt_freezelayer_default_bg: rgba(0, 0, 0, 0.5);
|
|
156
|
+
--zdt_freezelayer_dark_bg: rgba(0, 0, 0, 0.5);
|
|
157
157
|
--zdt_freezelayer_plain_bg: var(--dot_mirror);
|
|
158
|
-
--zdt_freezelayer_snow_bg: rgba(
|
|
158
|
+
--zdt_freezelayer_snow_bg: rgba(0, 0, 0, 0.5);
|
|
159
159
|
|
|
160
160
|
/* icon button */
|
|
161
161
|
--zdt_iconButton_icon_black: var(--dot_platinum);
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
--zdt_statuslistitem_list_text: var(--dot_platinum);
|
|
250
250
|
--zdt_statuslistitem_default_border: var(--dot_mirror);
|
|
251
251
|
--zdt_statuslistitem_default_active_border: var(--zdt_cta_primary_border);
|
|
252
|
-
--zdt_statuslistitem_default_effect_bg:
|
|
252
|
+
--zdt_statuslistitem_default_effect_bg: #262626;
|
|
253
253
|
--zdt_statuslistitem_primary_efffect_bg: var(--dot_listItemActive);
|
|
254
254
|
--zdt_statuslistitem_secondary_effect_bg: var(--zdt_cta_primary_bg);
|
|
255
255
|
--zdt_statuslistitem_secondary_effect_text: #212121;
|
|
@@ -282,7 +282,9 @@
|
|
|
282
282
|
|
|
283
283
|
/* lookup header common */
|
|
284
284
|
--zdt_lookupheader_default_bg: var(--zdt_cta_grey_10_bg);
|
|
285
|
+
--zdt_lookupheader_white_bg: #212121;
|
|
285
286
|
--zdt_lookupheader_default_border: var(--zdt_cta_grey_35_border);
|
|
287
|
+
--zdt_lookupheader_white_border: var(--dot_brightgrey);
|
|
286
288
|
--zdt_lookupheader_para_text: var(--dot_cadetblue);
|
|
287
289
|
--zdt_lookupheader_input_border: var(--zd_smoke33);
|
|
288
290
|
|
|
@@ -2,8 +2,7 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Container } from '@zohodesk/components/lib/Layout';
|
|
4
4
|
import VelocityAnimationGroup from '@zohodesk/components/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup';
|
|
5
|
-
import style from './FreezeLayer.module.css';
|
|
6
|
-
|
|
5
|
+
import style from './FreezeLayer.module.css';
|
|
7
6
|
import { getZIndex } from '@zohodesk/components/lib/Provider/ZindexProvider';
|
|
8
7
|
import { getDotLibraryConfig } from '../Provider/Config';
|
|
9
8
|
export default class FreezeLayer extends Component {
|
|
@@ -53,8 +52,7 @@ export default class FreezeLayer extends Component {
|
|
|
53
52
|
|
|
54
53
|
if (isActive != prevProps.isActive) {
|
|
55
54
|
if (isActive) {
|
|
56
|
-
this.enableFreeze();
|
|
57
|
-
|
|
55
|
+
this.enableFreeze();
|
|
58
56
|
this.setState({
|
|
59
57
|
isActive: true
|
|
60
58
|
}, () => {
|
|
@@ -63,8 +61,7 @@ export default class FreezeLayer extends Component {
|
|
|
63
61
|
});
|
|
64
62
|
});
|
|
65
63
|
} else {
|
|
66
|
-
this.disableFreeze();
|
|
67
|
-
|
|
64
|
+
this.disableFreeze();
|
|
68
65
|
this.setState({
|
|
69
66
|
isChildActive: false
|
|
70
67
|
}, () => {
|
|
@@ -15,14 +15,15 @@ export default class ImportantNotes extends React.Component {
|
|
|
15
15
|
iconSize,
|
|
16
16
|
children,
|
|
17
17
|
iconClass,
|
|
18
|
-
isCover
|
|
18
|
+
isCover,
|
|
19
|
+
className
|
|
19
20
|
} = this.props;
|
|
20
21
|
return /*#__PURE__*/React.createElement(Container, {
|
|
21
22
|
isInline: !isCover,
|
|
22
23
|
isCover: false,
|
|
23
24
|
alignBox: "row",
|
|
24
25
|
align: "top",
|
|
25
|
-
className: style.section
|
|
26
|
+
className: `${style.section} ${className || ''}`
|
|
26
27
|
}, iconName ? /*#__PURE__*/React.createElement(Box, {
|
|
27
28
|
className: style.icon,
|
|
28
29
|
align: "start"
|
|
@@ -43,7 +44,8 @@ ImportantNotes.propTypes = {
|
|
|
43
44
|
iconName: PropTypes.string,
|
|
44
45
|
iconSize: PropTypes.string,
|
|
45
46
|
isCover: PropTypes.bool,
|
|
46
|
-
text: PropTypes.string
|
|
47
|
+
text: PropTypes.string,
|
|
48
|
+
className: PropTypes.string
|
|
47
49
|
};
|
|
48
50
|
ImportantNotes.defaultProps = {
|
|
49
51
|
iconName: 'ZD-helpCentre',
|
|
File without changes
|
|
@@ -18,12 +18,20 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
18
18
|
this.state = {
|
|
19
19
|
showAll: false
|
|
20
20
|
};
|
|
21
|
-
this.textBoxRef = /*#__PURE__*/React.createRef();
|
|
22
21
|
this.emptySearchSVG = this.emptySearchSVG.bind(this);
|
|
23
22
|
this.onShowAllClick = this.onShowAllClick.bind(this);
|
|
24
23
|
this.getContainerRef = this.getContainerRef.bind(this);
|
|
25
24
|
this.onScroll = this.onScroll.bind(this);
|
|
26
25
|
this.getSelectedItemRef = this.getSelectedItemRef.bind(this);
|
|
26
|
+
this.textInputRef = this.textInputRef.bind(this);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
textInputRef(el) {
|
|
30
|
+
const {
|
|
31
|
+
getTextInputRef
|
|
32
|
+
} = this.props;
|
|
33
|
+
this.inputEl = el;
|
|
34
|
+
getTextInputRef && getTextInputRef(el);
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
onScroll() {
|
|
@@ -58,10 +66,8 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
58
66
|
|
|
59
67
|
if (prevProps.isTagListLoading !== isTagListLoading && !isTagListLoading || isPopupReady && prevProps.tagsList.length !== tagsList.length) {
|
|
60
68
|
setTimeout(() => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (textBoxElementRef && typeof textBoxElementRef.handleFocus === 'function') {
|
|
64
|
-
this.textBoxRef.current.handleFocus();
|
|
69
|
+
if (this.inputEl) {
|
|
70
|
+
this.inputEl.focus();
|
|
65
71
|
}
|
|
66
72
|
}, 300);
|
|
67
73
|
}
|
|
@@ -118,7 +124,8 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
118
124
|
borderColor,
|
|
119
125
|
getTextBoxChildren,
|
|
120
126
|
htmlId,
|
|
121
|
-
boxSize
|
|
127
|
+
boxSize,
|
|
128
|
+
onSelectTag
|
|
122
129
|
} = this.props;
|
|
123
130
|
let {
|
|
124
131
|
showAll
|
|
@@ -140,17 +147,20 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
140
147
|
}, tagsList.length ? /*#__PURE__*/React.createElement(React.Fragment, null, tagsList.map((tag, index) => {
|
|
141
148
|
let {
|
|
142
149
|
name,
|
|
143
|
-
tagType
|
|
150
|
+
tagType,
|
|
151
|
+
id
|
|
144
152
|
} = tag;
|
|
145
153
|
return index < chipLimit ? /*#__PURE__*/React.createElement(Box, {
|
|
146
154
|
className: style.tag,
|
|
147
155
|
key: index
|
|
148
156
|
}, /*#__PURE__*/React.createElement(Tag, {
|
|
157
|
+
id: id,
|
|
149
158
|
text: name,
|
|
150
159
|
onRemove: isReadOnly ? null : deleteTag.bind(this, name),
|
|
151
160
|
closeTitle: i18nKeys.deleteText,
|
|
152
161
|
palette: tagType === 'SYSTEM' ? 'primary' : 'default',
|
|
153
|
-
isReadOnly: isReadOnly
|
|
162
|
+
isReadOnly: isReadOnly,
|
|
163
|
+
onSelectTag: onSelectTag ? onSelectTag : undefined
|
|
154
164
|
})) : null;
|
|
155
165
|
}), tagsList.length > chipNeedToShow && !isPopupReady ? /*#__PURE__*/React.createElement(Box, {
|
|
156
166
|
className: style.moreLess,
|
|
@@ -171,7 +181,6 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
171
181
|
onChange: handleChange,
|
|
172
182
|
maxLength: 50,
|
|
173
183
|
isReadOnly: isReadOnly,
|
|
174
|
-
ref: this.textBoxRef,
|
|
175
184
|
needBorder: false,
|
|
176
185
|
placeHolder: tagsList.length ? '' : i18nKeys.placeholderText || '-',
|
|
177
186
|
onClick: !isReadOnly ? handleTogglePopup : undefined,
|
|
@@ -179,7 +188,8 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
179
188
|
customTBoxWrap: style.custmInp,
|
|
180
189
|
customTextBox: style.input
|
|
181
190
|
},
|
|
182
|
-
size: "xsmall"
|
|
191
|
+
size: "xsmall",
|
|
192
|
+
inputRef: this.textInputRef
|
|
183
193
|
}, getTextBoxChildren ? getTextBoxChildren() : null))), isPopupOpen ? /*#__PURE__*/React.createElement(DropBox, {
|
|
184
194
|
isAnimate: true,
|
|
185
195
|
isActive: isPopupReady,
|
|
@@ -251,6 +261,7 @@ TagsMultiSelect.propTypes = {
|
|
|
251
261
|
deleteTag: PropTypes.func,
|
|
252
262
|
getContainerRef: PropTypes.func,
|
|
253
263
|
getTargetRef: PropTypes.func,
|
|
264
|
+
getTextInputRef: PropTypes.func,
|
|
254
265
|
handleChange: PropTypes.func,
|
|
255
266
|
handleKeyUp: PropTypes.func,
|
|
256
267
|
handleTogglePopup: PropTypes.func,
|
|
@@ -281,7 +292,8 @@ TagsMultiSelect.propTypes = {
|
|
|
281
292
|
needBorder: PropTypes.bool,
|
|
282
293
|
getTextBoxChildren: PropTypes.func,
|
|
283
294
|
htmlId: PropTypes.string,
|
|
284
|
-
boxSize: PropTypes.string
|
|
295
|
+
boxSize: PropTypes.string,
|
|
296
|
+
onSelectTag: PropTypes.func
|
|
285
297
|
};
|
|
286
298
|
TagsMultiSelect.defaultProps = {
|
|
287
299
|
className: '',
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
.stenLoading {
|
|
2
2
|
position: relative;
|
|
3
|
+
width: var(--zd_size265);
|
|
3
4
|
background-color: var(--zdt_gridstencils_default_bg);
|
|
4
5
|
border-bottom: 1px solid var(--zdt_gridstencils_default_border);
|
|
5
6
|
padding: var(--zd_size13) var(--zd_size20) var(--zd_size11);
|
|
6
|
-
margin
|
|
7
|
+
margin: 0 auto var(--zd_size10) auto;
|
|
8
|
+
border-radius: var(--zd_size5);
|
|
7
9
|
}
|
|
8
10
|
[dir=ltr] .stenLoadbody {
|
|
9
11
|
margin: var(--zd_size8) var(--zd_size20) var(--zd_size8) 0;
|
|
@@ -28,12 +28,13 @@ export default class ModuleHeader extends PureComponent {
|
|
|
28
28
|
miniDescription,
|
|
29
29
|
dataId,
|
|
30
30
|
closeTitle,
|
|
31
|
-
onSearchKeyDown
|
|
31
|
+
onSearchKeyDown,
|
|
32
|
+
palette
|
|
32
33
|
} = this.props;
|
|
33
34
|
return /*#__PURE__*/React.createElement(Container, {
|
|
34
35
|
align: "vertical",
|
|
35
36
|
alignBox: "row",
|
|
36
|
-
className: `${commonStyle.container}`,
|
|
37
|
+
className: `${commonStyle.container} ${commonStyle[`${palette}`]}`,
|
|
37
38
|
isCover: false,
|
|
38
39
|
wrap: "wrap",
|
|
39
40
|
dataId: dataId
|
|
@@ -79,7 +80,11 @@ ModuleHeader.propTypes = {
|
|
|
79
80
|
title: PropTypes.string,
|
|
80
81
|
dataId: PropTypes.string,
|
|
81
82
|
closeTitle: PropTypes.string,
|
|
82
|
-
onSearchKeyDown: PropTypes.func
|
|
83
|
+
onSearchKeyDown: PropTypes.func,
|
|
84
|
+
palette: PropTypes.oneOf(['default', 'white'])
|
|
85
|
+
};
|
|
86
|
+
ModuleHeader.defaultProps = {
|
|
87
|
+
palette: 'default'
|
|
83
88
|
};
|
|
84
89
|
|
|
85
90
|
if (false) {
|
|
@@ -31,7 +31,8 @@ export default class TicketHeader extends Component {
|
|
|
31
31
|
needOnTypeSearch,
|
|
32
32
|
getSearchBoxRef,
|
|
33
33
|
needViewsList,
|
|
34
|
-
i18nKeys
|
|
34
|
+
i18nKeys,
|
|
35
|
+
palette
|
|
35
36
|
} = this.props;
|
|
36
37
|
let {
|
|
37
38
|
menuEmptyMessage = 'No matches found'
|
|
@@ -39,7 +40,7 @@ export default class TicketHeader extends Component {
|
|
|
39
40
|
return /*#__PURE__*/React.createElement(Container, {
|
|
40
41
|
align: "vertical",
|
|
41
42
|
alignBox: "row",
|
|
42
|
-
className: `${commonStyle.container} ${commonResponsive.container} ${style.container}`,
|
|
43
|
+
className: `${commonStyle.container} ${commonStyle[`${palette}`]} ${commonResponsive.container} ${style.container}`,
|
|
43
44
|
isCover: false,
|
|
44
45
|
wrap: "wrap"
|
|
45
46
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -103,10 +104,12 @@ TicketHeader.propTypes = {
|
|
|
103
104
|
title: PropTypes.string,
|
|
104
105
|
i18nKeys: PropTypes.shape({
|
|
105
106
|
menuEmptyMessage: PropTypes.string
|
|
106
|
-
})
|
|
107
|
+
}),
|
|
108
|
+
palette: PropTypes.oneOf(['default', 'white'])
|
|
107
109
|
};
|
|
108
110
|
TicketHeader.defaultProps = {
|
|
109
|
-
i18nKeys: {}
|
|
111
|
+
i18nKeys: {},
|
|
112
|
+
palette: 'default'
|
|
110
113
|
};
|
|
111
114
|
|
|
112
115
|
if (false) {
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
.container {
|
|
2
2
|
min-height: var(--zd_size51);
|
|
3
3
|
position: relative;
|
|
4
|
-
background-color: var(--zdt_lookupheader_default_bg);
|
|
5
|
-
border-bottom: solid 1px var(--zdt_lookupheader_default_border);
|
|
6
4
|
}[dir=ltr] .container {
|
|
7
5
|
padding: 0 var(--zd_size52) 0 var(--zd_size10);
|
|
8
6
|
}[dir=rtl] .container {
|
|
9
7
|
padding: 0 var(--zd_size10) 0 var(--zd_size52);
|
|
10
8
|
}
|
|
9
|
+
.default {
|
|
10
|
+
background-color: var(--zdt_lookupheader_default_bg);
|
|
11
|
+
border-bottom: solid 1px var(--zdt_lookupheader_default_border);
|
|
12
|
+
}
|
|
13
|
+
.white {
|
|
14
|
+
background-color: var(--zdt_lookupheader_white_bg);
|
|
15
|
+
border-bottom: solid 1px var(--zdt_lookupheader_white_border);
|
|
16
|
+
}
|
|
11
17
|
.searchContainer, .title {
|
|
12
18
|
margin: 0 var(--zd_size20);
|
|
13
19
|
}
|
|
@@ -106,8 +106,7 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
|
|
|
106
106
|
|
|
107
107
|
if (isActive != prevProps.isActive) {
|
|
108
108
|
if (isActive) {
|
|
109
|
-
this.enableFreeze();
|
|
110
|
-
|
|
109
|
+
this.enableFreeze();
|
|
111
110
|
this.setState({
|
|
112
111
|
isActive: true
|
|
113
112
|
}, function () {
|
|
@@ -116,8 +115,7 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
|
|
|
116
115
|
});
|
|
117
116
|
});
|
|
118
117
|
} else {
|
|
119
|
-
this.disableFreeze();
|
|
120
|
-
|
|
118
|
+
this.disableFreeze();
|
|
121
119
|
this.setState({
|
|
122
120
|
isChildActive: false
|
|
123
121
|
}, function () {
|
|
@@ -59,13 +59,14 @@ var ImportantNotes = /*#__PURE__*/function (_React$Component) {
|
|
|
59
59
|
iconSize = _this$props.iconSize,
|
|
60
60
|
children = _this$props.children,
|
|
61
61
|
iconClass = _this$props.iconClass,
|
|
62
|
-
isCover = _this$props.isCover
|
|
62
|
+
isCover = _this$props.isCover,
|
|
63
|
+
className = _this$props.className;
|
|
63
64
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
64
65
|
isInline: !isCover,
|
|
65
66
|
isCover: false,
|
|
66
67
|
alignBox: "row",
|
|
67
68
|
align: "top",
|
|
68
|
-
className: _ImportantNotesModule["default"].section
|
|
69
|
+
className: "".concat(_ImportantNotesModule["default"].section, " ").concat(className || '')
|
|
69
70
|
}, iconName ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
70
71
|
className: _ImportantNotesModule["default"].icon,
|
|
71
72
|
align: "start"
|
|
@@ -90,7 +91,8 @@ ImportantNotes.propTypes = {
|
|
|
90
91
|
iconName: _propTypes["default"].string,
|
|
91
92
|
iconSize: _propTypes["default"].string,
|
|
92
93
|
isCover: _propTypes["default"].bool,
|
|
93
|
-
text: _propTypes["default"].string
|
|
94
|
+
text: _propTypes["default"].string,
|
|
95
|
+
className: _propTypes["default"].string
|
|
94
96
|
};
|
|
95
97
|
ImportantNotes.defaultProps = {
|
|
96
98
|
iconName: 'ZD-helpCentre',
|
|
File without changes
|
|
@@ -71,16 +71,23 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
71
71
|
_this.state = {
|
|
72
72
|
showAll: false
|
|
73
73
|
};
|
|
74
|
-
_this.textBoxRef = /*#__PURE__*/_react["default"].createRef();
|
|
75
74
|
_this.emptySearchSVG = _this.emptySearchSVG.bind(_assertThisInitialized(_this));
|
|
76
75
|
_this.onShowAllClick = _this.onShowAllClick.bind(_assertThisInitialized(_this));
|
|
77
76
|
_this.getContainerRef = _this.getContainerRef.bind(_assertThisInitialized(_this));
|
|
78
77
|
_this.onScroll = _this.onScroll.bind(_assertThisInitialized(_this));
|
|
79
78
|
_this.getSelectedItemRef = _this.getSelectedItemRef.bind(_assertThisInitialized(_this));
|
|
79
|
+
_this.textInputRef = _this.textInputRef.bind(_assertThisInitialized(_this));
|
|
80
80
|
return _this;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
_createClass(TagsMultiSelect, [{
|
|
84
|
+
key: "textInputRef",
|
|
85
|
+
value: function textInputRef(el) {
|
|
86
|
+
var getTextInputRef = this.props.getTextInputRef;
|
|
87
|
+
this.inputEl = el;
|
|
88
|
+
getTextInputRef && getTextInputRef(el);
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
84
91
|
key: "onScroll",
|
|
85
92
|
value: function onScroll() {
|
|
86
93
|
var _this$props = this.props,
|
|
@@ -114,10 +121,8 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
114
121
|
|
|
115
122
|
if (prevProps.isTagListLoading !== isTagListLoading && !isTagListLoading || isPopupReady && prevProps.tagsList.length !== tagsList.length) {
|
|
116
123
|
setTimeout(function () {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (textBoxElementRef && typeof textBoxElementRef.handleFocus === 'function') {
|
|
120
|
-
_this2.textBoxRef.current.handleFocus();
|
|
124
|
+
if (_this2.inputEl) {
|
|
125
|
+
_this2.inputEl.focus();
|
|
121
126
|
}
|
|
122
127
|
}, 300);
|
|
123
128
|
}
|
|
@@ -178,7 +183,8 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
178
183
|
borderColor = _this$props3.borderColor,
|
|
179
184
|
getTextBoxChildren = _this$props3.getTextBoxChildren,
|
|
180
185
|
htmlId = _this$props3.htmlId,
|
|
181
|
-
boxSize = _this$props3.boxSize
|
|
186
|
+
boxSize = _this$props3.boxSize,
|
|
187
|
+
onSelectTag = _this$props3.onSelectTag;
|
|
182
188
|
var showAll = this.state.showAll;
|
|
183
189
|
var chipLimit = !isPopupReady ? showAll ? tagsList.length : chipNeedToShow : tagsList.length;
|
|
184
190
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -195,16 +201,19 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
195
201
|
scroll: "vertical"
|
|
196
202
|
}, tagsList.length ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, tagsList.map(function (tag, index) {
|
|
197
203
|
var name = tag.name,
|
|
198
|
-
tagType = tag.tagType
|
|
204
|
+
tagType = tag.tagType,
|
|
205
|
+
id = tag.id;
|
|
199
206
|
return index < chipLimit ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
200
207
|
className: _TagsMultiSelectModule["default"].tag,
|
|
201
208
|
key: index
|
|
202
209
|
}, /*#__PURE__*/_react["default"].createElement(_Tag["default"], {
|
|
210
|
+
id: id,
|
|
203
211
|
text: name,
|
|
204
212
|
onRemove: isReadOnly ? null : deleteTag.bind(_this3, name),
|
|
205
213
|
closeTitle: i18nKeys.deleteText,
|
|
206
214
|
palette: tagType === 'SYSTEM' ? 'primary' : 'default',
|
|
207
|
-
isReadOnly: isReadOnly
|
|
215
|
+
isReadOnly: isReadOnly,
|
|
216
|
+
onSelectTag: onSelectTag ? onSelectTag : undefined
|
|
208
217
|
})) : null;
|
|
209
218
|
}), tagsList.length > chipNeedToShow && !isPopupReady ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
210
219
|
className: _TagsMultiSelectModule["default"].moreLess,
|
|
@@ -225,7 +234,6 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
225
234
|
onChange: handleChange,
|
|
226
235
|
maxLength: 50,
|
|
227
236
|
isReadOnly: isReadOnly,
|
|
228
|
-
ref: this.textBoxRef,
|
|
229
237
|
needBorder: false,
|
|
230
238
|
placeHolder: tagsList.length ? '' : i18nKeys.placeholderText || '-',
|
|
231
239
|
onClick: !isReadOnly ? handleTogglePopup : undefined,
|
|
@@ -233,7 +241,8 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
233
241
|
customTBoxWrap: _TagsMultiSelectModule["default"].custmInp,
|
|
234
242
|
customTextBox: _TagsMultiSelectModule["default"].input
|
|
235
243
|
},
|
|
236
|
-
size: "xsmall"
|
|
244
|
+
size: "xsmall",
|
|
245
|
+
inputRef: this.textInputRef
|
|
237
246
|
}, getTextBoxChildren ? getTextBoxChildren() : null))), isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_DropBox["default"], {
|
|
238
247
|
isAnimate: true,
|
|
239
248
|
isActive: isPopupReady,
|
|
@@ -307,6 +316,7 @@ TagsMultiSelect.propTypes = {
|
|
|
307
316
|
deleteTag: _propTypes["default"].func,
|
|
308
317
|
getContainerRef: _propTypes["default"].func,
|
|
309
318
|
getTargetRef: _propTypes["default"].func,
|
|
319
|
+
getTextInputRef: _propTypes["default"].func,
|
|
310
320
|
handleChange: _propTypes["default"].func,
|
|
311
321
|
handleKeyUp: _propTypes["default"].func,
|
|
312
322
|
handleTogglePopup: _propTypes["default"].func,
|
|
@@ -337,7 +347,8 @@ TagsMultiSelect.propTypes = {
|
|
|
337
347
|
needBorder: _propTypes["default"].bool,
|
|
338
348
|
getTextBoxChildren: _propTypes["default"].func,
|
|
339
349
|
htmlId: _propTypes["default"].string,
|
|
340
|
-
boxSize: _propTypes["default"].string
|
|
350
|
+
boxSize: _propTypes["default"].string,
|
|
351
|
+
onSelectTag: _propTypes["default"].func
|
|
341
352
|
};
|
|
342
353
|
TagsMultiSelect.defaultProps = {
|
|
343
354
|
className: '',
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
.stenLoading {
|
|
2
2
|
position: relative;
|
|
3
|
+
width: var(--zd_size265);
|
|
3
4
|
background-color: var(--zdt_gridstencils_default_bg);
|
|
4
5
|
border-bottom: 1px solid var(--zdt_gridstencils_default_border);
|
|
5
6
|
padding: var(--zd_size13) var(--zd_size20) var(--zd_size11);
|
|
6
|
-
margin
|
|
7
|
+
margin: 0 auto var(--zd_size10) auto;
|
|
8
|
+
border-radius: var(--zd_size5);
|
|
7
9
|
}
|
|
8
10
|
[dir=ltr] .stenLoadbody {
|
|
9
11
|
margin: var(--zd_size8) var(--zd_size20) var(--zd_size8) 0;
|
|
@@ -80,11 +80,12 @@ var ModuleHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
80
80
|
miniDescription = _this$props.miniDescription,
|
|
81
81
|
dataId = _this$props.dataId,
|
|
82
82
|
closeTitle = _this$props.closeTitle,
|
|
83
|
-
onSearchKeyDown = _this$props.onSearchKeyDown
|
|
83
|
+
onSearchKeyDown = _this$props.onSearchKeyDown,
|
|
84
|
+
palette = _this$props.palette;
|
|
84
85
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
85
86
|
align: "vertical",
|
|
86
87
|
alignBox: "row",
|
|
87
|
-
className: "".concat(_lookupHeaderCommonModule["default"].container),
|
|
88
|
+
className: "".concat(_lookupHeaderCommonModule["default"].container, " ").concat(_lookupHeaderCommonModule["default"]["".concat(palette)]),
|
|
88
89
|
isCover: false,
|
|
89
90
|
wrap: "wrap",
|
|
90
91
|
dataId: dataId
|
|
@@ -134,7 +135,11 @@ ModuleHeader.propTypes = {
|
|
|
134
135
|
title: _propTypes["default"].string,
|
|
135
136
|
dataId: _propTypes["default"].string,
|
|
136
137
|
closeTitle: _propTypes["default"].string,
|
|
137
|
-
onSearchKeyDown: _propTypes["default"].func
|
|
138
|
+
onSearchKeyDown: _propTypes["default"].func,
|
|
139
|
+
palette: _propTypes["default"].oneOf(['default', 'white'])
|
|
140
|
+
};
|
|
141
|
+
ModuleHeader.defaultProps = {
|
|
142
|
+
palette: 'default'
|
|
138
143
|
};
|
|
139
144
|
|
|
140
145
|
if (false) {
|
|
@@ -82,13 +82,14 @@ var TicketHeader = /*#__PURE__*/function (_Component) {
|
|
|
82
82
|
needOnTypeSearch = _this$props.needOnTypeSearch,
|
|
83
83
|
getSearchBoxRef = _this$props.getSearchBoxRef,
|
|
84
84
|
needViewsList = _this$props.needViewsList,
|
|
85
|
-
i18nKeys = _this$props.i18nKeys
|
|
85
|
+
i18nKeys = _this$props.i18nKeys,
|
|
86
|
+
palette = _this$props.palette;
|
|
86
87
|
var _i18nKeys$menuEmptyMe = i18nKeys.menuEmptyMessage,
|
|
87
88
|
menuEmptyMessage = _i18nKeys$menuEmptyMe === void 0 ? 'No matches found' : _i18nKeys$menuEmptyMe;
|
|
88
89
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
89
90
|
align: "vertical",
|
|
90
91
|
alignBox: "row",
|
|
91
|
-
className: "".concat(_lookupHeaderCommonModule["default"].container, " ").concat(_lookupHeaderCommonResponsiveModule["default"].container, " ").concat(_TicketHeaderModule["default"].container),
|
|
92
|
+
className: "".concat(_lookupHeaderCommonModule["default"].container, " ").concat(_lookupHeaderCommonModule["default"]["".concat(palette)], " ").concat(_lookupHeaderCommonResponsiveModule["default"].container, " ").concat(_TicketHeaderModule["default"].container),
|
|
92
93
|
isCover: false,
|
|
93
94
|
wrap: "wrap"
|
|
94
95
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -156,10 +157,12 @@ TicketHeader.propTypes = {
|
|
|
156
157
|
title: _propTypes["default"].string,
|
|
157
158
|
i18nKeys: _propTypes["default"].shape({
|
|
158
159
|
menuEmptyMessage: _propTypes["default"].string
|
|
159
|
-
})
|
|
160
|
+
}),
|
|
161
|
+
palette: _propTypes["default"].oneOf(['default', 'white'])
|
|
160
162
|
};
|
|
161
163
|
TicketHeader.defaultProps = {
|
|
162
|
-
i18nKeys: {}
|
|
164
|
+
i18nKeys: {},
|
|
165
|
+
palette: 'default'
|
|
163
166
|
};
|
|
164
167
|
|
|
165
168
|
if (false) {
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
.container {
|
|
2
2
|
min-height: var(--zd_size51);
|
|
3
3
|
position: relative;
|
|
4
|
-
background-color: var(--zdt_lookupheader_default_bg);
|
|
5
|
-
border-bottom: solid 1px var(--zdt_lookupheader_default_border);
|
|
6
4
|
}[dir=ltr] .container {
|
|
7
5
|
padding: 0 var(--zd_size52) 0 var(--zd_size10);
|
|
8
6
|
}[dir=rtl] .container {
|
|
9
7
|
padding: 0 var(--zd_size10) 0 var(--zd_size52);
|
|
10
8
|
}
|
|
9
|
+
.default {
|
|
10
|
+
background-color: var(--zdt_lookupheader_default_bg);
|
|
11
|
+
border-bottom: solid 1px var(--zdt_lookupheader_default_border);
|
|
12
|
+
}
|
|
13
|
+
.white {
|
|
14
|
+
background-color: var(--zdt_lookupheader_white_bg);
|
|
15
|
+
border-bottom: solid 1px var(--zdt_lookupheader_white_border);
|
|
16
|
+
}
|
|
11
17
|
.searchContainer, .title {
|
|
12
18
|
margin: 0 var(--zd_size20);
|
|
13
19
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/dot",
|
|
3
|
-
"version": "1.0.0-temp-
|
|
3
|
+
"version": "1.0.0-temp-78",
|
|
4
4
|
"main": "lib/index",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"jsnext:main": "es/index.js",
|
|
@@ -27,16 +27,17 @@
|
|
|
27
27
|
"sstest": "react-cli sstest",
|
|
28
28
|
"docs": "npm run dubCheck && react-cli docs",
|
|
29
29
|
"postpublish": "react-cli postpublish",
|
|
30
|
-
"download": "rm package-lock.json && rm -rf node_modules/ && npm install"
|
|
30
|
+
"download": "rm package-lock.json && rm -rf node_modules/ && npm install",
|
|
31
|
+
"expublish": "npm publish --tag experimental-version"
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"velocity-react": "1.4.3",
|
|
35
36
|
"@zohodesk/variables": "1.0.0-beta.29",
|
|
36
37
|
"@zohodesk/i18n": "1.0.0-beta.7",
|
|
37
|
-
"@zohodesk/components": "1.0.0-alpha-
|
|
38
|
-
"@zohodesk/icons": "1.0.0-beta.
|
|
39
|
-
"@zohodesk/svg": "1.0.0-beta.
|
|
38
|
+
"@zohodesk/components": "1.0.0-alpha-237",
|
|
39
|
+
"@zohodesk/icons": "1.0.0-beta.101",
|
|
40
|
+
"@zohodesk/svg": "1.0.0-beta.43",
|
|
40
41
|
"@zohodesk/virtualizer": "1.0.3",
|
|
41
42
|
"react-sortable-hoc": "^0.8.3"
|
|
42
43
|
},
|
|
@@ -44,9 +45,9 @@
|
|
|
44
45
|
"velocity-react": "1.4.3",
|
|
45
46
|
"@zohodesk/variables": "1.0.0-beta.29",
|
|
46
47
|
"@zohodesk/i18n": "1.0.0-beta.7",
|
|
47
|
-
"@zohodesk/components": "1.0.0-alpha-
|
|
48
|
-
"@zohodesk/icons": "1.0.0-beta.
|
|
49
|
-
"@zohodesk/svg": "1.0.0-beta.
|
|
48
|
+
"@zohodesk/components": "1.0.0-alpha-237",
|
|
49
|
+
"@zohodesk/icons": "1.0.0-beta.101",
|
|
50
|
+
"@zohodesk/svg": "1.0.0-beta.43"
|
|
50
51
|
},
|
|
51
52
|
"react-cli": {
|
|
52
53
|
"preprocessor": {
|