@agilemotion/oui-react-js 1.8.3 → 1.8.5
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 +9 -0
- package/dist/DynamicJS.js +32 -8
- package/dist/RestService.js +1 -3
- package/dist/Utils.js +17 -8
- package/dist/components/Button.js +8 -1
- package/dist/components/Calendar.js +30 -23
- package/dist/components/DataGrid.js +44 -10
- package/dist/components/DocumentTemplateDesignerComponent.js +169 -0
- package/dist/components/DocumentTemplateDesignerComponent2.js +585 -0
- package/dist/components/Icon.js +10 -0
- package/dist/components/TableCellContent.js +35 -23
- package/dist/components/Toolbar.js +10 -1
- package/dist/components/form/BaseField.js +50 -27
- package/dist/components/form/Checkbox.js +3 -0
- package/dist/components/form/CurrencyField.js +109 -0
- package/dist/components/form/DatePicker.js +1 -0
- package/dist/components/form/FieldSet.js +18 -3
- package/dist/components/form/Form.js +14 -3
- package/dist/components/form/GridField.js +34 -25
- package/dist/components/form/LookupField.js +5 -4
- package/dist/components/form/RadioGroup.js +22 -9
- package/dist/components/form/SelectItem.js +9 -5
- package/dist/components/form/TransferList.js +2 -2
- package/dist/components/layout/CollapsiblePanel.css +9 -9
- package/dist/components/layout/View.css +68 -68
- package/dist/components/layout/ViewContainer.js +11 -2
- package/dist/components/layout/Window.js +2 -0
- package/dist/components/loader.css +36 -36
- package/dist/components/media/TrainingRoom.js +5 -0
- package/dist/components/media/Video.css +4 -4
- package/dist/components/signatures/ResponsiveTable.css +91 -91
- package/dist/components/signatures/widgets.css +126 -126
- package/dist/js/Validators.js +73 -2
- package/dist/view/Dashboard.js +13 -13
- package/package.json +10 -2
|
@@ -13,6 +13,8 @@ var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
|
13
13
|
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
|
14
14
|
var _Toolbar = _interopRequireDefault(require("../Toolbar"));
|
|
15
15
|
var _Observable = _interopRequireDefault(require("../../event/Observable"));
|
|
16
|
+
var _DynamicJS = _interopRequireDefault(require("../../DynamicJS"));
|
|
17
|
+
var _FormHelperText = _interopRequireDefault(require("@mui/material/FormHelperText"));
|
|
16
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
19
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
18
20
|
function getEditorType(columnName, gridConfig) {
|
|
@@ -39,26 +41,32 @@ const GridFieldWrapper = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.de
|
|
|
39
41
|
const base = props.base;
|
|
40
42
|
const newRowIdCounter = _react.default.useRef(-1);
|
|
41
43
|
const [selection, setSelection] = _react.default.useState([]);
|
|
44
|
+
const [label, setLabel] = _react.default.useState();
|
|
42
45
|
const [rows, setRows] = _react.default.useState([]);
|
|
43
46
|
const [crudToolstripWidth, setCrudToolstripWidth] = _react.default.useState(null);
|
|
44
47
|
const [hasButtons] = _react.default.useState(_Utils.default.isNull(props.config.attributes) || _Utils.default.isNull(props.config.attributes.addDisabled) || props.config.attributes.addDisabled === false || _Utils.default.isNull(props.config.attributes.removeDisabled) || props.config.attributes.removeDisabled === false);
|
|
45
|
-
|
|
48
|
+
const initialValueSet = _react.default.useRef(false);
|
|
46
49
|
_react.default.useEffect(() => {
|
|
47
50
|
let numCrudButtons = 0;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
let addDisabled = props.config.attributes?.addDisabled;
|
|
52
|
+
let removeDisabled = props.config.attributes?.removeDisabled;
|
|
53
|
+
if (!addDisabled) {
|
|
54
|
+
numCrudButtons++;
|
|
55
|
+
}
|
|
56
|
+
if (!removeDisabled) {
|
|
57
|
+
numCrudButtons++;
|
|
55
58
|
}
|
|
56
59
|
setCrudToolstripWidth(numCrudButtons * 40 + 'px');
|
|
60
|
+
try {
|
|
61
|
+
let label = _DynamicJS.default.executeScript(props.config.id + 'label', _Utils.default.getComponentAttribute(props.config, 'label', ''), props.config.viewId, true, null, null, false);
|
|
62
|
+
setLabel(label);
|
|
63
|
+
} catch (e) {
|
|
64
|
+
setLabel(_Utils.default.getComponentAttribute(props.config, 'label', ''));
|
|
65
|
+
}
|
|
57
66
|
}, []);
|
|
58
67
|
_react.default.useEffect(() => {
|
|
59
|
-
if (!_Utils.default.isNull(base.value) && !
|
|
60
|
-
setRows(base.value);
|
|
61
|
-
props.loadCallback();
|
|
68
|
+
if (!_Utils.default.isNull(base.value) && !initialValueSet.current) {
|
|
69
|
+
setRows([].concat(base.value));
|
|
62
70
|
}
|
|
63
71
|
}, [base.value]);
|
|
64
72
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -129,32 +137,34 @@ const GridFieldWrapper = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.de
|
|
|
129
137
|
viewId: props.viewId,
|
|
130
138
|
rows: rows,
|
|
131
139
|
formValues: props.values,
|
|
132
|
-
valueChangeHandler:
|
|
140
|
+
valueChangeHandler: newRows => {
|
|
133
141
|
let value = null;
|
|
134
|
-
if (!_Utils.default.isNull(
|
|
142
|
+
if (!_Utils.default.isNull(newRows)) {
|
|
135
143
|
value = [];
|
|
136
|
-
for (const row of
|
|
144
|
+
for (const row of newRows) {
|
|
137
145
|
let record = createRecord(row, props.config.grid, false);
|
|
138
146
|
value.push(record);
|
|
139
147
|
}
|
|
140
148
|
}
|
|
141
|
-
if (!props.initialValueSet) {
|
|
142
|
-
props.loadCallback();
|
|
143
|
-
}
|
|
144
149
|
base.handleValueChange(value);
|
|
145
150
|
},
|
|
146
151
|
pagination: false,
|
|
147
152
|
onSelectionChange: selection => {
|
|
148
153
|
setSelection(selection);
|
|
154
|
+
initialValueSet.current = true;
|
|
149
155
|
},
|
|
150
156
|
filterWrapperClass: 'transferListFilterWrapper',
|
|
151
157
|
hasBorder: false
|
|
152
|
-
})
|
|
158
|
+
}), base.errorMessage && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, {
|
|
159
|
+
style: {
|
|
160
|
+
margin: "8px",
|
|
161
|
+
color: "rgb(244, 67, 54)"
|
|
162
|
+
}
|
|
163
|
+
}, base.errorMessage)));
|
|
153
164
|
}));
|
|
154
165
|
const GridField = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
155
166
|
const [gridHandle] = _react.default.useState({});
|
|
156
167
|
const [toolHandle] = _react.default.useState(!_Utils.default.isNull(props.config.toolstrip) ? {} : null);
|
|
157
|
-
const initialValueSet = _react.default.useRef(false);
|
|
158
168
|
return /*#__PURE__*/_react.default.createElement(_BaseField.BaseField, _extends({}, props, {
|
|
159
169
|
handle: props.handle,
|
|
160
170
|
getChildren: () => {
|
|
@@ -189,19 +199,18 @@ const GridField = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.f
|
|
|
189
199
|
val.push(objectArrayElement);
|
|
190
200
|
}
|
|
191
201
|
}
|
|
192
|
-
initialValueSet.current = false;
|
|
193
202
|
return val;
|
|
194
203
|
}
|
|
195
204
|
return value;
|
|
196
205
|
},
|
|
197
|
-
clearHandler: () => gridHandle.api.clear()
|
|
206
|
+
clearHandler: () => gridHandle.api.clear(),
|
|
207
|
+
rowsHandler: () => {
|
|
208
|
+
alert(JSON.stringify(gridHandle.api.rows));
|
|
209
|
+
return gridHandle.api.rows;
|
|
210
|
+
}
|
|
198
211
|
}), base => /*#__PURE__*/_react.default.createElement(GridFieldWrapper, _extends({
|
|
199
212
|
gridHandle: gridHandle,
|
|
200
213
|
toolstripHandle: toolHandle,
|
|
201
|
-
initialValueSet: initialValueSet.current,
|
|
202
|
-
loadCallback: () => {
|
|
203
|
-
initialValueSet.current = true;
|
|
204
|
-
},
|
|
205
214
|
base: base
|
|
206
215
|
}, props)));
|
|
207
216
|
}));
|
|
@@ -70,15 +70,15 @@ const LookupFieldComponent = exports.LookupFieldComponent = /*#__PURE__*/_react.
|
|
|
70
70
|
};
|
|
71
71
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
72
72
|
className: "w-100 lookup row no-margin no-padding",
|
|
73
|
-
style: {
|
|
73
|
+
style: _Utils.default.mergeStyles({
|
|
74
74
|
width: width,
|
|
75
75
|
minWidth: minWidth,
|
|
76
76
|
margin: margin,
|
|
77
77
|
height: height,
|
|
78
78
|
marginBottom: base.hasError ? '20px' : '4px',
|
|
79
79
|
marginTop: '8px'
|
|
80
|
-
}
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
+
}, props.config)
|
|
81
|
+
}, !base.disabled && /*#__PURE__*/_react.default.createElement("div", {
|
|
82
82
|
className: 'col-*-*',
|
|
83
83
|
style: {
|
|
84
84
|
width: '72px',
|
|
@@ -101,7 +101,8 @@ const LookupFieldComponent = exports.LookupFieldComponent = /*#__PURE__*/_react.
|
|
|
101
101
|
}
|
|
102
102
|
}, /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
|
103
103
|
style: {
|
|
104
|
-
marginTop: '0'
|
|
104
|
+
marginTop: '0',
|
|
105
|
+
width: props.config.attributes?.style?.width || 'calc(100% - 2px)'
|
|
105
106
|
},
|
|
106
107
|
id: props.id,
|
|
107
108
|
required: base.required,
|
|
@@ -11,6 +11,8 @@ var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormContro
|
|
|
11
11
|
var _FormLabel = _interopRequireDefault(require("@mui/material/FormLabel"));
|
|
12
12
|
var _BaseField = require("./BaseField");
|
|
13
13
|
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
14
|
+
var _FormHelperText = _interopRequireDefault(require("@mui/material/FormHelperText"));
|
|
15
|
+
var _FormControl = _interopRequireDefault(require("@mui/material/FormControl"));
|
|
14
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
17
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
18
|
const RadioGroupWrapper = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
@@ -24,23 +26,29 @@ const RadioGroupWrapper = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.d
|
|
|
24
26
|
setValue(base.value);
|
|
25
27
|
}
|
|
26
28
|
}, [base.value]);
|
|
27
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement(_FormControl.default, {
|
|
30
|
+
error: base.hasError,
|
|
31
|
+
style: _Utils.default.mergeStyles({
|
|
32
|
+
marginTop: '8px'
|
|
33
|
+
}, props.config)
|
|
31
34
|
}, label !== null ? /*#__PURE__*/_react.default.createElement(_FormLabel.default, {
|
|
32
35
|
component: "legend"
|
|
33
|
-
}, label) : null, /*#__PURE__*/_react.default.createElement(_RadioGroup.default, {
|
|
36
|
+
}, base.required ? label + '*' : label) : null, /*#__PURE__*/_react.default.createElement(_RadioGroup.default, {
|
|
34
37
|
row: true,
|
|
35
38
|
defaultValue: props.defaultValue,
|
|
36
39
|
"aria-label": "",
|
|
37
40
|
name: "radios",
|
|
38
41
|
required: base.required,
|
|
39
|
-
|
|
42
|
+
style: base.hasError ? {
|
|
43
|
+
border: '1px solid #f44336',
|
|
44
|
+
borderRadius: '4px',
|
|
45
|
+
padding: '8px 4px 4px 8px'
|
|
46
|
+
} : {
|
|
47
|
+
padding: '8px 4px 4px 8px'
|
|
48
|
+
},
|
|
40
49
|
onChange: e => {
|
|
41
50
|
base.handleValueChange(e.target.value);
|
|
42
|
-
}
|
|
43
|
-
error: base.hasError
|
|
51
|
+
}
|
|
44
52
|
}, options.map((option, index) => {
|
|
45
53
|
return /*#__PURE__*/_react.default.createElement(_FormControlLabel.default, {
|
|
46
54
|
key: index,
|
|
@@ -51,7 +59,12 @@ const RadioGroupWrapper = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.d
|
|
|
51
59
|
}),
|
|
52
60
|
label: option.label
|
|
53
61
|
});
|
|
54
|
-
}))
|
|
62
|
+
})), base.errorMessage && /*#__PURE__*/_react.default.createElement(_FormHelperText.default, {
|
|
63
|
+
style: {
|
|
64
|
+
margin: "4px 0",
|
|
65
|
+
color: "rgb(244, 67, 54)"
|
|
66
|
+
}
|
|
67
|
+
}, base.errorMessage));
|
|
55
68
|
}));
|
|
56
69
|
const RadioGroup = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
57
70
|
const defaultValue = _Utils.default.getComponentAttribute(props.config, 'defaultValue', null);
|
|
@@ -15,7 +15,7 @@ var _Observable = _interopRequireDefault(require("../../event/Observable"));
|
|
|
15
15
|
var _EventType = _interopRequireDefault(require("../../event/EventType"));
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
18
|
-
const SelectItemComponent =
|
|
18
|
+
const SelectItemComponent = props => {
|
|
19
19
|
const base = props.base;
|
|
20
20
|
const [optionsLoaded, setOptionsLoaded] = _react.default.useState(false);
|
|
21
21
|
const [loadFullOptionList, setLoadFullOptionList] = _react.default.useState(false);
|
|
@@ -40,7 +40,7 @@ const SelectItemComponent = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react
|
|
|
40
40
|
viewId: props.viewId
|
|
41
41
|
}).then(result => {
|
|
42
42
|
let options = [];
|
|
43
|
-
if (_Utils.default.isNull(props.validator) || props.validator.nullable) {
|
|
43
|
+
if (_Utils.default.isNull(props.config.validator) || _Utils.default.evaluateBooleanExpression(props.config.validator.nullable, props.config.id)) {
|
|
44
44
|
options.push({
|
|
45
45
|
id: '_EMPTY_VALUE'
|
|
46
46
|
});
|
|
@@ -56,12 +56,11 @@ const SelectItemComponent = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react
|
|
|
56
56
|
});
|
|
57
57
|
setOptionsLoaded(true);
|
|
58
58
|
}
|
|
59
|
-
}, [loadFullOptionList]);
|
|
59
|
+
}, [loadFullOptionList, props.refreshData]);
|
|
60
60
|
return /*#__PURE__*/_react.default.createElement(_TextField.default, {
|
|
61
61
|
select: true,
|
|
62
62
|
InputProps: props.InputProps,
|
|
63
63
|
id: props.id,
|
|
64
|
-
reference: ref,
|
|
65
64
|
disabled: base.disabled,
|
|
66
65
|
required: base.required,
|
|
67
66
|
label: !_Utils.default.isNull(props.config.attributes) ? props.config.attributes['label'] : null,
|
|
@@ -94,14 +93,19 @@ const SelectItemComponent = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react
|
|
|
94
93
|
key: option.id,
|
|
95
94
|
value: option.id
|
|
96
95
|
}, _Utils.default.isNull(option.dataRecordDescription) ? '' : option.dataRecordDescription.trim())));
|
|
97
|
-
}
|
|
96
|
+
};
|
|
98
97
|
const SelectItem = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
98
|
+
const [refreshData, setRefreshData] = _react.default.useState(false);
|
|
99
99
|
return /*#__PURE__*/_react.default.createElement(_BaseField.BaseField, _extends({}, props, {
|
|
100
100
|
handle: props.handle,
|
|
101
101
|
valueParser: value => {
|
|
102
102
|
return value;
|
|
103
|
+
},
|
|
104
|
+
loadDataHandler: () => {
|
|
105
|
+
setRefreshData(!refreshData);
|
|
103
106
|
}
|
|
104
107
|
}), base => /*#__PURE__*/_react.default.createElement(SelectItemComponent, _extends({
|
|
108
|
+
refreshData: refreshData,
|
|
105
109
|
base: base
|
|
106
110
|
}, props)));
|
|
107
111
|
}));
|
|
@@ -171,8 +171,8 @@ const TransferList = /*#__PURE__*/_react.default.memo((props, ref) => {
|
|
|
171
171
|
component: props.handle,
|
|
172
172
|
viewId: props.viewId
|
|
173
173
|
}).then(result => {
|
|
174
|
-
|
|
175
|
-
setData(
|
|
174
|
+
console.log("\n\n\n\n\nRESULTS : ", result);
|
|
175
|
+
setData(result);
|
|
176
176
|
}).catch(e => {
|
|
177
177
|
console.error(e);
|
|
178
178
|
_Utils.default.publishErrorMessage(e, props.viewId);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
.coll-panel-container {
|
|
2
|
-
font-family: sans-serif;
|
|
3
|
-
text-align: center;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.coll-panel-btn:focus {
|
|
7
|
-
outline: 0;
|
|
8
|
-
box-shadow: none;
|
|
9
|
-
}
|
|
1
|
+
.coll-panel-container {
|
|
2
|
+
font-family: sans-serif;
|
|
3
|
+
text-align: center;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.coll-panel-btn:focus {
|
|
7
|
+
outline: 0;
|
|
8
|
+
box-shadow: none;
|
|
9
|
+
}
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
.view {
|
|
2
|
-
padding: 0 32px;
|
|
3
|
-
background-color: #ffffff;
|
|
4
|
-
border-radius: 4px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.window-unpinned .view {
|
|
8
|
-
width: 0 !important;;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.window-pinned .view {
|
|
12
|
-
padding: 0 8px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.no-margin {
|
|
16
|
-
margin-left: 0 !important;
|
|
17
|
-
margin-right: 0 !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.no-padding {
|
|
21
|
-
padding-left: 0 !important;
|
|
22
|
-
padding-right: 0 !important;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.centered-flex-box {
|
|
26
|
-
display: flex;
|
|
27
|
-
align-Items: center;
|
|
28
|
-
justify-content: center
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* Smartphones (landscape); */
|
|
32
|
-
@media only screen and (min-device-width : 361px) and (max-device-width : 480px) {
|
|
33
|
-
.view {
|
|
34
|
-
padding: 0 16px;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/* Smartphones (portrait); */
|
|
39
|
-
@media only screen and (min-device-width : 280px) and (max-device-width : 360px) {
|
|
40
|
-
.view {
|
|
41
|
-
padding: 0 16px;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* iPads (portrait and landscape); */
|
|
46
|
-
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
|
|
47
|
-
.view {
|
|
48
|
-
padding: 0 24px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* iPad 3 */
|
|
53
|
-
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) {
|
|
54
|
-
.view {
|
|
55
|
-
padding: 0 24px;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/* small desktop screens */
|
|
60
|
-
@media only screen and (max-width : 600px) {
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* low resolution desktop */
|
|
64
|
-
@media only screen and (max-width : 1200px) {
|
|
65
|
-
.view {
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
}
|
|
1
|
+
.view {
|
|
2
|
+
padding: 0 32px;
|
|
3
|
+
background-color: #ffffff;
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.window-unpinned .view {
|
|
8
|
+
width: 0 !important;;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.window-pinned .view {
|
|
12
|
+
padding: 0 8px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.no-margin {
|
|
16
|
+
margin-left: 0 !important;
|
|
17
|
+
margin-right: 0 !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.no-padding {
|
|
21
|
+
padding-left: 0 !important;
|
|
22
|
+
padding-right: 0 !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.centered-flex-box {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-Items: center;
|
|
28
|
+
justify-content: center
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Smartphones (landscape); */
|
|
32
|
+
@media only screen and (min-device-width : 361px) and (max-device-width : 480px) {
|
|
33
|
+
.view {
|
|
34
|
+
padding: 0 16px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Smartphones (portrait); */
|
|
39
|
+
@media only screen and (min-device-width : 280px) and (max-device-width : 360px) {
|
|
40
|
+
.view {
|
|
41
|
+
padding: 0 16px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* iPads (portrait and landscape); */
|
|
46
|
+
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {
|
|
47
|
+
.view {
|
|
48
|
+
padding: 0 24px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* iPad 3 */
|
|
53
|
+
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) and (-webkit-min-device-pixel-ratio : 2) {
|
|
54
|
+
.view {
|
|
55
|
+
padding: 0 24px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* small desktop screens */
|
|
60
|
+
@media only screen and (max-width : 600px) {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* low resolution desktop */
|
|
64
|
+
@media only screen and (max-width : 1200px) {
|
|
65
|
+
.view {
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -4,21 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
require("./ViewContainer.css");
|
|
9
9
|
var _ApplicationManager = _interopRequireDefault(require("../../ApplicationManager"));
|
|
10
10
|
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
11
11
|
var _View = require("./View");
|
|
12
12
|
var _reactRouterDom = require("react-router-dom");
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
14
16
|
const ViewContainer = props => {
|
|
17
|
+
const counter = (0, _react.useRef)(0);
|
|
15
18
|
const params = (0, _reactRouterDom.useParams)();
|
|
16
19
|
_react.default.useEffect(() => {}, []);
|
|
20
|
+
const getKey = () => {
|
|
21
|
+
if (counter.current === 100) {
|
|
22
|
+
counter.current = 0;
|
|
23
|
+
}
|
|
24
|
+
return ++counter.current;
|
|
25
|
+
};
|
|
17
26
|
const renderView = () => {
|
|
18
27
|
let viewId = params.id;
|
|
19
28
|
let view = _ApplicationManager.default.getView(viewId);
|
|
20
29
|
let element = viewId === 'dashboard' ? props.dashboard : !_Utils.default.isNull(view) && !_Utils.default.isNull(view.config) ? /*#__PURE__*/_react.default.createElement(_View.View, {
|
|
21
|
-
key: view.config.id,
|
|
30
|
+
key: view.config.id + "-" + getKey(),
|
|
22
31
|
config: view.config,
|
|
23
32
|
parameters: view.parameters,
|
|
24
33
|
handle: view.handle
|
|
@@ -101,6 +101,7 @@ const Window = props => {
|
|
|
101
101
|
transform: 'translate(0, 0)',
|
|
102
102
|
backgroundColor: '#FFFFFF',
|
|
103
103
|
width: minimizeWidth + 'px',
|
|
104
|
+
maxWidth: 'unset',
|
|
104
105
|
height: '500px',
|
|
105
106
|
margin: '0 16px 16px 16px'
|
|
106
107
|
};
|
|
@@ -110,6 +111,7 @@ const Window = props => {
|
|
|
110
111
|
transform: 'translate(0, 0)',
|
|
111
112
|
backgroundColor: '#FFFFFF',
|
|
112
113
|
width: 'calc(100% - ' + props.leftOffset + ' )',
|
|
114
|
+
maxWidth: 'unset',
|
|
113
115
|
height: 'calc(100% - 88px)',
|
|
114
116
|
margin: '8px'
|
|
115
117
|
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
.loaderModal {
|
|
2
|
-
display: block; /* Hidden by default */
|
|
3
|
-
position: fixed; /* Stay in place */
|
|
4
|
-
z-index: 3000; /* Sit on top */
|
|
5
|
-
left: 0;
|
|
6
|
-
top: 0;
|
|
7
|
-
width: 100vw; /* Full width */
|
|
8
|
-
height: 100vh; /* Full height */
|
|
9
|
-
overflow: auto; /* Enable scroll if needed */
|
|
10
|
-
background-color: rgb(0,0,0); /* Fallback color */
|
|
11
|
-
background-color: rgba(0,0,0,0.1); /* Black w/ opacity */
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/* Modal Content/Box */
|
|
15
|
-
.modal-content {
|
|
16
|
-
background-color: transparent;
|
|
17
|
-
margin: 30% auto; /* 15% from the top and centered */
|
|
18
|
-
padding: 20px;
|
|
19
|
-
border: 1px solid #888;
|
|
20
|
-
width: 10%; /* Could be more or less, depending on screen size */
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* The Close Button */
|
|
24
|
-
.close {
|
|
25
|
-
color: #aaa;
|
|
26
|
-
float: right;
|
|
27
|
-
font-size: 28px;
|
|
28
|
-
font-weight: bold;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.close:hover,
|
|
32
|
-
.close:focus {
|
|
33
|
-
color: black;
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
}
|
|
1
|
+
.loaderModal {
|
|
2
|
+
display: block; /* Hidden by default */
|
|
3
|
+
position: fixed; /* Stay in place */
|
|
4
|
+
z-index: 3000; /* Sit on top */
|
|
5
|
+
left: 0;
|
|
6
|
+
top: 0;
|
|
7
|
+
width: 100vw; /* Full width */
|
|
8
|
+
height: 100vh; /* Full height */
|
|
9
|
+
overflow: auto; /* Enable scroll if needed */
|
|
10
|
+
background-color: rgb(0,0,0); /* Fallback color */
|
|
11
|
+
background-color: rgba(0,0,0,0.1); /* Black w/ opacity */
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Modal Content/Box */
|
|
15
|
+
.modal-content {
|
|
16
|
+
background-color: transparent;
|
|
17
|
+
margin: 30% auto; /* 15% from the top and centered */
|
|
18
|
+
padding: 20px;
|
|
19
|
+
border: 1px solid #888;
|
|
20
|
+
width: 10%; /* Could be more or less, depending on screen size */
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* The Close Button */
|
|
24
|
+
.close {
|
|
25
|
+
color: #aaa;
|
|
26
|
+
float: right;
|
|
27
|
+
font-size: 28px;
|
|
28
|
+
font-weight: bold;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.close:hover,
|
|
32
|
+
.close:focus {
|
|
33
|
+
color: black;
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
@@ -275,6 +275,7 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defaul
|
|
|
275
275
|
_VCEventManager.default.addSubscriptions(eventHandler, _VCEventType.VCEventType.REQUEST_TO_JOIN_MEETING, _VCEventType.VCEventType.USER_JOINED, _VCEventType.VCEventType.USER_LEFT_MEETING, _VCEventType.VCEventType.SYSTEM_EVENT, _VCEventType.VCEventType.SOCKET_CONNECT, _VCEventType.VCEventType.SOCKET_DISCONNECT, _VCEventType.VCEventType.RAISE_HAND, _VCEventType.VCEventType.LOWER_HAND, _VCEventType.VCEventType.PEER_DISCONNECT, _VCEventType.VCEventType.CONSUMER_TRANSPORT_FAILED, _VCEventType.VCEventType.CREATE_TRANSPORT_FAILED, _VCEventType.VCEventType.SHARING_STOPPED, _VCEventType.VCEventType.END_SESSION, _VCEventType.VCEventType.CHAT_MESSAGE, _VCEventType.VCEventType.AUDIO_VISUAL_SETTINGS_CHANGED);
|
|
276
276
|
document.addEventListener('sideBarToggleEvent', handleSidebarToggle);
|
|
277
277
|
_ApplicationManager.default.setHasActiveMeeting(true);
|
|
278
|
+
_ApplicationManager.default.setActiveMeetingKey(props.calendarEvent.key);
|
|
278
279
|
return () => {
|
|
279
280
|
_VCEventManager.default.removeSubscriptions(eventHandler);
|
|
280
281
|
_Observable.default.removeApplicationContextSubscriptions('training-room');
|
|
@@ -282,11 +283,13 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defaul
|
|
|
282
283
|
if (_ApplicationManager.default.hasActiveMeeting()) {
|
|
283
284
|
_SocketManager.default.leaveMeeting(props.calendarEvent.id);
|
|
284
285
|
_ApplicationManager.default.setHasActiveMeeting(false);
|
|
286
|
+
_ApplicationManager.default.setActiveMeetingKey(null);
|
|
285
287
|
}
|
|
286
288
|
};
|
|
287
289
|
}, []);
|
|
288
290
|
_react.default.useEffect(() => {
|
|
289
291
|
_ApplicationManager.default.setHasActiveMeeting(true);
|
|
292
|
+
_ApplicationManager.default.setActiveMeetingKey(props.calendarEvent.key);
|
|
290
293
|
let userFullName;
|
|
291
294
|
if (props.calendarEvent.host.username === _ApplicationManager.default.getUserDetails().username) {
|
|
292
295
|
userFullName = props.calendarEvent.host.name;
|
|
@@ -310,6 +313,7 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defaul
|
|
|
310
313
|
}
|
|
311
314
|
return () => {
|
|
312
315
|
_ApplicationManager.default.setHasActiveMeeting(false);
|
|
316
|
+
_ApplicationManager.default.setActiveMeetingKey(null);
|
|
313
317
|
};
|
|
314
318
|
}, []);
|
|
315
319
|
function addUserToParticipants(user) {
|
|
@@ -365,6 +369,7 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defaul
|
|
|
365
369
|
if (result === true) {
|
|
366
370
|
_SocketManager.default.endSession(props.calendarEvent.id);
|
|
367
371
|
_ApplicationManager.default.setHasActiveMeeting(false);
|
|
372
|
+
_ApplicationManager.default.setActiveMeetingKey(null);
|
|
368
373
|
_ApplicationManager.default.removeLoadedGraph(false);
|
|
369
374
|
setSideBarOpen(false);
|
|
370
375
|
setSideBarTab('');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.user-video {
|
|
2
|
-
min-width: 280px;
|
|
3
|
-
height: 280px;
|
|
4
|
-
}
|
|
1
|
+
.user-video {
|
|
2
|
+
min-width: 280px;
|
|
3
|
+
height: 280px;
|
|
4
|
+
}
|