@agilemotion/oui-react-js 1.8.55 → 1.8.57
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 +446 -472
- package/dist/BasicApp.js +30 -0
- package/dist/BasicAppHome.js +2 -3
- package/dist/DateUtils.js +2 -2
- package/dist/DynamicJS.js +94 -101
- package/dist/InteractionPortalAppHome.js +1 -1
- package/dist/InteractionPortalApp_old.js +1 -2
- package/dist/MouseTracker.js +23 -0
- package/dist/RestService.js +13 -11
- package/dist/RestUtils.js +1 -1
- package/dist/TypedValue.js +15 -14
- package/dist/Utils.js +121 -114
- package/dist/ViewContext.js +152 -159
- package/dist/assets/jss/components/authNavbarStyle.js +34 -37
- package/dist/assets/jss/components/cardHeaderStyle.js +11 -18
- package/dist/assets/jss/components/customDropdownStyle.js +25 -27
- package/dist/assets/jss/components/customInputStyle.js +7 -3
- package/dist/assets/jss/components/dropdownStyle.js +14 -11
- package/dist/assets/jss/components/footerStyle.js +17 -12
- package/dist/assets/jss/components/headerLinksStyle.js +12 -9
- package/dist/assets/jss/components/headerStyle.js +24 -26
- package/dist/assets/jss/components/navbarLinksStyle.js +12 -9
- package/dist/assets/jss/components/navbarStyle.js +24 -26
- package/dist/assets/jss/components/sidebarStyle.js +42 -42
- package/dist/assets/jss/components/typographyStyle.js +7 -3
- package/dist/assets/jss/rootStyle.js +30 -34
- package/dist/assets/jss/views/layoutStyle.js +12 -9
- package/dist/assets/jss/views/loginStyle.js +9 -6
- package/dist/components/AlertBar.js +1 -1
- package/dist/components/Button.js +18 -11
- package/dist/components/Calendar.js +9 -6
- package/dist/components/Chart.js +1 -1
- package/dist/components/DataGrid.css +10 -1
- package/dist/components/DataGrid.js +115 -56
- package/dist/components/DataGridColumn.js +2 -1
- package/dist/components/DocumentTemplateDesignerComponent.js +7 -7
- package/dist/components/DocumentTemplateDesignerComponent2.js +3 -4
- package/dist/components/DocumentTemplatePlaceholderDialog.js +3 -4
- package/dist/components/DocumentViewer.js +15 -5
- package/dist/components/ElementResizeHandler.js +177 -174
- package/dist/components/FaceApi.js +2 -2
- package/dist/components/FileThumb.js +5 -5
- package/dist/components/Graph.js +77 -74
- package/dist/components/GraphNode.js +39 -36
- package/dist/components/HtmlPanel.js +2 -1
- package/dist/components/Icon.js +1 -2
- package/dist/components/PDFViewer.js +2 -3
- package/dist/components/PopupView.js +1 -1
- package/dist/components/Portlet.js +3 -2
- package/dist/components/RegularButton.js +17 -14
- package/dist/components/SocketManager.js +97 -94
- package/dist/components/StepperTitleBar.js +7 -6
- package/dist/components/TabPage.js +10 -7
- package/dist/components/TabPanel.js +11 -6
- package/dist/components/TableCellContent.js +15 -11
- package/dist/components/TemplateDesigner.js +2 -2
- package/dist/components/TemplateItemEventHandler.js +232 -228
- package/dist/components/TemplateTable.js +32 -29
- package/dist/components/TitleBar.js +2 -2
- package/dist/components/Toolbar.js +17 -10
- package/dist/components/Tree.js +3 -3
- package/dist/components/WordDocumentViewer.css +1 -0
- package/dist/components/WordDocumentViewer.js +205 -14
- package/dist/components/card/Card.js +18 -15
- package/dist/components/card/CardAvatar.js +11 -8
- package/dist/components/card/CardBody.js +16 -13
- package/dist/components/card/CardFooter.js +15 -12
- package/dist/components/card/CardHeader.js +16 -13
- package/dist/components/card/CardIcon.js +9 -6
- package/dist/components/card/CardText.js +9 -6
- package/dist/components/customInput/File.js +4 -5
- package/dist/components/dashboard/FoldingSideTabDashboard.bck.js +1 -1
- package/dist/components/dashboard/FoldingSideTabDashboard.js +2 -3
- package/dist/components/dashboard/components/Header.js +6 -4
- package/dist/components/dashboard/components/LeftDrawer.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +26 -28
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.bck.js +182 -188
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +27 -30
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +12 -14
- package/dist/components/drag-spec-design.json +15 -0
- package/dist/components/facialRecognition/FaceRecognitionComponent.js +10 -11
- package/dist/components/facialRecognition/service/faceApi.js +3 -3
- package/dist/components/form/AddressSearch.js +8 -5
- package/dist/components/form/AutoComplete.js +4 -4
- package/dist/components/form/BaseField.js +3 -2
- package/dist/components/form/CurrencyField.js +9 -9
- package/dist/components/form/DatePicker.js +3 -2
- package/dist/components/form/FieldSet.js +2 -1
- package/dist/components/form/Form.css +1 -1
- package/dist/components/form/Form.js +10 -7
- package/dist/components/form/GridField.js +6 -4
- package/dist/components/form/IconField.js +2 -1
- package/dist/components/form/ImageEditor.js +13 -8
- package/dist/components/form/LookupField.js +8 -7
- package/dist/components/form/MultiFileUploadField.js +14 -8
- package/dist/components/form/SelectItem.js +7 -6
- package/dist/components/form/TextField.js +6 -6
- package/dist/components/form/TimePicker.js +3 -2
- package/dist/components/form/TransferList.js +2 -2
- package/dist/components/form/UploadField.js +5 -5
- package/dist/components/grid/GridContainer.js +7 -4
- package/dist/components/grid/GridItem.js +7 -4
- package/dist/components/layout/CollapsiblePanel.js +7 -5
- package/dist/components/layout/Layout.js +5 -5
- package/dist/components/layout/View.js +6 -5
- package/dist/components/layout/ViewContainer.js +1 -2
- package/dist/components/layout/ViewPort.js +1 -1
- package/dist/components/layout/Window.js +2 -3
- package/dist/components/layout/WindowDialog.js +9 -7
- package/dist/components/layout/WindowViewPort.js +3 -3
- package/dist/components/media/Chat.js +2 -1
- package/dist/components/media/MediaSoupHelper.js +57 -53
- package/dist/components/media/SocketRequest.js +9 -7
- package/dist/components/media/SocketResponse.js +7 -5
- package/dist/components/media/Timer.js +1 -2
- package/dist/components/media/Toolbar.js +3 -3
- package/dist/components/media/ToolbarButton.js +3 -3
- package/dist/components/media/Toolbar_bck.js +3 -3
- package/dist/components/media/Tracks.js +24 -19
- package/dist/components/media/TrainingRoom.js +3 -4
- package/dist/components/media/Transports.js +21 -17
- package/dist/components/media/VCEventManager.js +25 -24
- package/dist/components/media/VCEventType.js +81 -79
- package/dist/components/media/VCParticipantList.js +1 -2
- package/dist/components/media/VCParticipantListItem.js +2 -3
- package/dist/components/media/VCRoomParticipant.js +4 -5
- package/dist/components/media/VCRoomRecorder.js +163 -160
- package/dist/components/media/VCRoomWorkspace.js +3 -4
- package/dist/components/media/Video.js +1 -2
- package/dist/components/media/VideoPlayer.js +1 -2
- package/dist/components/media/chat/ChatPoll.js +15 -15
- package/dist/components/media/chat/ChatRoom.js +15 -15
- package/dist/components/media/chat/ChatRoomItem.js +2 -3
- package/dist/components/media/chat/ChatRoomList.js +1 -2
- package/dist/components/media/chat/ChatRoomWrapper.js +1 -1
- package/dist/components/media/chat/PollContainer.js +14 -8
- package/dist/components/media/chat/PollResult.js +1 -2
- package/dist/components/menu/MenuBars.js +8 -5
- package/dist/components/menu/MenuButton.js +11 -5
- package/dist/components/menu/MenuItem.js +13 -6
- package/dist/components/menu/MenuLink.js +2 -1
- package/dist/components/navbars/HomeNavbar.js +43 -41
- package/dist/components/navbars/PortalNavbar.js +1 -2
- package/dist/components/signatures/AgilitySignaturePanel.js +39 -15
- package/dist/components/signatures/{DocumentContainer.js → HtmlSignatureDocumentContainer.js} +4 -4
- package/dist/components/signatures/ImageSignatureInput.js +27 -16
- package/dist/components/signatures/ResponsiveTable.js +1 -1
- package/dist/components/signatures/SearchView.js +1 -1
- package/dist/components/signatures/SignatureInput.js +42 -98
- package/dist/components/signatures/SignatureInputProps.js +1 -1
- package/dist/components/signatures/SignatureTemplateDesigner.js +13 -10
- package/dist/components/signatures/Toolbar.js +7 -3
- package/dist/components/signatures/ViewUtils.js +21 -16
- package/dist/event/ActionHandlers.js +10 -7
- package/dist/event/Event.js +15 -13
- package/dist/event/EventListener.js +39 -41
- package/dist/event/EventType.js +24 -19
- package/dist/event/Observable.js +120 -125
- package/dist/event/RouteActionHandler.js +4 -4
- package/dist/event/ScriptActionHandler.js +1 -1
- package/dist/event/ServiceCallActionHandler.js +1 -1
- package/dist/interaction/CursorOverlay.js +48 -0
- package/dist/interaction/DragContext.js +39 -0
- package/dist/interaction/GrabContext.js +40 -0
- package/dist/js/Addresses.js +9 -8
- package/dist/js/Calendar.js +152 -149
- package/dist/js/Docs.js +92 -87
- package/dist/js/DynamicLib.js +9 -6
- package/dist/js/Media.js +134 -131
- package/dist/js/ProcurementMeetings.js +81 -78
- package/dist/js/Validators.js +53 -50
- package/dist/js/Windows.js +35 -32
- package/dist/redux/store/ConfigureStore.js +8 -5
- package/dist/redux/store/DashboardStore.js +13 -12
- package/dist/redux/store/SecurityStore.js +9 -6
- package/dist/security/TokenManager.js +1 -1
- package/dist/view/Dashboard.js +11 -12
- package/dist/view/security/ForgotPassword.js +3 -3
- package/dist/view/security/ForgotPasswordBasic.js +1 -1
- package/dist/view/security/Login.js +4 -4
- package/dist/view/security/LoginBasic.js +2 -2
- package/dist/view/security/LoginInteractionPortal.js +2 -2
- package/dist/view/security/ResetPassword.js +1 -1
- package/dist/view/security/ResetPasswordBasic.js +1 -1
- package/dist/view/security/Security.js +4 -4
- package/package.json +1 -1
|
@@ -26,8 +26,12 @@ var _Icon = _interopRequireDefault(require("./Icon"));
|
|
|
26
26
|
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
27
27
|
var _Calendar = _interopRequireDefault(require("../js/Calendar"));
|
|
28
28
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
29
|
-
function
|
|
30
|
-
function
|
|
29
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
30
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
31
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
32
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
33
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
34
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
31
35
|
const eventTemplate = {
|
|
32
36
|
id: '',
|
|
33
37
|
title: '',
|
|
@@ -192,7 +196,7 @@ const Calendar = props => {
|
|
|
192
196
|
} = _ref;
|
|
193
197
|
// eslint-disable-next-line no-underscore-dangle
|
|
194
198
|
const colorName = '#945c33';
|
|
195
|
-
return [
|
|
199
|
+
return ["bg-light-".concat(colorName)];
|
|
196
200
|
},
|
|
197
201
|
viewDidMount() {
|
|
198
202
|
setOpen(false);
|
|
@@ -230,8 +234,7 @@ const Calendar = props => {
|
|
|
230
234
|
h: timeDate.getHours(),
|
|
231
235
|
m: 0
|
|
232
236
|
});
|
|
233
|
-
const calendarEvent = {
|
|
234
|
-
...eventTemplate,
|
|
237
|
+
const calendarEvent = _objectSpread(_objectSpread({}, eventTemplate), {}, {
|
|
235
238
|
schedule: {
|
|
236
239
|
startDate: date,
|
|
237
240
|
endDate: date,
|
|
@@ -241,7 +244,7 @@ const Calendar = props => {
|
|
|
241
244
|
recurringEndDate: date
|
|
242
245
|
},
|
|
243
246
|
eventType: _Utils.default.getComponentAttribute(props.config, 'eventType', 'TRAINING')
|
|
244
|
-
};
|
|
247
|
+
});
|
|
245
248
|
if (_Utils.default.isStringEmpty(calendarEvent.id)) {
|
|
246
249
|
calendarEvent.id = null;
|
|
247
250
|
}
|
package/dist/components/Chart.js
CHANGED
|
@@ -35,7 +35,7 @@ const Chart = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwa
|
|
|
35
35
|
function load(parameters) {
|
|
36
36
|
const accessToken = sessionStorage.getItem('accessToken');
|
|
37
37
|
const idToken = sessionStorage.getItem('idToken');
|
|
38
|
-
let path = location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/html/get?version=1.0&id=' + props.config.contentPath +
|
|
38
|
+
let path = location + _ApplicationManager.default.getContextRoot() + _ApplicationManager.default.getUIConfigPath() + '/html/get?version=1.0&id=' + props.config.contentPath + "-".concat(displayType.toLowerCase(), ".html&access_token=").concat(accessToken, "&idToken=").concat(idToken);
|
|
39
39
|
for (const parameter of parameters) {
|
|
40
40
|
path += '&' + parameter.name + '=' + parameter.value;
|
|
41
41
|
}
|
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
border-bottom: 1px solid #e2e2e2;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
.ouiTable-empty thead tr {
|
|
11
|
+
border-bottom: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.pagination-container {
|
|
15
|
+
width: 100%;
|
|
16
|
+
border-top: 1px solid #e2e2e2;
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
table.responsive-table {
|
|
11
20
|
display: table;
|
|
12
21
|
/* required for table-layout to be used (not normally necessary; included for completeness) */
|
|
@@ -63,7 +72,7 @@ table.responsive-table thead {
|
|
|
63
72
|
padding: 0 !important;
|
|
64
73
|
}
|
|
65
74
|
|
|
66
|
-
.ouiTable .oui-table-row {
|
|
75
|
+
.ouiTable .oui-table-row:not(:last-child) {
|
|
67
76
|
border-bottom: 1px solid #e2e2e2;
|
|
68
77
|
}
|
|
69
78
|
|
|
@@ -29,12 +29,13 @@ var _Layout = require("./layout/Layout");
|
|
|
29
29
|
var _DynamicJS = _interopRequireDefault(require("../DynamicJS"));
|
|
30
30
|
var _Switch = _interopRequireDefault(require("@mui/material/Switch"));
|
|
31
31
|
var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormControlLabel"));
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
var _GrabContext = _interopRequireDefault(require("../interaction/GrabContext"));
|
|
33
|
+
var _CursorOverlay = _interopRequireDefault(require("../interaction/CursorOverlay"));
|
|
34
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
34
35
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
35
36
|
const MULTI_SELECT_CHECKBOX_COL_WIDTH = exports.MULTI_SELECT_CHECKBOX_COL_WIDTH = 64;
|
|
36
37
|
function evaluateTableCellWidth(multiSelect, column, columnCount) {
|
|
37
|
-
let width = _ApplicationManager.default.isExpression(column.attributes['width']) ? _DynamicJS.default.executeScript(
|
|
38
|
+
let width = _ApplicationManager.default.isExpression(column.attributes['width']) ? _DynamicJS.default.executeScript("popupTitle_".concat(column.id), column.attributes['width'], column) : column.attributes['width'];
|
|
38
39
|
return multiSelect === true ? 'calc(' + (!_Utils.default.isNull(width) ? width : 100 / columnCount + '%') + ' - ' + MULTI_SELECT_CHECKBOX_COL_WIDTH / columnCount + 'px)' : typeof width !== 'undefined' ? width : 100 / columnCount + '%';
|
|
39
40
|
}
|
|
40
41
|
function desc(a, b, orderBy) {
|
|
@@ -109,6 +110,7 @@ const useStyles = (0, _styles.makeStyles)(theme => ({
|
|
|
109
110
|
}
|
|
110
111
|
}));
|
|
111
112
|
const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
113
|
+
var _config$attributes, _props$config$attribu, _props$config$attribu2, _props$config$attribu3;
|
|
112
114
|
const classes = useStyles();
|
|
113
115
|
const [order, setOrder] = _react.default.useState('desc');
|
|
114
116
|
const [config] = _react.default.useState(_Utils.default.parseConfig(props.config, props.viewId));
|
|
@@ -137,6 +139,9 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
137
139
|
const rowsRef = _react.default.useRef([]);
|
|
138
140
|
let noteKey = 0;
|
|
139
141
|
const columnWidths = _react.default.useRef({});
|
|
142
|
+
const dragSpec = ((_config$attributes = config.attributes) === null || _config$attributes === void 0 ? void 0 : _config$attributes.dragSpec) || {};
|
|
143
|
+
const rowGrabSpec = dragSpec.row || {};
|
|
144
|
+
const rowsGrabbable = rowGrabSpec.enabled === true;
|
|
140
145
|
const api = () => {
|
|
141
146
|
return {
|
|
142
147
|
get id() {
|
|
@@ -282,6 +287,18 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
282
287
|
}
|
|
283
288
|
};
|
|
284
289
|
};
|
|
290
|
+
function handleRowGrabToggle(row, index) {
|
|
291
|
+
if (!isRowGrabbable(row)) return;
|
|
292
|
+
if (_GrabContext.default.isActive()) return;
|
|
293
|
+
_GrabContext.default.grab(props.handle, {
|
|
294
|
+
row,
|
|
295
|
+
rowIndex: index,
|
|
296
|
+
componentId: props.config.id,
|
|
297
|
+
viewId: props.viewId
|
|
298
|
+
});
|
|
299
|
+
_CursorOverlay.default.show();
|
|
300
|
+
_Observable.default.fireEvent(_EventType.default.ROW_GRAB_START, new _Event.default(props.handle, props.viewId, row));
|
|
301
|
+
}
|
|
285
302
|
function updateScrollBarPadding() {
|
|
286
303
|
var tbody = document.getElementById('mainTableBody');
|
|
287
304
|
if (tbody !== null && typeof tbody !== 'undefined') {
|
|
@@ -354,11 +371,46 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
354
371
|
_Observable.default.fireEvent(_EventType.default.SELECTION_CHANGE, event);
|
|
355
372
|
}
|
|
356
373
|
}
|
|
357
|
-
function
|
|
374
|
+
function isRowGrabbable(row) {
|
|
375
|
+
return rowsGrabbable && !isRowDragDisabled(row);
|
|
376
|
+
}
|
|
377
|
+
function isRowDragDisabled(row) {
|
|
378
|
+
if (!dragSpec.disabledWhen) {
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
return _DynamicJS.default.executeScriptObject('ROW-' + row.id + '-drag-disabled', dragSpec.disabledWhen, props.config.id, {
|
|
382
|
+
row: row
|
|
383
|
+
}, false);
|
|
384
|
+
}
|
|
385
|
+
function setCursor(cursor) {
|
|
386
|
+
document.body.style.cursor = cursor || 'default';
|
|
387
|
+
}
|
|
388
|
+
function handleRowMouseEnter(row) {
|
|
389
|
+
if (!isRowGrabbable(row)) {
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// Only show grab cursor if not already holding something
|
|
394
|
+
if (!_GrabContext.default.isActive()) {
|
|
395
|
+
setCursor(rowGrabSpec.cursor || 'grab');
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
function handleRowMouseLeave() {
|
|
399
|
+
setCursor('default');
|
|
400
|
+
}
|
|
401
|
+
function handleClick(event, row, index) {
|
|
402
|
+
if (event.target.closest('.editCell')) {
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
event.stopPropagation();
|
|
406
|
+
if (rowsGrabbable && !isRowDragDisabled(row)) {
|
|
407
|
+
handleRowGrabToggle(row, index);
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
358
410
|
if (!_Utils.default.isNull(props.onCellSelectionChange)) {
|
|
359
411
|
return;
|
|
360
412
|
}
|
|
361
|
-
doHandleClick(event, id);
|
|
413
|
+
doHandleClick(event, row.id);
|
|
362
414
|
}
|
|
363
415
|
function handleCellClick(event, id, column) {
|
|
364
416
|
if (column.fieldType !== 'document') {
|
|
@@ -724,7 +776,7 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
724
776
|
function renderTiles() {
|
|
725
777
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, stableSort(rows, getSorting(order, orderBy)).map((row, index) => {
|
|
726
778
|
const isItemSelected = isSelected(row.id);
|
|
727
|
-
const labelId =
|
|
779
|
+
const labelId = "enhanced-table-checkbox-".concat(index);
|
|
728
780
|
row.index = index;
|
|
729
781
|
return renderTile(row, index);
|
|
730
782
|
}));
|
|
@@ -812,12 +864,12 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
812
864
|
},
|
|
813
865
|
label: "Wrap table text"
|
|
814
866
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
815
|
-
className:
|
|
867
|
+
className: "responsive-table",
|
|
816
868
|
style: {
|
|
817
869
|
height: props.height
|
|
818
870
|
}
|
|
819
871
|
}, /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Table, {
|
|
820
|
-
className: "ouiTable
|
|
872
|
+
className: "".concat('ouiTable' + (rows.length === 0 ? ' ouiTable-empty' : '')),
|
|
821
873
|
cellSpacing: "0",
|
|
822
874
|
"aria-labelledby": "tableTitle",
|
|
823
875
|
style: {
|
|
@@ -857,7 +909,7 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
857
909
|
id: "mainTableBody"
|
|
858
910
|
}, rows.map((row, index) => {
|
|
859
911
|
const isItemSelected = isSelected(row.id);
|
|
860
|
-
const labelId =
|
|
912
|
+
const labelId = "enhanced-table-checkbox-".concat(index);
|
|
861
913
|
let defaultRowStyle = {
|
|
862
914
|
display: 'flex',
|
|
863
915
|
flexWrap: 'wrap',
|
|
@@ -865,7 +917,9 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
865
917
|
};
|
|
866
918
|
return /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Tr, {
|
|
867
919
|
style: props.config.rowAttributes && props.config.rowAttributes.style ? _Utils.default.mergeObjects(props.config.rowAttributes.style, defaultRowStyle) : defaultRowStyle,
|
|
868
|
-
|
|
920
|
+
onMouseEnter: () => handleRowMouseEnter(row),
|
|
921
|
+
onMouseLeave: handleRowMouseLeave,
|
|
922
|
+
onClick: event => handleClick(event, row, index),
|
|
869
923
|
role: "checkbox",
|
|
870
924
|
"aria-checked": isItemSelected,
|
|
871
925
|
tabIndex: -1,
|
|
@@ -882,51 +936,56 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
882
936
|
inputProps: {
|
|
883
937
|
'aria-labelledby': labelId
|
|
884
938
|
}
|
|
885
|
-
})) : null, config.columns.map(column =>
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
939
|
+
})) : null, config.columns.map(column => {
|
|
940
|
+
var _row$columnReadOnly, _column$editor;
|
|
941
|
+
return _Utils.default.evaluateBooleanExpression(column.attributes['hidden'], props.config.id) === true ? null : column.layout ? /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Td, {
|
|
942
|
+
style: {
|
|
943
|
+
padding: 0,
|
|
944
|
+
width: column.attributes.width ? column.attributes.width : 100 / config.columns.length + '%',
|
|
945
|
+
height: '100%'
|
|
946
|
+
},
|
|
947
|
+
align: "left",
|
|
948
|
+
className: !props.disabled && isItemSelected && !_Utils.default.isNull(props.form) && !_Utils.default.isNull(column.editor) ? 'editCell' : null,
|
|
949
|
+
key: index + "_" + column.id
|
|
950
|
+
}, /*#__PURE__*/_react.default.createElement(_Layout.Layout, {
|
|
951
|
+
handle: createColumnLayoutHandle(column, index),
|
|
952
|
+
key: index + "_" + column.id + "_layout",
|
|
953
|
+
tableRow: rows.find(r => r.id === row.id),
|
|
954
|
+
rowIndex: index,
|
|
955
|
+
config: JSON.parse(JSON.stringify(props.config.columns.find(col => col.id === column.id).layout)),
|
|
956
|
+
viewId: props.viewId,
|
|
957
|
+
parent: false
|
|
958
|
+
})) : /*#__PURE__*/_react.default.createElement(_reactSuperResponsiveTable.Td, {
|
|
959
|
+
style: {
|
|
960
|
+
width: column.attributes.width ? column.attributes.width : 100 / config.columns.length + '%',
|
|
961
|
+
height: '100%'
|
|
962
|
+
},
|
|
963
|
+
align: "left",
|
|
964
|
+
className: !props.disabled && isItemSelected && !_Utils.default.isNull(column.editor) ? 'editCell' : null,
|
|
965
|
+
key: index + "_" + column.id,
|
|
966
|
+
onClick: event => handleCellClick(event, row.id, column)
|
|
967
|
+
}, /*#__PURE__*/_react.default.createElement(_TableCellContent.default, {
|
|
968
|
+
wrap: wrap,
|
|
969
|
+
onRowError: rowErrorHandler,
|
|
970
|
+
handle: createCellEditorHandle(column),
|
|
971
|
+
viewId: props.viewId,
|
|
972
|
+
editor: !props.disabled && !row.readOnly && !((_row$columnReadOnly = row.columnReadOnly) !== null && _row$columnReadOnly !== void 0 && _row$columnReadOnly[column === null || column === void 0 ? void 0 : column.id]) ? column.editor : null,
|
|
973
|
+
ref: /*#__PURE__*/_react.default.createRef(),
|
|
974
|
+
refCallback: createCell,
|
|
975
|
+
selected: isItemSelected,
|
|
976
|
+
validator: column.validator,
|
|
977
|
+
valueChangeHandler: editorChangeHandler,
|
|
978
|
+
columnConfig: column,
|
|
979
|
+
dataBinding: !_Utils.default.isNull(column.dataBinding) ? column.dataBinding : column.id,
|
|
980
|
+
row: row,
|
|
981
|
+
contentType: column.fieldType || ((_column$editor = column.editor) === null || _column$editor === void 0 ? void 0 : _column$editor.fieldType),
|
|
982
|
+
cellFormatter: column.cellFormatter,
|
|
983
|
+
criteria: criteria
|
|
984
|
+
}));
|
|
985
|
+
}));
|
|
986
|
+
})))), _Utils.default.isNull((_props$config$attribu = props.config.attributes) === null || _props$config$attribu === void 0 ? void 0 : _props$config$attribu.pagination) && (_Utils.default.isNull(props.pagination) || props.pagination === true) || (_props$config$attribu2 = props.config.attributes) !== null && _props$config$attribu2 !== void 0 && _props$config$attribu2.pagination && ((_props$config$attribu3 = props.config.attributes) === null || _props$config$attribu3 === void 0 ? void 0 : _props$config$attribu3.pagnation) === true ? /*#__PURE__*/_react.default.createElement("div", {
|
|
987
|
+
className: "pagination-container"
|
|
988
|
+
}, /*#__PURE__*/_react.default.createElement(_TablePagination.default, {
|
|
930
989
|
className: "grid-table-pagination",
|
|
931
990
|
rowsPerPageOptions: rowsPerPageOptions,
|
|
932
991
|
component: "div",
|
|
@@ -941,5 +1000,5 @@ const DataGrid = exports.DataGrid = /*#__PURE__*/_react.default.memo(/*#__PURE__
|
|
|
941
1000
|
},
|
|
942
1001
|
onPageChange: handleChangePage,
|
|
943
1002
|
onRowsPerPageChange: handleChangeRowsPerPage
|
|
944
|
-
}) : null) : null);
|
|
1003
|
+
})) : null) : null);
|
|
945
1004
|
}));
|
|
@@ -44,7 +44,8 @@ const DataGridColumn = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
44
44
|
startWidth.current = e.target.parentElement.offsetWidth;
|
|
45
45
|
originalWidths.current = {};
|
|
46
46
|
for (let col of props.columns) {
|
|
47
|
-
|
|
47
|
+
var _col$attributes$width;
|
|
48
|
+
const width = parseFloat(((_col$attributes$width = col.attributes.width) === null || _col$attributes$width === void 0 ? void 0 : _col$attributes$width.replace('%', '')) || 100 / props.columns.length);
|
|
48
49
|
originalWidths.current[col.id] = width;
|
|
49
50
|
}
|
|
50
51
|
document.addEventListener('mousemove', handleResizeMove);
|
|
@@ -17,8 +17,7 @@ var _Utils = _interopRequireDefault(require("../Utils"));
|
|
|
17
17
|
var _reactPromiseTracker = require("react-promise-tracker");
|
|
18
18
|
var _WordDocumentViewer = require("./WordDocumentViewer");
|
|
19
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
|
-
function
|
|
21
|
-
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; }
|
|
20
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
22
21
|
(0, _ej2Base.registerLicense)(_WordDocumentViewer.KEY);
|
|
23
22
|
_ej2ReactDocumenteditor.DocumentEditorContainerComponent.Inject(_ej2ReactDocumenteditor.Toolbar);
|
|
24
23
|
const DocumentTemplateDesignerComponent = props => {
|
|
@@ -136,7 +135,7 @@ const DocumentTemplateDesignerComponent = props => {
|
|
|
136
135
|
});
|
|
137
136
|
const formData = new FormData();
|
|
138
137
|
formData.append('files', file, 'document.docx');
|
|
139
|
-
(0, _reactPromiseTracker.trackPromise)(fetch(
|
|
138
|
+
(0, _reactPromiseTracker.trackPromise)(fetch("".concat(_WordDocumentViewer.DOCSVC, "Import"), {
|
|
140
139
|
method: 'POST',
|
|
141
140
|
body: formData
|
|
142
141
|
}).then(response => {
|
|
@@ -451,7 +450,7 @@ const DocumentTemplateDesignerComponent = props => {
|
|
|
451
450
|
let defaultAction = {
|
|
452
451
|
actionType: 'script',
|
|
453
452
|
script: {
|
|
454
|
-
lines: [
|
|
453
|
+
lines: ["@#{this}.highlightSelection($event.data)"]
|
|
455
454
|
}
|
|
456
455
|
};
|
|
457
456
|
eventHandlingConfig.subscriptions = [];
|
|
@@ -481,13 +480,14 @@ const DocumentTemplateDesignerComponent = props => {
|
|
|
481
480
|
return null;
|
|
482
481
|
}
|
|
483
482
|
if (container) {
|
|
483
|
+
var _props$file, _props$file2;
|
|
484
484
|
container.documentEditor.editor.stopProtection("password");
|
|
485
485
|
let blob = await container.documentEditor.saveAsBlob('Docx');
|
|
486
486
|
if (props.commentsOnly) {
|
|
487
487
|
container.documentEditor.editor.enforceProtection('password', 'CommentsOnly');
|
|
488
488
|
}
|
|
489
|
-
return new File([blob], props.file
|
|
490
|
-
type: props.file
|
|
489
|
+
return new File([blob], (_props$file = props.file) !== null && _props$file !== void 0 && _props$file.name ? props.file.name : 'document.docx', {
|
|
490
|
+
type: (_props$file2 = props.file) !== null && _props$file2 !== void 0 && _props$file2.type ? props.file.type : 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
|
491
491
|
});
|
|
492
492
|
}
|
|
493
493
|
};
|
|
@@ -543,7 +543,7 @@ const DocumentTemplateDesignerComponent = props => {
|
|
|
543
543
|
valueChangeHandler: React.useCallback(val => {
|
|
544
544
|
model.current = val;
|
|
545
545
|
let newVal = validateProps(val.properties) ? val : null;
|
|
546
|
-
if (JSON.stringify(currentVal.current) !== JSON.stringify(newVal
|
|
546
|
+
if (JSON.stringify(currentVal.current) !== JSON.stringify(newVal === null || newVal === void 0 ? void 0 : newVal.properties)) {
|
|
547
547
|
if (newVal) {
|
|
548
548
|
valueChangeHandler({
|
|
549
549
|
properties: val.properties,
|
|
@@ -16,8 +16,7 @@ var _Observable = _interopRequireDefault(require("../event/Observable"));
|
|
|
16
16
|
var _Utils = _interopRequireDefault(require("../Utils"));
|
|
17
17
|
var _reactPromiseTracker = require("react-promise-tracker");
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
-
function
|
|
20
|
-
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; }
|
|
19
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
21
20
|
(0, _ej2Base.registerLicense)('ORg4AjUWIQA/Gnt2U1hhQlJBfV5AQmBIYVp/TGpJfl96cVxMZVVBJAtUQF1hTX5adkJiWHtWdXBXT2Je');
|
|
22
21
|
_ej2ReactDocumenteditor.DocumentEditorContainerComponent.Inject(_ej2ReactDocumenteditor.Toolbar);
|
|
23
22
|
const DocumentTemplateDesignerComponent = props => {
|
|
@@ -457,7 +456,7 @@ const DocumentTemplateDesignerComponent = props => {
|
|
|
457
456
|
let defaultAction = {
|
|
458
457
|
actionType: 'script',
|
|
459
458
|
script: {
|
|
460
|
-
lines: [
|
|
459
|
+
lines: ["@#{this}.highlightSelection($event.data)"]
|
|
461
460
|
}
|
|
462
461
|
};
|
|
463
462
|
eventHandlingConfig.subscriptions = [];
|
|
@@ -530,7 +529,7 @@ const DocumentTemplateDesignerComponent = props => {
|
|
|
530
529
|
valueChangeHandler: React.useCallback(val => {
|
|
531
530
|
model.current = val;
|
|
532
531
|
let newVal = validateProps(val.properties) ? val : null;
|
|
533
|
-
if (JSON.stringify(currentVal.current) !== JSON.stringify(newVal
|
|
532
|
+
if (JSON.stringify(currentVal.current) !== JSON.stringify(newVal === null || newVal === void 0 ? void 0 : newVal.properties)) {
|
|
534
533
|
if (newVal) {
|
|
535
534
|
valueChangeHandler({
|
|
536
535
|
properties: val.properties,
|
|
@@ -8,8 +8,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _material = require("@mui/material");
|
|
9
9
|
var _iconsMaterial = require("@mui/icons-material");
|
|
10
10
|
require("./DocumentTemplateDesignerComponent.css");
|
|
11
|
-
function
|
|
12
|
-
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; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
12
|
const DocumentTemplatePlaceholderDialog = _ref => {
|
|
14
13
|
let {
|
|
15
14
|
open,
|
|
@@ -38,7 +37,7 @@ const DocumentTemplatePlaceholderDialog = _ref => {
|
|
|
38
37
|
};
|
|
39
38
|
const handleInsert = () => {
|
|
40
39
|
if (selectedIndex !== null) {
|
|
41
|
-
console.log(
|
|
40
|
+
console.log("Selected placeholder: ".concat(placeholders[selectedIndex].title));
|
|
42
41
|
onInsertHandler(placeholders[selectedIndex]);
|
|
43
42
|
}
|
|
44
43
|
onClose();
|
|
@@ -59,7 +58,7 @@ const DocumentTemplatePlaceholderDialog = _ref => {
|
|
|
59
58
|
// className="char_block"
|
|
60
59
|
,
|
|
61
60
|
style: {
|
|
62
|
-
border: selectedIndex === index ?
|
|
61
|
+
border: selectedIndex === index ? "1px solid ".concat(palette.primary.main) : null,
|
|
63
62
|
margin: '4px 0',
|
|
64
63
|
borderRadius: '4px'
|
|
65
64
|
}
|
|
@@ -18,6 +18,7 @@ var _Event = _interopRequireDefault(require("../event/Event"));
|
|
|
18
18
|
var _EventType = _interopRequireDefault(require("../event/EventType"));
|
|
19
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
20
|
const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
21
|
+
var _props$config$attribu2, _props$config$attribu3, _parsedConfig$attribu;
|
|
21
22
|
const [loading, setLoading] = _react.default.useState(true);
|
|
22
23
|
const [label, setLabel] = _react.default.useState(null);
|
|
23
24
|
const [hasLoadingError, setHasLoadingError] = _react.default.useState(false);
|
|
@@ -28,6 +29,7 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
28
29
|
props.handle.api = api();
|
|
29
30
|
});
|
|
30
31
|
_react.default.useEffect(() => {
|
|
32
|
+
var _props$config$attribu;
|
|
31
33
|
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
32
34
|
_Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
|
|
33
35
|
_Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
|
|
@@ -35,7 +37,7 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
35
37
|
setLabel(_DynamicJS.default.evaluateExpression(label));
|
|
36
38
|
let event = new _Event.default(props.handle, props.viewId, null);
|
|
37
39
|
_Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
|
|
38
|
-
if (props.config.attributes
|
|
40
|
+
if (((_props$config$attribu = props.config.attributes) === null || _props$config$attribu === void 0 ? void 0 : _props$config$attribu.autoLoadData) === false) {
|
|
39
41
|
setLoading(false);
|
|
40
42
|
}
|
|
41
43
|
refresh();
|
|
@@ -89,7 +91,7 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
89
91
|
let path = _Utils.default.getPropertyChainPath(componentValue);
|
|
90
92
|
if (!_Utils.default.isNull(path.valueObject)) {
|
|
91
93
|
_Observable.default.addSystemGeneratedSubscription(props.viewId, props.viewId, props.config.id, () => {
|
|
92
|
-
let value = _DynamicJS.default.executeScript(
|
|
94
|
+
let value = _DynamicJS.default.executeScript("".concat(props.config.id, "ValueEvaluator"), componentValue);
|
|
93
95
|
if (!_Utils.default.isNull(value)) {
|
|
94
96
|
// TODO : set value
|
|
95
97
|
}
|
|
@@ -132,17 +134,25 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
132
134
|
return await wordEditorValueHandler.api.getValue();
|
|
133
135
|
}
|
|
134
136
|
return null;
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
* Framework API
|
|
140
|
+
* Called via config script:
|
|
141
|
+
* @#{this}.insertReadonlyAnchor(...)
|
|
142
|
+
*/
|
|
143
|
+
insertReadonlyAnchor: (value, dropPosition) => {
|
|
144
|
+
wordEditorValueHandler.api.insertReadonlyAnchor(value, dropPosition);
|
|
135
145
|
}
|
|
136
146
|
};
|
|
137
147
|
};
|
|
138
148
|
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
139
149
|
return visible && /*#__PURE__*/_react.default.createElement("div", {
|
|
140
150
|
style: _Utils.default.mergeStyles({}, props.config)
|
|
141
|
-
}, props.config.attributes
|
|
151
|
+
}, ((_props$config$attribu2 = props.config.attributes) === null || _props$config$attribu2 === void 0 ? void 0 : _props$config$attribu2.label) && /*#__PURE__*/_react.default.createElement("div", {
|
|
142
152
|
style: _Utils.default.mergeObjects({
|
|
143
153
|
fontSize: '20px',
|
|
144
154
|
color: '#1d253b'
|
|
145
|
-
}, props.config.attributes
|
|
155
|
+
}, (_props$config$attribu3 = props.config.attributes) === null || _props$config$attribu3 === void 0 ? void 0 : _props$config$attribu3.labelStyle)
|
|
146
156
|
}, label), loading && /*#__PURE__*/_react.default.createElement("div", {
|
|
147
157
|
style: {
|
|
148
158
|
marginTop: '16px'
|
|
@@ -170,7 +180,7 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo(/*#__PURE__*/_react.defa
|
|
|
170
180
|
commentsOnly: _Utils.default.evaluateBooleanExpression(parsedConfig.commentsOnly, props.config.id),
|
|
171
181
|
enableUpload: _Utils.default.evaluateBooleanExpression(parsedConfig.enableUpload, props.config.id),
|
|
172
182
|
trackChanges: _Utils.default.evaluateBooleanExpression(parsedConfig.trackChanges, props.config.id),
|
|
173
|
-
height: parsedConfig.attributes
|
|
183
|
+
height: (_parsedConfig$attribu = parsedConfig.attributes) === null || _parsedConfig$attribu === void 0 ? void 0 : _parsedConfig$attribu.containerHeight,
|
|
174
184
|
id: props.config.id
|
|
175
185
|
})));
|
|
176
186
|
}));
|