@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
|
@@ -4,196 +4,199 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ElementResizeHandler = void 0;
|
|
7
|
+
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; }
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
9
|
+
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); }
|
|
7
10
|
const MIN_WIDTH = 60;
|
|
8
11
|
const MIN_HEIGHT = 40;
|
|
9
12
|
const FULLSCREEN_MARGINS = -10;
|
|
10
13
|
const MARGINS = 4;
|
|
11
14
|
class ElementResizeHandler {
|
|
12
15
|
constructor(pane, ghostPane) {
|
|
13
|
-
this
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
onTouchDown = e => {
|
|
35
|
-
this.onDown(e.touches[0]);
|
|
36
|
-
e.preventDefault();
|
|
37
|
-
};
|
|
38
|
-
onTouchMove = e => {
|
|
39
|
-
this.onMove(e.touches[0]);
|
|
40
|
-
};
|
|
41
|
-
onTouchEnd = e => {
|
|
42
|
-
if (e.touches.length === 0) {
|
|
43
|
-
this.onUp(e.changedTouches[0]);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
onMouseDown = e => {
|
|
47
|
-
this.onDown(e);
|
|
48
|
-
e.preventDefault();
|
|
49
|
-
};
|
|
50
|
-
onDown = e => {
|
|
51
|
-
this.calc(e);
|
|
52
|
-
var isResizing = this.onRightEdge || this.onBottomEdge || this.onTopEdge || this.onLeftEdge;
|
|
53
|
-
this.clicked = {
|
|
54
|
-
x: this.x,
|
|
55
|
-
y: this.y,
|
|
56
|
-
cx: e.clientX,
|
|
57
|
-
cy: e.clientY,
|
|
58
|
-
w: this.b.width,
|
|
59
|
-
h: this.b.height,
|
|
60
|
-
isResizing: this.isResizing,
|
|
61
|
-
isMoving: !this.isResizing && this.canMove(),
|
|
62
|
-
onTopEdge: this.onTopEdge,
|
|
63
|
-
onLeftEdge: this.onLeftEdge,
|
|
64
|
-
onRightEdge: this.onRightEdge,
|
|
65
|
-
onBottomEdge: this.onBottomEdge
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
canMove = () => {
|
|
69
|
-
return this.x > 0 && this.x < this.b.width && this.y > 0 && this.y < this.b.height && this.y < 30;
|
|
70
|
-
};
|
|
71
|
-
calc = e => {
|
|
72
|
-
this.b = this.pane.getBoundingClientRect();
|
|
73
|
-
this.x = e.clientX - this.b.left;
|
|
74
|
-
this.y = e.clientY - this.b.top;
|
|
75
|
-
this.onTopEdge = this.y < MARGINS;
|
|
76
|
-
this.onLeftEdge = this.x < MARGINS;
|
|
77
|
-
this.onRightEdge = this.x >= this.b.width - MARGINS;
|
|
78
|
-
this.onBottomEdge = this.y >= this.b.height - MARGINS;
|
|
79
|
-
this.rightScreenEdge = window.innerWidth - MARGINS;
|
|
80
|
-
this.bottomScreenEdge = window.innerHeight - MARGINS;
|
|
81
|
-
};
|
|
82
|
-
onMove = ee => {
|
|
83
|
-
this.calc(ee);
|
|
84
|
-
this.e = ee;
|
|
85
|
-
this.redraw = true;
|
|
86
|
-
};
|
|
87
|
-
animate = () => {
|
|
88
|
-
requestAnimationFrame(this.animate);
|
|
89
|
-
if (!this.redraw) return;
|
|
90
|
-
this.redraw = false;
|
|
91
|
-
if (this.clicked && this.clicked.isResizing) {
|
|
92
|
-
if (this.clicked.onRightEdge) this.pane.style.width = Math.max(this.x, MIN_WIDTH) + 'px';
|
|
93
|
-
if (this.clicked.onBottomEdge) this.pane.style.height = Math.max(this.y, MIN_HEIGHT) + 'px';
|
|
94
|
-
if (this.clicked.onLeftEdge) {
|
|
95
|
-
var currentWidth = Math.max(this.clicked.cx - this.e.clientX + this.clicked.w, MIN_WIDTH);
|
|
96
|
-
if (currentWidth > MIN_WIDTH) {
|
|
97
|
-
this.pane.style.width = currentWidth + 'px';
|
|
98
|
-
this.pane.style.left = this.e.clientX + 'px';
|
|
99
|
-
}
|
|
16
|
+
_defineProperty(this, "setBounds", (element, x, y, w, h) => {
|
|
17
|
+
element.style.left = x + 'px';
|
|
18
|
+
element.style.top = y + 'px';
|
|
19
|
+
element.style.width = w + 'px';
|
|
20
|
+
element.style.height = h + 'px';
|
|
21
|
+
});
|
|
22
|
+
_defineProperty(this, "hintHide", () => {
|
|
23
|
+
this.setBounds(this.ghostPane, this.b.left, this.b.top, this.b.width, this.b.height);
|
|
24
|
+
this.ghostPane.style.opacity = 0;
|
|
25
|
+
});
|
|
26
|
+
_defineProperty(this, "onTouchDown", e => {
|
|
27
|
+
this.onDown(e.touches[0]);
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
});
|
|
30
|
+
_defineProperty(this, "onTouchMove", e => {
|
|
31
|
+
this.onMove(e.touches[0]);
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "onTouchEnd", e => {
|
|
34
|
+
if (e.touches.length === 0) {
|
|
35
|
+
this.onUp(e.changedTouches[0]);
|
|
100
36
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "onMouseDown", e => {
|
|
39
|
+
this.onDown(e);
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
});
|
|
42
|
+
_defineProperty(this, "onDown", e => {
|
|
43
|
+
this.calc(e);
|
|
44
|
+
var isResizing = this.onRightEdge || this.onBottomEdge || this.onTopEdge || this.onLeftEdge;
|
|
45
|
+
this.clicked = {
|
|
46
|
+
x: this.x,
|
|
47
|
+
y: this.y,
|
|
48
|
+
cx: e.clientX,
|
|
49
|
+
cy: e.clientY,
|
|
50
|
+
w: this.b.width,
|
|
51
|
+
h: this.b.height,
|
|
52
|
+
isResizing: this.isResizing,
|
|
53
|
+
isMoving: !this.isResizing && this.canMove(),
|
|
54
|
+
onTopEdge: this.onTopEdge,
|
|
55
|
+
onLeftEdge: this.onLeftEdge,
|
|
56
|
+
onRightEdge: this.onRightEdge,
|
|
57
|
+
onBottomEdge: this.onBottomEdge
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
_defineProperty(this, "canMove", () => {
|
|
61
|
+
return this.x > 0 && this.x < this.b.width && this.y > 0 && this.y < this.b.height && this.y < 30;
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "calc", e => {
|
|
64
|
+
this.b = this.pane.getBoundingClientRect();
|
|
65
|
+
this.x = e.clientX - this.b.left;
|
|
66
|
+
this.y = e.clientY - this.b.top;
|
|
67
|
+
this.onTopEdge = this.y < MARGINS;
|
|
68
|
+
this.onLeftEdge = this.x < MARGINS;
|
|
69
|
+
this.onRightEdge = this.x >= this.b.width - MARGINS;
|
|
70
|
+
this.onBottomEdge = this.y >= this.b.height - MARGINS;
|
|
71
|
+
this.rightScreenEdge = window.innerWidth - MARGINS;
|
|
72
|
+
this.bottomScreenEdge = window.innerHeight - MARGINS;
|
|
73
|
+
});
|
|
74
|
+
_defineProperty(this, "onMove", ee => {
|
|
75
|
+
this.calc(ee);
|
|
76
|
+
this.e = ee;
|
|
77
|
+
this.redraw = true;
|
|
78
|
+
});
|
|
79
|
+
_defineProperty(this, "animate", () => {
|
|
80
|
+
requestAnimationFrame(this.animate);
|
|
81
|
+
if (!this.redraw) return;
|
|
82
|
+
this.redraw = false;
|
|
83
|
+
if (this.clicked && this.clicked.isResizing) {
|
|
84
|
+
if (this.clicked.onRightEdge) this.pane.style.width = Math.max(this.x, MIN_WIDTH) + 'px';
|
|
85
|
+
if (this.clicked.onBottomEdge) this.pane.style.height = Math.max(this.y, MIN_HEIGHT) + 'px';
|
|
86
|
+
if (this.clicked.onLeftEdge) {
|
|
87
|
+
var currentWidth = Math.max(this.clicked.cx - this.e.clientX + this.clicked.w, MIN_WIDTH);
|
|
88
|
+
if (currentWidth > MIN_WIDTH) {
|
|
89
|
+
this.pane.style.width = currentWidth + 'px';
|
|
90
|
+
this.pane.style.left = this.e.clientX + 'px';
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (this.clicked.onTopEdge) {
|
|
94
|
+
var currentHeight = Math.max(this.clicked.cy - this.e.clientY + this.clicked.h, MIN_HEIGHT);
|
|
95
|
+
if (currentHeight > MIN_HEIGHT) {
|
|
96
|
+
this.pane.style.height = currentHeight + 'px';
|
|
97
|
+
this.pane.style.top = this.e.clientY + 'px';
|
|
98
|
+
}
|
|
106
99
|
}
|
|
107
|
-
}
|
|
108
|
-
this.hintHide();
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
if (this.clicked && this.clicked.isMoving) {
|
|
112
|
-
if (this.b.top < FULLSCREEN_MARGINS || this.b.left < FULLSCREEN_MARGINS || this.b.right > window.innerWidth - FULLSCREEN_MARGINS || this.b.bottom > window.innerHeight - FULLSCREEN_MARGINS) {
|
|
113
|
-
// hintFull();
|
|
114
|
-
this.setBounds(this.ghostPane, 0, 0, window.innerWidth, window.innerHeight);
|
|
115
|
-
this.ghostPane.style.opacity = 0.2;
|
|
116
|
-
} else if (this.b.top < MARGINS) {
|
|
117
|
-
// hintTop();
|
|
118
|
-
this.setBounds(this.ghostPane, 0, 0, window.innerWidth, window.innerHeight / 2);
|
|
119
|
-
this.ghostPane.style.opacity = 0.2;
|
|
120
|
-
} else if (this.b.left < MARGINS) {
|
|
121
|
-
// hintLeft();
|
|
122
|
-
this.setBounds(this.ghostPane, 0, 0, window.innerWidth / 2, window.innerHeight);
|
|
123
|
-
this.ghostPane.style.opacity = 0.2;
|
|
124
|
-
} else if (this.b.right > this.rightScreenEdge) {
|
|
125
|
-
// hintRight();
|
|
126
|
-
this.setBounds(this.ghostPane, window.innerWidth / 2, 0, window.innerWidth / 2, window.innerHeight);
|
|
127
|
-
this.ghostPane.style.opacity = 0.2;
|
|
128
|
-
} else if (this.b.bottom > this.bottomScreenEdge) {
|
|
129
|
-
// hintBottom();
|
|
130
|
-
this.setBounds(this.ghostPane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
|
|
131
|
-
this.ghostPane.style.opacity = 0.2;
|
|
132
|
-
} else {
|
|
133
100
|
this.hintHide();
|
|
134
|
-
}
|
|
135
|
-
if (this.preSnapped) {
|
|
136
|
-
this.setBounds(this.pane, this.e.clientX - this.preSnapped.width / 2, this.e.clientY - Math.min(this.clicked.y, this.preSnapped.height), this.preSnapped.width, this.preSnapped.height);
|
|
137
101
|
return;
|
|
138
102
|
}
|
|
103
|
+
if (this.clicked && this.clicked.isMoving) {
|
|
104
|
+
if (this.b.top < FULLSCREEN_MARGINS || this.b.left < FULLSCREEN_MARGINS || this.b.right > window.innerWidth - FULLSCREEN_MARGINS || this.b.bottom > window.innerHeight - FULLSCREEN_MARGINS) {
|
|
105
|
+
// hintFull();
|
|
106
|
+
this.setBounds(this.ghostPane, 0, 0, window.innerWidth, window.innerHeight);
|
|
107
|
+
this.ghostPane.style.opacity = 0.2;
|
|
108
|
+
} else if (this.b.top < MARGINS) {
|
|
109
|
+
// hintTop();
|
|
110
|
+
this.setBounds(this.ghostPane, 0, 0, window.innerWidth, window.innerHeight / 2);
|
|
111
|
+
this.ghostPane.style.opacity = 0.2;
|
|
112
|
+
} else if (this.b.left < MARGINS) {
|
|
113
|
+
// hintLeft();
|
|
114
|
+
this.setBounds(this.ghostPane, 0, 0, window.innerWidth / 2, window.innerHeight);
|
|
115
|
+
this.ghostPane.style.opacity = 0.2;
|
|
116
|
+
} else if (this.b.right > this.rightScreenEdge) {
|
|
117
|
+
// hintRight();
|
|
118
|
+
this.setBounds(this.ghostPane, window.innerWidth / 2, 0, window.innerWidth / 2, window.innerHeight);
|
|
119
|
+
this.ghostPane.style.opacity = 0.2;
|
|
120
|
+
} else if (this.b.bottom > this.bottomScreenEdge) {
|
|
121
|
+
// hintBottom();
|
|
122
|
+
this.setBounds(this.ghostPane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
|
|
123
|
+
this.ghostPane.style.opacity = 0.2;
|
|
124
|
+
} else {
|
|
125
|
+
this.hintHide();
|
|
126
|
+
}
|
|
127
|
+
if (this.preSnapped) {
|
|
128
|
+
this.setBounds(this.pane, this.e.clientX - this.preSnapped.width / 2, this.e.clientY - Math.min(this.clicked.y, this.preSnapped.height), this.preSnapped.width, this.preSnapped.height);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
139
131
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
132
|
+
// moving
|
|
133
|
+
this.pane.style.top = this.e.clientY - this.clicked.y + 'px';
|
|
134
|
+
this.pane.style.left = this.e.clientX - this.clicked.x + 'px';
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
145
137
|
|
|
146
|
-
|
|
138
|
+
// This code executes when mouse moves without clicking
|
|
147
139
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
} else {
|
|
160
|
-
this.pane.style.cursor = 'default';
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
onUp = e => {
|
|
164
|
-
this.calc(e);
|
|
165
|
-
if (this.clicked && this.clicked.isMoving) {
|
|
166
|
-
// Snap
|
|
167
|
-
var snapped = {
|
|
168
|
-
width: this.b.width,
|
|
169
|
-
height: this.b.height
|
|
170
|
-
};
|
|
171
|
-
if (this.b.top < FULLSCREEN_MARGINS || this.b.left < FULLSCREEN_MARGINS || this.b.right > window.innerWidth - FULLSCREEN_MARGINS || this.b.bottom > window.innerHeight - FULLSCREEN_MARGINS) {
|
|
172
|
-
// hintFull();
|
|
173
|
-
this.setBounds(this.pane, 0, 0, window.innerWidth, window.innerHeight);
|
|
174
|
-
this.preSnapped = snapped;
|
|
175
|
-
} else if (this.b.top < MARGINS) {
|
|
176
|
-
// hintTop();
|
|
177
|
-
this.setBounds(this.pane, 0, 0, window.innerWidth, window.innerHeight / 2);
|
|
178
|
-
this.preSnapped = snapped;
|
|
179
|
-
} else if (this.b.left < MARGINS) {
|
|
180
|
-
// hintLeft();
|
|
181
|
-
this.setBounds(this.pane, 0, 0, window.innerWidth / 2, window.innerHeight);
|
|
182
|
-
this.preSnapped = snapped;
|
|
183
|
-
} else if (this.b.right > this.rightScreenEdge) {
|
|
184
|
-
// hintRight();
|
|
185
|
-
this.setBounds(this.pane, window.innerWidth / 2, 0, window.innerWidth / 2, window.innerHeight);
|
|
186
|
-
this.preSnapped = snapped;
|
|
187
|
-
} else if (this.b.bottom > this.bottomScreenEdge) {
|
|
188
|
-
// hintBottom();
|
|
189
|
-
this.setBounds(this.pane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
|
|
190
|
-
this.preSnapped = snapped;
|
|
140
|
+
// style cursor
|
|
141
|
+
if (this.onRightEdge && this.onBottomEdge || this.onLeftEdge && this.onTopEdge) {
|
|
142
|
+
this.pane.style.cursor = 'nwse-resize';
|
|
143
|
+
} else if (this.onRightEdge && this.onTopEdge || this.onBottomEdge && this.onLeftEdge) {
|
|
144
|
+
this.pane.style.cursor = 'nesw-resize';
|
|
145
|
+
} else if (this.onRightEdge || this.onLeftEdge) {
|
|
146
|
+
this.pane.style.cursor = 'ew-resize';
|
|
147
|
+
} else if (this.onBottomEdge || this.onTopEdge) {
|
|
148
|
+
this.pane.style.cursor = 'ns-resize';
|
|
149
|
+
} else if (this.canMove()) {
|
|
150
|
+
this.pane.style.cursor = 'move';
|
|
191
151
|
} else {
|
|
192
|
-
this.
|
|
152
|
+
this.pane.style.cursor = 'default';
|
|
193
153
|
}
|
|
194
|
-
|
|
195
|
-
|
|
154
|
+
});
|
|
155
|
+
_defineProperty(this, "onUp", e => {
|
|
156
|
+
this.calc(e);
|
|
157
|
+
if (this.clicked && this.clicked.isMoving) {
|
|
158
|
+
// Snap
|
|
159
|
+
var snapped = {
|
|
160
|
+
width: this.b.width,
|
|
161
|
+
height: this.b.height
|
|
162
|
+
};
|
|
163
|
+
if (this.b.top < FULLSCREEN_MARGINS || this.b.left < FULLSCREEN_MARGINS || this.b.right > window.innerWidth - FULLSCREEN_MARGINS || this.b.bottom > window.innerHeight - FULLSCREEN_MARGINS) {
|
|
164
|
+
// hintFull();
|
|
165
|
+
this.setBounds(this.pane, 0, 0, window.innerWidth, window.innerHeight);
|
|
166
|
+
this.preSnapped = snapped;
|
|
167
|
+
} else if (this.b.top < MARGINS) {
|
|
168
|
+
// hintTop();
|
|
169
|
+
this.setBounds(this.pane, 0, 0, window.innerWidth, window.innerHeight / 2);
|
|
170
|
+
this.preSnapped = snapped;
|
|
171
|
+
} else if (this.b.left < MARGINS) {
|
|
172
|
+
// hintLeft();
|
|
173
|
+
this.setBounds(this.pane, 0, 0, window.innerWidth / 2, window.innerHeight);
|
|
174
|
+
this.preSnapped = snapped;
|
|
175
|
+
} else if (this.b.right > this.rightScreenEdge) {
|
|
176
|
+
// hintRight();
|
|
177
|
+
this.setBounds(this.pane, window.innerWidth / 2, 0, window.innerWidth / 2, window.innerHeight);
|
|
178
|
+
this.preSnapped = snapped;
|
|
179
|
+
} else if (this.b.bottom > this.bottomScreenEdge) {
|
|
180
|
+
// hintBottom();
|
|
181
|
+
this.setBounds(this.pane, 0, window.innerHeight / 2, window.innerWidth, window.innerWidth / 2);
|
|
182
|
+
this.preSnapped = snapped;
|
|
183
|
+
} else {
|
|
184
|
+
this.preSnapped = null;
|
|
185
|
+
}
|
|
186
|
+
this.hintHide();
|
|
187
|
+
}
|
|
188
|
+
this.clicked = null;
|
|
189
|
+
});
|
|
196
190
|
this.clicked = null;
|
|
197
|
-
|
|
191
|
+
pane.addEventListener('mousedown', this.onMouseDown);
|
|
192
|
+
document.addEventListener('mousemove', this.onMove);
|
|
193
|
+
document.addEventListener('mouseup', this.onUp);
|
|
194
|
+
pane.addEventListener('touchstart', this.onTouchDown);
|
|
195
|
+
document.addEventListener('touchmove', this.onTouchMove);
|
|
196
|
+
document.addEventListener('touchend', this.onTouchEnd);
|
|
197
|
+
this.pane = pane;
|
|
198
|
+
this.ghostPane = ghostPane;
|
|
199
|
+
this.animate();
|
|
200
|
+
}
|
|
198
201
|
}
|
|
199
202
|
exports.ElementResizeHandler = ElementResizeHandler;
|
|
@@ -21,10 +21,10 @@ function initModules() {
|
|
|
21
21
|
// emit .bin shards
|
|
22
22
|
const ctxBin = require.context('@agilemotion/oui-react-js/dist/assets/models', false, /\.bin$/);
|
|
23
23
|
ctxBin.keys().forEach(ctxBin);
|
|
24
|
-
} catch {}
|
|
24
|
+
} catch (_unused) {}
|
|
25
25
|
try {
|
|
26
26
|
// emit extension-less shards (…-shard1, …-part1, etc.)
|
|
27
27
|
const ctxExtless = require.context('@agilemotion/oui-react-js/dist/assets/models', false, /(?:^|\/)[^/]+-(?:shard|part)\d+$/);
|
|
28
28
|
ctxExtless.keys().forEach(ctxExtless);
|
|
29
|
-
} catch {}
|
|
29
|
+
} catch (_unused2) {}
|
|
30
30
|
}
|
|
@@ -19,8 +19,7 @@ var _powerpoint = _interopRequireDefault(require("../assets/img/powerpoint.png")
|
|
|
19
19
|
var _defaultFileThumb = _interopRequireDefault(require("../assets/img/default-file-thumb.png"));
|
|
20
20
|
var _Utils = _interopRequireDefault(require("../Utils"));
|
|
21
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
-
function
|
|
23
|
-
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; }
|
|
22
|
+
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); }
|
|
24
23
|
const location = window.location.protocol + '//' + window.location.hostname;
|
|
25
24
|
const FileThumb = props => {
|
|
26
25
|
const [file] = (0, _react.useState)(props.file);
|
|
@@ -31,7 +30,8 @@ const FileThumb = props => {
|
|
|
31
30
|
}
|
|
32
31
|
}, [file]);
|
|
33
32
|
const isImage = () => {
|
|
34
|
-
|
|
33
|
+
var _file$type;
|
|
34
|
+
return (_file$type = file.type) === null || _file$type === void 0 ? void 0 : _file$type.startsWith('image/');
|
|
35
35
|
};
|
|
36
36
|
const getThumbImage = () => {
|
|
37
37
|
if (!file || !file.type) {
|
|
@@ -89,7 +89,7 @@ const FileThumb = props => {
|
|
|
89
89
|
cursor: 'pointer'
|
|
90
90
|
},
|
|
91
91
|
target: "_blank",
|
|
92
|
-
href:
|
|
92
|
+
href: "".concat(downloadUrl)
|
|
93
93
|
}, file.name) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, file.name))), (_Utils.default.isNull(props.showImage) || props.showImage) && /*#__PURE__*/_react.default.createElement("div", {
|
|
94
94
|
className: 'row',
|
|
95
95
|
style: {
|
|
@@ -109,7 +109,7 @@ const FileThumb = props => {
|
|
|
109
109
|
backgroundSize: 'contain',
|
|
110
110
|
backgroundPosition: 'center',
|
|
111
111
|
backgroundColor: 'transparent',
|
|
112
|
-
backgroundImage: isImage() ?
|
|
112
|
+
backgroundImage: isImage() ? "url(".concat(file.documentRepositoryId ? downloadUrl : file.payload, ")") : "url(".concat(getThumbImage(), ")")
|
|
113
113
|
}
|
|
114
114
|
})));
|
|
115
115
|
};
|
package/dist/components/Graph.js
CHANGED
|
@@ -9,8 +9,85 @@ var _ActionHandlers = _interopRequireDefault(require("../event/ActionHandlers"))
|
|
|
9
9
|
var _GraphNode = _interopRequireDefault(require("./GraphNode"));
|
|
10
10
|
var _Utils = _interopRequireDefault(require("../Utils"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
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; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
14
|
+
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); }
|
|
12
15
|
class Graph {
|
|
13
16
|
constructor(config) {
|
|
17
|
+
_defineProperty(this, "getCurrentNodeIndex", () => {
|
|
18
|
+
let index = 0;
|
|
19
|
+
let collection = this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC" ? this.path : this.config.nodes;
|
|
20
|
+
for (const element of collection) {
|
|
21
|
+
if (this.current.config.name === element.name) {
|
|
22
|
+
return index;
|
|
23
|
+
}
|
|
24
|
+
index++;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
});
|
|
28
|
+
_defineProperty(this, "init", async () => {
|
|
29
|
+
let root = this.config.nodes[0];
|
|
30
|
+
this.current = new _GraphNode.default(this.config.nodes[0]);
|
|
31
|
+
this.addNodeToPath(this.current);
|
|
32
|
+
if (root.action.actionType === 'route') {
|
|
33
|
+
root.action.window = this.config.isWindow;
|
|
34
|
+
root.action.graphId = this.config.id;
|
|
35
|
+
root.action.pinned = this.config.pinned;
|
|
36
|
+
root.action.defaultDisplayState = this.config.defaultDisplayState;
|
|
37
|
+
}
|
|
38
|
+
if (root.onStart) {
|
|
39
|
+
for (const action of root.onStart.actions) {
|
|
40
|
+
await _ActionHandlers.default.invokeHandler(action, null, null, this.config.id);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
await _ActionHandlers.default.invokeHandler(root.action, null, null, this.config.id);
|
|
44
|
+
});
|
|
45
|
+
_defineProperty(this, "signal", event => {
|
|
46
|
+
let nextNodeName = this.current.getNextNode(event);
|
|
47
|
+
if (this.current.config.last && nextNodeName === null) {
|
|
48
|
+
_ApplicationManager.default.removeLoadedGraph(this.config.isWindow ? 'window' : 'main');
|
|
49
|
+
} else {
|
|
50
|
+
if (!_Utils.default.isNull(nextNodeName)) {
|
|
51
|
+
for (const node of this.config.nodes) {
|
|
52
|
+
if (node.name === nextNodeName) {
|
|
53
|
+
this.current = new _GraphNode.default(node);
|
|
54
|
+
this.addNodeToPath(this.current);
|
|
55
|
+
if (node.action.actionType === 'route') {
|
|
56
|
+
node.action.window = this.config.isWindow;
|
|
57
|
+
node.action.graphId = this.config.id;
|
|
58
|
+
}
|
|
59
|
+
if (node.onStart) {
|
|
60
|
+
for (const action of node.onStart.actions) {
|
|
61
|
+
_ActionHandlers.default.invokeHandler(action, null, null, this.config.id);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
_ActionHandlers.default.invokeHandler(node.action, null, null, this.config.id);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (this.current === null) {
|
|
70
|
+
console.error("Node name could not be found : " + nextNodeName);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
_defineProperty(this, "setCurrentNodeTitle", title => {
|
|
75
|
+
if (this.current !== null) {
|
|
76
|
+
this.current.title = title;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
_defineProperty(this, "addNodeToPath", node => {
|
|
80
|
+
if (this.path.length === 0) {
|
|
81
|
+
this.path.push(node);
|
|
82
|
+
} else {
|
|
83
|
+
let lastNode = this.path[this.path.length - 1];
|
|
84
|
+
if (lastNode.config.name === node.config.name) {
|
|
85
|
+
this.path.pop();
|
|
86
|
+
} else {
|
|
87
|
+
this.path.push(node);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
14
91
|
this.config = config;
|
|
15
92
|
this.modelData = {};
|
|
16
93
|
this.current = null;
|
|
@@ -36,83 +113,9 @@ class Graph {
|
|
|
36
113
|
}
|
|
37
114
|
return titleStack;
|
|
38
115
|
}
|
|
39
|
-
getCurrentNodeIndex = () => {
|
|
40
|
-
let index = 0;
|
|
41
|
-
let collection = this.config.stepperMode === null || this.config.stepperMode === "DYNAMIC" ? this.path : this.config.nodes;
|
|
42
|
-
for (const element of collection) {
|
|
43
|
-
if (this.current.config.name === element.name) {
|
|
44
|
-
return index;
|
|
45
|
-
}
|
|
46
|
-
index++;
|
|
47
|
-
}
|
|
48
|
-
return null;
|
|
49
|
-
};
|
|
50
116
|
get title() {
|
|
51
117
|
return this.config.title;
|
|
52
118
|
}
|
|
53
|
-
init = async () => {
|
|
54
|
-
let root = this.config.nodes[0];
|
|
55
|
-
this.current = new _GraphNode.default(this.config.nodes[0]);
|
|
56
|
-
this.addNodeToPath(this.current);
|
|
57
|
-
if (root.action.actionType === 'route') {
|
|
58
|
-
root.action.window = this.config.isWindow;
|
|
59
|
-
root.action.graphId = this.config.id;
|
|
60
|
-
root.action.pinned = this.config.pinned;
|
|
61
|
-
root.action.defaultDisplayState = this.config.defaultDisplayState;
|
|
62
|
-
}
|
|
63
|
-
if (root.onStart) {
|
|
64
|
-
for (const action of root.onStart.actions) {
|
|
65
|
-
await _ActionHandlers.default.invokeHandler(action, null, null, this.config.id);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
await _ActionHandlers.default.invokeHandler(root.action, null, null, this.config.id);
|
|
69
|
-
};
|
|
70
|
-
signal = event => {
|
|
71
|
-
let nextNodeName = this.current.getNextNode(event);
|
|
72
|
-
if (this.current.config.last && nextNodeName === null) {
|
|
73
|
-
_ApplicationManager.default.removeLoadedGraph(this.config.isWindow ? 'window' : 'main');
|
|
74
|
-
} else {
|
|
75
|
-
if (!_Utils.default.isNull(nextNodeName)) {
|
|
76
|
-
for (const node of this.config.nodes) {
|
|
77
|
-
if (node.name === nextNodeName) {
|
|
78
|
-
this.current = new _GraphNode.default(node);
|
|
79
|
-
this.addNodeToPath(this.current);
|
|
80
|
-
if (node.action.actionType === 'route') {
|
|
81
|
-
node.action.window = this.config.isWindow;
|
|
82
|
-
node.action.graphId = this.config.id;
|
|
83
|
-
}
|
|
84
|
-
if (node.onStart) {
|
|
85
|
-
for (const action of node.onStart.actions) {
|
|
86
|
-
_ActionHandlers.default.invokeHandler(action, null, null, this.config.id);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
_ActionHandlers.default.invokeHandler(node.action, null, null, this.config.id);
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (this.current === null) {
|
|
95
|
-
console.error("Node name could not be found : " + nextNodeName);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
setCurrentNodeTitle = title => {
|
|
100
|
-
if (this.current !== null) {
|
|
101
|
-
this.current.title = title;
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
addNodeToPath = node => {
|
|
105
|
-
if (this.path.length === 0) {
|
|
106
|
-
this.path.push(node);
|
|
107
|
-
} else {
|
|
108
|
-
let lastNode = this.path[this.path.length - 1];
|
|
109
|
-
if (lastNode.config.name === node.config.name) {
|
|
110
|
-
this.path.pop();
|
|
111
|
-
} else {
|
|
112
|
-
this.path.push(node);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
119
|
get value() {
|
|
117
120
|
if (_Utils.default.isNull(this.config.valueObjectType)) {
|
|
118
121
|
let value = {};
|