@zohodesk/dot 1.0.0-temp-51 → 1.0.0-temp-55
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 -0
- package/es/Appearance/dark/mode/dotDarkMode.module.css +2 -1
- package/es/Appearance/dark/themes/blue/blueDarkDotTheme.module.css +9 -9
- package/es/Appearance/dark/themes/green/greenDarkDotTheme.module.css +8 -8
- package/es/Appearance/dark/themes/orange/orangeDarkDotTheme.module.css +8 -8
- package/es/Appearance/dark/themes/red/redDarkDotTheme.module.css +8 -8
- package/es/Appearance/dark/themes/yellow/yellowDarkDotTheme.module.css +8 -8
- package/es/Appearance/default/mode/dotDefaultMode.module.css +2 -1
- package/es/Appearance/default/themes/blue/blueDefaultDotTheme.module.css +9 -9
- package/es/Appearance/default/themes/green/greenDefaultDotTheme.module.css +8 -8
- package/es/Appearance/default/themes/orange/orangeDefaultDotTheme.module.css +8 -8
- package/es/Appearance/default/themes/red/redDefaultDotTheme.module.css +8 -8
- package/es/Appearance/default/themes/yellow/yellowDefaultDotTheme.module.css +8 -8
- package/es/form/fields/CheckBoxField/CheckBoxField.js +1 -1
- package/es/form/fields/CurrencyField/CurrencyField.js +2 -2
- package/es/form/fields/DateField/DateField.js +2 -2
- package/es/form/fields/Fields.module.css +7 -5
- package/es/form/fields/MultiSelectField/MultiSelectField.js +2 -2
- package/es/form/fields/RadioField/RadioField.js +2 -2
- package/es/form/fields/SelectField/SelectField.js +2 -2
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -4
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +2 -2
- package/es/form/fields/TextBoxField/TextBoxField.js +2 -2
- package/es/form/fields/TextEditorField/TextEditorField.js +2 -2
- package/es/form/fields/TextEditorWrapper/TextEditorWrapper.js +1 -1
- package/es/form/fields/TextareaField/TextareaField.js +2 -2
- package/es/form/layout/Section/Section.js +3 -7
- package/es/version2/GlobalNotification/GlobalNotification.js +18 -6
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +13 -5
- package/lib/Appearance/dark/mode/dotDarkMode.module.css +2 -1
- package/lib/Appearance/dark/themes/blue/blueDarkDotTheme.module.css +9 -9
- package/lib/Appearance/dark/themes/green/greenDarkDotTheme.module.css +8 -8
- package/lib/Appearance/dark/themes/orange/orangeDarkDotTheme.module.css +8 -8
- package/lib/Appearance/dark/themes/red/redDarkDotTheme.module.css +8 -8
- package/lib/Appearance/dark/themes/yellow/yellowDarkDotTheme.module.css +8 -8
- package/lib/Appearance/default/mode/dotDefaultMode.module.css +2 -1
- package/lib/Appearance/default/themes/blue/blueDefaultDotTheme.module.css +9 -9
- package/lib/Appearance/default/themes/green/greenDefaultDotTheme.module.css +8 -8
- package/lib/Appearance/default/themes/orange/orangeDefaultDotTheme.module.css +8 -8
- package/lib/Appearance/default/themes/red/redDefaultDotTheme.module.css +8 -8
- package/lib/Appearance/default/themes/yellow/yellowDefaultDotTheme.module.css +8 -8
- package/lib/form/fields/CheckBoxField/CheckBoxField.js +1 -1
- package/lib/form/fields/CurrencyField/CurrencyField.js +2 -2
- package/lib/form/fields/DateField/DateField.js +2 -2
- package/lib/form/fields/Fields.module.css +7 -5
- package/lib/form/fields/MultiSelectField/MultiSelectField.js +2 -2
- package/lib/form/fields/RadioField/RadioField.js +2 -2
- package/lib/form/fields/SelectField/SelectField.js +2 -2
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -4
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +2 -2
- package/lib/form/fields/TextBoxField/TextBoxField.js +2 -2
- package/lib/form/fields/TextEditorField/TextEditorField.js +2 -2
- package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.js +1 -1
- package/lib/form/fields/TextareaField/TextareaField.js +2 -2
- package/lib/form/layout/Section/Section.js +3 -7
- package/lib/version2/GlobalNotification/GlobalNotification.js +18 -6
- package/lib/version2/notification/DesktopNotification/DesktopNotification.js +13 -5
- package/package.json +8 -4
- package/preprocess/dotThemeColors.js +98 -0
- package/preprocess/index.js +1 -0
- package/preprocess/json/dotVariableJson.js +90 -0
- package/src/Appearance/dark/mode/dotDarkMode.module.css +2 -1
- package/src/Appearance/dark/themes/blue/blueDarkDotTheme.module.css +9 -9
- package/src/Appearance/dark/themes/green/greenDarkDotTheme.module.css +8 -8
- package/src/Appearance/dark/themes/orange/orangeDarkDotTheme.module.css +8 -8
- package/src/Appearance/dark/themes/red/redDarkDotTheme.module.css +8 -8
- package/src/Appearance/dark/themes/yellow/yellowDarkDotTheme.module.css +8 -8
- package/src/Appearance/default/mode/dotDefaultMode.module.css +2 -1
- package/src/Appearance/default/themes/blue/blueDefaultDotTheme.module.css +9 -9
- package/src/Appearance/default/themes/green/greenDefaultDotTheme.module.css +8 -8
- package/src/Appearance/default/themes/orange/orangeDefaultDotTheme.module.css +8 -8
- package/src/Appearance/default/themes/red/redDefaultDotTheme.module.css +8 -8
- package/src/Appearance/default/themes/yellow/yellowDefaultDotTheme.module.css +8 -8
- package/src/form/fields/CheckBoxField/CheckBoxField.js +7 -1
- package/src/form/fields/CurrencyField/CurrencyField.js +8 -2
- package/src/form/fields/DateField/DateField.js +8 -2
- package/src/form/fields/Fields.module.css +8 -5
- package/src/form/fields/MultiSelectField/MultiSelectField.js +8 -2
- package/src/form/fields/RadioField/RadioField.js +8 -2
- package/src/form/fields/SelectField/SelectField.js +8 -2
- package/src/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -4
- package/src/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +10 -2
- package/src/form/fields/TextBoxField/TextBoxField.js +8 -2
- package/src/form/fields/TextEditorField/TextEditorField.js +10 -2
- package/src/form/fields/TextEditorWrapper/TextEditorWrapper.js +1 -1
- package/src/form/fields/TextareaField/TextareaField.js +8 -2
- package/src/form/layout/Section/Section.js +10 -14
- package/src/version2/GlobalNotification/GlobalNotification.js +12 -4
- package/src/version2/notification/DesktopNotification/DesktopNotification.js +10 -3
|
@@ -52,7 +52,13 @@ export default class RadioField extends PureComponent {
|
|
|
52
52
|
} = customProps;
|
|
53
53
|
return (
|
|
54
54
|
<div
|
|
55
|
-
className={`${style.container} ${
|
|
55
|
+
className={`${style.container} ${
|
|
56
|
+
isDisabled
|
|
57
|
+
? style.disabled
|
|
58
|
+
: isReadOnly
|
|
59
|
+
? style.readonly
|
|
60
|
+
: ''
|
|
61
|
+
}`}
|
|
56
62
|
data-title={isDisabled ? title : ''}
|
|
57
63
|
>
|
|
58
64
|
{labelName && (
|
|
@@ -63,7 +69,7 @@ export default class RadioField extends PureComponent {
|
|
|
63
69
|
palette={
|
|
64
70
|
isMandatory ? 'mandatory' : isDisabled ? 'primary' : 'default'
|
|
65
71
|
}
|
|
66
|
-
customClass={`${isMandatory ? style.labelMandatory : ''}`}
|
|
72
|
+
customClass={`${style.fieldLabel} ${isMandatory ? style.labelMandatory : ''}`}
|
|
67
73
|
dataId={
|
|
68
74
|
isDisabled
|
|
69
75
|
? `${dataId}_label_disabled`
|
|
@@ -100,7 +100,13 @@ export default class SelectField extends PureComponent {
|
|
|
100
100
|
let uniqueId = htmlId ? htmlId : this.getNextId();
|
|
101
101
|
return (
|
|
102
102
|
<div
|
|
103
|
-
className={`${style.container} ${
|
|
103
|
+
className={`${style.container} ${
|
|
104
|
+
isDisabled
|
|
105
|
+
? style.disabled
|
|
106
|
+
: isReadOnly
|
|
107
|
+
? style.readonly
|
|
108
|
+
: ''
|
|
109
|
+
}`}
|
|
104
110
|
data-title={isDisabled ? title : ''}
|
|
105
111
|
>
|
|
106
112
|
{labelName && (
|
|
@@ -115,7 +121,7 @@ export default class SelectField extends PureComponent {
|
|
|
115
121
|
? 'primary'
|
|
116
122
|
: labelPalette
|
|
117
123
|
}
|
|
118
|
-
customClass={`${labelCustomClass} ${
|
|
124
|
+
customClass={`${style.fieldLabel} ${labelCustomClass} ${
|
|
119
125
|
isMandatory ? style.labelMandatory : ''
|
|
120
126
|
}`}
|
|
121
127
|
htmlFor={uniqueId}
|
|
@@ -141,10 +141,10 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
141
141
|
<Box className={style.tag} key={index}>
|
|
142
142
|
<Tag
|
|
143
143
|
text={name}
|
|
144
|
-
onRemove={deleteTag.bind(this, name)}
|
|
144
|
+
onRemove={isReadOnly ? null : deleteTag.bind(this, name)}
|
|
145
145
|
closeTitle={i18nKeys.deleteText}
|
|
146
146
|
palette={tagType === 'SYSTEM' ? 'primary' : 'default'}
|
|
147
|
-
|
|
147
|
+
isReadOnly={isReadOnly}
|
|
148
148
|
/>
|
|
149
149
|
</Box>
|
|
150
150
|
) : null;
|
|
@@ -176,7 +176,7 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
176
176
|
isReadOnly={isReadOnly}
|
|
177
177
|
ref={this.textBoxRef}
|
|
178
178
|
needBorder={false}
|
|
179
|
-
placeHolder={tagsList.length ? '' : '-'}
|
|
179
|
+
placeHolder={tagsList.length ? '' : (i18nKeys.placeholderText || '-')}
|
|
180
180
|
onClick={!isReadOnly ? handleTogglePopup : undefined}
|
|
181
181
|
customClass={{
|
|
182
182
|
customTBoxWrap: style.custmInp,
|
|
@@ -308,7 +308,8 @@ TagsMultiSelect.propTypes = {
|
|
|
308
308
|
errorMessage: PropTypes.string.isRequired,
|
|
309
309
|
deleteText: PropTypes.string.isRequired,
|
|
310
310
|
lessText: PropTypes.string.isRequired,
|
|
311
|
-
moreText: PropTypes.string.isRequired
|
|
311
|
+
moreText: PropTypes.string.isRequired,
|
|
312
|
+
placeholderText: PropTypes.string
|
|
312
313
|
}),
|
|
313
314
|
borderColor: PropTypes.oneOf(['transparent', 'default', 'dark']),
|
|
314
315
|
needBorder: PropTypes.bool,
|
|
@@ -168,7 +168,15 @@ const TagsMultiSelectField = props => {
|
|
|
168
168
|
}, []);
|
|
169
169
|
|
|
170
170
|
return (
|
|
171
|
-
<div
|
|
171
|
+
<div
|
|
172
|
+
className={`${style.container} ${
|
|
173
|
+
isDisabled
|
|
174
|
+
? fieldStyle.disabled
|
|
175
|
+
: isReadOnly
|
|
176
|
+
? fieldStyle.readonly
|
|
177
|
+
: ''
|
|
178
|
+
}`}
|
|
179
|
+
>
|
|
172
180
|
<Container alignBox='row' align='baseline' isCover={false}>
|
|
173
181
|
{labelName && (
|
|
174
182
|
<Label
|
|
@@ -179,7 +187,7 @@ const TagsMultiSelectField = props => {
|
|
|
179
187
|
palette={
|
|
180
188
|
isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette
|
|
181
189
|
}
|
|
182
|
-
customClass={`${isMandatory ? fieldStyle.labelMandatory : ''} ${
|
|
190
|
+
customClass={`${fieldStyle.fieldLabel} ${isMandatory ? fieldStyle.labelMandatory : ''} ${
|
|
183
191
|
labelClass ? labelClass : ''
|
|
184
192
|
}`}
|
|
185
193
|
dataId={
|
|
@@ -88,7 +88,13 @@ export default class TextBoxField extends PureComponent {
|
|
|
88
88
|
|
|
89
89
|
return (
|
|
90
90
|
<div
|
|
91
|
-
className={`${style.container} ${
|
|
91
|
+
className={`${style.container} ${
|
|
92
|
+
isDisabled
|
|
93
|
+
? style.disabled
|
|
94
|
+
: isReadOnly
|
|
95
|
+
? style.readonly
|
|
96
|
+
: ''
|
|
97
|
+
}`}
|
|
92
98
|
data-title={isDisabled ? title : ''}
|
|
93
99
|
>
|
|
94
100
|
{labelName && (
|
|
@@ -103,7 +109,7 @@ export default class TextBoxField extends PureComponent {
|
|
|
103
109
|
? 'primary'
|
|
104
110
|
: labelPalette
|
|
105
111
|
}
|
|
106
|
-
customClass={`${labelCustomClass} ${
|
|
112
|
+
customClass={`${style.fieldLabel} ${labelCustomClass} ${
|
|
107
113
|
isMandatory ? style.labelMandatory : ''
|
|
108
114
|
}`}
|
|
109
115
|
htmlFor={uniqueId}
|
|
@@ -98,7 +98,15 @@ export default class TextEditorField extends PureComponent {
|
|
|
98
98
|
} = customProps;
|
|
99
99
|
let { ePhiTitle = '', ePhiText = '', ePhiStatus = false } = ePhiData;
|
|
100
100
|
return (
|
|
101
|
-
<div
|
|
101
|
+
<div
|
|
102
|
+
className={`${style.container} ${
|
|
103
|
+
isDisabled
|
|
104
|
+
? style.disabled
|
|
105
|
+
: isReadOnly
|
|
106
|
+
? style.readonly
|
|
107
|
+
: ''
|
|
108
|
+
} ${className || ''}`}
|
|
109
|
+
>
|
|
102
110
|
<Container isCover={false} alignBox='row' align='vertical'>
|
|
103
111
|
{labelName && (
|
|
104
112
|
<Box>
|
|
@@ -114,7 +122,7 @@ export default class TextEditorField extends PureComponent {
|
|
|
114
122
|
: labelPalette
|
|
115
123
|
}
|
|
116
124
|
onClick={this.handleLabelClick}
|
|
117
|
-
customClass={`${labelCustomClass} ${
|
|
125
|
+
customClass={`${style.fieldLabel} ${labelCustomClass} ${
|
|
118
126
|
isMandatory ? style.labelMandatory : ''
|
|
119
127
|
}`}
|
|
120
128
|
dataId={
|
|
@@ -47,7 +47,7 @@ export default class TextEditorWrapper extends Component {
|
|
|
47
47
|
) {
|
|
48
48
|
this.setState({ isEditorShow: true });
|
|
49
49
|
} else {
|
|
50
|
-
if (!this.state.isEditorFocus) {
|
|
50
|
+
if (!this.state.isEditorFocus && !this.props.isEditorDefaultOpen) {
|
|
51
51
|
this.setState({ isEditorShow: false });
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -87,7 +87,13 @@ export default class TextareaField extends PureComponent {
|
|
|
87
87
|
let uniqueId = htmlId ? htmlId : this.getNextId();
|
|
88
88
|
return (
|
|
89
89
|
<div
|
|
90
|
-
className={`${style.container} ${
|
|
90
|
+
className={`${style.container} ${
|
|
91
|
+
isDisabled
|
|
92
|
+
? style.disabled
|
|
93
|
+
: isReadOnly
|
|
94
|
+
? style.readonly
|
|
95
|
+
: ''
|
|
96
|
+
}`}
|
|
91
97
|
data-title={isDisabled ? title : ''}
|
|
92
98
|
>
|
|
93
99
|
{labelName && (
|
|
@@ -103,7 +109,7 @@ export default class TextareaField extends PureComponent {
|
|
|
103
109
|
? 'primary'
|
|
104
110
|
: labelPalette
|
|
105
111
|
}
|
|
106
|
-
customClass={`${labelCustomClass} ${
|
|
112
|
+
customClass={`${style.fieldLabel} ${labelCustomClass} ${
|
|
107
113
|
isMandatory ? style.labelMandatory : ''
|
|
108
114
|
}`}
|
|
109
115
|
htmlFor={uniqueId}
|
|
@@ -14,21 +14,18 @@ export default class Section extends Component {
|
|
|
14
14
|
titleClass,
|
|
15
15
|
className,
|
|
16
16
|
column,
|
|
17
|
-
formName
|
|
18
|
-
innerContainerClass
|
|
17
|
+
formName
|
|
19
18
|
} = this.props;
|
|
20
19
|
return (
|
|
21
20
|
<div data-id={dataId} className={containerClass ? containerClass : ''}>
|
|
22
|
-
<div className={
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
{this.props.children}
|
|
31
|
-
</div>
|
|
21
|
+
{title && <div className={titleClass ? titleClass : ''}>{title}</div>}
|
|
22
|
+
<div
|
|
23
|
+
className={`${className ? className : ''} ${
|
|
24
|
+
column == 'single' ? style.singleColumn : ''
|
|
25
|
+
}`}
|
|
26
|
+
data-id={formName && formName}
|
|
27
|
+
>
|
|
28
|
+
{this.props.children}
|
|
32
29
|
</div>
|
|
33
30
|
</div>
|
|
34
31
|
);
|
|
@@ -40,8 +37,7 @@ Section.propTypes = {
|
|
|
40
37
|
containerClass: PropTypes.string,
|
|
41
38
|
dataId: PropTypes.string,
|
|
42
39
|
title: PropTypes.string,
|
|
43
|
-
titleClass: PropTypes.string
|
|
44
|
-
innerContainerClass: PropTypes.string
|
|
40
|
+
titleClass: PropTypes.string
|
|
45
41
|
};
|
|
46
42
|
if (__DOCS__) {
|
|
47
43
|
Section.docs = {
|
|
@@ -36,7 +36,7 @@ export default class GlobalNotification extends React.Component {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
render() {
|
|
39
|
-
let { type, message, hideMessage, onClick,i18nKeys={} } = this.props;
|
|
39
|
+
let { type, message, hideMessage, onClick, i18nKeys={}, customProps } = this.props;
|
|
40
40
|
let { closeTitle = 'Close' } = i18nKeys;
|
|
41
41
|
return (
|
|
42
42
|
<GlobalNotificationUI
|
|
@@ -45,6 +45,7 @@ export default class GlobalNotification extends React.Component {
|
|
|
45
45
|
hideMessage={hideMessage}
|
|
46
46
|
onClick={onClick}
|
|
47
47
|
closeTitle={closeTitle}
|
|
48
|
+
customProps={customProps}
|
|
48
49
|
/>
|
|
49
50
|
);
|
|
50
51
|
}
|
|
@@ -56,8 +57,14 @@ GlobalNotification.propTypes = {
|
|
|
56
57
|
onClick: PropTypes.func,
|
|
57
58
|
showMessage: PropTypes.bool,
|
|
58
59
|
type: PropTypes.oneOf(['success', 'danger', 'info', 'warning', 'error']),
|
|
59
|
-
i18nKeys: PropTypes.object
|
|
60
|
+
i18nKeys: PropTypes.object,
|
|
61
|
+
customProps:PropTypes.shape({
|
|
62
|
+
ExtraProps: PropTypes.object
|
|
63
|
+
})
|
|
60
64
|
};
|
|
65
|
+
GlobalNotification.defaultProps = {
|
|
66
|
+
customProps: {}
|
|
67
|
+
}
|
|
61
68
|
if (__DOCS__) {
|
|
62
69
|
GlobalNotification.docs = {
|
|
63
70
|
componentGroup: 'GlobalNotification',
|
|
@@ -71,9 +78,10 @@ export function GlobalNotificationUI(props) {
|
|
|
71
78
|
hideMessage && hideMessage(e);
|
|
72
79
|
onClose && onClose(e);
|
|
73
80
|
}
|
|
74
|
-
let { type = '', message, onClick, closeTitle='' } = props;
|
|
81
|
+
let { type = '', message, onClick, closeTitle='', customProps={} } = props;
|
|
82
|
+
let { ExtraProps={} } = customProps;
|
|
75
83
|
return (
|
|
76
|
-
<div className={`${style.message} ${type ? style[type] : ''}`} data-id={`show_${type}_message`}>
|
|
84
|
+
<div className={`${style.message} ${type ? style[type] : ''}`} data-id={`show_${type}_message`} {...ExtraProps} >
|
|
77
85
|
<Container
|
|
78
86
|
className={`${style.container}`}
|
|
79
87
|
alignBox='row'
|
|
@@ -58,11 +58,13 @@ export function DesktopNotificationUI(props) {
|
|
|
58
58
|
onClose,
|
|
59
59
|
needClose,
|
|
60
60
|
customClass = {},
|
|
61
|
-
i18nKeys = {}
|
|
61
|
+
i18nKeys = {},
|
|
62
|
+
customProps
|
|
62
63
|
} = props;
|
|
63
64
|
let { closeTitle = 'Close' } = i18nKeys;
|
|
64
65
|
let { containerClass } = customClass;
|
|
65
66
|
let { buttonPalette = 'dangerFilled' } = buttonPaletteObject[type] || {};
|
|
67
|
+
let { ExtraProps={} } = customProps;
|
|
66
68
|
|
|
67
69
|
function onClickSubmit(e) {
|
|
68
70
|
onSubmit && onSubmit();
|
|
@@ -94,6 +96,7 @@ export function DesktopNotificationUI(props) {
|
|
|
94
96
|
isCover={false}
|
|
95
97
|
dataId={dataId}
|
|
96
98
|
isInline={uiVariantTwo}
|
|
99
|
+
{...ExtraProps}
|
|
97
100
|
>
|
|
98
101
|
<Box>
|
|
99
102
|
<DesktopNotificationHeader
|
|
@@ -227,7 +230,10 @@ DesktopNotification.propTypes = {
|
|
|
227
230
|
'info',
|
|
228
231
|
'notification',
|
|
229
232
|
'alarm'
|
|
230
|
-
])
|
|
233
|
+
]),
|
|
234
|
+
customProps:PropTypes.shape({
|
|
235
|
+
ExtraProps: PropTypes.object
|
|
236
|
+
})
|
|
231
237
|
};
|
|
232
238
|
DesktopNotification.defaultProps = {
|
|
233
239
|
isMore: false,
|
|
@@ -240,7 +246,8 @@ DesktopNotification.defaultProps = {
|
|
|
240
246
|
needIcon: true,
|
|
241
247
|
titleVariant: 'primary',
|
|
242
248
|
isShrinkView: false,
|
|
243
|
-
needClose: true
|
|
249
|
+
needClose: true,
|
|
250
|
+
customProps: {}
|
|
244
251
|
};
|
|
245
252
|
|
|
246
253
|
if (__DOCS__) {
|