@agilemotion/oui-react-js 1.8.43 → 1.8.44
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/dist/ApplicationManager.js +10 -8
- package/dist/InteractionPortalApp.js +0 -1
- package/dist/InteractionPortalAppHome.js +69 -3
- package/dist/RestService.js +3 -3
- package/dist/Utils.js +7 -0
- package/dist/assets/jss/components/customInputStyle.js +0 -1
- package/dist/assets/jss/components/customInputStyle.jsx +0 -1
- package/dist/components/DataGrid.js +6 -2
- package/dist/components/SocketManager.js +4 -2
- package/dist/components/TitleBar.js +1 -1
- package/dist/components/Toolbar.js +1 -1
- package/dist/components/customInput/CustomInput.js +4 -1
- package/dist/components/dashboard/FoldingSideTabDashboard.css +3 -0
- package/dist/components/dashboard/FoldingSideTabDashboard.js +24 -12
- package/dist/components/dashboard/SideMenuModuleDashboard.css +6 -5
- package/dist/components/dashboard/SideMenuModuleDashboard.js +5 -2
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.css +94 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +111 -203
- package/dist/components/form/BaseField.js +1 -1
- package/dist/components/form/Form.css +2 -3
- package/dist/components/form/Form.js +5 -1
- package/dist/components/layout/Layout.css +8 -0
- package/dist/components/layout/Layout.js +10 -1
- package/dist/components/layout/View.css +20 -6
- package/dist/components/layout/View.js +32 -1
- package/dist/components/layout/Window.js +1 -0
- package/dist/components/media/Chat.css +0 -0
- package/dist/components/media/Chat.js +86 -0
- package/dist/components/media/chat/ChatRoom.js +19 -12
- package/dist/components/signatures/AgilitySignaturePanel.js +2 -1
- package/package.json +1 -1
|
@@ -16,11 +16,6 @@ require("./FoldingTabSidebar.css");
|
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
/*eslint-disable*/
|
|
18
18
|
|
|
19
|
-
// javascript plugin used to create scrollbars on windows
|
|
20
|
-
|
|
21
|
-
// reactstrap components
|
|
22
|
-
|
|
23
|
-
let ps;
|
|
24
19
|
const TAB = 16;
|
|
25
20
|
class FoldingTabSidebar extends _react.default.Component {
|
|
26
21
|
constructor(props) {
|
|
@@ -29,21 +24,25 @@ class FoldingTabSidebar extends _react.default.Component {
|
|
|
29
24
|
...this.getCollapseStates(props.routes),
|
|
30
25
|
isLoading: false,
|
|
31
26
|
error: false,
|
|
27
|
+
routes: undefined,
|
|
32
28
|
activeRouteMenu: {
|
|
33
29
|
id: 'dashboard',
|
|
34
30
|
name: 'Dashboard'
|
|
35
31
|
}
|
|
36
32
|
};
|
|
37
33
|
}
|
|
34
|
+
|
|
35
|
+
/* ----------------- menu building helpers ----------------- */
|
|
38
36
|
getViews = (menus, level) => {
|
|
39
|
-
|
|
37
|
+
const newViews = [];
|
|
40
38
|
for (let i = 0; i < menus.length; i++) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
const createView = {
|
|
40
|
+
name: menus[i].attributes.label,
|
|
41
|
+
id: menus[i].id,
|
|
42
|
+
mini: 'SS',
|
|
43
|
+
layout: '/admin',
|
|
44
|
+
level
|
|
45
|
+
};
|
|
47
46
|
if (menus[i].subMenu) {
|
|
48
47
|
createView.collapse = true;
|
|
49
48
|
createView.state = menus[i].id + 'Collapse';
|
|
@@ -53,19 +52,19 @@ class FoldingTabSidebar extends _react.default.Component {
|
|
|
53
52
|
}
|
|
54
53
|
newViews.push(createView);
|
|
55
54
|
}
|
|
56
|
-
console.log('VIEWS : ', newViews, menus);
|
|
57
55
|
return newViews;
|
|
58
56
|
};
|
|
59
57
|
getItems = (items, level) => {
|
|
60
|
-
|
|
58
|
+
const newItems = [];
|
|
61
59
|
for (let i = 0; i < items.length; i++) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
const createItem = {
|
|
61
|
+
name: items[i].attributes.label,
|
|
62
|
+
id: items[i].id,
|
|
63
|
+
mini: 'SS',
|
|
64
|
+
layout: '/admin',
|
|
65
|
+
item: items[i],
|
|
66
|
+
level
|
|
67
|
+
};
|
|
69
68
|
if (!_Utils.default.isNull(items[i].subMenu)) {
|
|
70
69
|
createItem.collapse = true;
|
|
71
70
|
createItem.state = items[i].id + 'SubMenuCollapse';
|
|
@@ -75,13 +74,10 @@ class FoldingTabSidebar extends _react.default.Component {
|
|
|
75
74
|
}
|
|
76
75
|
return newItems;
|
|
77
76
|
};
|
|
78
|
-
|
|
79
|
-
// this creates the intial state of this component based on the collapse routes
|
|
80
|
-
// that it gets through this.state.routes
|
|
81
77
|
getCollapseStates = routes => {
|
|
82
78
|
let initialState = {};
|
|
83
79
|
if (routes) {
|
|
84
|
-
routes.
|
|
80
|
+
routes.forEach(prop => {
|
|
85
81
|
if (prop.collapse) {
|
|
86
82
|
initialState = {
|
|
87
83
|
[prop.state]: this.getCollapseInitialState(prop.views),
|
|
@@ -89,22 +85,14 @@ class FoldingTabSidebar extends _react.default.Component {
|
|
|
89
85
|
...initialState
|
|
90
86
|
};
|
|
91
87
|
}
|
|
92
|
-
return null;
|
|
93
88
|
});
|
|
94
89
|
}
|
|
95
90
|
return initialState;
|
|
96
91
|
};
|
|
97
|
-
// this verifies if any of the collapses should be default opened on a rerender of this component
|
|
98
|
-
// for example, on the refresh of the page,
|
|
99
|
-
// while on the src/views/forms/RegularForms.js - route /admin/regular-forms
|
|
100
92
|
getCollapseInitialState(routes) {
|
|
101
|
-
if (!routes)
|
|
102
|
-
return false;
|
|
103
|
-
}
|
|
93
|
+
if (!routes) return false;
|
|
104
94
|
for (let i = 0; i < routes.length; i++) {
|
|
105
|
-
if (!routes[i].views)
|
|
106
|
-
return true;
|
|
107
|
-
}
|
|
95
|
+
if (!routes[i].views) return true;
|
|
108
96
|
if (routes[i].collapse && this.getCollapseInitialState(routes[i].views)) {
|
|
109
97
|
return true;
|
|
110
98
|
} else if (window.location.href.indexOf(routes[i].path) !== -1) {
|
|
@@ -113,52 +101,44 @@ class FoldingTabSidebar extends _react.default.Component {
|
|
|
113
101
|
}
|
|
114
102
|
return false;
|
|
115
103
|
}
|
|
116
|
-
getMenu = route => {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return 'dashboard-sidebar';
|
|
135
|
-
}
|
|
104
|
+
getMenu = route => new Promise(resolve => {
|
|
105
|
+
const service = {
|
|
106
|
+
url: '/ui/api/v1/menu/get',
|
|
107
|
+
parameters: [{
|
|
108
|
+
name: 'id',
|
|
109
|
+
value: route.menu,
|
|
110
|
+
httpParameterType: 'QUERY_PARAMETER'
|
|
111
|
+
}, {
|
|
112
|
+
name: 'version',
|
|
113
|
+
value: 1.0,
|
|
114
|
+
httpParameterType: 'QUERY_PARAMETER'
|
|
115
|
+
}],
|
|
116
|
+
contentType: 'application/json'
|
|
117
|
+
};
|
|
118
|
+
(0, _RestUtils.invokeRest)(service, {
|
|
119
|
+
api: {
|
|
120
|
+
get id() {
|
|
121
|
+
return 'dashboard-sidebar';
|
|
136
122
|
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
};
|
|
145
|
-
getLiClassName = prop => {
|
|
146
|
-
return "li-" + prop.level;
|
|
147
|
-
};
|
|
123
|
+
}
|
|
124
|
+
}, 'dashboard-sidebar', result => resolve(this.getViews(result.menus, route.level + 1)), e => {
|
|
125
|
+
console.error(e);
|
|
126
|
+
resolve(null);
|
|
127
|
+
}, null);
|
|
128
|
+
});
|
|
129
|
+
getLiClassName = prop => 'li-' + prop.level;
|
|
148
130
|
|
|
149
|
-
|
|
131
|
+
/* ----------------- link rendering ----------------- */
|
|
150
132
|
createLinks = routes => {
|
|
151
133
|
const {
|
|
152
|
-
rtlActive,
|
|
153
134
|
secondaryThemeColor
|
|
154
135
|
} = this.props;
|
|
155
136
|
return routes.map((prop, key) => {
|
|
156
|
-
if (prop.redirect)
|
|
157
|
-
return null;
|
|
158
|
-
}
|
|
137
|
+
if (prop.redirect) return null;
|
|
159
138
|
if ((prop.collapse || prop.isParent) && prop.name !== 'Dashboard' && prop.name !== 'My Work Items') {
|
|
160
|
-
|
|
161
|
-
|
|
139
|
+
const st = {
|
|
140
|
+
[prop.state]: !this.state[prop.state]
|
|
141
|
+
};
|
|
162
142
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
163
143
|
className: prop.collapse ? this.getCollapseInitialState(prop.views) + '-' + prop.level ? 'active ' + this.getLiClassName(prop) : this.getLiClassName(prop) : this.getLiClassName(prop),
|
|
164
144
|
key: key
|
|
@@ -175,7 +155,6 @@ class FoldingTabSidebar extends _react.default.Component {
|
|
|
175
155
|
this.getMenu(prop).then(views => {
|
|
176
156
|
if (views) {
|
|
177
157
|
prop.views = views;
|
|
178
|
-
//this.getCollapseInitialState(views);
|
|
179
158
|
this.setState(st);
|
|
180
159
|
}
|
|
181
160
|
});
|
|
@@ -189,29 +168,29 @@ class FoldingTabSidebar extends _react.default.Component {
|
|
|
189
168
|
style: {
|
|
190
169
|
width: '28px'
|
|
191
170
|
}
|
|
192
|
-
}), ' ', /*#__PURE__*/_react.default.createElement("span", null,
|
|
171
|
+
}), ' ', /*#__PURE__*/_react.default.createElement("span", null, prop.name, " ", prop.collapse ? /*#__PURE__*/_react.default.createElement("span", {
|
|
193
172
|
className: "caret",
|
|
194
173
|
style: {
|
|
195
|
-
marginTop:
|
|
174
|
+
marginTop: 0
|
|
196
175
|
}
|
|
197
|
-
}) : null)
|
|
176
|
+
}) : null)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
198
177
|
className: "sidebar-normal",
|
|
199
178
|
style: {
|
|
200
179
|
paddingLeft: '4px'
|
|
201
180
|
}
|
|
202
|
-
},
|
|
181
|
+
}, prop.name, " ", /*#__PURE__*/_react.default.createElement("b", {
|
|
203
182
|
className: "caret"
|
|
204
|
-
}))
|
|
183
|
+
})))), prop.collapse && prop.views ? /*#__PURE__*/_react.default.createElement(_reactstrap.Collapse, {
|
|
205
184
|
isOpen: this.state[prop.state]
|
|
206
185
|
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
207
186
|
className: "nav"
|
|
208
|
-
},
|
|
187
|
+
}, this.createLinks(prop.views))) : null);
|
|
209
188
|
}
|
|
210
189
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
211
190
|
className: `${'menu-link-li' + (this.activeRoute(prop.id) ? '-active' : '') + (prop.name === 'Dashboard' ? ' dashboard-link' : '')}`,
|
|
212
191
|
key: key,
|
|
213
192
|
style: this.activeRoute(prop.id) ? {
|
|
214
|
-
backgroundColor: (0, _material.lighten)(secondaryThemeColor, .9),
|
|
193
|
+
backgroundColor: (0, _material.lighten)(secondaryThemeColor, 0.9),
|
|
215
194
|
borderRadius: '16px',
|
|
216
195
|
color: secondaryThemeColor,
|
|
217
196
|
fontWeight: 500
|
|
@@ -231,30 +210,21 @@ class FoldingTabSidebar extends _react.default.Component {
|
|
|
231
210
|
autoClick: prop.name === 'My Work Items' || prop.item && prop.item.defaultItem,
|
|
232
211
|
viewId: "menuBar",
|
|
233
212
|
icon: prop.icon,
|
|
234
|
-
iconColor: (prop.name === 'Dashboard' || prop.name === 'My Work Items') && this.activeRoute(prop.id) ? secondaryThemeColor : null,
|
|
235
|
-
backgroundColor: this.activeRoute(prop.id) ? (0, _material.lighten)(secondaryThemeColor, .9) : null,
|
|
213
|
+
iconColor: (prop.name === 'Dashboard' || prop.name === 'My Work Items') && this.activeRoute(prop.id) ? this.props.secondaryThemeColor : null,
|
|
214
|
+
backgroundColor: this.activeRoute(prop.id) ? (0, _material.lighten)(this.props.secondaryThemeColor, 0.9) : null,
|
|
236
215
|
name: prop.name,
|
|
237
216
|
id: prop.id,
|
|
238
217
|
level: prop.level,
|
|
239
218
|
tab: TAB,
|
|
240
|
-
color: this.activeRoute(prop.id) ? secondaryThemeColor : null
|
|
241
|
-
})
|
|
219
|
+
color: this.activeRoute(prop.id) ? this.props.secondaryThemeColor : null
|
|
220
|
+
}));
|
|
242
221
|
});
|
|
243
222
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
return this.state.activeRouteMenu.id === routeName;
|
|
248
|
-
};
|
|
223
|
+
activeRoute = routeName => this.state.activeRouteMenu.id === routeName;
|
|
224
|
+
|
|
225
|
+
/* ----------------- lifecycle ----------------- */
|
|
249
226
|
componentDidMount() {
|
|
250
|
-
|
|
251
|
-
if (navigator.platform.indexOf('Win') > -1) {
|
|
252
|
-
/*ps = new PerfectScrollbar(this.refs.sidebar, {
|
|
253
|
-
suppressScrollX: true,
|
|
254
|
-
suppressScrollY: false,
|
|
255
|
-
});*/
|
|
256
|
-
}
|
|
257
|
-
let service = {
|
|
227
|
+
const service = {
|
|
258
228
|
url: '/ui/api/v1/menu/filter',
|
|
259
229
|
parameters: [{
|
|
260
230
|
value: this.props.routes,
|
|
@@ -269,128 +239,64 @@ class FoldingTabSidebar extends _react.default.Component {
|
|
|
269
239
|
return 'dashboard-sidebar';
|
|
270
240
|
}
|
|
271
241
|
}
|
|
272
|
-
}, 'dashboard-sidebar', result => {
|
|
273
|
-
this.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
});
|
|
277
|
-
}, e => {
|
|
278
|
-
console.error(e);
|
|
279
|
-
}, null);
|
|
242
|
+
}, 'dashboard-sidebar', result => this.setState({
|
|
243
|
+
...this.state,
|
|
244
|
+
routes: result
|
|
245
|
+
}), e => console.error(e), null);
|
|
280
246
|
}
|
|
281
247
|
componentWillUnmount() {
|
|
282
|
-
|
|
283
|
-
// to a page that doesn't have this component rendered
|
|
284
|
-
if (navigator.platform.indexOf('Win') > -1) {
|
|
285
|
-
//ps.destroy();
|
|
286
|
-
}
|
|
248
|
+
/* cleanup any custom scroll plugins if you add them */
|
|
287
249
|
}
|
|
250
|
+
|
|
251
|
+
/* ----------------- render ----------------- */
|
|
288
252
|
render() {
|
|
289
253
|
const {
|
|
290
254
|
activeColor,
|
|
291
|
-
logo
|
|
255
|
+
logo,
|
|
256
|
+
className,
|
|
257
|
+
heading,
|
|
258
|
+
appLogoPath
|
|
292
259
|
} = this.props;
|
|
260
|
+
const routes = this.state.routes;
|
|
293
261
|
let logoImg = null;
|
|
294
|
-
let logoText = null;
|
|
295
262
|
if (!_Utils.default.isNull(logo)) {
|
|
296
263
|
logoImg = /*#__PURE__*/_react.default.createElement("a", {
|
|
297
264
|
href: logo.outterLink,
|
|
298
|
-
className: "
|
|
299
|
-
onClick: this.props.closeSidebar
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
style: {
|
|
303
|
-
paddingTop: '16px',
|
|
304
|
-
paddingBottom: '8px'
|
|
305
|
-
}
|
|
265
|
+
className: "sidebar__brand",
|
|
266
|
+
onClick: this.props.closeSidebar,
|
|
267
|
+
"aria-label": "Home",
|
|
268
|
+
style: this.props.logoStyle
|
|
306
269
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
307
270
|
src: logo.imgSrc,
|
|
308
|
-
alt: "logo"
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
href: logo.outterLink,
|
|
312
|
-
className: "simple-text ",
|
|
313
|
-
onClick: this.props.closeSidebar
|
|
314
|
-
}, logo.text, ' ');
|
|
271
|
+
alt: "logo",
|
|
272
|
+
className: "sidebar__brand-img"
|
|
273
|
+
}));
|
|
315
274
|
}
|
|
316
|
-
return /*#__PURE__*/_react.default.createElement("
|
|
317
|
-
className:
|
|
318
|
-
data: activeColor
|
|
319
|
-
style: {
|
|
320
|
-
overflow: 'hidden',
|
|
321
|
-
maxHeight: '100vh'
|
|
322
|
-
}
|
|
323
|
-
}, /*#__PURE__*/_react.default.createElement("table", {
|
|
324
|
-
style: {
|
|
325
|
-
height: '96%',
|
|
326
|
-
maxHeight: '100%',
|
|
327
|
-
width: '100%'
|
|
328
|
-
}
|
|
329
|
-
}, /*#__PURE__*/_react.default.createElement("tbody", null, /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", {
|
|
330
|
-
style: {
|
|
331
|
-
height: '10%'
|
|
332
|
-
}
|
|
333
|
-
}, ' ', logoImg !== null ? /*#__PURE__*/_react.default.createElement("div", {
|
|
334
|
-
className: "logo",
|
|
335
|
-
style: {
|
|
336
|
-
display: 'flex',
|
|
337
|
-
justifyContent: 'center',
|
|
338
|
-
alignItems: 'center',
|
|
339
|
-
height: '100%'
|
|
340
|
-
}
|
|
341
|
-
}, ' ', logoImg, ' ') : null, ' ', !_Utils.default.isNull(this.props.heading) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
342
|
-
className: "logo",
|
|
343
|
-
style: {
|
|
344
|
-
display: 'flex',
|
|
345
|
-
justifyContent: 'center',
|
|
346
|
-
alignItems: 'center',
|
|
347
|
-
height: '100%',
|
|
348
|
-
fontSize: '20px',
|
|
349
|
-
fontWeight: 600
|
|
350
|
-
}
|
|
351
|
-
}, this.props.heading) : null)), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", {
|
|
352
|
-
style: {
|
|
353
|
-
height: '70%'
|
|
354
|
-
},
|
|
355
|
-
valign: 'top'
|
|
356
|
-
}, this.state.routes && /*#__PURE__*/_react.default.createElement(_reactstrap.Nav, {
|
|
357
|
-
style: {
|
|
358
|
-
margin: '8px',
|
|
359
|
-
padding: '16px'
|
|
360
|
-
},
|
|
361
|
-
className: 'nav-wrapper'
|
|
362
|
-
}, this.createLinks(this.state.routes)))), /*#__PURE__*/_react.default.createElement("tr", null, /*#__PURE__*/_react.default.createElement("td", {
|
|
363
|
-
className: 'sidebar-app-logo-wrapper',
|
|
364
|
-
style: {
|
|
365
|
-
height: '10%'
|
|
366
|
-
},
|
|
367
|
-
valign: 'top'
|
|
275
|
+
return /*#__PURE__*/_react.default.createElement("aside", {
|
|
276
|
+
className: `${className || ''} sidebar`,
|
|
277
|
+
data: activeColor
|
|
368
278
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
369
|
-
className:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
},
|
|
375
|
-
className:
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
279
|
+
className: "sidebar__top"
|
|
280
|
+
}, logoImg ? /*#__PURE__*/_react.default.createElement("div", {
|
|
281
|
+
className: "sidebar__logo"
|
|
282
|
+
}, logoImg) : null, !_Utils.default.isNull(heading) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
283
|
+
className: "sidebar__heading"
|
|
284
|
+
}, heading) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
285
|
+
className: "sidebar__scroll"
|
|
286
|
+
}, routes ? /*#__PURE__*/_react.default.createElement(_reactstrap.Nav, {
|
|
287
|
+
className: "nav-wrapper"
|
|
288
|
+
}, this.createLinks(routes)) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
289
|
+
className: "sidebar__bottom"
|
|
290
|
+
}, !_Utils.default.isNull(appLogoPath) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
291
|
+
className: "sidebar__app-logo"
|
|
381
292
|
}, /*#__PURE__*/_react.default.createElement(_CardAvatar.default, {
|
|
382
293
|
plain: true
|
|
383
294
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
384
|
-
src:
|
|
385
|
-
alt: "
|
|
295
|
+
src: appLogoPath,
|
|
296
|
+
alt: ""
|
|
386
297
|
}))) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
justifyContent: 'center',
|
|
390
|
-
alignItems: 'center',
|
|
391
|
-
marginTop: '8px'
|
|
392
|
-
}
|
|
393
|
-
}, "Copyrights \xA9 ", 1900 + new Date().getYear(), " ", ' ')))))));
|
|
298
|
+
className: "sidebar__copyright"
|
|
299
|
+
}, "\xA9 ", new Date().getFullYear())));
|
|
394
300
|
}
|
|
395
301
|
}
|
|
396
302
|
FoldingTabSidebar.propTypes = {
|
|
@@ -407,7 +313,9 @@ FoldingTabSidebar.propTypes = {
|
|
|
407
313
|
imgSrc: _propTypes.default.string.isRequired,
|
|
408
314
|
text: _propTypes.default.string.isRequired
|
|
409
315
|
})]),
|
|
410
|
-
|
|
411
|
-
|
|
316
|
+
heading: _propTypes.default.string,
|
|
317
|
+
appLogoPath: _propTypes.default.string,
|
|
318
|
+
closeSidebar: _propTypes.default.func,
|
|
319
|
+
dashboardLauncher: _propTypes.default.func
|
|
412
320
|
};
|
|
413
321
|
var _default = exports.default = FoldingTabSidebar;
|
|
@@ -169,7 +169,7 @@ const BaseField = props => {
|
|
|
169
169
|
}
|
|
170
170
|
if (valueChanged) {
|
|
171
171
|
let id = props.config.dataBinding ? props.config.dataBinding : props.config.id;
|
|
172
|
-
|
|
172
|
+
//applicationManager.enableFormMarkers(true);
|
|
173
173
|
if (props.config.fieldType === 'SELECT') {
|
|
174
174
|
let selectItemChange = props.form().handleSelectItemChange(id, selectOptions, newValue);
|
|
175
175
|
setValue(selectItemChange);
|
|
@@ -17,6 +17,7 @@ var _ServiceCallActionHandler = _interopRequireDefault(require("../../event/Serv
|
|
|
17
17
|
var _DynamicJS = _interopRequireDefault(require("../../DynamicJS"));
|
|
18
18
|
var _EventType = _interopRequireDefault(require("../../event/EventType"));
|
|
19
19
|
var _Event = _interopRequireDefault(require("../../event/Event"));
|
|
20
|
+
var _clear = require("@testing-library/user-event/dist/clear");
|
|
20
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
22
|
const useStyles = (0, _styles.makeStyles)(theme => ({
|
|
22
23
|
container: {
|
|
@@ -138,7 +139,7 @@ const Form = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwar
|
|
|
138
139
|
}
|
|
139
140
|
let fieldValid = field.handle.api.validate(values.current, null);
|
|
140
141
|
if (fieldValid === false || _Utils.default.isNull(fieldValid)) {
|
|
141
|
-
console.log("Invalid form field [" + field.handle.api.id + "]");
|
|
142
|
+
//console.log("Invalid form field [" + field.handle.api.id + "]");
|
|
142
143
|
if (firstInvalidField == null) {
|
|
143
144
|
firstInvalidField = field;
|
|
144
145
|
}
|
|
@@ -234,6 +235,7 @@ const Form = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwar
|
|
|
234
235
|
let service = !_Utils.default.isNull(componentConfig.dataService) ? componentConfig.dataService : eventConfig !== null ? eventConfig.dataService : null;
|
|
235
236
|
let componentValue = !_Utils.default.isNull(componentConfig.value) ? _ApplicationManager.default.resolveParameterConfigValue(componentConfig.value, eventData) : eventConfig !== null ? _ApplicationManager.default.resolveParameterConfigValue(eventConfig.value, eventData) : null;
|
|
236
237
|
if (!_Utils.default.isNull(service)) {
|
|
238
|
+
doClear();
|
|
237
239
|
if (service.type === 'rpc') {
|
|
238
240
|
(0, _RestService.invokeRpc)({
|
|
239
241
|
service: service,
|
|
@@ -411,6 +413,7 @@ const Form = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwar
|
|
|
411
413
|
return formValues;
|
|
412
414
|
};
|
|
413
415
|
function doClear() {
|
|
416
|
+
_ApplicationManager.default.enableFormMarkers(false);
|
|
414
417
|
for (let i = 0; i < fields.length; i++) {
|
|
415
418
|
let field = fields[i];
|
|
416
419
|
field.handle.api.clear();
|
|
@@ -419,6 +422,7 @@ const Form = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwar
|
|
|
419
422
|
if (!_Utils.default.isNull(props.valueChangeHandler)) {
|
|
420
423
|
props.valueChangeHandler({});
|
|
421
424
|
}
|
|
425
|
+
_ApplicationManager.default.enableFormMarkers(true);
|
|
422
426
|
}
|
|
423
427
|
function doBindData(data) {
|
|
424
428
|
if (!_Utils.default.isNull(data)) {
|
|
@@ -33,6 +33,8 @@ var _Chart = _interopRequireDefault(require("../Chart"));
|
|
|
33
33
|
var _FacialRegistration = _interopRequireDefault(require("../facialRecognition/FacialRegistration"));
|
|
34
34
|
var _FacialVerification = _interopRequireDefault(require("../facialRecognition/FacialVerification"));
|
|
35
35
|
var _Spinner = _interopRequireDefault(require("../Spinner"));
|
|
36
|
+
require("./Layout.css");
|
|
37
|
+
var _Chat = _interopRequireDefault(require("../media/Chat"));
|
|
36
38
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
37
39
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
38
40
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -132,7 +134,7 @@ const Layout = props => {
|
|
|
132
134
|
handle: createComponentHandle(component),
|
|
133
135
|
key: index,
|
|
134
136
|
viewId: props.viewId,
|
|
135
|
-
className: 'defaultForm'
|
|
137
|
+
className: _Utils.default.getComponentAttribute(component, 'className', 'defaultForm')
|
|
136
138
|
});
|
|
137
139
|
case 'htmlPanel':
|
|
138
140
|
return /*#__PURE__*/_react.default.createElement(_HtmlPanel.default, {
|
|
@@ -196,6 +198,13 @@ const Layout = props => {
|
|
|
196
198
|
key: index,
|
|
197
199
|
viewId: props.viewId
|
|
198
200
|
});
|
|
201
|
+
case 'chat':
|
|
202
|
+
return /*#__PURE__*/_react.default.createElement(_Chat.default, {
|
|
203
|
+
config: component,
|
|
204
|
+
handle: createComponentHandle(component),
|
|
205
|
+
key: index,
|
|
206
|
+
viewId: props.viewId
|
|
207
|
+
});
|
|
199
208
|
case 'userVideo':
|
|
200
209
|
return /*#__PURE__*/_react.default.createElement(_Video.default, {
|
|
201
210
|
config: component,
|
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
:root { --header-h: 72px; --view-header-h: 112px; --view-header-min: 112px}
|
|
2
|
+
|
|
3
|
+
.view {
|
|
2
4
|
padding: 0 32px;
|
|
3
5
|
background-color: #ffffff;
|
|
4
6
|
border-radius: 4px;
|
|
5
7
|
}
|
|
6
8
|
|
|
9
|
+
.view .sticky-header {
|
|
10
|
+
position: sticky; top: 0; z-index: 1;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
block-size: auto; /* allow both grow & shrink */
|
|
13
|
+
min-block-size: var(--view-header-min); /* constant floor only */
|
|
14
|
+
overflow: visible;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.view .scrolling-body {
|
|
18
|
+
block-size: calc(100dvh - var(--header-h) - var(--view-header-h, var(--view-header-min)) - 64px) !important;
|
|
19
|
+
overflow-y: auto;
|
|
20
|
+
overflow-x: hidden;
|
|
21
|
+
min-block-size: 0;
|
|
22
|
+
padding: 0 0 16px 0 !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
7
25
|
.window-unpinned .view {
|
|
8
|
-
width: 0 !important
|
|
26
|
+
width: 0 !important;
|
|
9
27
|
}
|
|
10
28
|
|
|
11
29
|
.window-pinned .view {
|
|
@@ -71,10 +89,6 @@
|
|
|
71
89
|
padding: 0 !important;
|
|
72
90
|
}
|
|
73
91
|
|
|
74
|
-
.defaultForm {
|
|
75
|
-
margin: 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
92
|
.oui-form-item {
|
|
79
93
|
min-width: 232px !important;
|
|
80
94
|
}
|
|
@@ -23,6 +23,7 @@ const View = props => {
|
|
|
23
23
|
const [model] = _react.default.useState({});
|
|
24
24
|
const loadingRef = _react.default.useRef(true);
|
|
25
25
|
const paramsLoaded = _react.default.useRef(false);
|
|
26
|
+
const viewRef = _react.default.useRef(null);
|
|
26
27
|
function registerInlineScriptLibraries() {
|
|
27
28
|
if (!_Utils.default.isNull(props.config.lib)) {
|
|
28
29
|
let libName = props.config.id + '_lib';
|
|
@@ -104,8 +105,37 @@ const View = props => {
|
|
|
104
105
|
if (props.loadCallback) {
|
|
105
106
|
props.loadCallback();
|
|
106
107
|
}
|
|
108
|
+
const el = viewRef.current;
|
|
109
|
+
let ro;
|
|
110
|
+
if (el) {
|
|
111
|
+
let componentAttribute = _Utils.default.getComponentAttribute(props.config, 'headerHeight', null);
|
|
112
|
+
if (componentAttribute != null) {
|
|
113
|
+
const val = _Utils.default.normalizeCssSize(componentAttribute, "0");
|
|
114
|
+
el.style.setProperty("--view-header-h", val);
|
|
115
|
+
el.style.setProperty("--view-header-min", val);
|
|
116
|
+
}
|
|
117
|
+
const headerEl = el.querySelector('.sticky-header');
|
|
118
|
+
if (headerEl) {
|
|
119
|
+
// initialize the var to the floor so layout is valid before first callback
|
|
120
|
+
const floor = getComputedStyle(el).getPropertyValue('--view-header-min')?.trim() || '112px';
|
|
121
|
+
el.style.setProperty('--view-header-h', floor);
|
|
122
|
+
ro = new ResizeObserver(_ref => {
|
|
123
|
+
let [entry] = _ref;
|
|
124
|
+
// prefer borderBoxSize when available
|
|
125
|
+
const h = entry.borderBoxSize?.[0]?.blockSize ?? entry.borderBoxSize?.blockSize ?? entry.contentBoxSize?.[0]?.blockSize ?? entry.contentRect.height;
|
|
126
|
+
el.style.setProperty('--view-header-h', `${h}px`);
|
|
127
|
+
});
|
|
128
|
+
ro.observe(headerEl);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
107
131
|
return () => {
|
|
108
132
|
_Observable.default.clearEventListeners(props.config.id);
|
|
133
|
+
if (el) {
|
|
134
|
+
el.style.removeProperty("--view-header-h");
|
|
135
|
+
}
|
|
136
|
+
if (ro) {
|
|
137
|
+
ro.disconnect();
|
|
138
|
+
}
|
|
109
139
|
};
|
|
110
140
|
}, []);
|
|
111
141
|
function render(layout) {
|
|
@@ -174,7 +204,8 @@ const View = props => {
|
|
|
174
204
|
style: _Utils.default.mergeStyles({
|
|
175
205
|
minWidth: '128px',
|
|
176
206
|
height: '100%'
|
|
177
|
-
}, props.config)
|
|
207
|
+
}, props.config),
|
|
208
|
+
ref: viewRef
|
|
178
209
|
}, render(props.config.layout));
|
|
179
210
|
};
|
|
180
211
|
exports.View = View;
|