@zohodesk/dot 1.0.0-beta.227 → 1.0.0-beta.229
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/es/ActionButton/ActionButton.js +7 -3
- package/es/Provider.js +6 -104
- package/es/deprecated/SelectDropdown/SelectDropdown.js +59 -35
- package/es/deprecated/SelectDropdown/SelectDropdown.module.css +1 -0
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +183 -160
- package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +3 -0
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +93 -65
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +7 -3
- package/es/list/GridStencils/GridStencils.module.css +7 -18
- package/es/list/status/StatusDropdown/StatusDropdown.js +103 -80
- package/es/list/status/StatusDropdown/StatusDropdown.module.css +3 -0
- package/es/lookup/header/ViewDropDown/ViewDropDown.js +79 -54
- package/lib/ActionButton/ActionButton.js +7 -3
- package/lib/Provider.js +7 -122
- package/lib/deprecated/SelectDropdown/SelectDropdown.js +60 -38
- package/lib/deprecated/SelectDropdown/SelectDropdown.module.css +1 -0
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +182 -161
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.module.css +3 -0
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +91 -65
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +7 -3
- package/lib/list/GridStencils/GridStencils.module.css +7 -18
- package/lib/list/status/StatusDropdown/StatusDropdown.js +102 -81
- package/lib/list/status/StatusDropdown/StatusDropdown.module.css +3 -0
- package/lib/lookup/header/ViewDropDown/ViewDropDown.js +75 -52
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.0.0-beta.229
|
|
6
|
+
|
|
7
|
+
- TagsMultiSelect,TagsMultiSelectField => clickableTag prop added
|
|
8
|
+
- GridStencils => margin, width removed in css
|
|
9
|
+
|
|
10
|
+
# 1.0.0-beta.228
|
|
11
|
+
|
|
12
|
+
- ResponsiveDropBox Implemented for all DropBox
|
|
5
13
|
|
|
6
14
|
# 1.0.0-beta.227
|
|
7
15
|
|
|
@@ -4,7 +4,7 @@ import Popup from '@zohodesk/components/lib/Popup/Popup';
|
|
|
4
4
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
5
5
|
import Button from '@zohodesk/components/lib/Button/Button';
|
|
6
6
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
7
|
-
import
|
|
7
|
+
import ResponsiveDropBox from '@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox';
|
|
8
8
|
import CssProvider from '@zohodesk/components/lib/Provider/CssProvider';
|
|
9
9
|
import style from './ActionButton.module.css';
|
|
10
10
|
export class ActionButton extends React.Component {
|
|
@@ -104,7 +104,7 @@ export class ActionButton extends React.Component {
|
|
|
104
104
|
name: "ZD-down",
|
|
105
105
|
size: "6",
|
|
106
106
|
iconClass: style.arrow
|
|
107
|
-
})), isPopupOpen ? /*#__PURE__*/React.createElement(
|
|
107
|
+
})), isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
108
108
|
size: "small",
|
|
109
109
|
isActive: isPopupOpen,
|
|
110
110
|
boxPosition: position,
|
|
@@ -115,7 +115,11 @@ export class ActionButton extends React.Component {
|
|
|
115
115
|
},
|
|
116
116
|
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
117
117
|
getRef: getContainerRef
|
|
118
|
-
},
|
|
118
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
119
|
+
flexible: true,
|
|
120
|
+
shrink: true,
|
|
121
|
+
scroll: "vertical"
|
|
122
|
+
}, children)) : null) : null));
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
}
|
package/es/Provider.js
CHANGED
|
@@ -4,6 +4,7 @@ import { Container } from '@zohodesk/components/lib/Layout';
|
|
|
4
4
|
import AppContainer from '@zohodesk/components/lib/AppContainer/AppContainer';
|
|
5
5
|
import LibraryContext from '@zohodesk/components/lib/Provider/LibraryContextInit';
|
|
6
6
|
import datetime from '@zohodesk/datetimejs';
|
|
7
|
+
import ThemeTool from '../../common/lib/ThemeTool/ThemeTool';
|
|
7
8
|
import i18n from './i18n';
|
|
8
9
|
/* component pkg - default mode & themes */
|
|
9
10
|
|
|
@@ -109,6 +110,7 @@ export default class Provider extends React.Component {
|
|
|
109
110
|
themeName: 'blue'
|
|
110
111
|
};
|
|
111
112
|
this.setTheme = this.setTheme.bind(this);
|
|
113
|
+
this.setAppearance = this.setAppearance.bind(this);
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
setAppearance(mode) {
|
|
@@ -128,51 +130,6 @@ export default class Provider extends React.Component {
|
|
|
128
130
|
appearanceName,
|
|
129
131
|
themeName
|
|
130
132
|
} = this.state;
|
|
131
|
-
let themeClass = {
|
|
132
|
-
width: '20px',
|
|
133
|
-
height: '20px',
|
|
134
|
-
borderRadius: '3px',
|
|
135
|
-
display: 'flex',
|
|
136
|
-
border: '1px solid #ccc',
|
|
137
|
-
margin: '0 5px',
|
|
138
|
-
cursor: 'pointer',
|
|
139
|
-
backgroundColor: '#0a73eb'
|
|
140
|
-
};
|
|
141
|
-
let green = {
|
|
142
|
-
backgroundColor: '#26a942'
|
|
143
|
-
};
|
|
144
|
-
let red = {
|
|
145
|
-
backgroundColor: '#de3535'
|
|
146
|
-
};
|
|
147
|
-
let orange = {
|
|
148
|
-
backgroundColor: '#e57717'
|
|
149
|
-
};
|
|
150
|
-
let yellow = {
|
|
151
|
-
backgroundColor: '#e8b923'
|
|
152
|
-
};
|
|
153
|
-
let light = {
|
|
154
|
-
backgroundColor: '#fff'
|
|
155
|
-
};
|
|
156
|
-
let night = {
|
|
157
|
-
backgroundColor: '#232b38'
|
|
158
|
-
};
|
|
159
|
-
let dark = {
|
|
160
|
-
backgroundColor: '#212121'
|
|
161
|
-
};
|
|
162
|
-
let fixedPosition = {
|
|
163
|
-
position: 'fixed',
|
|
164
|
-
bottom: '0',
|
|
165
|
-
backgroundColor: '#272727',
|
|
166
|
-
padding: '10px',
|
|
167
|
-
borderRadius: '15px 15px 0 0',
|
|
168
|
-
minWidth: '100px',
|
|
169
|
-
textAlign: 'center',
|
|
170
|
-
boxShadow: '0 0 3px #000',
|
|
171
|
-
fontSize: '12px',
|
|
172
|
-
zIndex: '3',
|
|
173
|
-
display: 'flex',
|
|
174
|
-
alignItems: 'center'
|
|
175
|
-
};
|
|
176
133
|
return /*#__PURE__*/React.createElement(I18NProvider, {
|
|
177
134
|
i18n: i18n,
|
|
178
135
|
timeZone: "Asia/Kolkata",
|
|
@@ -194,65 +151,10 @@ export default class Provider extends React.Component {
|
|
|
194
151
|
}
|
|
195
152
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
196
153
|
scroll: "vertical"
|
|
197
|
-
}, this.props.children), /*#__PURE__*/React.createElement(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
})
|
|
202
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
203
|
-
style: {
|
|
204
|
-
color: '#fff'
|
|
205
|
-
}
|
|
206
|
-
}, "Appearance:"), /*#__PURE__*/React.createElement("div", {
|
|
207
|
-
style: {
|
|
208
|
-
display: 'flex'
|
|
209
|
-
}
|
|
210
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
211
|
-
title: "Light Mode",
|
|
212
|
-
style: Object.assign({}, themeClass, light),
|
|
213
|
-
onClick: () => this.setAppearance('default')
|
|
214
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
215
|
-
title: "Night Mode",
|
|
216
|
-
style: Object.assign({}, themeClass, night),
|
|
217
|
-
onClick: () => this.setAppearance('dark')
|
|
218
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
219
|
-
title: "Dark Mode",
|
|
220
|
-
style: Object.assign({}, themeClass, dark),
|
|
221
|
-
onClick: () => this.setAppearance('pureDark')
|
|
222
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
223
|
-
style: Object.assign({}, fixedPosition, {
|
|
224
|
-
left: '80%',
|
|
225
|
-
transform: 'translate(-80%)'
|
|
226
|
-
})
|
|
227
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
228
|
-
style: {
|
|
229
|
-
color: '#fff'
|
|
230
|
-
}
|
|
231
|
-
}, "Themes:"), /*#__PURE__*/React.createElement("div", {
|
|
232
|
-
style: {
|
|
233
|
-
display: 'flex'
|
|
234
|
-
}
|
|
235
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
236
|
-
title: "Blue Theme",
|
|
237
|
-
style: themeClass,
|
|
238
|
-
onClick: () => this.setTheme('blue')
|
|
239
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
240
|
-
title: "Green Theme",
|
|
241
|
-
style: Object.assign({}, themeClass, green),
|
|
242
|
-
onClick: () => this.setTheme('green')
|
|
243
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
244
|
-
title: "Red Theme",
|
|
245
|
-
style: Object.assign({}, themeClass, red),
|
|
246
|
-
onClick: () => this.setTheme('red')
|
|
247
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
248
|
-
title: "Orange Theme",
|
|
249
|
-
style: Object.assign({}, themeClass, orange),
|
|
250
|
-
onClick: () => this.setTheme('orange')
|
|
251
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
252
|
-
title: "Yellow Theme",
|
|
253
|
-
style: Object.assign({}, themeClass, yellow),
|
|
254
|
-
onClick: () => this.setTheme('yellow')
|
|
255
|
-
}))))));
|
|
154
|
+
}, this.props.children), /*#__PURE__*/React.createElement(ThemeTool, {
|
|
155
|
+
onThemeChange: this.setTheme,
|
|
156
|
+
onAppearanceChange: this.setAppearance
|
|
157
|
+
}))));
|
|
256
158
|
}
|
|
257
159
|
|
|
258
160
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import DropBox from '@zohodesk/components/lib/DropBox/DropBox';
|
|
4
3
|
import Popup from '@zohodesk/components/lib/Popup/Popup';
|
|
5
4
|
import ListItem from '@zohodesk/components/lib/ListItem/ListItem';
|
|
6
5
|
import TextBox from '@zohodesk/components/lib/TextBox/TextBox';
|
|
7
6
|
import DropDownHeading from '@zohodesk/components/lib/DropDown/DropDownHeading';
|
|
8
7
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
9
8
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
9
|
+
import ResponsiveDropBox from '@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox';
|
|
10
|
+
import { ResponsiveReceiver } from '@zohodesk/components/lib/Responsive/CustomResponsive';
|
|
10
11
|
import style from './SelectDropdown.module.css';
|
|
11
12
|
|
|
12
13
|
class SelectDropdown extends React.Component {
|
|
@@ -32,6 +33,17 @@ class SelectDropdown extends React.Component {
|
|
|
32
33
|
togglePopup(e, 'bottomRight');
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
responsiveFunc(_ref) {
|
|
37
|
+
let {
|
|
38
|
+
mediaQueryOR
|
|
39
|
+
} = _ref;
|
|
40
|
+
return {
|
|
41
|
+
tabletMode: mediaQueryOR([{
|
|
42
|
+
maxWidth: 700
|
|
43
|
+
}])
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
35
47
|
render() {
|
|
36
48
|
let {
|
|
37
49
|
title,
|
|
@@ -63,40 +75,52 @@ class SelectDropdown extends React.Component {
|
|
|
63
75
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
64
76
|
name: "ZD-down1",
|
|
65
77
|
size: "6"
|
|
66
|
-
})), /*#__PURE__*/React.createElement(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
78
|
+
})), /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
79
|
+
query: this.responsiveFunc,
|
|
80
|
+
responsiveId: "Helmet"
|
|
81
|
+
}, _ref2 => {
|
|
82
|
+
let {
|
|
83
|
+
tabletMode
|
|
84
|
+
} = _ref2;
|
|
85
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
86
|
+
size: "medium",
|
|
87
|
+
boxPosition: "bottomRight",
|
|
88
|
+
isArrow: true,
|
|
89
|
+
isAnimate: true,
|
|
90
|
+
right: "-25",
|
|
91
|
+
isActive: isPopupOpen && isPopupReady,
|
|
92
|
+
getRef: getContainerRef,
|
|
93
|
+
isResponsivePadding: true,
|
|
94
|
+
alignBox: "row"
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
96
|
+
flexible: true
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
98
|
+
alignBox: "column",
|
|
99
|
+
className: `${tabletMode ? '' : style.rulesPopup}`
|
|
100
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
101
|
+
className: style.rulesDepart
|
|
102
|
+
}, /*#__PURE__*/React.createElement(DropDownHeading, {
|
|
103
|
+
text: title
|
|
104
|
+
})), isSearchRequired ? /*#__PURE__*/React.createElement(Box, {
|
|
105
|
+
className: style.searchDepart
|
|
106
|
+
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
107
|
+
name: "Test",
|
|
108
|
+
id: "Test",
|
|
109
|
+
maxLength: "150",
|
|
110
|
+
placeHolder: "Search Department"
|
|
111
|
+
})) : null, /*#__PURE__*/React.createElement(Box, {
|
|
112
|
+
scroll: "vertical",
|
|
113
|
+
flexible: true,
|
|
114
|
+
shrink: true
|
|
115
|
+
}, options && options.length && options.map((obj, index) => /*#__PURE__*/React.createElement(ListItem, {
|
|
116
|
+
key: index,
|
|
117
|
+
autoHover: true,
|
|
118
|
+
value: obj[valueKey],
|
|
119
|
+
active: selectedId == obj[idKey],
|
|
120
|
+
id: obj[idKey],
|
|
121
|
+
onClick: this.handleClick
|
|
122
|
+
}))))));
|
|
123
|
+
}));
|
|
100
124
|
}
|
|
101
125
|
|
|
102
126
|
}
|