@zohodesk/dot 1.0.0-temp-187.16 → 1.0.0-temp-211
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/.cli/propValidation_report.html +1 -1
- package/README.md +5 -0
- package/es/Onboarding/Onboarding.js +1 -1
- package/es/VideoLookup/VideoLookup.js +1 -1
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +8 -2
- package/es/form/fields/Fields.module.css +0 -4
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +4 -8
- package/es/form/fields/TagsMultiSelect/props/propTypes.js +1 -2
- package/es/list/DepartmentDropDown/DepartmentDropDown.js +2 -7
- package/es/list/DepartmentDropDown/props/defaultProps.js +1 -2
- package/es/list/DepartmentDropDown/props/propTypes.js +0 -3
- package/es/list/ListStencils/ListStencils.js +7 -2
- package/es/list/ListStencils/__tests__/ListStencils.spec.js +9 -0
- package/es/list/ListStencils/__tests__/__snapshots__/ListStencils.spec.js.snap +46 -0
- package/es/list/ListStencils/props/propTypes.js +3 -1
- package/es/list/status/StatusDropdown/StatusDropdown.js +2 -7
- package/es/list/status/StatusDropdown/props/defaultProps.js +1 -2
- package/es/list/status/StatusDropdown/props/propTypes.js +1 -4
- package/es/list/status/StatusListItem/StatusListItem.module.css +3 -6
- package/lib/Onboarding/Onboarding.js +2 -2
- package/lib/VideoLookup/VideoLookup.js +2 -2
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +12 -6
- package/lib/form/fields/Fields.module.css +0 -4
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -10
- package/lib/form/fields/TagsMultiSelect/props/propTypes.js +1 -2
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +3 -8
- package/lib/list/DepartmentDropDown/props/defaultProps.js +1 -2
- package/lib/list/DepartmentDropDown/props/propTypes.js +0 -2
- package/lib/list/ListStencils/ListStencils.js +8 -2
- package/lib/list/ListStencils/__tests__/ListStencils.spec.js +9 -0
- package/lib/list/ListStencils/__tests__/__snapshots__/ListStencils.spec.js.snap +46 -0
- package/lib/list/ListStencils/props/propTypes.js +3 -1
- package/lib/list/status/StatusDropdown/StatusDropdown.js +2 -6
- package/lib/list/status/StatusDropdown/props/defaultProps.js +1 -2
- package/lib/list/status/StatusDropdown/props/propTypes.js +1 -3
- package/lib/list/status/StatusListItem/StatusListItem.module.css +3 -6
- package/package.json +5 -5
- /package/es/Onboarding/css/{CardOnboarding.module.css → Onboarding.module.css} +0 -0
- /package/es/VideoLookup/css/{VideoLookupStyles.module.css → VideoLookup.module.css} +0 -0
- /package/lib/Onboarding/css/{CardOnboarding.module.css → Onboarding.module.css} +0 -0
- /package/lib/VideoLookup/css/{VideoLookupStyles.module.css → VideoLookup.module.css} +0 -0
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ import useOnboarding from "./hooks/useOnboarding";
|
|
|
28
28
|
import { DUMMY_OBJECT } from "../utils/General";
|
|
29
29
|
/** style **/
|
|
30
30
|
|
|
31
|
-
import defaultStyle from "./css/
|
|
31
|
+
import defaultStyle from "./css/Onboarding.module.css";
|
|
32
32
|
|
|
33
33
|
const Onboarding = _ref => {
|
|
34
34
|
let {
|
|
@@ -11,7 +11,7 @@ import { defaultProps } from "./props/defaultProps";
|
|
|
11
11
|
import { propTypes } from "./props/propTypes";
|
|
12
12
|
/**** Styles ****/
|
|
13
13
|
|
|
14
|
-
import defaultStyle from "./css/
|
|
14
|
+
import defaultStyle from "./css/VideoLookup.module.css";
|
|
15
15
|
export default function VideoLookup(props) {
|
|
16
16
|
const {
|
|
17
17
|
isOpened,
|
|
@@ -717,7 +717,8 @@ export class ToggleDropDown extends Component {
|
|
|
717
717
|
iconClass,
|
|
718
718
|
title,
|
|
719
719
|
disableTitle = '',
|
|
720
|
-
isDisabled = false
|
|
720
|
+
isDisabled = false,
|
|
721
|
+
secondaryValue
|
|
721
722
|
} = item;
|
|
722
723
|
listIndex += 1;
|
|
723
724
|
return iconName ? /*#__PURE__*/React.createElement(ListItemWithIcon, {
|
|
@@ -747,6 +748,7 @@ export class ToggleDropDown extends Component {
|
|
|
747
748
|
ariaSelected: selectedId === item[idName],
|
|
748
749
|
ariaLabel: item[keyName]
|
|
749
750
|
},
|
|
751
|
+
secondaryValue: secondaryValue,
|
|
750
752
|
...ListItemWithIconProps
|
|
751
753
|
}) : /*#__PURE__*/React.createElement(ListItem, {
|
|
752
754
|
key: listIndex,
|
|
@@ -772,6 +774,7 @@ export class ToggleDropDown extends Component {
|
|
|
772
774
|
ariaSelected: selectedId === item[idName],
|
|
773
775
|
ariaLabel: item[keyName]
|
|
774
776
|
},
|
|
777
|
+
secondaryValue: secondaryValue,
|
|
775
778
|
...ListItemProps
|
|
776
779
|
});
|
|
777
780
|
}));
|
|
@@ -786,7 +789,8 @@ export class ToggleDropDown extends Component {
|
|
|
786
789
|
title,
|
|
787
790
|
needDivider,
|
|
788
791
|
isDisabled = false,
|
|
789
|
-
disableTitle = ''
|
|
792
|
+
disableTitle = '',
|
|
793
|
+
secondaryValue
|
|
790
794
|
} = item;
|
|
791
795
|
|
|
792
796
|
if (!needDivider) {
|
|
@@ -824,6 +828,7 @@ export class ToggleDropDown extends Component {
|
|
|
824
828
|
ariaSelected: selectedId === item[idName],
|
|
825
829
|
ariaLabel: item[keyName]
|
|
826
830
|
},
|
|
831
|
+
secondaryValue: secondaryValue,
|
|
827
832
|
...ListItemWithIconProps
|
|
828
833
|
}) : /*#__PURE__*/React.createElement(ListItem, {
|
|
829
834
|
key: listIndex,
|
|
@@ -849,6 +854,7 @@ export class ToggleDropDown extends Component {
|
|
|
849
854
|
ariaSelected: selectedId === item[idName],
|
|
850
855
|
ariaLabel: item[keyName]
|
|
851
856
|
},
|
|
857
|
+
secondaryValue: secondaryValue,
|
|
852
858
|
...ListItemProps
|
|
853
859
|
}));
|
|
854
860
|
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
@@ -160,14 +160,12 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
160
160
|
let {
|
|
161
161
|
tagCustomClass = '',
|
|
162
162
|
listItemClass = '',
|
|
163
|
-
textBoxIconWrapperClass = ''
|
|
164
|
-
dropBoxClass = ''
|
|
163
|
+
textBoxIconWrapperClass = ''
|
|
165
164
|
} = customClass;
|
|
166
165
|
const {
|
|
167
166
|
TextBoxIconProps = {},
|
|
168
167
|
TagWrapperProps = {},
|
|
169
|
-
TagProps = {}
|
|
170
|
-
ListItemProps = {}
|
|
168
|
+
TagProps = {}
|
|
171
169
|
} = customProps;
|
|
172
170
|
const isEditable = !isReadOnly;
|
|
173
171
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -256,8 +254,7 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
256
254
|
boxPosition: boxPosition,
|
|
257
255
|
isPadding: false,
|
|
258
256
|
customClass: {
|
|
259
|
-
customDropBoxWrap: style.dropdown
|
|
260
|
-
customDropBox: dropBoxClass
|
|
257
|
+
customDropBoxWrap: style.dropdown
|
|
261
258
|
},
|
|
262
259
|
dataId: `${dataId}_dropbox`,
|
|
263
260
|
isResponsivePadding: true,
|
|
@@ -303,8 +300,7 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
303
300
|
getRef: this.getSelectedItemRef,
|
|
304
301
|
isDisabled: listDisabled,
|
|
305
302
|
customProps: listItemProps,
|
|
306
|
-
customClass: listItemClass
|
|
307
|
-
...ListItemProps
|
|
303
|
+
customClass: listItemClass
|
|
308
304
|
}, isNew ? /*#__PURE__*/React.createElement(Container, {
|
|
309
305
|
alignBox: "row",
|
|
310
306
|
align: "vertical"
|
|
@@ -52,8 +52,7 @@ export const propTypes = {
|
|
|
52
52
|
customProps: PropTypes.shape({
|
|
53
53
|
TextBoxIconProps: PropTypes.object,
|
|
54
54
|
TagWrapperProps: PropTypes.object,
|
|
55
|
-
TagProps: PropTypes.object
|
|
56
|
-
ListItemProps: PropTypes.object
|
|
55
|
+
TagProps: PropTypes.object
|
|
57
56
|
}),
|
|
58
57
|
isFocus: PropTypes.bool
|
|
59
58
|
};
|
|
@@ -48,12 +48,8 @@ class DepartmentDropDown extends Component {
|
|
|
48
48
|
onSearch,
|
|
49
49
|
needSearchFetching,
|
|
50
50
|
searchStr,
|
|
51
|
-
i18nKeys
|
|
52
|
-
customProps
|
|
51
|
+
i18nKeys
|
|
53
52
|
} = this.props;
|
|
54
|
-
const {
|
|
55
|
-
ToggleDropDownProps = {}
|
|
56
|
-
} = customProps;
|
|
57
53
|
let {
|
|
58
54
|
title = 'Move Department',
|
|
59
55
|
searchEmptyText = 'No results found',
|
|
@@ -88,8 +84,7 @@ class DepartmentDropDown extends Component {
|
|
|
88
84
|
getNextOptions: getNextOptions,
|
|
89
85
|
isNextOptions: isNextOptions,
|
|
90
86
|
onSearch: onSearch,
|
|
91
|
-
needSearchFetching: needSearchFetching
|
|
92
|
-
...ToggleDropDownProps
|
|
87
|
+
needSearchFetching: needSearchFetching
|
|
93
88
|
});
|
|
94
89
|
}
|
|
95
90
|
|
|
@@ -11,10 +11,15 @@ import style from "./ListStencils.module.css";
|
|
|
11
11
|
export default class ListStencils extends Component {
|
|
12
12
|
render() {
|
|
13
13
|
let {
|
|
14
|
-
listType
|
|
14
|
+
listType,
|
|
15
|
+
testId,
|
|
16
|
+
customId
|
|
15
17
|
} = this.props;
|
|
16
18
|
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className: `${style.container} ${style[listType]}
|
|
19
|
+
className: `${style.container} ${style[listType]}`,
|
|
20
|
+
"data-test-id": testId ? testId + '_listStencils' : null,
|
|
21
|
+
"data-id": customId ? customId + '_listStencils' : null,
|
|
22
|
+
"aria-hidden": "true"
|
|
18
23
|
}, /*#__PURE__*/React.createElement("div", {
|
|
19
24
|
className: style.innerContainer
|
|
20
25
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -8,4 +8,13 @@ describe('ListStencils', () => {
|
|
|
8
8
|
} = render( /*#__PURE__*/React.createElement(ListStencils, null));
|
|
9
9
|
expect(asFragment()).toMatchSnapshot();
|
|
10
10
|
});
|
|
11
|
+
test('customId and testId', () => {
|
|
12
|
+
const {
|
|
13
|
+
asFragment
|
|
14
|
+
} = render( /*#__PURE__*/React.createElement(ListStencils, {
|
|
15
|
+
testId: "ticket",
|
|
16
|
+
customId: "contact"
|
|
17
|
+
}));
|
|
18
|
+
expect(asFragment()).toMatchSnapshot();
|
|
19
|
+
});
|
|
11
20
|
});
|
|
@@ -1,8 +1,54 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`ListStencils customId and testId 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
class="container classic"
|
|
8
|
+
data-id="contact_listStencils"
|
|
9
|
+
data-test-id="ticket_listStencils"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class="innerContainer"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
class="avatar"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
class="container circle clarge primary "
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
<div
|
|
22
|
+
class="detailsColumn"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
class="detailsInnerColumn"
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
class="primaryRow"
|
|
29
|
+
>
|
|
30
|
+
<div
|
|
31
|
+
class="container rectangular default primary "
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
<div
|
|
35
|
+
class="secondaryRow"
|
|
36
|
+
>
|
|
37
|
+
<div
|
|
38
|
+
class="container rectangular medium primary "
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</DocumentFragment>
|
|
46
|
+
`;
|
|
47
|
+
|
|
3
48
|
exports[`ListStencils rendering the defult props 1`] = `
|
|
4
49
|
<DocumentFragment>
|
|
5
50
|
<div
|
|
51
|
+
aria-hidden="true"
|
|
6
52
|
class="container classic"
|
|
7
53
|
>
|
|
8
54
|
<div
|
|
@@ -178,12 +178,8 @@ export class StatusDropdown extends React.Component {
|
|
|
178
178
|
targetOffset,
|
|
179
179
|
renderTargetElement,
|
|
180
180
|
renderFooterElement,
|
|
181
|
-
a11y = {}
|
|
182
|
-
customClass
|
|
181
|
+
a11y = {}
|
|
183
182
|
} = this.props;
|
|
184
|
-
const {
|
|
185
|
-
dropBoxClass = ''
|
|
186
|
-
} = customClass;
|
|
187
183
|
const {
|
|
188
184
|
tabIndex = 0,
|
|
189
185
|
ariaLabelledby,
|
|
@@ -251,8 +247,7 @@ export class StatusDropdown extends React.Component {
|
|
|
251
247
|
isAnimate: true,
|
|
252
248
|
getRef: getContainerRef,
|
|
253
249
|
customClass: {
|
|
254
|
-
customDropBoxWrap: style.dropBoxContainer
|
|
255
|
-
customDropBox: dropBoxClass
|
|
250
|
+
customDropBoxWrap: style.dropBoxContainer
|
|
256
251
|
},
|
|
257
252
|
needResponsive: needResponsive,
|
|
258
253
|
isResponsivePadding: true,
|
|
@@ -56,8 +56,5 @@ export const propTypes = {
|
|
|
56
56
|
positionsOffset: PropTypes.object,
|
|
57
57
|
renderTargetElement: PropTypes.func,
|
|
58
58
|
renderFooterElement: PropTypes.node,
|
|
59
|
-
targetOffset: PropTypes.object
|
|
60
|
-
customClass: PropTypes.shape({
|
|
61
|
-
dropBoxClass: PropTypes.string
|
|
62
|
-
})
|
|
59
|
+
targetOffset: PropTypes.object
|
|
63
60
|
};
|
|
@@ -36,8 +36,9 @@
|
|
|
36
36
|
.value {
|
|
37
37
|
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
38
38
|
}
|
|
39
|
-
.multiLineValue
|
|
40
|
-
|
|
39
|
+
.multiLineValue{
|
|
40
|
+
word-break: break-word;
|
|
41
|
+
composes: clamp from '~@zohodesk/components/lib/common/common.module.css';
|
|
41
42
|
}
|
|
42
43
|
[dir=ltr] .withBorder.active {
|
|
43
44
|
border-left-color: var(--zdt_statuslistitem_default_active_border);
|
|
@@ -89,10 +90,6 @@
|
|
|
89
90
|
}
|
|
90
91
|
/* Status Type */
|
|
91
92
|
.statusType {
|
|
92
|
-
--status_listitem_bullet_min_height: var(--zd_size8);
|
|
93
|
-
--status_listitem_bullet_min_width: var(--zd_size8);
|
|
94
|
-
min-height: var(--status_listitem_bullet_min_height);
|
|
95
|
-
min-width: var(--status_listitem_bullet_min_width);
|
|
96
93
|
width: var(--zd_size8) ;
|
|
97
94
|
height: var(--zd_size8) ;
|
|
98
95
|
border-radius: 50%;
|
|
@@ -41,7 +41,7 @@ var _useOnboarding2 = _interopRequireDefault(require("./hooks/useOnboarding"));
|
|
|
41
41
|
|
|
42
42
|
var _General = require("../utils/General");
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _OnboardingModule = _interopRequireDefault(require("./css/Onboarding.module.css"));
|
|
45
45
|
|
|
46
46
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
47
47
|
|
|
@@ -63,7 +63,7 @@ var Onboarding = function Onboarding(_ref) {
|
|
|
63
63
|
onPrimaryButtonClick = _ref.onPrimaryButtonClick,
|
|
64
64
|
onSecondaryButtonClick = _ref.onSecondaryButtonClick,
|
|
65
65
|
customProps = _ref.customProps;
|
|
66
|
-
var style = (0, _useMergeStyle["default"])(
|
|
66
|
+
var style = (0, _useMergeStyle["default"])(_OnboardingModule["default"], customStyle);
|
|
67
67
|
|
|
68
68
|
var _useOnboarding = (0, _useOnboarding2["default"])(),
|
|
69
69
|
state = _useOnboarding.state,
|
|
@@ -23,7 +23,7 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
23
23
|
|
|
24
24
|
var _propTypes = require("./props/propTypes");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _VideoLookupModule = _interopRequireDefault(require("./css/VideoLookup.module.css"));
|
|
27
27
|
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
29
|
|
|
@@ -46,7 +46,7 @@ function VideoLookup(props) {
|
|
|
46
46
|
testId = props.testId,
|
|
47
47
|
customId = props.customId,
|
|
48
48
|
videoFormat = props.videoFormat;
|
|
49
|
-
var style = (0, _utils.mergeStyle)(
|
|
49
|
+
var style = (0, _utils.mergeStyle)(_VideoLookupModule["default"], customStyle);
|
|
50
50
|
var handleKeyPress = (0, _react.useCallback)(function (e) {
|
|
51
51
|
if (e.keyCode == '27') {
|
|
52
52
|
onClose(e);
|
|
@@ -783,7 +783,8 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
783
783
|
_item$disableTitle = item.disableTitle,
|
|
784
784
|
disableTitle = _item$disableTitle === void 0 ? '' : _item$disableTitle,
|
|
785
785
|
_item$isDisabled = item.isDisabled,
|
|
786
|
-
isDisabled = _item$isDisabled === void 0 ? false : _item$isDisabled
|
|
786
|
+
isDisabled = _item$isDisabled === void 0 ? false : _item$isDisabled,
|
|
787
|
+
secondaryValue = item.secondaryValue;
|
|
787
788
|
listIndex += 1;
|
|
788
789
|
return iconName ? /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], _extends({
|
|
789
790
|
key: listIndex,
|
|
@@ -811,7 +812,8 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
811
812
|
role: isSearch ? 'option' : 'menuitem',
|
|
812
813
|
ariaSelected: selectedId === item[idName],
|
|
813
814
|
ariaLabel: item[keyName]
|
|
814
|
-
}
|
|
815
|
+
},
|
|
816
|
+
secondaryValue: secondaryValue
|
|
815
817
|
}, ListItemWithIconProps)) : /*#__PURE__*/_react["default"].createElement(_ListItem["default"], _extends({
|
|
816
818
|
key: listIndex,
|
|
817
819
|
dataId: item[keyName],
|
|
@@ -835,7 +837,8 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
835
837
|
role: isSearch ? 'option' : 'menuitem',
|
|
836
838
|
ariaSelected: selectedId === item[idName],
|
|
837
839
|
ariaLabel: item[keyName]
|
|
838
|
-
}
|
|
840
|
+
},
|
|
841
|
+
secondaryValue: secondaryValue
|
|
839
842
|
}, ListItemProps));
|
|
840
843
|
}));
|
|
841
844
|
}), isFetchingOptions && /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
@@ -850,7 +853,8 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
850
853
|
_item$isDisabled2 = item.isDisabled,
|
|
851
854
|
isDisabled = _item$isDisabled2 === void 0 ? false : _item$isDisabled2,
|
|
852
855
|
_item$disableTitle2 = item.disableTitle,
|
|
853
|
-
disableTitle = _item$disableTitle2 === void 0 ? '' : _item$disableTitle2
|
|
856
|
+
disableTitle = _item$disableTitle2 === void 0 ? '' : _item$disableTitle2,
|
|
857
|
+
secondaryValue = item.secondaryValue;
|
|
854
858
|
|
|
855
859
|
if (!needDivider) {
|
|
856
860
|
listIndex += 1;
|
|
@@ -886,7 +890,8 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
886
890
|
role: isSearch ? 'option' : 'menuitem',
|
|
887
891
|
ariaSelected: selectedId === item[idName],
|
|
888
892
|
ariaLabel: item[keyName]
|
|
889
|
-
}
|
|
893
|
+
},
|
|
894
|
+
secondaryValue: secondaryValue
|
|
890
895
|
}, ListItemWithIconProps)) : /*#__PURE__*/_react["default"].createElement(_ListItem["default"], _extends({
|
|
891
896
|
key: listIndex,
|
|
892
897
|
dataId: item[keyName],
|
|
@@ -910,7 +915,8 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
910
915
|
role: isSearch ? 'option' : 'menuitem',
|
|
911
916
|
ariaSelected: selectedId === item[idName],
|
|
912
917
|
ariaLabel: item[keyName]
|
|
913
|
-
}
|
|
918
|
+
},
|
|
919
|
+
secondaryValue: secondaryValue
|
|
914
920
|
}, ListItemProps)));
|
|
915
921
|
}), isFetchingOptions && /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
916
922
|
isCover: false,
|
|
@@ -222,17 +222,13 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
222
222
|
_customClass$listItem = customClass.listItemClass,
|
|
223
223
|
listItemClass = _customClass$listItem === void 0 ? '' : _customClass$listItem,
|
|
224
224
|
_customClass$textBoxI = customClass.textBoxIconWrapperClass,
|
|
225
|
-
textBoxIconWrapperClass = _customClass$textBoxI === void 0 ? '' : _customClass$textBoxI
|
|
226
|
-
_customClass$dropBoxC = customClass.dropBoxClass,
|
|
227
|
-
dropBoxClass = _customClass$dropBoxC === void 0 ? '' : _customClass$dropBoxC;
|
|
225
|
+
textBoxIconWrapperClass = _customClass$textBoxI === void 0 ? '' : _customClass$textBoxI;
|
|
228
226
|
var _customProps$TextBoxI = customProps.TextBoxIconProps,
|
|
229
227
|
TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI,
|
|
230
228
|
_customProps$TagWrapp = customProps.TagWrapperProps,
|
|
231
229
|
TagWrapperProps = _customProps$TagWrapp === void 0 ? {} : _customProps$TagWrapp,
|
|
232
230
|
_customProps$TagProps = customProps.TagProps,
|
|
233
|
-
TagProps = _customProps$TagProps === void 0 ? {} : _customProps$TagProps
|
|
234
|
-
_customProps$ListItem = customProps.ListItemProps,
|
|
235
|
-
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem;
|
|
231
|
+
TagProps = _customProps$TagProps === void 0 ? {} : _customProps$TagProps;
|
|
236
232
|
var isEditable = !isReadOnly;
|
|
237
233
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
238
234
|
className: "".concat(_TagsMultiSelectModule["default"].container, " ").concat(!isReadOnly ? " ".concat(needBorder ? _TagsMultiSelectModule["default"].hasBorder : '', "\n ").concat(needBorder ? _TagsMultiSelectModule["default"]["borderColor_".concat(borderColor)] : _TagsMultiSelectModule["default"].borderColor_transparent, " ").concat(isPopupReady && needBorder || isEditable && isFocus ? _TagsMultiSelectModule["default"].active : '') : '', " ").concat(className),
|
|
@@ -310,8 +306,7 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
310
306
|
boxPosition: boxPosition,
|
|
311
307
|
isPadding: false,
|
|
312
308
|
customClass: {
|
|
313
|
-
customDropBoxWrap: _TagsMultiSelectModule["default"].dropdown
|
|
314
|
-
customDropBox: dropBoxClass
|
|
309
|
+
customDropBoxWrap: _TagsMultiSelectModule["default"].dropdown
|
|
315
310
|
},
|
|
316
311
|
dataId: "".concat(dataId, "_dropbox"),
|
|
317
312
|
isResponsivePadding: true,
|
|
@@ -343,7 +338,7 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
343
338
|
var name = item.name,
|
|
344
339
|
isNew = item.isNew,
|
|
345
340
|
listItemProps = item.listItemProps;
|
|
346
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, searchList.length > 1 && isNew ? /*#__PURE__*/_react["default"].createElement(_DropDownSeparator["default"], null) : null, /*#__PURE__*/_react["default"].createElement(_ListItem["default"],
|
|
341
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, searchList.length > 1 && isNew ? /*#__PURE__*/_react["default"].createElement(_DropDownSeparator["default"], null) : null, /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
|
|
347
342
|
key: index,
|
|
348
343
|
index: index,
|
|
349
344
|
autoHover: true,
|
|
@@ -356,7 +351,7 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
356
351
|
isDisabled: listDisabled,
|
|
357
352
|
customProps: listItemProps,
|
|
358
353
|
customClass: listItemClass
|
|
359
|
-
},
|
|
354
|
+
}, isNew ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
360
355
|
alignBox: "row",
|
|
361
356
|
align: "vertical"
|
|
362
357
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
@@ -62,8 +62,7 @@ var propTypes = {
|
|
|
62
62
|
customProps: _propTypes["default"].shape({
|
|
63
63
|
TextBoxIconProps: _propTypes["default"].object,
|
|
64
64
|
TagWrapperProps: _propTypes["default"].object,
|
|
65
|
-
TagProps: _propTypes["default"].object
|
|
66
|
-
ListItemProps: _propTypes["default"].object
|
|
65
|
+
TagProps: _propTypes["default"].object
|
|
67
66
|
}),
|
|
68
67
|
isFocus: _propTypes["default"].bool
|
|
69
68
|
};
|
|
@@ -25,8 +25,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
-
|
|
30
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
31
29
|
|
|
32
30
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -102,10 +100,7 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
102
100
|
onSearch = _this$props3.onSearch,
|
|
103
101
|
needSearchFetching = _this$props3.needSearchFetching,
|
|
104
102
|
searchStr = _this$props3.searchStr,
|
|
105
|
-
i18nKeys = _this$props3.i18nKeys
|
|
106
|
-
customProps = _this$props3.customProps;
|
|
107
|
-
var _customProps$ToggleDr = customProps.ToggleDropDownProps,
|
|
108
|
-
ToggleDropDownProps = _customProps$ToggleDr === void 0 ? {} : _customProps$ToggleDr;
|
|
103
|
+
i18nKeys = _this$props3.i18nKeys;
|
|
109
104
|
var _i18nKeys$title = i18nKeys.title,
|
|
110
105
|
title = _i18nKeys$title === void 0 ? 'Move Department' : _i18nKeys$title,
|
|
111
106
|
_i18nKeys$searchEmpty = i18nKeys.searchEmptyText,
|
|
@@ -114,7 +109,7 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
114
109
|
searchErrorText = _i18nKeys$searchError === void 0 ? 'No results' : _i18nKeys$searchError,
|
|
115
110
|
_i18nKeys$placeholder = i18nKeys.placeholder,
|
|
116
111
|
placeholder = _i18nKeys$placeholder === void 0 ? 'Search Department' : _i18nKeys$placeholder;
|
|
117
|
-
return /*#__PURE__*/_react["default"].createElement(_ToggleDropDown["default"],
|
|
112
|
+
return /*#__PURE__*/_react["default"].createElement(_ToggleDropDown["default"], {
|
|
118
113
|
title: title,
|
|
119
114
|
options: departmentList,
|
|
120
115
|
value: /*#__PURE__*/_react["default"].createElement(_SecondaryText.DepartmentText, {
|
|
@@ -143,7 +138,7 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
143
138
|
isNextOptions: isNextOptions,
|
|
144
139
|
onSearch: onSearch,
|
|
145
140
|
needSearchFetching: needSearchFetching
|
|
146
|
-
}
|
|
141
|
+
});
|
|
147
142
|
}
|
|
148
143
|
}]);
|
|
149
144
|
|
|
@@ -31,7 +31,5 @@ var propTypes = (_propTypes = {
|
|
|
31
31
|
searchEmptyText: _propTypes2["default"].string,
|
|
32
32
|
searchErrorText: _propTypes2["default"].string,
|
|
33
33
|
placeholder: _propTypes2["default"].string
|
|
34
|
-
})), _defineProperty(_propTypes, "customProps", _propTypes2["default"].shape({
|
|
35
|
-
ToggleDropDownProps: _propTypes2["default"].object
|
|
36
34
|
})), _propTypes);
|
|
37
35
|
exports.propTypes = propTypes;
|
|
@@ -57,9 +57,15 @@ var ListStencils = /*#__PURE__*/function (_Component) {
|
|
|
57
57
|
_createClass(ListStencils, [{
|
|
58
58
|
key: "render",
|
|
59
59
|
value: function render() {
|
|
60
|
-
var
|
|
60
|
+
var _this$props = this.props,
|
|
61
|
+
listType = _this$props.listType,
|
|
62
|
+
testId = _this$props.testId,
|
|
63
|
+
customId = _this$props.customId;
|
|
61
64
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
|
-
className: "".concat(_ListStencilsModule["default"].container, " ").concat(_ListStencilsModule["default"][listType])
|
|
65
|
+
className: "".concat(_ListStencilsModule["default"].container, " ").concat(_ListStencilsModule["default"][listType]),
|
|
66
|
+
"data-test-id": testId ? testId + '_listStencils' : null,
|
|
67
|
+
"data-id": customId ? customId + '_listStencils' : null,
|
|
68
|
+
"aria-hidden": "true"
|
|
63
69
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
64
70
|
className: _ListStencilsModule["default"].innerContainer
|
|
65
71
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -15,4 +15,13 @@ describe('ListStencils', function () {
|
|
|
15
15
|
|
|
16
16
|
expect(asFragment()).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
|
+
test('customId and testId', function () {
|
|
19
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_ListStencils["default"], {
|
|
20
|
+
testId: "ticket",
|
|
21
|
+
customId: "contact"
|
|
22
|
+
})),
|
|
23
|
+
asFragment = _render2.asFragment;
|
|
24
|
+
|
|
25
|
+
expect(asFragment()).toMatchSnapshot();
|
|
26
|
+
});
|
|
18
27
|
});
|