@agilemotion/oui-react-js 1.6.1 → 1.6.3
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 +698 -421
- package/dist/BasicApp.js +5 -5
- package/dist/BasicAppHome.js +55 -26
- package/dist/DynamicJS.js +147 -65
- package/dist/InteractionPortalApp.css +1 -1
- package/dist/InteractionPortalApp.js +5 -5
- package/dist/InteractionPortalAppHome.js +57 -22
- package/dist/InteractionPortalApp_old.js +107 -61
- package/dist/RestUtils.js +339 -287
- package/dist/TypedValue.js +18 -15
- package/dist/Utils.js +375 -276
- package/dist/WithRouter.js +6 -6
- package/dist/assets/jss/components/authNavbarStyle.js +166 -164
- package/dist/assets/jss/components/buttonStyle.js +1 -1
- package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
- package/dist/assets/jss/components/cardBodyStyle.js +1 -1
- package/dist/assets/jss/components/cardFooterStyle.js +1 -1
- package/dist/assets/jss/components/cardHeaderStyle.js +13 -13
- package/dist/assets/jss/components/cardIconStyle.js +1 -1
- package/dist/assets/jss/components/cardStyle.js +1 -1
- package/dist/assets/jss/components/cardTextStyle.js +1 -1
- package/dist/assets/jss/components/customDropdownStyle.js +168 -169
- package/dist/assets/jss/components/customInputStyle.js +9 -3
- package/dist/assets/jss/components/dropdownStyle.js +69 -69
- package/dist/assets/jss/components/footerStyle.js +19 -13
- package/dist/assets/jss/components/headerLinksStyle.js +45 -48
- package/dist/assets/jss/components/headerStyle.js +68 -65
- package/dist/assets/jss/components/navbarLinksStyle.js +66 -77
- package/dist/assets/jss/components/navbarStyle.js +79 -76
- package/dist/assets/jss/components/sidebarStyle.js +436 -436
- package/dist/assets/jss/components/typographyStyle.js +9 -3
- package/dist/assets/jss/rootStyle.js +96 -81
- package/dist/assets/jss/views/layoutStyle.js +44 -41
- package/dist/assets/jss/views/loginBasicStyle.js +1 -1
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +1 -1
- package/dist/assets/jss/views/loginStyle.js +82 -77
- package/dist/components/AlertBar.js +50 -17
- package/dist/components/AlertItem.js +35 -12
- package/dist/components/AlertTemplate.js +30 -29
- package/dist/components/Button.js +62 -34
- package/dist/components/Calendar.js +140 -91
- package/dist/components/ConfirmationDialog.js +36 -11
- package/dist/components/DataGrid.js +512 -270
- package/dist/components/DataGridColumn.js +47 -22
- package/dist/components/DataGridFilter.js +186 -105
- package/dist/components/DataGridHeading.js +50 -32
- package/dist/components/Dialog.js +90 -35
- package/dist/components/DocumentTemplateDesigner.js +34 -16
- package/dist/components/DocumentTemplateDesignerComponent.js +124 -48
- package/dist/components/DocumentTemplatePlaceholderDialog.js +52 -30
- package/dist/components/DocumentViewer.js +34 -18
- package/dist/components/DocumentViewerComponent.js +26 -9
- package/dist/components/ElementResizeHandler.js +229 -207
- package/dist/components/FileThumb.js +32 -10
- package/dist/components/Graph.js +153 -85
- package/dist/components/GraphNode.js +58 -38
- package/dist/components/HtmlPanel.js +67 -39
- package/dist/components/Icon.js +206 -166
- package/dist/components/LoadingIndicator.js +3 -3
- package/dist/components/LottieIcon.js +1 -1
- package/dist/components/PopupView.js +39 -19
- package/dist/components/Portlet.js +32 -17
- package/dist/components/RegularButton.js +28 -32
- package/dist/components/SignaturePanel.js +37 -17
- package/dist/components/SocketManager.js +178 -119
- package/dist/components/StepperTitleBar.js +62 -42
- package/dist/components/TabPage.js +30 -25
- package/dist/components/TabPanel.js +86 -33
- package/dist/components/TableCellContent.js +51 -32
- package/dist/components/TemplateDesigner.js +173 -121
- package/dist/components/TemplateItemEventHandler.js +335 -221
- package/dist/components/TemplateTable.js +183 -118
- package/dist/components/TitleBar.js +26 -11
- package/dist/components/Toolbar.js +67 -38
- package/dist/components/Tooltip.js +43 -35
- package/dist/components/Tree.js +85 -44
- package/dist/components/UseIsVisible.js +25 -4
- package/dist/components/card/Card.js +27 -33
- package/dist/components/card/CardAvatar.js +20 -19
- package/dist/components/card/CardBody.js +24 -27
- package/dist/components/card/CardFooter.js +23 -24
- package/dist/components/card/CardHeader.js +24 -27
- package/dist/components/card/CardIcon.js +17 -13
- package/dist/components/card/CardText.js +17 -13
- package/dist/components/customInput/CustomInput.js +22 -36
- package/dist/components/dashboard/{BasicBusinessAppDashboard.js → FoldingSideTabDashboard.js} +111 -63
- package/dist/components/dashboard/SideMenuModuleDashboard.css +60 -0
- package/dist/components/dashboard/SideMenuModuleDashboard.js +423 -0
- package/dist/components/dashboard/TopMenuModuleDashboard.js +138 -0
- package/dist/components/dashboard/components/Header.js +29 -12
- package/dist/components/dashboard/components/LeftDrawer.js +3 -5
- package/dist/components/dashboard/components/UserIdentity.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +131 -87
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +488 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +64 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.css +65 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +556 -0
- package/dist/components/dashboard/components/portal/Timeline.js +1 -1
- package/dist/components/dashboard/components/portal/Workspace.js +5 -11
- package/dist/components/footer/Footer.js +31 -24
- package/dist/components/footer/HomeFooter.js +68 -34
- package/dist/components/form/AddressSearch.js +78 -42
- package/dist/components/form/AutoComplete.js +136 -55
- package/dist/components/form/BaseField.js +108 -56
- package/dist/components/form/Checkbox.js +10 -8
- package/dist/components/form/DatePicker.js +47 -25
- package/dist/components/form/FieldSet.js +217 -84
- package/dist/components/form/Form.js +334 -200
- package/dist/components/form/GridField.js +185 -82
- package/dist/components/form/IconField.js +9 -7
- package/dist/components/form/ImageEditor.js +141 -92
- package/dist/components/form/LabelField.js +12 -10
- package/dist/components/form/LookupField.js +54 -32
- package/dist/components/form/MultiFileUploadField.js +101 -67
- package/dist/components/form/RadioGroup.js +33 -16
- package/dist/components/form/Section.js +84 -34
- package/dist/components/form/SelectItem.js +55 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +11 -9
- package/dist/components/form/Switch.js +10 -8
- package/dist/components/form/TextField.js +34 -16
- package/dist/components/form/TimePicker.js +19 -15
- package/dist/components/form/TransferList.js +153 -75
- package/dist/components/form/UploadField.js +183 -128
- package/dist/components/grid/GridContainer.js +12 -8
- package/dist/components/grid/GridItem.js +12 -8
- package/dist/components/layout/CollapsiblePanel.js +44 -18
- package/dist/components/layout/Layout.js +81 -40
- package/dist/components/layout/VC.css +1 -1
- package/dist/components/layout/View.js +136 -62
- package/dist/components/layout/ViewContainer.js +13 -11
- package/dist/components/layout/ViewPort.js +25 -10
- package/dist/components/layout/Window.js +87 -53
- package/dist/components/layout/WindowViewPort.js +38 -16
- package/dist/components/media/ClosablePanel.js +7 -7
- package/dist/components/media/LobbyWaitingList.js +7 -9
- package/dist/components/media/MediaSoupHelper.js +379 -187
- package/dist/components/media/SideBarContent.js +22 -14
- package/dist/components/media/SocketRequest.js +5 -1
- package/dist/components/media/SocketResponse.js +5 -1
- package/dist/components/media/Timer.js +35 -15
- package/dist/components/media/Toolbar.css +5 -0
- package/dist/components/media/Toolbar.js +220 -102
- package/dist/components/media/ToolbarButton.js +82 -33
- package/dist/components/media/Toolbar_bck.js +142 -70
- package/dist/components/media/Tracks.js +31 -28
- package/dist/components/media/TrainingRoom.js +284 -121
- package/dist/components/media/Transports.js +27 -24
- package/dist/components/media/VCEventManager.js +95 -31
- package/dist/components/media/VCEventType.js +5 -1
- package/dist/components/media/VCParticipantList.js +40 -14
- package/dist/components/media/VCParticipantListItem.js +92 -41
- package/dist/components/media/VCRoom.js +29 -11
- package/dist/components/media/VCRoomParticipant.js +488 -242
- package/dist/components/media/VCRoomRecorder.js +236 -175
- package/dist/components/media/VCRoomWorkspace.js +505 -245
- package/dist/components/media/Video.js +89 -25
- package/dist/components/media/VideoPlayer.js +56 -22
- package/dist/components/media/chat/ChatRoom.js +255 -132
- package/dist/components/media/chat/ChatRoomItem.js +35 -14
- package/dist/components/media/chat/ChatRoomList.js +43 -13
- package/dist/components/menu/CollapsibleMenu.js +39 -20
- package/dist/components/menu/MenuBars.js +81 -48
- package/dist/components/menu/MenuButton.js +95 -60
- package/dist/components/menu/MenuItem.js +28 -9
- package/dist/components/menu/MenuLink.js +12 -10
- package/dist/components/menu/PopupMenu.js +16 -12
- package/dist/components/navbars/AuthNavbar.js +27 -18
- package/dist/components/navbars/HomeNavbar.js +243 -194
- package/dist/components/navbars/PortalNavbar.js +50 -26
- package/dist/components/signatures/AgilitySignaturePanel.js +96 -39
- package/dist/components/signatures/AlertItem.js +36 -13
- package/dist/components/signatures/Card.js +4 -4
- package/dist/components/signatures/DocumentContainer.js +141 -57
- package/dist/components/signatures/ImageSignatureInput.js +90 -59
- package/dist/components/signatures/MenuButton.js +53 -33
- package/dist/components/signatures/Prompt.js +26 -5
- package/dist/components/signatures/ResponsiveTable.js +302 -197
- package/dist/components/signatures/SearchView.js +77 -36
- package/dist/components/signatures/SignatorySearch.js +30 -10
- package/dist/components/signatures/SignatorySearchForm.js +35 -18
- package/dist/components/signatures/SignatureInput.js +56 -26
- package/dist/components/signatures/SignatureInputProps.js +107 -55
- package/dist/components/signatures/SignatureTemplateDesigner.js +340 -235
- package/dist/components/signatures/Toolbar.js +135 -94
- package/dist/components/signatures/ViewUtils.js +273 -224
- package/dist/components/typography/Danger.js +3 -5
- package/dist/components/typography/Info.js +3 -5
- package/dist/components/typography/Link.js +3 -5
- package/dist/event/ActionHandlers.js +57 -43
- package/dist/event/Event.js +16 -13
- package/dist/event/EventListener.js +39 -36
- package/dist/event/EventType.js +5 -1
- package/dist/event/LoadDataActionHandler.js +20 -8
- package/dist/event/Observable.js +323 -142
- package/dist/event/RouteActionHandler.js +139 -125
- package/dist/event/ScriptActionHandler.js +20 -8
- package/dist/event/ServiceCallActionHandler.js +51 -39
- package/dist/event/SignalGraphActionHandler.js +19 -7
- package/dist/js/Addresses.js +38 -24
- package/dist/js/Calendar.js +168 -161
- package/dist/js/DynamicLib.js +14 -11
- package/dist/js/Media.js +213 -120
- package/dist/js/Validators.js +6 -5
- package/dist/js/Windows.js +48 -47
- package/dist/redux/store/ConfigureStore.js +17 -9
- package/dist/redux/store/DashboardStore.js +110 -43
- package/dist/redux/store/History.js +1 -1
- package/dist/redux/store/SecurityStore.js +59 -20
- package/dist/security/TokenManager.js +44 -30
- package/dist/theme-default.js +1 -1
- package/dist/view/Dashboard.js +230 -137
- package/dist/view/PortalDashboard.js +4 -4
- package/dist/view/Settings.js +4 -2
- package/dist/view/Views.js +27 -14
- package/dist/view/security/ChangePasswordBasic.js +97 -40
- package/dist/view/security/ForgotPassword.js +59 -22
- package/dist/view/security/ForgotPasswordBasic.js +62 -21
- package/dist/view/security/Login.js +64 -24
- package/dist/view/security/LoginBasic.js +65 -26
- package/dist/view/security/LoginInteractionPortal.js +62 -25
- package/dist/view/security/ResetPassword.js +65 -23
- package/dist/view/security/ResetPasswordBasic.js +91 -37
- package/dist/view/security/Security.js +12 -12
- package/package.json +2 -3
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -115
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +0 -447
- /package/dist/components/dashboard/{BusinessPortalAppDashboard.css → TopMenuModuleDashboard.css} +0 -0
- /package/dist/components/dashboard/components/blackDashboard/sidebar/{Sidebar.css → FoldingTabSidebar.css} +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -13,17 +15,33 @@ var _icons = require("@material-ui/icons");
|
|
|
13
15
|
|
|
14
16
|
require("./DocumentTemplateDesignerComponent.css");
|
|
15
17
|
|
|
16
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
18
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
+
|
|
24
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
+
|
|
26
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
+
|
|
28
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
17
29
|
|
|
18
|
-
function
|
|
30
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
+
|
|
34
|
+
var DocumentTemplatePlaceholderDialog = function DocumentTemplatePlaceholderDialog(_ref) {
|
|
35
|
+
var open = _ref.open,
|
|
36
|
+
onClose = _ref.onClose,
|
|
37
|
+
onInsertHandler = _ref.onInsertHandler;
|
|
38
|
+
|
|
39
|
+
var _useState = (0, _react.useState)(null),
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
selectedIndex = _useState2[0],
|
|
42
|
+
setSelectedIndex = _useState2[1];
|
|
43
|
+
|
|
44
|
+
var placeholders = [{
|
|
27
45
|
title: 'Placeholder 1',
|
|
28
46
|
description: '{{placeholder_1}}'
|
|
29
47
|
}, {
|
|
@@ -36,15 +54,15 @@ const DocumentTemplatePlaceholderDialog = ({
|
|
|
36
54
|
title: 'Placeholder 4',
|
|
37
55
|
description: '{{placeholder_4}}'
|
|
38
56
|
}];
|
|
39
|
-
const {
|
|
40
|
-
palette
|
|
41
|
-
} = (0, _core.useTheme)();
|
|
42
57
|
|
|
43
|
-
|
|
58
|
+
var _useTheme = (0, _core.useTheme)(),
|
|
59
|
+
palette = _useTheme.palette;
|
|
60
|
+
|
|
61
|
+
var handleListItemClick = function handleListItemClick(index) {
|
|
44
62
|
setSelectedIndex(index);
|
|
45
63
|
};
|
|
46
64
|
|
|
47
|
-
|
|
65
|
+
var handleInsert = function handleInsert() {
|
|
48
66
|
if (selectedIndex !== null) {
|
|
49
67
|
console.log("Selected placeholder: ".concat(placeholders[selectedIndex].title));
|
|
50
68
|
onInsertHandler(placeholders[selectedIndex].description);
|
|
@@ -60,22 +78,26 @@ const DocumentTemplatePlaceholderDialog = ({
|
|
|
60
78
|
maxWidth: 'md'
|
|
61
79
|
}, /*#__PURE__*/_react.default.createElement(_core.DialogTitle, null, "Select a Placeholder"), /*#__PURE__*/_react.default.createElement(_core.DialogContent, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
62
80
|
id: "customTbarDialog"
|
|
63
|
-
}, /*#__PURE__*/_react.default.createElement(_core.List, null, placeholders.map((placeholder, index)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
}, /*#__PURE__*/_react.default.createElement(_core.List, null, placeholders.map(function (placeholder, index) {
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
83
|
+
key: index
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(_core.ListItem, {
|
|
85
|
+
button: true,
|
|
86
|
+
selected: selectedIndex === index,
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
return handleListItemClick(index);
|
|
89
|
+
} // className="char_block"
|
|
90
|
+
,
|
|
91
|
+
style: {
|
|
92
|
+
border: selectedIndex === index ? "1px solid ".concat(palette.primary.main) : null,
|
|
93
|
+
margin: '4px 0',
|
|
94
|
+
borderRadius: '4px'
|
|
95
|
+
}
|
|
96
|
+
}, /*#__PURE__*/_react.default.createElement(_core.ListItemAvatar, null, /*#__PURE__*/_react.default.createElement(_core.Avatar, null, /*#__PURE__*/_react.default.createElement(_icons.AddCircle, null))), /*#__PURE__*/_react.default.createElement(_core.ListItemText, {
|
|
97
|
+
primary: placeholder.title,
|
|
98
|
+
secondary: placeholder.description
|
|
99
|
+
})), index < placeholders.length - 1 && /*#__PURE__*/_react.default.createElement(_core.Divider, null));
|
|
100
|
+
})))), /*#__PURE__*/_react.default.createElement(_core.DialogActions, null, /*#__PURE__*/_react.default.createElement(_core.Button, {
|
|
79
101
|
onClick: onClose,
|
|
80
102
|
color: "primary"
|
|
81
103
|
}, "Cancel"), /*#__PURE__*/_react.default.createElement(_core.Button, {
|
|
@@ -25,37 +25,53 @@ var _DocumentViewerComponent = _interopRequireDefault(require("./DocumentViewerC
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
const [value, setValue] = _react.default.useState(null);
|
|
28
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
|
+
|
|
32
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
|
+
|
|
34
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
35
|
+
|
|
36
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
37
|
+
|
|
38
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
+
|
|
40
|
+
var DocumentViewer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
41
|
+
var _React$useState = _react.default.useState(null),
|
|
42
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
43
|
+
value = _React$useState2[0],
|
|
44
|
+
setValue = _React$useState2[1];
|
|
45
|
+
|
|
46
|
+
_react.default.useEffect(function () {
|
|
32
47
|
props.handle.api = api();
|
|
33
48
|
});
|
|
34
49
|
|
|
35
|
-
_react.default.useEffect(()
|
|
36
|
-
|
|
50
|
+
_react.default.useEffect(function () {
|
|
51
|
+
var parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
37
52
|
|
|
38
53
|
_Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
|
|
39
54
|
|
|
40
55
|
_Observable.default.addSystemSubscriptions(props.viewId, parsedConfig);
|
|
41
56
|
}, []);
|
|
42
57
|
|
|
43
|
-
|
|
58
|
+
var api = function api() {
|
|
44
59
|
return {
|
|
45
60
|
get id() {
|
|
46
61
|
return props.config.id;
|
|
47
62
|
},
|
|
48
63
|
|
|
49
|
-
loadData: actionConfig
|
|
64
|
+
loadData: function loadData(actionConfig) {
|
|
50
65
|
if (!_Utils.default.isNull(actionConfig) && !_Utils.default.isNull(actionConfig.value)) {
|
|
51
|
-
|
|
66
|
+
var _value = _ApplicationManager.default.isExpression(actionConfig.value) ? _ApplicationManager.default.resolveExpressionValue(actionConfig.value) : actionConfig.value; // TODO : set value
|
|
67
|
+
|
|
52
68
|
} else {
|
|
53
|
-
|
|
54
|
-
|
|
69
|
+
var service = !_Utils.default.isNull(props.config.dataService) ? props.config.dataService : actionConfig !== null ? actionConfig.dataService : null;
|
|
70
|
+
var componentValue = !_Utils.default.isNull(props.config.value) ? props.config.value : actionConfig !== null ? actionConfig.value : null;
|
|
55
71
|
|
|
56
72
|
if (!_Utils.default.isNull(service)) {
|
|
57
73
|
if (service.type === 'rpc') {
|
|
58
|
-
(0, _RestUtils.invokeRpc)(service, props.handle, props.viewId, result
|
|
74
|
+
(0, _RestUtils.invokeRpc)(service, props.handle, props.viewId, function (result) {}, function (e) {}, function (parameter) {});
|
|
59
75
|
} else {
|
|
60
76
|
if (_Utils.default.isNull(actionConfig)) {
|
|
61
77
|
actionConfig = {};
|
|
@@ -63,8 +79,8 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
63
79
|
|
|
64
80
|
actionConfig.service = service; // TODO : Implement the invalid paramenter callback
|
|
65
81
|
|
|
66
|
-
_ServiceCallActionHandler.default.execute(actionConfig, null, null, props.viewId, data
|
|
67
|
-
|
|
82
|
+
_ServiceCallActionHandler.default.execute(actionConfig, null, null, props.viewId, function (data) {
|
|
83
|
+
var file = {};
|
|
68
84
|
|
|
69
85
|
if (data.payloadBase64) {
|
|
70
86
|
file.base64 = data.payloadBase64;
|
|
@@ -74,16 +90,16 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
74
90
|
|
|
75
91
|
file.type = props.config.fileType;
|
|
76
92
|
setValue(file);
|
|
77
|
-
}, ()
|
|
93
|
+
}, function () {});
|
|
78
94
|
}
|
|
79
95
|
} else {
|
|
80
96
|
if (!_Utils.default.isNull(componentValue)) {
|
|
81
97
|
if (_ApplicationManager.default.isExpression(componentValue)) {
|
|
82
|
-
|
|
98
|
+
var path = _Utils.default.getPropertyChainPath(componentValue);
|
|
83
99
|
|
|
84
100
|
if (!_Utils.default.isNull(path.valueObject)) {
|
|
85
|
-
_Observable.default.addSystemGeneratedSubscription(props.viewId, props.viewId, props.config.id, ()
|
|
86
|
-
|
|
101
|
+
_Observable.default.addSystemGeneratedSubscription(props.viewId, props.viewId, props.config.id, function () {
|
|
102
|
+
var value = _DynamicJS.default.executeScript("".concat(props.config.id, "ValueEvaluator"), componentValue);
|
|
87
103
|
|
|
88
104
|
if (!_Utils.default.isNull(value)) {// TODO : set value
|
|
89
105
|
}
|
|
@@ -101,7 +117,7 @@ const DocumentViewer = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.def
|
|
|
101
117
|
ref: ref
|
|
102
118
|
}, !_Utils.default.isNull(value) ? /*#__PURE__*/_react.default.createElement(_DocumentViewerComponent.default, {
|
|
103
119
|
file: value,
|
|
104
|
-
onDocumentLoadSuccess: ()
|
|
120
|
+
onDocumentLoadSuccess: function onDocumentLoadSuccess() {}
|
|
105
121
|
}) : null);
|
|
106
122
|
}));
|
|
107
123
|
|
|
@@ -13,16 +13,33 @@ var _Utils = _interopRequireDefault(require("../Utils"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
+
|
|
18
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
19
|
+
|
|
20
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
+
|
|
22
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
23
|
+
|
|
24
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
25
|
+
|
|
26
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
+
|
|
16
28
|
_reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(_reactPdf.pdfjs.version, "/pdf.worker.js");
|
|
17
29
|
|
|
18
|
-
|
|
19
|
-
|
|
30
|
+
var DocumentViewerComponent = function DocumentViewerComponent(props) {
|
|
31
|
+
var _React$useState = _react.default.useState(1),
|
|
32
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
33
|
+
pageNumber = _React$useState2[0],
|
|
34
|
+
setPageNumber = _React$useState2[1];
|
|
20
35
|
|
|
21
|
-
|
|
36
|
+
var _React$useState3 = _react.default.useState(null),
|
|
37
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
38
|
+
numPages = _React$useState4[0],
|
|
39
|
+
setNumPages = _React$useState4[1];
|
|
22
40
|
|
|
23
|
-
|
|
24
|
-
numPages
|
|
25
|
-
}) => {
|
|
41
|
+
var onDocumentLoadSuccess = function onDocumentLoadSuccess(_ref) {
|
|
42
|
+
var numPages = _ref.numPages;
|
|
26
43
|
setNumPages(numPages);
|
|
27
44
|
|
|
28
45
|
if (!_Utils.default.isNull(props.onDocumentLoadSuccess)) {
|
|
@@ -30,15 +47,15 @@ const DocumentViewerComponent = props => {
|
|
|
30
47
|
}
|
|
31
48
|
};
|
|
32
49
|
|
|
33
|
-
|
|
50
|
+
var changePage = function changePage(offset) {
|
|
34
51
|
setPageNumber(pageNumber + offset);
|
|
35
52
|
};
|
|
36
53
|
|
|
37
|
-
|
|
54
|
+
var previousPage = function previousPage() {
|
|
38
55
|
changePage(-1);
|
|
39
56
|
};
|
|
40
57
|
|
|
41
|
-
|
|
58
|
+
var nextPage = function nextPage() {
|
|
42
59
|
changePage(1);
|
|
43
60
|
};
|
|
44
61
|
|