@agilemotion/oui-react-js 1.3.7 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.TXT +1 -0
- package/dist/ApplicationContext.js +161 -284
- package/dist/BasicApp.js +1 -1
- package/dist/BasicAppHome.js +17 -4
- package/dist/BusinessPortalApp.js +4 -4
- package/dist/BusinessPortalAppHome.js +10 -39
- package/dist/DynamicJS.js +20 -52
- package/dist/RestUtils.js +86 -111
- package/dist/Utils.js +36 -30
- package/dist/assets/jss/components/authNavbarStyle.js +34 -35
- package/dist/assets/jss/components/cardHeaderStyle.js +12 -12
- package/dist/assets/jss/components/customDropdownStyle.js +26 -26
- package/dist/assets/jss/components/customInputStyle.js +2 -8
- package/dist/assets/jss/components/dropdownStyle.js +10 -15
- package/dist/assets/jss/components/footerStyle.js +12 -18
- package/dist/assets/jss/components/headerLinksStyle.js +7 -13
- package/dist/assets/jss/components/headerStyle.js +24 -25
- package/dist/assets/jss/components/navbarLinksStyle.js +7 -13
- package/dist/assets/jss/components/navbarStyle.js +24 -25
- package/dist/assets/jss/components/sidebarStyle.js +41 -43
- package/dist/assets/jss/components/typographyStyle.js +2 -8
- package/dist/assets/jss/rootStyle.js +32 -47
- package/dist/assets/jss/views/layoutStyle.js +6 -11
- package/dist/assets/jss/views/loginStyle.js +4 -10
- package/dist/assets/lotties/call-loading.json +1 -0
- package/dist/assets/lotties/calling-2.json +1 -0
- package/dist/assets/lotties/calling.json +1 -0
- package/dist/assets/lotties/calling2.json +1 -0
- package/dist/assets/lotties/chat.json +1 -0
- package/dist/assets/lotties/join.json +1 -0
- package/dist/assets/lotties/loading.json +1 -0
- package/dist/assets/lotties/msg2.json +1 -0
- package/dist/assets/lotties/recording.json +1 -0
- package/dist/assets/lotties/waiting.json +1 -0
- package/dist/assets/scss/black-dashboard-react/bootstrap/_card.scss +5 -5
- package/dist/assets/scss/black-dashboard-react/bootstrap/_carousel.scss +2 -2
- package/dist/assets/scss/black-dashboard-react/bootstrap/_custom-forms.scss +3 -3
- package/dist/assets/scss/black-dashboard-react/bootstrap/_functions.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/bootstrap/_images.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/bootstrap/_jumbotron.scss +1 -1
- package/dist/assets/scss/black-dashboard-react/bootstrap/_popover.scss +7 -5
- package/dist/assets/scss/black-dashboard-react/bootstrap/_tooltip.scss +4 -4
- package/dist/assets/scss/black-dashboard-react/bootstrap/_variables.scss +5 -5
- package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid-framework.scss +2 -2
- package/dist/assets/scss/black-dashboard-react/bootstrap/mixins/_grid.scss +11 -9
- package/dist/assets/scss/black-dashboard-react/bootstrap/utilities/_embed.scss +6 -4
- package/dist/assets/scss/black-dashboard-react/custom/_variables.scss +1 -1
- package/dist/components/AlertBar.js +39 -80
- package/dist/components/AlertItem.js +4 -26
- package/dist/components/Button.js +24 -36
- package/dist/components/Calendar.js +478 -0
- package/dist/components/Calender.css +244 -0
- package/dist/components/ConfirmationDialog.js +5 -29
- package/dist/components/DataGrid.js +169 -338
- package/dist/components/DataGridColumn.js +5 -28
- package/dist/components/DataGridFilter.js +46 -114
- package/dist/components/DataGridHeading.js +11 -19
- package/dist/components/Dialog.js +27 -121
- package/dist/components/DocumentViewer.js +15 -35
- package/dist/components/DocumentViewerComponent.js +2 -20
- package/dist/components/FileThumb.js +115 -0
- package/dist/components/Graph.js +25 -75
- package/dist/components/GraphNode.js +4 -21
- package/dist/components/HtmlPanel.js +59 -78
- package/dist/components/Icon.js +99 -1
- package/dist/components/LoadingIndicator.js +4 -4
- package/dist/components/LottieIcon.js +134 -0
- package/dist/components/PopupView.js +2 -20
- package/dist/components/RegularButton.js +15 -19
- package/dist/components/SignaturePanel.js +9 -40
- package/dist/components/SocketManager.js +170 -0
- package/dist/components/StepperTitleBar.js +30 -56
- package/dist/components/TabPage.js +6 -9
- package/dist/components/TabPanel.js +41 -98
- package/dist/components/TableCellContent.js +30 -38
- package/dist/components/TemplateDesigner.css +0 -1
- package/dist/components/TemplateDesigner.js +107 -151
- package/dist/components/TemplateItemEventHandler.js +33 -100
- package/dist/components/TemplateTable.js +6 -42
- package/dist/components/TitleBar.js +35 -52
- package/dist/components/Toolbar.js +33 -179
- package/dist/components/Tree.js +27 -64
- package/dist/components/card/Card.js +16 -20
- package/dist/components/card/CardAvatar.js +9 -13
- package/dist/components/card/CardBody.js +13 -17
- package/dist/components/card/CardFooter.js +12 -16
- package/dist/components/card/CardHeader.js +13 -17
- package/dist/components/card/CardIcon.js +6 -10
- package/dist/components/card/CardText.js +6 -10
- package/dist/components/customInput/CustomInput.js +12 -10
- package/dist/components/dashboard/BasicBusinessAppDashboard.js +81 -158
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +33 -79
- package/dist/components/dashboard/components/Header.js +8 -25
- package/dist/components/dashboard/components/LeftDrawer.js +3 -1
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +1 -1
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +143 -36
- package/dist/components/footer/Footer.js +6 -18
- package/dist/components/form/AddressSearch.js +32 -66
- package/dist/components/form/AutoComplete.js +160 -0
- package/dist/components/form/BaseField.js +66 -96
- package/dist/components/form/DatePicker.js +3 -21
- package/dist/components/form/FieldSet.js +158 -180
- package/dist/components/form/Form.css +1 -1
- package/dist/components/form/Form.js +137 -471
- package/dist/components/form/GridField.js +46 -146
- package/dist/components/form/IconField.js +35 -0
- package/dist/components/form/ImageEditor.js +19 -57
- package/dist/components/form/LookupField.js +8 -29
- package/dist/components/form/MultiFileUploadField.js +186 -0
- package/dist/components/form/RadioGroup.js +1 -16
- package/dist/components/form/Section.js +31 -92
- package/dist/components/form/SelectItem.js +14 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +4 -2
- package/dist/components/form/Switch.js +53 -0
- package/dist/components/form/TextField.js +10 -17
- package/dist/components/form/TimePicker.js +7 -1
- package/dist/components/form/TransferList.css +2 -2
- package/dist/components/form/TransferList.js +67 -125
- package/dist/components/form/UploadField.js +27 -79
- package/dist/components/form/fieldset.css +8 -0
- package/dist/components/grid/GridContainer.js +5 -9
- package/dist/components/grid/GridItem.js +5 -9
- package/dist/components/layout/CollapsiblePanel.js +11 -33
- package/dist/components/layout/Layout.js +175 -290
- package/dist/components/layout/VC.css +17 -0
- package/dist/components/layout/View.css +17 -1
- package/dist/components/layout/View.js +77 -194
- package/dist/components/loader.css +1 -1
- package/dist/components/media/ClosablePanel.css +37 -0
- package/dist/components/media/ClosablePanel.js +53 -0
- package/dist/components/media/LobbyWaitingList.js +91 -0
- package/dist/components/media/MediaSoupHelper.js +223 -0
- package/dist/components/media/Recorder.js +235 -0
- package/dist/components/media/SideBarContent.css +54 -0
- package/dist/components/media/SideBarContent.js +46 -0
- package/dist/components/media/SocketRequest.js +20 -0
- package/dist/components/media/SocketResponse.js +16 -0
- package/dist/components/media/Timer.css +30 -0
- package/dist/components/media/Timer.js +88 -0
- package/dist/components/media/Toolbar.css +20 -0
- package/dist/components/media/Toolbar.js +470 -0
- package/dist/components/media/Tracks.js +39 -0
- package/dist/components/media/TrainingRoom.js +531 -0
- package/dist/components/media/Transports.js +35 -0
- package/dist/components/media/VCEventManager.js +74 -0
- package/dist/components/media/VCEventType.js +164 -0
- package/dist/components/media/VCParticipantList.css +72 -0
- package/dist/components/media/VCParticipantList.js +56 -0
- package/dist/components/media/VCParticipantListItem.css +73 -0
- package/dist/components/media/VCParticipantListItem.js +319 -0
- package/dist/components/media/VCRoom.css +42 -0
- package/dist/components/media/VCRoom.js +90 -0
- package/dist/components/media/VCRoomParticipant.css +25 -0
- package/dist/components/media/VCRoomParticipant.js +806 -0
- package/dist/components/media/VCRoomWorkspace.css +86 -0
- package/dist/components/media/VCRoomWorkspace.js +653 -0
- package/dist/components/media/Video.css +4 -0
- package/dist/components/media/Video.js +131 -0
- package/dist/components/media/chat/ChatRoom.js +926 -0
- package/dist/components/media/chat/ChatRoomItem.js +83 -0
- package/dist/components/media/chat/ChatRoomList.js +78 -0
- package/dist/components/media/chat/ChatRooms.scss +567 -0
- package/dist/components/menu/CollapsibleMenu.js +2 -19
- package/dist/components/menu/MenuBars.js +6 -33
- package/dist/components/menu/MenuButton.js +7 -35
- package/dist/components/menu/MenuItem.js +3 -20
- package/dist/components/menu/MenuLink.js +18 -12
- package/dist/components/navbars/AuthNavbar.js +5 -18
- package/dist/components/navbars/HomeNavbar.js +3 -5
- package/dist/components/navbars/PortalNavbar.js +4 -22
- package/dist/components/signatures/AgilitySignaturePanel.js +35 -101
- package/dist/components/signatures/AlertItem.js +3 -24
- package/dist/components/signatures/DocumentContainer.js +47 -135
- package/dist/components/signatures/ImageSignatureInput.js +8 -35
- package/dist/components/signatures/MenuButton.js +1 -16
- package/dist/components/signatures/Prompt.js +3 -24
- package/dist/components/signatures/ResponsiveTable.js +75 -96
- package/dist/components/signatures/SearchView.js +14 -50
- package/dist/components/signatures/SignatorySearch.js +83 -98
- package/dist/components/signatures/SignatorySearchForm.js +11 -17
- package/dist/components/signatures/SignatureInput.js +15 -44
- package/dist/components/signatures/SignatureInputProps.js +20 -60
- package/dist/components/signatures/SignatureTemplateDesigner.js +148 -235
- package/dist/components/signatures/Toolbar.js +7 -34
- package/dist/components/signatures/ViewUtils.js +2 -6
- package/dist/components/typography/Danger.js +3 -1
- package/dist/components/typography/Info.js +3 -1
- package/dist/components/typography/Link.js +6 -2
- package/dist/event/ActionHandlers.js +3 -3
- package/dist/event/EventType.js +7 -1
- package/dist/event/LoadDataActionHandler.js +1 -1
- package/dist/event/Observable.js +56 -168
- package/dist/event/RouteActionHandler.js +45 -11
- package/dist/event/ServiceCallActionHandler.js +34 -24
- package/dist/js/Addresses.js +10 -8
- package/dist/js/Media.js +157 -0
- package/dist/redux/store/ConfigureStore.js +3 -9
- package/dist/redux/store/DashboardStore.js +42 -94
- package/dist/redux/store/SecurityStore.js +15 -50
- package/dist/view/Dashboard.js +242 -163
- package/dist/view/security/ChangePasswordBasic.js +23 -76
- package/dist/view/security/ForgotPassword.js +9 -42
- package/dist/view/security/ForgotPasswordBasic.js +8 -41
- package/dist/view/security/Login.js +11 -47
- package/dist/view/security/LoginBasic.js +8 -41
- package/dist/view/security/LoginBusinessPortal.js +8 -41
- package/dist/view/security/ResetPassword.js +9 -47
- package/dist/view/security/ResetPasswordBasic.js +21 -71
- package/dist/view/security/Security.js +1 -0
- package/package.json +29 -13
- package/README.md +0 -1623
- package/dist/components/dashboard/BasicApp.js +0 -140
- package/dist/components/navbars/NavbarLinks.js +0 -212
- package/dist/components/signatures/OLD.js +0 -1138
|
@@ -13,30 +13,12 @@ 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
|
-
|
|
28
16
|
_reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(_reactPdf.pdfjs.version, "/pdf.worker.js");
|
|
29
17
|
|
|
30
18
|
const DocumentViewerComponent = props => {
|
|
31
|
-
const
|
|
32
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
33
|
-
pageNumber = _React$useState2[0],
|
|
34
|
-
setPageNumber = _React$useState2[1];
|
|
19
|
+
const [pageNumber, setPageNumber] = _react.default.useState(1);
|
|
35
20
|
|
|
36
|
-
const
|
|
37
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
38
|
-
numPages = _React$useState4[0],
|
|
39
|
-
setNumPages = _React$useState4[1];
|
|
21
|
+
const [numPages, setNumPages] = _react.default.useState(null);
|
|
40
22
|
|
|
41
23
|
const onDocumentLoadSuccess = ({
|
|
42
24
|
numPages
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
11
|
+
|
|
12
|
+
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
13
|
+
|
|
14
|
+
var _Icon = _interopRequireDefault(require("./Icon"));
|
|
15
|
+
|
|
16
|
+
var _ApplicationContext = _interopRequireDefault(require("../ApplicationContext"));
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
const location = window.location.protocol + "//" + window.location.hostname;
|
|
25
|
+
|
|
26
|
+
const FileThumb = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
27
|
+
const [downloadUrl] = (0, _react.useState)(location + _ApplicationContext.default.getContextRoot() + '/docs/api/v1/manager/download/' + props.file.repositoryId + '?access_token=' + sessionStorage.getItem("accessToken") + '&idToken=' + sessionStorage.getItem("idToken"));
|
|
28
|
+
|
|
29
|
+
_react.default.useEffect(() => {}, []);
|
|
30
|
+
|
|
31
|
+
const isImage = () => {
|
|
32
|
+
return props.file.type.startsWith('image/');
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const getThumbImage = () => {
|
|
36
|
+
return props.file.type === 'application/pdf' ? 'pdf-icon.png' : props.file.type === 'application/msword' ? 'doc.png' : props.file.type.startsWith('video/') ? 'media.png' : props.file.type.startsWith('audio/') ? 'media.png' : props.file.type === 'application/zip' ? 'zip.png' : props.file.type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' ? 'doc.png' : props.file.type === 'application/vnd.ms-excel' ? 'excel.png' : props.file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' ? 'excel.png' : props.file.type === 'application/vnd.ms-powerpoint' ? 'powerpoint.png' : 'default-file-thumb.png';
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
className: 'row',
|
|
41
|
+
style: {
|
|
42
|
+
width: '128px',
|
|
43
|
+
height: '128px',
|
|
44
|
+
display: 'flex',
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
borderRadius: '4px',
|
|
48
|
+
margin: '4px',
|
|
49
|
+
marginLeft: 0,
|
|
50
|
+
marginRight: 0,
|
|
51
|
+
border: '1px solid #aaa'
|
|
52
|
+
}
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
className: 'row',
|
|
55
|
+
style: {
|
|
56
|
+
width: '100%',
|
|
57
|
+
height: '20%',
|
|
58
|
+
marginLeft: '4px',
|
|
59
|
+
marginRight: '4px'
|
|
60
|
+
}
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
62
|
+
style: {
|
|
63
|
+
width: "10%"
|
|
64
|
+
}
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
66
|
+
"aria-controls": "menu-list-grow",
|
|
67
|
+
"aria-haspopup": "true",
|
|
68
|
+
style: {
|
|
69
|
+
width: "8px",
|
|
70
|
+
height: "8px"
|
|
71
|
+
},
|
|
72
|
+
onClick: () => props.onDelete(props.file)
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
74
|
+
id: 'DELETE'
|
|
75
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
+
style: {
|
|
77
|
+
overflow: "hidden",
|
|
78
|
+
textOverflow: "ellipsis",
|
|
79
|
+
marginLeft: '10px',
|
|
80
|
+
marginTop: '2px',
|
|
81
|
+
whiteSpace: "nowrap"
|
|
82
|
+
},
|
|
83
|
+
className: 'col'
|
|
84
|
+
}, props.file.repositoryId ? /*#__PURE__*/_react.default.createElement("a", {
|
|
85
|
+
style: {
|
|
86
|
+
cursor: 'pointer'
|
|
87
|
+
},
|
|
88
|
+
target: "_blank",
|
|
89
|
+
href: "".concat(downloadUrl)
|
|
90
|
+
}, props.file.name) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, props.file.name))), /*#__PURE__*/_react.default.createElement("div", {
|
|
91
|
+
className: 'row',
|
|
92
|
+
style: {
|
|
93
|
+
width: '98%',
|
|
94
|
+
height: '70%',
|
|
95
|
+
marginLeft: 0,
|
|
96
|
+
marginRight: 0
|
|
97
|
+
}
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
99
|
+
variant: "contained",
|
|
100
|
+
component: "span",
|
|
101
|
+
disabled: true,
|
|
102
|
+
style: {
|
|
103
|
+
width: '100%',
|
|
104
|
+
height: '100%',
|
|
105
|
+
backgroundRepeat: 'no-repeat',
|
|
106
|
+
backgroundSize: 'contain',
|
|
107
|
+
backgroundPosition: 'center',
|
|
108
|
+
backgroundColor: 'transparent',
|
|
109
|
+
backgroundImage: isImage() ? "url(".concat(props.file.repositoryId ? downloadUrl : props.file.payload, ")") : "url(".concat(require('../../assets/img/' + getThumbImage()), ")")
|
|
110
|
+
}
|
|
111
|
+
})));
|
|
112
|
+
}));
|
|
113
|
+
|
|
114
|
+
var _default = FileThumb;
|
|
115
|
+
exports.default = _default;
|
package/dist/components/Graph.js
CHANGED
|
@@ -15,12 +15,6 @@ var _Utils = _interopRequireDefault(require("../Utils"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
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
18
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
19
|
|
|
26
20
|
class Graph {
|
|
@@ -29,23 +23,12 @@ class Graph {
|
|
|
29
23
|
let index = 0;
|
|
30
24
|
let collection = this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC" ? this.path : this.config.nodes;
|
|
31
25
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
37
|
-
const element = _step.value;
|
|
38
|
-
|
|
39
|
-
if (this.current.config.name === element.name) {
|
|
40
|
-
return index;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
index++;
|
|
26
|
+
for (const element of collection) {
|
|
27
|
+
if (this.current.config.name === element.name) {
|
|
28
|
+
return index;
|
|
44
29
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} finally {
|
|
48
|
-
_iterator.f();
|
|
30
|
+
|
|
31
|
+
index++;
|
|
49
32
|
}
|
|
50
33
|
|
|
51
34
|
return null;
|
|
@@ -63,29 +46,18 @@ class Graph {
|
|
|
63
46
|
let nextNodeName = this.current.getNextNode(event);
|
|
64
47
|
|
|
65
48
|
if (this.current.config.last && nextNodeName === null) {
|
|
66
|
-
_ApplicationContext.default.removeLoadedGraph();
|
|
49
|
+
_ApplicationContext.default.removeLoadedGraph(true);
|
|
67
50
|
} else {
|
|
68
51
|
if (!_Utils.default.isNull(nextNodeName)) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
74
|
-
const node = _step2.value;
|
|
52
|
+
for (const node of this.config.nodes) {
|
|
53
|
+
if (node.name === nextNodeName) {
|
|
54
|
+
this.current = new _GraphNode.default(node);
|
|
55
|
+
this.addNodeToPath(this.current);
|
|
75
56
|
|
|
76
|
-
|
|
77
|
-
this.current = new _GraphNode.default(node);
|
|
78
|
-
this.addNodeToPath(this.current);
|
|
57
|
+
_ActionHandlers.default.invokeHandler(node.action, null, null, this.config.id);
|
|
79
58
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
59
|
+
break;
|
|
84
60
|
}
|
|
85
|
-
} catch (err) {
|
|
86
|
-
_iterator2.e(err);
|
|
87
|
-
} finally {
|
|
88
|
-
_iterator2.f();
|
|
89
61
|
}
|
|
90
62
|
}
|
|
91
63
|
|
|
@@ -126,38 +98,18 @@ class Graph {
|
|
|
126
98
|
let index = 0;
|
|
127
99
|
|
|
128
100
|
if (this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC") {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const pathElement = _step3.value;
|
|
135
|
-
let stackItem = {};
|
|
136
|
-
stackItem.title = pathElement.title;
|
|
137
|
-
stackItem.index = index++;
|
|
138
|
-
titleStack.push(stackItem);
|
|
139
|
-
}
|
|
140
|
-
} catch (err) {
|
|
141
|
-
_iterator3.e(err);
|
|
142
|
-
} finally {
|
|
143
|
-
_iterator3.f();
|
|
101
|
+
for (const pathElement of this.path) {
|
|
102
|
+
let stackItem = {};
|
|
103
|
+
stackItem.title = pathElement.title;
|
|
104
|
+
stackItem.index = index++;
|
|
105
|
+
titleStack.push(stackItem);
|
|
144
106
|
}
|
|
145
107
|
} else {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const node = _step4.value;
|
|
152
|
-
let stackItem = {};
|
|
153
|
-
stackItem.title = node.title;
|
|
154
|
-
stackItem.index = index++;
|
|
155
|
-
titleStack.push(stackItem);
|
|
156
|
-
}
|
|
157
|
-
} catch (err) {
|
|
158
|
-
_iterator4.e(err);
|
|
159
|
-
} finally {
|
|
160
|
-
_iterator4.f();
|
|
108
|
+
for (const node of this.config.nodes) {
|
|
109
|
+
let stackItem = {};
|
|
110
|
+
stackItem.title = node.title;
|
|
111
|
+
stackItem.index = index++;
|
|
112
|
+
titleStack.push(stackItem);
|
|
161
113
|
}
|
|
162
114
|
}
|
|
163
115
|
|
|
@@ -169,13 +121,11 @@ class Graph {
|
|
|
169
121
|
}
|
|
170
122
|
|
|
171
123
|
get value() {
|
|
172
|
-
if (_Utils.default.isNull(this.config.valueObjectType)
|
|
124
|
+
if (_Utils.default.isNull(this.config.valueObjectType)) {
|
|
173
125
|
let value = {};
|
|
174
|
-
value.map = {};
|
|
175
126
|
|
|
176
|
-
for (
|
|
177
|
-
|
|
178
|
-
value.map[key] = this.modelData[key];
|
|
127
|
+
for (const key of Object.keys(this.modelData)) {
|
|
128
|
+
value[key] = this.modelData[key];
|
|
179
129
|
}
|
|
180
130
|
|
|
181
131
|
return value;
|
|
@@ -15,12 +15,6 @@ var _Utils = _interopRequireDefault(require("./../Utils"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
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
18
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
19
|
|
|
26
20
|
class GraphNode {
|
|
@@ -60,22 +54,11 @@ class GraphNode {
|
|
|
60
54
|
let activeEdge = null;
|
|
61
55
|
|
|
62
56
|
if (!_Utils.default.isNull(this.config.edges)) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
68
|
-
const edge = _step.value;
|
|
69
|
-
|
|
70
|
-
if (this.evaluateEdge(edge, event)) {
|
|
71
|
-
activeEdge = edge;
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
57
|
+
for (const edge of this.config.edges) {
|
|
58
|
+
if (this.evaluateEdge(edge, event)) {
|
|
59
|
+
activeEdge = edge;
|
|
60
|
+
break;
|
|
74
61
|
}
|
|
75
|
-
} catch (err) {
|
|
76
|
-
_iterator.e(err);
|
|
77
|
-
} finally {
|
|
78
|
-
_iterator.f();
|
|
79
62
|
}
|
|
80
63
|
}
|
|
81
64
|
|
|
@@ -17,21 +17,13 @@ var _ApplicationContext = _interopRequireDefault(require("../ApplicationContext"
|
|
|
17
17
|
|
|
18
18
|
var _reactPromiseTracker = require("react-promise-tracker");
|
|
19
19
|
|
|
20
|
-
|
|
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); }
|
|
20
|
+
var _Event = _interopRequireDefault(require("../event/Event"));
|
|
27
21
|
|
|
28
|
-
|
|
22
|
+
var _EventType = _interopRequireDefault(require("../event/EventType"));
|
|
29
23
|
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
25
|
|
|
34
|
-
const Handlebars = require(
|
|
26
|
+
const Handlebars = require('handlebars');
|
|
35
27
|
|
|
36
28
|
const status = response => {
|
|
37
29
|
if (response.ok) {
|
|
@@ -47,86 +39,70 @@ const json = response => {
|
|
|
47
39
|
return response.text();
|
|
48
40
|
};
|
|
49
41
|
|
|
50
|
-
const location = window.location.protocol +
|
|
42
|
+
const location = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port;
|
|
51
43
|
|
|
52
44
|
const HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const _React$useState3 = _react.default.useState(null),
|
|
59
|
-
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
60
|
-
template = _React$useState4[0],
|
|
61
|
-
setTemplate = _React$useState4[1];
|
|
62
|
-
|
|
63
|
-
const _React$useState5 = _react.default.useState(null),
|
|
64
|
-
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
65
|
-
content = _React$useState6[0],
|
|
66
|
-
setContent = _React$useState6[1];
|
|
67
|
-
|
|
68
|
-
const _React$useState7 = _react.default.useState(null),
|
|
69
|
-
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
70
|
-
model = _React$useState8[0],
|
|
71
|
-
setModel = _React$useState8[1];
|
|
72
|
-
|
|
73
|
-
const _React$useState9 = _react.default.useState(_Utils.default.getComponentAttribute(props.config, 'defaultVisibility', false)),
|
|
74
|
-
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
75
|
-
visible = _React$useState10[0],
|
|
76
|
-
setVisible = _React$useState10[1];
|
|
45
|
+
const [template, setTemplate] = _react.default.useState(null);
|
|
46
|
+
|
|
47
|
+
const [content, setContent] = _react.default.useState(null);
|
|
48
|
+
|
|
49
|
+
const [visible, setVisible] = _react.default.useState(false);
|
|
77
50
|
|
|
78
51
|
_react.default.useEffect(() => {
|
|
79
52
|
props.handle.api = api();
|
|
53
|
+
});
|
|
80
54
|
|
|
81
|
-
|
|
82
|
-
|
|
55
|
+
_react.default.useEffect(() => {
|
|
56
|
+
if (template) {
|
|
57
|
+
let event = new _Event.default(props.handle, props.viewId, null);
|
|
83
58
|
|
|
84
|
-
_Observable.default.
|
|
59
|
+
_Observable.default.fireEvent(_EventType.default.COMPONENT_LOAD, event);
|
|
60
|
+
}
|
|
61
|
+
}, [template]);
|
|
85
62
|
|
|
86
|
-
|
|
63
|
+
_react.default.useEffect(() => {
|
|
64
|
+
let parsedConfig = _Utils.default.parseConfig(props.config, props.viewId);
|
|
87
65
|
|
|
88
|
-
|
|
66
|
+
_Observable.default.addSubscriptions(parsedConfig.eventHandlingConfig, props.handle, props.viewId);
|
|
89
67
|
|
|
90
|
-
|
|
91
|
-
props.loadCompleteHandler(props.config.id);
|
|
92
|
-
}
|
|
68
|
+
_Observable.default.addSystemSubscriptions(parsedConfig);
|
|
93
69
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if (configTemplate && configTemplate.endsWith('.html')) {
|
|
97
|
-
let fetchConfig = {
|
|
98
|
-
method: 'GET'
|
|
99
|
-
};
|
|
100
|
-
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(location + configTemplate), fetchConfig).then(status).then(json).then(data => {
|
|
101
|
-
setTemplate(data);
|
|
102
|
-
}).catch(e => {
|
|
103
|
-
console.error(e);
|
|
104
|
-
}));
|
|
105
|
-
} else {
|
|
106
|
-
setTemplate(configTemplate); // TODO : Process template
|
|
107
|
-
|
|
108
|
-
setContent(configTemplate);
|
|
109
|
-
}
|
|
70
|
+
let configTemplate = props.config.template;
|
|
110
71
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
72
|
+
if (configTemplate && configTemplate.endsWith('.html')) {
|
|
73
|
+
let fetchConfig = {
|
|
74
|
+
method: 'GET'
|
|
75
|
+
};
|
|
76
|
+
(0, _reactPromiseTracker.trackPromise)(fetch(encodeURI(location + configTemplate), fetchConfig).then(status).then(json).then(data => {
|
|
77
|
+
setTemplate(data);
|
|
78
|
+
}).catch(e => {
|
|
79
|
+
console.error(e);
|
|
80
|
+
}));
|
|
81
|
+
} else {
|
|
82
|
+
setTemplate(configTemplate); // TODO : Process template
|
|
118
83
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
},
|
|
84
|
+
setContent(configTemplate);
|
|
85
|
+
}
|
|
122
86
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
87
|
+
Handlebars.registerHelper({
|
|
88
|
+
eq: (v1, v2) => v1 === v2,
|
|
89
|
+
ne: (v1, v2) => v1 !== v2,
|
|
90
|
+
lt: (v1, v2) => v1 < v2,
|
|
91
|
+
gt: (v1, v2) => v1 > v2,
|
|
92
|
+
lte: (v1, v2) => v1 <= v2,
|
|
93
|
+
gte: (v1, v2) => v1 >= v2,
|
|
126
94
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
95
|
+
and() {
|
|
96
|
+
return Array.prototype.every.call(arguments, Boolean);
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
or() {
|
|
100
|
+
return Array.prototype.slice.call(arguments, 0, -1).some(Boolean);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
});
|
|
104
|
+
props.handle.api.refresh();
|
|
105
|
+
}, []);
|
|
130
106
|
|
|
131
107
|
const api = () => {
|
|
132
108
|
return {
|
|
@@ -139,7 +115,7 @@ const HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
|
|
|
139
115
|
let data = _ApplicationContext.default.resolveExpressionValue(actionConfig.value);
|
|
140
116
|
|
|
141
117
|
let templateScript = Handlebars.compile(template);
|
|
142
|
-
setContent(templateScript(data
|
|
118
|
+
setContent(templateScript(data));
|
|
143
119
|
}
|
|
144
120
|
},
|
|
145
121
|
|
|
@@ -153,7 +129,12 @@ const HtmlPanel = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.default.
|
|
|
153
129
|
|
|
154
130
|
getChildren: () => {
|
|
155
131
|
return [];
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
set visible(visible) {
|
|
135
|
+
setVisible(visible);
|
|
156
136
|
}
|
|
137
|
+
|
|
157
138
|
};
|
|
158
139
|
};
|
|
159
140
|
|