@zohodesk/dot 1.0.0-temp-63 → 1.0.0-temp-66
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 +10 -1
- package/es/ActionButton/ActionButton.js +7 -4
- package/es/ActionButton/ActionButton.module.css +0 -1
- package/es/FreezeLayer/FreezeLayer.js +29 -4
- package/es/IconButton/IconButton.js +5 -2
- package/es/Provider/Config.js +12 -0
- package/es/deprecated/utils/General.js +19 -0
- package/es/form/fields/CurrencyField/CurrencyField.js +6 -4
- package/es/list/Comment/Comment.js +4 -1
- package/es/list/Icons/AddNewIcon.js +12 -7
- package/es/list/Icons/CompleteIcon.js +12 -7
- package/es/list/Icons/DeleteIcon.js +12 -7
- package/es/list/Icons/EditIcon.js +12 -7
- package/es/list/Icons/ReadUnreadIcon.js +12 -7
- package/es/list/Icons/SmartIcon.js +12 -7
- package/es/list/Thread/Thread.js +10 -5
- package/es/utils/General.js +0 -19
- package/lib/ActionButton/ActionButton.js +8 -4
- package/lib/ActionButton/ActionButton.module.css +0 -1
- package/lib/FreezeLayer/FreezeLayer.js +31 -4
- package/lib/IconButton/IconButton.js +5 -2
- package/lib/Provider/Config.js +21 -0
- package/lib/deprecated/utils/General.js +29 -0
- package/lib/form/fields/CurrencyField/CurrencyField.js +7 -6
- package/lib/list/Comment/Comment.js +4 -1
- package/lib/list/Icons/AddNewIcon.js +13 -7
- package/lib/list/Icons/CompleteIcon.js +13 -7
- package/lib/list/Icons/DeleteIcon.js +13 -7
- package/lib/list/Icons/EditIcon.js +13 -7
- package/lib/list/Icons/ReadUnreadIcon.js +13 -7
- package/lib/list/Icons/SmartIcon.js +13 -7
- package/lib/list/Thread/Thread.js +10 -5
- package/lib/utils/General.js +0 -24
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,9 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.0.0-beta.214
|
|
6
|
+
|
|
7
|
+
- Dot => Provider Config Added
|
|
8
|
+
- FreezeLayer => freezeLayer config added to control keyboard shortcut
|
|
9
|
+
- CurrencyField => formatCurrency prop added, exist formatCurrency function removed and moved to deprecated
|
|
10
|
+
# 1.0.0-beta.213
|
|
11
|
+
|
|
12
|
+
- ActionButton => Loader Bg Fix reverted (Directly Fixed in Button Component)
|
|
13
|
+
|
|
5
14
|
# 1.0.0-beta.210
|
|
6
15
|
|
|
7
|
-
- TextEditor => editor
|
|
16
|
+
- TextEditor => editor loading issue fix
|
|
8
17
|
|
|
9
18
|
# 1.0.0-beta.209
|
|
10
19
|
|
|
@@ -6,6 +6,7 @@ import Button from '@zohodesk/components/lib/Button/Button';
|
|
|
6
6
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
7
7
|
import DropBox from '@zohodesk/components/lib/DropBox/DropBox';
|
|
8
8
|
import CssProvider from '@zohodesk/components/lib/Provider/CssProvider';
|
|
9
|
+
import btnStyle from '@zohodesk/components/lib/semantic/Button/semanticButton.module.css';
|
|
9
10
|
import style from './ActionButton.module.css';
|
|
10
11
|
export class ActionButton extends React.Component {
|
|
11
12
|
constructor(props) {
|
|
@@ -71,8 +72,9 @@ export class ActionButton extends React.Component {
|
|
|
71
72
|
flexible: true,
|
|
72
73
|
onClick: onClick,
|
|
73
74
|
dataId: dataId,
|
|
74
|
-
className:
|
|
75
|
-
"data-title": dataTitle
|
|
75
|
+
className: ` ${btnStyle.buttonReset} ${style.contentBox} ${style[palette + 'Btn']} ${style[size + '_btnBox']} ${children ? style.contentBoxBdr : style.contentBoxBdrRds} ${style.clickable} `,
|
|
76
|
+
"data-title": dataTitle,
|
|
77
|
+
tagName: "button"
|
|
76
78
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
77
79
|
align: "both"
|
|
78
80
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -96,8 +98,9 @@ export class ActionButton extends React.Component {
|
|
|
96
98
|
onClick: onClick ? !onHover && this.handleTogglePopup : undefined,
|
|
97
99
|
onMouseEnter: onClick ? onHover && this.handleTogglePopup : undefined,
|
|
98
100
|
onMouseLeave: onClick ? onHover && this.handleTogglePopup : undefined,
|
|
99
|
-
className: `${style[arrowBoxSize + '_arrowBox']} ${style[palette + 'Arw']} ${style.arrowWrapper} ${isPopupOpen ? style.arrowActive : ''}`,
|
|
100
|
-
dataId: arrowBoxDataId
|
|
101
|
+
className: `${btnStyle.buttonReset} ${style[arrowBoxSize + '_arrowBox']} ${style[palette + 'Arw']} ${style.arrowWrapper} ${isPopupOpen ? style.arrowActive : ''}`,
|
|
102
|
+
dataId: arrowBoxDataId,
|
|
103
|
+
tagName: "button"
|
|
101
104
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
102
105
|
align: "both"
|
|
103
106
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -2,9 +2,10 @@ 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'; //import { Shortcut } from '../utils/KeyboardApi';
|
|
6
|
+
|
|
7
7
|
import { getZIndex } from '@zohodesk/components/lib/Provider/ZindexProvider';
|
|
8
|
+
import { getDotLibraryConfig } from '../Provider/Config';
|
|
8
9
|
export default class FreezeLayer extends Component {
|
|
9
10
|
constructor(props) {
|
|
10
11
|
super(props);
|
|
@@ -13,6 +14,23 @@ export default class FreezeLayer extends Component {
|
|
|
13
14
|
isChildActive: false
|
|
14
15
|
};
|
|
15
16
|
this.getNextIndex = getZIndex(this);
|
|
17
|
+
this.isFreezeLayerEnabled = false;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
enableFreeze() {
|
|
21
|
+
if (!this.isFreezeLayerEnabled) {
|
|
22
|
+
this.isFreezeLayerEnabled = true;
|
|
23
|
+
const freezeLayerEnable = (getDotLibraryConfig('freezeLayer') || {}).enable;
|
|
24
|
+
freezeLayerEnable && freezeLayerEnable();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
disableFreeze() {
|
|
29
|
+
if (this.isFreezeLayerEnabled) {
|
|
30
|
+
this.isFreezeLayerEnabled = false;
|
|
31
|
+
const freezeLayerDisable = (getDotLibraryConfig('freezeLayer') || {}).disable;
|
|
32
|
+
freezeLayerDisable && freezeLayerDisable();
|
|
33
|
+
}
|
|
16
34
|
}
|
|
17
35
|
|
|
18
36
|
componentDidMount() {
|
|
@@ -24,6 +42,7 @@ export default class FreezeLayer extends Component {
|
|
|
24
42
|
this.setState({
|
|
25
43
|
isChildActive: true
|
|
26
44
|
});
|
|
45
|
+
this.enableFreeze();
|
|
27
46
|
}
|
|
28
47
|
}
|
|
29
48
|
|
|
@@ -34,7 +53,8 @@ export default class FreezeLayer extends Component {
|
|
|
34
53
|
|
|
35
54
|
if (isActive != prevProps.isActive) {
|
|
36
55
|
if (isActive) {
|
|
37
|
-
Shortcut && Shortcut.setState(false);
|
|
56
|
+
this.enableFreeze(); // Shortcut && Shortcut.setState(false);
|
|
57
|
+
|
|
38
58
|
this.setState({
|
|
39
59
|
isActive: true
|
|
40
60
|
}, () => {
|
|
@@ -43,7 +63,8 @@ export default class FreezeLayer extends Component {
|
|
|
43
63
|
});
|
|
44
64
|
});
|
|
45
65
|
} else {
|
|
46
|
-
Shortcut && Shortcut.setState(true);
|
|
66
|
+
this.disableFreeze(); // Shortcut && Shortcut.setState(true);
|
|
67
|
+
|
|
47
68
|
this.setState({
|
|
48
69
|
isChildActive: false
|
|
49
70
|
}, () => {
|
|
@@ -55,6 +76,10 @@ export default class FreezeLayer extends Component {
|
|
|
55
76
|
}
|
|
56
77
|
}
|
|
57
78
|
|
|
79
|
+
componentWillUnmount() {
|
|
80
|
+
this.disableFreeze();
|
|
81
|
+
}
|
|
82
|
+
|
|
58
83
|
render() {
|
|
59
84
|
let {
|
|
60
85
|
children,
|
|
@@ -94,7 +94,8 @@ export default class IconButton extends React.Component {
|
|
|
94
94
|
ariaExpanded,
|
|
95
95
|
ariaLabel,
|
|
96
96
|
ariaControls,
|
|
97
|
-
ariaLabelledby
|
|
97
|
+
ariaLabelledby,
|
|
98
|
+
role
|
|
98
99
|
} = a11y;
|
|
99
100
|
return /*#__PURE__*/React.createElement(RippleEffect, {
|
|
100
101
|
palette: palette,
|
|
@@ -108,6 +109,7 @@ export default class IconButton extends React.Component {
|
|
|
108
109
|
"aria-expanded": ariaExpanded,
|
|
109
110
|
"aria-controls": ariaControls,
|
|
110
111
|
"aria-labelledby": ariaLabelledby,
|
|
112
|
+
role: role,
|
|
111
113
|
tagName: needButtonTag ? 'button' : 'div',
|
|
112
114
|
isInline: true,
|
|
113
115
|
tourId: tourId,
|
|
@@ -161,7 +163,8 @@ IconButton.propTypes = {
|
|
|
161
163
|
ariaExpanded: PropTypes.bool,
|
|
162
164
|
ariaLabel: PropTypes.string,
|
|
163
165
|
ariaControls: PropTypes.string,
|
|
164
|
-
ariaLabelledby: PropTypes.string
|
|
166
|
+
ariaLabelledby: PropTypes.string,
|
|
167
|
+
role: PropTypes.string
|
|
165
168
|
}),
|
|
166
169
|
dataIsHtml: PropTypes.bool
|
|
167
170
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
let config = {
|
|
2
|
+
freezeLayer: {
|
|
3
|
+
enable: () => {},
|
|
4
|
+
disable: () => {}
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
export function getDotLibraryConfig(key) {
|
|
8
|
+
return config[key];
|
|
9
|
+
}
|
|
10
|
+
export function setDotLibraryConfig(configObj) {
|
|
11
|
+
config = Object.assign({}, config, configObj);
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function formatCurrency(number, symbol) {
|
|
2
|
+
// format number 1000000 to 1,234,567
|
|
3
|
+
if (number && number != 0) {
|
|
4
|
+
let typeOfData = typeof number;
|
|
5
|
+
let isDecimal = typeOfData == 'string' ? number.indexOf('.') != -1 : !Number.isInteger(number);
|
|
6
|
+
|
|
7
|
+
if (isDecimal) {
|
|
8
|
+
let val = number.toString().split('.');
|
|
9
|
+
let arr1 = `${val[0].replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
|
|
10
|
+
let finalVal = `${symbol}${arr1}.${val[1]}`;
|
|
11
|
+
return finalVal;
|
|
12
|
+
} else {
|
|
13
|
+
let value = `${symbol}${number.toString().replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return number;
|
|
19
|
+
}
|
|
@@ -15,7 +15,6 @@ import Icon from '@zohodesk/icons/lib/Icon';
|
|
|
15
15
|
/**** CSS ****/
|
|
16
16
|
|
|
17
17
|
import style from '../Fields.module.css';
|
|
18
|
-
import { formatCurrency } from '../../../utils/General';
|
|
19
18
|
export default class CurrencyField extends PureComponent {
|
|
20
19
|
constructor(props) {
|
|
21
20
|
super(props);
|
|
@@ -99,7 +98,8 @@ export default class CurrencyField extends PureComponent {
|
|
|
99
98
|
needReadOnlyStyle,
|
|
100
99
|
isClickable,
|
|
101
100
|
userCurrencyType,
|
|
102
|
-
customProps
|
|
101
|
+
customProps,
|
|
102
|
+
formatCurrency
|
|
103
103
|
} = this.props;
|
|
104
104
|
const {
|
|
105
105
|
LabelProps = {},
|
|
@@ -217,7 +217,8 @@ CurrencyField.propTypes = {
|
|
|
217
217
|
TextBoxProps: PropTypes.object,
|
|
218
218
|
ValidationMessageProps1: PropTypes.object,
|
|
219
219
|
ValidationMessageProps2: PropTypes.object
|
|
220
|
-
})
|
|
220
|
+
}),
|
|
221
|
+
formatCurrency: PropTypes.func
|
|
221
222
|
};
|
|
222
223
|
CurrencyField.defaultProps = {
|
|
223
224
|
errorType: 'primary',
|
|
@@ -233,7 +234,8 @@ CurrencyField.defaultProps = {
|
|
|
233
234
|
labelCustomClass: '',
|
|
234
235
|
isClickable: false,
|
|
235
236
|
needReadOnlyStyle: true,
|
|
236
|
-
customProps: {}
|
|
237
|
+
customProps: {},
|
|
238
|
+
formatCurrency: () => {}
|
|
237
239
|
};
|
|
238
240
|
|
|
239
241
|
if (false) {
|
|
@@ -22,7 +22,10 @@ export default class Comment extends Component {
|
|
|
22
22
|
customClass: `${style.container} ${className} `,
|
|
23
23
|
onClick: onClick,
|
|
24
24
|
dataId: "commentLstContainer",
|
|
25
|
-
title: commentTitle
|
|
25
|
+
title: commentTitle,
|
|
26
|
+
customProps: {
|
|
27
|
+
'aria-label': commentTitle
|
|
28
|
+
}
|
|
26
29
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
27
30
|
name: "ZD-TK-commentLine",
|
|
28
31
|
iconClass: style.commentIcon
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
6
|
+
import Button from '@zohodesk/components/lib/semantic/Button/Button';
|
|
4
7
|
import style from './Icons.module.css';
|
|
5
8
|
export default class AddNewIcon extends React.Component {
|
|
6
9
|
render() {
|
|
@@ -9,14 +12,15 @@ export default class AddNewIcon extends React.Component {
|
|
|
9
12
|
dataId,
|
|
10
13
|
dataTitle,
|
|
11
14
|
iconClass,
|
|
12
|
-
className
|
|
15
|
+
className,
|
|
16
|
+
customProps
|
|
13
17
|
} = this.props;
|
|
14
|
-
return /*#__PURE__*/React.createElement(
|
|
18
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
15
19
|
onClick: onClick,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
20
|
+
customClass: `${style.iconStyle} ${style.blueHover} ${className ? className : ''}`,
|
|
21
|
+
dataId: dataId,
|
|
22
|
+
title: dataTitle
|
|
23
|
+
}, customProps), /*#__PURE__*/React.createElement(Icon, {
|
|
20
24
|
name: "ZD-SE-addTickets",
|
|
21
25
|
iconClass: iconClass ? iconClass : ''
|
|
22
26
|
}));
|
|
@@ -28,5 +32,6 @@ AddNewIcon.propTypes = {
|
|
|
28
32
|
dataId: PropTypes.string,
|
|
29
33
|
dataTitle: PropTypes.string,
|
|
30
34
|
iconClass: PropTypes.string,
|
|
31
|
-
onClick: PropTypes.func
|
|
35
|
+
onClick: PropTypes.func,
|
|
36
|
+
customProps: PropTypes.object
|
|
32
37
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
6
|
+
import Button from '@zohodesk/components/lib/semantic/Button/Button';
|
|
4
7
|
import style from './Icons.module.css';
|
|
5
8
|
export default class CompleteIcon extends React.Component {
|
|
6
9
|
render() {
|
|
@@ -10,14 +13,15 @@ export default class CompleteIcon extends React.Component {
|
|
|
10
13
|
dataTitle,
|
|
11
14
|
iconClass,
|
|
12
15
|
className,
|
|
13
|
-
iconSize
|
|
16
|
+
iconSize,
|
|
17
|
+
customProps
|
|
14
18
|
} = this.props;
|
|
15
|
-
return /*#__PURE__*/React.createElement(
|
|
19
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
16
20
|
onClick: onClick,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
21
|
+
customClass: `${style.iconStyle} ${style.blueHover} ${className ? className : ''}`,
|
|
22
|
+
dataId: dataId,
|
|
23
|
+
title: dataTitle
|
|
24
|
+
}, customProps), /*#__PURE__*/React.createElement(Icon, {
|
|
21
25
|
name: "ZD-GN-checkbox",
|
|
22
26
|
iconClass: iconClass ? iconClass : '',
|
|
23
27
|
size: iconSize
|
|
@@ -31,5 +35,6 @@ CompleteIcon.propTypes = {
|
|
|
31
35
|
dataTitle: PropTypes.string,
|
|
32
36
|
iconClass: PropTypes.string,
|
|
33
37
|
iconSize: PropTypes.string,
|
|
34
|
-
onClick: PropTypes.func
|
|
38
|
+
onClick: PropTypes.func,
|
|
39
|
+
customProps: PropTypes.object
|
|
35
40
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import style from './Icons.module.css';
|
|
4
6
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
7
|
+
import Button from '@zohodesk/components/lib/semantic/Button/Button';
|
|
5
8
|
export default class DeleteComponent extends React.Component {
|
|
6
9
|
render() {
|
|
7
10
|
let {
|
|
@@ -10,14 +13,15 @@ export default class DeleteComponent extends React.Component {
|
|
|
10
13
|
dataTitle,
|
|
11
14
|
iconClass,
|
|
12
15
|
iconSize,
|
|
13
|
-
className
|
|
16
|
+
className,
|
|
17
|
+
customProps
|
|
14
18
|
} = this.props;
|
|
15
|
-
return /*#__PURE__*/React.createElement(
|
|
19
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
16
20
|
onClick: onClick,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
21
|
+
customClass: `${style.iconStyle} ${style.redHover} ${className ? className : ''}`,
|
|
22
|
+
dataId: dataId,
|
|
23
|
+
title: dataTitle
|
|
24
|
+
}, customProps), /*#__PURE__*/React.createElement(Icon, {
|
|
21
25
|
name: "ZD-GN-delete",
|
|
22
26
|
iconClass: iconClass ? iconClass : '',
|
|
23
27
|
size: iconSize
|
|
@@ -31,5 +35,6 @@ DeleteComponent.propTypes = {
|
|
|
31
35
|
dataTitle: PropTypes.string,
|
|
32
36
|
iconClass: PropTypes.string,
|
|
33
37
|
iconSize: PropTypes.string,
|
|
34
|
-
onClick: PropTypes.func
|
|
38
|
+
onClick: PropTypes.func,
|
|
39
|
+
customProps: PropTypes.object
|
|
35
40
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import style from './Icons.module.css';
|
|
4
6
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
7
|
+
import Button from '@zohodesk/components/lib/semantic/Button/Button';
|
|
5
8
|
export default class EditIcon extends React.Component {
|
|
6
9
|
render() {
|
|
7
10
|
let {
|
|
@@ -10,14 +13,15 @@ export default class EditIcon extends React.Component {
|
|
|
10
13
|
dataTitle,
|
|
11
14
|
iconClass,
|
|
12
15
|
iconSize,
|
|
13
|
-
className
|
|
16
|
+
className,
|
|
17
|
+
customProps
|
|
14
18
|
} = this.props;
|
|
15
|
-
return /*#__PURE__*/React.createElement(
|
|
19
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
16
20
|
onClick: onClick,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
21
|
+
customClass: `${style.iconStyle} ${style.blueHover} ${className ? className : ''}`,
|
|
22
|
+
dataId: dataId,
|
|
23
|
+
title: dataTitle
|
|
24
|
+
}, customProps), /*#__PURE__*/React.createElement(Icon, {
|
|
21
25
|
name: "ZD-GN-edit",
|
|
22
26
|
iconClass: iconClass ? iconClass : '',
|
|
23
27
|
size: iconSize
|
|
@@ -31,5 +35,6 @@ EditIcon.propTypes = {
|
|
|
31
35
|
dataTitle: PropTypes.string,
|
|
32
36
|
iconClass: PropTypes.string,
|
|
33
37
|
iconSize: PropTypes.string,
|
|
34
|
-
onClick: PropTypes.func
|
|
38
|
+
onClick: PropTypes.func,
|
|
39
|
+
customProps: PropTypes.object
|
|
35
40
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
4
6
|
import style from './Icons.module.css';
|
|
7
|
+
import Button from '@zohodesk/components/lib/semantic/Button/Button';
|
|
5
8
|
export default class ReadUnreadIcon extends React.Component {
|
|
6
9
|
render() {
|
|
7
10
|
let {
|
|
@@ -12,14 +15,15 @@ export default class ReadUnreadIcon extends React.Component {
|
|
|
12
15
|
iconClass,
|
|
13
16
|
className,
|
|
14
17
|
isRead,
|
|
15
|
-
iconSize
|
|
18
|
+
iconSize,
|
|
19
|
+
customProps
|
|
16
20
|
} = this.props;
|
|
17
|
-
return /*#__PURE__*/React.createElement(
|
|
21
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
18
22
|
onClick: onClick,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
23
|
+
customClass: `${style.iconStyle} ${style.blueHover} ${className ? className : ''}`,
|
|
24
|
+
dataId: dataId,
|
|
25
|
+
title: dataTitle
|
|
26
|
+
}, customProps), /*#__PURE__*/React.createElement(Icon, {
|
|
23
27
|
name: isRead ? 'ZD-GN-read' : 'ZD-GN-unread',
|
|
24
28
|
size: iconSize,
|
|
25
29
|
iconClass: `${iconClassName ? iconClassName : ''} ${iconClass ? iconClass : ''}`
|
|
@@ -38,5 +42,6 @@ ReadUnreadIcon.propTypes = {
|
|
|
38
42
|
iconClass: PropTypes.string,
|
|
39
43
|
onClick: PropTypes.func,
|
|
40
44
|
isRead: PropTypes.bool,
|
|
41
|
-
iconSize: PropTypes.string
|
|
45
|
+
iconSize: PropTypes.string,
|
|
46
|
+
customProps: PropTypes.object
|
|
42
47
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
2
|
+
|
|
1
3
|
import React, { Component } from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import style from './Icons.module.css';
|
|
4
6
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
7
|
+
import Button from '@zohodesk/components/lib/semantic/Button/Button';
|
|
5
8
|
export default class SmartIcon extends Component {
|
|
6
9
|
render() {
|
|
7
10
|
let {
|
|
@@ -9,14 +12,15 @@ export default class SmartIcon extends Component {
|
|
|
9
12
|
dataId,
|
|
10
13
|
dataTitle,
|
|
11
14
|
iconClass,
|
|
12
|
-
className
|
|
15
|
+
className,
|
|
16
|
+
customProps
|
|
13
17
|
} = this.props;
|
|
14
|
-
return /*#__PURE__*/React.createElement(
|
|
18
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
15
19
|
onClick: onClick,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
20
|
+
customClass: `${style.iconStyle} ${style.blueHover} ${className ? className : ''}`,
|
|
21
|
+
dataId: dataId,
|
|
22
|
+
title: dataTitle
|
|
23
|
+
}, customProps), /*#__PURE__*/React.createElement(Icon, {
|
|
20
24
|
name: "ZD-TK-peek",
|
|
21
25
|
iconClass: iconClass ? iconClass : ''
|
|
22
26
|
}));
|
|
@@ -30,5 +34,6 @@ SmartIcon.propTypes = {
|
|
|
30
34
|
features: PropTypes.array,
|
|
31
35
|
iconClass: PropTypes.string,
|
|
32
36
|
module: PropTypes.string,
|
|
33
|
-
onClick: PropTypes.func
|
|
37
|
+
onClick: PropTypes.func,
|
|
38
|
+
customProps: PropTypes.object
|
|
34
39
|
};
|
package/es/list/Thread/Thread.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
2
|
+
|
|
1
3
|
import React, { Component } from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
@@ -14,14 +16,15 @@ export default class Thread extends Component {
|
|
|
14
16
|
className,
|
|
15
17
|
iconTitle,
|
|
16
18
|
dataId,
|
|
17
|
-
align
|
|
19
|
+
align,
|
|
20
|
+
customProps
|
|
18
21
|
} = this.props;
|
|
19
22
|
let count = threadCount === '0' ? '1' : threadCount;
|
|
20
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
23
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
21
24
|
customClass: `${style.container} ${style[`align_${align}`]} ${className}`,
|
|
22
25
|
title: iconTitle,
|
|
23
26
|
dataId: dataId
|
|
24
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
27
|
+
}, customProps), /*#__PURE__*/React.createElement(Icon, {
|
|
25
28
|
name: "ZD-TK-thread",
|
|
26
29
|
size: "9"
|
|
27
30
|
}), /*#__PURE__*/React.createElement("span", {
|
|
@@ -35,11 +38,13 @@ Thread.propTypes = {
|
|
|
35
38
|
className: PropTypes.string,
|
|
36
39
|
count: PropTypes.string,
|
|
37
40
|
dataId: PropTypes.string,
|
|
38
|
-
iconTitle: PropTypes.string
|
|
41
|
+
iconTitle: PropTypes.string,
|
|
42
|
+
customProps: PropTypes.object
|
|
39
43
|
};
|
|
40
44
|
Thread.defaultProps = {
|
|
41
45
|
align: 'left',
|
|
42
|
-
className: ''
|
|
46
|
+
className: '',
|
|
47
|
+
customProps: {}
|
|
43
48
|
};
|
|
44
49
|
|
|
45
50
|
if (false) {
|
package/es/utils/General.js
CHANGED
|
@@ -42,23 +42,4 @@ export function formatPhoneUrl(phone) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
return phone;
|
|
45
|
-
}
|
|
46
|
-
export function formatCurrency(number, symbol) {
|
|
47
|
-
// format number 1000000 to 1,234,567
|
|
48
|
-
if (number && number != 0) {
|
|
49
|
-
let typeOfData = typeof number;
|
|
50
|
-
let isDecimal = typeOfData == 'string' ? number.indexOf('.') != -1 : !Number.isInteger(number);
|
|
51
|
-
|
|
52
|
-
if (isDecimal) {
|
|
53
|
-
let val = number.toString().split('.');
|
|
54
|
-
let arr1 = `${val[0].replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
|
|
55
|
-
let finalVal = `${symbol}${arr1}.${val[1]}`;
|
|
56
|
-
return finalVal;
|
|
57
|
-
} else {
|
|
58
|
-
let value = `${symbol}${number.toString().replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
|
|
59
|
-
return value;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return number;
|
|
64
45
|
}
|
|
@@ -23,6 +23,8 @@ var _DropBox = _interopRequireDefault(require("@zohodesk/components/lib/DropBox/
|
|
|
23
23
|
|
|
24
24
|
var _CssProvider = _interopRequireDefault(require("@zohodesk/components/lib/Provider/CssProvider"));
|
|
25
25
|
|
|
26
|
+
var _semanticButtonModule = _interopRequireDefault(require("@zohodesk/components/lib/semantic/Button/semanticButton.module.css"));
|
|
27
|
+
|
|
26
28
|
var _ActionButtonModule = _interopRequireDefault(require("./ActionButton.module.css"));
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -121,8 +123,9 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
|
|
|
121
123
|
flexible: true,
|
|
122
124
|
onClick: onClick,
|
|
123
125
|
dataId: dataId,
|
|
124
|
-
className: "".concat(_ActionButtonModule["default"].contentBox, " ").concat(_ActionButtonModule["default"][palette + 'Btn'], " ").concat(_ActionButtonModule["default"][size + '_btnBox'], " ").concat(children ? _ActionButtonModule["default"].contentBoxBdr : _ActionButtonModule["default"].contentBoxBdrRds, " ").concat(_ActionButtonModule["default"].clickable, " "),
|
|
125
|
-
"data-title": dataTitle
|
|
126
|
+
className: " ".concat(_semanticButtonModule["default"].buttonReset, " ").concat(_ActionButtonModule["default"].contentBox, " ").concat(_ActionButtonModule["default"][palette + 'Btn'], " ").concat(_ActionButtonModule["default"][size + '_btnBox'], " ").concat(children ? _ActionButtonModule["default"].contentBoxBdr : _ActionButtonModule["default"].contentBoxBdrRds, " ").concat(_ActionButtonModule["default"].clickable, " "),
|
|
127
|
+
"data-title": dataTitle,
|
|
128
|
+
tagName: "button"
|
|
126
129
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
127
130
|
align: "both"
|
|
128
131
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
@@ -146,8 +149,9 @@ var ActionButton = /*#__PURE__*/function (_React$Component) {
|
|
|
146
149
|
onClick: onClick ? !onHover && this.handleTogglePopup : undefined,
|
|
147
150
|
onMouseEnter: onClick ? onHover && this.handleTogglePopup : undefined,
|
|
148
151
|
onMouseLeave: onClick ? onHover && this.handleTogglePopup : undefined,
|
|
149
|
-
className: "".concat(_ActionButtonModule["default"][arrowBoxSize + '_arrowBox'], " ").concat(_ActionButtonModule["default"][palette + 'Arw'], " ").concat(_ActionButtonModule["default"].arrowWrapper, " ").concat(isPopupOpen ? _ActionButtonModule["default"].arrowActive : ''),
|
|
150
|
-
dataId: arrowBoxDataId
|
|
152
|
+
className: "".concat(_semanticButtonModule["default"].buttonReset, " ").concat(_ActionButtonModule["default"][arrowBoxSize + '_arrowBox'], " ").concat(_ActionButtonModule["default"][palette + 'Arw'], " ").concat(_ActionButtonModule["default"].arrowWrapper, " ").concat(isPopupOpen ? _ActionButtonModule["default"].arrowActive : ''),
|
|
153
|
+
dataId: arrowBoxDataId,
|
|
154
|
+
tagName: "button"
|
|
151
155
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
152
156
|
align: "both"
|
|
153
157
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
@@ -17,10 +17,10 @@ var _VelocityAnimationGroup = _interopRequireDefault(require("@zohodesk/componen
|
|
|
17
17
|
|
|
18
18
|
var _FreezeLayerModule = _interopRequireDefault(require("./FreezeLayer.module.css"));
|
|
19
19
|
|
|
20
|
-
var _KeyboardApi = require("../utils/KeyboardApi");
|
|
21
|
-
|
|
22
20
|
var _ZindexProvider = require("@zohodesk/components/lib/Provider/ZindexProvider");
|
|
23
21
|
|
|
22
|
+
var _Config = require("../Provider/Config");
|
|
23
|
+
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
26
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -63,10 +63,29 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
|
|
|
63
63
|
isChildActive: false
|
|
64
64
|
};
|
|
65
65
|
_this.getNextIndex = (0, _ZindexProvider.getZIndex)(_assertThisInitialized(_this));
|
|
66
|
+
_this.isFreezeLayerEnabled = false;
|
|
66
67
|
return _this;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
_createClass(FreezeLayer, [{
|
|
71
|
+
key: "enableFreeze",
|
|
72
|
+
value: function enableFreeze() {
|
|
73
|
+
if (!this.isFreezeLayerEnabled) {
|
|
74
|
+
this.isFreezeLayerEnabled = true;
|
|
75
|
+
var freezeLayerEnable = ((0, _Config.getDotLibraryConfig)('freezeLayer') || {}).enable;
|
|
76
|
+
freezeLayerEnable && freezeLayerEnable();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
key: "disableFreeze",
|
|
81
|
+
value: function disableFreeze() {
|
|
82
|
+
if (this.isFreezeLayerEnabled) {
|
|
83
|
+
this.isFreezeLayerEnabled = false;
|
|
84
|
+
var freezeLayerDisable = ((0, _Config.getDotLibraryConfig)('freezeLayer') || {}).disable;
|
|
85
|
+
freezeLayerDisable && freezeLayerDisable();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}, {
|
|
70
89
|
key: "componentDidMount",
|
|
71
90
|
value: function componentDidMount() {
|
|
72
91
|
var isActive = this.props.isActive;
|
|
@@ -75,6 +94,7 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
|
|
|
75
94
|
this.setState({
|
|
76
95
|
isChildActive: true
|
|
77
96
|
});
|
|
97
|
+
this.enableFreeze();
|
|
78
98
|
}
|
|
79
99
|
}
|
|
80
100
|
}, {
|
|
@@ -86,7 +106,8 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
|
|
|
86
106
|
|
|
87
107
|
if (isActive != prevProps.isActive) {
|
|
88
108
|
if (isActive) {
|
|
89
|
-
|
|
109
|
+
this.enableFreeze(); // Shortcut && Shortcut.setState(false);
|
|
110
|
+
|
|
90
111
|
this.setState({
|
|
91
112
|
isActive: true
|
|
92
113
|
}, function () {
|
|
@@ -95,7 +116,8 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
|
|
|
95
116
|
});
|
|
96
117
|
});
|
|
97
118
|
} else {
|
|
98
|
-
|
|
119
|
+
this.disableFreeze(); // Shortcut && Shortcut.setState(true);
|
|
120
|
+
|
|
99
121
|
this.setState({
|
|
100
122
|
isChildActive: false
|
|
101
123
|
}, function () {
|
|
@@ -106,6 +128,11 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
|
|
|
106
128
|
}
|
|
107
129
|
}
|
|
108
130
|
}
|
|
131
|
+
}, {
|
|
132
|
+
key: "componentWillUnmount",
|
|
133
|
+
value: function componentWillUnmount() {
|
|
134
|
+
this.disableFreeze();
|
|
135
|
+
}
|
|
109
136
|
}, {
|
|
110
137
|
key: "render",
|
|
111
138
|
value: function render() {
|
|
@@ -143,7 +143,8 @@ var IconButton = /*#__PURE__*/function (_React$Component) {
|
|
|
143
143
|
ariaExpanded = a11y.ariaExpanded,
|
|
144
144
|
ariaLabel = a11y.ariaLabel,
|
|
145
145
|
ariaControls = a11y.ariaControls,
|
|
146
|
-
ariaLabelledby = a11y.ariaLabelledby
|
|
146
|
+
ariaLabelledby = a11y.ariaLabelledby,
|
|
147
|
+
role = a11y.role;
|
|
147
148
|
return /*#__PURE__*/_react["default"].createElement(_RippleEffect["default"], {
|
|
148
149
|
palette: palette,
|
|
149
150
|
isActive: isActive,
|
|
@@ -156,6 +157,7 @@ var IconButton = /*#__PURE__*/function (_React$Component) {
|
|
|
156
157
|
"aria-expanded": ariaExpanded,
|
|
157
158
|
"aria-controls": ariaControls,
|
|
158
159
|
"aria-labelledby": ariaLabelledby,
|
|
160
|
+
role: role,
|
|
159
161
|
tagName: needButtonTag ? 'button' : 'div',
|
|
160
162
|
isInline: true,
|
|
161
163
|
tourId: tourId,
|
|
@@ -211,7 +213,8 @@ IconButton.propTypes = (_IconButton$propTypes = {
|
|
|
211
213
|
ariaExpanded: _propTypes["default"].bool,
|
|
212
214
|
ariaLabel: _propTypes["default"].string,
|
|
213
215
|
ariaControls: _propTypes["default"].string,
|
|
214
|
-
ariaLabelledby: _propTypes["default"].string
|
|
216
|
+
ariaLabelledby: _propTypes["default"].string,
|
|
217
|
+
role: _propTypes["default"].string
|
|
215
218
|
})), _defineProperty(_IconButton$propTypes, "dataIsHtml", _propTypes["default"].bool), _IconButton$propTypes);
|
|
216
219
|
IconButton.defaultProps = {
|
|
217
220
|
palette: 'default',
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDotLibraryConfig = getDotLibraryConfig;
|
|
7
|
+
exports.setDotLibraryConfig = setDotLibraryConfig;
|
|
8
|
+
var config = {
|
|
9
|
+
freezeLayer: {
|
|
10
|
+
enable: function enable() {},
|
|
11
|
+
disable: function disable() {}
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
function getDotLibraryConfig(key) {
|
|
16
|
+
return config[key];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function setDotLibraryConfig(configObj) {
|
|
20
|
+
config = Object.assign({}, config, configObj);
|
|
21
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.formatCurrency = formatCurrency;
|
|
7
|
+
|
|
8
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
9
|
+
|
|
10
|
+
function formatCurrency(number, symbol) {
|
|
11
|
+
// format number 1000000 to 1,234,567
|
|
12
|
+
if (number && number != 0) {
|
|
13
|
+
var typeOfData = _typeof(number);
|
|
14
|
+
|
|
15
|
+
var isDecimal = typeOfData == 'string' ? number.indexOf('.') != -1 : !Number.isInteger(number);
|
|
16
|
+
|
|
17
|
+
if (isDecimal) {
|
|
18
|
+
var val = number.toString().split('.');
|
|
19
|
+
var arr1 = "".concat(val[0].replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ','));
|
|
20
|
+
var finalVal = "".concat(symbol).concat(arr1, ".").concat(val[1]);
|
|
21
|
+
return finalVal;
|
|
22
|
+
} else {
|
|
23
|
+
var value = "".concat(symbol).concat(number.toString().replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ','));
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return number;
|
|
29
|
+
}
|
|
@@ -23,8 +23,6 @@ var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
|
23
23
|
|
|
24
24
|
var _FieldsModule = _interopRequireDefault(require("../Fields.module.css"));
|
|
25
25
|
|
|
26
|
-
var _General = require("../../../utils/General");
|
|
27
|
-
|
|
28
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
27
|
|
|
30
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -145,7 +143,8 @@ var CurrencyField = /*#__PURE__*/function (_PureComponent) {
|
|
|
145
143
|
needReadOnlyStyle = _this$props3.needReadOnlyStyle,
|
|
146
144
|
isClickable = _this$props3.isClickable,
|
|
147
145
|
userCurrencyType = _this$props3.userCurrencyType,
|
|
148
|
-
customProps = _this$props3.customProps
|
|
146
|
+
customProps = _this$props3.customProps,
|
|
147
|
+
formatCurrency = _this$props3.formatCurrency;
|
|
149
148
|
var _customProps$LabelPro = customProps.LabelProps,
|
|
150
149
|
LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
|
|
151
150
|
_customProps$TextBoxP = customProps.TextBoxProps,
|
|
@@ -158,7 +157,7 @@ var CurrencyField = /*#__PURE__*/function (_PureComponent) {
|
|
|
158
157
|
var formatValue = value;
|
|
159
158
|
|
|
160
159
|
if (!isActive && value != 0) {
|
|
161
|
-
formatValue =
|
|
160
|
+
formatValue = formatCurrency(value, userCurrencyType);
|
|
162
161
|
} else {
|
|
163
162
|
formatValue = value;
|
|
164
163
|
}
|
|
@@ -266,7 +265,8 @@ CurrencyField.propTypes = {
|
|
|
266
265
|
TextBoxProps: _propTypes["default"].object,
|
|
267
266
|
ValidationMessageProps1: _propTypes["default"].object,
|
|
268
267
|
ValidationMessageProps2: _propTypes["default"].object
|
|
269
|
-
})
|
|
268
|
+
}),
|
|
269
|
+
formatCurrency: _propTypes["default"].func
|
|
270
270
|
};
|
|
271
271
|
CurrencyField.defaultProps = {
|
|
272
272
|
errorType: 'primary',
|
|
@@ -282,7 +282,8 @@ CurrencyField.defaultProps = {
|
|
|
282
282
|
labelCustomClass: '',
|
|
283
283
|
isClickable: false,
|
|
284
284
|
needReadOnlyStyle: true,
|
|
285
|
-
customProps: {}
|
|
285
|
+
customProps: {},
|
|
286
|
+
formatCurrency: function formatCurrency() {}
|
|
286
287
|
};
|
|
287
288
|
|
|
288
289
|
if (false) {
|
|
@@ -70,7 +70,10 @@ var Comment = /*#__PURE__*/function (_Component) {
|
|
|
70
70
|
customClass: "".concat(_CommentModule["default"].container, " ").concat(className, " "),
|
|
71
71
|
onClick: onClick,
|
|
72
72
|
dataId: "commentLstContainer",
|
|
73
|
-
title: commentTitle
|
|
73
|
+
title: commentTitle,
|
|
74
|
+
customProps: {
|
|
75
|
+
'aria-label': commentTitle
|
|
76
|
+
}
|
|
74
77
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
75
78
|
name: "ZD-TK-commentLine",
|
|
76
79
|
iconClass: _CommentModule["default"].commentIcon
|
|
@@ -13,10 +13,14 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
15
15
|
|
|
16
|
+
var _Button = _interopRequireDefault(require("@zohodesk/components/lib/semantic/Button/Button"));
|
|
17
|
+
|
|
16
18
|
var _IconsModule = _interopRequireDefault(require("./Icons.module.css"));
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
22
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
23
|
+
|
|
20
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
25
|
|
|
22
26
|
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); } }
|
|
@@ -56,13 +60,14 @@ var AddNewIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
56
60
|
dataId = _this$props.dataId,
|
|
57
61
|
dataTitle = _this$props.dataTitle,
|
|
58
62
|
iconClass = _this$props.iconClass,
|
|
59
|
-
className = _this$props.className
|
|
60
|
-
|
|
63
|
+
className = _this$props.className,
|
|
64
|
+
customProps = _this$props.customProps;
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
|
61
66
|
onClick: onClick,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
67
|
+
customClass: "".concat(_IconsModule["default"].iconStyle, " ").concat(_IconsModule["default"].blueHover, " ").concat(className ? className : ''),
|
|
68
|
+
dataId: dataId,
|
|
69
|
+
title: dataTitle
|
|
70
|
+
}, customProps), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
66
71
|
name: "ZD-SE-addTickets",
|
|
67
72
|
iconClass: iconClass ? iconClass : ''
|
|
68
73
|
}));
|
|
@@ -78,5 +83,6 @@ AddNewIcon.propTypes = {
|
|
|
78
83
|
dataId: _propTypes["default"].string,
|
|
79
84
|
dataTitle: _propTypes["default"].string,
|
|
80
85
|
iconClass: _propTypes["default"].string,
|
|
81
|
-
onClick: _propTypes["default"].func
|
|
86
|
+
onClick: _propTypes["default"].func,
|
|
87
|
+
customProps: _propTypes["default"].object
|
|
82
88
|
};
|
|
@@ -13,10 +13,14 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
15
15
|
|
|
16
|
+
var _Button = _interopRequireDefault(require("@zohodesk/components/lib/semantic/Button/Button"));
|
|
17
|
+
|
|
16
18
|
var _IconsModule = _interopRequireDefault(require("./Icons.module.css"));
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
22
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
23
|
+
|
|
20
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
25
|
|
|
22
26
|
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); } }
|
|
@@ -57,13 +61,14 @@ var CompleteIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
57
61
|
dataTitle = _this$props.dataTitle,
|
|
58
62
|
iconClass = _this$props.iconClass,
|
|
59
63
|
className = _this$props.className,
|
|
60
|
-
iconSize = _this$props.iconSize
|
|
61
|
-
|
|
64
|
+
iconSize = _this$props.iconSize,
|
|
65
|
+
customProps = _this$props.customProps;
|
|
66
|
+
return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
|
62
67
|
onClick: onClick,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
68
|
+
customClass: "".concat(_IconsModule["default"].iconStyle, " ").concat(_IconsModule["default"].blueHover, " ").concat(className ? className : ''),
|
|
69
|
+
dataId: dataId,
|
|
70
|
+
title: dataTitle
|
|
71
|
+
}, customProps), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
67
72
|
name: "ZD-GN-checkbox",
|
|
68
73
|
iconClass: iconClass ? iconClass : '',
|
|
69
74
|
size: iconSize
|
|
@@ -81,5 +86,6 @@ CompleteIcon.propTypes = {
|
|
|
81
86
|
dataTitle: _propTypes["default"].string,
|
|
82
87
|
iconClass: _propTypes["default"].string,
|
|
83
88
|
iconSize: _propTypes["default"].string,
|
|
84
|
-
onClick: _propTypes["default"].func
|
|
89
|
+
onClick: _propTypes["default"].func,
|
|
90
|
+
customProps: _propTypes["default"].object
|
|
85
91
|
};
|
|
@@ -15,8 +15,12 @@ var _IconsModule = _interopRequireDefault(require("./Icons.module.css"));
|
|
|
15
15
|
|
|
16
16
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
17
17
|
|
|
18
|
+
var _Button = _interopRequireDefault(require("@zohodesk/components/lib/semantic/Button/Button"));
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
22
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
23
|
+
|
|
20
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
25
|
|
|
22
26
|
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); } }
|
|
@@ -57,13 +61,14 @@ var DeleteComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
57
61
|
dataTitle = _this$props.dataTitle,
|
|
58
62
|
iconClass = _this$props.iconClass,
|
|
59
63
|
iconSize = _this$props.iconSize,
|
|
60
|
-
className = _this$props.className
|
|
61
|
-
|
|
64
|
+
className = _this$props.className,
|
|
65
|
+
customProps = _this$props.customProps;
|
|
66
|
+
return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
|
62
67
|
onClick: onClick,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
68
|
+
customClass: "".concat(_IconsModule["default"].iconStyle, " ").concat(_IconsModule["default"].redHover, " ").concat(className ? className : ''),
|
|
69
|
+
dataId: dataId,
|
|
70
|
+
title: dataTitle
|
|
71
|
+
}, customProps), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
67
72
|
name: "ZD-GN-delete",
|
|
68
73
|
iconClass: iconClass ? iconClass : '',
|
|
69
74
|
size: iconSize
|
|
@@ -81,5 +86,6 @@ DeleteComponent.propTypes = {
|
|
|
81
86
|
dataTitle: _propTypes["default"].string,
|
|
82
87
|
iconClass: _propTypes["default"].string,
|
|
83
88
|
iconSize: _propTypes["default"].string,
|
|
84
|
-
onClick: _propTypes["default"].func
|
|
89
|
+
onClick: _propTypes["default"].func,
|
|
90
|
+
customProps: _propTypes["default"].object
|
|
85
91
|
};
|
|
@@ -15,8 +15,12 @@ var _IconsModule = _interopRequireDefault(require("./Icons.module.css"));
|
|
|
15
15
|
|
|
16
16
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
17
17
|
|
|
18
|
+
var _Button = _interopRequireDefault(require("@zohodesk/components/lib/semantic/Button/Button"));
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
22
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
23
|
+
|
|
20
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
25
|
|
|
22
26
|
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); } }
|
|
@@ -57,13 +61,14 @@ var EditIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
57
61
|
dataTitle = _this$props.dataTitle,
|
|
58
62
|
iconClass = _this$props.iconClass,
|
|
59
63
|
iconSize = _this$props.iconSize,
|
|
60
|
-
className = _this$props.className
|
|
61
|
-
|
|
64
|
+
className = _this$props.className,
|
|
65
|
+
customProps = _this$props.customProps;
|
|
66
|
+
return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
|
62
67
|
onClick: onClick,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
68
|
+
customClass: "".concat(_IconsModule["default"].iconStyle, " ").concat(_IconsModule["default"].blueHover, " ").concat(className ? className : ''),
|
|
69
|
+
dataId: dataId,
|
|
70
|
+
title: dataTitle
|
|
71
|
+
}, customProps), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
67
72
|
name: "ZD-GN-edit",
|
|
68
73
|
iconClass: iconClass ? iconClass : '',
|
|
69
74
|
size: iconSize
|
|
@@ -81,5 +86,6 @@ EditIcon.propTypes = {
|
|
|
81
86
|
dataTitle: _propTypes["default"].string,
|
|
82
87
|
iconClass: _propTypes["default"].string,
|
|
83
88
|
iconSize: _propTypes["default"].string,
|
|
84
|
-
onClick: _propTypes["default"].func
|
|
89
|
+
onClick: _propTypes["default"].func,
|
|
90
|
+
customProps: _propTypes["default"].object
|
|
85
91
|
};
|
|
@@ -15,8 +15,12 @@ var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
|
15
15
|
|
|
16
16
|
var _IconsModule = _interopRequireDefault(require("./Icons.module.css"));
|
|
17
17
|
|
|
18
|
+
var _Button = _interopRequireDefault(require("@zohodesk/components/lib/semantic/Button/Button"));
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
22
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
23
|
+
|
|
20
24
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
25
|
|
|
22
26
|
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); } }
|
|
@@ -59,13 +63,14 @@ var ReadUnreadIcon = /*#__PURE__*/function (_React$Component) {
|
|
|
59
63
|
iconClass = _this$props.iconClass,
|
|
60
64
|
className = _this$props.className,
|
|
61
65
|
isRead = _this$props.isRead,
|
|
62
|
-
iconSize = _this$props.iconSize
|
|
63
|
-
|
|
66
|
+
iconSize = _this$props.iconSize,
|
|
67
|
+
customProps = _this$props.customProps;
|
|
68
|
+
return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
|
64
69
|
onClick: onClick,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
70
|
+
customClass: "".concat(_IconsModule["default"].iconStyle, " ").concat(_IconsModule["default"].blueHover, " ").concat(className ? className : ''),
|
|
71
|
+
dataId: dataId,
|
|
72
|
+
title: dataTitle
|
|
73
|
+
}, customProps), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
69
74
|
name: isRead ? 'ZD-GN-read' : 'ZD-GN-unread',
|
|
70
75
|
size: iconSize,
|
|
71
76
|
iconClass: "".concat(iconClassName ? iconClassName : '', " ").concat(iconClass ? iconClass : '')
|
|
@@ -88,5 +93,6 @@ ReadUnreadIcon.propTypes = {
|
|
|
88
93
|
iconClass: _propTypes["default"].string,
|
|
89
94
|
onClick: _propTypes["default"].func,
|
|
90
95
|
isRead: _propTypes["default"].bool,
|
|
91
|
-
iconSize: _propTypes["default"].string
|
|
96
|
+
iconSize: _propTypes["default"].string,
|
|
97
|
+
customProps: _propTypes["default"].object
|
|
92
98
|
};
|
|
@@ -15,12 +15,16 @@ var _IconsModule = _interopRequireDefault(require("./Icons.module.css"));
|
|
|
15
15
|
|
|
16
16
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
17
17
|
|
|
18
|
+
var _Button = _interopRequireDefault(require("@zohodesk/components/lib/semantic/Button/Button"));
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
20
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
23
|
|
|
22
24
|
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; }
|
|
23
25
|
|
|
26
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
27
|
+
|
|
24
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
29
|
|
|
26
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); } }
|
|
@@ -60,13 +64,14 @@ var SmartIcon = /*#__PURE__*/function (_Component) {
|
|
|
60
64
|
dataId = _this$props.dataId,
|
|
61
65
|
dataTitle = _this$props.dataTitle,
|
|
62
66
|
iconClass = _this$props.iconClass,
|
|
63
|
-
className = _this$props.className
|
|
64
|
-
|
|
67
|
+
className = _this$props.className,
|
|
68
|
+
customProps = _this$props.customProps;
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
|
65
70
|
onClick: onClick,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
71
|
+
customClass: "".concat(_IconsModule["default"].iconStyle, " ").concat(_IconsModule["default"].blueHover, " ").concat(className ? className : ''),
|
|
72
|
+
dataId: dataId,
|
|
73
|
+
title: dataTitle
|
|
74
|
+
}, customProps), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
70
75
|
name: "ZD-TK-peek",
|
|
71
76
|
iconClass: iconClass ? iconClass : ''
|
|
72
77
|
}));
|
|
@@ -84,5 +89,6 @@ SmartIcon.propTypes = {
|
|
|
84
89
|
features: _propTypes["default"].array,
|
|
85
90
|
iconClass: _propTypes["default"].string,
|
|
86
91
|
module: _propTypes["default"].string,
|
|
87
|
-
onClick: _propTypes["default"].func
|
|
92
|
+
onClick: _propTypes["default"].func,
|
|
93
|
+
customProps: _propTypes["default"].object
|
|
88
94
|
};
|
|
@@ -23,6 +23,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
|
+
function _extends() { _extends = Object.assign || 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); }
|
|
27
|
+
|
|
26
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
29
|
|
|
28
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); } }
|
|
@@ -62,13 +64,14 @@ var Thread = /*#__PURE__*/function (_Component) {
|
|
|
62
64
|
className = _this$props.className,
|
|
63
65
|
iconTitle = _this$props.iconTitle,
|
|
64
66
|
dataId = _this$props.dataId,
|
|
65
|
-
align = _this$props.align
|
|
67
|
+
align = _this$props.align,
|
|
68
|
+
customProps = _this$props.customProps;
|
|
66
69
|
var count = threadCount === '0' ? '1' : threadCount;
|
|
67
|
-
return /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
70
|
+
return /*#__PURE__*/_react["default"].createElement(_Button["default"], _extends({
|
|
68
71
|
customClass: "".concat(_ThreadModule["default"].container, " ").concat(_ThreadModule["default"]["align_".concat(align)], " ").concat(className),
|
|
69
72
|
title: iconTitle,
|
|
70
73
|
dataId: dataId
|
|
71
|
-
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
74
|
+
}, customProps), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
72
75
|
name: "ZD-TK-thread",
|
|
73
76
|
size: "9"
|
|
74
77
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
@@ -86,11 +89,13 @@ Thread.propTypes = {
|
|
|
86
89
|
className: _propTypes["default"].string,
|
|
87
90
|
count: _propTypes["default"].string,
|
|
88
91
|
dataId: _propTypes["default"].string,
|
|
89
|
-
iconTitle: _propTypes["default"].string
|
|
92
|
+
iconTitle: _propTypes["default"].string,
|
|
93
|
+
customProps: _propTypes["default"].object
|
|
90
94
|
};
|
|
91
95
|
Thread.defaultProps = {
|
|
92
96
|
align: 'left',
|
|
93
|
-
className: ''
|
|
97
|
+
className: '',
|
|
98
|
+
customProps: {}
|
|
94
99
|
};
|
|
95
100
|
|
|
96
101
|
if (false) {
|
package/lib/utils/General.js
CHANGED
|
@@ -3,14 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.formatCurrency = formatCurrency;
|
|
7
6
|
exports.formatPhoneUrl = formatPhoneUrl;
|
|
8
7
|
exports.getFullName = getFullName;
|
|
9
8
|
exports.shallowDiff = shallowDiff;
|
|
10
9
|
exports.stopBubbling = stopBubbling;
|
|
11
10
|
|
|
12
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
13
|
-
|
|
14
11
|
function stopBubbling(event) {
|
|
15
12
|
event.preventDefault();
|
|
16
13
|
event.stopPropagation && event.stopPropagation();
|
|
@@ -58,25 +55,4 @@ function formatPhoneUrl(phone) {
|
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
return phone;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function formatCurrency(number, symbol) {
|
|
64
|
-
// format number 1000000 to 1,234,567
|
|
65
|
-
if (number && number != 0) {
|
|
66
|
-
var typeOfData = _typeof(number);
|
|
67
|
-
|
|
68
|
-
var isDecimal = typeOfData == 'string' ? number.indexOf('.') != -1 : !Number.isInteger(number);
|
|
69
|
-
|
|
70
|
-
if (isDecimal) {
|
|
71
|
-
var val = number.toString().split('.');
|
|
72
|
-
var arr1 = "".concat(val[0].replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ','));
|
|
73
|
-
var finalVal = "".concat(symbol).concat(arr1, ".").concat(val[1]);
|
|
74
|
-
return finalVal;
|
|
75
|
-
} else {
|
|
76
|
-
var value = "".concat(symbol).concat(number.toString().replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ','));
|
|
77
|
-
return value;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return number;
|
|
82
58
|
}
|
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-66",
|
|
4
4
|
"main": "lib/index",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"jsnext:main": "es/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"velocity-react": "^1.4.3",
|
|
34
34
|
"@zohodesk/variables": "1.0.0-beta.29",
|
|
35
35
|
"@zohodesk/i18n": "^1.0.0-beta.7",
|
|
36
|
-
"@zohodesk/components": "1.0.0-
|
|
36
|
+
"@zohodesk/components": "1.0.0-temp-49",
|
|
37
37
|
"@zohodesk/icons": "1.0.0-beta.92",
|
|
38
38
|
"@zohodesk/svg": "1.0.0-beta.41",
|
|
39
39
|
"@zohodesk/virtualizer": "1.0.3",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"velocity-react": "^1.4.3",
|
|
44
44
|
"@zohodesk/variables": "^1.0.0-beta.29",
|
|
45
45
|
"@zohodesk/i18n": "^1.0.0-beta.7",
|
|
46
|
-
"@zohodesk/components": "1.0.0-alpha-
|
|
46
|
+
"@zohodesk/components": "^1.0.0-alpha-228",
|
|
47
47
|
"@zohodesk/icons": "^1.0.0-beta.85",
|
|
48
|
-
"@zohodesk/svg": "1.0.0-beta.41"
|
|
48
|
+
"@zohodesk/svg": "^1.0.0-beta.41"
|
|
49
49
|
},
|
|
50
50
|
"react-cli": {
|
|
51
51
|
"preprocessor": {
|